[antlr-interest] modified example T.g has no output

Michael West quagly at me.com
Mon Dec 6 19:46:29 PST 2010


After looking through the books again and this article:

http://www.antlr.org/wiki/display/ST/Language+Translation+Using+ANTLR+and+StringTemplate

I understand that I need to somehow pass the assign template back up the
call stack so that when the entry point 's' is called it returns something. 
I have not been able to determine how to implement that.  

>From the article:
The general strategy then for the translator is to have every rule return a
StringTemplate representing the appropriately translated text. The return
value of the start rule will be the entire translation. The main program
will call the start rule, program, and print out the return value:

Can you help me get started with this?  
-- 
View this message in context: http://antlr.1301665.n2.nabble.com/modified-example-T-g-has-no-output-tp5805707p5810377.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list