1 // Generated from doc/examples/simple_expression/Expr.g4 by ANTLR 4.9.2 2 module ExprLexer; 3 4 import antlr.v4.runtime.Lexer; 5 import antlr.v4.runtime.CharStream; 6 import antlr.v4.runtime.InterfaceRuleContext; 7 import antlr.v4.runtime.RuleContext; 8 import antlr.v4.runtime.RuntimeMetaData; 9 import antlr.v4.runtime.Token; 10 import antlr.v4.runtime.TokenStream; 11 import antlr.v4.runtime.Vocabulary; 12 import antlr.v4.runtime.VocabularyImpl; 13 import antlr.v4.runtime.atn.ATN : ATN; 14 alias ATNType = ATN; 15 import antlr.v4.runtime.atn.PredictionContextCache; 16 import antlr.v4.runtime.atn.ATNDeserializer; 17 import antlr.v4.runtime.atn.LexerATNSimulator; 18 import antlr.v4.runtime.dfa.DFA; 19 import antlr.v4.runtime.LexerNoViableAltException; 20 21 public class ExprLexer : Lexer { 22 alias recover = Lexer.recover; 23 static this() { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); } 24 25 protected static DFA[] _decisionToDFA; 26 protected PredictionContextCache _sharedContextCache = 27 new PredictionContextCache(); 28 public enum int 29 T__0=1,T__1=2,T__2=3,T__3=4,T__4=5,T__5=6,NEWLINE=7,INT=8; 30 public static string[] channelNames = [ 31 "DEFAULT_TOKEN_CHANNEL", "HIDDEN" 32 ]; 33 public static string[] modeNames = [ 34 "DEFAULT_MODE" 35 ]; 36 37 public static string[] ruleNames = [ 38 "T__0","T__1","T__2","T__3","T__4","T__5","NEWLINE","INT" 39 ]; 40 41 private static const string[] _LITERAL_NAMES = [ 42 null,"'/'","'*'","'-'","'+'","'('","')'" 43 ]; 44 private static const string[] _SYMBOLIC_NAMES = [ 45 null,null,null,null,null,null,null,"NEWLINE","INT" 46 ]; 47 public static Vocabulary VOCABULARY; 48 49 /** 50 * @deprecated Use {@link #VOCABULARY} instead. 51 */ 52 public static string[_SYMBOLIC_NAMES.length] tokenNames; 53 54 static this() { 55 VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); 56 int index = 0; 57 foreach (ref tokenName; tokenNames) 58 { 59 tokenName = VOCABULARY.getLiteralName(index); 60 if (!tokenName) { 61 tokenName = VOCABULARY.getSymbolicName(index); 62 } 63 if (!tokenName) 64 { 65 tokenName = "<INVALID>"; 66 } 67 } 68 ++index; 69 } 70 71 override public string[] getTokenNames() { 72 return tokenNames; 73 } 74 75 override public Vocabulary getVocabulary() { 76 return VOCABULARY; 77 } 78 79 80 public this(CharStream input) { 81 super(input); 82 _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); 83 } 84 85 override 86 public string getGrammarFileName() { return "Expr.g4"; } 87 88 override 89 public string[] getRuleNames() { return ruleNames; } 90 91 override 92 public wstring getSerializedATN() { return _serializedATN; } 93 94 override 95 public string[] getChannelNames() { return channelNames; } 96 97 override 98 public string[] getModeNames() { return modeNames; } 99 100 override 101 public ATNType getATN() { return _ATN; } 102 103 public static immutable wstring _serializedATN = 104 "\x03\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\x02\n)\b\x01"~ 105 "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t"~ 106 "\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x03\x02\x03\x02\x03\x03\x03"~ 107 "\x03\x03\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07"~ 108 "\x03\b\x06\b!\n\b\r\b\x0e\b\"\x03\t\x06\t&\n\t\r\t\x0e\t\'\x02\x02"~ 109 "\n\x03\x03\x05\x04\x07\x05\t\x06\x0b\x07\r\b\x0f\t\x11\n\x03\x02\x04"~ 110 "\x04\x02\f\f\x0f\x0f\x03\x022;\x02*\x02\x03\x03\x02\x02\x02\x02\x05"~ 111 "\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02\x02"~ 112 "\x0b\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0f\x03\x02\x02\x02"~ 113 "\x02\x11\x03\x02\x02\x02\x03\x13\x03\x02\x02\x02\x05\x15\x03\x02\x02"~ 114 "\x02\x07\x17\x03\x02\x02\x02\t\x19\x03\x02\x02\x02\x0b\x1b\x03\x02"~ 115 "\x02\x02\r\x1d\x03\x02\x02\x02\x0f \x03\x02\x02\x02\x11%\x03\x02\x02"~ 116 "\x02\x13\x14\x071\x02\x02\x14\x04\x03\x02\x02\x02\x15\x16\x07,\x02"~ 117 "\x02\x16\x06\x03\x02\x02\x02\x17\x18\x07/\x02\x02\x18\b\x03\x02\x02"~ 118 "\x02\x19\x1a\x07-\x02\x02\x1a\n\x03\x02\x02\x02\x1b\x1c\x07*\x02\x02"~ 119 "\x1c\f\x03\x02\x02\x02\x1d\x1e\x07+\x02\x02\x1e\x0e\x03\x02\x02\x02"~ 120 "\x1f!\t\x02\x02\x02 \x1f\x03\x02\x02\x02!\"\x03\x02\x02\x02\" \x03"~ 121 "\x02\x02\x02\"#\x03\x02\x02\x02#\x10\x03\x02\x02\x02$&\t\x03\x02\x02"~ 122 "%$\x03\x02\x02\x02&\'\x03\x02\x02\x02\'%\x03\x02\x02\x02\'(\x03\x02"~ 123 "\x02\x02(\x12\x03\x02\x02\x02\x05\x02\"\'\x02"; 124 public static ATNType _ATN; 125 126 static this() { 127 auto atnDeserializer = new ATNDeserializer; 128 _ATN = atnDeserializer.deserialize(_serializedATN); 129 _decisionToDFA.length = 0; 130 for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { 131 _decisionToDFA ~= new DFA(_ATN.getDecisionState(i), i); 132 } 133 } 134 }