Hi, I have to following piece of grammar from wich I want to create a helpful errormessage: Statecheck: OBJECT COMPERATOR statearg SEMI; Statearg: PARAMREF | STATE;
Now if I give the input Motor =; Where Motor is recognized as OBJECT and = recognized as COMPERATOR I get an mismatched set exception. That's right, since a statearg is expected. Since this is a tree parser I get an unexpected node exception which is meaningless to our users. In the resulting exception neither the expecting nor the expecting set fields are set so I cannot create a helpful errormessage from it. I'd like to change the behaviour so that I can generate more helpful errormessages for this and other similar cases. I tried to specify a manual exception handler as explained in the ANTLR reference but the code isn't reached because recoverFromMismatchedToken catches and handles the error allready. So what should I override to make things work and do it the right way? Thx Mit freundlichem Gruß Heiko Folkerts Systementwicklung und -design -- ______________________________________________ DAVID GmbH · Wendenring 1 · 38114 Braunschweig Tel.: +49 531 24379-14 Fax.: +49 531 24379-79 E-Mail: mailto:[email protected] WWW: http://www.david-bs.de Eintragung: Amtsgericht Braunschweig, HRB 3167 Geschäftsführer: Frank Ptok ______________________________________________ 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 -~----------~----~----~----~------~----~------~--~---
