// Code generated from XMLLexer.g4 by ANTLR 4.9.3. DO NOT EDIT.

package xml

import (
	"fmt"
	"unicode"

	"github.com/antlr/antlr4/runtime/Go/antlr"
)

// Suppress unused import error
var _ = fmt.Printf
var _ = unicode.IsLetter

var serializedLexerAtn = []uint16{
	3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 20, 233,
	8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6,
	9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4,
	12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17,
	9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9,
	22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 3, 2, 3, 2, 3, 2, 3, 2, 3,
	2, 3, 2, 7, 2, 60, 10, 2, 12, 2, 14, 2, 63, 11, 2, 3, 2, 3, 2, 3, 2, 3,
	2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7,
	3, 80, 10, 3, 12, 3, 14, 3, 83, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3,
	4, 3, 4, 3, 4, 7, 4, 93, 10, 4, 12, 4, 14, 4, 96, 11, 4, 3, 4, 3, 4, 3,
	4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 6, 6, 110, 10,
	6, 13, 6, 14, 6, 111, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 6, 6, 121,
	10, 6, 13, 6, 14, 6, 122, 3, 6, 3, 6, 5, 6, 127, 10, 6, 3, 7, 3, 7, 5,
	7, 131, 10, 7, 3, 7, 6, 7, 134, 10, 7, 13, 7, 14, 7, 135, 3, 8, 3, 8, 3,
	8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3,
	10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 6, 11, 161,
	10, 11, 13, 11, 14, 11, 162, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13,
	3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3,
	16, 3, 16, 3, 17, 3, 17, 7, 17, 185, 10, 17, 12, 17, 14, 17, 188, 11, 17,
	3, 17, 3, 17, 3, 17, 7, 17, 193, 10, 17, 12, 17, 14, 17, 196, 11, 17, 3,
	17, 5, 17, 199, 10, 17, 3, 18, 3, 18, 7, 18, 203, 10, 18, 12, 18, 14, 18,
	206, 11, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3,
	22, 3, 22, 3, 22, 3, 22, 5, 22, 220, 10, 22, 3, 23, 5, 23, 223, 10, 23,
	3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 5, 61, 81,
	94, 2, 26, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 2,
	23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 35, 17, 37, 18, 39, 19,
	41, 2, 43, 2, 45, 2, 47, 2, 49, 20, 51, 2, 5, 2, 3, 4, 12, 4, 2, 11, 11,
	34, 34, 4, 2, 40, 40, 62, 62, 4, 2, 36, 36, 62, 62, 4, 2, 41, 41, 62, 62,
	5, 2, 11, 12, 15, 15, 34, 34, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50,
	59, 4, 2, 47, 48, 97, 97, 5, 2, 185, 185, 770, 881, 8257, 8258, 10, 2,
	60, 60, 67, 92, 99, 124, 8306, 8593, 11266, 12273, 12291, 55297, 63746,
	64977, 65010, 65535, 2, 243, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9,
	3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2,
	17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2,
	3, 25, 3, 2, 2, 2, 3, 27, 3, 2, 2, 2, 3, 29, 3, 2, 2, 2, 3, 31, 3, 2, 2,
	2, 3, 33, 3, 2, 2, 2, 3, 35, 3, 2, 2, 2, 3, 37, 3, 2, 2, 2, 3, 39, 3, 2,
	2, 2, 4, 49, 3, 2, 2, 2, 4, 51, 3, 2, 2, 2, 5, 53, 3, 2, 2, 2, 7, 68, 3,
	2, 2, 2, 9, 88, 3, 2, 2, 2, 11, 101, 3, 2, 2, 2, 13, 126, 3, 2, 2, 2, 15,
	133, 3, 2, 2, 2, 17, 137, 3, 2, 2, 2, 19, 141, 3, 2, 2, 2, 21, 151, 3,
	2, 2, 2, 23, 160, 3, 2, 2, 2, 25, 164, 3, 2, 2, 2, 27, 168, 3, 2, 2, 2,
	29, 173, 3, 2, 2, 2, 31, 178, 3, 2, 2, 2, 33, 180, 3, 2, 2, 2, 35, 198,
	3, 2, 2, 2, 37, 200, 3, 2, 2, 2, 39, 207, 3, 2, 2, 2, 41, 211, 3, 2, 2,
	2, 43, 213, 3, 2, 2, 2, 45, 219, 3, 2, 2, 2, 47, 222, 3, 2, 2, 2, 49, 224,
	3, 2, 2, 2, 51, 229, 3, 2, 2, 2, 53, 54, 7, 62, 2, 2, 54, 55, 7, 35, 2,
	2, 55, 56, 7, 47, 2, 2, 56, 57, 7, 47, 2, 2, 57, 61, 3, 2, 2, 2, 58, 60,
	11, 2, 2, 2, 59, 58, 3, 2, 2, 2, 60, 63, 3, 2, 2, 2, 61, 62, 3, 2, 2, 2,
	61, 59, 3, 2, 2, 2, 62, 64, 3, 2, 2, 2, 63, 61, 3, 2, 2, 2, 64, 65, 7,
	47, 2, 2, 65, 66, 7, 47, 2, 2, 66, 67, 7, 64, 2, 2, 67, 6, 3, 2, 2, 2,
	68, 69, 7, 62, 2, 2, 69, 70, 7, 35, 2, 2, 70, 71, 7, 93, 2, 2, 71, 72,
	7, 69, 2, 2, 72, 73, 7, 70, 2, 2, 73, 74, 7, 67, 2, 2, 74, 75, 7, 86, 2,
	2, 75, 76, 7, 67, 2, 2, 76, 77, 7, 93, 2, 2, 77, 81, 3, 2, 2, 2, 78, 80,
	11, 2, 2, 2, 79, 78, 3, 2, 2, 2, 80, 83, 3, 2, 2, 2, 81, 82, 3, 2, 2, 2,
	81, 79, 3, 2, 2, 2, 82, 84, 3, 2, 2, 2, 83, 81, 3, 2, 2, 2, 84, 85, 7,
	95, 2, 2, 85, 86, 7, 95, 2, 2, 86, 87, 7, 64, 2, 2, 87, 8, 3, 2, 2, 2,
	88, 89, 7, 62, 2, 2, 89, 90, 7, 35, 2, 2, 90, 94, 3, 2, 2, 2, 91, 93, 11,
	2, 2, 2, 92, 91, 3, 2, 2, 2, 93, 96, 3, 2, 2, 2, 94, 95, 3, 2, 2, 2, 94,
	92, 3, 2, 2, 2, 95, 97, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 97, 98, 7, 64,
	2, 2, 98, 99, 3, 2, 2, 2, 99, 100, 8, 4, 2, 2, 100, 10, 3, 2, 2, 2, 101,
	102, 7, 40, 2, 2, 102, 103, 5, 37, 18, 2, 103, 104, 7, 61, 2, 2, 104, 12,
	3, 2, 2, 2, 105, 106, 7, 40, 2, 2, 106, 107, 7, 37, 2, 2, 107, 109, 3,
	2, 2, 2, 108, 110, 5, 43, 21, 2, 109, 108, 3, 2, 2, 2, 110, 111, 3, 2,
	2, 2, 111, 109, 3, 2, 2, 2, 111, 112, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2,
	113, 114, 7, 61, 2, 2, 114, 127, 3, 2, 2, 2, 115, 116, 7, 40, 2, 2, 116,
	117, 7, 37, 2, 2, 117, 118, 7, 122, 2, 2, 118, 120, 3, 2, 2, 2, 119, 121,
	5, 41, 20, 2, 120, 119, 3, 2, 2, 2, 121, 122, 3, 2, 2, 2, 122, 120, 3,
	2, 2, 2, 122, 123, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 125, 7, 61, 2,
	2, 125, 127, 3, 2, 2, 2, 126, 105, 3, 2, 2, 2, 126, 115, 3, 2, 2, 2, 127,
	14, 3, 2, 2, 2, 128, 134, 9, 2, 2, 2, 129, 131, 7, 15, 2, 2, 130, 129,
	3, 2, 2, 2, 130, 131, 3, 2, 2, 2, 131, 132, 3, 2, 2, 2, 132, 134, 7, 12,
	2, 2, 133, 128, 3, 2, 2, 2, 133, 130, 3, 2, 2, 2, 134, 135, 3, 2, 2, 2,
	135, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 16, 3, 2, 2, 2, 137, 138,
	7, 62, 2, 2, 138, 139, 3, 2, 2, 2, 139, 140, 8, 8, 3, 2, 140, 18, 3, 2,
	2, 2, 141, 142, 7, 62, 2, 2, 142, 143, 7, 65, 2, 2, 143, 144, 7, 122, 2,
	2, 144, 145, 7, 111, 2, 2, 145, 146, 7, 110, 2, 2, 146, 147, 3, 2, 2, 2,
	147, 148, 5, 39, 19, 2, 148, 149, 3, 2, 2, 2, 149, 150, 8, 9, 3, 2, 150,
	20, 3, 2, 2, 2, 151, 152, 7, 62, 2, 2, 152, 153, 7, 65, 2, 2, 153, 154,
	3, 2, 2, 2, 154, 155, 5, 37, 18, 2, 155, 156, 3, 2, 2, 2, 156, 157, 8,
	10, 4, 2, 157, 158, 8, 10, 5, 2, 158, 22, 3, 2, 2, 2, 159, 161, 10, 3,
	2, 2, 160, 159, 3, 2, 2, 2, 161, 162, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2,
	162, 163, 3, 2, 2, 2, 163, 24, 3, 2, 2, 2, 164, 165, 7, 64, 2, 2, 165,
	166, 3, 2, 2, 2, 166, 167, 8, 12, 6, 2, 167, 26, 3, 2, 2, 2, 168, 169,
	7, 65, 2, 2, 169, 170, 7, 64, 2, 2, 170, 171, 3, 2, 2, 2, 171, 172, 8,
	13, 6, 2, 172, 28, 3, 2, 2, 2, 173, 174, 7, 49, 2, 2, 174, 175, 7, 64,
	2, 2, 175, 176, 3, 2, 2, 2, 176, 177, 8, 14, 6, 2, 177, 30, 3, 2, 2, 2,
	178, 179, 7, 49, 2, 2, 179, 32, 3, 2, 2, 2, 180, 181, 7, 63, 2, 2, 181,
	34, 3, 2, 2, 2, 182, 186, 7, 36, 2, 2, 183, 185, 10, 4, 2, 2, 184, 183,
	3, 2, 2, 2, 185, 188, 3, 2, 2, 2, 186, 184, 3, 2, 2, 2, 186, 187, 3, 2,
	2, 2, 187, 189, 3, 2, 2, 2, 188, 186, 3, 2, 2, 2, 189, 199, 7, 36, 2, 2,
	190, 194, 7, 41, 2, 2, 191, 193, 10, 5, 2, 2, 192, 191, 3, 2, 2, 2, 193,
	196, 3, 2, 2, 2, 194, 192, 3, 2, 2, 2, 194, 195, 3, 2, 2, 2, 195, 197,
	3, 2, 2, 2, 196, 194, 3, 2, 2, 2, 197, 199, 7, 41, 2, 2, 198, 182, 3, 2,
	2, 2, 198, 190, 3, 2, 2, 2, 199, 36, 3, 2, 2, 2, 200, 204, 5, 47, 23, 2,
	201, 203, 5, 45, 22, 2, 202, 201, 3, 2, 2, 2, 203, 206, 3, 2, 2, 2, 204,
	202, 3, 2, 2, 2, 204, 205, 3, 2, 2, 2, 205, 38, 3, 2, 2, 2, 206, 204, 3,
	2, 2, 2, 207, 208, 9, 6, 2, 2, 208, 209, 3, 2, 2, 2, 209, 210, 8, 19, 2,
	2, 210, 40, 3, 2, 2, 2, 211, 212, 9, 7, 2, 2, 212, 42, 3, 2, 2, 2, 213,
	214, 9, 8, 2, 2, 214, 44, 3, 2, 2, 2, 215, 220, 5, 47, 23, 2, 216, 220,
	9, 9, 2, 2, 217, 220, 5, 43, 21, 2, 218, 220, 9, 10, 2, 2, 219, 215, 3,
	2, 2, 2, 219, 216, 3, 2, 2, 2, 219, 217, 3, 2, 2, 2, 219, 218, 3, 2, 2,
	2, 220, 46, 3, 2, 2, 2, 221, 223, 9, 11, 2, 2, 222, 221, 3, 2, 2, 2, 223,
	48, 3, 2, 2, 2, 224, 225, 7, 65, 2, 2, 225, 226, 7, 64, 2, 2, 226, 227,
	3, 2, 2, 2, 227, 228, 8, 24, 6, 2, 228, 50, 3, 2, 2, 2, 229, 230, 11, 2,
	2, 2, 230, 231, 3, 2, 2, 2, 231, 232, 8, 25, 4, 2, 232, 52, 3, 2, 2, 2,
	21, 2, 3, 4, 61, 81, 94, 111, 122, 126, 130, 133, 135, 162, 186, 194, 198,
	204, 219, 222, 7, 8, 2, 2, 7, 3, 2, 5, 2, 2, 7, 4, 2, 6, 2, 2,
}

