Replace prec rule w/ left_assoc and right_assoc

Consider shift/reduce conflicts to be compilation errors unless
they are resolved by a specified associativity.
This commit is contained in:
Max Brunsfeld 2015-03-16 23:12:08 -07:00
parent 86bd6eaa75
commit 80ec303b10
19 changed files with 27040 additions and 25946 deletions

View file

@ -24,7 +24,8 @@ rule_ptr str(const std::string &);
rule_ptr keyword(const std::string &);
rule_ptr keypattern(const std::string &);
rule_ptr err(const rule_ptr &);
rule_ptr prec(int precedence, const rule_ptr &);
rule_ptr left_assoc(int precedence, const rule_ptr &);
rule_ptr right_assoc(int precedence, const rule_ptr &);
rule_ptr token(const rule_ptr &rule);
std::ostream &operator<<(std::ostream &stream, const rules::rule_ptr &rule);