summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorBranislav ZahradnĂ­k <barney@cpan.org>2020-12-11 17:19:12 +0100
committerKarl Williamson <khw@cpan.org>2020-12-27 09:46:09 -0700
commit5776f3e52dc3d9bddaadfc7c058c4e18589018b3 (patch)
tree2e83f1b7587c11a73c7774010f2dd4d3bc367dec /perly.y
parent68a66a8beadf6521143536cc70b76b1127b141e7 (diff)
downloadperl-5776f3e52dc3d9bddaadfc7c058c4e18589018b3.tar.gz
Distinguish C- and perly- literals - PERLY_PLUS
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/perly.y b/perly.y
index 2a32ef1d6b..c5e79c8d4f 100644
--- a/perly.y
+++ b/perly.y
@@ -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
@@ -55,6 +55,7 @@
%token <ival> PERLY_DOT
%token <ival> PERLY_EQUAL_SIGN
%token <ival> PERLY_MINUS
+%token <ival> PERLY_PLUS
%token <ival> PERLY_SEMICOLON
%token <opval> BAREWORD METHOD FUNCMETH THING PMFUNC PRIVATEREF QWLIST
@@ -1098,7 +1099,7 @@ eqopchain: term[lhs] CHEQOP term[rhs]
/* Unary operators and terms */
termunop : PERLY_MINUS term %prec UMINUS /* -$x */
{ $$ = newUNOP(OP_NEGATE, 0, scalar($term)); }
- | '+' term %prec UMINUS /* +$x */
+ | PERLY_PLUS term %prec UMINUS /* +$x */
{ $$ = $term; }
| PERLY_EXCLAMATION_MARK term /* !$x */