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
This rule allows parser to recover from syntax error when the expression is ill formed, the ```_e1``` functor will simply pass expressions parsed to this point:
979
+
980
+
```c++
981
+
exprs(exprs, error, ';') >= _e1,
982
+
```
983
+
984
+
Recovery follows the rules:
985
+
986
+
- when syntax error occurs a special <error_recovery_token> is presented to the LR algorithm.
987
+
- parser states are reverted (popped from a stack) until the state accepting the <error_recovery_token> is encountered.
988
+
- if at any point the is no more states to pop, algorithm fails.
989
+
- <error_recovery_token> is shifted, and shift action is performed.
990
+
- terminals are consumed and ignored until the terminal which would not result in a syntax error is encountered.
991
+
- if at any point end of input is encountered, the algorithm fails.
992
+
993
+
To see how ***error*** in rules affect the parse table generation take a look at the diagnostic output and look for the <error_recovery_token> occurrences.
994
+
See the [Diagnostics](#diagnostics) section for details.
0 commit comments