antlr-runtime-sys 0.2.0

antlr-runtime library.
Documentation
# Generated from Expr.g4 by ANTLR 4.13.1
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,17,92,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,1,0,1,0,1,0,1,0,1,1,1,1,1,2,1,
        2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,
        10,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,4,13,70,8,13,
        11,13,12,13,71,1,14,4,14,75,8,14,11,14,12,14,76,1,15,3,15,80,8,15,
        1,15,1,15,1,15,1,15,1,16,4,16,87,8,16,11,16,12,16,88,1,16,1,16,0,
        0,17,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,1,0,3,2,0,65,90,97,122,1,0,48,57,2,0,
        9,9,32,32,95,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,1,35,1,0,0,0,3,39,1,0,0,0,5,41,
        1,0,0,0,7,43,1,0,0,0,9,45,1,0,0,0,11,47,1,0,0,0,13,49,1,0,0,0,15,
        51,1,0,0,0,17,53,1,0,0,0,19,55,1,0,0,0,21,57,1,0,0,0,23,59,1,0,0,
        0,25,61,1,0,0,0,27,69,1,0,0,0,29,74,1,0,0,0,31,79,1,0,0,0,33,86,
        1,0,0,0,35,36,5,100,0,0,36,37,5,101,0,0,37,38,5,102,0,0,38,2,1,0,
        0,0,39,40,5,40,0,0,40,4,1,0,0,0,41,42,5,44,0,0,42,6,1,0,0,0,43,44,
        5,41,0,0,44,8,1,0,0,0,45,46,5,123,0,0,46,10,1,0,0,0,47,48,5,125,
        0,0,48,12,1,0,0,0,49,50,5,59,0,0,50,14,1,0,0,0,51,52,5,61,0,0,52,
        16,1,0,0,0,53,54,5,42,0,0,54,18,1,0,0,0,55,56,5,47,0,0,56,20,1,0,
        0,0,57,58,5,43,0,0,58,22,1,0,0,0,59,60,5,45,0,0,60,24,1,0,0,0,61,
        62,5,114,0,0,62,63,5,101,0,0,63,64,5,116,0,0,64,65,5,117,0,0,65,
        66,5,114,0,0,66,67,5,110,0,0,67,26,1,0,0,0,68,70,7,0,0,0,69,68,1,
        0,0,0,70,71,1,0,0,0,71,69,1,0,0,0,71,72,1,0,0,0,72,28,1,0,0,0,73,
        75,7,1,0,0,74,73,1,0,0,0,75,76,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,
        0,77,30,1,0,0,0,78,80,5,13,0,0,79,78,1,0,0,0,79,80,1,0,0,0,80,81,
        1,0,0,0,81,82,5,10,0,0,82,83,1,0,0,0,83,84,6,15,0,0,84,32,1,0,0,
        0,85,87,7,2,0,0,86,85,1,0,0,0,87,88,1,0,0,0,88,86,1,0,0,0,88,89,
        1,0,0,0,89,90,1,0,0,0,90,91,6,16,0,0,91,34,1,0,0,0,5,0,71,76,79,
        88,1,6,0,0
    ]

class ExprLexer(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
    MUL = 9
    DIV = 10
    ADD = 11
    SUB = 12
    RETURN = 13
    ID = 14
    INT = 15
    NEWLINE = 16
    WS = 17

    channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]

    modeNames = [ "DEFAULT_MODE" ]

    literalNames = [ "<INVALID>",
            "'def'", "'('", "','", "')'", "'{'", "'}'", "';'", "'='", "'*'", 
            "'/'", "'+'", "'-'", "'return'" ]

    symbolicNames = [ "<INVALID>",
            "MUL", "DIV", "ADD", "SUB", "RETURN", "ID", "INT", "NEWLINE", 
            "WS" ]

    ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", 
                  "T__7", "MUL", "DIV", "ADD", "SUB", "RETURN", "ID", "INT", 
                  "NEWLINE", "WS" ]

    grammarFileName = "Expr.g4"

    def __init__(self, input=None, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.13.1")
        self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
        self._actions = None
        self._predicates = None