register reg.ini wrote:
That isn't how it works. First the lexer is called to create all the tokens, then the parser runs. However, you can call the lexer on it's own (see C examples) then just check the error count member of the recognizer before invoking the parser. However, you should not program a lexer that can raise errors. Always cover all the bases with at least a final rule: ANY : . {error ...}; and left factor the other rules so that they cannot error out on their own. Then you can leave errors to the parser. Jim --~--~---------~--~----~------------~-------~--~----~ 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
