2
#line 1 "Frames/cs.ATG"
3
using System.Collections;
4
using System.Collections.Generic;
5
using System.Collections.Specialized;
7
using ICSharpCode.OldNRefactory.Parser;
8
using ICSharpCode.OldNRefactory.Ast;
9
using ASTAttribute = ICSharpCode.OldNRefactory.Ast.Attribute;
10
using Types = ICSharpCode.OldNRefactory.Ast.ClassType;
12
Parser.frame file for NRefactory.
15
using System.Reflection;
17
namespace ICSharpCode.OldNRefactory.Parser.CSharp {
21
partial class Parser : AbstractParser
29
#line 18 "Frames/cs.ATG"
38
#line 179 "Frames/cs.ATG"
39
lexer.NextToken(); /* get the first token */
40
while (la.kind == 71) {
41
ExternAliasDirective();
43
while (la.kind == 121) {
47
#line 183 "Frames/cs.ATG"
48
IsGlobalAttrTarget()) {
49
GlobalAttributeSection();
52
NamespaceMemberDecl();
57
void ExternAliasDirective() {
59
#line 353 "Frames/cs.ATG"
60
ExternAliasDirective ead = new ExternAliasDirective { StartLocation = la.Location };
64
#line 356 "Frames/cs.ATG"
65
if (t.val != "alias") Error("Expected 'extern alias'.");
68
#line 357 "Frames/cs.ATG"
72
#line 358 "Frames/cs.ATG"
73
ead.EndLocation = t.EndLocation;
75
#line 359 "Frames/cs.ATG"
76
compilationUnit.AddChild(ead);
79
void UsingDirective() {
81
#line 190 "Frames/cs.ATG"
82
string qualident = null; TypeReference aliasedType = null;
86
#line 193 "Frames/cs.ATG"
87
Location startPos = t.Location;
89
#line 194 "Frames/cs.ATG"
94
#line 195 "Frames/cs.ATG"
99
#line 197 "Frames/cs.ATG"
100
if (qualident != null && qualident.Length > 0) {
102
if (aliasedType != null) {
103
node = new UsingDeclaration(qualident, aliasedType);
105
node = new UsingDeclaration(qualident);
107
node.StartLocation = startPos;
108
node.EndLocation = t.EndLocation;
109
compilationUnit.AddChild(node);
114
void GlobalAttributeSection() {
117
#line 213 "Frames/cs.ATG"
118
Location startPos = t.Location;
121
#line 214 "Frames/cs.ATG"
122
if (t.val != "assembly" && t.val != "module") Error("global attribute target specifier (assembly or module) expected");
123
string attributeTarget = t.val;
124
List<ASTAttribute> attributes = new List<ASTAttribute>();
125
ASTAttribute attribute;
129
#line 219 "Frames/cs.ATG"
132
#line 219 "Frames/cs.ATG"
133
attributes.Add(attribute);
135
#line 220 "Frames/cs.ATG"
139
#line 220 "Frames/cs.ATG"
142
#line 220 "Frames/cs.ATG"
143
attributes.Add(attribute);
150
#line 222 "Frames/cs.ATG"
151
AttributeSection section = new AttributeSection {
152
AttributeTarget = attributeTarget,
153
Attributes = attributes,
154
StartLocation = startPos,
155
EndLocation = t.EndLocation
157
compilationUnit.AddChild(section);
161
void NamespaceMemberDecl() {
163
#line 326 "Frames/cs.ATG"
164
AttributeSection section;
165
List<AttributeSection> attributes = new List<AttributeSection>();
166
ModifierList m = new ModifierList();
172
#line 332 "Frames/cs.ATG"
173
Location startPos = t.Location;
175
#line 333 "Frames/cs.ATG"
178
#line 333 "Frames/cs.ATG"
179
INode node = new NamespaceDeclaration(qualident);
180
node.StartLocation = startPos;
181
compilationUnit.AddChild(node);
182
compilationUnit.BlockStart(node);
185
while (la.kind == 71) {
186
ExternAliasDirective();
188
while (la.kind == 121) {
192
NamespaceMemberDecl();
199
#line 343 "Frames/cs.ATG"
200
node.EndLocation = t.EndLocation;
201
compilationUnit.BlockEnd();
203
} else if (StartOf(2)) {
204
while (la.kind == 18) {
206
#line 347 "Frames/cs.ATG"
209
#line 347 "Frames/cs.ATG"
210
attributes.Add(section);
214
#line 348 "Frames/cs.ATG"
218
#line 349 "Frames/cs.ATG"
224
#line 483 "Frames/cs.ATG"
225
out string qualident) {
228
#line 485 "Frames/cs.ATG"
229
qualidentBuilder.Length = 0; qualidentBuilder.Append(t.val);
231
#line 486 "Frames/cs.ATG"
236
#line 486 "Frames/cs.ATG"
237
qualidentBuilder.Append('.');
238
qualidentBuilder.Append(t.val);
242
#line 489 "Frames/cs.ATG"
243
qualident = qualidentBuilder.ToString();
247
#line 601 "Frames/cs.ATG"
248
out TypeReference type) {
250
#line 603 "Frames/cs.ATG"
251
Location startPos = la.Location;
258
#line 609 "Frames/cs.ATG"
260
} else if (StartOf(5)) {
262
#line 610 "Frames/cs.ATG"
265
#line 610 "Frames/cs.ATG"
266
type = new TypeReference(name, true);
267
} else if (la.kind == 123) {
271
#line 611 "Frames/cs.ATG"
272
pointer = 1; type = new TypeReference("System.Void", true);
275
NullableQuestionMark(
276
#line 614 "Frames/cs.ATG"
280
#line 616 "Frames/cs.ATG"
284
#line 617 "Frames/cs.ATG"
288
#line 619 "Frames/cs.ATG"
290
type.PointerNestingLevel = pointer;
291
type.EndLocation = t.EndLocation;
292
type.StartLocation = startPos;
379
default: SynErr(148); break;
384
#line 232 "Frames/cs.ATG"
385
out ASTAttribute attribute) {
387
#line 233 "Frames/cs.ATG"
392
#line 237 "Frames/cs.ATG"
393
Location startPos = la.Location;
395
#line 238 "Frames/cs.ATG"
396
IdentAndDoubleColon()) {
399
#line 239 "Frames/cs.ATG"
404
#line 242 "Frames/cs.ATG"
407
#line 243 "Frames/cs.ATG"
408
List<Expression> positional = null;
409
List<NamedArgumentExpression> named = null;
410
string name = (alias != null && alias != "global") ? alias + "." + qualident : qualident;
414
#line 247 "Frames/cs.ATG"
415
out positional, out named);
418
#line 248 "Frames/cs.ATG"
419
attribute = new ASTAttribute(name, positional, named);
420
attribute.StartLocation = startPos;
421
attribute.EndLocation = t.EndLocation;
425
void AttributeArguments(
426
#line 254 "Frames/cs.ATG"
427
out List<Expression> positional, out List<NamedArgumentExpression> named) {
429
#line 256 "Frames/cs.ATG"
430
bool nameFound = false;
433
positional = new List<Expression>();
434
named = new List<NamedArgumentExpression> ();
439
#line 266 "Frames/cs.ATG"
442
#line 266 "Frames/cs.ATG"
446
#line 267 "Frames/cs.ATG"
451
#line 269 "Frames/cs.ATG"
454
#line 269 "Frames/cs.ATG"
456
if(name == "") positional.Add(expr);
457
else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
460
while (la.kind == 14) {
463
#line 278 "Frames/cs.ATG"
466
#line 278 "Frames/cs.ATG"
470
#line 279 "Frames/cs.ATG"
473
} else if (StartOf(6)) {
475
#line 281 "Frames/cs.ATG"
476
if (nameFound) Error("no positional argument after named argument");
479
#line 282 "Frames/cs.ATG"
482
#line 282 "Frames/cs.ATG"
483
if (expr != null) { if(name == "") positional.Add(expr);
484
else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; }
493
#line 1804 "Frames/cs.ATG"
494
out Expression expr) {
496
#line 1805 "Frames/cs.ATG"
497
expr = null; Expression expr1 = null, expr2 = null; AssignmentOperatorType op;
499
#line 1807 "Frames/cs.ATG"
500
Location startLocation = la.Location;
502
#line 1808 "Frames/cs.ATG"
506
#line 1811 "Frames/cs.ATG"
509
#line 1811 "Frames/cs.ATG"
512
#line 1811 "Frames/cs.ATG"
513
expr = new AssignmentExpression(expr, op, expr1);
515
#line 1812 "Frames/cs.ATG"
516
la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) {
518
#line 1813 "Frames/cs.ATG"
521
#line 1813 "Frames/cs.ATG"
524
#line 1813 "Frames/cs.ATG"
525
expr = new AssignmentExpression(expr, op, expr1);
526
} else if (StartOf(8)) {
528
#line 1815 "Frames/cs.ATG"
533
#line 1816 "Frames/cs.ATG"
536
#line 1816 "Frames/cs.ATG"
537
expr = new BinaryOperatorExpression(expr, BinaryOperatorType.NullCoalescing, expr1);
542
#line 1817 "Frames/cs.ATG"
546
#line 1817 "Frames/cs.ATG"
549
#line 1817 "Frames/cs.ATG"
550
expr = new ConditionalExpression(expr, expr1, expr2);
554
#line 1820 "Frames/cs.ATG"
556
expr.StartLocation = startLocation;
557
expr.EndLocation = t.EndLocation;
562
void AttributeSection(
563
#line 291 "Frames/cs.ATG"
564
out AttributeSection section) {
566
#line 293 "Frames/cs.ATG"
567
string attributeTarget = "";
568
List<ASTAttribute> attributes = new List<ASTAttribute>();
569
ASTAttribute attribute;
574
#line 299 "Frames/cs.ATG"
575
Location startPos = t.Location;
577
#line 300 "Frames/cs.ATG"
578
IsLocalAttrTarget()) {
582
#line 301 "Frames/cs.ATG"
583
attributeTarget = "event";
584
} else if (la.kind == 101) {
587
#line 302 "Frames/cs.ATG"
588
attributeTarget = "return";
592
#line 303 "Frames/cs.ATG"
593
if (t.val != "field" && t.val != "method" &&
595
t.val != "property" && t.val != "type")
596
Error("attribute target specifier (field, event, method, param, property, return or type) expected");
597
attributeTarget = t.val;
603
#line 312 "Frames/cs.ATG"
606
#line 312 "Frames/cs.ATG"
607
attributes.Add(attribute);
609
#line 313 "Frames/cs.ATG"
613
#line 313 "Frames/cs.ATG"
616
#line 313 "Frames/cs.ATG"
617
attributes.Add(attribute);
624
#line 315 "Frames/cs.ATG"
625
section = new AttributeSection {
626
AttributeTarget = attributeTarget,
627
Attributes = attributes,
628
StartLocation = startPos,
629
EndLocation = t.EndLocation
635
#line 696 "Frames/cs.ATG"
641
#line 698 "Frames/cs.ATG"
642
m.Add(Modifiers.New, t.Location);
648
#line 699 "Frames/cs.ATG"
649
m.Add(Modifiers.Public, t.Location);
655
#line 700 "Frames/cs.ATG"
656
m.Add(Modifiers.Protected, t.Location);
662
#line 701 "Frames/cs.ATG"
663
m.Add(Modifiers.Internal, t.Location);
669
#line 702 "Frames/cs.ATG"
670
m.Add(Modifiers.Private, t.Location);
676
#line 703 "Frames/cs.ATG"
677
m.Add(Modifiers.Unsafe, t.Location);
683
#line 704 "Frames/cs.ATG"
684
m.Add(Modifiers.Abstract, t.Location);
690
#line 705 "Frames/cs.ATG"
691
m.Add(Modifiers.Sealed, t.Location);
697
#line 706 "Frames/cs.ATG"
698
m.Add(Modifiers.Static, t.Location);
704
#line 707 "Frames/cs.ATG"
705
m.Add(Modifiers.Partial, t.Location);
708
default: SynErr(151); break;
713
#line 362 "Frames/cs.ATG"
714
ModifierList m, List<AttributeSection> attributes) {
716
#line 364 "Frames/cs.ATG"
718
List<TypeReference> names;
719
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
721
List<TemplateDefinition> templates;
725
#line 370 "Frames/cs.ATG"
726
m.Check(Modifiers.Classes);
729
#line 371 "Frames/cs.ATG"
730
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
731
templates = newType.Templates;
732
compilationUnit.AddChild(newType);
733
compilationUnit.BlockStart(newType);
734
newType.StartLocation = m.GetDeclarationLocation(t.Location);
736
newType.Type = Types.Class;
740
#line 379 "Frames/cs.ATG"
741
newType.Name = t.val;
744
#line 382 "Frames/cs.ATG"
749
#line 384 "Frames/cs.ATG"
752
#line 384 "Frames/cs.ATG"
753
newType.BaseTypes = names;
755
while (la.kind == 127) {
756
TypeParameterConstraintsClause(
757
#line 387 "Frames/cs.ATG"
761
#line 389 "Frames/cs.ATG"
762
newType.BodyStartLocation = t.EndLocation;
770
#line 393 "Frames/cs.ATG"
771
newType.EndLocation = t.EndLocation;
772
compilationUnit.BlockEnd();
774
} else if (StartOf(9)) {
776
#line 396 "Frames/cs.ATG"
777
m.Check(Modifiers.StructsInterfacesEnumsDelegates);
778
if (la.kind == 109) {
781
#line 397 "Frames/cs.ATG"
782
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
783
templates = newType.Templates;
784
newType.StartLocation = m.GetDeclarationLocation(t.Location);
785
compilationUnit.AddChild(newType);
786
compilationUnit.BlockStart(newType);
787
newType.Type = Types.Struct;
791
#line 404 "Frames/cs.ATG"
792
newType.Name = t.val;
795
#line 407 "Frames/cs.ATG"
800
#line 409 "Frames/cs.ATG"
803
#line 409 "Frames/cs.ATG"
804
newType.BaseTypes = names;
806
while (la.kind == 127) {
807
TypeParameterConstraintsClause(
808
#line 412 "Frames/cs.ATG"
812
#line 415 "Frames/cs.ATG"
813
newType.BodyStartLocation = t.EndLocation;
819
#line 417 "Frames/cs.ATG"
820
newType.EndLocation = t.EndLocation;
821
compilationUnit.BlockEnd();
823
} else if (la.kind == 83) {
826
#line 421 "Frames/cs.ATG"
827
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
828
templates = newType.Templates;
829
compilationUnit.AddChild(newType);
830
compilationUnit.BlockStart(newType);
831
newType.StartLocation = m.GetDeclarationLocation(t.Location);
832
newType.Type = Types.Interface;
836
#line 428 "Frames/cs.ATG"
837
newType.Name = t.val;
840
#line 431 "Frames/cs.ATG"
845
#line 433 "Frames/cs.ATG"
848
#line 433 "Frames/cs.ATG"
849
newType.BaseTypes = names;
851
while (la.kind == 127) {
852
TypeParameterConstraintsClause(
853
#line 436 "Frames/cs.ATG"
857
#line 438 "Frames/cs.ATG"
858
newType.BodyStartLocation = t.EndLocation;
864
#line 440 "Frames/cs.ATG"
865
newType.EndLocation = t.EndLocation;
866
compilationUnit.BlockEnd();
868
} else if (la.kind == 68) {
871
#line 444 "Frames/cs.ATG"
872
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
873
compilationUnit.AddChild(newType);
874
compilationUnit.BlockStart(newType);
875
newType.StartLocation = m.GetDeclarationLocation(t.Location);
876
newType.Type = Types.Enum;
880
#line 450 "Frames/cs.ATG"
881
newType.Name = t.val;
885
#line 451 "Frames/cs.ATG"
888
#line 451 "Frames/cs.ATG"
889
newType.BaseTypes.Add(new TypeReference(name, true));
892
#line 453 "Frames/cs.ATG"
893
newType.BodyStartLocation = t.EndLocation;
899
#line 455 "Frames/cs.ATG"
900
newType.EndLocation = t.EndLocation;
901
compilationUnit.BlockEnd();
906
#line 459 "Frames/cs.ATG"
907
DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes);
908
templates = delegateDeclr.Templates;
909
delegateDeclr.StartLocation = m.GetDeclarationLocation(t.Location);
912
#line 463 "Frames/cs.ATG"
916
#line 463 "Frames/cs.ATG"
917
delegateDeclr.ReturnType = new TypeReference("System.Void", true);
918
} else if (StartOf(10)) {
920
#line 464 "Frames/cs.ATG"
923
#line 464 "Frames/cs.ATG"
924
delegateDeclr.ReturnType = type;
928
#line 466 "Frames/cs.ATG"
929
delegateDeclr.Name = t.val;
932
#line 469 "Frames/cs.ATG"
938
#line 471 "Frames/cs.ATG"
941
#line 471 "Frames/cs.ATG"
942
delegateDeclr.Parameters = p;
945
while (la.kind == 127) {
946
TypeParameterConstraintsClause(
947
#line 475 "Frames/cs.ATG"
952
#line 477 "Frames/cs.ATG"
953
delegateDeclr.EndLocation = t.EndLocation;
954
compilationUnit.AddChild(delegateDeclr);
960
void TypeParameterList(
961
#line 2381 "Frames/cs.ATG"
962
List<TemplateDefinition> templates) {
964
#line 2383 "Frames/cs.ATG"
965
AttributeSection section;
966
List<AttributeSection> attributes = new List<AttributeSection>();
969
while (la.kind == 18) {
971
#line 2387 "Frames/cs.ATG"
974
#line 2387 "Frames/cs.ATG"
975
attributes.Add(section);
979
#line 2388 "Frames/cs.ATG"
980
templates.Add(new TemplateDefinition(t.val, attributes));
981
while (la.kind == 14) {
983
while (la.kind == 18) {
985
#line 2389 "Frames/cs.ATG"
988
#line 2389 "Frames/cs.ATG"
989
attributes.Add(section);
993
#line 2390 "Frames/cs.ATG"
994
templates.Add(new TemplateDefinition(t.val, attributes));
1000
#line 492 "Frames/cs.ATG"
1001
out List<TypeReference> names) {
1003
#line 494 "Frames/cs.ATG"
1004
TypeReference typeRef;
1005
names = new List<TypeReference>();
1009
#line 498 "Frames/cs.ATG"
1010
out typeRef, false);
1012
#line 498 "Frames/cs.ATG"
1013
if (typeRef != null) { names.Add(typeRef); }
1014
while (la.kind == 14) {
1017
#line 499 "Frames/cs.ATG"
1018
out typeRef, false);
1020
#line 499 "Frames/cs.ATG"
1021
if (typeRef != null) { names.Add(typeRef); }
1025
void TypeParameterConstraintsClause(
1026
#line 2394 "Frames/cs.ATG"
1027
List<TemplateDefinition> templates) {
1029
#line 2395 "Frames/cs.ATG"
1030
string name = ""; TypeReference type;
1034
#line 2398 "Frames/cs.ATG"
1037
TypeParameterConstraintsClauseBase(
1038
#line 2400 "Frames/cs.ATG"
1041
#line 2401 "Frames/cs.ATG"
1042
TemplateDefinition td = null;
1043
foreach (TemplateDefinition d in templates) {
1044
if (d.Name == name) {
1049
if ( td != null && type != null) { td.Bases.Add(type); }
1051
while (la.kind == 14) {
1053
TypeParameterConstraintsClauseBase(
1054
#line 2410 "Frames/cs.ATG"
1057
#line 2411 "Frames/cs.ATG"
1059
foreach (TemplateDefinition d in templates) {
1060
if (d.Name == name) {
1065
if ( td != null && type != null) { td.Bases.Add(type); }
1072
#line 503 "Frames/cs.ATG"
1073
AttributeSection section;
1074
while (StartOf(12)) {
1076
#line 505 "Frames/cs.ATG"
1077
List<AttributeSection> attributes = new List<AttributeSection>();
1078
ModifierList m = new ModifierList();
1080
while (!(StartOf(13))) {SynErr(154); lexer.NextToken(); }
1081
while (la.kind == 18) {
1083
#line 509 "Frames/cs.ATG"
1086
#line 509 "Frames/cs.ATG"
1087
attributes.Add(section);
1090
#line 510 "Frames/cs.ATG"
1093
#line 511 "Frames/cs.ATG"
1098
void StructInterfaces(
1099
#line 515 "Frames/cs.ATG"
1100
out List<TypeReference> names) {
1102
#line 517 "Frames/cs.ATG"
1103
TypeReference typeRef;
1104
names = new List<TypeReference>();
1108
#line 521 "Frames/cs.ATG"
1109
out typeRef, false);
1111
#line 521 "Frames/cs.ATG"
1112
if (typeRef != null) { names.Add(typeRef); }
1113
while (la.kind == 14) {
1116
#line 522 "Frames/cs.ATG"
1117
out typeRef, false);
1119
#line 522 "Frames/cs.ATG"
1120
if (typeRef != null) { names.Add(typeRef); }
1126
#line 526 "Frames/cs.ATG"
1127
AttributeSection section;
1129
while (StartOf(14)) {
1131
#line 529 "Frames/cs.ATG"
1132
List<AttributeSection> attributes = new List<AttributeSection>();
1133
ModifierList m = new ModifierList();
1135
while (la.kind == 18) {
1137
#line 532 "Frames/cs.ATG"
1140
#line 532 "Frames/cs.ATG"
1141
attributes.Add(section);
1144
#line 533 "Frames/cs.ATG"
1147
#line 534 "Frames/cs.ATG"
1154
#line 539 "Frames/cs.ATG"
1155
out List<TypeReference> names) {
1157
#line 541 "Frames/cs.ATG"
1158
TypeReference typeRef;
1159
names = new List<TypeReference>();
1163
#line 545 "Frames/cs.ATG"
1164
out typeRef, false);
1166
#line 545 "Frames/cs.ATG"
1167
if (typeRef != null) { names.Add(typeRef); }
1168
while (la.kind == 14) {
1171
#line 546 "Frames/cs.ATG"
1172
out typeRef, false);
1174
#line 546 "Frames/cs.ATG"
1175
if (typeRef != null) { names.Add(typeRef); }
1179
void InterfaceBody() {
1181
while (StartOf(15)) {
1182
while (!(StartOf(16))) {SynErr(155); lexer.NextToken(); }
1183
InterfaceMemberDecl();
1189
#line 718 "Frames/cs.ATG"
1192
#line 718 "Frames/cs.ATG"
1198
#line 720 "Frames/cs.ATG"
1199
name = "System.SByte";
1205
#line 721 "Frames/cs.ATG"
1206
name = "System.Byte";
1212
#line 722 "Frames/cs.ATG"
1213
name = "System.Int16";
1219
#line 723 "Frames/cs.ATG"
1220
name = "System.UInt16";
1226
#line 724 "Frames/cs.ATG"
1227
name = "System.Int32";
1233
#line 725 "Frames/cs.ATG"
1234
name = "System.UInt32";
1240
#line 726 "Frames/cs.ATG"
1241
name = "System.Int64";
1247
#line 727 "Frames/cs.ATG"
1248
name = "System.UInt64";
1254
#line 728 "Frames/cs.ATG"
1255
name = "System.Char";
1258
default: SynErr(156); break;
1264
#line 555 "Frames/cs.ATG"
1269
#line 558 "Frames/cs.ATG"
1272
#line 558 "Frames/cs.ATG"
1273
compilationUnit.AddChild(f);
1275
#line 559 "Frames/cs.ATG"
1279
#line 560 "Frames/cs.ATG"
1282
#line 560 "Frames/cs.ATG"
1283
compilationUnit.AddChild(f);
1285
if (la.kind == 14) {
1293
#line 566 "Frames/cs.ATG"
1294
out TypeReference type) {
1295
TypeWithRestriction(
1296
#line 568 "Frames/cs.ATG"
1297
out type, true, false);
1300
void FormalParameterList(
1301
#line 638 "Frames/cs.ATG"
1302
List<ParameterDeclarationExpression> parameter) {
1304
#line 641 "Frames/cs.ATG"
1305
ParameterDeclarationExpression p;
1306
AttributeSection section;
1307
List<AttributeSection> attributes = new List<AttributeSection>();
1309
while (la.kind == 18) {
1311
#line 646 "Frames/cs.ATG"
1314
#line 646 "Frames/cs.ATG"
1315
attributes.Add(section);
1319
#line 648 "Frames/cs.ATG"
1322
#line 648 "Frames/cs.ATG"
1323
bool paramsFound = false;
1324
p.Attributes = attributes;
1327
while (la.kind == 14) {
1330
#line 653 "Frames/cs.ATG"
1331
attributes = new List<AttributeSection>(); if (paramsFound) Error("params array must be at end of parameter list");
1332
while (la.kind == 18) {
1334
#line 654 "Frames/cs.ATG"
1337
#line 654 "Frames/cs.ATG"
1338
attributes.Add(section);
1342
#line 656 "Frames/cs.ATG"
1345
#line 656 "Frames/cs.ATG"
1346
p.Attributes = attributes; parameter.Add(p);
1347
} else if (la.kind == 95) {
1349
#line 657 "Frames/cs.ATG"
1352
#line 657 "Frames/cs.ATG"
1353
paramsFound = true; p.Attributes = attributes; parameter.Add(p);
1356
} else if (la.kind == 95) {
1358
#line 660 "Frames/cs.ATG"
1361
#line 660 "Frames/cs.ATG"
1362
p.Attributes = attributes; parameter.Add(p);
1367
#line 710 "Frames/cs.ATG"
1368
out TypeReference typeRef, bool canBeUnbound) {
1370
#line 711 "Frames/cs.ATG"
1371
TypeReference r; typeRef = null;
1374
#line 713 "Frames/cs.ATG"
1375
out r, canBeUnbound);
1377
#line 713 "Frames/cs.ATG"
1379
} else if (la.kind == 91) {
1382
#line 714 "Frames/cs.ATG"
1383
typeRef = new TypeReference("System.Object", true); typeRef.StartLocation = t.Location;
1384
} else if (la.kind == 108) {
1387
#line 715 "Frames/cs.ATG"
1388
typeRef = new TypeReference("System.String", true); typeRef.StartLocation = t.Location;
1393
#line 2322 "Frames/cs.ATG"
1394
out TypeReference typeRef, bool canBeUnbound) {
1396
#line 2323 "Frames/cs.ATG"
1397
List<TypeReference> typeArguments = null;
1398
string alias = null;
1400
Location startLocation = la.Location;
1403
#line 2329 "Frames/cs.ATG"
1404
IdentAndDoubleColon()) {
1407
#line 2330 "Frames/cs.ATG"
1412
#line 2333 "Frames/cs.ATG"
1414
if (la.kind == 23) {
1416
#line 2334 "Frames/cs.ATG"
1417
out typeArguments, canBeUnbound);
1420
#line 2336 "Frames/cs.ATG"
1421
if (alias == null) {
1422
typeRef = new TypeReference(qualident, typeArguments);
1423
} else if (alias == "global") {
1424
typeRef = new TypeReference(qualident, typeArguments);
1425
typeRef.IsGlobal = true;
1427
typeRef = new TypeReference(alias + "." + qualident, typeArguments);
1431
#line 2345 "Frames/cs.ATG"
1435
#line 2346 "Frames/cs.ATG"
1436
typeArguments = null;
1438
#line 2347 "Frames/cs.ATG"
1440
if (la.kind == 23) {
1442
#line 2348 "Frames/cs.ATG"
1443
out typeArguments, canBeUnbound);
1446
#line 2349 "Frames/cs.ATG"
1447
typeRef = new InnerClassTypeReference(typeRef, qualident, typeArguments);
1450
#line 2351 "Frames/cs.ATG"
1451
typeRef.StartLocation = startLocation;
1454
void MemberModifiers(
1455
#line 731 "Frames/cs.ATG"
1457
while (StartOf(20)) {
1462
#line 734 "Frames/cs.ATG"
1463
m.Add(Modifiers.Abstract, t.Location);
1469
#line 735 "Frames/cs.ATG"
1470
m.Add(Modifiers.Extern, t.Location);
1476
#line 736 "Frames/cs.ATG"
1477
m.Add(Modifiers.Internal, t.Location);
1483
#line 737 "Frames/cs.ATG"
1484
m.Add(Modifiers.New, t.Location);
1490
#line 738 "Frames/cs.ATG"
1491
m.Add(Modifiers.Override, t.Location);
1497
#line 739 "Frames/cs.ATG"
1498
m.Add(Modifiers.Private, t.Location);
1504
#line 740 "Frames/cs.ATG"
1505
m.Add(Modifiers.Protected, t.Location);
1511
#line 741 "Frames/cs.ATG"
1512
m.Add(Modifiers.Public, t.Location);
1518
#line 742 "Frames/cs.ATG"
1519
m.Add(Modifiers.ReadOnly, t.Location);
1525
#line 743 "Frames/cs.ATG"
1526
m.Add(Modifiers.Sealed, t.Location);
1532
#line 744 "Frames/cs.ATG"
1533
m.Add(Modifiers.Static, t.Location);
1539
#line 745 "Frames/cs.ATG"
1540
m.Add(Modifiers.Fixed, t.Location);
1546
#line 746 "Frames/cs.ATG"
1547
m.Add(Modifiers.Unsafe, t.Location);
1553
#line 747 "Frames/cs.ATG"
1554
m.Add(Modifiers.Virtual, t.Location);
1560
#line 748 "Frames/cs.ATG"
1561
m.Add(Modifiers.Volatile, t.Location);
1567
#line 749 "Frames/cs.ATG"
1568
m.Add(Modifiers.Partial, t.Location);
1575
void ClassMemberDecl(
1576
#line 1076 "Frames/cs.ATG"
1577
ModifierList m, List<AttributeSection> attributes) {
1579
#line 1077 "Frames/cs.ATG"
1580
Statement stmt = null;
1583
#line 1079 "Frames/cs.ATG"
1585
} else if (la.kind == 27) {
1587
#line 1080 "Frames/cs.ATG"
1588
m.Check(Modifiers.Destructors); Location startPos = la.Location;
1592
#line 1081 "Frames/cs.ATG"
1593
DestructorDeclaration d = new DestructorDeclaration(t.val, m.Modifier, attributes);
1594
d.Modifier = m.Modifier;
1595
d.StartLocation = m.GetDeclarationLocation(startPos);
1600
#line 1085 "Frames/cs.ATG"
1601
d.EndLocation = t.EndLocation;
1602
if (la.kind == 16) {
1604
#line 1085 "Frames/cs.ATG"
1606
} else if (la.kind == 11) {
1610
#line 1086 "Frames/cs.ATG"
1611
d.Body = (BlockStatement)stmt;
1612
compilationUnit.AddChild(d);
1617
void StructMemberDecl(
1618
#line 753 "Frames/cs.ATG"
1619
ModifierList m, List<AttributeSection> attributes) {
1621
#line 755 "Frames/cs.ATG"
1622
string qualident = null;
1625
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
1626
Statement stmt = null;
1627
List<TemplateDefinition> templates = new List<TemplateDefinition>();
1628
TypeReference explicitInterface = null;
1629
bool isExtensionMethod = false;
1631
if (la.kind == 60) {
1633
#line 765 "Frames/cs.ATG"
1634
m.Check(Modifiers.Constants);
1637
#line 766 "Frames/cs.ATG"
1638
Location startPos = t.Location;
1640
#line 767 "Frames/cs.ATG"
1644
#line 767 "Frames/cs.ATG"
1645
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier | Modifiers.Const);
1646
fd.StartLocation = m.GetDeclarationLocation(startPos);
1647
VariableDeclaration f = new VariableDeclaration(t.val);
1648
f.StartLocation = t.Location;
1649
f.TypeReference = type;
1650
SafeAdd(fd, fd.Fields, f);
1654
#line 774 "Frames/cs.ATG"
1657
#line 774 "Frames/cs.ATG"
1658
f.Initializer = expr;
1659
while (la.kind == 14) {
1663
#line 775 "Frames/cs.ATG"
1664
f = new VariableDeclaration(t.val);
1665
f.StartLocation = t.Location;
1666
f.TypeReference = type;
1667
SafeAdd(fd, fd.Fields, f);
1671
#line 780 "Frames/cs.ATG"
1674
#line 780 "Frames/cs.ATG"
1675
f.EndLocation = t.EndLocation; f.Initializer = expr;
1679
#line 781 "Frames/cs.ATG"
1680
fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd);
1682
#line 785 "Frames/cs.ATG"
1685
#line 785 "Frames/cs.ATG"
1686
m.Check(Modifiers.PropertysEventsMethods);
1689
#line 786 "Frames/cs.ATG"
1690
Location startPos = t.Location;
1692
#line 787 "Frames/cs.ATG"
1693
IsExplicitInterfaceImplementation()) {
1695
#line 788 "Frames/cs.ATG"
1696
out explicitInterface, false);
1698
#line 789 "Frames/cs.ATG"
1699
if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) {
1700
qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface);
1702
} else if (StartOf(19)) {
1705
#line 792 "Frames/cs.ATG"
1708
if (la.kind == 23) {
1710
#line 795 "Frames/cs.ATG"
1714
if (la.kind == 111) {
1717
#line 798 "Frames/cs.ATG"
1718
isExtensionMethod = true; /* C# 3.0 */
1721
FormalParameterList(
1722
#line 799 "Frames/cs.ATG"
1727
#line 800 "Frames/cs.ATG"
1728
MethodDeclaration methodDeclaration = new MethodDeclaration {
1730
Modifier = m.Modifier,
1731
TypeReference = new TypeReference("System.Void", true),
1733
Attributes = attributes,
1734
StartLocation = m.GetDeclarationLocation(startPos),
1735
EndLocation = t.EndLocation,
1736
Templates = templates,
1737
IsExtensionMethod = isExtensionMethod
1739
if (explicitInterface != null)
1740
SafeAdd(methodDeclaration, methodDeclaration.InterfaceImplementations, new InterfaceImplementation(explicitInterface, qualident));
1741
compilationUnit.AddChild(methodDeclaration);
1742
compilationUnit.BlockStart(methodDeclaration);
1744
while (la.kind == 127) {
1745
TypeParameterConstraintsClause(
1746
#line 818 "Frames/cs.ATG"
1749
if (la.kind == 16) {
1751
#line 820 "Frames/cs.ATG"
1753
} else if (la.kind == 11) {
1757
#line 820 "Frames/cs.ATG"
1758
compilationUnit.BlockEnd();
1759
methodDeclaration.Body = (BlockStatement)stmt;
1761
} else if (la.kind == 69) {
1763
#line 824 "Frames/cs.ATG"
1764
m.Check(Modifiers.PropertysEventsMethods);
1767
#line 826 "Frames/cs.ATG"
1768
EventDeclaration eventDecl = new EventDeclaration {
1769
Modifier = m.Modifier,
1770
Attributes = attributes,
1771
StartLocation = t.Location
1773
compilationUnit.AddChild(eventDecl);
1774
compilationUnit.BlockStart(eventDecl);
1775
EventAddRegion addBlock = null;
1776
EventRemoveRegion removeBlock = null;
1779
#line 836 "Frames/cs.ATG"
1782
#line 836 "Frames/cs.ATG"
1783
eventDecl.TypeReference = type;
1785
#line 837 "Frames/cs.ATG"
1786
IsExplicitInterfaceImplementation()) {
1788
#line 838 "Frames/cs.ATG"
1789
out explicitInterface, false);
1791
#line 839 "Frames/cs.ATG"
1792
qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface);
1794
#line 840 "Frames/cs.ATG"
1795
eventDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
1796
} else if (StartOf(19)) {
1799
#line 842 "Frames/cs.ATG"
1803
#line 844 "Frames/cs.ATG"
1804
eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation;
1808
#line 845 "Frames/cs.ATG"
1811
#line 845 "Frames/cs.ATG"
1812
eventDecl.Initializer = expr;
1814
if (la.kind == 16) {
1817
#line 846 "Frames/cs.ATG"
1818
eventDecl.BodyStart = t.Location;
1820
#line 847 "Frames/cs.ATG"
1821
out addBlock, out removeBlock);
1824
#line 848 "Frames/cs.ATG"
1825
eventDecl.BodyEnd = t.EndLocation;
1828
#line 850 "Frames/cs.ATG"
1829
compilationUnit.BlockEnd();
1830
eventDecl.AddRegion = addBlock;
1831
eventDecl.RemoveRegion = removeBlock;
1833
while (la.kind == 14) {
1837
#line 854 "Frames/cs.ATG"
1838
EventDeclaration additionalEventDeclaration = new EventDeclaration {
1839
Modifier = eventDecl.Modifier,
1840
Attributes = eventDecl.Attributes,
1841
StartLocation = eventDecl.StartLocation,
1842
TypeReference = eventDecl.TypeReference,
1845
compilationUnit.AddChild (additionalEventDeclaration);
1848
if (la.kind == 11) {
1852
#line 868 "Frames/cs.ATG"
1855
#line 868 "Frames/cs.ATG"
1856
m.Check(Modifiers.Constructors | Modifiers.StaticConstructors);
1859
#line 869 "Frames/cs.ATG"
1860
string name = t.val; Location startPos = t.Location;
1864
#line 869 "Frames/cs.ATG"
1865
m.Check(Modifiers.Constructors);
1866
FormalParameterList(
1867
#line 870 "Frames/cs.ATG"
1872
#line 872 "Frames/cs.ATG"
1873
ConstructorInitializer init = null;
1876
#line 873 "Frames/cs.ATG"
1877
m.Check(Modifiers.Constructors);
1878
ConstructorInitializer(
1879
#line 874 "Frames/cs.ATG"
1883
#line 876 "Frames/cs.ATG"
1884
ConstructorDeclaration cd = new ConstructorDeclaration(name, m.Modifier, p, init, attributes);
1885
cd.StartLocation = startPos;
1886
cd.EndLocation = t.EndLocation;
1888
if (la.kind == 16) {
1890
#line 881 "Frames/cs.ATG"
1892
} else if (la.kind == 11) {
1896
#line 881 "Frames/cs.ATG"
1897
cd.Body = (BlockStatement)stmt; compilationUnit.AddChild(cd);
1898
} else if (la.kind == 70 || la.kind == 80) {
1900
#line 884 "Frames/cs.ATG"
1901
m.Check(Modifiers.Operators);
1902
if (m.isNone) Error("at least one modifier must be set");
1903
bool isImplicit = true;
1904
Location startPos = Location.Empty;
1906
if (la.kind == 80) {
1909
#line 889 "Frames/cs.ATG"
1910
startPos = t.Location;
1914
#line 889 "Frames/cs.ATG"
1915
isImplicit = false; startPos = t.Location;
1919
#line 890 "Frames/cs.ATG"
1922
#line 890 "Frames/cs.ATG"
1923
TypeReference operatorType = type;
1926
#line 891 "Frames/cs.ATG"
1930
#line 891 "Frames/cs.ATG"
1931
string varName = t.val;
1934
#line 892 "Frames/cs.ATG"
1935
Location endPos = t.Location;
1936
if (la.kind == 16) {
1938
#line 893 "Frames/cs.ATG"
1940
} else if (la.kind == 11) {
1943
#line 893 "Frames/cs.ATG"
1947
#line 896 "Frames/cs.ATG"
1948
List<ParameterDeclarationExpression> parameters = new List<ParameterDeclarationExpression>();
1949
parameters.Add(new ParameterDeclarationExpression(type, varName));
1950
OperatorDeclaration operatorDeclaration = new OperatorDeclaration {
1951
Name = (isImplicit ? "op_Implicit" : "op_Explicit"),
1952
Modifier = m.Modifier,
1953
Attributes = attributes,
1954
Parameters = parameters,
1955
TypeReference = operatorType,
1956
ConversionType = isImplicit ? ConversionType.Implicit : ConversionType.Explicit,
1957
Body = (BlockStatement)stmt,
1958
StartLocation = m.GetDeclarationLocation(startPos),
1959
EndLocation = endPos
1961
compilationUnit.AddChild(operatorDeclaration);
1963
} else if (StartOf(22)) {
1965
#line 914 "Frames/cs.ATG"
1967
} else if (StartOf(10)) {
1969
#line 916 "Frames/cs.ATG"
1972
#line 916 "Frames/cs.ATG"
1973
Location startPos = t.Location;
1974
if (la.kind == 92) {
1976
#line 918 "Frames/cs.ATG"
1977
OverloadableOperatorType op;
1978
m.Check(Modifiers.Operators);
1979
if (m.isNone) Error("at least one modifier must be set");
1982
OverloadableOperator(
1983
#line 922 "Frames/cs.ATG"
1986
#line 922 "Frames/cs.ATG"
1987
TypeReference firstType, secondType = null; string secondName = null;
1990
#line 923 "Frames/cs.ATG"
1994
#line 923 "Frames/cs.ATG"
1995
string firstName = t.val;
1996
if (la.kind == 14) {
1999
#line 924 "Frames/cs.ATG"
2003
#line 924 "Frames/cs.ATG"
2005
} else if (la.kind == 21) {
2008
#line 932 "Frames/cs.ATG"
2009
Location endPos = t.Location;
2011
if (la.kind == 16) {
2013
#line 933 "Frames/cs.ATG"
2015
} else if (la.kind == 11) {
2019
#line 935 "Frames/cs.ATG"
2020
if (op == OverloadableOperatorType.Add && secondType == null)
2021
op = OverloadableOperatorType.UnaryPlus;
2022
if (op == OverloadableOperatorType.Subtract && secondType == null)
2023
op = OverloadableOperatorType.UnaryMinus;
2024
OperatorDeclaration operatorDeclaration = new OperatorDeclaration {
2025
Modifier = m.Modifier,
2026
Attributes = attributes,
2027
TypeReference = type,
2028
OverloadableOperator = op,
2029
Name = GetReflectionNameForOperator(op),
2030
Body = (BlockStatement)stmt,
2031
StartLocation = m.GetDeclarationLocation(startPos),
2032
EndLocation = endPos
2034
SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(firstType, firstName));
2035
if (secondType != null) {
2036
SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(secondType, secondName));
2038
compilationUnit.AddChild(operatorDeclaration);
2041
#line 957 "Frames/cs.ATG"
2044
#line 958 "Frames/cs.ATG"
2045
m.Check(Modifiers.Fields);
2046
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
2047
fd.StartLocation = m.GetDeclarationLocation(startPos);
2050
#line 962 "Frames/cs.ATG"
2051
m.Contains(Modifiers.Fixed)) {
2053
#line 963 "Frames/cs.ATG"
2057
#line 965 "Frames/cs.ATG"
2060
#line 965 "Frames/cs.ATG"
2061
if (fd.Fields.Count > 0)
2062
fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr;
2064
while (la.kind == 14) {
2067
#line 969 "Frames/cs.ATG"
2071
#line 971 "Frames/cs.ATG"
2074
#line 971 "Frames/cs.ATG"
2075
if (fd.Fields.Count > 0)
2076
fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr;
2079
} else if (StartOf(19)) {
2081
#line 976 "Frames/cs.ATG"
2083
while (la.kind == 14) {
2086
#line 977 "Frames/cs.ATG"
2092
#line 979 "Frames/cs.ATG"
2093
fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd);
2094
} else if (la.kind == 111) {
2096
#line 982 "Frames/cs.ATG"
2097
m.Check(Modifiers.Indexers);
2100
FormalParameterList(
2101
#line 983 "Frames/cs.ATG"
2105
#line 983 "Frames/cs.ATG"
2106
Location endLocation = t.EndLocation;
2109
#line 984 "Frames/cs.ATG"
2110
IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
2111
indexer.StartLocation = startPos;
2112
indexer.EndLocation = endLocation;
2113
indexer.BodyStart = t.Location;
2114
PropertyGetRegion getRegion;
2115
PropertySetRegion setRegion;
2118
#line 991 "Frames/cs.ATG"
2119
out getRegion, out setRegion);
2122
#line 992 "Frames/cs.ATG"
2123
indexer.BodyEnd = t.EndLocation;
2124
indexer.GetRegion = getRegion;
2125
indexer.SetRegion = setRegion;
2126
compilationUnit.AddChild(indexer);
2129
#line 997 "Frames/cs.ATG"
2130
IsIdentifierToken(la)) {
2132
#line 998 "Frames/cs.ATG"
2133
IsExplicitInterfaceImplementation()) {
2135
#line 999 "Frames/cs.ATG"
2136
out explicitInterface, false);
2138
#line 1000 "Frames/cs.ATG"
2139
if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) {
2140
qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface);
2142
} else if (StartOf(19)) {
2145
#line 1003 "Frames/cs.ATG"
2149
#line 1005 "Frames/cs.ATG"
2150
Location qualIdentEndLocation = t.EndLocation;
2151
if (la.kind == 16 || la.kind == 20 || la.kind == 23) {
2152
if (la.kind == 20 || la.kind == 23) {
2154
#line 1009 "Frames/cs.ATG"
2155
m.Check(Modifiers.PropertysEventsMethods);
2156
if (la.kind == 23) {
2158
#line 1011 "Frames/cs.ATG"
2162
if (la.kind == 111) {
2165
#line 1013 "Frames/cs.ATG"
2166
isExtensionMethod = true;
2169
FormalParameterList(
2170
#line 1014 "Frames/cs.ATG"
2175
#line 1016 "Frames/cs.ATG"
2176
MethodDeclaration methodDeclaration = new MethodDeclaration {
2178
Modifier = m.Modifier,
2179
TypeReference = type,
2181
Attributes = attributes
2183
if (explicitInterface != null)
2184
methodDeclaration.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
2185
methodDeclaration.StartLocation = m.GetDeclarationLocation(startPos);
2186
methodDeclaration.EndLocation = t.EndLocation;
2187
methodDeclaration.IsExtensionMethod = isExtensionMethod;
2188
methodDeclaration.Templates = templates;
2189
compilationUnit.AddChild(methodDeclaration);
2191
while (la.kind == 127) {
2192
TypeParameterConstraintsClause(
2193
#line 1031 "Frames/cs.ATG"
2196
if (la.kind == 16) {
2198
#line 1032 "Frames/cs.ATG"
2200
} else if (la.kind == 11) {
2204
#line 1032 "Frames/cs.ATG"
2205
methodDeclaration.Body = (BlockStatement)stmt;
2209
#line 1035 "Frames/cs.ATG"
2210
PropertyDeclaration pDecl = new PropertyDeclaration(qualident, type, m.Modifier, attributes);
2211
if (explicitInterface != null)
2212
pDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
2213
pDecl.StartLocation = m.GetDeclarationLocation(startPos);
2214
pDecl.EndLocation = qualIdentEndLocation;
2215
pDecl.BodyStart = t.Location;
2216
PropertyGetRegion getRegion;
2217
PropertySetRegion setRegion;
2220
#line 1044 "Frames/cs.ATG"
2221
out getRegion, out setRegion);
2224
#line 1046 "Frames/cs.ATG"
2225
pDecl.GetRegion = getRegion;
2226
pDecl.SetRegion = setRegion;
2227
pDecl.BodyEnd = t.EndLocation;
2228
compilationUnit.AddChild(pDecl);
2231
} else if (la.kind == 15) {
2233
#line 1054 "Frames/cs.ATG"
2234
m.Check(Modifiers.Indexers);
2238
FormalParameterList(
2239
#line 1055 "Frames/cs.ATG"
2243
#line 1056 "Frames/cs.ATG"
2244
IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
2245
indexer.StartLocation = m.GetDeclarationLocation(startPos);
2246
indexer.EndLocation = t.EndLocation;
2247
if (explicitInterface != null)
2248
SafeAdd(indexer, indexer.InterfaceImplementations, new InterfaceImplementation(explicitInterface, "this"));
2249
PropertyGetRegion getRegion;
2250
PropertySetRegion setRegion;
2254
#line 1064 "Frames/cs.ATG"
2255
Location bodyStart = t.Location;
2257
#line 1065 "Frames/cs.ATG"
2258
out getRegion, out setRegion);
2261
#line 1066 "Frames/cs.ATG"
2262
indexer.BodyStart = bodyStart;
2263
indexer.BodyEnd = t.EndLocation;
2264
indexer.GetRegion = getRegion;
2265
indexer.SetRegion = setRegion;
2266
compilationUnit.AddChild(indexer);
2273
void InterfaceMemberDecl() {
2275
#line 1093 "Frames/cs.ATG"
2277
AttributeSection section;
2278
Modifiers mod = Modifiers.None;
2279
List<AttributeSection> attributes = new List<AttributeSection>();
2280
List<ParameterDeclarationExpression> parameters = new List<ParameterDeclarationExpression>();
2282
PropertyGetRegion getBlock;
2283
PropertySetRegion setBlock;
2284
Location startLocation = new Location(-1, -1);
2285
List<TemplateDefinition> templates = new List<TemplateDefinition>();
2287
while (la.kind == 18) {
2289
#line 1106 "Frames/cs.ATG"
2292
#line 1106 "Frames/cs.ATG"
2293
attributes.Add(section);
2295
if (la.kind == 89) {
2298
#line 1107 "Frames/cs.ATG"
2299
mod = Modifiers.New; startLocation = t.Location;
2302
#line 1110 "Frames/cs.ATG"
2306
#line 1110 "Frames/cs.ATG"
2307
if (startLocation.IsEmpty) startLocation = t.Location;
2310
#line 1111 "Frames/cs.ATG"
2312
if (la.kind == 23) {
2314
#line 1112 "Frames/cs.ATG"
2319
FormalParameterList(
2320
#line 1113 "Frames/cs.ATG"
2324
while (la.kind == 127) {
2325
TypeParameterConstraintsClause(
2326
#line 1114 "Frames/cs.ATG"
2331
#line 1116 "Frames/cs.ATG"
2332
MethodDeclaration md = new MethodDeclaration {
2333
Name = name, Modifier = mod, TypeReference = new TypeReference("System.Void", true),
2334
Parameters = parameters, Attributes = attributes, Templates = templates,
2335
StartLocation = startLocation, EndLocation = t.EndLocation
2337
compilationUnit.AddChild(md);
2339
} else if (StartOf(23)) {
2342
#line 1124 "Frames/cs.ATG"
2345
#line 1124 "Frames/cs.ATG"
2346
if (startLocation.IsEmpty) startLocation = t.Location;
2350
#line 1126 "Frames/cs.ATG"
2351
name = t.val; Location qualIdentEndLocation = t.EndLocation;
2352
if (la.kind == 20 || la.kind == 23) {
2353
if (la.kind == 23) {
2355
#line 1130 "Frames/cs.ATG"
2360
FormalParameterList(
2361
#line 1131 "Frames/cs.ATG"
2365
while (la.kind == 127) {
2366
TypeParameterConstraintsClause(
2367
#line 1133 "Frames/cs.ATG"
2372
#line 1134 "Frames/cs.ATG"
2373
MethodDeclaration md = new MethodDeclaration {
2374
Name = name, Modifier = mod, TypeReference = type,
2375
Parameters = parameters, Attributes = attributes, Templates = templates,
2376
StartLocation = startLocation, EndLocation = t.EndLocation
2378
compilationUnit.AddChild(md);
2380
} else if (la.kind == 16) {
2382
#line 1143 "Frames/cs.ATG"
2383
PropertyDeclaration pd = new PropertyDeclaration(name, type, mod, attributes);
2384
compilationUnit.AddChild(pd);
2387
#line 1146 "Frames/cs.ATG"
2388
Location bodyStart = t.Location;
2390
#line 1147 "Frames/cs.ATG"
2391
out getBlock, out setBlock);
2394
#line 1148 "Frames/cs.ATG"
2395
pd.GetRegion = getBlock; pd.SetRegion = setBlock; pd.StartLocation = startLocation; pd.EndLocation = qualIdentEndLocation; pd.BodyStart = bodyStart; pd.BodyEnd = t.EndLocation;
2397
} else if (la.kind == 111) {
2400
FormalParameterList(
2401
#line 1151 "Frames/cs.ATG"
2405
#line 1152 "Frames/cs.ATG"
2406
Location bracketEndLocation = t.EndLocation;
2408
#line 1153 "Frames/cs.ATG"
2409
IndexerDeclaration id = new IndexerDeclaration(type, parameters, mod, attributes);
2410
compilationUnit.AddChild(id);
2413
#line 1155 "Frames/cs.ATG"
2414
Location bodyStart = t.Location;
2416
#line 1156 "Frames/cs.ATG"
2417
out getBlock, out setBlock);
2420
#line 1158 "Frames/cs.ATG"
2421
id.GetRegion = getBlock; id.SetRegion = setBlock; id.StartLocation = startLocation; id.EndLocation = bracketEndLocation; id.BodyStart = bodyStart; id.BodyEnd = t.EndLocation;
2426
#line 1161 "Frames/cs.ATG"
2427
if (startLocation.IsEmpty) startLocation = t.Location;
2429
#line 1162 "Frames/cs.ATG"
2433
#line 1163 "Frames/cs.ATG"
2434
EventDeclaration ed = new EventDeclaration {
2435
TypeReference = type, Name = t.val, Modifier = mod, Attributes = attributes
2437
compilationUnit.AddChild(ed);
2441
#line 1169 "Frames/cs.ATG"
2442
ed.StartLocation = startLocation; ed.EndLocation = t.EndLocation;
2447
void EnumMemberDecl(
2448
#line 1174 "Frames/cs.ATG"
2449
out FieldDeclaration f) {
2451
#line 1176 "Frames/cs.ATG"
2452
Expression expr = null;
2453
List<AttributeSection> attributes = new List<AttributeSection>();
2454
AttributeSection section = null;
2455
VariableDeclaration varDecl = null;
2457
while (la.kind == 18) {
2459
#line 1182 "Frames/cs.ATG"
2462
#line 1182 "Frames/cs.ATG"
2463
attributes.Add(section);
2467
#line 1183 "Frames/cs.ATG"
2468
f = new FieldDeclaration(attributes);
2469
varDecl = new VariableDeclaration(t.val);
2470
f.Fields.Add(varDecl);
2471
f.StartLocation = t.Location;
2472
f.EndLocation = t.EndLocation;
2477
#line 1189 "Frames/cs.ATG"
2480
#line 1189 "Frames/cs.ATG"
2481
varDecl.Initializer = expr;
2485
void TypeWithRestriction(
2486
#line 571 "Frames/cs.ATG"
2487
out TypeReference type, bool allowNullable, bool canBeUnbound) {
2489
#line 573 "Frames/cs.ATG"
2490
Location startPos = la.Location;
2497
#line 579 "Frames/cs.ATG"
2498
out type, canBeUnbound);
2499
} else if (StartOf(5)) {
2501
#line 580 "Frames/cs.ATG"
2504
#line 580 "Frames/cs.ATG"
2505
type = new TypeReference(name, true);
2506
} else if (la.kind == 123) {
2510
#line 581 "Frames/cs.ATG"
2511
pointer = 1; type = new TypeReference("System.Void", true);
2514
#line 582 "Frames/cs.ATG"
2515
List<int> r = new List<int>();
2517
#line 584 "Frames/cs.ATG"
2518
allowNullable && la.kind == Tokens.Question) {
2519
NullableQuestionMark(
2520
#line 584 "Frames/cs.ATG"
2524
#line 586 "Frames/cs.ATG"
2525
IsPointerOrDims()) {
2527
#line 586 "Frames/cs.ATG"
2532
#line 587 "Frames/cs.ATG"
2534
} else if (la.kind == 18) {
2536
while (la.kind == 14) {
2539
#line 588 "Frames/cs.ATG"
2544
#line 588 "Frames/cs.ATG"
2549
#line 591 "Frames/cs.ATG"
2551
type.RankSpecifier = r.ToArray();
2552
type.PointerNestingLevel = pointer;
2553
type.EndLocation = t.EndLocation;
2554
type.StartLocation = startPos;
2560
#line 627 "Frames/cs.ATG"
2563
#line 628 "Frames/cs.ATG"
2564
name = String.Empty;
2567
#line 630 "Frames/cs.ATG"
2569
} else if (la.kind == 75) {
2572
#line 631 "Frames/cs.ATG"
2573
name = "System.Single";
2574
} else if (la.kind == 66) {
2577
#line 632 "Frames/cs.ATG"
2578
name = "System.Double";
2579
} else if (la.kind == 62) {
2582
#line 633 "Frames/cs.ATG"
2583
name = "System.Decimal";
2584
} else if (la.kind == 52) {
2587
#line 634 "Frames/cs.ATG"
2588
name = "System.Boolean";
2592
void NullableQuestionMark(
2593
#line 2355 "Frames/cs.ATG"
2594
ref TypeReference typeRef) {
2596
#line 2356 "Frames/cs.ATG"
2597
List<TypeReference> typeArguments = new List<TypeReference>(1);
2600
#line 2360 "Frames/cs.ATG"
2601
if (typeRef != null) typeArguments.Add(typeRef);
2602
typeRef = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true };
2606
void FixedParameter(
2607
#line 664 "Frames/cs.ATG"
2608
out ParameterDeclarationExpression p) {
2610
#line 666 "Frames/cs.ATG"
2612
ParameterModifiers mod = ParameterModifiers.In;
2613
Location start = la.Location;
2614
Expression defaultParameterExpr = null;
2616
if (la.kind == 93 || la.kind == 100) {
2617
if (la.kind == 100) {
2620
#line 673 "Frames/cs.ATG"
2621
mod = ParameterModifiers.Ref;
2625
#line 674 "Frames/cs.ATG"
2626
mod = ParameterModifiers.Out;
2630
#line 676 "Frames/cs.ATG"
2634
#line 676 "Frames/cs.ATG"
2635
p = new ParameterDeclarationExpression(type, t.val, mod); p.StartLocation = start; p.EndLocation = t.Location;
2639
#line 677 "Frames/cs.ATG"
2640
out defaultParameterExpr);
2644
void ParameterArray(
2645
#line 680 "Frames/cs.ATG"
2646
out ParameterDeclarationExpression p) {
2648
#line 681 "Frames/cs.ATG"
2652
#line 683 "Frames/cs.ATG"
2656
#line 683 "Frames/cs.ATG"
2657
p = new ParameterDeclarationExpression(type, t.val, ParameterModifiers.Params);
2660
void AccessorModifiers(
2661
#line 686 "Frames/cs.ATG"
2662
out ModifierList m) {
2664
#line 687 "Frames/cs.ATG"
2665
m = new ModifierList();
2666
if (la.kind == 96) {
2669
#line 689 "Frames/cs.ATG"
2670
m.Add(Modifiers.Private, t.Location);
2671
} else if (la.kind == 97) {
2674
#line 690 "Frames/cs.ATG"
2675
m.Add(Modifiers.Protected, t.Location);
2676
if (la.kind == 84) {
2679
#line 691 "Frames/cs.ATG"
2680
m.Add(Modifiers.Internal, t.Location);
2682
} else if (la.kind == 84) {
2685
#line 692 "Frames/cs.ATG"
2686
m.Add(Modifiers.Internal, t.Location);
2687
if (la.kind == 97) {
2690
#line 693 "Frames/cs.ATG"
2691
m.Add(Modifiers.Protected, t.Location);
2697
#line 1309 "Frames/cs.ATG"
2698
out Statement stmt) {
2701
#line 1311 "Frames/cs.ATG"
2702
BlockStatement blockStmt = new BlockStatement();
2703
blockStmt.StartLocation = t.Location;
2704
compilationUnit.BlockStart(blockStmt);
2705
if (!ParseMethodBodies) lexer.SkipCurrentBlock(0);
2707
while (StartOf(25)) {
2710
while (!(la.kind == 0 || la.kind == 17)) {SynErr(182); lexer.NextToken(); }
2713
#line 1319 "Frames/cs.ATG"
2715
blockStmt.EndLocation = t.Kind != Tokens.CloseCurlyBrace ? Location.Empty : t.EndLocation;
2716
compilationUnit.BlockEnd();
2720
void EventAccessorDecls(
2721
#line 1246 "Frames/cs.ATG"
2722
out EventAddRegion addBlock, out EventRemoveRegion removeBlock) {
2724
#line 1247 "Frames/cs.ATG"
2725
AttributeSection section;
2726
List<AttributeSection> attributes = new List<AttributeSection>();
2731
while (la.kind == 18) {
2733
#line 1254 "Frames/cs.ATG"
2736
#line 1254 "Frames/cs.ATG"
2737
attributes.Add(section);
2739
if (la.kind == 130) {
2741
#line 1256 "Frames/cs.ATG"
2742
addBlock = new EventAddRegion(attributes);
2744
#line 1257 "Frames/cs.ATG"
2747
#line 1257 "Frames/cs.ATG"
2748
attributes = new List<AttributeSection>(); addBlock.Block = (BlockStatement)stmt;
2749
while (la.kind == 18) {
2751
#line 1258 "Frames/cs.ATG"
2754
#line 1258 "Frames/cs.ATG"
2755
attributes.Add(section);
2758
#line 1259 "Frames/cs.ATG"
2761
#line 1259 "Frames/cs.ATG"
2762
removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt;
2763
} else if (la.kind == 131) {
2765
#line 1261 "Frames/cs.ATG"
2768
#line 1261 "Frames/cs.ATG"
2769
removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new List<AttributeSection>();
2770
while (la.kind == 18) {
2772
#line 1262 "Frames/cs.ATG"
2775
#line 1262 "Frames/cs.ATG"
2776
attributes.Add(section);
2779
#line 1263 "Frames/cs.ATG"
2782
#line 1263 "Frames/cs.ATG"
2783
addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt;
2787
void ConstructorInitializer(
2788
#line 1339 "Frames/cs.ATG"
2789
out ConstructorInitializer ci) {
2791
#line 1340 "Frames/cs.ATG"
2792
Expression expr; ci = new ConstructorInitializer();
2794
if (la.kind == 51) {
2797
#line 1344 "Frames/cs.ATG"
2798
ci.ConstructorInitializerType = ConstructorInitializerType.Base;
2799
} else if (la.kind == 111) {
2802
#line 1345 "Frames/cs.ATG"
2803
ci.ConstructorInitializerType = ConstructorInitializerType.This;
2808
#line 1348 "Frames/cs.ATG"
2811
#line 1348 "Frames/cs.ATG"
2812
SafeAdd(ci, ci.Arguments, expr);
2813
while (la.kind == 14) {
2816
#line 1349 "Frames/cs.ATG"
2819
#line 1349 "Frames/cs.ATG"
2820
SafeAdd(ci, ci.Arguments, expr);
2826
void OverloadableOperator(
2827
#line 1362 "Frames/cs.ATG"
2828
out OverloadableOperatorType op) {
2830
#line 1363 "Frames/cs.ATG"
2831
op = OverloadableOperatorType.None;
2836
#line 1365 "Frames/cs.ATG"
2837
op = OverloadableOperatorType.Add;
2843
#line 1366 "Frames/cs.ATG"
2844
op = OverloadableOperatorType.Subtract;
2850
#line 1368 "Frames/cs.ATG"
2851
op = OverloadableOperatorType.Not;
2857
#line 1369 "Frames/cs.ATG"
2858
op = OverloadableOperatorType.BitNot;
2864
#line 1371 "Frames/cs.ATG"
2865
op = OverloadableOperatorType.Increment;
2871
#line 1372 "Frames/cs.ATG"
2872
op = OverloadableOperatorType.Decrement;
2878
#line 1374 "Frames/cs.ATG"
2879
op = OverloadableOperatorType.IsTrue;
2885
#line 1375 "Frames/cs.ATG"
2886
op = OverloadableOperatorType.IsFalse;
2892
#line 1377 "Frames/cs.ATG"
2893
op = OverloadableOperatorType.Multiply;
2899
#line 1378 "Frames/cs.ATG"
2900
op = OverloadableOperatorType.Divide;
2906
#line 1379 "Frames/cs.ATG"
2907
op = OverloadableOperatorType.Modulus;
2913
#line 1381 "Frames/cs.ATG"
2914
op = OverloadableOperatorType.BitwiseAnd;
2920
#line 1382 "Frames/cs.ATG"
2921
op = OverloadableOperatorType.BitwiseOr;
2927
#line 1383 "Frames/cs.ATG"
2928
op = OverloadableOperatorType.ExclusiveOr;
2934
#line 1385 "Frames/cs.ATG"
2935
op = OverloadableOperatorType.ShiftLeft;
2941
#line 1386 "Frames/cs.ATG"
2942
op = OverloadableOperatorType.Equality;
2948
#line 1387 "Frames/cs.ATG"
2949
op = OverloadableOperatorType.InEquality;
2955
#line 1388 "Frames/cs.ATG"
2956
op = OverloadableOperatorType.LessThan;
2962
#line 1389 "Frames/cs.ATG"
2963
op = OverloadableOperatorType.GreaterThanOrEqual;
2969
#line 1390 "Frames/cs.ATG"
2970
op = OverloadableOperatorType.LessThanOrEqual;
2976
#line 1391 "Frames/cs.ATG"
2977
op = OverloadableOperatorType.GreaterThan;
2978
if (la.kind == 22) {
2981
#line 1391 "Frames/cs.ATG"
2982
op = OverloadableOperatorType.ShiftRight;
2986
default: SynErr(185); break;
2990
void VariableDeclarator(
2991
#line 1301 "Frames/cs.ATG"
2992
FieldDeclaration parentFieldDeclaration) {
2994
#line 1302 "Frames/cs.ATG"
2995
Expression expr = null;
2998
#line 1304 "Frames/cs.ATG"
2999
VariableDeclaration f = new VariableDeclaration(t.val); f.StartLocation = t.Location;
3002
VariableInitializer(
3003
#line 1305 "Frames/cs.ATG"
3006
#line 1305 "Frames/cs.ATG"
3007
f.Initializer = expr;
3010
#line 1306 "Frames/cs.ATG"
3011
f.EndLocation = t.EndLocation; SafeAdd(parentFieldDeclaration, parentFieldDeclaration.Fields, f);
3015
#line 1193 "Frames/cs.ATG"
3016
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
3018
#line 1195 "Frames/cs.ATG"
3019
List<AttributeSection> attributes = new List<AttributeSection>();
3020
AttributeSection section;
3023
ModifierList modifiers = null;
3025
while (la.kind == 18) {
3027
#line 1202 "Frames/cs.ATG"
3030
#line 1202 "Frames/cs.ATG"
3031
attributes.Add(section);
3033
if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
3035
#line 1203 "Frames/cs.ATG"
3038
if (la.kind == 128) {
3040
#line 1205 "Frames/cs.ATG"
3041
out getBlock, attributes);
3043
#line 1206 "Frames/cs.ATG"
3044
if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; }
3047
#line 1207 "Frames/cs.ATG"
3048
attributes = new List<AttributeSection>(); modifiers = null;
3049
while (la.kind == 18) {
3051
#line 1208 "Frames/cs.ATG"
3054
#line 1208 "Frames/cs.ATG"
3055
attributes.Add(section);
3057
if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
3059
#line 1209 "Frames/cs.ATG"
3063
#line 1210 "Frames/cs.ATG"
3064
out setBlock, attributes);
3066
#line 1211 "Frames/cs.ATG"
3067
if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; }
3069
} else if (la.kind == 129) {
3071
#line 1214 "Frames/cs.ATG"
3072
out setBlock, attributes);
3074
#line 1215 "Frames/cs.ATG"
3075
if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; }
3078
#line 1216 "Frames/cs.ATG"
3079
attributes = new List<AttributeSection>(); modifiers = null;
3080
while (la.kind == 18) {
3082
#line 1217 "Frames/cs.ATG"
3085
#line 1217 "Frames/cs.ATG"
3086
attributes.Add(section);
3088
if (la.kind == 84 || la.kind == 96 || la.kind == 97) {
3090
#line 1218 "Frames/cs.ATG"
3094
#line 1219 "Frames/cs.ATG"
3095
out getBlock, attributes);
3097
#line 1220 "Frames/cs.ATG"
3098
if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; }
3100
} else if (StartOf(19)) {
3103
#line 1222 "Frames/cs.ATG"
3104
Error("get or set accessor declaration expected");
3108
void InterfaceAccessors(
3109
#line 1267 "Frames/cs.ATG"
3110
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
3112
#line 1269 "Frames/cs.ATG"
3113
AttributeSection section;
3114
List<AttributeSection> attributes = new List<AttributeSection>();
3115
getBlock = null; setBlock = null;
3116
PropertyGetSetRegion lastBlock = null;
3118
while (la.kind == 18) {
3120
#line 1275 "Frames/cs.ATG"
3123
#line 1275 "Frames/cs.ATG"
3124
attributes.Add(section);
3127
#line 1276 "Frames/cs.ATG"
3128
Location startLocation = la.Location;
3129
if (la.kind == 128) {
3132
#line 1278 "Frames/cs.ATG"
3133
getBlock = new PropertyGetRegion(null, attributes);
3134
} else if (la.kind == 129) {
3137
#line 1279 "Frames/cs.ATG"
3138
setBlock = new PropertySetRegion(null, attributes);
3142
#line 1282 "Frames/cs.ATG"
3143
if (getBlock != null) { getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; }
3144
if (setBlock != null) { setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; }
3145
attributes = new List<AttributeSection>();
3146
if (la.kind == 18 || la.kind == 128 || la.kind == 129) {
3147
while (la.kind == 18) {
3149
#line 1286 "Frames/cs.ATG"
3152
#line 1286 "Frames/cs.ATG"
3153
attributes.Add(section);
3156
#line 1287 "Frames/cs.ATG"
3157
startLocation = la.Location;
3158
if (la.kind == 128) {
3161
#line 1289 "Frames/cs.ATG"
3162
if (getBlock != null) Error("get already declared");
3163
else { getBlock = new PropertyGetRegion(null, attributes); lastBlock = getBlock; }
3165
} else if (la.kind == 129) {
3168
#line 1292 "Frames/cs.ATG"
3169
if (setBlock != null) Error("set already declared");
3170
else { setBlock = new PropertySetRegion(null, attributes); lastBlock = setBlock; }
3175
#line 1297 "Frames/cs.ATG"
3176
if (lastBlock != null) { lastBlock.StartLocation = startLocation; lastBlock.EndLocation = t.EndLocation; }
3180
void GetAccessorDecl(
3181
#line 1226 "Frames/cs.ATG"
3182
out PropertyGetRegion getBlock, List<AttributeSection> attributes) {
3184
#line 1227 "Frames/cs.ATG"
3185
Statement stmt = null;
3188
#line 1230 "Frames/cs.ATG"
3189
Location startLocation = t.Location;
3190
if (la.kind == 16) {
3192
#line 1231 "Frames/cs.ATG"
3194
} else if (la.kind == 11) {
3198
#line 1232 "Frames/cs.ATG"
3199
getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
3201
#line 1233 "Frames/cs.ATG"
3202
getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation;
3205
void SetAccessorDecl(
3206
#line 1236 "Frames/cs.ATG"
3207
out PropertySetRegion setBlock, List<AttributeSection> attributes) {
3209
#line 1237 "Frames/cs.ATG"
3210
Statement stmt = null;
3213
#line 1240 "Frames/cs.ATG"
3214
Location startLocation = t.Location;
3215
if (la.kind == 16) {
3217
#line 1241 "Frames/cs.ATG"
3219
} else if (la.kind == 11) {
3223
#line 1242 "Frames/cs.ATG"
3224
setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
3226
#line 1243 "Frames/cs.ATG"
3227
setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation;
3230
void AddAccessorDecl(
3231
#line 1325 "Frames/cs.ATG"
3232
out Statement stmt) {
3234
#line 1326 "Frames/cs.ATG"
3238
#line 1329 "Frames/cs.ATG"
3242
void RemoveAccessorDecl(
3243
#line 1332 "Frames/cs.ATG"
3244
out Statement stmt) {
3246
#line 1333 "Frames/cs.ATG"
3250
#line 1336 "Frames/cs.ATG"
3254
void VariableInitializer(
3255
#line 1354 "Frames/cs.ATG"
3256
out Expression initializerExpression) {
3258
#line 1355 "Frames/cs.ATG"
3259
TypeReference type = null; Expression expr = null; initializerExpression = null;
3262
#line 1357 "Frames/cs.ATG"
3263
out initializerExpression);
3264
} else if (la.kind == 16) {
3265
CollectionInitializer(
3266
#line 1358 "Frames/cs.ATG"
3267
out initializerExpression);
3268
} else if (la.kind == 106) {
3271
#line 1359 "Frames/cs.ATG"
3275
#line 1359 "Frames/cs.ATG"
3279
#line 1359 "Frames/cs.ATG"
3280
initializerExpression = new StackAllocExpression(type, expr);
3286
#line 1502 "Frames/cs.ATG"
3289
Statement stmt = null;
3290
Location startPos = la.Location;
3292
while (!(StartOf(29))) {SynErr(192); lexer.NextToken(); }
3294
#line 1511 "Frames/cs.ATG"
3298
#line 1511 "Frames/cs.ATG"
3299
compilationUnit.AddChild(new LabelStatement(t.val));
3302
} else if (la.kind == 60) {
3305
#line 1514 "Frames/cs.ATG"
3308
#line 1514 "Frames/cs.ATG"
3309
LocalVariableDeclaration var = new LocalVariableDeclaration(type, Modifiers.Const); string ident = null; var.StartLocation = t.Location;
3312
#line 1515 "Frames/cs.ATG"
3313
ident = t.val; Location varStart = t.Location;
3316
#line 1516 "Frames/cs.ATG"
3319
#line 1518 "Frames/cs.ATG"
3320
SafeAdd(var, var.Variables, new VariableDeclaration(ident, expr) {
3321
StartLocation = varStart,
3322
EndLocation = t.EndLocation,
3323
TypeReference = type
3326
while (la.kind == 14) {
3330
#line 1524 "Frames/cs.ATG"
3334
#line 1524 "Frames/cs.ATG"
3337
#line 1526 "Frames/cs.ATG"
3338
SafeAdd(var, var.Variables, new VariableDeclaration(ident, expr) {
3339
StartLocation = varStart,
3340
EndLocation = t.EndLocation,
3341
TypeReference = type
3347
#line 1532 "Frames/cs.ATG"
3348
var.EndLocation = t.EndLocation; if (t.Kind == Tokens.Semicolon) var.SemicolonPosition = t.EndLocation; compilationUnit.AddChild(var);
3350
#line 1535 "Frames/cs.ATG"
3353
#line 1535 "Frames/cs.ATG"
3357
#line 1535 "Frames/cs.ATG"
3358
if (t.Kind == Tokens.Semicolon) ((LocalVariableDeclaration)stmt).SemicolonPosition = t.EndLocation; compilationUnit.AddChild(stmt);
3359
} else if (StartOf(30)) {
3361
#line 1537 "Frames/cs.ATG"
3364
#line 1537 "Frames/cs.ATG"
3365
compilationUnit.AddChild(stmt);
3368
#line 1543 "Frames/cs.ATG"
3370
stmt.StartLocation = startPos;
3371
stmt.EndLocation = t.EndLocation;
3377
#line 1394 "Frames/cs.ATG"
3378
out Expression argumentexpr) {
3380
#line 1396 "Frames/cs.ATG"
3382
FieldDirection fd = FieldDirection.None;
3384
if (la.kind == 93 || la.kind == 100) {
3385
if (la.kind == 100) {
3388
#line 1401 "Frames/cs.ATG"
3389
fd = FieldDirection.Ref;
3393
#line 1402 "Frames/cs.ATG"
3394
fd = FieldDirection.Out;
3398
#line 1404 "Frames/cs.ATG"
3401
#line 1405 "Frames/cs.ATG"
3402
argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr;
3405
void CollectionInitializer(
3406
#line 1425 "Frames/cs.ATG"
3407
out Expression outExpr) {
3409
#line 1427 "Frames/cs.ATG"
3410
Expression expr = null;
3411
CollectionInitializerExpression initializer = new CollectionInitializerExpression();
3415
#line 1431 "Frames/cs.ATG"
3416
initializer.StartLocation = t.Location;
3418
VariableInitializer(
3419
#line 1432 "Frames/cs.ATG"
3422
#line 1433 "Frames/cs.ATG"
3423
SafeAdd(initializer, initializer.CreateExpressions, expr);
3425
#line 1434 "Frames/cs.ATG"
3428
VariableInitializer(
3429
#line 1435 "Frames/cs.ATG"
3432
#line 1436 "Frames/cs.ATG"
3433
SafeAdd(initializer, initializer.CreateExpressions, expr);
3435
if (la.kind == 14) {
3441
#line 1440 "Frames/cs.ATG"
3442
initializer.EndLocation = t.Location; outExpr = initializer;
3445
void AssignmentOperator(
3446
#line 1408 "Frames/cs.ATG"
3447
out AssignmentOperatorType op) {
3449
#line 1409 "Frames/cs.ATG"
3450
op = AssignmentOperatorType.None;
3454
#line 1411 "Frames/cs.ATG"
3455
op = AssignmentOperatorType.Assign;
3456
} else if (la.kind == 38) {
3459
#line 1412 "Frames/cs.ATG"
3460
op = AssignmentOperatorType.Add;
3461
} else if (la.kind == 39) {
3464
#line 1413 "Frames/cs.ATG"
3465
op = AssignmentOperatorType.Subtract;
3466
} else if (la.kind == 40) {
3469
#line 1414 "Frames/cs.ATG"
3470
op = AssignmentOperatorType.Multiply;
3471
} else if (la.kind == 41) {
3474
#line 1415 "Frames/cs.ATG"
3475
op = AssignmentOperatorType.Divide;
3476
} else if (la.kind == 42) {
3479
#line 1416 "Frames/cs.ATG"
3480
op = AssignmentOperatorType.Modulus;
3481
} else if (la.kind == 43) {
3484
#line 1417 "Frames/cs.ATG"
3485
op = AssignmentOperatorType.BitwiseAnd;
3486
} else if (la.kind == 44) {
3489
#line 1418 "Frames/cs.ATG"
3490
op = AssignmentOperatorType.BitwiseOr;
3491
} else if (la.kind == 45) {
3494
#line 1419 "Frames/cs.ATG"
3495
op = AssignmentOperatorType.ExclusiveOr;
3496
} else if (la.kind == 46) {
3499
#line 1420 "Frames/cs.ATG"
3500
op = AssignmentOperatorType.ShiftLeft;
3502
#line 1421 "Frames/cs.ATG"
3503
la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) {
3507
#line 1422 "Frames/cs.ATG"
3508
op = AssignmentOperatorType.ShiftRight;
3512
void CollectionOrObjectInitializer(
3513
#line 1443 "Frames/cs.ATG"
3514
out Expression outExpr) {
3516
#line 1445 "Frames/cs.ATG"
3517
Expression expr = null;
3518
CollectionInitializerExpression initializer = new CollectionInitializerExpression();
3522
#line 1449 "Frames/cs.ATG"
3523
initializer.StartLocation = t.Location;
3525
ObjectPropertyInitializerOrVariableInitializer(
3526
#line 1450 "Frames/cs.ATG"
3529
#line 1451 "Frames/cs.ATG"
3530
SafeAdd(initializer, initializer.CreateExpressions, expr);
3532
#line 1452 "Frames/cs.ATG"
3535
ObjectPropertyInitializerOrVariableInitializer(
3536
#line 1453 "Frames/cs.ATG"
3539
#line 1454 "Frames/cs.ATG"
3540
SafeAdd(initializer, initializer.CreateExpressions, expr);
3542
if (la.kind == 14) {
3548
#line 1458 "Frames/cs.ATG"
3549
initializer.EndLocation = t.Location; outExpr = initializer;
3552
void ObjectPropertyInitializerOrVariableInitializer(
3553
#line 1461 "Frames/cs.ATG"
3554
out Expression expr) {
3556
#line 1462 "Frames/cs.ATG"
3559
#line 1464 "Frames/cs.ATG"
3563
#line 1466 "Frames/cs.ATG"
3564
NamedArgumentExpression nae = new NamedArgumentExpression(t.val, null);
3565
nae.StartLocation = t.Location;
3566
Expression r = null;
3568
if (la.kind == 16) {
3569
CollectionOrObjectInitializer(
3570
#line 1470 "Frames/cs.ATG"
3572
} else if (StartOf(31)) {
3573
VariableInitializer(
3574
#line 1471 "Frames/cs.ATG"
3578
#line 1472 "Frames/cs.ATG"
3579
nae.Expression = r; nae.EndLocation = t.EndLocation; expr = nae;
3580
} else if (StartOf(31)) {
3581
VariableInitializer(
3582
#line 1474 "Frames/cs.ATG"
3587
void LocalVariableDecl(
3588
#line 1478 "Frames/cs.ATG"
3589
out Statement stmt) {
3591
#line 1480 "Frames/cs.ATG"
3593
VariableDeclaration var = null;
3594
LocalVariableDeclaration localVariableDeclaration;
3595
Location startPos = la.Location;
3598
#line 1486 "Frames/cs.ATG"
3601
#line 1486 "Frames/cs.ATG"
3602
localVariableDeclaration = new LocalVariableDeclaration(type); localVariableDeclaration.StartLocation = startPos;
3603
LocalVariableDeclarator(
3604
#line 1487 "Frames/cs.ATG"
3607
#line 1487 "Frames/cs.ATG"
3608
SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var);
3609
while (la.kind == 14) {
3611
LocalVariableDeclarator(
3612
#line 1488 "Frames/cs.ATG"
3615
#line 1488 "Frames/cs.ATG"
3616
SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var);
3619
#line 1489 "Frames/cs.ATG"
3620
stmt = localVariableDeclaration; stmt.EndLocation = t.EndLocation;
3623
void LocalVariableDeclarator(
3624
#line 1492 "Frames/cs.ATG"
3625
out VariableDeclaration var) {
3627
#line 1493 "Frames/cs.ATG"
3628
Expression expr = null;
3631
#line 1495 "Frames/cs.ATG"
3632
var = new VariableDeclaration(t.val); var.StartLocation = t.Location;
3635
VariableInitializer(
3636
#line 1496 "Frames/cs.ATG"
3639
#line 1496 "Frames/cs.ATG"
3640
var.Initializer = expr;
3643
#line 1497 "Frames/cs.ATG"
3644
var.EndLocation = t.EndLocation;
3647
void EmbeddedStatement(
3648
#line 1550 "Frames/cs.ATG"
3649
out Statement statement) {
3651
#line 1552 "Frames/cs.ATG"
3652
TypeReference type = null;
3653
Expression expr = null;
3654
Statement embeddedStatement = null;
3658
#line 1558 "Frames/cs.ATG"
3659
Location startLocation = la.Location;
3660
if (la.kind == 16) {
3662
#line 1560 "Frames/cs.ATG"
3664
} else if (la.kind == 11) {
3667
#line 1563 "Frames/cs.ATG"
3668
statement = new EmptyStatement();
3670
#line 1566 "Frames/cs.ATG"
3671
UnCheckedAndLBrace()) {
3673
#line 1566 "Frames/cs.ATG"
3674
Statement block; bool isChecked = true;
3675
if (la.kind == 58) {
3677
} else if (la.kind == 118) {
3680
#line 1567 "Frames/cs.ATG"
3684
#line 1568 "Frames/cs.ATG"
3687
#line 1568 "Frames/cs.ATG"
3688
statement = isChecked ? (Statement)new CheckedStatement(block) : (Statement)new UncheckedStatement(block);
3689
} else if (la.kind == 79) {
3691
#line 1571 "Frames/cs.ATG"
3693
} else if (la.kind == 110) {
3696
#line 1573 "Frames/cs.ATG"
3697
List<SwitchSection> switchSections = new List<SwitchSection>();
3700
#line 1574 "Frames/cs.ATG"
3705
#line 1575 "Frames/cs.ATG"
3709
#line 1577 "Frames/cs.ATG"
3710
statement = new SwitchStatement(expr, switchSections);
3711
} else if (la.kind == 125) {
3715
#line 1580 "Frames/cs.ATG"
3719
#line 1581 "Frames/cs.ATG"
3720
out embeddedStatement);
3722
#line 1582 "Frames/cs.ATG"
3723
statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start);
3724
} else if (la.kind == 65) {
3727
#line 1584 "Frames/cs.ATG"
3728
out embeddedStatement);
3732
#line 1585 "Frames/cs.ATG"
3737
#line 1586 "Frames/cs.ATG"
3738
statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.End);
3739
} else if (la.kind == 76) {
3742
#line 1588 "Frames/cs.ATG"
3743
List<Statement> initializer = null; List<Statement> iterator = null;
3747
#line 1589 "Frames/cs.ATG"
3753
#line 1590 "Frames/cs.ATG"
3759
#line 1591 "Frames/cs.ATG"
3764
#line 1592 "Frames/cs.ATG"
3765
out embeddedStatement);
3767
#line 1593 "Frames/cs.ATG"
3768
statement = new ForStatement(initializer, expr, iterator, embeddedStatement);
3769
} else if (la.kind == 77) {
3773
#line 1595 "Frames/cs.ATG"
3777
#line 1595 "Frames/cs.ATG"
3778
string varName = t.val;
3781
#line 1596 "Frames/cs.ATG"
3785
#line 1597 "Frames/cs.ATG"
3786
out embeddedStatement);
3788
#line 1598 "Frames/cs.ATG"
3789
statement = new ForeachStatement(type, varName , expr, embeddedStatement);
3790
} else if (la.kind == 53) {
3794
#line 1601 "Frames/cs.ATG"
3795
statement = new BreakStatement();
3796
} else if (la.kind == 61) {
3800
#line 1602 "Frames/cs.ATG"
3801
statement = new ContinueStatement();
3802
} else if (la.kind == 78) {
3804
#line 1603 "Frames/cs.ATG"
3807
#line 1605 "Frames/cs.ATG"
3808
IsYieldStatement()) {
3810
if (la.kind == 101) {
3813
#line 1606 "Frames/cs.ATG"
3816
#line 1606 "Frames/cs.ATG"
3817
statement = new YieldStatement(new ReturnStatement(expr));
3818
} else if (la.kind == 53) {
3821
#line 1607 "Frames/cs.ATG"
3822
statement = new YieldStatement(new BreakStatement());
3825
} else if (la.kind == 101) {
3829
#line 1610 "Frames/cs.ATG"
3834
#line 1610 "Frames/cs.ATG"
3835
statement = new ReturnStatement(expr);
3836
} else if (la.kind == 112) {
3840
#line 1611 "Frames/cs.ATG"
3845
#line 1611 "Frames/cs.ATG"
3846
statement = new ThrowStatement(expr);
3847
} else if (StartOf(6)) {
3849
#line 1614 "Frames/cs.ATG"
3851
while (!(la.kind == 0 || la.kind == 11)) {SynErr(199); lexer.NextToken(); }
3853
} else if (la.kind == 114) {
3855
#line 1617 "Frames/cs.ATG"
3857
} else if (la.kind == 86) {
3861
#line 1620 "Frames/cs.ATG"
3865
#line 1621 "Frames/cs.ATG"
3866
out embeddedStatement);
3868
#line 1621 "Frames/cs.ATG"
3869
statement = new LockStatement(expr, embeddedStatement);
3870
} else if (la.kind == 121) {
3872
#line 1624 "Frames/cs.ATG"
3873
Statement resourceAcquisitionStmt = null;
3876
ResourceAcquisition(
3877
#line 1626 "Frames/cs.ATG"
3878
out resourceAcquisitionStmt);
3881
#line 1627 "Frames/cs.ATG"
3882
out embeddedStatement);
3884
#line 1627 "Frames/cs.ATG"
3885
statement = new UsingStatement(resourceAcquisitionStmt, embeddedStatement);
3886
} else if (la.kind == 119) {
3889
#line 1630 "Frames/cs.ATG"
3890
out embeddedStatement);
3892
#line 1630 "Frames/cs.ATG"
3893
statement = new UnsafeStatement(embeddedStatement);
3894
} else if (la.kind == 74) {
3896
#line 1632 "Frames/cs.ATG"
3897
Statement pointerDeclarationStmt = null;
3900
ResourceAcquisition(
3901
#line 1634 "Frames/cs.ATG"
3902
out pointerDeclarationStmt);
3905
#line 1635 "Frames/cs.ATG"
3906
out embeddedStatement);
3908
#line 1635 "Frames/cs.ATG"
3909
statement = new FixedStatement(pointerDeclarationStmt, embeddedStatement);
3912
#line 1637 "Frames/cs.ATG"
3913
if (statement != null) {
3914
statement.StartLocation = startLocation;
3915
statement.EndLocation = t.EndLocation;
3921
#line 1644 "Frames/cs.ATG"
3922
out Statement statement) {
3924
#line 1646 "Frames/cs.ATG"
3925
Expression expr = null;
3926
Statement embeddedStatement = null;
3928
Location elseStart = Location.Empty;
3933
#line 1653 "Frames/cs.ATG"
3937
#line 1654 "Frames/cs.ATG"
3938
out embeddedStatement);
3940
#line 1655 "Frames/cs.ATG"
3941
Statement elseStatement = null;
3942
if (la.kind == 67) {
3945
#line 1656 "Frames/cs.ATG"
3946
elseStart = t.Location;
3948
#line 1656 "Frames/cs.ATG"
3952
#line 1657 "Frames/cs.ATG"
3953
statement = elseStatement != null ? new IfElseStatement(expr, embeddedStatement, elseStatement) : new IfElseStatement(expr, embeddedStatement);
3955
#line 1658 "Frames/cs.ATG"
3956
if (elseStatement is IfElseStatement && (elseStatement as IfElseStatement).TrueStatement.Count == 1) {
3957
/* else if-section (otherwise we would have a BlockStatment) */
3958
ElseIfSection elseIfSection = new ElseIfSection((elseStatement as IfElseStatement).Condition, (elseStatement as IfElseStatement).TrueStatement[0]);
3959
elseIfSection.StartLocation = elseStart;
3960
elseIfSection.EndLocation = (elseStatement as IfElseStatement).TrueStatement[0].EndLocation;
3961
(statement as IfElseStatement).ElseIfSections.Add(elseIfSection);
3962
(statement as IfElseStatement).ElseIfSections.AddRange((elseStatement as IfElseStatement).ElseIfSections);
3963
(statement as IfElseStatement).FalseStatement = (elseStatement as IfElseStatement).FalseStatement;
3968
void SwitchSections(
3969
#line 1689 "Frames/cs.ATG"
3970
List<SwitchSection> switchSections) {
3972
#line 1691 "Frames/cs.ATG"
3973
SwitchSection switchSection = new SwitchSection();
3977
#line 1695 "Frames/cs.ATG"
3980
#line 1695 "Frames/cs.ATG"
3981
SafeAdd(switchSection, switchSection.SwitchLabels, label);
3983
#line 1696 "Frames/cs.ATG"
3984
compilationUnit.BlockStart(switchSection);
3985
while (StartOf(32)) {
3986
if (la.kind == 55 || la.kind == 63) {
3988
#line 1698 "Frames/cs.ATG"
3991
#line 1699 "Frames/cs.ATG"
3992
if (label != null) {
3993
if (switchSection.Children.Count > 0) {
3995
compilationUnit.BlockEnd(); switchSections.Add(switchSection);
3996
switchSection = new SwitchSection();
3997
compilationUnit.BlockStart(switchSection);
3999
SafeAdd(switchSection, switchSection.SwitchLabels, label);
4007
#line 1711 "Frames/cs.ATG"
4008
compilationUnit.BlockEnd(); switchSections.Add(switchSection);
4011
void ForInitializer(
4012
#line 1670 "Frames/cs.ATG"
4013
out List<Statement> initializer) {
4015
#line 1672 "Frames/cs.ATG"
4017
initializer = new List<Statement>();
4020
#line 1676 "Frames/cs.ATG"
4023
#line 1676 "Frames/cs.ATG"
4026
#line 1676 "Frames/cs.ATG"
4027
((LocalVariableDeclaration)stmt).SemicolonPosition = t.EndLocation; initializer.Add(stmt);
4028
} else if (StartOf(6)) {
4030
#line 1677 "Frames/cs.ATG"
4033
#line 1677 "Frames/cs.ATG"
4034
initializer.Add(stmt);
4035
while (la.kind == 14) {
4038
#line 1677 "Frames/cs.ATG"
4041
#line 1677 "Frames/cs.ATG"
4042
initializer.Add(stmt);
4048
#line 1680 "Frames/cs.ATG"
4049
out List<Statement> iterator) {
4051
#line 1682 "Frames/cs.ATG"
4053
iterator = new List<Statement>();
4056
#line 1686 "Frames/cs.ATG"
4059
#line 1686 "Frames/cs.ATG"
4061
while (la.kind == 14) {
4064
#line 1686 "Frames/cs.ATG"
4067
#line 1686 "Frames/cs.ATG"
4073
#line 1768 "Frames/cs.ATG"
4074
out Statement stmt) {
4076
#line 1769 "Frames/cs.ATG"
4077
Expression expr; stmt = null;
4082
#line 1773 "Frames/cs.ATG"
4083
stmt = new GotoStatement(t.val);
4085
} else if (la.kind == 55) {
4088
#line 1774 "Frames/cs.ATG"
4092
#line 1774 "Frames/cs.ATG"
4093
stmt = new GotoCaseStatement(expr);
4094
} else if (la.kind == 63) {
4098
#line 1775 "Frames/cs.ATG"
4099
stmt = new GotoCaseStatement(null);
4104
#line 1795 "Frames/cs.ATG"
4105
out Statement stmt) {
4107
#line 1796 "Frames/cs.ATG"
4110
#line 1798 "Frames/cs.ATG"
4113
#line 1801 "Frames/cs.ATG"
4114
stmt = new ExpressionStatement(expr); if (expr is PrimitiveExpression) Error("Primitive expressions are not allowed as statements.");
4118
#line 1721 "Frames/cs.ATG"
4119
out Statement tryStatement) {
4121
#line 1723 "Frames/cs.ATG"
4122
Statement blockStmt = null, finallyStmt = null;
4123
CatchClause catchClause = null;
4124
List<CatchClause> catchClauses = new List<CatchClause>();
4128
#line 1728 "Frames/cs.ATG"
4130
while (la.kind == 56) {
4132
#line 1730 "Frames/cs.ATG"
4135
#line 1731 "Frames/cs.ATG"
4136
if (catchClause != null) catchClauses.Add(catchClause);
4138
if (la.kind == 73) {
4141
#line 1733 "Frames/cs.ATG"
4145
#line 1735 "Frames/cs.ATG"
4146
tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
4147
if (catchClauses != null) {
4148
foreach (CatchClause cc in catchClauses) cc.Parent = tryStatement;
4153
void ResourceAcquisition(
4154
#line 1779 "Frames/cs.ATG"
4155
out Statement stmt) {
4157
#line 1781 "Frames/cs.ATG"
4162
#line 1786 "Frames/cs.ATG"
4165
#line 1786 "Frames/cs.ATG"
4168
#line 1786 "Frames/cs.ATG"
4169
((LocalVariableDeclaration)stmt).SemicolonPosition = t.EndLocation;
4170
} else if (StartOf(6)) {
4172
#line 1787 "Frames/cs.ATG"
4175
#line 1791 "Frames/cs.ATG"
4176
stmt = new ExpressionStatement(expr);
4181
#line 1714 "Frames/cs.ATG"
4182
out CaseLabel label) {
4184
#line 1715 "Frames/cs.ATG"
4185
Expression expr = null; label = null;
4186
if (la.kind == 55) {
4189
#line 1717 "Frames/cs.ATG"
4193
#line 1717 "Frames/cs.ATG"
4194
label = new CaseLabel(expr);
4195
} else if (la.kind == 63) {
4199
#line 1718 "Frames/cs.ATG"
4200
label = new CaseLabel();
4205
#line 1742 "Frames/cs.ATG"
4206
out CatchClause catchClause) {
4209
#line 1744 "Frames/cs.ATG"
4212
TypeReference typeRef;
4213
Location startPos = t.Location;
4216
if (la.kind == 16) {
4218
#line 1752 "Frames/cs.ATG"
4221
#line 1752 "Frames/cs.ATG"
4222
catchClause = new CatchClause(stmt);
4223
} else if (la.kind == 20) {
4226
#line 1755 "Frames/cs.ATG"
4227
out typeRef, false);
4229
#line 1755 "Frames/cs.ATG"
4234
#line 1756 "Frames/cs.ATG"
4239
#line 1757 "Frames/cs.ATG"
4242
#line 1758 "Frames/cs.ATG"
4243
catchClause = new CatchClause(typeRef, identifier, stmt);
4246
#line 1761 "Frames/cs.ATG"
4247
if (catchClause != null) {
4248
catchClause.StartLocation = startPos;
4249
catchClause.EndLocation = t.Location;
4255
#line 1828 "Frames/cs.ATG"
4256
out Expression uExpr) {
4258
#line 1830 "Frames/cs.ATG"
4259
TypeReference type = null;
4260
Expression expr = null;
4261
ArrayList expressions = new ArrayList();
4264
while (StartOf(33) ||
4265
#line 1852 "Frames/cs.ATG"
4270
#line 1839 "Frames/cs.ATG"
4271
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus));
4272
} else if (la.kind == 5) {
4275
#line 1840 "Frames/cs.ATG"
4276
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus));
4277
} else if (la.kind == 24) {
4280
#line 1841 "Frames/cs.ATG"
4281
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not));
4282
} else if (la.kind == 27) {
4285
#line 1842 "Frames/cs.ATG"
4286
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot));
4287
} else if (la.kind == 6) {
4290
#line 1843 "Frames/cs.ATG"
4291
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Dereference));
4292
} else if (la.kind == 31) {
4295
#line 1844 "Frames/cs.ATG"
4296
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment));
4297
} else if (la.kind == 32) {
4300
#line 1845 "Frames/cs.ATG"
4301
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement));
4302
} else if (la.kind == 28) {
4305
#line 1846 "Frames/cs.ATG"
4306
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.AddressOf));
4310
#line 1852 "Frames/cs.ATG"
4314
#line 1852 "Frames/cs.ATG"
4315
expressions.Add(new CastExpression(type));
4319
#line 1857 "Frames/cs.ATG"
4320
LastExpressionIsUnaryMinus(expressions) && IsMostNegativeIntegerWithoutTypeSuffix()) {
4323
#line 1860 "Frames/cs.ATG"
4324
expressions.RemoveAt(expressions.Count - 1);
4325
if (t.literalValue is uint) {
4326
expr = new PrimitiveExpression(int.MinValue, int.MinValue.ToString());
4327
} else if (t.literalValue is ulong) {
4328
expr = new PrimitiveExpression(long.MinValue, long.MinValue.ToString());
4330
throw new Exception("t.literalValue must be uint or ulong");
4333
} else if (StartOf(34)) {
4335
#line 1869 "Frames/cs.ATG"
4339
#line 1871 "Frames/cs.ATG"
4340
for (int i = 0; i < expressions.Count; ++i) {
4341
Expression nextExpression = i + 1 < expressions.Count ? (Expression)expressions[i + 1] : expr;
4342
if (expressions[i] is CastExpression) {
4343
((CastExpression)expressions[i]).Expression = nextExpression;
4345
((UnaryOperatorExpression)expressions[i]).Expression = nextExpression;
4348
if (expressions.Count > 0) {
4349
uExpr = (Expression)expressions[0];
4356
void ConditionalOrExpr(
4357
#line 2193 "Frames/cs.ATG"
4358
ref Expression outExpr) {
4360
#line 2194 "Frames/cs.ATG"
4363
#line 2196 "Frames/cs.ATG"
4365
while (la.kind == 26) {
4368
#line 2196 "Frames/cs.ATG"
4371
#line 2196 "Frames/cs.ATG"
4374
#line 2196 "Frames/cs.ATG"
4375
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr);
4380
#line 1888 "Frames/cs.ATG"
4381
out Expression pexpr) {
4383
#line 1890 "Frames/cs.ATG"
4384
TypeReference type = null;
4389
#line 1895 "Frames/cs.ATG"
4390
Location startLocation = la.Location;
4391
if (la.kind == 113) {
4394
#line 1897 "Frames/cs.ATG"
4395
pexpr = new PrimitiveExpression(true, "true");
4396
} else if (la.kind == 72) {
4399
#line 1898 "Frames/cs.ATG"
4400
pexpr = new PrimitiveExpression(false, "false");
4401
} else if (la.kind == 90) {
4404
#line 1899 "Frames/cs.ATG"
4405
pexpr = new PrimitiveExpression(null, "null");
4406
} else if (la.kind == 2) {
4409
#line 1900 "Frames/cs.ATG"
4410
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
4412
#line 1901 "Frames/cs.ATG"
4413
StartOfQueryExpression()) {
4415
#line 1902 "Frames/cs.ATG"
4418
#line 1903 "Frames/cs.ATG"
4419
IdentAndDoubleColon()) {
4422
#line 1904 "Frames/cs.ATG"
4423
type = new TypeReference(t.val);
4426
#line 1905 "Frames/cs.ATG"
4427
pexpr = new TypeReferenceExpression(type);
4430
#line 1906 "Frames/cs.ATG"
4431
if (type.Type == "global") { type.IsGlobal = true; type.Type = t.val ?? "?"; } else type.Type += "." + (t.val ?? "?");
4432
} else if (StartOf(19)) {
4435
#line 1910 "Frames/cs.ATG"
4436
pexpr = new IdentifierExpression(t.val);
4437
if (la.kind == 48 ||
4438
#line 1913 "Frames/cs.ATG"
4439
IsGenericInSimpleNameOrMemberAccess()) {
4440
if (la.kind == 48) {
4441
ShortedLambdaExpression(
4442
#line 1912 "Frames/cs.ATG"
4443
(IdentifierExpression)pexpr, out pexpr);
4446
#line 1914 "Frames/cs.ATG"
4447
List<TypeReference> typeList;
4449
#line 1915 "Frames/cs.ATG"
4450
out typeList, false);
4452
#line 1916 "Frames/cs.ATG"
4453
((IdentifierExpression)pexpr).TypeArguments = typeList;
4457
#line 1918 "Frames/cs.ATG"
4458
IsLambdaExpression()) {
4460
#line 1919 "Frames/cs.ATG"
4462
} else if (la.kind == 20) {
4465
#line 1922 "Frames/cs.ATG"
4469
#line 1922 "Frames/cs.ATG"
4470
pexpr = new ParenthesizedExpression(expr);
4471
} else if (StartOf(35)) {
4473
#line 1925 "Frames/cs.ATG"
4479
#line 1926 "Frames/cs.ATG"
4480
val = "System.Boolean";
4486
#line 1927 "Frames/cs.ATG"
4487
val = "System.Byte";
4493
#line 1928 "Frames/cs.ATG"
4494
val = "System.Char";
4500
#line 1929 "Frames/cs.ATG"
4501
val = "System.Decimal";
4507
#line 1930 "Frames/cs.ATG"
4508
val = "System.Double";
4514
#line 1931 "Frames/cs.ATG"
4515
val = "System.Single";
4521
#line 1932 "Frames/cs.ATG"
4522
val = "System.Int32";
4528
#line 1933 "Frames/cs.ATG"
4529
val = "System.Int64";
4535
#line 1934 "Frames/cs.ATG"
4536
val = "System.Object";
4542
#line 1935 "Frames/cs.ATG"
4543
val = "System.SByte";
4549
#line 1936 "Frames/cs.ATG"
4550
val = "System.Int16";
4556
#line 1937 "Frames/cs.ATG"
4557
val = "System.String";
4563
#line 1938 "Frames/cs.ATG"
4564
val = "System.UInt32";
4570
#line 1939 "Frames/cs.ATG"
4571
val = "System.UInt64";
4577
#line 1940 "Frames/cs.ATG"
4578
val = "System.UInt16";
4584
#line 1941 "Frames/cs.ATG"
4585
val = "System.Void";
4590
#line 1943 "Frames/cs.ATG"
4591
pexpr = new TypeReferenceExpression(new TypeReference(val, true)) { StartLocation = t.Location, EndLocation = t.EndLocation };
4592
} else if (la.kind == 111) {
4595
#line 1946 "Frames/cs.ATG"
4596
pexpr = new ThisReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation;
4597
} else if (la.kind == 51) {
4600
#line 1948 "Frames/cs.ATG"
4601
pexpr = new BaseReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation;
4602
} else if (la.kind == 89) {
4604
#line 1951 "Frames/cs.ATG"
4606
} else if (la.kind == 115) {
4610
#line 1955 "Frames/cs.ATG"
4614
#line 1955 "Frames/cs.ATG"
4615
type = new TypeReference("System.Void", true);
4616
} else if (StartOf(10)) {
4617
TypeWithRestriction(
4618
#line 1956 "Frames/cs.ATG"
4619
out type, true, true);
4623
#line 1958 "Frames/cs.ATG"
4624
pexpr = new TypeOfExpression(type);
4625
} else if (la.kind == 63) {
4629
#line 1960 "Frames/cs.ATG"
4633
#line 1960 "Frames/cs.ATG"
4634
pexpr = new DefaultValueExpression(type);
4635
} else if (la.kind == 105) {
4639
#line 1961 "Frames/cs.ATG"
4643
#line 1961 "Frames/cs.ATG"
4644
pexpr = new SizeOfExpression(type);
4645
} else if (la.kind == 58) {
4649
#line 1962 "Frames/cs.ATG"
4653
#line 1962 "Frames/cs.ATG"
4654
pexpr = new CheckedExpression(expr);
4655
} else if (la.kind == 118) {
4659
#line 1963 "Frames/cs.ATG"
4663
#line 1963 "Frames/cs.ATG"
4664
pexpr = new UncheckedExpression(expr);
4665
} else if (la.kind == 64) {
4667
AnonymousMethodExpr(
4668
#line 1964 "Frames/cs.ATG"
4671
#line 1964 "Frames/cs.ATG"
4675
#line 1966 "Frames/cs.ATG"
4676
if (pexpr != null) {
4677
if (pexpr.StartLocation.IsEmpty)
4678
pexpr.StartLocation = startLocation;
4679
if (pexpr.EndLocation.IsEmpty)
4680
pexpr.EndLocation = t.EndLocation;
4683
while (StartOf(36)) {
4684
if (la.kind == 31 || la.kind == 32) {
4686
#line 1974 "Frames/cs.ATG"
4687
startLocation = la.Location;
4688
if (la.kind == 31) {
4691
#line 1976 "Frames/cs.ATG"
4692
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement);
4693
} else if (la.kind == 32) {
4696
#line 1977 "Frames/cs.ATG"
4697
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement);
4699
} else if (la.kind == 47) {
4700
PointerMemberAccess(
4701
#line 1980 "Frames/cs.ATG"
4703
} else if (la.kind == 15) {
4705
#line 1981 "Frames/cs.ATG"
4707
} else if (la.kind == 20) {
4710
#line 1985 "Frames/cs.ATG"
4711
List<Expression> parameters = new List<Expression>();
4713
#line 1986 "Frames/cs.ATG"
4714
pexpr = new InvocationExpression(pexpr, parameters); pexpr.StartLocation = startLocation;
4717
#line 1987 "Frames/cs.ATG"
4720
#line 1987 "Frames/cs.ATG"
4721
SafeAdd(pexpr, parameters, expr);
4722
while (la.kind == 14) {
4725
#line 1988 "Frames/cs.ATG"
4728
#line 1988 "Frames/cs.ATG"
4729
SafeAdd(pexpr, parameters, expr);
4735
#line 1994 "Frames/cs.ATG"
4736
List<Expression> indices = new List<Expression>();
4737
pexpr = new IndexerExpression(pexpr, indices);
4741
#line 1997 "Frames/cs.ATG"
4744
#line 1997 "Frames/cs.ATG"
4745
SafeAdd(pexpr, indices, expr);
4746
while (la.kind == 14) {
4749
#line 1998 "Frames/cs.ATG"
4752
#line 1998 "Frames/cs.ATG"
4753
SafeAdd(pexpr, indices, expr);
4757
#line 2001 "Frames/cs.ATG"
4758
if (pexpr != null) {
4759
pexpr.StartLocation = startLocation;
4760
pexpr.EndLocation = t.EndLocation;
4767
void QueryExpression(
4768
#line 2431 "Frames/cs.ATG"
4769
out Expression outExpr) {
4771
#line 2432 "Frames/cs.ATG"
4772
QueryExpression q = new QueryExpression(); outExpr = q; q.StartLocation = la.Location;
4773
QueryExpressionFromClause fromClause;
4775
QueryExpressionFromClause(
4776
#line 2436 "Frames/cs.ATG"
4779
#line 2436 "Frames/cs.ATG"
4780
q.FromClause = fromClause;
4781
QueryExpressionBody(
4782
#line 2437 "Frames/cs.ATG"
4785
#line 2438 "Frames/cs.ATG"
4786
q.EndLocation = t.EndLocation;
4787
outExpr = q; /* set outExpr to q again if QueryExpressionBody changed it (can happen with 'into' clauses) */
4791
void ShortedLambdaExpression(
4792
#line 2113 "Frames/cs.ATG"
4793
IdentifierExpression ident, out Expression pexpr) {
4795
#line 2114 "Frames/cs.ATG"
4796
LambdaExpression lambda = new LambdaExpression(); pexpr = lambda;
4799
#line 2119 "Frames/cs.ATG"
4800
lambda.StartLocation = ident.StartLocation;
4801
SafeAdd(lambda, lambda.Parameters, new ParameterDeclarationExpression(null, ident.Identifier));
4802
lambda.Parameters[0].StartLocation = ident.StartLocation;
4803
lambda.Parameters[0].EndLocation = ident.EndLocation;
4805
LambdaExpressionBody(
4806
#line 2124 "Frames/cs.ATG"
4810
void TypeArgumentList(
4811
#line 2365 "Frames/cs.ATG"
4812
out List<TypeReference> types, bool canBeUnbound) {
4814
#line 2367 "Frames/cs.ATG"
4815
types = new List<TypeReference>();
4816
TypeReference type = null;
4820
#line 2372 "Frames/cs.ATG"
4821
canBeUnbound && (la.kind == Tokens.GreaterThan || la.kind == Tokens.Comma)) {
4823
#line 2373 "Frames/cs.ATG"
4824
types.Add(TypeReference.Null);
4825
while (la.kind == 14) {
4828
#line 2374 "Frames/cs.ATG"
4829
types.Add(TypeReference.Null);
4831
} else if (StartOf(10)) {
4833
#line 2375 "Frames/cs.ATG"
4836
#line 2375 "Frames/cs.ATG"
4837
if (type != null) { types.Add(type); }
4838
while (la.kind == 14) {
4841
#line 2376 "Frames/cs.ATG"
4844
#line 2376 "Frames/cs.ATG"
4845
if (type != null) { types.Add(type); }
4851
void LambdaExpression(
4852
#line 2093 "Frames/cs.ATG"
4853
out Expression outExpr) {
4855
#line 2095 "Frames/cs.ATG"
4856
LambdaExpression lambda = new LambdaExpression();
4857
lambda.StartLocation = la.Location;
4858
ParameterDeclarationExpression p;
4863
LambdaExpressionParameter(
4864
#line 2103 "Frames/cs.ATG"
4867
#line 2103 "Frames/cs.ATG"
4868
SafeAdd(lambda, lambda.Parameters, p);
4869
while (la.kind == 14) {
4871
LambdaExpressionParameter(
4872
#line 2105 "Frames/cs.ATG"
4875
#line 2105 "Frames/cs.ATG"
4876
SafeAdd(lambda, lambda.Parameters, p);
4881
LambdaExpressionBody(
4882
#line 2110 "Frames/cs.ATG"
4887
#line 2040 "Frames/cs.ATG"
4888
out Expression pexpr) {
4890
#line 2041 "Frames/cs.ATG"
4892
List<Expression> parameters = new List<Expression>();
4893
TypeReference type = null;
4899
#line 2048 "Frames/cs.ATG"
4902
if (la.kind == 16 || la.kind == 20) {
4903
if (la.kind == 20) {
4905
#line 2054 "Frames/cs.ATG"
4906
ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters);
4909
#line 2055 "Frames/cs.ATG"
4910
if (type == null) Error("Cannot use an anonymous type with arguments for the constructor");
4913
#line 2056 "Frames/cs.ATG"
4916
#line 2056 "Frames/cs.ATG"
4917
SafeAdd(oce, parameters, expr);
4918
while (la.kind == 14) {
4921
#line 2057 "Frames/cs.ATG"
4924
#line 2057 "Frames/cs.ATG"
4925
SafeAdd(oce, parameters, expr);
4930
#line 2059 "Frames/cs.ATG"
4932
if (la.kind == 16) {
4933
CollectionOrObjectInitializer(
4934
#line 2060 "Frames/cs.ATG"
4937
#line 2060 "Frames/cs.ATG"
4938
oce.ObjectInitializer = (CollectionInitializerExpression)expr;
4942
#line 2061 "Frames/cs.ATG"
4943
ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters);
4944
CollectionOrObjectInitializer(
4945
#line 2062 "Frames/cs.ATG"
4948
#line 2062 "Frames/cs.ATG"
4949
oce.ObjectInitializer = (CollectionInitializerExpression)expr;
4951
#line 2063 "Frames/cs.ATG"
4954
} else if (la.kind == 18) {
4957
#line 2068 "Frames/cs.ATG"
4958
ArrayCreateExpression ace = new ArrayCreateExpression(type);
4959
/* we must not change RankSpecifier on the null type reference*/
4960
if (ace.CreateType.IsNull) { ace.CreateType = new TypeReference(""); }
4962
int dims = 0; List<int> ranks = new List<int>();
4964
if (la.kind == 14 || la.kind == 19) {
4965
while (la.kind == 14) {
4968
#line 2075 "Frames/cs.ATG"
4973
#line 2076 "Frames/cs.ATG"
4974
ranks.Add(dims); dims = 0;
4975
while (la.kind == 18) {
4977
while (la.kind == 14) {
4980
#line 2077 "Frames/cs.ATG"
4985
#line 2077 "Frames/cs.ATG"
4986
ranks.Add(dims); dims = 0;
4989
#line 2078 "Frames/cs.ATG"
4990
ace.CreateType.RankSpecifier = ranks.ToArray();
4991
CollectionInitializer(
4992
#line 2079 "Frames/cs.ATG"
4995
#line 2079 "Frames/cs.ATG"
4996
ace.ArrayInitializer = (CollectionInitializerExpression)expr;
4997
} else if (StartOf(6)) {
4999
#line 2080 "Frames/cs.ATG"
5002
#line 2080 "Frames/cs.ATG"
5003
if (expr != null) parameters.Add(expr);
5004
while (la.kind == 14) {
5007
#line 2081 "Frames/cs.ATG"
5010
#line 2082 "Frames/cs.ATG"
5013
#line 2082 "Frames/cs.ATG"
5014
if (expr != null) parameters.Add(expr);
5018
#line 2084 "Frames/cs.ATG"
5019
ranks.Add(dims); ace.Arguments = parameters; dims = 0;
5020
while (la.kind == 18) {
5022
while (la.kind == 14) {
5025
#line 2085 "Frames/cs.ATG"
5030
#line 2085 "Frames/cs.ATG"
5031
ranks.Add(dims); dims = 0;
5034
#line 2086 "Frames/cs.ATG"
5035
ace.CreateType.RankSpecifier = ranks.ToArray();
5036
if (la.kind == 16) {
5037
CollectionInitializer(
5038
#line 2087 "Frames/cs.ATG"
5041
#line 2087 "Frames/cs.ATG"
5042
ace.ArrayInitializer = (CollectionInitializerExpression)expr;
5048
void AnonymousMethodExpr(
5049
#line 2160 "Frames/cs.ATG"
5050
out Expression outExpr) {
5052
#line 2162 "Frames/cs.ATG"
5053
AnonymousMethodExpression expr = new AnonymousMethodExpression();
5054
expr.StartLocation = t.Location;
5055
BlockStatement stmt;
5056
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
5059
if (la.kind == 20) {
5062
FormalParameterList(
5063
#line 2171 "Frames/cs.ATG"
5066
#line 2171 "Frames/cs.ATG"
5067
expr.Parameters = p;
5071
#line 2173 "Frames/cs.ATG"
5072
expr.HasParameterList = true;
5074
BlockInsideExpression(
5075
#line 2175 "Frames/cs.ATG"
5078
#line 2175 "Frames/cs.ATG"
5081
#line 2176 "Frames/cs.ATG"
5082
expr.EndLocation = t.Location;
5085
void PointerMemberAccess(
5086
#line 2028 "Frames/cs.ATG"
5087
out Expression expr, Expression target) {
5089
#line 2029 "Frames/cs.ATG"
5090
List<TypeReference> typeList;
5094
#line 2033 "Frames/cs.ATG"
5095
expr = new PointerReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation;
5097
#line 2034 "Frames/cs.ATG"
5098
IsGenericInSimpleNameOrMemberAccess()) {
5100
#line 2035 "Frames/cs.ATG"
5101
out typeList, false);
5103
#line 2036 "Frames/cs.ATG"
5104
((MemberReferenceExpression)expr).TypeArguments = typeList;
5109
#line 2009 "Frames/cs.ATG"
5110
out Expression expr, Expression target) {
5112
#line 2010 "Frames/cs.ATG"
5113
List<TypeReference> typeList;
5115
#line 2012 "Frames/cs.ATG"
5116
if (ShouldConvertTargetExpressionToTypeReference(target)) {
5117
TypeReference type = GetTypeReferenceFromExpression(target);
5119
target = new TypeReferenceExpression(type) { StartLocation = t.Location, EndLocation = t.EndLocation };
5126
#line 2021 "Frames/cs.ATG"
5127
expr = new MemberReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation;
5129
#line 2022 "Frames/cs.ATG"
5130
IsGenericInSimpleNameOrMemberAccess()) {
5132
#line 2023 "Frames/cs.ATG"
5133
out typeList, false);
5135
#line 2024 "Frames/cs.ATG"
5136
((MemberReferenceExpression)expr).TypeArguments = typeList;
5140
void LambdaExpressionParameter(
5141
#line 2127 "Frames/cs.ATG"
5142
out ParameterDeclarationExpression p) {
5144
#line 2128 "Frames/cs.ATG"
5145
Location start = la.Location; p = null;
5147
ParameterModifiers mod = ParameterModifiers.In;
5150
#line 2133 "Frames/cs.ATG"
5151
Peek(1).kind == Tokens.Comma || Peek(1).kind == Tokens.CloseParenthesis) {
5154
#line 2135 "Frames/cs.ATG"
5155
p = new ParameterDeclarationExpression(null, t.val);
5156
p.StartLocation = start; p.EndLocation = t.EndLocation;
5158
} else if (StartOf(18)) {
5159
if (la.kind == 93 || la.kind == 100) {
5160
if (la.kind == 100) {
5163
#line 2138 "Frames/cs.ATG"
5164
mod = ParameterModifiers.Ref;
5168
#line 2139 "Frames/cs.ATG"
5169
mod = ParameterModifiers.Out;
5173
#line 2141 "Frames/cs.ATG"
5177
#line 2143 "Frames/cs.ATG"
5178
p = new ParameterDeclarationExpression(type, t.val, mod);
5179
p.StartLocation = start; p.EndLocation = t.EndLocation;
5184
void LambdaExpressionBody(
5185
#line 2149 "Frames/cs.ATG"
5186
LambdaExpression lambda) {
5188
#line 2150 "Frames/cs.ATG"
5189
Expression expr; BlockStatement stmt;
5190
if (la.kind == 16) {
5191
BlockInsideExpression(
5192
#line 2153 "Frames/cs.ATG"
5195
#line 2153 "Frames/cs.ATG"
5196
lambda.StatementBody = stmt;
5197
} else if (StartOf(6)) {
5199
#line 2154 "Frames/cs.ATG"
5202
#line 2154 "Frames/cs.ATG"
5203
lambda.ExpressionBody = expr;
5206
#line 2156 "Frames/cs.ATG"
5207
lambda.EndLocation = t.EndLocation;
5209
#line 2157 "Frames/cs.ATG"
5210
lambda.ExtendedEndLocation = la.Location;
5213
void BlockInsideExpression(
5214
#line 2179 "Frames/cs.ATG"
5215
out BlockStatement outStmt) {
5217
#line 2180 "Frames/cs.ATG"
5218
Statement stmt = null; outStmt = null;
5220
#line 2184 "Frames/cs.ATG"
5221
if (compilationUnit != null) {
5223
#line 2185 "Frames/cs.ATG"
5226
#line 2185 "Frames/cs.ATG"
5227
outStmt = (BlockStatement)stmt;
5229
#line 2186 "Frames/cs.ATG"
5233
#line 2188 "Frames/cs.ATG"
5234
lexer.SkipCurrentBlock(0);
5237
#line 2190 "Frames/cs.ATG"
5241
void ConditionalAndExpr(
5242
#line 2199 "Frames/cs.ATG"
5243
ref Expression outExpr) {
5245
#line 2200 "Frames/cs.ATG"
5248
#line 2202 "Frames/cs.ATG"
5250
while (la.kind == 25) {
5253
#line 2202 "Frames/cs.ATG"
5256
#line 2202 "Frames/cs.ATG"
5259
#line 2202 "Frames/cs.ATG"
5260
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr);
5264
void InclusiveOrExpr(
5265
#line 2205 "Frames/cs.ATG"
5266
ref Expression outExpr) {
5268
#line 2206 "Frames/cs.ATG"
5271
#line 2208 "Frames/cs.ATG"
5273
while (la.kind == 29) {
5276
#line 2208 "Frames/cs.ATG"
5279
#line 2208 "Frames/cs.ATG"
5282
#line 2208 "Frames/cs.ATG"
5283
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);
5287
void ExclusiveOrExpr(
5288
#line 2211 "Frames/cs.ATG"
5289
ref Expression outExpr) {
5291
#line 2212 "Frames/cs.ATG"
5294
#line 2214 "Frames/cs.ATG"
5296
while (la.kind == 30) {
5299
#line 2214 "Frames/cs.ATG"
5302
#line 2214 "Frames/cs.ATG"
5305
#line 2214 "Frames/cs.ATG"
5306
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);
5311
#line 2217 "Frames/cs.ATG"
5312
ref Expression outExpr) {
5314
#line 2218 "Frames/cs.ATG"
5317
#line 2220 "Frames/cs.ATG"
5319
while (la.kind == 28) {
5322
#line 2220 "Frames/cs.ATG"
5325
#line 2220 "Frames/cs.ATG"
5328
#line 2220 "Frames/cs.ATG"
5329
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);
5334
#line 2223 "Frames/cs.ATG"
5335
ref Expression outExpr) {
5337
#line 2225 "Frames/cs.ATG"
5339
BinaryOperatorType op = BinaryOperatorType.None;
5342
#line 2229 "Frames/cs.ATG"
5344
while (la.kind == 33 || la.kind == 34) {
5345
if (la.kind == 34) {
5348
#line 2232 "Frames/cs.ATG"
5349
op = BinaryOperatorType.InEquality;
5353
#line 2233 "Frames/cs.ATG"
5354
op = BinaryOperatorType.Equality;
5357
#line 2235 "Frames/cs.ATG"
5360
#line 2235 "Frames/cs.ATG"
5363
#line 2235 "Frames/cs.ATG"
5364
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
5368
void RelationalExpr(
5369
#line 2239 "Frames/cs.ATG"
5370
ref Expression outExpr) {
5372
#line 2241 "Frames/cs.ATG"
5375
BinaryOperatorType op = BinaryOperatorType.None;
5378
#line 2246 "Frames/cs.ATG"
5380
while (StartOf(37)) {
5382
if (la.kind == 23) {
5385
#line 2248 "Frames/cs.ATG"
5386
op = BinaryOperatorType.LessThan;
5387
} else if (la.kind == 22) {
5390
#line 2249 "Frames/cs.ATG"
5391
op = BinaryOperatorType.GreaterThan;
5392
} else if (la.kind == 36) {
5395
#line 2250 "Frames/cs.ATG"
5396
op = BinaryOperatorType.LessThanOrEqual;
5397
} else if (la.kind == 35) {
5400
#line 2251 "Frames/cs.ATG"
5401
op = BinaryOperatorType.GreaterThanOrEqual;
5404
#line 2253 "Frames/cs.ATG"
5407
#line 2254 "Frames/cs.ATG"
5410
#line 2255 "Frames/cs.ATG"
5411
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
5413
if (la.kind == 85) {
5415
TypeWithRestriction(
5416
#line 2258 "Frames/cs.ATG"
5417
out type, false, false);
5419
#line 2259 "Frames/cs.ATG"
5420
la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) {
5421
NullableQuestionMark(
5422
#line 2260 "Frames/cs.ATG"
5426
#line 2261 "Frames/cs.ATG"
5427
outExpr = new TypeOfIsExpression(outExpr, type);
5428
} else if (la.kind == 50) {
5430
TypeWithRestriction(
5431
#line 2263 "Frames/cs.ATG"
5432
out type, false, false);
5434
#line 2264 "Frames/cs.ATG"
5435
la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) {
5436
NullableQuestionMark(
5437
#line 2265 "Frames/cs.ATG"
5441
#line 2266 "Frames/cs.ATG"
5442
outExpr = new CastExpression(type, outExpr, CastType.TryCast);
5449
#line 2271 "Frames/cs.ATG"
5450
ref Expression outExpr) {
5452
#line 2273 "Frames/cs.ATG"
5454
BinaryOperatorType op = BinaryOperatorType.None;
5457
#line 2277 "Frames/cs.ATG"
5459
while (la.kind == 37 ||
5460
#line 2280 "Frames/cs.ATG"
5462
if (la.kind == 37) {
5465
#line 2279 "Frames/cs.ATG"
5466
op = BinaryOperatorType.ShiftLeft;
5471
#line 2281 "Frames/cs.ATG"
5472
op = BinaryOperatorType.ShiftRight;
5475
#line 2284 "Frames/cs.ATG"
5478
#line 2284 "Frames/cs.ATG"
5481
#line 2284 "Frames/cs.ATG"
5482
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
5487
#line 2288 "Frames/cs.ATG"
5488
ref Expression outExpr) {
5490
#line 2290 "Frames/cs.ATG"
5492
BinaryOperatorType op = BinaryOperatorType.None;
5495
#line 2294 "Frames/cs.ATG"
5497
while (la.kind == 4 || la.kind == 5) {
5501
#line 2297 "Frames/cs.ATG"
5502
op = BinaryOperatorType.Add;
5506
#line 2298 "Frames/cs.ATG"
5507
op = BinaryOperatorType.Subtract;
5510
#line 2300 "Frames/cs.ATG"
5513
#line 2300 "Frames/cs.ATG"
5516
#line 2300 "Frames/cs.ATG"
5517
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
5521
void MultiplicativeExpr(
5522
#line 2304 "Frames/cs.ATG"
5523
ref Expression outExpr) {
5525
#line 2306 "Frames/cs.ATG"
5527
BinaryOperatorType op = BinaryOperatorType.None;
5529
while (la.kind == 6 || la.kind == 7 || la.kind == 8) {
5533
#line 2312 "Frames/cs.ATG"
5534
op = BinaryOperatorType.Multiply;
5535
} else if (la.kind == 7) {
5538
#line 2313 "Frames/cs.ATG"
5539
op = BinaryOperatorType.Divide;
5543
#line 2314 "Frames/cs.ATG"
5544
op = BinaryOperatorType.Modulus;
5547
#line 2316 "Frames/cs.ATG"
5550
#line 2316 "Frames/cs.ATG"
5551
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
5555
void TypeParameterConstraintsClauseBase(
5556
#line 2422 "Frames/cs.ATG"
5557
out TypeReference type) {
5559
#line 2423 "Frames/cs.ATG"
5560
TypeReference t; type = null;
5561
if (la.kind == 109) {
5564
#line 2425 "Frames/cs.ATG"
5565
type = TypeReference.StructConstraint;
5566
} else if (la.kind == 59) {
5569
#line 2426 "Frames/cs.ATG"
5570
type = TypeReference.ClassConstraint;
5571
} else if (la.kind == 89) {
5576
#line 2427 "Frames/cs.ATG"
5577
type = TypeReference.NewConstraint;
5578
} else if (StartOf(10)) {
5580
#line 2428 "Frames/cs.ATG"
5583
#line 2428 "Frames/cs.ATG"
5588
void QueryExpressionFromClause(
5589
#line 2443 "Frames/cs.ATG"
5590
out QueryExpressionFromClause fc) {
5592
#line 2444 "Frames/cs.ATG"
5593
fc = new QueryExpressionFromClause(); fc.StartLocation = la.Location;
5596
QueryExpressionFromOrJoinClause(
5597
#line 2448 "Frames/cs.ATG"
5600
#line 2449 "Frames/cs.ATG"
5601
fc.EndLocation = t.EndLocation;
5604
void QueryExpressionBody(
5605
#line 2479 "Frames/cs.ATG"
5606
ref QueryExpression q) {
5608
#line 2480 "Frames/cs.ATG"
5609
QueryExpressionFromClause fromClause; QueryExpressionWhereClause whereClause;
5610
QueryExpressionLetClause letClause; QueryExpressionJoinClause joinClause;
5611
QueryExpressionOrderClause orderClause;
5612
QueryExpressionSelectClause selectClause; QueryExpressionGroupClause groupClause;
5614
while (StartOf(39)) {
5615
if (la.kind == 137) {
5616
QueryExpressionFromClause(
5617
#line 2486 "Frames/cs.ATG"
5620
#line 2486 "Frames/cs.ATG"
5621
SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, fromClause);
5622
} else if (la.kind == 127) {
5623
QueryExpressionWhereClause(
5624
#line 2487 "Frames/cs.ATG"
5627
#line 2487 "Frames/cs.ATG"
5628
SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, whereClause);
5629
} else if (la.kind == 141) {
5630
QueryExpressionLetClause(
5631
#line 2488 "Frames/cs.ATG"
5634
#line 2488 "Frames/cs.ATG"
5635
SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, letClause);
5636
} else if (la.kind == 142) {
5637
QueryExpressionJoinClause(
5638
#line 2489 "Frames/cs.ATG"
5641
#line 2489 "Frames/cs.ATG"
5642
SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, joinClause);
5644
QueryExpressionOrderByClause(
5645
#line 2490 "Frames/cs.ATG"
5648
#line 2490 "Frames/cs.ATG"
5649
SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, orderClause);
5652
if (la.kind == 133) {
5653
QueryExpressionSelectClause(
5654
#line 2492 "Frames/cs.ATG"
5657
#line 2492 "Frames/cs.ATG"
5658
q.SelectOrGroupClause = selectClause;
5659
} else if (la.kind == 134) {
5660
QueryExpressionGroupClause(
5661
#line 2493 "Frames/cs.ATG"
5664
#line 2493 "Frames/cs.ATG"
5665
q.SelectOrGroupClause = groupClause;
5667
if (la.kind == 136) {
5668
QueryExpressionIntoClause(
5669
#line 2495 "Frames/cs.ATG"
5674
void QueryExpressionFromOrJoinClause(
5675
#line 2469 "Frames/cs.ATG"
5676
QueryExpressionFromOrJoinClause fjc) {
5678
#line 2470 "Frames/cs.ATG"
5679
TypeReference type; Expression expr;
5681
#line 2472 "Frames/cs.ATG"
5684
#line 2473 "Frames/cs.ATG"
5687
#line 2473 "Frames/cs.ATG"
5690
#line 2473 "Frames/cs.ATG"
5695
#line 2474 "Frames/cs.ATG"
5696
fjc.Identifier = t.val;
5699
#line 2476 "Frames/cs.ATG"
5702
#line 2476 "Frames/cs.ATG"
5703
fjc.InExpression = expr;
5706
void QueryExpressionJoinClause(
5707
#line 2452 "Frames/cs.ATG"
5708
out QueryExpressionJoinClause jc) {
5710
#line 2453 "Frames/cs.ATG"
5711
jc = new QueryExpressionJoinClause(); jc.StartLocation = la.Location;
5715
QueryExpressionFromOrJoinClause(
5716
#line 2458 "Frames/cs.ATG"
5720
#line 2460 "Frames/cs.ATG"
5723
#line 2460 "Frames/cs.ATG"
5724
jc.OnExpression = expr;
5727
#line 2462 "Frames/cs.ATG"
5730
#line 2462 "Frames/cs.ATG"
5731
jc.EqualsExpression = expr;
5732
if (la.kind == 136) {
5736
#line 2464 "Frames/cs.ATG"
5737
jc.IntoIdentifier = t.val;
5740
#line 2466 "Frames/cs.ATG"
5741
jc.EndLocation = t.EndLocation;
5744
void QueryExpressionWhereClause(
5745
#line 2498 "Frames/cs.ATG"
5746
out QueryExpressionWhereClause wc) {
5748
#line 2499 "Frames/cs.ATG"
5749
Expression expr; wc = new QueryExpressionWhereClause(); wc.StartLocation = la.Location;
5752
#line 2502 "Frames/cs.ATG"
5755
#line 2502 "Frames/cs.ATG"
5756
wc.Condition = expr;
5758
#line 2503 "Frames/cs.ATG"
5759
wc.EndLocation = t.EndLocation;
5762
void QueryExpressionLetClause(
5763
#line 2506 "Frames/cs.ATG"
5764
out QueryExpressionLetClause wc) {
5766
#line 2507 "Frames/cs.ATG"
5767
Expression expr; wc = new QueryExpressionLetClause(); wc.StartLocation = la.Location;
5771
#line 2510 "Frames/cs.ATG"
5772
wc.Identifier = t.val;
5775
#line 2512 "Frames/cs.ATG"
5778
#line 2512 "Frames/cs.ATG"
5779
wc.Expression = expr;
5781
#line 2513 "Frames/cs.ATG"
5782
wc.EndLocation = t.EndLocation;
5785
void QueryExpressionOrderByClause(
5786
#line 2516 "Frames/cs.ATG"
5787
out QueryExpressionOrderClause oc) {
5789
#line 2517 "Frames/cs.ATG"
5790
QueryExpressionOrdering ordering; oc = new QueryExpressionOrderClause(); oc.StartLocation = la.Location;
5792
QueryExpressionOrdering(
5793
#line 2520 "Frames/cs.ATG"
5796
#line 2520 "Frames/cs.ATG"
5797
SafeAdd(oc, oc.Orderings, ordering);
5798
while (la.kind == 14) {
5800
QueryExpressionOrdering(
5801
#line 2522 "Frames/cs.ATG"
5804
#line 2522 "Frames/cs.ATG"
5805
SafeAdd(oc, oc.Orderings, ordering);
5808
#line 2524 "Frames/cs.ATG"
5809
oc.EndLocation = t.EndLocation;
5812
void QueryExpressionSelectClause(
5813
#line 2537 "Frames/cs.ATG"
5814
out QueryExpressionSelectClause sc) {
5816
#line 2538 "Frames/cs.ATG"
5817
Expression expr; sc = new QueryExpressionSelectClause(); sc.StartLocation = la.Location;
5820
#line 2541 "Frames/cs.ATG"
5823
#line 2541 "Frames/cs.ATG"
5824
sc.Projection = expr;
5826
#line 2542 "Frames/cs.ATG"
5827
sc.EndLocation = t.EndLocation;
5830
void QueryExpressionGroupClause(
5831
#line 2545 "Frames/cs.ATG"
5832
out QueryExpressionGroupClause gc) {
5834
#line 2546 "Frames/cs.ATG"
5835
Expression expr; gc = new QueryExpressionGroupClause(); gc.StartLocation = la.Location;
5838
#line 2549 "Frames/cs.ATG"
5841
#line 2549 "Frames/cs.ATG"
5842
gc.Projection = expr;
5845
#line 2551 "Frames/cs.ATG"
5848
#line 2551 "Frames/cs.ATG"
5851
#line 2552 "Frames/cs.ATG"
5852
gc.EndLocation = t.EndLocation;
5855
void QueryExpressionIntoClause(
5856
#line 2555 "Frames/cs.ATG"
5857
ref QueryExpression q) {
5859
#line 2556 "Frames/cs.ATG"
5860
QueryExpression firstQuery = q;
5861
QueryExpression continuedQuery = new QueryExpression();
5862
continuedQuery.StartLocation = q.StartLocation;
5863
firstQuery.EndLocation = la.Location;
5864
continuedQuery.FromClause = new QueryExpressionFromClause();
5865
continuedQuery.FromClause.StartLocation = la.Location;
5866
// nest firstQuery inside continuedQuery.
5867
continuedQuery.FromClause.InExpression = firstQuery;
5868
continuedQuery.IsQueryContinuation = true;
5874
#line 2569 "Frames/cs.ATG"
5875
continuedQuery.FromClause.Identifier = t.val;
5877
#line 2570 "Frames/cs.ATG"
5878
continuedQuery.FromClause.EndLocation = t.EndLocation;
5879
QueryExpressionBody(
5880
#line 2571 "Frames/cs.ATG"
5884
void QueryExpressionOrdering(
5885
#line 2527 "Frames/cs.ATG"
5886
out QueryExpressionOrdering ordering) {
5888
#line 2528 "Frames/cs.ATG"
5889
Expression expr; ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location;
5891
#line 2530 "Frames/cs.ATG"
5894
#line 2530 "Frames/cs.ATG"
5895
ordering.Criteria = expr;
5896
if (la.kind == 138 || la.kind == 139) {
5897
if (la.kind == 138) {
5900
#line 2531 "Frames/cs.ATG"
5901
ordering.Direction = QueryExpressionOrderingDirection.Ascending;
5905
#line 2532 "Frames/cs.ATG"
5906
ordering.Direction = QueryExpressionOrderingDirection.Descending;
5910
#line 2534 "Frames/cs.ATG"
5911
ordering.EndLocation = t.EndLocation;
5922
protected override void SynErr(int line, int col, int errorNumber)
5925
switch (errorNumber) {
5926
case 0: s = "EOF expected"; break;
5927
case 1: s = "ident expected"; break;
5928
case 2: s = "Literal expected"; break;
5929
case 3: s = "\"=\" expected"; break;
5930
case 4: s = "\"+\" expected"; break;
5931
case 5: s = "\"-\" expected"; break;
5932
case 6: s = "\"*\" expected"; break;
5933
case 7: s = "\"/\" expected"; break;
5934
case 8: s = "\"%\" expected"; break;
5935
case 9: s = "\":\" expected"; break;
5936
case 10: s = "\"::\" expected"; break;
5937
case 11: s = "\";\" expected"; break;
5938
case 12: s = "\"?\" expected"; break;
5939
case 13: s = "\"??\" expected"; break;
5940
case 14: s = "\",\" expected"; break;
5941
case 15: s = "\".\" expected"; break;
5942
case 16: s = "\"{\" expected"; break;
5943
case 17: s = "\"}\" expected"; break;
5944
case 18: s = "\"[\" expected"; break;
5945
case 19: s = "\"]\" expected"; break;
5946
case 20: s = "\"(\" expected"; break;
5947
case 21: s = "\")\" expected"; break;
5948
case 22: s = "\">\" expected"; break;
5949
case 23: s = "\"<\" expected"; break;
5950
case 24: s = "\"!\" expected"; break;
5951
case 25: s = "\"&&\" expected"; break;
5952
case 26: s = "\"||\" expected"; break;
5953
case 27: s = "\"~\" expected"; break;
5954
case 28: s = "\"&\" expected"; break;
5955
case 29: s = "\"|\" expected"; break;
5956
case 30: s = "\"^\" expected"; break;
5957
case 31: s = "\"++\" expected"; break;
5958
case 32: s = "\"--\" expected"; break;
5959
case 33: s = "\"==\" expected"; break;
5960
case 34: s = "\"!=\" expected"; break;
5961
case 35: s = "\">=\" expected"; break;
5962
case 36: s = "\"<=\" expected"; break;
5963
case 37: s = "\"<<\" expected"; break;
5964
case 38: s = "\"+=\" expected"; break;
5965
case 39: s = "\"-=\" expected"; break;
5966
case 40: s = "\"*=\" expected"; break;
5967
case 41: s = "\"/=\" expected"; break;
5968
case 42: s = "\"%=\" expected"; break;
5969
case 43: s = "\"&=\" expected"; break;
5970
case 44: s = "\"|=\" expected"; break;
5971
case 45: s = "\"^=\" expected"; break;
5972
case 46: s = "\"<<=\" expected"; break;
5973
case 47: s = "\"->\" expected"; break;
5974
case 48: s = "\"=>\" expected"; break;
5975
case 49: s = "\"abstract\" expected"; break;
5976
case 50: s = "\"as\" expected"; break;
5977
case 51: s = "\"base\" expected"; break;
5978
case 52: s = "\"bool\" expected"; break;
5979
case 53: s = "\"break\" expected"; break;
5980
case 54: s = "\"byte\" expected"; break;
5981
case 55: s = "\"case\" expected"; break;
5982
case 56: s = "\"catch\" expected"; break;
5983
case 57: s = "\"char\" expected"; break;
5984
case 58: s = "\"checked\" expected"; break;
5985
case 59: s = "\"class\" expected"; break;
5986
case 60: s = "\"const\" expected"; break;
5987
case 61: s = "\"continue\" expected"; break;
5988
case 62: s = "\"decimal\" expected"; break;
5989
case 63: s = "\"default\" expected"; break;
5990
case 64: s = "\"delegate\" expected"; break;
5991
case 65: s = "\"do\" expected"; break;
5992
case 66: s = "\"double\" expected"; break;
5993
case 67: s = "\"else\" expected"; break;
5994
case 68: s = "\"enum\" expected"; break;
5995
case 69: s = "\"event\" expected"; break;
5996
case 70: s = "\"explicit\" expected"; break;
5997
case 71: s = "\"extern\" expected"; break;
5998
case 72: s = "\"false\" expected"; break;
5999
case 73: s = "\"finally\" expected"; break;
6000
case 74: s = "\"fixed\" expected"; break;
6001
case 75: s = "\"float\" expected"; break;
6002
case 76: s = "\"for\" expected"; break;
6003
case 77: s = "\"foreach\" expected"; break;
6004
case 78: s = "\"goto\" expected"; break;
6005
case 79: s = "\"if\" expected"; break;
6006
case 80: s = "\"implicit\" expected"; break;
6007
case 81: s = "\"in\" expected"; break;
6008
case 82: s = "\"int\" expected"; break;
6009
case 83: s = "\"interface\" expected"; break;
6010
case 84: s = "\"internal\" expected"; break;
6011
case 85: s = "\"is\" expected"; break;
6012
case 86: s = "\"lock\" expected"; break;
6013
case 87: s = "\"long\" expected"; break;
6014
case 88: s = "\"namespace\" expected"; break;
6015
case 89: s = "\"new\" expected"; break;
6016
case 90: s = "\"null\" expected"; break;
6017
case 91: s = "\"object\" expected"; break;
6018
case 92: s = "\"operator\" expected"; break;
6019
case 93: s = "\"out\" expected"; break;
6020
case 94: s = "\"override\" expected"; break;
6021
case 95: s = "\"params\" expected"; break;
6022
case 96: s = "\"private\" expected"; break;
6023
case 97: s = "\"protected\" expected"; break;
6024
case 98: s = "\"public\" expected"; break;
6025
case 99: s = "\"readonly\" expected"; break;
6026
case 100: s = "\"ref\" expected"; break;
6027
case 101: s = "\"return\" expected"; break;
6028
case 102: s = "\"sbyte\" expected"; break;
6029
case 103: s = "\"sealed\" expected"; break;
6030
case 104: s = "\"short\" expected"; break;
6031
case 105: s = "\"sizeof\" expected"; break;
6032
case 106: s = "\"stackalloc\" expected"; break;
6033
case 107: s = "\"static\" expected"; break;
6034
case 108: s = "\"string\" expected"; break;
6035
case 109: s = "\"struct\" expected"; break;
6036
case 110: s = "\"switch\" expected"; break;
6037
case 111: s = "\"this\" expected"; break;
6038
case 112: s = "\"throw\" expected"; break;
6039
case 113: s = "\"true\" expected"; break;
6040
case 114: s = "\"try\" expected"; break;
6041
case 115: s = "\"typeof\" expected"; break;
6042
case 116: s = "\"uint\" expected"; break;
6043
case 117: s = "\"ulong\" expected"; break;
6044
case 118: s = "\"unchecked\" expected"; break;
6045
case 119: s = "\"unsafe\" expected"; break;
6046
case 120: s = "\"ushort\" expected"; break;
6047
case 121: s = "\"using\" expected"; break;
6048
case 122: s = "\"virtual\" expected"; break;
6049
case 123: s = "\"void\" expected"; break;
6050
case 124: s = "\"volatile\" expected"; break;
6051
case 125: s = "\"while\" expected"; break;
6052
case 126: s = "\"partial\" expected"; break;
6053
case 127: s = "\"where\" expected"; break;
6054
case 128: s = "\"get\" expected"; break;
6055
case 129: s = "\"set\" expected"; break;
6056
case 130: s = "\"add\" expected"; break;
6057
case 131: s = "\"remove\" expected"; break;
6058
case 132: s = "\"yield\" expected"; break;
6059
case 133: s = "\"select\" expected"; break;
6060
case 134: s = "\"group\" expected"; break;
6061
case 135: s = "\"by\" expected"; break;
6062
case 136: s = "\"into\" expected"; break;
6063
case 137: s = "\"from\" expected"; break;
6064
case 138: s = "\"ascending\" expected"; break;
6065
case 139: s = "\"descending\" expected"; break;
6066
case 140: s = "\"orderby\" expected"; break;
6067
case 141: s = "\"let\" expected"; break;
6068
case 142: s = "\"join\" expected"; break;
6069
case 143: s = "\"on\" expected"; break;
6070
case 144: s = "\"equals\" expected"; break;
6071
case 145: s = "??? expected"; break;
6072
case 146: s = "invalid NamespaceMemberDecl"; break;
6073
case 147: s = "invalid NonArrayType"; break;
6074
case 148: s = "invalid Identifier"; break;
6075
case 149: s = "invalid AttributeArguments"; break;
6076
case 150: s = "invalid Expr"; break;
6077
case 151: s = "invalid TypeModifier"; break;
6078
case 152: s = "invalid TypeDecl"; break;
6079
case 153: s = "invalid TypeDecl"; break;
6080
case 154: s = "this symbol not expected in ClassBody"; break;
6081
case 155: s = "this symbol not expected in InterfaceBody"; break;
6082
case 156: s = "invalid IntegralType"; break;
6083
case 157: s = "invalid FormalParameterList"; break;
6084
case 158: s = "invalid FormalParameterList"; break;
6085
case 159: s = "invalid ClassType"; break;
6086
case 160: s = "invalid ClassMemberDecl"; break;
6087
case 161: s = "invalid ClassMemberDecl"; break;
6088
case 162: s = "invalid StructMemberDecl"; break;
6089
case 163: s = "invalid StructMemberDecl"; break;
6090
case 164: s = "invalid StructMemberDecl"; break;
6091
case 165: s = "invalid StructMemberDecl"; break;
6092
case 166: s = "invalid StructMemberDecl"; break;
6093
case 167: s = "invalid StructMemberDecl"; break;
6094
case 168: s = "invalid StructMemberDecl"; break;
6095
case 169: s = "invalid StructMemberDecl"; break;
6096
case 170: s = "invalid StructMemberDecl"; break;
6097
case 171: s = "invalid StructMemberDecl"; break;
6098
case 172: s = "invalid StructMemberDecl"; break;
6099
case 173: s = "invalid StructMemberDecl"; break;
6100
case 174: s = "invalid StructMemberDecl"; break;
6101
case 175: s = "invalid InterfaceMemberDecl"; break;
6102
case 176: s = "invalid InterfaceMemberDecl"; break;
6103
case 177: s = "invalid InterfaceMemberDecl"; break;
6104
case 178: s = "invalid TypeWithRestriction"; break;
6105
case 179: s = "invalid TypeWithRestriction"; break;
6106
case 180: s = "invalid SimpleType"; break;
6107
case 181: s = "invalid AccessorModifiers"; break;
6108
case 182: s = "this symbol not expected in Block"; break;
6109
case 183: s = "invalid EventAccessorDecls"; break;
6110
case 184: s = "invalid ConstructorInitializer"; break;
6111
case 185: s = "invalid OverloadableOperator"; break;
6112
case 186: s = "invalid AccessorDecls"; break;
6113
case 187: s = "invalid InterfaceAccessors"; break;
6114
case 188: s = "invalid InterfaceAccessors"; break;
6115
case 189: s = "invalid GetAccessorDecl"; break;
6116
case 190: s = "invalid SetAccessorDecl"; break;
6117
case 191: s = "invalid VariableInitializer"; break;
6118
case 192: s = "this symbol not expected in Statement"; break;
6119
case 193: s = "invalid Statement"; break;
6120
case 194: s = "invalid AssignmentOperator"; break;
6121
case 195: s = "invalid ObjectPropertyInitializerOrVariableInitializer"; break;
6122
case 196: s = "invalid ObjectPropertyInitializerOrVariableInitializer"; break;
6123
case 197: s = "invalid EmbeddedStatement"; break;
6124
case 198: s = "invalid EmbeddedStatement"; break;
6125
case 199: s = "this symbol not expected in EmbeddedStatement"; break;
6126
case 200: s = "invalid EmbeddedStatement"; break;
6127
case 201: s = "invalid ForInitializer"; break;
6128
case 202: s = "invalid GotoStatement"; break;
6129
case 203: s = "invalid ResourceAcquisition"; break;
6130
case 204: s = "invalid SwitchLabel"; break;
6131
case 205: s = "invalid CatchClause"; break;
6132
case 206: s = "invalid UnaryExpr"; break;
6133
case 207: s = "invalid PrimaryExpr"; break;
6134
case 208: s = "invalid PrimaryExpr"; break;
6135
case 209: s = "invalid PrimaryExpr"; break;
6136
case 210: s = "invalid TypeArgumentList"; break;
6137
case 211: s = "invalid NewExpression"; break;
6138
case 212: s = "invalid NewExpression"; break;
6139
case 213: s = "invalid LambdaExpressionParameter"; break;
6140
case 214: s = "invalid LambdaExpressionBody"; break;
6141
case 215: s = "invalid RelationalExpr"; break;
6142
case 216: s = "invalid RelationalExpr"; break;
6143
case 217: s = "invalid TypeParameterConstraintsClauseBase"; break;
6144
case 218: s = "invalid QueryExpressionBody"; break;
6146
default: s = "error " + errorNumber; break;
6148
this.Errors.Error(line, col, s);
6151
private bool StartOf(int s)
6153
return set[s, lexer.LookAhead.kind];
6156
static bool[,] set = {
6157
{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},
6158
{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},
6159
{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},
6160
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,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},
6161
{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},
6162
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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},
6163
{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},
6164
{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},
6165
{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},
6166
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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},
6167
{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},
6168
{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},
6169
{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},
6170
{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},
6171
{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},
6172
{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},
6173
{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},
6174
{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},
6175
{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},
6176
{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},
6177
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,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},
6178
{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},
6179
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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},
6180
{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},
6181
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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},
6182
{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},
6183
{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},
6184
{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},
6185
{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},
6186
{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},
6187
{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},
6188
{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},
6189
{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},
6190
{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},
6191
{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},
6192
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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},
6193
{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},
6194
{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},
6195
{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},
6196
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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}
b'\\ No newline at end of file'