Incomprehensible behaviour of parser
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Sunday, April 9, 2006 07:58 AM

I'm getting rather odd behaviour from a parser I'm using. It's one of several, all based on the same base grammar. Putting it in words, it's telling me that the first token it gets is unexpected, despite the fact that it's a literal that's explicitly expected. The base grammar (super.g), specific grammar (buildings.g) and sample data (buildings.txt) are to be found at http://shed.geekworld.co.uk/~sdb/jguru/antlr/ . The error I get from the parser is line 1:10: unexpected token: 0 The code I've put online won't actually compile, as it's dependent on lots of other code. If anyone really wants to look at it, I'll point them at the svn with all the code in. B   More>>

I'm getting rather odd behaviour from a parser I'm using. It's one of several, all based on the same base grammar. Putting it in words, it's telling me that the first token it gets is unexpected, despite the fact that it's a literal that's explicitly expected.

The base grammar (super.g), specific grammar (buildings.g) and sample data (buildings.txt) are to be found at http://shed.geekworld.co.uk/~sdb/jguru/antlr/ .

The error I get from the parser is

			
line 1:10: unexpected token: 0


The code I've put online won't actually compile, as it's dependent on lots of other code. If anyone really wants to look at it, I'll point them at the svn with all the code in.

Basically just wondered if anyone had any thoughts about this. Other than how messy my first use of ANTLR is...

   <<Less
About | Sitemap | Contact