Avoid introducing certain lexical conflicts during parse state merging

The current pretty conservative approach is to avoid merging parse states which
would cause a pair tokens to co-exist for the first time in any parse state,
where the two tokens can start with the same character and at least one of the
tokens can contain a character which is part of the grammar's separators.
This commit is contained in:
Max Brunsfeld 2017-02-27 22:54:38 -08:00
parent 3c8e6f9987
commit 686dc0997c
24 changed files with 305 additions and 158 deletions

View file

@ -561,7 +561,7 @@ class CCodeGenerator {
return { variable.name, variable.type };
}
case Symbol::Terminal: {
const Variable &variable = lexical_grammar.variables[symbol.index];
const LexicalVariable &variable = lexical_grammar.variables[symbol.index];
return { variable.name, variable.type };
}
case Symbol::External: