Пример #1
0
class Parser (WaxeyeParser):
    start = 0
    eof_check = True
    automata = [FA("record", [State([Edge(10, 1, False)], False),
            State([Edge(29, 2, False)], False),
            State([Edge(47, 3, False)], False),
            State([Edge(3, 4, False)], False),
            State([Edge(9, 5, False)], False),
            State([Edge(47, 6, False)], False),
            State([Edge(24, 7, False)], False),
            State([Edge(2, 8, False)], False),
            State([Edge(47, 9, False)], True),
            State([], True)], FA.LEFT),
        FA("component", [State([Edge(47, 1, False)], False),
            State([Edge(24, 2, False)], False),
            State([], True)], FA.LEFT),
        FA("componentsR", [State([Edge(1, 1, False)], False),
            State([Edge(1, 1, False)], True)], FA.LEFT),
        FA("optionsOpt", [State([Edge(4, 1, False)], True),
            State([], True)], FA.LEFT),
        FA("optionsR", [State([Edge(34, 1, False)], False),
            State([Edge(5, 2, False)], False),
            State([Edge(35, 3, False)], False),
            State([Edge(47, 4, False)], False),
            State([], True)], FA.LEFT),
        FA("optionsList", [State([Edge(6, 1, False)], False),
            State([Edge(14, 2, False)], False),
            State([], True)], FA.LEFT),
        FA("optionR", [State([Edge(30, 1, False)], False),
            State([Edge(36, 2, False)], False),
            State([Edge(12, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("uriSchema", [State([Edge(46, 1, False)], False),
            State([Edge(16, 2, False)], False),
            State([], True)], FA.LEFT),
        FA("genericURI", [State([Edge(7, 1, False)], False),
            State([Edge(39, 2, False)], False),
            State([Edge(28, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("uriR", [State([Edge(22, 1, False),
                Edge(8, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("commenterROpt", [State([Edge(18, 1, False)], True),
            State([], True)], FA.LEFT),
        FA("optionValueSegment", [State([Edge(46, 1, False),
                Edge(33, 1, False),
                Edge(41, 1, False),
                Edge(30, 1, False),
                Edge(31, 1, False),
                Edge(29, 1, False),
                Edge(38, 1, False),
                Edge(39, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("optionValue", [State([Edge(11, 1, False)], False),
            State([Edge(11, 1, False)], True)], FA.LEFT),
        FA("tickEnclosedString", [State([Edge(19, 1, False),
                Edge(20, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("rest_options_with_delF", [State([Edge(15, 0, False)], True)], FA.LEFT),
        FA("rest_option_with_delF", [State([Edge(40, 1, False)], False),
            State([Edge(6, 2, False)], False),
            State([], True)], FA.LEFT),
        FA("rest_words_with_delF", [State([Edge(17, 0, False)], True)], FA.LEFT),
        FA("rest_word_with_delF", [State([Edge(38, 1, False)], False),
            State([Edge(46, 2, False)], False),
            State([], True)], FA.LEFT),
        FA("commenterR", [State([Edge(37, 1, False)], False),
            State([Edge(47, 2, False)], True),
            State([], True)], FA.LEFT),
        FA("singleTickEnclosedString", [State([Edge(42, 1, False)], False),
            State([Edge(26, 2, False)], False),
            State([Edge(42, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("doubleTickEnclosedString", [State([Edge(43, 1, False)], False),
            State([Edge(26, 2, False)], False),
            State([Edge(43, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("enclosedString", [State([Edge(34, 1, False)], False),
            State([Edge(13, 2, False)], False),
            State([Edge(35, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("cdromURI", [State([Edge(31, 1, False)], False),
            State([Edge(39, 2, False)], False),
            State([Edge(21, 3, False)], False),
            State([Edge(28, 4, False)], False),
            State([], True)], FA.LEFT),
        FA("wordWithDashSegment", [State([Edge(46, 1, False),
                Edge(41, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("wordWithDash", [State([Edge(23, 1, False)], False),
            State([Edge(23, 1, False)], True)], FA.LEFT),
        FA("nonSquareBracketStringSegment", [State([Edge(45, 1, False),
                Edge(11, 1, False),
                Edge(36, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("nonSquareBracketString", [State([Edge(25, 1, False)], False),
            State([Edge(25, 1, False)], True)], FA.LEFT),
        FA("nonSpaceStringSegment", [State([Edge(25, 1, False),
                Edge(35, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("nonSpaceString", [State([Edge(27, 1, False)], False),
            State([Edge(27, 1, False)], True)], FA.LEFT),
        FA("typeR", [State([Edge(["D", "d"], 1, False)], False),
            State([Edge(["E", "e"], 2, False)], False),
            State([Edge(["B", "b"], 3, False)], False),
            State([Edge(["-"], 4, False)], True),
            State([Edge(["S", "s"], 5, False)], False),
            State([Edge(["R", "r"], 6, False)], False),
            State([Edge(["C", "c"], 7, False)], False),
            State([], True)], FA.LEFT),
        FA("optionName", [State([Edge(["A", "a"], 1, False),
                Edge(["L", "l"], 5, False),
                Edge(["T", "t"], 8, False),
                Edge(["P", "p"], 13, False),
                Edge(["B", "b"], 18, False),
                Edge(["V", "v"], 24, False),
                Edge(["A", "a"], 38, False),
                Edge(["T", "t"], 74, False),
                Edge(["S", "s"], 80, False),
                Edge(["C", "c"], 88, False),
                Edge(["V", "v"], 104, False),
                Edge(["C", "c"], 118, False),
                Edge(["I", "i"], 127, False),
                Edge(["D", "d"], 140, False)], False),
            State([Edge(["R", "r"], 2, False)], False),
            State([Edge(["C", "c"], 3, False)], False),
            State([Edge(["H", "h"], 4, False)], False),
            State([], True),
            State([Edge(["A", "a"], 6, False)], False),
            State([Edge(["N", "n"], 7, False)], False),
            State([Edge(["G", "g"], 4, False)], False),
            State([Edge(["A", "a"], 9, False)], False),
            State([Edge(["R", "r"], 10, False)], False),
            State([Edge(["G", "g"], 11, False)], False),
            State([Edge(["E", "e"], 12, False)], False),
            State([Edge(["T", "t"], 4, False)], False),
            State([Edge(["D", "d"], 14, False)], False),
            State([Edge(["I", "i"], 15, False)], False),
            State([Edge(["F", "f"], 16, False)], False),
            State([Edge(["F", "f"], 17, False)], False),
            State([Edge(["S", "s"], 4, False)], False),
            State([Edge(["Y", "y"], 19, False)], False),
            State([Edge(["-"], 20, False)], False),
            State([Edge(["H", "h"], 21, False)], False),
            State([Edge(["A", "a"], 22, False)], False),
            State([Edge(["S", "s"], 23, False)], False),
            State([Edge(["H", "h"], 4, False)], False),
            State([Edge(["A", "a"], 25, False)], False),
            State([Edge(["L", "l"], 26, False)], False),
            State([Edge(["I", "i"], 27, False)], False),
            State([Edge(["D", "d"], 28, False)], False),
            State([Edge(["-"], 29, False)], False),
            State([Edge(["U", "u"], 30, False)], False),
            State([Edge(["N", "n"], 31, False)], False),
            State([Edge(["T", "t"], 32, False)], False),
            State([Edge(["I", "i"], 33, False)], False),
            State([Edge(["L", "l"], 34, False)], False),
            State([Edge(["-"], 35, False)], False),
            State([Edge(["M", "m"], 36, False)], False),
            State([Edge(["A", "a"], 37, False)], False),
            State([Edge(["X", "x"], 4, False)], False),
            State([Edge(["L", "l"], 39, False)], False),
            State([Edge(["L", "l"], 40, False)], False),
            State([Edge(["O", "o"], 41, False)], False),
            State([Edge(["W", "w"], 42, False)], False),
            State([Edge(["-"], 43, False)], False),
            State([Edge(["D", "d"], 44, False),
                Edge(["W", "w"], 64, False),
                Edge(["I", "i"], 67, False)], False),
            State([Edge(["O", "o"], 45, False)], False),
            State([Edge(["W", "w"], 46, False)], False),
            State([Edge(["N", "n"], 47, False)], False),
            State([Edge(["G", "g"], 48, False)], False),
            State([Edge(["R", "r"], 49, False)], False),
            State([Edge(["A", "a"], 50, False)], False),
            State([Edge(["D", "d"], 51, False)], False),
            State([Edge(["E", "e"], 52, False)], False),
            State([Edge(["-"], 53, False)], False),
            State([Edge(["T", "t"], 54, False)], False),
            State([Edge(["O", "o"], 55, False)], False),
            State([Edge(["-"], 56, False)], False),
            State([Edge(["I", "i"], 57, False)], False),
            State([Edge(["N", "n"], 58, False)], False),
            State([Edge(["S", "s"], 59, False)], False),
            State([Edge(["E", "e"], 60, False)], False),
            State([Edge(["C", "c"], 61, False)], False),
            State([Edge(["U", "u"], 62, False)], False),
            State([Edge(["R", "r"], 63, False)], False),
            State([Edge(["E", "e"], 4, False)], False),
            State([Edge(["E", "e"], 65, False)], False),
            State([Edge(["A", "a"], 66, False)], False),
            State([Edge(["K", "k"], 4, False)], False),
            State([Edge(["N", "n"], 68, False)], False),
            State([Edge(["S", "s"], 69, False)], False),
            State([Edge(["E", "e"], 70, False)], False),
            State([Edge(["C", "c"], 71, False)], False),
            State([Edge(["U", "u"], 72, False)], False),
            State([Edge(["R", "r"], 73, False)], False),
            State([Edge(["E", "e"], 4, False)], False),
            State([Edge(["R", "r"], 75, False)], False),
            State([Edge(["U", "u"], 76, False)], False),
            State([Edge(["S", "s"], 77, False)], False),
            State([Edge(["T", "t"], 78, False)], False),
            State([Edge(["E", "e"], 79, False)], False),
            State([Edge(["D", "d"], 4, False)], False),
            State([Edge(["I", "i"], 81, False)], False),
            State([Edge(["G", "g"], 82, False)], False),
            State([Edge(["N", "n"], 83, False)], False),
            State([Edge(["E", "e"], 84, False)], False),
            State([Edge(["D", "d"], 85, False)], False),
            State([Edge(["-"], 86, False)], False),
            State([Edge(["B", "b"], 87, False)], False),
            State([Edge(["Y", "y"], 4, False)], False),
            State([Edge(["H", "h"], 89, False)], False),
            State([Edge(["E", "e"], 90, False)], False),
            State([Edge(["C", "c"], 91, False)], False),
            State([Edge(["K", "k"], 92, False)], False),
            State([Edge(["-"], 93, False)], False),
            State([Edge(["V", "v"], 94, False)], False),
            State([Edge(["A", "a"], 95, False)], False),
            State([Edge(["L", "l"], 96, False)], False),
            State([Edge(["I", "i"], 97, False)], False),
            State([Edge(["D", "d"], 98, False)], False),
            State([Edge(["-"], 99, False)], False),
            State([Edge(["U", "u"], 100, False)], False),
            State([Edge(["N", "n"], 101, False)], False),
            State([Edge(["T", "t"], 102, False)], False),
            State([Edge(["I", "i"], 103, False)], False),
            State([Edge(["L", "l"], 4, False)], False),
            State([Edge(["A", "a"], 105, False)], False),
            State([Edge(["L", "l"], 106, False)], False),
            State([Edge(["I", "i"], 107, False)], False),
            State([Edge(["D", "d"], 108, False)], False),
            State([Edge(["-"], 109, False)], False),
            State([Edge(["U", "u"], 110, False)], False),
            State([Edge(["N", "n"], 111, False)], False),
            State([Edge(["T", "t"], 112, False)], False),
            State([Edge(["I", "i"], 113, False)], False),
            State([Edge(["L", "l"], 114, False)], False),
            State([Edge(["-"], 115, False)], False),
            State([Edge(["M", "m"], 116, False)], False),
            State([Edge(["I", "i"], 117, False)], False),
            State([Edge(["N", "n"], 4, False)], False),
            State([Edge(["H", "h"], 119, False)], False),
            State([Edge(["E", "e"], 120, False)], False),
            State([Edge(["C", "c"], 121, False)], False),
            State([Edge(["K", "k"], 122, False)], False),
            State([Edge(["-"], 123, False)], False),
            State([Edge(["D", "d"], 124, False)], False),
            State([Edge(["A", "a"], 125, False)], False),
            State([Edge(["T", "t"], 126, False)], False),
            State([Edge(["E", "e"], 4, False)], False),
            State([Edge(["N", "n"], 128, False)], False),
            State([Edge(["R", "r"], 129, False)], False),
            State([Edge(["E", "e"], 130, False)], False),
            State([Edge(["L", "l"], 131, False)], False),
            State([Edge(["E", "e"], 132, False)], False),
            State([Edge(["A", "a"], 133, False)], False),
            State([Edge(["S", "s"], 134, False)], False),
            State([Edge(["E", "e"], 135, False)], False),
            State([Edge(["-"], 136, False)], False),
            State([Edge(["P", "p"], 137, False)], False),
            State([Edge(["A", "a"], 138, False)], False),
            State([Edge(["T", "t"], 139, False)], False),
            State([Edge(["H", "h"], 4, False)], False),
            State([Edge(["A", "a"], 141, False)], False),
            State([Edge(["T", "t"], 142, False)], False),
            State([Edge(["E", "e"], 143, False)], False),
            State([Edge(["-"], 144, False)], False),
            State([Edge(["M", "m"], 145, False)], False),
            State([Edge(["A", "a"], 146, False)], False),
            State([Edge(["X", "x"], 147, False)], False),
            State([Edge(["-"], 148, False)], False),
            State([Edge(["F", "f"], 149, False)], False),
            State([Edge(["U", "u"], 150, False)], False),
            State([Edge(["T", "t"], 151, False)], False),
            State([Edge(["U", "u"], 152, False)], False),
            State([Edge(["R", "r"], 153, False)], False),
            State([Edge(["E", "e"], 4, False)], False)], FA.LEFT),
        FA("cdromSchema", [State([Edge(["C", "c"], 1, False)], False),
            State([Edge(["D", "d"], 2, False)], False),
            State([Edge(["R", "r"], 3, False)], False),
            State([Edge(["O", "o"], 4, False)], False),
            State([Edge(["M", "m"], 5, False)], False),
            State([Edge([":"], 6, False)], False),
            State([], True)], FA.LEFT),
        FA("wS", [State([Edge([(9, 13), " "], 1, False)], False),
            State([], True)], FA.LEFT),
        FA("punctuationAllowedInOptionValue", [State([Edge([(46, 47)], 1, False)], False),
            State([], True)], FA.LEFT),
        FA("optionsStart", [State([Edge("[", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("optionsEnd", [State([Edge("]", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("optionNameValueSeparator", [State([Edge("=", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("commentMarker", [State([Edge("#", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("plus", [State([Edge("+", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("colon", [State([Edge(":", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("optionsSeparator", [State([Edge(",", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("dash", [State([Edge("-", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("singleTick", [State([Edge("\'", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("doubleTick", [State([Edge("\"", 1, False)], False),
            State([], True)], FA.LEFT),
        FA("wordChar", [State([Edge([(48, 57), (65, 90), "_", (97, 122)], 1, False)], False),
            State([], True)], FA.LEFT),
        FA("nonWhitespaceNonOptionValueNonSquareRightBracketNonEq", [State([Edge(48, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("word", [State([Edge(44, 1, False)], False),
            State([Edge(44, 1, False)], True)], FA.LEFT),
        FA("wSS", [State([Edge(32, 1, False)], False),
            State([Edge(32, 1, False)], True)], FA.LEFT),
        FA("", [State([Edge([(9, 13), " ", (34, 35), "\'", (43, 58), "=", (65, 93), "_", (97, 122)], 1, False)], False),
            State([], True)], FA.NEG)]

    def __init__(self):
        WaxeyeParser.__init__(self, Parser.start, Parser.eof_check, Parser.automata)
Пример #2
0
class Parser (WaxeyeParser):
    start = 0
    eof_check = True
    automata = [FA("alarmDsl", [State([Edge(38, 1, False)], False),
            State([Edge(28, 1, False),
                Edge(38, 2, False)], False),
            State([Edge(10, 2, False),
                Edge(38, 3, False)], False),
            State([Edge(22, 3, False)], True)], FA.LEFT),
        FA("metricName", [State([Edge("m", 1, True)], False),
            State([Edge("e", 2, True)], False),
            State([Edge("t", 3, True)], False),
            State([Edge("r", 4, True)], False),
            State([Edge("i", 5, True)], False),
            State([Edge("c", 6, True)], False),
            State([Edge("[", 7, True)], False),
            State([Edge("\"", 8, True),
                Edge("\'", 12, True)], False),
            State([Edge(5, 9, False)], False),
            State([Edge("\"", 10, True)], False),
            State([Edge("]", 11, True)], False),
            State([], True),
            State([Edge(5, 13, False)], False),
            State([Edge("\'", 10, True)], False)], FA.LEFT),
        FA("param", [State([Edge(38, 1, False)], False),
            State([Edge(1, 2, False),
                Edge(17, 2, False)], False),
            State([Edge(38, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("functionName", [State([Edge([(65, 90), "_", (97, 122)], 1, False)], False),
            State([Edge([(65, 90), "_", (97, 122)], 1, False)], True)], FA.LEFT),
        FA("metric", [State([Edge(3, 1, False),
                Edge(1, 4, False)], False),
            State([Edge("(", 2, True)], False),
            State([Edge(2, 3, False)], False),
            State([Edge(")", 4, True),
                Edge(",", 5, True)], False),
            State([], True),
            State([Edge(38, 6, False)], False),
            State([Edge(2, 7, False)], False),
            State([Edge(",", 5, True),
                Edge(")", 4, True)], False)], FA.PRUNE),
        FA("name", [State([Edge(["-", (65, 90), "_", (97, 122)], 1, False),
                Edge(" ", 1, False),
                Edge([(48, 57)], 1, False),
                Edge(".", 1, False),
                Edge("/", 1, False)], False),
            State([Edge(["-", (65, 90), "_", (97, 122)], 1, False),
                Edge(" ", 1, False),
                Edge([(48, 57)], 1, False),
                Edge(".", 1, False),
                Edge("/", 1, False)], True)], FA.LEFT),
        FA("inExp", [State([Edge(4, 1, False)], False),
            State([Edge(38, 2, False)], False),
            State([Edge(7, 3, False)], False),
            State([], True)], FA.PRUNE),
        FA("rhs", [State([Edge(25, 1, False),
                Edge(26, 4, False),
                Edge(27, 6, False)], False),
            State([Edge(38, 2, False)], False),
            State([Edge(12, 3, False)], False),
            State([], True),
            State([Edge(38, 5, False)], False),
            State([Edge(13, 3, False)], False),
            State([Edge(38, 7, False)], False),
            State([Edge(14, 3, False)], False)], FA.LEFT),
        FA("condExp", [State([Edge(38, 1, False)], False),
            State([Edge("(", 2, True),
                Edge(6, 6, False)], False),
            State([Edge(38, 3, False)], False),
            State([Edge(6, 4, False)], False),
            State([Edge(38, 5, False)], False),
            State([Edge(")", 6, True)], False),
            State([Edge(38, 7, False)], False),
            State([], True)], FA.PRUNE),
        FA("conj", [State([Edge("&", 1, False),
                Edge("|", 3, False)], False),
            State([Edge("&", 2, False)], False),
            State([], True),
            State([Edge("|", 2, False)], False)], FA.LEFT),
        FA("ifStatement", [State([Edge("i", 1, True)], False),
            State([Edge("f", 2, True)], False),
            State([Edge(38, 3, False)], False),
            State([Edge("(", 4, True)], False),
            State([Edge(38, 5, False)], False),
            State([Edge(8, 6, False)], False),
            State([Edge(9, 7, False),
                Edge(")", 9, True)], False),
            State([Edge(38, 8, False)], False),
            State([Edge(8, 6, False)], False),
            State([Edge(38, 10, False)], False),
            State([Edge(11, 11, False)], False),
            State([Edge(38, 12, False)], False),
            State([], True)], FA.LEFT),
        FA("block", [State([Edge("{", 1, True)], False),
            State([Edge(38, 2, False)], False),
            State([Edge(22, 3, False)], False),
            State([Edge(38, 4, False)], False),
            State([Edge("}", 5, True)], False),
            State([], True)], FA.LEFT),
        FA("nValue", [State([Edge(17, 1, False),
                Edge(4, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("tValue", [State([Edge(14, 1, False),
                Edge(4, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("string", [State([Edge("\"", 1, True),
                Edge("\'", 6, True)], False),
            State([Edge("\\", 2, True),
                Edge(40, 3, False),
                Edge("\"", 5, True)], False),
            State([Edge(15, 1, False),
                Edge(16, 1, False)], False),
            State([Edge(39, 4, False)], False),
            State([Edge(-1, 1, False)], False),
            State([], True),
            State([Edge("\\", 7, True),
                Edge(42, 8, False),
                Edge("\'", 5, True)], False),
            State([Edge(15, 6, False),
                Edge(16, 6, False)], False),
            State([Edge(41, 9, False)], False),
            State([Edge(-1, 6, False)], False)], FA.LEFT),
        FA("unicode", [State([Edge("u", 1, False)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 2, False)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 3, False)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 4, False)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 5, False)], False),
            State([], True)], FA.LEFT),
        FA("escaped", [State([Edge(["\"", "\'", "/", "\\", "b", "f", "n", "r", "t"], 1, False)], False),
            State([], True)], FA.LEFT),
        FA("number", [State([Edge("-", 1, False),
                Edge("0", 2, False),
                Edge([(49, 57)], 8, False)], False),
            State([Edge("0", 2, False),
                Edge([(49, 57)], 8, False)], False),
            State([Edge(".", 3, False),
                Edge(["E", "e"], 5, False)], True),
            State([Edge([(48, 57)], 4, False)], False),
            State([Edge([(48, 57)], 4, False),
                Edge(["E", "e"], 5, False)], True),
            State([Edge(["+", "-"], 6, False),
                Edge([(48, 57)], 7, False)], False),
            State([Edge([(48, 57)], 7, False)], False),
            State([Edge([(48, 57)], 7, False)], True),
            State([Edge([(48, 57)], 8, False),
                Edge(".", 3, False),
                Edge(["E", "e"], 5, False)], True)], FA.LEFT),
        FA("wholeNumber", [State([Edge([(49, 57)], 1, False)], False),
            State([Edge([(48, 57)], 1, False)], True)], FA.LEFT),
        FA("alarmStatusArgs", [State([Edge(23, 1, False)], False),
            State([Edge(38, 2, False)], True),
            State([Edge(",", 3, True)], False),
            State([Edge(38, 4, False)], False),
            State([Edge(24, 5, False)], False),
            State([], True)], FA.LEFT),
        FA("deprecatedAlarmStatus", [State([Edge(19, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("alarmStatus", [State([Edge("n", 1, True)], False),
            State([Edge("e", 2, True)], False),
            State([Edge("w", 3, True)], False),
            State([Edge(38, 4, False)], False),
            State([Edge("A", 5, True)], False),
            State([Edge("l", 6, True)], False),
            State([Edge("a", 7, True)], False),
            State([Edge("r", 8, True)], False),
            State([Edge("m", 9, True)], False),
            State([Edge("S", 10, True)], False),
            State([Edge("t", 11, True)], False),
            State([Edge("a", 12, True)], False),
            State([Edge("t", 13, True)], False),
            State([Edge("u", 14, True)], False),
            State([Edge("s", 15, True)], False),
            State([Edge("(", 16, True)], False),
            State([Edge(38, 17, False)], False),
            State([Edge(19, 18, False)], False),
            State([Edge(38, 19, False)], False),
            State([Edge(")", 20, True)], False),
            State([Edge(38, 21, False)], False),
            State([Edge(";", 22, True)], False),
            State([], True)], FA.LEFT),
        FA("return", [State([Edge("r", 1, True)], False),
            State([Edge("e", 2, True)], False),
            State([Edge("t", 3, True)], False),
            State([Edge("u", 4, True)], False),
            State([Edge("r", 5, True)], False),
            State([Edge("n", 6, True)], False),
            State([Edge(" ", 7, True)], False),
            State([Edge(38, 8, False)], False),
            State([Edge(21, 9, False),
                Edge(20, 9, False)], False),
            State([Edge(38, 10, False)], False),
            State([], True)], FA.LEFT),
        FA("alertStates", [State([Edge("C", 1, False),
                Edge("O", 9, False),
                Edge("W", 10, False)], False),
            State([Edge("R", 2, False)], False),
            State([Edge("I", 3, False)], False),
            State([Edge("T", 4, False)], False),
            State([Edge("I", 5, False)], False),
            State([Edge("C", 6, False)], False),
            State([Edge("A", 7, False)], False),
            State([Edge("L", 8, False)], False),
            State([], True),
            State([Edge("K", 8, False)], False),
            State([Edge("A", 11, False)], False),
            State([Edge("R", 12, False)], False),
            State([Edge("N", 13, False)], False),
            State([Edge("I", 14, False)], False),
            State([Edge("N", 15, False)], False),
            State([Edge("G", 8, False)], False)], FA.LEFT),
        FA("alertStateReason", [State([Edge(14, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("nOp", [State([Edge(">", 1, False),
                Edge("<", 4, False),
                Edge(">", 2, False),
                Edge("<", 2, False),
                Edge("=", 5, False),
                Edge("!", 6, False)], False),
            State([Edge("=", 2, False)], False),
            State([Edge(38, 3, False)], False),
            State([], True),
            State([Edge("=", 2, False)], False),
            State([Edge("=", 2, False)], False),
            State([Edge("=", 2, False)], False)], FA.LEFT),
        FA("tOp", [State([Edge("=", 1, False),
                Edge("!", 4, False)], False),
            State([Edge("=", 2, False)], False),
            State([Edge(38, 3, False)], False),
            State([], True),
            State([Edge("=", 2, False)], False)], FA.LEFT),
        FA("cTOp", [State([Edge("n", 1, False),
                Edge("r", 8, False)], False),
            State([Edge("r", 2, False)], False),
            State([Edge("e", 3, False)], False),
            State([Edge("g", 4, False)], False),
            State([Edge("e", 5, False)], False),
            State([Edge("x", 6, False)], False),
            State([Edge(38, 7, False)], False),
            State([], True),
            State([Edge("e", 9, False)], False),
            State([Edge("g", 10, False)], False),
            State([Edge("e", 11, False)], False),
            State([Edge("x", 6, False)], False)], FA.LEFT),
        FA("setStatement", [State([Edge(":", 1, True)], False),
            State([Edge("s", 2, True)], False),
            State([Edge("e", 3, True)], False),
            State([Edge("t", 4, True)], False),
            State([Edge(38, 5, False)], False),
            State([Edge(29, 6, False)], False),
            State([Edge(38, 7, False)], False),
            State([], True)], FA.LEFT),
        FA("inSetStatement", [State([Edge(31, 1, False),
                Edge(32, 1, False),
                Edge(33, 1, False)], False),
            State([], True)], FA.PRUNE),
        FA("consistencyLevel", [State([Edge("O", 1, False),
                Edge("Q", 4, False),
                Edge("A", 9, False)], False),
            State([Edge("N", 2, False)], False),
            State([Edge("E", 3, False)], False),
            State([], True),
            State([Edge("U", 5, False)], False),
            State([Edge("O", 6, False)], False),
            State([Edge("R", 7, False)], False),
            State([Edge("U", 8, False)], False),
            State([Edge("M", 3, False)], False),
            State([Edge("L", 10, False)], False),
            State([Edge("L", 3, False)], False)], FA.LEFT),
        FA("setConsistencyLevel", [State([Edge("c", 1, True)], False),
            State([Edge("o", 2, True)], False),
            State([Edge("n", 3, True)], False),
            State([Edge("s", 4, True)], False),
            State([Edge("i", 5, True)], False),
            State([Edge("s", 6, True)], False),
            State([Edge("t", 7, True)], False),
            State([Edge("e", 8, True)], False),
            State([Edge("n", 9, True)], False),
            State([Edge("c", 10, True)], False),
            State([Edge("y", 11, True)], False),
            State([Edge("L", 12, True)], False),
            State([Edge("e", 13, True)], False),
            State([Edge("v", 14, True)], False),
            State([Edge("e", 15, True)], False),
            State([Edge("l", 16, True)], False),
            State([Edge(38, 17, False)], False),
            State([Edge("=", 18, True)], False),
            State([Edge(38, 19, False)], False),
            State([Edge(30, 20, False)], False),
            State([], True)], FA.LEFT),
        FA("setConsecutiveCount", [State([Edge("c", 1, True)], False),
            State([Edge("o", 2, True)], False),
            State([Edge("n", 3, True)], False),
            State([Edge("s", 4, True)], False),
            State([Edge("e", 5, True)], False),
            State([Edge("c", 6, True)], False),
            State([Edge("u", 7, True)], False),
            State([Edge("t", 8, True)], False),
            State([Edge("i", 9, True)], False),
            State([Edge("v", 10, True)], False),
            State([Edge("e", 11, True)], False),
            State([Edge("C", 12, True)], False),
            State([Edge("o", 13, True)], False),
            State([Edge("u", 14, True)], False),
            State([Edge("n", 15, True)], False),
            State([Edge("t", 16, True)], False),
            State([Edge(38, 17, False)], False),
            State([Edge("=", 18, True)], False),
            State([Edge(38, 19, False)], False),
            State([Edge(18, 20, False)], False),
            State([], True)], FA.LEFT),
        FA("setDimensionFilter", [State([Edge("d", 1, True)], False),
            State([Edge("i", 2, True)], False),
            State([Edge("m", 3, True)], False),
            State([Edge("e", 4, True)], False),
            State([Edge("n", 5, True)], False),
            State([Edge("s", 6, True)], False),
            State([Edge("i", 7, True)], False),
            State([Edge("o", 8, True)], False),
            State([Edge("n", 9, True)], False),
            State([Edge("F", 10, True)], False),
            State([Edge("i", 11, True)], False),
            State([Edge("l", 12, True)], False),
            State([Edge("t", 13, True)], False),
            State([Edge("e", 14, True)], False),
            State([Edge("r", 15, True)], False),
            State([Edge(38, 16, False)], False),
            State([Edge("=", 17, True)], False),
            State([Edge(38, 18, False)], False),
            State([Edge(14, 19, False)], False),
            State([], True)], FA.LEFT),
        FA("sComment", [State([Edge("#", 1, False)], False),
            State([Edge(44, 2, False),
                Edge(36, 3, False),
                Edge(43, 3, False)], False),
            State([Edge(-1, 1, False)], False),
            State([], True)], FA.VOID),
        FA("mComment", [State([Edge("/", 1, False)], False),
            State([Edge("*", 2, False)], False),
            State([Edge(35, 2, False),
                Edge(45, 3, False),
                Edge("*", 4, False)], False),
            State([Edge(-1, 2, False)], False),
            State([Edge("/", 5, False)], False),
            State([], True)], FA.VOID),
        FA("endOfLine", [State([Edge("\r", 1, False),
                Edge("\n", 2, False),
                Edge("\r", 2, False)], False),
            State([Edge("\n", 2, False)], False),
            State([], True)], FA.VOID),
        FA("wsp", [State([Edge(["\t", " "], 0, False)], True)], FA.VOID),
        FA("ws", [State([Edge(36, 0, False),
                Edge(34, 0, False),
                Edge(35, 0, False),
                Edge(["\t", " "], 0, False)], True)], FA.VOID),
        FA("", [State([Edge("\"", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("\\", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("\'", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("\\", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge(-1, 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge(36, 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("*", 1, False)], False),
            State([Edge("/", 2, False)], False),
            State([], True)], FA.NEG)]

    def __init__(self):
        WaxeyeParser.__init__(self, Parser.start, Parser.eof_check, Parser.automata)
Пример #3
0
class RedexParser(WaxeyeParser):
    start = 0
    eof_check = True
    automata = [
        FA("document", [
            State([Edge(12, 1, False)], False),
            State([Edge(16, 2, False)], False),
            State([], True)
        ], FA.PRUNE),
        FA("alphanum", [
            State([Edge([(48, 57), (65, 90), "_",
                         (97, 122)], 1, False)], False),
            State([], True)
        ], FA.PRUNE),
        FA("space", [
            State([Edge([(9, 10), "\r", " "], 1, True)], False),
            State([Edge([(9, 10), "\r", " "], 1, True)], True)
        ], FA.VOID),
        FA("tilde", [State([Edge("~", 1, False)], False),
                     State([], True)], FA.LEFT),
        FA("dot1", [
            State([Edge(".", 1, False)], False),
            State([Edge(33, 2, False)], False),
            State([], True)
        ], FA.LEFT),
        FA("dot2", [
            State([Edge(2, 1, True), Edge(".", 2, False)], False),
            State([Edge(".", 2, False)], False),
            State([Edge(".", 3, False)], False),
            State([Edge(34, 4, False)], False),
            State([Edge(2, 5, True)], True),
            State([], True)
        ], FA.LEFT),
        FA("dot3", [
            State([Edge(2, 1, True), Edge(".", 2, False)], False),
            State([Edge(".", 2, False)], False),
            State([Edge(".", 3, False)], False),
            State([Edge(".", 4, False)], False),
            State([Edge(".", 4, False), Edge(2, 5, True)], True),
            State([], True)
        ], FA.LEFT),
        FA("special", [
            State([
                Edge("{", 1, False),
                Edge("}", 1, False),
                Edge("[", 1, False),
                Edge("]", 1, False),
                Edge("<", 1, False),
                Edge(">", 1, False),
                Edge(".", 1, False),
                Edge("~", 1, False)
            ], False),
            State([], True)
        ], FA.LEFT),
        FA("escaped", [
            State([Edge("{", 1, True)], False),
            State([Edge(7, 2, False)], False),
            State([Edge("}", 3, True)], False),
            State([], True)
        ], FA.PRUNE),
        FA("space0", [State([Edge(2, 1, False)], False),
                      State([], True)], FA.LEFT),
        FA("space1", [State([Edge(2, 1, False)], False),
                      State([], True)], FA.LEFT),
        FA("spaceX", [State([Edge(2, 1, False)], False),
                      State([], True)], FA.LEFT),
        FA("dropspace", [State([Edge(2, 1, False)], True),
                         State([], True)], FA.VOID),
        FA("word", [
            State([Edge(38, 1, False)], False),
            State([Edge(37, 2, False)], False),
            State([Edge(-1, 3, False)], False),
            State([Edge(36, 4, False)], True),
            State([Edge(35, 5, False)], False),
            State([Edge(-1, 3, False)], False)
        ], FA.LEFT),
        FA("static", [
            State([Edge(13, 1, False)], False),
            State([Edge(10, 2, False)], True),
            State([Edge(13, 1, False)], False)
        ], FA.LEFT),
        FA("wordB", [State([Edge(13, 1, False)], False),
                     State([], True)], FA.LEFT),
        FA("exprA", [
            State([
                Edge(8, 0, False),
                Edge(22, 0, False),
                Edge(30, 0, False),
                Edge(28, 0, False),
                Edge(31, 0, False),
                Edge(14, 0, False),
                Edge(21, 0, False),
                Edge(3, 0, False),
                Edge(6, 0, False),
                Edge(5, 0, False),
                Edge(4, 0, False),
                Edge(9, 0, False)
            ], True)
        ], FA.LEFT),
        FA("exprB", [
            State([
                Edge(8, 0, False),
                Edge(22, 0, False),
                Edge(30, 0, False),
                Edge(29, 0, False),
                Edge(32, 0, False),
                Edge(15, 0, False),
                Edge(3, 0, False),
                Edge(5, 0, False),
                Edge(4, 0, False),
                Edge(11, 0, False)
            ], True)
        ], FA.LEFT),
        FA("tagspecial", [
            State(
                [Edge("/", 1, False), Edge(":", 1, False)], True),
            State([], True)
        ], FA.LEFT),
        FA("tagname", [State([Edge(13, 1, False)], False),
                       State([], True)], FA.LEFT),
        FA("noname", [State([Edge(".", 1, False)], False),
                      State([], True)], FA.LEFT),
        FA("tag", [
            State([Edge("<", 1, True)], False),
            State([Edge(18, 2, False)], False),
            State([Edge(19, 3, False), Edge(20, 3, False)], False),
            State([Edge(17, 4, False)], False),
            State(
                [Edge("/", 5, False), Edge(">", 6, False)], False),
            State([Edge(">", 6, False)], False),
            State([], True)
        ], FA.LEFT),
        FA("regex", [
            State([Edge("{", 1, True)], False),
            State([Edge("~", 2, True)], False),
            State([Edge(39, 3, False), Edge("~", 4, True)], False),
            State([Edge(-1, 2, False)], False),
            State([Edge("}", 5, True)], False),
            State([], True)
        ], FA.LEFT),
        FA("varname", [
            State([Edge(1, 1, False)], False),
            State([Edge(1, 1, False)], True)
        ], FA.LEFT),
        FA("repeat", [
            State([
                Edge("*", 1, False),
                Edge("+", 1, False),
                Edge("*", 2, False),
                Edge("+", 3, False)
            ], False),
            State([], True),
            State([Edge("+", 1, False)], False),
            State([Edge("+", 1, False)], False)
        ], FA.LEFT),
        FA("vregex", [
            State([Edge("~", 1, True)], False),
            State([Edge(41, 2, False)], False),
            State([Edge(-1, 3, False)], False),
            State([Edge(40, 4, False)], True),
            State([Edge(-1, 3, False)], False)
        ], FA.LEFT),
        FA("vexprA", [
            State([Edge(42, 1, False)], False),
            State([Edge(2, 2, True), Edge(16, 3, False)], False),
            State([Edge(16, 3, False)], False),
            State([], True)
        ], FA.PRUNE),
        FA("vexprB", [
            State([Edge(43, 1, False)], False),
            State([Edge(2, 2, True), Edge(17, 3, False)], False),
            State([Edge(17, 3, False)], False),
            State([], True)
        ], FA.PRUNE),
        FA("varA", [
            State([Edge("{", 1, True)], False),
            State([
                Edge(24, 2, False),
                Edge(23, 3, False),
                Edge(26, 5, False),
                Edge("}", 6, True)
            ], False),
            State([Edge(23, 3, False),
                   Edge(26, 5, False),
                   Edge("}", 6, True)], False),
            State([Edge(25, 4, False),
                   Edge(26, 5, False),
                   Edge("}", 6, True)], False),
            State([Edge(26, 5, False), Edge("}", 6, True)], False),
            State([Edge("}", 6, True)], False),
            State([], True)
        ], FA.LEFT),
        FA("varB", [
            State([Edge("{", 1, True)], False),
            State([
                Edge(24, 2, False),
                Edge(23, 3, False),
                Edge(27, 5, False),
                Edge("}", 6, True)
            ], False),
            State([Edge(23, 3, False),
                   Edge(27, 5, False),
                   Edge("}", 6, True)], False),
            State([Edge(25, 4, False),
                   Edge(27, 5, False),
                   Edge("}", 6, True)], False),
            State([Edge(27, 5, False), Edge("}", 6, True)], False),
            State([Edge("}", 6, True)], False),
            State([], True)
        ], FA.LEFT),
        FA("atomic", [
            State([Edge("{", 1, True)], False),
            State([Edge(">", 2, True)], False),
            State([Edge(2, 3, True), Edge(16, 4, False)], False),
            State([Edge(16, 4, False)], False),
            State([Edge("}", 5, True)], False),
            State([], True)
        ], FA.LEFT),
        FA("optionalA", [
            State([Edge("[", 1, True)], False),
            State([Edge(16, 2, False)], False),
            State([Edge("]", 3, True)], False),
            State([], True)
        ], FA.LEFT),
        FA("optionalB", [
            State([Edge("[", 1, True)], False),
            State([Edge(17, 2, False)], False),
            State([Edge("]", 3, True)], False),
            State([], True)
        ], FA.LEFT),
        FA("", [State([Edge(".", 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge(".", 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge(2, 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge(7, 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge(2, 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge(7, 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [
            State([Edge("~", 1, False)], False),
            State([Edge("}", 2, False)], False),
            State([], True)
        ], FA.NEG),
        FA("", [State([Edge("}", 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge("}", 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge("~", 1, False)], False),
                State([], True)], FA.NEG),
        FA("", [State([Edge("~", 1, False)], False),
                State([], True)], FA.NEG)
    ]

    def __init__(self):
        WaxeyeParser.__init__(self, RedexParser.start, RedexParser.eof_check,
                              RedexParser.automata)
Пример #4
0
class Parser (WaxeyeParser):
    start = 0
    eof_check = True
    automata = [FA("tag", [State([Edge(3, 1, False),
                Edge(13, 3, False),
                Edge(2, 4, False)], False),
            State([Edge(1, 2, False)], True),
            State([], True),
            State([Edge(1, 2, False)], True),
            State([Edge(1, 2, False)], True)], FA.LEFT),
        FA("index", [State([Edge("-", 1, False),
                Edge("=", 1, False)], False),
            State([Edge([(48, 57)], 2, False)], False),
            State([Edge([(48, 57)], 2, False)], True)], FA.LEFT),
        FA("intermediate", [State([Edge("A", 1, False),
                Edge("I", 5, False),
                Edge("N", 6, False),
                Edge("A", 7, False),
                Edge("N", 10, False)], False),
            State([Edge("D", 2, False)], False),
            State([Edge("J", 3, False)], False),
            State([Edge("Y", 4, False)], False),
            State([], True),
            State([Edge("Y", 4, False)], False),
            State([Edge("Y", 4, False)], False),
            State([Edge("D", 8, False)], False),
            State([Edge("J", 9, False)], False),
            State([Edge("X", 4, False)], False),
            State([Edge("X", 4, False)], False)], FA.LEFT),
        FA("clause_tag", [State([Edge(5, 1, False),
                Edge(9, 1, False),
                Edge(4, 5, False)], False),
            State([Edge("-", 2, False)], True),
            State([Edge(11, 1, False),
                Edge(12, 3, False)], False),
            State([Edge("-", 4, False)], True),
            State([Edge(12, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("other", [State([Edge("F", 1, False),
                Edge("R", 5, False),
                Edge("Q", 7, False)], False),
            State([Edge("R", 2, False)], False),
            State([Edge("A", 3, False)], False),
            State([Edge("G", 4, False)], False),
            State([], True),
            State([Edge("R", 6, False)], False),
            State([Edge("C", 4, False)], False),
            State([Edge("T", 8, False)], False),
            State([Edge("P", 4, False)], False)], FA.LEFT),
        FA("ip", [State([Edge("I", 1, False)], False),
            State([Edge("P", 2, False)], False),
            State([Edge("-", 3, False)], True),
            State([Edge(6, 2, False)], False)], FA.LEFT),
        FA("ip_dash_tag", [State([Edge("A", 1, False),
                Edge("I", 4, False),
                Edge("M", 9, False),
                Edge("P", 11, False),
                Edge("S", 15, False)], False),
            State([Edge("B", 2, False)], False),
            State([Edge("S", 3, False)], False),
            State([], True),
            State([Edge("M", 5, False),
                Edge("N", 6, False)], False),
            State([Edge("P", 3, False)], False),
            State([Edge("F", 7, False)], False),
            State([Edge("-", 8, False)], True),
            State([Edge(7, 3, False)], False),
            State([Edge("A", 10, False)], False),
            State([Edge("T", 3, False)], False),
            State([Edge("P", 12, False)], False),
            State([Edge("L", 13, False)], False),
            State([Edge("-", 14, False)], True),
            State([Edge(8, 3, False)], False),
            State([Edge("M", 16, False),
                Edge("U", 17, False)], False),
            State([Edge("C", 3, False)], False),
            State([Edge("B", 3, False)], False)], FA.LEFT),
        FA("inf_type", [State([Edge("C", 1, False),
                Edge("P", 4, False),
                Edge("S", 6, False),
                Edge("T", 8, False),
                Edge("A", 10, False)], False),
            State([Edge("O", 2, False)], False),
            State([Edge("M", 3, False)], False),
            State([], True),
            State([Edge("R", 5, False)], False),
            State([Edge("P", 3, False)], False),
            State([Edge("B", 7, False)], False),
            State([Edge("J", 3, False)], False),
            State([Edge("H", 9, False)], False),
            State([Edge("T", 3, False)], False),
            State([Edge("B", 11, False)], False),
            State([Edge("S", 3, False)], False)], FA.LEFT),
        FA("ppl_type", [State([Edge("C", 1, False),
                Edge("T", 4, False)], False),
            State([Edge("O", 2, False)], False),
            State([Edge("M", 3, False)], False),
            State([], True),
            State([Edge("H", 5, False)], False),
            State([Edge("T", 3, False)], False)], FA.LEFT),
        FA("cp", [State([Edge("C", 1, False)], False),
            State([Edge("P", 2, False)], False),
            State([Edge("-", 3, False)], True),
            State([Edge(10, 2, False)], False)], FA.LEFT),
        FA("cp_dash_tag", [State([Edge("A", 1, False),
                Edge("C", 4, False),
                Edge("D", 8, False),
                Edge("E", 10, False),
                Edge("F", 13, False),
                Edge("P", 15, False),
                Edge("Q", 17, False),
                Edge("R", 19, False),
                Edge("T", 21, False)], False),
            State([Edge("D", 2, False)], False),
            State([Edge("V", 3, False)], False),
            State([], True),
            State([Edge("A", 5, False),
                Edge("O", 6, False),
                Edge("M", 7, False)], False),
            State([Edge("R", 3, False)], False),
            State([Edge("M", 3, False)], False),
            State([Edge("P", 3, False)], False),
            State([Edge("E", 9, False)], False),
            State([Edge("G", 3, False)], False),
            State([Edge("O", 11, False),
                Edge("X", 12, False)], False),
            State([Edge("P", 3, False)], False),
            State([Edge("L", 3, False)], False),
            State([Edge("R", 14, False)], False),
            State([Edge("L", 3, False)], False),
            State([Edge("R", 16, False)], False),
            State([Edge("P", 3, False)], False),
            State([Edge("U", 18, False)], False),
            State([Edge("E", 3, False)], False),
            State([Edge("E", 20, False)], False),
            State([Edge("L", 3, False),
                Edge("S", 3, False)], False),
            State([Edge("H", 22, False)], False),
            State([Edge("T", 3, False)], False)], FA.LEFT),
        FA("ext", [State([Edge("P", 1, False),
                Edge("S", 4, False)], False),
            State([Edge("R", 2, False)], False),
            State([Edge("N", 3, False)], False),
            State([], True),
            State([Edge("P", 5, False)], False),
            State([Edge("E", 3, False)], False)], FA.LEFT),
        FA("clause_dash_tag", [State([Edge("S", 1, False)], False),
            State([Edge("B", 2, False)], False),
            State([Edge("J", 3, False)], False),
            State([], True)], FA.LEFT),
        FA("phrase_tag", [State([Edge(18, 1, False),
                Edge(14, 1, False),
                Edge(15, 1, False),
                Edge(16, 1, False),
                Edge(17, 1, False),
                Edge(19, 1, False),
                Edge(20, 1, False)], False),
            State([Edge("-", 2, False)], True),
            State([Edge(11, 1, False)], False)], FA.LEFT),
        FA("np", [State([Edge("N", 1, False)], False),
            State([Edge("P", 2, False)], False),
            State([Edge("-", 3, False)], True),
            State([Edge("S", 4, False),
                Edge("O", 13, False),
                Edge("P", 15, False),
                Edge("A", 17, False),
                Edge("P", 19, False),
                Edge("C", 22, False),
                Edge("A", 25, False),
                Edge("D", 28, False),
                Edge("I", 30, False),
                Edge("L", 32, False),
                Edge("M", 34, False),
                Edge("S", 36, False),
                Edge("T", 38, False),
                Edge("V", 40, False),
                Edge("A", 42, False),
                Edge("C", 44, False),
                Edge("R", 8, False),
                Edge("L", 11, False)], False),
            State([Edge("B", 5, False)], False),
            State([Edge("J", 6, False)], False),
            State([Edge("-", 7, False)], True),
            State([Edge("R", 8, False),
                Edge("L", 11, False)], False),
            State([Edge("S", 9, False)], False),
            State([Edge("P", 10, False)], False),
            State([], True),
            State([Edge("F", 12, False)], False),
            State([Edge("D", 10, False)], False),
            State([Edge("B", 14, False)], False),
            State([Edge("1", 6, False),
                Edge("2", 6, False),
                Edge("P", 6, False),
                Edge("Q", 6, False)], False),
            State([Edge("R", 16, False)], False),
            State([Edge("D", 6, False)], False),
            State([Edge("T", 18, False)], False),
            State([Edge("R", 6, False)], False),
            State([Edge("R", 20, False),
                Edge("A", 21, False)], False),
            State([Edge("N", 6, False)], False),
            State([Edge("R", 6, False)], False),
            State([Edge("O", 23, False),
                Edge("M", 24, False)], False),
            State([Edge("M", 6, False)], False),
            State([Edge("P", 6, False)], False),
            State([Edge("D", 26, False),
                Edge("G", 27, False)], False),
            State([Edge("V", 6, False)], False),
            State([Edge("T", 6, False)], False),
            State([Edge("I", 29, False)], False),
            State([Edge("R", 6, False)], False),
            State([Edge("N", 31, False)], False),
            State([Edge("S", 6, False)], False),
            State([Edge("O", 33, False)], False),
            State([Edge("C", 6, False)], False),
            State([Edge("S", 35, False)], False),
            State([Edge("R", 6, False)], False),
            State([Edge("P", 37, False)], False),
            State([Edge("R", 6, False)], False),
            State([Edge("M", 39, False)], False),
            State([Edge("P", 6, False)], False),
            State([Edge("O", 41, False)], False),
            State([Edge("C", 6, False)], False),
            State([Edge("D", 43, False)], False),
            State([Edge("T", 6, False)], False),
            State([Edge("L", 6, False)], False)], FA.LEFT),
        FA("adjp", [State([Edge("A", 1, False)], False),
            State([Edge("D", 2, False)], False),
            State([Edge("J", 3, False)], False),
            State([Edge("P", 4, False)], False),
            State([Edge("-", 5, False)], True),
            State([Edge("P", 6, False),
                Edge("S", 9, False)], False),
            State([Edge("R", 7, False)], False),
            State([Edge("D", 8, False)], False),
            State([], True),
            State([Edge("P", 10, False)], False),
            State([Edge("R", 8, False)], False)], FA.LEFT),
        FA("advp", [State([Edge("A", 1, False)], False),
            State([Edge("D", 2, False)], False),
            State([Edge("V", 3, False)], False),
            State([Edge("P", 4, False)], False),
            State([Edge("-", 5, False)], True),
            State([Edge("D", 6, False),
                Edge("L", 9, False),
                Edge("T", 11, False)], False),
            State([Edge("I", 7, False)], False),
            State([Edge("R", 8, False)], False),
            State([], True),
            State([Edge("O", 10, False)], False),
            State([Edge("C", 8, False)], False),
            State([Edge("M", 12, False)], False),
            State([Edge("P", 8, False)], False)], FA.LEFT),
        FA("pp", [State([Edge("P", 1, False)], False),
            State([Edge("P", 2, False)], False),
            State([], True)], FA.LEFT),
        FA("nump", [State([Edge("N", 1, False)], False),
            State([Edge("U", 2, False)], False),
            State([Edge("M", 3, False)], False),
            State([Edge("P", 4, False)], False),
            State([], True)], FA.LEFT),
        FA("conjp", [State([Edge("C", 1, False)], False),
            State([Edge("O", 2, False)], False),
            State([Edge("N", 3, False)], False),
            State([Edge("J", 4, False)], False),
            State([Edge("P", 5, False)], False),
            State([], True)], FA.LEFT),
        FA("wh_phrase", [State([Edge("W", 1, False)], False),
            State([Edge("A", 2, False),
                Edge("N", 4, False),
                Edge("P", 4, False)], False),
            State([Edge("D", 3, False)], False),
            State([Edge("J", 4, False),
                Edge("V", 4, False)], False),
            State([Edge("P", 5, False)], False),
            State([], True)], FA.LEFT)]

    def __init__(self):
        WaxeyeParser.__init__(self, Parser.start, Parser.eof_check, Parser.automata)
Пример #5
0
class Parser(WaxeyeParser):
    start = 0
    eof_check = True
    automata = [
        FA("word_tag", [
            State([
                Edge(2, 1, False),
                Edge(4, 1, False),
                Edge(10, 1, False),
                Edge(11, 1, False),
                Edge(13, 1, False),
                Edge(12, 1, False),
                Edge(14, 1, False),
                Edge(15, 1, False)
            ], False),
            State([Edge(1, 2, False)], True),
            State([], True)
        ], FA.LEFT),
        FA("index", [
            State(
                [Edge("-", 1, False), Edge("=", 1, False)], False),
            State([Edge([(48, 57)], 2, False)], False),
            State([Edge([(48, 57)], 2, False)], True)
        ], FA.LEFT),
        FA("nominal", [
            State([
                Edge("N", 1, False),
                Edge("A", 6, False),
                Edge("D", 14, False),
                Edge("N", 18, False),
                Edge("P", 20, False),
                Edge("Q", 30, False),
                Edge("O", 31, False)
            ], False),
            State(
                [Edge("P", 2, False),
                 Edge("S", 4, False),
                 Edge(3, 5, False)], False),
            State([Edge("R", 3, False)], False),
            State([Edge("S", 4, False), Edge(3, 5, False)], False),
            State([Edge(3, 5, False)], False),
            State([], True),
            State([Edge("D", 7, False)], False),
            State([Edge("J", 8, False)], False),
            State([
                Edge("R", 9, False),
                Edge("S", 9, False),
                Edge("-", 10, False),
                Edge(3, 5, False)
            ], True),
            State(
                [Edge("-", 10, False), Edge(3, 5, False)], True),
            State([Edge("P", 11, False)], False),
            State([Edge("O", 12, False)], False),
            State([Edge("S", 13, False)], False),
            State([Edge(3, 5, False)], True),
            State([
                Edge("S", 15, False),
                Edge(3, 5, False),
                Edge("E", 16, False)
            ], False),
            State([Edge(3, 5, False)], False),
            State([Edge("M", 17, False)], False),
            State(
                [Edge("S", 15, False), Edge(3, 5, False)], False),
            State([Edge("U", 19, False)], False),
            State([Edge("M", 5, False)], False),
            State([Edge("R", 21, False)], False),
            State([Edge("O", 22, False)], False),
            State([
                Edge("-", 23, False),
                Edge("+", 27, False),
                Edge(3, 5, False)
            ], False),
            State([Edge("R", 24, False)], False),
            State([Edge("C", 25, False)], False),
            State([Edge("P", 26, False)], False),
            State([Edge(3, 5, False)], False),
            State([Edge("S", 28, False)], False),
            State([Edge("L", 29, False)], False),
            State([Edge("F", 26, False)], False),
            State(
                [Edge("R", 5, False),
                 Edge("S", 5, False),
                 Edge(3, 5, False)], True),
            State([Edge("T", 32, False)], False),
            State([Edge("H", 33, False)], False),
            State([Edge("E", 34, False)], False),
            State([Edge("R", 35, False)], False),
            State([Edge(3, 5, False)], False)
        ], FA.LEFT),
        FA("case", [
            State([Edge("-", 1, False)], False),
            State([
                Edge("N", 2, False),
                Edge("G", 5, False),
                Edge("A", 7, False),
                Edge("D", 9, False)
            ], False),
            State([Edge("O", 3, False)], False),
            State([Edge("M", 4, False)], False),
            State([], True),
            State([Edge("E", 6, False)], False),
            State([Edge("N", 4, False)], False),
            State([Edge("C", 8, False)], False),
            State([Edge("C", 4, False)], False),
            State([Edge("A", 10, False)], False),
            State([Edge("T", 4, False)], False)
        ], FA.LEFT),
        FA("verbal", [
            State([Edge(5, 1, False), Edge(6, 1, False)], False),
            State([], True)
        ], FA.LEFT),
        FA("verb", [
            State([Edge("B", 1, False),
                   Edge("V", 12, False)], False),
            State([Edge("E", 2, False)], False),
            State([
                Edge("P", 3, False),
                Edge("D", 3, False),
                Edge("I", 3, False),
                Edge("N", 3, False),
                Edge("O", 3, False),
                Edge("S", 3, False)
            ], False),
            State([Edge("P", 4, False), Edge(7, 5, False)], False),
            State([Edge(7, 5, False)], False),
            State(
                [Edge("-", 6, False),
                 Edge(9, 8, False),
                 Edge("-", 9, False)], True),
            State([Edge(8, 7, False)], False),
            State([Edge(9, 8, False), Edge("-", 9, False)], True),
            State([Edge("-", 9, False)], True),
            State([Edge("C", 10, False)], False),
            State([Edge("L", 11, False)], False),
            State([], True),
            State([Edge("B", 2, False)], False)
        ], FA.LEFT),
        FA("participle", [
            State(
                [Edge("B", 1, False), Edge("V", 9, False)], False),
            State([Edge("P", 2, False)], False),
            State([Edge("R", 3, False)], False),
            State([Edge("P", 4, False), Edge(7, 5, False)], False),
            State([Edge(7, 5, False)], False),
            State([Edge("-", 6, False), Edge(3, 8, False)], False),
            State([Edge(8, 7, False)], False),
            State([Edge(3, 8, False)], False),
            State([], True),
            State([Edge("P", 10, False)], False),
            State([Edge("R", 3, False)], False)
        ], FA.LEFT),
        FA("aspect", [
            State([Edge("-", 1, False)], False),
            State([
                Edge("A", 2, False),
                Edge("F", 5, False),
                Edge("I", 7, False),
                Edge("P", 10, False)
            ], False),
            State([Edge("O", 3, False)], False),
            State([Edge("R", 4, False)], False),
            State([], True),
            State([Edge("U", 6, False)], False),
            State([Edge("T", 4, False)], False),
            State([Edge("M", 8, False)], False),
            State([Edge("P", 9, False)], False),
            State([Edge("F", 4, False)], False),
            State([Edge("R", 11, False)], False),
            State([Edge("F", 4, False)], False)
        ], FA.LEFT),
        FA("voice", [
            State([
                Edge("P", 1, False),
                Edge("I", 5, False),
                Edge("T", 10, False)
            ], False),
            State([Edge("A", 2, False)], False),
            State([Edge("S", 3, False)], False),
            State([Edge("S", 4, False)], False),
            State([], True),
            State([Edge("N", 6, False)], False),
            State([Edge("T", 7, False)], False),
            State([Edge("R", 8, False)], False),
            State([Edge("N", 9, False)], False),
            State([Edge("S", 4, False)], False),
            State([Edge("R", 11, False)], False),
            State([Edge("N", 12, False)], False),
            State([Edge("S", 13, False)], False),
            State(
                [Edge("1", 4, False), Edge("2", 4, False)], False)
        ], FA.LEFT),
        FA("opt", [
            State([Edge("-", 1, False)], False),
            State(
                [Edge("K", 2, False), Edge("I", 5, False)], False),
            State([Edge("J", 3, False)], False),
            State([Edge("V", 4, False)], False),
            State([], True),
            State([Edge("N", 6, False)], False),
            State([Edge("D", 4, False)], False)
        ], FA.LEFT),
        FA("adverb", [
            State(
                [Edge("C", 1, False), Edge("A", 3, False)], False),
            State([Edge("L", 2, False)], False),
            State([Edge("A", 3, False)], False),
            State([Edge("D", 4, False)], False),
            State([Edge("V", 5, False)], False),
            State([
                Edge("R", 6, False),
                Edge("S", 6, False),
                Edge("Q", 6, False),
                Edge("+", 7, False)
            ], True),
            State([], True),
            State([Edge("S", 8, False)], False),
            State([Edge("L", 9, False)], False),
            State([Edge("F", 6, False)], False)
        ], FA.LEFT),
        FA("clitic", [
            State([Edge("C", 1, False)], False),
            State([Edge("L", 2, False)], False),
            State([
                Edge("G", 3, False),
                Edge("P", 5, False),
                Edge("Q", 8, False),
                Edge("P", 9, False),
                Edge("T", 11, False),
                Edge("A", 12, False)
            ], True),
            State([Edge("E", 4, False)], False),
            State([], True),
            State([Edge("R", 6, False)], False),
            State([Edge("O", 7, False)], False),
            State([Edge(3, 4, False)], True),
            State([Edge(3, 4, False)], True),
            State([Edge("R", 10, False)], False),
            State([Edge("T", 4, False)], False),
            State([Edge("E", 4, False)], False),
            State([Edge("D", 13, False)], False),
            State([Edge("V", 4, False)], False)
        ], FA.LEFT),
        FA("neg", [
            State([Edge("N", 1, False)], False),
            State([Edge("E", 2, False)], False),
            State([Edge("G", 3, False)], False),
            State([Edge("+", 4, False)], True),
            State([Edge(2, 5, False), Edge(10, 5, False)], False),
            State([], True)
        ], FA.LEFT),
        FA("fn_cat", [
            State([
                Edge("A", 1, False),
                Edge("K", 3, False),
                Edge("I", 4, False),
                Edge("P", 7, False),
                Edge("C", 10, False),
                Edge("P", 2, False),
                Edge("W", 13, False)
            ], False),
            State([Edge("N", 2, False)], False),
            State([], True),
            State([Edge("E", 2, False)], False),
            State([Edge("N", 5, False)], False),
            State([Edge("T", 6, False)], False),
            State([Edge("J", 2, False)], False),
            State([Edge("R", 8, False)], False),
            State([Edge("T", 9, False)], False),
            State([Edge("Q", 2, False)], False),
            State([Edge("O", 11, False)], True),
            State([Edge("N", 12, False)], False),
            State([Edge("J", 2, False)], False),
            State([
                Edge("A", 14, False),
                Edge("D", 21, False),
                Edge("P", 22, False),
                Edge("Q", 2, False)
            ], False),
            State([Edge("D", 15, False)], False),
            State([Edge("J", 16, False),
                   Edge("V", 17, False)], False),
            State([Edge(3, 2, False)], False),
            State([Edge("+", 18, False)], True),
            State([Edge("S", 19, False)], False),
            State([Edge("L", 20, False)], False),
            State([Edge("F", 2, False)], False),
            State([Edge(3, 2, False)], False),
            State([Edge("R", 23, False)], True),
            State([Edge("O", 24, False)], False),
            State([Edge(3, 2, False), Edge("+", 25, False)], False),
            State([Edge(11, 2, False)], False)
        ], FA.LEFT),
        FA("other_word", [
            State([
                Edge("C", 1, False),
                Edge("F", 5, False),
                Edge("X", 4, False),
                Edge("Y", 4, False)
            ], False),
            State([Edge("O", 2, False)], False),
            State([Edge("D", 3, False)], False),
            State([Edge("E", 4, False)], False),
            State([], True),
            State([Edge("W", 4, False)], False)
        ], FA.LEFT),
        FA("punct", [
            State([
                Edge("\"", 1, False),
                Edge(",", 1, False),
                Edge(".", 1, False),
                Edge("L", 2, False),
                Edge("R", 7, False)
            ], False),
            State([], True),
            State([Edge("P", 3, False)], False),
            State([Edge("A", 4, False)], False),
            State([Edge("R", 5, False)], False),
            State([Edge("E", 6, False)], False),
            State([Edge("N", 1, False)], False),
            State([Edge("P", 8, False)], False),
            State([Edge("A", 9, False)], False),
            State([Edge("R", 10, False)], False),
            State([Edge("E", 11, False)], False),
            State([Edge("N", 1, False)], False)
        ], FA.LEFT)
    ]

    def __init__(self):
        WaxeyeParser.__init__(self, Parser.start, Parser.eof_check,
                              Parser.automata)
Пример #6
0
class Parser (WaxeyeParser):
    start = 0
    eof_check = True
    automata = [FA("stmt_list", [State([Edge(1, 0, False),
                Edge(48, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("statement", [State([Edge(48, 1, False)], False),
            State([Edge(6, 2, False),
                Edge(7, 3, False),
                Edge(8, 4, False),
                Edge(5, 2, False),
                Edge(12, 2, False),
                Edge(14, 2, False),
                Edge(13, 5, False),
                Edge(20, 6, False)], False),
            State([], True),
            State([Edge(";", 2, True)], False),
            State([Edge(";", 2, True)], False),
            State([Edge(";", 2, True)], False),
            State([Edge(";", 2, True)], False)], FA.PRUNE),
        FA("comment_ln", [State([Edge("/", 1, False)], False),
            State([Edge("/", 2, False)], False),
            State([Edge(50, 3, False)], True),
            State([Edge(-1, 2, False)], False)], FA.VOID),
        FA("comment_bl", [State([Edge("/", 1, False)], False),
            State([Edge("*", 2, False)], False),
            State([Edge(51, 3, False),
                Edge("*", 4, False)], False),
            State([Edge(-1, 2, False)], False),
            State([Edge("/", 5, False)], False),
            State([], True)], FA.VOID),
        FA("comment", [State([Edge(2, 1, False),
                Edge(3, 1, False)], False),
            State([], True)], FA.VOID),
        FA("if", [State([Edge("i", 1, True)], False),
            State([Edge("f", 2, True)], False),
            State([Edge(48, 3, False)], False),
            State([Edge("(", 4, True)], False),
            State([Edge(20, 5, False)], False),
            State([Edge(")", 6, True)], False),
            State([Edge(48, 7, False)], False),
            State([Edge(1, 8, False)], False),
            State([Edge(48, 9, False)], False),
            State([Edge("e", 10, True)], True),
            State([Edge("l", 11, True)], False),
            State([Edge("s", 12, True)], False),
            State([Edge("e", 13, True)], False),
            State([Edge(48, 14, False)], False),
            State([Edge(1, 15, False)], False),
            State([Edge(48, 16, False)], False),
            State([], True)], FA.LEFT),
        FA("block", [State([Edge("{", 1, True)], False),
            State([Edge(1, 2, False),
                Edge(48, 3, False)], False),
            State([Edge(48, 3, False)], False),
            State([Edge("}", 4, True)], False),
            State([Edge(48, 5, False)], False),
            State([], True)], FA.LEFT),
        FA("assignment", [State([Edge(20, 1, False),
                Edge(8, 1, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge("=", 3, True)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(20, 5, False)], False),
            State([], True)], FA.LEFT),
        FA("definition", [State([Edge(10, 1, False)], False),
            State([Edge(49, 2, False)], False),
            State([Edge(39, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("deflist", [State([Edge(8, 1, False),
                Edge(48, 4, False)], False),
            State([Edge(",", 2, True)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(8, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("identifier", [State([Edge([(65, 90), "_", (97, 122)], 1, False)], False),
            State([Edge([(48, 57), (65, 90), "_", (97, 122)], 1, False)], True)], FA.LEFT),
        FA("list", [State([Edge(20, 1, False),
                Edge(48, 4, False)], False),
            State([Edge(",", 2, True)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(20, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("fun", [State([Edge("f", 1, True)], False),
            State([Edge("u", 2, True)], False),
            State([Edge("n", 3, True)], False),
            State([Edge(49, 4, False)], False),
            State([Edge(10, 5, False)], False),
            State([Edge(48, 6, False)], False),
            State([Edge(39, 7, False)], False),
            State([Edge(48, 8, False)], False),
            State([Edge("{", 9, True)], False),
            State([Edge(0, 10, False)], False),
            State([Edge(48, 11, False)], False),
            State([Edge("}", 12, True)], False),
            State([Edge(48, 13, False)], False),
            State([], True)], FA.LEFT),
        FA("return", [State([Edge("r", 1, True)], False),
            State([Edge("e", 2, True)], False),
            State([Edge("t", 3, True)], False),
            State([Edge("u", 4, True)], False),
            State([Edge("r", 5, True)], False),
            State([Edge("n", 6, True)], False),
            State([Edge(49, 7, False)], False),
            State([Edge(20, 8, False)], False),
            State([], True)], FA.LEFT),
        FA("class", [State([Edge("c", 1, True)], False),
            State([Edge("l", 2, True)], False),
            State([Edge("a", 3, True)], False),
            State([Edge("s", 4, True)], False),
            State([Edge("s", 5, True)], False),
            State([Edge(49, 6, False)], False),
            State([Edge(10, 7, False)], False),
            State([Edge(49, 8, False),
                Edge(48, 17, False)], False),
            State([Edge("e", 9, False)], False),
            State([Edge("x", 10, False)], False),
            State([Edge("t", 11, False)], False),
            State([Edge("e", 12, False)], False),
            State([Edge("n", 13, False)], False),
            State([Edge("d", 14, False)], False),
            State([Edge("s", 15, False)], False),
            State([Edge(10, 16, False)], False),
            State([Edge(48, 17, False)], False),
            State([Edge("{", 18, True)], False),
            State([Edge(19, 19, False)], False),
            State([Edge(48, 20, False)], False),
            State([Edge("}", 21, True)], False),
            State([Edge(48, 22, False)], False),
            State([], True)], FA.LEFT),
        FA("cls_assign", [State([Edge(16, 1, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge("=", 3, True)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(20, 5, False)], False),
            State([], True)], FA.LEFT),
        FA("cls_def", [State([Edge("s", 1, False),
                Edge(49, 7, False),
                Edge("p", 11, False)], False),
            State([Edge("t", 2, False)], False),
            State([Edge("a", 3, False)], False),
            State([Edge("t", 4, False)], False),
            State([Edge("i", 5, False)], False),
            State([Edge("c", 6, False)], False),
            State([Edge(49, 7, False)], False),
            State([Edge(10, 8, False)], False),
            State([Edge(49, 9, False)], False),
            State([Edge(39, 10, False)], False),
            State([], True),
            State([Edge("u", 12, False)], False),
            State([Edge("b", 13, False)], False),
            State([Edge(49, 7, False)], False)], FA.LEFT),
        FA("cls_fun", [State([Edge("s", 1, False),
                Edge(49, 7, False),
                Edge("p", 21, False)], False),
            State([Edge("t", 2, False)], False),
            State([Edge("a", 3, False)], False),
            State([Edge("t", 4, False)], False),
            State([Edge("i", 5, False)], False),
            State([Edge("c", 6, False)], False),
            State([Edge(49, 7, False)], False),
            State([Edge("f", 8, True)], False),
            State([Edge("u", 9, True)], False),
            State([Edge("n", 10, True)], False),
            State([Edge(49, 11, False)], False),
            State([Edge(10, 12, False)], False),
            State([Edge(48, 13, False)], False),
            State([Edge(39, 14, False)], False),
            State([Edge(48, 15, False)], False),
            State([Edge("{", 16, True)], False),
            State([Edge(0, 17, False)], False),
            State([Edge(48, 18, False)], False),
            State([Edge("}", 19, True)], False),
            State([Edge(48, 20, False)], False),
            State([], True),
            State([Edge("u", 22, False)], False),
            State([Edge("b", 23, False)], False),
            State([Edge(49, 7, False)], False)], FA.LEFT),
        FA("cls_stmt", [State([Edge(48, 1, False)], False),
            State([Edge(16, 2, False),
                Edge(15, 4, False),
                Edge(17, 3, False)], False),
            State([Edge(";", 3, True)], False),
            State([], True),
            State([Edge(";", 3, True)], False)], FA.LEFT),
        FA("cls_stm_lst", [State([Edge(18, 0, False),
                Edge(48, 1, False)], False),
            State([], True)], FA.LEFT),
        FA("expr", [State([Edge(48, 1, False)], False),
            State([Edge(21, 2, False)], False),
            State([], True)], FA.LEFT),
        FA("or", [State([Edge(22, 1, False)], False),
            State([Edge("o", 2, False)], True),
            State([Edge("r", 3, False)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(22, 1, False)], False)], FA.PRUNE),
        FA("and", [State([Edge(23, 1, False)], False),
            State([Edge("a", 2, False)], True),
            State([Edge("n", 3, False)], False),
            State([Edge("d", 4, False)], False),
            State([Edge(48, 5, False)], False),
            State([Edge(23, 1, False)], False)], FA.PRUNE),
        FA("bitwise_or", [State([Edge(24, 1, False)], False),
            State([Edge("|", 2, False)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(24, 1, False)], False)], FA.PRUNE),
        FA("bitwise_xor", [State([Edge(25, 1, False)], False),
            State([Edge("^", 2, False)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(25, 1, False)], False)], FA.PRUNE),
        FA("bitwise_and", [State([Edge(26, 1, False)], False),
            State([Edge("&", 2, False)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(26, 1, False)], False)], FA.PRUNE),
        FA("eq", [State([Edge(27, 1, False)], False),
            State([Edge("=", 2, False),
                Edge("!", 5, False)], True),
            State([Edge("=", 3, False)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(27, 1, False)], False),
            State([Edge("=", 3, False)], False)], FA.PRUNE),
        FA("rel", [State([Edge(28, 1, False)], False),
            State([Edge("<", 2, False),
                Edge(">", 5, False)], True),
            State([Edge("=", 3, False),
                Edge(48, 4, False)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(28, 1, False)], False),
            State([Edge(48, 4, False),
                Edge("=", 3, False)], False)], FA.PRUNE),
        FA("sum", [State([Edge(29, 1, False)], False),
            State([Edge(["+", "-"], 2, False)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(29, 1, False)], False)], FA.PRUNE),
        FA("prod", [State([Edge(30, 1, False)], False),
            State([Edge(["*", "/"], 2, False)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(30, 1, False)], False)], FA.PRUNE),
        FA("mod", [State([Edge(31, 1, False)], False),
            State([Edge("%", 2, False)], True),
            State([Edge(48, 3, False)], False),
            State([Edge(31, 1, False)], False)], FA.PRUNE),
        FA("power", [State([Edge(32, 1, False)], False),
            State([Edge("*", 2, True)], True),
            State([Edge("*", 3, True)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(32, 1, False)], False)], FA.PRUNE),
        FA("not", [State([Edge("n", 1, False),
                Edge(33, 5, False)], False),
            State([Edge("o", 2, False)], False),
            State([Edge("t", 3, False)], False),
            State([Edge(48, 4, False)], False),
            State([Edge(33, 5, False)], False),
            State([], True)], FA.PRUNE),
        FA("bitwise_not", [State([Edge("~", 1, False),
                Edge(34, 3, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge(34, 3, False)], False),
            State([], True)], FA.PRUNE),
        FA("negation", [State([Edge("-", 1, False),
                Edge(35, 3, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge(35, 3, False)], False),
            State([], True)], FA.PRUNE),
        FA("access", [State([Edge(36, 1, False)], False),
            State([Edge(".", 2, True)], True),
            State([Edge(10, 3, False)], False),
            State([], True)], FA.PRUNE),
        FA("indexing", [State([Edge(37, 1, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge("[", 3, True)], True),
            State([Edge(11, 4, False)], False),
            State([Edge("]", 5, True)], False),
            State([Edge(48, 6, False)], False),
            State([], True)], FA.PRUNE),
        FA("fun_call", [State([Edge(38, 1, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge("(", 3, True)], True),
            State([Edge(11, 4, False)], False),
            State([Edge(")", 5, True)], False),
            State([Edge(48, 6, False)], False),
            State([], True)], FA.PRUNE),
        FA("unary", [State([Edge("(", 1, True),
                Edge(47, 4, False),
                Edge(42, 4, False),
                Edge(40, 4, False),
                Edge(10, 4, False)], False),
            State([Edge(48, 2, False)], False),
            State([Edge(20, 3, False)], False),
            State([Edge(")", 4, True)], False),
            State([], True)], FA.PRUNE),
        FA("type", [State([Edge("s", 1, False),
                Edge("i", 7, False),
                Edge("f", 12, False),
                Edge("b", 19, False),
                Edge("(", 22, True)], False),
            State([Edge("t", 2, False)], False),
            State([Edge("r", 3, False)], False),
            State([Edge("i", 4, False)], False),
            State([Edge("n", 5, False)], False),
            State([Edge("g", 6, False)], False),
            State([], True),
            State([Edge("n", 8, False)], False),
            State([Edge("t", 9, False)], False),
            State([Edge("3", 10, False),
                Edge("6", 11, False)], False),
            State([Edge("2", 6, False)], False),
            State([Edge("4", 6, False)], False),
            State([Edge("l", 13, False)], False),
            State([Edge("o", 14, False)], False),
            State([Edge("a", 15, False)], False),
            State([Edge("t", 16, False)], False),
            State([Edge("3", 17, False),
                Edge("6", 18, False)], False),
            State([Edge("2", 6, False)], False),
            State([Edge("4", 6, False)], False),
            State([Edge("o", 20, False)], False),
            State([Edge("o", 21, False)], False),
            State([Edge("l", 6, False)], False),
            State([Edge(9, 23, False)], False),
            State([Edge(")", 24, True)], False),
            State([Edge(48, 25, False)], False),
            State([Edge(39, 6, False)], False)], FA.LEFT),
        FA("string", [State([Edge("\'", 1, True),
                Edge("\"", 5, True)], False),
            State([Edge(52, 2, False),
                Edge("\'", 3, True)], False),
            State([Edge(41, 1, False)], False),
            State([Edge(48, 4, False)], False),
            State([], True),
            State([Edge(53, 6, False),
                Edge("\"", 7, True)], False),
            State([Edge(41, 5, False)], False),
            State([Edge(48, 4, False)], False)], FA.LEFT),
        FA("char", [State([Edge("\\", 1, False),
                Edge(-1, 2, False)], False),
            State([Edge("\\", 2, False),
                Edge("\'", 2, False),
                Edge("\"", 2, False),
                Edge(["b", "f", "n", "r", "t"], 2, False),
                Edge(["u", "x"], 3, False),
                Edge([(48, 57)], 5, False)], False),
            State([], True),
            State([Edge([(48, 57), (65, 70), (97, 102)], 4, False)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 4, False)], True),
            State([Edge([(48, 57)], 5, False)], True)], FA.LEFT),
        FA("boolean", [State([Edge("t", 1, False),
                Edge("f", 6, False)], False),
            State([Edge("r", 2, False)], False),
            State([Edge("u", 3, False)], False),
            State([Edge("e", 4, False)], False),
            State([Edge(48, 5, False)], False),
            State([], True),
            State([Edge("a", 7, False)], False),
            State([Edge("l", 8, False)], False),
            State([Edge("s", 9, False)], False),
            State([Edge("e", 4, False)], False)], FA.LEFT),
        FA("decimal", [State([Edge("0", 1, False),
                Edge([(49, 57)], 3, False)], False),
            State([Edge(54, 2, False)], False),
            State([], True),
            State([Edge([(48, 57)], 3, False),
                Edge(".", 4, False),
                Edge("e", 6, False),
                Edge(48, 2, False)], False),
            State([Edge([(48, 57)], 5, False)], False),
            State([Edge([(48, 57)], 5, False),
                Edge("e", 6, False),
                Edge(48, 2, False)], False),
            State([Edge([(48, 57)], 7, False)], False),
            State([Edge([(48, 57)], 7, False),
                Edge(48, 2, False)], False)], FA.LEFT),
        FA("binary", [State([Edge("0", 1, True)], False),
            State([Edge("b", 2, True)], False),
            State([Edge([(48, 49)], 3, False)], False),
            State([Edge([(48, 49)], 3, False),
                Edge(48, 4, False)], False),
            State([], True)], FA.LEFT),
        FA("octal", [State([Edge("0", 1, True)], False),
            State([Edge([(48, 55)], 2, False)], False),
            State([Edge([(48, 55)], 2, False),
                Edge(48, 3, False)], False),
            State([], True)], FA.LEFT),
        FA("hex", [State([Edge("0", 1, True)], False),
            State([Edge("x", 2, True)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 3, False)], False),
            State([Edge([(48, 57), (65, 70), (97, 102)], 3, False),
                Edge(48, 4, False)], False),
            State([], True)], FA.LEFT),
        FA("number", [State([Edge(43, 1, False),
                Edge(44, 1, False),
                Edge(45, 1, False),
                Edge(46, 1, False)], False),
            State([], True)], FA.PRUNE),
        FA("ws", [State([Edge([(9, 10), "\r", " "], 0, False),
                Edge(4, 0, False)], True)], FA.VOID),
        FA("wsp", [State([Edge([(9, 10), "\r", " "], 1, False),
                Edge(4, 1, False)], False),
            State([Edge([(9, 10), "\r", " "], 1, False),
                Edge(4, 1, False)], True)], FA.VOID),
        FA("", [State([Edge("\n", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("*", 1, False)], False),
            State([Edge("/", 2, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("\'", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge("\"", 1, False)], False),
            State([], True)], FA.NEG),
        FA("", [State([Edge([(48, 57), "b", "x"], 1, False)], False),
            State([], True)], FA.NEG)]

    def __init__(self):
        WaxeyeParser.__init__(self, Parser.start, Parser.eof_check, Parser.automata)