summaryrefslogtreecommitdiff
path: root/perly.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2018-02-22 12:23:52 +0000
committerDavid Mitchell <davem@iabyn.com>2018-03-02 13:36:42 +0000
commit436ddf68a973edeede30e3cdf27a8063d7686eec (patch)
tree9870ba1dedc532d0a852e1f7b0a659b9048de878 /perly.h
parent50333c9768fa52a79ec159c7a43b40948291861e (diff)
downloadperl-436ddf68a973edeede30e3cdf27a8063d7686eec.tar.gz
parse subs and signature subs separately
Currently the toker returns a SUB or ANONSUB token at the beginning of a sub (or BEGIN etc). Change it so that in the scope of 'use feature "signatures"', it returns a SIGSUB / ANON_SIGSUB token instead. Then in perly.y, duplicate the 2 rules containing SUB / ANONSUB to cope with these two new tokens. The net effect of this is to use different rules in the parser for parsing subs when signatures are in scope. Since the two sets of rules have just been cut and pasted, there should be no functional changes yet, but that will change shortly.
Diffstat (limited to 'perly.h')
-rw-r--r--perly.h120
1 files changed, 61 insertions, 59 deletions
diff --git a/perly.h b/perly.h
index 105ae7bdf0..50c0eb3fb5 100644
--- a/perly.h
+++ b/perly.h
@@ -74,64 +74,66 @@ extern int yydebug;
LABEL = 277,
FORMAT = 278,
SUB = 279,
- ANONSUB = 280,
- PACKAGE = 281,
- USE = 282,
- WHILE = 283,
- UNTIL = 284,
- IF = 285,
- UNLESS = 286,
- ELSE = 287,
- ELSIF = 288,
- CONTINUE = 289,
- FOR = 290,
- GIVEN = 291,
- WHEN = 292,
- DEFAULT = 293,
- LOOPEX = 294,
- DOTDOT = 295,
- YADAYADA = 296,
- FUNC0 = 297,
- FUNC1 = 298,
- FUNC = 299,
- UNIOP = 300,
- LSTOP = 301,
- RELOP = 302,
- EQOP = 303,
- MULOP = 304,
- ADDOP = 305,
- DOLSHARP = 306,
- DO = 307,
- HASHBRACK = 308,
- NOAMP = 309,
- LOCAL = 310,
- MY = 311,
- REQUIRE = 312,
- COLONATTR = 313,
- FORMLBRACK = 314,
- FORMRBRACK = 315,
- PREC_LOW = 316,
- OROP = 317,
- DOROP = 318,
- ANDOP = 319,
- NOTOP = 320,
- ASSIGNOP = 321,
- OROR = 322,
- DORDOR = 323,
- ANDAND = 324,
- BITOROP = 325,
- BITANDOP = 326,
- SHIFTOP = 327,
- MATCHOP = 328,
- UMINUS = 329,
- REFGEN = 330,
- POWOP = 331,
- PREINC = 332,
- PREDEC = 333,
- POSTINC = 334,
- POSTDEC = 335,
- POSTJOIN = 336,
- ARROW = 337
+ SIGSUB = 280,
+ ANONSUB = 281,
+ ANON_SIGSUB = 282,
+ PACKAGE = 283,
+ USE = 284,
+ WHILE = 285,
+ UNTIL = 286,
+ IF = 287,
+ UNLESS = 288,
+ ELSE = 289,
+ ELSIF = 290,
+ CONTINUE = 291,
+ FOR = 292,
+ GIVEN = 293,
+ WHEN = 294,
+ DEFAULT = 295,
+ LOOPEX = 296,
+ DOTDOT = 297,
+ YADAYADA = 298,
+ FUNC0 = 299,
+ FUNC1 = 300,
+ FUNC = 301,
+ UNIOP = 302,
+ LSTOP = 303,
+ RELOP = 304,
+ EQOP = 305,
+ MULOP = 306,
+ ADDOP = 307,
+ DOLSHARP = 308,
+ DO = 309,
+ HASHBRACK = 310,
+ NOAMP = 311,
+ LOCAL = 312,
+ MY = 313,
+ REQUIRE = 314,
+ COLONATTR = 315,
+ FORMLBRACK = 316,
+ FORMRBRACK = 317,
+ PREC_LOW = 318,
+ OROP = 319,
+ DOROP = 320,
+ ANDOP = 321,
+ NOTOP = 322,
+ ASSIGNOP = 323,
+ OROR = 324,
+ DORDOR = 325,
+ ANDAND = 326,
+ BITOROP = 327,
+ BITANDOP = 328,
+ SHIFTOP = 329,
+ MATCHOP = 330,
+ UMINUS = 331,
+ REFGEN = 332,
+ POWOP = 333,
+ PREINC = 334,
+ PREDEC = 335,
+ POSTINC = 336,
+ POSTDEC = 337,
+ POSTJOIN = 338,
+ ARROW = 339
};
#endif
@@ -181,6 +183,6 @@ int yyparse (void);
/* Generated from:
- * 6a23ac9b6bc07e4913adb8e36056ee0e94cb60bf9c02fe1b851c6087c47517bb perly.y
+ * 7d1ae56dfb5e7feea413f76193d80121912cb6aadf882158a70abc41e0153b1a perly.y
* b6fae5748f9bef6db4740aa5e122b84ac5181852d42474d0ecad621fa4253306 regen_perly.pl
* ex: set ro: */