From 712f0891d18e6230c2f53f4d1ff9231d95e3c3cd Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 11 Oct 2016 10:48:02 +0200 Subject: recognize ~~ (smartmatch) --- src/parser.mly | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/parser.mly') 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 FOR PRINT %token NEW -%token COMPARE_OP COMPARE_OP_STR EQ_OP EQ_OP_STR +%token COMPARE_OP COMPARE_OP_STR EQ_OP EQ_OP_STR SMART_OP %token ASSIGN MY_OUR %token 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} -- cgit v1.2.1