summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perly.act2
-rw-r--r--perly.h21
-rw-r--r--perly.tab82
-rw-r--r--perly.y6
-rw-r--r--toke.c3
5 files changed, 58 insertions, 56 deletions
diff --git a/perly.act b/perly.act
index 86691ff182..e4b1237d0a 100644
--- a/perly.act
+++ b/perly.act
@@ -2130,6 +2130,6 @@ case 2:
/* Generated from:
- * 3cfd0c6b00a7252ca445af346f4fab4fedfd3065533813882639354d90371d9d perly.y
+ * 3b37f5e99c3211f5a689f0b84d2f93ccb2d9dcee38cf8543545147c2f3232e4d perly.y
* acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl
* ex: set ro: */
diff --git a/perly.h b/perly.h
index 2549f31dd4..4e54401a56 100644
--- a/perly.h
+++ b/perly.h
@@ -144,15 +144,16 @@ extern int yydebug;
SHIFTOP = 343,
MATCHOP = 344,
PERLY_EXCLAMATION_MARK = 345,
- UMINUS = 346,
- REFGEN = 347,
- POWOP = 348,
- PREINC = 349,
- PREDEC = 350,
- POSTINC = 351,
- POSTDEC = 352,
- POSTJOIN = 353,
- ARROW = 354
+ PERLY_TILDE = 346,
+ UMINUS = 347,
+ REFGEN = 348,
+ POWOP = 349,
+ PREINC = 350,
+ PREDEC = 351,
+ POSTINC = 352,
+ POSTDEC = 353,
+ POSTJOIN = 354,
+ ARROW = 355
};
#endif
@@ -204,6 +205,6 @@ int yyparse (void);
/* Generated from:
- * 3cfd0c6b00a7252ca445af346f4fab4fedfd3065533813882639354d90371d9d perly.y
+ * 3b37f5e99c3211f5a689f0b84d2f93ccb2d9dcee38cf8543545147c2f3232e4d perly.y
* acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl
* ex: set ro: */
diff --git a/perly.tab b/perly.tab
index dc57a07d33..3f20fa3ee9 100644
--- a/perly.tab
+++ b/perly.tab
@@ -18,7 +18,7 @@
#define YYNSTATES 573
#define YYUNDEFTOK 2
-#define YYMAXUTOK 354
+#define YYMAXUTOK 355
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -42,7 +42,7 @@ static const yytype_int8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 97, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -64,8 +64,8 @@ static const yytype_int8 yytranslate[] =
59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 85, 86, 87, 88, 89, 90,
- 91, 92, 93, 94, 95, 96, 98, 99, 100, 101,
- 102, 103, 104, 105, 106
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106
};
#if YYDEBUG
@@ -126,24 +126,24 @@ static const char *const yytname[] =
"PREC_LOW", "OROP", "DOROP", "ANDOP", "NOTOP", "ASSIGNOP", "'?'", "':'",
"OROR", "DORDOR", "ANDAND", "BITOROP", "BITANDOP", "CHEQOP", "NCEQOP",
"CHRELOP", "NCRELOP", "SHIFTOP", "MATCHOP", "PERLY_EXCLAMATION_MARK",
- "'~'", "UMINUS", "REFGEN", "POWOP", "PREINC", "PREDEC", "POSTINC",
- "POSTDEC", "POSTJOIN", "ARROW", "')'", "'('", "'$'", "'*'", "'/'",
- "$accept", "grammar", "@1", "@2", "@3", "@4", "@5", "@6", "@7", "block",
- "formblock", "remember", "mblock", "mremember", "stmtseq", "formstmtseq",
- "fullstmt", "labfullstmt", "barestmt", "$@8", "$@9", "$@10", "$@11",
- "$@12", "@13", "$@14", "formline", "formarg", "condition", "sideff",
- "else", "cont", "mintro", "nexpr", "texpr", "iexpr", "mexpr", "mnexpr",
- "formname", "startsub", "startanonsub", "startformsub", "subname",
- "proto", "subattrlist", "myattrlist", "sigvarname", "sigslurpsigil",
- "sigslurpelem", "sigdefault", "sigscalarelem", "sigelem", "siglist",
- "siglistornull", "optsubsignature", "subsignature", "subsigguts", "$@15",
- "optsubbody", "subbody", "optsigsubbody", "sigsubbody", "expr",
- "listexpr", "listop", "@16", "method", "subscripted", "termbinop",
- "termrelop", "relopchain", "termeqop", "eqopchain", "termunop",
- "anonymous", "termdo", "term", "@17", "myattrterm", "myterm",
- "optlistexpr", "optexpr", "optrepl", "my_scalar", "my_var",
- "refgen_topic", "my_refgen", "amper", "scalar", "ary", "hsh", "arylen",
- "star", "sliceme", "kvslice", "gelem", "indirob", YY_NULLPTR
+ "PERLY_TILDE", "UMINUS", "REFGEN", "POWOP", "PREINC", "PREDEC",
+ "POSTINC", "POSTDEC", "POSTJOIN", "ARROW", "')'", "'('", "'$'", "'*'",
+ "'/'", "$accept", "grammar", "@1", "@2", "@3", "@4", "@5", "@6", "@7",
+ "block", "formblock", "remember", "mblock", "mremember", "stmtseq",
+ "formstmtseq", "fullstmt", "labfullstmt", "barestmt", "$@8", "$@9",
+ "$@10", "$@11", "$@12", "@13", "$@14", "formline", "formarg",
+ "condition", "sideff", "else", "cont", "mintro", "nexpr", "texpr",
+ "iexpr", "mexpr", "mnexpr", "formname", "startsub", "startanonsub",
+ "startformsub", "subname", "proto", "subattrlist", "myattrlist",
+ "sigvarname", "sigslurpsigil", "sigslurpelem", "sigdefault",
+ "sigscalarelem", "sigelem", "siglist", "siglistornull",
+ "optsubsignature", "subsignature", "subsigguts", "$@15", "optsubbody",
+ "subbody", "optsigsubbody", "sigsubbody", "expr", "listexpr", "listop",
+ "@16", "method", "subscripted", "termbinop", "termrelop", "relopchain",
+ "termeqop", "eqopchain", "termunop", "anonymous", "termdo", "term",
+ "@17", "myattrterm", "myterm", "optlistexpr", "optexpr", "optrepl",
+ "my_scalar", "my_var", "refgen_topic", "my_refgen", "amper", "scalar",
+ "ary", "hsh", "arylen", "star", "sliceme", "kvslice", "gelem", "indirob", YY_NULLPTR
};
#endif
@@ -161,8 +161,8 @@ static const yytype_int16 yytoknum[] =
311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
331, 332, 333, 63, 58, 334, 335, 336, 337, 338,
- 339, 340, 341, 342, 343, 344, 345, 126, 346, 347,
- 348, 349, 350, 351, 352, 353, 354, 41, 40, 36,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 41, 40, 36,
42, 47
};
# endif
@@ -1180,27 +1180,27 @@ static const toketypes yy_type_tab[] =
toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
- toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
+ toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
- toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_opval,
- toketype_opval, toketype_ival, toketype_opval, toketype_ival, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
- toketype_ival, toketype_ival, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_ival, toketype_ival, toketype_ival, toketype_opval,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
+ toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival,
+ toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_ival, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival,
+ toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_ival, toketype_opval, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_ival,
+ toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
+ toketype_opval, toketype_ival, toketype_opval, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
+ toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
+ toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
toketype_opval, toketype_opval, toketype_opval, toketype_ival, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_ival, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval,
- toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval
+ toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval, toketype_opval
};
/* Generated from:
- * 3cfd0c6b00a7252ca445af346f4fab4fedfd3065533813882639354d90371d9d perly.y
+ * 3b37f5e99c3211f5a689f0b84d2f93ccb2d9dcee38cf8543545147c2f3232e4d perly.y
* acf1cbfd2545faeaaa58b1cf0cf9d7f98b5be0752eb7a54528ef904a9e2e1ca7 regen_perly.pl
* ex: set ro: */
diff --git a/perly.y b/perly.y
index 4998d660c9..67bbda88ec 100644
--- a/perly.y
+++ b/perly.y
@@ -116,7 +116,7 @@
%left ADDOP
%left MULOP
%left <ival> MATCHOP
-%right <ival> PERLY_EXCLAMATION_MARK '~' UMINUS REFGEN
+%right <ival> PERLY_EXCLAMATION_MARK PERLY_TILDE UMINUS REFGEN
%right <ival> POWOP
%nonassoc <ival> PREINC PREDEC POSTINC POSTDEC POSTJOIN
%left <ival> ARROW
@@ -1102,8 +1102,8 @@ termunop : '-' term %prec UMINUS /* -$x */
| PERLY_EXCLAMATION_MARK term /* !$x */
{ $$ = newUNOP(OP_NOT, 0, scalar($term)); }
- | '~' term /* ~$x */
- { $$ = newUNOP($1, 0, scalar($term)); }
+ | PERLY_TILDE term /* ~$x */
+ { $$ = newUNOP($PERLY_TILDE, 0, scalar($term)); }
| term POSTINC /* $x++ */
{ $$ = newUNOP(OP_POSTINC, 0,
op_lvalue(scalar($term), OP_POSTINC)); }
diff --git a/toke.c b/toke.c
index 6b3c1beff1..71b36e437a 100644
--- a/toke.c
+++ b/toke.c
@@ -238,7 +238,7 @@ static const char* const lex_state_names[] = {
#define BOop(f) return ao((pl_yylval.ival=f, PL_expect=XTERM, PL_bufptr=s, (int)BITOROP))
#define BAop(f) return ao((pl_yylval.ival=f, PL_expect=XTERM, PL_bufptr=s, (int)BITANDOP))
#define BCop(f) return pl_yylval.ival=f, PL_expect=XTERM, PL_bufptr = s, \
- REPORT('~')
+ REPORT(PERLY_TILDE)
#define SHop(f) return ao((pl_yylval.ival=f, PL_expect=XTERM, PL_bufptr=s, (int)SHIFTOP))
#define PWop(f) return ao((pl_yylval.ival=f, PL_expect=XTERM, PL_bufptr=s, (int)POWOP))
#define PMop(f) return(pl_yylval.ival=f, PL_expect=XTERM, PL_bufptr=s, REPORT((int)MATCHOP))
@@ -396,6 +396,7 @@ static struct debug_tokens {
DEBUG_TOKEN (IVAL, PERLY_EQUAL_SIGN),
DEBUG_TOKEN (IVAL, PERLY_EXCLAMATION_MARK),
DEBUG_TOKEN (IVAL, PERLY_SEMICOLON),
+ DEBUG_TOKEN (IVAL, PERLY_TILDE),
{ PLUGEXPR, TOKENTYPE_OPVAL, "PLUGEXPR" },
{ PLUGSTMT, TOKENTYPE_OPVAL, "PLUGSTMT" },
{ PMFUNC, TOKENTYPE_OPVAL, "PMFUNC" },