var lexerChannelNames = []string{
	"DEFAULT_TOKEN_CHANNEL", "HIDDEN",
}

var lexerModeNames = []string{
	"DEFAULT_MODE", "INSIDE", "PROC_INSTR",
}

var lexerLiteralNames = []string{
	"", "", "", "", "", "", "", "'<'", "", "", "'>'", "", "'/>'", "'/'", "'='",
}

var lexerSymbolicNames = []string{
	"", "COMMENT", "CDATA", "DTD", "EntityRef", "CharRef", "SEA_WS", "OPEN",
	"XMLDeclOpen", "TEXT", "CLOSE", "SPECIAL_CLOSE", "SLASH_CLOSE", "SLASH",
	"EQUALS", "STRING", "Name", "S", "PI",
}

var lexerRuleNames = []string{
	"COMMENT", "CDATA", "DTD", "EntityRef", "CharRef", "SEA_WS", "OPEN", "XMLDeclOpen",
	"SPECIAL_OPEN", "TEXT", "CLOSE", "SPECIAL_CLOSE", "SLASH_CLOSE", "SLASH",
	"EQUALS", "STRING", "Name", "S", "HEXDIGIT", "DIGIT", "NameChar", "NameStartChar",
	"PI", "IGNORE",
}

type XMLLexer struct {
	*antlr.BaseLexer
	channelNames []string
	modeNames    []string
	// TODO: EOF string
}

