[antlr-interest] Constants in AST

Gavin Lambert antlr at mirality.co.nz
Mon Jul 28 14:03:04 PDT 2008


At 07:59 29/07/2008, Johannes Luber wrote:
 >Did you try imaginary tokens? Those are defined in the tokens
 >section like this:
 >
 >tokens {
 >CONSTANT_2;
 >}

You can also do something like this:

tokens {
   CONSTANT;
}

...
   -> ^(A B CONSTANT["2"] C)
...



More information about the antlr-interest mailing list