1 using System;
2
3
4
5 namespace LexerFileTokens
6 {
7 public const int END = 0;
8
9 public const int CLASSMAP = 1;
10
11 public const int TOKENS = 2;
12
13 public const int KEYWORDS = 3;
14
15 public const int EXPRESSIONS = 4;
16
17 public const int LEXER = 5;
18
19 public const int VARIABLES = 6;
20
21 public const int ACTIONS = 7;
22
23 public const int DOLLAR = 8;
24
25 public const int ASSERT = 9;
26
27 public const int ELIF = 10;
28
29 public const int ENDIF = 11;
30
31 public const int BOOL = 12;
32
33 public const int TRUE = 13;
34
35 public const int FALSE = 14;
36
37 public const int SBYTE = 15;
38
39 public const int BYTE = 16;
40
41 public const int SHORT = 17;
42
43 public const int USHORT = 18;
44
45 public const int INT = 19;
46
47 public const int UINT = 20;
48
49 public const int LONG = 21;
50
51 public const int ULONG = 22;
52
53 public const int FLOAT = 23;
54
55 public const int DOUBLE = 24;
56
57 public const int CHAR = 25;
58
59 public const int WCHAR = 26;
60
61 public const int UCHAR = 27;
62
63 public const int VOID = 28;
64
65 public const int ENUM = 29;
66
67 public const int CAST = 30;
68
69 public const int INTERFACE = 31;
70
71 public const int NAMESPACE = 32;
72
73 public const int USING = 33;
74
75 public const int STATIC = 34;
76
77 public const int EXTERN = 35;
78
79 public const int AS = 36;
80
81 public const int IS = 37;
82
83 public const int EXPLICIT = 38;
84
85 public const int DELEGATE = 39;
86
87 public const int INLINE = 40;
88
89 public const int CDECL = 41;
90
91 public const int NOTHROW = 42;
92
93 public const int PUBLIC = 43;
94
95 public const int PROTECTED = 44;
96
97 public const int PRIVATE = 45;
98
99 public const int INTERNAL = 46;
100
101 public const int VIRTUAL = 47;
102
103 public const int ABSTRACT = 48;
104
105 public const int OVERRIDE = 49;
106
107 public const int SUPPRESS = 50;
108
109 public const int OPERATOR = 51;
110
111 public const int CLASS = 52;
112
113 public const int RETURN = 53;
114
115 public const int IF = 54;
116
117 public const int ELSE = 55;
118
119 public const int SWITCH = 56;
120
121 public const int CASE = 57;
122
123 public const int DEFAULT = 58;
124
125 public const int WHILE = 59;
126
127 public const int DO = 60;
128
129 public const int FOR = 61;
130
131 public const int BREAK = 62;
132
133 public const int CONTINUE = 63;
134
135 public const int GOTO = 64;
136
137 public const int TYPEDEF = 65;
138
139 public const int TYPENAME = 66;
140
141 public const int TYPEID = 67;
142
143 public const int CONST = 68;
144
145 public const int CONSTEXPR = 69;
146
147 public const int NULLLIT = 70;
148
149 public const int THIS = 71;
150
151 public const int BASE = 72;
152
153 public const int CONSTRUCT = 73;
154
155 public const int DESTROY = 74;
156
157 public const int NEW = 75;
158
159 public const int DELETE = 76;
160
161 public const int SIZEOF = 77;
162
163 public const int TRY = 78;
164
165 public const int CATCH = 79;
166
167 public const int THROW = 80;
168
169 public const int CONCEPT = 81;
170
171 public const int WHERE = 82;
172
173 public const int AXIOM = 83;
174
175 public const int AND = 84;
176
177 public const int OR = 85;
178
179 public const int EXCLAMATION = 86;
180
181 public const int UNIT_TEST = 87;
182
183 public const int ID = 88;
184
185 public const int FLOATINGLIT = 89;
186
187 public const int INTLIT = 90;
188
189 public const int CHARLIT = 91;
190
191 public const int STRINGLIT = 92;
192
193 public const int EQUIVALENCE = 93;
194
195 public const int IMPLICATION = 94;
196
197 public const int DISJUNCTION = 95;
198
199 public const int AMPAMP = 96;
200
201 public const int BITOR = 97;
202
203 public const int BITXOR = 98;
204
205 public const int AMP = 99;
206
207 public const int EQ = 100;
208
209 public const int NEQ = 101;
210
211 public const int LEQ = 102;
212
213 public const int GEQ = 103;
214
215 public const int SHIFTLEFT = 104;
216
217 public const int SHIFTRIGHT = 105;
218
219 public const int PLUS = 106;
220
221 public const int MINUS = 107;
222
223 public const int STAR = 108;
224
225 public const int DIV = 109;
226
227 public const int REM = 110;
228
229 public const int PLUSPLUS = 111;
230
231 public const int MINUSMINUS = 112;
232
233 public const int CPL = 113;
234
235 public const int DOT = 114;
236
237 public const int ARROW = 115;
238
239 public const int LBRACKET = 116;
240
241 public const int RBRACKET = 117;
242
243 public const int LPAREN = 118;
244
245 public const int RPAREN = 119;
246
247 public const int LANGLE = 120;
248
249 public const int RANGLE = 121;
250
251 public const int LBRACE = 122;
252
253 public const int RBRACE = 123;
254
255 public const int COMMA = 124;
256
257 public const int ASSIGN = 125;
258
259 public const int COLON = 126;
260
261 public const int SEMICOLON = 127;
262
263 public const int HASH = 128;
264
265 internal class TokenMap
266 {
267 static TokenMap() :
268 instance(new TokenMap())
269 {
270 }
271 public static TokenMap& Instance()
272 {
273 return *instance;
274 }
275 public int GetTokenId(const ustring& tokenName)
276 {
277 System.Collections.Map<ustring, int>.ConstIterator it = tokenIdMap.CFind(tokenName);
278 if (it != tokenIdMap.CEnd())
279 {
280 return it->second;
281 }
282 else
283 {
284 return -1;
285 }
286 }
287 public ustring GetTokenName(int tokenId)
288 {
289 return tokenNameList[tokenId];
290 }
291 public ustring GetTokenInfo(int tokenId)
292 {
293 return tokenInfoList[tokenId];
294 }
295 private TokenMap()
296 {
297 tokenIdMap[u"ABSTRACT"] = 48;
298 tokenIdMap[u"ACTIONS"] = 7;
299 tokenIdMap[u"AMP"] = 99;
300 tokenIdMap[u"AMPAMP"] = 96;
301 tokenIdMap[u"AND"] = 84;
302 tokenIdMap[u"ARROW"] = 115;
303 tokenIdMap[u"AS"] = 36;
304 tokenIdMap[u"ASSERT"] = 9;
305 tokenIdMap[u"ASSIGN"] = 125;
306 tokenIdMap[u"AXIOM"] = 83;
307 tokenIdMap[u"BASE"] = 72;
308 tokenIdMap[u"BITOR"] = 97;
309 tokenIdMap[u"BITXOR"] = 98;
310 tokenIdMap[u"BOOL"] = 12;
311 tokenIdMap[u"BREAK"] = 62;
312 tokenIdMap[u"BYTE"] = 16;
313 tokenIdMap[u"CASE"] = 57;
314 tokenIdMap[u"CAST"] = 30;
315 tokenIdMap[u"CATCH"] = 79;
316 tokenIdMap[u"CDECL"] = 41;
317 tokenIdMap[u"CHAR"] = 25;
318 tokenIdMap[u"CHARLIT"] = 91;
319 tokenIdMap[u"CLASS"] = 52;
320 tokenIdMap[u"CLASSMAP"] = 1;
321 tokenIdMap[u"COLON"] = 126;
322 tokenIdMap[u"COMMA"] = 124;
323 tokenIdMap[u"CONCEPT"] = 81;
324 tokenIdMap[u"CONST"] = 68;
325 tokenIdMap[u"CONSTEXPR"] = 69;
326 tokenIdMap[u"CONSTRUCT"] = 73;
327 tokenIdMap[u"CONTINUE"] = 63;
328 tokenIdMap[u"CPL"] = 113;
329 tokenIdMap[u"DEFAULT"] = 58;
330 tokenIdMap[u"DELEGATE"] = 39;
331 tokenIdMap[u"DELETE"] = 76;
332 tokenIdMap[u"DESTROY"] = 74;
333 tokenIdMap[u"DISJUNCTION"] = 95;
334 tokenIdMap[u"DIV"] = 109;
335 tokenIdMap[u"DO"] = 60;
336 tokenIdMap[u"DOLLAR"] = 8;
337 tokenIdMap[u"DOT"] = 114;
338 tokenIdMap[u"DOUBLE"] = 24;
339 tokenIdMap[u"ELIF"] = 10;
340 tokenIdMap[u"ELSE"] = 55;
341 tokenIdMap[u"ENDIF"] = 11;
342 tokenIdMap[u"ENUM"] = 29;
343 tokenIdMap[u"EQ"] = 100;
344 tokenIdMap[u"EQUIVALENCE"] = 93;
345 tokenIdMap[u"EXCLAMATION"] = 86;
346 tokenIdMap[u"EXPLICIT"] = 38;
347 tokenIdMap[u"EXPRESSIONS"] = 4;
348 tokenIdMap[u"EXTERN"] = 35;
349 tokenIdMap[u"FALSE"] = 14;
350 tokenIdMap[u"FLOAT"] = 23;
351 tokenIdMap[u"FLOATINGLIT"] = 89;
352 tokenIdMap[u"FOR"] = 61;
353 tokenIdMap[u"GEQ"] = 103;
354 tokenIdMap[u"GOTO"] = 64;
355 tokenIdMap[u"HASH"] = 128;
356 tokenIdMap[u"ID"] = 88;
357 tokenIdMap[u"IF"] = 54;
358 tokenIdMap[u"IMPLICATION"] = 94;
359 tokenIdMap[u"INLINE"] = 40;
360 tokenIdMap[u"INT"] = 19;
361 tokenIdMap[u"INTERFACE"] = 31;
362 tokenIdMap[u"INTERNAL"] = 46;
363 tokenIdMap[u"INTLIT"] = 90;
364 tokenIdMap[u"IS"] = 37;
365 tokenIdMap[u"KEYWORDS"] = 3;
366 tokenIdMap[u"LANGLE"] = 120;
367 tokenIdMap[u"LBRACE"] = 122;
368 tokenIdMap[u"LBRACKET"] = 116;
369 tokenIdMap[u"LEQ"] = 102;
370 tokenIdMap[u"LEXER"] = 5;
371 tokenIdMap[u"LONG"] = 21;
372 tokenIdMap[u"LPAREN"] = 118;
373 tokenIdMap[u"MINUS"] = 107;
374 tokenIdMap[u"MINUSMINUS"] = 112;
375 tokenIdMap[u"NAMESPACE"] = 32;
376 tokenIdMap[u"NEQ"] = 101;
377 tokenIdMap[u"NEW"] = 75;
378 tokenIdMap[u"NOTHROW"] = 42;
379 tokenIdMap[u"NULLLIT"] = 70;
380 tokenIdMap[u"OPERATOR"] = 51;
381 tokenIdMap[u"OR"] = 85;
382 tokenIdMap[u"OVERRIDE"] = 49;
383 tokenIdMap[u"PLUS"] = 106;
384 tokenIdMap[u"PLUSPLUS"] = 111;
385 tokenIdMap[u"PRIVATE"] = 45;
386 tokenIdMap[u"PROTECTED"] = 44;
387 tokenIdMap[u"PUBLIC"] = 43;
388 tokenIdMap[u"RANGLE"] = 121;
389 tokenIdMap[u"RBRACE"] = 123;
390 tokenIdMap[u"RBRACKET"] = 117;
391 tokenIdMap[u"REM"] = 110;
392 tokenIdMap[u"RETURN"] = 53;
393 tokenIdMap[u"RPAREN"] = 119;
394 tokenIdMap[u"SBYTE"] = 15;
395 tokenIdMap[u"SEMICOLON"] = 127;
396 tokenIdMap[u"SHIFTLEFT"] = 104;
397 tokenIdMap[u"SHIFTRIGHT"] = 105;
398 tokenIdMap[u"SHORT"] = 17;
399 tokenIdMap[u"SIZEOF"] = 77;
400 tokenIdMap[u"STAR"] = 108;
401 tokenIdMap[u"STATIC"] = 34;
402 tokenIdMap[u"STRINGLIT"] = 92;
403 tokenIdMap[u"SUPPRESS"] = 50;
404 tokenIdMap[u"SWITCH"] = 56;
405 tokenIdMap[u"THIS"] = 71;
406 tokenIdMap[u"THROW"] = 80;
407 tokenIdMap[u"TOKENS"] = 2;
408 tokenIdMap[u"TRUE"] = 13;
409 tokenIdMap[u"TRY"] = 78;
410 tokenIdMap[u"TYPEDEF"] = 65;
411 tokenIdMap[u"TYPEID"] = 67;
412 tokenIdMap[u"TYPENAME"] = 66;
413 tokenIdMap[u"UCHAR"] = 27;
414 tokenIdMap[u"UINT"] = 20;
415 tokenIdMap[u"ULONG"] = 22;
416 tokenIdMap[u"UNIT_TEST"] = 87;
417 tokenIdMap[u"USHORT"] = 18;
418 tokenIdMap[u"USING"] = 33;
419 tokenIdMap[u"VARIABLES"] = 6;
420 tokenIdMap[u"VIRTUAL"] = 47;
421 tokenIdMap[u"VOID"] = 28;
422 tokenIdMap[u"WCHAR"] = 26;
423 tokenIdMap[u"WHERE"] = 82;
424 tokenIdMap[u"WHILE"] = 59;
425 tokenNameList.Add(u"END");
426 tokenInfoList.Add(u"end of file");
427 tokenNameList.Add(u"CLASSMAP");
428 tokenInfoList.Add(u"'classmap'");
429 tokenNameList.Add(u"TOKENS");
430 tokenInfoList.Add(u"'tokens'");
431 tokenNameList.Add(u"KEYWORDS");
432 tokenInfoList.Add(u"'keywords'");
433 tokenNameList.Add(u"EXPRESSIONS");
434 tokenInfoList.Add(u"'expressions'");
435 tokenNameList.Add(u"LEXER");
436 tokenInfoList.Add(u"'lexer'");
437 tokenNameList.Add(u"VARIABLES");
438 tokenInfoList.Add(u"''variables'");
439 tokenNameList.Add(u"ACTIONS");
440 tokenInfoList.Add(u"'actions'");
441 tokenNameList.Add(u"DOLLAR");
442 tokenInfoList.Add(u"'$'");
443 tokenNameList.Add(u"ASSERT");
444 tokenInfoList.Add(u"'assert'");
445 tokenNameList.Add(u"ELIF");
446 tokenInfoList.Add(u"'elif'");
447 tokenNameList.Add(u"ENDIF");
448 tokenInfoList.Add(u"'endif'");
449 tokenNameList.Add(u"BOOL");
450 tokenInfoList.Add(u"'bool'");
451 tokenNameList.Add(u"TRUE");
452 tokenInfoList.Add(u"'true'");
453 tokenNameList.Add(u"FALSE");
454 tokenInfoList.Add(u"'false'");
455 tokenNameList.Add(u"SBYTE");
456 tokenInfoList.Add(u"'sbyte'");
457 tokenNameList.Add(u"BYTE");
458 tokenInfoList.Add(u"'byte'");
459 tokenNameList.Add(u"SHORT");
460 tokenInfoList.Add(u"'short'");
461 tokenNameList.Add(u"USHORT");
462 tokenInfoList.Add(u"'ushort'");
463 tokenNameList.Add(u"INT");
464 tokenInfoList.Add(u"'int'");
465 tokenNameList.Add(u"UINT");
466 tokenInfoList.Add(u"'uint'");
467 tokenNameList.Add(u"LONG");
468 tokenInfoList.Add(u"'long'");
469 tokenNameList.Add(u"ULONG");
470 tokenInfoList.Add(u"'ulong'");
471 tokenNameList.Add(u"FLOAT");
472 tokenInfoList.Add(u"'float'");
473 tokenNameList.Add(u"DOUBLE");
474 tokenInfoList.Add(u"'double'");
475 tokenNameList.Add(u"CHAR");
476 tokenInfoList.Add(u"'char'");
477 tokenNameList.Add(u"WCHAR");
478 tokenInfoList.Add(u"'wchar'");
479 tokenNameList.Add(u"UCHAR");
480 tokenInfoList.Add(u"'uchar'");
481 tokenNameList.Add(u"VOID");
482 tokenInfoList.Add(u"'void'");
483 tokenNameList.Add(u"ENUM");
484 tokenInfoList.Add(u"'enum'");
485 tokenNameList.Add(u"CAST");
486 tokenInfoList.Add(u"'cast'");
487 tokenNameList.Add(u"INTERFACE");
488 tokenInfoList.Add(u"'interface'");
489 tokenNameList.Add(u"NAMESPACE");
490 tokenInfoList.Add(u"'namespace'");
491 tokenNameList.Add(u"USING");
492 tokenInfoList.Add(u"'using'");
493 tokenNameList.Add(u"STATIC");
494 tokenInfoList.Add(u"'static'");
495 tokenNameList.Add(u"EXTERN");
496 tokenInfoList.Add(u"'extern'");
497 tokenNameList.Add(u"AS");
498 tokenInfoList.Add(u"'as'");
499 tokenNameList.Add(u"IS");
500 tokenInfoList.Add(u"'is'");
501 tokenNameList.Add(u"EXPLICIT");
502 tokenInfoList.Add(u"'explicit'");
503 tokenNameList.Add(u"DELEGATE");
504 tokenInfoList.Add(u"'delegate'");
505 tokenNameList.Add(u"INLINE");
506 tokenInfoList.Add(u"'inline'");
507 tokenNameList.Add(u"CDECL");
508 tokenInfoList.Add(u"'cdecl'");
509 tokenNameList.Add(u"NOTHROW");
510 tokenInfoList.Add(u"'nothrow'");
511 tokenNameList.Add(u"PUBLIC");
512 tokenInfoList.Add(u"'public'");
513 tokenNameList.Add(u"PROTECTED");
514 tokenInfoList.Add(u"'protected'");
515 tokenNameList.Add(u"PRIVATE");
516 tokenInfoList.Add(u"'private'");
517 tokenNameList.Add(u"INTERNAL");
518 tokenInfoList.Add(u"'internal'");
519 tokenNameList.Add(u"VIRTUAL");
520 tokenInfoList.Add(u"'virtual'");
521 tokenNameList.Add(u"ABSTRACT");
522 tokenInfoList.Add(u"'abstract'");
523 tokenNameList.Add(u"OVERRIDE");
524 tokenInfoList.Add(u"'override'");
525 tokenNameList.Add(u"SUPPRESS");
526 tokenInfoList.Add(u"'suppress'");
527 tokenNameList.Add(u"OPERATOR");
528 tokenInfoList.Add(u"'operator'");
529 tokenNameList.Add(u"CLASS");
530 tokenInfoList.Add(u"'class'");
531 tokenNameList.Add(u"RETURN");
532 tokenInfoList.Add(u"'return'");
533 tokenNameList.Add(u"IF");
534 tokenInfoList.Add(u"'if'");
535 tokenNameList.Add(u"ELSE");
536 tokenInfoList.Add(u"'else'");
537 tokenNameList.Add(u"SWITCH");
538 tokenInfoList.Add(u"'switch'");
539 tokenNameList.Add(u"CASE");
540 tokenInfoList.Add(u"'case'");
541 tokenNameList.Add(u"DEFAULT");
542 tokenInfoList.Add(u"'default'");
543 tokenNameList.Add(u"WHILE");
544 tokenInfoList.Add(u"'while'");
545 tokenNameList.Add(u"DO");
546 tokenInfoList.Add(u"'do'");
547 tokenNameList.Add(u"FOR");
548 tokenInfoList.Add(u"'for'");
549 tokenNameList.Add(u"BREAK");
550 tokenInfoList.Add(u"'break'");
551 tokenNameList.Add(u"CONTINUE");
552 tokenInfoList.Add(u"'continue'");
553 tokenNameList.Add(u"GOTO");
554 tokenInfoList.Add(u"'goto'");
555 tokenNameList.Add(u"TYPEDEF");
556 tokenInfoList.Add(u"'typedef'");
557 tokenNameList.Add(u"TYPENAME");
558 tokenInfoList.Add(u"'typename'");
559 tokenNameList.Add(u"TYPEID");
560 tokenInfoList.Add(u"'typeid'");
561 tokenNameList.Add(u"CONST");
562 tokenInfoList.Add(u"'const'");
563 tokenNameList.Add(u"CONSTEXPR");
564 tokenInfoList.Add(u"'constexpr'");
565 tokenNameList.Add(u"NULLLIT");
566 tokenInfoList.Add(u"'null'");
567 tokenNameList.Add(u"THIS");
568 tokenInfoList.Add(u"'this'");
569 tokenNameList.Add(u"BASE");
570 tokenInfoList.Add(u"'base'");
571 tokenNameList.Add(u"CONSTRUCT");
572 tokenInfoList.Add(u"'construct'");
573 tokenNameList.Add(u"DESTROY");
574 tokenInfoList.Add(u"'destroy'");
575 tokenNameList.Add(u"NEW");
576 tokenInfoList.Add(u"'new'");
577 tokenNameList.Add(u"DELETE");
578 tokenInfoList.Add(u"'delete'");
579 tokenNameList.Add(u"SIZEOF");
580 tokenInfoList.Add(u"'sizeof'");
581 tokenNameList.Add(u"TRY");
582 tokenInfoList.Add(u"'try'");
583 tokenNameList.Add(u"CATCH");
584 tokenInfoList.Add(u"'catch'");
585 tokenNameList.Add(u"THROW");
586 tokenInfoList.Add(u"'throw'");
587 tokenNameList.Add(u"CONCEPT");
588 tokenInfoList.Add(u"'concept'");
589 tokenNameList.Add(u"WHERE");
590 tokenInfoList.Add(u"'where'");
591 tokenNameList.Add(u"AXIOM");
592 tokenInfoList.Add(u"'axiom'");
593 tokenNameList.Add(u"AND");
594 tokenInfoList.Add(u"'and'");
595 tokenNameList.Add(u"OR");
596 tokenInfoList.Add(u"'or'");
597 tokenNameList.Add(u"EXCLAMATION");
598 tokenInfoList.Add(u"'!'");
599 tokenNameList.Add(u"UNIT_TEST");
600 tokenInfoList.Add(u"'unit_test'");
601 tokenNameList.Add(u"ID");
602 tokenInfoList.Add(u"identifier");
603 tokenNameList.Add(u"FLOATINGLIT");
604 tokenInfoList.Add(u"floating literal");
605 tokenNameList.Add(u"INTLIT");
606 tokenInfoList.Add(u"integer literal");
607 tokenNameList.Add(u"CHARLIT");
608 tokenInfoList.Add(u"character literal");
609 tokenNameList.Add(u"STRINGLIT");
610 tokenInfoList.Add(u"string literal");
611 tokenNameList.Add(u"EQUIVALENCE");
612 tokenInfoList.Add(u"'<=>'");
613 tokenNameList.Add(u"IMPLICATION");
614 tokenInfoList.Add(u"'=>'");
615 tokenNameList.Add(u"DISJUNCTION");
616 tokenInfoList.Add(u"'||'");
617 tokenNameList.Add(u"AMPAMP");
618 tokenInfoList.Add(u"'&&'");
619 tokenNameList.Add(u"BITOR");
620 tokenInfoList.Add(u"'|'");
621 tokenNameList.Add(u"BITXOR");
622 tokenInfoList.Add(u"'^'");
623 tokenNameList.Add(u"AMP");
624 tokenInfoList.Add(u"'&'");
625 tokenNameList.Add(u"EQ");
626 tokenInfoList.Add(u"'=='");
627 tokenNameList.Add(u"NEQ");
628 tokenInfoList.Add(u"'!='");
629 tokenNameList.Add(u"LEQ");
630 tokenInfoList.Add(u"'<='");
631 tokenNameList.Add(u"GEQ");
632 tokenInfoList.Add(u"'>='");
633 tokenNameList.Add(u"SHIFTLEFT");
634 tokenInfoList.Add(u"'<<'");
635 tokenNameList.Add(u"SHIFTRIGHT");
636 tokenInfoList.Add(u"'>>'");
637 tokenNameList.Add(u"PLUS");
638 tokenInfoList.Add(u"'+'");
639 tokenNameList.Add(u"MINUS");
640 tokenInfoList.Add(u"'-'");
641 tokenNameList.Add(u"STAR");
642 tokenInfoList.Add(u"'*'");
643 tokenNameList.Add(u"DIV");
644 tokenInfoList.Add(u"'/'");
645 tokenNameList.Add(u"REM");
646 tokenInfoList.Add(u"'%'");
647 tokenNameList.Add(u"PLUSPLUS");
648 tokenInfoList.Add(u"'++'");
649 tokenNameList.Add(u"MINUSMINUS");
650 tokenInfoList.Add(u"'--'");
651 tokenNameList.Add(u"CPL");
652 tokenInfoList.Add(u"'~'");
653 tokenNameList.Add(u"DOT");
654 tokenInfoList.Add(u"'.'");
655 tokenNameList.Add(u"ARROW");
656 tokenInfoList.Add(u"'->'");
657 tokenNameList.Add(u"LBRACKET");
658 tokenInfoList.Add(u"'['");
659 tokenNameList.Add(u"RBRACKET");
660 tokenInfoList.Add(u"']'");
661 tokenNameList.Add(u"LPAREN");
662 tokenInfoList.Add(u"'('");
663 tokenNameList.Add(u"RPAREN");
664 tokenInfoList.Add(u"')'");
665 tokenNameList.Add(u"LANGLE");
666 tokenInfoList.Add(u"'<'");
667 tokenNameList.Add(u"RANGLE");
668 tokenInfoList.Add(u"'>'");
669 tokenNameList.Add(u"LBRACE");
670 tokenInfoList.Add(u"'{'");
671 tokenNameList.Add(u"RBRACE");
672 tokenInfoList.Add(u"'}'");
673 tokenNameList.Add(u"COMMA");
674 tokenInfoList.Add(u"','");
675 tokenNameList.Add(u"ASSIGN");
676 tokenInfoList.Add(u"'='");
677 tokenNameList.Add(u"COLON");
678 tokenInfoList.Add(u"':'");
679 tokenNameList.Add(u"SEMICOLON");
680 tokenInfoList.Add(u"';'");
681 tokenNameList.Add(u"HASH");
682 tokenInfoList.Add(u"'#'");
683 }
684 private static System.UniquePtr<TokenMap> instance;
685 private System.Collections.Map<ustring, int> tokenIdMap;
686 private System.Collections.List<ustring> tokenNameList;
687 private System.Collections.List<ustring> tokenInfoList;
688 }
689 public int GetTokenId(const ustring& tokenName)
690 {
691 return TokenMap.Instance().GetTokenId(tokenName);
692 }
693
694 public ustring GetTokenName(int tokenId)
695 {
696 return TokenMap.Instance().GetTokenName(tokenId);
697 }
698
699 public ustring GetTokenInfo(int tokenId)
700 {
701 return TokenMap.Instance().GetTokenInfo(tokenId);
702 }
703 }