Fix test failure after non-terminal extras change

This commit is contained in:
Max Brunsfeld 2021-02-18 15:43:01 -08:00
parent 796f655b03
commit 29bc26ecd5
7 changed files with 65 additions and 24 deletions

View file

@ -366,6 +366,14 @@ impl<'a> Minimizer<'a> {
existing_tokens: impl Iterator<Item = &'b Symbol>,
new_token: Symbol,
) -> bool {
if new_token == Symbol::end_of_nonterminal_extra() {
info!(
"split states {} {} - end of non-terminal extra",
left_id, right_id,
);
return true;
}
// Do not add external tokens; they could conflict lexically with any of the state's
// existing lookahead tokens.
if new_token.is_external() {