Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHA-1: 24e36a5 * adjusted the code to remove the error recovery from the run-time when no error recovery rules are included in the user-provided grammar. (The correction was necessary as the run-time has been altered in the previous commits.) SHA-1: d48466f * fixes error recovery logic in the parser run-time (tested & verified using the errorlab.js test file): previously 5 tests would fail, but after this fix, all pass. The loop which looks for a matching error rule has been abstracted out into the function locateNearestErrorRecoveryRule() because the first cause for failed the tests was the parseError() handler firing before the erorr recovery could kick in: this (and user-defined) parseError handlers need a way to detect whether an error recovery rule is available (via the hash.recoverable boolean). The tests also uncovered an infinitely loop in error recovery in the new code when the lexer hits EOF. This bug has been fixed.
- Loading branch information
1 parent
17f8d26
commit f61dfaf
Showing
1 changed file
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters