diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-10-11 10:48:02 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-10-11 11:11:06 +0200 |
commit | 712f0891d18e6230c2f53f4d1ff9231d95e3c3cd (patch) | |
tree | 33fd1c1313e739bf69520bb188523d64b526eec8 /src/parser.mly | |
parent | 67c46ecfebf9af723b56e41c8ebdee375f43df68 (diff) | |
download | perl_checker-712f0891d18e6230c2f53f4d1ff9231d95e3c3cd.tar perl_checker-712f0891d18e6230c2f53f4d1ff9231d95e3c3cd.tar.gz perl_checker-712f0891d18e6230c2f53f4d1ff9231d95e3c3cd.tar.bz2 perl_checker-712f0891d18e6230c2f53f4d1ff9231d95e3c3cd.tar.xz perl_checker-712f0891d18e6230c2f53f4d1ff9231d95e3c3cd.zip |
recognize ~~ (smartmatch)
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} |