[antlr-interest] MismatchedTokenException and how to find errors in ANTLRWorks
Jim Idle
jimi at temporal-wave.com
Wed Feb 13 13:57:42 PST 2008
> -----Original Message-----
> From: Loring Craymer [mailto:lgcraymer at yahoo.com]
> Sent: Wednesday, February 13, 2008 12:17 PM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] MismatchedTokenException and how to find
> errors in ANTLRWorks
>
> I've learned that "the customer is always right" is good policy on bug
> reports--not that he is right about the specifics, but that he is
> usually right that "there is a problem".
I dont think that anyone has said anything different to this,
including myself. However, what I think is wrong is that they are there
in the first place. Others think they are a good idea, however I don't
see any good way to explain it to new users when all they want to do is
start hacking away (as we all do, with everything).
> As Guntis points out, in this
> case it is not the literals that are the problem but the confusion
> arising from combined grammars which hide the lexer.
> Jim's
> approach of discouraging beginners from using them has to be
incorrect;
> literals are not an advanced feature but a user convenience if they
are
> properly documented.
If you think that all that is wrong is they are not documented properly,
then there is an easy solution that you can provide, being to document
them. Personally, I think that new users wont read that documentation
either at all or at least properly and will be in exactly the same
situation. If I had a vote, I would vote to remove them altogether. I
never said that they were an advanced feature, but that the issues are
too confusing for new users hence only users with a bit more knowledge
of how it flows together can use them without confusing their selves.
In the absence of any other options, the 'approach' to suggest not using
them has helped quite a few people, and as such I must disagree that it
is somehow wrong.
Jim
More information about the antlr-interest
mailing list