[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Grammatica-users] How can I generate grammar at run-time?
From: |
Ламер |
Subject: |
[Grammatica-users] How can I generate grammar at run-time? |
Date: |
Thu, 22 Apr 2010 07:48:22 +0400 |
Hi,
Is it possible to generate grammar on the fly. I want to parse an input text
depending on the grammar_1 that will be taken at run-time. Parse this
grammar_1, generate grammar_2
and parse the input text based on grammar_2.
e.g.
--------------------------------------------------------------------------------------------------------------------------------
/**
*Grammar_1, it some language that tells to my parser in which form input text
will be,
* like:
*/
<<${title}>>, ${date}, ${time}, ${tvname} /${author}/ =${duration}=
${text}
/* parse this grammar_1, generate grammar_2
* for the input like the following one:
*/
<<Evening News>>,12 november 2009, 19:30, KazakhstanTV /Name Surname/ =4,00=
Some input text,sdlfjlskdjfk
/**
* At the end it should retrieve variables, like
* ${title} = Evening News
* ${date} = 12 november 2009
* etc.
*/
--------------------------------------------------------------------------------------------------------------------------------
Thanks in advance, any help will be appreciated
P.S. Sorry for any grammatical mistakes in English ;)
- [Grammatica-users] How can I generate grammar at run-time?,
Ламер <=