mirror of
https://github.com/fluencelabs/lalrpop
synced 2025-03-16 00:40:50 +00:00
This caused panics in certain error recovery scenarios as a reduce action represented by a negative number would get casted to `usize` which then caused an index out of bounds panic.
The added tests were extracted and minimized from [gluon's grammar](abd06a4f6e/parser/src/grammar.lalrpop
) with the test case below being a minimal reproduction.
Panicking
```
type Test = a ->
```
Valid expression
```
type Test = a -> a
in 1
```
31 lines
772 B
Plaintext
31 lines
772 B
Plaintext
target
|
|
*~
|
|
TAGS
|
|
Cargo.lock
|
|
lalrpop/src/parser/lrgrammar.rs
|
|
|
|
doc/calculator/src/calculator6.rs
|
|
doc/whitespace/src/parser.rs
|
|
|
|
lalrpop-test/src/error.rs
|
|
lalrpop-test/src/error_recovery.rs
|
|
lalrpop-test/src/error_recovery_pull_182.rs
|
|
lalrpop-test/src/expr.rs
|
|
lalrpop-test/src/expr_arena.rs
|
|
lalrpop-test/src/expr_generic.rs
|
|
lalrpop-test/src/expr_intern_tok.rs
|
|
lalrpop-test/src/expr_lalr.rs
|
|
lalrpop-test/src/generics_issue_104.rs
|
|
lalrpop-test/src/inline.rs
|
|
lalrpop-test/src/intern_tok.rs
|
|
lalrpop-test/src/issue_55.rs
|
|
lalrpop-test/src/lifetime_tok.rs
|
|
lalrpop-test/src/loc.rs
|
|
lalrpop-test/src/loc_issue_90.rs
|
|
lalrpop-test/src/sub.rs
|
|
lalrpop-test/src/sub_ascent.rs
|
|
lalrpop-test/src/sub_table.rs
|
|
lalrpop-test/src/unit.rs
|
|
lalrpop-test/src/use_super.rs
|
|
lalrpop-test/src/no_clone_tok.rs
|