[antlr-interest] Simlpe grammar: Won't run at all.

Terence Parr parrt at cs.usfca.edu
Wed May 18 07:57:40 PDT 2005


On May 18, 2005, at 6:38 AM, Gary Bennett wrote:

> Hello,
>
> I'm just starting out with this.
>
> I have this simple grammar (This is the simplest grammar showing the
> error that is).
>
> It generates antlr files but they won't run because:
>
>     static public void initializeASTFactory( ASTFactory factory )
>     {
>         factory.setMaxNodeType(5); <<-- ArgumentException.
>     }
>
> Can anyone explain what I am doing wrong.

Should that be a class type not a token type?

Ter



More information about the antlr-interest mailing list