Terence Parr schrieb: > Try overriding nextToken()...hmm...that might be hard. > Would this FAQ solve Tim's problem? http://www.antlr.org/wiki/pages/viewpage.action?pageId=5341217
We used that today and it worked. It makes any unmatched character stop the whole thing. The method explained in the book's chapter 10.4 about exiting the recognizer on the first error only works for the parser, but not for the lexer. The lexer still accepts unknown characters and continues. I think it would be great if error reporting and recovery were configurable or at least easier to modify than by overriding methods. (Correctly) overriding methods is quite complicated and hard to get right imo. Especially when you're new to antlr and don't know the internals very well yet it's quite easy to screw it up (I have experience with screwing it up ;-). Max List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
