From 93179b90d8b1006001ce53310a6b01ba9f673fb7 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Fri, 29 Sep 2023 16:40:36 +0200 Subject: New precedence test --- lib/qsp_expression.mly | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/qsp_expression.mly') diff --git a/lib/qsp_expression.mly b/lib/qsp_expression.mly index 3d758c4..06cfadd 100644 --- a/lib/qsp_expression.mly +++ b/lib/qsp_expression.mly @@ -36,7 +36,6 @@ op = binary_operator expr2 = expression { Analyzer.Expression.boperator $loc op expr1 expr2 } - %prec EQUAL | v = LITERAL { Analyzer.Expression.literal $loc v } | i = INTEGER { Analyzer.Expression.integer $loc i } | v = variable { Analyzer.Expression.ident v } @@ -64,11 +63,11 @@ unary_operator: | MOD { T.Mod } | GT { T.Gt } | LT { T.Lt } + | AND { T.And } | GT EQUAL { T.Gte } | LT EQUAL { T.Lte } | EQUAL GT { T.Gte } | EQUAL LT { T.Lte } - | AND { T.And } | OR { T.Or } (** Declare a variable, either in the assignation (let var = …) or as a -- cgit v1.2.3