[antlr-interest] Dynamic tokens
mschnelte at gmx.de
mschnelte at gmx.de
Thu Aug 9 06:59:34 PDT 2007
Hello everyone,
Consider the following grammar:
expr: IF element value THEN;
element: 'bla1 bla2' | 'xyz';
value: 'abc';
So "IF bla1 bla2 abc THEN" would be a correct expression.
Nothing special, but this is static. I'd like to add elements and values
during runtime.
What I mean is, that all elements and values known so far are stored in a
Set instead of being hardcoded in the grammar.
And elements and values can be composed out of more than one word.
Is this possible?
Thank you!
Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070809/e19820dd/attachment-0001.html
More information about the antlr-interest
mailing list