[antlr-interest] C target: How to handle lexer exceptions??

register reg.ini register72 at gmail.com
Mon Apr 6 07:12:15 PDT 2009


The java parser has a general notion of parser exceptions. The C
runtime simulates this by checking some attributes in the base-recognizer
structure thanks to the HASEXCEPTION macro. Anyway it happens that recovered
lexer errors are not propagated to the parser so in this case an
HASEXCEPTION check does not return true . Starting from a parser rule
invocation, how to detect if one has an error in the lexer? Another way to
formulate the same question is how to get a reference to the lexer starting
from the invocation of a parser rule? How to customize error handling for
the lexer?
Regards,
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090406/4914d7f5/attachment.html 


More information about the antlr-interest mailing list