You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
A string like "abXba" can be parsed using error recovery. But if we change the syntax to:
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.
The text was updated successfully, but these errors were encountered: