I have a problem that occurs in my tree parser. When I have the rule
like the following:
statement: something1 { action1 } something2 { action2 } ;
catch [Exception e] { printError(e); }
Then when action1 throws a (semantic) exception, I don't want to do
anything (if everything went ok, the actions would emit some code, but
since there was an exception I just print out the error message and do
nothing).
However, the tokens that should be matched by something2 will be left in
the tree token stream, which will break the parsing of subsequent
statements. Is there a way to tell the tree parser to recover from this?
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
-~----------~----~----~----~------~----~------~--~---