# Do not edit this file - Generated by Perlito5 9.025

{
    package main;
    package Perlito5::Grammar::Number;
    use strict ;
    use Perlito5::Grammar::Precedence ;
    sub Perlito5::Grammar::Number::term_digit {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = ((do {
            my $tmp100 = $MATCH->{"to"};
            (((do {
                my $m2 = Perlito5::Grammar::Number::val_octal($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    $MATCH->{"Perlito5::Grammar::Number::val_octal"} = $m2;
                    1
                }
                else {;
                    0
                }
            }) && (do {
                $MATCH->{"capture"} = ["term", Perlito5::Match::flat($MATCH->{"Perlito5::Grammar::Number::val_octal"})];
                1
            }))) || ($MATCH->{"to"} = $tmp100, ((do {
                my $m2 = Perlito5::Grammar::Number::val_vstring($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    $MATCH->{"Perlito5::Grammar::Number::val_vstring"} = $m2;
                    1
                }
                else {;
                    0
                }
            }) && (do {
                $MATCH->{"capture"} = ["term", Perlito5::Match::flat($MATCH->{"Perlito5::Grammar::Number::val_vstring"})];
                1
            }))) || ($MATCH->{"to"} = $tmp100, ((do {
                my $m2 = Perlito5::Grammar::Number::val_num($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    $MATCH->{"Perlito5::Grammar::Number::val_num"} = $m2;
                    1
                }
                else {;
                    0
                }
            }) && (do {
                $MATCH->{"capture"} = ["term", Perlito5::Match::flat($MATCH->{"Perlito5::Grammar::Number::val_num"})];
                1
            })))
        }));
        $tmp ? $MATCH : undef
    }
    Perlito5::Grammar::Precedence::add_term($_, \&term_digit)
        for ".", 0 .. 9;
    sub Perlito5::Grammar::Number::digit {
        my $str = $_[0];
        my $pos = $_[1];
        $str->[$pos] ge 0 && $str->[$pos] le 9 ? {"str" => $str, "from" => $pos, "to" => $pos + 1, } : 0
    }
    sub Perlito5::Grammar::Number::octal_digit {
        my $str = $_[0];
        my $pos = $_[1];
        $str->[$pos] ge 0 && $str->[$pos] le 7 ? {"str" => $str, "from" => $pos, "to" => $pos + 1, } : 0
    }
    sub Perlito5::Grammar::Number::hex_digit {
        my $str = $_[0];
        my $pos = $_[1];
        (($str->[$pos] ge 0 && $str->[$pos] le 9) || ($str->[$pos] ge "A" && $str->[$pos] le "F") || ($str->[$pos] ge "a" && $str->[$pos] le "f")) ? {"str" => $str, "from" => $pos, "to" => $pos + 1, } : 0
    }
    sub Perlito5::Grammar::Number::exponent {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $tmp115 = $MATCH->{"to"};
            ((("e" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp115, (("E" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)))
        }) && (do {
            my $tmp116 = $MATCH->{"to"};
            ((("+" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp116, (("-" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp116, 1)
        }) && (do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            my $count = 0;
            while ((do {
                my $tmp117 = $MATCH->{"to"};
                ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp117, (do {
                    my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        1
                    }
                    else {;
                        0
                    }
                }))
            }) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"};
                $count = $count + 1
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            $count > 0
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::val_num {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $tmp130 = $MATCH->{"to"};
            (((("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
                my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    1
                }
                else {;
                    0
                }
            }) && (do {
                my $last_match_null = 0;
                my $m = $MATCH;
                my $to = $MATCH->{"to"};
                while ((do {
                    my $tmp131 = $MATCH->{"to"};
                    ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp131, (do {
                        my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                        if ($m2) {
                            $MATCH->{"to"} = $m2->{"to"};
                            1
                        }
                        else {;
                            0
                        }
                    }))
                }) && ($last_match_null < 2)) {
                    if ($to == $MATCH->{"to"}) {;
                        $last_match_null = $last_match_null + 1
                    }
                    else {;
                        $last_match_null = 0
                    }
                    $m = $MATCH;
                    $to = $MATCH->{"to"}
                }
                $MATCH = $m;
                $MATCH->{"to"} = $to;
                1
            }) && (do {
                my $m = $MATCH;
                if (!(do {
                    my $m2 = Perlito5::Grammar::Number::exponent($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        1
                    }
                    else {;
                        0
                    }
                })) {;
                    $MATCH = $m
                }
                1
            }))) || ($MATCH->{"to"} = $tmp130, ((do {
                my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    1
                }
                else {;
                    0
                }
            }) && (do {
                my $last_match_null = 0;
                my $m = $MATCH;
                my $to = $MATCH->{"to"};
                while ((do {
                    my $tmp132 = $MATCH->{"to"};
                    ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp132, (do {
                        my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                        if ($m2) {
                            $MATCH->{"to"} = $m2->{"to"};
                            1
                        }
                        else {;
                            0
                        }
                    }))
                }) && ($last_match_null < 2)) {
                    if ($to == $MATCH->{"to"}) {;
                        $last_match_null = $last_match_null + 1
                    }
                    else {;
                        $last_match_null = 0
                    }
                    $m = $MATCH;
                    $to = $MATCH->{"to"}
                }
                $MATCH = $m;
                $MATCH->{"to"} = $to;
                1
            }) && (do {
                my $tmp133 = $MATCH->{"to"};
                ((do {
                    my $m2 = Perlito5::Grammar::Number::exponent($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        1
                    }
                    else {;
                        0
                    }
                })) || ($MATCH->{"to"} = $tmp133, ((("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
                    my $tmp = $MATCH;
                    $MATCH = {"from" => $tmp->{"to"}, "to" => $tmp->{"to"}, };
                    my $res = (("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1));
                    $MATCH = $tmp;
                    $res ? 0 : 1
                }) && (do {
                    my $last_match_null = 0;
                    my $m = $MATCH;
                    my $to = $MATCH->{"to"};
                    while ((do {
                        my $tmp134 = $MATCH->{"to"};
                        ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp134, (do {
                            my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                            if ($m2) {
                                $MATCH->{"to"} = $m2->{"to"};
                                1
                            }
                            else {;
                                0
                            }
                        }))
                    }) && ($last_match_null < 2)) {
                        if ($to == $MATCH->{"to"}) {;
                            $last_match_null = $last_match_null + 1
                        }
                        else {;
                            $last_match_null = 0
                        }
                        $m = $MATCH;
                        $to = $MATCH->{"to"}
                    }
                    $MATCH = $m;
                    $MATCH->{"to"} = $to;
                    1
                }) && (do {
                    my $m = $MATCH;
                    if (!(do {
                        my $m2 = Perlito5::Grammar::Number::exponent($str, $MATCH->{"to"});
                        if ($m2) {
                            $MATCH->{"to"} = $m2->{"to"};
                            1
                        }
                        else {;
                            0
                        }
                    })) {;
                        $MATCH = $m
                    }
                    1
                }))) || ($MATCH->{"to"} = $tmp133, (do {
                    my $s = Perlito5::Match::flat($MATCH);
                    $s =~ s/_//g;
                    $MATCH->{"capture"} = Perlito5::AST::Int::->new("int", $s);
                    return $MATCH;
                    1
                }))
            })))
        }) && (do {
            my $s = Perlito5::Match::flat($MATCH);
            $s =~ s/_//g;
            $MATCH->{"capture"} = Perlito5::AST::Num::->new("num", $s);
            1
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::digits {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = ((do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            my $count = 0;
            while ((do {
                my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    1
                }
                else {;
                    0
                }
            }) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"};
                $count = $count + 1
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            $count > 0
        }));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::digits_underscore {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
            if ($m2) {
                $MATCH->{"to"} = $m2->{"to"};
                1
            }
            else {;
                0
            }
        }) && (do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            while ((do {
                my $tmp176 = $MATCH->{"to"};
                ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp176, (do {
                    my $m2 = Perlito5::Grammar::Number::digit($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        1
                    }
                    else {;
                        0
                    }
                }))
            }) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"}
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            1
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::hex_digits_underscore {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = ((do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            my $count = 0;
            while ((do {
                my $tmp187 = $MATCH->{"to"};
                ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp187, (do {
                    my $m2 = Perlito5::Grammar::Number::hex_digit($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        1
                    }
                    else {;
                        0
                    }
                }))
            }) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"};
                $count = $count + 1
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            $count > 0
        }));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::hex_digits_underscore2 {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $m2 = Perlito5::Grammar::Number::hex_digit($str, $MATCH->{"to"});
            if ($m2) {
                $MATCH->{"to"} = $m2->{"to"};
                1
            }
            else {;
                0
            }
        }) && (do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            while ((do {
                my $tmp198 = $MATCH->{"to"};
                ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp198, (do {
                    my $m2 = Perlito5::Grammar::Number::hex_digit($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        1
                    }
                    else {;
                        0
                    }
                }))
            }) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"}
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            1
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::hex_exponent {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $tmp209 = $MATCH->{"to"};
            ((("+" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp209, (("-" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp209, 1)
        }) && (do {
            my $m2 = Perlito5::Grammar::Number::hex_digits_underscore($str, $MATCH->{"to"});
            if ($m2) {
                $MATCH->{"to"} = $m2->{"to"};
                1
            }
            else {;
                0
            }
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::val_octal {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = ((((0 eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
            my $tmp216 = $MATCH->{"to"};
            (((do {
                my $tmp217 = $MATCH->{"to"};
                ((("x" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp217, (("X" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)))
            }) && (do {
                my $tmp218 = $MATCH->{"to"};
                (((do {
                    my $tmp219 = $MATCH->{"to"};
                    (((("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
                        my $last_match_null = 0;
                        my $m = $MATCH;
                        my $to = $MATCH->{"to"};
                        my $count = 0;
                        while ((do {
                            my $m2 = Perlito5::Grammar::Number::hex_digits_underscore2($str, $MATCH->{"to"});
                            if ($m2) {
                                $MATCH->{"to"} = $m2->{"to"};
                                if (exists($MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"})) {;
                                    push(@{$MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"}}, $m2)
                                }
                                else {;
                                    $MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"} = [$m2]
                                }
                                1
                            }
                            else {;
                                0
                            }
                        }) && ($last_match_null < 2)) {
                            if ($to == $MATCH->{"to"}) {;
                                $last_match_null = $last_match_null + 1
                            }
                            else {;
                                $last_match_null = 0
                            }
                            $m = $MATCH;
                            $to = $MATCH->{"to"};
                            $count = $count + 1
                        }
                        $MATCH = $m;
                        $MATCH->{"to"} = $to;
                        $count > 0
                    }))) || ($MATCH->{"to"} = $tmp219, ((do {
                        my $last_match_null = 0;
                        my $m = $MATCH;
                        my $to = $MATCH->{"to"};
                        my $count = 0;
                        while ((do {
                            my $m2 = Perlito5::Grammar::Number::hex_digits_underscore($str, $MATCH->{"to"});
                            if ($m2) {
                                $MATCH->{"to"} = $m2->{"to"};
                                if (exists($MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"})) {;
                                    push(@{$MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"}}, $m2)
                                }
                                else {;
                                    $MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"} = [$m2]
                                }
                                1
                            }
                            else {;
                                0
                            }
                        }) && ($last_match_null < 2)) {
                            if ($to == $MATCH->{"to"}) {;
                                $last_match_null = $last_match_null + 1
                            }
                            else {;
                                $last_match_null = 0
                            }
                            $m = $MATCH;
                            $to = $MATCH->{"to"};
                            $count = $count + 1
                        }
                        $MATCH = $m;
                        $MATCH->{"to"} = $to;
                        $count > 0
                    }) && (do {
                        my $tmp220 = $MATCH->{"to"};
                        (((("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
                            my $m = $MATCH;
                            if (!(do {
                                my $m2 = Perlito5::Grammar::Number::hex_digits_underscore2($str, $MATCH->{"to"});
                                if ($m2) {
                                    $MATCH->{"to"} = $m2->{"to"};
                                    if (exists($MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"})) {;
                                        push(@{$MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"}}, $m2)
                                    }
                                    else {;
                                        $MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"} = [$m2]
                                    }
                                    1
                                }
                                else {;
                                    0
                                }
                            })) {;
                                $MATCH = $m
                            }
                            1
                        }))) || ($MATCH->{"to"} = $tmp220, 1)
                    })))
                }) && (do {
                    my $tmp221 = $MATCH->{"to"};
                    ((("p" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp221, (("P" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)))
                }) && (do {
                    my $m2 = Perlito5::Grammar::Number::hex_exponent($str, $MATCH->{"to"});
                    if ($m2) {
                        $MATCH->{"to"} = $m2->{"to"};
                        $MATCH->{"hex_exponent"} = $m2;
                        1
                    }
                    else {;
                        0
                    }
                }) && (do {
                    my $h1 = $MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"};
                    my $h2 = $MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore2"};
                    my $h3 = Perlito5::Match::flat($MATCH->{"hex_exponent"});
                    if ($h1 && @{$h1}) {;
                        $h1 = Perlito5::Match::flat($h1->[0])
                    }
                    else {;
                        $h1 = 0
                    }
                    if ($h2 && @{$h2}) {;
                        $h2 = Perlito5::Match::flat($h2->[0])
                    }
                    else {;
                        $h2 = 0
                    }
                    $h1 =~ s/_//g;
                    $h2 =~ s/_//g;
                    $h3 =~ s/_//g;
                    my $mul = 1;
                    my $sig = substr($h3, 0, 1);
                    if ($sig eq "+" || $sig eq "-") {
                        $mul = $sig . 1;
                        $h3 = substr($h3, 1)
                    }
                    $h1 = hex($h1);
                    if (length($h2)) {;
                        $h2 = hex($h2) / (16**length($h2))
                    }
                    else {;
                        $h2 = 0
                    }
                    $h3 = hex($h3);
                    $MATCH->{"capture"} = Perlito5::AST::Num::->new("num", ($h1 + $h2) * (2**($mul * $h3)));
                    return $MATCH;
                    1
                }))) || ($MATCH->{"to"} = $tmp218, (do {
                    my $last_match_null = 0;
                    my $m = $MATCH;
                    my $to = $MATCH->{"to"};
                    my $count = 0;
                    while ((do {
                        my $m2 = Perlito5::Grammar::Number::hex_digits_underscore($str, $MATCH->{"to"});
                        if ($m2) {
                            $MATCH->{"to"} = $m2->{"to"};
                            if (exists($MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"})) {;
                                push(@{$MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"}}, $m2)
                            }
                            else {;
                                $MATCH->{"Perlito5::Grammar::Number::hex_digits_underscore"} = [$m2]
                            }
                            1
                        }
                        else {;
                            0
                        }
                    }) && ($last_match_null < 2)) {
                        if ($to == $MATCH->{"to"}) {;
                            $last_match_null = $last_match_null + 1
                        }
                        else {;
                            $last_match_null = 0
                        }
                        $m = $MATCH;
                        $to = $MATCH->{"to"};
                        $count = $count + 1
                    }
                    $MATCH = $m;
                    $MATCH->{"to"} = $to;
                    $count > 0
                }))
            }))) || ($MATCH->{"to"} = $tmp216, ((do {
                my $tmp222 = $MATCH->{"to"};
                ((("b" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp222, (("B" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)))
            }) && (do {
                my $last_match_null = 0;
                my $m = $MATCH;
                my $to = $MATCH->{"to"};
                my $count = 0;
                while ((do {
                    my $tmp223 = $MATCH->{"to"};
                    ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp223, ((0 eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp223, ((1 eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)))
                }) && ($last_match_null < 2)) {
                    if ($to == $MATCH->{"to"}) {;
                        $last_match_null = $last_match_null + 1
                    }
                    else {;
                        $last_match_null = 0
                    }
                    $m = $MATCH;
                    $to = $MATCH->{"to"};
                    $count = $count + 1
                }
                $MATCH = $m;
                $MATCH->{"to"} = $to;
                $count > 0
            }))) || ($MATCH->{"to"} = $tmp216, (do {
                my $last_match_null = 0;
                my $m = $MATCH;
                my $to = $MATCH->{"to"};
                my $count = 0;
                while ((do {
                    my $tmp224 = $MATCH->{"to"};
                    ((("_" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1))) || ($MATCH->{"to"} = $tmp224, (do {
                        my $m2 = Perlito5::Grammar::Number::octal_digit($str, $MATCH->{"to"});
                        if ($m2) {
                            $MATCH->{"to"} = $m2->{"to"};
                            1
                        }
                        else {;
                            0
                        }
                    }))
                }) && ($last_match_null < 2)) {
                    if ($to == $MATCH->{"to"}) {;
                        $last_match_null = $last_match_null + 1
                    }
                    else {;
                        $last_match_null = 0
                    }
                    $m = $MATCH;
                    $to = $MATCH->{"to"};
                    $count = $count + 1
                }
                $MATCH = $m;
                $MATCH->{"to"} = $to;
                $count > 0
            }))
        }) && (do {
            $MATCH->{"capture"} = Perlito5::AST::Int::->new("int", oct(lc(Perlito5::Match::flat($MATCH))));
            1
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::val_int {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $m2 = Perlito5::Grammar::Number::digits_underscore($str, $MATCH->{"to"});
            if ($m2) {
                $MATCH->{"to"} = $m2->{"to"};
                1
            }
            else {;
                0
            }
        }) && (do {
            my $s = Perlito5::Match::flat($MATCH);
            $s =~ s/_//g;
            $MATCH->{"capture"} = Perlito5::AST::Int::->new("int", $s);
            1
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::val_vstring {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((do {
            my $m2 = Perlito5::Grammar::Number::val_int($str, $MATCH->{"to"});
            if ($m2) {
                $MATCH->{"to"} = $m2->{"to"};
                $MATCH->{"val_int"} = $m2;
                1
            }
            else {;
                0
            }
        }) && (do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            my $count = 0;
            while (((("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
                my $m2 = Perlito5::Grammar::Number::digits_underscore($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    if (exists($MATCH->{"digits_underscore"})) {;
                        push(@{$MATCH->{"digits_underscore"}}, $m2)
                    }
                    else {;
                        $MATCH->{"digits_underscore"} = [$m2]
                    }
                    1
                }
                else {;
                    0
                }
            })) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"};
                $count = $count + 1
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            $count > 0
        }) && (do {
            my @parts = map {;
                Perlito5::Match::flat($_)
            } @{$MATCH->{"digits_underscore"}};
            @parts < 2 && return;
            $MATCH->{"capture"} = Perlito5::AST::Buf::->new("is_vstring", 1, "buf", join('', map {;
                chr($_)
            } $MATCH->{"val_int"}->{"capture"}->{"int"}, @parts));
            1
        })));
        $tmp ? $MATCH : undef
    }
    sub Perlito5::Grammar::Number::val_version {
        my $str = $_[0];
        my $pos = $_[1];
        my $MATCH = {"str" => $str, "from" => $pos, "to" => $pos, };
        my $tmp = (((("v" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
            my $m2 = Perlito5::Grammar::Number::val_int($str, $MATCH->{"to"});
            if ($m2) {
                $MATCH->{"to"} = $m2->{"to"};
                $MATCH->{"val_int"} = $m2;
                1
            }
            else {;
                0
            }
        }) && (do {
            my $tmp = $MATCH;
            $MATCH = {"from" => $tmp->{"to"}, "to" => $tmp->{"to"}, };
            my $res = ((do {
                my $m2 = Perlito5::Grammar::Space::opt_ws($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    1
                }
                else {;
                    0
                }
            }) && (("(" eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)));
            $MATCH = $tmp;
            $res ? 0 : 1
        }) && (do {
            my $last_match_null = 0;
            my $m = $MATCH;
            my $to = $MATCH->{"to"};
            while (((("." eq $str->[($MATCH->{"to"}) + 0]) && ($MATCH->{"to"} += 1)) && (do {
                my $m2 = Perlito5::Grammar::Number::digits_underscore($str, $MATCH->{"to"});
                if ($m2) {
                    $MATCH->{"to"} = $m2->{"to"};
                    if (exists($MATCH->{"digits_underscore"})) {;
                        push(@{$MATCH->{"digits_underscore"}}, $m2)
                    }
                    else {;
                        $MATCH->{"digits_underscore"} = [$m2]
                    }
                    1
                }
                else {;
                    0
                }
            })) && ($last_match_null < 2)) {
                if ($to == $MATCH->{"to"}) {;
                    $last_match_null = $last_match_null + 1
                }
                else {;
                    $last_match_null = 0
                }
                $m = $MATCH;
                $to = $MATCH->{"to"}
            }
            $MATCH = $m;
            $MATCH->{"to"} = $to;
            1
        }) && (do {
            my @parts = map {;
                Perlito5::Match::flat($_)
            } @{$MATCH->{"digits_underscore"}};
            $MATCH->{"capture"} = Perlito5::AST::Buf::->new("buf", join('', map {;
                chr($_)
            } $MATCH->{"val_int"}->{"capture"}->{"int"}, @parts));
            1
        })));
        $tmp ? $MATCH : undef
    }
    1
}
;1
