// Code generated by re2v, DO NOT EDIT.
// re2v $INPUT -o $OUTPUT -i

enum Result {
    ok
    fail
}




fn lex(yyinput string) Result {
    mut yycursor, mut yymarker := 0, 0
    
    mut yych := u8(0)
    mut yyaccept := u32(0)
    yych = yyinput[yycursor]
    match yych {
        0x2E { unsafe { goto yy3 } }
        0x30 { unsafe { goto yy4 } }
        0x31...0x39 { unsafe { goto yy5 } }
        else { unsafe { goto yy1 } }
    }
yy1:
    yycursor += 1
yy2:
    return .fail
yy3:
    yycursor += 1
    yych = yyinput[yycursor]
    match yych {
        0x30...0x39 { unsafe { goto yy7 } }
        else { unsafe { goto yy2 } }
    }
yy4:
    yyaccept = 0
    yycursor += 1
    yymarker = yycursor
    yych = yyinput[yycursor]
    match yych {
        0x2E { unsafe { goto yy7 } }
        0x30...0x39 { unsafe { goto yy9 } }
        0x45, 0x65 { unsafe { goto yy11 } }
        else { unsafe { goto yy2 } }
    }
yy5:
    yyaccept = 1
    yycursor += 1
    yymarker = yycursor
    yych = yyinput[yycursor]
    match yych {
        0x2E { unsafe { goto yy7 } }
        0x30...0x39 { unsafe { goto yy5 } }
        0x45, 0x65 { unsafe { goto yy11 } }
        else { unsafe { goto yy6 } }
    }
yy6:
    return .ok
yy7:
    yyaccept = 2
    yycursor += 1
    yymarker = yycursor
    yych = yyinput[yycursor]
    match yych {
        0x30...0x39 { unsafe { goto yy7 } }
        0x45, 0x65 { unsafe { goto yy11 } }
        else { unsafe { goto yy8 } }
    }
yy8:
    return .ok
yy9:
    yycursor += 1
    yych = yyinput[yycursor]
    match yych {
        0x2E { unsafe { goto yy7 } }
        0x30...0x39 { unsafe { goto yy9 } }
        0x45, 0x65 { unsafe { goto yy11 } }
        else { unsafe { goto yy10 } }
    }
yy10:
    yycursor = yymarker
    match yyaccept {
        0 { unsafe { goto yy2 } }
        1 { unsafe { goto yy6 } }
        else { unsafe { goto yy8 } }
    }
yy11:
    yycursor += 1
    yych = yyinput[yycursor]
    match yych {
        0x2B, 0x2D { unsafe { goto yy12 } }
        0x30...0x39 { unsafe { goto yy13 } }
        else { unsafe { goto yy10 } }
    }
yy12:
    yycursor += 1
    yych = yyinput[yycursor]
    match yych {
        0x30...0x39 { unsafe { goto yy13 } }
        else { unsafe { goto yy10 } }
    }
yy13:
    yycursor += 1
    yych = yyinput[yycursor]
    match yych {
        0x30...0x39 { unsafe { goto yy13 } }
        else { unsafe { goto yy8 } }
    }

}

fn main() {
    assert lex("123\0") == .ok
    assert lex("123.4567\0") == .ok
}
