[antlr-interest] inline template output
Michael West
quagly at me.com
Sun Oct 24 05:44:30 PDT 2010
I found the solution. I will post it here to help others who may have
trouble with this well documented feature.
My basic problem was what I need to use the rewrite option with my template
output in the grammar like so:
options {
output=template;
rewrite=true;
}
Then just follow the simple instructions in the definitive guide, section
5.6 Rewrite Option
In my Test class:
changed CommonTokenStream to TokenRewriteStream
print out the tokens from the TokenRewriteStream. - In my mind this was
what my question was about. If I don't pass a template in I don't have
anything in hand to render. TokenRewriteStream provides that.
--
View this message in context: http://antlr.1301665.n2.nabble.com/inline-template-output-tp5665577p5667544.html
Sent from the ANTLR mailing list archive at Nabble.com.
More information about the antlr-interest
mailing list