Files
MYOL-TB2-prog3-Py/Week_3/week3Lexer.py
T

64 lines
2.1 KiB
Python

# Generated from ./week3.g4 by ANTLR 4.13.2
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
return [
4,0,5,43,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,1,0,1,0,1,
0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,
2,1,2,1,3,4,3,33,8,3,11,3,12,3,34,1,4,4,4,38,8,4,11,4,12,4,39,1,
4,1,4,0,0,5,1,1,3,2,5,3,7,4,9,5,1,0,2,2,0,65,90,97,122,3,0,9,10,
13,13,32,32,44,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,
9,1,0,0,0,1,11,1,0,0,0,3,19,1,0,0,0,5,23,1,0,0,0,7,32,1,0,0,0,9,
37,1,0,0,0,11,12,5,109,0,0,12,13,5,105,0,0,13,14,5,110,0,0,14,15,
5,105,0,0,15,16,5,109,0,0,16,17,5,97,0,0,17,18,5,108,0,0,18,2,1,
0,0,0,19,20,5,98,0,0,20,21,5,121,0,0,21,22,5,101,0,0,22,4,1,0,0,
0,23,24,5,103,0,0,24,25,5,111,0,0,25,26,5,111,0,0,26,27,5,100,0,
0,27,28,5,98,0,0,28,29,5,121,0,0,29,30,5,101,0,0,30,6,1,0,0,0,31,
33,7,0,0,0,32,31,1,0,0,0,33,34,1,0,0,0,34,32,1,0,0,0,34,35,1,0,0,
0,35,8,1,0,0,0,36,38,7,1,0,0,37,36,1,0,0,0,38,39,1,0,0,0,39,37,1,
0,0,0,39,40,1,0,0,0,40,41,1,0,0,0,41,42,6,4,0,0,42,10,1,0,0,0,3,
0,34,39,1,6,0,0
]
class week3Lexer(Lexer):
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
T__0 = 1
T__1 = 2
T__2 = 3
ID = 4
WS = 5
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE" ]
literalNames = [ "<INVALID>",
"'minimal'", "'bye'", "'goodbye'" ]
symbolicNames = [ "<INVALID>",
"ID", "WS" ]
ruleNames = [ "T__0", "T__1", "T__2", "ID", "WS" ]
grammarFileName = "week3.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.13.2")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None