Hi all, I need a litle help in error handling for a parser: I am using a grammar that uses syntactic predicates and therefore has backtracking enabled. Every "line" in our grammar has to end with a semikolon. After diagnosing the various errornious inputs and the coresponding error message I want to be reported, I know that I want only one error per line. So, how can I tell antlr to restart parsing at the beginning of the next line? I understand that the resync mechanism recovers until it finds one of the tokens in the followsets, but I don't know where I should hook up to do it right. The backtracking produced multiple error messages in the past, since all paths are checked - but what If I recognize an error where It is useless to continue checking the other paths?
Any hints on how to know the underlying concepts and ideas are welcome. Regards Heiko 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 -~----------~----~----~----~------~----~------~--~---
