[antlr-interest] These tokens ... and nothing else

Monty Zukowski monty at codetransform.com
Thu Dec 2 09:18:33 PST 2004


Bryan Ewbank wrote:
> Is there some way in ANTLR to prevent a parser/treeparser from defining more
> tokens?

Not that I know of.

> I ask because I got bit by a typo in a base grammar ("-glib foo.g" is
> great!) that silently generated another token rather than being rejected -
> it was only much later I realized that there was a disconnect.

Good idea, though.

You could write a little script to diff the generated TokenTypes.txt 
files and warn you if they are different.

Monty


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list