Mark tokens as non-reusable in states where shorter takes take precedence

This fixes some randomized test failures in the C grammar, relating to Object-like macros.
The object-like macro rule relies on a whitespace token in order to distinguish object-like
macros whose values begin with a '(' from function-like macros. The presence of that
whitespace token means that other nodes should not be reusable in that state.
This commit is contained in:
Max Brunsfeld 2017-06-22 16:04:42 -07:00
parent 8517313a45
commit 20982fdcb9

View file

@ -16,6 +16,9 @@ bool LexConflictManager::resolve(const LexItemSet &item_set,
}
return true;
} else {
for (const LexItem &item : item_set.entries) {
possible_homonyms[item.lhs.index].insert(old_action.symbol.index);
}
return false;
}
}