From ccbe4cfcddabbe29eaeb09df9cbd356869d6dbf3 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 29 May 2018 10:56:17 -0400 Subject: [PATCH] Assign precedence and associativity to OF and DO reduces shift/reduce conflicts from 85 to 49 --- tiger/src/lib/tiger/tiger_parser.mly | 1 + 1 file changed, 1 insertion(+) 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 -- 2.20.1