diff options
author | Branislav ZahradnĂk <barney@cpan.org> | 2020-12-11 17:19:15 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-27 09:46:09 -0700 |
commit | 0ba95c59b78e1c0733f9a491f242d4ab31128108 (patch) | |
tree | 691e1958715973e291a12c82e99cc43742721c18 /perly.y | |
parent | 9086c946d76e67c28eff104482c6bc204f32ff68 (diff) | |
download | perl-0ba95c59b78e1c0733f9a491f242d4ab31128108.tar.gz |
Distinguish C- and perly- literals - PERLY_PERCENT_SIGN
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -45,7 +45,6 @@ %token <ival> GRAMPROG GRAMEXPR GRAMBLOCK GRAMBARESTMT GRAMFULLSTMT GRAMSTMTSEQ GRAMSUBSIGNATURE -%token <ival> '%' %token <ival> PERLY_AMPERSAND %token <ival> PERLY_BRACE_OPEN %token <ival> PERLY_BRACE_CLOSE @@ -55,6 +54,7 @@ %token <ival> PERLY_DOT %token <ival> PERLY_EQUAL_SIGN %token <ival> PERLY_MINUS +%token <ival> PERLY_PERCENT_SIGN %token <ival> PERLY_PLUS %token <ival> PERLY_SEMICOLON %token <ival> PERLY_SNAIL @@ -661,7 +661,7 @@ sigvarname: /* NULL */ sigslurpsigil: PERLY_SNAIL { $$ = '@'; } - | '%' + | PERLY_PERCENT_SIGN { $$ = '%'; } /* @, %, @foo, %foo */ @@ -1249,7 +1249,7 @@ term[product] : termbinop { $$ = newSVREF($operand); } | term[operand] ARROW PERLY_SNAIL '*' { $$ = newAVREF($operand); } - | term[operand] ARROW '%' '*' + | term[operand] ARROW PERLY_PERCENT_SIGN '*' { $$ = newHVREF($operand); } | term[operand] ARROW PERLY_AMPERSAND '*' { $$ = newUNOP(OP_ENTERSUB, 0, @@ -1387,9 +1387,9 @@ ary : PERLY_SNAIL indirob } ; -hsh : '%' indirob +hsh : PERLY_PERCENT_SIGN indirob { $$ = newHVREF($indirob); - if ($$) $$->op_private |= $1; + if ($$) $$->op_private |= $PERLY_PERCENT_SIGN; } ; @@ -1409,7 +1409,7 @@ sliceme : ary ; kvslice : hsh - | term ARROW '%' + | term ARROW PERLY_PERCENT_SIGN { $$ = newHVREF($term); } ; |