[antlr-interest] generating root nodes in tree parser

Tarun Khanna tarunkhanna at gmail.com
Tue Jul 12 08:24:23 PDT 2005

Is there a way to add a root node that is not part of the parser grammar? 
e.g. I when the parser sees a function call I want to generate a subtree 
with a root such as CALL and two children.

The first child would be the identifier(function name) and second would be 
the list of parameters.

so a function call like... foo(a, b) would be translated to

/ \
/ \
foo a, b

Actually, what is the best way to represent function calls in syntax trees? 
This is just what I thought would be right.
Tarun Khanna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050712/e496dc9e/attachment-0001.html

More information about the antlr-interest mailing list