Compress parse table by allowing reductions w/ unexpected lookaheads

This commit is contained in:
Max Brunsfeld 2016-06-29 09:54:08 -07:00
parent 9c37c06ec7
commit 0e2bbbd7ee
7 changed files with 76 additions and 12 deletions

View file

@ -22,7 +22,7 @@ struct AdvanceAction {
AdvanceAction();
AdvanceAction(size_t, PrecedenceRange, bool);
bool operator==(const AdvanceAction &action) const;
bool operator==(const AdvanceAction &other) const;
size_t state_index;
PrecedenceRange precedence_range;
@ -66,6 +66,8 @@ class LexTable {
LexStateId add_state();
LexState &state(LexStateId state_id);
std::vector<LexState> states;
bool merge_state(size_t i, size_t j);
};
} // namespace tree_sitter