1 
  2 // this file has been automatically generated from 'D:/work/soulng-project/sngcm/cmlexer/ParserFileTokenLexer.lexer' using soulng lexer generator slg version 3.0.0
  3 
  4 #include <sngcm/cmlexer/ParserFileTokenLexerTokens.hpp>
  5 #include <map>
  6 
  7 namespace ParserFileTokenLexerTokens
  8 {
  9     std::map<std::u32stringint> tokenIdMap;
 10 
 11     void InitTokenIdMap()
 12     {
 13         tokenIdMap[U"ABSTRACT"] = 48;
 14         tokenIdMap[U"AMP"] = 98;
 15         tokenIdMap[U"AMPAMP"] = 95;
 16         tokenIdMap[U"AND"] = 84;
 17         tokenIdMap[U"ANY"] = 6;
 18         tokenIdMap[U"ARROW"] = 114;
 19         tokenIdMap[U"AS"] = 36;
 20         tokenIdMap[U"ASSERT"] = 9;
 21         tokenIdMap[U"ASSIGN"] = 124;
 22         tokenIdMap[U"AXIOM"] = 83;
 23         tokenIdMap[U"BASE"] = 72;
 24         tokenIdMap[U"BITOR"] = 96;
 25         tokenIdMap[U"BITXOR"] = 97;
 26         tokenIdMap[U"BLOCKCOMMENT"] = 130;
 27         tokenIdMap[U"BLOCKCOMMENTLINE"] = 131;
 28         tokenIdMap[U"BOOL"] = 12;
 29         tokenIdMap[U"BREAK"] = 62;
 30         tokenIdMap[U"BYTE"] = 16;
 31         tokenIdMap[U"CASE"] = 57;
 32         tokenIdMap[U"CAST"] = 30;
 33         tokenIdMap[U"CATCH"] = 79;
 34         tokenIdMap[U"CDECL"] = 41;
 35         tokenIdMap[U"CHAR"] = 25;
 36         tokenIdMap[U"CHARLIT"] = 90;
 37         tokenIdMap[U"CLASS"] = 52;
 38         tokenIdMap[U"COLON"] = 125;
 39         tokenIdMap[U"COMMA"] = 123;
 40         tokenIdMap[U"CONCEPT"] = 81;
 41         tokenIdMap[U"CONST"] = 68;
 42         tokenIdMap[U"CONSTEXPR"] = 69;
 43         tokenIdMap[U"CONSTRUCT"] = 73;
 44         tokenIdMap[U"CONTINUE"] = 63;
 45         tokenIdMap[U"CPL"] = 112;
 46         tokenIdMap[U"DEFAULT"] = 58;
 47         tokenIdMap[U"DELEGATE"] = 39;
 48         tokenIdMap[U"DELETE"] = 76;
 49         tokenIdMap[U"DESTROY"] = 74;
 50         tokenIdMap[U"DISJUNCTION"] = 94;
 51         tokenIdMap[U"DIV"] = 108;
 52         tokenIdMap[U"DO"] = 60;
 53         tokenIdMap[U"DOT"] = 113;
 54         tokenIdMap[U"DOUBLE"] = 24;
 55         tokenIdMap[U"ELIF"] = 10;
 56         tokenIdMap[U"ELSE"] = 55;
 57         tokenIdMap[U"EMPTY"] = 5;
 58         tokenIdMap[U"ENDIF"] = 11;
 59         tokenIdMap[U"ENUM"] = 29;
 60         tokenIdMap[U"EQ"] = 99;
 61         tokenIdMap[U"EQUIVALENCE"] = 92;
 62         tokenIdMap[U"EXCLAMATION"] = 86;
 63         tokenIdMap[U"EXPLICIT"] = 38;
 64         tokenIdMap[U"EXTERN"] = 35;
 65         tokenIdMap[U"FALSE"] = 14;
 66         tokenIdMap[U"FLOAT"] = 23;
 67         tokenIdMap[U"FLOATINGLIT"] = 88;
 68         tokenIdMap[U"FOR"] = 61;
 69         tokenIdMap[U"GEQ"] = 102;
 70         tokenIdMap[U"GOTO"] = 64;
 71         tokenIdMap[U"HASH"] = 127;
 72         tokenIdMap[U"ID"] = 133;
 73         tokenIdMap[U"IF"] = 54;
 74         tokenIdMap[U"IMPLICATION"] = 93;
 75         tokenIdMap[U"INLINE"] = 40;
 76         tokenIdMap[U"INT"] = 19;
 77         tokenIdMap[U"INTERFACE"] = 31;
 78         tokenIdMap[U"INTERNAL"] = 46;
 79         tokenIdMap[U"INTLIT"] = 89;
 80         tokenIdMap[U"IS"] = 37;
 81         tokenIdMap[U"KEYWORD"] = 132;
 82         tokenIdMap[U"LANGLE"] = 119;
 83         tokenIdMap[U"LBRACE"] = 121;
 84         tokenIdMap[U"LBRACKET"] = 115;
 85         tokenIdMap[U"LEQ"] = 101;
 86         tokenIdMap[U"LINECOMMENT"] = 129;
 87         tokenIdMap[U"LONG"] = 21;
 88         tokenIdMap[U"LPAREN"] = 117;
 89         tokenIdMap[U"MAIN"] = 2;
 90         tokenIdMap[U"MAX"] = 136;
 91         tokenIdMap[U"MINUS"] = 106;
 92         tokenIdMap[U"MINUSMINUS"] = 111;
 93         tokenIdMap[U"NAMESPACE"] = 32;
 94         tokenIdMap[U"NEQ"] = 100;
 95         tokenIdMap[U"NEW"] = 75;
 96         tokenIdMap[U"NOTHROW"] = 42;
 97         tokenIdMap[U"NULLLIT"] = 70;
 98         tokenIdMap[U"NUMBER"] = 134;
 99         tokenIdMap[U"OPERATOR"] = 51;
100         tokenIdMap[U"OR"] = 85;
101         tokenIdMap[U"OTHER"] = 135;
102         tokenIdMap[U"OVERRIDE"] = 49;
103         tokenIdMap[U"PARSER"] = 1;
104         tokenIdMap[U"PLUS"] = 105;
105         tokenIdMap[U"PLUSPLUS"] = 110;
106         tokenIdMap[U"PRIVATE"] = 45;
107         tokenIdMap[U"PRODUCES"] = 8;
108         tokenIdMap[U"PROTECTED"] = 44;
109         tokenIdMap[U"PUBLIC"] = 43;
110         tokenIdMap[U"RANGLE"] = 120;
111         tokenIdMap[U"RBRACE"] = 122;
112         tokenIdMap[U"RBRACKET"] = 116;
113         tokenIdMap[U"REM"] = 109;
114         tokenIdMap[U"RETURN"] = 53;
115         tokenIdMap[U"RPAREN"] = 118;
116         tokenIdMap[U"RULEINFO"] = 4;
117         tokenIdMap[U"SBYTE"] = 15;
118         tokenIdMap[U"SEMICOLON"] = 126;
119         tokenIdMap[U"SHIFTLEFT"] = 103;
120         tokenIdMap[U"SHIFTRIGHT"] = 104;
121         tokenIdMap[U"SHORT"] = 17;
122         tokenIdMap[U"SIZEOF"] = 77;
123         tokenIdMap[U"STAR"] = 107;
124         tokenIdMap[U"STATIC"] = 34;
125         tokenIdMap[U"STRINGLIT"] = 91;
126         tokenIdMap[U"SUPPRESS"] = 50;
127         tokenIdMap[U"SWITCH"] = 56;
128         tokenIdMap[U"THIS"] = 71;
129         tokenIdMap[U"THROW"] = 80;
130         tokenIdMap[U"TRUE"] = 13;
131         tokenIdMap[U"TRY"] = 78;
132         tokenIdMap[U"TYPEDEF"] = 65;
133         tokenIdMap[U"TYPEID"] = 67;
134         tokenIdMap[U"TYPENAME"] = 66;
135         tokenIdMap[U"UCHAR"] = 27;
136         tokenIdMap[U"UINT"] = 20;
137         tokenIdMap[U"ULONG"] = 22;
138         tokenIdMap[U"UNIT_TEST"] = 87;
139         tokenIdMap[U"USELEXER"] = 3;
140         tokenIdMap[U"USHORT"] = 18;
141         tokenIdMap[U"USING"] = 33;
142         tokenIdMap[U"VAR"] = 7;
143         tokenIdMap[U"VIRTUAL"] = 47;
144         tokenIdMap[U"VOID"] = 28;
145         tokenIdMap[U"WCHAR"] = 26;
146         tokenIdMap[U"WHERE"] = 82;
147         tokenIdMap[U"WHILE"] = 59;
148         tokenIdMap[U"WS"] = 128;
149     }
150 
151     int GetTokenId(const std::u32string& tokenName)
152     {
153         auto it = tokenIdMap.find(tokenName);
154         if (it != tokenIdMap.cend())
155         {
156             return it->second;
157         }
158         else
159         {
160             return -1;
161         }
162     }
163 
164     const char* tokenName[] =
165     {
166         "END"
167         "PARSER"
168         "MAIN"
169         "USELEXER"
170         "RULEINFO"
171         "EMPTY"
172         "ANY"
173         "VAR"
174         "PRODUCES"
175         "ASSERT"
176         "ELIF"
177         "ENDIF"
178         "BOOL"
179         "TRUE"
180         "FALSE"
181         "SBYTE"
182         "BYTE"
183         "SHORT"
184         "USHORT"
185         "INT"
186         "UINT"
187         "LONG"
188         "ULONG"
189         "FLOAT"
190         "DOUBLE"
191         "CHAR"
192         "WCHAR"
193         "UCHAR"
194         "VOID"
195         "ENUM"
196         "CAST"
197         "INTERFACE"
198         "NAMESPACE"
199         "USING"
200         "STATIC"
201         "EXTERN"
202         "AS"
203         "IS"
204         "EXPLICIT"
205         "DELEGATE"
206         "INLINE"
207         "CDECL"
208         "NOTHROW"
209         "PUBLIC"
210         "PROTECTED"
211         "PRIVATE"
212         "INTERNAL"
213         "VIRTUAL"
214         "ABSTRACT"
215         "OVERRIDE"
216         "SUPPRESS"
217         "OPERATOR"
218         "CLASS"
219         "RETURN"
220         "IF"
221         "ELSE"
222         "SWITCH"
223         "CASE"
224         "DEFAULT"
225         "WHILE"
226         "DO"
227         "FOR"
228         "BREAK"
229         "CONTINUE"
230         "GOTO"
231         "TYPEDEF"
232         "TYPENAME"
233         "TYPEID"
234         "CONST"
235         "CONSTEXPR"
236         "NULLLIT"
237         "THIS"
238         "BASE"
239         "CONSTRUCT"
240         "DESTROY"
241         "NEW"
242         "DELETE"
243         "SIZEOF"
244         "TRY"
245         "CATCH"
246         "THROW"
247         "CONCEPT"
248         "WHERE"
249         "AXIOM"
250         "AND"
251         "OR"
252         "EXCLAMATION"
253         "UNIT_TEST"
254         "FLOATINGLIT"
255         "INTLIT"
256         "CHARLIT"
257         "STRINGLIT"
258         "EQUIVALENCE"
259         "IMPLICATION"
260         "DISJUNCTION"
261         "AMPAMP"
262         "BITOR"
263         "BITXOR"
264         "AMP"
265         "EQ"
266         "NEQ"
267         "LEQ"
268         "GEQ"
269         "SHIFTLEFT"
270         "SHIFTRIGHT"
271         "PLUS"
272         "MINUS"
273         "STAR"
274         "DIV"
275         "REM"
276         "PLUSPLUS"
277         "MINUSMINUS"
278         "CPL"
279         "DOT"
280         "ARROW"
281         "LBRACKET"
282         "RBRACKET"
283         "LPAREN"
284         "RPAREN"
285         "LANGLE"
286         "RANGLE"
287         "LBRACE"
288         "RBRACE"
289         "COMMA"
290         "ASSIGN"
291         "COLON"
292         "SEMICOLON"
293         "HASH"
294         "WS"
295         "LINECOMMENT"
296         "BLOCKCOMMENT"
297         "BLOCKCOMMENTLINE"
298         "KEYWORD"
299         "ID"
300         "NUMBER"
301         "OTHER"
302         "MAX"
303     };
304 
305     const char* GetTokenName(int tokenId)
306     {
307         return tokenName[tokenId];
308     }
309 
310     const char* tokenInfo[] =
311     {
312         "end of file"
313         "'parser'"
314         "'main'"
315         "'uselexer'"
316         "'ruleinfo'"
317         "'empty'"
318         "'any'"
319         "'var'"
320         "'::='"
321         "'assert'"
322         "'elif'"
323         "'endif'"
324         "'bool'"
325         "'true'"
326         "'false'"
327         "'sbyte'"
328         "'byte'"
329         "'short'"
330         "'ushort'"
331         "'int'"
332         "'uint'"
333         "'long'"
334         "'ulong'"
335         "'float'"
336         "'double'"
337         "'char'"
338         "'wchar'"
339         "'uchar'"
340         "'void'"
341         "'enum'"
342         "'cast'"
343         "'interface'"
344         "'namespace'"
345         "'using'"
346         "'static'"
347         "'extern'"
348         "'as'"
349         "'is'"
350         "'explicit'"
351         "'delegate'"
352         "'inline'"
353         "'cdecl'"
354         "'nothrow'"
355         "'public'"
356         "'protected'"
357         "'private'"
358         "'internal'"
359         "'virtual'"
360         "'abstract'"
361         "'override'"
362         "'suppress'"
363         "'operator'"
364         "'class'"
365         "'return'"
366         "'if'"
367         "'else'"
368         "'switch'"
369         "'case'"
370         "'default'"
371         "'while'"
372         "'do'"
373         "'for'"
374         "'break'"
375         "'continue'"
376         "'goto'"
377         "'typedef'"
378         "'typename'"
379         "'typeid'"
380         "'const'"
381         "'constexpr'"
382         "'null'"
383         "'this'"
384         "'base'"
385         "'construct'"
386         "'destroy'"
387         "'new'"
388         "'delete'"
389         "'sizeof'"
390         "'try'"
391         "'catch'"
392         "'throw'"
393         "'concept'"
394         "'where'"
395         "'axiom'"
396         "'and'"
397         "'or'"
398         "'!'"
399         "'unit_test'"
400         "floating literal"
401         "integer literal"
402         "character literal"
403         "string literal"
404         "'<=>'"
405         "'=>'"
406         "'||'"
407         "'&&'"
408         "'|'"
409         "'^'"
410         "'&'"
411         "'=='"
412         "'!='"
413         "'<='"
414         "'>='"
415         "'<<'"
416         "'>>'"
417         "'+'"
418         "'-'"
419         "'*'"
420         "'/'"
421         "'%'"
422         "'++'"
423         "'--'"
424         "'~'"
425         "'.'"
426         "'->'"
427         "'['"
428         "']'"
429         "'('"
430         "')'"
431         "'<'"
432         "'>'"
433         "'{'"
434         "'}'"
435         "','"
436         "'='"
437         "':'"
438         "';'"
439         "'#'"
440         "white space"
441         "line comment"
442         "block comment"
443         "block comment line"
444         "keyword"
445         "identifier"
446         "number"
447         "other"
448         "max"
449     };
450 
451     const char* GetTokenInfo(int tokenId)
452     {
453         return tokenInfo[tokenId];
454     }
455 
456     struct Initializer 
457     {
458         Initializer() { InitTokenIdMap(); }
459     };
460 
461     Initializer initializer;
462 }