Hi, Take a look at the documentation here:
http://www.antlr.org/wiki/display/ANTLR3/Error+reporting+and+recovery Here's the summary: You must override the error reporting mechanisms of your parser. Then you can do whatever you want with the text of the errors. Cheers ./m beginner.nguyen wrote: > Hi, all > I use antlr-3.2.jar tool to general java code of a grammar, after that I > built a program by java language to output a parsetree. > When i run my program in cmd with input string: "which tour beggin ain > 11/11/2010 ?" > then a message appear in cmd: "line 1:19 no viable alternative at character > 'a'". I know that the message appear because I type incorrect at "ain", > correct must be "in". But I want to get that message and set into a string > variable. could you help me.(I have attached a image) > Thank you very much. looking forward from you. > http://antlr.1301665.n2.nabble.com/file/n5780991/h2.jpg This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- 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.
