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.

https://github.com/gluon-lang/gluon/blob/817d61eed462e27e196a7db6872ea57d801fd0ba/parser/tests/error_handling.rs#L64-L80

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

Most upvoted comments

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!