I am using the python target in antlr 3.0.1. I'm not able to upgrade
for nontechnical reasons. I am trying to get an exception thrown on any
recognition error, and have gotten as far as
@members {
def emitErrorMessage(self, msg):
raise Exception(msg)
}
And this seems to work for parser errors (in addition to overriding the
recoverFrom methods). However, the lexer still just writes its errors
to stdout instead of throwing an exception. Upon inspection of the
generated code, it looks like the @members section is only applying to
the lexer, not the parser.
Is there an @members equivalent for the lexer? Or some way to make
@members apply to the lexer as well? Or is this just a bug in the
version I'm using which is fixed in a later one?
Thanks
Tim Bocek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address