From 5776f3e52dc3d9bddaadfc7c058c4e18589018b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branislav=20Zahradn=C3=ADk?= Date: Fri, 11 Dec 2020 17:19:12 +0100 Subject: Distinguish C- and perly- literals - PERLY_PLUS --- perly.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perly.y') diff --git a/perly.y b/perly.y index 2a32ef1d6b..c5e79c8d4f 100644 --- a/perly.y +++ b/perly.y @@ -45,7 +45,7 @@ %token GRAMPROG GRAMEXPR GRAMBLOCK GRAMBARESTMT GRAMFULLSTMT GRAMSTMTSEQ GRAMSUBSIGNATURE -%token '+' '@' '%' +%token '@' '%' %token PERLY_AMPERSAND %token PERLY_BRACE_OPEN %token PERLY_BRACE_CLOSE @@ -55,6 +55,7 @@ %token PERLY_DOT %token PERLY_EQUAL_SIGN %token PERLY_MINUS +%token PERLY_PLUS %token PERLY_SEMICOLON %token 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 */ -- cgit v1.2.1