[antlr-interest] how to concatenate string nodes into one node when
create AST?
Charlie Yang
Cyang at infobal.com
Tue May 9 13:50:18 PDT 2006
Hi:
I'm doing kind of SQL parser, want to control the Construction of AST.
if I do like below in the grammar,
.....
argument ! :
an:argument_name at:argument_type
{ #argument = #([FUNCTION_ARGU, "argu"], #an, #at ); }
.....
the output AST sub tree would be:
("argu", argument_name, argument_type ). "argu" is root,
and two others are children.
How can I combine string type child nodes into single one child node like
that ?:
("argu", argument_name + argument_type )
or ("argu", argument_name + SPACE + argument_type )
Thanks,
Charlie
More information about the antlr-interest
mailing list