softdevteam / lrpar

Rust LR parser
Other
1 stars 0 forks source link

Skip reduce states that can't possibly lead to interesting outcomes. #71

Closed ltratt closed 6 years ago

ltratt commented 6 years ago

If a state only has reduce actions, and if each of those reductions is to the same production, there's no chance of a delete, insert, or shift leading to an interesting configuration. We thus skip over it. This can be a useful performance change, although it's highly dependent on the example.