summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/perly.y b/perly.y
index 21cb35c727..7d83819ad2 100644
--- a/perly.y
+++ b/perly.y
@@ -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); }
;