[antlr-interest] how to get the value of an identifier
Gavin Lambert
antlr at mirality.co.nz
Sat Sep 26 14:38:54 PDT 2009
At 03:51 27/09/2009, Thierry USO wrote:
>procedure_name
>: IDENTIFIER
>;
>
>IDENTIFIER
>: LETTER (LETTER|_|DIGIT)+
>;
>
>-----
>
>How can I get the value of procedure_name and print it (screen
or
>file) ? Adding {System.out.print($IDENTIFIER.text);} in the
>procedure_name rule does not work.
Define "does not work".
Also, it's difficult to try to solve problems (especially vague
ones) without a complete grammar. Please either make your full
grammar available or post a minimal but complete grammar that
reproduces the problem.
More information about the antlr-interest
mailing list