Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compiler Tools Pccts > ANTLR : Errors ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 75 of 134
Post > Topic >>

ANTLR : Errors and Error Handling

by Stefan Kuhn <Stefan.Kuhn@[EMAIL PROTECTED] > Nov 15, 2004 at 04:04 PM

Hello,
I`ve got two major problems with errors with antlr 2.7.4 (generating 
java-code):

I.

I want to control the error handling more precisely, but can`t get a 
clue through the manual how it should work. For example, if a rule looks 
like:
main: a b c;
a: A1 A2;
b: B;
c: C;
so if A2 is not there, error is thrown because B not A2 is found (till 
there, this behaviour is fine). But after, because B was the reason the 
error was thrown, antlr doesn`t recognize b, keeps on searching for b 
and even doesn`t recognize c. So only the first error in my parser could 
be taken serious. Is there any possibility to change this behavior?


II.

The error messages:
How can I change the handling of the error messages in the catch block, 
for example slightly changing the error messages and, e.g. store them in 
a string array?


thanks for attention.
 




 1 Posts in Topic:
ANTLR : Errors and Error Handling
Stefan Kuhn <Stefan.Ku  2004-11-15 16:04:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:11:45 CDT 2008.