summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorBranislav ZahradnĂ­k <barney@cpan.org>2020-12-11 17:19:07 +0100
committerKarl Williamson <khw@cpan.org>2020-12-27 09:46:09 -0700
commit1c2e9449254ebd07b473cb641d8568dffc1ecbb0 (patch)
treea42d8d1664fd53400bea4f487330eb44c103b245 /perly.y
parent581f9a7a8ac03dde592c9c645423bcb369116e24 (diff)
downloadperl-1c2e9449254ebd07b473cb641d8568dffc1ecbb0.tar.gz
Distinguish C- and perly- literals - PERLY_EXCLAMATION_MARK
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/perly.y b/perly.y
index 9f01052bbc..4998d660c9 100644
--- a/perly.y
+++ b/perly.y
@@ -116,7 +116,7 @@
%left ADDOP
%left MULOP
%left <ival> MATCHOP
-%right <ival> '!' '~' UMINUS REFGEN
+%right <ival> PERLY_EXCLAMATION_MARK '~' UMINUS REFGEN
%right <ival> POWOP
%nonassoc <ival> PREINC PREDEC POSTINC POSTDEC POSTJOIN
%left <ival> ARROW
@@ -1100,7 +1100,7 @@ termunop : '-' term %prec UMINUS /* -$x */
| '+' term %prec UMINUS /* +$x */
{ $$ = $term; }
- | '!' term /* !$x */
+ | PERLY_EXCLAMATION_MARK term /* !$x */
{ $$ = newUNOP(OP_NOT, 0, scalar($term)); }
| '~' term /* ~$x */
{ $$ = newUNOP($1, 0, scalar($term)); }