[antlr-interest] Puzzling Problem

Vidar Håkestad vidar at hawkis.com
Sun Apr 9 08:46:26 PDT 2006


I'll correct myself: The only lexer rule I see that could catch the initial 
"0" is the protected DIGIT (in the super.g), and protected methods in the 
lexer never reaches the parser?

Vidar

On Sunday 09 April 2006 17:35, Vidar Håkestad wrote:
> Could it be that it actually is the lexer that complain? No lexer rules are
> provided...
>
> Regards
> Vidar
>
> On Sunday 09 April 2006 17:20, Sam Barnett-Cormack wrote:
> > Hi all,
> >
> > I have an odd problem with a parser I'm using. The relevant grammar and
> > data files are at http://shed.geekworld.co.uk/~sdb/jguru/antlr/ - the
> > lexer and base grammar are in super.g, the parser/grammar in question is
> > in buildings.g, and the data file is buildings.txt.
> >
> > The error I get on running it is the slightly odd
> >
> > line 1:10: unexpected token: 0
> >
> > This is especially odd, as the grammar specifies that the first token it
> > should get *is* "0".
> >
> > I was just wondering if anyone could shed any light on this. You won't
> > be able to generate actual bytecode from the files I've given, as they
> > are part of a much bigger project. If anyone wants to see it all and
> > perhaps be able to compile it, it's in an svn repository that I can give
> >   people the address of. It's an eclipse project, so ANTLREclipse will
> > be useful to look at it in Eclipse.
> >
> > Sam


More information about the antlr-interest mailing list