[antlr-interest] AntlrWorks tokenVocab support
Thomas Karcher
thkarcher at gmx.de
Mon Feb 25 02:19:26 PST 2008
Hi Felix,
> options {
> tokenVocab=Expr;
> ...
> }
> As the Grammar Rules include lexical token names from an external
> definition, they are marked as "undefined references". Can I somehow
> make AntlrWorks "import" these token names from the grammar that defines
> them to make the "error" markers disappear?
Are you using the current ANTLRWorks 1.1.7?
As long as I keep the Expr.token file up-to-date (by generating the
non-tree grammar) in the same directory as the tree grammar file, it
works for me.
The is a little trick, though, to "motivate" ANTLRWorks to re-read the
token file: Just comment the tokenVocab line and uncomment it
afterwards ... then new tokens from the non-tree grammar become
recognized.
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080225/3cf84cac/attachment.bin
More information about the antlr-interest
mailing list