// NewXMLLexer produces a new lexer instance for the optional input antlr.CharStream.
//
// The *XMLLexer instance produced may be reused by calling the SetInputStream method.
// The initial lexer configuration is expensive to construct, and the object is not thread-safe;
// however, if used within a Golang sync.Pool, the construction cost amortizes well and the
// objects can be used in a thread-safe manner.
func NewXMLLexer(input antlr.CharStream) *XMLLexer {
	l := new(XMLLexer)
	lexerDeserializer := antlr.NewATNDeserializer(nil)
	lexerAtn := lexerDeserializer.DeserializeFromUInt16(serializedLexerAtn)
	lexerDecisionToDFA := make([]*antlr.DFA, len(lexerAtn.DecisionToState))
	for index, ds := range lexerAtn.DecisionToState {
		lexerDecisionToDFA[index] = antlr.NewDFA(ds, index)
	}
	l.BaseLexer = antlr.NewBaseLexer(input)
	l.Interpreter = antlr.NewLexerATNSimulator(l, lexerAtn, lexerDecisionToDFA, antlr.NewPredictionContextCache())

	l.channelNames = lexerChannelNames
	l.modeNames = lexerModeNames
	l.RuleNames = lexerRuleNames
	l.LiteralNames = lexerLiteralNames
	l.SymbolicNames = lexerSymbolicNames
	l.GrammarFileName = "XMLLexer.g4"
	// TODO: l.EOF = antlr.TokenEOF

	return l
}

// XMLLexer tokens.
const (
	XMLLexerCOMMENT       = 1
	XMLLexerCDATA         = 2
	XMLLexerDTD           = 3
	XMLLexerEntityRef     = 4
	XMLLexerCharRef       = 5
	XMLLexerSEA_WS        = 6
	XMLLexerOPEN          = 7
	XMLLexerXMLDeclOpen   = 8
	XMLLexerTEXT          = 9
	XMLLexerCLOSE         = 10
	XMLLexerSPECIAL_CLOSE = 11
	XMLLexerSLASH_CLOSE   = 12
	XMLLexerSLASH         = 13
	XMLLexerEQUALS        = 14
	XMLLexerSTRING        = 15
	XMLLexerName          = 16
	XMLLexerS             = 17
	XMLLexerPI            = 18
)

// XMLLexer modes.
const (
	XMLLexerINSIDE = iota + 1
	XMLLexerPROC_INSTR
)
