[antlr-interest] Where to put general intialisation logic for a parser?

Johannes Luber jaluber at gmx.de
Wed Apr 11 06:19:32 PDT 2007


David Holroyd wrote:
> Anyway, a more basic option; just add some setter-methods and use a
> 'builder' pattern to obtain parser instances?  Might be easier to write
> unit tests that way...
> 

You mean to write another class which does the parsing of the additional
files and giving the result to the actual parser class? I like it! :)
Keeps some of the bookkeeping out of the grammar.

Best regards,
Johannes Luber


More information about the antlr-interest mailing list