[antlr-interest] stuck on templates

Warner Onstine warnero at gmail.com
Mon Aug 27 11:55:57 PDT 2007


Doh! Found my issue (went back and looked at the code for CMinus and
it was declaring program, not something different as I thought it
was). I changed my prog entry and ANTLRWorks stopped complaining.
Onward!

-warner

On 8/27/07, Warner Onstine <warnero at gmail.com> wrote:
> Ok, when I tried this I get a syntax error when trying to generate
> (which I'm not sure if it's this or something else - probably
> something else, but help is greatly appreciated). (The error is from
> the maven2 antlr3 plugin, but I get a similar error when trying to
> generate from inside ANTLRWorks). I've attached the grammar.
>
> error(100): C:\java\projects\chama-antlr2\src\main\antlr\Model.g:19:1:
> syntax error: antlr:
> C:\java\projects\chama-antlr2\src\main\antlr\Model.g:19:1: expecting
> COLON, found 'prog'
>
> Thanks for all the help!
>
> -warner
>
> On 8/27/07, Johannes Luber <jaluber at gmx.de> wrote:
> > Upps, I just got confused local rule scopes with the global scopes,
> > which I've been using. The grammar *is* actually correct and ANDLRworks
> > doesn't complain about any error when generating the file. Does
> > generating of your copy cause an error? Or does your changed version
> > cause the error? If the latter, please post the changed rule/grammar.
> >
> > Best regards,
> > Johannes Luber
> >
>
>
> --
> Warner Onstine - Programmer/Author
> New book on Tapestry 4!
> Tapestry 101 available at
> http://sourcebeat.com/books/tapestrylive.html
> warner at warneronstine.com
> http://warneronstine.com/blog
>
>


-- 
Warner Onstine - Programmer/Author
New book on Tapestry 4!
Tapestry 101 available at
http://sourcebeat.com/books/tapestrylive.html
warner at warneronstine.com
http://warneronstine.com/blog


More information about the antlr-interest mailing list