[antlr-interest] compilation error on grammar

Jim Idle jimi at temporal-wave.com
Thu Aug 2 18:39:11 PDT 2007


The issue here might be your use of the java keyword 'package' for your
rule name. Try using a different name :-)

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Warner Onstine
> Sent: Thursday, August 02, 2007 4:53 PM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] compilation error on grammar
> 
> On 8/2/07, Randall R Schulz <rschulz at sonic.net> wrote:
> > On Thursday 02 August 2007 16:37, Warner Onstine wrote:
> > > Hi all,
> > > Just to preface this, I am very new to grammars (and ANTLR
> > > specifically). I am attempting to convert a Groovy DSL that I
wrote
> > > to an external DSL piece by piece. Here is the current error I'm
> > > running into with this grammar:
> > > grammar Model;
> > >
> > > ...
> > >
> > > When I generate the java class files for the grammer I get an
error
> > > in my ModelParser.java file here:
> > >     // $ANTLR start prog
> > >     //
> > > C:\\java\\projects\\chama-antlr\\src\\main\\antlr\\Model.g:3:1:
> prog
> > > : package ( WS )? model ;



More information about the antlr-interest mailing list