line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Language::P::ParseTree; |
2
|
|
|
|
|
|
|
|
3
|
101
|
|
|
101
|
|
520
|
use strict; |
|
101
|
|
|
|
|
188
|
|
|
101
|
|
|
|
|
3653
|
|
4
|
101
|
|
|
101
|
|
508
|
use warnings; |
|
101
|
|
|
|
|
247
|
|
|
101
|
|
|
|
|
3053
|
|
5
|
101
|
|
|
101
|
|
519
|
use Exporter 'import'; |
|
101
|
|
|
|
|
954
|
|
|
101
|
|
|
|
|
3865
|
|
6
|
|
|
|
|
|
|
|
7
|
101
|
|
|
101
|
|
80514
|
use Language::P::Opcodes qw(:all); |
|
101
|
|
|
|
|
1929
|
|
|
101
|
|
|
|
|
162586
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT_OK = |
10
|
|
|
|
|
|
|
( qw(NUM_INTEGER NUM_FLOAT NUM_HEXADECIMAL NUM_OCTAL NUM_BINARY |
11
|
|
|
|
|
|
|
STRING_BARE CONST_STRING CONST_NUMBER |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
CXT_CALLER CXT_VOID CXT_SCALAR CXT_LIST CXT_LVALUE |
14
|
|
|
|
|
|
|
CXT_VIVIFY CXT_CALL_MASK |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
PROTO_DEFAULT PROTO_SCALAR PROTO_ARRAY PROTO_HASH PROTO_SUB |
17
|
|
|
|
|
|
|
PROTO_GLOB PROTO_BACKSLASH PROTO_BLOCK PROTO_AMPER PROTO_ANY |
18
|
|
|
|
|
|
|
PROTO_INDIROBJ PROTO_FILEHANDLE PROTO_MAKE_GLOB |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
FLAG_IMPLICITARGUMENTS FLAG_ERASEFRAME |
21
|
|
|
|
|
|
|
FLAG_RX_MULTI_LINE FLAG_RX_SINGLE_LINE FLAG_RX_CASE_INSENSITIVE |
22
|
|
|
|
|
|
|
FLAG_RX_FREE_FORMAT FLAG_RX_ONCE FLAG_RX_GLOBAL FLAG_RX_KEEP |
23
|
|
|
|
|
|
|
FLAG_RX_EVAL FLAG_RX_COMPLEMENT FLAG_RX_DELETE FLAG_RX_SQUEEZE |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
VALUE_SCALAR VALUE_ARRAY VALUE_HASH VALUE_SUB VALUE_GLOB VALUE_HANDLE |
26
|
|
|
|
|
|
|
VALUE_ARRAY_LENGTH |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
DECLARATION_MY DECLARATION_OUR DECLARATION_STATE |
29
|
|
|
|
|
|
|
DECLARATION_CLOSED_OVER |
30
|
|
|
|
|
|
|
%KEYWORD_TO_OP), @OPERATIONS ); |
31
|
|
|
|
|
|
|
our %EXPORT_TAGS = |
32
|
|
|
|
|
|
|
( all => \@EXPORT_OK, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
use constant |
36
|
|
|
|
|
|
|
{ # numeric/string constants |
37
|
101
|
|
|
|
|
175622
|
CONST_STRING => 1, |
38
|
|
|
|
|
|
|
CONST_NUMBER => 2, |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
STRING_BARE => 4, |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
NUM_INTEGER => 8, |
43
|
|
|
|
|
|
|
NUM_FLOAT => 16, |
44
|
|
|
|
|
|
|
NUM_HEXADECIMAL => 32, |
45
|
|
|
|
|
|
|
NUM_OCTAL => 64, |
46
|
|
|
|
|
|
|
NUM_BINARY => 128, |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# context |
49
|
|
|
|
|
|
|
CXT_CALLER => 1, |
50
|
|
|
|
|
|
|
CXT_VOID => 2, |
51
|
|
|
|
|
|
|
CXT_SCALAR => 4, |
52
|
|
|
|
|
|
|
CXT_LIST => 8, |
53
|
|
|
|
|
|
|
CXT_LVALUE => 16, |
54
|
|
|
|
|
|
|
CXT_VIVIFY => 32, |
55
|
|
|
|
|
|
|
CXT_CALL_MASK => 2|4|8, |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
PROTO_SCALAR => 1, |
58
|
|
|
|
|
|
|
PROTO_ARRAY => 2, |
59
|
|
|
|
|
|
|
PROTO_HASH => 4, |
60
|
|
|
|
|
|
|
PROTO_SUB => 8, |
61
|
|
|
|
|
|
|
PROTO_GLOB => 16, |
62
|
|
|
|
|
|
|
PROTO_ANY => 1|2|4|8|16, |
63
|
|
|
|
|
|
|
PROTO_BACKSLASH => 32, |
64
|
|
|
|
|
|
|
PROTO_BLOCK => 64, |
65
|
|
|
|
|
|
|
PROTO_AMPER => 128, |
66
|
|
|
|
|
|
|
PROTO_INDIROBJ => 256, |
67
|
|
|
|
|
|
|
PROTO_FILEHANDLE => 512, |
68
|
|
|
|
|
|
|
PROTO_MAKE_GLOB => 1024|16, |
69
|
|
|
|
|
|
|
PROTO_DEFAULT => [ -1, -1, 0, 2 ], |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# sigils, anonymous array/hash constructors, dereferences |
72
|
|
|
|
|
|
|
VALUE_SCALAR => 1, |
73
|
|
|
|
|
|
|
VALUE_ARRAY => 2, |
74
|
|
|
|
|
|
|
VALUE_HASH => 3, |
75
|
|
|
|
|
|
|
VALUE_SUB => 4, |
76
|
|
|
|
|
|
|
VALUE_GLOB => 5, |
77
|
|
|
|
|
|
|
VALUE_ARRAY_LENGTH => 6, |
78
|
|
|
|
|
|
|
VALUE_HANDLE => 7, |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
# function calls |
81
|
|
|
|
|
|
|
FLAG_IMPLICITARGUMENTS => 1, |
82
|
|
|
|
|
|
|
FLAG_ERASEFRAME => 2, |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
# regular expressions |
85
|
|
|
|
|
|
|
FLAG_RX_MULTI_LINE => 1, |
86
|
|
|
|
|
|
|
FLAG_RX_SINGLE_LINE => 2, |
87
|
|
|
|
|
|
|
FLAG_RX_CASE_INSENSITIVE => 4, |
88
|
|
|
|
|
|
|
FLAG_RX_FREE_FORMAT => 8, |
89
|
|
|
|
|
|
|
FLAG_RX_ONCE => 16, |
90
|
|
|
|
|
|
|
FLAG_RX_GLOBAL => 32, |
91
|
|
|
|
|
|
|
FLAG_RX_KEEP => 64, |
92
|
|
|
|
|
|
|
FLAG_RX_EVAL => 128, |
93
|
|
|
|
|
|
|
FLAG_RX_COMPLEMENT => 1, |
94
|
|
|
|
|
|
|
FLAG_RX_DELETE => 2, |
95
|
|
|
|
|
|
|
FLAG_RX_SQUEEZE => 4, |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
# declarations |
98
|
|
|
|
|
|
|
DECLARATION_MY => 1, |
99
|
|
|
|
|
|
|
DECLARATION_OUR => 2, |
100
|
|
|
|
|
|
|
DECLARATION_STATE => 4, |
101
|
|
|
|
|
|
|
DECLARATION_CLOSED_OVER => 8, |
102
|
|
|
|
|
|
|
DECLARATION_TYPE_MASK => 7, |
103
|
101
|
|
|
101
|
|
3817
|
}; |
|
101
|
|
|
|
|
194
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
my %prototype_bi = |
106
|
|
|
|
|
|
|
( OP_PRINT() => [ -1, -1, PROTO_FILEHANDLE, PROTO_ARRAY ], |
107
|
|
|
|
|
|
|
OP_DEFINED() => [ 0, 1, PROTO_AMPER, PROTO_AMPER|PROTO_ANY ], |
108
|
|
|
|
|
|
|
OP_RETURN() => [ -1, -1, 0, PROTO_ARRAY ], |
109
|
|
|
|
|
|
|
OP_UNDEF() => [ 0, 1, 0, PROTO_ANY ], |
110
|
|
|
|
|
|
|
OP_EVAL() => [ 0, 1, PROTO_BLOCK, PROTO_ANY ], |
111
|
|
|
|
|
|
|
OP_MAP() => [ 2, -1, PROTO_INDIROBJ, PROTO_ARRAY ], |
112
|
|
|
|
|
|
|
map { $_ => [ 0, 1, 0, PROTO_MAKE_GLOB ] } |
113
|
|
|
|
|
|
|
( OP_FT_EREADABLE, |
114
|
|
|
|
|
|
|
OP_FT_EWRITABLE, |
115
|
|
|
|
|
|
|
OP_FT_EEXECUTABLE, |
116
|
|
|
|
|
|
|
OP_FT_EOWNED, |
117
|
|
|
|
|
|
|
OP_FT_RREADABLE, |
118
|
|
|
|
|
|
|
OP_FT_RWRITABLE, |
119
|
|
|
|
|
|
|
OP_FT_REXECUTABLE, |
120
|
|
|
|
|
|
|
OP_FT_ROWNED, |
121
|
|
|
|
|
|
|
OP_FT_EXISTS, |
122
|
|
|
|
|
|
|
OP_FT_EMPTY, |
123
|
|
|
|
|
|
|
OP_FT_NONEMPTY, |
124
|
|
|
|
|
|
|
OP_FT_ISFILE, |
125
|
|
|
|
|
|
|
OP_FT_ISDIR, |
126
|
|
|
|
|
|
|
OP_FT_ISSYMLINK, |
127
|
|
|
|
|
|
|
OP_FT_ISPIPE, |
128
|
|
|
|
|
|
|
OP_FT_ISSOCKET, |
129
|
|
|
|
|
|
|
OP_FT_ISBLOCKSPECIAL, |
130
|
|
|
|
|
|
|
OP_FT_ISCHARSPECIAL, |
131
|
|
|
|
|
|
|
OP_FT_ISTTY, |
132
|
|
|
|
|
|
|
OP_FT_SETUID, |
133
|
|
|
|
|
|
|
OP_FT_SETGID, |
134
|
|
|
|
|
|
|
OP_FT_STICKY, |
135
|
|
|
|
|
|
|
OP_FT_ISASCII, |
136
|
|
|
|
|
|
|
OP_FT_ISBINARY, |
137
|
|
|
|
|
|
|
OP_FT_MTIME, |
138
|
|
|
|
|
|
|
OP_FT_ATIME, |
139
|
|
|
|
|
|
|
OP_FT_CTIME, |
140
|
|
|
|
|
|
|
) |
141
|
|
|
|
|
|
|
); |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
my %context_bi = |
144
|
|
|
|
|
|
|
( OP_DEFINED() => [ CXT_SCALAR ], |
145
|
|
|
|
|
|
|
OP_RETURN() => [ CXT_CALLER ], |
146
|
|
|
|
|
|
|
); |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
my %prototype_ov = |
149
|
|
|
|
|
|
|
( OP_UNLINK() => [ -1, -1, 0, PROTO_ARRAY ], |
150
|
|
|
|
|
|
|
OP_DIE() => [ -1, -1, 0, PROTO_ARRAY ], |
151
|
|
|
|
|
|
|
OP_OPEN() => [ 1, -1, 0, PROTO_MAKE_GLOB, PROTO_SCALAR, PROTO_ARRAY ], |
152
|
|
|
|
|
|
|
OP_PIPE() => [ 2, 2, 0, PROTO_MAKE_GLOB, PROTO_MAKE_GLOB ], |
153
|
|
|
|
|
|
|
OP_CHDIR() => [ 0, 1, 0, PROTO_SCALAR ], |
154
|
|
|
|
|
|
|
OP_RMDIR() => [ 0, 1, 0, PROTO_SCALAR ], |
155
|
|
|
|
|
|
|
OP_READLINE() => [ 0, 1, 0, PROTO_SCALAR ], |
156
|
|
|
|
|
|
|
OP_GLOB() => [ -1, -1, 0, PROTO_ARRAY ], |
157
|
|
|
|
|
|
|
OP_CLOSE() => [ 0, 1, 0, PROTO_MAKE_GLOB ], |
158
|
|
|
|
|
|
|
OP_BINMODE() => [ 0, 2, 0, PROTO_MAKE_GLOB, PROTO_SCALAR ], |
159
|
|
|
|
|
|
|
OP_ABS() => [ 0, 1, 0, PROTO_SCALAR ], |
160
|
|
|
|
|
|
|
OP_WANTARRAY() => [ 0, 0, 0 ], |
161
|
|
|
|
|
|
|
); |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
my %context_ov = |
164
|
|
|
|
|
|
|
( |
165
|
|
|
|
|
|
|
); |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
package Language::P::ParseTree::Node; |
168
|
|
|
|
|
|
|
|
169
|
101
|
|
|
101
|
|
737
|
use strict; |
|
101
|
|
|
|
|
190
|
|
|
101
|
|
|
|
|
4317
|
|
170
|
101
|
|
|
101
|
|
559
|
use warnings; |
|
101
|
|
|
|
|
195
|
|
|
101
|
|
|
|
|
4019
|
|
171
|
101
|
|
|
101
|
|
529
|
use base qw(Class::Accessor::Fast); |
|
101
|
|
|
|
|
175
|
|
|
101
|
|
|
|
|
11042
|
|
172
|
|
|
|
|
|
|
|
173
|
101
|
|
|
101
|
|
561
|
use Scalar::Util (); |
|
101
|
|
|
|
|
186
|
|
|
101
|
|
|
|
|
30012
|
|
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
sub new { |
176
|
1808
|
|
|
1808
|
|
3311
|
my( $class, $args ) = @_; |
177
|
1808
|
|
|
|
|
6956
|
my $self = $class->SUPER::new( $args ); |
178
|
|
|
|
|
|
|
|
179
|
1808
|
|
|
|
|
23228
|
$self->set_parent_for_all_childs; |
180
|
|
|
|
|
|
|
|
181
|
1808
|
|
|
|
|
8529
|
return $self; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
|
184
|
9
|
|
|
9
|
|
75
|
sub is_bareword { 0 } |
185
|
2
|
|
|
2
|
|
10
|
sub is_constant { 0 } |
186
|
112
|
|
|
112
|
|
1850
|
sub is_symbol { 0 } |
187
|
8
|
|
|
8
|
|
40
|
sub is_compound { 0 } |
188
|
67
|
|
|
67
|
|
201
|
sub is_loop { 0 } |
189
|
10
|
|
|
10
|
|
32
|
sub can_implicit_return { 1 } |
190
|
21
|
|
|
21
|
|
73
|
sub is_declaration { 0 } |
191
|
0
|
|
|
0
|
|
0
|
sub lvalue_context { Language::P::ParseTree::CXT_SCALAR } |
192
|
101
|
|
|
101
|
|
1982
|
sub parent { $_[0]->{parent} } |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub set_parent { |
195
|
1458
|
|
|
1458
|
|
2123
|
my( $self, $parent ) = @_; |
196
|
|
|
|
|
|
|
|
197
|
1458
|
|
|
|
|
2768
|
$_[0]->{parent} = $parent; |
198
|
1458
|
|
|
|
|
6865
|
Scalar::Util::weaken( $_[0]->{parent} ); |
199
|
|
|
|
|
|
|
} |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
sub _fields { |
202
|
101
|
|
|
101
|
|
584
|
no strict 'refs'; |
|
101
|
|
|
|
|
224
|
|
|
101
|
|
|
|
|
54921
|
|
203
|
8243
|
|
|
8243
|
|
8261
|
my @fields = @{$_[0] . '::FIELDS'}; |
|
8243
|
|
|
|
|
27423
|
|
204
|
|
|
|
|
|
|
|
205
|
8243
|
|
|
|
|
8111
|
foreach my $base ( reverse @{$_[0] . '::ISA'} ) { |
|
8243
|
|
|
|
|
24441
|
|
206
|
6404
|
|
|
|
|
10780
|
unshift @fields, _fields( $base ); |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
|
209
|
8243
|
|
|
|
|
20962
|
return @fields; |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
|
212
|
1839
|
|
|
1839
|
|
4819
|
sub fields { _fields( ref( $_[0] ) ) } |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
sub set_parent_for_all_childs { |
215
|
1839
|
|
|
1839
|
|
2547
|
my( $self ) = @_; |
216
|
|
|
|
|
|
|
|
217
|
1839
|
|
|
|
|
4759
|
foreach my $field ( $self->fields ) { |
218
|
4169
|
|
|
|
|
14928
|
my $v = $self->$field; |
219
|
4169
|
100
|
100
|
|
|
37859
|
next unless $v && ref( $v ); |
220
|
|
|
|
|
|
|
|
221
|
1271
|
100
|
|
|
|
3381
|
if( ref( $v ) eq 'ARRAY' ) { |
|
|
50
|
|
|
|
|
|
222
|
331
|
|
|
|
|
1645
|
$_->set_parent( $self ) foreach @$v; |
223
|
|
|
|
|
|
|
} elsif( ref( $v ) eq 'HASH' ) { |
224
|
0
|
|
|
|
|
0
|
die "No hash-ish field yet"; |
225
|
|
|
|
|
|
|
} else { |
226
|
|
|
|
|
|
|
# can only be a node |
227
|
940
|
|
|
|
|
2656
|
$v->set_parent( $self ); |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
|
232
|
1514
|
100
|
|
1514
|
|
12440
|
sub has_attribute { $_[0]->{attributes} && exists $_[0]->{attributes}->{$_[1]} } |
233
|
432
|
100
|
|
432
|
|
4167
|
sub get_attribute { $_[0]->{attributes} && $_[0]->{attributes}->{$_[1]} } |
234
|
0
|
|
|
0
|
|
0
|
sub get_attributes { $_[0]->{attributes} } |
235
|
|
|
|
|
|
|
sub set_attribute { |
236
|
1802
|
|
|
1802
|
|
2972
|
my( $self, $name, $value, $weak ) = @_; |
237
|
|
|
|
|
|
|
|
238
|
1802
|
|
|
|
|
5040
|
$self->{attributes}->{$name} = $value; |
239
|
1802
|
100
|
|
|
|
7322
|
Scalar::Util::weaken( $self->{attributes}->{$name} ) if $weak; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
package Language::P::ParseTree::Package; |
243
|
|
|
|
|
|
|
|
244
|
101
|
|
|
101
|
|
1825
|
use strict; |
|
101
|
|
|
|
|
193
|
|
|
101
|
|
|
|
|
4645
|
|
245
|
101
|
|
|
101
|
|
2007
|
use warnings; |
|
101
|
|
|
|
|
207
|
|
|
101
|
|
|
|
|
2975
|
|
246
|
101
|
|
|
101
|
|
455
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
147
|
|
|
101
|
|
|
|
|
76429
|
|
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
our @FIELDS = qw(name); |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
package Language::P::ParseTree::Empty; |
253
|
|
|
|
|
|
|
|
254
|
101
|
|
|
101
|
|
1039
|
use strict; |
|
101
|
|
|
|
|
195
|
|
|
101
|
|
|
|
|
3074
|
|
255
|
101
|
|
|
101
|
|
489
|
use warnings; |
|
101
|
|
|
|
|
172
|
|
|
101
|
|
|
|
|
3231
|
|
256
|
101
|
|
|
101
|
|
522
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
184
|
|
|
101
|
|
|
|
|
52853
|
|
257
|
|
|
|
|
|
|
|
258
|
0
|
|
|
0
|
|
0
|
sub can_implicit_return { 0 } |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
package Language::P::ParseTree::Constant; |
261
|
|
|
|
|
|
|
|
262
|
101
|
|
|
101
|
|
626
|
use strict; |
|
101
|
|
|
|
|
177
|
|
|
101
|
|
|
|
|
4206
|
|
263
|
101
|
|
|
101
|
|
512
|
use warnings; |
|
101
|
|
|
|
|
183
|
|
|
101
|
|
|
|
|
3656
|
|
264
|
101
|
|
|
101
|
|
636
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
176
|
|
|
101
|
|
|
|
|
69845
|
|
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
our @FIELDS = qw(value flags); |
267
|
|
|
|
|
|
|
|
268
|
153
|
|
|
153
|
|
617
|
sub is_constant { 1 } |
269
|
2
|
|
|
2
|
|
15
|
sub is_bareword { $_[0]->{flags} & Language::P::ParseTree::STRING_BARE } |
270
|
194
|
|
|
194
|
|
607
|
sub is_string { $_[0]->{flags} & Language::P::ParseTree::CONST_STRING } |
271
|
436
|
|
|
436
|
|
2027
|
sub is_number { $_[0]->{flags} & Language::P::ParseTree::CONST_NUMBER } |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
package Language::P::ParseTree::QuotedString; |
276
|
|
|
|
|
|
|
|
277
|
101
|
|
|
101
|
|
775
|
use strict; |
|
101
|
|
|
|
|
219
|
|
|
101
|
|
|
|
|
3217
|
|
278
|
101
|
|
|
101
|
|
530
|
use warnings; |
|
101
|
|
|
|
|
205
|
|
|
101
|
|
|
|
|
3380
|
|
279
|
101
|
|
|
101
|
|
521
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
182
|
|
|
101
|
|
|
|
|
54274
|
|
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
our @FIELDS = qw(components); |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
package Language::P::ParseTree::ReferenceConstructor; |
286
|
|
|
|
|
|
|
|
287
|
101
|
|
|
101
|
|
700
|
use strict; |
|
101
|
|
|
|
|
275
|
|
|
101
|
|
|
|
|
3149
|
|
288
|
101
|
|
|
101
|
|
704
|
use warnings; |
|
101
|
|
|
|
|
202
|
|
|
101
|
|
|
|
|
3843
|
|
289
|
101
|
|
|
101
|
|
536
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
189
|
|
|
101
|
|
|
|
|
73870
|
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
our @FIELDS = qw(expression type); |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
package Language::P::ParseTree::FunctionCall; |
296
|
|
|
|
|
|
|
|
297
|
101
|
|
|
101
|
|
867
|
use strict; |
|
101
|
|
|
|
|
187
|
|
|
101
|
|
|
|
|
3367
|
|
298
|
101
|
|
|
101
|
|
517
|
use warnings; |
|
101
|
|
|
|
|
282
|
|
|
101
|
|
|
|
|
3463
|
|
299
|
101
|
|
|
101
|
|
498
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
69351
|
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
our @FIELDS = qw(function arguments); |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
304
|
|
|
|
|
|
|
|
305
|
72
|
|
|
72
|
|
168
|
sub parsing_prototype { return Language::P::ParseTree::PROTO_DEFAULT } |
306
|
47
|
|
|
47
|
|
233
|
sub runtime_context { return undef } |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
package Language::P::ParseTree::SpecialFunctionCall; |
309
|
|
|
|
|
|
|
|
310
|
101
|
|
|
101
|
|
647
|
use strict; |
|
101
|
|
|
|
|
238
|
|
|
101
|
|
|
|
|
6861
|
|
311
|
101
|
|
|
101
|
|
656
|
use warnings; |
|
101
|
|
|
|
|
206
|
|
|
101
|
|
|
|
|
3192
|
|
312
|
101
|
|
|
101
|
|
538
|
use base qw(Language::P::ParseTree::FunctionCall); |
|
101
|
|
|
|
|
196
|
|
|
101
|
|
|
|
|
58935
|
|
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
our @FIELDS = qw(flags); |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
package Language::P::ParseTree::MethodCall; |
319
|
|
|
|
|
|
|
|
320
|
101
|
|
|
101
|
|
5702
|
use strict; |
|
101
|
|
|
|
|
218
|
|
|
101
|
|
|
|
|
4137
|
|
321
|
101
|
|
|
101
|
|
532
|
use warnings; |
|
101
|
|
|
|
|
296
|
|
|
101
|
|
|
|
|
3384
|
|
322
|
101
|
|
|
101
|
|
669
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
199
|
|
|
101
|
|
|
|
|
61825
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
our @FIELDS = qw(invocant method arguments indirect); |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
package Language::P::ParseTree::Identifier; |
329
|
|
|
|
|
|
|
|
330
|
101
|
|
|
101
|
|
679
|
use strict; |
|
101
|
|
|
|
|
194
|
|
|
101
|
|
|
|
|
3053
|
|
331
|
101
|
|
|
101
|
|
554
|
use warnings; |
|
101
|
|
|
|
|
380
|
|
|
101
|
|
|
|
|
3598
|
|
332
|
101
|
|
|
101
|
|
525
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
184
|
|
|
101
|
|
|
|
|
65942
|
|
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
our @FIELDS = qw(name sigil); |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
337
|
|
|
|
|
|
|
|
338
|
11
|
|
|
11
|
|
66
|
sub is_symbol { 1 } |
339
|
|
|
|
|
|
|
sub lvalue_context { |
340
|
132
|
|
|
132
|
|
791
|
my( $self ) = @_; |
341
|
|
|
|
|
|
|
|
342
|
132
|
100
|
66
|
|
|
357
|
return $self->sigil == Language::P::ParseTree::VALUE_HASH |
343
|
|
|
|
|
|
|
|| $self->sigil == Language::P::ParseTree::VALUE_ARRAY ? |
344
|
|
|
|
|
|
|
Language::P::ParseTree::CXT_LIST : |
345
|
|
|
|
|
|
|
Language::P::ParseTree::CXT_SCALAR; |
346
|
|
|
|
|
|
|
} |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
package Language::P::ParseTree::Symbol; |
349
|
|
|
|
|
|
|
|
350
|
101
|
|
|
101
|
|
668
|
use strict; |
|
101
|
|
|
|
|
185
|
|
|
101
|
|
|
|
|
3525
|
|
351
|
101
|
|
|
101
|
|
516
|
use warnings; |
|
101
|
|
|
|
|
266
|
|
|
101
|
|
|
|
|
3204
|
|
352
|
101
|
|
|
101
|
|
524
|
use base qw(Language::P::ParseTree::Identifier); |
|
101
|
|
|
|
|
265
|
|
|
101
|
|
|
|
|
56479
|
|
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
package Language::P::ParseTree::LexicalSymbol; |
355
|
|
|
|
|
|
|
|
356
|
101
|
|
|
101
|
|
612
|
use strict; |
|
101
|
|
|
|
|
195
|
|
|
101
|
|
|
|
|
3073
|
|
357
|
101
|
|
|
101
|
|
512
|
use warnings; |
|
101
|
|
|
|
|
189
|
|
|
101
|
|
|
|
|
3284
|
|
358
|
101
|
|
|
101
|
|
494
|
use base qw(Language::P::ParseTree::Identifier); |
|
101
|
|
|
|
|
187
|
|
|
101
|
|
|
|
|
66481
|
|
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
our @FIELDS = qw(level); |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS, qw(declaration) ); |
363
|
|
|
|
|
|
|
|
364
|
63
|
|
|
63
|
|
343
|
sub sigil { $_[0]->declaration->sigil } |
365
|
22
|
|
|
22
|
|
102
|
sub name { $_[0]->declaration->name } |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
package Language::P::ParseTree::LexicalDeclaration; |
368
|
|
|
|
|
|
|
|
369
|
101
|
|
|
101
|
|
7157
|
use strict; |
|
101
|
|
|
|
|
254
|
|
|
101
|
|
|
|
|
3147
|
|
370
|
101
|
|
|
101
|
|
514
|
use warnings; |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
3854
|
|
371
|
101
|
|
|
101
|
|
515
|
use base qw(Language::P::ParseTree::Identifier); |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
73217
|
|
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
our @FIELDS = qw(flags); |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
376
|
|
|
|
|
|
|
|
377
|
0
|
|
|
0
|
|
0
|
sub level { 0 } |
378
|
48
|
|
|
48
|
|
328
|
sub symbol_name { return $_[0]->sigil . "\0" . $_[0]->name } |
379
|
0
|
|
|
0
|
|
0
|
sub declaration_type { $_[0]->{flags} & Language::P::ParseTree::DECLARATION_TYPE_MASK } |
380
|
123
|
|
|
123
|
|
681
|
sub closed_over { $_[0]->{flags} & Language::P::ParseTree::DECLARATION_CLOSED_OVER } |
381
|
5
|
|
|
5
|
|
18
|
sub set_closed_over { $_[0]->{flags} |= Language::P::ParseTree::DECLARATION_CLOSED_OVER } |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
package Language::P::ParseTree::Block; |
384
|
|
|
|
|
|
|
|
385
|
101
|
|
|
101
|
|
653
|
use strict; |
|
101
|
|
|
|
|
212
|
|
|
101
|
|
|
|
|
3497
|
|
386
|
101
|
|
|
101
|
|
567
|
use warnings; |
|
101
|
|
|
|
|
232
|
|
|
101
|
|
|
|
|
4185
|
|
387
|
101
|
|
|
101
|
|
542
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
189
|
|
|
101
|
|
|
|
|
70775
|
|
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
our @FIELDS = qw(lines); |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
392
|
|
|
|
|
|
|
|
393
|
3
|
|
|
3
|
|
9
|
sub is_compound { 1 } |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
package Language::P::ParseTree::BareBlock; |
396
|
|
|
|
|
|
|
|
397
|
101
|
|
|
101
|
|
748
|
use strict; |
|
101
|
|
|
|
|
299
|
|
|
101
|
|
|
|
|
3256
|
|
398
|
101
|
|
|
101
|
|
714
|
use warnings; |
|
101
|
|
|
|
|
398
|
|
|
101
|
|
|
|
|
4165
|
|
399
|
101
|
|
|
101
|
|
498
|
use base qw(Language::P::ParseTree::Block); |
|
101
|
|
|
|
|
283
|
|
|
101
|
|
|
|
|
62726
|
|
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
our @FIELDS = qw(continue); |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
404
|
|
|
|
|
|
|
|
405
|
5
|
|
|
5
|
|
15
|
sub is_loop { 1 } |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
package Language::P::ParseTree::Subroutine; |
408
|
|
|
|
|
|
|
|
409
|
101
|
|
|
101
|
|
758
|
use strict; |
|
101
|
|
|
|
|
224
|
|
|
101
|
|
|
|
|
3176
|
|
410
|
101
|
|
|
101
|
|
527
|
use warnings; |
|
101
|
|
|
|
|
198
|
|
|
101
|
|
|
|
|
6067
|
|
411
|
101
|
|
|
101
|
|
520
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
195
|
|
|
101
|
|
|
|
|
68984
|
|
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
our @FIELDS = qw(lines); |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
package Language::P::ParseTree::NamedSubroutine; |
418
|
|
|
|
|
|
|
|
419
|
101
|
|
|
101
|
|
617
|
use strict; |
|
101
|
|
|
|
|
209
|
|
|
101
|
|
|
|
|
4874
|
|
420
|
101
|
|
|
101
|
|
728
|
use warnings; |
|
101
|
|
|
|
|
208
|
|
|
101
|
|
|
|
|
3358
|
|
421
|
101
|
|
|
101
|
|
529
|
use base qw(Language::P::ParseTree::Subroutine); |
|
101
|
|
|
|
|
312
|
|
|
101
|
|
|
|
|
60389
|
|
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
our @FIELDS = qw(name); |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
426
|
|
|
|
|
|
|
|
427
|
0
|
|
|
0
|
|
0
|
sub is_declaration { 1 } |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
package Language::P::ParseTree::SubroutineDeclaration; |
430
|
|
|
|
|
|
|
|
431
|
101
|
|
|
101
|
|
670
|
use strict; |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
3505
|
|
432
|
101
|
|
|
101
|
|
548
|
use warnings; |
|
101
|
|
|
|
|
224
|
|
|
101
|
|
|
|
|
3284
|
|
433
|
101
|
|
|
101
|
|
611
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
246
|
|
|
101
|
|
|
|
|
63716
|
|
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
our @FIELDS = qw(name); |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
438
|
|
|
|
|
|
|
|
439
|
0
|
|
|
0
|
|
0
|
sub is_declaration { 1 } |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
package Language::P::ParseTree::AnonymousSubroutine; |
442
|
|
|
|
|
|
|
|
443
|
101
|
|
|
101
|
|
630
|
use strict; |
|
101
|
|
|
|
|
262
|
|
|
101
|
|
|
|
|
3196
|
|
444
|
101
|
|
|
101
|
|
495
|
use warnings; |
|
101
|
|
|
|
|
242
|
|
|
101
|
|
|
|
|
3473
|
|
445
|
101
|
|
|
101
|
|
515
|
use base qw(Language::P::ParseTree::Subroutine); |
|
101
|
|
|
|
|
231
|
|
|
101
|
|
|
|
|
56687
|
|
446
|
|
|
|
|
|
|
|
447
|
4
|
|
|
4
|
|
13
|
sub name { undef } |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
package Language::P::ParseTree::BinOp; |
450
|
|
|
|
|
|
|
|
451
|
101
|
|
|
101
|
|
640
|
use strict; |
|
101
|
|
|
|
|
195
|
|
|
101
|
|
|
|
|
7816
|
|
452
|
101
|
|
|
101
|
|
571
|
use warnings; |
|
101
|
|
|
|
|
244
|
|
|
101
|
|
|
|
|
3277
|
|
453
|
101
|
|
|
101
|
|
685
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
234
|
|
|
101
|
|
|
|
|
69221
|
|
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
our @FIELDS = qw(op left right); |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
package Language::P::ParseTree::UnOp; |
460
|
|
|
|
|
|
|
|
461
|
101
|
|
|
101
|
|
993
|
use strict; |
|
101
|
|
|
|
|
221
|
|
|
101
|
|
|
|
|
3868
|
|
462
|
101
|
|
|
101
|
|
508
|
use warnings; |
|
101
|
|
|
|
|
169
|
|
|
101
|
|
|
|
|
3735
|
|
463
|
101
|
|
|
101
|
|
592
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
202
|
|
|
101
|
|
|
|
|
62411
|
|
464
|
|
|
|
|
|
|
|
465
|
|
|
|
|
|
|
our @FIELDS = qw(op left); |
466
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
package Language::P::ParseTree::Parentheses; |
470
|
|
|
|
|
|
|
|
471
|
101
|
|
|
101
|
|
797
|
use strict; |
|
101
|
|
|
|
|
394
|
|
|
101
|
|
|
|
|
3466
|
|
472
|
101
|
|
|
101
|
|
572
|
use warnings; |
|
101
|
|
|
|
|
219
|
|
|
101
|
|
|
|
|
3380
|
|
473
|
101
|
|
|
101
|
|
526
|
use base qw(Language::P::ParseTree::UnOp); |
|
101
|
|
|
|
|
211
|
|
|
101
|
|
|
|
|
60978
|
|
474
|
|
|
|
|
|
|
|
475
|
9
|
|
|
9
|
|
26
|
sub op { Language::P::ParseTree::OP_PARENTHESES } |
476
|
0
|
|
|
0
|
|
0
|
sub lvalue_context { Language::P::ParseTree::CXT_LIST } |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
package Language::P::ParseTree::Local; |
479
|
|
|
|
|
|
|
|
480
|
101
|
|
|
101
|
|
628
|
use strict; |
|
101
|
|
|
|
|
2272
|
|
|
101
|
|
|
|
|
4026
|
|
481
|
101
|
|
|
101
|
|
680
|
use warnings; |
|
101
|
|
|
|
|
207
|
|
|
101
|
|
|
|
|
4106
|
|
482
|
101
|
|
|
101
|
|
542
|
use base qw(Language::P::ParseTree::UnOp); |
|
101
|
|
|
|
|
205
|
|
|
101
|
|
|
|
|
67709
|
|
483
|
|
|
|
|
|
|
|
484
|
14
|
|
|
14
|
|
44
|
sub op { Language::P::ParseTree::OP_LOCAL } |
485
|
14
|
|
|
14
|
|
94
|
sub lvalue_context { $_[0]->left->lvalue_context } |
486
|
|
|
|
|
|
|
|
487
|
|
|
|
|
|
|
package Language::P::ParseTree::Jump; |
488
|
|
|
|
|
|
|
|
489
|
101
|
|
|
101
|
|
1473
|
use strict; |
|
101
|
|
|
|
|
252
|
|
|
101
|
|
|
|
|
3264
|
|
490
|
101
|
|
|
101
|
|
722
|
use warnings; |
|
101
|
|
|
|
|
236
|
|
|
101
|
|
|
|
|
8614
|
|
491
|
101
|
|
|
101
|
|
2342
|
use base qw(Language::P::ParseTree::UnOp); |
|
101
|
|
|
|
|
229
|
|
|
101
|
|
|
|
|
74213
|
|
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
package Language::P::ParseTree::Dereference; |
494
|
|
|
|
|
|
|
|
495
|
101
|
|
|
101
|
|
665
|
use strict; |
|
101
|
|
|
|
|
197
|
|
|
101
|
|
|
|
|
3652
|
|
496
|
101
|
|
|
101
|
|
574
|
use warnings; |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
5003
|
|
497
|
101
|
|
|
101
|
|
494
|
use base qw(Language::P::ParseTree::UnOp); |
|
101
|
|
|
|
|
1609
|
|
|
101
|
|
|
|
|
64278
|
|
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
package Language::P::ParseTree::List; |
500
|
|
|
|
|
|
|
|
501
|
101
|
|
|
101
|
|
637
|
use strict; |
|
101
|
|
|
|
|
216
|
|
|
101
|
|
|
|
|
3776
|
|
502
|
101
|
|
|
101
|
|
525
|
use warnings; |
|
101
|
|
|
|
|
191
|
|
|
101
|
|
|
|
|
3679
|
|
503
|
101
|
|
|
101
|
|
540
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
220
|
|
|
101
|
|
|
|
|
62750
|
|
504
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
our @FIELDS = qw(expressions); |
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
508
|
|
|
|
|
|
|
|
509
|
6
|
|
|
6
|
|
43
|
sub lvalue_context { Language::P::ParseTree::CXT_LIST } |
510
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
package Language::P::ParseTree::Slice; |
512
|
|
|
|
|
|
|
|
513
|
101
|
|
|
101
|
|
657
|
use strict; |
|
101
|
|
|
|
|
200
|
|
|
101
|
|
|
|
|
3921
|
|
514
|
101
|
|
|
101
|
|
553
|
use warnings; |
|
101
|
|
|
|
|
197
|
|
|
101
|
|
|
|
|
3879
|
|
515
|
101
|
|
|
101
|
|
606
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
203
|
|
|
101
|
|
|
|
|
63870
|
|
516
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
our @FIELDS = qw(subscripted subscript type reference); |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
520
|
|
|
|
|
|
|
|
521
|
0
|
|
|
0
|
|
0
|
sub lvalue_context { Language::P::ParseTree::CXT_LIST } |
522
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
package Language::P::ParseTree::Subscript; |
524
|
|
|
|
|
|
|
|
525
|
101
|
|
|
101
|
|
623
|
use strict; |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
3225
|
|
526
|
101
|
|
|
101
|
|
541
|
use warnings; |
|
101
|
|
|
|
|
294
|
|
|
101
|
|
|
|
|
3762
|
|
527
|
101
|
|
|
101
|
|
591
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
1588
|
|
|
101
|
|
|
|
|
58442
|
|
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
our @FIELDS = qw(subscripted subscript type reference); |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
package Language::P::ParseTree::Conditional; |
534
|
|
|
|
|
|
|
|
535
|
101
|
|
|
101
|
|
613
|
use strict; |
|
101
|
|
|
|
|
189
|
|
|
101
|
|
|
|
|
3673
|
|
536
|
101
|
|
|
101
|
|
624
|
use warnings; |
|
101
|
|
|
|
|
184
|
|
|
101
|
|
|
|
|
3519
|
|
537
|
101
|
|
|
101
|
|
549
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
195
|
|
|
101
|
|
|
|
|
65568
|
|
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
our @FIELDS = qw(iftrues iffalse); |
540
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
542
|
|
|
|
|
|
|
|
543
|
1
|
|
|
1
|
|
5
|
sub is_compound { 1 } |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
package Language::P::ParseTree::ConditionalBlock; |
546
|
|
|
|
|
|
|
|
547
|
101
|
|
|
101
|
|
643
|
use strict; |
|
101
|
|
|
|
|
219
|
|
|
101
|
|
|
|
|
3757
|
|
548
|
101
|
|
|
101
|
|
549
|
use warnings; |
|
101
|
|
|
|
|
239
|
|
|
101
|
|
|
|
|
3746
|
|
549
|
101
|
|
|
101
|
|
556
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
224
|
|
|
101
|
|
|
|
|
54711
|
|
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
our @FIELDS = qw(condition block block_type); |
552
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
554
|
|
|
|
|
|
|
|
555
|
2
|
|
|
2
|
|
4
|
sub is_compound { 1 } |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
package Language::P::ParseTree::ConditionalLoop; |
558
|
|
|
|
|
|
|
|
559
|
101
|
|
|
101
|
|
768
|
use strict; |
|
101
|
|
|
|
|
201
|
|
|
101
|
|
|
|
|
3187
|
|
560
|
101
|
|
|
101
|
|
623
|
use warnings; |
|
101
|
|
|
|
|
228
|
|
|
101
|
|
|
|
|
4026
|
|
561
|
101
|
|
|
101
|
|
527
|
use base qw(Language::P::ParseTree::ConditionalBlock); |
|
101
|
|
|
|
|
199
|
|
|
101
|
|
|
|
|
68762
|
|
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
our @FIELDS = qw(continue); |
564
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
566
|
|
|
|
|
|
|
|
567
|
0
|
|
|
0
|
|
0
|
sub can_implicit_return { 0 } |
568
|
0
|
|
|
0
|
|
0
|
sub is_compound { 1 } |
569
|
9
|
|
|
9
|
|
23
|
sub is_loop { 1 } |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
package Language::P::ParseTree::For; |
572
|
|
|
|
|
|
|
|
573
|
101
|
|
|
101
|
|
664
|
use strict; |
|
101
|
|
|
|
|
226
|
|
|
101
|
|
|
|
|
3567
|
|
574
|
101
|
|
|
101
|
|
673
|
use warnings; |
|
101
|
|
|
|
|
226
|
|
|
101
|
|
|
|
|
3701
|
|
575
|
101
|
|
|
101
|
|
565
|
use base qw(Language::P::ParseTree::ConditionalLoop); |
|
101
|
|
|
|
|
266
|
|
|
101
|
|
|
|
|
69903
|
|
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
our @FIELDS = qw(initializer step); |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
580
|
|
|
|
|
|
|
|
581
|
0
|
|
|
0
|
|
0
|
sub is_compound { 1 } |
582
|
1
|
|
|
1
|
|
3
|
sub is_loop { 1 } |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
package Language::P::ParseTree::Foreach; |
585
|
|
|
|
|
|
|
|
586
|
101
|
|
|
101
|
|
663
|
use strict; |
|
101
|
|
|
|
|
221
|
|
|
101
|
|
|
|
|
3269
|
|
587
|
101
|
|
|
101
|
|
520
|
use warnings; |
|
101
|
|
|
|
|
192
|
|
|
101
|
|
|
|
|
3302
|
|
588
|
101
|
|
|
101
|
|
490
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
185
|
|
|
101
|
|
|
|
|
66508
|
|
589
|
|
|
|
|
|
|
|
590
|
|
|
|
|
|
|
our @FIELDS = qw(expression block variable continue); |
591
|
|
|
|
|
|
|
|
592
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
593
|
|
|
|
|
|
|
|
594
|
0
|
|
|
0
|
|
0
|
sub can_implicit_return { 0 } |
595
|
0
|
|
|
0
|
|
0
|
sub is_compound { 1 } |
596
|
2
|
|
|
2
|
|
7
|
sub is_loop { 1 } |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
package Language::P::ParseTree::Ternary; |
599
|
|
|
|
|
|
|
|
600
|
101
|
|
|
101
|
|
1701
|
use strict; |
|
101
|
|
|
|
|
220
|
|
|
101
|
|
|
|
|
3358
|
|
601
|
101
|
|
|
101
|
|
519
|
use warnings; |
|
101
|
|
|
|
|
268
|
|
|
101
|
|
|
|
|
3732
|
|
602
|
101
|
|
|
101
|
|
550
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
188
|
|
|
101
|
|
|
|
|
66088
|
|
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
our @FIELDS = qw(condition iftrue iffalse); |
605
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
sub lvalue_context { |
609
|
0
|
|
|
0
|
|
0
|
my( $self ) = @_; |
610
|
0
|
|
|
|
|
0
|
my $l = $self->iftrue->lvalue_context; |
611
|
0
|
|
|
|
|
0
|
my $r = $self->iffalse->lvalue_context; |
612
|
|
|
|
|
|
|
|
613
|
0
|
0
|
|
|
|
0
|
Carp::confess( "Assigning to both scalar and array" ) unless $r == $l; |
614
|
|
|
|
|
|
|
|
615
|
0
|
|
|
|
|
0
|
return $r; |
616
|
|
|
|
|
|
|
} |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
package Language::P::ParseTree::Builtin; |
619
|
|
|
|
|
|
|
|
620
|
101
|
|
|
101
|
|
668
|
use strict; |
|
101
|
|
|
|
|
209
|
|
|
101
|
|
|
|
|
3301
|
|
621
|
101
|
|
|
101
|
|
598
|
use warnings; |
|
101
|
|
|
|
|
196
|
|
|
101
|
|
|
|
|
3721
|
|
622
|
101
|
|
|
101
|
|
524
|
use base qw(Language::P::ParseTree::FunctionCall); |
|
101
|
|
|
|
|
233
|
|
|
101
|
|
|
|
|
81019
|
|
623
|
|
|
|
|
|
|
|
624
|
280
|
|
|
280
|
|
1461
|
sub parsing_prototype { return $prototype_bi{$_[0]->function} } |
625
|
165
|
|
|
165
|
|
504
|
sub runtime_context { return $context_bi{$_[0]->function} } |
626
|
18
|
100
|
|
18
|
|
88
|
sub can_implicit_return { return $_[0]->function == Language::P::ParseTree::OP_RETURN ? 0 : 1 } |
627
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
package Language::P::ParseTree::BuiltinIndirect; |
629
|
|
|
|
|
|
|
|
630
|
101
|
|
|
101
|
|
720
|
use strict; |
|
101
|
|
|
|
|
200
|
|
|
101
|
|
|
|
|
3296
|
|
631
|
101
|
|
|
101
|
|
538
|
use warnings; |
|
101
|
|
|
|
|
189
|
|
|
101
|
|
|
|
|
4316
|
|
632
|
101
|
|
|
101
|
|
563
|
use base qw(Language::P::ParseTree::Builtin); |
|
101
|
|
|
|
|
236
|
|
|
101
|
|
|
|
|
73354
|
|
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
our @FIELDS = qw(indirect); |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
637
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
package Language::P::ParseTree::Overridable; |
639
|
|
|
|
|
|
|
|
640
|
101
|
|
|
101
|
|
702
|
use strict; |
|
101
|
|
|
|
|
217
|
|
|
101
|
|
|
|
|
3101
|
|
641
|
101
|
|
|
101
|
|
547
|
use warnings; |
|
101
|
|
|
|
|
225
|
|
|
101
|
|
|
|
|
3358
|
|
642
|
101
|
|
|
101
|
|
586
|
use base qw(Language::P::ParseTree::FunctionCall); |
|
101
|
|
|
|
|
228
|
|
|
101
|
|
|
|
|
70577
|
|
643
|
|
|
|
|
|
|
|
644
|
14
|
|
|
14
|
|
41
|
sub parsing_prototype { return $prototype_ov{$_[0]->function} } |
645
|
10
|
|
|
10
|
|
29
|
sub runtime_context { return $context_ov{$_[0]->function} } |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
package Language::P::ParseTree::Glob; |
648
|
|
|
|
|
|
|
|
649
|
101
|
|
|
101
|
|
895
|
use strict; |
|
101
|
|
|
|
|
298
|
|
|
101
|
|
|
|
|
3305
|
|
650
|
101
|
|
|
101
|
|
584
|
use warnings; |
|
101
|
|
|
|
|
209
|
|
|
101
|
|
|
|
|
3185
|
|
651
|
101
|
|
|
101
|
|
526
|
use base qw(Language::P::ParseTree::Overridable); |
|
101
|
|
|
|
|
282
|
|
|
101
|
|
|
|
|
71517
|
|
652
|
|
|
|
|
|
|
|
653
|
0
|
|
|
0
|
|
|
sub function { Language::P::ParseTree::OP_GLOB } |
654
|
|
|
|
|
|
|
|
655
|
|
|
|
|
|
|
package Language::P::ParseTree::InterpolatedPattern; |
656
|
|
|
|
|
|
|
|
657
|
101
|
|
|
101
|
|
634
|
use strict; |
|
101
|
|
|
|
|
205
|
|
|
101
|
|
|
|
|
3510
|
|
658
|
101
|
|
|
101
|
|
503
|
use warnings; |
|
101
|
|
|
|
|
208
|
|
|
101
|
|
|
|
|
3370
|
|
659
|
101
|
|
|
101
|
|
520
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
212
|
|
|
101
|
|
|
|
|
58833
|
|
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
our @FIELDS = qw(op string flags); |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
package Language::P::ParseTree::Pattern; |
666
|
|
|
|
|
|
|
|
667
|
101
|
|
|
101
|
|
1452
|
use strict; |
|
101
|
|
|
|
|
228
|
|
|
101
|
|
|
|
|
3339
|
|
668
|
101
|
|
|
101
|
|
676
|
use warnings; |
|
101
|
|
|
|
|
214
|
|
|
101
|
|
|
|
|
3289
|
|
669
|
101
|
|
|
101
|
|
763
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
226
|
|
|
101
|
|
|
|
|
53172
|
|
670
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
our @FIELDS = qw(op components flags); |
672
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
674
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
package Language::P::ParseTree::Substitution; |
676
|
|
|
|
|
|
|
|
677
|
101
|
|
|
101
|
|
632
|
use strict; |
|
101
|
|
|
|
|
365
|
|
|
101
|
|
|
|
|
3308
|
|
678
|
101
|
|
|
101
|
|
629
|
use warnings; |
|
101
|
|
|
|
|
236
|
|
|
101
|
|
|
|
|
3649
|
|
679
|
101
|
|
|
101
|
|
510
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
238
|
|
|
101
|
|
|
|
|
54419
|
|
680
|
|
|
|
|
|
|
|
681
|
|
|
|
|
|
|
our @FIELDS = qw(pattern replacement); |
682
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
684
|
|
|
|
|
|
|
|
685
|
|
|
|
|
|
|
package Language::P::ParseTree::RXGroup; |
686
|
|
|
|
|
|
|
|
687
|
101
|
|
|
101
|
|
657
|
use strict; |
|
101
|
|
|
|
|
213
|
|
|
101
|
|
|
|
|
3158
|
|
688
|
101
|
|
|
101
|
|
628
|
use warnings; |
|
101
|
|
|
|
|
204
|
|
|
101
|
|
|
|
|
3890
|
|
689
|
101
|
|
|
101
|
|
724
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
209
|
|
|
101
|
|
|
|
|
53396
|
|
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
our @FIELDS = qw(components capture); |
692
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
694
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
package Language::P::ParseTree::RXQuantifier; |
696
|
|
|
|
|
|
|
|
697
|
101
|
|
|
101
|
|
651
|
use strict; |
|
101
|
|
|
|
|
276
|
|
|
101
|
|
|
|
|
3712
|
|
698
|
101
|
|
|
101
|
|
1272
|
use warnings; |
|
101
|
|
|
|
|
196
|
|
|
101
|
|
|
|
|
5057
|
|
699
|
101
|
|
|
101
|
|
551
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
220
|
|
|
101
|
|
|
|
|
75919
|
|
700
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
our @FIELDS = qw(node min max greedy); |
702
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
704
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
package Language::P::ParseTree::RXAssertion; |
706
|
|
|
|
|
|
|
|
707
|
101
|
|
|
101
|
|
793
|
use strict; |
|
101
|
|
|
|
|
409
|
|
|
101
|
|
|
|
|
3406
|
|
708
|
101
|
|
|
101
|
|
576
|
use warnings; |
|
101
|
|
|
|
|
206
|
|
|
101
|
|
|
|
|
13159
|
|
709
|
101
|
|
|
101
|
|
525
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
228
|
|
|
101
|
|
|
|
|
61032
|
|
710
|
|
|
|
|
|
|
|
711
|
|
|
|
|
|
|
our @FIELDS = qw(type); |
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
714
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
package Language::P::ParseTree::RXClass; |
716
|
|
|
|
|
|
|
|
717
|
101
|
|
|
101
|
|
7245
|
use strict; |
|
101
|
|
|
|
|
222
|
|
|
101
|
|
|
|
|
3229
|
|
718
|
101
|
|
|
101
|
|
526
|
use warnings; |
|
101
|
|
|
|
|
179
|
|
|
101
|
|
|
|
|
3000
|
|
719
|
101
|
|
|
101
|
|
544
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
183
|
|
|
101
|
|
|
|
|
75075
|
|
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
our @FIELDS = qw(elements); |
722
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
package Language::P::ParseTree::RXSpecialClass; |
726
|
|
|
|
|
|
|
|
727
|
101
|
|
|
101
|
|
771
|
use strict; |
|
101
|
|
|
|
|
218
|
|
|
101
|
|
|
|
|
3534
|
|
728
|
101
|
|
|
101
|
|
516
|
use warnings; |
|
101
|
|
|
|
|
236
|
|
|
101
|
|
|
|
|
3567
|
|
729
|
101
|
|
|
101
|
|
503
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
187
|
|
|
101
|
|
|
|
|
54630
|
|
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
our @FIELDS = qw(type); |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
734
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
package Language::P::ParseTree::RXRange; |
736
|
|
|
|
|
|
|
|
737
|
101
|
|
|
101
|
|
624
|
use strict; |
|
101
|
|
|
|
|
198
|
|
|
101
|
|
|
|
|
3536
|
|
738
|
101
|
|
|
101
|
|
557
|
use warnings; |
|
101
|
|
|
|
|
215
|
|
|
101
|
|
|
|
|
9723
|
|
739
|
101
|
|
|
101
|
|
745
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
181
|
|
|
101
|
|
|
|
|
63409
|
|
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
our @FIELDS = qw(start end); |
742
|
|
|
|
|
|
|
|
743
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
744
|
|
|
|
|
|
|
|
745
|
|
|
|
|
|
|
package Language::P::ParseTree::RXAlternation; |
746
|
|
|
|
|
|
|
|
747
|
101
|
|
|
101
|
|
639
|
use strict; |
|
101
|
|
|
|
|
219
|
|
|
101
|
|
|
|
|
3701
|
|
748
|
101
|
|
|
101
|
|
503
|
use warnings; |
|
101
|
|
|
|
|
207
|
|
|
101
|
|
|
|
|
3321
|
|
749
|
101
|
|
|
101
|
|
490
|
use base qw(Language::P::ParseTree::Node); |
|
101
|
|
|
|
|
191
|
|
|
101
|
|
|
|
|
90148
|
|
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
our @FIELDS = qw(left right); |
752
|
|
|
|
|
|
|
|
753
|
|
|
|
|
|
|
__PACKAGE__->mk_ro_accessors( @FIELDS ); |
754
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
1; |