[antlr-interest] ANTLRWorks not producing RecognitionError reports/messages?

Dave Kichler dkichler at carmanah.com
Fri Jul 31 12:33:09 PDT 2009


I have noticed some strange behaviour in ANTLRWorks recently.  This has
only started happening in the past week and has pretty much baffled me.
It seems as though ANTLRWorks is no longer printing out reported errors
during debug.  When encountering a mismatched, unviable alt or other
recognition exception, the expected behaviour is to report the error to
the console, similar to:

line 3:1 extraneous input 't' expecting NEWLINE

 

When I first started using ANTLRWorks, I would regularly test my grammar
by running the debug feature to ensure it would recognize and report
such syntax errors and it did.  Now, after nothing notable has changed
(only minor edits to the grammar), ANTLRWorks no longer reports these
error messages to the 'output' debug console even though a recognition
exception can clearly be seen while tracing through both the event stack
and parse tree.  What is more strange, when I generate the code and test
the parser class within Eclipse, the expected syntax error messages are
printed to the console.  

 

I attempted to troubleshoot this issue for an afternoon and have now
turned to the community to see whether anyone else has experienced
strange behaviour such as this from ANTLRWorks or what might be causing
it.  I have not changed anything in the way the grammar handles errors
and the standard catch clause should simply report and recover from the
error.  This happens in Eclipse but not in ANTLR debug.  Anyone seen
anything like this?

 

Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090731/754af847/attachment.html 


More information about the antlr-interest mailing list