diff --git a/src/main/cup/chocopy/pa1/ChocoPy.cup b/src/main/cup/chocopy/pa1/ChocoPy.cup index c1b8605..f6abdda 100644 --- a/src/main/cup/chocopy/pa1/ChocoPy.cup +++ b/src/main/cup/chocopy/pa1/ChocoPy.cup @@ -213,7 +213,6 @@ terminal String RBR; terminal String ARROW; terminal String IS; - /* Returned by the lexer for erroneous tokens. Since it does not appear in * the grammar, it indicates a syntax error. */ terminal UNRECOGNIZED; @@ -231,7 +230,13 @@ non terminal Expr expr, binary_expr; /* Precedences (lowest to highest) for resolving what would otherwise be * ambiguities in the form of shift/reduce conflicts.. */ -precedence left PLUS; +precedence left OR; +precedence left AND; +precedence left NOT; +precedence nonassoc EQUAL, NEQ, LT, GT, LEQ, GEQ, IS; +precedence left PLUS, MINUS; +precedence left MUL, DIV, MOD; +precedence left DOT, COMMA, LBR, RBR; /* The start symbol. */ start with program;