[antlr-interest] tpantlr.code bundle, string template example

pfa at isep.ipp.pt pfa at isep.ipp.pt
Tue Nov 24 07:23:51 PST 2009



Hi, 

Running string template example, T.g grammar, in a command line
console, works fine after changing the return type from getTemplate method
of the s_return class of the generated TParser. 

From: 

 public static
class s_return extends ParserRuleReturnScope { 

 public StringTemplate st;


 public Object getTemplate() { return st; } 

 public String toString() {
return st==null?null:st.toString(); } 

 };  

To: 

 public static class
s_return extends ParserRuleReturnScope { 

 public StringTemplate st; 


public StringTemplate getTemplate() { return st; } // here 

 public String
toString() { return st==null?null:st.toString(); } 

 }; 

Pedro 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091124/014171ca/attachment.html 


More information about the antlr-interest mailing list