Loading ...
Sorry, an error occurred while loading the content.

3944Re: [antlr-interest] RFC: defaulterrorhandler [WAS: Re: how do i skip unmatched characters?]

Expand Messages
  • Matthew Mower
    Jul 4 3:06 AM
    • 0 Attachment
      On Tue, 3 Jul 2001 23:39:24 +0200, you wrote in
      <014c01c10408$d5e61640$0d412d3e@daemon>:

      >But, I have no idea how I can catch a RecognitionException in the
      >nextToken method which is completely generated by the lexer.
      >If that would be possibly (and preferably default behaviour) then
      >defaultErrorHandler should be "off" as default.
      >

      Could you subclass the generated lexer and override nextToken() to
      implement your exception catching?

      Regards,

      Matt.

      -----
      Matt Mower, Development Manager, MetaDyne Ltd, 44-1895-254254

      "Never play cards with a man named 'Doc'." - Nelson Algren
    • Show all 19 messages in this topic