1 using System;
2
3
4
5 namespace ParserFileTokens
6 {
7 public const int END = 0;
8
9 public const int PARSER = 1;
10
11 public const int MAIN = 2;
12
13 public const int USELEXER = 3;
14
15 public const int RULEINFO = 4;
16
17 public const int EMPTY = 5;
18
19 public const int ANY = 6;
20
21 public const int VAR = 7;
22
23 public const int PRODUCES = 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 public const int QUEST = 129;
266
267 internal class TokenMap
268 {
269 static TokenMap() :
270 instance(new TokenMap())
271 {
272 }
273 public static TokenMap& Instance()
274 {
275 return *instance;
276 }
277 public int GetTokenId(const ustring& tokenName)
278 {
279 System.Collections.Map<ustring, int>.ConstIterator it = tokenIdMap.CFind(tokenName);
280 if (it != tokenIdMap.CEnd())
281 {
282 return it->second;
283 }
284 else
285 {
286 return -1;
287 }
288 }
289 public ustring GetTokenName(int tokenId)
290 {
291 return tokenNameList[tokenId];
292 }
293 public ustring GetTokenInfo(int tokenId)
294 {
295 return tokenInfoList[tokenId];
296 }
297 private TokenMap()
298 {
299 tokenIdMap[u"ABSTRACT"] = 48;
300 tokenIdMap[u"AMP"] = 99;
301 tokenIdMap[u"AMPAMP"] = 96;
302 tokenIdMap[u"AND"] = 84;
303 tokenIdMap[u"ANY"] = 6;
304 tokenIdMap[u"ARROW"] = 115;
305 tokenIdMap[u"AS"] = 36;
306 tokenIdMap[u"ASSERT"] = 9;
307 tokenIdMap[u"ASSIGN"] = 125;
308 tokenIdMap[u"AXIOM"] = 83;
309 tokenIdMap[u"BASE"] = 72;
310 tokenIdMap[u"BITOR"] = 97;
311 tokenIdMap[u"BITXOR"] = 98;
312 tokenIdMap[u"BOOL"] = 12;
313 tokenIdMap[u"BREAK"] = 62;
314 tokenIdMap[u"BYTE"] = 16;
315 tokenIdMap[u"CASE"] = 57;
316 tokenIdMap[u"CAST"] = 30;
317 tokenIdMap[u"CATCH"] = 79;
318 tokenIdMap[u"CDECL"] = 41;
319 tokenIdMap[u"CHAR"] = 25;
320 tokenIdMap[u"CHARLIT"] = 91;
321 tokenIdMap[u"CLASS"] = 52;
322 tokenIdMap[u"COLON"] = 126;
323 tokenIdMap[u"COMMA"] = 124;
324 tokenIdMap[u"CONCEPT"] = 81;
325 tokenIdMap[u"CONST"] = 68;
326 tokenIdMap[u"CONSTEXPR"] = 69;
327 tokenIdMap[u"CONSTRUCT"] = 73;
328 tokenIdMap[u"CONTINUE"] = 63;
329 tokenIdMap[u"CPL"] = 113;
330 tokenIdMap[u"DEFAULT"] = 58;
331 tokenIdMap[u"DELEGATE"] = 39;
332 tokenIdMap[u"DELETE"] = 76;
333 tokenIdMap[u"DESTROY"] = 74;
334 tokenIdMap[u"DISJUNCTION"] = 95;
335 tokenIdMap[u"DIV"] = 109;
336 tokenIdMap[u"DO"] = 60;
337 tokenIdMap[u"DOT"] = 114;
338 tokenIdMap[u"DOUBLE"] = 24;
339 tokenIdMap[u"ELIF"] = 10;
340 tokenIdMap[u"ELSE"] = 55;
341 tokenIdMap[u"EMPTY"] = 5;
342 tokenIdMap[u"ENDIF"] = 11;
343 tokenIdMap[u"ENUM"] = 29;
344 tokenIdMap[u"EQ"] = 100;
345 tokenIdMap[u"EQUIVALENCE"] = 93;
346 tokenIdMap[u"EXCLAMATION"] = 86;
347 tokenIdMap[u"EXPLICIT"] = 38;
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"LANGLE"] = 120;
366 tokenIdMap[u"LBRACE"] = 122;
367 tokenIdMap[u"LBRACKET"] = 116;
368 tokenIdMap[u"LEQ"] = 102;
369 tokenIdMap[u"LONG"] = 21;
370 tokenIdMap[u"LPAREN"] = 118;
371 tokenIdMap[u"MAIN"] = 2;
372 tokenIdMap[u"MINUS"] = 107;
373 tokenIdMap[u"MINUSMINUS"] = 112;
374 tokenIdMap[u"NAMESPACE"] = 32;
375 tokenIdMap[u"NEQ"] = 101;
376 tokenIdMap[u"NEW"] = 75;
377 tokenIdMap[u"NOTHROW"] = 42;
378 tokenIdMap[u"NULLLIT"] = 70;
379 tokenIdMap[u"OPERATOR"] = 51;
380 tokenIdMap[u"OR"] = 85;
381 tokenIdMap[u"OVERRIDE"] = 49;
382 tokenIdMap[u"PARSER"] = 1;
383 tokenIdMap[u"PLUS"] = 106;
384 tokenIdMap[u"PLUSPLUS"] = 111;
385 tokenIdMap[u"PRIVATE"] = 45;
386 tokenIdMap[u"PRODUCES"] = 8;
387 tokenIdMap[u"PROTECTED"] = 44;
388 tokenIdMap[u"PUBLIC"] = 43;
389 tokenIdMap[u"QUEST"] = 129;
390 tokenIdMap[u"RANGLE"] = 121;
391 tokenIdMap[u"RBRACE"] = 123;
392 tokenIdMap[u"RBRACKET"] = 117;
393 tokenIdMap[u"REM"] = 110;
394 tokenIdMap[u"RETURN"] = 53;
395 tokenIdMap[u"RPAREN"] = 119;
396 tokenIdMap[u"RULEINFO"] = 4;
397 tokenIdMap[u"SBYTE"] = 15;
398 tokenIdMap[u"SEMICOLON"] = 127;
399 tokenIdMap[u"SHIFTLEFT"] = 104;
400 tokenIdMap[u"SHIFTRIGHT"] = 105;
401 tokenIdMap[u"SHORT"] = 17;
402 tokenIdMap[u"SIZEOF"] = 77;
403 tokenIdMap[u"STAR"] = 108;
404 tokenIdMap[u"STATIC"] = 34;
405 tokenIdMap[u"STRINGLIT"] = 92;
406 tokenIdMap[u"SUPPRESS"] = 50;
407 tokenIdMap[u"SWITCH"] = 56;
408 tokenIdMap[u"THIS"] = 71;
409 tokenIdMap[u"THROW"] = 80;
410 tokenIdMap[u"TRUE"] = 13;
411 tokenIdMap[u"TRY"] = 78;
412 tokenIdMap[u"TYPEDEF"] = 65;
413 tokenIdMap[u"TYPEID"] = 67;
414 tokenIdMap[u"TYPENAME"] = 66;
415 tokenIdMap[u"UCHAR"] = 27;
416 tokenIdMap[u"UINT"] = 20;
417 tokenIdMap[u"ULONG"] = 22;
418 tokenIdMap[u"UNIT_TEST"] = 87;
419 tokenIdMap[u"USELEXER"] = 3;
420 tokenIdMap[u"USHORT"] = 18;
421 tokenIdMap[u"USING"] = 33;
422 tokenIdMap[u"VAR"] = 7;
423 tokenIdMap[u"VIRTUAL"] = 47;
424 tokenIdMap[u"VOID"] = 28;
425 tokenIdMap[u"WCHAR"] = 26;
426 tokenIdMap[u"WHERE"] = 82;
427 tokenIdMap[u"WHILE"] = 59;
428 tokenNameList.Add(u"END");
429 tokenInfoList.Add(u"end of file");
430 tokenNameList.Add(u"PARSER");
431 tokenInfoList.Add(u"'parser'");
432 tokenNameList.Add(u"MAIN");
433 tokenInfoList.Add(u"'main'");
434 tokenNameList.Add(u"USELEXER");
435 tokenInfoList.Add(u"'uselexer'");
436 tokenNameList.Add(u"RULEINFO");
437 tokenInfoList.Add(u"'ruleinfo'");
438 tokenNameList.Add(u"EMPTY");
439 tokenInfoList.Add(u"'empty'");
440 tokenNameList.Add(u"ANY");
441 tokenInfoList.Add(u"'any'");
442 tokenNameList.Add(u"VAR");
443 tokenInfoList.Add(u"'var'");
444 tokenNameList.Add(u"PRODUCES");
445 tokenInfoList.Add(u"'::='");
446 tokenNameList.Add(u"ASSERT");
447 tokenInfoList.Add(u"'assert'");
448 tokenNameList.Add(u"ELIF");
449 tokenInfoList.Add(u"'elif'");
450 tokenNameList.Add(u"ENDIF");
451 tokenInfoList.Add(u"'endif'");
452 tokenNameList.Add(u"BOOL");
453 tokenInfoList.Add(u"'bool'");
454 tokenNameList.Add(u"TRUE");
455 tokenInfoList.Add(u"'true'");
456 tokenNameList.Add(u"FALSE");
457 tokenInfoList.Add(u"'false'");
458 tokenNameList.Add(u"SBYTE");
459 tokenInfoList.Add(u"'sbyte'");
460 tokenNameList.Add(u"BYTE");
461 tokenInfoList.Add(u"'byte'");
462 tokenNameList.Add(u"SHORT");
463 tokenInfoList.Add(u"'short'");
464 tokenNameList.Add(u"USHORT");
465 tokenInfoList.Add(u"'ushort'");
466 tokenNameList.Add(u"INT");
467 tokenInfoList.Add(u"'int'");
468 tokenNameList.Add(u"UINT");
469 tokenInfoList.Add(u"'uint'");
470 tokenNameList.Add(u"LONG");
471 tokenInfoList.Add(u"'long'");
472 tokenNameList.Add(u"ULONG");
473 tokenInfoList.Add(u"'ulong'");
474 tokenNameList.Add(u"FLOAT");
475 tokenInfoList.Add(u"'float'");
476 tokenNameList.Add(u"DOUBLE");
477 tokenInfoList.Add(u"'double'");
478 tokenNameList.Add(u"CHAR");
479 tokenInfoList.Add(u"'char'");
480 tokenNameList.Add(u"WCHAR");
481 tokenInfoList.Add(u"'wchar'");
482 tokenNameList.Add(u"UCHAR");
483 tokenInfoList.Add(u"'uchar'");
484 tokenNameList.Add(u"VOID");
485 tokenInfoList.Add(u"'void'");
486 tokenNameList.Add(u"ENUM");
487 tokenInfoList.Add(u"'enum'");
488 tokenNameList.Add(u"CAST");
489 tokenInfoList.Add(u"'cast'");
490 tokenNameList.Add(u"INTERFACE");
491 tokenInfoList.Add(u"'interface'");
492 tokenNameList.Add(u"NAMESPACE");
493 tokenInfoList.Add(u"'namespace'");
494 tokenNameList.Add(u"USING");
495 tokenInfoList.Add(u"'using'");
496 tokenNameList.Add(u"STATIC");
497 tokenInfoList.Add(u"'static'");
498 tokenNameList.Add(u"EXTERN");
499 tokenInfoList.Add(u"'extern'");
500 tokenNameList.Add(u"AS");
501 tokenInfoList.Add(u"'as'");
502 tokenNameList.Add(u"IS");
503 tokenInfoList.Add(u"'is'");
504 tokenNameList.Add(u"EXPLICIT");
505 tokenInfoList.Add(u"'explicit'");
506 tokenNameList.Add(u"DELEGATE");
507 tokenInfoList.Add(u"'delegate'");
508 tokenNameList.Add(u"INLINE");
509 tokenInfoList.Add(u"'inline'");
510 tokenNameList.Add(u"CDECL");
511 tokenInfoList.Add(u"'cdecl'");
512 tokenNameList.Add(u"NOTHROW");
513 tokenInfoList.Add(u"'nothrow'");
514 tokenNameList.Add(u"PUBLIC");
515 tokenInfoList.Add(u"'public'");
516 tokenNameList.Add(u"PROTECTED");
517 tokenInfoList.Add(u"'protected'");
518 tokenNameList.Add(u"PRIVATE");
519 tokenInfoList.Add(u"'private'");
520 tokenNameList.Add(u"INTERNAL");
521 tokenInfoList.Add(u"'internal'");
522 tokenNameList.Add(u"VIRTUAL");
523 tokenInfoList.Add(u"'virtual'");
524 tokenNameList.Add(u"ABSTRACT");
525 tokenInfoList.Add(u"'abstract'");
526 tokenNameList.Add(u"OVERRIDE");
527 tokenInfoList.Add(u"'override'");
528 tokenNameList.Add(u"SUPPRESS");
529 tokenInfoList.Add(u"'suppress'");
530 tokenNameList.Add(u"OPERATOR");
531 tokenInfoList.Add(u"'operator'");
532 tokenNameList.Add(u"CLASS");
533 tokenInfoList.Add(u"'class'");
534 tokenNameList.Add(u"RETURN");
535 tokenInfoList.Add(u"'return'");
536 tokenNameList.Add(u"IF");
537 tokenInfoList.Add(u"'if'");
538 tokenNameList.Add(u"ELSE");
539 tokenInfoList.Add(u"'else'");
540 tokenNameList.Add(u"SWITCH");
541 tokenInfoList.Add(u"'switch'");
542 tokenNameList.Add(u"CASE");
543 tokenInfoList.Add(u"'case'");
544 tokenNameList.Add(u"DEFAULT");
545 tokenInfoList.Add(u"'default'");
546 tokenNameList.Add(u"WHILE");
547 tokenInfoList.Add(u"'while'");
548 tokenNameList.Add(u"DO");
549 tokenInfoList.Add(u"'do'");
550 tokenNameList.Add(u"FOR");
551 tokenInfoList.Add(u"'for'");
552 tokenNameList.Add(u"BREAK");
553 tokenInfoList.Add(u"'break'");
554 tokenNameList.Add(u"CONTINUE");
555 tokenInfoList.Add(u"'continue'");
556 tokenNameList.Add(u"GOTO");
557 tokenInfoList.Add(u"'goto'");
558 tokenNameList.Add(u"TYPEDEF");
559 tokenInfoList.Add(u"'typedef'");
560 tokenNameList.Add(u"TYPENAME");
561 tokenInfoList.Add(u"'typename'");
562 tokenNameList.Add(u"TYPEID");
563 tokenInfoList.Add(u"'typeid'");
564 tokenNameList.Add(u"CONST");
565 tokenInfoList.Add(u"'const'");
566 tokenNameList.Add(u"CONSTEXPR");
567 tokenInfoList.Add(u"'constexpr'");
568 tokenNameList.Add(u"NULLLIT");
569 tokenInfoList.Add(u"'null'");
570 tokenNameList.Add(u"THIS");
571 tokenInfoList.Add(u"'this'");
572 tokenNameList.Add(u"BASE");
573 tokenInfoList.Add(u"'base'");
574 tokenNameList.Add(u"CONSTRUCT");
575 tokenInfoList.Add(u"'construct'");
576 tokenNameList.Add(u"DESTROY");
577 tokenInfoList.Add(u"'destroy'");
578 tokenNameList.Add(u"NEW");
579 tokenInfoList.Add(u"'new'");
580 tokenNameList.Add(u"DELETE");
581 tokenInfoList.Add(u"'delete'");
582 tokenNameList.Add(u"SIZEOF");
583 tokenInfoList.Add(u"'sizeof'");
584 tokenNameList.Add(u"TRY");
585 tokenInfoList.Add(u"'try'");
586 tokenNameList.Add(u"CATCH");
587 tokenInfoList.Add(u"'catch'");
588 tokenNameList.Add(u"THROW");
589 tokenInfoList.Add(u"'throw'");
590 tokenNameList.Add(u"CONCEPT");
591 tokenInfoList.Add(u"'concept'");
592 tokenNameList.Add(u"WHERE");
593 tokenInfoList.Add(u"'where'");
594 tokenNameList.Add(u"AXIOM");
595 tokenInfoList.Add(u"'axiom'");
596 tokenNameList.Add(u"AND");
597 tokenInfoList.Add(u"'and'");
598 tokenNameList.Add(u"OR");
599 tokenInfoList.Add(u"'or'");
600 tokenNameList.Add(u"EXCLAMATION");
601 tokenInfoList.Add(u"'!'");
602 tokenNameList.Add(u"UNIT_TEST");
603 tokenInfoList.Add(u"'unit_test'");
604 tokenNameList.Add(u"ID");
605 tokenInfoList.Add(u"identifier");
606 tokenNameList.Add(u"FLOATINGLIT");
607 tokenInfoList.Add(u"floating literal");
608 tokenNameList.Add(u"INTLIT");
609 tokenInfoList.Add(u"integer literal");
610 tokenNameList.Add(u"CHARLIT");
611 tokenInfoList.Add(u"character literal");
612 tokenNameList.Add(u"STRINGLIT");
613 tokenInfoList.Add(u"string literal");
614 tokenNameList.Add(u"EQUIVALENCE");
615 tokenInfoList.Add(u"'<=>'");
616 tokenNameList.Add(u"IMPLICATION");
617 tokenInfoList.Add(u"'=>'");
618 tokenNameList.Add(u"DISJUNCTION");
619 tokenInfoList.Add(u"'||'");
620 tokenNameList.Add(u"AMPAMP");
621 tokenInfoList.Add(u"'&&'");
622 tokenNameList.Add(u"BITOR");
623 tokenInfoList.Add(u"'|'");
624 tokenNameList.Add(u"BITXOR");
625 tokenInfoList.Add(u"'^'");
626 tokenNameList.Add(u"AMP");
627 tokenInfoList.Add(u"'&'");
628 tokenNameList.Add(u"EQ");
629 tokenInfoList.Add(u"'=='");
630 tokenNameList.Add(u"NEQ");
631 tokenInfoList.Add(u"'!='");
632 tokenNameList.Add(u"LEQ");
633 tokenInfoList.Add(u"'<='");
634 tokenNameList.Add(u"GEQ");
635 tokenInfoList.Add(u"'>='");
636 tokenNameList.Add(u"SHIFTLEFT");
637 tokenInfoList.Add(u"'<<'");
638 tokenNameList.Add(u"SHIFTRIGHT");
639 tokenInfoList.Add(u"'>>'");
640 tokenNameList.Add(u"PLUS");
641 tokenInfoList.Add(u"'+'");
642 tokenNameList.Add(u"MINUS");
643 tokenInfoList.Add(u"'-'");
644 tokenNameList.Add(u"STAR");
645 tokenInfoList.Add(u"'*'");
646 tokenNameList.Add(u"DIV");
647 tokenInfoList.Add(u"'/'");
648 tokenNameList.Add(u"REM");
649 tokenInfoList.Add(u"'%'");
650 tokenNameList.Add(u"PLUSPLUS");
651 tokenInfoList.Add(u"'++'");
652 tokenNameList.Add(u"MINUSMINUS");
653 tokenInfoList.Add(u"'--'");
654 tokenNameList.Add(u"CPL");
655 tokenInfoList.Add(u"'~'");
656 tokenNameList.Add(u"DOT");
657 tokenInfoList.Add(u"'.'");
658 tokenNameList.Add(u"ARROW");
659 tokenInfoList.Add(u"'->'");
660 tokenNameList.Add(u"LBRACKET");
661 tokenInfoList.Add(u"'['");
662 tokenNameList.Add(u"RBRACKET");
663 tokenInfoList.Add(u"']'");
664 tokenNameList.Add(u"LPAREN");
665 tokenInfoList.Add(u"'('");
666 tokenNameList.Add(u"RPAREN");
667 tokenInfoList.Add(u"')'");
668 tokenNameList.Add(u"LANGLE");
669 tokenInfoList.Add(u"'<'");
670 tokenNameList.Add(u"RANGLE");
671 tokenInfoList.Add(u"'>'");
672 tokenNameList.Add(u"LBRACE");
673 tokenInfoList.Add(u"'{'");
674 tokenNameList.Add(u"RBRACE");
675 tokenInfoList.Add(u"'}'");
676 tokenNameList.Add(u"COMMA");
677 tokenInfoList.Add(u"','");
678 tokenNameList.Add(u"ASSIGN");
679 tokenInfoList.Add(u"'='");
680 tokenNameList.Add(u"COLON");
681 tokenInfoList.Add(u"':'");
682 tokenNameList.Add(u"SEMICOLON");
683 tokenInfoList.Add(u"';'");
684 tokenNameList.Add(u"HASH");
685 tokenInfoList.Add(u"'#'");
686 tokenNameList.Add(u"QUEST");
687 tokenInfoList.Add(u"'?'");
688 }
689 private static System.UniquePtr<TokenMap> instance;
690 private System.Collections.Map<ustring, int> tokenIdMap;
691 private System.Collections.List<ustring> tokenNameList;
692 private System.Collections.List<ustring> tokenInfoList;
693 }
694 public int GetTokenId(const ustring& tokenName)
695 {
696 return TokenMap.Instance().GetTokenId(tokenName);
697 }
698
699 public ustring GetTokenName(int tokenId)
700 {
701 return TokenMap.Instance().GetTokenName(tokenId);
702 }
703
704 public ustring GetTokenInfo(int tokenId)
705 {
706 return TokenMap.Instance().GetTokenInfo(tokenId);
707 }
708 }