Fix precedence calculations when building parse table

* Recurse into choice rules
* Compute reduction precedence differently than shift precedence
This commit is contained in:
Max Brunsfeld 2015-09-02 13:02:52 -07:00
parent 14d7ebb7da
commit 97bb7a26cf
15 changed files with 240 additions and 71 deletions

View file

@ -15,7 +15,8 @@ class Rule;
typedef std::shared_ptr<Rule> rule_ptr;
enum Associativity {
AssociativityLeft = 1,
AssociativityNone = 0,
AssociativityLeft,
AssociativityRight,
};