Rename RENAME rule to ALIAS, allow it to create anonymous nodes

This commit is contained in:
Max Brunsfeld 2017-07-31 11:45:24 -07:00
parent b5f421cafb
commit cb5fe80348
28 changed files with 304 additions and 270 deletions

View file

@ -6,7 +6,7 @@ bool ProductionStep::operator==(const ProductionStep &other) const {
return symbol == other.symbol &&
precedence == other.precedence &&
associativity == other.associativity &&
name_replacement == other.name_replacement;
alias == other.alias;
}
bool ProductionStep::operator!=(const ProductionStep &other) const {
@ -20,7 +20,7 @@ bool ProductionStep::operator<(const ProductionStep &other) const {
if (other.precedence < precedence) return false;
if (associativity < other.associativity) return true;
if (other.associativity < associativity) return false;
return name_replacement < other.name_replacement;
return alias < other.alias;
}
bool Production::operator==(const Production &other) const {