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 > How to customiz...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 44 of 134
Post > Topic >>

How to customize error messages?

by openwound5000@[EMAIL PROTECTED] (Open Wound) Apr 18, 2004 at 01:16 PM

Here are my requirements:

1. Error messages generated by the parser must be displayed in English,
   German, Japanese etc, depending on whether my program is used in USA,
   Germany or Japan.

2. Instead of displaying the line number and column number in the error
   message, I have to position the cursor on the line/column that caused
   the error. (I have a GUI for displaying and edition the source code.)

Can I do this in ANTLR?

ANTLR sup****ts things like this:
      INT   
      options {
         paraphrase = "an integer";
      }
      : ('0'..'9')+ ;
But this doesn't help. The string "an integer" is in English. What about
German, Japanese etc?

And how do I supply German and Japanse versions of "unexpected token"?

Also, it looks like the Exceptions generated by ANTLR does not give you
the line and column numbers. Line and column numbers are embedded inside
the error message. So I have to parse the error message in order to get
the line and column numbers?
 




 1 Posts in Topic:
How to customize error messages?
openwound5000@[EMAIL PROT  2004-04-18 13:16:10 

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:12:57 CDT 2008.