summaryrefslogtreecommitdiff
path: root/Homework/cs5300/project-three/lexer/TinyLexer.java
diff options
context:
space:
mode:
Diffstat (limited to 'Homework/cs5300/project-three/lexer/TinyLexer.java')
-rw-r--r--Homework/cs5300/project-three/lexer/TinyLexer.java164
1 files changed, 164 insertions, 0 deletions
diff --git a/Homework/cs5300/project-three/lexer/TinyLexer.java b/Homework/cs5300/project-three/lexer/TinyLexer.java
new file mode 100644
index 0000000..f1213fb
--- /dev/null
+++ b/Homework/cs5300/project-three/lexer/TinyLexer.java
@@ -0,0 +1,164 @@
+// Generated from TinyLexer.tokens by ANTLR 4.9.1
+package lexer;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
+public class TinyLexer extends Lexer {
+ static { RuntimeMetaData.checkVersion("4.9.1", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ IF=1, THEN=2, ELSE=3, END=4, REPEAT=5, UNTIL=6, READ=7, WRITE=8, OPAREN=9,
+ CPAREN=10, PLUS=11, MINUS=12, MULTIPLY=13, DIVIDE=14, LT=15, EQUAL=16,
+ NUM=17, ID=18, COMMENT=19, WS=20;
+ public static String[] channelNames = {
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+ };
+
+ public static String[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "IF", "THEN", "ELSE", "END", "REPEAT", "UNTIL", "READ", "WRITE", "OPAREN",
+ "CPAREN", "PLUS", "MINUS", "MULTIPLY", "DIVIDE", "LT", "EQUAL", "NUM",
+ "ID", "COMMENT", "WS", "LETTER", "DIGIT"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "'if'", "'then'", "'else'", "'end'", "'repeat'", "'until'", "'read'",
+ "'write'", "'('", "')'", "'+'", "'-'", "'*'", "'/'", "'<'", "'='"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, "IF", "THEN", "ELSE", "END", "REPEAT", "UNTIL", "READ", "WRITE",
+ "OPAREN", "CPAREN", "PLUS", "MINUS", "MULTIPLY", "DIVIDE", "LT", "EQUAL",
+ "NUM", "ID", "COMMENT", "WS"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "<INVALID>";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+
+ public TinyLexer(CharStream input) {
+ super(input);
+ _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @Override
+ public String getGrammarFileName() { return "TinyLexer.tokens"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public String[] getChannelNames() { return channelNames; }
+
+ @Override
+ public String[] getModeNames() { return modeNames; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public static final String _serializedATN =
+ "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\26\u0099\b\1\4\2"+
+ "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\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\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
+ "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\3\2\3\2\3\2\3"+
+ "\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6"+
+ "\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3"+
+ "\t\3\t\3\t\3\n\3\n\3\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3\17\3\20"+
+ "\3\20\3\21\3\21\3\22\6\22j\n\22\r\22\16\22k\3\23\6\23o\n\23\r\23\16\23"+
+ "p\3\24\3\24\3\24\3\24\7\24w\n\24\f\24\16\24z\13\24\3\24\5\24}\n\24\3\24"+
+ "\3\24\3\24\3\24\3\24\7\24\u0084\n\24\f\24\16\24\u0087\13\24\3\24\3\24"+
+ "\5\24\u008b\n\24\3\24\3\24\3\25\6\25\u0090\n\25\r\25\16\25\u0091\3\25"+
+ "\3\25\3\26\3\26\3\27\3\27\3\u0085\2\30\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21"+
+ "\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\2-\2"+
+ "\3\2\5\4\2\f\f\17\17\5\2\13\f\16\17\"\"\4\2C\\c|\2\u009d\2\3\3\2\2\2\2"+
+ "\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\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2c\36"+
+ "\3\2\2\2de\7>\2\2e \3\2\2\2fg\7?\2\2g\"\3\2\2\2hj\5-\27\2ih\3\2\2\2jk"+
+ "\3\2\2\2ki\3\2\2\2kl\3\2\2\2l$\3\2\2\2mo\5+\26\2nm\3\2\2\2op\3\2\2\2p"+
+ "n\3\2\2\2pq\3\2\2\2q&\3\2\2\2rs\7\61\2\2st\7\61\2\2tx\3\2\2\2uw\n\2\2"+
+ "\2vu\3\2\2\2wz\3\2\2\2xv\3\2\2\2xy\3\2\2\2y|\3\2\2\2zx\3\2\2\2{}\7\17"+
+ "\2\2|{\3\2\2\2|}\3\2\2\2}~\3\2\2\2~\u008b\7\f\2\2\177\u0080\7\61\2\2\u0080"+
+ "\u0081\7,\2\2\u0081\u0085\3\2\2\2\u0082\u0084\13\2\2\2\u0083\u0082\3\2"+
+ "\2\2\u0084\u0087\3\2\2\2\u0085\u0086\3\2\2\2\u0085\u0083\3\2\2\2\u0086"+
+ "\u0088\3\2\2\2\u0087\u0085\3\2\2\2\u0088\u0089\7,\2\2\u0089\u008b\7\61"+
+ "\2\2\u008ar\3\2\2\2\u008a\177\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u008d"+
+ "\b\24\2\2\u008d(\3\2\2\2\u008e\u0090\t\3\2\2\u008f\u008e\3\2\2\2\u0090"+
+ "\u0091\3\2\2\2\u0091\u008f\3\2\2\2\u0091\u0092\3\2\2\2\u0092\u0093\3\2"+
+ "\2\2\u0093\u0094\b\25\2\2\u0094*\3\2\2\2\u0095\u0096\t\4\2\2\u0096,\3"+
+ "\2\2\2\u0097\u0098\4\62;\2\u0098.\3\2\2\2\n\2kpx|\u0085\u008a\u0091\3"+
+ "\b\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);
+ }
+ }
+} \ No newline at end of file