Hello,

To make checking and generating easier, I would like to parse lines like the 
following:
node n1, n2, n3;

And turn them into trees like this:
(VAR 'node' 'n1')
(VAR 'node' 'n2')
(VAR 'node' 'n3')

At the moment I'm using the following rules to parse, but this obviously 
does not generate the result I would like to have:
var_declaration : var_type id_list -> ^(VAR var_type id_list) ;

id_list : IDENTIFIER (COMMA! id_list)? ;

Obviously, this generates trees like this:
(VAR 'node' 'n1' 'n2' 'n3')

Could anyone point me in a direction that allows me to end up with trees 
like I described above? If this is at all possible ;)

Thanks a lot!

Olaf Keijsers 


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