[antlr-interest] just one tokentypes file

Bryan Ewbank ewbank at synopsys.com
Wed Oct 20 02:04:39 PDT 2004


Wolfgang asked how to limit the number of vocabulary files generated....
> I'm bit playing around with (export|import)Vocab and this raised a
> question:
> ...

You can have one tokentypes file by using only "importVocab" option; I do
this, and just ignore the extra generated export vocab files.  I don't think
there's a way to prevent generation of the export vocabulary in any case.

I have a single tokentypes file (hand written, follows with *.txt format)
saved in our revision system that I use for all my parsers, which means
there is only one place where you can add new tokens.  It has made
development much easier.

In particular, it makes regression testing much easier because the token
types are unchanged as I add more tokens to the end of the file (the new
results and old results therefore match when the same trees are produced).

Having a separate tokens file allows me to sort the token file once in a
while (renumbering everything) to keep myself sane; it also gives me a
simple place to start when I add another tree parser to my pipeline.




 
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