Grammar-Kit icon indicating copy to clipboard operation
Grammar-Kit copied to clipboard

Introduce macro for recovery rules

Open hurricup opened this issue 4 years ago • 1 comments

It's a pretty common practice to use Starts with: from some rule quick-doc for recovery rule. And atm it's too verbose and hard to maintain. Would be really nice if we could do something like:

ruleA ::= ....
...
private recover_rule_x ::= !(startOf(ruleA) | additional tokens)

hurricup avatar Apr 29 '21 12:04 hurricup

probably some math could be useful too, like:

private recover_rule_x ::= !(startOf(ruleA)-startOf(ruleB))

hurricup avatar Apr 30 '21 08:04 hurricup