[antlr-interest] StringBuffer problem

Serafettin Senturk serafettin_sentuerk at intergral.com
Tue May 24 07:43:16 PDT 2005


 Hello,

 I had a look at Java Emitter using AST as a tree walker. To get the Java
source code, it is using StringBuffer named output. But how can i see this
output result? I mean, how should i invoke this "JavaOutputTreeParser" from
my main program?

 I have tried the following, but it does not work:

 	StringBuffer output = null;
      JavaOutputTreeParser javaWriter = new JavaOutputTreeParser();
      javaWriter.scriptBody(t);  // t is an AST coming from tree walker for
transformation, scriptBody is my main rule reference
  	System.out.println(javaWriter.output);


  Regards,
 Serafettin




More information about the antlr-interest mailing list