line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Do not edit this file - Generated by Perlito6 9.0 |
2
|
31
|
|
|
31
|
|
357
|
use v5; |
|
31
|
|
|
|
|
76
|
|
3
|
31
|
|
|
31
|
|
113
|
use utf8; |
|
31
|
|
|
|
|
42
|
|
|
31
|
|
|
|
|
171
|
|
4
|
31
|
|
|
31
|
|
626
|
use strict; |
|
31
|
|
|
|
|
34
|
|
|
31
|
|
|
|
|
526
|
|
5
|
31
|
|
|
31
|
|
93
|
use warnings; |
|
31
|
|
|
|
|
36
|
|
|
31
|
|
|
|
|
995
|
|
6
|
31
|
|
|
31
|
|
90
|
no warnings ('redefine', 'once', 'void', 'uninitialized', 'misc', 'recursion'); |
|
31
|
|
|
|
|
35
|
|
|
31
|
|
|
|
|
1142
|
|
7
|
31
|
|
|
31
|
|
110
|
use Perlito6::Perl5::Runtime; |
|
31
|
|
|
|
|
28
|
|
|
31
|
|
|
|
|
651
|
|
8
|
31
|
|
|
31
|
|
129
|
use Perlito6::Perl5::Prelude; |
|
31
|
|
|
|
|
39
|
|
|
31
|
|
|
|
|
213354
|
|
9
|
|
|
|
|
|
|
our $MATCH = Perlito6::Match->new(); |
10
|
|
|
|
|
|
|
{ |
11
|
|
|
|
|
|
|
package GLOBAL; |
12
|
|
|
|
|
|
|
sub new { shift; bless { @_ }, "GLOBAL" } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# use v6 |
15
|
|
|
|
|
|
|
; |
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
package Perlito6::Grammar::Regex; |
18
|
0
|
|
|
0
|
0
|
0
|
sub new { shift; bless { @_ }, "Perlito6::Grammar::Regex" } |
|
0
|
|
|
|
|
0
|
|
19
|
|
|
|
|
|
|
(my $Hash_rule_terms = bless {}, 'HASH'); |
20
|
|
|
|
|
|
|
sub ws { |
21
|
8
|
|
|
8
|
0
|
9
|
my $grammar = $_[0]; |
22
|
8
|
|
|
|
|
12
|
my $str = $_[1]; |
23
|
8
|
|
|
|
|
3
|
my $pos = $_[2]; |
24
|
8
|
|
|
|
|
8
|
(my $MATCH); |
25
|
8
|
|
|
|
|
14
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
26
|
8
|
|
|
|
|
5
|
(($MATCH)->{bool} = ((do { |
27
|
8
|
|
|
|
|
16
|
((my $pos1) = $MATCH->to()); |
28
|
8
|
|
|
|
|
7
|
(do { |
29
|
8
|
|
|
|
|
13
|
((my $m2) = Perlito6::Grammar->ws($str, $MATCH->to())); |
30
|
8
|
50
|
|
|
|
10
|
if ($m2) { |
31
|
8
|
|
|
|
|
12
|
(($MATCH)->{to} = $m2->to()); |
32
|
8
|
|
|
|
|
13
|
1 |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
else { |
35
|
0
|
|
|
|
|
0
|
0 |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
}) |
38
|
|
|
|
|
|
|
}))); |
39
|
8
|
|
|
|
|
12
|
$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 = Perlito6::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) = Perlito6::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 = Perlito6::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
|
8
|
my $grammar = $_[0]; |
91
|
9
|
|
|
|
|
9
|
my $str = $_[1]; |
92
|
9
|
|
|
|
|
7
|
my $pos = $_[2]; |
93
|
9
|
|
|
|
|
4
|
(my $MATCH); |
94
|
9
|
|
|
|
|
17
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
95
|
9
|
|
|
|
|
9
|
(($MATCH)->{bool} = ((do { |
96
|
9
|
|
|
|
|
14
|
((my $pos1) = $MATCH->to()); |
97
|
9
|
|
|
|
|
5
|
(do { |
98
|
9
|
|
|
|
|
9
|
((my $last_match_null) = 0); |
99
|
9
|
|
|
|
|
16
|
((my $last_pos) = $MATCH->to()); |
100
|
9
|
|
66
|
|
|
6
|
for ( ; ((do { |
101
|
18
|
|
|
|
|
26
|
((my $pos1) = $MATCH->to()); |
102
|
|
|
|
|
|
|
((do { |
103
|
18
|
50
|
0
|
|
|
26
|
((((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
|
|
|
|
35
|
}) || (do { |
105
|
18
|
|
|
|
|
19
|
(($MATCH)->{to} = $pos1); |
106
|
|
|
|
|
|
|
(((do { |
107
|
18
|
|
|
|
|
13
|
((my $tmp) = $MATCH); |
108
|
18
|
|
|
|
|
33
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
109
|
18
|
|
|
|
|
16
|
(($MATCH)->{bool} = (do { |
110
|
18
|
|
|
|
|
24
|
((my $pos1) = $MATCH->to()); |
111
|
18
|
|
|
|
|
12
|
(do { |
112
|
18
|
100
|
|
|
|
28
|
((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
113
|
|
|
|
|
|
|
}) |
114
|
|
|
|
|
|
|
})); |
115
|
18
|
|
|
|
|
33
|
(($tmp)->{bool} = !($MATCH)); |
116
|
18
|
|
|
|
|
17
|
($MATCH = $tmp); |
117
|
18
|
|
|
|
|
33
|
!!($MATCH) |
118
|
18
|
100
|
33
|
|
|
15
|
}) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
119
|
|
|
|
|
|
|
})) |
120
|
|
|
|
|
|
|
}) && (($last_match_null < 2))); ) { |
121
|
9
|
50
|
|
|
|
19
|
if (($last_pos == $MATCH->to())) { |
122
|
0
|
|
|
|
|
0
|
($last_match_null = ($last_match_null + 1)) |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
else { |
125
|
9
|
|
|
|
|
9
|
($last_match_null = 0) |
126
|
|
|
|
|
|
|
}; |
127
|
9
|
|
|
|
|
15
|
($last_pos = $MATCH->to()) |
128
|
|
|
|
|
|
|
}; |
129
|
9
|
|
|
|
|
11
|
(($MATCH)->{to} = $last_pos); |
130
|
9
|
|
|
|
|
14
|
1 |
131
|
|
|
|
|
|
|
}) |
132
|
|
|
|
|
|
|
}))); |
133
|
9
|
|
|
|
|
10
|
$MATCH |
134
|
|
|
|
|
|
|
}; |
135
|
|
|
|
|
|
|
sub metasyntax_exp { |
136
|
2
|
|
|
2
|
0
|
2
|
my $grammar = $_[0]; |
137
|
2
|
|
|
|
|
3
|
my $str = $_[1]; |
138
|
2
|
|
|
|
|
2
|
my $pos = $_[2]; |
139
|
2
|
|
|
|
|
1
|
(my $MATCH); |
140
|
2
|
|
|
|
|
5
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
141
|
2
|
|
|
|
|
3
|
(($MATCH)->{bool} = ((do { |
142
|
2
|
|
|
|
|
5
|
((my $pos1) = $MATCH->to()); |
143
|
2
|
|
|
|
|
3
|
(do { |
144
|
2
|
|
|
|
|
1
|
((my $last_match_null) = 0); |
145
|
2
|
|
|
|
|
4
|
((my $last_pos) = $MATCH->to()); |
146
|
2
|
|
|
|
|
2
|
((my $count) = 0); |
147
|
2
|
|
66
|
|
|
2
|
for ( ; ((do { |
148
|
13
|
|
|
|
|
19
|
((my $pos1) = $MATCH->to()); |
149
|
|
|
|
|
|
|
(((((do { |
150
|
13
|
50
|
0
|
|
|
17
|
((((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
|
|
|
|
|
10
|
(($MATCH)->{to} = $pos1); |
153
|
|
|
|
|
|
|
((((((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
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
|
13
|
0
|
0
|
|
|
20
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
163
|
|
|
|
|
|
|
})) || (do { |
164
|
13
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
165
|
|
|
|
|
|
|
((((((chr(123) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
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
|
13
|
0
|
0
|
|
|
21
|
})) && (((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
175
|
|
|
|
|
|
|
})) || (do { |
176
|
13
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
177
|
|
|
|
|
|
|
(((((('<' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
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
|
13
|
0
|
0
|
|
|
16
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
187
|
13
|
50
|
33
|
|
|
9
|
})) || (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
188
|
13
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
189
|
|
|
|
|
|
|
(((do { |
190
|
13
|
|
|
|
|
12
|
((my $tmp) = $MATCH); |
191
|
13
|
|
|
|
|
17
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
192
|
13
|
|
|
|
|
10
|
(($MATCH)->{bool} = (do { |
193
|
13
|
|
|
|
|
18
|
((my $pos1) = $MATCH->to()); |
194
|
13
|
|
|
|
|
8
|
(do { |
195
|
13
|
100
|
|
|
|
21
|
(('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
196
|
|
|
|
|
|
|
}) |
197
|
|
|
|
|
|
|
})); |
198
|
13
|
|
|
|
|
20
|
(($tmp)->{bool} = !($MATCH)); |
199
|
13
|
|
|
|
|
11
|
($MATCH = $tmp); |
200
|
13
|
|
|
|
|
21
|
!!($MATCH) |
201
|
13
|
100
|
33
|
|
|
6
|
}) && ((('' ne substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
202
|
|
|
|
|
|
|
})) |
203
|
|
|
|
|
|
|
}) && (($last_match_null < 2))); ) { |
204
|
11
|
50
|
|
|
|
20
|
if (($last_pos == $MATCH->to())) { |
205
|
0
|
|
|
|
|
0
|
($last_match_null = ($last_match_null + 1)) |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
else { |
208
|
11
|
|
|
|
|
9
|
($last_match_null = 0) |
209
|
|
|
|
|
|
|
}; |
210
|
11
|
|
|
|
|
15
|
($last_pos = $MATCH->to()); |
211
|
11
|
|
|
|
|
8
|
($count = ($count + 1)) |
212
|
|
|
|
|
|
|
}; |
213
|
2
|
|
|
|
|
3
|
(($MATCH)->{to} = $last_pos); |
214
|
2
|
|
|
|
|
3
|
($count > 0) |
215
|
|
|
|
|
|
|
}) |
216
|
|
|
|
|
|
|
}))); |
217
|
2
|
|
|
|
|
4
|
$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 = Perlito6::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
|
|
|
|
|
|
|
(((do { |
238
|
0
|
|
|
|
|
0
|
((my $tmp) = $MATCH); |
239
|
0
|
|
|
|
|
0
|
($MATCH = Perlito6::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
|
0
|
0
|
0
|
|
|
0
|
}) && ((('' 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 = Perlito6::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
|
|
|
|
|
|
|
(((((('[' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
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
|
0
|
0
|
0
|
|
|
0
|
})) && (((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
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 = Perlito6::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
|
|
|
|
|
|
|
((((((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
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
|
0
|
0
|
0
|
|
|
0
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
328
|
|
|
|
|
|
|
})) || (do { |
329
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
330
|
|
|
|
|
|
|
((((((chr(123) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
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
|
0
|
0
|
0
|
|
|
0
|
})) && (((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))))) |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
340
|
0
|
0
|
0
|
|
|
0
|
})) || (do { |
|
|
|
0
|
|
|
|
|
341
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $pos1); |
342
|
|
|
|
|
|
|
(((do { |
343
|
0
|
|
|
|
|
0
|
((my $tmp) = $MATCH); |
344
|
0
|
|
|
|
|
0
|
($MATCH = Perlito6::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
|
0
|
0
|
0
|
|
|
0
|
}) && ((('' 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 = Perlito6::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 = Perlito6::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
|
32
|
my $grammar = $_[0]; |
464
|
32
|
|
|
|
|
22
|
my $str = $_[1]; |
465
|
32
|
|
|
|
|
20
|
my $pos = $_[2]; |
466
|
32
|
|
|
|
|
25
|
(my $MATCH); |
467
|
32
|
|
|
|
|
54
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
468
|
32
|
|
|
|
|
25
|
(($MATCH)->{bool} = ((do { |
469
|
32
|
|
|
|
|
59
|
((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
|
|
|
45
|
})) && ((('>' 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
|
|
|
|
|
37
|
(($MATCH)->{to} = $pos1); |
486
|
|
|
|
|
|
|
((((do { |
487
|
32
|
|
|
|
|
54
|
((my $m2) = Perlito6::Grammar->var_sigil($str, $MATCH->to())); |
488
|
32
|
50
|
|
|
|
55
|
if ($m2) { |
489
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
490
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::Grammar.var_sigil'} = $m2); |
491
|
0
|
|
|
|
|
0
|
1 |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
else { |
494
|
32
|
|
|
|
|
97
|
0 |
495
|
|
|
|
|
|
|
} |
496
|
|
|
|
|
|
|
}) && (do { |
497
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito6::Grammar->val_int($str, $MATCH->to())); |
498
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
499
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
500
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::Grammar.val_int'} = $m2); |
501
|
0
|
|
|
|
|
0
|
1 |
502
|
|
|
|
|
|
|
} |
503
|
|
|
|
|
|
|
else { |
504
|
0
|
|
|
|
|
0
|
0 |
505
|
|
|
|
|
|
|
} |
506
|
32
|
0
|
0
|
|
|
22
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
507
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (($MATCH->{'Perlito6::Grammar.var_sigil'} . chr(47) . '[' . $MATCH->{'Perlito6::Grammar.val_int'} . ']'))) |
508
|
|
|
|
|
|
|
}) || 1)))) |
509
|
32
|
50
|
33
|
|
|
27
|
})) || (do { |
510
|
32
|
|
|
|
|
34
|
(($MATCH)->{to} = $pos1); |
511
|
|
|
|
|
|
|
(((((do { |
512
|
32
|
|
|
|
|
56
|
((my $m2) = Perlito6::Grammar->var_sigil($str, $MATCH->to())); |
513
|
32
|
50
|
|
|
|
45
|
if ($m2) { |
514
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
515
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::Grammar.var_sigil'} = $m2); |
516
|
0
|
|
|
|
|
0
|
1 |
517
|
|
|
|
|
|
|
} |
518
|
|
|
|
|
|
|
else { |
519
|
32
|
|
|
|
|
73
|
0 |
520
|
|
|
|
|
|
|
} |
521
|
|
|
|
|
|
|
}) && (do { |
522
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito6::Grammar->var_twigil($str, $MATCH->to())); |
523
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
524
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
525
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::Grammar.var_twigil'} = $m2); |
526
|
0
|
|
|
|
|
0
|
1 |
527
|
|
|
|
|
|
|
} |
528
|
|
|
|
|
|
|
else { |
529
|
0
|
|
|
|
|
0
|
0 |
530
|
|
|
|
|
|
|
} |
531
|
|
|
|
|
|
|
})) && (do { |
532
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito6::Grammar->full_ident($str, $MATCH->to())); |
533
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
534
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
535
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::Grammar.full_ident'} = $m2); |
536
|
0
|
|
|
|
|
0
|
1 |
537
|
|
|
|
|
|
|
} |
538
|
|
|
|
|
|
|
else { |
539
|
0
|
|
|
|
|
0
|
0 |
540
|
|
|
|
|
|
|
} |
541
|
32
|
0
|
0
|
|
|
22
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
0
|
|
|
|
|
542
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Var->new(('sigil' => "".($MATCH->{'Perlito6::Grammar.var_sigil'})), ('twigil' => "".($MATCH->{'Perlito6::Grammar.var_twigil'})), ('name' => "".($MATCH->{'Perlito6::Grammar.full_ident'}))))) |
543
|
|
|
|
|
|
|
}) || 1)))) |
544
|
|
|
|
|
|
|
})) |
545
|
|
|
|
|
|
|
}))); |
546
|
32
|
|
|
|
|
49
|
$MATCH |
547
|
|
|
|
|
|
|
}; |
548
|
|
|
|
|
|
|
sub rule_terms { |
549
|
30
|
|
|
30
|
0
|
25
|
my $grammar = $_[0]; |
550
|
30
|
|
|
|
|
20
|
my $str = $_[1]; |
551
|
30
|
|
|
|
|
23
|
my $pos = $_[2]; |
552
|
30
|
|
|
|
|
23
|
(my $MATCH); |
553
|
30
|
|
|
|
|
52
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
554
|
30
|
|
|
|
|
21
|
(($MATCH)->{bool} = ((do { |
555
|
30
|
|
|
|
|
54
|
((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
|
|
|
50
|
})) && (((')' 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
|
|
|
|
|
24
|
(($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
|
|
|
48
|
})) && (((')>' 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
|
|
|
|
|
26
|
(($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
|
|
|
47
|
})) && ((('>' 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
|
|
|
|
|
28
|
(($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
|
|
|
47
|
})) && ((('>' 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
|
|
|
|
|
28
|
(($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
|
|
|
46
|
})) && ((('>' 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
|
|
|
|
|
24
|
(($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
|
|
|
53
|
})) && ((('>' 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
|
|
|
|
|
40
|
(($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
|
|
|
44
|
})) && ((('>' 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
|
|
|
|
|
27
|
(($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
|
|
|
45
|
})) && ((('>' 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
|
|
|
|
|
31
|
(($MATCH)->{to} = $pos1); |
712
|
|
|
|
|
|
|
(((((((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
713
|
9
|
|
|
|
|
19
|
((my $m2) = $grammar->literal($str, $MATCH->to())); |
714
|
9
|
50
|
|
|
|
16
|
if ($m2) { |
715
|
9
|
|
|
|
|
18
|
(($MATCH)->{to} = $m2->to()); |
716
|
9
|
|
|
|
|
11
|
($MATCH->{'literal'} = $m2); |
717
|
9
|
|
|
|
|
25
|
1 |
718
|
|
|
|
|
|
|
} |
719
|
|
|
|
|
|
|
else { |
720
|
0
|
|
|
|
|
0
|
0 |
721
|
|
|
|
|
|
|
} |
722
|
30
|
50
|
50
|
|
|
49
|
})) && (((chr(39) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
723
|
9
|
|
|
|
|
8
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => ${$MATCH->{'literal'}})))) |
|
9
|
|
|
|
|
21
|
|
724
|
|
|
|
|
|
|
}) || 1)))) |
725
|
|
|
|
|
|
|
})) || (do { |
726
|
21
|
|
|
|
|
20
|
(($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
|
|
|
|
|
22
|
(($MATCH)->{to} = $pos1); |
742
|
21
|
100
|
66
|
|
|
31
|
((((('<' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
743
|
2
|
|
|
|
|
3
|
((my $pos1) = $MATCH->to()); |
744
|
|
|
|
|
|
|
((((do { |
745
|
|
|
|
|
|
|
(((do { |
746
|
2
|
|
|
|
|
4
|
((my $m2) = $grammar->variables($str, $MATCH->to())); |
747
|
2
|
50
|
|
|
|
3
|
if ($m2) { |
748
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
749
|
0
|
|
|
|
|
0
|
($MATCH->{'variables'} = $m2); |
750
|
0
|
|
|
|
|
0
|
1 |
751
|
|
|
|
|
|
|
} |
752
|
|
|
|
|
|
|
else { |
753
|
2
|
|
|
|
|
7
|
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
|
|
|
|
|
3
|
(($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
|
|
|
5
|
})) && ((('>' 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
|
|
|
|
|
2
|
(($MATCH)->{to} = $pos1); |
775
|
|
|
|
|
|
|
((((((('.' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
776
|
2
|
|
|
|
|
4
|
((my $m2) = $grammar->metasyntax_exp($str, $MATCH->to())); |
777
|
2
|
50
|
|
|
|
2
|
if ($m2) { |
778
|
2
|
|
|
|
|
4
|
(($MATCH)->{to} = $m2->to()); |
779
|
2
|
|
|
|
|
3
|
($MATCH->{'metasyntax_exp'} = $m2); |
780
|
2
|
|
|
|
|
7
|
1 |
781
|
|
|
|
|
|
|
} |
782
|
|
|
|
|
|
|
else { |
783
|
0
|
|
|
|
|
0
|
0 |
784
|
|
|
|
|
|
|
} |
785
|
2
|
50
|
50
|
|
|
3
|
})) && ((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
786
|
2
|
|
|
|
|
2
|
($MATCH->{capture} = (Rul::Subrule->new(('metasyntax' => ${$MATCH->{'metasyntax_exp'}}), ('captures' => 0)))) |
|
2
|
|
|
|
|
5
|
|
787
|
|
|
|
|
|
|
}) || 1)))) |
788
|
2
|
50
|
33
|
|
|
2
|
})) || (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
|
|
|
|
|
22
|
(($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
|
|
|
31
|
})) && (((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
|
|
|
|
|
18
|
(($MATCH)->{to} = $pos1); |
822
|
19
|
50
|
33
|
|
|
28
|
(((((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) = Perlito6::Grammar->digits($str, $MATCH->to())); |
827
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
828
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
829
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::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->{'Perlito6::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) = Perlito6::Grammar->digits($str, $MATCH->to())); |
842
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
843
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
844
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::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->{'Perlito6::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
|
|
|
|
|
19
|
(($MATCH)->{to} = $pos1); |
872
|
19
|
50
|
0
|
|
|
25
|
((((('.' 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
|
|
|
19
|
})) || (do { |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
876
|
19
|
|
|
|
|
14
|
(($MATCH)->{to} = $pos1); |
877
|
|
|
|
|
|
|
((((((('[' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
878
|
4
|
|
|
|
|
9
|
((my $m2) = $grammar->rule($str, $MATCH->to())); |
879
|
4
|
50
|
|
|
|
6
|
if ($m2) { |
880
|
4
|
|
|
|
|
9
|
(($MATCH)->{to} = $m2->to()); |
881
|
4
|
|
|
|
|
8
|
($MATCH->{'rule'} = $m2); |
882
|
4
|
|
|
|
|
15
|
1 |
883
|
|
|
|
|
|
|
} |
884
|
|
|
|
|
|
|
else { |
885
|
0
|
|
|
|
|
0
|
0 |
886
|
|
|
|
|
|
|
} |
887
|
19
|
50
|
50
|
|
|
29
|
})) && (((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
888
|
4
|
|
|
|
|
4
|
($MATCH->{capture} = (${$MATCH->{'rule'}})) |
|
4
|
|
|
|
|
6
|
|
889
|
|
|
|
|
|
|
}) || 1)))) |
890
|
|
|
|
|
|
|
})) |
891
|
|
|
|
|
|
|
}))); |
892
|
30
|
|
|
|
|
70
|
$MATCH |
893
|
|
|
|
|
|
|
}; |
894
|
|
|
|
|
|
|
sub rule_term { |
895
|
30
|
|
|
30
|
0
|
30
|
my $grammar = $_[0]; |
896
|
30
|
|
|
|
|
26
|
my $str = $_[1]; |
897
|
30
|
|
|
|
|
19
|
my $pos = $_[2]; |
898
|
30
|
|
|
|
|
20
|
(my $MATCH); |
899
|
30
|
|
|
|
|
65
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
900
|
30
|
|
|
|
|
21
|
(($MATCH)->{bool} = ((do { |
901
|
30
|
|
|
|
|
48
|
((my $pos1) = $MATCH->to()); |
902
|
|
|
|
|
|
|
(((do { |
903
|
|
|
|
|
|
|
((do { |
904
|
30
|
|
|
|
|
45
|
((my $m2) = $grammar->variables($str, $MATCH->to())); |
905
|
30
|
50
|
|
|
|
43
|
if ($m2) { |
906
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
907
|
0
|
|
|
|
|
0
|
($MATCH->{'variables'} = $m2); |
908
|
0
|
|
|
|
|
0
|
1 |
909
|
|
|
|
|
|
|
} |
910
|
|
|
|
|
|
|
else { |
911
|
30
|
|
|
|
|
90
|
0 |
912
|
|
|
|
|
|
|
} |
913
|
30
|
50
|
|
|
|
21
|
}) && (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
|
|
|
|
|
30
|
(($MATCH)->{to} = $pos1); |
968
|
|
|
|
|
|
|
(((do { |
969
|
30
|
|
|
|
|
52
|
((my $m2) = $grammar->rule_terms($str, $MATCH->to())); |
970
|
30
|
100
|
|
|
|
46
|
if ($m2) { |
971
|
15
|
|
|
|
|
28
|
(($MATCH)->{to} = $m2->to()); |
972
|
15
|
|
|
|
|
19
|
($MATCH->{'rule_terms'} = $m2); |
973
|
15
|
|
|
|
|
33
|
1 |
974
|
|
|
|
|
|
|
} |
975
|
|
|
|
|
|
|
else { |
976
|
15
|
|
|
|
|
50
|
0 |
977
|
|
|
|
|
|
|
} |
978
|
30
|
100
|
50
|
|
|
36
|
}) && (((do { |
979
|
15
|
|
|
|
|
8
|
($MATCH->{capture} = (${$MATCH->{'rule_terms'}})) |
|
15
|
|
|
|
|
28
|
|
980
|
|
|
|
|
|
|
}) || 1)))) |
981
|
30
|
100
|
33
|
|
|
20
|
})) || (do { |
982
|
15
|
|
|
|
|
16
|
(($MATCH)->{to} = $pos1); |
983
|
|
|
|
|
|
|
((((do { |
984
|
15
|
|
|
|
|
12
|
((my $tmp) = $MATCH); |
985
|
15
|
|
|
|
|
27
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $tmp->to()), ('to' => $tmp->to()), ('bool' => 1))); |
986
|
15
|
|
|
|
|
16
|
(($MATCH)->{bool} = (do { |
987
|
15
|
|
|
|
|
21
|
((my $pos1) = $MATCH->to()); |
988
|
|
|
|
|
|
|
(((((((((((do { |
989
|
15
|
100
|
|
|
|
28
|
((']' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
990
|
|
|
|
|
|
|
}) || (do { |
991
|
11
|
|
|
|
|
12
|
(($MATCH)->{to} = $pos1); |
992
|
11
|
100
|
|
|
|
20
|
((((chr(125) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
993
|
|
|
|
|
|
|
})) || (do { |
994
|
7
|
|
|
|
|
9
|
(($MATCH)->{to} = $pos1); |
995
|
7
|
50
|
|
|
|
12
|
((((')' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
996
|
|
|
|
|
|
|
})) || (do { |
997
|
7
|
|
|
|
|
7
|
(($MATCH)->{to} = $pos1); |
998
|
7
|
50
|
|
|
|
15
|
(((('>' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
999
|
|
|
|
|
|
|
})) || (do { |
1000
|
7
|
|
|
|
|
8
|
(($MATCH)->{to} = $pos1); |
1001
|
7
|
50
|
|
|
|
19
|
((((':' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1002
|
|
|
|
|
|
|
})) || (do { |
1003
|
7
|
|
|
|
|
9
|
(($MATCH)->{to} = $pos1); |
1004
|
7
|
50
|
|
|
|
14
|
((((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1005
|
|
|
|
|
|
|
})) || (do { |
1006
|
7
|
|
|
|
|
8
|
(($MATCH)->{to} = $pos1); |
1007
|
7
|
50
|
|
|
|
17
|
(((('+' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1008
|
|
|
|
|
|
|
})) || (do { |
1009
|
7
|
|
|
|
|
10
|
(($MATCH)->{to} = $pos1); |
1010
|
7
|
50
|
|
|
|
14
|
(((('*' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1011
|
|
|
|
|
|
|
})) || (do { |
1012
|
7
|
|
|
|
|
8
|
(($MATCH)->{to} = $pos1); |
1013
|
7
|
50
|
|
|
|
11
|
((((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
|
|
|
13
|
})) || (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
|
|
|
|
|
30
|
(($tmp)->{bool} = !($MATCH)); |
1023
|
15
|
|
|
|
|
14
|
($MATCH = $tmp); |
1024
|
15
|
|
|
|
|
20
|
!!($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
|
|
|
13
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
1036
|
0
|
|
|
|
|
0
|
($MATCH->{capture} = (Rul::Constant->new(('constant' => ${$MATCH->{'any'}})))) |
|
0
|
|
|
|
|
0
|
|
1037
|
|
|
|
|
|
|
}) || 1)))) |
1038
|
|
|
|
|
|
|
})) |
1039
|
|
|
|
|
|
|
}))); |
1040
|
30
|
|
|
|
|
39
|
$MATCH |
1041
|
|
|
|
|
|
|
}; |
1042
|
|
|
|
|
|
|
sub quant_exp { |
1043
|
15
|
|
|
15
|
0
|
15
|
my $grammar = $_[0]; |
1044
|
15
|
|
|
|
|
11
|
my $str = $_[1]; |
1045
|
15
|
|
|
|
|
17
|
my $pos = $_[2]; |
1046
|
15
|
|
|
|
|
14
|
(my $MATCH); |
1047
|
15
|
|
|
|
|
29
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1048
|
15
|
|
|
|
|
15
|
(($MATCH)->{bool} = ((do { |
1049
|
15
|
|
|
|
|
22
|
((my $pos1) = $MATCH->to()); |
1050
|
|
|
|
|
|
|
((do { |
1051
|
|
|
|
|
|
|
((((('**' eq substr($str, $MATCH->to(), 2)) && ((($MATCH)->{to} = (2 + $MATCH->to()))))) && (do { |
1052
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito6::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
|
|
|
26
|
})) && (do { |
|
|
|
33
|
|
|
|
|
1061
|
0
|
|
|
|
|
0
|
((my $pos1) = $MATCH->to()); |
1062
|
|
|
|
|
|
|
((do { |
1063
|
|
|
|
|
|
|
((do { |
1064
|
0
|
|
|
|
|
0
|
((my $m2) = Perlito6::Grammar->val_int($str, $MATCH->to())); |
1065
|
0
|
0
|
|
|
|
0
|
if ($m2) { |
1066
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $m2->to()); |
1067
|
0
|
|
|
|
|
0
|
($MATCH->{'Perlito6::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->{'Perlito6::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
|
|
|
|
10
|
}) || (do { |
1094
|
15
|
|
|
|
|
34
|
(($MATCH)->{to} = $pos1); |
1095
|
15
|
|
|
|
|
8
|
((do { |
1096
|
15
|
|
|
|
|
25
|
((my $pos1) = $MATCH->to()); |
1097
|
|
|
|
|
|
|
(((do { |
1098
|
15
|
50
|
|
|
|
25
|
((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
1099
|
|
|
|
|
|
|
}) || (do { |
1100
|
15
|
|
|
|
|
16
|
(($MATCH)->{to} = $pos1); |
1101
|
15
|
50
|
|
|
|
23
|
(((('*' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1102
|
15
|
50
|
33
|
|
|
10
|
})) || (do { |
1103
|
15
|
|
|
|
|
15
|
(($MATCH)->{to} = $pos1); |
1104
|
15
|
100
|
|
|
|
22
|
(((('+' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1105
|
|
|
|
|
|
|
})) |
1106
|
|
|
|
|
|
|
})) |
1107
|
|
|
|
|
|
|
})) |
1108
|
|
|
|
|
|
|
}))); |
1109
|
15
|
|
|
|
|
22
|
$MATCH |
1110
|
|
|
|
|
|
|
}; |
1111
|
|
|
|
|
|
|
sub greedy_exp { |
1112
|
4
|
|
|
4
|
0
|
4
|
my $grammar = $_[0]; |
1113
|
4
|
|
|
|
|
4
|
my $str = $_[1]; |
1114
|
4
|
|
|
|
|
4
|
my $pos = $_[2]; |
1115
|
4
|
|
|
|
|
4
|
(my $MATCH); |
1116
|
4
|
|
|
|
|
11
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1117
|
4
|
|
|
|
|
5
|
(($MATCH)->{bool} = ((do { |
1118
|
4
|
|
|
|
|
8
|
((my $pos1) = $MATCH->to()); |
1119
|
|
|
|
|
|
|
(((do { |
1120
|
4
|
50
|
|
|
|
8
|
((chr(63) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))) |
1121
|
|
|
|
|
|
|
}) || (do { |
1122
|
4
|
|
|
|
|
6
|
(($MATCH)->{to} = $pos1); |
1123
|
4
|
50
|
|
|
|
8
|
(((('+' eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1124
|
4
|
50
|
33
|
|
|
5
|
})) || (do { |
1125
|
4
|
|
|
|
|
5
|
(($MATCH)->{to} = $pos1); |
1126
|
4
|
|
|
|
|
5
|
(1) |
1127
|
|
|
|
|
|
|
})) |
1128
|
|
|
|
|
|
|
}))); |
1129
|
4
|
|
|
|
|
7
|
$MATCH |
1130
|
|
|
|
|
|
|
}; |
1131
|
|
|
|
|
|
|
sub quantifier { |
1132
|
30
|
|
|
30
|
0
|
27
|
my $grammar = $_[0]; |
1133
|
30
|
|
|
|
|
23
|
my $str = $_[1]; |
1134
|
30
|
|
|
|
|
20
|
my $pos = $_[2]; |
1135
|
30
|
|
|
|
|
17
|
(my $MATCH); |
1136
|
30
|
|
|
|
|
54
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1137
|
30
|
|
|
|
|
24
|
(($MATCH)->{bool} = ((do { |
1138
|
30
|
|
|
|
|
43
|
((my $pos1) = $MATCH->to()); |
1139
|
30
|
|
|
|
|
22
|
(do { |
1140
|
|
|
|
|
|
|
((((do { |
1141
|
30
|
|
|
|
|
47
|
((my $m2) = Perlito6::Grammar->opt_ws($str, $MATCH->to())); |
1142
|
30
|
50
|
|
|
|
46
|
if ($m2) { |
1143
|
30
|
|
|
|
|
48
|
(($MATCH)->{to} = $m2->to()); |
1144
|
30
|
|
|
|
|
73
|
1 |
1145
|
|
|
|
|
|
|
} |
1146
|
|
|
|
|
|
|
else { |
1147
|
0
|
|
|
|
|
0
|
0 |
1148
|
|
|
|
|
|
|
} |
1149
|
|
|
|
|
|
|
}) && (do { |
1150
|
30
|
|
|
|
|
46
|
((my $m2) = $grammar->rule_term($str, $MATCH->to())); |
1151
|
30
|
100
|
|
|
|
43
|
if ($m2) { |
1152
|
15
|
|
|
|
|
23
|
(($MATCH)->{to} = $m2->to()); |
1153
|
15
|
|
|
|
|
16
|
($MATCH->{'rule_term'} = $m2); |
1154
|
15
|
|
|
|
|
33
|
1 |
1155
|
|
|
|
|
|
|
} |
1156
|
|
|
|
|
|
|
else { |
1157
|
15
|
|
|
|
|
31
|
0 |
1158
|
|
|
|
|
|
|
} |
1159
|
|
|
|
|
|
|
})) && (do { |
1160
|
15
|
|
|
|
|
28
|
((my $m2) = Perlito6::Grammar->opt_ws2($str, $MATCH->to())); |
1161
|
15
|
50
|
|
|
|
22
|
if ($m2) { |
1162
|
15
|
|
|
|
|
23
|
(($MATCH)->{to} = $m2->to()); |
1163
|
15
|
|
|
|
|
36
|
1 |
1164
|
|
|
|
|
|
|
} |
1165
|
|
|
|
|
|
|
else { |
1166
|
0
|
|
|
|
|
0
|
0 |
1167
|
|
|
|
|
|
|
} |
1168
|
30
|
50
|
33
|
|
|
19
|
})) && (do { |
|
|
|
66
|
|
|
|
|
1169
|
15
|
|
|
|
|
28
|
((my $pos1) = $MATCH->to()); |
1170
|
|
|
|
|
|
|
((do { |
1171
|
|
|
|
|
|
|
((((do { |
1172
|
15
|
|
|
|
|
23
|
((my $m2) = $grammar->quant_exp($str, $MATCH->to())); |
1173
|
15
|
100
|
|
|
|
21
|
if ($m2) { |
1174
|
4
|
|
|
|
|
9
|
(($MATCH)->{to} = $m2->to()); |
1175
|
4
|
|
|
|
|
4
|
($MATCH->{'quant_exp'} = $m2); |
1176
|
4
|
|
|
|
|
10
|
1 |
1177
|
|
|
|
|
|
|
} |
1178
|
|
|
|
|
|
|
else { |
1179
|
11
|
|
|
|
|
39
|
0 |
1180
|
|
|
|
|
|
|
} |
1181
|
|
|
|
|
|
|
}) && (do { |
1182
|
4
|
|
|
|
|
9
|
((my $m2) = $grammar->greedy_exp($str, $MATCH->to())); |
1183
|
4
|
50
|
|
|
|
6
|
if ($m2) { |
1184
|
4
|
|
|
|
|
10
|
(($MATCH)->{to} = $m2->to()); |
1185
|
4
|
|
|
|
|
7
|
($MATCH->{'greedy_exp'} = $m2); |
1186
|
4
|
|
|
|
|
14
|
1 |
1187
|
|
|
|
|
|
|
} |
1188
|
|
|
|
|
|
|
else { |
1189
|
0
|
|
|
|
|
0
|
0 |
1190
|
|
|
|
|
|
|
} |
1191
|
|
|
|
|
|
|
})) && (do { |
1192
|
4
|
|
|
|
|
9
|
((my $m2) = Perlito6::Grammar->opt_ws3($str, $MATCH->to())); |
1193
|
4
|
50
|
|
|
|
11
|
if ($m2) { |
1194
|
4
|
|
|
|
|
10
|
(($MATCH)->{to} = $m2->to()); |
1195
|
4
|
|
|
|
|
15
|
1 |
1196
|
|
|
|
|
|
|
} |
1197
|
|
|
|
|
|
|
else { |
1198
|
0
|
|
|
|
|
0
|
0 |
1199
|
|
|
|
|
|
|
} |
1200
|
15
|
50
|
50
|
|
|
10
|
})) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
1201
|
4
|
|
|
|
|
6
|
($MATCH->{capture} = (Rul::Quantifier->new(('term' => ${$MATCH->{'rule_term'}}), ('quant' => ${$MATCH->{'quant_exp'}}), ('greedy' => ${$MATCH->{'greedy_exp'}}), ('ws1' => ${$MATCH->{'Perlito6::Grammar.opt_ws'}}), ('ws2' => ${$MATCH->{'Perlito6::Grammar.opt_ws2'}}), ('ws3' => ${$MATCH->{'Perlito6::Grammar.opt_ws3'}})))) |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
19
|
|
1202
|
|
|
|
|
|
|
}) || 1))) |
1203
|
15
|
100
|
|
|
|
9
|
}) || (do { |
1204
|
11
|
|
|
|
|
11
|
(($MATCH)->{to} = $pos1); |
1205
|
11
|
50
|
|
|
|
10
|
((((do { |
1206
|
11
|
|
|
|
|
6
|
($MATCH->{capture} = (${$MATCH->{'rule_term'}})) |
|
11
|
|
|
|
|
19
|
|
1207
|
|
|
|
|
|
|
}) || 1))) |
1208
|
|
|
|
|
|
|
})) |
1209
|
|
|
|
|
|
|
})) |
1210
|
|
|
|
|
|
|
}) |
1211
|
|
|
|
|
|
|
}))); |
1212
|
30
|
|
|
|
|
51
|
$MATCH |
1213
|
|
|
|
|
|
|
}; |
1214
|
|
|
|
|
|
|
sub concat_list { |
1215
|
30
|
|
|
30
|
0
|
28
|
my $grammar = $_[0]; |
1216
|
30
|
|
|
|
|
20
|
my $str = $_[1]; |
1217
|
30
|
|
|
|
|
24
|
my $pos = $_[2]; |
1218
|
30
|
|
|
|
|
23
|
(my $MATCH); |
1219
|
30
|
|
|
|
|
59
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1220
|
30
|
|
|
|
|
24
|
(($MATCH)->{bool} = ((do { |
1221
|
30
|
|
|
|
|
46
|
((my $pos1) = $MATCH->to()); |
1222
|
|
|
|
|
|
|
((do { |
1223
|
|
|
|
|
|
|
((do { |
1224
|
30
|
|
|
|
|
47
|
((my $m2) = $grammar->quantifier($str, $MATCH->to())); |
1225
|
30
|
100
|
|
|
|
42
|
if ($m2) { |
1226
|
15
|
|
|
|
|
25
|
(($MATCH)->{to} = $m2->to()); |
1227
|
15
|
|
|
|
|
17
|
($MATCH->{'quantifier'} = $m2); |
1228
|
15
|
|
|
|
|
31
|
1 |
1229
|
|
|
|
|
|
|
} |
1230
|
|
|
|
|
|
|
else { |
1231
|
15
|
|
|
|
|
49
|
0 |
1232
|
|
|
|
|
|
|
} |
1233
|
30
|
100
|
|
|
|
20
|
}) && (do { |
1234
|
15
|
|
|
|
|
21
|
((my $pos1) = $MATCH->to()); |
1235
|
|
|
|
|
|
|
((do { |
1236
|
|
|
|
|
|
|
((do { |
1237
|
15
|
|
|
|
|
22
|
((my $m2) = $grammar->concat_list($str, $MATCH->to())); |
1238
|
15
|
50
|
|
|
|
38
|
if ($m2) { |
1239
|
15
|
|
|
|
|
25
|
(($MATCH)->{to} = $m2->to()); |
1240
|
15
|
|
|
|
|
20
|
($MATCH->{'concat_list'} = $m2); |
1241
|
15
|
|
|
|
|
31
|
1 |
1242
|
|
|
|
|
|
|
} |
1243
|
|
|
|
|
|
|
else { |
1244
|
0
|
|
|
|
|
0
|
0 |
1245
|
|
|
|
|
|
|
} |
1246
|
15
|
50
|
50
|
|
|
13
|
}) && (((do { |
1247
|
15
|
|
|
|
|
12
|
($MATCH->{capture} = (do { |
1248
|
15
|
|
|
|
|
17
|
(my $List_a = bless [], 'ARRAY'); |
1249
|
15
|
|
|
|
|
16
|
(my $List_v = bless [], 'ARRAY'); |
1250
|
15
|
|
|
|
|
12
|
push( @{$List_a}, ${$MATCH->{'quantifier'}} ); |
|
15
|
|
|
|
|
14
|
|
|
15
|
|
|
|
|
28
|
|
1251
|
15
|
|
|
|
|
15
|
($List_v = ((${$MATCH->{'concat_list'}}))); |
|
15
|
|
|
|
|
22
|
|
1252
|
15
|
|
|
|
|
14
|
for my $x ( @{(bless [0 .. ((scalar( @{$List_v} ) - 1))], 'ARRAY')} ) { |
|
15
|
|
|
|
|
18
|
|
|
15
|
|
|
|
|
41
|
|
1253
|
0
|
|
|
|
|
0
|
push( @{$List_a}, $List_v->[$x] ) |
|
0
|
|
|
|
|
0
|
|
1254
|
|
|
|
|
|
|
}; |
1255
|
15
|
|
|
|
|
33
|
$List_a |
1256
|
|
|
|
|
|
|
})) |
1257
|
|
|
|
|
|
|
}) || 1))) |
1258
|
15
|
50
|
|
|
|
18
|
}) || (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
|
|
|
|
22
|
}) || (do { |
1271
|
15
|
|
|
|
|
16
|
(($MATCH)->{to} = $pos1); |
1272
|
15
|
50
|
|
|
|
8
|
((((do { |
1273
|
15
|
|
|
|
|
11
|
($MATCH->{capture} = (do { |
1274
|
15
|
|
|
|
|
21
|
(my $List_a = bless [], 'ARRAY'); |
1275
|
15
|
|
|
|
|
15
|
(my $List_v = bless [], 'ARRAY'); |
1276
|
15
|
|
|
|
|
38
|
$List_a |
1277
|
|
|
|
|
|
|
})) |
1278
|
|
|
|
|
|
|
}) || 1))) |
1279
|
|
|
|
|
|
|
})) |
1280
|
|
|
|
|
|
|
}))); |
1281
|
30
|
|
|
|
|
51
|
$MATCH |
1282
|
|
|
|
|
|
|
}; |
1283
|
|
|
|
|
|
|
sub concat_exp { |
1284
|
15
|
|
|
15
|
0
|
13
|
my $grammar = $_[0]; |
1285
|
15
|
|
|
|
|
13
|
my $str = $_[1]; |
1286
|
15
|
|
|
|
|
13
|
my $pos = $_[2]; |
1287
|
15
|
|
|
|
|
9
|
(my $MATCH); |
1288
|
15
|
|
|
|
|
27
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1289
|
15
|
|
|
|
|
13
|
(($MATCH)->{bool} = ((do { |
1290
|
15
|
|
|
|
|
25
|
((my $pos1) = $MATCH->to()); |
1291
|
15
|
|
|
|
|
11
|
(do { |
1292
|
|
|
|
|
|
|
((do { |
1293
|
15
|
|
|
|
|
24
|
((my $m2) = $grammar->concat_list($str, $MATCH->to())); |
1294
|
15
|
50
|
|
|
|
23
|
if ($m2) { |
1295
|
15
|
|
|
|
|
26
|
(($MATCH)->{to} = $m2->to()); |
1296
|
15
|
|
|
|
|
16
|
($MATCH->{'concat_list'} = $m2); |
1297
|
15
|
|
|
|
|
40
|
1 |
1298
|
|
|
|
|
|
|
} |
1299
|
|
|
|
|
|
|
else { |
1300
|
0
|
|
|
|
|
0
|
0 |
1301
|
|
|
|
|
|
|
} |
1302
|
15
|
50
|
50
|
|
|
15
|
}) && (((do { |
1303
|
15
|
|
|
|
|
15
|
($MATCH->{capture} = (Rul::Concat->new(('concat' => ${$MATCH->{'concat_list'}})))) |
|
15
|
|
|
|
|
30
|
|
1304
|
|
|
|
|
|
|
}) || 1))) |
1305
|
|
|
|
|
|
|
}) |
1306
|
|
|
|
|
|
|
}))); |
1307
|
15
|
|
|
|
|
30
|
$MATCH |
1308
|
|
|
|
|
|
|
}; |
1309
|
|
|
|
|
|
|
sub or_list_exp { |
1310
|
15
|
|
|
15
|
0
|
16
|
my $grammar = $_[0]; |
1311
|
15
|
|
|
|
|
15
|
my $str = $_[1]; |
1312
|
15
|
|
|
|
|
15
|
my $pos = $_[2]; |
1313
|
15
|
|
|
|
|
11
|
(my $MATCH); |
1314
|
15
|
|
|
|
|
27
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1315
|
15
|
|
|
|
|
13
|
(($MATCH)->{bool} = ((do { |
1316
|
15
|
|
|
|
|
24
|
((my $pos1) = $MATCH->to()); |
1317
|
|
|
|
|
|
|
((do { |
1318
|
|
|
|
|
|
|
((do { |
1319
|
15
|
|
|
|
|
24
|
((my $m2) = $grammar->concat_exp($str, $MATCH->to())); |
1320
|
15
|
50
|
|
|
|
34
|
if ($m2) { |
1321
|
15
|
|
|
|
|
32
|
(($MATCH)->{to} = $m2->to()); |
1322
|
15
|
|
|
|
|
18
|
($MATCH->{'concat_exp'} = $m2); |
1323
|
15
|
|
|
|
|
28
|
1 |
1324
|
|
|
|
|
|
|
} |
1325
|
|
|
|
|
|
|
else { |
1326
|
0
|
|
|
|
|
0
|
0 |
1327
|
|
|
|
|
|
|
} |
1328
|
15
|
50
|
|
|
|
11
|
}) && (do { |
1329
|
15
|
|
|
|
|
25
|
((my $pos1) = $MATCH->to()); |
1330
|
|
|
|
|
|
|
((do { |
1331
|
|
|
|
|
|
|
(((((chr(124) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to()))))) && (do { |
1332
|
7
|
|
|
|
|
14
|
((my $m2) = $grammar->or_list_exp($str, $MATCH->to())); |
1333
|
7
|
50
|
|
|
|
10
|
if ($m2) { |
1334
|
7
|
|
|
|
|
11
|
(($MATCH)->{to} = $m2->to()); |
1335
|
7
|
|
|
|
|
7
|
($MATCH->{'or_list_exp'} = $m2); |
1336
|
7
|
|
|
|
|
25
|
1 |
1337
|
|
|
|
|
|
|
} |
1338
|
|
|
|
|
|
|
else { |
1339
|
0
|
|
|
|
|
0
|
0 |
1340
|
|
|
|
|
|
|
} |
1341
|
15
|
50
|
50
|
|
|
24
|
})) && (((do { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
1342
|
7
|
|
|
|
|
9
|
($MATCH->{capture} = (do { |
1343
|
7
|
|
|
|
|
7
|
(my $List_a = bless [], 'ARRAY'); |
1344
|
7
|
|
|
|
|
8
|
(my $List_v = bless [], 'ARRAY'); |
1345
|
7
|
|
|
|
|
6
|
push( @{$List_a}, ${$MATCH->{'concat_exp'}} ); |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
12
|
|
1346
|
7
|
|
|
|
|
6
|
($List_v = ((${$MATCH->{'or_list_exp'}}))); |
|
7
|
|
|
|
|
11
|
|
1347
|
7
|
|
|
|
|
9
|
for my $x ( @{(bless [0 .. ((scalar( @{$List_v} ) - 1))], 'ARRAY')} ) { |
|
7
|
|
|
|
|
6
|
|
|
7
|
|
|
|
|
16
|
|
1348
|
10
|
|
|
|
|
9
|
push( @{$List_a}, $List_v->[$x] ) |
|
10
|
|
|
|
|
17
|
|
1349
|
|
|
|
|
|
|
}; |
1350
|
7
|
|
|
|
|
16
|
$List_a |
1351
|
|
|
|
|
|
|
})) |
1352
|
|
|
|
|
|
|
}) || 1))) |
1353
|
15
|
100
|
|
|
|
11
|
}) || (do { |
1354
|
8
|
|
|
|
|
8
|
(($MATCH)->{to} = $pos1); |
1355
|
8
|
50
|
|
|
|
8
|
((((do { |
1356
|
8
|
|
|
|
|
6
|
($MATCH->{capture} = (do { |
1357
|
8
|
|
|
|
|
10
|
(my $List_a = bless [], 'ARRAY'); |
1358
|
8
|
|
|
|
|
10
|
(my $List_v = bless [], 'ARRAY'); |
1359
|
8
|
|
|
|
|
6
|
push( @{$List_a}, ${$MATCH->{'concat_exp'}} ); |
|
8
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
11
|
|
1360
|
8
|
|
|
|
|
18
|
$List_a |
1361
|
|
|
|
|
|
|
})) |
1362
|
|
|
|
|
|
|
}) || 1))) |
1363
|
|
|
|
|
|
|
})) |
1364
|
|
|
|
|
|
|
})) |
1365
|
15
|
50
|
|
|
|
10
|
}) || (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
|
|
|
|
|
29
|
$MATCH |
1377
|
|
|
|
|
|
|
}; |
1378
|
|
|
|
|
|
|
sub rule { |
1379
|
8
|
|
|
8
|
0
|
9
|
my $grammar = $_[0]; |
1380
|
8
|
|
|
|
|
9
|
my $str = $_[1]; |
1381
|
8
|
|
|
|
|
4
|
my $pos = $_[2]; |
1382
|
8
|
|
|
|
|
8
|
(my $MATCH); |
1383
|
8
|
|
|
|
|
19
|
($MATCH = Perlito6::Match->new(('str' => $str), ('from' => $pos), ('to' => $pos), ('bool' => 1))); |
1384
|
8
|
|
|
|
|
9
|
(($MATCH)->{bool} = ((do { |
1385
|
8
|
|
|
|
|
15
|
((my $pos1) = $MATCH->to()); |
1386
|
8
|
|
|
|
|
7
|
(do { |
1387
|
|
|
|
|
|
|
(((do { |
1388
|
8
|
|
|
|
|
14
|
((my $pos1) = $MATCH->to()); |
1389
|
|
|
|
|
|
|
((do { |
1390
|
|
|
|
|
|
|
((do { |
1391
|
8
|
|
|
|
|
13
|
((my $last_pos) = $MATCH->to()); |
1392
|
8
|
50
|
|
|
|
3
|
if (!((do { |
1393
|
8
|
|
|
|
|
15
|
((my $m2) = $grammar->ws($str, $MATCH->to())); |
1394
|
8
|
50
|
|
|
|
11
|
if ($m2) { |
1395
|
8
|
|
|
|
|
20
|
(($MATCH)->{to} = $m2->to()); |
1396
|
8
|
|
|
|
|
20
|
1 |
1397
|
|
|
|
|
|
|
} |
1398
|
|
|
|
|
|
|
else { |
1399
|
0
|
|
|
|
|
0
|
0 |
1400
|
|
|
|
|
|
|
} |
1401
|
|
|
|
|
|
|
}))) { |
1402
|
0
|
|
|
|
|
0
|
(($MATCH)->{to} = $last_pos) |
1403
|
|
|
|
|
|
|
}; |
1404
|
8
|
|
|
|
|
32
|
1 |
1405
|
8
|
50
|
33
|
|
|
5
|
}) && (((chr(124) eq substr($str, $MATCH->to(), 1)) && ((($MATCH)->{to} = (1 + $MATCH->to())))))) |
1406
|
8
|
50
|
|
|
|
7
|
}) || (do { |
1407
|
8
|
|
|
|
|
15
|
(($MATCH)->{to} = $pos1); |
1408
|
8
|
|
|
|
|
22
|
(1) |
1409
|
|
|
|
|
|
|
})) |
1410
|
|
|
|
|
|
|
}) && (do { |
1411
|
8
|
|
|
|
|
16
|
((my $m2) = $grammar->or_list_exp($str, $MATCH->to())); |
1412
|
8
|
50
|
|
|
|
17
|
if ($m2) { |
1413
|
8
|
|
|
|
|
19
|
(($MATCH)->{to} = $m2->to()); |
1414
|
8
|
|
|
|
|
9
|
($MATCH->{'or_list_exp'} = $m2); |
1415
|
8
|
|
|
|
|
19
|
1 |
1416
|
|
|
|
|
|
|
} |
1417
|
|
|
|
|
|
|
else { |
1418
|
0
|
|
|
|
|
0
|
0 |
1419
|
|
|
|
|
|
|
} |
1420
|
8
|
50
|
50
|
|
|
10
|
})) && (((do { |
|
|
|
33
|
|
|
|
|
1421
|
8
|
|
|
|
|
7
|
($MATCH->{capture} = (Rul::Or->new(('or_list' => ${$MATCH->{'or_list_exp'}})))) |
|
8
|
|
|
|
|
20
|
|
1422
|
|
|
|
|
|
|
}) || 1))) |
1423
|
|
|
|
|
|
|
}) |
1424
|
|
|
|
|
|
|
}))); |
1425
|
8
|
|
|
|
|
18
|
$MATCH |
1426
|
|
|
|
|
|
|
} |
1427
|
|
|
|
|
|
|
} |
1428
|
|
|
|
|
|
|
|
1429
|
|
|
|
|
|
|
|
1430
|
|
|
|
|
|
|
} |
1431
|
|
|
|
|
|
|
|
1432
|
|
|
|
|
|
|
1; |