[antlr-interest] Puzzling Problem

Sam Barnett-Cormack sdb at geekworld.co.uk
Sun Apr 9 08:20:54 PDT 2006


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