diff options
author | Branislav ZahradnĂk <barney@cpan.org> | 2020-12-11 17:19:11 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-27 09:46:09 -0700 |
commit | 68a66a8beadf6521143536cc70b76b1127b141e7 (patch) | |
tree | 0d5592d0e0faa9df012a63bf59a96f1f17525e5f /perly.y | |
parent | a1ad62bfea2492db90c01a1b1dfe6612521d7c3a (diff) | |
download | perl-68a66a8beadf6521143536cc70b76b1127b141e7.tar.gz |
Distinguish C- and perly- literals - PERLY_MINUS
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 5 |
1 files changed, 3 insertions, 2 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 @@ -54,6 +54,7 @@ %token <ival> PERLY_COMMA %token <ival> PERLY_DOT %token <ival> PERLY_EQUAL_SIGN +%token <ival> PERLY_MINUS %token <ival> PERLY_SEMICOLON %token <opval> BAREWORD METHOD FUNCMETH THING PMFUNC PRIVATEREF QWLIST @@ -1095,7 +1096,7 @@ eqopchain: term[lhs] CHEQOP term[rhs] ; /* Unary operators and terms */ -termunop : '-' term %prec UMINUS /* -$x */ +termunop : PERLY_MINUS term %prec UMINUS /* -$x */ { $$ = newUNOP(OP_NEGATE, 0, scalar($term)); } | '+' term %prec UMINUS /* +$x */ { $$ = $term; } |