[antlr-interest] strict parsing

Gerard van de Glind g.vandeglind at beinformed.nl
Wed Jun 25 23:23:41 PDT 2008


Hi there,

 

I have a grammar that recognizes simple arithmetic expressions.

So something like 'x + 2' is a valid expression.

However the expression '[x + 2' is also accepted, in my log file I see
the following message:

 

line 1:0 no viable alternative at character '['

 

'[' is not valid token in my grammar, so it's ignored.

I want to make my grammar stricter that it doesn't accept these kind of
expressions anymore.

Does anyone have a clue how I can do this?

 

Thanks for your help!

 

Cheers,

Gerard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080626/9e21ea3f/attachment.html 


More information about the antlr-interest mailing list