From: Siraaj Khandkar Date: Tue, 29 May 2018 14:56:17 +0000 (-0400) Subject: Assign precedence and associativity to OF and DO X-Git-Url: https://git.xandkar.net/?p=tiger.ml.git;a=commitdiff_plain;h=ccbe4cfcddabbe29eaeb09df9cbd356869d6dbf3;hp=15ade9023b6ae4953d3c28cb8d2b03d0737929a4 Assign precedence and associativity to OF and DO reduces shift/reduce conflicts from 85 to 49 --- diff --git a/tiger/src/lib/tiger/tiger_parser.mly b/tiger/src/lib/tiger/tiger_parser.mly index e8d32f6..af0d30c 100644 --- a/tiger/src/lib/tiger/tiger_parser.mly +++ b/tiger/src/lib/tiger/tiger_parser.mly @@ -49,6 +49,7 @@ %token WHILE /* from lowest precedence */ +%left OF DO %left OR %left AND %nonassoc EQ NEQ GT LT GE LE