[antlr-interest] Debugging: how? (Why do I get MismatchedTokenException or UnwantedTokenException?) Unhelpful error messages.

Terence Parr parrt at cs.usfca.edu
Fri Oct 31 08:35:28 PDT 2008


On Oct 31, 2008, at 2:43 AM, Hendrik Maryns wrote:

> John B. Brodie schreef:
>>> If I feed it to formulaList, I get an UnwantedTokenException  
>>> followed by
>>> an EOF, which doesn’t make me any wiser at this point.
>>
>> Yes. Confusing message. Which is just one of the reasons I do not use
>> AntlrWorks.... (i assume you are using AntlrWroks? if so, maybe  
>> there is
>> more useful information in the console window?)
>
> I have been experimenting with it, but until now, I like AntlrIDE, the
> Eclipse plugin better.  Mainly because it has elements instead of  
> images
> in the parse tree, and if you click on them, you see what they
> correspond to.

Same with AW in dbg mode. clikc on tree node (AST or parse tree) and  
it highlights input and grammar rule that matched it.

Ter


More information about the antlr-interest mailing list