File Coverage

lib/RPerl/Grammar.eyp
Criterion Covered Total %
statement 516 516 100.0
branch n/a
condition n/a
subroutine 32 32 100.0
pod n/a
total 548 548 100.0


line stmt bran cond sub pod time code
1             # DEV NOTE: DO NOT RUN PERLTIDY ON THIS FILE! this is EYAPP syntax, not pure Perl syntax
2              
3             # [[[ EYAPP SETUP & CONFIG ]]]
4              
5             %{
6             # [[[ HEADER ]]]
7 3     3   20688 use strict;
  3         6  
  3         82  
8 3     3   15 use warnings;
  3         5  
  3         119  
9             our $VERSION = 0.009_000;
10              
11 3     3   16 use Carp;
  3         6  
  3         160  
12 3     3   784 use rperlrules; # affirmative, it totally does
  403         19863  
  11         62336  
13             %}
14              
15             %strict # require all tokens to be declared, etc.
16             %tree # automatically create AST
17              
18             # [[[ LEXICON TOKENS, WHITESPACE ]]]
19              
20             %whites /((?:\s*(?:[#][^#!].*)?\s*)*|\s)/ # actual whitespace, or one or more normal comments; neither shebang '#!', nor double-hash critics '##'
21              
22             # [[[ SEMANTIC ACTION, ABSTRACT SYNTAX TREE NODE CONSTRUCTOR ]]]
23              
24             %defaultaction {
25 667     275   73200 my $self = shift;
  2448         115751  
  1331         33165  
  1481         70055  
  1717         93341  
  508         61052  
  394         11246  
  36         1830  
  331         20313  
  46         2372  
  2895         150339  
  954         46542  
  49         2583  
  1175         53602  
  3339         231861  
  960         42611  
  591         68621  
  294         15311  
  47         2408  
  2178         115693  
  119         10753  
  948         43144  
  2103         50108  
  960         41792  
  40         1056  
  95         6191  
  64         3583  
  42         2140  
  312         14486  
  3968         168742  
  4707         202530  
  60         3012  
  1983         58912  
  528         23679  
  1102         76870  
  1052         59910  
  369         16952  
  49         4308  
  2878         120322  
  70         4807  
  34         1013  
  22         960  
  236         8159  
  23         872  
  1136         52699  
  58         3221  
  1541         69938  
  3111         222770  
  462         22626  
  20         702  
  355         24332  
  409         44015  
  614         30148  
  2         100  
  229         6462  
  101         6494  
  135         6099  
  867         44528  
  867         37806  
  84         4086  
  32         1737  
  192         10274  
  2         114  
  317         10384  
  56         3947  
  109         6406  
  34         1582  
  99         5519  
  45         2387  
  1660         78903  
  2956         186655  
  3388         169989  
  644         42953  
  747         20144  
  110         2971  
  26         1331  
  1603         79443  
  20         674  
  39         2206  
  359         23354  
  627         29971  
  5317         139688  
  498         26538  
  83         4295  
  11         593  
  465         17948  
  44         2187  
  129         7084  
  1809         86931  
  191         6056  
  58         2066  
  90         3873  
  1531         66160  
  32         1276  
  1355         56181  
  28         1596  
  37         2172  
  187         9382  
  16         556  
  604         65088  
  62         2680  
  39         2102  
  68         3516  
  64         5037  
  26         1259  
  7         459  
  165         4127  
  1040         71985  
  55         1903  
  141         6838  
  752         42646  
  5         286  
  129         5877  
  927         47671  
  294         13193  
  117         5711  
  17         866  
  3         151  
  1873         45816  
  101         6403  
  1116         30602  
  20         1076  
  50         1659  
  921         26393  
  2         101  
  17         1406  
  5851         262353  
  1016         51310  
  1         52  
  26         1284  
  63         3113  
  13         983  
  37         2236  
  381         17009  
  291         16348  
  265         14570  
  2619         111782  
  166         9581  
  3338         217079  
  27         782  
  4         216  
  383         27427  
  40         1807  
  599         32663  
  165         8041  
  48         1701  
  4698         128551  
  2713         66082  
  562         66596  
  4         127  
  145         7398  
  86         2567  
  40         1983  
  133         7324  
  4549         198837  
  14         695  
  888         41982  
  93         2685  
  5         249  
  2765         123050  
  148         13113  
  500         20630  
  2614         131074  
  6         201  
  343         14861  
  34         1414  
  336         16013  
  231         12329  
26 278         1135 my $name = $self->YYName();
  1256         59296  
  102         1363  
  2551         84941  
  641         2070  
  120         4360  
  113         1238  
  312         20517  
  61         1521  
  1704         39622  
  32         1858  
  960         3606  
  223         10207  
  913         49257  
  3491         16910  
  835         3023  
  710         12085  
  344         9282  
  47         1438  
  2116         6787  
  39         1497  
  931         4819  
  101         2562  
  150         2787  
  12         350  
  95         8033  
  64         5611  
  42         1587  
  427         15340  
  5366         246394  
  638         27841  
  106         1627  
  1600         42879  
  67         730  
  1102         2498  
  1052         3366  
  369         904  
  49         121  
  2878         6139  
  70         212  
  34         85  
  22         59  
  236         783  
  23         100  
  1136         2494  
  58         146  
  1541         3463  
  3111         7671  
  462         1262  
  20         69  
  355         1300  
  409         1156  
  614         1835  
  2         10  
  229         566  
  101         283  
  135         294  
  867         6579  
  867         1823  
  84         234  
  32         134  
  192         689  
  2         8  
  317         967  
  56         217  
  109         334  
  34         85  
  99         348  
  45         181  
  1660         3549  
  2956         5893  
  3388         7904  
  644         1677  
  747         1436  
  110         317  
  26         85  
  1603         4582  
  20         56  
  39         218  
  359         1401  
  627         1357  
  5317         9385  
  498         1874  
  83         250  
  11         44  
  465         1682  
  44         146  
  129         442  
  1809         4680  
  191         746  
  58         174  
  90         229  
  1531         4056  
  32         92  
  1355         2933  
  28         96  
  37         121  
  187         649  
  16         42  
  604         1320  
  62         159  
  39         103  
  68         208  
  64         274  
  26         71  
  7         13  
  165         349  
  1040         2818  
  55         168  
  141         447  
  752         2110  
  5         27  
  129         306  
  927         2323  
  294         841  
  117         538  
  17         51  
  3         13  
  1873         5348  
  101         450  
  1116         2334  
  20         91  
  50         196  
  921         2363  
  2         9  
  17         51  
  5851         9915  
  1016         2955  
  1         6  
  26         76  
  63         159  
  13         44  
  37         171  
  381         1067  
  291         766  
  265         758  
  2619         5928  
  166         668  
  3338         8075  
  27         73  
  4         18  
  383         2053  
  40         151  
  599         1332  
  165         531  
  48         143  
  4698         8778  
  2713         6314  
  562         1514  
  4         18  
  145         624  
  86         286  
  40         149  
  133         666  
  4549         10812  
  14         39  
  888         1836  
  93         298  
  5         19  
  2765         5405  
  148         382  
  500         2782  
  2614         5882  
  6         17  
  343         886  
  34         107  
  336         1082  
  231         632  
27 1533         47922 bless { children => [ @_ ], line_number => ($self->{TOKENLINE} + 1) }, $name;
  135         6267  
  1330         82449  
  4732         166186  
  1109         26278  
  301         12502  
  374         13192  
  20         388  
  304         14528  
  3110         166414  
  32         6432  
  960         14869  
  411         10145  
  375         5441  
  3502         41458  
  923         10116  
  575         7141  
  291         8368  
  93         2925  
  2332         33865  
  39         5361  
  931         15241  
  51         564  
  72         2134  
  231         4503  
  201         6746  
  151         5714  
  130         2822  
  426         16364  
  5366         735026  
  85         1820  
  137         4526  
  1600         125156  
  99         1636  
  1102         11196  
  1052         16473  
  369         3695  
  49         495  
  2878         25519  
  70         819  
  34         350  
  22         218  
  236         3357  
  23         327  
  1136         11891  
  58         709  
  1541         15652  
  3111         32603  
  462         5189  
  20         267  
  355         4375  
  409         4456  
  614         7480  
  2         30  
  229         2563  
  101         1373  
  135         1328  
  867         10194  
  867         8300  
  84         928  
  32         365  
  192         2638  
  2         31  
  317         4599  
  56         738  
  109         1634  
  34         397  
  99         1406  
  45         607  
  1660         18227  
  2956         28071  
  3388         33430  
  644         6357  
  747         7082  
  110         1208  
  26         321  
  1603         17591  
  20         239  
  39         595  
  359         5756  
  627         6911  
  5317         48161  
  498         6614  
  83         1123  
  11         154  
  465         6320  
  44         612  
  129         1554  
  1809         20111  
  191         2540  
  58         654  
  90         966  
  1531         13894  
  32         342  
  1355         12156  
  28         368  
  37         460  
  187         2381  
  16         173  
  604         6355  
  62         651  
  39         545  
  68         765  
  64         966  
  26         290  
  7         65  
  165         1600  
  1040         11746  
  55         662  
  141         1692  
  752         11627  
  5         67  
  129         1253  
  927         9748  
  294         3197  
  117         1603  
  17         226  
  3         36  
  1873         19852  
  101         1609  
  1116         11041  
  20         305  
  50         651  
  921         9773  
  2         29  
  17         224  
  5851         50023  
  1016         11202  
  1         13  
  26         286  
  63         719  
  13         184  
  37         622  
  381         4097  
  291         2935  
  265         3078  
  2619         24171  
  166         1960  
  3338         34218  
  27         294  
  4         47  
  383         5401  
  40         492  
  599         6346  
  165         2037  
  48         578  
  4698         45235  
  2713         26847  
  562         6740  
  4         47  
  145         2099  
  86         1055  
  40         486  
  133         5177  
  4549         41638  
  14         159  
  888         8570  
  93         1028  
  5         74  
  2765         25638  
  148         1739  
  500         8187  
  2614         27208  
  6         55  
  343         3187  
  34         342  
  336         3691  
  231         2737  
28             }
29              
30             # [[[ LEXICON TOKENS, TYPES & RESERVED WORDS ]]]
31              
32             # NEED ANSWER: what is the correct method of requiring trailing whitespace for a token?
33             # below we see (use\s+) and (sub)\s+ and (open)\s etc.
34             # also, how do we know when the trailing whitespace is required? is it always required,
35             # but we've only triggered it in a few tokens by coincidental tests which use variables overlapping with keywords?
36             # UPDATE 20171014: the answer seems likely to be "yes", because I just triggered a bunch of errors by creating subroutines named "not_exported",
37             # which conflicted with the OP22_LOGICAL_NEG "not" before it had a trailing whitespace, and was fixed by adding the trailing whitespace;
38             # but this only affects WORD-like tokens which can be found inside other legitimate WORD tokens?
39              
40             %token SHEBANG = /(^#!\/(?:\w+\/)*perl)/ # begin line, hash (octothorpe), bang, *NIX path to Perl; ex. '#!/usr/bin/perl'
41             %token USE_RPERL = /(\s*use\s+RPerl\s*;\s*)/ # 'use RPerl;'
42             %token USE_RPERL_AFTER = /(\s*use\s+RPerl::AfterSubclass\s*;\s*)/ # 'use RPerl::AfterSubclass;'
43             %token USE_EXPORTER = /(\s*use\s+RPerl::Exporter\s+qw\(\s*import\s*\)\s*;\s*)/ # 'use RPerl::Exporter qw(import);'
44             %token USE = /(use\s+)/ # 'use '
45             %token OUR_EXPORT = /(\s*our\s+\@EXPORT\s+\=\s*)/ # 'our @EXPORT ='
46             %token OUR_EXPORT_OK = /(\s*our\s+\@EXPORT_OK\s+\=\s*)/ # 'our @EXPORT_OK ='
47             %token OUR = /(our\s+)/ # 'our '
48             %token VERSION_NUMBER_ASSIGN = /\$VERSION\ =\ (\d\d?\.\d{3}\_\d{3});/ # DEV NOTE, CORRELATION #rp014: $VERSION assign v-number, only capture v-number, not a normal number; ex. '$VERSION = 12.345_678;' returns '12.345_678'
49             %token SUB = /(sub)\s+/ # 'sub' followed by whitespace
50             %token MY = /(my)/ # 'my'
51             %token LITERAL_NUMBER = /([+-]?(((\d{1,2}_)?(\d{3}_)*\d{3})|\d{1,2})(\.((\d{3}(_\d{3})*(_\d{1,2})?)|\d{1,2}))?(e[+-]?\d+)?)/ # number w/ underscores, optional scientific notation; ex. '12_345_678.910_1'
52             %token LITERAL_STRING = /(('([^'\\]+|(?:\\\\)+)+')|("((\\n)|(\\t)|[^"\@\$\\])*((\\n)|(\\t))+((\\n)|(\\t)|[^"\@\$\\])*")|(q\{([^}\\]+|(?:\\\\)+)*\}))/ # single quotes non-empty w/out odd backslashes; double quotes non-empty w/out sigils or extra backslashes & w/ newline or tab; or single q-braces w/out odd backslashes; ex. 'howdy $foo!' or "howdy foo!\n" or q{howdy $foo!}
53             %token SELF = /(\$self)/ # '$self'
54             %token VARIABLE_SYMBOL = /(\$(?:[a-zA-Z]\w*)?[a-z]\w*(::[a-zA-Z]\w*)*)/ # dollar sigil, scoped word with at least one lowercase in the first scope segment; ex. '$foo' or '$Foo::Bar::baz'
55             %token FHREF_SYMBOL_IN = /(\<\$[A-Z][A-Z0-9_]*\>)/ # less-than, dollar sigil, uppercase letter, uppercase letters & numbers & underscores, greater-than; ex. '<$MY_FILEHANDLE_23>'
56             %token FHREF_SYMBOL_BRACES = /(\{\$[A-Z][A-Z0-9_]*\})/ # left brace, dollar sigil, uppercase letter, uppercase letters & numbers & underscores, right brace; ex. '{$MY_FILEHANDLE_23}'
57             %token FHREF_SYMBOL = /(\$[A-Z][A-Z0-9_]*)/ # dollar sigil, uppercase letter, uppercase letters & numbers & underscores; ex. '$MY_FILEHANDLE_23'
58             %token TYPE_INTEGER = /(integer|unsigned_integer)\s+/ # 'integer' or 'unsigned_integer' followed by whitespace
59             %token TYPE_FHREF = /(filehandleref\s+)/ # 'filehandleref' followed by whitespace
60             %token TYPE_METHOD = /((?:[a-zA-Z]\w*)+(?:::[a-zA-Z]\w*)*::method)/ # optionally-scoped word, followed by '::method'; ex. 'string_arrayref::method' or 'Foo::Bar::method'
61             %token CONSTANT_CALL_SCOPED = /((?:[a-zA-Z]\w*)(?:::[a-zA-Z]\w*)*(?:::[A-Z0-9_]*)\(\))/ # optionally-scoped constant call; ex. 'MY_CONST()' or 'Foo::Bar::BAZ_CONST()'
62             %token WORD_SCOPED = /((?:[a-zA-Z]\w*)?(?:::[a-zA-Z]\w*)+)/ # optionally-scoped word; ex. 'my_word' or 'My_Word' or 'Foo::Bar::baz_word'
63             %token STDOUT_STDERR = /(\{\*STDOUT\}|\{\*STDERR\})/ # '{*STDOUT}' or '{*STDERR}'
64             %token STDIN = /(<STDIN>)/ # '<STDIN>'
65             %token ARGV = /(\@ARGV)/ # '@ARGV'
66             %token ENV = /(\%ENV)/ # '%ENV'
67              
68             # FEATURE BOUNTY #000, 1_000 CodeCoin: Implement all Perl functions AKA builtins (PERLOPS_PERLTYPES) as C++ functions (CPPOPS_*TYPES)
69             # Affects OP01_NAMED, OP01_NAMED_VOID, and OP10_NAMED_UNARY below, corresponding RPerl::Test::Operator* and C++ code; http://perldoc.perl.org/perlfunc.html
70              
71             # [[[ LEXICON TOKENS, OPERATORS ]]]
72              
73             # LEXICAL MATCHING: earlier declaration gets tried first, must be in correct order for all regexes to match
74             # DEV NOTE: tokens which are all letters (or, ne, x, print, open, ETC) & are always followed by whitespace when tidy (NOT not or argumentless next, last, croak, return, exit, chdir, etc)
75             # must be explicitly made to match the trailing whitespace in the regular expressions below, in order to avoid incorrectly matching substrings of user-defined words
76             %token OP24_LOGICAL_OR_XOR = /(or|xor)\s/ # precedence 24 infix: logical 'or' and 'xor', equivalent to '||' except for precedence
77             %token OP23_LOGICAL_AND = /(and)\s/ # precedence 23 infix: logical 'and', equivalent to '&&' except for precedence
78             %token OP22_LOGICAL_NEG_LPAREN = /(not\()\s/ # precedence 22 prefix: logical negation 'not(', equivalent to '!' except for precedence
79             %token OP22_LOGICAL_NEG = /(not)\s/ # precedence 22 prefix: logical negation 'not', equivalent to '!' except for precedence
80             %token OP21_LIST_COMMA = /(,)/ # precedence 21 infix: "list operators (rightward)" [1] AKA comma ','
81             %token OP20_HASH_FATARROW = /(=>)/ # precedence 20 infix: hash entry fat arrow AKA fat comma '=>'
82             %token OP19_LOOP_CONTROL_SCOLON = /(next;|last;)/ # precedence 19 prefix void: loop control 'next;', 'last;'
83             %token OP19_LOOP_CONTROL = /(next|last|redo)\s/ # precedence 19 prefix void: same as above, except allows 'redo' and requires loop label
84             %token OP18_TERNARY = /(\?)/ # precedence 18 infix: ternary conditional '?'
85             %token OP17_LIST_RANGE = /(\.\.)/ # precedence 17 infix: range '..'
86             %token OP16_LOGICAL_OR = /(\|\|)/ # precedence 16 infix: logical or '||'
87             %token OP15_LOGICAL_AND = /(&&)/ # precedence 15 infix: logical and '&&'
88             %token OP14_BITWISE_OR_XOR = /(\||\^)/ # precedence 14 infix: bitwise or '|', bitwise xor '^'
89             %token OP13_BITWISE_AND = /(&)/ # precedence 13 infix: bitwise and '&'
90             %token OP12_COMPARE_EQ_NE = /(==|!=|<=>|eq|ne|cmp)\s/ # precedence 12 infix: comparison numeric equal '==', numeric not equal '!=', numeric three-way '<=>', string equal 'eq', string not equal 'ne', string three-way 'cmp'
91             %token OP09_BITWISE_SHIFT = /(<<|>>)/ # precedence 09 infix: bitwise shift left '<<', shift right '>>'
92             # precedence 10 prefix: "named unary operators" [1] and Programming Perl, Chapter 3, List of All Named Unary Operators; 'scalar' not 'scalartype'
93             %token OP10_NAMED_UNARY_SCOLON = /(-A;|-B;|-C;|-M;|-O;|-R;|-S;|-T;|-W;|-X;|-b;|-c;|-d;|-e;|-f;|-g;|-k;|-l;|-o;|-p;|-r;|-s;|-t;|-u;|-w;|-x;|-z;|alarm;|caller;|chdir;|chroot;|cos;|defined;|delete;|do;|eval;|exists;|gethostbyname;|getnetbyname;|getpgrp;|getprotobyname;|glob;|gmtime;|goto;|hex;|int;|lc;|lcfirst;|length;|localtime;|lock;|log;|lstat;|oct;|ord;|quotemeta;|rand;|readlink;|ref;|require;|rmdir;|scalar;|sin;|sleep;|sqrt;|srand;|stat;|uc;|ucfirst;|umask;)/
94             %token OP10_NAMED_UNARY = /(-A\s|-B\s|-C\s|-M\s|-O\s|-R\s|-S\s|-T\s|-W\s|-X\s|-b\s|-c\s|-d\s|-e\s|-f\s|-g\s|-k\s|-l\s|-o\s|-p\s|-r\s|-s\s|-t\s|-u\s|-w\s|-x\s|-z\s|alarm\s|caller\s|chdir\s|chroot\s|cos\s|defined\s|delete\s|do\s|eval\s|exists\s|gethostbyname\s|getnetbyname\s|getpgrp\s|getprotobyname\s|glob\s|gmtime\s|goto\s|hex\s|int\s|lc\s|lcfirst\s|length\s|localtime\s|lock\s|log\s|lstat\s|oct\s|ord\s|quotemeta\s|rand\s|readlink\s|ref\s|require\s|rmdir\s|scalar\s|sin\s|sleep\s|sqrt\s|srand\s|stat\s|uc\s|ucfirst\s|umask\s)/
95             %token OP19_VARIABLE_ASSIGN_BY = /(\+=|-=|\*=|\/=|\.=)/ # precedence 19 infix: add assign '+=', subtract assign '-=', multiply assign '*=', divide assign '/=', string concatenation assign '.='
96             %token OP08_STRING_CAT = /(\.)/ # precedence 08 infix: string concatenate '.'
97             %token OP03_MATH_INC_DEC = /(\+\+|--)/ # precedence 03 prefix and postfix: increment '++', decrement '--'
98             %token OP04_MATH_POW = /(\*\*)/ # precedence 04 infix: arithmetic exponent AKA power '**'
99             %token OP07_MATH_MULT_DIV_MOD = /(\*|\/|\%|sse_mul|sse_div)/ # precedence 07 infix: arithmetic multiply '*', divide '/', modulo '%', SSE multiply 'sse_mul', SSE divide 'sse_div'
100             %token OP07_STRING_REPEAT = /(x)\s/ # precedence 07 infix: string repetition 'x'
101             %token OP06_REGEX_PATTERN = /([ms]\/.*(?:\/.*)?\/[a-z]*)/ # precedence 06 infix: regular expression pattern; ex. 'm/foo.*/xms' or 's/foo/bar/gxms'
102             %token OP06_REGEX_BIND = /(=\~|!\~)/ # precedence 06 infix: regular expression bind '=~', bind not '!~'
103             %token OP05_LOGICAL_NEG = /(!)/ # precedence 05 prefix: logical negation '!'
104             %token OP05_BITWISE_NEG_LPAREN = /(\~\()/ # precedence 05 prefix: bitwise negation '~', AKA one's complement; include paren to disambiguate from regex or smartmatch
105             %token OP02_HASH_THINARROW = /(->\{)/ # precedence 02 infix: thin arrow, hash dereference and retrieval '->{'
106             %token OP02_ARRAY_THINARROW = /(->\[)/ # precedence 02 infix: thin arrow, array dereference and retrieval '->['
107             %token OP02_METHOD_THINARROW_NEW = /(->new\()/ # precedence 02 infix: thin arrow, class constructor '->new('
108             %token OP02_METHOD_THINARROW = /(->[a-zA-Z]\w*)/ # precedence 02 infix: thin arrow, method dereference and call; ex. '->foo' or '->Bar23'
109             %token OP05_MATH_NEG_LPAREN = /(-\()/ # precedence 05 prefix: arithmetic negative '-('; include paren to disambiguate from literal negative sign and subtraction operator
110             %token OP08_MATH_ADD_SUB = /(\+|-\s|sse_add|sse_sub)/ # precedence 08 infix: arithmetic add '+', subtract '-', SSE add 'sse_add', SSE subtract 'sse_sub'
111             %token OP11_COMPARE_LT_GT = /(<=|>=|<|>|le|ge|lt|gt)\s/ # precedence 11 infix: numeric comparison less or equal '<=', greater or equal '>=', less than '<', greater than '>'; string comparison less or equal 'le', greater or equal 'ge', less than 'lt', greater than 'gt'
112             %token OP19_VARIABLE_ASSIGN = /(=)/ # precedence 19 infix: assign '='
113             %token OP01_PRINT = /(print|printf)\s/ # precedence 01 prefix void: 'print' or 'printf' to STDOUT, STDERR, or filehandle
114             %token OP01_NAMED_VOID_SCOLON = /(croak;|die;|exit;|return;)/ # precedence 01 prefix void: "terms and list operators (leftward)" [1] AKA builtins, no return value; 'croak;', 'die;', 'exit;', 'return;'
115             %token OP01_NAMED_VOID_LPAREN = /(croak\(|exit\(|return\()/ # precedence 01 prefix void: same as above, except w/ parenthesis & w/out semicolon & w/out die; 'croak(', 'exit(', 'return('; ProhibitParensWithBuiltins excepts return() & exit(...); RequireTidyCode & RequireCarping excepts croak()
116             %token OP01_NAMED_VOID = /(croak|die|exit|return)\s/ # precedence 01 prefix void: same as above, except accepts argument(s); 'croak', 'die', 'exit', 'return'
117             %token OP01_QW = /(qw\([^()]*\))/ # precedence 01 closed: quote word; ex. 'qw()' or 'qw(foo bar baz)' or 'qw(Foo23 BarBax Ba_z 123)'
118             %token OP01_OPEN = /(open)\s/ # precedence 01 prefix: 'open' filehandle
119             %token OP01_CLOSE = /(close)\s/ # precedence 01 prefix: 'close' filehandle
120             # precedence 01 prefix: "terms and list operators (leftward)" [1] AKA builtins; http://perl5.git.perl.org/perl.git/blob/HEAD:/t/op/cproto.t [2]
121             # w/out all-uppercase Perl system builtin keywords ('__DATA__', 'AUTOLOAD', 'CHECK', etc); named unary operators above ('defined', 'exists', etc); and RPerl keywords ('use', 'our', 'my', 'package', 'for', etc)
122             %token OP01_NAMED_SCOLON = /(abs;|accept;|atan2;|bind;|binmode;|bless;|break;|chmod;|chomp;|chop;|chown;|chr;|closedir;|connect;|continue;|crypt;|dbmclose;|dbmopen;|default;|dump;|each;|endgrent;|endhostent;|endnetent;|endprotoent;|endpwent;|endservent;|eof;|evalbytes;|exec;|exp;|fc;|fcntl;|fileno;|flock;|fork;|format;|formline;|getc;|getgrent;|getgrgid;|getgrnam;|gethostbyaddr;|gethostent;|getlogin;|getnetbyaddr;|getnetent;|getpeername;|getppid;|getpriority;|getprotobynumber;|getprotoent;|getpwent;|getpwnam;|getpwuid;|getservbyname;|getservbyport;|getservent;|getsockname;|getsockopt;|given;|grep;|index;|ioctl;|join;|keys;|kill;|link;|listen;|local;|m;|map;|mkdir;|msgctl;|msgget;|msgrcv;|msgsnd;|opendir;|pack;|pipe;|pop;|pos;|prototype;|push;|q;|qq;|qr;|qx;|read;|readdir;|readline;|readpipe;|recv;|rename;|reset;|reverse;|rewinddir;|rindex;|s;|say;|seek;|seekdir;|select;|semctl;|semget;|semop;|send;|setgrent;|sethostent;|setnetent;|setpgrp;|setpriority;|setprotoent;|setpwent;|setservent;|setsockopt;|shift;|shmctl;|shmget;|shmread;|shmwrite;|shutdown;|socket;|socketpair;|sort;|splice;|split;|sprintf;|state;|study;|substr;|symlink;|syscall;|sysopen;|sysread;|sysseek;|system;|syswrite;|tell;|telldir;|tie;|tied;|time;|times;|tr;|truncate;|unless;|unlink;|unpack;|unshift;|untie;|until;|utime;|values;|vec;|wait;|waitpid;|wantarray;|warn;|when;|write;|y;)/
123             %token OP01_NAMED = /(abs\s|accept\s|atan2\s|bind\s|binmode\s|bless\s|break\s|chmod\s|chomp\s|chop\s|chown\s|chr\s|closedir\s|connect\s|continue\s|crypt\s|dbmclose\s|dbmopen\s|default\s|dump\s|each\s|endgrent\s|endhostent\s|endnetent\s|endprotoent\s|endpwent\s|endservent\s|eof\s|evalbytes\s|exec\s|exp\s|fc\s|fcntl\s|fileno\s|flock\s|fork\s|format\s|formline\s|getc\s|getgrent\s|getgrgid\s|getgrnam\s|gethostbyaddr\s|gethostent\s|getlogin\s|getnetbyaddr\s|getnetent\s|getpeername\s|getppid\s|getpriority\s|getprotobynumber\s|getprotoent\s|getpwent\s|getpwnam\s|getpwuid\s|getservbyname\s|getservbyport\s|getservent\s|getsockname\s|getsockopt\s|given\s|grep\s|index\s|ioctl\s|join\s|keys\s|kill\s|link\s|listen\s|local\s|m\s|map\s|mkdir\s|msgctl\s|msgget\s|msgrcv\s|msgsnd\s|opendir\s|pack\s|pipe\s|pop\s|pos\s|prototype\s|push\s|q\s|qq\s|qr\s|qx\s|read\s|readdir\s|readline\s|readpipe\s|recv\s|rename\s|reset\s|reverse\s|rewinddir\s|rindex\s|s\s|say\s|seek\s|seekdir\s|select\s|semctl\s|semget\s|semop\s|send\s|setgrent\s|sethostent\s|setnetent\s|setpgrp\s|setpriority\s|setprotoent\s|setpwent\s|setservent\s|setsockopt\s|shift\s|shmctl\s|shmget\s|shmread\s|shmwrite\s|shutdown\s|socket\s|socketpair\s|sort\s|splice\s|split\s|sprintf\s|state\s|study\s|substr\s|symlink\s|syscall\s|sysopen\s|sysread\s|sysseek\s|system\s|syswrite\s|tell\s|telldir\s|tie\s|tied\s|time\s|times\s|tr\s|truncate\s|unless\s|unlink\s|unpack\s|unshift\s|untie\s|until\s|utime\s|values\s|vec\s|wait\s|waitpid\s|wantarray\s|warn\s|when\s|write\s|y\s)/
124              
125             # [[[ SYNTAX, OPERATOR PRECEDENCE & ASSOCIATIVITY ]]]
126              
127             # later declaration gets higher priority; http://perldoc.perl.org/perlop.html#Operator-Precedence-and-Associativity [1]
128             %left OP24_LOGICAL_OR_XOR
129             %left OP23_LOGICAL_AND
130             %right OP22_LOGICAL_NEG_LPAREN
131             %right OP22_LOGICAL_NEG
132             %left OP21_LIST_COMMA
133             %left OP20_HASH_FATARROW
134             %right OP19_LOOP_CONTROL_SCOLON
135             %right OP19_LOOP_CONTROL
136             %right OP19_VARIABLE_ASSIGN_BY
137             %right OP19_VARIABLE_ASSIGN
138             %right OP18_TERNARY
139             %nonassoc OP17_LIST_RANGE
140             %left OP16_LOGICAL_OR
141             %left OP15_LOGICAL_AND
142             %left OP14_BITWISE_OR_XOR
143             %left OP13_BITWISE_AND
144             %nonassoc OP12_COMPARE_EQ_NE
145             %nonassoc OP11_COMPARE_LT_GT
146             %nonassoc OP10_NAMED_UNARY
147             %nonassoc OP10_NAMED_UNARY_SCOLON
148             %left OP09_BITWISE_SHIFT
149             %left OP08_STRING_CAT
150             %left OP08_MATH_ADD_SUB
151             %left OP07_MATH_MULT_DIV_MOD
152             %left OP07_STRING_REPEAT
153             %left OP06_REGEX_BIND
154             %left OP06_REGEX_PATTERN
155             %right OP05_MATH_NEG_LPAREN
156             %right OP05_LOGICAL_NEG
157             %right OP05_BITWISE_NEG_LPAREN
158             %right OP04_MATH_POW
159             %nonassoc OP03_MATH_INC_DEC
160             %left OP02_HASH_THINARROW
161             %left OP02_ARRAY_THINARROW
162             %left OP02_METHOD_THINARROW_NEW
163             %left OP02_METHOD_THINARROW
164             %left OP01_NAMED
165             %left OP01_NAMED_SCOLON
166             %left OP01_CLOSE
167             %left OP01_OPEN
168             %left OP01_QW
169             %left OP01_NAMED_VOID_SCOLON
170             %left OP01_NAMED_VOID_LPAREN
171             %left OP01_NAMED_VOID
172             %left OP01_PRINT
173              
174             # [[[ LEXICON TOKENS, PUNCTUATION & USER-DEFINED WORDS ]]]
175              
176             %token COLON = /(:)/ # ':'
177             %token LPAREN_MY = /(\(\s*my)/ # '(my'
178             %token LPAREN = /(\()/ # '('
179             %token LBRACKET = /(\[)/ # '['
180             %token LBRACE = /(\{)/ # '{'
181             %token WORD = /([a-z]\w*|[A-Z]\w*[a-z]\w*)/ # lowercase letter followed by optional word characters; or uppercase letter followed by at least one lowercase letter and optional word characters; ex. 'foo' or 'foo23' or 'Foo23'
182             %token WORD_UPPERCASE = /([A-Z][A-Z0-9_]*|[A-Z])/ # single uppercase letter, or uppercase letter followed by uppercase letters, numbers, and underscores; ex. 'FOO' or 'FOOBAR_42_HOWDY'
183              
184             %%
185              
186             # [[[ SYNTAX PRODUCTION RULES, FILE FORMATS ]]]
187              
188       392     CompileUnit: Program | (ModuleHeader Module)+ ;
189       1997     Program: SHEBANG Critic? USE_RPERL Header Critic* Include* Constant* Subroutine* Operation+ ;
190       283     ModuleHeader: Critic? USE_RPERL? 'package' WordScoped ';' Header ;
191             Module: Package | Class ;
192       144     Package: Critic* Exports? Include* Constant* Subroutine+ LITERAL_NUMBER ';' ;
193       1696     Header: 'use strict;' 'use warnings;' USE_RPERL_AFTER? OUR VERSION_NUMBER_ASSIGN ;
194       3003     Critic: '## no critic qw(' WORD+ ')' ;
195       21     Exports: USE_EXPORTER (OUR_EXPORT OP01_QW ';')? (OUR_EXPORT_OK OP01_QW ';')? ;
196             Include: USE WordScoped ';' | USE WordScoped OP01_QW ';' ;
197             Constant: 'use constant' WORD_UPPERCASE OP20_HASH_FATARROW TypeInnerConstant Literal ';' ;
198             #Constant: 'use constant' WORD_UPPERCASE OP20_HASH_FATARROW TypeInnerConstant ConstantValue ';' ; # NEED UPGRADE: constant array & hash refs not read-only as of Perl v5.20
199             #ConstantValue: Literal | LBRACKET TypeInnerConstant? Literal (OP21_LIST_COMMA TypeInnerConstant? Literal)* ']' |
200             # LBRACE WORD_UPPERCASE OP20_HASH_FATARROW TypeInnerConstant? Literal (OP21_LIST_COMMA WORD_UPPERCASE OP20_HASH_FATARROW TypeInnerConstant? Literal)* '}' ;
201       555     Subroutine: SUB WORD LBRACE LBRACE MY Type '$RETURN_TYPE' '}' ';' SubroutineArguments? Operation* '}' ;
202       46     SubroutineArguments: LPAREN_MY Type VARIABLE_SYMBOL (OP21_LIST_COMMA MY Type VARIABLE_SYMBOL)* ')' OP19_VARIABLE_ASSIGN '@ARG;' ;
203       192     Class: 'use parent qw(' WordScoped ')' ';' Include Critic* Exports? Include* Constant* Properties SubroutineOrMethod* LITERAL_NUMBER ';' ;
204       33     Properties: 'our hashref $properties' OP19_VARIABLE_ASSIGN LBRACE HashEntryProperties (OP21_LIST_COMMA HashEntryProperties)* '}' ';' |
205             'our hashref $properties' OP19_VARIABLE_ASSIGN LBRACE '}' ';';
206       85     Method: SUB WORD LBRACE LBRACE MY TYPE_METHOD '$RETURN_TYPE' '}' ';' MethodArguments? Operation* '}' ;
207       83     MethodArguments: LPAREN_MY Type SELF (OP21_LIST_COMMA MY Type VARIABLE_SYMBOL)* ')' OP19_VARIABLE_ASSIGN '@ARG;' ;
208             SubroutineOrMethod: Subroutine | Method ;
209              
210             # [[[ SYNTAX PRODUCTION RULES, OPERATIONS ]]]
211              
212             Operation: Expression ';' | OP01_NAMED_SCOLON | OP10_NAMED_UNARY_SCOLON | Statement ;
213             Operator: LPAREN OP01_PRINT FHREF_SYMBOL_BRACES ListElements ')' |
214             OP01_NAMED SubExpression | LPAREN OP01_NAMED ListElement OP21_LIST_COMMA ListElements ')' |
215             OP01_OPEN MY TYPE_FHREF FHREF_SYMBOL OP21_LIST_COMMA LITERAL_STRING OP21_LIST_COMMA SubExpression |
216             OP01_CLOSE FHREF_SYMBOL | OP03_MATH_INC_DEC Variable | Variable OP03_MATH_INC_DEC | SubExpression OP04_MATH_POW SubExpression |
217             OP05_BITWISE_NEG_LPAREN SubExpression ')' | OP05_LOGICAL_NEG SubExpression | OP05_MATH_NEG_LPAREN SubExpression ')' |
218             SubExpression OP06_REGEX_BIND OP06_REGEX_PATTERN | SubExpression OP07_STRING_REPEAT SubExpression |
219             SubExpression OP07_MATH_MULT_DIV_MOD SubExpression | SubExpression OP08_MATH_ADD_SUB SubExpression |
220             SubExpression OP08_STRING_CAT SubExpression | SubExpression OP09_BITWISE_SHIFT SubExpression |
221             OP10_NAMED_UNARY SubExpression | OP10_NAMED_UNARY | SubExpression OP11_COMPARE_LT_GT SubExpression |
222             SubExpression OP12_COMPARE_EQ_NE SubExpression | SubExpression OP13_BITWISE_AND SubExpression |
223             SubExpression OP14_BITWISE_OR_XOR SubExpression | SubExpression OP15_LOGICAL_AND SubExpression | SubExpression OP16_LOGICAL_OR SubExpression |
224             SubExpression OP17_LIST_RANGE SubExpression | SubExpression OP18_TERNARY VariableOrLiteral COLON VariableOrLiteral |
225             OP22_LOGICAL_NEG_LPAREN SubExpression ')' | OP22_LOGICAL_NEG SubExpression |
226             SubExpression OP23_LOGICAL_AND SubExpression | SubExpression OP24_LOGICAL_OR_XOR SubExpression ;
227             OperatorVoid: OP01_PRINT (STDOUT_STDERR)? ListElements ';' | OP01_PRINT FHREF_SYMBOL_BRACES ListElements ';' |
228             OP01_NAMED_VOID_SCOLON | OP01_NAMED_VOID_LPAREN ListElements? ')' ';' | OP01_NAMED_VOID ListElements ';' |
229             OP01_NAMED ListElement OP21_LIST_COMMA ListElements ';' | OP19_LOOP_CONTROL_SCOLON | OP19_LOOP_CONTROL LoopLabel ';' ;
230             Expression: Operator | WORD_UPPERCASE LPAREN ')' | CONSTANT_CALL_SCOPED | WordScoped LPAREN ListElements? ')' |
231             Variable OP02_METHOD_THINARROW LPAREN ListElements? ')' | WordScoped OP02_METHOD_THINARROW_NEW HashReference? ')' ;
232             SubExpression: Expression | 'undef' | Literal | Variable | ArrayReference | ArrayDereference | HashReference | HashDereference | LPAREN SubExpression ')' ;
233       1024     SubExpressionOrInput: SubExpression | FHREF_SYMBOL_IN | STDIN ;
234       54     SubExpressionOrVarMod: SubExpression | VariableModification ;
235             Statement: Conditional | (LoopLabel COLON)? Loop | OperatorVoid | VariableDeclaration | VariableModification ';' ;
236       538     Conditional: 'if' LPAREN SubExpression ')' CodeBlock ('elsif' LPAREN SubExpression ')' CodeBlock)* ('else' CodeBlock)? ;
237       44     Loop: LoopFor | LoopForEach | LoopWhile ;
238             LoopFor: 'for' MY TYPE_INTEGER VARIABLE_SYMBOL LPAREN SubExpression OP17_LIST_RANGE SubExpression ')' CodeBlock |
239             'for' LPAREN_MY TYPE_INTEGER VARIABLE_SYMBOL OP19_VARIABLE_ASSIGN OpNamedScolonOrSubExp VARIABLE_SYMBOL OP11_COMPARE_LT_GT OpNamedScolonOrSubExp SubExpressionOrVarMod ')' CodeBlock ;
240             LoopForEach: 'foreach' MY Type VARIABLE_SYMBOL LPAREN ListElements ')' CodeBlock ;
241       157     LoopWhile: 'while' LPAREN SubExpression ')' CodeBlock | 'while' LPAREN_MY Type VARIABLE_SYMBOL OP19_VARIABLE_ASSIGN SubExpressionOrInput ')' CodeBlock;
242       21     CodeBlock: LBRACE Operation+ '}' ;
243              
244             # [[[ SYNTAX PRODUCTION RULES, VARIABLE DATA ]]]
245              
246             Variable: VariableSymbolOrSelf VariableRetrieval* ;
247             VariableRetrieval: OP02_ARRAY_THINARROW SubExpression ']' | OP02_HASH_THINARROW SubExpression '}' | OP02_HASH_THINARROW WORD '}' ;
248       267     VariableDeclaration: MY Type VARIABLE_SYMBOL ';' | MY Type VARIABLE_SYMBOL OP19_VARIABLE_ASSIGN OpNamedScolonOrSubExpIn |
249             MY Type VARIABLE_SYMBOL OP02_ARRAY_THINARROW SubExpression ']' OP19_VARIABLE_ASSIGN 'undef' ';' | MY TYPE_FHREF FHREF_SYMBOL ';' ;
250             VariableModification: Variable OP19_VARIABLE_ASSIGN SubExpressionOrInput | Variable OP19_VARIABLE_ASSIGN_BY SubExpression ;
251             ListElements: ListElement (OP21_LIST_COMMA ListElement)* ;
252       2305     ListElement: SubExpression | TypeInner SubExpression | OP01_QW | ARGV ;
253             ArrayReference: LBRACKET ListElements? ']' ;
254             ArrayDereference: '@{' Variable '}' | '@{' TypeInner? ArrayReference '}' ;
255             HashEntry: VarOrLitOrOpStrOrWord OP20_HASH_FATARROW TypeInner? SubExpression | HashDereference | ENV ;
256             HashEntryProperties: OpStringOrWord OP20_HASH_FATARROW TypeInnerProperties ;
257       4877     HashReference: LBRACE HashEntry (OP21_LIST_COMMA HashEntry)* '}' | LBRACE '}' ;
258             HashDereference: '%{' Variable '}' | '%{' TypeInner? HashReference '}' ;
259       358      
260       33     # [[[ SYNTAX PRODUCTION RULES, USER-DEFINED WORDS ]]]
261       718      
262             WordScoped: WORD | WORD_SCOPED ;
263       651     LoopLabel: WORD_UPPERCASE ;
264       18     Type: WORD | WORD_SCOPED | TYPE_INTEGER ;
265             TypeInner: MY Type '$TYPED_' OpStringOrWord OP19_VARIABLE_ASSIGN ;
266             TypeInnerProperties: MY Type '$TYPED_' OpStringOrWord OP19_VARIABLE_ASSIGN SubExpression |
267             MY Type '$TYPED_' OpStringOrWord OP02_ARRAY_THINARROW SubExpression ']' OP19_VARIABLE_ASSIGN 'undef' ;
268             TypeInnerConstant: MY Type '$TYPED_' WORD_UPPERCASE OP19_VARIABLE_ASSIGN ;
269             VariableOrLiteral: Variable | Literal ;
270             VarOrLitOrOpStrOrWord: Variable | Literal | OpStringOrWord ;
271             VariableSymbolOrSelf: VARIABLE_SYMBOL | SELF ;
272             Literal: LITERAL_NUMBER | LITERAL_STRING ;
273             OpNamedScolonOrSubExp: OP01_NAMED_SCOLON | OP10_NAMED_UNARY_SCOLON | SubExpression ';' ;
274             OpNamedScolonOrSubExpIn: OP01_NAMED_SCOLON | OP10_NAMED_UNARY_SCOLON | SubExpressionOrInput ';' ;
275             OpStringOrWord: OP24_LOGICAL_OR_XOR | OP23_LOGICAL_AND | OP22_LOGICAL_NEG | OP19_LOOP_CONTROL_SCOLON | OP19_LOOP_CONTROL | OP12_COMPARE_EQ_NE |
276             OP11_COMPARE_LT_GT | OP10_NAMED_UNARY | OP08_MATH_ADD_SUB | OP07_MATH_MULT_DIV_MOD | OP07_STRING_REPEAT | OP01_NAMED | OP01_CLOSE |
277             OP01_OPEN | OP01_NAMED_VOID | OP01_PRINT | WORD ;
278              
279             %%
280              
281             # [[[ SEMANTIC MAP, ABSTRACT SYNTAX TREE NODES TO CLASSES ]]]
282              
283             {
284             # Map from abstract syntax tree to classes
285             # DEV NOTE: derived from grammar rules in Grammar.output file, use the following process for grammar updates...
286             # 1. Update grammar code in this file, above this line only
287             # 2. Run `script/development/grammar_recompile.sh`
288             # 3. Run `perl t/12_parse.t` for new & existing grammar parse-only tests, if errors goto step 1
289             # 4. Inspect updates from Grammar.output file, note starting & finishing & increment/decrement numbers if any rule numbers have changed
290             # 5a. Run `script/development/grammar_increment.pl START FINISH INCREMENT` if rules added from step 4, repeat if needed
291             # 5b. Run `script/development/grammar_decrement.pl START FINISH DECREMENT` if rules deleted from step 4, repeat if needed
292             # 6. Copy updates from Grammar.output file into this file with now-unique numbers, below this line only, if not-automatically-generated rules have been added
293             # 7. Run `script/development/grammar_recompile.sh` again
294             our string_hashref $RULES = {
295             CompileUnit_4 => 'RPerl::CompileUnit::Program', # CompileUnit -> Program
296             CompileUnit_5 => 'RPerl::CompileUnit::Module', # CompileUnit -> PLUS-2
297             Program_18 => 'RPerl::CompileUnit::Program', # Program -> SHEBANG OPTIONAL-3 USE_RPERL Header STAR-4 STAR-5 STAR-6 STAR-7 PLUS-8
298             ModuleHeader_23 => 'RPerl::CompileUnit::Module::Header', # ModuleHeader -> OPTIONAL-9 OPTIONAL-10 'package' WordScoped ';' Header
299             Module_24 => 'RPerl::CompileUnit::Module::Package', # Module -> Package
300             Module_25 => 'RPerl::CompileUnit::Module::Class::Generator', # Module -> Class
301             Package_36 => 'RPerl::CompileUnit::Module::Package', # Package -> STAR-11 OPTIONAL-12 STAR-13 STAR-14 PLUS-15 LITERAL_NUMBER ';'
302             Header_39 => 'RPerl::NonGenerator', # Header -> 'use strict;' 'use warnings;' OPTIONAL-16 'our' VERSION_NUMBER_ASSIGN
303             Critic_42 => 'RPerl::CompileUnit::Critic', # Critic -> '## no critic qw(' PLUS-17 ')'
304             Exports_49 => 'RPerl::NonGenerator', # Exports -> USE_EXPORTER OPTIONAL-19 OPTIONAL-21
305             Include_50 => 'RPerl::CompileUnit::Include', # Include -> USE WordScoped ';'
306             Include_51 => 'RPerl::CompileUnit::Include', # Include -> USE WordScoped OP01_QW ';'
307             Constant_52 => 'RPerl::CompileUnit::Constant', # Constant -> 'use constant' WORD_UPPERCASE OP20_HASH_FATARROW TypeInnerConstant Literal ';'
308             Subroutine_57 => 'RPerl::CodeBlock::Subroutine', # Subroutine -> SUB WORD LBRACE LBRACE MY Type '$RETURN_TYPE' '}' ';' OPTIONAL-22 STAR-23 '}'
309             SubroutineArguments_61 => 'RPerl::CodeBlock::Subroutine::Arguments', # SubroutineArguments -> LPAREN_MY Type VARIABLE_SYMBOL STAR-25 ')' OP19_VARIABLE_ASSIGN '@ARG;'
310             Class_72 => 'RPerl::CompileUnit::Module::Class::Generator', # Class -> 'use parent qw(' WordScoped ')' ';' Include STAR-26 OPTIONAL-27 STAR-28 STAR-29 Properties STAR-30 LITERAL_NUMBER ';'
311             Properties_76 => 'RPerl::NonGenerator', # Properties -> 'our hashref $properties' OP19_VARIABLE_ASSIGN LBRACE HashEntryProperties STAR-32 '}' ';'
312             Properties_77 => 'RPerl::NonGenerator', # Properties -> 'our hashref $properties' OP19_VARIABLE_ASSIGN LBRACE '}' ';'
313             Method_82 => 'RPerl::CodeBlock::Subroutine::Method', # Method -> SUB WORD LBRACE LBRACE MY TYPE_METHOD '$RETURN_TYPE' '}' ';' OPTIONAL-33 STAR-34 '}'
314             MethodArguments_86 => 'RPerl::CodeBlock::Subroutine::Method::Arguments', # MethodArguments -> LPAREN_MY Type SELF STAR-36 ')' OP19_VARIABLE_ASSIGN '@ARG;'
315             SubroutineOrMethod_87 => 'RPerl::CodeBlock::Subroutine', # SubroutineOrMethod -> Subroutine
316             SubroutineOrMethod_88 => 'RPerl::CodeBlock::Subroutine::Method', # SubroutineOrMethod -> Method
317             Operation_89 => 'RPerl::Operation::Expression', # Operation -> Expression ';'
318             Operation_90 => 'RPerl::Operation::Expression::Operator::Named', # Operation -> OP01_NAMED_SCOLON
319             Operation_91 => 'RPerl::Operation::Expression::Operator::NamedUnary', # Operation -> OP10_NAMED_UNARY_SCOLON
320             Operation_92 => 'RPerl::Operation::Statement', # Operation -> Statement
321             Operator_93 => 'RPerl::Operation::Expression::Operator::Print', # Operator -> LPAREN OP01_PRINT FHREF_SYMBOL_BRACES ListElements ')'
322             Operator_94 => 'RPerl::Operation::Expression::Operator::Named', # Operator -> OP01_NAMED SubExpression
323             Operator_95 => 'RPerl::Operation::Expression::Operator::Named', # Operator -> LPAREN OP01_NAMED ListElement OP21_LIST_COMMA ListElements ')'
324             Operator_96 => 'RPerl::Operation::Expression::Operator::Open', # Operator -> OP01_OPEN MY TYPE_FHREF FHREF_SYMBOL OP21_LIST_COMMA LITERAL_STRING OP21_LIST_COMMA SubExpression
325             Operator_97 => 'RPerl::Operation::Expression::Operator::Close', # Operator -> OP01_CLOSE FHREF_SYMBOL
326             Operator_98 => 'RPerl::Operation::Expression::Operator::IncrementDecrement', # Operator -> OP03_MATH_INC_DEC Variable
327             Operator_99 => 'RPerl::Operation::Expression::Operator::IncrementDecrement', # Operator -> Variable OP03_MATH_INC_DEC
328             Operator_100 => 'RPerl::Operation::Expression::Operator::Arithmetic::Power', # Operator -> SubExpression OP04_MATH_POW SubExpression
329             Operator_101 => 'RPerl::Operation::Expression::Operator::Bitwise::Negation', # Operator -> OP05_BITWISE_NEG_LPAREN SubExpression ')'
330             Operator_102 => 'RPerl::Operation::Expression::Operator::Logical::Negation', # Operator -> OP05_LOGICAL_NEG SubExpression
331             Operator_103 => 'RPerl::Operation::Expression::Operator::Arithmetic::Negative', # Operator -> OP05_MATH_NEG_LPAREN SubExpression ')'
332             Operator_104 => 'RPerl::Operation::Expression::Operator::RegularExpression', # Operator -> SubExpression OP06_REGEX_BIND OP06_REGEX_PATTERN
333             Operator_105 => 'RPerl::Operation::Expression::Operator::String::Repeat', # Operator -> SubExpression OP07_STRING_REPEAT SubExpression
334             Operator_106 => 'RPerl::Operation::Expression::Operator::Arithmetic::MultiplyDivideModulo', # Operator -> SubExpression OP07_MATH_MULT_DIV_MOD SubExpression
335             Operator_107 => 'RPerl::Operation::Expression::Operator::Arithmetic::AddSubtract', # Operator -> SubExpression OP08_MATH_ADD_SUB SubExpression
336             Operator_108 => 'RPerl::Operation::Expression::Operator::String::Concatenate', # Operator -> SubExpression OP08_STRING_CAT SubExpression
337             Operator_109 => 'RPerl::Operation::Expression::Operator::Bitwise::Shift', # Operator -> SubExpression OP09_BITWISE_SHIFT SubExpression
338             Operator_110 => 'RPerl::Operation::Expression::Operator::NamedUnary', # Operator -> OP10_NAMED_UNARY SubExpression
339             Operator_111 => 'RPerl::Operation::Expression::Operator::NamedUnary', # Operator -> OP10_NAMED_UNARY
340             Operator_112 => 'RPerl::Operation::Expression::Operator::Compare::LessThanGreaterThan', # Operator -> SubExpression OP11_COMPARE_LT_GT SubExpression
341             Operator_113 => 'RPerl::Operation::Expression::Operator::Compare::EqualNotEqual', # Operator -> SubExpression OP12_COMPARE_EQ_NE SubExpression
342             Operator_114 => 'RPerl::Operation::Expression::Operator::Bitwise::And', # Operator -> SubExpression OP13_BITWISE_AND SubExpression
343             Operator_115 => 'RPerl::Operation::Expression::Operator::Bitwise::OrXor', # Operator -> SubExpression OP14_BITWISE_OR_XOR SubExpression
344             Operator_116 => 'RPerl::Operation::Expression::Operator::Logical::And', # Operator -> SubExpression OP15_LOGICAL_AND SubExpression
345             Operator_117 => 'RPerl::Operation::Expression::Operator::Logical::OrXor', # Operator -> SubExpression OP16_LOGICAL_OR SubExpression
346             Operator_118 => 'RPerl::Operation::Expression::Operator::List::Range', # Operator -> SubExpression OP17_LIST_RANGE SubExpression
347             Operator_119 => 'RPerl::Operation::Expression::Operator::Ternary', # Operator -> SubExpression OP18_TERNARY VariableOrLiteral COLON VariableOrLiteral
348             Operator_120 => 'RPerl::Operation::Expression::Operator::Logical::Negation', # Operator -> OP22_LOGICAL_NEG_LPAREN SubExpression ')'
349             Operator_121 => 'RPerl::Operation::Expression::Operator::Logical::Negation', # Operator -> OP22_LOGICAL_NEG SubExpression
350             Operator_122 => 'RPerl::Operation::Expression::Operator::Logical::And', # Operator -> SubExpression OP23_LOGICAL_AND SubExpression
351             Operator_123 => 'RPerl::Operation::Expression::Operator::Logical::OrXor', # Operator -> SubExpression OP24_LOGICAL_OR_XOR SubExpression
352             OperatorVoid_129 => 'RPerl::Operation::Statement::OperatorVoid::Print', # OperatorVoid -> OP01_PRINT OPTIONAL-31 ListElements ';'
353             OperatorVoid_130 => 'RPerl::Operation::Statement::OperatorVoid::Print', # OperatorVoid -> OP01_PRINT FHREF_SYMBOL_BRACES ListElements ';'
354             OperatorVoid_131 => 'RPerl::Operation::Statement::OperatorVoid::Named', # OperatorVoid -> OP01_NAMED_VOID_SCOLON
355             OperatorVoid_132 => 'RPerl::Operation::Statement::OperatorVoid::Named', # OperatorVoid -> OP01_NAMED_VOID_LPAREN OPTIONAL-32 ')' ';'
356             OperatorVoid_133 => 'RPerl::Operation::Statement::OperatorVoid::Named', # OperatorVoid -> OP01_NAMED_VOID ListElements ';'
357             OperatorVoid_134 => 'RPerl::Operation::Expression::Operator::Named', # OperatorVoid -> OP01_NAMED ListElement OP21_LIST_COMMA ListElements ';'
358             OperatorVoid_135 => 'RPerl::Operation::Statement::OperatorVoid::LoopControl', # OperatorVoid -> OP19_LOOP_CONTROL_SCOLON
359             OperatorVoid_136 => 'RPerl::Operation::Statement::OperatorVoid::LoopControl', # OperatorVoid -> OP19_LOOP_CONTROL LoopLabel ';'
360             Expression_143 => 'RPerl::Operation::Expression::Operator', # Expression -> Operator
361             Expression_144 => 'RPerl::Operation::Expression::ConstantCall', # Expression -> WORD_UPPERCASE LPAREN ')'
362             Expression_145 => 'RPerl::Operation::Expression::ConstantCall', # Expression -> CONSTANT_CALL_SCOPED
363             Expression_146 => 'RPerl::Operation::Expression::SubroutineCall', # Expression -> WordScoped LPAREN OPTIONAL-40 ')'
364             Expression_147 => 'RPerl::Operation::Expression::SubroutineCall::MethodCall', # Expression -> Variable OP02_METHOD_THINARROW LPAREN OPTIONAL-41 ')'
365             Expression_148 => 'RPerl::Operation::Expression::SubroutineCall::MethodCall::ConstructorCall', # Expression -> WordScoped OP02_METHOD_THINARROW_NEW OPTIONAL-42 ')'
366             SubExpression_149 => 'RPerl::Operation::Expression', # SubExpression -> Expression
367             SubExpression_150 => 'RPerl::Operation::Expression::SubExpression::Literal::Undefined', # SubExpression -> 'undef'
368             SubExpression_151 => 'RPerl::Operation::Expression::SubExpression::Literal', # SubExpression -> Literal
369             SubExpression_152 => 'RPerl::Operation::Expression::SubExpression::Variable', # SubExpression -> Variable
370             SubExpression_153 => 'RPerl::DataStructure::Array::Reference', # SubExpression -> ArrayReference
371             SubExpression_154 => 'RPerl::Operation::Expression::SubExpression::ArrayDereference', # SubExpression -> ArrayDereference
372             SubExpression_155 => 'RPerl::DataStructure::Hash::Reference', # SubExpression -> HashReference
373             SubExpression_156 => 'RPerl::Operation::Expression::SubExpression::HashDereference', # SubExpression -> HashDereference
374             SubExpression_157 => 'RPerl::Operation::Expression::SubExpression::Parenthesis', # SubExpression -> LPAREN SubExpression ')'
375             SubExpressionOrInput_158 => 'RPerl::Operation::Expression::SubExpression', # SubExpressionOrInput -> SubExpression
376             SubExpressionOrInput_159 => 'RPerl::InputOutput::FilehandleIn', # SubExpressionOrInput -> FHREF_SYMBOL_IN
377             SubExpressionOrInput_160 => 'RPerl::InputOutput::Stdin', # SubExpressionOrInput -> STDIN
378             SubExpressionOrVarMod_161 => 'RPerl::Operation::Expression::SubExpression', # SubExpressionOrVarMod -> SubExpression
379             SubExpressionOrVarMod_162 => 'RPerl::Operation::Statement::VariableModification', # SubExpressionOrVarMod -> VariableModification
380             Statement_166 => 'RPerl::Operation::Statement::Conditional', # Statement -> Conditional
381             Statement_167 => 'RPerl::Operation::Statement::Loop', # Statement -> OPTIONAL-44 Loop
382             Statement_168 => 'RPerl::Operation::Statement::OperatorVoid', # Statement -> OperatorVoid
383             Statement_169 => 'RPerl::Operation::Statement::VariableDeclaration', # Statement -> VariableDeclaration
384             Statement_170 => 'RPerl::Operation::Statement::VariableModification', # Statement -> VariableModification ';'
385             Conditional_177 => 'RPerl::Operation::Statement::Conditional', # Conditional -> 'if' LPAREN SubExpression ')' CodeBlock STAR-46 OPTIONAL-48
386             Loop_178 => 'RPerl::Operation::Statement::Loop::For', # Loop -> LoopFor
387             Loop_179 => 'RPerl::Operation::Statement::Loop::ForEach', # Loop -> LoopForEach
388             Loop_180 => 'RPerl::Operation::Statement::Loop::While', # Loop -> LoopWhile
389             LoopFor_181 => 'RPerl::Operation::Statement::Loop::For', # LoopFor -> 'for' MY TYPE_INTEGER VARIABLE_SYMBOL LPAREN SubExpression OP17_LIST_RANGE SubExpression ')' CodeBlock
390             LoopFor_182 => 'RPerl::Operation::Statement::Loop::For', # LoopFor -> 'for' LPAREN_MY TYPE_INTEGER VARIABLE_SYMBOL OP19_VARIABLE_ASSIGN OpNamedScolonOrSubExp VARIABLE_SYMBOL OP11_COMPARE_LT_GT OpNamedScolonOrSubExp SubExpressionOrVarMod ')' CodeBlock
391             LoopForEach_183 => 'RPerl::Operation::Statement::Loop::ForEach', # LoopForEach -> 'foreach' MY Type VARIABLE_SYMBOL LPAREN ListElements ')' CodeBlock
392             LoopWhile_184 => 'RPerl::Operation::Statement::Loop::While', # LoopWhile -> 'while' LPAREN SubExpression ')' CodeBlock
393             LoopWhile_185 => 'RPerl::Operation::Statement::Loop::While', # LoopWhile -> 'while' LPAREN_MY Type VARIABLE_SYMBOL OP19_VARIABLE_ASSIGN SubExpressionOrInput ')' CodeBlock
394             CodeBlock_188 => 'RPerl::CodeBlock', # CodeBlock -> LBRACE PLUS-49 '}'
395             Variable_191 => 'RPerl::Operation::Expression::SubExpression::Variable', # Variable -> VariableSymbolOrSelf STAR-50
396             VariableRetrieval_192 => 'RPerl::Operation::Expression::SubExpression::Variable::Retrieval', # VariableRetrieval -> OP02_ARRAY_THINARROW SubExpression ']'
397             VariableRetrieval_193 => 'RPerl::Operation::Expression::SubExpression::Variable::Retrieval', # VariableRetrieval -> OP02_HASH_THINARROW SubExpression '}'
398             VariableRetrieval_194 => 'RPerl::Operation::Expression::SubExpression::Variable::Retrieval', # VariableRetrieval -> OP02_HASH_THINARROW WORD '}'
399             VariableDeclaration_195 => 'RPerl::Operation::Statement::VariableDeclaration', # VariableDeclaration -> MY Type VARIABLE_SYMBOL ';'
400             VariableDeclaration_196 => 'RPerl::Operation::Statement::VariableDeclaration', # VariableDeclaration -> MY Type VARIABLE_SYMBOL OP19_VARIABLE_ASSIGN OpNamedScolonOrSubExpIn
401             VariableDeclaration_197 => 'RPerl::Operation::Statement::VariableDeclaration', # VariableDeclaration -> MY Type VARIABLE_SYMBOL OP02_ARRAY_THINARROW SubExpression ']' OP19_VARIABLE_ASSIGN 'undef' ';'
402             VariableDeclaration_198 => 'RPerl::Operation::Statement::VariableDeclaration', # VariableDeclaration -> MY TYPE_FHREF FHREF_SYMBOL ';'
403             VariableModification_199 => 'RPerl::Operation::Statement::VariableModification', # VariableModification -> Variable OP19_VARIABLE_ASSIGN SubExpressionOrInput
404             VariableModification_200 => 'RPerl::Operation::Statement::VariableModification', # VariableModification -> Variable OP19_VARIABLE_ASSIGN_BY SubExpression
405             ListElements_204 => 'RPerl::DataStructure::Array::ListElements', # ListElements -> ListElement STAR-52
406             ListElement_205 => 'RPerl::Operation::Expression::SubExpression', # ListElement -> SubExpression
407             ListElement_206 => 'RPerl::Operation::Expression::SubExpression', # ListElement -> TypeInner SubExpression
408             ListElement_207 => 'RPerl::DataStructure::Array::ListElement', # ListElement -> OP01_QW
409             ListElement_208 => 'RPerl::DataStructure::Array::ListElement', # ListElement -> ARGV
410             ArrayReference_211 => 'RPerl::DataStructure::Array::Reference', # ArrayReference -> LBRACKET OPTIONAL-53 ']'
411             ArrayDereference_214 => 'RPerl::Operation::Expression::SubExpression::ArrayDereference', # ArrayDereference -> '@{' Variable '}'
412             ArrayDereference_215 => 'RPerl::Operation::Expression::SubExpression::ArrayDereference', # ArrayDereference -> '@{' OPTIONAL-54 ArrayReference '}'
413             HashEntry_218 => 'RPerl::DataStructure::Hash::Entry', # HashEntry -> VarOrLitOrOpStrOrWord OP20_HASH_FATARROW OPTIONAL-55 SubExpression
414             HashEntry_219 => 'RPerl::Operation::Expression::SubExpression::HashDereference', # HashEntry -> HashDereference
415             HashEntry_220 => 'RPerl::DataStructure::Hash::Entry', # HashEntry -> ENV
416             HashEntryProperties_221 => 'RPerl::NonGenerator', # HashEntryProperties -> OpStringOrWord OP20_HASH_FATARROW TypeInnerProperties
417             HashReference_225 => 'RPerl::DataStructure::Hash::Reference', # HashReference -> LBRACE HashEntry STAR-57 '}'
418             HashReference_226 => 'RPerl::DataStructure::Hash::Reference', # HashReference -> LBRACE '}'
419             HashDereference_229 => 'RPerl::Operation::Expression::SubExpression::HashDereference', # HashDereference -> '%{' Variable '}'
420             HashDereference_230 => 'RPerl::Operation::Expression::SubExpression::HashDereference', # HashDereference -> '%{' OPTIONAL-58 HashReference '}'
421             WordScoped_231 => 'RPerl::NonGenerator', # WordScoped -> WORD
422             WordScoped_232 => 'RPerl::NonGenerator', # WordScoped -> WORD_SCOPED
423             LoopLabel_233 => 'RPerl::NonGenerator', # LoopLabel -> WORD_UPPERCASE # RPerl::Operation::Statement -> LoopLabel COLON
424             Type_234 => 'RPerl::NonGenerator', # Type -> WORD
425             Type_235 => 'RPerl::NonGenerator', # Type -> WORD_SCOPED
426             Type_236 => 'RPerl::NonGenerator', # Type -> TYPE_INTEGER
427             TypeInner_237 => 'RPerl::DataType::TypeInner', # TypeInner -> MY Type '$TYPED_' OpStringOrWord OP19_VARIABLE_ASSIGN
428             TypeInnerProperties_238 => 'RPerl::NonGenerator', # TypeInnerProperties -> MY Type '$TYPED_' OpStringOrWord OP19_VARIABLE_ASSIGN SubExpression
429             TypeInnerProperties_239 => 'RPerl::NonGenerator', # TypeInnerProperties -> MY Type '$TYPED_' OpStringOrWord OP02_ARRAY_THINARROW SubExpression ']' OP19_VARIABLE_ASSIGN 'undef'
430             TypeInnerConstant_240 => 'RPerl::NonGenerator', # TypeInnerConstant -> MY Type '$TYPED_' WORD_UPPERCASE OP19_VARIABLE_ASSIGN
431             VariableOrLiteral_241 => 'RPerl::Operation::Expression::SubExpression::Variable', # VariableOrLiteral -> Variable
432             VariableOrLiteral_242 => 'RPerl::Operation::Expression::SubExpression::Literal', # VariableOrLiteral -> Literal
433             VarOrLitOrOpStrOrWord_243 => 'RPerl::Operation::Expression::SubExpression::Variable', # VarOrLitOrOpStrOrWord -> Variable
434             VarOrLitOrOpStrOrWord_244 => 'RPerl::Operation::Expression::SubExpression::Literal', # VarOrLitOrOpStrOrWord -> Literal
435             VarOrLitOrOpStrOrWord_245 => 'RPerl::NonGenerator', # VarOrLitOrOpStrOrWord -> OpStringOrWord
436             VariableSymbolOrSelf_246 => 'RPerl::NonGenerator', # VariableSymbolOrSelf -> VARIABLE_SYMBOL
437             VariableSymbolOrSelf_247 => 'RPerl::NonGenerator', # VariableSymbolOrSelf -> SELF
438             Literal_248 => 'RPerl::Operation::Expression::SubExpression::Literal::Number', # Literal -> LITERAL_NUMBER
439             Literal_249 => 'RPerl::Operation::Expression::SubExpression::Literal::String', # Literal -> LITERAL_STRING
440             OpNamedScolonOrSubExp_250 => 'RPerl::NonGenerator', # OpNamedScolonOrSubExp -> OP01_NAMED_SCOLON
441             OpNamedScolonOrSubExp_251 => 'RPerl::NonGenerator', # OpNamedScolonOrSubExp -> OP10_NAMED_UNARY_SCOLON
442             OpNamedScolonOrSubExp_252 => 'RPerl::NonGenerator', # OpNamedScolonOrSubExp -> SubExpression ';'
443             OpNamedScolonOrSubExpIn_253 => 'RPerl::NonGenerator', # OpNamedScolonOrSubExpIn -> OP01_NAMED_SCOLON
444             OpNamedScolonOrSubExpIn_254 => 'RPerl::NonGenerator', # OpNamedScolonOrSubExpIn -> OP10_NAMED_UNARY_SCOLON
445             OpNamedScolonOrSubExpIn_255 => 'RPerl::NonGenerator', # OpNamedScolonOrSubExpIn -> SubExpressionOrInput ';'
446             OpStringOrWord_256 => 'RPerl::NonGenerator', # OpStringOrWord -> OP24_LOGICAL_OR_XOR
447             OpStringOrWord_257 => 'RPerl::NonGenerator', # OpStringOrWord -> OP23_LOGICAL_AND
448             OpStringOrWord_258 => 'RPerl::NonGenerator', # OpStringOrWord -> OP22_LOGICAL_NEG
449             OpStringOrWord_259 => 'RPerl::NonGenerator', # OpStringOrWord -> OP19_LOOP_CONTROL_SCOLON
450             OpStringOrWord_260 => 'RPerl::NonGenerator', # OpStringOrWord -> OP19_LOOP_CONTROL
451             OpStringOrWord_261 => 'RPerl::NonGenerator', # OpStringOrWord -> OP12_COMPARE_EQ_NE
452             OpStringOrWord_262 => 'RPerl::NonGenerator', # OpStringOrWord -> OP11_COMPARE_LT_GT
453             OpStringOrWord_263 => 'RPerl::NonGenerator', # OpStringOrWord -> OP10_NAMED_UNARY
454             OpStringOrWord_264 => 'RPerl::NonGenerator', # OpStringOrWord -> OP08_MATH_ADD_SUB
455             OpStringOrWord_265 => 'RPerl::NonGenerator', # OpStringOrWord -> OP07_MATH_MULT_DIV_MOD
456             OpStringOrWord_266 => 'RPerl::NonGenerator', # OpStringOrWord -> OP07_STRING_REPEAT
457             OpStringOrWord_267 => 'RPerl::NonGenerator', # OpStringOrWord -> OP01_NAMED
458             OpStringOrWord_268 => 'RPerl::NonGenerator', # OpStringOrWord -> OP01_CLOSE
459             OpStringOrWord_269 => 'RPerl::NonGenerator', # OpStringOrWord -> OP01_OPEN
460             OpStringOrWord_270 => 'RPerl::NonGenerator', # OpStringOrWord -> OP01_NAMED_VOID
461             OpStringOrWord_271 => 'RPerl::NonGenerator', # OpStringOrWord -> OP01_PRINT
462             OpStringOrWord_272 => 'RPerl::NonGenerator', # OpStringOrWord -> WORD
463             };
464              
465             1;
466             }