diff options
Diffstat (limited to 'src/parser.mly')
-rw-r--r-- | src/parser.mly | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser.mly b/src/parser.mly index 62309be..a6f20f1 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -28,7 +28,7 @@ %token <string Types.any_spaces_pos> FOR PRINT %token <unit Types.any_spaces_pos> NEW -%token <string Types.any_spaces_pos> COMPARE_OP COMPARE_OP_STR EQ_OP EQ_OP_STR +%token <string Types.any_spaces_pos> COMPARE_OP COMPARE_OP_STR EQ_OP EQ_OP_STR SMART_OP %token <string Types.any_spaces_pos> ASSIGN MY_OUR %token <unit Types.any_spaces_pos> IF ELSIF ELSE UNLESS DO WHILE UNTIL CONTINUE SUB LOCAL @@ -75,7 +75,7 @@ %left AND_TIGHT %left BIT_OR BIT_XOR %left BIT_AND -%nonassoc EQ_OP EQ_OP_STR +%nonassoc EQ_OP EQ_OP_STR SMART_OP %nonassoc LT GT COMPARE_OP COMPARE_OP_STR %nonassoc UNIOP ONE_SCALAR_PARA %left BIT_SHIFT @@ -212,6 +212,7 @@ term: | term GT term {sp_p $2; symops P_cmp M_float M_bool ">" $1 $2 $3} | term EQ_OP term {sp_p $2; symops P_eq M_float M_bool $2.any $1 $2 $3} | term EQ_OP_STR term {sp_p $2; symops P_eq M_string M_bool $2.any $1 $2 $3} +| term SMART_OP term {sp_p $2; symops P_eq M_unknown_scalar M_bool $2.any $1 $2 $3} | term BIT_AND term {sp_p $2; symops P_bit M_int M_int "&" $1 $2 $3} | term BIT_OR term { symops P_bit M_int M_int "|" $1 $2 $3} |