[antlr-interest] generating root nodes in tree parser
Tarun Khanna
tkhanna at redhat.com
Tue Jul 12 09:55:01 PDT 2005
Thanks for the help.
>functionCall: id:ident pl:paramlist { ## = #(#[CALL,'function call'],
>#id, #pl); };
>
>
Although I think I understand what the above statement would do, but due
to my being new to this stuff and to avoid any assumption related
errors :-) could you just tell me if what I think is correct? Here it goes.
the ## creates new node
The new node is specified using the #(...) syntax...
#[CALL , 'function call'] creates the root node and gives it a label too.
#id would and #pl then become the children..
Am I right in parsing (pardon the inherent pun) the above statement?
Is there a source where I can find out about such syntax? Something that
I can check before firing a questin on ANTLR mailing list?
Thanks a lot for your help.
Tarun
More information about the antlr-interest
mailing list