[antlr-interest] AST NODE CHOICE
colettekirwan
colettekirwan at yahoo.co.uk
Wed Jul 9 05:47:52 PDT 2003
Hi,
I was wondering is it possible using the antlr grammar to generate a
tree node based on a choice i.e
I have the following grammar in my Parser
test_statement:!
e2:node1_list e1:node2_list e3:(node3_list | node4_list)
{## = #([TEST_STATEMENT,"TEST_STATEMENT"],#e2,#e1,#e3);}
;
I want the last node e3 to be either node3_list or node4_list
depending on the User's input. The above grammar compiles but does
not work i.e my Parser code does not generate any code relating to e3.
Is it possible using the antlr grammar that I can state let e3 be
either node3_list or node4_list depending on Input?
Regards
Colette
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list