Closed igordejanovic closed 6 years ago
WIP on error-reporting-rework branch.
Parglare should be able to report accurate expected symbols at the location, what it sees ahead (if possible to deduce) and what it saw before.
Done on master
. ParseError
now have all the info.
Error message should be based on a full parser state at the position in the input where parsing failed and not only on the current LR state. In GLR error should be reported based on a set of heads (i.e. their full state) that failed furthest in the input stream.
This boils down to filtering out all invalid LR items in the current state based on the previous states on the parser stack(s).