line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Do not edit this file - Generated by Perlito 7.0 |
2
|
31
|
|
|
31
|
|
604
|
use v5; |
|
31
|
|
|
|
|
129
|
|
|
31
|
|
|
|
|
1869
|
|
3
|
31
|
|
|
31
|
|
196
|
use utf8; |
|
31
|
|
|
|
|
69
|
|
|
31
|
|
|
|
|
325
|
|
4
|
31
|
|
|
31
|
|
974
|
use strict; |
|
31
|
|
|
|
|
67
|
|
|
31
|
|
|
|
|
1427
|
|
5
|
31
|
|
|
31
|
|
193
|
use warnings; |
|
31
|
|
|
|
|
471
|
|
|
31
|
|
|
|
|
1675
|
|
6
|
31
|
|
|
31
|
|
192
|
no warnings ('redefine', 'once', 'void', 'uninitialized', 'misc', 'recursion'); |
|
31
|
|
|
|
|
70
|
|
|
31
|
|
|
|
|
1838
|
|
7
|
31
|
|
|
31
|
|
198
|
use Perlito::Perl5::Runtime; |
|
31
|
|
|
|
|
66
|
|
|
31
|
|
|
|
|
1075
|
|
8
|
31
|
|
|
31
|
|
194
|
use Perlito::Perl5::Prelude; |
|
31
|
|
|
|
|
80
|
|
|
31
|
|
|
|
|
489624
|
|
9
|
|
|
|
|
|
|
our $MATCH = Perlito::Match->new(); |
10
|
|
|
|
|
|
|
{ |
11
|
|
|
|
|
|
|
package GLOBAL; |
12
|
|
|
|
|
|
|
sub new { shift; bless { @_ }, "GLOBAL" } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# use v6 |
15
|
|
|
|
|
|
|
; |
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
package Perlito::Grammar::Regex; |
18
|
0
|
|
|
0
|
0
|
0
|
sub new { shift; bless { @_ }, "Perlito::Grammar::Regex" } |
|
0
|
|
|
|
|
0
|
|
19
|
|
|
|
|
|
|
(my $Hash_rule_terms = bless {}, 'HASH'); |
20
|
|
|
|
|
|
|
sub ws { |
21
|
8
|
|
|
8
|
0
|
19
|
my $grammar = $_[0]; |
22
|
8
|
|
|
|
|
15
|
my $str = $_[1]; |
23
|
8
|
|
|
|
|
12
|
my $pos = $_[2]; |
24
|
8
|
|
|
|
|
11
|
(my $MATCH); |
25
|
8
|
|
|
|
|
36
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
26
|
8
|
|
|
|
|
16
|
(($MATCH)->{bool} = ((do { |
27
|
8
|
|
|
|
|
23
|
((my $pos1) = $MATCH->to()); |
28
|
8
|
|
|
|
|
16
|
(do { |
29
|
8
|
|
|
|
|
33
|
((my $m2) = Perlito::Grammar->ws($str, $MATCH->to())); |
30
|
8
|
50
|
|
|
|
25
|
if ($m2) { |
31
|
8
|
|
|
|
|
22
|
(($MATCH)->{to} = $m2->to()); |
32
|
8
|
|
|
|
|
28
|
1 |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
else { |
35
|
0
|
|
|
|
|
0
|
0 |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
}) |
38
|
|
|
|
|
|
|
}))); |
39
|
8
|
|
|
|
|
23
|
$MATCH |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
sub rule_ident { |
42
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
43
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
44
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
45
|
0
|
|
|
|
|
0
|
(my $MATCH); |
46
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
47
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
48
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
49
|
|
|
|
|
|
|
((do { |
50
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->full_ident($str, $MATCH->to())); |
51
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
52
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
53
|
0
|
|
|
|
|
0
|
1 |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else { |
56
|
0
|
|
|
|
|
0
|
0 |
57
|
|
|
|
|
|
|
} |
58
|
0
|
0
|
|
|
|
0
|
}) || (do { |
59
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
60
|
0
|
|
|
|
|
0
|
((do { |
61
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->digit($str, $MATCH->to())); |
62
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
63
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
64
|
0
|
|
|
|
|
0
|
($MATCH->{'digit'} = $m2); |
65
|
0
|
|
|
|
|
0
|
1 |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
else { |
68
|
0
|
|
|
|
|
0
|
0 |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
})) |
71
|
|
|
|
|
|
|
})) |
72
|
|
|
|
|
|
|
}))); |
73
|
0
|
|
|
|
|
0
|
$MATCH |
74
|
|
|
|
|
|
|
}; |
75
|
|
|
|
|
|
|
sub any { |
76
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
77
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
78
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
79
|
0
|
|
|
|
|
0
|
(my $MATCH); |
80
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
81
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
82
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
83
|
0
|
|
|
|
|
0
|
(do { |
84
|
0
|
0
|
|
|
|
0
|
(('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
85
|
|
|
|
|
|
|
}) |
86
|
|
|
|
|
|
|
}))); |
87
|
0
|
|
|
|
|
0
|
$MATCH |
88
|
|
|
|
|
|
|
}; |
89
|
|
|
|
|
|
|
sub literal { |
90
|
9
|
|
|
9
|
0
|
19
|
my $grammar = $_[0]; |
91
|
9
|
|
|
|
|
14
|
my $str = $_[1]; |
92
|
9
|
|
|
|
|
19
|
my $pos = $_[2]; |
93
|
9
|
|
|
|
|
12
|
(my $MATCH); |
94
|
9
|
|
|
|
|
104
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
95
|
9
|
|
|
|
|
15
|
(($MATCH)->{bool} = ((do { |
96
|
9
|
|
|
|
|
26
|
((my $pos1) = $MATCH->to()); |
97
|
9
|
|
|
|
|
14
|
(do { |
98
|
9
|
|
|
|
|
14
|
((my $last_match_null) = 0); |
99
|
9
|
|
|
|
|
27
|
((my $last_pos) = $MATCH->to()); |
100
|
9
|
|
66
|
|
|
14
|
for ( ; ((do { |
101
|
18
|
|
|
|
|
46
|
((my $pos1) = $MATCH->to()); |
102
|
|
|
|
|
|
|
((do { |
103
|
18
|
50
|
0
|
|
|
45
|
((((chr(92) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
|
|
|
33
|
|
|
|
|
104
|
18
|
50
|
|
|
|
24
|
}) || (do { |
105
|
18
|
|
|
|
|
31
|
(($MATCH)->{to} = $pos1); |
106
|
18
|
100
|
33
|
|
|
20
|
(((do { |
107
|
18
|
|
|
|
|
23
|
((my $tmp) = $MATCH); |
108
|
18
|
|
|
|
|
104
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
109
|
18
|
|
|
|
|
46
|
(($MATCH)->{bool} = (do { |
110
|
18
|
|
|
|
|
51
|
((my $pos1) = $MATCH->to()); |
111
|
18
|
|
|
|
|
22
|
(do { |
112
|
18
|
100
|
|
|
|
47
|
((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
113
|
|
|
|
|
|
|
}) |
114
|
|
|
|
|
|
|
})); |
115
|
18
|
|
|
|
|
52
|
(($tmp)->{bool} = !($MATCH)); |
116
|
18
|
|
|
|
|
34
|
($MATCH = $tmp); |
117
|
18
|
|
|
|
|
61
|
!!($MATCH) |
118
|
|
|
|
|
|
|
}) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
119
|
|
|
|
|
|
|
})) |
120
|
|
|
|
|
|
|
}) && (($last_match_null < 2))); ) { |
121
|
9
|
50
|
|
|
|
35
|
if (($last_pos == $MATCH->to())) { |
122
|
0
|
|
|
|
|
0
|
($last_match_null = ($last_match_null + 1)) |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
else { |
125
|
9
|
|
|
|
|
16
|
($last_match_null = 0) |
126
|
|
|
|
|
|
|
}; |
127
|
9
|
|
|
|
|
29
|
($last_pos = $MATCH->to()) |
128
|
|
|
|
|
|
|
}; |
129
|
9
|
|
|
|
|
22
|
(($MATCH)->{to} = $last_pos); |
130
|
9
|
|
|
|
|
19
|
1 |
131
|
|
|
|
|
|
|
}) |
132
|
|
|
|
|
|
|
}))); |
133
|
9
|
|
|
|
|
43
|
$MATCH |
134
|
|
|
|
|
|
|
}; |
135
|
|
|
|
|
|
|
sub metasyntax_exp { |
136
|
2
|
|
|
2
|
0
|
6
|
my $grammar = $_[0]; |
137
|
2
|
|
|
|
|
6
|
my $str = $_[1]; |
138
|
2
|
|
|
|
|
3
|
my $pos = $_[2]; |
139
|
2
|
|
|
|
|
4
|
(my $MATCH); |
140
|
2
|
|
|
|
|
10
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
141
|
2
|
|
|
|
|
4
|
(($MATCH)->{bool} = ((do { |
142
|
2
|
|
|
|
|
7
|
((my $pos1) = $MATCH->to()); |
143
|
2
|
|
|
|
|
4
|
(do { |
144
|
2
|
|
|
|
|
4
|
((my $last_match_null) = 0); |
145
|
2
|
|
|
|
|
7
|
((my $last_pos) = $MATCH->to()); |
146
|
2
|
|
|
|
|
5
|
((my $count) = 0); |
147
|
2
|
|
66
|
|
|
3
|
for ( ; ((do { |
148
|
13
|
|
|
|
|
32
|
((my $pos1) = $MATCH->to()); |
149
|
|
|
|
|
|
|
(((((do { |
150
|
13
|
50
|
0
|
|
|
32
|
((((chr(92) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
|
|
|
33
|
|
|
|
|
151
|
|
|
|
|
|
|
}) || (do { |
152
|
13
|
|
|
|
|
25
|
(($MATCH)->{to} = $pos1); |
153
|
13
|
0
|
0
|
|
|
37
|
((((((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
154
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->literal($str, $MATCH->to())); |
155
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
156
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
157
|
0
|
|
|
|
|
0
|
1 |
158
|
|
|
|
|
|
|
} |
159
|
|
|
|
|
|
|
else { |
160
|
0
|
|
|
|
|
0
|
0 |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
163
|
|
|
|
|
|
|
})) || (do { |
164
|
13
|
|
|
|
|
24
|
(($MATCH)->{to} = $pos1); |
165
|
13
|
0
|
0
|
|
|
31
|
((((((chr(123) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
166
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->string_code($str, $MATCH->to())); |
167
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
168
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
169
|
0
|
|
|
|
|
0
|
1 |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
else { |
172
|
0
|
|
|
|
|
0
|
0 |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
})) && (((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
175
|
|
|
|
|
|
|
})) || (do { |
176
|
13
|
|
|
|
|
24
|
(($MATCH)->{to} = $pos1); |
177
|
13
|
0
|
0
|
|
|
32
|
(((((('<' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
178
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
179
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
180
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
181
|
0
|
|
|
|
|
0
|
1 |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
else { |
184
|
0
|
|
|
|
|
0
|
0 |
185
|
|
|
|
|
|
|
} |
186
|
|
|
|
|
|
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
187
|
13
|
50
|
33
|
|
|
17
|
})) || (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
188
|
13
|
|
|
|
|
26
|
(($MATCH)->{to} = $pos1); |
189
|
13
|
100
|
33
|
|
|
16
|
(((do { |
190
|
13
|
|
|
|
|
17
|
((my $tmp) = $MATCH); |
191
|
13
|
|
|
|
|
33
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
192
|
13
|
|
|
|
|
22
|
(($MATCH)->{bool} = (do { |
193
|
13
|
|
|
|
|
31
|
((my $pos1) = $MATCH->to()); |
194
|
13
|
|
|
|
|
16
|
(do { |
195
|
13
|
100
|
|
|
|
35
|
(('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
196
|
|
|
|
|
|
|
}) |
197
|
|
|
|
|
|
|
})); |
198
|
13
|
|
|
|
|
35
|
(($tmp)->{bool} = !($MATCH)); |
199
|
13
|
|
|
|
|
25
|
($MATCH = $tmp); |
200
|
13
|
|
|
|
|
42
|
!!($MATCH) |
201
|
|
|
|
|
|
|
}) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
202
|
|
|
|
|
|
|
})) |
203
|
|
|
|
|
|
|
}) && (($last_match_null < 2))); ) { |
204
|
11
|
50
|
|
|
|
42
|
if (($last_pos == $MATCH->to())) { |
205
|
0
|
|
|
|
|
0
|
($last_match_null = ($last_match_null + 1)) |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
else { |
208
|
11
|
|
|
|
|
12
|
($last_match_null = 0) |
209
|
|
|
|
|
|
|
}; |
210
|
11
|
|
|
|
|
33
|
($last_pos = $MATCH->to()); |
211
|
11
|
|
|
|
|
18
|
($count = ($count + 1)) |
212
|
|
|
|
|
|
|
}; |
213
|
2
|
|
|
|
|
7
|
(($MATCH)->{to} = $last_pos); |
214
|
2
|
|
|
|
|
6
|
($count > 0) |
215
|
|
|
|
|
|
|
}) |
216
|
|
|
|
|
|
|
}))); |
217
|
2
|
|
|
|
|
6
|
$MATCH |
218
|
|
|
|
|
|
|
}; |
219
|
|
|
|
|
|
|
sub char_range { |
220
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
221
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
222
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
223
|
0
|
|
|
|
|
0
|
(my $MATCH); |
224
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
225
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
226
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
227
|
0
|
|
|
|
|
0
|
(do { |
228
|
0
|
|
|
|
|
0
|
((my $last_match_null) = 0); |
229
|
0
|
|
|
|
|
0
|
((my $last_pos) = $MATCH->to()); |
230
|
0
|
|
|
|
|
0
|
((my $count) = 0); |
231
|
0
|
|
0
|
|
|
0
|
for ( ; ((do { |
232
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
233
|
|
|
|
|
|
|
((do { |
234
|
0
|
0
|
0
|
|
|
0
|
((((chr(92) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
|
|
|
0
|
|
|
|
|
235
|
0
|
0
|
|
|
|
0
|
}) || (do { |
236
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
237
|
0
|
0
|
0
|
|
|
0
|
(((do { |
238
|
0
|
|
|
|
|
0
|
((my $tmp) = $MATCH); |
239
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
240
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = (do { |
241
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
242
|
0
|
|
|
|
|
0
|
(do { |
243
|
0
|
0
|
|
|
|
0
|
((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
244
|
|
|
|
|
|
|
}) |
245
|
|
|
|
|
|
|
})); |
246
|
0
|
|
|
|
|
0
|
(($tmp)->{bool} = !($MATCH)); |
247
|
0
|
|
|
|
|
0
|
($MATCH = $tmp); |
248
|
0
|
|
|
|
|
0
|
!!($MATCH) |
249
|
|
|
|
|
|
|
}) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
250
|
|
|
|
|
|
|
})) |
251
|
|
|
|
|
|
|
}) && (($last_match_null < 2))); ) { |
252
|
0
|
0
|
|
|
|
0
|
if (($last_pos == $MATCH->to())) { |
253
|
0
|
|
|
|
|
0
|
($last_match_null = ($last_match_null + 1)) |
254
|
|
|
|
|
|
|
} |
255
|
|
|
|
|
|
|
else { |
256
|
0
|
|
|
|
|
0
|
($last_match_null = 0) |
257
|
|
|
|
|
|
|
}; |
258
|
0
|
|
|
|
|
0
|
($last_pos = $MATCH->to()); |
259
|
0
|
|
|
|
|
0
|
($count = ($count + 1)) |
260
|
|
|
|
|
|
|
}; |
261
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $last_pos); |
262
|
0
|
|
|
|
|
0
|
($count > 0) |
263
|
|
|
|
|
|
|
}) |
264
|
|
|
|
|
|
|
}))); |
265
|
0
|
|
|
|
|
0
|
$MATCH |
266
|
|
|
|
|
|
|
}; |
267
|
|
|
|
|
|
|
sub char_class { |
268
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
269
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
270
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
271
|
0
|
|
|
|
|
0
|
(my $MATCH); |
272
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
273
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
274
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
275
|
|
|
|
|
|
|
((do { |
276
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule_ident($str, $MATCH->to())); |
277
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
278
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
279
|
0
|
|
|
|
|
0
|
1 |
280
|
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
else { |
282
|
0
|
|
|
|
|
0
|
0 |
283
|
|
|
|
|
|
|
} |
284
|
0
|
0
|
|
|
|
0
|
}) || (do { |
285
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
286
|
0
|
0
|
0
|
|
|
0
|
(((((('[' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
287
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->char_range($str, $MATCH->to())); |
288
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
289
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
290
|
0
|
|
|
|
|
0
|
1 |
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
else { |
293
|
0
|
|
|
|
|
0
|
0 |
294
|
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
})) && (((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
296
|
|
|
|
|
|
|
})) |
297
|
|
|
|
|
|
|
}))); |
298
|
0
|
|
|
|
|
0
|
$MATCH |
299
|
|
|
|
|
|
|
}; |
300
|
|
|
|
|
|
|
sub string_code { |
301
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
302
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
303
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
304
|
0
|
|
|
|
|
0
|
(my $MATCH); |
305
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
306
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
307
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
308
|
0
|
|
|
|
|
0
|
(do { |
309
|
0
|
|
|
|
|
0
|
((my $last_match_null) = 0); |
310
|
0
|
|
|
|
|
0
|
((my $last_pos) = $MATCH->to()); |
311
|
0
|
|
|
|
|
0
|
((my $count) = 0); |
312
|
0
|
|
0
|
|
|
0
|
for ( ; ((do { |
313
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
314
|
|
|
|
|
|
|
((((do { |
315
|
0
|
0
|
0
|
|
|
0
|
((((chr(92) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
|
|
|
0
|
|
|
|
|
316
|
|
|
|
|
|
|
}) || (do { |
317
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
318
|
0
|
0
|
0
|
|
|
0
|
((((((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
319
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->literal($str, $MATCH->to())); |
320
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
321
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
322
|
0
|
|
|
|
|
0
|
1 |
323
|
|
|
|
|
|
|
} |
324
|
|
|
|
|
|
|
else { |
325
|
0
|
|
|
|
|
0
|
0 |
326
|
|
|
|
|
|
|
} |
327
|
|
|
|
|
|
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
328
|
|
|
|
|
|
|
})) || (do { |
329
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
330
|
0
|
0
|
0
|
|
|
0
|
((((((chr(123) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
331
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->string_code($str, $MATCH->to())); |
332
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
333
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
334
|
0
|
|
|
|
|
0
|
1 |
335
|
|
|
|
|
|
|
} |
336
|
|
|
|
|
|
|
else { |
337
|
0
|
|
|
|
|
0
|
0 |
338
|
|
|
|
|
|
|
} |
339
|
|
|
|
|
|
|
})) && (((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
340
|
0
|
0
|
0
|
|
|
0
|
})) || (do { |
|
|
|
0
|
|
|
|
|
341
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
342
|
0
|
0
|
0
|
|
|
0
|
(((do { |
343
|
0
|
|
|
|
|
0
|
((my $tmp) = $MATCH); |
344
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
345
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = (do { |
346
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
347
|
0
|
|
|
|
|
0
|
(do { |
348
|
0
|
0
|
|
|
|
0
|
((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
349
|
|
|
|
|
|
|
}) |
350
|
|
|
|
|
|
|
})); |
351
|
0
|
|
|
|
|
0
|
(($tmp)->{bool} = !($MATCH)); |
352
|
0
|
|
|
|
|
0
|
($MATCH = $tmp); |
353
|
0
|
|
|
|
|
0
|
!!($MATCH) |
354
|
|
|
|
|
|
|
}) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
355
|
|
|
|
|
|
|
})) |
356
|
|
|
|
|
|
|
}) && (($last_match_null < 2))); ) { |
357
|
0
|
0
|
|
|
|
0
|
if (($last_pos == $MATCH->to())) { |
358
|
0
|
|
|
|
|
0
|
($last_match_null = ($last_match_null + 1)) |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
else { |
361
|
0
|
|
|
|
|
0
|
($last_match_null = 0) |
362
|
|
|
|
|
|
|
}; |
363
|
0
|
|
|
|
|
0
|
($last_pos = $MATCH->to()); |
364
|
0
|
|
|
|
|
0
|
($count = ($count + 1)) |
365
|
|
|
|
|
|
|
}; |
366
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $last_pos); |
367
|
0
|
|
|
|
|
0
|
($count > 0) |
368
|
|
|
|
|
|
|
}) |
369
|
|
|
|
|
|
|
}))); |
370
|
0
|
|
|
|
|
0
|
$MATCH |
371
|
|
|
|
|
|
|
}; |
372
|
|
|
|
|
|
|
sub parsed_code { |
373
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
374
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
375
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
376
|
0
|
|
|
|
|
0
|
(my $MATCH); |
377
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
378
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
379
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
380
|
0
|
|
|
|
|
0
|
(do { |
381
|
|
|
|
|
|
|
((do { |
382
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->string_code($str, $MATCH->to())); |
383
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
384
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
385
|
0
|
|
|
|
|
0
|
1 |
386
|
|
|
|
|
|
|
} |
387
|
|
|
|
|
|
|
else { |
388
|
0
|
|
|
|
|
0
|
0 |
389
|
|
|
|
|
|
|
} |
390
|
0
|
0
|
0
|
|
|
0
|
}) && (((do { |
391
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = ("".($MATCH))) |
392
|
|
|
|
|
|
|
}) || 1))) |
393
|
|
|
|
|
|
|
}) |
394
|
|
|
|
|
|
|
}))); |
395
|
0
|
|
|
|
|
0
|
$MATCH |
396
|
|
|
|
|
|
|
}; |
397
|
|
|
|
|
|
|
sub named_capture_body { |
398
|
0
|
|
|
0
|
0
|
0
|
my $grammar = $_[0]; |
399
|
0
|
|
|
|
|
0
|
my $str = $_[1]; |
400
|
0
|
|
|
|
|
0
|
my $pos = $_[2]; |
401
|
0
|
|
|
|
|
0
|
(my $MATCH); |
402
|
0
|
|
|
|
|
0
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
403
|
0
|
|
|
|
|
0
|
(($MATCH)->{bool} = ((do { |
404
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
405
|
|
|
|
|
|
|
((((do { |
406
|
|
|
|
|
|
|
(((((('(' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
407
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
408
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
409
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
410
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
411
|
0
|
|
|
|
|
0
|
1 |
412
|
|
|
|
|
|
|
} |
413
|
|
|
|
|
|
|
else { |
414
|
0
|
|
|
|
|
0
|
0 |
415
|
|
|
|
|
|
|
} |
416
|
0
|
0
|
0
|
|
|
0
|
})) && (((')' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
417
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (do { |
418
|
0
|
|
|
|
|
0
|
(my $Hash_a = bless {}, 'HASH'); |
419
|
0
|
|
|
|
|
0
|
($Hash_a->{'capturing_group'} = ${$MATCH->{'rule'}}); |
|
0
|
|
|
|
|
0
|
|
420
|
0
|
|
|
|
|
0
|
$Hash_a |
421
|
|
|
|
|
|
|
})) |
422
|
|
|
|
|
|
|
}) || 1))) |
423
|
|
|
|
|
|
|
}) || (do { |
424
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
425
|
|
|
|
|
|
|
((((((('[' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
426
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
427
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
428
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
429
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
430
|
0
|
|
|
|
|
0
|
1 |
431
|
|
|
|
|
|
|
} |
432
|
|
|
|
|
|
|
else { |
433
|
0
|
|
|
|
|
0
|
0 |
434
|
|
|
|
|
|
|
} |
435
|
0
|
0
|
0
|
|
|
0
|
})) && (((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
436
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (${$MATCH->{'rule'}})) |
|
0
|
|
|
|
|
0
|
|
437
|
|
|
|
|
|
|
}) || 1)))) |
438
|
|
|
|
|
|
|
})) || (do { |
439
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
440
|
|
|
|
|
|
|
((((((('<' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
441
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
442
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
443
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
444
|
0
|
|
|
|
|
0
|
($MATCH->{'metasyntax_exp'} = $m2); |
445
|
0
|
|
|
|
|
0
|
1 |
446
|
|
|
|
|
|
|
} |
447
|
|
|
|
|
|
|
else { |
448
|
0
|
|
|
|
|
0
|
0 |
449
|
|
|
|
|
|
|
} |
450
|
0
|
0
|
0
|
|
|
0
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
451
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Subrule->new(('metasyntax' => ${$MATCH->{'metasyntax_exp'}}), ('captures' => 1)))) |
|
0
|
|
|
|
|
0
|
|
452
|
|
|
|
|
|
|
}) || 1)))) |
453
|
0
|
0
|
0
|
|
|
0
|
})) || (do { |
|
|
|
0
|
|
|
|
|
454
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
455
|
0
|
0
|
|
|
|
0
|
((((do { |
456
|
0
|
|
|
|
|
0
|
die('invalid alias syntax') |
457
|
|
|
|
|
|
|
}) || 1))) |
458
|
|
|
|
|
|
|
})) |
459
|
|
|
|
|
|
|
}))); |
460
|
0
|
|
|
|
|
0
|
$MATCH |
461
|
|
|
|
|
|
|
}; |
462
|
|
|
|
|
|
|
sub variables { |
463
|
32
|
|
|
32
|
0
|
57
|
my $grammar = $_[0]; |
464
|
32
|
|
|
|
|
40
|
my $str = $_[1]; |
465
|
32
|
|
|
|
|
40
|
my $pos = $_[2]; |
466
|
32
|
|
|
|
|
32
|
(my $MATCH); |
467
|
32
|
|
|
|
|
105
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
468
|
32
|
|
|
|
|
46
|
(($MATCH)->{bool} = ((do { |
469
|
32
|
|
|
|
|
123
|
((my $pos1) = $MATCH->to()); |
470
|
|
|
|
|
|
|
(((do { |
471
|
|
|
|
|
|
|
((((((chr(36) . '<' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
472
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule_ident($str, $MATCH->to())); |
473
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
474
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
475
|
0
|
|
|
|
|
0
|
($MATCH->{'rule_ident'} = $m2); |
476
|
0
|
|
|
|
|
0
|
1 |
477
|
|
|
|
|
|
|
} |
478
|
|
|
|
|
|
|
else { |
479
|
0
|
|
|
|
|
0
|
0 |
480
|
|
|
|
|
|
|
} |
481
|
32
|
0
|
0
|
|
|
79
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
482
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = ((chr(36) . chr(47) . chr(123) . chr(39) . $MATCH->{'rule_ident'} . chr(39) . chr(125)))) |
483
|
|
|
|
|
|
|
}) || 1))) |
484
|
|
|
|
|
|
|
}) || (do { |
485
|
32
|
|
|
|
|
54
|
(($MATCH)->{to} = $pos1); |
486
|
|
|
|
|
|
|
((((do { |
487
|
32
|
|
|
|
|
81
|
((my $m2) = Perlito::Grammar->var_sigil($str, $MATCH->to())); |
488
|
32
|
50
|
|
|
|
94
|
if ($m2) { |
489
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
490
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.var_sigil'} = $m2); |
491
|
0
|
|
|
|
|
0
|
1 |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
else { |
494
|
32
|
|
|
|
|
223
|
0 |
495
|
|
|
|
|
|
|
} |
496
|
|
|
|
|
|
|
}) && (do { |
497
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->val_int($str, $MATCH->to())); |
498
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
499
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
500
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.val_int'} = $m2); |
501
|
0
|
|
|
|
|
0
|
1 |
502
|
|
|
|
|
|
|
} |
503
|
|
|
|
|
|
|
else { |
504
|
0
|
|
|
|
|
0
|
0 |
505
|
|
|
|
|
|
|
} |
506
|
32
|
0
|
0
|
|
|
39
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
507
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (($MATCH->{'Perlito::Grammar.var_sigil'} . chr(47) . '[' . $MATCH->{'Perlito::Grammar.val_int'} . ']'))) |
508
|
|
|
|
|
|
|
}) || 1)))) |
509
|
32
|
50
|
33
|
|
|
45
|
})) || (do { |
510
|
32
|
|
|
|
|
57
|
(($MATCH)->{to} = $pos1); |
511
|
|
|
|
|
|
|
(((((do { |
512
|
32
|
|
|
|
|
98
|
((my $m2) = Perlito::Grammar->var_sigil($str, $MATCH->to())); |
513
|
32
|
50
|
|
|
|
96
|
if ($m2) { |
514
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
515
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.var_sigil'} = $m2); |
516
|
0
|
|
|
|
|
0
|
1 |
517
|
|
|
|
|
|
|
} |
518
|
|
|
|
|
|
|
else { |
519
|
32
|
|
|
|
|
149
|
0 |
520
|
|
|
|
|
|
|
} |
521
|
|
|
|
|
|
|
}) && (do { |
522
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->var_twigil($str, $MATCH->to())); |
523
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
524
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
525
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.var_twigil'} = $m2); |
526
|
0
|
|
|
|
|
0
|
1 |
527
|
|
|
|
|
|
|
} |
528
|
|
|
|
|
|
|
else { |
529
|
0
|
|
|
|
|
0
|
0 |
530
|
|
|
|
|
|
|
} |
531
|
|
|
|
|
|
|
})) && (do { |
532
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->full_ident($str, $MATCH->to())); |
533
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
534
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
535
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.full_ident'} = $m2); |
536
|
0
|
|
|
|
|
0
|
1 |
537
|
|
|
|
|
|
|
} |
538
|
|
|
|
|
|
|
else { |
539
|
0
|
|
|
|
|
0
|
0 |
540
|
|
|
|
|
|
|
} |
541
|
32
|
0
|
0
|
|
|
35
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
542
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Var->new(('sigil' => "".($MATCH->{'Perlito::Grammar.var_sigil'})), ('twigil' => "".($MATCH->{'Perlito::Grammar.var_twigil'})), ('name' => "".($MATCH->{'Perlito::Grammar.full_ident'}))))) |
543
|
|
|
|
|
|
|
}) || 1)))) |
544
|
|
|
|
|
|
|
})) |
545
|
|
|
|
|
|
|
}))); |
546
|
32
|
|
|
|
|
83
|
$MATCH |
547
|
|
|
|
|
|
|
}; |
548
|
|
|
|
|
|
|
sub rule_terms { |
549
|
30
|
|
|
30
|
0
|
53
|
my $grammar = $_[0]; |
550
|
30
|
|
|
|
|
34
|
my $str = $_[1]; |
551
|
30
|
|
|
|
|
33
|
my $pos = $_[2]; |
552
|
30
|
|
|
|
|
31
|
(my $MATCH); |
553
|
30
|
|
|
|
|
97
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
554
|
30
|
|
|
|
|
45
|
(($MATCH)->{bool} = ((do { |
555
|
30
|
|
|
|
|
75
|
((my $pos1) = $MATCH->to()); |
556
|
|
|
|
|
|
|
(((((((((((((((do { |
557
|
|
|
|
|
|
|
(((((('(' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
558
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
559
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
560
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
561
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
562
|
0
|
|
|
|
|
0
|
1 |
563
|
|
|
|
|
|
|
} |
564
|
|
|
|
|
|
|
else { |
565
|
0
|
|
|
|
|
0
|
0 |
566
|
|
|
|
|
|
|
} |
567
|
30
|
0
|
0
|
|
|
85
|
})) && (((')' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
568
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Capture->new(('rule_exp' => ${$MATCH->{'rule'}})))) |
|
0
|
|
|
|
|
0
|
|
569
|
|
|
|
|
|
|
}) || 1))) |
570
|
|
|
|
|
|
|
}) || (do { |
571
|
30
|
|
|
|
|
54
|
(($MATCH)->{to} = $pos1); |
572
|
|
|
|
|
|
|
((((((('<(' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
573
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
574
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
575
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
576
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
577
|
0
|
|
|
|
|
0
|
1 |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
else { |
580
|
0
|
|
|
|
|
0
|
0 |
581
|
|
|
|
|
|
|
} |
582
|
30
|
0
|
0
|
|
|
76
|
})) && (((')>' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
583
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::CaptureResult->new(('rule_exp' => ${$MATCH->{'rule'}})))) |
|
0
|
|
|
|
|
0
|
|
584
|
|
|
|
|
|
|
}) || 1)))) |
585
|
|
|
|
|
|
|
})) || (do { |
586
|
30
|
|
|
|
|
43
|
(($MATCH)->{to} = $pos1); |
587
|
|
|
|
|
|
|
(((((((('to(), 6)) && ((($MATCH)->{to} = (6 + $MATCH->to()))))) && (do { |
588
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
589
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
590
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
591
|
0
|
|
|
|
|
0
|
1 |
592
|
|
|
|
|
|
|
} |
593
|
|
|
|
|
|
|
else { |
594
|
0
|
|
|
|
|
0
|
0 |
595
|
|
|
|
|
|
|
} |
596
|
|
|
|
|
|
|
})) && (do { |
597
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
598
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
599
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
600
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
601
|
0
|
|
|
|
|
0
|
1 |
602
|
|
|
|
|
|
|
} |
603
|
|
|
|
|
|
|
else { |
604
|
0
|
|
|
|
|
0
|
0 |
605
|
|
|
|
|
|
|
} |
606
|
30
|
0
|
0
|
|
|
81
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
607
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::After->new(('rule_exp' => ${$MATCH->{'rule'}})))) |
|
0
|
|
|
|
|
0
|
|
608
|
|
|
|
|
|
|
}) || 1)))) |
609
|
|
|
|
|
|
|
})) || (do { |
610
|
30
|
|
|
|
|
116
|
(($MATCH)->{to} = $pos1); |
611
|
|
|
|
|
|
|
(((((((('to(), 7)) && ((($MATCH)->{to} = (7 + $MATCH->to()))))) && (do { |
612
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
613
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
614
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
615
|
0
|
|
|
|
|
0
|
1 |
616
|
|
|
|
|
|
|
} |
617
|
|
|
|
|
|
|
else { |
618
|
0
|
|
|
|
|
0
|
0 |
619
|
|
|
|
|
|
|
} |
620
|
|
|
|
|
|
|
})) && (do { |
621
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
622
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
623
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
624
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
625
|
0
|
|
|
|
|
0
|
1 |
626
|
|
|
|
|
|
|
} |
627
|
|
|
|
|
|
|
else { |
628
|
0
|
|
|
|
|
0
|
0 |
629
|
|
|
|
|
|
|
} |
630
|
30
|
0
|
0
|
|
|
77
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
631
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Before->new(('rule_exp' => ${$MATCH->{'rule'}})))) |
|
0
|
|
|
|
|
0
|
|
632
|
|
|
|
|
|
|
}) || 1)))) |
633
|
|
|
|
|
|
|
})) || (do { |
634
|
30
|
|
|
|
|
60
|
(($MATCH)->{to} = $pos1); |
635
|
|
|
|
|
|
|
(((((((('<' . chr(33) . 'before' eq substr($str, $MATCH->to(), 8)) && ((($MATCH)->{to} = (8 + $MATCH->to()))))) && (do { |
636
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
637
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
638
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
639
|
0
|
|
|
|
|
0
|
1 |
640
|
|
|
|
|
|
|
} |
641
|
|
|
|
|
|
|
else { |
642
|
0
|
|
|
|
|
0
|
0 |
643
|
|
|
|
|
|
|
} |
644
|
|
|
|
|
|
|
})) && (do { |
645
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
646
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
647
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
648
|
0
|
|
|
|
|
0
|
($MATCH->{'rule'} = $m2); |
649
|
0
|
|
|
|
|
0
|
1 |
650
|
|
|
|
|
|
|
} |
651
|
|
|
|
|
|
|
else { |
652
|
0
|
|
|
|
|
0
|
0 |
653
|
|
|
|
|
|
|
} |
654
|
30
|
0
|
0
|
|
|
70
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
655
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::NotBefore->new(('rule_exp' => ${$MATCH->{'rule'}})))) |
|
0
|
|
|
|
|
0
|
|
656
|
|
|
|
|
|
|
}) || 1)))) |
657
|
|
|
|
|
|
|
})) || (do { |
658
|
30
|
|
|
|
|
51
|
(($MATCH)->{to} = $pos1); |
659
|
|
|
|
|
|
|
((((((('<' . chr(33) eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
660
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
661
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
662
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
663
|
0
|
|
|
|
|
0
|
($MATCH->{'metasyntax_exp'} = $m2); |
664
|
0
|
|
|
|
|
0
|
1 |
665
|
|
|
|
|
|
|
} |
666
|
|
|
|
|
|
|
else { |
667
|
0
|
|
|
|
|
0
|
0 |
668
|
|
|
|
|
|
|
} |
669
|
30
|
0
|
0
|
|
|
73
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
670
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (do { |
671
|
0
|
|
|
|
|
0
|
(my $Hash_a = bless {}, 'HASH'); |
672
|
0
|
|
|
|
|
0
|
($Hash_a->{'negate'} = do { |
673
|
0
|
|
|
|
|
0
|
(my $Hash_a = bless {}, 'HASH'); |
674
|
0
|
|
|
|
|
0
|
($Hash_a->{'metasyntax'} = ${$MATCH->{'metasyntax_exp'}}); |
|
0
|
|
|
|
|
0
|
|
675
|
0
|
|
|
|
|
0
|
$Hash_a |
676
|
|
|
|
|
|
|
}); |
677
|
0
|
|
|
|
|
0
|
$Hash_a |
678
|
|
|
|
|
|
|
})) |
679
|
|
|
|
|
|
|
}) || 1)))) |
680
|
|
|
|
|
|
|
})) || (do { |
681
|
30
|
|
|
|
|
47
|
(($MATCH)->{to} = $pos1); |
682
|
|
|
|
|
|
|
((((((('<+' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
683
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->char_class($str, $MATCH->to())); |
684
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
685
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
686
|
0
|
|
|
|
|
0
|
($MATCH->{'char_class'} = $m2); |
687
|
0
|
|
|
|
|
0
|
1 |
688
|
|
|
|
|
|
|
} |
689
|
|
|
|
|
|
|
else { |
690
|
0
|
|
|
|
|
0
|
0 |
691
|
|
|
|
|
|
|
} |
692
|
30
|
0
|
0
|
|
|
83
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
693
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::CharClass->new(('chars' => "".($MATCH->{'char_class'}))))) |
694
|
|
|
|
|
|
|
}) || 1)))) |
695
|
|
|
|
|
|
|
})) || (do { |
696
|
30
|
|
|
|
|
48
|
(($MATCH)->{to} = $pos1); |
697
|
|
|
|
|
|
|
((((((('<-' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
698
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->char_class($str, $MATCH->to())); |
699
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
700
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
701
|
0
|
|
|
|
|
0
|
($MATCH->{'char_class'} = $m2); |
702
|
0
|
|
|
|
|
0
|
1 |
703
|
|
|
|
|
|
|
} |
704
|
|
|
|
|
|
|
else { |
705
|
0
|
|
|
|
|
0
|
0 |
706
|
|
|
|
|
|
|
} |
707
|
30
|
0
|
0
|
|
|
75
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
708
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::NegateCharClass->new(('chars' => "".($MATCH->{'char_class'}))))) |
709
|
|
|
|
|
|
|
}) || 1)))) |
710
|
|
|
|
|
|
|
})) || (do { |
711
|
30
|
|
|
|
|
47
|
(($MATCH)->{to} = $pos1); |
712
|
|
|
|
|
|
|
(((((((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
713
|
9
|
|
|
|
|
30
|
((my $m2) = $grammar->literal($str, $MATCH->to())); |
714
|
9
|
50
|
|
|
|
24
|
if ($m2) { |
715
|
9
|
|
|
|
|
29
|
(($MATCH)->{to} = $m2->to()); |
716
|
9
|
|
|
|
|
20
|
($MATCH->{'literal'} = $m2); |
717
|
9
|
|
|
|
|
52
|
1 |
718
|
|
|
|
|
|
|
} |
719
|
|
|
|
|
|
|
else { |
720
|
0
|
|
|
|
|
0
|
0 |
721
|
|
|
|
|
|
|
} |
722
|
30
|
50
|
50
|
|
|
80
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
723
|
9
|
|
|
|
|
20
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => ${$MATCH->{'literal'}})))) |
|
9
|
|
|
|
|
32
|
|
724
|
|
|
|
|
|
|
}) || 1)))) |
725
|
|
|
|
|
|
|
})) || (do { |
726
|
21
|
|
|
|
|
30
|
(($MATCH)->{to} = $pos1); |
727
|
|
|
|
|
|
|
((((((((('<' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (do { |
728
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->literal($str, $MATCH->to())); |
729
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
730
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
731
|
0
|
|
|
|
|
0
|
($MATCH->{'literal'} = $m2); |
732
|
0
|
|
|
|
|
0
|
1 |
733
|
|
|
|
|
|
|
} |
734
|
|
|
|
|
|
|
else { |
735
|
0
|
|
|
|
|
0
|
0 |
736
|
|
|
|
|
|
|
} |
737
|
21
|
0
|
0
|
|
|
53
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
738
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => ${$MATCH->{'literal'}})))) |
|
0
|
|
|
|
|
0
|
|
739
|
|
|
|
|
|
|
}) || 1)))) |
740
|
|
|
|
|
|
|
})) || (do { |
741
|
21
|
|
|
|
|
43
|
(($MATCH)->{to} = $pos1); |
742
|
21
|
100
|
66
|
|
|
105
|
((((('<' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
743
|
2
|
|
|
|
|
9
|
((my $pos1) = $MATCH->to()); |
744
|
|
|
|
|
|
|
((((do { |
745
|
|
|
|
|
|
|
(((do { |
746
|
2
|
|
|
|
|
8
|
((my $m2) = $grammar->variables($str, $MATCH->to())); |
747
|
2
|
50
|
|
|
|
8
|
if ($m2) { |
748
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
749
|
0
|
|
|
|
|
0
|
($MATCH->{'variables'} = $m2); |
750
|
0
|
|
|
|
|
0
|
1 |
751
|
|
|
|
|
|
|
} |
752
|
|
|
|
|
|
|
else { |
753
|
2
|
|
|
|
|
20
|
0 |
754
|
|
|
|
|
|
|
} |
755
|
2
|
0
|
0
|
|
|
3
|
}) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
756
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::InterpolateVar->new(('var' => ${$MATCH->{'variables'}})))) |
|
0
|
|
|
|
|
0
|
|
757
|
|
|
|
|
|
|
}) || 1))) |
758
|
|
|
|
|
|
|
}) || (do { |
759
|
2
|
|
|
|
|
5
|
(($MATCH)->{to} = $pos1); |
760
|
|
|
|
|
|
|
(((((((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
761
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
762
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
763
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
764
|
0
|
|
|
|
|
0
|
($MATCH->{'metasyntax_exp'} = $m2); |
765
|
0
|
|
|
|
|
0
|
1 |
766
|
|
|
|
|
|
|
} |
767
|
|
|
|
|
|
|
else { |
768
|
0
|
|
|
|
|
0
|
0 |
769
|
|
|
|
|
|
|
} |
770
|
2
|
0
|
0
|
|
|
9
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
771
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Subrule->new(('metasyntax' => ${$MATCH->{'metasyntax_exp'}}), ('captures' => 0)))) |
|
0
|
|
|
|
|
0
|
|
772
|
|
|
|
|
|
|
}) || 1)))) |
773
|
|
|
|
|
|
|
})) || (do { |
774
|
2
|
|
|
|
|
6
|
(($MATCH)->{to} = $pos1); |
775
|
|
|
|
|
|
|
((((((('.' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
776
|
2
|
|
|
|
|
9
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
777
|
2
|
50
|
|
|
|
6
|
if ($m2) { |
778
|
2
|
|
|
|
|
22
|
(($MATCH)->{to} = $m2->to()); |
779
|
2
|
|
|
|
|
9
|
($MATCH->{'metasyntax_exp'} = $m2); |
780
|
2
|
|
|
|
|
17
|
1 |
781
|
|
|
|
|
|
|
} |
782
|
|
|
|
|
|
|
else { |
783
|
0
|
|
|
|
|
0
|
0 |
784
|
|
|
|
|
|
|
} |
785
|
2
|
50
|
50
|
|
|
8
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
786
|
2
|
|
|
|
|
5
|
($MATCH->{capture} = (Rul::Subrule->new(('metasyntax' => ${$MATCH->{'metasyntax_exp'}}), ('captures' => 0)))) |
|
2
|
|
|
|
|
9
|
|
787
|
|
|
|
|
|
|
}) || 1)))) |
788
|
2
|
50
|
33
|
|
|
5
|
})) || (do { |
|
|
|
33
|
|
|
|
|
789
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
790
|
|
|
|
|
|
|
((((do { |
791
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
792
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
793
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
794
|
0
|
|
|
|
|
0
|
($MATCH->{'metasyntax_exp'} = $m2); |
795
|
0
|
|
|
|
|
0
|
1 |
796
|
|
|
|
|
|
|
} |
797
|
|
|
|
|
|
|
else { |
798
|
0
|
|
|
|
|
0
|
0 |
799
|
|
|
|
|
|
|
} |
800
|
0
|
0
|
0
|
|
|
0
|
}) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
801
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Subrule->new(('metasyntax' => ${$MATCH->{'metasyntax_exp'}}), ('captures' => 1)))) |
|
0
|
|
|
|
|
0
|
|
802
|
|
|
|
|
|
|
}) || 1)))) |
803
|
|
|
|
|
|
|
})) |
804
|
|
|
|
|
|
|
}))) |
805
|
|
|
|
|
|
|
})) || (do { |
806
|
19
|
|
|
|
|
43
|
(($MATCH)->{to} = $pos1); |
807
|
|
|
|
|
|
|
(((((((chr(123) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
808
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->parsed_code($str, $MATCH->to())); |
809
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
810
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
811
|
0
|
|
|
|
|
0
|
($MATCH->{'parsed_code'} = $m2); |
812
|
0
|
|
|
|
|
0
|
1 |
813
|
|
|
|
|
|
|
} |
814
|
|
|
|
|
|
|
else { |
815
|
0
|
|
|
|
|
0
|
0 |
816
|
|
|
|
|
|
|
} |
817
|
19
|
0
|
0
|
|
|
54
|
})) && (((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
818
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Block->new(('closure' => ${$MATCH->{'parsed_code'}})))) |
|
0
|
|
|
|
|
0
|
|
819
|
|
|
|
|
|
|
}) || 1)))) |
820
|
|
|
|
|
|
|
})) || (do { |
821
|
19
|
|
|
|
|
37
|
(($MATCH)->{to} = $pos1); |
822
|
19
|
50
|
33
|
|
|
55
|
(((((chr(92) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
823
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
824
|
|
|
|
|
|
|
(((do { |
825
|
|
|
|
|
|
|
((((((('c' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && ((('[' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (do { |
826
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->digits($str, $MATCH->to())); |
827
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
828
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
829
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.digits'} = $m2); |
830
|
0
|
|
|
|
|
0
|
1 |
831
|
|
|
|
|
|
|
} |
832
|
|
|
|
|
|
|
else { |
833
|
0
|
|
|
|
|
0
|
0 |
834
|
|
|
|
|
|
|
} |
835
|
0
|
0
|
0
|
|
|
0
|
})) && (((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
836
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => chr($MATCH->{'Perlito::Grammar.digits'}))))) |
837
|
|
|
|
|
|
|
}) || 1))) |
838
|
|
|
|
|
|
|
}) || (do { |
839
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
840
|
|
|
|
|
|
|
(((((('c' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
841
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->digits($str, $MATCH->to())); |
842
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
843
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
844
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.digits'} = $m2); |
845
|
0
|
|
|
|
|
0
|
1 |
846
|
|
|
|
|
|
|
} |
847
|
|
|
|
|
|
|
else { |
848
|
0
|
|
|
|
|
0
|
0 |
849
|
|
|
|
|
|
|
} |
850
|
0
|
0
|
0
|
|
|
0
|
})) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
851
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => chr($MATCH->{'Perlito::Grammar.digits'}))))) |
852
|
|
|
|
|
|
|
}) || 1)))) |
853
|
0
|
0
|
0
|
|
|
0
|
})) || (do { |
854
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
855
|
|
|
|
|
|
|
(((do { |
856
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->any($str, $MATCH->to())); |
857
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
858
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
859
|
0
|
|
|
|
|
0
|
($MATCH->{'any'} = $m2); |
860
|
0
|
|
|
|
|
0
|
1 |
861
|
|
|
|
|
|
|
} |
862
|
|
|
|
|
|
|
else { |
863
|
0
|
|
|
|
|
0
|
0 |
864
|
|
|
|
|
|
|
} |
865
|
0
|
0
|
0
|
|
|
0
|
}) && (((do { |
866
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::SpecialChar->new(('char' => ${$MATCH->{'any'}})))) |
|
0
|
|
|
|
|
0
|
|
867
|
|
|
|
|
|
|
}) || 1)))) |
868
|
|
|
|
|
|
|
})) |
869
|
|
|
|
|
|
|
}))) |
870
|
|
|
|
|
|
|
})) || (do { |
871
|
19
|
|
|
|
|
41
|
(($MATCH)->{to} = $pos1); |
872
|
19
|
50
|
0
|
|
|
66
|
((((('.' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (((do { |
|
|
|
33
|
|
|
|
|
873
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Dot->new())) |
874
|
|
|
|
|
|
|
}) || 1)))) |
875
|
30
|
50
|
33
|
|
|
42
|
})) || (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
876
|
19
|
|
|
|
|
32
|
(($MATCH)->{to} = $pos1); |
877
|
|
|
|
|
|
|
((((((('[' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
878
|
4
|
|
|
|
|
14
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
879
|
4
|
50
|
|
|
|
19
|
if ($m2) { |
880
|
4
|
|
|
|
|
14
|
(($MATCH)->{to} = $m2->to()); |
881
|
4
|
|
|
|
|
14
|
($MATCH->{'rule'} = $m2); |
882
|
4
|
|
|
|
|
25
|
1 |
883
|
|
|
|
|
|
|
} |
884
|
|
|
|
|
|
|
else { |
885
|
0
|
|
|
|
|
0
|
0 |
886
|
|
|
|
|
|
|
} |
887
|
19
|
50
|
50
|
|
|
47
|
})) && (((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
888
|
4
|
|
|
|
|
6
|
($MATCH->{capture} = (${$MATCH->{'rule'}})) |
|
4
|
|
|
|
|
14
|
|
889
|
|
|
|
|
|
|
}) || 1)))) |
890
|
|
|
|
|
|
|
})) |
891
|
|
|
|
|
|
|
}))); |
892
|
30
|
|
|
|
|
219
|
$MATCH |
893
|
|
|
|
|
|
|
}; |
894
|
|
|
|
|
|
|
sub rule_term { |
895
|
30
|
|
|
30
|
0
|
53
|
my $grammar = $_[0]; |
896
|
30
|
|
|
|
|
47
|
my $str = $_[1]; |
897
|
30
|
|
|
|
|
34
|
my $pos = $_[2]; |
898
|
30
|
|
|
|
|
36
|
(my $MATCH); |
899
|
30
|
|
|
|
|
160
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
900
|
30
|
|
|
|
|
80
|
(($MATCH)->{bool} = ((do { |
901
|
30
|
|
|
|
|
83
|
((my $pos1) = $MATCH->to()); |
902
|
|
|
|
|
|
|
(((do { |
903
|
|
|
|
|
|
|
((do { |
904
|
30
|
|
|
|
|
81
|
((my $m2) = $grammar->variables($str, $MATCH->to())); |
905
|
30
|
50
|
|
|
|
121
|
if ($m2) { |
906
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
907
|
0
|
|
|
|
|
0
|
($MATCH->{'variables'} = $m2); |
908
|
0
|
|
|
|
|
0
|
1 |
909
|
|
|
|
|
|
|
} |
910
|
|
|
|
|
|
|
else { |
911
|
30
|
|
|
|
|
159
|
0 |
912
|
|
|
|
|
|
|
} |
913
|
30
|
50
|
|
|
|
37
|
}) && (do { |
914
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
915
|
|
|
|
|
|
|
((do { |
916
|
|
|
|
|
|
|
(((((do { |
917
|
0
|
|
|
|
|
0
|
((my $last_pos) = $MATCH->to()); |
918
|
0
|
0
|
|
|
|
0
|
if (!((do { |
919
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
920
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
921
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
922
|
0
|
|
|
|
|
0
|
1 |
923
|
|
|
|
|
|
|
} |
924
|
|
|
|
|
|
|
else { |
925
|
0
|
|
|
|
|
0
|
0 |
926
|
|
|
|
|
|
|
} |
927
|
|
|
|
|
|
|
}))) { |
928
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $last_pos) |
929
|
|
|
|
|
|
|
}; |
930
|
0
|
|
|
|
|
0
|
1 |
931
|
|
|
|
|
|
|
}) && (((chr(61) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (do { |
932
|
0
|
|
|
|
|
0
|
((my $last_pos) = $MATCH->to()); |
933
|
0
|
0
|
|
|
|
0
|
if (!((do { |
934
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
935
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
936
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
937
|
0
|
|
|
|
|
0
|
1 |
938
|
|
|
|
|
|
|
} |
939
|
|
|
|
|
|
|
else { |
940
|
0
|
|
|
|
|
0
|
0 |
941
|
|
|
|
|
|
|
} |
942
|
|
|
|
|
|
|
}))) { |
943
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $last_pos) |
944
|
|
|
|
|
|
|
}; |
945
|
0
|
|
|
|
|
0
|
1 |
946
|
|
|
|
|
|
|
})) && (do { |
947
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->named_capture_body($str, $MATCH->to())); |
948
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
949
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
950
|
0
|
|
|
|
|
0
|
($MATCH->{'named_capture_body'} = $m2); |
951
|
0
|
|
|
|
|
0
|
1 |
952
|
|
|
|
|
|
|
} |
953
|
|
|
|
|
|
|
else { |
954
|
0
|
|
|
|
|
0
|
0 |
955
|
|
|
|
|
|
|
} |
956
|
0
|
0
|
0
|
|
|
0
|
})) && (((do { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
957
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::NamedCapture->new(('rule_exp' => ${$MATCH->{'named_capture_body'}}), ('capture_ident' => ${$MATCH->{'variables'}})))) |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
958
|
|
|
|
|
|
|
}) || 1))) |
959
|
0
|
0
|
|
|
|
0
|
}) || (do { |
960
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
961
|
0
|
0
|
|
|
|
0
|
((((do { |
962
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (${$MATCH->{'variables'}})) |
|
0
|
|
|
|
|
0
|
|
963
|
|
|
|
|
|
|
}) || 1))) |
964
|
|
|
|
|
|
|
})) |
965
|
|
|
|
|
|
|
})) |
966
|
|
|
|
|
|
|
}) || (do { |
967
|
30
|
|
|
|
|
55
|
(($MATCH)->{to} = $pos1); |
968
|
|
|
|
|
|
|
(((do { |
969
|
30
|
|
|
|
|
86
|
((my $m2) = $grammar->rule_terms($str, $MATCH->to())); |
970
|
30
|
100
|
|
|
|
90
|
if ($m2) { |
971
|
15
|
|
|
|
|
89
|
(($MATCH)->{to} = $m2->to()); |
972
|
15
|
|
|
|
|
31
|
($MATCH->{'rule_terms'} = $m2); |
973
|
15
|
|
|
|
|
52
|
1 |
974
|
|
|
|
|
|
|
} |
975
|
|
|
|
|
|
|
else { |
976
|
15
|
|
|
|
|
86
|
0 |
977
|
|
|
|
|
|
|
} |
978
|
30
|
100
|
50
|
|
|
34
|
}) && (((do { |
979
|
15
|
|
|
|
|
18
|
($MATCH->{capture} = (${$MATCH->{'rule_terms'}})) |
|
15
|
|
|
|
|
52
|
|
980
|
|
|
|
|
|
|
}) || 1)))) |
981
|
30
|
100
|
33
|
|
|
34
|
})) || (do { |
982
|
15
|
|
|
|
|
30
|
(($MATCH)->{to} = $pos1); |
983
|
|
|
|
|
|
|
((((do { |
984
|
15
|
|
|
|
|
24
|
((my $tmp) = $MATCH); |
985
|
15
|
|
|
|
|
300
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
986
|
15
|
|
|
|
|
25
|
(($MATCH)->{bool} = (do { |
987
|
15
|
|
|
|
|
91
|
((my $pos1) = $MATCH->to()); |
988
|
|
|
|
|
|
|
(((((((((((do { |
989
|
15
|
100
|
|
|
|
45
|
((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
990
|
|
|
|
|
|
|
}) || (do { |
991
|
11
|
|
|
|
|
21
|
(($MATCH)->{to} = $pos1); |
992
|
11
|
100
|
|
|
|
32
|
((((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
993
|
|
|
|
|
|
|
})) || (do { |
994
|
7
|
|
|
|
|
16
|
(($MATCH)->{to} = $pos1); |
995
|
7
|
50
|
|
|
|
40
|
((((')' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
996
|
|
|
|
|
|
|
})) || (do { |
997
|
7
|
|
|
|
|
14
|
(($MATCH)->{to} = $pos1); |
998
|
7
|
50
|
|
|
|
23
|
(((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
999
|
|
|
|
|
|
|
})) || (do { |
1000
|
7
|
|
|
|
|
22
|
(($MATCH)->{to} = $pos1); |
1001
|
7
|
50
|
|
|
|
19
|
((((':' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1002
|
|
|
|
|
|
|
})) || (do { |
1003
|
7
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
1004
|
7
|
50
|
|
|
|
21
|
((((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1005
|
|
|
|
|
|
|
})) || (do { |
1006
|
7
|
|
|
|
|
14
|
(($MATCH)->{to} = $pos1); |
1007
|
7
|
50
|
|
|
|
144
|
(((('+' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1008
|
|
|
|
|
|
|
})) || (do { |
1009
|
7
|
|
|
|
|
13
|
(($MATCH)->{to} = $pos1); |
1010
|
7
|
50
|
|
|
|
19
|
(((('*' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1011
|
|
|
|
|
|
|
})) || (do { |
1012
|
7
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
1013
|
7
|
50
|
|
|
|
20
|
((((chr(124) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1014
|
|
|
|
|
|
|
})) || (do { |
1015
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
1016
|
0
|
0
|
|
|
|
0
|
((((chr(38) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1017
|
15
|
0
|
66
|
|
|
21
|
})) || (do { |
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
1018
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
1019
|
0
|
0
|
|
|
|
0
|
((((chr(47) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1020
|
|
|
|
|
|
|
})) |
1021
|
|
|
|
|
|
|
})); |
1022
|
15
|
|
|
|
|
62
|
(($tmp)->{bool} = !($MATCH)); |
1023
|
15
|
|
|
|
|
23
|
($MATCH = $tmp); |
1024
|
15
|
|
|
|
|
47
|
!!($MATCH) |
1025
|
|
|
|
|
|
|
}) && (do { |
1026
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->any($str, $MATCH->to())); |
1027
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
1028
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
1029
|
0
|
|
|
|
|
0
|
($MATCH->{'any'} = $m2); |
1030
|
0
|
|
|
|
|
0
|
1 |
1031
|
|
|
|
|
|
|
} |
1032
|
|
|
|
|
|
|
else { |
1033
|
0
|
|
|
|
|
0
|
0 |
1034
|
|
|
|
|
|
|
} |
1035
|
15
|
0
|
0
|
|
|
20
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
1036
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => ${$MATCH->{'any'}})))) |
|
0
|
|
|
|
|
0
|
|
1037
|
|
|
|
|
|
|
}) || 1)))) |
1038
|
|
|
|
|
|
|
})) |
1039
|
|
|
|
|
|
|
}))); |
1040
|
30
|
|
|
|
|
77
|
$MATCH |
1041
|
|
|
|
|
|
|
}; |
1042
|
|
|
|
|
|
|
sub quant_exp { |
1043
|
15
|
|
|
15
|
0
|
27
|
my $grammar = $_[0]; |
1044
|
15
|
|
|
|
|
28
|
my $str = $_[1]; |
1045
|
15
|
|
|
|
|
24
|
my $pos = $_[2]; |
1046
|
15
|
|
|
|
|
19
|
(my $MATCH); |
1047
|
15
|
|
|
|
|
65
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1048
|
15
|
|
|
|
|
25
|
(($MATCH)->{bool} = ((do { |
1049
|
15
|
|
|
|
|
38
|
((my $pos1) = $MATCH->to()); |
1050
|
|
|
|
|
|
|
((do { |
1051
|
|
|
|
|
|
|
((((('**' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
1052
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->opt_ws($str, $MATCH->to())); |
1053
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
1054
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
1055
|
0
|
|
|
|
|
0
|
1 |
1056
|
|
|
|
|
|
|
} |
1057
|
|
|
|
|
|
|
else { |
1058
|
0
|
|
|
|
|
0
|
0 |
1059
|
|
|
|
|
|
|
} |
1060
|
15
|
0
|
33
|
|
|
43
|
})) && (do { |
|
|
|
33
|
|
|
|
|
1061
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
1062
|
|
|
|
|
|
|
((do { |
1063
|
|
|
|
|
|
|
((do { |
1064
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito::Grammar->val_int($str, $MATCH->to())); |
1065
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
1066
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
1067
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito::Grammar.val_int'} = $m2); |
1068
|
0
|
|
|
|
|
0
|
1 |
1069
|
|
|
|
|
|
|
} |
1070
|
|
|
|
|
|
|
else { |
1071
|
0
|
|
|
|
|
0
|
0 |
1072
|
|
|
|
|
|
|
} |
1073
|
0
|
0
|
0
|
|
|
0
|
}) && (((do { |
1074
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (${$MATCH->{'Perlito::Grammar.val_int'}})) |
|
0
|
|
|
|
|
0
|
|
1075
|
|
|
|
|
|
|
}) || 1))) |
1076
|
0
|
0
|
|
|
|
0
|
}) || (do { |
1077
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
1078
|
|
|
|
|
|
|
(((do { |
1079
|
0
|
|
|
|
|
0
|
((my $m2) = $grammar->rule_term($str, $MATCH->to())); |
1080
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
1081
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
1082
|
0
|
|
|
|
|
0
|
($MATCH->{'rule_term'} = $m2); |
1083
|
0
|
|
|
|
|
0
|
1 |
1084
|
|
|
|
|
|
|
} |
1085
|
|
|
|
|
|
|
else { |
1086
|
0
|
|
|
|
|
0
|
0 |
1087
|
|
|
|
|
|
|
} |
1088
|
0
|
0
|
0
|
|
|
0
|
}) && (((do { |
1089
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (${$MATCH->{'rule_term'}})) |
|
0
|
|
|
|
|
0
|
|
1090
|
|
|
|
|
|
|
}) || 1)))) |
1091
|
|
|
|
|
|
|
})) |
1092
|
|
|
|
|
|
|
})) |
1093
|
15
|
50
|
|
|
|
23
|
}) || (do { |
1094
|
15
|
|
|
|
|
26
|
(($MATCH)->{to} = $pos1); |
1095
|
15
|
|
|
|
|
37
|
((do { |
1096
|
15
|
|
|
|
|
42
|
((my $pos1) = $MATCH->to()); |
1097
|
|
|
|
|
|
|
(((do { |
1098
|
15
|
50
|
|
|
|
41
|
((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
1099
|
|
|
|
|
|
|
}) || (do { |
1100
|
15
|
|
|
|
|
27
|
(($MATCH)->{to} = $pos1); |
1101
|
15
|
50
|
|
|
|
45
|
(((('*' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1102
|
15
|
50
|
33
|
|
|
19
|
})) || (do { |
1103
|
15
|
|
|
|
|
24
|
(($MATCH)->{to} = $pos1); |
1104
|
15
|
100
|
|
|
|
42
|
(((('+' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1105
|
|
|
|
|
|
|
})) |
1106
|
|
|
|
|
|
|
})) |
1107
|
|
|
|
|
|
|
})) |
1108
|
|
|
|
|
|
|
}))); |
1109
|
15
|
|
|
|
|
52
|
$MATCH |
1110
|
|
|
|
|
|
|
}; |
1111
|
|
|
|
|
|
|
sub greedy_exp { |
1112
|
4
|
|
|
4
|
0
|
10
|
my $grammar = $_[0]; |
1113
|
4
|
|
|
|
|
11
|
my $str = $_[1]; |
1114
|
4
|
|
|
|
|
6
|
my $pos = $_[2]; |
1115
|
4
|
|
|
|
|
7
|
(my $MATCH); |
1116
|
4
|
|
|
|
|
18
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1117
|
4
|
|
|
|
|
16
|
(($MATCH)->{bool} = ((do { |
1118
|
4
|
|
|
|
|
15
|
((my $pos1) = $MATCH->to()); |
1119
|
|
|
|
|
|
|
(((do { |
1120
|
4
|
50
|
|
|
|
15
|
((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
1121
|
|
|
|
|
|
|
}) || (do { |
1122
|
4
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
1123
|
4
|
50
|
|
|
|
15
|
(((('+' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1124
|
4
|
50
|
33
|
|
|
7
|
})) || (do { |
1125
|
4
|
|
|
|
|
11
|
(($MATCH)->{to} = $pos1); |
1126
|
4
|
|
|
|
|
11
|
(1) |
1127
|
|
|
|
|
|
|
})) |
1128
|
|
|
|
|
|
|
}))); |
1129
|
4
|
|
|
|
|
15
|
$MATCH |
1130
|
|
|
|
|
|
|
}; |
1131
|
|
|
|
|
|
|
sub quantifier { |
1132
|
30
|
|
|
30
|
0
|
50
|
my $grammar = $_[0]; |
1133
|
30
|
|
|
|
|
40
|
my $str = $_[1]; |
1134
|
30
|
|
|
|
|
39
|
my $pos = $_[2]; |
1135
|
30
|
|
|
|
|
40
|
(my $MATCH); |
1136
|
30
|
|
|
|
|
99
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1137
|
30
|
|
|
|
|
46
|
(($MATCH)->{bool} = ((do { |
1138
|
30
|
|
|
|
|
86
|
((my $pos1) = $MATCH->to()); |
1139
|
30
|
|
|
|
|
34
|
(do { |
1140
|
|
|
|
|
|
|
((((do { |
1141
|
30
|
|
|
|
|
73
|
((my $m2) = Perlito::Grammar->opt_ws($str, $MATCH->to())); |
1142
|
30
|
50
|
|
|
|
89
|
if ($m2) { |
1143
|
30
|
|
|
|
|
78
|
(($MATCH)->{to} = $m2->to()); |
1144
|
30
|
|
|
|
|
156
|
1 |
1145
|
|
|
|
|
|
|
} |
1146
|
|
|
|
|
|
|
else { |
1147
|
0
|
|
|
|
|
0
|
0 |
1148
|
|
|
|
|
|
|
} |
1149
|
|
|
|
|
|
|
}) && (do { |
1150
|
30
|
|
|
|
|
125
|
((my $m2) = $grammar->rule_term($str, $MATCH->to())); |
1151
|
30
|
100
|
|
|
|
79
|
if ($m2) { |
1152
|
15
|
|
|
|
|
42
|
(($MATCH)->{to} = $m2->to()); |
1153
|
15
|
|
|
|
|
35
|
($MATCH->{'rule_term'} = $m2); |
1154
|
15
|
|
|
|
|
54
|
1 |
1155
|
|
|
|
|
|
|
} |
1156
|
|
|
|
|
|
|
else { |
1157
|
15
|
|
|
|
|
66
|
0 |
1158
|
|
|
|
|
|
|
} |
1159
|
|
|
|
|
|
|
})) && (do { |
1160
|
15
|
|
|
|
|
46
|
((my $m2) = Perlito::Grammar->opt_ws2($str, $MATCH->to())); |
1161
|
15
|
50
|
|
|
|
49
|
if ($m2) { |
1162
|
15
|
|
|
|
|
72
|
(($MATCH)->{to} = $m2->to()); |
1163
|
15
|
|
|
|
|
71
|
1 |
1164
|
|
|
|
|
|
|
} |
1165
|
|
|
|
|
|
|
else { |
1166
|
0
|
|
|
|
|
0
|
0 |
1167
|
|
|
|
|
|
|
} |
1168
|
30
|
50
|
33
|
|
|
34
|
})) && (do { |
|
|
|
66
|
|
|
|
|
1169
|
15
|
|
|
|
|
46
|
((my $pos1) = $MATCH->to()); |
1170
|
|
|
|
|
|
|
((do { |
1171
|
|
|
|
|
|
|
((((do { |
1172
|
15
|
|
|
|
|
45
|
((my $m2) = $grammar->quant_exp($str, $MATCH->to())); |
1173
|
15
|
100
|
|
|
|
42
|
if ($m2) { |
1174
|
4
|
|
|
|
|
22
|
(($MATCH)->{to} = $m2->to()); |
1175
|
4
|
|
|
|
|
10
|
($MATCH->{'quant_exp'} = $m2); |
1176
|
4
|
|
|
|
|
18
|
1 |
1177
|
|
|
|
|
|
|
} |
1178
|
|
|
|
|
|
|
else { |
1179
|
11
|
|
|
|
|
69
|
0 |
1180
|
|
|
|
|
|
|
} |
1181
|
|
|
|
|
|
|
}) && (do { |
1182
|
4
|
|
|
|
|
16
|
((my $m2) = $grammar->greedy_exp($str, $MATCH->to())); |
1183
|
4
|
50
|
|
|
|
13
|
if ($m2) { |
1184
|
4
|
|
|
|
|
15
|
(($MATCH)->{to} = $m2->to()); |
1185
|
4
|
|
|
|
|
24
|
($MATCH->{'greedy_exp'} = $m2); |
1186
|
4
|
|
|
|
|
27
|
1 |
1187
|
|
|
|
|
|
|
} |
1188
|
|
|
|
|
|
|
else { |
1189
|
0
|
|
|
|
|
0
|
0 |
1190
|
|
|
|
|
|
|
} |
1191
|
|
|
|
|
|
|
})) && (do { |
1192
|
4
|
|
|
|
|
36
|
((my $m2) = Perlito::Grammar->opt_ws3($str, $MATCH->to())); |
1193
|
4
|
50
|
|
|
|
12
|
if ($m2) { |
1194
|
4
|
|
|
|
|
15
|
(($MATCH)->{to} = $m2->to()); |
1195
|
4
|
|
|
|
|
23
|
1 |
1196
|
|
|
|
|
|
|
} |
1197
|
|
|
|
|
|
|
else { |
1198
|
0
|
|
|
|
|
0
|
0 |
1199
|
|
|
|
|
|
|
} |
1200
|
15
|
50
|
50
|
|
|
23
|
})) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
1201
|
4
|
|
|
|
|
10
|
($MATCH->{capture} = (Rul::Quantifier->new(('term' => ${$MATCH->{'rule_term'}}), ('quant' => ${$MATCH->{'quant_exp'}}), ('greedy' => ${$MATCH->{'greedy_exp'}}), ('ws1' => ${$MATCH->{'Perlito::Grammar.opt_ws'}}), ('ws2' => ${$MATCH->{'Perlito::Grammar.opt_ws2'}}), ('ws3' => ${$MATCH->{'Perlito::Grammar.opt_ws3'}})))) |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
24
|
|
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
45
|
|
1202
|
|
|
|
|
|
|
}) || 1))) |
1203
|
15
|
100
|
|
|
|
25
|
}) || (do { |
1204
|
11
|
|
|
|
|
21
|
(($MATCH)->{to} = $pos1); |
1205
|
11
|
50
|
|
|
|
15
|
((((do { |
1206
|
11
|
|
|
|
|
15
|
($MATCH->{capture} = (${$MATCH->{'rule_term'}})) |
|
11
|
|
|
|
|
34
|
|
1207
|
|
|
|
|
|
|
}) || 1))) |
1208
|
|
|
|
|
|
|
})) |
1209
|
|
|
|
|
|
|
})) |
1210
|
|
|
|
|
|
|
}) |
1211
|
|
|
|
|
|
|
}))); |
1212
|
30
|
|
|
|
|
99
|
$MATCH |
1213
|
|
|
|
|
|
|
}; |
1214
|
|
|
|
|
|
|
sub concat_list { |
1215
|
30
|
|
|
30
|
0
|
53
|
my $grammar = $_[0]; |
1216
|
30
|
|
|
|
|
41
|
my $str = $_[1]; |
1217
|
30
|
|
|
|
|
35
|
my $pos = $_[2]; |
1218
|
30
|
|
|
|
|
45
|
(my $MATCH); |
1219
|
30
|
|
|
|
|
110
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1220
|
30
|
|
|
|
|
42
|
(($MATCH)->{bool} = ((do { |
1221
|
30
|
|
|
|
|
81
|
((my $pos1) = $MATCH->to()); |
1222
|
|
|
|
|
|
|
((do { |
1223
|
|
|
|
|
|
|
((do { |
1224
|
30
|
|
|
|
|
80
|
((my $m2) = $grammar->quantifier($str, $MATCH->to())); |
1225
|
30
|
100
|
|
|
|
83
|
if ($m2) { |
1226
|
15
|
|
|
|
|
53
|
(($MATCH)->{to} = $m2->to()); |
1227
|
15
|
|
|
|
|
70
|
($MATCH->{'quantifier'} = $m2); |
1228
|
15
|
|
|
|
|
61
|
1 |
1229
|
|
|
|
|
|
|
} |
1230
|
|
|
|
|
|
|
else { |
1231
|
15
|
|
|
|
|
81
|
0 |
1232
|
|
|
|
|
|
|
} |
1233
|
30
|
100
|
|
|
|
38
|
}) && (do { |
1234
|
15
|
|
|
|
|
52
|
((my $pos1) = $MATCH->to()); |
1235
|
|
|
|
|
|
|
((do { |
1236
|
|
|
|
|
|
|
((do { |
1237
|
15
|
|
|
|
|
44
|
((my $m2) = $grammar->concat_list($str, $MATCH->to())); |
1238
|
15
|
50
|
|
|
|
39
|
if ($m2) { |
1239
|
15
|
|
|
|
|
43
|
(($MATCH)->{to} = $m2->to()); |
1240
|
15
|
|
|
|
|
31
|
($MATCH->{'concat_list'} = $m2); |
1241
|
15
|
|
|
|
|
65
|
1 |
1242
|
|
|
|
|
|
|
} |
1243
|
|
|
|
|
|
|
else { |
1244
|
0
|
|
|
|
|
0
|
0 |
1245
|
|
|
|
|
|
|
} |
1246
|
15
|
50
|
50
|
|
|
22
|
}) && (((do { |
1247
|
15
|
|
|
|
|
20
|
($MATCH->{capture} = (do { |
1248
|
15
|
|
|
|
|
34
|
(my $List_a = bless [], 'ARRAY'); |
1249
|
15
|
|
|
|
|
35
|
(my $List_v = bless [], 'ARRAY'); |
1250
|
15
|
|
|
|
|
19
|
push( @{$List_a}, ${$MATCH->{'quantifier'}} ); |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
58
|
|
1251
|
15
|
|
|
|
|
31
|
($List_v = ((${$MATCH->{'concat_list'}}))); |
|
15
|
|
|
|
|
40
|
|
1252
|
15
|
|
|
|
|
24
|
for my $x ( @{(bless [0 .. ((scalar( @{$List_v} ) - 1))], 'ARRAY')} ) { |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
72
|
|
1253
|
0
|
|
|
|
|
0
|
push( @{$List_a}, $List_v->[$x] ) |
|
0
|
|
|
|
|
0
|
|
1254
|
|
|
|
|
|
|
}; |
1255
|
15
|
|
|
|
|
74
|
$List_a |
1256
|
|
|
|
|
|
|
})) |
1257
|
|
|
|
|
|
|
}) || 1))) |
1258
|
15
|
50
|
|
|
|
25
|
}) || (do { |
1259
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
1260
|
0
|
0
|
|
|
|
0
|
((((do { |
1261
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (do { |
1262
|
0
|
|
|
|
|
0
|
(my $List_a = bless [], 'ARRAY'); |
1263
|
0
|
|
|
|
|
0
|
(my $List_v = bless [], 'ARRAY'); |
1264
|
0
|
|
|
|
|
0
|
push( @{$List_a}, ${$MATCH->{'quantifier'}} ); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
1265
|
0
|
|
|
|
|
0
|
$List_a |
1266
|
|
|
|
|
|
|
})) |
1267
|
|
|
|
|
|
|
}) || 1))) |
1268
|
|
|
|
|
|
|
})) |
1269
|
|
|
|
|
|
|
})) |
1270
|
30
|
100
|
|
|
|
35
|
}) || (do { |
1271
|
15
|
|
|
|
|
24
|
(($MATCH)->{to} = $pos1); |
1272
|
15
|
50
|
|
|
|
21
|
((((do { |
1273
|
15
|
|
|
|
|
17
|
($MATCH->{capture} = (do { |
1274
|
15
|
|
|
|
|
49
|
(my $List_a = bless [], 'ARRAY'); |
1275
|
15
|
|
|
|
|
61
|
(my $List_v = bless [], 'ARRAY'); |
1276
|
15
|
|
|
|
|
74
|
$List_a |
1277
|
|
|
|
|
|
|
})) |
1278
|
|
|
|
|
|
|
}) || 1))) |
1279
|
|
|
|
|
|
|
})) |
1280
|
|
|
|
|
|
|
}))); |
1281
|
30
|
|
|
|
|
91
|
$MATCH |
1282
|
|
|
|
|
|
|
}; |
1283
|
|
|
|
|
|
|
sub concat_exp { |
1284
|
15
|
|
|
15
|
0
|
27
|
my $grammar = $_[0]; |
1285
|
15
|
|
|
|
|
20
|
my $str = $_[1]; |
1286
|
15
|
|
|
|
|
18
|
my $pos = $_[2]; |
1287
|
15
|
|
|
|
|
17
|
(my $MATCH); |
1288
|
15
|
|
|
|
|
56
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1289
|
15
|
|
|
|
|
23
|
(($MATCH)->{bool} = ((do { |
1290
|
15
|
|
|
|
|
42
|
((my $pos1) = $MATCH->to()); |
1291
|
15
|
|
|
|
|
19
|
(do { |
1292
|
|
|
|
|
|
|
((do { |
1293
|
15
|
|
|
|
|
47
|
((my $m2) = $grammar->concat_list($str, $MATCH->to())); |
1294
|
15
|
50
|
|
|
|
44
|
if ($m2) { |
1295
|
15
|
|
|
|
|
47
|
(($MATCH)->{to} = $m2->to()); |
1296
|
15
|
|
|
|
|
32
|
($MATCH->{'concat_list'} = $m2); |
1297
|
15
|
|
|
|
|
61
|
1 |
1298
|
|
|
|
|
|
|
} |
1299
|
|
|
|
|
|
|
else { |
1300
|
0
|
|
|
|
|
0
|
0 |
1301
|
|
|
|
|
|
|
} |
1302
|
15
|
50
|
50
|
|
|
17
|
}) && (((do { |
1303
|
15
|
|
|
|
|
22
|
($MATCH->{capture} = (Rul::Concat->new(('concat' => ${$MATCH->{'concat_list'}})))) |
|
15
|
|
|
|
|
43
|
|
1304
|
|
|
|
|
|
|
}) || 1))) |
1305
|
|
|
|
|
|
|
}) |
1306
|
|
|
|
|
|
|
}))); |
1307
|
15
|
|
|
|
|
47
|
$MATCH |
1308
|
|
|
|
|
|
|
}; |
1309
|
|
|
|
|
|
|
sub or_list_exp { |
1310
|
15
|
|
|
15
|
0
|
31
|
my $grammar = $_[0]; |
1311
|
15
|
|
|
|
|
20
|
my $str = $_[1]; |
1312
|
15
|
|
|
|
|
19
|
my $pos = $_[2]; |
1313
|
15
|
|
|
|
|
20
|
(my $MATCH); |
1314
|
15
|
|
|
|
|
98
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1315
|
15
|
|
|
|
|
23
|
(($MATCH)->{bool} = ((do { |
1316
|
15
|
|
|
|
|
45
|
((my $pos1) = $MATCH->to()); |
1317
|
|
|
|
|
|
|
((do { |
1318
|
|
|
|
|
|
|
((do { |
1319
|
15
|
|
|
|
|
48
|
((my $m2) = $grammar->concat_exp($str, $MATCH->to())); |
1320
|
15
|
50
|
|
|
|
46
|
if ($m2) { |
1321
|
15
|
|
|
|
|
48
|
(($MATCH)->{to} = $m2->to()); |
1322
|
15
|
|
|
|
|
42
|
($MATCH->{'concat_exp'} = $m2); |
1323
|
15
|
|
|
|
|
56
|
1 |
1324
|
|
|
|
|
|
|
} |
1325
|
|
|
|
|
|
|
else { |
1326
|
0
|
|
|
|
|
0
|
0 |
1327
|
|
|
|
|
|
|
} |
1328
|
15
|
50
|
|
|
|
19
|
}) && (do { |
1329
|
15
|
|
|
|
|
43
|
((my $pos1) = $MATCH->to()); |
1330
|
|
|
|
|
|
|
((do { |
1331
|
|
|
|
|
|
|
(((((chr(124) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
1332
|
7
|
|
|
|
|
22
|
((my $m2) = $grammar->or_list_exp($str, $MATCH->to())); |
1333
|
7
|
50
|
|
|
|
21
|
if ($m2) { |
1334
|
7
|
|
|
|
|
21
|
(($MATCH)->{to} = $m2->to()); |
1335
|
7
|
|
|
|
|
28
|
($MATCH->{'or_list_exp'} = $m2); |
1336
|
7
|
|
|
|
|
59
|
1 |
1337
|
|
|
|
|
|
|
} |
1338
|
|
|
|
|
|
|
else { |
1339
|
0
|
|
|
|
|
0
|
0 |
1340
|
|
|
|
|
|
|
} |
1341
|
15
|
50
|
50
|
|
|
45
|
})) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
1342
|
7
|
|
|
|
|
9
|
($MATCH->{capture} = (do { |
1343
|
7
|
|
|
|
|
19
|
(my $List_a = bless [], 'ARRAY'); |
1344
|
7
|
|
|
|
|
14
|
(my $List_v = bless [], 'ARRAY'); |
1345
|
7
|
|
|
|
|
10
|
push( @{$List_a}, ${$MATCH->{'concat_exp'}} ); |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
22
|
|
1346
|
7
|
|
|
|
|
11
|
($List_v = ((${$MATCH->{'or_list_exp'}}))); |
|
7
|
|
|
|
|
20
|
|
1347
|
7
|
|
|
|
|
14
|
for my $x ( @{(bless [0 .. ((scalar( @{$List_v} ) - 1))], 'ARRAY')} ) { |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
32
|
|
1348
|
10
|
|
|
|
|
10
|
push( @{$List_a}, $List_v->[$x] ) |
|
10
|
|
|
|
|
29
|
|
1349
|
|
|
|
|
|
|
}; |
1350
|
7
|
|
|
|
|
34
|
$List_a |
1351
|
|
|
|
|
|
|
})) |
1352
|
|
|
|
|
|
|
}) || 1))) |
1353
|
15
|
100
|
|
|
|
24
|
}) || (do { |
1354
|
8
|
|
|
|
|
22
|
(($MATCH)->{to} = $pos1); |
1355
|
8
|
50
|
|
|
|
8
|
((((do { |
1356
|
8
|
|
|
|
|
55
|
($MATCH->{capture} = (do { |
1357
|
8
|
|
|
|
|
26
|
(my $List_a = bless [], 'ARRAY'); |
1358
|
8
|
|
|
|
|
22
|
(my $List_v = bless [], 'ARRAY'); |
1359
|
8
|
|
|
|
|
13
|
push( @{$List_a}, ${$MATCH->{'concat_exp'}} ); |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
24
|
|
1360
|
8
|
|
|
|
|
37
|
$List_a |
1361
|
|
|
|
|
|
|
})) |
1362
|
|
|
|
|
|
|
}) || 1))) |
1363
|
|
|
|
|
|
|
})) |
1364
|
|
|
|
|
|
|
})) |
1365
|
15
|
50
|
|
|
|
25
|
}) || (do { |
1366
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
1367
|
0
|
0
|
|
|
|
0
|
((((do { |
1368
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (do { |
1369
|
0
|
|
|
|
|
0
|
(my $List_a = bless [], 'ARRAY'); |
1370
|
0
|
|
|
|
|
0
|
(my $List_v = bless [], 'ARRAY'); |
1371
|
0
|
|
|
|
|
0
|
$List_a |
1372
|
|
|
|
|
|
|
})) |
1373
|
|
|
|
|
|
|
}) || 1))) |
1374
|
|
|
|
|
|
|
})) |
1375
|
|
|
|
|
|
|
}))); |
1376
|
15
|
|
|
|
|
57
|
$MATCH |
1377
|
|
|
|
|
|
|
}; |
1378
|
|
|
|
|
|
|
sub rule { |
1379
|
8
|
|
|
8
|
0
|
16
|
my $grammar = $_[0]; |
1380
|
8
|
|
|
|
|
15
|
my $str = $_[1]; |
1381
|
8
|
|
|
|
|
12
|
my $pos = $_[2]; |
1382
|
8
|
|
|
|
|
11
|
(my $MATCH); |
1383
|
8
|
|
|
|
|
40
|
($MATCH = Perlito::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1384
|
8
|
|
|
|
|
12
|
(($MATCH)->{bool} = ((do { |
1385
|
8
|
|
|
|
|
29
|
((my $pos1) = $MATCH->to()); |
1386
|
8
|
|
|
|
|
13
|
(do { |
1387
|
|
|
|
|
|
|
(((do { |
1388
|
8
|
|
|
|
|
24
|
((my $pos1) = $MATCH->to()); |
1389
|
|
|
|
|
|
|
((do { |
1390
|
8
|
50
|
33
|
|
|
11
|
((do { |
1391
|
8
|
|
|
|
|
21
|
((my $last_pos) = $MATCH->to()); |
1392
|
8
|
50
|
|
|
|
12
|
if (!((do { |
1393
|
8
|
|
|
|
|
32
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
1394
|
8
|
50
|
|
|
|
30
|
if ($m2) { |
1395
|
8
|
|
|
|
|
28
|
(($MATCH)->{to} = $m2->to()); |
1396
|
8
|
|
|
|
|
34
|
1 |
1397
|
|
|
|
|
|
|
} |
1398
|
|
|
|
|
|
|
else { |
1399
|
0
|
|
|
|
|
0
|
0 |
1400
|
|
|
|
|
|
|
} |
1401
|
|
|
|
|
|
|
}))) { |
1402
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $last_pos) |
1403
|
|
|
|
|
|
|
}; |
1404
|
8
|
|
|
|
|
70
|
1 |
1405
|
|
|
|
|
|
|
}) && (((chr(124) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1406
|
8
|
50
|
|
|
|
12
|
}) || (do { |
1407
|
8
|
|
|
|
|
17
|
(($MATCH)->{to} = $pos1); |
1408
|
8
|
|
|
|
|
30
|
(1) |
1409
|
|
|
|
|
|
|
})) |
1410
|
|
|
|
|
|
|
}) && (do { |
1411
|
8
|
|
|
|
|
30
|
((my $m2) = $grammar->or_list_exp($str, $MATCH->to())); |
1412
|
8
|
50
|
|
|
|
25
|
if ($m2) { |
1413
|
8
|
|
|
|
|
30
|
(($MATCH)->{to} = $m2->to()); |
1414
|
8
|
|
|
|
|
24
|
($MATCH->{'or_list_exp'} = $m2); |
1415
|
8
|
|
|
|
|
41
|
1 |
1416
|
|
|
|
|
|
|
} |
1417
|
|
|
|
|
|
|
else { |
1418
|
0
|
|
|
|
|
0
|
0 |
1419
|
|
|
|
|
|
|
} |
1420
|
8
|
50
|
50
|
|
|
11
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
1421
|
8
|
|
|
|
|
13
|
($MATCH->{capture} = (Rul::Or->new(('or_list' => ${$MATCH->{'or_list_exp'}})))) |
|
8
|
|
|
|
|
26
|
|
1422
|
|
|
|
|
|
|
}) || 1))) |
1423
|
|
|
|
|
|
|
}) |
1424
|
|
|
|
|
|
|
}))); |
1425
|
8
|
|
|
|
|
41
|
$MATCH |
1426
|
|
|
|
|
|
|
} |
1427
|
|
|
|
|
|
|
} |
1428
|
|
|
|
|
|
|
|
1429
|
|
|
|
|
|
|
|
1430
|
|
|
|
|
|
|
} |
1431
|
|
|
|
|
|
|
|
1432
|
|
|
|
|
|
|
1; |