[antlr-interest] How to find missing tokens in eclipse.

Nev antlr at zavalon.com
Wed Feb 13 01:38:19 PST 2008


This is some what along the same lines of "MismatchedTokenException and how
to finderrors in ANTLRWorks"

 

I am writing an Eclipse plug-in and having trouble verifying that there are
no missing tokens (or miss spelled token names)

What I am seeing is that if the token is *not* required by the source that
is being parsed, then there is no indication that there is a miss match
between lexer and parser.

Is there a way to force errors if there is a missing token at compile time,
or is there a utility that can check for missing tokens.

 

As a comment on previous post, I would also like to be able to use literals
in the parser for readability and for better error messages.

In both case I would rather see '++' then PLUS_PLUS. But also would like an
error report at compile time if the literal is missing in the lexer.

 

A second problem I have is build order. This is most likely to be a short
coming in the Eclipse plug-in I am using,

but I find that I need to modify and save each of the grammar files in
sequence, lexer, parser, tree to ensure token changes are propagated

from the lexer each of the .tokens files.

 

Regards

Nev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080213/54c210a0/attachment.html 


More information about the antlr-interest mailing list