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:
parent
8517313a45
commit
20982fdcb9
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue