[antlr-interest] how to initialize Antlr local variables?

Ching zching01 at gmail.com
Thu Dec 30 13:53:27 PST 2010


Hi,

In a Antlr grammar file, I declared a number of variables. Is there a way to
initialize these variables, for example, in the default constructor?

Is below a legitimate grammar statement?

*start:  initialization { var = new XXX();}  compilation_unit EOF*

Thanks.


More information about the antlr-interest mailing list