// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

// Code generated by ragel DO NOT EDIT.
//
// line-disable-directive parser/format_check.rl:1
package syslog

//line format_check.go:8
const format_check_start int = 1
const format_check_first_final int = 15
const format_check_error int = 0

const format_check_en_main int = 1

// line-disable-directive parser/format_check.rl:9

func IsRFC5424Format(data []byte) bool {
	var p, cs int
	isRFC5424 := false
	pe := len(data)

//line format_check.go:24
	{
		cs = format_check_start
	}

//line format_check.go:29
	{
		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 15:
			goto st_case_15
		case 10:
			goto st_case_10
		case 11:
			goto st_case_11
		case 12:
			goto st_case_12
		case 13:
			goto st_case_13
		case 14:
			goto st_case_14
		}
		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:
		switch data[(p)] {
		case 48:
			goto st3
		case 49:
			goto st12
		}
		if 50 <= data[(p)] && data[(p)] <= 57 {
			goto st13
		}
		goto st0
	st3:
		if (p)++; (p) == (pe) {
			goto _test_eof3
		}
	st_case_3:
		if data[(p)] == 62 {
			goto st4
		}
		goto st0
	st4:
		if (p)++; (p) == (pe) {
			goto _test_eof4
		}
	st_case_4:
		if 49 <= 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 st10
		}
		goto st0
	st6:
		if (p)++; (p) == (pe) {
			goto _test_eof6
		}
	st_case_6:
		if 48 <= data[(p)] && data[(p)] <= 57 {
			goto tr9
		}
		goto st0
	tr9:
		// line-disable-directive parser/format_check.rl:17

		isRFC5424 = true

		goto st7
	st7:
		if (p)++; (p) == (pe) {
			goto _test_eof7
		}
	st_case_7:
//line format_check.go:143
		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 st15
		}
		goto st0
	st15:
		if (p)++; (p) == (pe) {
			goto _test_eof15
		}
	st_case_15:
		goto st0
	st10:
		if (p)++; (p) == (pe) {
			goto _test_eof10
		}
	st_case_10:
		if data[(p)] == 32 {
			goto st6
		}
		if 48 <= data[(p)] && data[(p)] <= 57 {
			goto st11
		}
		goto st0
	st11:
		if (p)++; (p) == (pe) {
			goto _test_eof11
		}
	st_case_11:
		if data[(p)] == 32 {
			goto st6
		}
		goto st0
	st12:
		if (p)++; (p) == (pe) {
			goto _test_eof12
		}
	st_case_12:
		switch data[(p)] {
		case 57:
			goto st14
		case 62:
			goto st4
		}
		if 48 <= data[(p)] && data[(p)] <= 56 {
			goto st13
		}
		goto st0
	st13:
		if (p)++; (p) == (pe) {
			goto _test_eof13
		}
	st_case_13:
		if data[(p)] == 62 {
			goto st4
		}
		if 48 <= data[(p)] && data[(p)] <= 57 {
			goto st3
		}
		goto st0
	st14:
		if (p)++; (p) == (pe) {
			goto _test_eof14
		}
	st_case_14:
		if data[(p)] == 62 {
			goto st4
		}
		if 48 <= data[(p)] && data[(p)] <= 49 {
			goto st3
		}
		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_eof15:
		cs = 15
		goto _test_eof
	_test_eof10:
		cs = 10
		goto _test_eof
	_test_eof11:
		cs = 11
		goto _test_eof
	_test_eof12:
		cs = 12
		goto _test_eof
	_test_eof13:
		cs = 13
		goto _test_eof
	_test_eof14:
		cs = 14
		goto _test_eof

	_test_eof:
		{
		}
	_out:
		{
		}
	}

	// line-disable-directive parser/format_check.rl:28

	return isRFC5424
}
