Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
exceptions in the lexer
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adrian Herscu  
View profile  
 More options Aug 21 2007, 12:05 pm
From: Adrian Herscu <bmf1...@fastmail.fm>
Date: Tue, 21 Aug 2007 19:05:06 +0300
Local: Tues, Aug 21 2007 12:05 pm
Subject: Re: [antlr-interest] exceptions in the lexer
Hi,

I have the same problem with antlr 2.7.6...
I have used this (ugly) workaround:

try {
   myParser.myStartRule();

} catch (final ANTLRException e) {

   if (e instanceof TokenStreamRecognitionException) {
     final TokenStreamRecognitionException tsre =
       (TokenStreamRecognitionException) e;
       myParser.reportError(tsre.recog);
   } else {
     throw new MyInternalError(e.getMessage());
   }

}

Anyone found a better approach?

Adrian.

P.S. I also think that it is somehow related to some syntactic predicate
in my lexer...
I tried for an hour to understand why my lexer throws that exception and
I am still wondering...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »