[antlr-interest] How to combine rules into one node for an AST?

Steve Bennett stevagewp at gmail.com
Sat Nov 24 19:33:42 PST 2007


Say I have a rule like this:

Rule: MARKER sometext moretext ENDMARKER
-> ^(MARKER sometext moretext);

I end up with a MARKER node with two subnodes. What's the best way to
end up with a single subnode that is the concatenation of those two
rules? Do I have to do it manually?

Thanks,
Steve


More information about the antlr-interest mailing list