lalrpop/.gitignore
Markus Westerlind b69e679d5b fix: Don't accidentally cast a reduce action to usize
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
```
2017-01-28 16:22:37 +01:00

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