lalrpop: Error recovery in 0.13 may end up in infinite loops
Tried to upgrade to 0.13.1 (from 0.12.5) but I have two tests for error recovery which now loops forever.
cargo test --features test -p gluon_parser --test error_handling wrong_indent
Looking at it in a debugger shows that after the 2
is received by lalrpop it will go into error recovery where after it will push a reduce action, evaluate it and then go right back into error recovery,
I am guessing this is to do with the lanetable implementation(?) breaking some assumption in the error recovery so I may may take a look over the weekend. I don’t really have any guess as to why the lanetable would break it though so no promises that I know how to solve this!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (8 by maintainers)
Commits related to this issue
- Add a test case for issue #240 — committed to Marwes/lalrpop by Marwes 7 years ago
- Add a test case for issue #240 — committed to Marwes/lalrpop by Marwes 7 years ago
- in lane table mode, run algorithm even with just one reduce Otherwise, we get errors in the existing error recovery tests. cc #240 -- possible fix — committed to lalrpop/lalrpop by nikomatsakis 7 years ago
- Add a test case for issue #240 — committed to Marwes/lalrpop by Marwes 7 years ago
- in lane table mode, run algorithm even with just one reduce Otherwise, we get errors in the existing error recovery tests. cc #240 -- possible fix — committed to joerivanruth/lalrpop by nikomatsakis 7 years ago
- Add a test case for issue #240 — committed to lalrpop/lalrpop by Marwes 7 years ago
BTW I’ve been super distracted by the Rust impl period, but I’m finally getting back to this now. I hope to have a fix up for this issue and a new release of LALRPOP soon.
@nikomatsakis
https://github.com/Marwes/lalrpop/commit/e9d886651023fcd3c19ae96f88f0ec757993083a
Fresh reproduction of the infinite loop I am getting in gluon. If the
! => ...
production is removed then lalrpop errors out as normal, otherwise it loops forever. Hope the bug isn’t to hard to fix!