[antlr-interest] template output in atlrworks debugger

Naveen Garg naveen.garg at gmail.com
Sat May 15 13:27:14 PDT 2010


Is it possible to show template outputs in the antlrworks debugger ?

I am trying to run the templates example in antlrworks:
( from "the definitive antlr reference":  templates/T.g, T.Java, T.stg )
T.g compiles in antlrworks, but it didn't know how to find T.stg...
editing T.g under Run => Edit T.g Test Rig for Java to match T.Java from the
bookcode caused problems connecting the debugger.
So, I just took the template from T.stg and put it inline:
options {output=template;}
s : ID '=' INT ';' -> template(x={$ID.text},y={$INT.text}) "<x> := <y>;" ;
Now the template was found, and the debugger parses the input fine, but I
get nothing in the debugger output.

Running the example from the command line, and connecting to the remote
debugger under antlrworks:
java org.antlr.Tool -debug T.g
javac Test.java TParser.java TLexer.java
I get the template output on the command line but not in the antlrworks
debugger...


More information about the antlr-interest mailing list