-
Notifications
You must be signed in to change notification settings - Fork 1
/
ReGexLexer.py
100 lines (84 loc) · 4.61 KB
/
ReGexLexer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Generated from ReGex.g4 by ANTLR 4.7.2
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\16")
buf.write("\u0083\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r")
buf.write("\3\2\3\2\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3")
buf.write("\4\3\4\3\4\6\4,\n\4\r\4\16\4-\3\4\3\4\3\4\3\4\3\4\3\4")
buf.write("\3\4\6\4\67\n\4\r\4\16\48\3\4\3\4\3\4\3\4\3\4\3\4\3\4")
buf.write("\3\4\6\4C\n\4\r\4\16\4D\3\4\3\4\5\4I\n\4\3\5\3\5\3\5\3")
buf.write("\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5")
buf.write("\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5c\n\5\3\6\3\6\3\7\3\7")
buf.write("\3\b\3\b\3\t\3\t\3\n\3\n\3\13\6\13p\n\13\r\13\16\13q\3")
buf.write("\f\3\f\6\fv\n\f\r\f\16\fw\3\f\5\f{\n\f\3\r\6\r~\n\r\r")
buf.write("\r\16\r\177\3\r\3\r\2\2\16\3\3\5\4\7\5\t\6\13\7\r\b\17")
buf.write("\t\21\n\23\13\25\f\27\r\31\16\3\2\5\3\2\62;\5\2\62;C\\")
buf.write("c|\5\2\13\f\17\17\"\"\2\u0092\2\3\3\2\2\2\2\5\3\2\2\2")
buf.write("\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17")
buf.write("\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3")
buf.write("\2\2\2\2\31\3\2\2\2\3\33\3\2\2\2\5\35\3\2\2\2\7H\3\2\2")
buf.write("\2\tb\3\2\2\2\13d\3\2\2\2\rf\3\2\2\2\17h\3\2\2\2\21j\3")
buf.write("\2\2\2\23l\3\2\2\2\25o\3\2\2\2\27z\3\2\2\2\31}\3\2\2\2")
buf.write("\33\34\7*\2\2\34\4\3\2\2\2\35\36\7+\2\2\36\6\3\2\2\2\37")
buf.write(" \7]\2\2 !\5\27\f\2!\"\7_\2\2\"I\3\2\2\2#$\7]\2\2$%\5")
buf.write("\27\f\2%&\7/\2\2&\'\5\27\f\2\'(\7_\2\2(I\3\2\2\2)+\7]")
buf.write("\2\2*,\5\27\f\2+*\3\2\2\2,-\3\2\2\2-+\3\2\2\2-.\3\2\2")
buf.write("\2./\3\2\2\2/\60\7_\2\2\60I\3\2\2\2\61\66\7]\2\2\62\63")
buf.write("\5\27\f\2\63\64\7/\2\2\64\65\5\27\f\2\65\67\3\2\2\2\66")
buf.write("\62\3\2\2\2\678\3\2\2\28\66\3\2\2\289\3\2\2\29:\3\2\2")
buf.write("\2:;\7_\2\2;I\3\2\2\2<B\7]\2\2=C\5\27\f\2>?\5\27\f\2?")
buf.write("@\7/\2\2@A\5\27\f\2AC\3\2\2\2B=\3\2\2\2B>\3\2\2\2CD\3")
buf.write("\2\2\2DB\3\2\2\2DE\3\2\2\2EF\3\2\2\2FG\7_\2\2GI\3\2\2")
buf.write("\2H\37\3\2\2\2H#\3\2\2\2H)\3\2\2\2H\61\3\2\2\2H<\3\2\2")
buf.write("\2I\b\3\2\2\2JK\5\27\f\2KL\7}\2\2LM\5\25\13\2MN\7\177")
buf.write("\2\2Nc\3\2\2\2OP\5\27\f\2PQ\7}\2\2QR\7.\2\2RS\5\25\13")
buf.write("\2ST\7\177\2\2Tc\3\2\2\2UV\5\27\f\2VW\7}\2\2WX\5\25\13")
buf.write("\2XY\7.\2\2YZ\7\177\2\2Zc\3\2\2\2[\\\5\27\f\2\\]\7}\2")
buf.write("\2]^\5\25\13\2^_\7.\2\2_`\5\25\13\2`a\7\177\2\2ac\3\2")
buf.write("\2\2bJ\3\2\2\2bO\3\2\2\2bU\3\2\2\2b[\3\2\2\2c\n\3\2\2")
buf.write("\2de\7,\2\2e\f\3\2\2\2fg\7-\2\2g\16\3\2\2\2hi\7A\2\2i")
buf.write("\20\3\2\2\2jk\7~\2\2k\22\3\2\2\2lm\7\60\2\2m\24\3\2\2")
buf.write("\2np\t\2\2\2on\3\2\2\2pq\3\2\2\2qo\3\2\2\2qr\3\2\2\2r")
buf.write("\26\3\2\2\2s{\t\3\2\2tv\t\2\2\2ut\3\2\2\2vw\3\2\2\2wu")
buf.write("\3\2\2\2wx\3\2\2\2x{\3\2\2\2y{\7\62\2\2zs\3\2\2\2zu\3")
buf.write("\2\2\2zy\3\2\2\2{\30\3\2\2\2|~\t\4\2\2}|\3\2\2\2~\177")
buf.write("\3\2\2\2\177}\3\2\2\2\177\u0080\3\2\2\2\u0080\u0081\3")
buf.write("\2\2\2\u0081\u0082\b\r\2\2\u0082\32\3\2\2\2\r\2-8BDHb")
buf.write("qwz\177\3\b\2\2")
return buf.getvalue()
class ReGexLexer(Lexer):
atn = ATNDeserializer().deserialize(serializedATN())
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
T__0 = 1
T__1 = 2
SET = 3
RANGE = 4
STAR = 5
PLUS = 6
MAYBE = 7
ALTERNATION = 8
ANY = 9
NUMBER = 10
CHAR = 11
WS = 12
channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
modeNames = [ "DEFAULT_MODE" ]
literalNames = [ "<INVALID>",
"'('", "')'", "'*'", "'+'", "'?'", "'|'", "'.'" ]
symbolicNames = [ "<INVALID>",
"SET", "RANGE", "STAR", "PLUS", "MAYBE", "ALTERNATION", "ANY",
"NUMBER", "CHAR", "WS" ]
ruleNames = [ "T__0", "T__1", "SET", "RANGE", "STAR", "PLUS", "MAYBE",
"ALTERNATION", "ANY", "NUMBER", "CHAR", "WS" ]
grammarFileName = "ReGex.g4"
def __init__(self, input=None, output:TextIO = sys.stdout):
super().__init__(input, output)
self.checkVersion("4.7.2")
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
self._actions = None
self._predicates = None