~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric-updates

« back to all changes in this revision

Viewing changes to src/core/NRefactory/Project/Src/Parser/CSharp/Parser.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-18 08:40:51 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090218084051-gh8m6ukvokbwj7cf
Tags: 1.9.2+dfsg-1ubuntu1
* Merge from Debian Experimental (LP: #330519), remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24
    - Add libmono-cairo1.0-cil to build-deps to fool pkg-config check

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
#line  1 "cs.ATG" 
 
2
#line  1 "Frames/cs.ATG" 
3
3
using System.Collections;
4
4
using System.Collections.Generic;
5
5
using System.Collections.Specialized;
20
20
 
21
21
partial class Parser : AbstractParser
22
22
{
23
 
        const int maxT = 125;
 
23
        const int maxT = 145;
24
24
 
25
25
        const  bool   T            = true;
26
26
        const  bool   x            = false;
27
27
        
28
28
 
29
 
#line  18 "cs.ATG" 
 
29
#line  18 "Frames/cs.ATG" 
30
30
 
31
31
 
32
32
/*
35
35
 
36
36
        void CS() {
37
37
 
38
 
#line  159 "cs.ATG" 
39
 
                lexer.NextToken(); /* get the first token */
40
 
                compilationUnit = new CompilationUnit(); 
41
 
                while (la.kind == 120) {
 
38
#line  179 "Frames/cs.ATG" 
 
39
                lexer.NextToken(); /* get the first token */ 
 
40
                while (la.kind == 121) {
42
41
                        UsingDirective();
43
42
                }
44
43
                while (
45
 
#line  163 "cs.ATG" 
 
44
#line  182 "Frames/cs.ATG" 
46
45
IsGlobalAttrTarget()) {
47
46
                        GlobalAttributeSection();
48
47
                }
54
53
 
55
54
        void UsingDirective() {
56
55
 
57
 
#line  170 "cs.ATG" 
 
56
#line  189 "Frames/cs.ATG" 
58
57
                string qualident = null; TypeReference aliasedType = null;
59
58
                
60
 
                Expect(120);
 
59
                Expect(121);
61
60
 
62
 
#line  173 "cs.ATG" 
 
61
#line  192 "Frames/cs.ATG" 
63
62
                Location startPos = t.Location; 
64
63
                Qualident(
65
 
#line  174 "cs.ATG" 
 
64
#line  193 "Frames/cs.ATG" 
66
65
out qualident);
67
66
                if (la.kind == 3) {
68
67
                        lexer.NextToken();
69
68
                        NonArrayType(
70
 
#line  175 "cs.ATG" 
 
69
#line  194 "Frames/cs.ATG" 
71
70
out aliasedType);
72
71
                }
73
72
                Expect(11);
74
73
 
75
 
#line  177 "cs.ATG" 
 
74
#line  196 "Frames/cs.ATG" 
76
75
                if (qualident != null && qualident.Length > 0) {
77
76
                 INode node;
78
77
                 if (aliasedType != null) {
90
89
        void GlobalAttributeSection() {
91
90
                Expect(18);
92
91
 
93
 
#line  193 "cs.ATG" 
 
92
#line  212 "Frames/cs.ATG" 
94
93
                Location startPos = t.Location; 
95
 
                Expect(1);
 
94
                Identifier();
96
95
 
97
 
#line  194 "cs.ATG" 
98
 
                if (t.val != "assembly") Error("global attribute target specifier (\"assembly\") expected");
 
96
#line  213 "Frames/cs.ATG" 
 
97
                if (t.val != "assembly" && t.val != "module") Error("global attribute target specifier (assembly or module) expected");
99
98
                string attributeTarget = t.val;
100
99
                List<ASTAttribute> attributes = new List<ASTAttribute>();
101
100
                ASTAttribute attribute;
102
101
                
103
102
                Expect(9);
104
103
                Attribute(
105
 
#line  199 "cs.ATG" 
 
104
#line  218 "Frames/cs.ATG" 
106
105
out attribute);
107
106
 
108
 
#line  199 "cs.ATG" 
 
107
#line  218 "Frames/cs.ATG" 
109
108
                attributes.Add(attribute); 
110
109
                while (
111
 
#line  200 "cs.ATG" 
 
110
#line  219 "Frames/cs.ATG" 
112
111
NotFinalComma()) {
113
112
                        Expect(14);
114
113
                        Attribute(
115
 
#line  200 "cs.ATG" 
 
114
#line  219 "Frames/cs.ATG" 
116
115
out attribute);
117
116
 
118
 
#line  200 "cs.ATG" 
 
117
#line  219 "Frames/cs.ATG" 
119
118
                        attributes.Add(attribute); 
120
119
                }
121
120
                if (la.kind == 14) {
123
122
                }
124
123
                Expect(19);
125
124
 
126
 
#line  202 "cs.ATG" 
127
 
                AttributeSection section = new AttributeSection(attributeTarget, attributes);
128
 
                section.StartLocation = startPos;
129
 
                section.EndLocation = t.EndLocation;
 
125
#line  221 "Frames/cs.ATG" 
 
126
                AttributeSection section = new AttributeSection {
 
127
                   AttributeTarget = attributeTarget,
 
128
                   Attributes = attributes,
 
129
                   StartLocation = startPos,
 
130
                   EndLocation = t.EndLocation
 
131
                };
130
132
                compilationUnit.AddChild(section);
131
133
                
132
134
        }
133
135
 
134
136
        void NamespaceMemberDecl() {
135
137
 
136
 
#line  293 "cs.ATG" 
 
138
#line  322 "Frames/cs.ATG" 
137
139
                AttributeSection section;
138
140
                List<AttributeSection> attributes = new List<AttributeSection>();
139
141
                ModifierList m = new ModifierList();
140
142
                string qualident;
141
143
                
142
 
                if (la.kind == 87) {
 
144
                if (la.kind == 88) {
143
145
                        lexer.NextToken();
144
146
 
145
 
#line  299 "cs.ATG" 
 
147
#line  328 "Frames/cs.ATG" 
146
148
                        Location startPos = t.Location; 
147
149
                        Qualident(
148
 
#line  300 "cs.ATG" 
 
150
#line  329 "Frames/cs.ATG" 
149
151
out qualident);
150
152
 
151
 
#line  300 "cs.ATG" 
 
153
#line  329 "Frames/cs.ATG" 
152
154
                        INode node =  new NamespaceDeclaration(qualident);
153
155
                        node.StartLocation = startPos;
154
156
                        compilationUnit.AddChild(node);
155
157
                        compilationUnit.BlockStart(node);
156
158
                        
157
159
                        Expect(16);
158
 
                        while (la.kind == 120) {
 
160
                        while (la.kind == 121) {
159
161
                                UsingDirective();
160
162
                        }
161
163
                        while (StartOf(1)) {
166
168
                                lexer.NextToken();
167
169
                        }
168
170
 
169
 
#line  309 "cs.ATG" 
 
171
#line  338 "Frames/cs.ATG" 
170
172
                        node.EndLocation   = t.EndLocation;
171
173
                        compilationUnit.BlockEnd();
172
174
                        
173
175
                } else if (StartOf(2)) {
174
176
                        while (la.kind == 18) {
175
177
                                AttributeSection(
176
 
#line  313 "cs.ATG" 
 
178
#line  342 "Frames/cs.ATG" 
177
179
out section);
178
180
 
179
 
#line  313 "cs.ATG" 
 
181
#line  342 "Frames/cs.ATG" 
180
182
                                attributes.Add(section); 
181
183
                        }
182
184
                        while (StartOf(3)) {
183
185
                                TypeModifier(
184
 
#line  314 "cs.ATG" 
 
186
#line  343 "Frames/cs.ATG" 
185
187
m);
186
188
                        }
187
189
                        TypeDecl(
188
 
#line  315 "cs.ATG" 
 
190
#line  344 "Frames/cs.ATG" 
189
191
m, attributes);
190
 
                } else SynErr(126);
 
192
                } else SynErr(146);
191
193
        }
192
194
 
193
195
        void Qualident(
194
 
#line  437 "cs.ATG" 
 
196
#line  468 "Frames/cs.ATG" 
195
197
out string qualident) {
196
 
                Expect(1);
 
198
                Identifier();
197
199
 
198
 
#line  439 "cs.ATG" 
 
200
#line  470 "Frames/cs.ATG" 
199
201
                qualidentBuilder.Length = 0; qualidentBuilder.Append(t.val); 
200
202
                while (
201
 
#line  440 "cs.ATG" 
 
203
#line  471 "Frames/cs.ATG" 
202
204
DotAndIdent()) {
203
205
                        Expect(15);
204
 
                        Expect(1);
 
206
                        Identifier();
205
207
 
206
 
#line  440 "cs.ATG" 
 
208
#line  471 "Frames/cs.ATG" 
207
209
                        qualidentBuilder.Append('.');
208
210
                        qualidentBuilder.Append(t.val); 
209
211
                        
210
212
                }
211
213
 
212
 
#line  443 "cs.ATG" 
 
214
#line  474 "Frames/cs.ATG" 
213
215
                qualident = qualidentBuilder.ToString(); 
214
216
        }
215
217
 
216
218
        void NonArrayType(
217
 
#line  553 "cs.ATG" 
 
219
#line  587 "Frames/cs.ATG" 
218
220
out TypeReference type) {
219
221
 
220
 
#line  555 "cs.ATG" 
 
222
#line  589 "Frames/cs.ATG" 
 
223
                Location startPos = la.Location;
221
224
                string name;
222
225
                int pointer = 0;
223
226
                type = null;
224
 
                Location startPos = la.Location;
225
227
                
226
 
                if (la.kind == 1 || la.kind == 90 || la.kind == 107) {
 
228
                if (StartOf(4)) {
227
229
                        ClassType(
228
 
#line  561 "cs.ATG" 
 
230
#line  595 "Frames/cs.ATG" 
229
231
out type, false);
230
 
                } else if (StartOf(4)) {
 
232
                } else if (StartOf(5)) {
231
233
                        SimpleType(
232
 
#line  562 "cs.ATG" 
 
234
#line  596 "Frames/cs.ATG" 
233
235
out name);
234
236
 
235
 
#line  562 "cs.ATG" 
 
237
#line  596 "Frames/cs.ATG" 
236
238
                        type = new TypeReference(name); 
237
 
                } else if (la.kind == 122) {
 
239
                } else if (la.kind == 123) {
238
240
                        lexer.NextToken();
239
241
                        Expect(6);
240
242
 
241
 
#line  563 "cs.ATG" 
 
243
#line  597 "Frames/cs.ATG" 
242
244
                        pointer = 1; type = new TypeReference("void"); 
243
 
                } else SynErr(127);
 
245
                } else SynErr(147);
244
246
                if (la.kind == 12) {
245
247
                        NullableQuestionMark(
246
 
#line  566 "cs.ATG" 
 
248
#line  600 "Frames/cs.ATG" 
247
249
ref type);
248
250
                }
249
251
                while (
250
 
#line  568 "cs.ATG" 
 
252
#line  602 "Frames/cs.ATG" 
251
253
IsPointer()) {
252
254
                        Expect(6);
253
255
 
254
 
#line  569 "cs.ATG" 
 
256
#line  603 "Frames/cs.ATG" 
255
257
                        ++pointer; 
256
258
                }
257
259
 
258
 
#line  571 "cs.ATG" 
 
260
#line  605 "Frames/cs.ATG" 
259
261
                if (type != null) { 
260
 
                type.PointerNestingLevel = pointer; 
261
 
                        type.EndLocation = t.EndLocation;
262
 
                        type.StartLocation = startPos;
263
 
                } 
 
262
                  type.PointerNestingLevel = pointer; 
 
263
                  type.EndLocation = t.EndLocation;
 
264
                  type.StartLocation = startPos;
 
265
                }
264
266
                
265
267
        }
266
268
 
 
269
        void Identifier() {
 
270
                switch (la.kind) {
 
271
                case 1: {
 
272
                        lexer.NextToken();
 
273
                        break;
 
274
                }
 
275
                case 126: {
 
276
                        lexer.NextToken();
 
277
                        break;
 
278
                }
 
279
                case 127: {
 
280
                        lexer.NextToken();
 
281
                        break;
 
282
                }
 
283
                case 128: {
 
284
                        lexer.NextToken();
 
285
                        break;
 
286
                }
 
287
                case 129: {
 
288
                        lexer.NextToken();
 
289
                        break;
 
290
                }
 
291
                case 130: {
 
292
                        lexer.NextToken();
 
293
                        break;
 
294
                }
 
295
                case 131: {
 
296
                        lexer.NextToken();
 
297
                        break;
 
298
                }
 
299
                case 132: {
 
300
                        lexer.NextToken();
 
301
                        break;
 
302
                }
 
303
                case 133: {
 
304
                        lexer.NextToken();
 
305
                        break;
 
306
                }
 
307
                case 134: {
 
308
                        lexer.NextToken();
 
309
                        break;
 
310
                }
 
311
                case 135: {
 
312
                        lexer.NextToken();
 
313
                        break;
 
314
                }
 
315
                case 136: {
 
316
                        lexer.NextToken();
 
317
                        break;
 
318
                }
 
319
                case 137: {
 
320
                        lexer.NextToken();
 
321
                        break;
 
322
                }
 
323
                case 138: {
 
324
                        lexer.NextToken();
 
325
                        break;
 
326
                }
 
327
                case 139: {
 
328
                        lexer.NextToken();
 
329
                        break;
 
330
                }
 
331
                case 140: {
 
332
                        lexer.NextToken();
 
333
                        break;
 
334
                }
 
335
                case 141: {
 
336
                        lexer.NextToken();
 
337
                        break;
 
338
                }
 
339
                case 142: {
 
340
                        lexer.NextToken();
 
341
                        break;
 
342
                }
 
343
                case 143: {
 
344
                        lexer.NextToken();
 
345
                        break;
 
346
                }
 
347
                case 144: {
 
348
                        lexer.NextToken();
 
349
                        break;
 
350
                }
 
351
                default: SynErr(148); break;
 
352
                }
 
353
        }
 
354
 
267
355
        void Attribute(
268
 
#line  209 "cs.ATG" 
 
356
#line  231 "Frames/cs.ATG" 
269
357
out ASTAttribute attribute) {
270
358
 
271
 
#line  210 "cs.ATG" 
 
359
#line  232 "Frames/cs.ATG" 
272
360
                string qualident;
273
361
                string alias = null;
274
362
                
 
363
 
 
364
#line  236 "Frames/cs.ATG" 
 
365
                Location startPos = la.Location; 
275
366
                if (
276
 
#line  214 "cs.ATG" 
277
 
la.kind == Tokens.Identifier && Peek(1).kind == Tokens.DoubleColon) {
278
 
                        lexer.NextToken();
 
367
#line  237 "Frames/cs.ATG" 
 
368
IdentAndDoubleColon()) {
 
369
                        Identifier();
279
370
 
280
 
#line  215 "cs.ATG" 
 
371
#line  238 "Frames/cs.ATG" 
281
372
                        alias = t.val; 
282
373
                        Expect(10);
283
374
                }
284
375
                Qualident(
285
 
#line  218 "cs.ATG" 
 
376
#line  241 "Frames/cs.ATG" 
286
377
out qualident);
287
378
 
288
 
#line  219 "cs.ATG" 
 
379
#line  242 "Frames/cs.ATG" 
289
380
                List<Expression> positional = new List<Expression>();
290
381
                List<NamedArgumentExpression> named = new List<NamedArgumentExpression>();
291
382
                string name = (alias != null && alias != "global") ? alias + "." + qualident : qualident;
292
383
                
293
384
                if (la.kind == 20) {
294
385
                        AttributeArguments(
295
 
#line  223 "cs.ATG" 
 
386
#line  246 "Frames/cs.ATG" 
296
387
positional, named);
297
388
                }
298
389
 
299
 
#line  223 "cs.ATG" 
300
 
                attribute  = new ASTAttribute(name, positional, named);
 
390
#line  247 "Frames/cs.ATG" 
 
391
                attribute = new ASTAttribute(name, positional, named); 
 
392
                attribute.StartLocation = startPos;
 
393
                attribute.EndLocation = t.EndLocation;
 
394
                
301
395
        }
302
396
 
303
397
        void AttributeArguments(
304
 
#line  226 "cs.ATG" 
 
398
#line  253 "Frames/cs.ATG" 
305
399
List<Expression> positional, List<NamedArgumentExpression> named) {
306
400
 
307
 
#line  228 "cs.ATG" 
 
401
#line  255 "Frames/cs.ATG" 
308
402
                bool nameFound = false;
309
403
                string name = "";
310
404
                Expression expr;
311
405
                
312
406
                Expect(20);
313
 
                if (StartOf(5)) {
 
407
                if (StartOf(6)) {
314
408
                        if (
315
 
#line  236 "cs.ATG" 
 
409
#line  263 "Frames/cs.ATG" 
316
410
IsAssignment()) {
317
411
 
318
 
#line  236 "cs.ATG" 
 
412
#line  263 "Frames/cs.ATG" 
319
413
                                nameFound = true; 
320
 
                                lexer.NextToken();
 
414
                                Identifier();
321
415
 
322
 
#line  237 "cs.ATG" 
 
416
#line  264 "Frames/cs.ATG" 
323
417
                                name = t.val; 
324
418
                                Expect(3);
325
419
                        }
326
420
                        Expr(
327
 
#line  239 "cs.ATG" 
 
421
#line  266 "Frames/cs.ATG" 
328
422
out expr);
329
423
 
330
 
#line  239 "cs.ATG" 
 
424
#line  266 "Frames/cs.ATG" 
331
425
                        if (expr != null) {if(name == "") positional.Add(expr);
332
426
                        else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
333
427
                        }
335
429
                        while (la.kind == 14) {
336
430
                                lexer.NextToken();
337
431
                                if (
338
 
#line  247 "cs.ATG" 
 
432
#line  274 "Frames/cs.ATG" 
339
433
IsAssignment()) {
340
434
 
341
 
#line  247 "cs.ATG" 
 
435
#line  274 "Frames/cs.ATG" 
342
436
                                        nameFound = true; 
343
 
                                        Expect(1);
 
437
                                        Identifier();
344
438
 
345
 
#line  248 "cs.ATG" 
 
439
#line  275 "Frames/cs.ATG" 
346
440
                                        name = t.val; 
347
441
                                        Expect(3);
348
 
                                } else if (StartOf(5)) {
 
442
                                } else if (StartOf(6)) {
349
443
 
350
 
#line  250 "cs.ATG" 
 
444
#line  277 "Frames/cs.ATG" 
351
445
                                        if (nameFound) Error("no positional argument after named argument"); 
352
 
                                } else SynErr(128);
 
446
                                } else SynErr(149);
353
447
                                Expr(
354
 
#line  251 "cs.ATG" 
 
448
#line  278 "Frames/cs.ATG" 
355
449
out expr);
356
450
 
357
 
#line  251 "cs.ATG" 
 
451
#line  278 "Frames/cs.ATG" 
358
452
                                if (expr != null) { if(name == "") positional.Add(expr);
359
453
                                else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
360
454
                                }
365
459
        }
366
460
 
367
461
        void Expr(
368
 
#line  1645 "cs.ATG" 
 
462
#line  1750 "Frames/cs.ATG" 
369
463
out Expression expr) {
370
464
 
371
 
#line  1646 "cs.ATG" 
 
465
#line  1751 "Frames/cs.ATG" 
372
466
                expr = null; Expression expr1 = null, expr2 = null; AssignmentOperatorType op; 
 
467
 
 
468
#line  1753 "Frames/cs.ATG" 
 
469
                Location startLocation = la.Location; 
373
470
                UnaryExpr(
374
 
#line  1648 "cs.ATG" 
 
471
#line  1754 "Frames/cs.ATG" 
375
472
out expr);
376
 
                if (StartOf(6)) {
 
473
                if (StartOf(7)) {
377
474
                        AssignmentOperator(
378
 
#line  1651 "cs.ATG" 
 
475
#line  1757 "Frames/cs.ATG" 
379
476
out op);
380
477
                        Expr(
381
 
#line  1651 "cs.ATG" 
 
478
#line  1757 "Frames/cs.ATG" 
382
479
out expr1);
383
480
 
384
 
#line  1651 "cs.ATG" 
 
481
#line  1757 "Frames/cs.ATG" 
385
482
                        expr = new AssignmentExpression(expr, op, expr1); 
386
483
                } else if (
387
 
#line  1652 "cs.ATG" 
 
484
#line  1758 "Frames/cs.ATG" 
388
485
la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) {
389
486
                        AssignmentOperator(
390
 
#line  1653 "cs.ATG" 
 
487
#line  1759 "Frames/cs.ATG" 
391
488
out op);
392
489
                        Expr(
393
 
#line  1653 "cs.ATG" 
 
490
#line  1759 "Frames/cs.ATG" 
394
491
out expr1);
395
492
 
396
 
#line  1653 "cs.ATG" 
 
493
#line  1759 "Frames/cs.ATG" 
397
494
                        expr = new AssignmentExpression(expr, op, expr1); 
398
 
                } else if (StartOf(7)) {
 
495
                } else if (StartOf(8)) {
399
496
                        ConditionalOrExpr(
400
 
#line  1655 "cs.ATG" 
 
497
#line  1761 "Frames/cs.ATG" 
401
498
ref expr);
402
499
                        if (la.kind == 13) {
403
500
                                lexer.NextToken();
404
501
                                Expr(
405
 
#line  1656 "cs.ATG" 
 
502
#line  1762 "Frames/cs.ATG" 
406
503
out expr1);
407
504
 
408
 
#line  1656 "cs.ATG" 
 
505
#line  1762 "Frames/cs.ATG" 
409
506
                                expr = new BinaryOperatorExpression(expr, BinaryOperatorType.NullCoalescing, expr1); 
410
507
                        }
411
508
                        if (la.kind == 12) {
412
509
                                lexer.NextToken();
413
510
                                Expr(
414
 
#line  1657 "cs.ATG" 
 
511
#line  1763 "Frames/cs.ATG" 
415
512
out expr1);
416
513
                                Expect(9);
417
514
                                Expr(
418
 
#line  1657 "cs.ATG" 
 
515
#line  1763 "Frames/cs.ATG" 
419
516
out expr2);
420
517
 
421
 
#line  1657 "cs.ATG" 
 
518
#line  1763 "Frames/cs.ATG" 
422
519
                                expr = new ConditionalExpression(expr, expr1, expr2);  
423
520
                        }
424
 
                } else SynErr(129);
 
521
                } else SynErr(150);
 
522
 
 
523
#line  1766 "Frames/cs.ATG" 
 
524
                if (expr != null) {
 
525
                expr.StartLocation = startLocation;
 
526
                expr.EndLocation = t.EndLocation;
 
527
                }
 
528
                
425
529
        }
426
530
 
427
531
        void AttributeSection(
428
 
#line  260 "cs.ATG" 
 
532
#line  287 "Frames/cs.ATG" 
429
533
out AttributeSection section) {
430
534
 
431
 
#line  262 "cs.ATG" 
 
535
#line  289 "Frames/cs.ATG" 
432
536
                string attributeTarget = "";
433
537
                List<ASTAttribute> attributes = new List<ASTAttribute>();
434
538
                ASTAttribute attribute;
436
540
                
437
541
                Expect(18);
438
542
 
439
 
#line  268 "cs.ATG" 
 
543
#line  295 "Frames/cs.ATG" 
440
544
                Location startPos = t.Location; 
441
545
                if (
442
 
#line  269 "cs.ATG" 
 
546
#line  296 "Frames/cs.ATG" 
443
547
IsLocalAttrTarget()) {
444
 
                        if (la.kind == 68) {
 
548
                        if (la.kind == 69) {
445
549
                                lexer.NextToken();
446
550
 
447
 
#line  270 "cs.ATG" 
 
551
#line  297 "Frames/cs.ATG" 
448
552
                                attributeTarget = "event";
449
 
                        } else if (la.kind == 100) {
 
553
                        } else if (la.kind == 101) {
450
554
                                lexer.NextToken();
451
555
 
452
 
#line  271 "cs.ATG" 
 
556
#line  298 "Frames/cs.ATG" 
453
557
                                attributeTarget = "return";
454
558
                        } else {
455
 
                                lexer.NextToken();
 
559
                                Identifier();
456
560
 
457
 
#line  272 "cs.ATG" 
458
 
                                if (t.val != "field"    || t.val != "method" ||
459
 
                                  t.val != "module"   || t.val != "param"  ||
460
 
                                  t.val != "property" || t.val != "type")
461
 
                                Error("attribute target specifier (event, return, field," +
462
 
                                      "method, module, param, property, or type) expected");
 
561
#line  299 "Frames/cs.ATG" 
 
562
                                if (t.val != "field"   && t.val != "method" &&
 
563
                                  t.val != "param" &&
 
564
                                  t.val != "property" && t.val != "type")
 
565
                                Error("attribute target specifier (field, event, method, param, property, return or type) expected");
463
566
                                attributeTarget = t.val;
464
567
                                
465
568
                        }
466
569
                        Expect(9);
467
570
                }
468
571
                Attribute(
469
 
#line  282 "cs.ATG" 
 
572
#line  308 "Frames/cs.ATG" 
470
573
out attribute);
471
574
 
472
 
#line  282 "cs.ATG" 
 
575
#line  308 "Frames/cs.ATG" 
473
576
                attributes.Add(attribute); 
474
577
                while (
475
 
#line  283 "cs.ATG" 
 
578
#line  309 "Frames/cs.ATG" 
476
579
NotFinalComma()) {
477
580
                        Expect(14);
478
581
                        Attribute(
479
 
#line  283 "cs.ATG" 
 
582
#line  309 "Frames/cs.ATG" 
480
583
out attribute);
481
584
 
482
 
#line  283 "cs.ATG" 
 
585
#line  309 "Frames/cs.ATG" 
483
586
                        attributes.Add(attribute); 
484
587
                }
485
588
                if (la.kind == 14) {
487
590
                }
488
591
                Expect(19);
489
592
 
490
 
#line  285 "cs.ATG" 
491
 
                section = new AttributeSection(attributeTarget, attributes);
492
 
                section.StartLocation = startPos;
493
 
                section.EndLocation = t.EndLocation;
 
593
#line  311 "Frames/cs.ATG" 
 
594
                section = new AttributeSection {
 
595
                   AttributeTarget = attributeTarget,
 
596
                   Attributes = attributes,
 
597
                   StartLocation = startPos,
 
598
                   EndLocation = t.EndLocation
 
599
                };
494
600
                
495
601
        }
496
602
 
497
603
        void TypeModifier(
498
 
#line  646 "cs.ATG" 
 
604
#line  680 "Frames/cs.ATG" 
499
605
ModifierList m) {
500
606
                switch (la.kind) {
501
 
                case 88: {
 
607
                case 89: {
502
608
                        lexer.NextToken();
503
609
 
504
 
#line  648 "cs.ATG" 
 
610
#line  682 "Frames/cs.ATG" 
505
611
                        m.Add(Modifiers.New, t.Location); 
506
612
                        break;
507
613
                }
 
614
                case 98: {
 
615
                        lexer.NextToken();
 
616
 
 
617
#line  683 "Frames/cs.ATG" 
 
618
                        m.Add(Modifiers.Public, t.Location); 
 
619
                        break;
 
620
                }
508
621
                case 97: {
509
622
                        lexer.NextToken();
510
623
 
511
 
#line  649 "cs.ATG" 
512
 
                        m.Add(Modifiers.Public, t.Location); 
 
624
#line  684 "Frames/cs.ATG" 
 
625
                        m.Add(Modifiers.Protected, t.Location); 
 
626
                        break;
 
627
                }
 
628
                case 84: {
 
629
                        lexer.NextToken();
 
630
 
 
631
#line  685 "Frames/cs.ATG" 
 
632
                        m.Add(Modifiers.Internal, t.Location); 
513
633
                        break;
514
634
                }
515
635
                case 96: {
516
636
                        lexer.NextToken();
517
637
 
518
 
#line  650 "cs.ATG" 
519
 
                        m.Add(Modifiers.Protected, t.Location); 
520
 
                        break;
521
 
                }
522
 
                case 83: {
523
 
                        lexer.NextToken();
524
 
 
525
 
#line  651 "cs.ATG" 
526
 
                        m.Add(Modifiers.Internal, t.Location); 
527
 
                        break;
528
 
                }
529
 
                case 95: {
530
 
                        lexer.NextToken();
531
 
 
532
 
#line  652 "cs.ATG" 
 
638
#line  686 "Frames/cs.ATG" 
533
639
                        m.Add(Modifiers.Private, t.Location); 
534
640
                        break;
535
641
                }
536
 
                case 118: {
 
642
                case 119: {
537
643
                        lexer.NextToken();
538
644
 
539
 
#line  653 "cs.ATG" 
 
645
#line  687 "Frames/cs.ATG" 
540
646
                        m.Add(Modifiers.Unsafe, t.Location); 
541
647
                        break;
542
648
                }
543
 
                case 48: {
 
649
                case 49: {
544
650
                        lexer.NextToken();
545
651
 
546
 
#line  654 "cs.ATG" 
 
652
#line  688 "Frames/cs.ATG" 
547
653
                        m.Add(Modifiers.Abstract, t.Location); 
548
654
                        break;
549
655
                }
550
 
                case 102: {
 
656
                case 103: {
551
657
                        lexer.NextToken();
552
658
 
553
 
#line  655 "cs.ATG" 
 
659
#line  689 "Frames/cs.ATG" 
554
660
                        m.Add(Modifiers.Sealed, t.Location); 
555
661
                        break;
556
662
                }
557
 
                case 106: {
 
663
                case 107: {
558
664
                        lexer.NextToken();
559
665
 
560
 
#line  656 "cs.ATG" 
 
666
#line  690 "Frames/cs.ATG" 
561
667
                        m.Add(Modifiers.Static, t.Location); 
562
668
                        break;
563
669
                }
564
 
                case 1: {
 
670
                case 126: {
565
671
                        lexer.NextToken();
566
672
 
567
 
#line  657 "cs.ATG" 
568
 
                        if (t.val == "partial") { m.Add(Modifiers.Partial, t.Location); } else { Error("Unexpected identifier"); } 
 
673
#line  691 "Frames/cs.ATG" 
 
674
                        m.Add(Modifiers.Partial, t.Location); 
569
675
                        break;
570
676
                }
571
 
                default: SynErr(130); break;
 
677
                default: SynErr(151); break;
572
678
                }
573
679
        }
574
680
 
575
681
        void TypeDecl(
576
 
#line  318 "cs.ATG" 
 
682
#line  347 "Frames/cs.ATG" 
577
683
ModifierList m, List<AttributeSection> attributes) {
578
684
 
579
 
#line  320 "cs.ATG" 
 
685
#line  349 "Frames/cs.ATG" 
580
686
                TypeReference type;
581
687
                List<TypeReference> names;
582
688
                List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
583
689
                string name;
584
690
                List<TemplateDefinition> templates;
585
691
                
586
 
                if (la.kind == 58) {
 
692
                if (la.kind == 59) {
587
693
 
588
 
#line  326 "cs.ATG" 
 
694
#line  355 "Frames/cs.ATG" 
589
695
                        m.Check(Modifiers.Classes); 
590
696
                        lexer.NextToken();
591
697
 
592
 
#line  327 "cs.ATG" 
 
698
#line  356 "Frames/cs.ATG" 
593
699
                        TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
594
700
                        templates = newType.Templates;
595
701
                        compilationUnit.AddChild(newType);
598
704
                        
599
705
                        newType.Type = Types.Class;
600
706
                        
601
 
                        Expect(1);
 
707
                        Identifier();
602
708
 
603
 
#line  335 "cs.ATG" 
 
709
#line  364 "Frames/cs.ATG" 
604
710
                        newType.Name = t.val; 
605
711
                        if (la.kind == 23) {
606
712
                                TypeParameterList(
607
 
#line  338 "cs.ATG" 
 
713
#line  367 "Frames/cs.ATG" 
608
714
templates);
609
715
                        }
610
716
                        if (la.kind == 9) {
611
717
                                ClassBase(
612
 
#line  340 "cs.ATG" 
 
718
#line  369 "Frames/cs.ATG" 
613
719
out names);
614
720
 
615
 
#line  340 "cs.ATG" 
 
721
#line  369 "Frames/cs.ATG" 
616
722
                                newType.BaseTypes = names; 
617
723
                        }
618
 
                        while (
619
 
#line  343 "cs.ATG" 
620
 
IdentIsWhere()) {
 
724
                        while (la.kind == 127) {
621
725
                                TypeParameterConstraintsClause(
622
 
#line  343 "cs.ATG" 
 
726
#line  372 "Frames/cs.ATG" 
623
727
templates);
624
728
                        }
625
729
 
626
 
#line  345 "cs.ATG" 
 
730
#line  374 "Frames/cs.ATG" 
627
731
                        newType.BodyStartLocation = t.EndLocation; 
628
732
                        Expect(16);
629
733
                        ClassBody();
632
736
                                lexer.NextToken();
633
737
                        }
634
738
 
635
 
#line  347 "cs.ATG" 
 
739
#line  378 "Frames/cs.ATG" 
636
740
                        newType.EndLocation = t.Location; 
637
741
                        compilationUnit.BlockEnd();
638
742
                        
639
 
                } else if (StartOf(8)) {
 
743
                } else if (StartOf(9)) {
640
744
 
641
 
#line  350 "cs.ATG" 
 
745
#line  381 "Frames/cs.ATG" 
642
746
                        m.Check(Modifiers.StructsInterfacesEnumsDelegates); 
643
 
                        if (la.kind == 108) {
 
747
                        if (la.kind == 109) {
644
748
                                lexer.NextToken();
645
749
 
646
 
#line  351 "cs.ATG" 
 
750
#line  382 "Frames/cs.ATG" 
647
751
                                TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
648
752
                                templates = newType.Templates;
649
753
                                newType.StartLocation = m.GetDeclarationLocation(t.Location);
651
755
                                compilationUnit.BlockStart(newType);
652
756
                                newType.Type = Types.Struct; 
653
757
                                
654
 
                                Expect(1);
 
758
                                Identifier();
655
759
 
656
 
#line  358 "cs.ATG" 
 
760
#line  389 "Frames/cs.ATG" 
657
761
                                newType.Name = t.val; 
658
762
                                if (la.kind == 23) {
659
763
                                        TypeParameterList(
660
 
#line  361 "cs.ATG" 
 
764
#line  392 "Frames/cs.ATG" 
661
765
templates);
662
766
                                }
663
767
                                if (la.kind == 9) {
664
768
                                        StructInterfaces(
665
 
#line  363 "cs.ATG" 
 
769
#line  394 "Frames/cs.ATG" 
666
770
out names);
667
771
 
668
 
#line  363 "cs.ATG" 
 
772
#line  394 "Frames/cs.ATG" 
669
773
                                        newType.BaseTypes = names; 
670
774
                                }
671
 
                                while (
672
 
#line  366 "cs.ATG" 
673
 
IdentIsWhere()) {
 
775
                                while (la.kind == 127) {
674
776
                                        TypeParameterConstraintsClause(
675
 
#line  366 "cs.ATG" 
 
777
#line  397 "Frames/cs.ATG" 
676
778
templates);
677
779
                                }
678
780
 
679
 
#line  369 "cs.ATG" 
 
781
#line  400 "Frames/cs.ATG" 
680
782
                                newType.BodyStartLocation = t.EndLocation; 
681
783
                                StructBody();
682
784
                                if (la.kind == 11) {
683
785
                                        lexer.NextToken();
684
786
                                }
685
787
 
686
 
#line  371 "cs.ATG" 
 
788
#line  402 "Frames/cs.ATG" 
687
789
                                newType.EndLocation = t.Location; 
688
790
                                compilationUnit.BlockEnd();
689
791
                                
690
 
                        } else if (la.kind == 82) {
 
792
                        } else if (la.kind == 83) {
691
793
                                lexer.NextToken();
692
794
 
693
 
#line  375 "cs.ATG" 
 
795
#line  406 "Frames/cs.ATG" 
694
796
                                TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
695
797
                                templates = newType.Templates;
696
798
                                compilationUnit.AddChild(newType);
698
800
                                newType.StartLocation = m.GetDeclarationLocation(t.Location);
699
801
                                newType.Type = Types.Interface;
700
802
                                
701
 
                                Expect(1);
 
803
                                Identifier();
702
804
 
703
 
#line  382 "cs.ATG" 
 
805
#line  413 "Frames/cs.ATG" 
704
806
                                newType.Name = t.val; 
705
807
                                if (la.kind == 23) {
706
808
                                        TypeParameterList(
707
 
#line  385 "cs.ATG" 
 
809
#line  416 "Frames/cs.ATG" 
708
810
templates);
709
811
                                }
710
812
                                if (la.kind == 9) {
711
813
                                        InterfaceBase(
712
 
#line  387 "cs.ATG" 
 
814
#line  418 "Frames/cs.ATG" 
713
815
out names);
714
816
 
715
 
#line  387 "cs.ATG" 
 
817
#line  418 "Frames/cs.ATG" 
716
818
                                        newType.BaseTypes = names; 
717
819
                                }
718
 
                                while (
719
 
#line  390 "cs.ATG" 
720
 
IdentIsWhere()) {
 
820
                                while (la.kind == 127) {
721
821
                                        TypeParameterConstraintsClause(
722
 
#line  390 "cs.ATG" 
 
822
#line  421 "Frames/cs.ATG" 
723
823
templates);
724
824
                                }
725
825
 
726
 
#line  392 "cs.ATG" 
 
826
#line  423 "Frames/cs.ATG" 
727
827
                                newType.BodyStartLocation = t.EndLocation; 
728
828
                                InterfaceBody();
729
829
                                if (la.kind == 11) {
730
830
                                        lexer.NextToken();
731
831
                                }
732
832
 
733
 
#line  394 "cs.ATG" 
 
833
#line  425 "Frames/cs.ATG" 
734
834
                                newType.EndLocation = t.Location; 
735
835
                                compilationUnit.BlockEnd();
736
836
                                
737
 
                        } else if (la.kind == 67) {
 
837
                        } else if (la.kind == 68) {
738
838
                                lexer.NextToken();
739
839
 
740
 
#line  398 "cs.ATG" 
 
840
#line  429 "Frames/cs.ATG" 
741
841
                                TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
742
842
                                compilationUnit.AddChild(newType);
743
843
                                compilationUnit.BlockStart(newType);
744
844
                                newType.StartLocation = m.GetDeclarationLocation(t.Location);
745
845
                                newType.Type = Types.Enum;
746
846
                                
747
 
                                Expect(1);
 
847
                                Identifier();
748
848
 
749
 
#line  404 "cs.ATG" 
 
849
#line  435 "Frames/cs.ATG" 
750
850
                                newType.Name = t.val; 
751
851
                                if (la.kind == 9) {
752
852
                                        lexer.NextToken();
753
853
                                        IntegralType(
754
 
#line  405 "cs.ATG" 
 
854
#line  436 "Frames/cs.ATG" 
755
855
out name);
756
856
 
757
 
#line  405 "cs.ATG" 
 
857
#line  436 "Frames/cs.ATG" 
758
858
                                        newType.BaseTypes.Add(new TypeReference(name)); 
759
859
                                }
760
860
 
761
 
#line  407 "cs.ATG" 
 
861
#line  438 "Frames/cs.ATG" 
762
862
                                newType.BodyStartLocation = t.EndLocation; 
763
863
                                EnumBody();
764
864
                                if (la.kind == 11) {
765
865
                                        lexer.NextToken();
766
866
                                }
767
867
 
768
 
#line  409 "cs.ATG" 
 
868
#line  440 "Frames/cs.ATG" 
769
869
                                newType.EndLocation = t.Location; 
770
870
                                compilationUnit.BlockEnd();
771
871
                                
772
872
                        } else {
773
873
                                lexer.NextToken();
774
874
 
775
 
#line  413 "cs.ATG" 
 
875
#line  444 "Frames/cs.ATG" 
776
876
                                DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes);
777
877
                                templates = delegateDeclr.Templates;
778
878
                                delegateDeclr.StartLocation = m.GetDeclarationLocation(t.Location);
779
879
                                
780
880
                                if (
781
 
#line  417 "cs.ATG" 
 
881
#line  448 "Frames/cs.ATG" 
782
882
NotVoidPointer()) {
783
 
                                        Expect(122);
 
883
                                        Expect(123);
784
884
 
785
 
#line  417 "cs.ATG" 
 
885
#line  448 "Frames/cs.ATG" 
786
886
                                        delegateDeclr.ReturnType = new TypeReference("void", 0, null); 
787
 
                                } else if (StartOf(9)) {
 
887
                                } else if (StartOf(10)) {
788
888
                                        Type(
789
 
#line  418 "cs.ATG" 
 
889
#line  449 "Frames/cs.ATG" 
790
890
out type);
791
891
 
792
 
#line  418 "cs.ATG" 
 
892
#line  449 "Frames/cs.ATG" 
793
893
                                        delegateDeclr.ReturnType = type; 
794
 
                                } else SynErr(131);
795
 
                                Expect(1);
 
894
                                } else SynErr(152);
 
895
                                Identifier();
796
896
 
797
 
#line  420 "cs.ATG" 
 
897
#line  451 "Frames/cs.ATG" 
798
898
                                delegateDeclr.Name = t.val; 
799
899
                                if (la.kind == 23) {
800
900
                                        TypeParameterList(
801
 
#line  423 "cs.ATG" 
 
901
#line  454 "Frames/cs.ATG" 
802
902
templates);
803
903
                                }
804
904
                                Expect(20);
805
 
                                if (StartOf(10)) {
 
905
                                if (StartOf(11)) {
806
906
                                        FormalParameterList(
807
 
#line  425 "cs.ATG" 
 
907
#line  456 "Frames/cs.ATG" 
808
908
p);
809
909
 
810
 
#line  425 "cs.ATG" 
 
910
#line  456 "Frames/cs.ATG" 
811
911
                                        delegateDeclr.Parameters = p; 
812
912
                                }
813
913
                                Expect(21);
814
 
                                while (
815
 
#line  429 "cs.ATG" 
816
 
IdentIsWhere()) {
 
914
                                while (la.kind == 127) {
817
915
                                        TypeParameterConstraintsClause(
818
 
#line  429 "cs.ATG" 
 
916
#line  460 "Frames/cs.ATG" 
819
917
templates);
820
918
                                }
821
919
                                Expect(11);
822
920
 
823
 
#line  431 "cs.ATG" 
 
921
#line  462 "Frames/cs.ATG" 
824
922
                                delegateDeclr.EndLocation = t.Location;
825
923
                                compilationUnit.AddChild(delegateDeclr);
826
924
                                
827
925
                        }
828
 
                } else SynErr(132);
 
926
                } else SynErr(153);
829
927
        }
830
928
 
831
929
        void TypeParameterList(
832
 
#line  2072 "cs.ATG" 
 
930
#line  2328 "Frames/cs.ATG" 
833
931
List<TemplateDefinition> templates) {
834
932
 
835
 
#line  2074 "cs.ATG" 
 
933
#line  2330 "Frames/cs.ATG" 
836
934
                AttributeSection section;
837
935
                List<AttributeSection> attributes = new List<AttributeSection>();
838
936
                
839
937
                Expect(23);
840
938
                while (la.kind == 18) {
841
939
                        AttributeSection(
842
 
#line  2078 "cs.ATG" 
 
940
#line  2334 "Frames/cs.ATG" 
843
941
out section);
844
942
 
845
 
#line  2078 "cs.ATG" 
 
943
#line  2334 "Frames/cs.ATG" 
846
944
                        attributes.Add(section); 
847
945
                }
848
 
                Expect(1);
 
946
                Identifier();
849
947
 
850
 
#line  2079 "cs.ATG" 
 
948
#line  2335 "Frames/cs.ATG" 
851
949
                templates.Add(new TemplateDefinition(t.val, attributes)); 
852
950
                while (la.kind == 14) {
853
951
                        lexer.NextToken();
854
952
                        while (la.kind == 18) {
855
953
                                AttributeSection(
856
 
#line  2080 "cs.ATG" 
 
954
#line  2336 "Frames/cs.ATG" 
857
955
out section);
858
956
 
859
 
#line  2080 "cs.ATG" 
 
957
#line  2336 "Frames/cs.ATG" 
860
958
                                attributes.Add(section); 
861
959
                        }
862
 
                        Expect(1);
 
960
                        Identifier();
863
961
 
864
 
#line  2081 "cs.ATG" 
 
962
#line  2337 "Frames/cs.ATG" 
865
963
                        templates.Add(new TemplateDefinition(t.val, attributes)); 
866
964
                }
867
965
                Expect(22);
868
966
        }
869
967
 
870
968
        void ClassBase(
871
 
#line  446 "cs.ATG" 
 
969
#line  477 "Frames/cs.ATG" 
872
970
out List<TypeReference> names) {
873
971
 
874
 
#line  448 "cs.ATG" 
 
972
#line  479 "Frames/cs.ATG" 
875
973
                TypeReference typeRef;
876
974
                names = new List<TypeReference>();
877
975
                
878
976
                Expect(9);
879
977
                ClassType(
880
 
#line  452 "cs.ATG" 
 
978
#line  483 "Frames/cs.ATG" 
881
979
out typeRef, false);
882
980
 
883
 
#line  452 "cs.ATG" 
 
981
#line  483 "Frames/cs.ATG" 
884
982
                if (typeRef != null) { names.Add(typeRef); } 
885
983
                while (la.kind == 14) {
886
984
                        lexer.NextToken();
887
985
                        TypeName(
888
 
#line  453 "cs.ATG" 
 
986
#line  484 "Frames/cs.ATG" 
889
987
out typeRef, false);
890
988
 
891
 
#line  453 "cs.ATG" 
 
989
#line  484 "Frames/cs.ATG" 
892
990
                        if (typeRef != null) { names.Add(typeRef); } 
893
991
                }
894
992
        }
895
993
 
896
994
        void TypeParameterConstraintsClause(
897
 
#line  2085 "cs.ATG" 
 
995
#line  2341 "Frames/cs.ATG" 
898
996
List<TemplateDefinition> templates) {
899
997
 
900
 
#line  2086 "cs.ATG" 
 
998
#line  2342 "Frames/cs.ATG" 
901
999
                string name = ""; TypeReference type; 
902
 
                Expect(1);
903
 
 
904
 
#line  2088 "cs.ATG" 
905
 
                if (t.val != "where") Error("where expected"); 
906
 
                Expect(1);
907
 
 
908
 
#line  2089 "cs.ATG" 
 
1000
                Expect(127);
 
1001
                Identifier();
 
1002
 
 
1003
#line  2345 "Frames/cs.ATG" 
909
1004
                name = t.val; 
910
1005
                Expect(9);
911
1006
                TypeParameterConstraintsClauseBase(
912
 
#line  2091 "cs.ATG" 
 
1007
#line  2347 "Frames/cs.ATG" 
913
1008
out type);
914
1009
 
915
 
#line  2092 "cs.ATG" 
 
1010
#line  2348 "Frames/cs.ATG" 
916
1011
                TemplateDefinition td = null;
917
1012
                foreach (TemplateDefinition d in templates) {
918
1013
                        if (d.Name == name) {
925
1020
                while (la.kind == 14) {
926
1021
                        lexer.NextToken();
927
1022
                        TypeParameterConstraintsClauseBase(
928
 
#line  2101 "cs.ATG" 
 
1023
#line  2357 "Frames/cs.ATG" 
929
1024
out type);
930
1025
 
931
 
#line  2102 "cs.ATG" 
 
1026
#line  2358 "Frames/cs.ATG" 
932
1027
                        td = null;
933
1028
                        foreach (TemplateDefinition d in templates) {
934
1029
                                if (d.Name == name) {
943
1038
 
944
1039
        void ClassBody() {
945
1040
 
946
 
#line  457 "cs.ATG" 
 
1041
#line  488 "Frames/cs.ATG" 
947
1042
                AttributeSection section; 
948
 
                while (StartOf(11)) {
 
1043
                while (StartOf(12)) {
949
1044
 
950
 
#line  459 "cs.ATG" 
 
1045
#line  490 "Frames/cs.ATG" 
951
1046
                        List<AttributeSection> attributes = new List<AttributeSection>();
952
1047
                        ModifierList m = new ModifierList();
953
1048
                        
 
1049
                        while (!(StartOf(13))) {SynErr(154); lexer.NextToken(); }
954
1050
                        while (la.kind == 18) {
955
1051
                                AttributeSection(
956
 
#line  462 "cs.ATG" 
 
1052
#line  494 "Frames/cs.ATG" 
957
1053
out section);
958
1054
 
959
 
#line  462 "cs.ATG" 
 
1055
#line  494 "Frames/cs.ATG" 
960
1056
                                attributes.Add(section); 
961
1057
                        }
962
1058
                        MemberModifiers(
963
 
#line  463 "cs.ATG" 
 
1059
#line  495 "Frames/cs.ATG" 
964
1060
m);
965
1061
                        ClassMemberDecl(
966
 
#line  464 "cs.ATG" 
 
1062
#line  496 "Frames/cs.ATG" 
967
1063
m, attributes);
968
1064
                }
969
1065
        }
970
1066
 
971
1067
        void StructInterfaces(
972
 
#line  468 "cs.ATG" 
 
1068
#line  500 "Frames/cs.ATG" 
973
1069
out List<TypeReference> names) {
974
1070
 
975
 
#line  470 "cs.ATG" 
 
1071
#line  502 "Frames/cs.ATG" 
976
1072
                TypeReference typeRef;
977
1073
                names = new List<TypeReference>();
978
1074
                
979
1075
                Expect(9);
980
1076
                TypeName(
981
 
#line  474 "cs.ATG" 
 
1077
#line  506 "Frames/cs.ATG" 
982
1078
out typeRef, false);
983
1079
 
984
 
#line  474 "cs.ATG" 
 
1080
#line  506 "Frames/cs.ATG" 
985
1081
                if (typeRef != null) { names.Add(typeRef); } 
986
1082
                while (la.kind == 14) {
987
1083
                        lexer.NextToken();
988
1084
                        TypeName(
989
 
#line  475 "cs.ATG" 
 
1085
#line  507 "Frames/cs.ATG" 
990
1086
out typeRef, false);
991
1087
 
992
 
#line  475 "cs.ATG" 
 
1088
#line  507 "Frames/cs.ATG" 
993
1089
                        if (typeRef != null) { names.Add(typeRef); } 
994
1090
                }
995
1091
        }
996
1092
 
997
1093
        void StructBody() {
998
1094
 
999
 
#line  479 "cs.ATG" 
 
1095
#line  511 "Frames/cs.ATG" 
1000
1096
                AttributeSection section; 
1001
1097
                Expect(16);
1002
 
                while (StartOf(12)) {
 
1098
                while (StartOf(14)) {
1003
1099
 
1004
 
#line  482 "cs.ATG" 
 
1100
#line  514 "Frames/cs.ATG" 
1005
1101
                        List<AttributeSection> attributes = new List<AttributeSection>();
1006
1102
                        ModifierList m = new ModifierList();
1007
1103
                        
1008
1104
                        while (la.kind == 18) {
1009
1105
                                AttributeSection(
1010
 
#line  485 "cs.ATG" 
 
1106
#line  517 "Frames/cs.ATG" 
1011
1107
out section);
1012
1108
 
1013
 
#line  485 "cs.ATG" 
 
1109
#line  517 "Frames/cs.ATG" 
1014
1110
                                attributes.Add(section); 
1015
1111
                        }
1016
1112
                        MemberModifiers(
1017
 
#line  486 "cs.ATG" 
 
1113
#line  518 "Frames/cs.ATG" 
1018
1114
m);
1019
1115
                        StructMemberDecl(
1020
 
#line  487 "cs.ATG" 
 
1116
#line  519 "Frames/cs.ATG" 
1021
1117
m, attributes);
1022
1118
                }
1023
1119
                Expect(17);
1024
1120
        }
1025
1121
 
1026
1122
        void InterfaceBase(
1027
 
#line  492 "cs.ATG" 
 
1123
#line  524 "Frames/cs.ATG" 
1028
1124
out List<TypeReference> names) {
1029
1125
 
1030
 
#line  494 "cs.ATG" 
 
1126
#line  526 "Frames/cs.ATG" 
1031
1127
                TypeReference typeRef;
1032
1128
                names = new List<TypeReference>();
1033
1129
                
1034
1130
                Expect(9);
1035
1131
                TypeName(
1036
 
#line  498 "cs.ATG" 
 
1132
#line  530 "Frames/cs.ATG" 
1037
1133
out typeRef, false);
1038
1134
 
1039
 
#line  498 "cs.ATG" 
 
1135
#line  530 "Frames/cs.ATG" 
1040
1136
                if (typeRef != null) { names.Add(typeRef); } 
1041
1137
                while (la.kind == 14) {
1042
1138
                        lexer.NextToken();
1043
1139
                        TypeName(
1044
 
#line  499 "cs.ATG" 
 
1140
#line  531 "Frames/cs.ATG" 
1045
1141
out typeRef, false);
1046
1142
 
1047
 
#line  499 "cs.ATG" 
 
1143
#line  531 "Frames/cs.ATG" 
1048
1144
                        if (typeRef != null) { names.Add(typeRef); } 
1049
1145
                }
1050
1146
        }
1051
1147
 
1052
1148
        void InterfaceBody() {
1053
1149
                Expect(16);
1054
 
                while (StartOf(13)) {
 
1150
                while (StartOf(15)) {
 
1151
                        while (!(StartOf(16))) {SynErr(155); lexer.NextToken(); }
1055
1152
                        InterfaceMemberDecl();
1056
1153
                }
1057
1154
                Expect(17);
1058
1155
        }
1059
1156
 
1060
1157
        void IntegralType(
1061
 
#line  668 "cs.ATG" 
 
1158
#line  702 "Frames/cs.ATG" 
1062
1159
out string name) {
1063
1160
 
1064
 
#line  668 "cs.ATG" 
 
1161
#line  702 "Frames/cs.ATG" 
1065
1162
                name = ""; 
1066
1163
                switch (la.kind) {
1067
 
                case 101: {
 
1164
                case 102: {
1068
1165
                        lexer.NextToken();
1069
1166
 
1070
 
#line  670 "cs.ATG" 
 
1167
#line  704 "Frames/cs.ATG" 
1071
1168
                        name = "sbyte"; 
1072
1169
                        break;
1073
1170
                }
1074
 
                case 53: {
 
1171
                case 54: {
1075
1172
                        lexer.NextToken();
1076
1173
 
1077
 
#line  671 "cs.ATG" 
 
1174
#line  705 "Frames/cs.ATG" 
1078
1175
                        name = "byte"; 
1079
1176
                        break;
1080
1177
                }
1081
 
                case 103: {
 
1178
                case 104: {
1082
1179
                        lexer.NextToken();
1083
1180
 
1084
 
#line  672 "cs.ATG" 
 
1181
#line  706 "Frames/cs.ATG" 
1085
1182
                        name = "short"; 
1086
1183
                        break;
1087
1184
                }
1088
 
                case 119: {
 
1185
                case 120: {
1089
1186
                        lexer.NextToken();
1090
1187
 
1091
 
#line  673 "cs.ATG" 
 
1188
#line  707 "Frames/cs.ATG" 
1092
1189
                        name = "ushort"; 
1093
1190
                        break;
1094
1191
                }
1095
 
                case 81: {
 
1192
                case 82: {
1096
1193
                        lexer.NextToken();
1097
1194
 
1098
 
#line  674 "cs.ATG" 
 
1195
#line  708 "Frames/cs.ATG" 
1099
1196
                        name = "int"; 
1100
1197
                        break;
1101
1198
                }
1102
 
                case 115: {
 
1199
                case 116: {
1103
1200
                        lexer.NextToken();
1104
1201
 
1105
 
#line  675 "cs.ATG" 
 
1202
#line  709 "Frames/cs.ATG" 
1106
1203
                        name = "uint"; 
1107
1204
                        break;
1108
1205
                }
1109
 
                case 86: {
 
1206
                case 87: {
1110
1207
                        lexer.NextToken();
1111
1208
 
1112
 
#line  676 "cs.ATG" 
 
1209
#line  710 "Frames/cs.ATG" 
1113
1210
                        name = "long"; 
1114
1211
                        break;
1115
1212
                }
1116
 
                case 116: {
 
1213
                case 117: {
1117
1214
                        lexer.NextToken();
1118
1215
 
1119
 
#line  677 "cs.ATG" 
 
1216
#line  711 "Frames/cs.ATG" 
1120
1217
                        name = "ulong"; 
1121
1218
                        break;
1122
1219
                }
1123
 
                case 56: {
 
1220
                case 57: {
1124
1221
                        lexer.NextToken();
1125
1222
 
1126
 
#line  678 "cs.ATG" 
 
1223
#line  712 "Frames/cs.ATG" 
1127
1224
                        name = "char"; 
1128
1225
                        break;
1129
1226
                }
1130
 
                default: SynErr(133); break;
 
1227
                default: SynErr(156); break;
1131
1228
                }
1132
1229
        }
1133
1230
 
1134
1231
        void EnumBody() {
1135
1232
 
1136
 
#line  508 "cs.ATG" 
 
1233
#line  540 "Frames/cs.ATG" 
1137
1234
                FieldDeclaration f; 
1138
1235
                Expect(16);
1139
 
                if (la.kind == 1 || la.kind == 18) {
 
1236
                if (StartOf(17)) {
1140
1237
                        EnumMemberDecl(
1141
 
#line  511 "cs.ATG" 
 
1238
#line  543 "Frames/cs.ATG" 
1142
1239
out f);
1143
1240
 
1144
 
#line  511 "cs.ATG" 
 
1241
#line  543 "Frames/cs.ATG" 
1145
1242
                        compilationUnit.AddChild(f); 
1146
1243
                        while (
1147
 
#line  512 "cs.ATG" 
 
1244
#line  544 "Frames/cs.ATG" 
1148
1245
NotFinalComma()) {
1149
1246
                                Expect(14);
1150
1247
                                EnumMemberDecl(
1151
 
#line  513 "cs.ATG" 
 
1248
#line  545 "Frames/cs.ATG" 
1152
1249
out f);
1153
1250
 
1154
 
#line  513 "cs.ATG" 
 
1251
#line  545 "Frames/cs.ATG" 
1155
1252
                                compilationUnit.AddChild(f); 
1156
1253
                        }
1157
1254
                        if (la.kind == 14) {
1162
1259
        }
1163
1260
 
1164
1261
        void Type(
1165
 
#line  518 "cs.ATG" 
 
1262
#line  551 "Frames/cs.ATG" 
1166
1263
out TypeReference type) {
1167
1264
                TypeWithRestriction(
1168
 
#line  520 "cs.ATG" 
 
1265
#line  553 "Frames/cs.ATG" 
1169
1266
out type, true, false);
1170
1267
        }
1171
1268
 
1172
1269
        void FormalParameterList(
1173
 
#line  590 "cs.ATG" 
 
1270
#line  624 "Frames/cs.ATG" 
1174
1271
List<ParameterDeclarationExpression> parameter) {
1175
1272
 
1176
 
#line  593 "cs.ATG" 
 
1273
#line  627 "Frames/cs.ATG" 
1177
1274
                ParameterDeclarationExpression p;
1178
1275
                AttributeSection section;
1179
1276
                List<AttributeSection> attributes = new List<AttributeSection>();
1180
1277
                
1181
1278
                while (la.kind == 18) {
1182
1279
                        AttributeSection(
1183
 
#line  598 "cs.ATG" 
 
1280
#line  632 "Frames/cs.ATG" 
1184
1281
out section);
1185
1282
 
1186
 
#line  598 "cs.ATG" 
 
1283
#line  632 "Frames/cs.ATG" 
1187
1284
                        attributes.Add(section); 
1188
1285
                }
1189
 
                if (StartOf(14)) {
 
1286
                if (StartOf(18)) {
1190
1287
                        FixedParameter(
1191
 
#line  600 "cs.ATG" 
 
1288
#line  634 "Frames/cs.ATG" 
1192
1289
out p);
1193
1290
 
1194
 
#line  600 "cs.ATG" 
 
1291
#line  634 "Frames/cs.ATG" 
1195
1292
                        bool paramsFound = false;
1196
1293
                        p.Attributes = attributes;
1197
1294
                        parameter.Add(p);
1199
1296
                        while (la.kind == 14) {
1200
1297
                                lexer.NextToken();
1201
1298
 
1202
 
#line  605 "cs.ATG" 
 
1299
#line  639 "Frames/cs.ATG" 
1203
1300
                                attributes = new List<AttributeSection>(); if (paramsFound) Error("params array must be at end of parameter list"); 
1204
1301
                                while (la.kind == 18) {
1205
1302
                                        AttributeSection(
1206
 
#line  606 "cs.ATG" 
 
1303
#line  640 "Frames/cs.ATG" 
1207
1304
out section);
1208
1305
 
1209
 
#line  606 "cs.ATG" 
 
1306
#line  640 "Frames/cs.ATG" 
1210
1307
                                        attributes.Add(section); 
1211
1308
                                }
1212
 
                                if (StartOf(14)) {
 
1309
                                if (StartOf(18)) {
1213
1310
                                        FixedParameter(
1214
 
#line  608 "cs.ATG" 
 
1311
#line  642 "Frames/cs.ATG" 
1215
1312
out p);
1216
1313
 
1217
 
#line  608 "cs.ATG" 
 
1314
#line  642 "Frames/cs.ATG" 
1218
1315
                                        p.Attributes = attributes; parameter.Add(p); 
1219
 
                                } else if (la.kind == 94) {
 
1316
                                } else if (la.kind == 95) {
1220
1317
                                        ParameterArray(
1221
 
#line  609 "cs.ATG" 
 
1318
#line  643 "Frames/cs.ATG" 
1222
1319
out p);
1223
1320
 
1224
 
#line  609 "cs.ATG" 
 
1321
#line  643 "Frames/cs.ATG" 
1225
1322
                                        paramsFound = true; p.Attributes = attributes; parameter.Add(p); 
1226
 
                                } else SynErr(134);
 
1323
                                } else SynErr(157);
1227
1324
                        }
1228
 
                } else if (la.kind == 94) {
 
1325
                } else if (la.kind == 95) {
1229
1326
                        ParameterArray(
1230
 
#line  612 "cs.ATG" 
 
1327
#line  646 "Frames/cs.ATG" 
1231
1328
out p);
1232
1329
 
1233
 
#line  612 "cs.ATG" 
 
1330
#line  646 "Frames/cs.ATG" 
1234
1331
                        p.Attributes = attributes; parameter.Add(p); 
1235
 
                } else SynErr(135);
 
1332
                } else SynErr(158);
1236
1333
        }
1237
1334
 
1238
1335
        void ClassType(
1239
 
#line  660 "cs.ATG" 
 
1336
#line  694 "Frames/cs.ATG" 
1240
1337
out TypeReference typeRef, bool canBeUnbound) {
1241
1338
 
1242
 
#line  661 "cs.ATG" 
 
1339
#line  695 "Frames/cs.ATG" 
1243
1340
                TypeReference r; typeRef = null; 
1244
 
                if (la.kind == 1) {
 
1341
                if (StartOf(19)) {
1245
1342
                        TypeName(
1246
 
#line  663 "cs.ATG" 
 
1343
#line  697 "Frames/cs.ATG" 
1247
1344
out r, canBeUnbound);
1248
1345
 
1249
 
#line  663 "cs.ATG" 
 
1346
#line  697 "Frames/cs.ATG" 
1250
1347
                        typeRef = r; 
1251
 
                } else if (la.kind == 90) {
1252
 
                        lexer.NextToken();
1253
 
 
1254
 
#line  664 "cs.ATG" 
1255
 
                        typeRef = new TypeReference("object"); 
1256
 
                } else if (la.kind == 107) {
1257
 
                        lexer.NextToken();
1258
 
 
1259
 
#line  665 "cs.ATG" 
1260
 
                        typeRef = new TypeReference("string"); 
1261
 
                } else SynErr(136);
 
1348
                } else if (la.kind == 91) {
 
1349
                        lexer.NextToken();
 
1350
 
 
1351
#line  698 "Frames/cs.ATG" 
 
1352
                        typeRef = new TypeReference("object"); typeRef.StartLocation = t.Location; 
 
1353
                } else if (la.kind == 108) {
 
1354
                        lexer.NextToken();
 
1355
 
 
1356
#line  699 "Frames/cs.ATG" 
 
1357
                        typeRef = new TypeReference("string"); typeRef.StartLocation = t.Location; 
 
1358
                } else SynErr(159);
1262
1359
        }
1263
1360
 
1264
1361
        void TypeName(
1265
 
#line  2015 "cs.ATG" 
 
1362
#line  2269 "Frames/cs.ATG" 
1266
1363
out TypeReference typeRef, bool canBeUnbound) {
1267
1364
 
1268
 
#line  2016 "cs.ATG" 
 
1365
#line  2270 "Frames/cs.ATG" 
1269
1366
                List<TypeReference> typeArguments = null;
1270
1367
                string alias = null;
1271
1368
                string qualident;
 
1369
                Location start = la.Location;
1272
1370
                
1273
1371
                if (
1274
 
#line  2021 "cs.ATG" 
1275
 
la.kind == Tokens.Identifier && Peek(1).kind == Tokens.DoubleColon) {
1276
 
                        lexer.NextToken();
 
1372
#line  2276 "Frames/cs.ATG" 
 
1373
IdentAndDoubleColon()) {
 
1374
                        Identifier();
1277
1375
 
1278
 
#line  2022 "cs.ATG" 
 
1376
#line  2277 "Frames/cs.ATG" 
1279
1377
                        alias = t.val; 
1280
1378
                        Expect(10);
1281
1379
                }
1282
1380
                Qualident(
1283
 
#line  2025 "cs.ATG" 
 
1381
#line  2280 "Frames/cs.ATG" 
1284
1382
out qualident);
1285
1383
                if (la.kind == 23) {
1286
1384
                        TypeArgumentList(
1287
 
#line  2026 "cs.ATG" 
 
1385
#line  2281 "Frames/cs.ATG" 
1288
1386
out typeArguments, canBeUnbound);
1289
1387
                }
1290
1388
 
1291
 
#line  2028 "cs.ATG" 
 
1389
#line  2283 "Frames/cs.ATG" 
1292
1390
                if (alias == null) {
1293
1391
                typeRef = new TypeReference(qualident, typeArguments);
1294
1392
                } else if (alias == "global") {
1299
1397
                }
1300
1398
                
1301
1399
                while (
1302
 
#line  2037 "cs.ATG" 
 
1400
#line  2292 "Frames/cs.ATG" 
1303
1401
DotAndIdent()) {
1304
1402
                        Expect(15);
1305
1403
 
1306
 
#line  2038 "cs.ATG" 
 
1404
#line  2293 "Frames/cs.ATG" 
1307
1405
                        typeArguments = null; 
1308
1406
                        Qualident(
1309
 
#line  2039 "cs.ATG" 
 
1407
#line  2294 "Frames/cs.ATG" 
1310
1408
out qualident);
1311
1409
                        if (la.kind == 23) {
1312
1410
                                TypeArgumentList(
1313
 
#line  2040 "cs.ATG" 
 
1411
#line  2295 "Frames/cs.ATG" 
1314
1412
out typeArguments, canBeUnbound);
1315
1413
                        }
1316
1414
 
1317
 
#line  2041 "cs.ATG" 
 
1415
#line  2296 "Frames/cs.ATG" 
1318
1416
                        typeRef = new InnerClassTypeReference(typeRef, qualident, typeArguments); 
1319
1417
                }
 
1418
 
 
1419
#line  2298 "Frames/cs.ATG" 
 
1420
                typeRef.StartLocation = start; 
1320
1421
        }
1321
1422
 
1322
1423
        void MemberModifiers(
1323
 
#line  681 "cs.ATG" 
 
1424
#line  715 "Frames/cs.ATG" 
1324
1425
ModifierList m) {
1325
 
                while (StartOf(15) || 
1326
 
#line  699 "cs.ATG" 
1327
 
la.kind == Tokens.Identifier && la.val == "partial") {
1328
 
                        if (la.kind == 48) {
 
1426
                while (StartOf(20)) {
 
1427
                        switch (la.kind) {
 
1428
                        case 49: {
1329
1429
                                lexer.NextToken();
1330
1430
 
1331
 
#line  684 "cs.ATG" 
 
1431
#line  718 "Frames/cs.ATG" 
1332
1432
                                m.Add(Modifiers.Abstract, t.Location); 
1333
 
                        } else if (la.kind == 70) {
 
1433
                                break;
 
1434
                        }
 
1435
                        case 71: {
1334
1436
                                lexer.NextToken();
1335
1437
 
1336
 
#line  685 "cs.ATG" 
 
1438
#line  719 "Frames/cs.ATG" 
1337
1439
                                m.Add(Modifiers.Extern, t.Location); 
1338
 
                        } else if (la.kind == 83) {
 
1440
                                break;
 
1441
                        }
 
1442
                        case 84: {
1339
1443
                                lexer.NextToken();
1340
1444
 
1341
 
#line  686 "cs.ATG" 
 
1445
#line  720 "Frames/cs.ATG" 
1342
1446
                                m.Add(Modifiers.Internal, t.Location); 
1343
 
                        } else if (la.kind == 88) {
 
1447
                                break;
 
1448
                        }
 
1449
                        case 89: {
1344
1450
                                lexer.NextToken();
1345
1451
 
1346
 
#line  687 "cs.ATG" 
 
1452
#line  721 "Frames/cs.ATG" 
1347
1453
                                m.Add(Modifiers.New, t.Location); 
1348
 
                        } else if (la.kind == 93) {
 
1454
                                break;
 
1455
                        }
 
1456
                        case 94: {
1349
1457
                                lexer.NextToken();
1350
1458
 
1351
 
#line  688 "cs.ATG" 
 
1459
#line  722 "Frames/cs.ATG" 
1352
1460
                                m.Add(Modifiers.Override, t.Location); 
1353
 
                        } else if (la.kind == 95) {
 
1461
                                break;
 
1462
                        }
 
1463
                        case 96: {
1354
1464
                                lexer.NextToken();
1355
1465
 
1356
 
#line  689 "cs.ATG" 
 
1466
#line  723 "Frames/cs.ATG" 
1357
1467
                                m.Add(Modifiers.Private, t.Location); 
1358
 
                        } else if (la.kind == 96) {
 
1468
                                break;
 
1469
                        }
 
1470
                        case 97: {
1359
1471
                                lexer.NextToken();
1360
1472
 
1361
 
#line  690 "cs.ATG" 
 
1473
#line  724 "Frames/cs.ATG" 
1362
1474
                                m.Add(Modifiers.Protected, t.Location); 
1363
 
                        } else if (la.kind == 97) {
 
1475
                                break;
 
1476
                        }
 
1477
                        case 98: {
1364
1478
                                lexer.NextToken();
1365
1479
 
1366
 
#line  691 "cs.ATG" 
 
1480
#line  725 "Frames/cs.ATG" 
1367
1481
                                m.Add(Modifiers.Public, t.Location); 
1368
 
                        } else if (la.kind == 98) {
 
1482
                                break;
 
1483
                        }
 
1484
                        case 99: {
1369
1485
                                lexer.NextToken();
1370
1486
 
1371
 
#line  692 "cs.ATG" 
 
1487
#line  726 "Frames/cs.ATG" 
1372
1488
                                m.Add(Modifiers.ReadOnly, t.Location); 
1373
 
                        } else if (la.kind == 102) {
 
1489
                                break;
 
1490
                        }
 
1491
                        case 103: {
1374
1492
                                lexer.NextToken();
1375
1493
 
1376
 
#line  693 "cs.ATG" 
 
1494
#line  727 "Frames/cs.ATG" 
1377
1495
                                m.Add(Modifiers.Sealed, t.Location); 
1378
 
                        } else if (la.kind == 106) {
 
1496
                                break;
 
1497
                        }
 
1498
                        case 107: {
1379
1499
                                lexer.NextToken();
1380
1500
 
1381
 
#line  694 "cs.ATG" 
 
1501
#line  728 "Frames/cs.ATG" 
1382
1502
                                m.Add(Modifiers.Static, t.Location); 
1383
 
                        } else if (la.kind == 73) {
 
1503
                                break;
 
1504
                        }
 
1505
                        case 74: {
1384
1506
                                lexer.NextToken();
1385
1507
 
1386
 
#line  695 "cs.ATG" 
 
1508
#line  729 "Frames/cs.ATG" 
1387
1509
                                m.Add(Modifiers.Fixed, t.Location); 
1388
 
                        } else if (la.kind == 118) {
 
1510
                                break;
 
1511
                        }
 
1512
                        case 119: {
1389
1513
                                lexer.NextToken();
1390
1514
 
1391
 
#line  696 "cs.ATG" 
 
1515
#line  730 "Frames/cs.ATG" 
1392
1516
                                m.Add(Modifiers.Unsafe, t.Location); 
1393
 
                        } else if (la.kind == 121) {
 
1517
                                break;
 
1518
                        }
 
1519
                        case 122: {
1394
1520
                                lexer.NextToken();
1395
1521
 
1396
 
#line  697 "cs.ATG" 
 
1522
#line  731 "Frames/cs.ATG" 
1397
1523
                                m.Add(Modifiers.Virtual, t.Location); 
1398
 
                        } else if (la.kind == 123) {
 
1524
                                break;
 
1525
                        }
 
1526
                        case 124: {
1399
1527
                                lexer.NextToken();
1400
1528
 
1401
 
#line  698 "cs.ATG" 
 
1529
#line  732 "Frames/cs.ATG" 
1402
1530
                                m.Add(Modifiers.Volatile, t.Location); 
1403
 
                        } else {
1404
 
                                Expect(1);
 
1531
                                break;
 
1532
                        }
 
1533
                        case 126: {
 
1534
                                lexer.NextToken();
1405
1535
 
1406
 
#line  700 "cs.ATG" 
 
1536
#line  733 "Frames/cs.ATG" 
1407
1537
                                m.Add(Modifiers.Partial, t.Location); 
 
1538
                                break;
 
1539
                        }
1408
1540
                        }
1409
1541
                }
1410
1542
        }
1411
1543
 
1412
1544
        void ClassMemberDecl(
1413
 
#line  996 "cs.ATG" 
 
1545
#line  1046 "Frames/cs.ATG" 
1414
1546
ModifierList m, List<AttributeSection> attributes) {
1415
1547
 
1416
 
#line  997 "cs.ATG" 
 
1548
#line  1047 "Frames/cs.ATG" 
1417
1549
                Statement stmt = null; 
1418
 
                if (StartOf(16)) {
 
1550
                if (StartOf(21)) {
1419
1551
                        StructMemberDecl(
1420
 
#line  999 "cs.ATG" 
 
1552
#line  1049 "Frames/cs.ATG" 
1421
1553
m, attributes);
1422
1554
                } else if (la.kind == 27) {
1423
1555
 
1424
 
#line  1000 "cs.ATG" 
1425
 
                        m.Check(Modifiers.Destructors); Location startPos = t.Location; 
 
1556
#line  1050 "Frames/cs.ATG" 
 
1557
                        m.Check(Modifiers.Destructors); 
1426
1558
                        lexer.NextToken();
1427
 
                        Expect(1);
1428
 
 
1429
 
#line  1001 "cs.ATG" 
 
1559
 
 
1560
#line  1051 "Frames/cs.ATG" 
 
1561
                        Location startPos = t.Location; 
 
1562
                        Identifier();
 
1563
 
 
1564
#line  1051 "Frames/cs.ATG" 
1430
1565
                        DestructorDeclaration d = new DestructorDeclaration(t.val, m.Modifier, attributes); 
1431
1566
                        d.Modifier = m.Modifier;
1432
1567
                        d.StartLocation = m.GetDeclarationLocation(startPos);
1434
1569
                        Expect(20);
1435
1570
                        Expect(21);
1436
1571
 
1437
 
#line  1005 "cs.ATG" 
 
1572
#line  1055 "Frames/cs.ATG" 
1438
1573
                        d.EndLocation = t.EndLocation; 
1439
1574
                        if (la.kind == 16) {
1440
1575
                                Block(
1441
 
#line  1005 "cs.ATG" 
 
1576
#line  1055 "Frames/cs.ATG" 
1442
1577
out stmt);
1443
1578
                        } else if (la.kind == 11) {
1444
1579
                                lexer.NextToken();
1445
 
                        } else SynErr(137);
 
1580
                        } else SynErr(160);
1446
1581
 
1447
 
#line  1006 "cs.ATG" 
 
1582
#line  1056 "Frames/cs.ATG" 
1448
1583
                        d.Body = (BlockStatement)stmt;
1449
1584
                        compilationUnit.AddChild(d);
1450
1585
                        
1451
 
                } else SynErr(138);
 
1586
                } else SynErr(161);
1452
1587
        }
1453
1588
 
1454
1589
        void StructMemberDecl(
1455
 
#line  705 "cs.ATG" 
 
1590
#line  737 "Frames/cs.ATG" 
1456
1591
ModifierList m, List<AttributeSection> attributes) {
1457
1592
 
1458
 
#line  707 "cs.ATG" 
 
1593
#line  739 "Frames/cs.ATG" 
1459
1594
                string qualident = null;
1460
1595
                TypeReference type;
1461
1596
                Expression expr;
1464
1599
                List<VariableDeclaration> variableDeclarators = new List<VariableDeclaration>();
1465
1600
                List<TemplateDefinition> templates = new List<TemplateDefinition>();
1466
1601
                TypeReference explicitInterface = null;
 
1602
                bool isExtensionMethod = false;
1467
1603
                
1468
 
                if (la.kind == 59) {
 
1604
                if (la.kind == 60) {
1469
1605
 
1470
 
#line  717 "cs.ATG" 
 
1606
#line  750 "Frames/cs.ATG" 
1471
1607
                        m.Check(Modifiers.Constants); 
1472
1608
                        lexer.NextToken();
1473
1609
 
1474
 
#line  718 "cs.ATG" 
 
1610
#line  751 "Frames/cs.ATG" 
1475
1611
                        Location startPos = t.Location; 
1476
1612
                        Type(
1477
 
#line  719 "cs.ATG" 
 
1613
#line  752 "Frames/cs.ATG" 
1478
1614
out type);
1479
 
                        Expect(1);
 
1615
                        Identifier();
1480
1616
 
1481
 
#line  719 "cs.ATG" 
 
1617
#line  752 "Frames/cs.ATG" 
1482
1618
                        FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier | Modifiers.Const);
1483
1619
                        fd.StartLocation = m.GetDeclarationLocation(startPos);
1484
1620
                        VariableDeclaration f = new VariableDeclaration(t.val);
1485
1621
                        f.StartLocation = t.Location;
1486
1622
                        f.TypeReference = type;
1487
 
                        fd.Fields.Add(f);
 
1623
                        SafeAdd(fd, fd.Fields, f);
1488
1624
                        
1489
1625
                        Expect(3);
1490
1626
                        Expr(
1491
 
#line  726 "cs.ATG" 
 
1627
#line  759 "Frames/cs.ATG" 
1492
1628
out expr);
1493
1629
 
1494
 
#line  726 "cs.ATG" 
 
1630
#line  759 "Frames/cs.ATG" 
1495
1631
                        f.Initializer = expr; 
1496
1632
                        while (la.kind == 14) {
1497
1633
                                lexer.NextToken();
1498
 
                                Expect(1);
 
1634
                                Identifier();
1499
1635
 
1500
 
#line  727 "cs.ATG" 
 
1636
#line  760 "Frames/cs.ATG" 
1501
1637
                                f = new VariableDeclaration(t.val);
1502
1638
                                f.StartLocation = t.Location;
1503
1639
                                f.TypeReference = type;
1504
 
                                fd.Fields.Add(f);
 
1640
                                SafeAdd(fd, fd.Fields, f);
1505
1641
                                
1506
1642
                                Expect(3);
1507
1643
                                Expr(
1508
 
#line  732 "cs.ATG" 
 
1644
#line  765 "Frames/cs.ATG" 
1509
1645
out expr);
1510
1646
 
1511
 
#line  732 "cs.ATG" 
 
1647
#line  765 "Frames/cs.ATG" 
1512
1648
                                f.EndLocation = t.EndLocation; f.Initializer = expr; 
1513
1649
                        }
1514
1650
                        Expect(11);
1515
1651
 
1516
 
#line  733 "cs.ATG" 
 
1652
#line  766 "Frames/cs.ATG" 
1517
1653
                        fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd); 
1518
1654
                } else if (
1519
 
#line  737 "cs.ATG" 
 
1655
#line  770 "Frames/cs.ATG" 
1520
1656
NotVoidPointer()) {
1521
1657
 
1522
 
#line  737 "cs.ATG" 
 
1658
#line  770 "Frames/cs.ATG" 
1523
1659
                        m.Check(Modifiers.PropertysEventsMethods); 
1524
 
                        Expect(122);
 
1660
                        Expect(123);
1525
1661
 
1526
 
#line  738 "cs.ATG" 
 
1662
#line  771 "Frames/cs.ATG" 
1527
1663
                        Location startPos = t.Location; 
1528
1664
                        if (
1529
 
#line  739 "cs.ATG" 
 
1665
#line  772 "Frames/cs.ATG" 
1530
1666
IsExplicitInterfaceImplementation()) {
1531
1667
                                TypeName(
1532
 
#line  740 "cs.ATG" 
 
1668
#line  773 "Frames/cs.ATG" 
1533
1669
out explicitInterface, false);
1534
1670
 
1535
 
#line  741 "cs.ATG" 
 
1671
#line  774 "Frames/cs.ATG" 
1536
1672
                                if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) {
1537
1673
                                qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface);
1538
1674
                                 } 
1539
 
                        } else if (la.kind == 1) {
1540
 
                                lexer.NextToken();
 
1675
                        } else if (StartOf(19)) {
 
1676
                                Identifier();
1541
1677
 
1542
 
#line  744 "cs.ATG" 
 
1678
#line  777 "Frames/cs.ATG" 
1543
1679
                                qualident = t.val; 
1544
 
                        } else SynErr(139);
 
1680
                        } else SynErr(162);
1545
1681
                        if (la.kind == 23) {
1546
1682
                                TypeParameterList(
1547
 
#line  747 "cs.ATG" 
 
1683
#line  780 "Frames/cs.ATG" 
1548
1684
templates);
1549
1685
                        }
1550
1686
                        Expect(20);
1551
 
                        if (StartOf(10)) {
 
1687
                        if (la.kind == 111) {
 
1688
                                lexer.NextToken();
 
1689
 
 
1690
#line  783 "Frames/cs.ATG" 
 
1691
                                isExtensionMethod = true; /* C# 3.0 */ 
 
1692
                        }
 
1693
                        if (StartOf(11)) {
1552
1694
                                FormalParameterList(
1553
 
#line  750 "cs.ATG" 
 
1695
#line  784 "Frames/cs.ATG" 
1554
1696
p);
1555
1697
                        }
1556
1698
                        Expect(21);
1557
1699
 
1558
 
#line  751 "cs.ATG" 
1559
 
                        MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
1560
 
                                                                                 m.Modifier,
1561
 
                                                                                 new TypeReference("void"),
1562
 
                                                                                 p,
1563
 
                                                                                 attributes);
1564
 
                        methodDeclaration.StartLocation = m.GetDeclarationLocation(startPos);
1565
 
                        methodDeclaration.EndLocation   = t.EndLocation;
1566
 
                        methodDeclaration.Templates = templates;
 
1700
#line  785 "Frames/cs.ATG" 
 
1701
                        MethodDeclaration methodDeclaration = new MethodDeclaration {
 
1702
                        Name = qualident,
 
1703
                        Modifier = m.Modifier,
 
1704
                        TypeReference = new TypeReference("void"),
 
1705
                        Parameters = p,
 
1706
                        Attributes = attributes,
 
1707
                        StartLocation = m.GetDeclarationLocation(startPos),
 
1708
                        EndLocation = t.EndLocation,
 
1709
                        Templates = templates,
 
1710
                        IsExtensionMethod = isExtensionMethod
 
1711
                        };
1567
1712
                        if (explicitInterface != null)
1568
 
                        methodDeclaration.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
 
1713
                                methodDeclaration.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
1569
1714
                        compilationUnit.AddChild(methodDeclaration);
1570
1715
                        compilationUnit.BlockStart(methodDeclaration);
1571
1716
                        
1572
 
                        while (
1573
 
#line  766 "cs.ATG" 
1574
 
IdentIsWhere()) {
 
1717
                        while (la.kind == 127) {
1575
1718
                                TypeParameterConstraintsClause(
1576
 
#line  766 "cs.ATG" 
 
1719
#line  803 "Frames/cs.ATG" 
1577
1720
templates);
1578
1721
                        }
1579
1722
                        if (la.kind == 16) {
1580
1723
                                Block(
1581
 
#line  768 "cs.ATG" 
 
1724
#line  805 "Frames/cs.ATG" 
1582
1725
out stmt);
1583
1726
                        } else if (la.kind == 11) {
1584
1727
                                lexer.NextToken();
1585
 
                        } else SynErr(140);
 
1728
                        } else SynErr(163);
1586
1729
 
1587
 
#line  768 "cs.ATG" 
 
1730
#line  805 "Frames/cs.ATG" 
1588
1731
                        compilationUnit.BlockEnd();
1589
1732
                        methodDeclaration.Body  = (BlockStatement)stmt;
1590
1733
                        
1591
 
                } else if (la.kind == 68) {
 
1734
                } else if (la.kind == 69) {
1592
1735
 
1593
 
#line  772 "cs.ATG" 
 
1736
#line  809 "Frames/cs.ATG" 
1594
1737
                        m.Check(Modifiers.PropertysEventsMethods); 
1595
1738
                        lexer.NextToken();
1596
1739
 
1597
 
#line  773 "cs.ATG" 
1598
 
                        EventDeclaration eventDecl = new EventDeclaration(null, null, m.Modifier, attributes, null);
1599
 
                        eventDecl.StartLocation = t.Location;
 
1740
#line  811 "Frames/cs.ATG" 
 
1741
                        EventDeclaration eventDecl = new EventDeclaration {
 
1742
                        Modifier = m.Modifier, 
 
1743
                        Attributes = attributes,
 
1744
                        StartLocation = t.Location
 
1745
                        };
1600
1746
                        compilationUnit.AddChild(eventDecl);
1601
1747
                        compilationUnit.BlockStart(eventDecl);
1602
1748
                        EventAddRegion addBlock = null;
1603
1749
                        EventRemoveRegion removeBlock = null;
1604
1750
                        
1605
1751
                        Type(
1606
 
#line  780 "cs.ATG" 
 
1752
#line  821 "Frames/cs.ATG" 
1607
1753
out type);
1608
1754
 
1609
 
#line  780 "cs.ATG" 
 
1755
#line  821 "Frames/cs.ATG" 
1610
1756
                        eventDecl.TypeReference = type; 
1611
1757
                        if (
1612
 
#line  781 "cs.ATG" 
 
1758
#line  822 "Frames/cs.ATG" 
1613
1759
IsExplicitInterfaceImplementation()) {
1614
1760
                                TypeName(
1615
 
#line  782 "cs.ATG" 
 
1761
#line  823 "Frames/cs.ATG" 
1616
1762
out explicitInterface, false);
1617
1763
 
1618
 
#line  783 "cs.ATG" 
 
1764
#line  824 "Frames/cs.ATG" 
1619
1765
                                qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface); 
1620
1766
 
1621
 
#line  784 "cs.ATG" 
 
1767
#line  825 "Frames/cs.ATG" 
1622
1768
                                eventDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident)); 
1623
 
                        } else if (la.kind == 1) {
1624
 
                                lexer.NextToken();
 
1769
                        } else if (StartOf(19)) {
 
1770
                                Identifier();
1625
1771
 
1626
 
#line  786 "cs.ATG" 
 
1772
#line  827 "Frames/cs.ATG" 
1627
1773
                                qualident = t.val; 
1628
 
                        } else SynErr(141);
 
1774
                        } else SynErr(164);
1629
1775
 
1630
 
#line  788 "cs.ATG" 
 
1776
#line  829 "Frames/cs.ATG" 
1631
1777
                        eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation; 
1632
1778
                        if (la.kind == 3) {
1633
1779
                                lexer.NextToken();
1634
1780
                                Expr(
1635
 
#line  789 "cs.ATG" 
 
1781
#line  830 "Frames/cs.ATG" 
1636
1782
out expr);
1637
1783
 
1638
 
#line  789 "cs.ATG" 
 
1784
#line  830 "Frames/cs.ATG" 
1639
1785
                                eventDecl.Initializer = expr; 
1640
1786
                        }
1641
1787
                        if (la.kind == 16) {
1642
1788
                                lexer.NextToken();
1643
1789
 
1644
 
#line  790 "cs.ATG" 
 
1790
#line  831 "Frames/cs.ATG" 
1645
1791
                                eventDecl.BodyStart = t.Location; 
1646
1792
                                EventAccessorDecls(
1647
 
#line  791 "cs.ATG" 
 
1793
#line  832 "Frames/cs.ATG" 
1648
1794
out addBlock, out removeBlock);
1649
1795
                                Expect(17);
1650
1796
 
1651
 
#line  792 "cs.ATG" 
 
1797
#line  833 "Frames/cs.ATG" 
1652
1798
                                eventDecl.BodyEnd   = t.EndLocation; 
1653
1799
                        }
1654
1800
                        if (la.kind == 11) {
1655
1801
                                lexer.NextToken();
1656
1802
                        }
1657
1803
 
1658
 
#line  795 "cs.ATG" 
 
1804
#line  836 "Frames/cs.ATG" 
1659
1805
                        compilationUnit.BlockEnd();
1660
1806
                        eventDecl.AddRegion = addBlock;
1661
1807
                        eventDecl.RemoveRegion = removeBlock;
1662
1808
                        
1663
1809
                } else if (
1664
 
#line  801 "cs.ATG" 
 
1810
#line  842 "Frames/cs.ATG" 
1665
1811
IdentAndLPar()) {
1666
1812
 
1667
 
#line  801 "cs.ATG" 
 
1813
#line  842 "Frames/cs.ATG" 
1668
1814
                        m.Check(Modifiers.Constructors | Modifiers.StaticConstructors); 
1669
 
                        Expect(1);
 
1815
                        Identifier();
1670
1816
 
1671
 
#line  802 "cs.ATG" 
 
1817
#line  843 "Frames/cs.ATG" 
1672
1818
                        string name = t.val; Location startPos = t.Location; 
1673
1819
                        Expect(20);
1674
 
                        if (StartOf(10)) {
 
1820
                        if (StartOf(11)) {
1675
1821
 
1676
 
#line  802 "cs.ATG" 
 
1822
#line  843 "Frames/cs.ATG" 
1677
1823
                                m.Check(Modifiers.Constructors); 
1678
1824
                                FormalParameterList(
1679
 
#line  803 "cs.ATG" 
 
1825
#line  844 "Frames/cs.ATG" 
1680
1826
p);
1681
1827
                        }
1682
1828
                        Expect(21);
1683
1829
 
1684
 
#line  805 "cs.ATG" 
 
1830
#line  846 "Frames/cs.ATG" 
1685
1831
                        ConstructorInitializer init = null;  
1686
1832
                        if (la.kind == 9) {
1687
1833
 
1688
 
#line  806 "cs.ATG" 
 
1834
#line  847 "Frames/cs.ATG" 
1689
1835
                                m.Check(Modifiers.Constructors); 
1690
1836
                                ConstructorInitializer(
1691
 
#line  807 "cs.ATG" 
 
1837
#line  848 "Frames/cs.ATG" 
1692
1838
out init);
1693
1839
                        }
1694
1840
 
1695
 
#line  809 "cs.ATG" 
 
1841
#line  850 "Frames/cs.ATG" 
1696
1842
                        ConstructorDeclaration cd = new ConstructorDeclaration(name, m.Modifier, p, init, attributes); 
1697
1843
                        cd.StartLocation = startPos;
1698
1844
                        cd.EndLocation   = t.EndLocation;
1699
1845
                        
1700
1846
                        if (la.kind == 16) {
1701
1847
                                Block(
1702
 
#line  814 "cs.ATG" 
 
1848
#line  855 "Frames/cs.ATG" 
1703
1849
out stmt);
1704
1850
                        } else if (la.kind == 11) {
1705
1851
                                lexer.NextToken();
1706
 
                        } else SynErr(142);
 
1852
                        } else SynErr(165);
1707
1853
 
1708
 
#line  814 "cs.ATG" 
 
1854
#line  855 "Frames/cs.ATG" 
1709
1855
                        cd.Body = (BlockStatement)stmt; compilationUnit.AddChild(cd); 
1710
 
                } else if (la.kind == 69 || la.kind == 79) {
 
1856
                } else if (la.kind == 70 || la.kind == 80) {
1711
1857
 
1712
 
#line  817 "cs.ATG" 
 
1858
#line  858 "Frames/cs.ATG" 
1713
1859
                        m.Check(Modifiers.Operators);
1714
1860
                        if (m.isNone) Error("at least one modifier must be set"); 
1715
1861
                        bool isImplicit = true;
1716
1862
                        Location startPos = Location.Empty;
1717
1863
                        
1718
 
                        if (la.kind == 79) {
 
1864
                        if (la.kind == 80) {
1719
1865
                                lexer.NextToken();
1720
1866
 
1721
 
#line  822 "cs.ATG" 
 
1867
#line  863 "Frames/cs.ATG" 
1722
1868
                                startPos = t.Location; 
1723
1869
                        } else {
1724
1870
                                lexer.NextToken();
1725
1871
 
1726
 
#line  822 "cs.ATG" 
 
1872
#line  863 "Frames/cs.ATG" 
1727
1873
                                isImplicit = false; startPos = t.Location; 
1728
1874
                        }
1729
 
                        Expect(91);
 
1875
                        Expect(92);
1730
1876
                        Type(
1731
 
#line  823 "cs.ATG" 
 
1877
#line  864 "Frames/cs.ATG" 
1732
1878
out type);
1733
1879
 
1734
 
#line  823 "cs.ATG" 
 
1880
#line  864 "Frames/cs.ATG" 
1735
1881
                        TypeReference operatorType = type; 
1736
1882
                        Expect(20);
1737
1883
                        Type(
1738
 
#line  824 "cs.ATG" 
 
1884
#line  865 "Frames/cs.ATG" 
1739
1885
out type);
1740
 
                        Expect(1);
 
1886
                        Identifier();
1741
1887
 
1742
 
#line  824 "cs.ATG" 
 
1888
#line  865 "Frames/cs.ATG" 
1743
1889
                        string varName = t.val; 
1744
1890
                        Expect(21);
1745
1891
 
1746
 
#line  825 "cs.ATG" 
 
1892
#line  866 "Frames/cs.ATG" 
1747
1893
                        Location endPos = t.Location; 
1748
1894
                        if (la.kind == 16) {
1749
1895
                                Block(
1750
 
#line  826 "cs.ATG" 
 
1896
#line  867 "Frames/cs.ATG" 
1751
1897
out stmt);
1752
1898
                        } else if (la.kind == 11) {
1753
1899
                                lexer.NextToken();
1754
1900
 
1755
 
#line  826 "cs.ATG" 
 
1901
#line  867 "Frames/cs.ATG" 
1756
1902
                                stmt = null; 
1757
 
                        } else SynErr(143);
 
1903
                        } else SynErr(166);
1758
1904
 
1759
 
#line  829 "cs.ATG" 
 
1905
#line  870 "Frames/cs.ATG" 
1760
1906
                        List<ParameterDeclarationExpression> parameters = new List<ParameterDeclarationExpression>();
1761
1907
                        parameters.Add(new ParameterDeclarationExpression(type, varName));
1762
 
                        OperatorDeclaration operatorDeclaration = new OperatorDeclaration(m.Modifier, 
1763
 
                                                                                          attributes, 
1764
 
                                                                                          parameters, 
1765
 
                                                                                          operatorType,
1766
 
                                                                                          isImplicit ? ConversionType.Implicit : ConversionType.Explicit
1767
 
                                                                                          );
1768
 
                        operatorDeclaration.Body = (BlockStatement)stmt;
1769
 
                        operatorDeclaration.StartLocation = m.GetDeclarationLocation(startPos);
1770
 
                        operatorDeclaration.EndLocation = endPos;
 
1908
                        OperatorDeclaration operatorDeclaration = new OperatorDeclaration {
 
1909
                                Modifier = m.Modifier,
 
1910
                                Attributes = attributes, 
 
1911
                                Parameters = parameters, 
 
1912
                                TypeReference = operatorType,
 
1913
                                ConversionType = isImplicit ? ConversionType.Implicit : ConversionType.Explicit,
 
1914
                                Body = (BlockStatement)stmt,
 
1915
                                StartLocation = m.GetDeclarationLocation(startPos),
 
1916
                                EndLocation = endPos
 
1917
                        };
1771
1918
                        compilationUnit.AddChild(operatorDeclaration);
1772
1919
                        
1773
 
                } else if (StartOf(17)) {
 
1920
                } else if (StartOf(22)) {
1774
1921
                        TypeDecl(
1775
 
#line  845 "cs.ATG" 
 
1922
#line  887 "Frames/cs.ATG" 
1776
1923
m, attributes);
1777
 
                } else if (StartOf(9)) {
 
1924
                } else if (StartOf(10)) {
1778
1925
                        Type(
1779
 
#line  847 "cs.ATG" 
 
1926
#line  889 "Frames/cs.ATG" 
1780
1927
out type);
1781
1928
 
1782
 
#line  847 "cs.ATG" 
 
1929
#line  889 "Frames/cs.ATG" 
1783
1930
                        Location startPos = t.Location;  
1784
 
                        if (la.kind == 91) {
 
1931
                        if (la.kind == 92) {
1785
1932
 
1786
 
#line  849 "cs.ATG" 
 
1933
#line  891 "Frames/cs.ATG" 
1787
1934
                                OverloadableOperatorType op;
1788
1935
                                m.Check(Modifiers.Operators);
1789
1936
                                if (m.isNone) Error("at least one modifier must be set");
1790
1937
                                
1791
1938
                                lexer.NextToken();
1792
1939
                                OverloadableOperator(
1793
 
#line  853 "cs.ATG" 
 
1940
#line  895 "Frames/cs.ATG" 
1794
1941
out op);
1795
1942
 
1796
 
#line  853 "cs.ATG" 
 
1943
#line  895 "Frames/cs.ATG" 
1797
1944
                                TypeReference firstType, secondType = null; string secondName = null; 
1798
1945
                                Expect(20);
1799
1946
                                Type(
1800
 
#line  854 "cs.ATG" 
 
1947
#line  896 "Frames/cs.ATG" 
1801
1948
out firstType);
1802
 
                                Expect(1);
 
1949
                                Identifier();
1803
1950
 
1804
 
#line  854 "cs.ATG" 
 
1951
#line  896 "Frames/cs.ATG" 
1805
1952
                                string firstName = t.val; 
1806
1953
                                if (la.kind == 14) {
1807
1954
                                        lexer.NextToken();
1808
1955
                                        Type(
1809
 
#line  855 "cs.ATG" 
 
1956
#line  897 "Frames/cs.ATG" 
1810
1957
out secondType);
1811
 
                                        Expect(1);
 
1958
                                        Identifier();
1812
1959
 
1813
 
#line  855 "cs.ATG" 
 
1960
#line  897 "Frames/cs.ATG" 
1814
1961
                                        secondName = t.val; 
1815
1962
                                } else if (la.kind == 21) {
1816
 
                                } else SynErr(144);
 
1963
                                } else SynErr(167);
1817
1964
 
1818
 
#line  863 "cs.ATG" 
 
1965
#line  905 "Frames/cs.ATG" 
1819
1966
                                Location endPos = t.Location; 
1820
1967
                                Expect(21);
1821
1968
                                if (la.kind == 16) {
1822
1969
                                        Block(
1823
 
#line  864 "cs.ATG" 
 
1970
#line  906 "Frames/cs.ATG" 
1824
1971
out stmt);
1825
1972
                                } else if (la.kind == 11) {
1826
1973
                                        lexer.NextToken();
1827
 
                                } else SynErr(145);
 
1974
                                } else SynErr(168);
1828
1975
 
1829
 
#line  866 "cs.ATG" 
 
1976
#line  908 "Frames/cs.ATG" 
1830
1977
                                List<ParameterDeclarationExpression> parameters = new List<ParameterDeclarationExpression>();
1831
1978
                                parameters.Add(new ParameterDeclarationExpression(firstType, firstName));
1832
1979
                                if (secondType != null) {
1833
1980
                                        parameters.Add(new ParameterDeclarationExpression(secondType, secondName));
1834
1981
                                }
1835
 
                                OperatorDeclaration operatorDeclaration = new OperatorDeclaration(m.Modifier,
1836
 
                                                                                                  attributes,
1837
 
                                                                                                  parameters,
1838
 
                                                                                                  type,
1839
 
                                                                                                  op);
1840
 
                                operatorDeclaration.Body = (BlockStatement)stmt;
1841
 
                                operatorDeclaration.StartLocation = m.GetDeclarationLocation(startPos);
1842
 
                                operatorDeclaration.EndLocation = endPos;
 
1982
                                OperatorDeclaration operatorDeclaration = new OperatorDeclaration {
 
1983
                                        Modifier = m.Modifier,
 
1984
                                        Attributes = attributes,
 
1985
                                        Parameters = parameters,
 
1986
                                        TypeReference = type,
 
1987
                                        OverloadableOperator = op,
 
1988
                                        Body = (BlockStatement)stmt,
 
1989
                                        StartLocation = m.GetDeclarationLocation(startPos),
 
1990
                                        EndLocation = endPos
 
1991
                                };
1843
1992
                                compilationUnit.AddChild(operatorDeclaration);
1844
1993
                                
1845
1994
                        } else if (
1846
 
#line  883 "cs.ATG" 
 
1995
#line  927 "Frames/cs.ATG" 
1847
1996
IsVarDecl()) {
1848
1997
 
1849
 
#line  884 "cs.ATG" 
 
1998
#line  928 "Frames/cs.ATG" 
1850
1999
                                m.Check(Modifiers.Fields);
1851
2000
                                FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
1852
2001
                                fd.StartLocation = m.GetDeclarationLocation(startPos); 
1853
2002
                                
1854
2003
                                if (
1855
 
#line  888 "cs.ATG" 
 
2004
#line  932 "Frames/cs.ATG" 
1856
2005
m.Contains(Modifiers.Fixed)) {
1857
2006
                                        VariableDeclarator(
1858
 
#line  889 "cs.ATG" 
 
2007
#line  933 "Frames/cs.ATG" 
1859
2008
variableDeclarators);
1860
2009
                                        Expect(18);
1861
2010
                                        Expr(
1862
 
#line  891 "cs.ATG" 
 
2011
#line  935 "Frames/cs.ATG" 
1863
2012
out expr);
1864
2013
 
1865
 
#line  891 "cs.ATG" 
 
2014
#line  935 "Frames/cs.ATG" 
1866
2015
                                        if (variableDeclarators.Count > 0)
1867
2016
                                        variableDeclarators[variableDeclarators.Count-1].FixedArrayInitialization = expr; 
1868
2017
                                        Expect(19);
1869
2018
                                        while (la.kind == 14) {
1870
2019
                                                lexer.NextToken();
1871
2020
                                                VariableDeclarator(
1872
 
#line  895 "cs.ATG" 
 
2021
#line  939 "Frames/cs.ATG" 
1873
2022
variableDeclarators);
1874
2023
                                                Expect(18);
1875
2024
                                                Expr(
1876
 
#line  897 "cs.ATG" 
 
2025
#line  941 "Frames/cs.ATG" 
1877
2026
out expr);
1878
2027
 
1879
 
#line  897 "cs.ATG" 
 
2028
#line  941 "Frames/cs.ATG" 
1880
2029
                                                if (variableDeclarators.Count > 0)
1881
2030
                                                variableDeclarators[variableDeclarators.Count-1].FixedArrayInitialization = expr; 
1882
2031
                                                Expect(19);
1883
2032
                                        }
1884
 
                                } else if (la.kind == 1) {
 
2033
                                } else if (StartOf(19)) {
1885
2034
                                        VariableDeclarator(
1886
 
#line  902 "cs.ATG" 
 
2035
#line  946 "Frames/cs.ATG" 
1887
2036
variableDeclarators);
1888
2037
                                        while (la.kind == 14) {
1889
2038
                                                lexer.NextToken();
1890
2039
                                                VariableDeclarator(
1891
 
#line  903 "cs.ATG" 
 
2040
#line  947 "Frames/cs.ATG" 
1892
2041
variableDeclarators);
1893
2042
                                        }
1894
 
                                } else SynErr(146);
 
2043
                                } else SynErr(169);
1895
2044
                                Expect(11);
1896
2045
 
1897
 
#line  905 "cs.ATG" 
 
2046
#line  949 "Frames/cs.ATG" 
1898
2047
                                fd.EndLocation = t.EndLocation; fd.Fields = variableDeclarators; compilationUnit.AddChild(fd); 
1899
 
                        } else if (la.kind == 110) {
 
2048
                        } else if (la.kind == 111) {
1900
2049
 
1901
 
#line  908 "cs.ATG" 
 
2050
#line  952 "Frames/cs.ATG" 
1902
2051
                                m.Check(Modifiers.Indexers); 
1903
2052
                                lexer.NextToken();
1904
2053
                                Expect(18);
1905
2054
                                FormalParameterList(
1906
 
#line  909 "cs.ATG" 
 
2055
#line  953 "Frames/cs.ATG" 
1907
2056
p);
1908
2057
                                Expect(19);
1909
2058
 
1910
 
#line  909 "cs.ATG" 
 
2059
#line  953 "Frames/cs.ATG" 
1911
2060
                                Location endLocation = t.EndLocation; 
1912
2061
                                Expect(16);
1913
2062
 
1914
 
#line  910 "cs.ATG" 
 
2063
#line  954 "Frames/cs.ATG" 
1915
2064
                                IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
1916
2065
                                indexer.StartLocation = startPos;
1917
2066
                                indexer.EndLocation   = endLocation;
1920
2069
                                PropertySetRegion setRegion;
1921
2070
                                
1922
2071
                                AccessorDecls(
1923
 
#line  917 "cs.ATG" 
 
2072
#line  961 "Frames/cs.ATG" 
1924
2073
out getRegion, out setRegion);
1925
2074
                                Expect(17);
1926
2075
 
1927
 
#line  918 "cs.ATG" 
 
2076
#line  962 "Frames/cs.ATG" 
1928
2077
                                indexer.BodyEnd    = t.EndLocation;
1929
2078
                                indexer.GetRegion = getRegion;
1930
2079
                                indexer.SetRegion = setRegion;
1931
2080
                                compilationUnit.AddChild(indexer);
1932
2081
                                
1933
2082
                        } else if (
1934
 
#line  923 "cs.ATG" 
1935
 
la.kind == Tokens.Identifier) {
 
2083
#line  967 "Frames/cs.ATG" 
 
2084
IsIdentifierToken(la)) {
1936
2085
                                if (
1937
 
#line  924 "cs.ATG" 
 
2086
#line  968 "Frames/cs.ATG" 
1938
2087
IsExplicitInterfaceImplementation()) {
1939
2088
                                        TypeName(
1940
 
#line  925 "cs.ATG" 
 
2089
#line  969 "Frames/cs.ATG" 
1941
2090
out explicitInterface, false);
1942
2091
 
1943
 
#line  926 "cs.ATG" 
 
2092
#line  970 "Frames/cs.ATG" 
1944
2093
                                        if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) {
1945
2094
                                        qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface);
1946
2095
                                         } 
1947
 
                                } else if (la.kind == 1) {
1948
 
                                        lexer.NextToken();
 
2096
                                } else if (StartOf(19)) {
 
2097
                                        Identifier();
1949
2098
 
1950
 
#line  929 "cs.ATG" 
 
2099
#line  973 "Frames/cs.ATG" 
1951
2100
                                        qualident = t.val; 
1952
 
                                } else SynErr(147);
 
2101
                                } else SynErr(170);
1953
2102
 
1954
 
#line  931 "cs.ATG" 
 
2103
#line  975 "Frames/cs.ATG" 
1955
2104
                                Location qualIdentEndLocation = t.EndLocation; 
1956
2105
                                if (la.kind == 16 || la.kind == 20 || la.kind == 23) {
1957
2106
                                        if (la.kind == 20 || la.kind == 23) {
1958
2107
 
1959
 
#line  935 "cs.ATG" 
 
2108
#line  979 "Frames/cs.ATG" 
1960
2109
                                                m.Check(Modifiers.PropertysEventsMethods); 
1961
2110
                                                if (la.kind == 23) {
1962
2111
                                                        TypeParameterList(
1963
 
#line  937 "cs.ATG" 
 
2112
#line  981 "Frames/cs.ATG" 
1964
2113
templates);
1965
2114
                                                }
1966
2115
                                                Expect(20);
1967
 
                                                if (StartOf(10)) {
 
2116
                                                if (la.kind == 111) {
 
2117
                                                        lexer.NextToken();
 
2118
 
 
2119
#line  983 "Frames/cs.ATG" 
 
2120
                                                        isExtensionMethod = true; 
 
2121
                                                }
 
2122
                                                if (StartOf(11)) {
1968
2123
                                                        FormalParameterList(
1969
 
#line  938 "cs.ATG" 
 
2124
#line  984 "Frames/cs.ATG" 
1970
2125
p);
1971
2126
                                                }
1972
2127
                                                Expect(21);
1973
2128
 
1974
 
#line  939 "cs.ATG" 
1975
 
                                                MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
1976
 
                                                                                                           m.Modifier, 
1977
 
                                                                                                           type, 
1978
 
                                                                                                           p, 
1979
 
                                                                                                           attributes);
 
2129
#line  986 "Frames/cs.ATG" 
 
2130
                                                MethodDeclaration methodDeclaration = new MethodDeclaration {
 
2131
                                                Name = qualident,
 
2132
                                                Modifier = m.Modifier,
 
2133
                                                TypeReference = type,
 
2134
                                                Parameters = p, 
 
2135
                                                Attributes = attributes
 
2136
                                                };
1980
2137
                                                if (explicitInterface != null)
1981
2138
                                                        methodDeclaration.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
1982
2139
                                                methodDeclaration.StartLocation = m.GetDeclarationLocation(startPos);
1983
2140
                                                methodDeclaration.EndLocation   = t.EndLocation;
 
2141
                                                methodDeclaration.IsExtensionMethod = isExtensionMethod;
1984
2142
                                                methodDeclaration.Templates = templates;
1985
2143
                                                compilationUnit.AddChild(methodDeclaration);
1986
2144
                                                                                      
1987
 
                                                while (
1988
 
#line  951 "cs.ATG" 
1989
 
IdentIsWhere()) {
 
2145
                                                while (la.kind == 127) {
1990
2146
                                                        TypeParameterConstraintsClause(
1991
 
#line  951 "cs.ATG" 
 
2147
#line  1001 "Frames/cs.ATG" 
1992
2148
templates);
1993
2149
                                                }
1994
2150
                                                if (la.kind == 16) {
1995
2151
                                                        Block(
1996
 
#line  952 "cs.ATG" 
 
2152
#line  1002 "Frames/cs.ATG" 
1997
2153
out stmt);
1998
2154
                                                } else if (la.kind == 11) {
1999
2155
                                                        lexer.NextToken();
2000
 
                                                } else SynErr(148);
 
2156
                                                } else SynErr(171);
2001
2157
 
2002
 
#line  952 "cs.ATG" 
 
2158
#line  1002 "Frames/cs.ATG" 
2003
2159
                                                methodDeclaration.Body  = (BlockStatement)stmt; 
2004
2160
                                        } else {
2005
2161
                                                lexer.NextToken();
2006
2162
 
2007
 
#line  955 "cs.ATG" 
 
2163
#line  1005 "Frames/cs.ATG" 
2008
2164
                                                PropertyDeclaration pDecl = new PropertyDeclaration(qualident, type, m.Modifier, attributes); 
2009
2165
                                                if (explicitInterface != null)
2010
2166
                                                pDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
2015
2171
                                                      PropertySetRegion setRegion;
2016
2172
                                                   
2017
2173
                                                AccessorDecls(
2018
 
#line  964 "cs.ATG" 
 
2174
#line  1014 "Frames/cs.ATG" 
2019
2175
out getRegion, out setRegion);
2020
2176
                                                Expect(17);
2021
2177
 
2022
 
#line  966 "cs.ATG" 
 
2178
#line  1016 "Frames/cs.ATG" 
2023
2179
                                                pDecl.GetRegion = getRegion;
2024
2180
                                                pDecl.SetRegion = setRegion;
2025
2181
                                                pDecl.BodyEnd = t.EndLocation;
2028
2184
                                        }
2029
2185
                                } else if (la.kind == 15) {
2030
2186
 
2031
 
#line  974 "cs.ATG" 
 
2187
#line  1024 "Frames/cs.ATG" 
2032
2188
                                        m.Check(Modifiers.Indexers); 
2033
2189
                                        lexer.NextToken();
2034
 
                                        Expect(110);
 
2190
                                        Expect(111);
2035
2191
                                        Expect(18);
2036
2192
                                        FormalParameterList(
2037
 
#line  975 "cs.ATG" 
 
2193
#line  1025 "Frames/cs.ATG" 
2038
2194
p);
2039
2195
                                        Expect(19);
2040
2196
 
2041
 
#line  976 "cs.ATG" 
 
2197
#line  1026 "Frames/cs.ATG" 
2042
2198
                                        IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
2043
2199
                                        indexer.StartLocation = m.GetDeclarationLocation(startPos);
2044
2200
                                        indexer.EndLocation   = t.EndLocation;
2049
2205
                                            
2050
2206
                                        Expect(16);
2051
2207
 
2052
 
#line  984 "cs.ATG" 
 
2208
#line  1034 "Frames/cs.ATG" 
2053
2209
                                        Location bodyStart = t.Location; 
2054
2210
                                        AccessorDecls(
2055
 
#line  985 "cs.ATG" 
 
2211
#line  1035 "Frames/cs.ATG" 
2056
2212
out getRegion, out setRegion);
2057
2213
                                        Expect(17);
2058
2214
 
2059
 
#line  986 "cs.ATG" 
 
2215
#line  1036 "Frames/cs.ATG" 
2060
2216
                                        indexer.BodyStart = bodyStart;
2061
2217
                                        indexer.BodyEnd   = t.EndLocation;
2062
2218
                                        indexer.GetRegion = getRegion;
2063
2219
                                        indexer.SetRegion = setRegion;
2064
2220
                                        compilationUnit.AddChild(indexer);
2065
2221
                                        
2066
 
                                } else SynErr(149);
2067
 
                        } else SynErr(150);
2068
 
                } else SynErr(151);
 
2222
                                } else SynErr(172);
 
2223
                        } else SynErr(173);
 
2224
                } else SynErr(174);
2069
2225
        }
2070
2226
 
2071
2227
        void InterfaceMemberDecl() {
2072
2228
 
2073
 
#line  1013 "cs.ATG" 
 
2229
#line  1063 "Frames/cs.ATG" 
2074
2230
                TypeReference type;
2075
2231
                
2076
2232
                AttributeSection section;
2085
2241
                
2086
2242
                while (la.kind == 18) {
2087
2243
                        AttributeSection(
2088
 
#line  1026 "cs.ATG" 
 
2244
#line  1076 "Frames/cs.ATG" 
2089
2245
out section);
2090
2246
 
2091
 
#line  1026 "cs.ATG" 
 
2247
#line  1076 "Frames/cs.ATG" 
2092
2248
                        attributes.Add(section); 
2093
2249
                }
2094
 
                if (la.kind == 88) {
 
2250
                if (la.kind == 89) {
2095
2251
                        lexer.NextToken();
2096
2252
 
2097
 
#line  1027 "cs.ATG" 
 
2253
#line  1077 "Frames/cs.ATG" 
2098
2254
                        mod = Modifiers.New; startLocation = t.Location; 
2099
2255
                }
2100
2256
                if (
2101
 
#line  1030 "cs.ATG" 
 
2257
#line  1080 "Frames/cs.ATG" 
2102
2258
NotVoidPointer()) {
2103
 
                        Expect(122);
 
2259
                        Expect(123);
2104
2260
 
2105
 
#line  1030 "cs.ATG" 
 
2261
#line  1080 "Frames/cs.ATG" 
2106
2262
                        if (startLocation.X == -1) startLocation = t.Location; 
2107
 
                        Expect(1);
 
2263
                        Identifier();
2108
2264
 
2109
 
#line  1030 "cs.ATG" 
 
2265
#line  1081 "Frames/cs.ATG" 
2110
2266
                        name = t.val; 
2111
2267
                        if (la.kind == 23) {
2112
2268
                                TypeParameterList(
2113
 
#line  1031 "cs.ATG" 
 
2269
#line  1082 "Frames/cs.ATG" 
2114
2270
templates);
2115
2271
                        }
2116
2272
                        Expect(20);
2117
 
                        if (StartOf(10)) {
 
2273
                        if (StartOf(11)) {
2118
2274
                                FormalParameterList(
2119
 
#line  1032 "cs.ATG" 
 
2275
#line  1083 "Frames/cs.ATG" 
2120
2276
parameters);
2121
2277
                        }
2122
2278
                        Expect(21);
2123
 
                        while (
2124
 
#line  1033 "cs.ATG" 
2125
 
IdentIsWhere()) {
 
2279
                        while (la.kind == 127) {
2126
2280
                                TypeParameterConstraintsClause(
2127
 
#line  1033 "cs.ATG" 
 
2281
#line  1084 "Frames/cs.ATG" 
2128
2282
templates);
2129
2283
                        }
2130
2284
                        Expect(11);
2131
2285
 
2132
 
#line  1035 "cs.ATG" 
2133
 
                        MethodDeclaration md = new MethodDeclaration(name, mod, new TypeReference("void"), parameters, attributes);
2134
 
                        md.StartLocation = startLocation;
2135
 
                        md.EndLocation = t.EndLocation;
2136
 
                        md.Templates = templates;
 
2286
#line  1086 "Frames/cs.ATG" 
 
2287
                        MethodDeclaration md = new MethodDeclaration {
 
2288
                        Name = name, Modifier = mod, TypeReference = new TypeReference("void"), 
 
2289
                        Parameters = parameters, Attributes = attributes, Templates = templates,
 
2290
                        StartLocation = startLocation, EndLocation = t.EndLocation
 
2291
                        };
2137
2292
                        compilationUnit.AddChild(md);
2138
2293
                        
2139
 
                } else if (StartOf(18)) {
2140
 
                        if (StartOf(9)) {
 
2294
                } else if (StartOf(23)) {
 
2295
                        if (StartOf(10)) {
2141
2296
                                Type(
2142
 
#line  1042 "cs.ATG" 
 
2297
#line  1094 "Frames/cs.ATG" 
2143
2298
out type);
2144
2299
 
2145
 
#line  1042 "cs.ATG" 
 
2300
#line  1094 "Frames/cs.ATG" 
2146
2301
                                if (startLocation.X == -1) startLocation = t.Location; 
2147
 
                                if (la.kind == 1) {
2148
 
                                        lexer.NextToken();
 
2302
                                if (StartOf(19)) {
 
2303
                                        Identifier();
2149
2304
 
2150
 
#line  1044 "cs.ATG" 
 
2305
#line  1096 "Frames/cs.ATG" 
2151
2306
                                        name = t.val; Location qualIdentEndLocation = t.EndLocation; 
2152
2307
                                        if (la.kind == 20 || la.kind == 23) {
2153
2308
                                                if (la.kind == 23) {
2154
2309
                                                        TypeParameterList(
2155
 
#line  1048 "cs.ATG" 
 
2310
#line  1100 "Frames/cs.ATG" 
2156
2311
templates);
2157
2312
                                                }
2158
2313
                                                Expect(20);
2159
 
                                                if (StartOf(10)) {
 
2314
                                                if (StartOf(11)) {
2160
2315
                                                        FormalParameterList(
2161
 
#line  1049 "cs.ATG" 
 
2316
#line  1101 "Frames/cs.ATG" 
2162
2317
parameters);
2163
2318
                                                }
2164
2319
                                                Expect(21);
2165
 
                                                while (
2166
 
#line  1051 "cs.ATG" 
2167
 
IdentIsWhere()) {
 
2320
                                                while (la.kind == 127) {
2168
2321
                                                        TypeParameterConstraintsClause(
2169
 
#line  1051 "cs.ATG" 
 
2322
#line  1103 "Frames/cs.ATG" 
2170
2323
templates);
2171
2324
                                                }
2172
2325
                                                Expect(11);
2173
2326
 
2174
 
#line  1052 "cs.ATG" 
2175
 
                                                MethodDeclaration md = new MethodDeclaration(name, mod, type, parameters, attributes);
2176
 
                                                md.StartLocation = startLocation;
2177
 
                                                md.EndLocation = t.EndLocation;
2178
 
                                                md.Templates = templates;
 
2327
#line  1104 "Frames/cs.ATG" 
 
2328
                                                MethodDeclaration md = new MethodDeclaration {
 
2329
                                                Name = name, Modifier = mod, TypeReference = type,
 
2330
                                                Parameters = parameters, Attributes = attributes, Templates = templates,
 
2331
                                                StartLocation = startLocation, EndLocation = t.EndLocation
 
2332
                                                };
2179
2333
                                                compilationUnit.AddChild(md);
2180
2334
                                                
2181
2335
                                        } else if (la.kind == 16) {
2182
2336
 
2183
 
#line  1059 "cs.ATG" 
 
2337
#line  1112 "Frames/cs.ATG" 
2184
2338
                                                PropertyDeclaration pd = new PropertyDeclaration(name, type, mod, attributes); compilationUnit.AddChild(pd); 
2185
2339
                                                lexer.NextToken();
2186
2340
 
2187
 
#line  1060 "cs.ATG" 
 
2341
#line  1113 "Frames/cs.ATG" 
2188
2342
                                                Location bodyStart = t.Location;
2189
2343
                                                InterfaceAccessors(
2190
 
#line  1060 "cs.ATG" 
 
2344
#line  1113 "Frames/cs.ATG" 
2191
2345
out getBlock, out setBlock);
2192
2346
                                                Expect(17);
2193
2347
 
2194
 
#line  1060 "cs.ATG" 
 
2348
#line  1113 "Frames/cs.ATG" 
2195
2349
                                                pd.GetRegion = getBlock; pd.SetRegion = setBlock; pd.StartLocation = startLocation; pd.EndLocation = qualIdentEndLocation; pd.BodyStart = bodyStart; pd.BodyEnd = t.EndLocation; 
2196
 
                                        } else SynErr(152);
2197
 
                                } else if (la.kind == 110) {
 
2350
                                        } else SynErr(175);
 
2351
                                } else if (la.kind == 111) {
2198
2352
                                        lexer.NextToken();
2199
2353
                                        Expect(18);
2200
2354
                                        FormalParameterList(
2201
 
#line  1063 "cs.ATG" 
 
2355
#line  1116 "Frames/cs.ATG" 
2202
2356
parameters);
2203
2357
                                        Expect(19);
2204
2358
 
2205
 
#line  1063 "cs.ATG" 
 
2359
#line  1116 "Frames/cs.ATG" 
2206
2360
                                        Location bracketEndLocation = t.EndLocation; 
2207
2361
 
2208
 
#line  1063 "cs.ATG" 
 
2362
#line  1116 "Frames/cs.ATG" 
2209
2363
                                        IndexerDeclaration id = new IndexerDeclaration(type, parameters, mod, attributes); compilationUnit.AddChild(id); 
2210
2364
                                        Expect(16);
2211
2365
 
2212
 
#line  1064 "cs.ATG" 
 
2366
#line  1117 "Frames/cs.ATG" 
2213
2367
                                        Location bodyStart = t.Location;
2214
2368
                                        InterfaceAccessors(
2215
 
#line  1064 "cs.ATG" 
 
2369
#line  1117 "Frames/cs.ATG" 
2216
2370
out getBlock, out setBlock);
2217
2371
                                        Expect(17);
2218
2372
 
2219
 
#line  1064 "cs.ATG" 
 
2373
#line  1117 "Frames/cs.ATG" 
2220
2374
                                        id.GetRegion = getBlock; id.SetRegion = setBlock; id.StartLocation = startLocation;  id.EndLocation = bracketEndLocation; id.BodyStart = bodyStart; id.BodyEnd = t.EndLocation;
2221
 
                                } else SynErr(153);
 
2375
                                } else SynErr(176);
2222
2376
                        } else {
2223
2377
                                lexer.NextToken();
2224
2378
 
2225
 
#line  1067 "cs.ATG" 
 
2379
#line  1120 "Frames/cs.ATG" 
2226
2380
                                if (startLocation.X == -1) startLocation = t.Location; 
2227
2381
                                Type(
2228
 
#line  1067 "cs.ATG" 
 
2382
#line  1121 "Frames/cs.ATG" 
2229
2383
out type);
2230
 
                                Expect(1);
 
2384
                                Identifier();
2231
2385
 
2232
 
#line  1067 "cs.ATG" 
2233
 
                                EventDeclaration ed = new EventDeclaration(type, t.val, mod, attributes, null);
 
2386
#line  1122 "Frames/cs.ATG" 
 
2387
                                EventDeclaration ed = new EventDeclaration {
 
2388
                                TypeReference = type, Name = t.val, Modifier = mod, Attributes = attributes
 
2389
                                };
2234
2390
                                compilationUnit.AddChild(ed);
2235
2391
                                
2236
2392
                                Expect(11);
2237
2393
 
2238
 
#line  1070 "cs.ATG" 
 
2394
#line  1127 "Frames/cs.ATG" 
2239
2395
                                ed.StartLocation = startLocation; ed.EndLocation = t.EndLocation; 
2240
2396
                        }
2241
 
                } else SynErr(154);
 
2397
                } else SynErr(177);
2242
2398
        }
2243
2399
 
2244
2400
        void EnumMemberDecl(
2245
 
#line  1075 "cs.ATG" 
 
2401
#line  1132 "Frames/cs.ATG" 
2246
2402
out FieldDeclaration f) {
2247
2403
 
2248
 
#line  1077 "cs.ATG" 
 
2404
#line  1134 "Frames/cs.ATG" 
2249
2405
                Expression expr = null;
2250
2406
                List<AttributeSection> attributes = new List<AttributeSection>();
2251
2407
                AttributeSection section = null;
2253
2409
                
2254
2410
                while (la.kind == 18) {
2255
2411
                        AttributeSection(
2256
 
#line  1083 "cs.ATG" 
 
2412
#line  1140 "Frames/cs.ATG" 
2257
2413
out section);
2258
2414
 
2259
 
#line  1083 "cs.ATG" 
 
2415
#line  1140 "Frames/cs.ATG" 
2260
2416
                        attributes.Add(section); 
2261
2417
                }
2262
 
                Expect(1);
 
2418
                Identifier();
2263
2419
 
2264
 
#line  1084 "cs.ATG" 
 
2420
#line  1141 "Frames/cs.ATG" 
2265
2421
                f = new FieldDeclaration(attributes);
2266
 
                varDecl = new VariableDeclaration(t.val);
2267
 
                varDecl.StartLocation = t.Location;                                        
2268
 
                varDecl.EndLocation = t.EndLocation;
2269
 
                                        f.StartLocation = t.Location;
2270
 
                                        f.EndLocation = t.EndLocation;
2271
 
                                        f.Fields.Add(varDecl);
2272
 
                                     
 
2422
                varDecl         = new VariableDeclaration(t.val);
 
2423
                f.Fields.Add(varDecl);
 
2424
                f.StartLocation = t.Location;
 
2425
                f.EndLocation = t.EndLocation;
 
2426
                
2273
2427
                if (la.kind == 3) {
2274
2428
                        lexer.NextToken();
2275
2429
                        Expr(
2276
 
#line  1092 "cs.ATG" 
 
2430
#line  1147 "Frames/cs.ATG" 
2277
2431
out expr);
2278
2432
 
2279
 
#line  1092 "cs.ATG" 
2280
 
                        varDecl.EndLocation = t.EndLocation;  varDecl.Initializer = expr; 
 
2433
#line  1147 "Frames/cs.ATG" 
 
2434
                        varDecl.Initializer = expr; 
2281
2435
                }
2282
2436
        }
2283
2437
 
2284
2438
        void TypeWithRestriction(
2285
 
#line  523 "cs.ATG" 
 
2439
#line  556 "Frames/cs.ATG" 
2286
2440
out TypeReference type, bool allowNullable, bool canBeUnbound) {
2287
2441
 
2288
 
#line  525 "cs.ATG" 
 
2442
#line  558 "Frames/cs.ATG" 
2289
2443
                Location startPos = la.Location;
2290
2444
                string name;
2291
2445
                int pointer = 0;
2292
2446
                type = null;
2293
2447
                
2294
 
                if (la.kind == 1 || la.kind == 90 || la.kind == 107) {
 
2448
                if (StartOf(4)) {
2295
2449
                        ClassType(
2296
 
#line  531 "cs.ATG" 
 
2450
#line  564 "Frames/cs.ATG" 
2297
2451
out type, canBeUnbound);
2298
 
                } else if (StartOf(4)) {
 
2452
                } else if (StartOf(5)) {
2299
2453
                        SimpleType(
2300
 
#line  532 "cs.ATG" 
 
2454
#line  565 "Frames/cs.ATG" 
2301
2455
out name);
2302
2456
 
2303
 
#line  532 "cs.ATG" 
 
2457
#line  565 "Frames/cs.ATG" 
2304
2458
                        type = new TypeReference(name); 
2305
 
                } else if (la.kind == 122) {
 
2459
                } else if (la.kind == 123) {
2306
2460
                        lexer.NextToken();
2307
2461
                        Expect(6);
2308
2462
 
2309
 
#line  533 "cs.ATG" 
 
2463
#line  566 "Frames/cs.ATG" 
2310
2464
                        pointer = 1; type = new TypeReference("void"); 
2311
 
                } else SynErr(155);
 
2465
                } else SynErr(178);
2312
2466
 
2313
 
#line  534 "cs.ATG" 
 
2467
#line  567 "Frames/cs.ATG" 
2314
2468
                List<int> r = new List<int>(); 
2315
2469
                if (
2316
 
#line  536 "cs.ATG" 
 
2470
#line  569 "Frames/cs.ATG" 
2317
2471
allowNullable && la.kind == Tokens.Question) {
2318
2472
                        NullableQuestionMark(
2319
 
#line  536 "cs.ATG" 
 
2473
#line  569 "Frames/cs.ATG" 
2320
2474
ref type);
2321
2475
                }
2322
2476
                while (
2323
 
#line  538 "cs.ATG" 
 
2477
#line  571 "Frames/cs.ATG" 
2324
2478
IsPointerOrDims()) {
2325
2479
 
2326
 
#line  538 "cs.ATG" 
 
2480
#line  571 "Frames/cs.ATG" 
2327
2481
                        int i = 0; 
2328
2482
                        if (la.kind == 6) {
2329
2483
                                lexer.NextToken();
2330
2484
 
2331
 
#line  539 "cs.ATG" 
 
2485
#line  572 "Frames/cs.ATG" 
2332
2486
                                ++pointer; 
2333
2487
                        } else if (la.kind == 18) {
2334
2488
                                lexer.NextToken();
2335
2489
                                while (la.kind == 14) {
2336
2490
                                        lexer.NextToken();
2337
2491
 
2338
 
#line  540 "cs.ATG" 
 
2492
#line  573 "Frames/cs.ATG" 
2339
2493
                                        ++i; 
2340
2494
                                }
2341
2495
                                Expect(19);
2342
2496
 
2343
 
#line  540 "cs.ATG" 
 
2497
#line  573 "Frames/cs.ATG" 
2344
2498
                                r.Add(i); 
2345
 
                        } else SynErr(156);
 
2499
                        } else SynErr(179);
2346
2500
                }
2347
2501
 
2348
 
#line  543 "cs.ATG" 
 
2502
#line  576 "Frames/cs.ATG" 
2349
2503
                if (type != null) {
2350
2504
                type.RankSpecifier = r.ToArray();
2351
2505
                type.PointerNestingLevel = pointer;
2352
2506
                type.EndLocation = t.EndLocation;
2353
2507
                type.StartLocation = startPos;
 
2508
                
2354
2509
                  }
2355
2510
                
2356
2511
        }
2357
2512
 
2358
2513
        void SimpleType(
2359
 
#line  579 "cs.ATG" 
 
2514
#line  613 "Frames/cs.ATG" 
2360
2515
out string name) {
2361
2516
 
2362
 
#line  580 "cs.ATG" 
 
2517
#line  614 "Frames/cs.ATG" 
2363
2518
                name = String.Empty; 
2364
 
                if (StartOf(19)) {
 
2519
                if (StartOf(24)) {
2365
2520
                        IntegralType(
2366
 
#line  582 "cs.ATG" 
 
2521
#line  616 "Frames/cs.ATG" 
2367
2522
out name);
2368
 
                } else if (la.kind == 74) {
 
2523
                } else if (la.kind == 75) {
2369
2524
                        lexer.NextToken();
2370
2525
 
2371
 
#line  583 "cs.ATG" 
 
2526
#line  617 "Frames/cs.ATG" 
2372
2527
                        name = "float"; 
2373
 
                } else if (la.kind == 65) {
 
2528
                } else if (la.kind == 66) {
2374
2529
                        lexer.NextToken();
2375
2530
 
2376
 
#line  584 "cs.ATG" 
 
2531
#line  618 "Frames/cs.ATG" 
2377
2532
                        name = "double"; 
2378
 
                } else if (la.kind == 61) {
 
2533
                } else if (la.kind == 62) {
2379
2534
                        lexer.NextToken();
2380
2535
 
2381
 
#line  585 "cs.ATG" 
 
2536
#line  619 "Frames/cs.ATG" 
2382
2537
                        name = "decimal"; 
2383
 
                } else if (la.kind == 51) {
 
2538
                } else if (la.kind == 52) {
2384
2539
                        lexer.NextToken();
2385
2540
 
2386
 
#line  586 "cs.ATG" 
 
2541
#line  620 "Frames/cs.ATG" 
2387
2542
                        name = "bool"; 
2388
 
                } else SynErr(157);
 
2543
                } else SynErr(180);
2389
2544
        }
2390
2545
 
2391
2546
        void NullableQuestionMark(
2392
 
#line  2046 "cs.ATG" 
 
2547
#line  2302 "Frames/cs.ATG" 
2393
2548
ref TypeReference typeRef) {
2394
2549
 
2395
 
#line  2047 "cs.ATG" 
 
2550
#line  2303 "Frames/cs.ATG" 
2396
2551
                List<TypeReference> typeArguments = new List<TypeReference>(1); 
2397
2552
                Expect(12);
2398
2553
 
2399
 
#line  2051 "cs.ATG" 
 
2554
#line  2307 "Frames/cs.ATG" 
2400
2555
                if (typeRef != null) typeArguments.Add(typeRef);
2401
2556
                typeRef = new TypeReference("System.Nullable", typeArguments);
2402
2557
                
2403
2558
        }
2404
2559
 
2405
2560
        void FixedParameter(
2406
 
#line  616 "cs.ATG" 
 
2561
#line  650 "Frames/cs.ATG" 
2407
2562
out ParameterDeclarationExpression p) {
2408
2563
 
2409
 
#line  618 "cs.ATG" 
 
2564
#line  652 "Frames/cs.ATG" 
2410
2565
                TypeReference type;
2411
2566
                ParameterModifiers mod = ParameterModifiers.In;
2412
 
                Location start = t.Location;
 
2567
                Location start = la.Location;
2413
2568
                
2414
 
                if (la.kind == 92 || la.kind == 99) {
2415
 
                        if (la.kind == 99) {
 
2569
                if (la.kind == 93 || la.kind == 100) {
 
2570
                        if (la.kind == 100) {
2416
2571
                                lexer.NextToken();
2417
2572
 
2418
 
#line  624 "cs.ATG" 
 
2573
#line  658 "Frames/cs.ATG" 
2419
2574
                                mod = ParameterModifiers.Ref; 
2420
2575
                        } else {
2421
2576
                                lexer.NextToken();
2422
2577
 
2423
 
#line  625 "cs.ATG" 
 
2578
#line  659 "Frames/cs.ATG" 
2424
2579
                                mod = ParameterModifiers.Out; 
2425
2580
                        }
2426
2581
                }
2427
2582
                Type(
2428
 
#line  627 "cs.ATG" 
 
2583
#line  661 "Frames/cs.ATG" 
2429
2584
out type);
2430
 
                Expect(1);
 
2585
                Identifier();
2431
2586
 
2432
 
#line  627 "cs.ATG" 
 
2587
#line  661 "Frames/cs.ATG" 
2433
2588
                p = new ParameterDeclarationExpression(type, t.val, mod); p.StartLocation = start; p.EndLocation = t.Location; 
2434
2589
        }
2435
2590
 
2436
2591
        void ParameterArray(
2437
 
#line  630 "cs.ATG" 
 
2592
#line  664 "Frames/cs.ATG" 
2438
2593
out ParameterDeclarationExpression p) {
2439
2594
 
2440
 
#line  631 "cs.ATG" 
 
2595
#line  665 "Frames/cs.ATG" 
2441
2596
                TypeReference type; 
2442
 
                Expect(94);
 
2597
                Expect(95);
2443
2598
                Type(
2444
 
#line  633 "cs.ATG" 
 
2599
#line  667 "Frames/cs.ATG" 
2445
2600
out type);
2446
 
                Expect(1);
 
2601
                Identifier();
2447
2602
 
2448
 
#line  633 "cs.ATG" 
 
2603
#line  667 "Frames/cs.ATG" 
2449
2604
                p = new ParameterDeclarationExpression(type, t.val, ParameterModifiers.Params); 
2450
2605
        }
2451
2606
 
2452
2607
        void AccessorModifiers(
2453
 
#line  636 "cs.ATG" 
 
2608
#line  670 "Frames/cs.ATG" 
2454
2609
out ModifierList m) {
2455
2610
 
2456
 
#line  637 "cs.ATG" 
 
2611
#line  671 "Frames/cs.ATG" 
2457
2612
                m = new ModifierList(); 
2458
 
                if (la.kind == 95) {
 
2613
                if (la.kind == 96) {
2459
2614
                        lexer.NextToken();
2460
2615
 
2461
 
#line  639 "cs.ATG" 
 
2616
#line  673 "Frames/cs.ATG" 
2462
2617
                        m.Add(Modifiers.Private, t.Location); 
2463
 
                } else if (la.kind == 96) {
 
2618
                } else if (la.kind == 97) {
2464
2619
                        lexer.NextToken();
2465
2620
 
2466
 
#line  640 "cs.ATG" 
 
2621
#line  674 "Frames/cs.ATG" 
2467
2622
                        m.Add(Modifiers.Protected, t.Location); 
2468
 
                        if (la.kind == 83) {
 
2623
                        if (la.kind == 84) {
2469
2624
                                lexer.NextToken();
2470
2625
 
2471
 
#line  641 "cs.ATG" 
 
2626
#line  675 "Frames/cs.ATG" 
2472
2627
                                m.Add(Modifiers.Internal, t.Location); 
2473
2628
                        }
2474
 
                } else if (la.kind == 83) {
 
2629
                } else if (la.kind == 84) {
2475
2630
                        lexer.NextToken();
2476
2631
 
2477
 
#line  642 "cs.ATG" 
 
2632
#line  676 "Frames/cs.ATG" 
2478
2633
                        m.Add(Modifiers.Internal, t.Location); 
2479
 
                        if (la.kind == 96) {
 
2634
                        if (la.kind == 97) {
2480
2635
                                lexer.NextToken();
2481
2636
 
2482
 
#line  643 "cs.ATG" 
 
2637
#line  677 "Frames/cs.ATG" 
2483
2638
                                m.Add(Modifiers.Protected, t.Location); 
2484
2639
                        }
2485
 
                } else SynErr(158);
 
2640
                } else SynErr(181);
2486
2641
        }
2487
2642
 
2488
2643
        void Block(
2489
 
#line  1222 "cs.ATG" 
 
2644
#line  1266 "Frames/cs.ATG" 
2490
2645
out Statement stmt) {
2491
2646
                Expect(16);
2492
2647
 
2493
 
#line  1224 "cs.ATG" 
 
2648
#line  1268 "Frames/cs.ATG" 
2494
2649
                BlockStatement blockStmt = new BlockStatement();
2495
2650
                blockStmt.StartLocation = t.Location;
2496
2651
                compilationUnit.BlockStart(blockStmt);
2497
2652
                if (!ParseMethodBodies) lexer.SkipCurrentBlock(0);
2498
2653
                
2499
 
                while (StartOf(20)) {
 
2654
                while (StartOf(25)) {
2500
2655
                        Statement();
2501
2656
                }
 
2657
                while (!(la.kind == 0 || la.kind == 17)) {SynErr(182); lexer.NextToken(); }
2502
2658
                Expect(17);
2503
2659
 
2504
 
#line  1231 "cs.ATG" 
 
2660
#line  1276 "Frames/cs.ATG" 
2505
2661
                stmt = blockStmt;
2506
2662
                blockStmt.EndLocation = t.EndLocation;
2507
2663
                compilationUnit.BlockEnd();
2509
2665
        }
2510
2666
 
2511
2667
        void EventAccessorDecls(
2512
 
#line  1157 "cs.ATG" 
 
2668
#line  1204 "Frames/cs.ATG" 
2513
2669
out EventAddRegion addBlock, out EventRemoveRegion removeBlock) {
2514
2670
 
2515
 
#line  1158 "cs.ATG" 
 
2671
#line  1205 "Frames/cs.ATG" 
2516
2672
                AttributeSection section;
2517
2673
                List<AttributeSection> attributes = new List<AttributeSection>();
2518
2674
                Statement stmt;
2521
2677
                
2522
2678
                while (la.kind == 18) {
2523
2679
                        AttributeSection(
2524
 
#line  1165 "cs.ATG" 
 
2680
#line  1212 "Frames/cs.ATG" 
2525
2681
out section);
2526
2682
 
2527
 
#line  1165 "cs.ATG" 
 
2683
#line  1212 "Frames/cs.ATG" 
2528
2684
                        attributes.Add(section); 
2529
2685
                }
2530
 
                if (
2531
 
#line  1167 "cs.ATG" 
2532
 
IdentIsAdd()) {
 
2686
                if (la.kind == 130) {
2533
2687
 
2534
 
#line  1167 "cs.ATG" 
 
2688
#line  1214 "Frames/cs.ATG" 
2535
2689
                        addBlock = new EventAddRegion(attributes); 
2536
2690
                        AddAccessorDecl(
2537
 
#line  1168 "cs.ATG" 
 
2691
#line  1215 "Frames/cs.ATG" 
2538
2692
out stmt);
2539
2693
 
2540
 
#line  1168 "cs.ATG" 
 
2694
#line  1215 "Frames/cs.ATG" 
2541
2695
                        attributes = new List<AttributeSection>(); addBlock.Block = (BlockStatement)stmt; 
2542
2696
                        while (la.kind == 18) {
2543
2697
                                AttributeSection(
2544
 
#line  1169 "cs.ATG" 
 
2698
#line  1216 "Frames/cs.ATG" 
2545
2699
out section);
2546
2700
 
2547
 
#line  1169 "cs.ATG" 
 
2701
#line  1216 "Frames/cs.ATG" 
2548
2702
                                attributes.Add(section); 
2549
2703
                        }
2550
2704
                        RemoveAccessorDecl(
2551
 
#line  1170 "cs.ATG" 
 
2705
#line  1217 "Frames/cs.ATG" 
2552
2706
out stmt);
2553
2707
 
2554
 
#line  1170 "cs.ATG" 
 
2708
#line  1217 "Frames/cs.ATG" 
2555
2709
                        removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; 
2556
 
                } else if (
2557
 
#line  1171 "cs.ATG" 
2558
 
IdentIsRemove()) {
 
2710
                } else if (la.kind == 131) {
2559
2711
                        RemoveAccessorDecl(
2560
 
#line  1172 "cs.ATG" 
 
2712
#line  1219 "Frames/cs.ATG" 
2561
2713
out stmt);
2562
2714
 
2563
 
#line  1172 "cs.ATG" 
 
2715
#line  1219 "Frames/cs.ATG" 
2564
2716
                        removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new List<AttributeSection>(); 
2565
2717
                        while (la.kind == 18) {
2566
2718
                                AttributeSection(
2567
 
#line  1173 "cs.ATG" 
 
2719
#line  1220 "Frames/cs.ATG" 
2568
2720
out section);
2569
2721
 
2570
 
#line  1173 "cs.ATG" 
 
2722
#line  1220 "Frames/cs.ATG" 
2571
2723
                                attributes.Add(section); 
2572
2724
                        }
2573
2725
                        AddAccessorDecl(
2574
 
#line  1174 "cs.ATG" 
 
2726
#line  1221 "Frames/cs.ATG" 
2575
2727
out stmt);
2576
2728
 
2577
 
#line  1174 "cs.ATG" 
 
2729
#line  1221 "Frames/cs.ATG" 
2578
2730
                        addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt; 
2579
 
                } else if (la.kind == 1) {
2580
 
                        lexer.NextToken();
2581
 
 
2582
 
#line  1175 "cs.ATG" 
2583
 
                        Error("add or remove accessor declaration expected"); 
2584
 
                } else SynErr(159);
 
2731
                } else SynErr(183);
2585
2732
        }
2586
2733
 
2587
2734
        void ConstructorInitializer(
2588
 
#line  1253 "cs.ATG" 
 
2735
#line  1296 "Frames/cs.ATG" 
2589
2736
out ConstructorInitializer ci) {
2590
2737
 
2591
 
#line  1254 "cs.ATG" 
 
2738
#line  1297 "Frames/cs.ATG" 
2592
2739
                Expression expr; ci = new ConstructorInitializer(); 
2593
2740
                Expect(9);
2594
 
                if (la.kind == 50) {
 
2741
                if (la.kind == 51) {
2595
2742
                        lexer.NextToken();
2596
2743
 
2597
 
#line  1258 "cs.ATG" 
 
2744
#line  1301 "Frames/cs.ATG" 
2598
2745
                        ci.ConstructorInitializerType = ConstructorInitializerType.Base; 
2599
 
                } else if (la.kind == 110) {
 
2746
                } else if (la.kind == 111) {
2600
2747
                        lexer.NextToken();
2601
2748
 
2602
 
#line  1259 "cs.ATG" 
 
2749
#line  1302 "Frames/cs.ATG" 
2603
2750
                        ci.ConstructorInitializerType = ConstructorInitializerType.This; 
2604
 
                } else SynErr(160);
 
2751
                } else SynErr(184);
2605
2752
                Expect(20);
2606
 
                if (StartOf(21)) {
 
2753
                if (StartOf(26)) {
2607
2754
                        Argument(
2608
 
#line  1262 "cs.ATG" 
 
2755
#line  1305 "Frames/cs.ATG" 
2609
2756
out expr);
2610
2757
 
2611
 
#line  1262 "cs.ATG" 
 
2758
#line  1305 "Frames/cs.ATG" 
2612
2759
                        if (expr != null) { ci.Arguments.Add(expr); } 
2613
2760
                        while (la.kind == 14) {
2614
2761
                                lexer.NextToken();
2615
2762
                                Argument(
2616
 
#line  1262 "cs.ATG" 
 
2763
#line  1305 "Frames/cs.ATG" 
2617
2764
out expr);
2618
2765
 
2619
 
#line  1262 "cs.ATG" 
 
2766
#line  1305 "Frames/cs.ATG" 
2620
2767
                                if (expr != null) { ci.Arguments.Add(expr); } 
2621
2768
                        }
2622
2769
                }
2624
2771
        }
2625
2772
 
2626
2773
        void OverloadableOperator(
2627
 
#line  1274 "cs.ATG" 
 
2774
#line  1317 "Frames/cs.ATG" 
2628
2775
out OverloadableOperatorType op) {
2629
2776
 
2630
 
#line  1275 "cs.ATG" 
 
2777
#line  1318 "Frames/cs.ATG" 
2631
2778
                op = OverloadableOperatorType.None; 
2632
2779
                switch (la.kind) {
2633
2780
                case 4: {
2634
2781
                        lexer.NextToken();
2635
2782
 
2636
 
#line  1277 "cs.ATG" 
 
2783
#line  1320 "Frames/cs.ATG" 
2637
2784
                        op = OverloadableOperatorType.Add; 
2638
2785
                        break;
2639
2786
                }
2640
2787
                case 5: {
2641
2788
                        lexer.NextToken();
2642
2789
 
2643
 
#line  1278 "cs.ATG" 
 
2790
#line  1321 "Frames/cs.ATG" 
2644
2791
                        op = OverloadableOperatorType.Subtract; 
2645
2792
                        break;
2646
2793
                }
2647
2794
                case 24: {
2648
2795
                        lexer.NextToken();
2649
2796
 
2650
 
#line  1280 "cs.ATG" 
 
2797
#line  1323 "Frames/cs.ATG" 
2651
2798
                        op = OverloadableOperatorType.Not; 
2652
2799
                        break;
2653
2800
                }
2654
2801
                case 27: {
2655
2802
                        lexer.NextToken();
2656
2803
 
2657
 
#line  1281 "cs.ATG" 
 
2804
#line  1324 "Frames/cs.ATG" 
2658
2805
                        op = OverloadableOperatorType.BitNot; 
2659
2806
                        break;
2660
2807
                }
2661
2808
                case 31: {
2662
2809
                        lexer.NextToken();
2663
2810
 
2664
 
#line  1283 "cs.ATG" 
 
2811
#line  1326 "Frames/cs.ATG" 
2665
2812
                        op = OverloadableOperatorType.Increment; 
2666
2813
                        break;
2667
2814
                }
2668
2815
                case 32: {
2669
2816
                        lexer.NextToken();
2670
2817
 
2671
 
#line  1284 "cs.ATG" 
 
2818
#line  1327 "Frames/cs.ATG" 
2672
2819
                        op = OverloadableOperatorType.Decrement; 
2673
2820
                        break;
2674
2821
                }
2675
 
                case 112: {
 
2822
                case 113: {
2676
2823
                        lexer.NextToken();
2677
2824
 
2678
 
#line  1286 "cs.ATG" 
 
2825
#line  1329 "Frames/cs.ATG" 
2679
2826
                        op = OverloadableOperatorType.IsTrue; 
2680
2827
                        break;
2681
2828
                }
2682
 
                case 71: {
 
2829
                case 72: {
2683
2830
                        lexer.NextToken();
2684
2831
 
2685
 
#line  1287 "cs.ATG" 
 
2832
#line  1330 "Frames/cs.ATG" 
2686
2833
                        op = OverloadableOperatorType.IsFalse; 
2687
2834
                        break;
2688
2835
                }
2689
2836
                case 6: {
2690
2837
                        lexer.NextToken();
2691
2838
 
2692
 
#line  1289 "cs.ATG" 
 
2839
#line  1332 "Frames/cs.ATG" 
2693
2840
                        op = OverloadableOperatorType.Multiply; 
2694
2841
                        break;
2695
2842
                }
2696
2843
                case 7: {
2697
2844
                        lexer.NextToken();
2698
2845
 
2699
 
#line  1290 "cs.ATG" 
 
2846
#line  1333 "Frames/cs.ATG" 
2700
2847
                        op = OverloadableOperatorType.Divide; 
2701
2848
                        break;
2702
2849
                }
2703
2850
                case 8: {
2704
2851
                        lexer.NextToken();
2705
2852
 
2706
 
#line  1291 "cs.ATG" 
 
2853
#line  1334 "Frames/cs.ATG" 
2707
2854
                        op = OverloadableOperatorType.Modulus; 
2708
2855
                        break;
2709
2856
                }
2710
2857
                case 28: {
2711
2858
                        lexer.NextToken();
2712
2859
 
2713
 
#line  1293 "cs.ATG" 
 
2860
#line  1336 "Frames/cs.ATG" 
2714
2861
                        op = OverloadableOperatorType.BitwiseAnd; 
2715
2862
                        break;
2716
2863
                }
2717
2864
                case 29: {
2718
2865
                        lexer.NextToken();
2719
2866
 
2720
 
#line  1294 "cs.ATG" 
 
2867
#line  1337 "Frames/cs.ATG" 
2721
2868
                        op = OverloadableOperatorType.BitwiseOr; 
2722
2869
                        break;
2723
2870
                }
2724
2871
                case 30: {
2725
2872
                        lexer.NextToken();
2726
2873
 
2727
 
#line  1295 "cs.ATG" 
 
2874
#line  1338 "Frames/cs.ATG" 
2728
2875
                        op = OverloadableOperatorType.ExclusiveOr; 
2729
2876
                        break;
2730
2877
                }
2731
2878
                case 37: {
2732
2879
                        lexer.NextToken();
2733
2880
 
2734
 
#line  1297 "cs.ATG" 
 
2881
#line  1340 "Frames/cs.ATG" 
2735
2882
                        op = OverloadableOperatorType.ShiftLeft; 
2736
2883
                        break;
2737
2884
                }
2738
2885
                case 33: {
2739
2886
                        lexer.NextToken();
2740
2887
 
2741
 
#line  1298 "cs.ATG" 
 
2888
#line  1341 "Frames/cs.ATG" 
2742
2889
                        op = OverloadableOperatorType.Equality; 
2743
2890
                        break;
2744
2891
                }
2745
2892
                case 34: {
2746
2893
                        lexer.NextToken();
2747
2894
 
2748
 
#line  1299 "cs.ATG" 
 
2895
#line  1342 "Frames/cs.ATG" 
2749
2896
                        op = OverloadableOperatorType.InEquality; 
2750
2897
                        break;
2751
2898
                }
2752
2899
                case 23: {
2753
2900
                        lexer.NextToken();
2754
2901
 
2755
 
#line  1300 "cs.ATG" 
 
2902
#line  1343 "Frames/cs.ATG" 
2756
2903
                        op = OverloadableOperatorType.LessThan; 
2757
2904
                        break;
2758
2905
                }
2759
2906
                case 35: {
2760
2907
                        lexer.NextToken();
2761
2908
 
2762
 
#line  1301 "cs.ATG" 
 
2909
#line  1344 "Frames/cs.ATG" 
2763
2910
                        op = OverloadableOperatorType.GreaterThanOrEqual; 
2764
2911
                        break;
2765
2912
                }
2766
2913
                case 36: {
2767
2914
                        lexer.NextToken();
2768
2915
 
2769
 
#line  1302 "cs.ATG" 
 
2916
#line  1345 "Frames/cs.ATG" 
2770
2917
                        op = OverloadableOperatorType.LessThanOrEqual; 
2771
2918
                        break;
2772
2919
                }
2773
2920
                case 22: {
2774
2921
                        lexer.NextToken();
2775
2922
 
2776
 
#line  1303 "cs.ATG" 
 
2923
#line  1346 "Frames/cs.ATG" 
2777
2924
                        op = OverloadableOperatorType.GreaterThan; 
2778
2925
                        if (la.kind == 22) {
2779
2926
                                lexer.NextToken();
2780
2927
 
2781
 
#line  1303 "cs.ATG" 
 
2928
#line  1346 "Frames/cs.ATG" 
2782
2929
                                op = OverloadableOperatorType.ShiftRight; 
2783
2930
                        }
2784
2931
                        break;
2785
2932
                }
2786
 
                default: SynErr(161); break;
 
2933
                default: SynErr(185); break;
2787
2934
                }
2788
2935
        }
2789
2936
 
2790
2937
        void VariableDeclarator(
2791
 
#line  1215 "cs.ATG" 
 
2938
#line  1259 "Frames/cs.ATG" 
2792
2939
List<VariableDeclaration> fieldDeclaration) {
2793
2940
 
2794
 
#line  1216 "cs.ATG" 
 
2941
#line  1260 "Frames/cs.ATG" 
2795
2942
                Expression expr = null; 
2796
 
                Expect(1);
 
2943
                Identifier();
2797
2944
 
2798
 
#line  1218 "cs.ATG" 
 
2945
#line  1262 "Frames/cs.ATG" 
2799
2946
                VariableDeclaration f = new VariableDeclaration(t.val); f.StartLocation = t.Location; 
2800
2947
                if (la.kind == 3) {
2801
2948
                        lexer.NextToken();
2802
2949
                        VariableInitializer(
2803
 
#line  1219 "cs.ATG" 
 
2950
#line  1263 "Frames/cs.ATG" 
2804
2951
out expr);
2805
2952
 
2806
 
#line  1219 "cs.ATG" 
 
2953
#line  1263 "Frames/cs.ATG" 
2807
2954
                        f.Initializer = expr; 
2808
2955
                }
2809
2956
 
2810
 
#line  1219 "cs.ATG" 
2811
 
                f.EndLocation = t.EndLocation;  fieldDeclaration.Add(f); 
 
2957
#line  1263 "Frames/cs.ATG" 
 
2958
                f.EndLocation = t.EndLocation; fieldDeclaration.Add(f); 
2812
2959
        }
2813
2960
 
2814
2961
        void AccessorDecls(
2815
 
#line  1096 "cs.ATG" 
 
2962
#line  1151 "Frames/cs.ATG" 
2816
2963
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
2817
2964
 
2818
 
#line  1098 "cs.ATG" 
 
2965
#line  1153 "Frames/cs.ATG" 
2819
2966
                List<AttributeSection> attributes = new List<AttributeSection>(); 
2820
2967
                AttributeSection section;
2821
2968
                getBlock = null;
2824
2971
                
2825
2972
                while (la.kind == 18) {
2826
2973
                        AttributeSection(
2827
 
#line  1105 "cs.ATG" 
 
2974
#line  1160 "Frames/cs.ATG" 
2828
2975
out section);
2829
2976
 
2830
 
#line  1105 "cs.ATG" 
 
2977
#line  1160 "Frames/cs.ATG" 
2831
2978
                        attributes.Add(section); 
2832
2979
                }
2833
 
                if (la.kind == 83 || la.kind == 95 || la.kind == 96) {
 
2980
                if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
2834
2981
                        AccessorModifiers(
2835
 
#line  1106 "cs.ATG" 
 
2982
#line  1161 "Frames/cs.ATG" 
2836
2983
out modifiers);
2837
2984
                }
2838
 
                if (
2839
 
#line  1108 "cs.ATG" 
2840
 
IdentIsGet()) {
 
2985
                if (la.kind == 128) {
2841
2986
                        GetAccessorDecl(
2842
 
#line  1109 "cs.ATG" 
 
2987
#line  1163 "Frames/cs.ATG" 
2843
2988
out getBlock, attributes);
2844
2989
 
2845
 
#line  1110 "cs.ATG" 
 
2990
#line  1164 "Frames/cs.ATG" 
2846
2991
                        if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } 
2847
 
                        if (StartOf(22)) {
 
2992
                        if (StartOf(27)) {
2848
2993
 
2849
 
#line  1111 "cs.ATG" 
 
2994
#line  1165 "Frames/cs.ATG" 
2850
2995
                                attributes = new List<AttributeSection>(); modifiers = null; 
2851
2996
                                while (la.kind == 18) {
2852
2997
                                        AttributeSection(
2853
 
#line  1112 "cs.ATG" 
 
2998
#line  1166 "Frames/cs.ATG" 
2854
2999
out section);
2855
3000
 
2856
 
#line  1112 "cs.ATG" 
 
3001
#line  1166 "Frames/cs.ATG" 
2857
3002
                                        attributes.Add(section); 
2858
3003
                                }
2859
 
                                if (la.kind == 83 || la.kind == 95 || la.kind == 96) {
 
3004
                                if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
2860
3005
                                        AccessorModifiers(
2861
 
#line  1113 "cs.ATG" 
 
3006
#line  1167 "Frames/cs.ATG" 
2862
3007
out modifiers);
2863
3008
                                }
2864
3009
                                SetAccessorDecl(
2865
 
#line  1114 "cs.ATG" 
 
3010
#line  1168 "Frames/cs.ATG" 
2866
3011
out setBlock, attributes);
2867
3012
 
2868
 
#line  1115 "cs.ATG" 
 
3013
#line  1169 "Frames/cs.ATG" 
2869
3014
                                if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } 
2870
3015
                        }
2871
 
                } else if (
2872
 
#line  1117 "cs.ATG" 
2873
 
IdentIsSet()) {
 
3016
                } else if (la.kind == 129) {
2874
3017
                        SetAccessorDecl(
2875
 
#line  1118 "cs.ATG" 
 
3018
#line  1172 "Frames/cs.ATG" 
2876
3019
out setBlock, attributes);
2877
3020
 
2878
 
#line  1119 "cs.ATG" 
 
3021
#line  1173 "Frames/cs.ATG" 
2879
3022
                        if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } 
2880
 
                        if (StartOf(22)) {
 
3023
                        if (StartOf(28)) {
2881
3024
 
2882
 
#line  1120 "cs.ATG" 
 
3025
#line  1174 "Frames/cs.ATG" 
2883
3026
                                attributes = new List<AttributeSection>(); modifiers = null; 
2884
3027
                                while (la.kind == 18) {
2885
3028
                                        AttributeSection(
2886
 
#line  1121 "cs.ATG" 
 
3029
#line  1175 "Frames/cs.ATG" 
2887
3030
out section);
2888
3031
 
2889
 
#line  1121 "cs.ATG" 
 
3032
#line  1175 "Frames/cs.ATG" 
2890
3033
                                        attributes.Add(section); 
2891
3034
                                }
2892
 
                                if (la.kind == 83 || la.kind == 95 || la.kind == 96) {
 
3035
                                if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
2893
3036
                                        AccessorModifiers(
2894
 
#line  1122 "cs.ATG" 
 
3037
#line  1176 "Frames/cs.ATG" 
2895
3038
out modifiers);
2896
3039
                                }
2897
3040
                                GetAccessorDecl(
2898
 
#line  1123 "cs.ATG" 
 
3041
#line  1177 "Frames/cs.ATG" 
2899
3042
out getBlock, attributes);
2900
3043
 
2901
 
#line  1124 "cs.ATG" 
 
3044
#line  1178 "Frames/cs.ATG" 
2902
3045
                                if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } 
2903
3046
                        }
2904
 
                } else if (la.kind == 1) {
2905
 
                        lexer.NextToken();
 
3047
                } else if (StartOf(19)) {
 
3048
                        Identifier();
2906
3049
 
2907
 
#line  1126 "cs.ATG" 
 
3050
#line  1180 "Frames/cs.ATG" 
2908
3051
                        Error("get or set accessor declaration expected"); 
2909
 
                } else SynErr(162);
 
3052
                } else SynErr(186);
2910
3053
        }
2911
3054
 
2912
3055
        void InterfaceAccessors(
2913
 
#line  1179 "cs.ATG" 
 
3056
#line  1225 "Frames/cs.ATG" 
2914
3057
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
2915
3058
 
2916
 
#line  1181 "cs.ATG" 
 
3059
#line  1227 "Frames/cs.ATG" 
2917
3060
                AttributeSection section;
2918
3061
                List<AttributeSection> attributes = new List<AttributeSection>();
2919
3062
                getBlock = null; setBlock = null;
2921
3064
                
2922
3065
                while (la.kind == 18) {
2923
3066
                        AttributeSection(
2924
 
#line  1187 "cs.ATG" 
 
3067
#line  1233 "Frames/cs.ATG" 
2925
3068
out section);
2926
3069
 
2927
 
#line  1187 "cs.ATG" 
 
3070
#line  1233 "Frames/cs.ATG" 
2928
3071
                        attributes.Add(section); 
2929
3072
                }
2930
3073
 
2931
 
#line  1188 "cs.ATG" 
 
3074
#line  1234 "Frames/cs.ATG" 
2932
3075
                Location startLocation = la.Location; 
2933
 
                if (
2934
 
#line  1190 "cs.ATG" 
2935
 
IdentIsGet()) {
2936
 
                        Expect(1);
 
3076
                if (la.kind == 128) {
 
3077
                        lexer.NextToken();
2937
3078
 
2938
 
#line  1190 "cs.ATG" 
 
3079
#line  1236 "Frames/cs.ATG" 
2939
3080
                        getBlock = new PropertyGetRegion(null, attributes); 
2940
 
                } else if (
2941
 
#line  1191 "cs.ATG" 
2942
 
IdentIsSet()) {
2943
 
                        Expect(1);
 
3081
                } else if (la.kind == 129) {
 
3082
                        lexer.NextToken();
2944
3083
 
2945
 
#line  1191 "cs.ATG" 
 
3084
#line  1237 "Frames/cs.ATG" 
2946
3085
                        setBlock = new PropertySetRegion(null, attributes); 
2947
 
                } else if (la.kind == 1) {
2948
 
                        lexer.NextToken();
2949
 
 
2950
 
#line  1192 "cs.ATG" 
2951
 
                        Error("set or get expected"); 
2952
 
                } else SynErr(163);
 
3086
                } else SynErr(187);
2953
3087
                Expect(11);
2954
3088
 
2955
 
#line  1195 "cs.ATG" 
 
3089
#line  1240 "Frames/cs.ATG" 
2956
3090
                if (getBlock != null) { getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; }
2957
3091
                if (setBlock != null) { setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; }
2958
3092
                attributes = new List<AttributeSection>(); 
2959
 
                if (la.kind == 1 || la.kind == 18) {
 
3093
                if (la.kind == 18 || la.kind == 128 || la.kind == 129) {
2960
3094
                        while (la.kind == 18) {
2961
3095
                                AttributeSection(
2962
 
#line  1199 "cs.ATG" 
 
3096
#line  1244 "Frames/cs.ATG" 
2963
3097
out section);
2964
3098
 
2965
 
#line  1199 "cs.ATG" 
 
3099
#line  1244 "Frames/cs.ATG" 
2966
3100
                                attributes.Add(section); 
2967
3101
                        }
2968
3102
 
2969
 
#line  1200 "cs.ATG" 
 
3103
#line  1245 "Frames/cs.ATG" 
2970
3104
                        startLocation = la.Location; 
2971
 
                        if (
2972
 
#line  1202 "cs.ATG" 
2973
 
IdentIsGet()) {
2974
 
                                Expect(1);
 
3105
                        if (la.kind == 128) {
 
3106
                                lexer.NextToken();
2975
3107
 
2976
 
#line  1202 "cs.ATG" 
 
3108
#line  1247 "Frames/cs.ATG" 
2977
3109
                                if (getBlock != null) Error("get already declared");
2978
 
                                else { getBlock = new PropertyGetRegion(null, attributes); lastBlock = getBlock; }
2979
 
                                
2980
 
                        } else if (
2981
 
#line  1205 "cs.ATG" 
2982
 
IdentIsSet()) {
2983
 
                                Expect(1);
 
3110
                                                 else { getBlock = new PropertyGetRegion(null, attributes); lastBlock = getBlock; }
 
3111
                                              
 
3112
                        } else if (la.kind == 129) {
 
3113
                                lexer.NextToken();
2984
3114
 
2985
 
#line  1205 "cs.ATG" 
 
3115
#line  1250 "Frames/cs.ATG" 
2986
3116
                                if (setBlock != null) Error("set already declared");
2987
 
                                else { setBlock = new PropertySetRegion(null, attributes); lastBlock = setBlock; }
2988
 
                                
2989
 
                        } else if (la.kind == 1) {
2990
 
                                lexer.NextToken();
2991
 
 
2992
 
#line  1208 "cs.ATG" 
2993
 
                                Error("set or get expected"); 
2994
 
                        } else SynErr(164);
 
3117
                                                 else { setBlock = new PropertySetRegion(null, attributes); lastBlock = setBlock; }
 
3118
                                              
 
3119
                        } else SynErr(188);
2995
3120
                        Expect(11);
2996
3121
 
2997
 
#line  1211 "cs.ATG" 
 
3122
#line  1255 "Frames/cs.ATG" 
2998
3123
                        if (lastBlock != null) { lastBlock.StartLocation = startLocation; lastBlock.EndLocation = t.EndLocation; } 
2999
3124
                }
3000
3125
        }
3001
3126
 
3002
3127
        void GetAccessorDecl(
3003
 
#line  1130 "cs.ATG" 
 
3128
#line  1184 "Frames/cs.ATG" 
3004
3129
out PropertyGetRegion getBlock, List<AttributeSection> attributes) {
3005
3130
 
3006
 
#line  1131 "cs.ATG" 
 
3131
#line  1185 "Frames/cs.ATG" 
3007
3132
                Statement stmt = null; 
3008
 
                Expect(1);
3009
 
 
3010
 
#line  1134 "cs.ATG" 
3011
 
                if (t.val != "get") Error("get expected"); 
3012
 
 
3013
 
#line  1135 "cs.ATG" 
 
3133
                Expect(128);
 
3134
 
 
3135
#line  1188 "Frames/cs.ATG" 
3014
3136
                Location startLocation = t.Location; 
3015
3137
                if (la.kind == 16) {
3016
3138
                        Block(
3017
 
#line  1136 "cs.ATG" 
 
3139
#line  1189 "Frames/cs.ATG" 
3018
3140
out stmt);
3019
3141
                } else if (la.kind == 11) {
3020
3142
                        lexer.NextToken();
3021
 
                } else SynErr(165);
 
3143
                } else SynErr(189);
3022
3144
 
3023
 
#line  1137 "cs.ATG" 
 
3145
#line  1190 "Frames/cs.ATG" 
3024
3146
                getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes); 
3025
3147
 
3026
 
#line  1138 "cs.ATG" 
 
3148
#line  1191 "Frames/cs.ATG" 
3027
3149
                getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; 
3028
3150
        }
3029
3151
 
3030
3152
        void SetAccessorDecl(
3031
 
#line  1141 "cs.ATG" 
 
3153
#line  1194 "Frames/cs.ATG" 
3032
3154
out PropertySetRegion setBlock, List<AttributeSection> attributes) {
3033
3155
 
3034
 
#line  1142 "cs.ATG" 
 
3156
#line  1195 "Frames/cs.ATG" 
3035
3157
                Statement stmt = null; 
3036
 
                Expect(1);
 
3158
                Expect(129);
3037
3159
 
3038
 
#line  1146 "cs.ATG" 
3039
 
                if (t.val != "set") Error("set expected");
 
3160
#line  1198 "Frames/cs.ATG" 
3040
3161
                Location startLocation = t.Location; 
3041
 
                
3042
3162
                if (la.kind == 16) {
3043
3163
                        Block(
3044
 
#line  1149 "cs.ATG" 
 
3164
#line  1199 "Frames/cs.ATG" 
3045
3165
out stmt);
3046
3166
                } else if (la.kind == 11) {
3047
3167
                        lexer.NextToken();
3048
 
                } else SynErr(166);
3049
 
 
3050
 
#line  1151 "cs.ATG" 
3051
 
                setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
3052
 
                setBlock.StartLocation = startLocation; 
3053
 
                setBlock.EndLocation   = t.EndLocation; 
3054
 
                
 
3168
                } else SynErr(190);
 
3169
 
 
3170
#line  1200 "Frames/cs.ATG" 
 
3171
                setBlock = new PropertySetRegion((BlockStatement)stmt, attributes); 
 
3172
 
 
3173
#line  1201 "Frames/cs.ATG" 
 
3174
                setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; 
3055
3175
        }
3056
3176
 
3057
3177
        void AddAccessorDecl(
3058
 
#line  1237 "cs.ATG" 
 
3178
#line  1282 "Frames/cs.ATG" 
3059
3179
out Statement stmt) {
3060
3180
 
3061
 
#line  1238 "cs.ATG" 
 
3181
#line  1283 "Frames/cs.ATG" 
3062
3182
                stmt = null;
3063
 
                Expect(1);
3064
 
 
3065
 
#line  1241 "cs.ATG" 
3066
 
                if (t.val != "add") Error("add expected"); 
 
3183
                Expect(130);
3067
3184
                Block(
3068
 
#line  1242 "cs.ATG" 
 
3185
#line  1286 "Frames/cs.ATG" 
3069
3186
out stmt);
3070
3187
        }
3071
3188
 
3072
3189
        void RemoveAccessorDecl(
3073
 
#line  1245 "cs.ATG" 
 
3190
#line  1289 "Frames/cs.ATG" 
3074
3191
out Statement stmt) {
3075
3192
 
3076
 
#line  1246 "cs.ATG" 
 
3193
#line  1290 "Frames/cs.ATG" 
3077
3194
                stmt = null;
3078
 
                Expect(1);
3079
 
 
3080
 
#line  1249 "cs.ATG" 
3081
 
                if (t.val != "remove") Error("remove expected"); 
 
3195
                Expect(131);
3082
3196
                Block(
3083
 
#line  1250 "cs.ATG" 
 
3197
#line  1293 "Frames/cs.ATG" 
3084
3198
out stmt);
3085
3199
        }
3086
3200
 
3087
3201
        void VariableInitializer(
3088
 
#line  1266 "cs.ATG" 
 
3202
#line  1309 "Frames/cs.ATG" 
3089
3203
out Expression initializerExpression) {
3090
3204
 
3091
 
#line  1267 "cs.ATG" 
 
3205
#line  1310 "Frames/cs.ATG" 
3092
3206
                TypeReference type = null; Expression expr = null; initializerExpression = null; 
3093
 
                if (StartOf(5)) {
 
3207
                if (StartOf(6)) {
3094
3208
                        Expr(
3095
 
#line  1269 "cs.ATG" 
 
3209
#line  1312 "Frames/cs.ATG" 
3096
3210
out initializerExpression);
3097
3211
                } else if (la.kind == 16) {
3098
 
                        ArrayInitializer(
3099
 
#line  1270 "cs.ATG" 
 
3212
                        CollectionInitializer(
 
3213
#line  1313 "Frames/cs.ATG" 
3100
3214
out initializerExpression);
3101
 
                } else if (la.kind == 105) {
 
3215
                } else if (la.kind == 106) {
3102
3216
                        lexer.NextToken();
3103
3217
                        Type(
3104
 
#line  1271 "cs.ATG" 
 
3218
#line  1314 "Frames/cs.ATG" 
3105
3219
out type);
3106
3220
                        Expect(18);
3107
3221
                        Expr(
3108
 
#line  1271 "cs.ATG" 
 
3222
#line  1314 "Frames/cs.ATG" 
3109
3223
out expr);
3110
3224
                        Expect(19);
3111
3225
 
3112
 
#line  1271 "cs.ATG" 
 
3226
#line  1314 "Frames/cs.ATG" 
3113
3227
                        initializerExpression = new StackAllocExpression(type, expr); 
3114
 
                } else SynErr(167);
 
3228
                } else SynErr(191);
3115
3229
        }
3116
3230
 
3117
3231
        void Statement() {
3118
3232
 
3119
 
#line  1387 "cs.ATG" 
 
3233
#line  1456 "Frames/cs.ATG" 
3120
3234
                TypeReference type;
3121
3235
                Expression expr;
3122
3236
                Statement stmt = null;
3123
3237
                Location startPos = la.Location;
3124
3238
                
 
3239
                while (!(StartOf(29))) {SynErr(192); lexer.NextToken(); }
3125
3240
                if (
3126
 
#line  1395 "cs.ATG" 
 
3241
#line  1465 "Frames/cs.ATG" 
3127
3242
IsLabel()) {
3128
 
                        Expect(1);
 
3243
                        Identifier();
3129
3244
 
3130
 
#line  1395 "cs.ATG" 
 
3245
#line  1465 "Frames/cs.ATG" 
3131
3246
                        compilationUnit.AddChild(new LabelStatement(t.val)); 
3132
3247
                        Expect(9);
3133
3248
                        Statement();
3134
 
                } else if (la.kind == 59) {
 
3249
                } else if (la.kind == 60) {
3135
3250
                        lexer.NextToken();
3136
3251
                        Type(
3137
 
#line  1398 "cs.ATG" 
 
3252
#line  1468 "Frames/cs.ATG" 
3138
3253
out type);
3139
3254
 
3140
 
#line  1398 "cs.ATG" 
 
3255
#line  1468 "Frames/cs.ATG" 
3141
3256
                        LocalVariableDeclaration var = new LocalVariableDeclaration(type, Modifiers.Const); string ident = null; var.StartLocation = t.Location; 
3142
 
                        Expect(1);
 
3257
                        Identifier();
3143
3258
 
3144
 
#line  1399 "cs.ATG" 
3145
 
                        ident = t.val; Location varStart = t.Location;   
 
3259
#line  1469 "Frames/cs.ATG" 
 
3260
                        ident = t.val; Location varStart = t.Location; 
3146
3261
                        Expect(3);
3147
3262
                        Expr(
3148
 
#line  1400 "cs.ATG" 
 
3263
#line  1470 "Frames/cs.ATG" 
3149
3264
out expr);
3150
3265
 
3151
 
#line  1400 "cs.ATG" 
3152
 
                        var.Variables.Add(new VariableDeclaration(ident, expr)); 
 
3266
#line  1472 "Frames/cs.ATG" 
 
3267
                        VariableDeclaration newVar = new VariableDeclaration (ident, expr);
 
3268
                        newVar.StartLocation = varStart;
 
3269
                        newVar.EndLocation = t.EndLocation;
 
3270
                        newVar.TypeReference = type; 
 
3271
                        SafeAdd(var, var.Variables, newVar); 
 
3272
                        
3153
3273
                        while (la.kind == 14) {
3154
3274
                                lexer.NextToken();
3155
 
                                Expect(1);
 
3275
                                Identifier();
3156
3276
 
3157
 
#line  1401 "cs.ATG" 
 
3277
#line  1478 "Frames/cs.ATG" 
3158
3278
                                ident = t.val; 
3159
3279
                                Expect(3);
3160
3280
                                Expr(
3161
 
#line  1401 "cs.ATG" 
 
3281
#line  1478 "Frames/cs.ATG" 
3162
3282
out expr);
3163
3283
 
3164
 
#line  1403 "cs.ATG" 
3165
 
                                VariableDeclaration newVar = new VariableDeclaration (ident, expr);
3166
 
                                newVar.StartLocation = varStart;
3167
 
                                newVar.EndLocation = t.EndLocation;
3168
 
                                newVar.TypeReference = type; 
3169
 
                                var.Variables.Add(newVar); 
 
3284
#line  1480 "Frames/cs.ATG" 
 
3285
                                VariableDeclaration newVar2 = new VariableDeclaration (ident, expr);
 
3286
                                newVar2.StartLocation = varStart; 
 
3287
                                newVar2.EndLocation = t.EndLocation; 
 
3288
                                newVar2.TypeReference = type;
 
3289
                                SafeAdd(var, var.Variables, newVar2); 
3170
3290
                                
3171
3291
                        }
3172
3292
                        Expect(11);
3173
3293
 
3174
 
#line  1409 "cs.ATG" 
 
3294
#line  1486 "Frames/cs.ATG" 
3175
3295
                        var.EndLocation = t.EndLocation; compilationUnit.AddChild(var); 
3176
3296
                } else if (
3177
 
#line  1411 "cs.ATG" 
 
3297
#line  1489 "Frames/cs.ATG" 
3178
3298
IsLocalVarDecl()) {
3179
3299
                        LocalVariableDecl(
3180
 
#line  1411 "cs.ATG" 
 
3300
#line  1489 "Frames/cs.ATG" 
3181
3301
out stmt);
3182
3302
                        Expect(11);
3183
3303
 
3184
 
#line  1411 "cs.ATG" 
 
3304
#line  1489 "Frames/cs.ATG" 
3185
3305
                        compilationUnit.AddChild(stmt); 
3186
 
                } else if (StartOf(23)) {
 
3306
                } else if (StartOf(30)) {
3187
3307
                        EmbeddedStatement(
3188
 
#line  1412 "cs.ATG" 
 
3308
#line  1491 "Frames/cs.ATG" 
3189
3309
out stmt);
3190
3310
 
3191
 
#line  1412 "cs.ATG" 
 
3311
#line  1491 "Frames/cs.ATG" 
3192
3312
                        compilationUnit.AddChild(stmt); 
3193
 
                } else SynErr(168);
 
3313
                } else SynErr(193);
3194
3314
 
3195
 
#line  1418 "cs.ATG" 
 
3315
#line  1497 "Frames/cs.ATG" 
3196
3316
                if (stmt != null) {
3197
3317
                stmt.StartLocation = startPos;
3198
3318
                stmt.EndLocation = t.EndLocation;
3201
3321
        }
3202
3322
 
3203
3323
        void Argument(
3204
 
#line  1306 "cs.ATG" 
 
3324
#line  1349 "Frames/cs.ATG" 
3205
3325
out Expression argumentexpr) {
3206
3326
 
3207
 
#line  1308 "cs.ATG" 
 
3327
#line  1351 "Frames/cs.ATG" 
3208
3328
                Expression expr;
3209
3329
                FieldDirection fd = FieldDirection.None;
3210
3330
                
3211
 
                if (la.kind == 92 || la.kind == 99) {
3212
 
                        if (la.kind == 99) {
 
3331
                if (la.kind == 93 || la.kind == 100) {
 
3332
                        if (la.kind == 100) {
3213
3333
                                lexer.NextToken();
3214
3334
 
3215
 
#line  1313 "cs.ATG" 
 
3335
#line  1356 "Frames/cs.ATG" 
3216
3336
                                fd = FieldDirection.Ref; 
3217
3337
                        } else {
3218
3338
                                lexer.NextToken();
3219
3339
 
3220
 
#line  1314 "cs.ATG" 
 
3340
#line  1357 "Frames/cs.ATG" 
3221
3341
                                fd = FieldDirection.Out; 
3222
3342
                        }
3223
3343
                }
3224
3344
                Expr(
3225
 
#line  1316 "cs.ATG" 
 
3345
#line  1359 "Frames/cs.ATG" 
3226
3346
out expr);
3227
3347
 
3228
 
#line  1316 "cs.ATG" 
 
3348
#line  1360 "Frames/cs.ATG" 
3229
3349
                argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; 
3230
3350
        }
3231
3351
 
3232
 
        void ArrayInitializer(
3233
 
#line  1336 "cs.ATG" 
 
3352
        void CollectionInitializer(
 
3353
#line  1380 "Frames/cs.ATG" 
3234
3354
out Expression outExpr) {
3235
3355
 
3236
 
#line  1338 "cs.ATG" 
 
3356
#line  1382 "Frames/cs.ATG" 
3237
3357
                Expression expr = null;
3238
 
                ArrayInitializerExpression initializer = new ArrayInitializerExpression();
 
3358
                CollectionInitializerExpression initializer = new CollectionInitializerExpression();
3239
3359
                
3240
3360
                Expect(16);
3241
 
                if (StartOf(24)) {
 
3361
 
 
3362
#line  1386 "Frames/cs.ATG" 
 
3363
                initializer.StartLocation = t.Location; 
 
3364
                if (StartOf(31)) {
3242
3365
                        VariableInitializer(
3243
 
#line  1343 "cs.ATG" 
 
3366
#line  1387 "Frames/cs.ATG" 
3244
3367
out expr);
3245
3368
 
3246
 
#line  1344 "cs.ATG" 
 
3369
#line  1388 "Frames/cs.ATG" 
3247
3370
                        if (expr != null) { initializer.CreateExpressions.Add(expr); } 
3248
3371
                        while (
3249
 
#line  1345 "cs.ATG" 
 
3372
#line  1389 "Frames/cs.ATG" 
3250
3373
NotFinalComma()) {
3251
3374
                                Expect(14);
3252
3375
                                VariableInitializer(
3253
 
#line  1346 "cs.ATG" 
 
3376
#line  1390 "Frames/cs.ATG" 
3254
3377
out expr);
3255
3378
 
3256
 
#line  1347 "cs.ATG" 
 
3379
#line  1391 "Frames/cs.ATG" 
3257
3380
                                if (expr != null) { initializer.CreateExpressions.Add(expr); } 
3258
3381
                        }
3259
3382
                        if (la.kind == 14) {
3262
3385
                }
3263
3386
                Expect(17);
3264
3387
 
3265
 
#line  1351 "cs.ATG" 
3266
 
                outExpr = initializer; 
 
3388
#line  1395 "Frames/cs.ATG" 
 
3389
                initializer.EndLocation = t.Location; outExpr = initializer; 
3267
3390
        }
3268
3391
 
3269
3392
        void AssignmentOperator(
3270
 
#line  1319 "cs.ATG" 
 
3393
#line  1363 "Frames/cs.ATG" 
3271
3394
out AssignmentOperatorType op) {
3272
3395
 
3273
 
#line  1320 "cs.ATG" 
 
3396
#line  1364 "Frames/cs.ATG" 
3274
3397
                op = AssignmentOperatorType.None; 
3275
3398
                if (la.kind == 3) {
3276
3399
                        lexer.NextToken();
3277
3400
 
3278
 
#line  1322 "cs.ATG" 
 
3401
#line  1366 "Frames/cs.ATG" 
3279
3402
                        op = AssignmentOperatorType.Assign; 
3280
3403
                } else if (la.kind == 38) {
3281
3404
                        lexer.NextToken();
3282
3405
 
3283
 
#line  1323 "cs.ATG" 
 
3406
#line  1367 "Frames/cs.ATG" 
3284
3407
                        op = AssignmentOperatorType.Add; 
3285
3408
                } else if (la.kind == 39) {
3286
3409
                        lexer.NextToken();
3287
3410
 
3288
 
#line  1324 "cs.ATG" 
 
3411
#line  1368 "Frames/cs.ATG" 
3289
3412
                        op = AssignmentOperatorType.Subtract; 
3290
3413
                } else if (la.kind == 40) {
3291
3414
                        lexer.NextToken();
3292
3415
 
3293
 
#line  1325 "cs.ATG" 
 
3416
#line  1369 "Frames/cs.ATG" 
3294
3417
                        op = AssignmentOperatorType.Multiply; 
3295
3418
                } else if (la.kind == 41) {
3296
3419
                        lexer.NextToken();
3297
3420
 
3298
 
#line  1326 "cs.ATG" 
 
3421
#line  1370 "Frames/cs.ATG" 
3299
3422
                        op = AssignmentOperatorType.Divide; 
3300
3423
                } else if (la.kind == 42) {
3301
3424
                        lexer.NextToken();
3302
3425
 
3303
 
#line  1327 "cs.ATG" 
 
3426
#line  1371 "Frames/cs.ATG" 
3304
3427
                        op = AssignmentOperatorType.Modulus; 
3305
3428
                } else if (la.kind == 43) {
3306
3429
                        lexer.NextToken();
3307
3430
 
3308
 
#line  1328 "cs.ATG" 
 
3431
#line  1372 "Frames/cs.ATG" 
3309
3432
                        op = AssignmentOperatorType.BitwiseAnd; 
3310
3433
                } else if (la.kind == 44) {
3311
3434
                        lexer.NextToken();
3312
3435
 
3313
 
#line  1329 "cs.ATG" 
 
3436
#line  1373 "Frames/cs.ATG" 
3314
3437
                        op = AssignmentOperatorType.BitwiseOr; 
3315
3438
                } else if (la.kind == 45) {
3316
3439
                        lexer.NextToken();
3317
3440
 
3318
 
#line  1330 "cs.ATG" 
 
3441
#line  1374 "Frames/cs.ATG" 
3319
3442
                        op = AssignmentOperatorType.ExclusiveOr; 
3320
3443
                } else if (la.kind == 46) {
3321
3444
                        lexer.NextToken();
3322
3445
 
3323
 
#line  1331 "cs.ATG" 
 
3446
#line  1375 "Frames/cs.ATG" 
3324
3447
                        op = AssignmentOperatorType.ShiftLeft; 
3325
3448
                } else if (
3326
 
#line  1332 "cs.ATG" 
 
3449
#line  1376 "Frames/cs.ATG" 
3327
3450
la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) {
3328
3451
                        Expect(22);
3329
3452
                        Expect(35);
3330
3453
 
3331
 
#line  1333 "cs.ATG" 
 
3454
#line  1377 "Frames/cs.ATG" 
3332
3455
                        op = AssignmentOperatorType.ShiftRight; 
3333
 
                } else SynErr(169);
 
3456
                } else SynErr(194);
 
3457
        }
 
3458
 
 
3459
        void CollectionOrObjectInitializer(
 
3460
#line  1398 "Frames/cs.ATG" 
 
3461
out Expression outExpr) {
 
3462
 
 
3463
#line  1400 "Frames/cs.ATG" 
 
3464
                Expression expr = null;
 
3465
                CollectionInitializerExpression initializer = new CollectionInitializerExpression();
 
3466
                
 
3467
                Expect(16);
 
3468
 
 
3469
#line  1404 "Frames/cs.ATG" 
 
3470
                initializer.StartLocation = t.Location; 
 
3471
                if (StartOf(31)) {
 
3472
                        ObjectPropertyInitializerOrVariableInitializer(
 
3473
#line  1405 "Frames/cs.ATG" 
 
3474
out expr);
 
3475
 
 
3476
#line  1406 "Frames/cs.ATG" 
 
3477
                        if (expr != null) { initializer.CreateExpressions.Add(expr); } 
 
3478
                        while (
 
3479
#line  1407 "Frames/cs.ATG" 
 
3480
NotFinalComma()) {
 
3481
                                Expect(14);
 
3482
                                ObjectPropertyInitializerOrVariableInitializer(
 
3483
#line  1408 "Frames/cs.ATG" 
 
3484
out expr);
 
3485
 
 
3486
#line  1409 "Frames/cs.ATG" 
 
3487
                                if (expr != null) { initializer.CreateExpressions.Add(expr); } 
 
3488
                        }
 
3489
                        if (la.kind == 14) {
 
3490
                                lexer.NextToken();
 
3491
                        }
 
3492
                }
 
3493
                Expect(17);
 
3494
 
 
3495
#line  1413 "Frames/cs.ATG" 
 
3496
                initializer.EndLocation = t.Location; outExpr = initializer; 
 
3497
        }
 
3498
 
 
3499
        void ObjectPropertyInitializerOrVariableInitializer(
 
3500
#line  1416 "Frames/cs.ATG" 
 
3501
out Expression expr) {
 
3502
 
 
3503
#line  1417 "Frames/cs.ATG" 
 
3504
                expr = null; 
 
3505
                if (
 
3506
#line  1419 "Frames/cs.ATG" 
 
3507
IdentAndAsgn()) {
 
3508
                        Identifier();
 
3509
 
 
3510
#line  1421 "Frames/cs.ATG" 
 
3511
                        NamedArgumentExpression nae = new NamedArgumentExpression(t.val, null);
 
3512
                        nae.StartLocation = t.Location;
 
3513
                        Expression r = null; 
 
3514
                        Expect(3);
 
3515
                        if (la.kind == 16) {
 
3516
                                CollectionOrObjectInitializer(
 
3517
#line  1425 "Frames/cs.ATG" 
 
3518
out r);
 
3519
                        } else if (StartOf(31)) {
 
3520
                                VariableInitializer(
 
3521
#line  1426 "Frames/cs.ATG" 
 
3522
out r);
 
3523
                        } else SynErr(195);
 
3524
 
 
3525
#line  1427 "Frames/cs.ATG" 
 
3526
                        nae.Expression = r; nae.EndLocation = t.EndLocation; expr = nae; 
 
3527
                } else if (StartOf(31)) {
 
3528
                        VariableInitializer(
 
3529
#line  1429 "Frames/cs.ATG" 
 
3530
out expr);
 
3531
                } else SynErr(196);
3334
3532
        }
3335
3533
 
3336
3534
        void LocalVariableDecl(
3337
 
#line  1354 "cs.ATG" 
 
3535
#line  1433 "Frames/cs.ATG" 
3338
3536
out Statement stmt) {
3339
3537
 
3340
 
#line  1356 "cs.ATG" 
 
3538
#line  1435 "Frames/cs.ATG" 
3341
3539
                TypeReference type;
3342
 
                VariableDeclaration var = null;
 
3540
                VariableDeclaration      var = null;
3343
3541
                LocalVariableDeclaration localVariableDeclaration; 
3344
 
                Location startPos = t.Location;
 
3542
                Location startPos = la.Location;
3345
3543
                
3346
3544
                Type(
3347
 
#line  1362 "cs.ATG" 
 
3545
#line  1441 "Frames/cs.ATG" 
3348
3546
out type);
3349
3547
 
3350
 
#line  1363 "cs.ATG" 
3351
 
                localVariableDeclaration = new LocalVariableDeclaration(type); 
3352
 
                localVariableDeclaration.StartLocation = startPos; 
3353
 
                
 
3548
#line  1441 "Frames/cs.ATG" 
 
3549
                localVariableDeclaration = new LocalVariableDeclaration(type); localVariableDeclaration.StartLocation = startPos; 
3354
3550
                LocalVariableDeclarator(
3355
 
#line  1366 "cs.ATG" 
 
3551
#line  1442 "Frames/cs.ATG" 
3356
3552
out var);
3357
3553
 
3358
 
#line  1366 "cs.ATG" 
3359
 
                var.TypeReference = type; localVariableDeclaration.Variables.Add(var); 
 
3554
#line  1442 "Frames/cs.ATG" 
 
3555
                SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var); 
3360
3556
                while (la.kind == 14) {
3361
3557
                        lexer.NextToken();
3362
3558
                        LocalVariableDeclarator(
3363
 
#line  1367 "cs.ATG" 
 
3559
#line  1443 "Frames/cs.ATG" 
3364
3560
out var);
3365
3561
 
3366
 
#line  1367 "cs.ATG" 
3367
 
                        var.TypeReference = type; localVariableDeclaration.Variables.Add(var); 
 
3562
#line  1443 "Frames/cs.ATG" 
 
3563
                        SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var); 
3368
3564
                }
3369
3565
 
3370
 
#line  1368 "cs.ATG" 
 
3566
#line  1444 "Frames/cs.ATG" 
3371
3567
                stmt = localVariableDeclaration; stmt.EndLocation = t.EndLocation; 
3372
3568
        }
3373
3569
 
3374
3570
        void LocalVariableDeclarator(
3375
 
#line  1371 "cs.ATG" 
 
3571
#line  1447 "Frames/cs.ATG" 
3376
3572
out VariableDeclaration var) {
3377
3573
 
3378
 
#line  1372 "cs.ATG" 
 
3574
#line  1448 "Frames/cs.ATG" 
3379
3575
                Expression expr = null; 
3380
 
                Expect(1);
 
3576
                Identifier();
3381
3577
 
3382
 
#line  1375 "cs.ATG" 
3383
 
                var = new VariableDeclaration(t.val); var.EndLocation = t.EndLocation; var.StartLocation = t.Location; 
 
3578
#line  1450 "Frames/cs.ATG" 
 
3579
                var = new VariableDeclaration(t.val); var.StartLocation = t.Location; var.EndLocation = t.EndLocation; 
3384
3580
                if (la.kind == 3) {
3385
3581
                        lexer.NextToken();
3386
3582
                        VariableInitializer(
3387
 
#line  1375 "cs.ATG" 
 
3583
#line  1451 "Frames/cs.ATG" 
3388
3584
out expr);
3389
3585
 
3390
 
#line  1375 "cs.ATG" 
3391
 
                        var.EndLocation = t.EndLocation;  var.Initializer = expr; 
 
3586
#line  1451 "Frames/cs.ATG" 
 
3587
                        var.Initializer = expr; var.EndLocation = t.EndLocation; 
3392
3588
                }
3393
3589
        }
3394
3590
 
3395
3591
        void EmbeddedStatement(
3396
 
#line  1425 "cs.ATG" 
 
3592
#line  1504 "Frames/cs.ATG" 
3397
3593
out Statement statement) {
3398
3594
 
3399
 
#line  1427 "cs.ATG" 
 
3595
#line  1506 "Frames/cs.ATG" 
3400
3596
                TypeReference type = null;
3401
3597
                Expression expr = null;
3402
3598
                Statement embeddedStatement = null;
3403
3599
                statement = null;
3404
3600
                
 
3601
 
 
3602
#line  1512 "Frames/cs.ATG" 
 
3603
                Location startLocation = la.Location; 
3405
3604
                if (la.kind == 16) {
3406
3605
                        Block(
3407
 
#line  1433 "cs.ATG" 
 
3606
#line  1514 "Frames/cs.ATG" 
3408
3607
out statement);
3409
3608
                } else if (la.kind == 11) {
3410
3609
                        lexer.NextToken();
3411
3610
 
3412
 
#line  1435 "cs.ATG" 
 
3611
#line  1517 "Frames/cs.ATG" 
3413
3612
                        statement = new EmptyStatement(); 
3414
3613
                } else if (
3415
 
#line  1437 "cs.ATG" 
 
3614
#line  1520 "Frames/cs.ATG" 
3416
3615
UnCheckedAndLBrace()) {
3417
3616
 
3418
 
#line  1437 "cs.ATG" 
 
3617
#line  1520 "Frames/cs.ATG" 
3419
3618
                        Statement block; bool isChecked = true; 
3420
 
                        if (la.kind == 57) {
 
3619
                        if (la.kind == 58) {
3421
3620
                                lexer.NextToken();
3422
 
                        } else if (la.kind == 117) {
 
3621
                        } else if (la.kind == 118) {
3423
3622
                                lexer.NextToken();
3424
3623
 
3425
 
#line  1438 "cs.ATG" 
 
3624
#line  1521 "Frames/cs.ATG" 
3426
3625
                                isChecked = false;
3427
 
                        } else SynErr(170);
 
3626
                        } else SynErr(197);
3428
3627
                        Block(
3429
 
#line  1439 "cs.ATG" 
 
3628
#line  1522 "Frames/cs.ATG" 
3430
3629
out block);
3431
3630
 
3432
 
#line  1439 "cs.ATG" 
 
3631
#line  1522 "Frames/cs.ATG" 
3433
3632
                        statement = isChecked ? (Statement)new CheckedStatement(block) : (Statement)new UncheckedStatement(block); 
3434
 
                } else if (la.kind == 78) {
3435
 
                        lexer.NextToken();
3436
 
 
3437
 
#line  1441 "cs.ATG" 
3438
 
                        Statement elseStatement = null; 
3439
 
                        Expect(20);
3440
 
                        Expr(
3441
 
#line  1442 "cs.ATG" 
3442
 
out expr);
3443
 
                        Expect(21);
3444
 
                        EmbeddedStatement(
3445
 
#line  1443 "cs.ATG" 
3446
 
out embeddedStatement);
3447
 
                        if (la.kind == 66) {
3448
 
                                lexer.NextToken();
3449
 
                                EmbeddedStatement(
3450
 
#line  1444 "cs.ATG" 
3451
 
out elseStatement);
3452
 
                        }
3453
 
 
3454
 
#line  1445 "cs.ATG" 
3455
 
                        statement = elseStatement != null ? new IfElseStatement(expr, embeddedStatement, elseStatement) : new IfElseStatement(expr, embeddedStatement); 
3456
 
 
3457
 
#line  1446 "cs.ATG" 
3458
 
                        if (elseStatement is IfElseStatement && (elseStatement as IfElseStatement).TrueStatement.Count == 1) {
3459
 
                        /* else if-section (otherwise we would have a BlockStatment) */
3460
 
                        (statement as IfElseStatement).ElseIfSections.Add(
3461
 
                                     new ElseIfSection((elseStatement as IfElseStatement).Condition,
3462
 
                                                       (elseStatement as IfElseStatement).TrueStatement[0]));
3463
 
                        (statement as IfElseStatement).ElseIfSections.AddRange((elseStatement as IfElseStatement).ElseIfSections);
3464
 
                        (statement as IfElseStatement).FalseStatement = (elseStatement as IfElseStatement).FalseStatement;
3465
 
                        } 
3466
 
                } else if (la.kind == 109) {
3467
 
                        lexer.NextToken();
3468
 
 
3469
 
#line  1454 "cs.ATG" 
 
3633
                } else if (la.kind == 79) {
 
3634
                        IfStatement(
 
3635
#line  1525 "Frames/cs.ATG" 
 
3636
out statement);
 
3637
                } else if (la.kind == 110) {
 
3638
                        lexer.NextToken();
 
3639
 
 
3640
#line  1527 "Frames/cs.ATG" 
3470
3641
                        List<SwitchSection> switchSections = new List<SwitchSection>(); 
3471
3642
                        Expect(20);
3472
3643
                        Expr(
3473
 
#line  1455 "cs.ATG" 
 
3644
#line  1528 "Frames/cs.ATG" 
3474
3645
out expr);
3475
3646
                        Expect(21);
3476
3647
                        Expect(16);
3477
3648
                        SwitchSections(
3478
 
#line  1456 "cs.ATG" 
 
3649
#line  1529 "Frames/cs.ATG" 
3479
3650
switchSections);
3480
3651
                        Expect(17);
3481
3652
 
3482
 
#line  1457 "cs.ATG" 
 
3653
#line  1530 "Frames/cs.ATG" 
3483
3654
                        statement = new SwitchStatement(expr, switchSections); 
3484
 
                } else if (la.kind == 124) {
 
3655
                } else if (la.kind == 125) {
3485
3656
                        lexer.NextToken();
3486
3657
                        Expect(20);
3487
3658
                        Expr(
3488
 
#line  1459 "cs.ATG" 
 
3659
#line  1533 "Frames/cs.ATG" 
3489
3660
out expr);
3490
3661
                        Expect(21);
3491
3662
                        EmbeddedStatement(
3492
 
#line  1461 "cs.ATG" 
 
3663
#line  1534 "Frames/cs.ATG" 
3493
3664
out embeddedStatement);
3494
3665
 
3495
 
#line  1461 "cs.ATG" 
 
3666
#line  1535 "Frames/cs.ATG" 
3496
3667
                        statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start);
3497
 
                } else if (la.kind == 64) {
 
3668
                } else if (la.kind == 65) {
3498
3669
                        lexer.NextToken();
3499
3670
                        EmbeddedStatement(
3500
 
#line  1462 "cs.ATG" 
 
3671
#line  1537 "Frames/cs.ATG" 
3501
3672
out embeddedStatement);
3502
 
                        Expect(124);
 
3673
                        Expect(125);
3503
3674
                        Expect(20);
3504
3675
                        Expr(
3505
 
#line  1463 "cs.ATG" 
 
3676
#line  1538 "Frames/cs.ATG" 
3506
3677
out expr);
3507
3678
                        Expect(21);
3508
3679
                        Expect(11);
3509
3680
 
3510
 
#line  1463 "cs.ATG" 
 
3681
#line  1539 "Frames/cs.ATG" 
3511
3682
                        statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.End); 
3512
 
                } else if (la.kind == 75) {
 
3683
                } else if (la.kind == 76) {
3513
3684
                        lexer.NextToken();
3514
3685
 
3515
 
#line  1464 "cs.ATG" 
 
3686
#line  1541 "Frames/cs.ATG" 
3516
3687
                        List<Statement> initializer = null; List<Statement> iterator = null; 
3517
3688
                        Expect(20);
3518
 
                        if (StartOf(5)) {
 
3689
                        if (StartOf(6)) {
3519
3690
                                ForInitializer(
3520
 
#line  1465 "cs.ATG" 
 
3691
#line  1542 "Frames/cs.ATG" 
3521
3692
out initializer);
3522
3693
                        }
3523
3694
                        Expect(11);
3524
 
                        if (StartOf(5)) {
 
3695
                        if (StartOf(6)) {
3525
3696
                                Expr(
3526
 
#line  1466 "cs.ATG" 
 
3697
#line  1543 "Frames/cs.ATG" 
3527
3698
out expr);
3528
3699
                        }
3529
3700
                        Expect(11);
3530
 
                        if (StartOf(5)) {
 
3701
                        if (StartOf(6)) {
3531
3702
                                ForIterator(
3532
 
#line  1467 "cs.ATG" 
 
3703
#line  1544 "Frames/cs.ATG" 
3533
3704
out iterator);
3534
3705
                        }
3535
3706
                        Expect(21);
3536
3707
                        EmbeddedStatement(
3537
 
#line  1468 "cs.ATG" 
 
3708
#line  1545 "Frames/cs.ATG" 
3538
3709
out embeddedStatement);
3539
3710
 
3540
 
#line  1468 "cs.ATG" 
 
3711
#line  1545 "Frames/cs.ATG" 
3541
3712
                        statement = new ForStatement(initializer, expr, iterator, embeddedStatement); 
3542
 
                } else if (la.kind == 76) {
 
3713
                } else if (la.kind == 77) {
3543
3714
                        lexer.NextToken();
3544
3715
                        Expect(20);
3545
3716
                        Type(
3546
 
#line  1469 "cs.ATG" 
 
3717
#line  1547 "Frames/cs.ATG" 
3547
3718
out type);
3548
 
                        Expect(1);
 
3719
                        Identifier();
3549
3720
 
3550
 
#line  1469 "cs.ATG" 
3551
 
                        string varName = t.val; Location start = t.Location;
3552
 
                        Expect(80);
 
3721
#line  1547 "Frames/cs.ATG" 
 
3722
                        string varName = t.val; 
 
3723
                        Expect(81);
3553
3724
                        Expr(
3554
 
#line  1470 "cs.ATG" 
 
3725
#line  1548 "Frames/cs.ATG" 
3555
3726
out expr);
3556
3727
                        Expect(21);
3557
3728
                        EmbeddedStatement(
3558
 
#line  1471 "cs.ATG" 
 
3729
#line  1549 "Frames/cs.ATG" 
3559
3730
out embeddedStatement);
3560
3731
 
3561
 
#line  1471 "cs.ATG" 
 
3732
#line  1550 "Frames/cs.ATG" 
3562
3733
                        statement = new ForeachStatement(type, varName , expr, embeddedStatement); 
3563
 
                        statement.EndLocation = t.EndLocation;
3564
 
                        
3565
 
                } else if (la.kind == 52) {
 
3734
                } else if (la.kind == 53) {
3566
3735
                        lexer.NextToken();
3567
3736
                        Expect(11);
3568
3737
 
3569
 
#line  1475 "cs.ATG" 
 
3738
#line  1553 "Frames/cs.ATG" 
3570
3739
                        statement = new BreakStatement(); 
3571
 
                } else if (la.kind == 60) {
 
3740
                } else if (la.kind == 61) {
3572
3741
                        lexer.NextToken();
3573
3742
                        Expect(11);
3574
3743
 
3575
 
#line  1476 "cs.ATG" 
 
3744
#line  1554 "Frames/cs.ATG" 
3576
3745
                        statement = new ContinueStatement(); 
3577
 
                } else if (la.kind == 77) {
 
3746
                } else if (la.kind == 78) {
3578
3747
                        GotoStatement(
3579
 
#line  1477 "cs.ATG" 
 
3748
#line  1555 "Frames/cs.ATG" 
3580
3749
out statement);
3581
3750
                } else if (
3582
 
#line  1478 "cs.ATG" 
 
3751
#line  1557 "Frames/cs.ATG" 
3583
3752
IsYieldStatement()) {
3584
 
                        Expect(1);
3585
 
                        if (la.kind == 100) {
 
3753
                        Expect(132);
 
3754
                        if (la.kind == 101) {
3586
3755
                                lexer.NextToken();
3587
3756
                                Expr(
3588
 
#line  1478 "cs.ATG" 
 
3757
#line  1558 "Frames/cs.ATG" 
3589
3758
out expr);
3590
3759
 
3591
 
#line  1478 "cs.ATG" 
 
3760
#line  1558 "Frames/cs.ATG" 
3592
3761
                                statement = new YieldStatement(new ReturnStatement(expr)); 
3593
 
                        } else if (la.kind == 52) {
 
3762
                        } else if (la.kind == 53) {
3594
3763
                                lexer.NextToken();
3595
3764
 
3596
 
#line  1479 "cs.ATG" 
 
3765
#line  1559 "Frames/cs.ATG" 
3597
3766
                                statement = new YieldStatement(new BreakStatement()); 
3598
 
                        } else SynErr(171);
 
3767
                        } else SynErr(198);
3599
3768
                        Expect(11);
3600
 
                } else if (la.kind == 100) {
 
3769
                } else if (la.kind == 101) {
3601
3770
                        lexer.NextToken();
3602
 
                        if (StartOf(5)) {
 
3771
                        if (StartOf(6)) {
3603
3772
                                Expr(
3604
 
#line  1480 "cs.ATG" 
 
3773
#line  1562 "Frames/cs.ATG" 
3605
3774
out expr);
3606
3775
                        }
3607
3776
                        Expect(11);
3608
3777
 
3609
 
#line  1480 "cs.ATG" 
 
3778
#line  1562 "Frames/cs.ATG" 
3610
3779
                        statement = new ReturnStatement(expr); 
3611
 
                } else if (la.kind == 111) {
 
3780
                } else if (la.kind == 112) {
3612
3781
                        lexer.NextToken();
3613
 
                        if (StartOf(5)) {
 
3782
                        if (StartOf(6)) {
3614
3783
                                Expr(
3615
 
#line  1481 "cs.ATG" 
 
3784
#line  1563 "Frames/cs.ATG" 
3616
3785
out expr);
3617
3786
                        }
3618
3787
                        Expect(11);
3619
3788
 
3620
 
#line  1481 "cs.ATG" 
 
3789
#line  1563 "Frames/cs.ATG" 
3621
3790
                        statement = new ThrowStatement(expr); 
3622
 
                } else if (StartOf(5)) {
 
3791
                } else if (StartOf(6)) {
3623
3792
                        StatementExpr(
3624
 
#line  1484 "cs.ATG" 
 
3793
#line  1566 "Frames/cs.ATG" 
3625
3794
out statement);
 
3795
                        while (!(la.kind == 0 || la.kind == 11)) {SynErr(199); lexer.NextToken(); }
3626
3796
                        Expect(11);
3627
 
                } else if (la.kind == 113) {
 
3797
                } else if (la.kind == 114) {
3628
3798
                        TryStatement(
3629
 
#line  1486 "cs.ATG" 
 
3799
#line  1569 "Frames/cs.ATG" 
3630
3800
out statement);
3631
 
                } else if (la.kind == 85) {
 
3801
                } else if (la.kind == 86) {
3632
3802
                        lexer.NextToken();
3633
3803
                        Expect(20);
3634
3804
                        Expr(
3635
 
#line  1488 "cs.ATG" 
 
3805
#line  1572 "Frames/cs.ATG" 
3636
3806
out expr);
3637
3807
                        Expect(21);
3638
3808
                        EmbeddedStatement(
3639
 
#line  1489 "cs.ATG" 
 
3809
#line  1573 "Frames/cs.ATG" 
3640
3810
out embeddedStatement);
3641
3811
 
3642
 
#line  1489 "cs.ATG" 
 
3812
#line  1573 "Frames/cs.ATG" 
3643
3813
                        statement = new LockStatement(expr, embeddedStatement); 
3644
 
                } else if (la.kind == 120) {
 
3814
                } else if (la.kind == 121) {
3645
3815
 
3646
 
#line  1491 "cs.ATG" 
 
3816
#line  1576 "Frames/cs.ATG" 
3647
3817
                        Statement resourceAcquisitionStmt = null; 
3648
3818
                        lexer.NextToken();
3649
3819
                        Expect(20);
3650
3820
                        ResourceAcquisition(
3651
 
#line  1493 "cs.ATG" 
 
3821
#line  1578 "Frames/cs.ATG" 
3652
3822
out resourceAcquisitionStmt);
3653
3823
                        Expect(21);
3654
3824
                        EmbeddedStatement(
3655
 
#line  1494 "cs.ATG" 
 
3825
#line  1579 "Frames/cs.ATG" 
3656
3826
out embeddedStatement);
3657
3827
 
3658
 
#line  1494 "cs.ATG" 
 
3828
#line  1579 "Frames/cs.ATG" 
3659
3829
                        statement = new UsingStatement(resourceAcquisitionStmt, embeddedStatement); 
3660
 
                } else if (la.kind == 118) {
 
3830
                } else if (la.kind == 119) {
3661
3831
                        lexer.NextToken();
3662
3832
                        Block(
3663
 
#line  1496 "cs.ATG" 
 
3833
#line  1582 "Frames/cs.ATG" 
3664
3834
out embeddedStatement);
3665
3835
 
3666
 
#line  1496 "cs.ATG" 
 
3836
#line  1582 "Frames/cs.ATG" 
3667
3837
                        statement = new UnsafeStatement(embeddedStatement); 
3668
 
                } else if (la.kind == 73) {
 
3838
                } else if (la.kind == 74) {
 
3839
 
 
3840
#line  1584 "Frames/cs.ATG" 
 
3841
                        Statement pointerDeclarationStmt = null; 
3669
3842
                        lexer.NextToken();
3670
3843
                        Expect(20);
3671
 
                        Type(
3672
 
#line  1499 "cs.ATG" 
3673
 
out type);
3674
 
 
3675
 
#line  1499 "cs.ATG" 
3676
 
                        if (type.PointerNestingLevel == 0) Error("can only fix pointer types");
3677
 
                        List<VariableDeclaration> pointerDeclarators = new List<VariableDeclaration>(1);
3678
 
                        
3679
 
                        Expect(1);
3680
 
 
3681
 
#line  1502 "cs.ATG" 
3682
 
                        Location varStart = t.Location; string identifier = t.val; 
3683
 
                        Expect(3);
3684
 
                        Expr(
3685
 
#line  1503 "cs.ATG" 
3686
 
out expr);
3687
 
 
3688
 
#line  1503 "cs.ATG" 
3689
 
                        VariableDeclaration var = new VariableDeclaration(identifier, expr);
3690
 
                        var.StartLocation = varStart; 
3691
 
                        var.EndLocation = t.EndLocation; 
3692
 
                        var.TypeReference = type;
3693
 
                                          pointerDeclarators.Add(var); 
3694
 
                        while (la.kind == 14) {
3695
 
                                lexer.NextToken();
3696
 
                                Expect(1);
3697
 
 
3698
 
#line  1509 "cs.ATG" 
3699
 
                                identifier = t.val; 
3700
 
                                Expect(3);
3701
 
                                Expr(
3702
 
#line  1510 "cs.ATG" 
3703
 
out expr);
3704
 
 
3705
 
#line  1510 "cs.ATG" 
3706
 
                                pointerDeclarators.Add(new VariableDeclaration(identifier, expr)); 
3707
 
                        }
 
3844
                        ResourceAcquisition(
 
3845
#line  1586 "Frames/cs.ATG" 
 
3846
out pointerDeclarationStmt);
3708
3847
                        Expect(21);
3709
3848
                        EmbeddedStatement(
3710
 
#line  1512 "cs.ATG" 
3711
 
out embeddedStatement);
3712
 
 
3713
 
#line  1512 "cs.ATG" 
3714
 
                        statement = new FixedStatement(type, pointerDeclarators, embeddedStatement); 
3715
 
                } else SynErr(172);
 
3849
#line  1587 "Frames/cs.ATG" 
 
3850
out embeddedStatement);
 
3851
 
 
3852
#line  1587 "Frames/cs.ATG" 
 
3853
                        statement = new FixedStatement(pointerDeclarationStmt, embeddedStatement); 
 
3854
                } else SynErr(200);
 
3855
 
 
3856
#line  1589 "Frames/cs.ATG" 
 
3857
                if (statement != null) {
 
3858
                statement.StartLocation = startLocation;
 
3859
                statement.EndLocation = t.EndLocation;
 
3860
                }
 
3861
                
 
3862
        }
 
3863
 
 
3864
        void IfStatement(
 
3865
#line  1596 "Frames/cs.ATG" 
 
3866
out Statement statement) {
 
3867
 
 
3868
#line  1598 "Frames/cs.ATG" 
 
3869
                Expression expr = null;
 
3870
                Statement embeddedStatement = null;
 
3871
                statement = null;
 
3872
                
 
3873
                Expect(79);
 
3874
                Expect(20);
 
3875
                Expr(
 
3876
#line  1604 "Frames/cs.ATG" 
 
3877
out expr);
 
3878
                Expect(21);
 
3879
                EmbeddedStatement(
 
3880
#line  1605 "Frames/cs.ATG" 
 
3881
out embeddedStatement);
 
3882
 
 
3883
#line  1606 "Frames/cs.ATG" 
 
3884
                Statement elseStatement = null; 
 
3885
                if (la.kind == 67) {
 
3886
                        lexer.NextToken();
 
3887
                        EmbeddedStatement(
 
3888
#line  1607 "Frames/cs.ATG" 
 
3889
out elseStatement);
 
3890
                }
 
3891
 
 
3892
#line  1608 "Frames/cs.ATG" 
 
3893
                statement = elseStatement != null ? new IfElseStatement(expr, embeddedStatement, elseStatement) : new IfElseStatement(expr, embeddedStatement); 
 
3894
 
 
3895
#line  1609 "Frames/cs.ATG" 
 
3896
                if (elseStatement is IfElseStatement && (elseStatement as IfElseStatement).TrueStatement.Count == 1) {
 
3897
                /* else if-section (otherwise we would have a BlockStatment) */
 
3898
                (statement as IfElseStatement).ElseIfSections.Add(
 
3899
                             new ElseIfSection((elseStatement as IfElseStatement).Condition,
 
3900
                                               (elseStatement as IfElseStatement).TrueStatement[0]));
 
3901
                (statement as IfElseStatement).ElseIfSections.AddRange((elseStatement as IfElseStatement).ElseIfSections);
 
3902
                (statement as IfElseStatement).FalseStatement = (elseStatement as IfElseStatement).FalseStatement;
 
3903
                }
 
3904
                
3716
3905
        }
3717
3906
 
3718
3907
        void SwitchSections(
3719
 
#line  1534 "cs.ATG" 
 
3908
#line  1639 "Frames/cs.ATG" 
3720
3909
List<SwitchSection> switchSections) {
3721
3910
 
3722
 
#line  1536 "cs.ATG" 
 
3911
#line  1641 "Frames/cs.ATG" 
3723
3912
                SwitchSection switchSection = new SwitchSection();
3724
3913
                CaseLabel label;
3725
3914
                
3726
3915
                SwitchLabel(
3727
 
#line  1540 "cs.ATG" 
 
3916
#line  1645 "Frames/cs.ATG" 
3728
3917
out label);
3729
3918
 
3730
 
#line  1540 "cs.ATG" 
 
3919
#line  1645 "Frames/cs.ATG" 
3731
3920
                if (label != null) { switchSection.SwitchLabels.Add(label); } 
3732
3921
 
3733
 
#line  1541 "cs.ATG" 
 
3922
#line  1646 "Frames/cs.ATG" 
3734
3923
                compilationUnit.BlockStart(switchSection); 
3735
 
                while (StartOf(25)) {
3736
 
                        if (la.kind == 54 || la.kind == 62) {
 
3924
                while (StartOf(32)) {
 
3925
                        if (la.kind == 55 || la.kind == 63) {
3737
3926
                                SwitchLabel(
3738
 
#line  1543 "cs.ATG" 
 
3927
#line  1648 "Frames/cs.ATG" 
3739
3928
out label);
3740
3929
 
3741
 
#line  1544 "cs.ATG" 
 
3930
#line  1649 "Frames/cs.ATG" 
3742
3931
                                if (label != null) {
3743
3932
                                if (switchSection.Children.Count > 0) {
3744
3933
                                        // open new section
3754
3943
                        }
3755
3944
                }
3756
3945
 
3757
 
#line  1556 "cs.ATG" 
 
3946
#line  1661 "Frames/cs.ATG" 
3758
3947
                compilationUnit.BlockEnd(); switchSections.Add(switchSection); 
3759
3948
        }
3760
3949
 
3761
3950
        void ForInitializer(
3762
 
#line  1515 "cs.ATG" 
 
3951
#line  1620 "Frames/cs.ATG" 
3763
3952
out List<Statement> initializer) {
3764
3953
 
3765
 
#line  1517 "cs.ATG" 
 
3954
#line  1622 "Frames/cs.ATG" 
3766
3955
                Statement stmt; 
3767
3956
                initializer = new List<Statement>();
3768
3957
                
3769
3958
                if (
3770
 
#line  1521 "cs.ATG" 
 
3959
#line  1626 "Frames/cs.ATG" 
3771
3960
IsLocalVarDecl()) {
3772
3961
                        LocalVariableDecl(
3773
 
#line  1521 "cs.ATG" 
 
3962
#line  1626 "Frames/cs.ATG" 
3774
3963
out stmt);
3775
3964
 
3776
 
#line  1521 "cs.ATG" 
 
3965
#line  1626 "Frames/cs.ATG" 
3777
3966
                        initializer.Add(stmt);
3778
 
                } else if (StartOf(5)) {
 
3967
                } else if (StartOf(6)) {
3779
3968
                        StatementExpr(
3780
 
#line  1522 "cs.ATG" 
 
3969
#line  1627 "Frames/cs.ATG" 
3781
3970
out stmt);
3782
3971
 
3783
 
#line  1522 "cs.ATG" 
 
3972
#line  1627 "Frames/cs.ATG" 
3784
3973
                        initializer.Add(stmt);
3785
3974
                        while (la.kind == 14) {
3786
3975
                                lexer.NextToken();
3787
3976
                                StatementExpr(
3788
 
#line  1522 "cs.ATG" 
 
3977
#line  1627 "Frames/cs.ATG" 
3789
3978
out stmt);
3790
3979
 
3791
 
#line  1522 "cs.ATG" 
 
3980
#line  1627 "Frames/cs.ATG" 
3792
3981
                                initializer.Add(stmt);
3793
3982
                        }
3794
 
                } else SynErr(173);
 
3983
                } else SynErr(201);
3795
3984
        }
3796
3985
 
3797
3986
        void ForIterator(
3798
 
#line  1525 "cs.ATG" 
 
3987
#line  1630 "Frames/cs.ATG" 
3799
3988
out List<Statement> iterator) {
3800
3989
 
3801
 
#line  1527 "cs.ATG" 
 
3990
#line  1632 "Frames/cs.ATG" 
3802
3991
                Statement stmt; 
3803
3992
                iterator = new List<Statement>();
3804
3993
                
3805
3994
                StatementExpr(
3806
 
#line  1531 "cs.ATG" 
 
3995
#line  1636 "Frames/cs.ATG" 
3807
3996
out stmt);
3808
3997
 
3809
 
#line  1531 "cs.ATG" 
 
3998
#line  1636 "Frames/cs.ATG" 
3810
3999
                iterator.Add(stmt);
3811
4000
                while (la.kind == 14) {
3812
4001
                        lexer.NextToken();
3813
4002
                        StatementExpr(
3814
 
#line  1531 "cs.ATG" 
 
4003
#line  1636 "Frames/cs.ATG" 
3815
4004
out stmt);
3816
4005
 
3817
 
#line  1531 "cs.ATG" 
 
4006
#line  1636 "Frames/cs.ATG" 
3818
4007
                        iterator.Add(stmt); 
3819
4008
                }
3820
4009
        }
3821
4010
 
3822
4011
        void GotoStatement(
3823
 
#line  1609 "cs.ATG" 
 
4012
#line  1714 "Frames/cs.ATG" 
3824
4013
out Statement stmt) {
3825
4014
 
3826
 
#line  1610 "cs.ATG" 
 
4015
#line  1715 "Frames/cs.ATG" 
3827
4016
                Expression expr; stmt = null; 
3828
 
                Expect(77);
3829
 
                if (la.kind == 1) {
3830
 
                        lexer.NextToken();
 
4017
                Expect(78);
 
4018
                if (StartOf(19)) {
 
4019
                        Identifier();
3831
4020
 
3832
 
#line  1614 "cs.ATG" 
 
4021
#line  1719 "Frames/cs.ATG" 
3833
4022
                        stmt = new GotoStatement(t.val); 
3834
4023
                        Expect(11);
3835
 
                } else if (la.kind == 54) {
 
4024
                } else if (la.kind == 55) {
3836
4025
                        lexer.NextToken();
3837
4026
                        Expr(
3838
 
#line  1615 "cs.ATG" 
 
4027
#line  1720 "Frames/cs.ATG" 
3839
4028
out expr);
3840
4029
                        Expect(11);
3841
4030
 
3842
 
#line  1615 "cs.ATG" 
 
4031
#line  1720 "Frames/cs.ATG" 
3843
4032
                        stmt = new GotoCaseStatement(expr); 
3844
 
                } else if (la.kind == 62) {
 
4033
                } else if (la.kind == 63) {
3845
4034
                        lexer.NextToken();
3846
4035
                        Expect(11);
3847
4036
 
3848
 
#line  1616 "cs.ATG" 
 
4037
#line  1721 "Frames/cs.ATG" 
3849
4038
                        stmt = new GotoCaseStatement(null); 
3850
 
                } else SynErr(174);
 
4039
                } else SynErr(202);
3851
4040
        }
3852
4041
 
3853
4042
        void StatementExpr(
3854
 
#line  1636 "cs.ATG" 
 
4043
#line  1741 "Frames/cs.ATG" 
3855
4044
out Statement stmt) {
3856
4045
 
3857
 
#line  1637 "cs.ATG" 
 
4046
#line  1742 "Frames/cs.ATG" 
3858
4047
                Expression expr; 
3859
4048
                Expr(
3860
 
#line  1639 "cs.ATG" 
 
4049
#line  1744 "Frames/cs.ATG" 
3861
4050
out expr);
3862
4051
 
3863
 
#line  1642 "cs.ATG" 
 
4052
#line  1747 "Frames/cs.ATG" 
3864
4053
                stmt = new ExpressionStatement(expr); 
3865
4054
        }
3866
4055
 
3867
4056
        void TryStatement(
3868
 
#line  1566 "cs.ATG" 
 
4057
#line  1671 "Frames/cs.ATG" 
3869
4058
out Statement tryStatement) {
3870
4059
 
3871
 
#line  1568 "cs.ATG" 
 
4060
#line  1673 "Frames/cs.ATG" 
3872
4061
                Statement blockStmt = null, finallyStmt = null;
3873
4062
                List<CatchClause> catchClauses = null;
3874
4063
                
3875
 
                Expect(113);
 
4064
                Expect(114);
3876
4065
                Block(
3877
 
#line  1572 "cs.ATG" 
 
4066
#line  1677 "Frames/cs.ATG" 
3878
4067
out blockStmt);
3879
 
                if (la.kind == 55) {
 
4068
                if (la.kind == 56) {
3880
4069
                        CatchClauses(
3881
 
#line  1574 "cs.ATG" 
 
4070
#line  1679 "Frames/cs.ATG" 
3882
4071
out catchClauses);
3883
 
                        if (la.kind == 72) {
 
4072
                        if (la.kind == 73) {
3884
4073
                                lexer.NextToken();
3885
4074
                                Block(
3886
 
#line  1574 "cs.ATG" 
 
4075
#line  1679 "Frames/cs.ATG" 
3887
4076
out finallyStmt);
3888
4077
                        }
3889
 
                } else if (la.kind == 72) {
 
4078
                } else if (la.kind == 73) {
3890
4079
                        lexer.NextToken();
3891
4080
                        Block(
3892
 
#line  1575 "cs.ATG" 
 
4081
#line  1680 "Frames/cs.ATG" 
3893
4082
out finallyStmt);
3894
 
                } else SynErr(175);
 
4083
                } else SynErr(203);
3895
4084
 
3896
 
#line  1578 "cs.ATG" 
 
4085
#line  1683 "Frames/cs.ATG" 
3897
4086
                tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
3898
4087
                        
3899
4088
        }
3900
4089
 
3901
4090
        void ResourceAcquisition(
3902
 
#line  1620 "cs.ATG" 
 
4091
#line  1725 "Frames/cs.ATG" 
3903
4092
out Statement stmt) {
3904
4093
 
3905
 
#line  1622 "cs.ATG" 
 
4094
#line  1727 "Frames/cs.ATG" 
3906
4095
                stmt = null;
3907
4096
                Expression expr;
3908
4097
                
3909
4098
                if (
3910
 
#line  1627 "cs.ATG" 
 
4099
#line  1732 "Frames/cs.ATG" 
3911
4100
IsLocalVarDecl()) {
3912
4101
                        LocalVariableDecl(
3913
 
#line  1627 "cs.ATG" 
 
4102
#line  1732 "Frames/cs.ATG" 
3914
4103
out stmt);
3915
 
                } else if (StartOf(5)) {
 
4104
                } else if (StartOf(6)) {
3916
4105
                        Expr(
3917
 
#line  1628 "cs.ATG" 
 
4106
#line  1733 "Frames/cs.ATG" 
3918
4107
out expr);
3919
4108
 
3920
 
#line  1632 "cs.ATG" 
 
4109
#line  1737 "Frames/cs.ATG" 
3921
4110
                        stmt = new ExpressionStatement(expr); 
3922
 
                } else SynErr(176);
 
4111
                } else SynErr(204);
3923
4112
        }
3924
4113
 
3925
4114
        void SwitchLabel(
3926
 
#line  1559 "cs.ATG" 
 
4115
#line  1664 "Frames/cs.ATG" 
3927
4116
out CaseLabel label) {
3928
4117
 
3929
 
#line  1560 "cs.ATG" 
 
4118
#line  1665 "Frames/cs.ATG" 
3930
4119
                Expression expr = null; label = null; 
3931
 
                if (la.kind == 54) {
 
4120
                if (la.kind == 55) {
3932
4121
                        lexer.NextToken();
3933
4122
                        Expr(
3934
 
#line  1562 "cs.ATG" 
 
4123
#line  1667 "Frames/cs.ATG" 
3935
4124
out expr);
3936
4125
                        Expect(9);
3937
4126
 
3938
 
#line  1562 "cs.ATG" 
 
4127
#line  1667 "Frames/cs.ATG" 
3939
4128
                        label =  new CaseLabel(expr); 
3940
 
                } else if (la.kind == 62) {
 
4129
                } else if (la.kind == 63) {
3941
4130
                        lexer.NextToken();
3942
4131
                        Expect(9);
3943
4132
 
3944
 
#line  1563 "cs.ATG" 
 
4133
#line  1668 "Frames/cs.ATG" 
3945
4134
                        label =  new CaseLabel(); 
3946
 
                } else SynErr(177);
 
4135
                } else SynErr(205);
3947
4136
        }
3948
4137
 
3949
4138
        void CatchClauses(
3950
 
#line  1583 "cs.ATG" 
 
4139
#line  1688 "Frames/cs.ATG" 
3951
4140
out List<CatchClause> catchClauses) {
3952
4141
 
3953
 
#line  1585 "cs.ATG" 
 
4142
#line  1690 "Frames/cs.ATG" 
3954
4143
                catchClauses = new List<CatchClause>();
3955
4144
                
3956
 
                Expect(55);
 
4145
                Expect(56);
3957
4146
 
3958
 
#line  1588 "cs.ATG" 
 
4147
#line  1693 "Frames/cs.ATG" 
3959
4148
                string identifier;
3960
4149
                Statement stmt;
3961
4150
                TypeReference typeRef;
3962
4151
                
3963
4152
                if (la.kind == 16) {
3964
4153
                        Block(
3965
 
#line  1594 "cs.ATG" 
 
4154
#line  1699 "Frames/cs.ATG" 
3966
4155
out stmt);
3967
4156
 
3968
 
#line  1594 "cs.ATG" 
 
4157
#line  1699 "Frames/cs.ATG" 
3969
4158
                        catchClauses.Add(new CatchClause(stmt)); 
3970
4159
                } else if (la.kind == 20) {
3971
4160
                        lexer.NextToken();
3972
4161
                        ClassType(
3973
 
#line  1596 "cs.ATG" 
 
4162
#line  1701 "Frames/cs.ATG" 
3974
4163
out typeRef, false);
3975
4164
 
3976
 
#line  1596 "cs.ATG" 
 
4165
#line  1701 "Frames/cs.ATG" 
3977
4166
                        identifier = null; 
3978
 
                        if (la.kind == 1) {
3979
 
                                lexer.NextToken();
 
4167
                        if (StartOf(19)) {
 
4168
                                Identifier();
3980
4169
 
3981
 
#line  1597 "cs.ATG" 
 
4170
#line  1702 "Frames/cs.ATG" 
3982
4171
                                identifier = t.val; 
3983
4172
                        }
3984
4173
                        Expect(21);
3985
4174
                        Block(
3986
 
#line  1598 "cs.ATG" 
 
4175
#line  1703 "Frames/cs.ATG" 
3987
4176
out stmt);
3988
4177
 
3989
 
#line  1599 "cs.ATG" 
 
4178
#line  1704 "Frames/cs.ATG" 
3990
4179
                        catchClauses.Add(new CatchClause(typeRef, identifier, stmt)); 
3991
4180
                        while (
3992
 
#line  1600 "cs.ATG" 
 
4181
#line  1705 "Frames/cs.ATG" 
3993
4182
IsTypedCatch()) {
3994
 
                                Expect(55);
 
4183
                                Expect(56);
3995
4184
                                Expect(20);
3996
4185
                                ClassType(
3997
 
#line  1600 "cs.ATG" 
 
4186
#line  1705 "Frames/cs.ATG" 
3998
4187
out typeRef, false);
3999
4188
 
4000
 
#line  1600 "cs.ATG" 
 
4189
#line  1705 "Frames/cs.ATG" 
4001
4190
                                identifier = null; 
4002
 
                                if (la.kind == 1) {
4003
 
                                        lexer.NextToken();
 
4191
                                if (StartOf(19)) {
 
4192
                                        Identifier();
4004
4193
 
4005
 
#line  1601 "cs.ATG" 
 
4194
#line  1706 "Frames/cs.ATG" 
4006
4195
                                        identifier = t.val; 
4007
4196
                                }
4008
4197
                                Expect(21);
4009
4198
                                Block(
4010
 
#line  1602 "cs.ATG" 
 
4199
#line  1707 "Frames/cs.ATG" 
4011
4200
out stmt);
4012
4201
 
4013
 
#line  1603 "cs.ATG" 
 
4202
#line  1708 "Frames/cs.ATG" 
4014
4203
                                catchClauses.Add(new CatchClause(typeRef, identifier, stmt)); 
4015
4204
                        }
4016
 
                        if (la.kind == 55) {
 
4205
                        if (la.kind == 56) {
4017
4206
                                lexer.NextToken();
4018
4207
                                Block(
4019
 
#line  1605 "cs.ATG" 
 
4208
#line  1710 "Frames/cs.ATG" 
4020
4209
out stmt);
4021
4210
 
4022
 
#line  1605 "cs.ATG" 
 
4211
#line  1710 "Frames/cs.ATG" 
4023
4212
                                catchClauses.Add(new CatchClause(stmt)); 
4024
4213
                        }
4025
 
                } else SynErr(178);
 
4214
                } else SynErr(206);
4026
4215
        }
4027
4216
 
4028
4217
        void UnaryExpr(
4029
 
#line  1663 "cs.ATG" 
 
4218
#line  1774 "Frames/cs.ATG" 
4030
4219
out Expression uExpr) {
4031
4220
 
4032
 
#line  1665 "cs.ATG" 
 
4221
#line  1776 "Frames/cs.ATG" 
4033
4222
                TypeReference type = null;
4034
4223
                Expression expr = null;
4035
4224
                ArrayList expressions = new ArrayList();
4036
4225
                uExpr = null;
4037
4226
                
4038
 
                while (StartOf(26) || 
4039
 
#line  1687 "cs.ATG" 
 
4227
                while (StartOf(33) || 
 
4228
#line  1798 "Frames/cs.ATG" 
4040
4229
IsTypeCast()) {
4041
4230
                        if (la.kind == 4) {
4042
4231
                                lexer.NextToken();
4043
4232
 
4044
 
#line  1674 "cs.ATG" 
 
4233
#line  1785 "Frames/cs.ATG" 
4045
4234
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus)); 
4046
4235
                        } else if (la.kind == 5) {
4047
4236
                                lexer.NextToken();
4048
4237
 
4049
 
#line  1675 "cs.ATG" 
 
4238
#line  1786 "Frames/cs.ATG" 
4050
4239
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus)); 
4051
4240
                        } else if (la.kind == 24) {
4052
4241
                                lexer.NextToken();
4053
4242
 
4054
 
#line  1676 "cs.ATG" 
 
4243
#line  1787 "Frames/cs.ATG" 
4055
4244
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not)); 
4056
4245
                        } else if (la.kind == 27) {
4057
4246
                                lexer.NextToken();
4058
4247
 
4059
 
#line  1677 "cs.ATG" 
 
4248
#line  1788 "Frames/cs.ATG" 
4060
4249
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot)); 
4061
4250
                        } else if (la.kind == 6) {
4062
4251
                                lexer.NextToken();
4063
4252
 
4064
 
#line  1678 "cs.ATG" 
4065
 
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Star)); 
 
4253
#line  1789 "Frames/cs.ATG" 
 
4254
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Dereference)); 
4066
4255
                        } else if (la.kind == 31) {
4067
4256
                                lexer.NextToken();
4068
4257
 
4069
 
#line  1679 "cs.ATG" 
 
4258
#line  1790 "Frames/cs.ATG" 
4070
4259
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment)); 
4071
4260
                        } else if (la.kind == 32) {
4072
4261
                                lexer.NextToken();
4073
4262
 
4074
 
#line  1680 "cs.ATG" 
 
4263
#line  1791 "Frames/cs.ATG" 
4075
4264
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement)); 
4076
4265
                        } else if (la.kind == 28) {
4077
4266
                                lexer.NextToken();
4078
4267
 
4079
 
#line  1681 "cs.ATG" 
4080
 
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitWiseAnd)); 
 
4268
#line  1792 "Frames/cs.ATG" 
 
4269
                                expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.AddressOf)); 
4081
4270
                        } else {
4082
4271
                                Expect(20);
4083
4272
                                Type(
4084
 
#line  1687 "cs.ATG" 
 
4273
#line  1798 "Frames/cs.ATG" 
4085
4274
out type);
4086
4275
                                Expect(21);
4087
4276
 
4088
 
#line  1687 "cs.ATG" 
 
4277
#line  1798 "Frames/cs.ATG" 
4089
4278
                                expressions.Add(new CastExpression(type)); 
4090
4279
                        }
4091
4280
                }
4092
4281
                if (
4093
 
#line  1692 "cs.ATG" 
 
4282
#line  1803 "Frames/cs.ATG" 
4094
4283
LastExpressionIsUnaryMinus(expressions) && IsMostNegativeIntegerWithoutTypeSuffix()) {
4095
4284
                        Expect(2);
4096
4285
 
4097
 
#line  1695 "cs.ATG" 
 
4286
#line  1806 "Frames/cs.ATG" 
4098
4287
                        expressions.RemoveAt(expressions.Count - 1);
4099
4288
                        if (t.literalValue is uint) {
4100
4289
                                expr = new PrimitiveExpression(int.MinValue, int.MinValue.ToString());
4104
4293
                                throw new Exception("t.literalValue must be uint or ulong");
4105
4294
                        }
4106
4295
                        
4107
 
                } else if (StartOf(27)) {
 
4296
                } else if (StartOf(34)) {
4108
4297
                        PrimaryExpr(
4109
 
#line  1704 "cs.ATG" 
 
4298
#line  1815 "Frames/cs.ATG" 
4110
4299
out expr);
4111
 
                } else SynErr(179);
 
4300
                } else SynErr(207);
4112
4301
 
4113
 
#line  1706 "cs.ATG" 
 
4302
#line  1817 "Frames/cs.ATG" 
4114
4303
                for (int i = 0; i < expressions.Count; ++i) {
4115
4304
                Expression nextExpression = i + 1 < expressions.Count ? (Expression)expressions[i + 1] : expr;
4116
4305
                if (expressions[i] is CastExpression) {
4128
4317
        }
4129
4318
 
4130
4319
        void ConditionalOrExpr(
4131
 
#line  1886 "cs.ATG" 
 
4320
#line  2140 "Frames/cs.ATG" 
4132
4321
ref Expression outExpr) {
4133
4322
 
4134
 
#line  1887 "cs.ATG" 
 
4323
#line  2141 "Frames/cs.ATG" 
4135
4324
                Expression expr;   
4136
4325
                ConditionalAndExpr(
4137
 
#line  1889 "cs.ATG" 
 
4326
#line  2143 "Frames/cs.ATG" 
4138
4327
ref outExpr);
4139
4328
                while (la.kind == 26) {
4140
4329
                        lexer.NextToken();
4141
4330
                        UnaryExpr(
4142
 
#line  1889 "cs.ATG" 
 
4331
#line  2143 "Frames/cs.ATG" 
4143
4332
out expr);
4144
4333
                        ConditionalAndExpr(
4145
 
#line  1889 "cs.ATG" 
 
4334
#line  2143 "Frames/cs.ATG" 
4146
4335
ref expr);
4147
4336
 
4148
 
#line  1889 "cs.ATG" 
 
4337
#line  2143 "Frames/cs.ATG" 
4149
4338
                        outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr);  
4150
4339
                }
4151
4340
        }
4152
4341
 
4153
4342
        void PrimaryExpr(
4154
 
#line  1723 "cs.ATG" 
 
4343
#line  1834 "Frames/cs.ATG" 
4155
4344
out Expression pexpr) {
4156
4345
 
4157
 
#line  1725 "cs.ATG" 
 
4346
#line  1836 "Frames/cs.ATG" 
4158
4347
                TypeReference type = null;
4159
 
                List<TypeReference> typeList = null;
4160
 
                bool isArrayCreation = false;
4161
4348
                Expression expr;
4162
4349
                pexpr = null;
4163
 
                Location startPos = la.Location;
4164
4350
                
4165
 
                if (la.kind == 112) {
 
4351
 
 
4352
#line  1841 "Frames/cs.ATG" 
 
4353
                Location startLocation = la.Location; 
 
4354
                if (la.kind == 113) {
4166
4355
                        lexer.NextToken();
4167
4356
 
4168
 
#line  1734 "cs.ATG" 
 
4357
#line  1843 "Frames/cs.ATG" 
4169
4358
                        pexpr = new PrimitiveExpression(true, "true");  
4170
 
                } else if (la.kind == 71) {
 
4359
                } else if (la.kind == 72) {
4171
4360
                        lexer.NextToken();
4172
4361
 
4173
 
#line  1735 "cs.ATG" 
 
4362
#line  1844 "Frames/cs.ATG" 
4174
4363
                        pexpr = new PrimitiveExpression(false, "false"); 
4175
 
                } else if (la.kind == 89) {
 
4364
                } else if (la.kind == 90) {
4176
4365
                        lexer.NextToken();
4177
4366
 
4178
 
#line  1736 "cs.ATG" 
 
4367
#line  1845 "Frames/cs.ATG" 
4179
4368
                        pexpr = new PrimitiveExpression(null, "null");  
4180
4369
                } else if (la.kind == 2) {
4181
4370
                        lexer.NextToken();
4182
4371
 
4183
 
#line  1737 "cs.ATG" 
4184
 
                        pexpr = new PrimitiveExpression(t.literalValue, t.val); 
4185
 
                } else if (
4186
 
#line  1738 "cs.ATG" 
4187
 
IsTokenWithGenericParameters()) {
4188
 
                        TypeName(
4189
 
#line  1739 "cs.ATG" 
4190
 
out type, true);
4191
 
 
4192
 
#line  1739 "cs.ATG" 
4193
 
                        pexpr = new FieldReferenceExpression(new TypeReferenceExpression (type), ""); 
4194
 
                } else if (
4195
 
#line  1740 "cs.ATG" 
4196
 
la.kind == Tokens.Identifier && Peek(1).kind == Tokens.DoubleColon) {
4197
 
                        Expect(1);
4198
 
 
4199
 
#line  1741 "cs.ATG" 
 
4372
#line  1846 "Frames/cs.ATG" 
 
4373
                        pexpr = new PrimitiveExpression(t.literalValue, t.val);  
 
4374
                } else if (
 
4375
#line  1849 "Frames/cs.ATG" 
 
4376
StartOfQueryExpression()) {
 
4377
                        QueryExpression(
 
4378
#line  1850 "Frames/cs.ATG" 
 
4379
out pexpr);
 
4380
                } else if (
 
4381
#line  1851 "Frames/cs.ATG" 
 
4382
IdentAndDoubleColon()) {
 
4383
                        Identifier();
 
4384
 
 
4385
#line  1852 "Frames/cs.ATG" 
4200
4386
                        type = new TypeReference(t.val); 
4201
4387
                        Expect(10);
4202
4388
 
4203
 
#line  1742 "cs.ATG" 
4204
 
                        pexpr = new TypeReferenceExpression(type); 
4205
 
                        Expect(1);
 
4389
#line  1853 "Frames/cs.ATG" 
 
4390
                        pexpr = new TypeReferenceExpression(type); pexpr.StartLocation = t.Location; 
 
4391
                        Identifier();
4206
4392
 
4207
 
#line  1743 "cs.ATG" 
 
4393
#line  1854 "Frames/cs.ATG" 
4208
4394
                        if (type.Type == "global") { type.IsGlobal = true; type.Type = (t.val ?? "?"); } else type.Type += "." + (t.val ?? "?"); 
4209
 
                } else if (la.kind == 1) {
4210
 
                        lexer.NextToken();
4211
 
 
4212
 
#line  1745 "cs.ATG" 
4213
 
                        pexpr = new IdentifierExpression(t.val); pexpr.StartLocation = t.Location;  
 
4395
                } else if (StartOf(19)) {
 
4396
                        Identifier();
 
4397
 
 
4398
#line  1858 "Frames/cs.ATG" 
 
4399
                        pexpr = new IdentifierExpression(t.val); pexpr.StartLocation = t.Location; 
 
4400
                        if (la.kind == 48 || 
 
4401
#line  1861 "Frames/cs.ATG" 
 
4402
IsGenericInSimpleNameOrMemberAccess()) {
 
4403
                                if (la.kind == 48) {
 
4404
                                        ShortedLambdaExpression(
 
4405
#line  1860 "Frames/cs.ATG" 
 
4406
(IdentifierExpression)pexpr, out pexpr);
 
4407
                                } else {
 
4408
 
 
4409
#line  1862 "Frames/cs.ATG" 
 
4410
                                        List<TypeReference> typeList; 
 
4411
                                        TypeArgumentList(
 
4412
#line  1863 "Frames/cs.ATG" 
 
4413
out typeList, false);
 
4414
 
 
4415
#line  1864 "Frames/cs.ATG" 
 
4416
                                        ((IdentifierExpression)pexpr).TypeArguments = typeList; 
 
4417
                                }
 
4418
                        }
 
4419
                } else if (
 
4420
#line  1866 "Frames/cs.ATG" 
 
4421
IsLambdaExpression()) {
 
4422
                        LambdaExpression(
 
4423
#line  1867 "Frames/cs.ATG" 
 
4424
out pexpr);
4214
4425
                } else if (la.kind == 20) {
4215
4426
                        lexer.NextToken();
4216
4427
                        Expr(
4217
 
#line  1747 "cs.ATG" 
 
4428
#line  1870 "Frames/cs.ATG" 
4218
4429
out expr);
4219
4430
                        Expect(21);
4220
4431
 
4221
 
#line  1747 "cs.ATG" 
 
4432
#line  1870 "Frames/cs.ATG" 
4222
4433
                        pexpr = new ParenthesizedExpression(expr); 
4223
 
                } else if (StartOf(28)) {
 
4434
                } else if (StartOf(35)) {
4224
4435
 
4225
 
#line  1749 "cs.ATG" 
 
4436
#line  1873 "Frames/cs.ATG" 
4226
4437
                        string val = null; 
4227
4438
                        switch (la.kind) {
4228
 
                        case 51: {
 
4439
                        case 52: {
4229
4440
                                lexer.NextToken();
4230
4441
 
4231
 
#line  1751 "cs.ATG" 
 
4442
#line  1874 "Frames/cs.ATG" 
4232
4443
                                val = "bool"; 
4233
4444
                                break;
4234
4445
                        }
4235
 
                        case 53: {
 
4446
                        case 54: {
4236
4447
                                lexer.NextToken();
4237
4448
 
4238
 
#line  1752 "cs.ATG" 
 
4449
#line  1875 "Frames/cs.ATG" 
4239
4450
                                val = "byte"; 
4240
4451
                                break;
4241
4452
                        }
4242
 
                        case 56: {
 
4453
                        case 57: {
4243
4454
                                lexer.NextToken();
4244
4455
 
4245
 
#line  1753 "cs.ATG" 
 
4456
#line  1876 "Frames/cs.ATG" 
4246
4457
                                val = "char"; 
4247
4458
                                break;
4248
4459
                        }
4249
 
                        case 61: {
 
4460
                        case 62: {
4250
4461
                                lexer.NextToken();
4251
4462
 
4252
 
#line  1754 "cs.ATG" 
 
4463
#line  1877 "Frames/cs.ATG" 
4253
4464
                                val = "decimal"; 
4254
4465
                                break;
4255
4466
                        }
4256
 
                        case 65: {
 
4467
                        case 66: {
4257
4468
                                lexer.NextToken();
4258
4469
 
4259
 
#line  1755 "cs.ATG" 
 
4470
#line  1878 "Frames/cs.ATG" 
4260
4471
                                val = "double"; 
4261
4472
                                break;
4262
4473
                        }
4263
 
                        case 74: {
 
4474
                        case 75: {
4264
4475
                                lexer.NextToken();
4265
4476
 
4266
 
#line  1756 "cs.ATG" 
 
4477
#line  1879 "Frames/cs.ATG" 
4267
4478
                                val = "float"; 
4268
4479
                                break;
4269
4480
                        }
4270
 
                        case 81: {
 
4481
                        case 82: {
4271
4482
                                lexer.NextToken();
4272
4483
 
4273
 
#line  1757 "cs.ATG" 
 
4484
#line  1880 "Frames/cs.ATG" 
4274
4485
                                val = "int"; 
4275
4486
                                break;
4276
4487
                        }
4277
 
                        case 86: {
 
4488
                        case 87: {
4278
4489
                                lexer.NextToken();
4279
4490
 
4280
 
#line  1758 "cs.ATG" 
 
4491
#line  1881 "Frames/cs.ATG" 
4281
4492
                                val = "long"; 
4282
4493
                                break;
4283
4494
                        }
4284
 
                        case 90: {
 
4495
                        case 91: {
4285
4496
                                lexer.NextToken();
4286
4497
 
4287
 
#line  1759 "cs.ATG" 
 
4498
#line  1882 "Frames/cs.ATG" 
4288
4499
                                val = "object"; 
4289
4500
                                break;
4290
4501
                        }
4291
 
                        case 101: {
 
4502
                        case 102: {
4292
4503
                                lexer.NextToken();
4293
4504
 
4294
 
#line  1760 "cs.ATG" 
 
4505
#line  1883 "Frames/cs.ATG" 
4295
4506
                                val = "sbyte"; 
4296
4507
                                break;
4297
4508
                        }
4298
 
                        case 103: {
 
4509
                        case 104: {
4299
4510
                                lexer.NextToken();
4300
4511
 
4301
 
#line  1761 "cs.ATG" 
 
4512
#line  1884 "Frames/cs.ATG" 
4302
4513
                                val = "short"; 
4303
4514
                                break;
4304
4515
                        }
4305
 
                        case 107: {
 
4516
                        case 108: {
4306
4517
                                lexer.NextToken();
4307
4518
 
4308
 
#line  1762 "cs.ATG" 
 
4519
#line  1885 "Frames/cs.ATG" 
4309
4520
                                val = "string"; 
4310
4521
                                break;
4311
4522
                        }
4312
 
                        case 115: {
 
4523
                        case 116: {
4313
4524
                                lexer.NextToken();
4314
4525
 
4315
 
#line  1763 "cs.ATG" 
 
4526
#line  1886 "Frames/cs.ATG" 
4316
4527
                                val = "uint"; 
4317
4528
                                break;
4318
4529
                        }
4319
 
                        case 116: {
 
4530
                        case 117: {
4320
4531
                                lexer.NextToken();
4321
4532
 
4322
 
#line  1764 "cs.ATG" 
 
4533
#line  1887 "Frames/cs.ATG" 
4323
4534
                                val = "ulong"; 
4324
4535
                                break;
4325
4536
                        }
4326
 
                        case 119: {
 
4537
                        case 120: {
4327
4538
                                lexer.NextToken();
4328
4539
 
4329
 
#line  1765 "cs.ATG" 
 
4540
#line  1888 "Frames/cs.ATG" 
4330
4541
                                val = "ushort"; 
4331
4542
                                break;
4332
4543
                        }
4333
 
                        }
4334
 
 
4335
 
#line  1766 "cs.ATG" 
4336
 
                        t.val = ""; 
4337
 
                        Expect(15);
4338
 
                        Expect(1);
4339
 
 
4340
 
#line  1766 "cs.ATG" 
4341
 
                        pexpr = new FieldReferenceExpression(new TypeReferenceExpression(val), t.val); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; 
4342
 
                } else if (la.kind == 110) {
4343
 
                        lexer.NextToken();
4344
 
 
4345
 
#line  1768 "cs.ATG" 
4346
 
                        pexpr = new ThisReferenceExpression(); pexpr.StartLocation = t.Location; 
4347
 
                } else if (la.kind == 50) {
4348
 
                        lexer.NextToken();
4349
 
 
4350
 
#line  1770 "cs.ATG" 
4351
 
                        Expression retExpr = new BaseReferenceExpression(); 
4352
 
                        if (la.kind == 15) {
4353
 
                                lexer.NextToken();
4354
 
                                Expect(1);
4355
 
 
4356
 
#line  1772 "cs.ATG" 
4357
 
                                retExpr = new FieldReferenceExpression(retExpr, t.val); retExpr.StartLocation = t.Location; retExpr.EndLocation = t.EndLocation; 
4358
 
                        } else if (la.kind == 18) {
4359
 
                                lexer.NextToken();
4360
 
                                Expr(
4361
 
#line  1773 "cs.ATG" 
4362
 
out expr);
4363
 
 
4364
 
#line  1773 "cs.ATG" 
4365
 
                                List<Expression> indices = new List<Expression>(); if (expr != null) { indices.Add(expr); } 
4366
 
                                while (la.kind == 14) {
4367
 
                                        lexer.NextToken();
4368
 
                                        Expr(
4369
 
#line  1774 "cs.ATG" 
4370
 
out expr);
4371
 
 
4372
 
#line  1774 "cs.ATG" 
4373
 
                                        if (expr != null) { indices.Add(expr); } 
4374
 
                                }
4375
 
                                Expect(19);
4376
 
 
4377
 
#line  1775 "cs.ATG" 
4378
 
                                retExpr = new IndexerExpression(retExpr, indices); 
4379
 
                        } else SynErr(180);
4380
 
 
4381
 
#line  1776 "cs.ATG" 
4382
 
                        pexpr = retExpr; 
4383
 
                } else if (la.kind == 88) {
4384
 
                        lexer.NextToken();
4385
 
                        NonArrayType(
4386
 
#line  1777 "cs.ATG" 
4387
 
out type);
4388
 
 
4389
 
#line  1778 "cs.ATG" 
4390
 
                        List<Expression> parameters = new List<Expression>(); 
4391
 
                        if (la.kind == 20) {
4392
 
                                lexer.NextToken();
4393
 
 
4394
 
#line  1783 "cs.ATG" 
4395
 
                                ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); 
4396
 
                                if (StartOf(21)) {
4397
 
                                        Argument(
4398
 
#line  1784 "cs.ATG" 
4399
 
out expr);
4400
 
 
4401
 
#line  1784 "cs.ATG" 
4402
 
                                        if (expr != null) { parameters.Add(expr); } 
4403
 
                                        while (la.kind == 14) {
4404
 
                                                lexer.NextToken();
4405
 
                                                Argument(
4406
 
#line  1785 "cs.ATG" 
4407
 
out expr);
4408
 
 
4409
 
#line  1785 "cs.ATG" 
4410
 
                                                if (expr != null) { parameters.Add(expr); } 
4411
 
                                        }
4412
 
                                }
4413
 
                                Expect(21);
4414
 
 
4415
 
#line  1787 "cs.ATG" 
4416
 
                                pexpr = oce; 
4417
 
                        } else if (la.kind == 18) {
4418
 
                                lexer.NextToken();
4419
 
 
4420
 
#line  1789 "cs.ATG" 
4421
 
                                isArrayCreation = true; ArrayCreateExpression ace = new ArrayCreateExpression(type); pexpr = ace; 
4422
 
 
4423
 
#line  1790 "cs.ATG" 
4424
 
                                int dims = 0; List<int> ranks = new List<int>(); 
4425
 
                                if (la.kind == 14 || la.kind == 19) {
4426
 
                                        while (la.kind == 14) {
4427
 
                                                lexer.NextToken();
4428
 
 
4429
 
#line  1792 "cs.ATG" 
4430
 
                                                dims += 1; 
4431
 
                                        }
4432
 
                                        Expect(19);
4433
 
 
4434
 
#line  1793 "cs.ATG" 
4435
 
                                        ranks.Add(dims); dims = 0; 
4436
 
                                        while (la.kind == 18) {
4437
 
                                                lexer.NextToken();
4438
 
                                                while (la.kind == 14) {
4439
 
                                                        lexer.NextToken();
4440
 
 
4441
 
#line  1794 "cs.ATG" 
4442
 
                                                        ++dims; 
4443
 
                                                }
4444
 
                                                Expect(19);
4445
 
 
4446
 
#line  1794 "cs.ATG" 
4447
 
                                                ranks.Add(dims); dims = 0; 
4448
 
                                        }
4449
 
 
4450
 
#line  1795 "cs.ATG" 
4451
 
                                        ace.CreateType.RankSpecifier = ranks.ToArray(); 
4452
 
                                        ArrayInitializer(
4453
 
#line  1796 "cs.ATG" 
4454
 
out expr);
4455
 
 
4456
 
#line  1796 "cs.ATG" 
4457
 
                                        ace.ArrayInitializer = (ArrayInitializerExpression)expr; 
4458
 
                                } else if (StartOf(5)) {
4459
 
                                        Expr(
4460
 
#line  1797 "cs.ATG" 
4461
 
out expr);
4462
 
 
4463
 
#line  1797 "cs.ATG" 
4464
 
                                        if (expr != null) parameters.Add(expr); 
4465
 
                                        while (la.kind == 14) {
4466
 
                                                lexer.NextToken();
4467
 
 
4468
 
#line  1798 "cs.ATG" 
4469
 
                                                dims += 1; 
4470
 
                                                Expr(
4471
 
#line  1799 "cs.ATG" 
4472
 
out expr);
4473
 
 
4474
 
#line  1799 "cs.ATG" 
4475
 
                                                if (expr != null) parameters.Add(expr); 
4476
 
                                        }
4477
 
                                        Expect(19);
4478
 
 
4479
 
#line  1801 "cs.ATG" 
4480
 
                                        ranks.Add(dims); ace.Arguments = parameters; dims = 0; 
4481
 
                                        while (la.kind == 18) {
4482
 
                                                lexer.NextToken();
4483
 
                                                while (la.kind == 14) {
4484
 
                                                        lexer.NextToken();
4485
 
 
4486
 
#line  1802 "cs.ATG" 
4487
 
                                                        ++dims; 
4488
 
                                                }
4489
 
                                                Expect(19);
4490
 
 
4491
 
#line  1802 "cs.ATG" 
4492
 
                                                ranks.Add(dims); dims = 0; 
4493
 
                                        }
4494
 
 
4495
 
#line  1803 "cs.ATG" 
4496
 
                                        ace.CreateType.RankSpecifier = ranks.ToArray(); 
4497
 
                                        if (la.kind == 16) {
4498
 
                                                ArrayInitializer(
4499
 
#line  1804 "cs.ATG" 
4500
 
out expr);
4501
 
 
4502
 
#line  1804 "cs.ATG" 
4503
 
                                                ace.ArrayInitializer = (ArrayInitializerExpression)expr; 
4504
 
                                        }
4505
 
                                } else SynErr(181);
4506
 
                        } else SynErr(182);
4507
 
                } else if (la.kind == 114) {
 
4544
                        case 123: {
 
4545
                                lexer.NextToken();
 
4546
 
 
4547
#line  1889 "Frames/cs.ATG" 
 
4548
                                val = "void"; 
 
4549
                                break;
 
4550
                        }
 
4551
                        }
 
4552
                        MemberAccess(
 
4553
#line  1891 "Frames/cs.ATG" 
 
4554
out pexpr, new TypeReferenceExpression(val) { StartLocation = t.Location, EndLocation = t.EndLocation } );
 
4555
                } else if (la.kind == 111) {
 
4556
                        lexer.NextToken();
 
4557
 
 
4558
#line  1894 "Frames/cs.ATG" 
 
4559
                        pexpr = new ThisReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; 
 
4560
                } else if (la.kind == 51) {
 
4561
                        lexer.NextToken();
 
4562
 
 
4563
#line  1896 "Frames/cs.ATG" 
 
4564
                        pexpr = new BaseReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation;
 
4565
                } else if (la.kind == 89) {
 
4566
                        NewExpression(
 
4567
#line  1899 "Frames/cs.ATG" 
 
4568
out pexpr);
 
4569
                } else if (la.kind == 115) {
4508
4570
                        lexer.NextToken();
4509
4571
                        Expect(20);
4510
4572
                        if (
4511
 
#line  1809 "cs.ATG" 
 
4573
#line  1903 "Frames/cs.ATG" 
4512
4574
NotVoidPointer()) {
4513
 
                                Expect(122);
 
4575
                                Expect(123);
4514
4576
 
4515
 
#line  1809 "cs.ATG" 
 
4577
#line  1903 "Frames/cs.ATG" 
4516
4578
                                type = new TypeReference("void"); 
4517
 
                        } else if (StartOf(9)) {
 
4579
                        } else if (StartOf(10)) {
4518
4580
                                TypeWithRestriction(
4519
 
#line  1810 "cs.ATG" 
 
4581
#line  1904 "Frames/cs.ATG" 
4520
4582
out type, true, true);
4521
 
                        } else SynErr(183);
 
4583
                        } else SynErr(208);
4522
4584
                        Expect(21);
4523
4585
 
4524
 
#line  1811 "cs.ATG" 
 
4586
#line  1906 "Frames/cs.ATG" 
4525
4587
                        pexpr = new TypeOfExpression(type); 
4526
 
                } else if (la.kind == 62) {
 
4588
                } else if (la.kind == 63) {
4527
4589
                        lexer.NextToken();
4528
4590
                        Expect(20);
4529
4591
                        Type(
4530
 
#line  1813 "cs.ATG" 
 
4592
#line  1908 "Frames/cs.ATG" 
4531
4593
out type);
4532
4594
                        Expect(21);
4533
4595
 
4534
 
#line  1813 "cs.ATG" 
 
4596
#line  1908 "Frames/cs.ATG" 
4535
4597
                        pexpr = new DefaultValueExpression(type); 
4536
 
                } else if (la.kind == 104) {
 
4598
                } else if (la.kind == 105) {
4537
4599
                        lexer.NextToken();
4538
4600
                        Expect(20);
4539
4601
                        Type(
4540
 
#line  1814 "cs.ATG" 
 
4602
#line  1909 "Frames/cs.ATG" 
4541
4603
out type);
4542
4604
                        Expect(21);
4543
4605
 
4544
 
#line  1814 "cs.ATG" 
 
4606
#line  1909 "Frames/cs.ATG" 
4545
4607
                        pexpr = new SizeOfExpression(type); 
4546
 
                } else if (la.kind == 57) {
 
4608
                } else if (la.kind == 58) {
4547
4609
                        lexer.NextToken();
4548
4610
                        Expect(20);
4549
4611
                        Expr(
4550
 
#line  1815 "cs.ATG" 
 
4612
#line  1910 "Frames/cs.ATG" 
4551
4613
out expr);
4552
4614
                        Expect(21);
4553
4615
 
4554
 
#line  1815 "cs.ATG" 
 
4616
#line  1910 "Frames/cs.ATG" 
4555
4617
                        pexpr = new CheckedExpression(expr); 
4556
 
                } else if (la.kind == 117) {
 
4618
                } else if (la.kind == 118) {
4557
4619
                        lexer.NextToken();
4558
4620
                        Expect(20);
4559
4621
                        Expr(
4560
 
#line  1816 "cs.ATG" 
 
4622
#line  1911 "Frames/cs.ATG" 
4561
4623
out expr);
4562
4624
                        Expect(21);
4563
4625
 
4564
 
#line  1816 "cs.ATG" 
 
4626
#line  1911 "Frames/cs.ATG" 
4565
4627
                        pexpr = new UncheckedExpression(expr); 
4566
 
                } else if (la.kind == 63) {
 
4628
                } else if (la.kind == 64) {
4567
4629
                        lexer.NextToken();
4568
4630
                        AnonymousMethodExpr(
4569
 
#line  1817 "cs.ATG" 
 
4631
#line  1912 "Frames/cs.ATG" 
4570
4632
out expr);
4571
4633
 
4572
 
#line  1817 "cs.ATG" 
 
4634
#line  1912 "Frames/cs.ATG" 
4573
4635
                        pexpr = expr; 
4574
 
                } else SynErr(184);
4575
 
                while (StartOf(29) || 
4576
 
#line  1828 "cs.ATG" 
4577
 
IsGenericFollowedBy(Tokens.Dot) && IsTypeReferenceExpression(pexpr) || 
4578
 
#line  1837 "cs.ATG" 
4579
 
IsGenericFollowedBy(Tokens.OpenParenthesis)) {
 
4636
                } else SynErr(209);
 
4637
 
 
4638
#line  1914 "Frames/cs.ATG" 
 
4639
                if (pexpr != null) {
 
4640
                if (pexpr.StartLocation.IsEmpty)
 
4641
                        pexpr.StartLocation = startLocation;
 
4642
                if (pexpr.EndLocation.IsEmpty)
 
4643
                        pexpr.EndLocation = t.EndLocation;
 
4644
                }
 
4645
                
 
4646
                while (StartOf(36)) {
4580
4647
                        if (la.kind == 31 || la.kind == 32) {
 
4648
 
 
4649
#line  1922 "Frames/cs.ATG" 
 
4650
                                startLocation = la.Location; 
4581
4651
                                if (la.kind == 31) {
4582
4652
                                        lexer.NextToken();
4583
4653
 
4584
 
#line  1821 "cs.ATG" 
 
4654
#line  1924 "Frames/cs.ATG" 
4585
4655
                                        pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement); 
4586
4656
                                } else if (la.kind == 32) {
4587
4657
                                        lexer.NextToken();
4588
4658
 
4589
 
#line  1822 "cs.ATG" 
 
4659
#line  1925 "Frames/cs.ATG" 
4590
4660
                                        pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement); 
4591
 
                                } else SynErr(185);
 
4661
                                } else SynErr(210);
4592
4662
                        } else if (la.kind == 47) {
4593
 
                                lexer.NextToken();
4594
 
                                Expect(1);
4595
 
 
4596
 
#line  1825 "cs.ATG" 
4597
 
                                pexpr = new PointerReferenceExpression(pexpr, t.val); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; 
 
4663
                                PointerMemberAccess(
 
4664
#line  1928 "Frames/cs.ATG" 
 
4665
out pexpr, pexpr);
4598
4666
                        } else if (la.kind == 15) {
4599
 
                                lexer.NextToken();
4600
 
                                Expect(1);
4601
 
 
4602
 
#line  1826 "cs.ATG" 
4603
 
                                pexpr = new FieldReferenceExpression(pexpr, t.val); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; 
4604
 
                        } else if (
4605
 
#line  1828 "cs.ATG" 
4606
 
IsGenericFollowedBy(Tokens.Dot) && IsTypeReferenceExpression(pexpr)) {
4607
 
                                TypeArgumentList(
4608
 
#line  1829 "cs.ATG" 
4609
 
out typeList, false);
4610
 
                                Expect(15);
4611
 
                                Expect(1);
4612
 
 
4613
 
#line  1831 "cs.ATG" 
4614
 
                                pexpr = new FieldReferenceExpression(GetTypeReferenceExpression(pexpr, typeList), t.val); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation;
 
4667
                                MemberAccess(
 
4668
#line  1929 "Frames/cs.ATG" 
 
4669
out pexpr, pexpr);
4615
4670
                        } else if (la.kind == 20) {
4616
4671
                                lexer.NextToken();
4617
4672
 
4618
 
#line  1833 "cs.ATG" 
 
4673
#line  1933 "Frames/cs.ATG" 
4619
4674
                                List<Expression> parameters = new List<Expression>(); 
4620
 
                                if (StartOf(21)) {
4621
 
                                        Argument(
4622
 
#line  1834 "cs.ATG" 
4623
 
out expr);
4624
 
 
4625
 
#line  1834 "cs.ATG" 
4626
 
                                        if (expr != null) {parameters.Add(expr);} 
4627
 
                                        while (la.kind == 14) {
4628
 
                                                lexer.NextToken();
4629
 
                                                Argument(
4630
 
#line  1835 "cs.ATG" 
4631
 
out expr);
4632
 
 
4633
 
#line  1835 "cs.ATG" 
4634
 
                                                if (expr != null) {parameters.Add(expr);} 
4635
 
                                        }
4636
 
                                }
4637
 
                                Expect(21);
4638
 
 
4639
 
#line  1836 "cs.ATG" 
 
4675
 
 
4676
#line  1934 "Frames/cs.ATG" 
4640
4677
                                pexpr = new InvocationExpression(pexpr, parameters); 
4641
 
                        } else if (
4642
 
#line  1837 "cs.ATG" 
4643
 
IsGenericFollowedBy(Tokens.OpenParenthesis)) {
4644
 
                                TypeArgumentList(
4645
 
#line  1837 "cs.ATG" 
4646
 
out typeList, false);
4647
 
                                Expect(20);
4648
 
 
4649
 
#line  1838 "cs.ATG" 
4650
 
                                List<Expression> parameters = new List<Expression>(); 
4651
 
                                if (StartOf(21)) {
 
4678
                                if (StartOf(26)) {
4652
4679
                                        Argument(
4653
 
#line  1839 "cs.ATG" 
 
4680
#line  1935 "Frames/cs.ATG" 
4654
4681
out expr);
4655
4682
 
4656
 
#line  1839 "cs.ATG" 
4657
 
                                        if (expr != null) {parameters.Add(expr);} 
 
4683
#line  1935 "Frames/cs.ATG" 
 
4684
                                        SafeAdd(pexpr, parameters, expr); 
4658
4685
                                        while (la.kind == 14) {
4659
4686
                                                lexer.NextToken();
4660
4687
                                                Argument(
4661
 
#line  1840 "cs.ATG" 
 
4688
#line  1936 "Frames/cs.ATG" 
4662
4689
out expr);
4663
4690
 
4664
 
#line  1840 "cs.ATG" 
4665
 
                                                if (expr != null) {parameters.Add(expr);} 
 
4691
#line  1936 "Frames/cs.ATG" 
 
4692
                                                SafeAdd(pexpr, parameters, expr); 
4666
4693
                                        }
4667
4694
                                }
4668
4695
                                Expect(21);
4669
 
 
4670
 
#line  1841 "cs.ATG" 
4671
 
                                pexpr = new InvocationExpression(pexpr, parameters, typeList); 
4672
4696
                        } else {
4673
4697
 
4674
 
#line  1843 "cs.ATG" 
4675
 
                                if (isArrayCreation) Error("element access not allow on array creation");
 
4698
#line  1942 "Frames/cs.ATG" 
4676
4699
                                List<Expression> indices = new List<Expression>();
4677
 
                                
4678
 
                                lexer.NextToken();
4679
 
                                Expr(
4680
 
#line  1846 "cs.ATG" 
4681
 
out expr);
4682
 
 
4683
 
#line  1846 "cs.ATG" 
4684
 
                                if (expr != null) { indices.Add(expr); } 
4685
 
                                while (la.kind == 14) {
4686
 
                                        lexer.NextToken();
4687
 
                                        Expr(
4688
 
#line  1847 "cs.ATG" 
4689
 
out expr);
4690
 
 
4691
 
#line  1847 "cs.ATG" 
4692
 
                                        if (expr != null) { indices.Add(expr); } 
4693
 
                                }
4694
 
                                Expect(19);
4695
 
 
4696
 
#line  1848 "cs.ATG" 
4697
 
                                pexpr = new IndexerExpression(pexpr, indices); 
4698
 
                        }
4699
 
                }
4700
 
 
4701
 
#line  1850 "cs.ATG" 
4702
 
                if (pexpr != null) {
4703
 
                if (pexpr.StartLocation.IsEmpty)
4704
 
                        pexpr.StartLocation = startPos;
4705
 
                if (pexpr.EndLocation.IsEmpty)
4706
 
                        pexpr.EndLocation = t.EndLocation;
4707
 
                  }
4708
 
                
 
4700
                                pexpr = new IndexerExpression(pexpr, indices);
 
4701
                                
 
4702
                                lexer.NextToken();
 
4703
                                Expr(
 
4704
#line  1945 "Frames/cs.ATG" 
 
4705
out expr);
 
4706
 
 
4707
#line  1945 "Frames/cs.ATG" 
 
4708
                                SafeAdd(pexpr, indices, expr); 
 
4709
                                while (la.kind == 14) {
 
4710
                                        lexer.NextToken();
 
4711
                                        Expr(
 
4712
#line  1946 "Frames/cs.ATG" 
 
4713
out expr);
 
4714
 
 
4715
#line  1946 "Frames/cs.ATG" 
 
4716
                                        SafeAdd(pexpr, indices, expr); 
 
4717
                                }
 
4718
                                Expect(19);
 
4719
 
 
4720
#line  1949 "Frames/cs.ATG" 
 
4721
                                if (pexpr != null) {
 
4722
                                pexpr.StartLocation = startLocation;
 
4723
                                pexpr.EndLocation = t.EndLocation;
 
4724
                                }
 
4725
                                
 
4726
                        }
 
4727
                }
 
4728
        }
 
4729
 
 
4730
        void QueryExpression(
 
4731
#line  2378 "Frames/cs.ATG" 
 
4732
out Expression outExpr) {
 
4733
 
 
4734
#line  2379 "Frames/cs.ATG" 
 
4735
                QueryExpression q = new QueryExpression(); outExpr = q; q.StartLocation = la.Location; 
 
4736
                QueryExpressionFromClause fromClause;
 
4737
                
 
4738
                QueryExpressionFromClause(
 
4739
#line  2383 "Frames/cs.ATG" 
 
4740
out fromClause);
 
4741
 
 
4742
#line  2383 "Frames/cs.ATG" 
 
4743
                q.FromClause = fromClause; 
 
4744
                QueryExpressionBody(
 
4745
#line  2384 "Frames/cs.ATG" 
 
4746
q);
 
4747
 
 
4748
#line  2385 "Frames/cs.ATG" 
 
4749
                q.EndLocation = t.EndLocation; 
 
4750
        }
 
4751
 
 
4752
        void ShortedLambdaExpression(
 
4753
#line  2064 "Frames/cs.ATG" 
 
4754
IdentifierExpression ident, out Expression pexpr) {
 
4755
 
 
4756
#line  2065 "Frames/cs.ATG" 
 
4757
                LambdaExpression lambda = new LambdaExpression(); pexpr = lambda; 
 
4758
                Expect(48);
 
4759
 
 
4760
#line  2070 "Frames/cs.ATG" 
 
4761
                lambda.StartLocation = ident.StartLocation;
 
4762
                lambda.Parameters.Add(new ParameterDeclarationExpression(null, ident.Identifier));
 
4763
                lambda.Parameters[0].StartLocation = ident.StartLocation;
 
4764
                lambda.Parameters[0].EndLocation = ident.EndLocation;
 
4765
                
 
4766
                LambdaExpressionBody(
 
4767
#line  2075 "Frames/cs.ATG" 
 
4768
lambda);
 
4769
        }
 
4770
 
 
4771
        void TypeArgumentList(
 
4772
#line  2312 "Frames/cs.ATG" 
 
4773
out List<TypeReference> types, bool canBeUnbound) {
 
4774
 
 
4775
#line  2314 "Frames/cs.ATG" 
 
4776
                types = new List<TypeReference>();
 
4777
                TypeReference type = null;
 
4778
                
 
4779
                Expect(23);
 
4780
                if (
 
4781
#line  2319 "Frames/cs.ATG" 
 
4782
canBeUnbound && (la.kind == Tokens.GreaterThan || la.kind == Tokens.Comma)) {
 
4783
 
 
4784
#line  2320 "Frames/cs.ATG" 
 
4785
                        types.Add(TypeReference.Null); 
 
4786
                        while (la.kind == 14) {
 
4787
                                lexer.NextToken();
 
4788
 
 
4789
#line  2321 "Frames/cs.ATG" 
 
4790
                                types.Add(TypeReference.Null); 
 
4791
                        }
 
4792
                } else if (StartOf(10)) {
 
4793
                        Type(
 
4794
#line  2322 "Frames/cs.ATG" 
 
4795
out type);
 
4796
 
 
4797
#line  2322 "Frames/cs.ATG" 
 
4798
                        if (type != null) { types.Add(type); } 
 
4799
                        while (la.kind == 14) {
 
4800
                                lexer.NextToken();
 
4801
                                Type(
 
4802
#line  2323 "Frames/cs.ATG" 
 
4803
out type);
 
4804
 
 
4805
#line  2323 "Frames/cs.ATG" 
 
4806
                                if (type != null) { types.Add(type); } 
 
4807
                        }
 
4808
                } else SynErr(211);
 
4809
                Expect(22);
 
4810
        }
 
4811
 
 
4812
        void LambdaExpression(
 
4813
#line  2044 "Frames/cs.ATG" 
 
4814
out Expression outExpr) {
 
4815
 
 
4816
#line  2046 "Frames/cs.ATG" 
 
4817
                LambdaExpression lambda = new LambdaExpression();
 
4818
                lambda.StartLocation = la.Location;
 
4819
                ParameterDeclarationExpression p;
 
4820
                outExpr = lambda;
 
4821
                
 
4822
                Expect(20);
 
4823
                if (StartOf(10)) {
 
4824
                        LambdaExpressionParameter(
 
4825
#line  2054 "Frames/cs.ATG" 
 
4826
out p);
 
4827
 
 
4828
#line  2054 "Frames/cs.ATG" 
 
4829
                        SafeAdd(lambda, lambda.Parameters, p); 
 
4830
                        while (la.kind == 14) {
 
4831
                                lexer.NextToken();
 
4832
                                LambdaExpressionParameter(
 
4833
#line  2056 "Frames/cs.ATG" 
 
4834
out p);
 
4835
 
 
4836
#line  2056 "Frames/cs.ATG" 
 
4837
                                SafeAdd(lambda, lambda.Parameters, p); 
 
4838
                        }
 
4839
                }
 
4840
                Expect(21);
 
4841
                Expect(48);
 
4842
                LambdaExpressionBody(
 
4843
#line  2061 "Frames/cs.ATG" 
 
4844
lambda);
 
4845
        }
 
4846
 
 
4847
        void MemberAccess(
 
4848
#line  1957 "Frames/cs.ATG" 
 
4849
out Expression expr, Expression target) {
 
4850
 
 
4851
#line  1958 "Frames/cs.ATG" 
 
4852
                List<TypeReference> typeList; 
 
4853
 
 
4854
#line  1960 "Frames/cs.ATG" 
 
4855
                if (ShouldConvertTargetExpressionToTypeReference(target)) {
 
4856
                TypeReference type = GetTypeReferenceFromExpression(target);
 
4857
                if (type != null) {
 
4858
                        target = new TypeReferenceExpression(type) { StartLocation = t.Location, EndLocation = t.EndLocation };
 
4859
                }
 
4860
                }
 
4861
                t.val = ""; // required for TypeReferenceExpressionTests.StandaloneIntReferenceExpression hack
 
4862
                
 
4863
                Expect(15);
 
4864
                Identifier();
 
4865
 
 
4866
#line  1970 "Frames/cs.ATG" 
 
4867
                expr = new MemberReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation; 
 
4868
                if (
 
4869
#line  1971 "Frames/cs.ATG" 
 
4870
IsGenericInSimpleNameOrMemberAccess()) {
 
4871
                        TypeArgumentList(
 
4872
#line  1972 "Frames/cs.ATG" 
 
4873
out typeList, false);
 
4874
 
 
4875
#line  1973 "Frames/cs.ATG" 
 
4876
                        ((MemberReferenceExpression)expr).TypeArguments = typeList; 
 
4877
                }
 
4878
 
 
4879
#line  1975 "Frames/cs.ATG" 
 
4880
                expr.EndLocation = t.EndLocation; 
 
4881
        }
 
4882
 
 
4883
        void NewExpression(
 
4884
#line  1991 "Frames/cs.ATG" 
 
4885
out Expression pexpr) {
 
4886
 
 
4887
#line  1992 "Frames/cs.ATG" 
 
4888
                pexpr = null;
 
4889
                List<Expression> parameters = new List<Expression>();
 
4890
                TypeReference type = null;
 
4891
                Expression expr;
 
4892
                
 
4893
                Expect(89);
 
4894
                if (StartOf(10)) {
 
4895
                        NonArrayType(
 
4896
#line  1999 "Frames/cs.ATG" 
 
4897
out type);
 
4898
                }
 
4899
                if (la.kind == 16 || la.kind == 20) {
 
4900
                        if (la.kind == 20) {
 
4901
 
 
4902
#line  2005 "Frames/cs.ATG" 
 
4903
                                ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); 
 
4904
                                lexer.NextToken();
 
4905
 
 
4906
#line  2006 "Frames/cs.ATG" 
 
4907
                                if (type == null) Error("Cannot use an anonymous type with arguments for the constructor"); 
 
4908
                                if (StartOf(26)) {
 
4909
                                        Argument(
 
4910
#line  2007 "Frames/cs.ATG" 
 
4911
out expr);
 
4912
 
 
4913
#line  2007 "Frames/cs.ATG" 
 
4914
                                        SafeAdd(oce, parameters, expr); 
 
4915
                                        while (la.kind == 14) {
 
4916
                                                lexer.NextToken();
 
4917
                                                Argument(
 
4918
#line  2008 "Frames/cs.ATG" 
 
4919
out expr);
 
4920
 
 
4921
#line  2008 "Frames/cs.ATG" 
 
4922
                                                SafeAdd(oce, parameters, expr); 
 
4923
                                        }
 
4924
                                }
 
4925
                                Expect(21);
 
4926
 
 
4927
#line  2010 "Frames/cs.ATG" 
 
4928
                                pexpr = oce; 
 
4929
                                if (la.kind == 16) {
 
4930
                                        CollectionOrObjectInitializer(
 
4931
#line  2011 "Frames/cs.ATG" 
 
4932
out expr);
 
4933
 
 
4934
#line  2011 "Frames/cs.ATG" 
 
4935
                                        oce.ObjectInitializer = (CollectionInitializerExpression)expr; 
 
4936
                                }
 
4937
                        } else {
 
4938
 
 
4939
#line  2012 "Frames/cs.ATG" 
 
4940
                                ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); 
 
4941
                                CollectionOrObjectInitializer(
 
4942
#line  2013 "Frames/cs.ATG" 
 
4943
out expr);
 
4944
 
 
4945
#line  2013 "Frames/cs.ATG" 
 
4946
                                oce.ObjectInitializer = (CollectionInitializerExpression)expr; 
 
4947
 
 
4948
#line  2014 "Frames/cs.ATG" 
 
4949
                                pexpr = oce; 
 
4950
                        }
 
4951
                } else if (la.kind == 18) {
 
4952
                        lexer.NextToken();
 
4953
 
 
4954
#line  2019 "Frames/cs.ATG" 
 
4955
                        ArrayCreateExpression ace = new ArrayCreateExpression(type);
 
4956
                        /* we must not change RankSpecifier on the null type reference*/
 
4957
                        if (ace.CreateType.IsNull) { ace.CreateType = new TypeReference(""); }
 
4958
                        pexpr = ace;
 
4959
                        int dims = 0; List<int> ranks = new List<int>();
 
4960
                        
 
4961
                        if (la.kind == 14 || la.kind == 19) {
 
4962
                                while (la.kind == 14) {
 
4963
                                        lexer.NextToken();
 
4964
 
 
4965
#line  2026 "Frames/cs.ATG" 
 
4966
                                        dims += 1; 
 
4967
                                }
 
4968
                                Expect(19);
 
4969
 
 
4970
#line  2027 "Frames/cs.ATG" 
 
4971
                                ranks.Add(dims); dims = 0; 
 
4972
                                while (la.kind == 18) {
 
4973
                                        lexer.NextToken();
 
4974
                                        while (la.kind == 14) {
 
4975
                                                lexer.NextToken();
 
4976
 
 
4977
#line  2028 "Frames/cs.ATG" 
 
4978
                                                ++dims; 
 
4979
                                        }
 
4980
                                        Expect(19);
 
4981
 
 
4982
#line  2028 "Frames/cs.ATG" 
 
4983
                                        ranks.Add(dims); dims = 0; 
 
4984
                                }
 
4985
 
 
4986
#line  2029 "Frames/cs.ATG" 
 
4987
                                ace.CreateType.RankSpecifier = ranks.ToArray(); 
 
4988
                                CollectionInitializer(
 
4989
#line  2030 "Frames/cs.ATG" 
 
4990
out expr);
 
4991
 
 
4992
#line  2030 "Frames/cs.ATG" 
 
4993
                                ace.ArrayInitializer = (CollectionInitializerExpression)expr; 
 
4994
                        } else if (StartOf(6)) {
 
4995
                                Expr(
 
4996
#line  2031 "Frames/cs.ATG" 
 
4997
out expr);
 
4998
 
 
4999
#line  2031 "Frames/cs.ATG" 
 
5000
                                if (expr != null) parameters.Add(expr); 
 
5001
                                while (la.kind == 14) {
 
5002
                                        lexer.NextToken();
 
5003
 
 
5004
#line  2032 "Frames/cs.ATG" 
 
5005
                                        dims += 1; 
 
5006
                                        Expr(
 
5007
#line  2033 "Frames/cs.ATG" 
 
5008
out expr);
 
5009
 
 
5010
#line  2033 "Frames/cs.ATG" 
 
5011
                                        if (expr != null) parameters.Add(expr); 
 
5012
                                }
 
5013
                                Expect(19);
 
5014
 
 
5015
#line  2035 "Frames/cs.ATG" 
 
5016
                                ranks.Add(dims); ace.Arguments = parameters; dims = 0; 
 
5017
                                while (la.kind == 18) {
 
5018
                                        lexer.NextToken();
 
5019
                                        while (la.kind == 14) {
 
5020
                                                lexer.NextToken();
 
5021
 
 
5022
#line  2036 "Frames/cs.ATG" 
 
5023
                                                ++dims; 
 
5024
                                        }
 
5025
                                        Expect(19);
 
5026
 
 
5027
#line  2036 "Frames/cs.ATG" 
 
5028
                                        ranks.Add(dims); dims = 0; 
 
5029
                                }
 
5030
 
 
5031
#line  2037 "Frames/cs.ATG" 
 
5032
                                ace.CreateType.RankSpecifier = ranks.ToArray(); 
 
5033
                                if (la.kind == 16) {
 
5034
                                        CollectionInitializer(
 
5035
#line  2038 "Frames/cs.ATG" 
 
5036
out expr);
 
5037
 
 
5038
#line  2038 "Frames/cs.ATG" 
 
5039
                                        ace.ArrayInitializer = (CollectionInitializerExpression)expr; 
 
5040
                                }
 
5041
                        } else SynErr(212);
 
5042
                } else SynErr(213);
4709
5043
        }
4710
5044
 
4711
5045
        void AnonymousMethodExpr(
4712
 
#line  1859 "cs.ATG" 
 
5046
#line  2107 "Frames/cs.ATG" 
4713
5047
out Expression outExpr) {
4714
5048
 
4715
 
#line  1861 "cs.ATG" 
 
5049
#line  2109 "Frames/cs.ATG" 
4716
5050
                AnonymousMethodExpression expr = new AnonymousMethodExpression();
4717
5051
                expr.StartLocation = t.Location;
4718
 
                Statement stmt;
 
5052
                BlockStatement stmt;
4719
5053
                List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
4720
5054
                outExpr = expr;
4721
5055
                
4722
5056
                if (la.kind == 20) {
4723
5057
                        lexer.NextToken();
4724
 
                        if (StartOf(10)) {
 
5058
                        if (StartOf(11)) {
4725
5059
                                FormalParameterList(
4726
 
#line  1870 "cs.ATG" 
 
5060
#line  2118 "Frames/cs.ATG" 
4727
5061
p);
4728
5062
 
4729
 
#line  1870 "cs.ATG" 
 
5063
#line  2118 "Frames/cs.ATG" 
4730
5064
                                expr.Parameters = p; 
4731
5065
                        }
4732
5066
                        Expect(21);
4733
5067
 
4734
 
#line  1872 "cs.ATG" 
 
5068
#line  2120 "Frames/cs.ATG" 
4735
5069
                        expr.HasParameterList = true; 
4736
5070
                }
4737
 
 
4738
 
#line  1876 "cs.ATG" 
 
5071
                BlockInsideExpression(
 
5072
#line  2122 "Frames/cs.ATG" 
 
5073
out stmt);
 
5074
 
 
5075
#line  2122 "Frames/cs.ATG" 
 
5076
                expr.Body  = stmt; 
 
5077
 
 
5078
#line  2123 "Frames/cs.ATG" 
 
5079
                expr.EndLocation = t.Location; 
 
5080
        }
 
5081
 
 
5082
        void PointerMemberAccess(
 
5083
#line  1978 "Frames/cs.ATG" 
 
5084
out Expression expr, Expression target) {
 
5085
 
 
5086
#line  1979 "Frames/cs.ATG" 
 
5087
                List<TypeReference> typeList; 
 
5088
                Expect(47);
 
5089
                Identifier();
 
5090
 
 
5091
#line  1983 "Frames/cs.ATG" 
 
5092
                expr = new PointerReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation; 
 
5093
                if (
 
5094
#line  1984 "Frames/cs.ATG" 
 
5095
IsGenericInSimpleNameOrMemberAccess()) {
 
5096
                        TypeArgumentList(
 
5097
#line  1985 "Frames/cs.ATG" 
 
5098
out typeList, false);
 
5099
 
 
5100
#line  1986 "Frames/cs.ATG" 
 
5101
                        ((MemberReferenceExpression)expr).TypeArguments = typeList; 
 
5102
                }
 
5103
 
 
5104
#line  1988 "Frames/cs.ATG" 
 
5105
                expr.EndLocation = t.EndLocation; 
 
5106
        }
 
5107
 
 
5108
        void LambdaExpressionParameter(
 
5109
#line  2078 "Frames/cs.ATG" 
 
5110
out ParameterDeclarationExpression p) {
 
5111
 
 
5112
#line  2079 "Frames/cs.ATG" 
 
5113
                Location start = la.Location; p = null;
 
5114
                TypeReference type;
 
5115
                
 
5116
                if (
 
5117
#line  2083 "Frames/cs.ATG" 
 
5118
Peek(1).kind == Tokens.Comma || Peek(1).kind == Tokens.CloseParenthesis) {
 
5119
                        Identifier();
 
5120
 
 
5121
#line  2085 "Frames/cs.ATG" 
 
5122
                        p = new ParameterDeclarationExpression(null, t.val);
 
5123
                        p.StartLocation = start; p.EndLocation = t.EndLocation;
 
5124
                        
 
5125
                } else if (StartOf(10)) {
 
5126
                        Type(
 
5127
#line  2088 "Frames/cs.ATG" 
 
5128
out type);
 
5129
                        Identifier();
 
5130
 
 
5131
#line  2090 "Frames/cs.ATG" 
 
5132
                        p = new ParameterDeclarationExpression(type, t.val);
 
5133
                        p.StartLocation = start; p.EndLocation = t.EndLocation;
 
5134
                        
 
5135
                } else SynErr(214);
 
5136
        }
 
5137
 
 
5138
        void LambdaExpressionBody(
 
5139
#line  2096 "Frames/cs.ATG" 
 
5140
LambdaExpression lambda) {
 
5141
 
 
5142
#line  2097 "Frames/cs.ATG" 
 
5143
                Expression expr; BlockStatement stmt; 
 
5144
                if (la.kind == 16) {
 
5145
                        BlockInsideExpression(
 
5146
#line  2100 "Frames/cs.ATG" 
 
5147
out stmt);
 
5148
 
 
5149
#line  2100 "Frames/cs.ATG" 
 
5150
                        lambda.StatementBody = stmt; 
 
5151
                } else if (StartOf(6)) {
 
5152
                        Expr(
 
5153
#line  2101 "Frames/cs.ATG" 
 
5154
out expr);
 
5155
 
 
5156
#line  2101 "Frames/cs.ATG" 
 
5157
                        lambda.ExpressionBody = expr; 
 
5158
                } else SynErr(215);
 
5159
 
 
5160
#line  2103 "Frames/cs.ATG" 
 
5161
                lambda.EndLocation = t.EndLocation; 
 
5162
 
 
5163
#line  2104 "Frames/cs.ATG" 
 
5164
                lambda.ExtendedEndLocation = la.Location; 
 
5165
        }
 
5166
 
 
5167
        void BlockInsideExpression(
 
5168
#line  2126 "Frames/cs.ATG" 
 
5169
out BlockStatement outStmt) {
 
5170
 
 
5171
#line  2127 "Frames/cs.ATG" 
 
5172
                Statement stmt = null; outStmt = null; 
 
5173
 
 
5174
#line  2131 "Frames/cs.ATG" 
4739
5175
                if (compilationUnit != null) { 
4740
5176
                Block(
4741
 
#line  1877 "cs.ATG" 
 
5177
#line  2132 "Frames/cs.ATG" 
4742
5178
out stmt);
4743
5179
 
4744
 
#line  1877 "cs.ATG" 
4745
 
                expr.Body  = (BlockStatement)stmt; 
 
5180
#line  2132 "Frames/cs.ATG" 
 
5181
                outStmt = (BlockStatement)stmt; 
4746
5182
 
4747
 
#line  1878 "cs.ATG" 
 
5183
#line  2133 "Frames/cs.ATG" 
4748
5184
                } else { 
4749
5185
                Expect(16);
4750
5186
 
4751
 
#line  1880 "cs.ATG" 
 
5187
#line  2135 "Frames/cs.ATG" 
4752
5188
                lexer.SkipCurrentBlock(0); 
4753
5189
                Expect(17);
4754
5190
 
4755
 
#line  1882 "cs.ATG" 
 
5191
#line  2137 "Frames/cs.ATG" 
4756
5192
                } 
4757
 
 
4758
 
#line  1883 "cs.ATG" 
4759
 
                expr.EndLocation = t.Location; 
4760
 
        }
4761
 
 
4762
 
        void TypeArgumentList(
4763
 
#line  2056 "cs.ATG" 
4764
 
out List<TypeReference> types, bool canBeUnbound) {
4765
 
 
4766
 
#line  2058 "cs.ATG" 
4767
 
                types = new List<TypeReference>();
4768
 
                TypeReference type = null;
4769
 
                
4770
 
                Expect(23);
4771
 
                if (
4772
 
#line  2063 "cs.ATG" 
4773
 
canBeUnbound && (la.kind == Tokens.GreaterThan || la.kind == Tokens.Comma)) {
4774
 
 
4775
 
#line  2064 "cs.ATG" 
4776
 
                        types.Add(TypeReference.Null); 
4777
 
                        while (la.kind == 14) {
4778
 
                                lexer.NextToken();
4779
 
 
4780
 
#line  2065 "cs.ATG" 
4781
 
                                types.Add(TypeReference.Null); 
4782
 
                        }
4783
 
                } else if (StartOf(9)) {
4784
 
                        Type(
4785
 
#line  2066 "cs.ATG" 
4786
 
out type);
4787
 
 
4788
 
#line  2066 "cs.ATG" 
4789
 
                        if (type != null) { types.Add(type); } 
4790
 
                        while (la.kind == 14) {
4791
 
                                lexer.NextToken();
4792
 
                                Type(
4793
 
#line  2067 "cs.ATG" 
4794
 
out type);
4795
 
 
4796
 
#line  2067 "cs.ATG" 
4797
 
                                if (type != null) { types.Add(type); } 
4798
 
                        }
4799
 
                } else SynErr(186);
4800
 
                Expect(22);
4801
5193
        }
4802
5194
 
4803
5195
        void ConditionalAndExpr(
4804
 
#line  1892 "cs.ATG" 
 
5196
#line  2146 "Frames/cs.ATG" 
4805
5197
ref Expression outExpr) {
4806
5198
 
4807
 
#line  1893 "cs.ATG" 
 
5199
#line  2147 "Frames/cs.ATG" 
4808
5200
                Expression expr; 
4809
5201
                InclusiveOrExpr(
4810
 
#line  1895 "cs.ATG" 
 
5202
#line  2149 "Frames/cs.ATG" 
4811
5203
ref outExpr);
4812
5204
                while (la.kind == 25) {
4813
5205
                        lexer.NextToken();
4814
5206
                        UnaryExpr(
4815
 
#line  1895 "cs.ATG" 
 
5207
#line  2149 "Frames/cs.ATG" 
4816
5208
out expr);
4817
5209
                        InclusiveOrExpr(
4818
 
#line  1895 "cs.ATG" 
 
5210
#line  2149 "Frames/cs.ATG" 
4819
5211
ref expr);
4820
5212
 
4821
 
#line  1895 "cs.ATG" 
 
5213
#line  2149 "Frames/cs.ATG" 
4822
5214
                        outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr);  
4823
5215
                }
4824
5216
        }
4825
5217
 
4826
5218
        void InclusiveOrExpr(
4827
 
#line  1898 "cs.ATG" 
 
5219
#line  2152 "Frames/cs.ATG" 
4828
5220
ref Expression outExpr) {
4829
5221
 
4830
 
#line  1899 "cs.ATG" 
 
5222
#line  2153 "Frames/cs.ATG" 
4831
5223
                Expression expr; 
4832
5224
                ExclusiveOrExpr(
4833
 
#line  1901 "cs.ATG" 
 
5225
#line  2155 "Frames/cs.ATG" 
4834
5226
ref outExpr);
4835
5227
                while (la.kind == 29) {
4836
5228
                        lexer.NextToken();
4837
5229
                        UnaryExpr(
4838
 
#line  1901 "cs.ATG" 
 
5230
#line  2155 "Frames/cs.ATG" 
4839
5231
out expr);
4840
5232
                        ExclusiveOrExpr(
4841
 
#line  1901 "cs.ATG" 
 
5233
#line  2155 "Frames/cs.ATG" 
4842
5234
ref expr);
4843
5235
 
4844
 
#line  1901 "cs.ATG" 
 
5236
#line  2155 "Frames/cs.ATG" 
4845
5237
                        outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);  
4846
5238
                }
4847
5239
        }
4848
5240
 
4849
5241
        void ExclusiveOrExpr(
4850
 
#line  1904 "cs.ATG" 
 
5242
#line  2158 "Frames/cs.ATG" 
4851
5243
ref Expression outExpr) {
4852
5244
 
4853
 
#line  1905 "cs.ATG" 
 
5245
#line  2159 "Frames/cs.ATG" 
4854
5246
                Expression expr; 
4855
5247
                AndExpr(
4856
 
#line  1907 "cs.ATG" 
 
5248
#line  2161 "Frames/cs.ATG" 
4857
5249
ref outExpr);
4858
5250
                while (la.kind == 30) {
4859
5251
                        lexer.NextToken();
4860
5252
                        UnaryExpr(
4861
 
#line  1907 "cs.ATG" 
 
5253
#line  2161 "Frames/cs.ATG" 
4862
5254
out expr);
4863
5255
                        AndExpr(
4864
 
#line  1907 "cs.ATG" 
 
5256
#line  2161 "Frames/cs.ATG" 
4865
5257
ref expr);
4866
5258
 
4867
 
#line  1907 "cs.ATG" 
 
5259
#line  2161 "Frames/cs.ATG" 
4868
5260
                        outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);  
4869
5261
                }
4870
5262
        }
4871
5263
 
4872
5264
        void AndExpr(
4873
 
#line  1910 "cs.ATG" 
 
5265
#line  2164 "Frames/cs.ATG" 
4874
5266
ref Expression outExpr) {
4875
5267
 
4876
 
#line  1911 "cs.ATG" 
 
5268
#line  2165 "Frames/cs.ATG" 
4877
5269
                Expression expr; 
4878
5270
                EqualityExpr(
4879
 
#line  1913 "cs.ATG" 
 
5271
#line  2167 "Frames/cs.ATG" 
4880
5272
ref outExpr);
4881
5273
                while (la.kind == 28) {
4882
5274
                        lexer.NextToken();
4883
5275
                        UnaryExpr(
4884
 
#line  1913 "cs.ATG" 
 
5276
#line  2167 "Frames/cs.ATG" 
4885
5277
out expr);
4886
5278
                        EqualityExpr(
4887
 
#line  1913 "cs.ATG" 
 
5279
#line  2167 "Frames/cs.ATG" 
4888
5280
ref expr);
4889
5281
 
4890
 
#line  1913 "cs.ATG" 
 
5282
#line  2167 "Frames/cs.ATG" 
4891
5283
                        outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);  
4892
5284
                }
4893
5285
        }
4894
5286
 
4895
5287
        void EqualityExpr(
4896
 
#line  1916 "cs.ATG" 
 
5288
#line  2170 "Frames/cs.ATG" 
4897
5289
ref Expression outExpr) {
4898
5290
 
4899
 
#line  1918 "cs.ATG" 
 
5291
#line  2172 "Frames/cs.ATG" 
4900
5292
                Expression expr;
4901
5293
                BinaryOperatorType op = BinaryOperatorType.None;
4902
5294
                
4903
5295
                RelationalExpr(
4904
 
#line  1922 "cs.ATG" 
 
5296
#line  2176 "Frames/cs.ATG" 
4905
5297
ref outExpr);
4906
5298
                while (la.kind == 33 || la.kind == 34) {
4907
5299
                        if (la.kind == 34) {
4908
5300
                                lexer.NextToken();
4909
5301
 
4910
 
#line  1925 "cs.ATG" 
 
5302
#line  2179 "Frames/cs.ATG" 
4911
5303
                                op = BinaryOperatorType.InEquality; 
4912
5304
                        } else {
4913
5305
                                lexer.NextToken();
4914
5306
 
4915
 
#line  1926 "cs.ATG" 
 
5307
#line  2180 "Frames/cs.ATG" 
4916
5308
                                op = BinaryOperatorType.Equality; 
4917
5309
                        }
4918
5310
                        UnaryExpr(
4919
 
#line  1928 "cs.ATG" 
 
5311
#line  2182 "Frames/cs.ATG" 
4920
5312
out expr);
4921
5313
                        RelationalExpr(
4922
 
#line  1928 "cs.ATG" 
 
5314
#line  2182 "Frames/cs.ATG" 
4923
5315
ref expr);
4924
5316
 
4925
 
#line  1928 "cs.ATG" 
 
5317
#line  2182 "Frames/cs.ATG" 
4926
5318
                        outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
4927
5319
                }
4928
5320
        }
4929
5321
 
4930
5322
        void RelationalExpr(
4931
 
#line  1932 "cs.ATG" 
 
5323
#line  2186 "Frames/cs.ATG" 
4932
5324
ref Expression outExpr) {
4933
5325
 
4934
 
#line  1934 "cs.ATG" 
 
5326
#line  2188 "Frames/cs.ATG" 
4935
5327
                TypeReference type;
4936
5328
                Expression expr;
4937
5329
                BinaryOperatorType op = BinaryOperatorType.None;
4938
5330
                
4939
5331
                ShiftExpr(
4940
 
#line  1939 "cs.ATG" 
 
5332
#line  2193 "Frames/cs.ATG" 
4941
5333
ref outExpr);
4942
 
                while (StartOf(30)) {
4943
 
                        if (StartOf(31)) {
 
5334
                while (StartOf(37)) {
 
5335
                        if (StartOf(38)) {
4944
5336
                                if (la.kind == 23) {
4945
5337
                                        lexer.NextToken();
4946
5338
 
4947
 
#line  1941 "cs.ATG" 
 
5339
#line  2195 "Frames/cs.ATG" 
4948
5340
                                        op = BinaryOperatorType.LessThan; 
4949
5341
                                } else if (la.kind == 22) {
4950
5342
                                        lexer.NextToken();
4951
5343
 
4952
 
#line  1942 "cs.ATG" 
 
5344
#line  2196 "Frames/cs.ATG" 
4953
5345
                                        op = BinaryOperatorType.GreaterThan; 
4954
5346
                                } else if (la.kind == 36) {
4955
5347
                                        lexer.NextToken();
4956
5348
 
4957
 
#line  1943 "cs.ATG" 
 
5349
#line  2197 "Frames/cs.ATG" 
4958
5350
                                        op = BinaryOperatorType.LessThanOrEqual; 
4959
5351
                                } else if (la.kind == 35) {
4960
5352
                                        lexer.NextToken();
4961
5353
 
4962
 
#line  1944 "cs.ATG" 
 
5354
#line  2198 "Frames/cs.ATG" 
4963
5355
                                        op = BinaryOperatorType.GreaterThanOrEqual; 
4964
 
                                } else SynErr(187);
 
5356
                                } else SynErr(216);
4965
5357
                                UnaryExpr(
4966
 
#line  1946 "cs.ATG" 
 
5358
#line  2200 "Frames/cs.ATG" 
4967
5359
out expr);
4968
5360
                                ShiftExpr(
4969
 
#line  1947 "cs.ATG" 
 
5361
#line  2201 "Frames/cs.ATG" 
4970
5362
ref expr);
4971
5363
 
4972
 
#line  1948 "cs.ATG" 
 
5364
#line  2202 "Frames/cs.ATG" 
4973
5365
                                outExpr = new BinaryOperatorExpression(outExpr, op, expr); 
4974
5366
                        } else {
4975
 
                                if (la.kind == 84) {
 
5367
                                if (la.kind == 85) {
4976
5368
                                        lexer.NextToken();
4977
5369
                                        TypeWithRestriction(
4978
 
#line  1951 "cs.ATG" 
 
5370
#line  2205 "Frames/cs.ATG" 
4979
5371
out type, false, false);
4980
5372
                                        if (
4981
 
#line  1952 "cs.ATG" 
4982
 
la.kind == Tokens.Question && Tokens.CastFollower[Peek(1).kind] == false) {
 
5373
#line  2206 "Frames/cs.ATG" 
 
5374
la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) {
4983
5375
                                                NullableQuestionMark(
4984
 
#line  1953 "cs.ATG" 
 
5376
#line  2207 "Frames/cs.ATG" 
4985
5377
ref type);
4986
5378
                                        }
4987
5379
 
4988
 
#line  1954 "cs.ATG" 
 
5380
#line  2208 "Frames/cs.ATG" 
4989
5381
                                        outExpr = new TypeOfIsExpression(outExpr, type); 
4990
 
                                } else if (la.kind == 49) {
 
5382
                                } else if (la.kind == 50) {
4991
5383
                                        lexer.NextToken();
4992
5384
                                        TypeWithRestriction(
4993
 
#line  1956 "cs.ATG" 
 
5385
#line  2210 "Frames/cs.ATG" 
4994
5386
out type, false, false);
4995
5387
                                        if (
4996
 
#line  1957 "cs.ATG" 
4997
 
la.kind == Tokens.Question && Tokens.CastFollower[Peek(1).kind] == false) {
 
5388
#line  2211 "Frames/cs.ATG" 
 
5389
la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) {
4998
5390
                                                NullableQuestionMark(
4999
 
#line  1958 "cs.ATG" 
 
5391
#line  2212 "Frames/cs.ATG" 
5000
5392
ref type);
5001
5393
                                        }
5002
5394
 
5003
 
#line  1959 "cs.ATG" 
 
5395
#line  2213 "Frames/cs.ATG" 
5004
5396
                                        outExpr = new CastExpression(type, outExpr, CastType.TryCast); 
5005
 
                                } else SynErr(188);
 
5397
                                } else SynErr(217);
5006
5398
                        }
5007
5399
                }
5008
5400
        }
5009
5401
 
5010
5402
        void ShiftExpr(
5011
 
#line  1964 "cs.ATG" 
 
5403
#line  2218 "Frames/cs.ATG" 
5012
5404
ref Expression outExpr) {
5013
5405
 
5014
 
#line  1966 "cs.ATG" 
 
5406
#line  2220 "Frames/cs.ATG" 
5015
5407
                Expression expr;
5016
5408
                BinaryOperatorType op = BinaryOperatorType.None;
5017
5409
                
5018
5410
                AdditiveExpr(
5019
 
#line  1970 "cs.ATG" 
 
5411
#line  2224 "Frames/cs.ATG" 
5020
5412
ref outExpr);
5021
5413
                while (la.kind == 37 || 
5022
 
#line  1973 "cs.ATG" 
 
5414
#line  2227 "Frames/cs.ATG" 
5023
5415
IsShiftRight()) {
5024
5416
                        if (la.kind == 37) {
5025
5417
                                lexer.NextToken();
5026
5418
 
5027
 
#line  1972 "cs.ATG" 
 
5419
#line  2226 "Frames/cs.ATG" 
5028
5420
                                op = BinaryOperatorType.ShiftLeft; 
5029
5421
                        } else {
5030
5422
                                Expect(22);
5031
5423
                                Expect(22);
5032
5424
 
5033
 
#line  1974 "cs.ATG" 
 
5425
#line  2228 "Frames/cs.ATG" 
5034
5426
                                op = BinaryOperatorType.ShiftRight; 
5035
5427
                        }
5036
5428
                        UnaryExpr(
5037
 
#line  1977 "cs.ATG" 
 
5429
#line  2231 "Frames/cs.ATG" 
5038
5430
out expr);
5039
5431
                        AdditiveExpr(
5040
 
#line  1977 "cs.ATG" 
 
5432
#line  2231 "Frames/cs.ATG" 
5041
5433
ref expr);
5042
5434
 
5043
 
#line  1977 "cs.ATG" 
 
5435
#line  2231 "Frames/cs.ATG" 
5044
5436
                        outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
5045
5437
                }
5046
5438
        }
5047
5439
 
5048
5440
        void AdditiveExpr(
5049
 
#line  1981 "cs.ATG" 
 
5441
#line  2235 "Frames/cs.ATG" 
5050
5442
ref Expression outExpr) {
5051
5443
 
5052
 
#line  1983 "cs.ATG" 
 
5444
#line  2237 "Frames/cs.ATG" 
5053
5445
                Expression expr;
5054
5446
                BinaryOperatorType op = BinaryOperatorType.None;
5055
5447
                
5056
5448
                MultiplicativeExpr(
5057
 
#line  1987 "cs.ATG" 
 
5449
#line  2241 "Frames/cs.ATG" 
5058
5450
ref outExpr);
5059
5451
                while (la.kind == 4 || la.kind == 5) {
5060
5452
                        if (la.kind == 4) {
5061
5453
                                lexer.NextToken();
5062
5454
 
5063
 
#line  1990 "cs.ATG" 
 
5455
#line  2244 "Frames/cs.ATG" 
5064
5456
                                op = BinaryOperatorType.Add; 
5065
5457
                        } else {
5066
5458
                                lexer.NextToken();
5067
5459
 
5068
 
#line  1991 "cs.ATG" 
 
5460
#line  2245 "Frames/cs.ATG" 
5069
5461
                                op = BinaryOperatorType.Subtract; 
5070
5462
                        }
5071
5463
                        UnaryExpr(
5072
 
#line  1993 "cs.ATG" 
 
5464
#line  2247 "Frames/cs.ATG" 
5073
5465
out expr);
5074
5466
                        MultiplicativeExpr(
5075
 
#line  1993 "cs.ATG" 
 
5467
#line  2247 "Frames/cs.ATG" 
5076
5468
ref expr);
5077
5469
 
5078
 
#line  1993 "cs.ATG" 
 
5470
#line  2247 "Frames/cs.ATG" 
5079
5471
                        outExpr = new BinaryOperatorExpression(outExpr, op, expr);  
5080
5472
                }
5081
5473
        }
5082
5474
 
5083
5475
        void MultiplicativeExpr(
5084
 
#line  1997 "cs.ATG" 
 
5476
#line  2251 "Frames/cs.ATG" 
5085
5477
ref Expression outExpr) {
5086
5478
 
5087
 
#line  1999 "cs.ATG" 
 
5479
#line  2253 "Frames/cs.ATG" 
5088
5480
                Expression expr;
5089
5481
                BinaryOperatorType op = BinaryOperatorType.None;
5090
5482
                
5092
5484
                        if (la.kind == 6) {
5093
5485
                                lexer.NextToken();
5094
5486
 
5095
 
#line  2005 "cs.ATG" 
 
5487
#line  2259 "Frames/cs.ATG" 
5096
5488
                                op = BinaryOperatorType.Multiply; 
5097
5489
                        } else if (la.kind == 7) {
5098
5490
                                lexer.NextToken();
5099
5491
 
5100
 
#line  2006 "cs.ATG" 
 
5492
#line  2260 "Frames/cs.ATG" 
5101
5493
                                op = BinaryOperatorType.Divide; 
5102
5494
                        } else {
5103
5495
                                lexer.NextToken();
5104
5496
 
5105
 
#line  2007 "cs.ATG" 
 
5497
#line  2261 "Frames/cs.ATG" 
5106
5498
                                op = BinaryOperatorType.Modulus; 
5107
5499
                        }
5108
5500
                        UnaryExpr(
5109
 
#line  2009 "cs.ATG" 
 
5501
#line  2263 "Frames/cs.ATG" 
5110
5502
out expr);
5111
5503
 
5112
 
#line  2009 "cs.ATG" 
 
5504
#line  2263 "Frames/cs.ATG" 
5113
5505
                        outExpr = new BinaryOperatorExpression(outExpr, op, expr); 
5114
5506
                }
5115
5507
        }
5116
5508
 
5117
5509
        void TypeParameterConstraintsClauseBase(
5118
 
#line  2113 "cs.ATG" 
 
5510
#line  2369 "Frames/cs.ATG" 
5119
5511
out TypeReference type) {
5120
5512
 
5121
 
#line  2114 "cs.ATG" 
 
5513
#line  2370 "Frames/cs.ATG" 
5122
5514
                TypeReference t; type = null; 
5123
 
                if (la.kind == 108) {
 
5515
                if (la.kind == 109) {
5124
5516
                        lexer.NextToken();
5125
5517
 
5126
 
#line  2116 "cs.ATG" 
 
5518
#line  2372 "Frames/cs.ATG" 
5127
5519
                        type = TypeReference.StructConstraint; 
5128
 
                } else if (la.kind == 58) {
 
5520
                } else if (la.kind == 59) {
5129
5521
                        lexer.NextToken();
5130
5522
 
5131
 
#line  2117 "cs.ATG" 
 
5523
#line  2373 "Frames/cs.ATG" 
5132
5524
                        type = TypeReference.ClassConstraint; 
5133
 
                } else if (la.kind == 88) {
 
5525
                } else if (la.kind == 89) {
5134
5526
                        lexer.NextToken();
5135
5527
                        Expect(20);
5136
5528
                        Expect(21);
5137
5529
 
5138
 
#line  2118 "cs.ATG" 
 
5530
#line  2374 "Frames/cs.ATG" 
5139
5531
                        type = TypeReference.NewConstraint; 
5140
 
                } else if (StartOf(9)) {
 
5532
                } else if (StartOf(10)) {
5141
5533
                        Type(
5142
 
#line  2119 "cs.ATG" 
 
5534
#line  2375 "Frames/cs.ATG" 
5143
5535
out t);
5144
5536
 
5145
 
#line  2119 "cs.ATG" 
 
5537
#line  2375 "Frames/cs.ATG" 
5146
5538
                        type = t; 
5147
 
                } else SynErr(189);
 
5539
                } else SynErr(218);
 
5540
        }
 
5541
 
 
5542
        void QueryExpressionFromClause(
 
5543
#line  2388 "Frames/cs.ATG" 
 
5544
out QueryExpressionFromClause fc) {
 
5545
 
 
5546
#line  2389 "Frames/cs.ATG" 
 
5547
                fc = new QueryExpressionFromClause(); fc.StartLocation = la.Location; 
 
5548
                
 
5549
                Expect(137);
 
5550
                QueryExpressionFromOrJoinClause(
 
5551
#line  2393 "Frames/cs.ATG" 
 
5552
fc);
 
5553
 
 
5554
#line  2394 "Frames/cs.ATG" 
 
5555
                fc.EndLocation = t.EndLocation; 
 
5556
        }
 
5557
 
 
5558
        void QueryExpressionBody(
 
5559
#line  2424 "Frames/cs.ATG" 
 
5560
QueryExpression q) {
 
5561
 
 
5562
#line  2425 "Frames/cs.ATG" 
 
5563
                QueryExpressionFromClause fromClause;     QueryExpressionWhereClause whereClause;
 
5564
                QueryExpressionLetClause letClause;       QueryExpressionJoinClause joinClause;
 
5565
                QueryExpressionOrderClause orderClause;
 
5566
                QueryExpressionSelectClause selectClause; QueryExpressionGroupClause groupClause;
 
5567
                QueryExpressionIntoClause intoClause;
 
5568
                
 
5569
                while (StartOf(39)) {
 
5570
                        if (la.kind == 137) {
 
5571
                                QueryExpressionFromClause(
 
5572
#line  2432 "Frames/cs.ATG" 
 
5573
out fromClause);
 
5574
 
 
5575
#line  2432 "Frames/cs.ATG" 
 
5576
                                SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, fromClause); 
 
5577
                        } else if (la.kind == 127) {
 
5578
                                QueryExpressionWhereClause(
 
5579
#line  2433 "Frames/cs.ATG" 
 
5580
out whereClause);
 
5581
 
 
5582
#line  2433 "Frames/cs.ATG" 
 
5583
                                SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, whereClause); 
 
5584
                        } else if (la.kind == 141) {
 
5585
                                QueryExpressionLetClause(
 
5586
#line  2434 "Frames/cs.ATG" 
 
5587
out letClause);
 
5588
 
 
5589
#line  2434 "Frames/cs.ATG" 
 
5590
                                SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, letClause); 
 
5591
                        } else if (la.kind == 142) {
 
5592
                                QueryExpressionJoinClause(
 
5593
#line  2435 "Frames/cs.ATG" 
 
5594
out joinClause);
 
5595
 
 
5596
#line  2435 "Frames/cs.ATG" 
 
5597
                                SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, joinClause); 
 
5598
                        } else {
 
5599
                                QueryExpressionOrderByClause(
 
5600
#line  2436 "Frames/cs.ATG" 
 
5601
out orderClause);
 
5602
 
 
5603
#line  2436 "Frames/cs.ATG" 
 
5604
                                SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, orderClause); 
 
5605
                        }
 
5606
                }
 
5607
                if (la.kind == 133) {
 
5608
                        QueryExpressionSelectClause(
 
5609
#line  2438 "Frames/cs.ATG" 
 
5610
out selectClause);
 
5611
 
 
5612
#line  2438 "Frames/cs.ATG" 
 
5613
                        q.SelectOrGroupClause = selectClause; 
 
5614
                } else if (la.kind == 134) {
 
5615
                        QueryExpressionGroupClause(
 
5616
#line  2439 "Frames/cs.ATG" 
 
5617
out groupClause);
 
5618
 
 
5619
#line  2439 "Frames/cs.ATG" 
 
5620
                        q.SelectOrGroupClause = groupClause; 
 
5621
                } else SynErr(219);
 
5622
                if (la.kind == 136) {
 
5623
                        QueryExpressionIntoClause(
 
5624
#line  2441 "Frames/cs.ATG" 
 
5625
out intoClause);
 
5626
 
 
5627
#line  2441 "Frames/cs.ATG" 
 
5628
                        q.IntoClause = intoClause; 
 
5629
                }
 
5630
        }
 
5631
 
 
5632
        void QueryExpressionFromOrJoinClause(
 
5633
#line  2414 "Frames/cs.ATG" 
 
5634
QueryExpressionFromOrJoinClause fjc) {
 
5635
 
 
5636
#line  2415 "Frames/cs.ATG" 
 
5637
                TypeReference type; Expression expr; 
 
5638
 
 
5639
#line  2417 "Frames/cs.ATG" 
 
5640
                fjc.Type = null; 
 
5641
                if (
 
5642
#line  2418 "Frames/cs.ATG" 
 
5643
IsLocalVarDecl()) {
 
5644
                        Type(
 
5645
#line  2418 "Frames/cs.ATG" 
 
5646
out type);
 
5647
 
 
5648
#line  2418 "Frames/cs.ATG" 
 
5649
                        fjc.Type = type; 
 
5650
                }
 
5651
                Identifier();
 
5652
 
 
5653
#line  2419 "Frames/cs.ATG" 
 
5654
                fjc.Identifier = t.val; 
 
5655
                Expect(81);
 
5656
                Expr(
 
5657
#line  2421 "Frames/cs.ATG" 
 
5658
out expr);
 
5659
 
 
5660
#line  2421 "Frames/cs.ATG" 
 
5661
                fjc.InExpression = expr; 
 
5662
        }
 
5663
 
 
5664
        void QueryExpressionJoinClause(
 
5665
#line  2397 "Frames/cs.ATG" 
 
5666
out QueryExpressionJoinClause jc) {
 
5667
 
 
5668
#line  2398 "Frames/cs.ATG" 
 
5669
                jc = new QueryExpressionJoinClause(); jc.StartLocation = la.Location; 
 
5670
                Expression expr;
 
5671
                
 
5672
                Expect(142);
 
5673
                QueryExpressionFromOrJoinClause(
 
5674
#line  2403 "Frames/cs.ATG" 
 
5675
jc);
 
5676
                Expect(143);
 
5677
                Expr(
 
5678
#line  2405 "Frames/cs.ATG" 
 
5679
out expr);
 
5680
 
 
5681
#line  2405 "Frames/cs.ATG" 
 
5682
                jc.OnExpression = expr; 
 
5683
                Expect(144);
 
5684
                Expr(
 
5685
#line  2407 "Frames/cs.ATG" 
 
5686
out expr);
 
5687
 
 
5688
#line  2407 "Frames/cs.ATG" 
 
5689
                jc.EqualsExpression = expr; 
 
5690
                if (la.kind == 136) {
 
5691
                        lexer.NextToken();
 
5692
                        Identifier();
 
5693
 
 
5694
#line  2409 "Frames/cs.ATG" 
 
5695
                        jc.IntoIdentifier = t.val; 
 
5696
                }
 
5697
 
 
5698
#line  2411 "Frames/cs.ATG" 
 
5699
                jc.EndLocation = t.EndLocation; 
 
5700
        }
 
5701
 
 
5702
        void QueryExpressionWhereClause(
 
5703
#line  2444 "Frames/cs.ATG" 
 
5704
out QueryExpressionWhereClause wc) {
 
5705
 
 
5706
#line  2445 "Frames/cs.ATG" 
 
5707
                Expression expr; wc = new QueryExpressionWhereClause(); wc.StartLocation = la.Location; 
 
5708
                Expect(127);
 
5709
                Expr(
 
5710
#line  2448 "Frames/cs.ATG" 
 
5711
out expr);
 
5712
 
 
5713
#line  2448 "Frames/cs.ATG" 
 
5714
                wc.Condition = expr; 
 
5715
 
 
5716
#line  2449 "Frames/cs.ATG" 
 
5717
                wc.EndLocation = t.EndLocation; 
 
5718
        }
 
5719
 
 
5720
        void QueryExpressionLetClause(
 
5721
#line  2452 "Frames/cs.ATG" 
 
5722
out QueryExpressionLetClause wc) {
 
5723
 
 
5724
#line  2453 "Frames/cs.ATG" 
 
5725
                Expression expr; wc = new QueryExpressionLetClause(); wc.StartLocation = la.Location; 
 
5726
                Expect(141);
 
5727
                Identifier();
 
5728
 
 
5729
#line  2456 "Frames/cs.ATG" 
 
5730
                wc.Identifier = t.val; 
 
5731
                Expect(3);
 
5732
                Expr(
 
5733
#line  2458 "Frames/cs.ATG" 
 
5734
out expr);
 
5735
 
 
5736
#line  2458 "Frames/cs.ATG" 
 
5737
                wc.Expression = expr; 
 
5738
 
 
5739
#line  2459 "Frames/cs.ATG" 
 
5740
                wc.EndLocation = t.EndLocation; 
 
5741
        }
 
5742
 
 
5743
        void QueryExpressionOrderByClause(
 
5744
#line  2462 "Frames/cs.ATG" 
 
5745
out QueryExpressionOrderClause oc) {
 
5746
 
 
5747
#line  2463 "Frames/cs.ATG" 
 
5748
                QueryExpressionOrdering ordering; oc = new QueryExpressionOrderClause(); oc.StartLocation = la.Location; 
 
5749
                Expect(140);
 
5750
                QueryExpressionOrdering(
 
5751
#line  2466 "Frames/cs.ATG" 
 
5752
out ordering);
 
5753
 
 
5754
#line  2466 "Frames/cs.ATG" 
 
5755
                SafeAdd(oc, oc.Orderings, ordering); 
 
5756
                while (la.kind == 14) {
 
5757
                        lexer.NextToken();
 
5758
                        QueryExpressionOrdering(
 
5759
#line  2468 "Frames/cs.ATG" 
 
5760
out ordering);
 
5761
 
 
5762
#line  2468 "Frames/cs.ATG" 
 
5763
                        SafeAdd(oc, oc.Orderings, ordering); 
 
5764
                }
 
5765
 
 
5766
#line  2470 "Frames/cs.ATG" 
 
5767
                oc.EndLocation = t.EndLocation; 
 
5768
        }
 
5769
 
 
5770
        void QueryExpressionSelectClause(
 
5771
#line  2483 "Frames/cs.ATG" 
 
5772
out QueryExpressionSelectClause sc) {
 
5773
 
 
5774
#line  2484 "Frames/cs.ATG" 
 
5775
                Expression expr; sc = new QueryExpressionSelectClause(); sc.StartLocation = la.Location; 
 
5776
                Expect(133);
 
5777
                Expr(
 
5778
#line  2487 "Frames/cs.ATG" 
 
5779
out expr);
 
5780
 
 
5781
#line  2487 "Frames/cs.ATG" 
 
5782
                sc.Projection = expr; 
 
5783
 
 
5784
#line  2488 "Frames/cs.ATG" 
 
5785
                sc.EndLocation = t.EndLocation; 
 
5786
        }
 
5787
 
 
5788
        void QueryExpressionGroupClause(
 
5789
#line  2491 "Frames/cs.ATG" 
 
5790
out QueryExpressionGroupClause gc) {
 
5791
 
 
5792
#line  2492 "Frames/cs.ATG" 
 
5793
                Expression expr; gc = new QueryExpressionGroupClause(); gc.StartLocation = la.Location; 
 
5794
                Expect(134);
 
5795
                Expr(
 
5796
#line  2495 "Frames/cs.ATG" 
 
5797
out expr);
 
5798
 
 
5799
#line  2495 "Frames/cs.ATG" 
 
5800
                gc.Projection = expr; 
 
5801
                Expect(135);
 
5802
                Expr(
 
5803
#line  2497 "Frames/cs.ATG" 
 
5804
out expr);
 
5805
 
 
5806
#line  2497 "Frames/cs.ATG" 
 
5807
                gc.GroupBy = expr; 
 
5808
 
 
5809
#line  2498 "Frames/cs.ATG" 
 
5810
                gc.EndLocation = t.EndLocation; 
 
5811
        }
 
5812
 
 
5813
        void QueryExpressionIntoClause(
 
5814
#line  2501 "Frames/cs.ATG" 
 
5815
out QueryExpressionIntoClause ic) {
 
5816
 
 
5817
#line  2502 "Frames/cs.ATG" 
 
5818
                ic = new QueryExpressionIntoClause(); ic.StartLocation = la.Location; 
 
5819
                Expect(136);
 
5820
                Identifier();
 
5821
 
 
5822
#line  2505 "Frames/cs.ATG" 
 
5823
                ic.IntoIdentifier = t.val; 
 
5824
 
 
5825
#line  2506 "Frames/cs.ATG" 
 
5826
                ic.ContinuedQuery = new QueryExpression(); 
 
5827
 
 
5828
#line  2507 "Frames/cs.ATG" 
 
5829
                ic.ContinuedQuery.StartLocation = la.Location; 
 
5830
                QueryExpressionBody(
 
5831
#line  2508 "Frames/cs.ATG" 
 
5832
ic.ContinuedQuery);
 
5833
 
 
5834
#line  2509 "Frames/cs.ATG" 
 
5835
                ic.ContinuedQuery.EndLocation = t.EndLocation; 
 
5836
 
 
5837
#line  2510 "Frames/cs.ATG" 
 
5838
                ic.EndLocation = t.EndLocation; 
 
5839
        }
 
5840
 
 
5841
        void QueryExpressionOrdering(
 
5842
#line  2473 "Frames/cs.ATG" 
 
5843
out QueryExpressionOrdering ordering) {
 
5844
 
 
5845
#line  2474 "Frames/cs.ATG" 
 
5846
                Expression expr; ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location; 
 
5847
                Expr(
 
5848
#line  2476 "Frames/cs.ATG" 
 
5849
out expr);
 
5850
 
 
5851
#line  2476 "Frames/cs.ATG" 
 
5852
                ordering.Criteria = expr; 
 
5853
                if (la.kind == 138 || la.kind == 139) {
 
5854
                        if (la.kind == 138) {
 
5855
                                lexer.NextToken();
 
5856
 
 
5857
#line  2477 "Frames/cs.ATG" 
 
5858
                                ordering.Direction = QueryExpressionOrderingDirection.Ascending; 
 
5859
                        } else {
 
5860
                                lexer.NextToken();
 
5861
 
 
5862
#line  2478 "Frames/cs.ATG" 
 
5863
                                ordering.Direction = QueryExpressionOrderingDirection.Descending; 
 
5864
                        }
 
5865
                }
 
5866
 
 
5867
#line  2480 "Frames/cs.ATG" 
 
5868
                ordering.EndLocation = t.EndLocation; 
5148
5869
        }
5149
5870
 
5150
5871
 
5207
5928
                        case 45: s = "\"^=\" expected"; break;
5208
5929
                        case 46: s = "\"<<=\" expected"; break;
5209
5930
                        case 47: s = "\"->\" expected"; break;
5210
 
                        case 48: s = "\"abstract\" expected"; break;
5211
 
                        case 49: s = "\"as\" expected"; break;
5212
 
                        case 50: s = "\"base\" expected"; break;
5213
 
                        case 51: s = "\"bool\" expected"; break;
5214
 
                        case 52: s = "\"break\" expected"; break;
5215
 
                        case 53: s = "\"byte\" expected"; break;
5216
 
                        case 54: s = "\"case\" expected"; break;
5217
 
                        case 55: s = "\"catch\" expected"; break;
5218
 
                        case 56: s = "\"char\" expected"; break;
5219
 
                        case 57: s = "\"checked\" expected"; break;
5220
 
                        case 58: s = "\"class\" expected"; break;
5221
 
                        case 59: s = "\"const\" expected"; break;
5222
 
                        case 60: s = "\"continue\" expected"; break;
5223
 
                        case 61: s = "\"decimal\" expected"; break;
5224
 
                        case 62: s = "\"default\" expected"; break;
5225
 
                        case 63: s = "\"delegate\" expected"; break;
5226
 
                        case 64: s = "\"do\" expected"; break;
5227
 
                        case 65: s = "\"double\" expected"; break;
5228
 
                        case 66: s = "\"else\" expected"; break;
5229
 
                        case 67: s = "\"enum\" expected"; break;
5230
 
                        case 68: s = "\"event\" expected"; break;
5231
 
                        case 69: s = "\"explicit\" expected"; break;
5232
 
                        case 70: s = "\"extern\" expected"; break;
5233
 
                        case 71: s = "\"false\" expected"; break;
5234
 
                        case 72: s = "\"finally\" expected"; break;
5235
 
                        case 73: s = "\"fixed\" expected"; break;
5236
 
                        case 74: s = "\"float\" expected"; break;
5237
 
                        case 75: s = "\"for\" expected"; break;
5238
 
                        case 76: s = "\"foreach\" expected"; break;
5239
 
                        case 77: s = "\"goto\" expected"; break;
5240
 
                        case 78: s = "\"if\" expected"; break;
5241
 
                        case 79: s = "\"implicit\" expected"; break;
5242
 
                        case 80: s = "\"in\" expected"; break;
5243
 
                        case 81: s = "\"int\" expected"; break;
5244
 
                        case 82: s = "\"interface\" expected"; break;
5245
 
                        case 83: s = "\"internal\" expected"; break;
5246
 
                        case 84: s = "\"is\" expected"; break;
5247
 
                        case 85: s = "\"lock\" expected"; break;
5248
 
                        case 86: s = "\"long\" expected"; break;
5249
 
                        case 87: s = "\"namespace\" expected"; break;
5250
 
                        case 88: s = "\"new\" expected"; break;
5251
 
                        case 89: s = "\"null\" expected"; break;
5252
 
                        case 90: s = "\"object\" expected"; break;
5253
 
                        case 91: s = "\"operator\" expected"; break;
5254
 
                        case 92: s = "\"out\" expected"; break;
5255
 
                        case 93: s = "\"override\" expected"; break;
5256
 
                        case 94: s = "\"params\" expected"; break;
5257
 
                        case 95: s = "\"private\" expected"; break;
5258
 
                        case 96: s = "\"protected\" expected"; break;
5259
 
                        case 97: s = "\"public\" expected"; break;
5260
 
                        case 98: s = "\"readonly\" expected"; break;
5261
 
                        case 99: s = "\"ref\" expected"; break;
5262
 
                        case 100: s = "\"return\" expected"; break;
5263
 
                        case 101: s = "\"sbyte\" expected"; break;
5264
 
                        case 102: s = "\"sealed\" expected"; break;
5265
 
                        case 103: s = "\"short\" expected"; break;
5266
 
                        case 104: s = "\"sizeof\" expected"; break;
5267
 
                        case 105: s = "\"stackalloc\" expected"; break;
5268
 
                        case 106: s = "\"static\" expected"; break;
5269
 
                        case 107: s = "\"string\" expected"; break;
5270
 
                        case 108: s = "\"struct\" expected"; break;
5271
 
                        case 109: s = "\"switch\" expected"; break;
5272
 
                        case 110: s = "\"this\" expected"; break;
5273
 
                        case 111: s = "\"throw\" expected"; break;
5274
 
                        case 112: s = "\"true\" expected"; break;
5275
 
                        case 113: s = "\"try\" expected"; break;
5276
 
                        case 114: s = "\"typeof\" expected"; break;
5277
 
                        case 115: s = "\"uint\" expected"; break;
5278
 
                        case 116: s = "\"ulong\" expected"; break;
5279
 
                        case 117: s = "\"unchecked\" expected"; break;
5280
 
                        case 118: s = "\"unsafe\" expected"; break;
5281
 
                        case 119: s = "\"ushort\" expected"; break;
5282
 
                        case 120: s = "\"using\" expected"; break;
5283
 
                        case 121: s = "\"virtual\" expected"; break;
5284
 
                        case 122: s = "\"void\" expected"; break;
5285
 
                        case 123: s = "\"volatile\" expected"; break;
5286
 
                        case 124: s = "\"while\" expected"; break;
5287
 
                        case 125: s = "??? expected"; break;
5288
 
                        case 126: s = "invalid NamespaceMemberDecl"; break;
5289
 
                        case 127: s = "invalid NonArrayType"; break;
5290
 
                        case 128: s = "invalid AttributeArguments"; break;
5291
 
                        case 129: s = "invalid Expr"; break;
5292
 
                        case 130: s = "invalid TypeModifier"; break;
5293
 
                        case 131: s = "invalid TypeDecl"; break;
5294
 
                        case 132: s = "invalid TypeDecl"; break;
5295
 
                        case 133: s = "invalid IntegralType"; break;
5296
 
                        case 134: s = "invalid FormalParameterList"; break;
5297
 
                        case 135: s = "invalid FormalParameterList"; break;
5298
 
                        case 136: s = "invalid ClassType"; break;
5299
 
                        case 137: s = "invalid ClassMemberDecl"; break;
5300
 
                        case 138: s = "invalid ClassMemberDecl"; break;
5301
 
                        case 139: s = "invalid StructMemberDecl"; break;
5302
 
                        case 140: s = "invalid StructMemberDecl"; break;
5303
 
                        case 141: s = "invalid StructMemberDecl"; break;
5304
 
                        case 142: s = "invalid StructMemberDecl"; break;
5305
 
                        case 143: s = "invalid StructMemberDecl"; break;
5306
 
                        case 144: s = "invalid StructMemberDecl"; break;
5307
 
                        case 145: s = "invalid StructMemberDecl"; break;
5308
 
                        case 146: s = "invalid StructMemberDecl"; break;
5309
 
                        case 147: s = "invalid StructMemberDecl"; break;
5310
 
                        case 148: s = "invalid StructMemberDecl"; break;
5311
 
                        case 149: s = "invalid StructMemberDecl"; break;
5312
 
                        case 150: s = "invalid StructMemberDecl"; break;
5313
 
                        case 151: s = "invalid StructMemberDecl"; break;
5314
 
                        case 152: s = "invalid InterfaceMemberDecl"; break;
5315
 
                        case 153: s = "invalid InterfaceMemberDecl"; break;
5316
 
                        case 154: s = "invalid InterfaceMemberDecl"; break;
5317
 
                        case 155: s = "invalid TypeWithRestriction"; break;
5318
 
                        case 156: s = "invalid TypeWithRestriction"; break;
5319
 
                        case 157: s = "invalid SimpleType"; break;
5320
 
                        case 158: s = "invalid AccessorModifiers"; break;
5321
 
                        case 159: s = "invalid EventAccessorDecls"; break;
5322
 
                        case 160: s = "invalid ConstructorInitializer"; break;
5323
 
                        case 161: s = "invalid OverloadableOperator"; break;
5324
 
                        case 162: s = "invalid AccessorDecls"; break;
5325
 
                        case 163: s = "invalid InterfaceAccessors"; break;
5326
 
                        case 164: s = "invalid InterfaceAccessors"; break;
5327
 
                        case 165: s = "invalid GetAccessorDecl"; break;
5328
 
                        case 166: s = "invalid SetAccessorDecl"; break;
5329
 
                        case 167: s = "invalid VariableInitializer"; break;
5330
 
                        case 168: s = "invalid Statement"; break;
5331
 
                        case 169: s = "invalid AssignmentOperator"; break;
5332
 
                        case 170: s = "invalid EmbeddedStatement"; break;
5333
 
                        case 171: s = "invalid EmbeddedStatement"; break;
5334
 
                        case 172: s = "invalid EmbeddedStatement"; break;
5335
 
                        case 173: s = "invalid ForInitializer"; break;
5336
 
                        case 174: s = "invalid GotoStatement"; break;
5337
 
                        case 175: s = "invalid TryStatement"; break;
5338
 
                        case 176: s = "invalid ResourceAcquisition"; break;
5339
 
                        case 177: s = "invalid SwitchLabel"; break;
5340
 
                        case 178: s = "invalid CatchClauses"; break;
5341
 
                        case 179: s = "invalid UnaryExpr"; break;
5342
 
                        case 180: s = "invalid PrimaryExpr"; break;
5343
 
                        case 181: s = "invalid PrimaryExpr"; break;
5344
 
                        case 182: s = "invalid PrimaryExpr"; break;
5345
 
                        case 183: s = "invalid PrimaryExpr"; break;
5346
 
                        case 184: s = "invalid PrimaryExpr"; break;
5347
 
                        case 185: s = "invalid PrimaryExpr"; break;
5348
 
                        case 186: s = "invalid TypeArgumentList"; break;
5349
 
                        case 187: s = "invalid RelationalExpr"; break;
5350
 
                        case 188: s = "invalid RelationalExpr"; break;
5351
 
                        case 189: s = "invalid TypeParameterConstraintsClauseBase"; break;
 
5931
                        case 48: s = "\"=>\" expected"; break;
 
5932
                        case 49: s = "\"abstract\" expected"; break;
 
5933
                        case 50: s = "\"as\" expected"; break;
 
5934
                        case 51: s = "\"base\" expected"; break;
 
5935
                        case 52: s = "\"bool\" expected"; break;
 
5936
                        case 53: s = "\"break\" expected"; break;
 
5937
                        case 54: s = "\"byte\" expected"; break;
 
5938
                        case 55: s = "\"case\" expected"; break;
 
5939
                        case 56: s = "\"catch\" expected"; break;
 
5940
                        case 57: s = "\"char\" expected"; break;
 
5941
                        case 58: s = "\"checked\" expected"; break;
 
5942
                        case 59: s = "\"class\" expected"; break;
 
5943
                        case 60: s = "\"const\" expected"; break;
 
5944
                        case 61: s = "\"continue\" expected"; break;
 
5945
                        case 62: s = "\"decimal\" expected"; break;
 
5946
                        case 63: s = "\"default\" expected"; break;
 
5947
                        case 64: s = "\"delegate\" expected"; break;
 
5948
                        case 65: s = "\"do\" expected"; break;
 
5949
                        case 66: s = "\"double\" expected"; break;
 
5950
                        case 67: s = "\"else\" expected"; break;
 
5951
                        case 68: s = "\"enum\" expected"; break;
 
5952
                        case 69: s = "\"event\" expected"; break;
 
5953
                        case 70: s = "\"explicit\" expected"; break;
 
5954
                        case 71: s = "\"extern\" expected"; break;
 
5955
                        case 72: s = "\"false\" expected"; break;
 
5956
                        case 73: s = "\"finally\" expected"; break;
 
5957
                        case 74: s = "\"fixed\" expected"; break;
 
5958
                        case 75: s = "\"float\" expected"; break;
 
5959
                        case 76: s = "\"for\" expected"; break;
 
5960
                        case 77: s = "\"foreach\" expected"; break;
 
5961
                        case 78: s = "\"goto\" expected"; break;
 
5962
                        case 79: s = "\"if\" expected"; break;
 
5963
                        case 80: s = "\"implicit\" expected"; break;
 
5964
                        case 81: s = "\"in\" expected"; break;
 
5965
                        case 82: s = "\"int\" expected"; break;
 
5966
                        case 83: s = "\"interface\" expected"; break;
 
5967
                        case 84: s = "\"internal\" expected"; break;
 
5968
                        case 85: s = "\"is\" expected"; break;
 
5969
                        case 86: s = "\"lock\" expected"; break;
 
5970
                        case 87: s = "\"long\" expected"; break;
 
5971
                        case 88: s = "\"namespace\" expected"; break;
 
5972
                        case 89: s = "\"new\" expected"; break;
 
5973
                        case 90: s = "\"null\" expected"; break;
 
5974
                        case 91: s = "\"object\" expected"; break;
 
5975
                        case 92: s = "\"operator\" expected"; break;
 
5976
                        case 93: s = "\"out\" expected"; break;
 
5977
                        case 94: s = "\"override\" expected"; break;
 
5978
                        case 95: s = "\"params\" expected"; break;
 
5979
                        case 96: s = "\"private\" expected"; break;
 
5980
                        case 97: s = "\"protected\" expected"; break;
 
5981
                        case 98: s = "\"public\" expected"; break;
 
5982
                        case 99: s = "\"readonly\" expected"; break;
 
5983
                        case 100: s = "\"ref\" expected"; break;
 
5984
                        case 101: s = "\"return\" expected"; break;
 
5985
                        case 102: s = "\"sbyte\" expected"; break;
 
5986
                        case 103: s = "\"sealed\" expected"; break;
 
5987
                        case 104: s = "\"short\" expected"; break;
 
5988
                        case 105: s = "\"sizeof\" expected"; break;
 
5989
                        case 106: s = "\"stackalloc\" expected"; break;
 
5990
                        case 107: s = "\"static\" expected"; break;
 
5991
                        case 108: s = "\"string\" expected"; break;
 
5992
                        case 109: s = "\"struct\" expected"; break;
 
5993
                        case 110: s = "\"switch\" expected"; break;
 
5994
                        case 111: s = "\"this\" expected"; break;
 
5995
                        case 112: s = "\"throw\" expected"; break;
 
5996
                        case 113: s = "\"true\" expected"; break;
 
5997
                        case 114: s = "\"try\" expected"; break;
 
5998
                        case 115: s = "\"typeof\" expected"; break;
 
5999
                        case 116: s = "\"uint\" expected"; break;
 
6000
                        case 117: s = "\"ulong\" expected"; break;
 
6001
                        case 118: s = "\"unchecked\" expected"; break;
 
6002
                        case 119: s = "\"unsafe\" expected"; break;
 
6003
                        case 120: s = "\"ushort\" expected"; break;
 
6004
                        case 121: s = "\"using\" expected"; break;
 
6005
                        case 122: s = "\"virtual\" expected"; break;
 
6006
                        case 123: s = "\"void\" expected"; break;
 
6007
                        case 124: s = "\"volatile\" expected"; break;
 
6008
                        case 125: s = "\"while\" expected"; break;
 
6009
                        case 126: s = "\"partial\" expected"; break;
 
6010
                        case 127: s = "\"where\" expected"; break;
 
6011
                        case 128: s = "\"get\" expected"; break;
 
6012
                        case 129: s = "\"set\" expected"; break;
 
6013
                        case 130: s = "\"add\" expected"; break;
 
6014
                        case 131: s = "\"remove\" expected"; break;
 
6015
                        case 132: s = "\"yield\" expected"; break;
 
6016
                        case 133: s = "\"select\" expected"; break;
 
6017
                        case 134: s = "\"group\" expected"; break;
 
6018
                        case 135: s = "\"by\" expected"; break;
 
6019
                        case 136: s = "\"into\" expected"; break;
 
6020
                        case 137: s = "\"from\" expected"; break;
 
6021
                        case 138: s = "\"ascending\" expected"; break;
 
6022
                        case 139: s = "\"descending\" expected"; break;
 
6023
                        case 140: s = "\"orderby\" expected"; break;
 
6024
                        case 141: s = "\"let\" expected"; break;
 
6025
                        case 142: s = "\"join\" expected"; break;
 
6026
                        case 143: s = "\"on\" expected"; break;
 
6027
                        case 144: s = "\"equals\" expected"; break;
 
6028
                        case 145: s = "??? expected"; break;
 
6029
                        case 146: s = "invalid NamespaceMemberDecl"; break;
 
6030
                        case 147: s = "invalid NonArrayType"; break;
 
6031
                        case 148: s = "invalid Identifier"; break;
 
6032
                        case 149: s = "invalid AttributeArguments"; break;
 
6033
                        case 150: s = "invalid Expr"; break;
 
6034
                        case 151: s = "invalid TypeModifier"; break;
 
6035
                        case 152: s = "invalid TypeDecl"; break;
 
6036
                        case 153: s = "invalid TypeDecl"; break;
 
6037
                        case 154: s = "this symbol not expected in ClassBody"; break;
 
6038
                        case 155: s = "this symbol not expected in InterfaceBody"; break;
 
6039
                        case 156: s = "invalid IntegralType"; break;
 
6040
                        case 157: s = "invalid FormalParameterList"; break;
 
6041
                        case 158: s = "invalid FormalParameterList"; break;
 
6042
                        case 159: s = "invalid ClassType"; break;
 
6043
                        case 160: s = "invalid ClassMemberDecl"; break;
 
6044
                        case 161: s = "invalid ClassMemberDecl"; break;
 
6045
                        case 162: s = "invalid StructMemberDecl"; break;
 
6046
                        case 163: s = "invalid StructMemberDecl"; break;
 
6047
                        case 164: s = "invalid StructMemberDecl"; break;
 
6048
                        case 165: s = "invalid StructMemberDecl"; break;
 
6049
                        case 166: s = "invalid StructMemberDecl"; break;
 
6050
                        case 167: s = "invalid StructMemberDecl"; break;
 
6051
                        case 168: s = "invalid StructMemberDecl"; break;
 
6052
                        case 169: s = "invalid StructMemberDecl"; break;
 
6053
                        case 170: s = "invalid StructMemberDecl"; break;
 
6054
                        case 171: s = "invalid StructMemberDecl"; break;
 
6055
                        case 172: s = "invalid StructMemberDecl"; break;
 
6056
                        case 173: s = "invalid StructMemberDecl"; break;
 
6057
                        case 174: s = "invalid StructMemberDecl"; break;
 
6058
                        case 175: s = "invalid InterfaceMemberDecl"; break;
 
6059
                        case 176: s = "invalid InterfaceMemberDecl"; break;
 
6060
                        case 177: s = "invalid InterfaceMemberDecl"; break;
 
6061
                        case 178: s = "invalid TypeWithRestriction"; break;
 
6062
                        case 179: s = "invalid TypeWithRestriction"; break;
 
6063
                        case 180: s = "invalid SimpleType"; break;
 
6064
                        case 181: s = "invalid AccessorModifiers"; break;
 
6065
                        case 182: s = "this symbol not expected in Block"; break;
 
6066
                        case 183: s = "invalid EventAccessorDecls"; break;
 
6067
                        case 184: s = "invalid ConstructorInitializer"; break;
 
6068
                        case 185: s = "invalid OverloadableOperator"; break;
 
6069
                        case 186: s = "invalid AccessorDecls"; break;
 
6070
                        case 187: s = "invalid InterfaceAccessors"; break;
 
6071
                        case 188: s = "invalid InterfaceAccessors"; break;
 
6072
                        case 189: s = "invalid GetAccessorDecl"; break;
 
6073
                        case 190: s = "invalid SetAccessorDecl"; break;
 
6074
                        case 191: s = "invalid VariableInitializer"; break;
 
6075
                        case 192: s = "this symbol not expected in Statement"; break;
 
6076
                        case 193: s = "invalid Statement"; break;
 
6077
                        case 194: s = "invalid AssignmentOperator"; break;
 
6078
                        case 195: s = "invalid ObjectPropertyInitializerOrVariableInitializer"; break;
 
6079
                        case 196: s = "invalid ObjectPropertyInitializerOrVariableInitializer"; break;
 
6080
                        case 197: s = "invalid EmbeddedStatement"; break;
 
6081
                        case 198: s = "invalid EmbeddedStatement"; break;
 
6082
                        case 199: s = "this symbol not expected in EmbeddedStatement"; break;
 
6083
                        case 200: s = "invalid EmbeddedStatement"; break;
 
6084
                        case 201: s = "invalid ForInitializer"; break;
 
6085
                        case 202: s = "invalid GotoStatement"; break;
 
6086
                        case 203: s = "invalid TryStatement"; break;
 
6087
                        case 204: s = "invalid ResourceAcquisition"; break;
 
6088
                        case 205: s = "invalid SwitchLabel"; break;
 
6089
                        case 206: s = "invalid CatchClauses"; break;
 
6090
                        case 207: s = "invalid UnaryExpr"; break;
 
6091
                        case 208: s = "invalid PrimaryExpr"; break;
 
6092
                        case 209: s = "invalid PrimaryExpr"; break;
 
6093
                        case 210: s = "invalid PrimaryExpr"; break;
 
6094
                        case 211: s = "invalid TypeArgumentList"; break;
 
6095
                        case 212: s = "invalid NewExpression"; break;
 
6096
                        case 213: s = "invalid NewExpression"; break;
 
6097
                        case 214: s = "invalid LambdaExpressionParameter"; break;
 
6098
                        case 215: s = "invalid LambdaExpressionBody"; break;
 
6099
                        case 216: s = "invalid RelationalExpr"; break;
 
6100
                        case 217: s = "invalid RelationalExpr"; break;
 
6101
                        case 218: s = "invalid TypeParameterConstraintsClauseBase"; break;
 
6102
                        case 219: s = "invalid QueryExpressionBody"; break;
5352
6103
 
5353
6104
                        default: s = "error " + errorNumber; break;
5354
6105
                }
5361
6112
        }
5362
6113
        
5363
6114
        static bool[,] set = {
5364
 
        {T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5365
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,T, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
5366
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
5367
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
5368
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,T, x,x,x,x, x,x,x},
5369
 
        {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,T,x,x, T,T,x,x, x,T,T,T, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,T,x,T, T,x,x,T, x,x,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x},
5370
 
        {x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5371
 
        {x,T,x,x, T,T,T,T, T,T,x,T, T,T,T,x, T,T,T,T, x,T,T,T, x,T,T,T, T,T,T,x, x,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, T,T,x,T, x,T,x,x, T,x,T,T, x,T,x,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,T, x,T,T,T, T,x,T,x, T,x,T,x, x,T,x,T, T,T,T,x, x,T,T,T, x,x,T,T, T,x,x,x, x,x,x,T, T,x,T,T, x,T,T,T, x,x,x},
5372
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5373
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
5374
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, T,x,T,x, x,x,x,T, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
5375
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, x,T,x,x, T,x,T,T, x,T,x,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,T, x,T,T,T, x,x,T,x, T,x,T,x, x,T,x,T, T,T,T,x, x,T,T,T, x,x,T,T, T,x,x,x, x,x,x,T, T,x,T,T, x,T,T,T, x,x,x},
5376
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, x,T,x,x, T,x,T,T, x,T,x,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,T, x,T,T,T, x,x,T,x, T,x,T,x, x,T,x,T, T,T,T,x, x,T,T,T, x,x,T,T, T,x,x,x, x,x,x,T, T,x,T,T, x,T,T,T, x,x,x},
5377
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
5378
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,T, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
5379
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,T, T,T,T,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,T,x,T, x,x,x},
5380
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,T,T, x,T,x,T, x,T,x,T, T,T,x,x, x,x,T,x, x,x,x,T, x,T,T,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, T,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
5381
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5382
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
5383
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,T, x,x,x,x, x,x,x},
5384
 
        {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,x,x, T,T,x,T, T,T,T,T, T,T,x,x, x,x,x,T, x,T,T,T, T,T,T,x, x,T,x,x, x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,T,x,T, T,x,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,x,x},
5385
 
        {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,T,x,x, T,T,x,x, x,T,T,T, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,T,T,x, T,x,x,x, x,x,x,T, x,T,x,T, T,x,x,T, x,x,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x},
5386
 
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5387
 
        {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,x,x, T,T,x,x, T,T,T,T, T,T,x,x, x,x,x,T, x,T,T,T, T,T,T,x, x,T,x,x, x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,T,x,T, T,x,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,x,x},
5388
 
        {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,T,x,x, T,T,x,x, x,T,T,T, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,T,x,T, T,T,x,T, x,x,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x},
5389
 
        {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,x, T,T,x,T, T,T,T,T, T,T,x,x, x,x,x,T, x,T,T,T, T,T,T,x, x,T,x,x, x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,T,x,T, T,x,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,x,x},
5390
 
        {x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5391
 
        {x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,T,x,x, T,T,x,x, x,T,T,T, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,T,x,T, T,x,x,T, x,x,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x},
5392
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,x,x, x,x,x},
5393
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5394
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
5395
 
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}
 
6115
        {T,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,T,T,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,T, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,x,T,T, T,T,T,T, T,x,T,T, T,x,T,T, x,T,T,T, x,x,T,x, T,T,T,T, x,T,T,T, T,T,x,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6116
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, T,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6117
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6118
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6119
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6120
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6121
        {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6122
        {x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6123
        {x,T,x,T, T,T,T,T, T,T,x,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,T,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6124
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6125
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6126
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,T,x,T, x,x,x,x, T,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6127
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6128
        {T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6129
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6130
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6131
        {T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6132
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6133
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, T,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6134
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6135
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,T,x,x, x,x,T,x, T,T,T,T, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6136
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,T,T, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,T,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6137
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6138
        {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6139
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6140
        {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6141
        {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,T,x,x, x,x,x,x, T,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6142
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6143
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6144
        {T,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6145
        {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, x,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6146
        {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,T,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6147
        {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6148
        {x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6149
        {x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x},
 
6150
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6151
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6152
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6153
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
 
6154
        {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,T,x,x, T,T,T,x, x,x,x}
5396
6155
 
5397
6156
        };
5398
6157
} // end Parser