Hello,

I am trying to write a grammar for the procedural language of a dead L4G 
(Rally). The goal is to translate some L4G procedures into a modern programming 
language, using the lexer/parser generated by antlr.

I am confronted with the following problem:

--- Extract of the grammar ---

heading
: PROCEDURE (SPACE)* procedure_name (SPACE)* parameter_declaration ';'
;

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.

Thanks for your help.




List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to