in libbeat/reader/syslog/rfc5424_gen.go [679:854]
func isRFC5424(data string) bool {
var isRFC5424 bool
var p, cs int
pe := len(data)
{
cs = check_start
}
{
if p == pe {
goto _test_eof
}
switch cs {
case 1:
goto st_case_1
case 0:
goto st_case_0
case 2:
goto st_case_2
case 3:
goto st_case_3
case 4:
goto st_case_4
case 5:
goto st_case_5
case 6:
goto st_case_6
case 7:
goto st_case_7
case 8:
goto st_case_8
case 9:
goto st_case_9
case 10:
goto st_case_10
}
goto st_out
st_case_1:
if data[p] == 60 {
goto st2
}
goto st0
st_case_0:
st0:
cs = 0
goto _out
st2:
if p++; p == pe {
goto _test_eof2
}
st_case_2:
if 48 <= data[p] && data[p] <= 57 {
goto st3
}
goto st0
st3:
if p++; p == pe {
goto _test_eof3
}
st_case_3:
if data[p] == 62 {
goto st4
}
if 48 <= data[p] && data[p] <= 57 {
goto st3
}
goto st0
st4:
if p++; p == pe {
goto _test_eof4
}
st_case_4:
if 48 <= data[p] && data[p] <= 57 {
goto st5
}
goto st0
st5:
if p++; p == pe {
goto _test_eof5
}
st_case_5:
if data[p] == 32 {
goto st6
}
if 48 <= data[p] && data[p] <= 57 {
goto st5
}
goto st0
st6:
if p++; p == pe {
goto _test_eof6
}
st_case_6:
if 48 <= data[p] && data[p] <= 57 {
goto tr6
}
goto st0
tr6:
isRFC5424 = true
goto st7
st7:
if p++; p == pe {
goto _test_eof7
}
st_case_7:
if 48 <= data[p] && data[p] <= 57 {
goto st8
}
goto st0
st8:
if p++; p == pe {
goto _test_eof8
}
st_case_8:
if 48 <= data[p] && data[p] <= 57 {
goto st9
}
goto st0
st9:
if p++; p == pe {
goto _test_eof9
}
st_case_9:
if 48 <= data[p] && data[p] <= 57 {
goto st10
}
goto st0
st10:
if p++; p == pe {
goto _test_eof10
}
st_case_10:
goto st0
st_out:
_test_eof2:
cs = 2
goto _test_eof
_test_eof3:
cs = 3
goto _test_eof
_test_eof4:
cs = 4
goto _test_eof
_test_eof5:
cs = 5
goto _test_eof
_test_eof6:
cs = 6
goto _test_eof
_test_eof7:
cs = 7
goto _test_eof
_test_eof8:
cs = 8
goto _test_eof
_test_eof9:
cs = 9
goto _test_eof
_test_eof10:
cs = 10
goto _test_eof
_test_eof:
{
}
_out:
{
}
}
return isRFC5424
}