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