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/tokens.mly | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/tokens.mly') diff --git a/lib/tokens.mly b/lib/tokens.mly index 1c199fa..9ac4b10 100644 --- a/lib/tokens.mly +++ b/lib/tokens.mly @@ -55,15 +55,17 @@ in favor of shifting. %right NO (* The priority for the variable should be lower than the equality priority if I want to allow declare new variables *) -%nonassoc p_variable -%left AND OR -%right EQUAL GT LT GTE LTE -%right EXCLAMATION +%left p_variable +%left OR +%left AND +%left EQUAL +%left GT LT +%left EXCLAMATION %left PLUS MINUS %left STAR DIV %left MOD %left FUNCTION -%left L_PAREN +%left L_PAREN %right R_PAREN %left COMA %left KEYWORD -- cgit v1.2.3