From: Siraaj Khandkar Date: Tue, 29 May 2018 15:00:15 +0000 (-0400) Subject: Assign precedence and associativity to THEN X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=7c9381cfa42670471ff857694bb56cde8f1e77c9;p=tiger.ml.git Assign precedence and associativity to THEN reduces shift/reduce conflicts from 25 to 12 --- diff --git a/tiger/src/lib/tiger/tiger_parser.mly b/tiger/src/lib/tiger/tiger_parser.mly index 625632f..610ea48 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 THEN %left ELSE %nonassoc ASSIGN %left OF DO