Is it possible to fallback to other rules after an exception is raised in a semantic action? Like the following (contrived) scenario:
var = /[a-zA-Z]+/;
keyword = 'for' | 'in';
a = var:var | keyword:keyword;
def a(ast):
if (ast.var not in symbolTable):
raise Exception()
and when the exception is raised, parsing continues with the 'keyword' rule. I am aware of the @@keyword feature, but I want to declare keywords at runtime (my parser is for a programming language with user-defined operators).