diff options
author | Branislav ZahradnĂk <barney@cpan.org> | 2020-12-11 17:19:14 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-27 09:46:09 -0700 |
commit | 9086c946d76e67c28eff104482c6bc204f32ff68 (patch) | |
tree | 432a02e1c006d9772979a42570262bbc36e472bd /perly.y | |
parent | 5776f3e52dc3d9bddaadfc7c058c4e18589018b3 (diff) | |
download | perl-9086c946d76e67c28eff104482c6bc204f32ff68.tar.gz |
Distinguish C- and perly- literals - PERLY_SNAIL
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -45,7 +45,7 @@ %token <ival> GRAMPROG GRAMEXPR GRAMBLOCK GRAMBARESTMT GRAMFULLSTMT GRAMSTMTSEQ GRAMSUBSIGNATURE -%token <ival> '@' '%' +%token <ival> '%' %token <ival> PERLY_AMPERSAND %token <ival> PERLY_BRACE_OPEN %token <ival> PERLY_BRACE_CLOSE @@ -57,6 +57,7 @@ %token <ival> PERLY_MINUS %token <ival> PERLY_PLUS %token <ival> PERLY_SEMICOLON +%token <ival> PERLY_SNAIL %token <opval> BAREWORD METHOD FUNCMETH THING PMFUNC PRIVATEREF QWLIST %token <opval> FUNC0OP FUNC0SUB UNIOPSUB LSTOPSUB @@ -658,7 +659,7 @@ sigvarname: /* NULL */ ; sigslurpsigil: - '@' + PERLY_SNAIL { $$ = '@'; } | '%' { $$ = '%'; } @@ -1246,7 +1247,7 @@ term[product] : termbinop } | term[operand] ARROW '$' '*' { $$ = newSVREF($operand); } - | term[operand] ARROW '@' '*' + | term[operand] ARROW PERLY_SNAIL '*' { $$ = newAVREF($operand); } | term[operand] ARROW '%' '*' { $$ = newHVREF($operand); } @@ -1380,9 +1381,9 @@ scalar : '$' indirob { $$ = newSVREF($indirob); } ; -ary : '@' indirob +ary : PERLY_SNAIL indirob { $$ = newAVREF($indirob); - if ($$) $$->op_private |= $1; + if ($$) $$->op_private |= $PERLY_SNAIL; } ; @@ -1403,7 +1404,7 @@ star : '*' indirob ; sliceme : ary - | term ARROW '@' + | term ARROW PERLY_SNAIL { $$ = newAVREF($term); } ; |