~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/nrefactory/ICSharpCode.NRefactory.VB/Lexer/Tokens.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// this file was autogenerated by a tool.
 
2
using System;
 
3
using System.Collections;
 
4
 
 
5
namespace ICSharpCode.NRefactory.VB.Parser
 
6
{
 
7
        public static class Tokens
 
8
        {
 
9
                // ----- terminal classes -----
 
10
                public const int EOF                  = 0;
 
11
                public const int EOL                  = 1;
 
12
                public const int Identifier           = 2;
 
13
                public const int LiteralString        = 3;
 
14
                public const int LiteralCharacter     = 4;
 
15
                public const int LiteralInteger       = 5;
 
16
                public const int LiteralDouble        = 6;
 
17
                public const int LiteralSingle        = 7;
 
18
                public const int LiteralDecimal       = 8;
 
19
                public const int LiteralDate          = 9;
 
20
                public const int XmlOpenTag           = 10;
 
21
                public const int XmlCloseTag          = 11;
 
22
                public const int XmlStartInlineVB     = 12;
 
23
                public const int XmlEndInlineVB       = 13;
 
24
                public const int XmlCloseTagEmptyElement = 14;
 
25
                public const int XmlOpenEndTag        = 15;
 
26
                public const int XmlContent           = 16;
 
27
                public const int XmlComment           = 17;
 
28
                public const int XmlCData             = 18;
 
29
                public const int XmlProcessingInstruction = 19;
 
30
 
 
31
                // ----- special character -----
 
32
                public const int Assign               = 20;
 
33
                public const int Colon                = 21;
 
34
                public const int Comma                = 22;
 
35
                public const int ConcatString         = 23;
 
36
                public const int Div                  = 24;
 
37
                public const int DivInteger           = 25;
 
38
                public const int Dot                  = 26;
 
39
                public const int TripleDot            = 27;
 
40
                public const int DotAt                = 28;
 
41
                public const int ExclamationMark      = 29;
 
42
                public const int Minus                = 30;
 
43
                public const int Plus                 = 31;
 
44
                public const int Power                = 32;
 
45
                public const int QuestionMark         = 33;
 
46
                public const int Times                = 34;
 
47
                public const int OpenCurlyBrace       = 35;
 
48
                public const int CloseCurlyBrace      = 36;
 
49
                public const int OpenParenthesis      = 37;
 
50
                public const int CloseParenthesis     = 38;
 
51
                public const int GreaterThan          = 39;
 
52
                public const int LessThan             = 40;
 
53
                public const int NotEqual             = 41;
 
54
                public const int GreaterEqual         = 42;
 
55
                public const int LessEqual            = 43;
 
56
                public const int ShiftLeft            = 44;
 
57
                public const int ShiftRight           = 45;
 
58
                public const int PlusAssign           = 46;
 
59
                public const int PowerAssign          = 47;
 
60
                public const int MinusAssign          = 48;
 
61
                public const int TimesAssign          = 49;
 
62
                public const int DivAssign            = 50;
 
63
                public const int DivIntegerAssign     = 51;
 
64
                public const int ShiftLeftAssign      = 52;
 
65
                public const int ShiftRightAssign     = 53;
 
66
                public const int ConcatStringAssign   = 54;
 
67
                public const int ColonAssign          = 55;
 
68
 
 
69
                // ----- keywords -----
 
70
                public const int AddHandler           = 56;
 
71
                public const int AddressOf            = 57;
 
72
                public const int Aggregate            = 58;
 
73
                public const int Alias                = 59;
 
74
                public const int And                  = 60;
 
75
                public const int AndAlso              = 61;
 
76
                public const int Ansi                 = 62;
 
77
                public const int As                   = 63;
 
78
                public const int Ascending            = 64;
 
79
                public const int Assembly             = 65;
 
80
                public const int Auto                 = 66;
 
81
                public const int Binary               = 67;
 
82
                public const int Boolean              = 68;
 
83
                public const int ByRef                = 69;
 
84
                public const int By                   = 70;
 
85
                public const int Byte                 = 71;
 
86
                public const int ByVal                = 72;
 
87
                public const int Call                 = 73;
 
88
                public const int Case                 = 74;
 
89
                public const int Catch                = 75;
 
90
                public const int CBool                = 76;
 
91
                public const int CByte                = 77;
 
92
                public const int CChar                = 78;
 
93
                public const int CDate                = 79;
 
94
                public const int CDbl                 = 80;
 
95
                public const int CDec                 = 81;
 
96
                public const int Char                 = 82;
 
97
                public const int CInt                 = 83;
 
98
                public const int Class                = 84;
 
99
                public const int CLng                 = 85;
 
100
                public const int CObj                 = 86;
 
101
                public const int Compare              = 87;
 
102
                public const int Const                = 88;
 
103
                public const int Continue             = 89;
 
104
                public const int CSByte               = 90;
 
105
                public const int CShort               = 91;
 
106
                public const int CSng                 = 92;
 
107
                public const int CStr                 = 93;
 
108
                public const int CType                = 94;
 
109
                public const int CUInt                = 95;
 
110
                public const int CULng                = 96;
 
111
                public const int CUShort              = 97;
 
112
                public const int Custom               = 98;
 
113
                public const int Date                 = 99;
 
114
                public const int Decimal              = 100;
 
115
                public const int Declare              = 101;
 
116
                public const int Default              = 102;
 
117
                public const int Delegate             = 103;
 
118
                public const int Descending           = 104;
 
119
                public const int Dim                  = 105;
 
120
                public const int DirectCast           = 106;
 
121
                public const int Distinct             = 107;
 
122
                public const int Do                   = 108;
 
123
                public const int Double               = 109;
 
124
                public const int Each                 = 110;
 
125
                public const int Else                 = 111;
 
126
                public const int ElseIf               = 112;
 
127
                public const int End                  = 113;
 
128
                public const int EndIf                = 114;
 
129
                public const int Enum                 = 115;
 
130
                new public const int Equals               = 116;
 
131
                public const int Erase                = 117;
 
132
                public const int Error                = 118;
 
133
                public const int Event                = 119;
 
134
                public const int Exit                 = 120;
 
135
                public const int Explicit             = 121;
 
136
                public const int False                = 122;
 
137
                public const int Finally              = 123;
 
138
                public const int For                  = 124;
 
139
                public const int Friend               = 125;
 
140
                public const int From                 = 126;
 
141
                public const int Function             = 127;
 
142
                public const int Get                  = 128;
 
143
                new public const int GetType              = 129;
 
144
                public const int Global               = 130;
 
145
                public const int GoSub                = 131;
 
146
                public const int GoTo                 = 132;
 
147
                public const int Group                = 133;
 
148
                public const int Handles              = 134;
 
149
                public const int If                   = 135;
 
150
                public const int Implements           = 136;
 
151
                public const int Imports              = 137;
 
152
                public const int In                   = 138;
 
153
                public const int Infer                = 139;
 
154
                public const int Inherits             = 140;
 
155
                public const int Integer              = 141;
 
156
                public const int Interface            = 142;
 
157
                public const int Into                 = 143;
 
158
                public const int Is                   = 144;
 
159
                public const int IsNot                = 145;
 
160
                public const int Join                 = 146;
 
161
                public const int Key                  = 147;
 
162
                public const int Let                  = 148;
 
163
                public const int Lib                  = 149;
 
164
                public const int Like                 = 150;
 
165
                public const int Long                 = 151;
 
166
                public const int Loop                 = 152;
 
167
                public const int Me                   = 153;
 
168
                public const int Mod                  = 154;
 
169
                public const int Module               = 155;
 
170
                public const int MustInherit          = 156;
 
171
                public const int MustOverride         = 157;
 
172
                public const int MyBase               = 158;
 
173
                public const int MyClass              = 159;
 
174
                public const int Namespace            = 160;
 
175
                public const int Narrowing            = 161;
 
176
                public const int New                  = 162;
 
177
                public const int Next                 = 163;
 
178
                public const int Not                  = 164;
 
179
                public const int Nothing              = 165;
 
180
                public const int NotInheritable       = 166;
 
181
                public const int NotOverridable       = 167;
 
182
                public const int Object               = 168;
 
183
                public const int Of                   = 169;
 
184
                public const int Off                  = 170;
 
185
                public const int On                   = 171;
 
186
                public const int Operator             = 172;
 
187
                public const int Option               = 173;
 
188
                public const int Optional             = 174;
 
189
                public const int Or                   = 175;
 
190
                public const int Order                = 176;
 
191
                public const int OrElse               = 177;
 
192
                public const int Out                  = 178;
 
193
                public const int Overloads            = 179;
 
194
                public const int Overridable          = 180;
 
195
                public const int Overrides            = 181;
 
196
                public const int ParamArray           = 182;
 
197
                public const int Partial              = 183;
 
198
                public const int Preserve             = 184;
 
199
                public const int Private              = 185;
 
200
                public const int Property             = 186;
 
201
                public const int Protected            = 187;
 
202
                public const int Public               = 188;
 
203
                public const int RaiseEvent           = 189;
 
204
                public const int ReadOnly             = 190;
 
205
                public const int ReDim                = 191;
 
206
                public const int Rem                  = 192;
 
207
                public const int RemoveHandler        = 193;
 
208
                public const int Resume               = 194;
 
209
                public const int Return               = 195;
 
210
                public const int SByte                = 196;
 
211
                public const int Select               = 197;
 
212
                public const int Set                  = 198;
 
213
                public const int Shadows              = 199;
 
214
                public const int Shared               = 200;
 
215
                public const int Short                = 201;
 
216
                public const int Single               = 202;
 
217
                public const int Skip                 = 203;
 
218
                public const int Static               = 204;
 
219
                public const int Step                 = 205;
 
220
                public const int Stop                 = 206;
 
221
                public const int Strict               = 207;
 
222
                public const int String               = 208;
 
223
                public const int Structure            = 209;
 
224
                public const int Sub                  = 210;
 
225
                public const int SyncLock             = 211;
 
226
                public const int Take                 = 212;
 
227
                public const int Text                 = 213;
 
228
                public const int Then                 = 214;
 
229
                public const int Throw                = 215;
 
230
                public const int To                   = 216;
 
231
                public const int True                 = 217;
 
232
                public const int Try                  = 218;
 
233
                public const int TryCast              = 219;
 
234
                public const int TypeOf               = 220;
 
235
                public const int UInteger             = 221;
 
236
                public const int ULong                = 222;
 
237
                public const int Unicode              = 223;
 
238
                public const int Until                = 224;
 
239
                public const int UShort               = 225;
 
240
                public const int Using                = 226;
 
241
                public const int Variant              = 227;
 
242
                public const int Wend                 = 228;
 
243
                public const int When                 = 229;
 
244
                public const int Where                = 230;
 
245
                public const int While                = 231;
 
246
                public const int Widening             = 232;
 
247
                public const int With                 = 233;
 
248
                public const int WithEvents           = 234;
 
249
                public const int WriteOnly            = 235;
 
250
                public const int Xor                  = 236;
 
251
                public const int GetXmlNamespace      = 237;
 
252
 
 
253
                public const int MaxToken = 238;
 
254
                static BitArray NewSet(params int[] values)
 
255
                {
 
256
                        BitArray bitArray = new BitArray(MaxToken);
 
257
                        foreach (int val in values) {
 
258
                        bitArray[val] = true;
 
259
                        }
 
260
                        return bitArray;
 
261
                }
 
262
                public static BitArray Null = NewSet(Nothing);
 
263
                public static BitArray BlockSucc = NewSet(Case, Catch, Else, ElseIf, End, Finally, Loop, Next);
 
264
                public static BitArray GlobalLevel = NewSet(Namespace, Module, Class, Structure, Imports, Option);
 
265
                public static BitArray TypeLevel = NewSet(Sub, Function, Property);
 
266
                public static BitArray IdentifierTokens = NewSet(Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Out, Key, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate);
 
267
                public static BitArray ExpressionStart = NewSet(Me, MyBase, MyClass, True, False, Not, From, Aggregate, New, Nothing, AddressOf, GetType, TypeOf, GetXmlNamespace, Global, Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Sub, Function, DirectCast, TryCast, CType, CBool, CByte, CChar, CDate, CDec, CDbl, CInt, CLng, CObj, CSByte, CShort, CSng, CStr, CUInt, CULng, CUShort);
 
268
                public static BitArray StatementStart = NewSet(Nothing, Me, MyBase, MyClass, True, False, Not, From, Aggregate, New, Nothing, AddressOf, GetType, TypeOf, GetXmlNamespace, Global, Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Sub, Function, DirectCast, TryCast, CType, CBool, CByte, CChar, CDate, CDec, CDbl, CInt, CLng, CObj, CSByte, CShort, CSng, CStr, CUInt, CULng, CUShort, Dim, Const, Static, For, While, Do, Select);
 
269
                public static BitArray SimpleTypeName = NewSet(Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte, Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Out, Key, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate);
 
270
                public static BitArray CastExpressions = NewSet(DirectCast, TryCast, CType, CBool, CByte, CChar, CDate, CDec, CDbl, CInt, CLng, CObj, CSByte, CShort, CSng, CStr, CUInt, CULng, CUShort);
 
271
                public static BitArray BooleanExpressions = NewSet(True, False);
 
272
                public static BitArray LambdaStart = NewSet(Sub, Function);
 
273
                public static BitArray OperatorsAtStart = NewSet(Not, From, Aggregate);
 
274
                public static BitArray TypeKW = NewSet(Boolean, Date, Char, String, Decimal, Byte, Short, Integer, Long, Single, Double, UInteger, ULong, UShort, SByte);
 
275
 
 
276
                static string[] tokenList = new string[] {
 
277
                        // ----- terminal classes -----
 
278
                        "<EOF>",
 
279
                        "<EOL>",
 
280
                        "<Identifier>",
 
281
                        "<LiteralString>",
 
282
                        "<LiteralCharacter>",
 
283
                        "<LiteralInteger>",
 
284
                        "<LiteralDouble>",
 
285
                        "<LiteralSingle>",
 
286
                        "<LiteralDecimal>",
 
287
                        "<LiteralDate>",
 
288
                        "<XmlOpenTag>",
 
289
                        "<XmlCloseTag>",
 
290
                        "<XmlStartInlineVB>",
 
291
                        "<XmlEndInlineVB>",
 
292
                        "<XmlCloseTagEmptyElement>",
 
293
                        "<XmlOpenEndTag>",
 
294
                        "<XmlContent>",
 
295
                        "<XmlComment>",
 
296
                        "<XmlCData>",
 
297
                        "<XmlProcessingInstruction>",
 
298
                        // ----- special character -----
 
299
                        "=",
 
300
                        ":",
 
301
                        ",",
 
302
                        "&",
 
303
                        "/",
 
304
                        "\\",
 
305
                        ".",
 
306
                        "...",
 
307
                        ".@",
 
308
                        "!",
 
309
                        "-",
 
310
                        "+",
 
311
                        "^",
 
312
                        "?",
 
313
                        "*",
 
314
                        "{",
 
315
                        "}",
 
316
                        "(",
 
317
                        ")",
 
318
                        ">",
 
319
                        "<",
 
320
                        "<>",
 
321
                        ">=",
 
322
                        "<=",
 
323
                        "<<",
 
324
                        ">>",
 
325
                        "+=",
 
326
                        "^=",
 
327
                        "-=",
 
328
                        "*=",
 
329
                        "/=",
 
330
                        "\\=",
 
331
                        "<<=",
 
332
                        ">>=",
 
333
                        "&=",
 
334
                        ":=",
 
335
                        // ----- keywords -----
 
336
                        "AddHandler",
 
337
                        "AddressOf",
 
338
                        "Aggregate",
 
339
                        "Alias",
 
340
                        "And",
 
341
                        "AndAlso",
 
342
                        "Ansi",
 
343
                        "As",
 
344
                        "Ascending",
 
345
                        "Assembly",
 
346
                        "Auto",
 
347
                        "Binary",
 
348
                        "Boolean",
 
349
                        "ByRef",
 
350
                        "By",
 
351
                        "Byte",
 
352
                        "ByVal",
 
353
                        "Call",
 
354
                        "Case",
 
355
                        "Catch",
 
356
                        "CBool",
 
357
                        "CByte",
 
358
                        "CChar",
 
359
                        "CDate",
 
360
                        "CDbl",
 
361
                        "CDec",
 
362
                        "Char",
 
363
                        "CInt",
 
364
                        "Class",
 
365
                        "CLng",
 
366
                        "CObj",
 
367
                        "Compare",
 
368
                        "Const",
 
369
                        "Continue",
 
370
                        "CSByte",
 
371
                        "CShort",
 
372
                        "CSng",
 
373
                        "CStr",
 
374
                        "CType",
 
375
                        "CUInt",
 
376
                        "CULng",
 
377
                        "CUShort",
 
378
                        "Custom",
 
379
                        "Date",
 
380
                        "Decimal",
 
381
                        "Declare",
 
382
                        "Default",
 
383
                        "Delegate",
 
384
                        "Descending",
 
385
                        "Dim",
 
386
                        "DirectCast",
 
387
                        "Distinct",
 
388
                        "Do",
 
389
                        "Double",
 
390
                        "Each",
 
391
                        "Else",
 
392
                        "ElseIf",
 
393
                        "End",
 
394
                        "EndIf",
 
395
                        "Enum",
 
396
                        "Equals",
 
397
                        "Erase",
 
398
                        "Error",
 
399
                        "Event",
 
400
                        "Exit",
 
401
                        "Explicit",
 
402
                        "False",
 
403
                        "Finally",
 
404
                        "For",
 
405
                        "Friend",
 
406
                        "From",
 
407
                        "Function",
 
408
                        "Get",
 
409
                        "GetType",
 
410
                        "Global",
 
411
                        "GoSub",
 
412
                        "GoTo",
 
413
                        "Group",
 
414
                        "Handles",
 
415
                        "If",
 
416
                        "Implements",
 
417
                        "Imports",
 
418
                        "In",
 
419
                        "Infer",
 
420
                        "Inherits",
 
421
                        "Integer",
 
422
                        "Interface",
 
423
                        "Into",
 
424
                        "Is",
 
425
                        "IsNot",
 
426
                        "Join",
 
427
                        "Key",
 
428
                        "Let",
 
429
                        "Lib",
 
430
                        "Like",
 
431
                        "Long",
 
432
                        "Loop",
 
433
                        "Me",
 
434
                        "Mod",
 
435
                        "Module",
 
436
                        "MustInherit",
 
437
                        "MustOverride",
 
438
                        "MyBase",
 
439
                        "MyClass",
 
440
                        "Namespace",
 
441
                        "Narrowing",
 
442
                        "New",
 
443
                        "Next",
 
444
                        "Not",
 
445
                        "Nothing",
 
446
                        "NotInheritable",
 
447
                        "NotOverridable",
 
448
                        "Object",
 
449
                        "Of",
 
450
                        "Off",
 
451
                        "On",
 
452
                        "Operator",
 
453
                        "Option",
 
454
                        "Optional",
 
455
                        "Or",
 
456
                        "Order",
 
457
                        "OrElse",
 
458
                        "Out",
 
459
                        "Overloads",
 
460
                        "Overridable",
 
461
                        "Overrides",
 
462
                        "ParamArray",
 
463
                        "Partial",
 
464
                        "Preserve",
 
465
                        "Private",
 
466
                        "Property",
 
467
                        "Protected",
 
468
                        "Public",
 
469
                        "RaiseEvent",
 
470
                        "ReadOnly",
 
471
                        "ReDim",
 
472
                        "Rem",
 
473
                        "RemoveHandler",
 
474
                        "Resume",
 
475
                        "Return",
 
476
                        "SByte",
 
477
                        "Select",
 
478
                        "Set",
 
479
                        "Shadows",
 
480
                        "Shared",
 
481
                        "Short",
 
482
                        "Single",
 
483
                        "Skip",
 
484
                        "Static",
 
485
                        "Step",
 
486
                        "Stop",
 
487
                        "Strict",
 
488
                        "String",
 
489
                        "Structure",
 
490
                        "Sub",
 
491
                        "SyncLock",
 
492
                        "Take",
 
493
                        "Text",
 
494
                        "Then",
 
495
                        "Throw",
 
496
                        "To",
 
497
                        "True",
 
498
                        "Try",
 
499
                        "TryCast",
 
500
                        "TypeOf",
 
501
                        "UInteger",
 
502
                        "ULong",
 
503
                        "Unicode",
 
504
                        "Until",
 
505
                        "UShort",
 
506
                        "Using",
 
507
                        "Variant",
 
508
                        "Wend",
 
509
                        "When",
 
510
                        "Where",
 
511
                        "While",
 
512
                        "Widening",
 
513
                        "With",
 
514
                        "WithEvents",
 
515
                        "WriteOnly",
 
516
                        "Xor",
 
517
                        "GetXmlNamespace",
 
518
                };
 
519
                public static string GetTokenString(int token)
 
520
                {
 
521
                        if (token >= 0 && token < tokenList.Length) {
 
522
                                return tokenList[token];
 
523
                        }
 
524
                        throw new System.NotSupportedException("Unknown token:" + token);
 
525
                }
 
526
        }
 
527
}