[antlr-interest] How to get stringtemplate output from all rules in a simple grammar? Parser only returns stringtemplate output from main rule.
Vincent Hoogendoorn
Vincent.Hoogendoorn at macaw.nl
Wed Aug 25 03:45:10 PDT 2010
In a simple Antlr 3.2 grammar with option output = 'template' I can get the output from the stringtemplate of the main rule like this:
Rule:
Main : rootStatement* -> template() "Main";
Code:
r = parser.main();
output = r.ST.ToString();
Other rules fire as well and they have stringtemplates as well, but I don't know how to get at their output.
What am I missing?
More information about the antlr-interest
mailing list