RoboWaiter/ptml/ptmlLexer.py

135 lines
6.4 KiB
Python

# Generated from ./ptml.g4 by ANTLR 4.13.0
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,20,186,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,
2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,
13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,
19,1,0,1,0,1,1,1,1,1,1,1,1,1,1,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,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,
4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,
8,1,8,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,
11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,
13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,5,15,126,8,15,10,
15,12,15,129,9,15,1,16,3,16,132,8,16,1,16,1,16,5,16,136,8,16,10,
16,12,16,139,9,16,1,16,3,16,142,8,16,1,17,4,17,145,8,17,11,17,12,
17,146,1,17,1,17,5,17,151,8,17,10,17,12,17,154,9,17,1,17,1,17,4,
17,158,8,17,11,17,12,17,159,3,17,162,8,17,1,18,1,18,1,18,1,18,5,
18,168,8,18,10,18,12,18,171,9,18,1,18,3,18,174,8,18,1,18,1,18,1,
18,1,18,1,19,4,19,181,8,19,11,19,12,19,182,1,19,1,19,1,169,0,20,
1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,
27,14,29,15,31,16,33,17,35,18,37,19,39,20,1,0,5,3,0,65,90,95,95,
97,122,4,0,48,57,65,90,95,95,97,122,1,0,49,57,1,0,48,57,3,0,9,10,
12,13,32,32,196,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,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,
0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,
0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,
0,39,1,0,0,0,1,41,1,0,0,0,3,43,1,0,0,0,5,52,1,0,0,0,7,61,1,0,0,0,
9,70,1,0,0,0,11,80,1,0,0,0,13,84,1,0,0,0,15,86,1,0,0,0,17,88,1,0,
0,0,19,90,1,0,0,0,21,94,1,0,0,0,23,100,1,0,0,0,25,105,1,0,0,0,27,
112,1,0,0,0,29,117,1,0,0,0,31,123,1,0,0,0,33,141,1,0,0,0,35,161,
1,0,0,0,37,163,1,0,0,0,39,180,1,0,0,0,41,42,5,58,0,0,42,2,1,0,0,
0,43,44,5,115,0,0,44,45,5,101,0,0,45,46,5,113,0,0,46,47,5,117,0,
0,47,48,5,101,0,0,48,49,5,110,0,0,49,50,5,99,0,0,50,51,5,101,0,0,
51,4,1,0,0,0,52,53,5,115,0,0,53,54,5,101,0,0,54,55,5,108,0,0,55,
56,5,101,0,0,56,57,5,99,0,0,57,58,5,116,0,0,58,59,5,111,0,0,59,60,
5,114,0,0,60,6,1,0,0,0,61,62,5,112,0,0,62,63,5,97,0,0,63,64,5,114,
0,0,64,65,5,97,0,0,65,66,5,108,0,0,66,67,5,108,0,0,67,68,5,101,0,
0,68,69,5,108,0,0,69,8,1,0,0,0,70,71,5,100,0,0,71,72,5,101,0,0,72,
73,5,99,0,0,73,74,5,111,0,0,74,75,5,114,0,0,75,76,5,97,0,0,76,77,
5,116,0,0,77,78,5,111,0,0,78,79,5,114,0,0,79,10,1,0,0,0,80,81,5,
97,0,0,81,82,5,99,0,0,82,83,5,116,0,0,83,12,1,0,0,0,84,85,5,40,0,
0,85,14,1,0,0,0,86,87,5,41,0,0,87,16,1,0,0,0,88,89,5,44,0,0,89,18,
1,0,0,0,90,91,5,105,0,0,91,92,5,110,0,0,92,93,5,116,0,0,93,20,1,
0,0,0,94,95,5,102,0,0,95,96,5,108,0,0,96,97,5,111,0,0,97,98,5,97,
0,0,98,99,5,116,0,0,99,22,1,0,0,0,100,101,5,98,0,0,101,102,5,111,
0,0,102,103,5,111,0,0,103,104,5,108,0,0,104,24,1,0,0,0,105,106,5,
115,0,0,106,107,5,116,0,0,107,108,5,114,0,0,108,109,5,105,0,0,109,
110,5,110,0,0,110,111,5,103,0,0,111,26,1,0,0,0,112,113,5,84,0,0,
113,114,5,114,0,0,114,115,5,117,0,0,115,116,5,101,0,0,116,28,1,0,
0,0,117,118,5,70,0,0,118,119,5,97,0,0,119,120,5,108,0,0,120,121,
5,115,0,0,121,122,5,101,0,0,122,30,1,0,0,0,123,127,7,0,0,0,124,126,
7,1,0,0,125,124,1,0,0,0,126,129,1,0,0,0,127,125,1,0,0,0,127,128,
1,0,0,0,128,32,1,0,0,0,129,127,1,0,0,0,130,132,5,45,0,0,131,130,
1,0,0,0,131,132,1,0,0,0,132,133,1,0,0,0,133,137,7,2,0,0,134,136,
7,3,0,0,135,134,1,0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,137,138,
1,0,0,0,138,142,1,0,0,0,139,137,1,0,0,0,140,142,5,48,0,0,141,131,
1,0,0,0,141,140,1,0,0,0,142,34,1,0,0,0,143,145,7,3,0,0,144,143,1,
0,0,0,145,146,1,0,0,0,146,144,1,0,0,0,146,147,1,0,0,0,147,148,1,
0,0,0,148,152,5,46,0,0,149,151,7,3,0,0,150,149,1,0,0,0,151,154,1,
0,0,0,152,150,1,0,0,0,152,153,1,0,0,0,153,162,1,0,0,0,154,152,1,
0,0,0,155,157,5,46,0,0,156,158,7,3,0,0,157,156,1,0,0,0,158,159,1,
0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,162,1,0,0,0,161,144,1,
0,0,0,161,155,1,0,0,0,162,36,1,0,0,0,163,164,5,47,0,0,164,165,5,
47,0,0,165,169,1,0,0,0,166,168,9,0,0,0,167,166,1,0,0,0,168,171,1,
0,0,0,169,170,1,0,0,0,169,167,1,0,0,0,170,173,1,0,0,0,171,169,1,
0,0,0,172,174,5,13,0,0,173,172,1,0,0,0,173,174,1,0,0,0,174,175,1,
0,0,0,175,176,5,10,0,0,176,177,1,0,0,0,177,178,6,18,0,0,178,38,1,
0,0,0,179,181,7,4,0,0,180,179,1,0,0,0,181,182,1,0,0,0,182,180,1,
0,0,0,182,183,1,0,0,0,183,184,1,0,0,0,184,185,6,19,0,0,185,40,1,
0,0,0,12,0,127,131,137,141,146,152,159,161,169,173,182,1,6,0,0
]
class ptmlLexer(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
T__3 = 4
T__4 = 5
T__5 = 6
T__6 = 7
T__7 = 8
T__8 = 9
T__9 = 10
T__10 = 11
T__11 = 12
T__12 = 13
T__13 = 14
T__14 = 15
Names = 16
Integer = 17
Float = 18
LINE_COMMENT = 19
WS = 20
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE" ]
literalNames = [ "<INVALID>",
"':'", "'sequence'", "'selector'", "'parallel'", "'decorator'",
"'act'", "'('", "')'", "','", "'int'", "'float'", "'bool'",
"'string'", "'True'", "'False'" ]
symbolicNames = [ "<INVALID>",
"Names", "Integer", "Float", "LINE_COMMENT", "WS" ]
ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6",
"T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "T__13",
"T__14", "Names", "Integer", "Float", "LINE_COMMENT",
"WS" ]
grammarFileName = "ptml.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.13.0")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None