[antlr-interest] StringTemplate Expr example,

Ted Villalba tedv at esrconsulting.com
Mon May 21 10:23:01 PDT 2007


Forgive this test..testing my posts to the same thread.
 
Thx.
 
  _____  

From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Ted Villalba
Sent: Monday, May 21, 2007 10:11 AM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] StringTemplate Expr example,
 
Here is the fix for the compile error:
 
StringTemplate output = (StringTemplate)r2.getTemplate();
 
 
Working my way through the book, I'm trying to compile the ByteCode
Generator example given in Chapter 9 - Generating Structured Text with
Templates and Grammars. 
The example uses a version of the Expr grammar. 
I receive an error when I try to compile the test rig.
Has anyone else encountered this compilation err, and if so, what did you do
to address it?
 
Test.java:43: incompatible types
found   : java.lang.Object
required: org.antlr.stringtemplate.StringTemplate
        StringTemplate output = r2.getTemplate();
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070521/0e80fbdc/attachment-0001.html 


More information about the antlr-interest mailing list