Source code for architxt.grammar.metagrammarLexer

# Generated from metagrammar.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


[docs] def serializedATN(): return [ 4,0,8,103,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,1,0,1,0,1,0,1,0,1,0,1,0,1,0,4,0,25,8,0,11,0,12,0,26, 1,0,1,0,1,0,1,0,1,0,4,0,34,8,0,11,0,12,0,35,3,0,38,8,0,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,49,8,1,11,1,12,1,50,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,4,2,60,8,2,11,2,12,2,61,1,3,1,3,1,3,1,3,1,3,1,3,1, 3,1,3,4,3,72,8,3,11,3,12,3,73,1,3,1,3,1,3,1,3,1,3,4,3,81,8,3,11, 3,12,3,82,3,3,85,8,3,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,7, 4,7,98,8,7,11,7,12,7,99,1,7,1,7,0,0,8,1,1,3,2,5,3,7,4,9,5,11,6,13, 7,15,8,1,0,2,4,0,48,57,65,90,95,95,97,122,3,0,9,10,13,13,32,32,111, 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,1,17,1,0,0,0,3,39,1,0,0,0,5,52, 1,0,0,0,7,63,1,0,0,0,9,86,1,0,0,0,11,91,1,0,0,0,13,94,1,0,0,0,15, 97,1,0,0,0,17,18,5,82,0,0,18,19,5,69,0,0,19,20,5,76,0,0,20,21,5, 58,0,0,21,22,5,58,0,0,22,24,1,0,0,0,23,25,7,0,0,0,24,23,1,0,0,0, 25,26,1,0,0,0,26,24,1,0,0,0,26,27,1,0,0,0,27,37,1,0,0,0,28,29,5, 60,0,0,29,30,5,45,0,0,30,31,5,62,0,0,31,33,1,0,0,0,32,34,7,0,0,0, 33,32,1,0,0,0,34,35,1,0,0,0,35,33,1,0,0,0,35,36,1,0,0,0,36,38,1, 0,0,0,37,28,1,0,0,0,37,38,1,0,0,0,38,2,1,0,0,0,39,40,5,71,0,0,40, 41,5,82,0,0,41,42,5,79,0,0,42,43,5,85,0,0,43,44,5,80,0,0,44,45,5, 58,0,0,45,46,5,58,0,0,46,48,1,0,0,0,47,49,7,0,0,0,48,47,1,0,0,0, 49,50,1,0,0,0,50,48,1,0,0,0,50,51,1,0,0,0,51,4,1,0,0,0,52,53,5,69, 0,0,53,54,5,78,0,0,54,55,5,84,0,0,55,56,5,58,0,0,56,57,5,58,0,0, 57,59,1,0,0,0,58,60,7,0,0,0,59,58,1,0,0,0,60,61,1,0,0,0,61,59,1, 0,0,0,61,62,1,0,0,0,62,6,1,0,0,0,63,64,5,67,0,0,64,65,5,79,0,0,65, 66,5,76,0,0,66,67,5,76,0,0,67,68,5,58,0,0,68,69,5,58,0,0,69,71,1, 0,0,0,70,72,7,0,0,0,71,70,1,0,0,0,72,73,1,0,0,0,73,71,1,0,0,0,73, 74,1,0,0,0,74,84,1,0,0,0,75,76,5,60,0,0,76,77,5,45,0,0,77,78,5,62, 0,0,78,80,1,0,0,0,79,81,7,0,0,0,80,79,1,0,0,0,81,82,1,0,0,0,82,80, 1,0,0,0,82,83,1,0,0,0,83,85,1,0,0,0,84,75,1,0,0,0,84,85,1,0,0,0, 85,8,1,0,0,0,86,87,5,82,0,0,87,88,5,79,0,0,88,89,5,79,0,0,89,90, 5,84,0,0,90,10,1,0,0,0,91,92,5,45,0,0,92,93,5,62,0,0,93,12,1,0,0, 0,94,95,5,59,0,0,95,14,1,0,0,0,96,98,7,1,0,0,97,96,1,0,0,0,98,99, 1,0,0,0,99,97,1,0,0,0,99,100,1,0,0,0,100,101,1,0,0,0,101,102,6,7, 0,0,102,16,1,0,0,0,10,0,26,35,37,50,61,73,82,84,99,1,6,0,0 ]
[docs] class metagrammarLexer(Lexer): atn = ATNDeserializer().deserialize(serializedATN()) decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] REL = 1 GROUP = 2 ENT = 3 COLL = 4 ROOT = 5 PROD_SYMBOL = 6 PROD_SEPARATOR = 7 WS = 8 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] modeNames = [ "DEFAULT_MODE" ] literalNames = [ "<INVALID>", "'ROOT'", "'->'", "';'" ] symbolicNames = [ "<INVALID>", "REL", "GROUP", "ENT", "COLL", "ROOT", "PROD_SYMBOL", "PROD_SEPARATOR", "WS" ] ruleNames = [ "REL", "GROUP", "ENT", "COLL", "ROOT", "PROD_SYMBOL", "PROD_SEPARATOR", "WS" ] grammarFileName = "metagrammar.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