-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
The current error recovery implementation can only recover rules at the
context-free (syntax) level. Lexical rules are never recovered.
So for instance given the following syntax:
syntax A = "a" B "a";
syntax B = "b" C "b";
syntax C = "c";
A string like "abXba" can be parsed using error recovery. But if we change the syntax to:
lexical A = "a" B "a";
lexical B = "b" C "b";
lexical C = "c";
Now the same string "abXba" will result in a parse error as error recovery will fail.
Suppose someone creates a grammar with only lexical rules (for instance to have complete control over which layout can occur where), error recovery will not work at all.
Solution
Error recovery should also be able to recover lexical rules.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels