-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathWelcomeParser.java
95 lines (86 loc) · 2.75 KB
/
WelcomeParser.java
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
// Generated from Welcome.g4 by ANTLR 4.2
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class WelcomeParser extends Parser {
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, ID=2, WS=3;
public static final String[] tokenNames = {
"<INVALID>", "'welcome'", "ID", "WS"
};
public static final int
RULE_r = 0;
public static final String[] ruleNames = {
"r"
};
@Override
public String getGrammarFileName() { return "Welcome.g4"; }
@Override
public String[] getTokenNames() { return tokenNames; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public WelcomeParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class RContext extends ParserRuleContext {
public TerminalNode ID() { return getToken(WelcomeParser.ID, 0); }
public RContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_r; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof WelcomeListener ) ((WelcomeListener)listener).enterR(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof WelcomeListener ) ((WelcomeListener)listener).exitR(this);
}
}
public final RContext r() throws RecognitionException {
RContext _localctx = new RContext(_ctx, getState());
enterRule(_localctx, 0, RULE_r);
try {
enterOuterAlt(_localctx, 1);
{
setState(2); match(1);
setState(3); match(ID);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\5\b\4\2\t\2\3\2\3"+
"\2\3\2\3\2\2\2\3\2\2\2\6\2\4\3\2\2\2\4\5\7\3\2\2\5\6\7\4\2\2\6\3\3\2\2"+
"\2\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}