[antlr-interest] internal error

Olivier Lefevre lefevrol at yahoo.com
Fri Feb 1 15:09:10 PST 2008


> Ok, yes, it's in that example you posted, but that seems a bit dodgy to me.

The example couldn't be more authoritative (to a newbie at least) given its
provenance but I see the problem and I will follow your advice.

> This is where having unit tests to exercise your lexer/parser is a good 
> idea, since you'll catch this sort of thing at that point (assuming your 
> test cases are comprehensive enough).

Well, but that is just what I was doing: it was a sample input file with
[] that caught the problem; I don't expect empty lists in the real-world
inputs. And this silly list grammar is itself an attempt to modularize the
development of a more complex grammar to make it easier to develop and
test.

-- O.L.



More information about the antlr-interest mailing list