Add PREC_DYNAMIC rule for resolving runtime ambiguities

This commit is contained in:
Max Brunsfeld 2017-07-06 15:20:11 -07:00
parent cb652239f6
commit d8e9d04fe7
24 changed files with 316 additions and 83 deletions

View file

@ -136,9 +136,14 @@ ostream &operator<<(ostream &stream, const Variable &variable) {
return stream << "(Variable " << variable.name << " " << variable.rule << ")";
}
ostream &operator<<(ostream &stream, const Production &production) {
return stream << "(Production " << production.steps << " " <<
to_string(production.dynamic_precedence) << ")";
}
ostream &operator<<(ostream &stream, const SyntaxVariable &variable) {
return stream << "(Variable " << variable.name << " " << variable.productions <<
" " << to_string(variable.type) << "}";
" " << to_string(variable.type) << ")";
}
ostream &operator<<(ostream &stream, const LexicalVariable &variable) {