[Monodevelop-patches-list] r2404 - trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Wed Mar 30 19:24:20 EST 2005
Author: jluke
Date: 2005-03-30 19:24:20 -0500 (Wed, 30 Mar 2005)
New Revision: 2404
Modified:
trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs
Log:
whoops
Modified: trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs
===================================================================
--- trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs 2005-03-31 00:23:02 UTC (rev 2403)
+++ trunk/MonoDevelop/Core/src/ICSharpCode.SharpRefactory/src/Parser/generated/Parser.cs 2005-03-31 00:24:20 UTC (rev 2404)
@@ -348,11 +348,6 @@
pt.kind == Tokens.Identifier;
}
-/* True, if lookahead ident is "partial" */
-bool IdentIsPartial () {
- return la.kind == Tokens.Identifier && la.val == "partial";
-}
-
/* True, if lookahead ident is "yield" */
bool IdentIsYield () {
return la.kind == Tokens.Identifier && la.val == "yield";
@@ -466,13 +461,13 @@
void CS() {
-#line 526 "cs.ATG"
+#line 521 "cs.ATG"
compilationUnit = new CompilationUnit();
while (la.kind == 120) {
UsingDirective();
}
while (
-#line 529 "cs.ATG"
+#line 524 "cs.ATG"
IsGlobalAttrTarget()) {
GlobalAttributeSection();
}
@@ -484,30 +479,30 @@
void UsingDirective() {
-#line 536 "cs.ATG"
+#line 531 "cs.ATG"
usingNamespaces = new ArrayList();
string qualident = null, aliasident = null;
Expect(120);
-#line 540 "cs.ATG"
+#line 535 "cs.ATG"
Point startPos = t.Location;
INode node = null;
if (
-#line 543 "cs.ATG"
+#line 538 "cs.ATG"
IsAssignment()) {
lexer.NextToken();
-#line 543 "cs.ATG"
+#line 538 "cs.ATG"
aliasident = t.val;
Expect(3);
}
Qualident(
-#line 544 "cs.ATG"
+#line 539 "cs.ATG"
out qualident);
-#line 544 "cs.ATG"
+#line 539 "cs.ATG"
if (qualident != null && qualident.Length > 0) {
if (aliasident != null) {
node = new UsingAliasDeclaration(aliasident, qualident);
@@ -519,7 +514,7 @@
Expect(10);
-#line 553 "cs.ATG"
+#line 548 "cs.ATG"
node.StartLocation = startPos;
node.EndLocation = t.EndLocation;
compilationUnit.AddChild(node);
@@ -529,11 +524,11 @@
void GlobalAttributeSection() {
Expect(16);
-#line 562 "cs.ATG"
+#line 557 "cs.ATG"
Point startPos = t.Location;
Expect(1);
-#line 562 "cs.ATG"
+#line 557 "cs.ATG"
if (t.val != "assembly") Error("global attribute target specifier (\"assembly\") expected");
string attributeTarget = t.val;
ArrayList attributes = new ArrayList();
@@ -541,20 +536,20 @@
Expect(9);
Attribute(
-#line 567 "cs.ATG"
+#line 562 "cs.ATG"
out attribute);
-#line 567 "cs.ATG"
+#line 562 "cs.ATG"
attributes.Add(attribute);
while (
-#line 568 "cs.ATG"
+#line 563 "cs.ATG"
NotFinalComma()) {
Expect(12);
Attribute(
-#line 568 "cs.ATG"
+#line 563 "cs.ATG"
out attribute);
-#line 568 "cs.ATG"
+#line 563 "cs.ATG"
attributes.Add(attribute);
}
if (la.kind == 12) {
@@ -562,7 +557,7 @@
}
Expect(17);
-#line 570 "cs.ATG"
+#line 565 "cs.ATG"
AttributeSection section = new AttributeSection(attributeTarget, attributes);
section.StartLocation = startPos;
section.EndLocation = t.EndLocation;
@@ -572,7 +567,7 @@
void NamespaceMemberDecl() {
-#line 652 "cs.ATG"
+#line 647 "cs.ATG"
AttributeSection section;
ArrayList attributes = new ArrayList();
Modifiers m = new Modifiers(this);
@@ -581,13 +576,13 @@
if (la.kind == 87) {
lexer.NextToken();
-#line 658 "cs.ATG"
+#line 653 "cs.ATG"
Point startPos = t.Location;
Qualident(
-#line 659 "cs.ATG"
+#line 654 "cs.ATG"
out qualident);
-#line 659 "cs.ATG"
+#line 654 "cs.ATG"
INode node = new NamespaceDeclaration(qualident);
node.StartLocation = startPos;
compilationUnit.AddChild(node);
@@ -605,83 +600,83 @@
lexer.NextToken();
}
-#line 668 "cs.ATG"
+#line 663 "cs.ATG"
node.EndLocation = t.EndLocation;
compilationUnit.BlockEnd();
} else if (StartOf(2)) {
while (la.kind == 16) {
AttributeSection(
-#line 672 "cs.ATG"
+#line 667 "cs.ATG"
out section);
-#line 672 "cs.ATG"
+#line 667 "cs.ATG"
attributes.Add(section);
}
while (StartOf(3)) {
TypeModifier(
-#line 673 "cs.ATG"
+#line 668 "cs.ATG"
m);
}
TypeDecl(
-#line 674 "cs.ATG"
+#line 669 "cs.ATG"
m, attributes);
} else SynErr(126);
}
void Qualident(
-#line 769 "cs.ATG"
+#line 754 "cs.ATG"
out string qualident) {
Expect(1);
-#line 771 "cs.ATG"
+#line 756 "cs.ATG"
StringBuilder qualidentBuilder = new StringBuilder(t.val);
while (
-#line 772 "cs.ATG"
+#line 757 "cs.ATG"
DotAndIdent()) {
Expect(13);
Expect(1);
-#line 772 "cs.ATG"
+#line 757 "cs.ATG"
qualidentBuilder.Append('.');
qualidentBuilder.Append(t.val);
}
-#line 775 "cs.ATG"
+#line 760 "cs.ATG"
qualident = qualidentBuilder.ToString();
}
void Attribute(
-#line 577 "cs.ATG"
+#line 572 "cs.ATG"
out ICSharpCode.SharpRefactory.Parser.AST.Attribute attribute) {
-#line 578 "cs.ATG"
+#line 573 "cs.ATG"
string qualident;
Qualident(
-#line 580 "cs.ATG"
+#line 575 "cs.ATG"
out qualident);
-#line 580 "cs.ATG"
+#line 575 "cs.ATG"
ArrayList positional = new ArrayList();
ArrayList named = new ArrayList();
string name = qualident;
if (la.kind == 18) {
AttributeArguments(
-#line 584 "cs.ATG"
+#line 579 "cs.ATG"
ref positional, ref named);
}
-#line 584 "cs.ATG"
+#line 579 "cs.ATG"
attribute = new ICSharpCode.SharpRefactory.Parser.AST.Attribute(name, positional, named);
}
void AttributeArguments(
-#line 587 "cs.ATG"
+#line 582 "cs.ATG"
ref ArrayList positional, ref ArrayList named) {
-#line 589 "cs.ATG"
+#line 584 "cs.ATG"
bool nameFound = false;
string name = "";
Expression expr;
@@ -689,48 +684,48 @@
Expect(18);
if (StartOf(4)) {
if (
-#line 597 "cs.ATG"
+#line 592 "cs.ATG"
IsAssignment()) {
-#line 597 "cs.ATG"
+#line 592 "cs.ATG"
nameFound = true;
lexer.NextToken();
-#line 598 "cs.ATG"
+#line 593 "cs.ATG"
name = t.val;
Expect(3);
}
Expr(
-#line 600 "cs.ATG"
+#line 595 "cs.ATG"
out expr);
-#line 600 "cs.ATG"
+#line 595 "cs.ATG"
if(name == "") positional.Add(expr);
else { named.Add(new NamedArgument(name, expr)); name = ""; }
while (la.kind == 12) {
lexer.NextToken();
if (
-#line 607 "cs.ATG"
+#line 602 "cs.ATG"
IsAssignment()) {
-#line 607 "cs.ATG"
+#line 602 "cs.ATG"
nameFound = true;
Expect(1);
-#line 608 "cs.ATG"
+#line 603 "cs.ATG"
name = t.val;
Expect(3);
} else if (StartOf(4)) {
-#line 610 "cs.ATG"
+#line 605 "cs.ATG"
if (nameFound) Error("no positional argument after named argument");
} else SynErr(127);
Expr(
-#line 611 "cs.ATG"
+#line 606 "cs.ATG"
out expr);
-#line 611 "cs.ATG"
+#line 606 "cs.ATG"
if(name == "") positional.Add(expr);
else { named.Add(new NamedArgument(name, expr)); name = ""; }
@@ -740,52 +735,52 @@
}
void Expr(
-#line 1751 "cs.ATG"
+#line 1736 "cs.ATG"
out Expression expr) {
-#line 1752 "cs.ATG"
+#line 1737 "cs.ATG"
expr = null; Expression expr1 = null, expr2 = null;
UnaryExpr(
-#line 1754 "cs.ATG"
+#line 1739 "cs.ATG"
out expr);
if (StartOf(5)) {
ConditionalOrExpr(
-#line 1757 "cs.ATG"
+#line 1742 "cs.ATG"
ref expr);
if (la.kind == 11) {
lexer.NextToken();
Expr(
-#line 1757 "cs.ATG"
+#line 1742 "cs.ATG"
out expr1);
Expect(9);
Expr(
-#line 1757 "cs.ATG"
+#line 1742 "cs.ATG"
out expr2);
-#line 1757 "cs.ATG"
+#line 1742 "cs.ATG"
expr = new ConditionalExpression(expr, expr1, expr2);
}
} else if (StartOf(6)) {
-#line 1759 "cs.ATG"
+#line 1744 "cs.ATG"
AssignmentOperatorType op; Expression val;
AssignmentOperator(
-#line 1759 "cs.ATG"
+#line 1744 "cs.ATG"
out op);
Expr(
-#line 1759 "cs.ATG"
+#line 1744 "cs.ATG"
out val);
-#line 1759 "cs.ATG"
+#line 1744 "cs.ATG"
expr = new AssignmentExpression(expr, op, val);
} else SynErr(128);
}
void AttributeSection(
-#line 619 "cs.ATG"
+#line 614 "cs.ATG"
out AttributeSection section) {
-#line 621 "cs.ATG"
+#line 616 "cs.ATG"
string attributeTarget = "";
ArrayList attributes = new ArrayList();
ICSharpCode.SharpRefactory.Parser.AST.Attribute attribute;
@@ -793,25 +788,25 @@
Expect(16);
-#line 627 "cs.ATG"
+#line 622 "cs.ATG"
Point startPos = t.Location;
if (
-#line 628 "cs.ATG"
+#line 623 "cs.ATG"
IsLocalAttrTarget()) {
if (la.kind == 68) {
lexer.NextToken();
-#line 629 "cs.ATG"
+#line 624 "cs.ATG"
attributeTarget = "event";
} else if (la.kind == 100) {
lexer.NextToken();
-#line 630 "cs.ATG"
+#line 625 "cs.ATG"
attributeTarget = "return";
} else {
lexer.NextToken();
-#line 631 "cs.ATG"
+#line 626 "cs.ATG"
if (t.val != "field" || t.val != "method" ||
t.val != "module" || t.val != "param" ||
t.val != "property" || t.val != "type")
@@ -823,20 +818,20 @@
Expect(9);
}
Attribute(
-#line 641 "cs.ATG"
+#line 636 "cs.ATG"
out attribute);
-#line 641 "cs.ATG"
+#line 636 "cs.ATG"
attributes.Add(attribute);
while (
-#line 642 "cs.ATG"
+#line 637 "cs.ATG"
NotFinalComma()) {
Expect(12);
Attribute(
-#line 642 "cs.ATG"
+#line 637 "cs.ATG"
out attribute);
-#line 642 "cs.ATG"
+#line 637 "cs.ATG"
attributes.Add(attribute);
}
if (la.kind == 12) {
@@ -844,7 +839,7 @@
}
Expect(17);
-#line 644 "cs.ATG"
+#line 639 "cs.ATG"
section = new AttributeSection(attributeTarget, attributes);
section.StartLocation = startPos;
section.EndLocation = t.EndLocation;
@@ -852,69 +847,69 @@
}
void TypeModifier(
-#line 940 "cs.ATG"
+#line 925 "cs.ATG"
Modifiers m) {
switch (la.kind) {
case 88: {
lexer.NextToken();
-#line 942 "cs.ATG"
+#line 927 "cs.ATG"
m.Add(Modifier.New);
break;
}
case 97: {
lexer.NextToken();
-#line 943 "cs.ATG"
+#line 928 "cs.ATG"
m.Add(Modifier.Public);
break;
}
case 96: {
lexer.NextToken();
-#line 944 "cs.ATG"
+#line 929 "cs.ATG"
m.Add(Modifier.Protected);
break;
}
case 83: {
lexer.NextToken();
-#line 945 "cs.ATG"
+#line 930 "cs.ATG"
m.Add(Modifier.Internal);
break;
}
case 95: {
lexer.NextToken();
-#line 946 "cs.ATG"
+#line 931 "cs.ATG"
m.Add(Modifier.Private);
break;
}
case 118: {
lexer.NextToken();
-#line 947 "cs.ATG"
+#line 932 "cs.ATG"
m.Add(Modifier.Unsafe);
break;
}
case 48: {
lexer.NextToken();
-#line 948 "cs.ATG"
+#line 933 "cs.ATG"
m.Add(Modifier.Abstract);
break;
}
case 102: {
lexer.NextToken();
-#line 949 "cs.ATG"
+#line 934 "cs.ATG"
m.Add(Modifier.Sealed);
break;
}
case 106: {
lexer.NextToken();
-#line 950 "cs.ATG"
+#line 935 "cs.ATG"
m.Add(Modifier.Static);
break;
}
@@ -923,25 +918,21 @@
}
void TypeDecl(
-#line 685 "cs.ATG"
+#line 672 "cs.ATG"
Modifiers m, ArrayList attributes) {
-#line 687 "cs.ATG"
+#line 674 "cs.ATG"
TypeReference type;
StringCollection names;
ArrayList p; string name;
- bool partial;
- if (la.kind == 1 || la.kind == 58) {
+ if (la.kind == 58) {
-#line 692 "cs.ATG"
+#line 678 "cs.ATG"
m.Check(Modifier.Classes);
- PartialDecl(
-#line 693 "cs.ATG"
-out partial);
- Expect(58);
+ lexer.NextToken();
-#line 694 "cs.ATG"
+#line 679 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration();
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
@@ -952,36 +943,36 @@
Expect(1);
-#line 702 "cs.ATG"
+#line 687 "cs.ATG"
newType.Name = t.val;
if (la.kind == 9) {
ClassBase(
-#line 703 "cs.ATG"
+#line 688 "cs.ATG"
out names);
-#line 703 "cs.ATG"
+#line 688 "cs.ATG"
newType.BaseTypes = names;
}
-#line 703 "cs.ATG"
+#line 688 "cs.ATG"
newType.StartLocation = t.EndLocation;
ClassBody();
if (la.kind == 10) {
lexer.NextToken();
}
-#line 705 "cs.ATG"
+#line 690 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (StartOf(7)) {
-#line 708 "cs.ATG"
+#line 693 "cs.ATG"
m.Check(Modifier.StructsInterfacesEnumsDelegates);
if (la.kind == 108) {
lexer.NextToken();
-#line 709 "cs.ATG"
+#line 694 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration();
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
@@ -991,32 +982,32 @@
Expect(1);
-#line 716 "cs.ATG"
+#line 701 "cs.ATG"
newType.Name = t.val;
if (la.kind == 9) {
StructInterfaces(
-#line 717 "cs.ATG"
+#line 702 "cs.ATG"
out names);
-#line 717 "cs.ATG"
+#line 702 "cs.ATG"
newType.BaseTypes = names;
}
-#line 717 "cs.ATG"
+#line 702 "cs.ATG"
newType.StartLocation = t.EndLocation;
StructBody();
if (la.kind == 10) {
lexer.NextToken();
}
-#line 719 "cs.ATG"
+#line 704 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (la.kind == 82) {
lexer.NextToken();
-#line 723 "cs.ATG"
+#line 708 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration();
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
@@ -1025,32 +1016,32 @@
newType.Modifier = m.Modifier;
Expect(1);
-#line 729 "cs.ATG"
+#line 714 "cs.ATG"
newType.Name = t.val;
if (la.kind == 9) {
InterfaceBase(
-#line 730 "cs.ATG"
+#line 715 "cs.ATG"
out names);
-#line 730 "cs.ATG"
+#line 715 "cs.ATG"
newType.BaseTypes = names;
}
-#line 730 "cs.ATG"
+#line 715 "cs.ATG"
newType.StartLocation = t.EndLocation;
InterfaceBody();
if (la.kind == 10) {
lexer.NextToken();
}
-#line 732 "cs.ATG"
+#line 717 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (la.kind == 67) {
lexer.NextToken();
-#line 736 "cs.ATG"
+#line 721 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration();
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
@@ -1059,72 +1050,72 @@
newType.Modifier = m.Modifier;
Expect(1);
-#line 742 "cs.ATG"
+#line 727 "cs.ATG"
newType.Name = t.val;
if (la.kind == 9) {
lexer.NextToken();
IntegralType(
-#line 743 "cs.ATG"
+#line 728 "cs.ATG"
out name);
-#line 743 "cs.ATG"
+#line 728 "cs.ATG"
newType.BaseTypes = new StringCollection();
newType.BaseTypes.Add(name);
}
-#line 746 "cs.ATG"
+#line 731 "cs.ATG"
newType.StartLocation = t.EndLocation;
EnumBody();
if (la.kind == 10) {
lexer.NextToken();
}
-#line 748 "cs.ATG"
+#line 733 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else {
lexer.NextToken();
-#line 752 "cs.ATG"
+#line 737 "cs.ATG"
DelegateDeclaration delegateDeclr = new DelegateDeclaration();
delegateDeclr.StartLocation = t.Location;
delegateDeclr.Modifier = m.Modifier;
delegateDeclr.Attributes = attributes;
if (
-#line 757 "cs.ATG"
+#line 742 "cs.ATG"
NotVoidPointer()) {
Expect(122);
-#line 757 "cs.ATG"
+#line 742 "cs.ATG"
delegateDeclr.ReturnType = new TypeReference("void", 0, null);
} else if (StartOf(8)) {
Type(
-#line 758 "cs.ATG"
+#line 743 "cs.ATG"
out type);
-#line 758 "cs.ATG"
+#line 743 "cs.ATG"
delegateDeclr.ReturnType = type;
} else SynErr(130);
Expect(1);
-#line 760 "cs.ATG"
+#line 745 "cs.ATG"
delegateDeclr.Name = t.val;
Expect(18);
if (StartOf(9)) {
FormalParameterList(
-#line 761 "cs.ATG"
+#line 746 "cs.ATG"
out p);
-#line 761 "cs.ATG"
+#line 746 "cs.ATG"
delegateDeclr.Parameters = p;
}
Expect(19);
Expect(10);
-#line 763 "cs.ATG"
+#line 748 "cs.ATG"
delegateDeclr.EndLocation = t.Location;
compilationUnit.AddChild(delegateDeclr);
@@ -1132,157 +1123,142 @@
} else SynErr(131);
}
- void PartialDecl(
-#line 677 "cs.ATG"
-out bool partial) {
-
-#line 679 "cs.ATG"
- partial = false;
-
- if (la.kind == 1) {
- lexer.NextToken();
-
-#line 682 "cs.ATG"
- if (t.val == "partial") partial = true;
- }
- }
-
void ClassBase(
-#line 778 "cs.ATG"
+#line 763 "cs.ATG"
out StringCollection names) {
-#line 780 "cs.ATG"
+#line 765 "cs.ATG"
string qualident;
names = new StringCollection();
Expect(9);
ClassType(
-#line 784 "cs.ATG"
+#line 769 "cs.ATG"
out qualident);
-#line 784 "cs.ATG"
+#line 769 "cs.ATG"
names.Add(qualident);
while (la.kind == 12) {
lexer.NextToken();
Qualident(
-#line 785 "cs.ATG"
+#line 770 "cs.ATG"
out qualident);
-#line 785 "cs.ATG"
+#line 770 "cs.ATG"
names.Add(qualident);
}
}
void ClassBody() {
-#line 789 "cs.ATG"
+#line 774 "cs.ATG"
AttributeSection section;
Expect(14);
while (StartOf(10)) {
-#line 792 "cs.ATG"
+#line 777 "cs.ATG"
ArrayList attributes = new ArrayList();
Modifiers m = new Modifiers(this);
while (la.kind == 16) {
AttributeSection(
-#line 795 "cs.ATG"
+#line 780 "cs.ATG"
out section);
-#line 795 "cs.ATG"
+#line 780 "cs.ATG"
attributes.Add(section);
}
while (StartOf(11)) {
MemberModifier(
-#line 796 "cs.ATG"
+#line 781 "cs.ATG"
m);
}
ClassMemberDecl(
-#line 797 "cs.ATG"
+#line 782 "cs.ATG"
m, attributes);
}
Expect(15);
}
void StructInterfaces(
-#line 802 "cs.ATG"
+#line 787 "cs.ATG"
out StringCollection names) {
-#line 804 "cs.ATG"
+#line 789 "cs.ATG"
string qualident;
names = new StringCollection();
Expect(9);
Qualident(
-#line 808 "cs.ATG"
+#line 793 "cs.ATG"
out qualident);
-#line 808 "cs.ATG"
+#line 793 "cs.ATG"
names.Add(qualident);
while (la.kind == 12) {
lexer.NextToken();
Qualident(
-#line 809 "cs.ATG"
+#line 794 "cs.ATG"
out qualident);
-#line 809 "cs.ATG"
+#line 794 "cs.ATG"
names.Add(qualident);
}
}
void StructBody() {
-#line 813 "cs.ATG"
+#line 798 "cs.ATG"
AttributeSection section;
Expect(14);
while (StartOf(12)) {
-#line 816 "cs.ATG"
+#line 801 "cs.ATG"
ArrayList attributes = new ArrayList();
Modifiers m = new Modifiers(this);
while (la.kind == 16) {
AttributeSection(
-#line 819 "cs.ATG"
+#line 804 "cs.ATG"
out section);
-#line 819 "cs.ATG"
+#line 804 "cs.ATG"
attributes.Add(section);
}
while (StartOf(11)) {
MemberModifier(
-#line 820 "cs.ATG"
+#line 805 "cs.ATG"
m);
}
StructMemberDecl(
-#line 821 "cs.ATG"
+#line 806 "cs.ATG"
m, attributes);
}
Expect(15);
}
void InterfaceBase(
-#line 826 "cs.ATG"
+#line 811 "cs.ATG"
out StringCollection names) {
-#line 828 "cs.ATG"
+#line 813 "cs.ATG"
string qualident;
names = new StringCollection();
Expect(9);
Qualident(
-#line 832 "cs.ATG"
+#line 817 "cs.ATG"
out qualident);
-#line 832 "cs.ATG"
+#line 817 "cs.ATG"
names.Add(qualident);
while (la.kind == 12) {
lexer.NextToken();
Qualident(
-#line 833 "cs.ATG"
+#line 818 "cs.ATG"
out qualident);
-#line 833 "cs.ATG"
+#line 818 "cs.ATG"
names.Add(qualident);
}
}
@@ -1296,72 +1272,72 @@
}
void IntegralType(
-#line 960 "cs.ATG"
+#line 945 "cs.ATG"
out string name) {
-#line 960 "cs.ATG"
+#line 945 "cs.ATG"
name = "";
switch (la.kind) {
case 101: {
lexer.NextToken();
-#line 962 "cs.ATG"
+#line 947 "cs.ATG"
name = "sbyte";
break;
}
case 53: {
lexer.NextToken();
-#line 963 "cs.ATG"
+#line 948 "cs.ATG"
name = "byte";
break;
}
case 103: {
lexer.NextToken();
-#line 964 "cs.ATG"
+#line 949 "cs.ATG"
name = "short";
break;
}
case 119: {
lexer.NextToken();
-#line 965 "cs.ATG"
+#line 950 "cs.ATG"
name = "ushort";
break;
}
case 81: {
lexer.NextToken();
-#line 966 "cs.ATG"
+#line 951 "cs.ATG"
name = "int";
break;
}
case 115: {
lexer.NextToken();
-#line 967 "cs.ATG"
+#line 952 "cs.ATG"
name = "uint";
break;
}
case 86: {
lexer.NextToken();
-#line 968 "cs.ATG"
+#line 953 "cs.ATG"
name = "long";
break;
}
case 116: {
lexer.NextToken();
-#line 969 "cs.ATG"
+#line 954 "cs.ATG"
name = "ulong";
break;
}
case 56: {
lexer.NextToken();
-#line 970 "cs.ATG"
+#line 955 "cs.ATG"
name = "char";
break;
}
@@ -1371,25 +1347,25 @@
void EnumBody() {
-#line 839 "cs.ATG"
+#line 824 "cs.ATG"
FieldDeclaration f;
Expect(14);
if (la.kind == 1 || la.kind == 16) {
EnumMemberDecl(
-#line 841 "cs.ATG"
+#line 826 "cs.ATG"
out f);
-#line 841 "cs.ATG"
+#line 826 "cs.ATG"
compilationUnit.AddChild(f);
while (
-#line 842 "cs.ATG"
+#line 827 "cs.ATG"
NotFinalComma()) {
Expect(12);
EnumMemberDecl(
-#line 842 "cs.ATG"
+#line 827 "cs.ATG"
out f);
-#line 842 "cs.ATG"
+#line 827 "cs.ATG"
compilationUnit.AddChild(f);
}
if (la.kind == 12) {
@@ -1400,68 +1376,68 @@
}
void Type(
-#line 847 "cs.ATG"
+#line 832 "cs.ATG"
out TypeReference type) {
-#line 849 "cs.ATG"
+#line 834 "cs.ATG"
string name = "";
int pointer = 0;
if (la.kind == 1 || la.kind == 90 || la.kind == 107) {
ClassType(
-#line 853 "cs.ATG"
+#line 838 "cs.ATG"
out name);
} else if (StartOf(14)) {
SimpleType(
-#line 854 "cs.ATG"
+#line 839 "cs.ATG"
out name);
} else if (la.kind == 122) {
lexer.NextToken();
Expect(6);
-#line 855 "cs.ATG"
+#line 840 "cs.ATG"
pointer = 1; name = "void";
} else SynErr(133);
-#line 856 "cs.ATG"
+#line 841 "cs.ATG"
ArrayList r = new ArrayList();
while (
-#line 857 "cs.ATG"
+#line 842 "cs.ATG"
IsPointerOrDims()) {
-#line 857 "cs.ATG"
+#line 842 "cs.ATG"
int i = 1;
if (la.kind == 6) {
lexer.NextToken();
-#line 858 "cs.ATG"
+#line 843 "cs.ATG"
++pointer;
} else if (la.kind == 16) {
lexer.NextToken();
while (la.kind == 12) {
lexer.NextToken();
-#line 859 "cs.ATG"
+#line 844 "cs.ATG"
++i;
}
Expect(17);
-#line 859 "cs.ATG"
+#line 844 "cs.ATG"
r.Add(i);
} else SynErr(134);
}
-#line 861 "cs.ATG"
+#line 846 "cs.ATG"
int[] rank = new int[r.Count]; r.CopyTo(rank);
type = new TypeReference(name, pointer, rank);
}
void FormalParameterList(
-#line 895 "cs.ATG"
+#line 880 "cs.ATG"
out ArrayList parameter) {
-#line 897 "cs.ATG"
+#line 882 "cs.ATG"
parameter = new ArrayList();
ParameterDeclarationExpression p;
AttributeSection section;
@@ -1469,18 +1445,18 @@
while (la.kind == 16) {
AttributeSection(
-#line 903 "cs.ATG"
+#line 888 "cs.ATG"
out section);
-#line 903 "cs.ATG"
+#line 888 "cs.ATG"
attributes.Add(section);
}
if (StartOf(15)) {
FixedParameter(
-#line 905 "cs.ATG"
+#line 890 "cs.ATG"
out p);
-#line 905 "cs.ATG"
+#line 890 "cs.ATG"
bool paramsFound = false;
p.Attributes = attributes;
parameter.Add(p);
@@ -1488,167 +1464,167 @@
while (la.kind == 12) {
lexer.NextToken();
-#line 910 "cs.ATG"
+#line 895 "cs.ATG"
attributes = new ArrayList(); if (paramsFound) Error("params array must be at end of parameter list");
while (la.kind == 16) {
AttributeSection(
-#line 911 "cs.ATG"
+#line 896 "cs.ATG"
out section);
-#line 911 "cs.ATG"
+#line 896 "cs.ATG"
attributes.Add(section);
}
if (StartOf(15)) {
FixedParameter(
-#line 913 "cs.ATG"
+#line 898 "cs.ATG"
out p);
-#line 913 "cs.ATG"
+#line 898 "cs.ATG"
p.Attributes = attributes; parameter.Add(p);
} else if (la.kind == 94) {
ParameterArray(
-#line 914 "cs.ATG"
+#line 899 "cs.ATG"
out p);
-#line 914 "cs.ATG"
+#line 899 "cs.ATG"
paramsFound = true; p.Attributes = attributes; parameter.Add(p);
} else SynErr(135);
}
} else if (la.kind == 94) {
ParameterArray(
-#line 917 "cs.ATG"
+#line 902 "cs.ATG"
out p);
-#line 917 "cs.ATG"
+#line 902 "cs.ATG"
p.Attributes = attributes; parameter.Add(p);
} else SynErr(136);
}
void ClassType(
-#line 953 "cs.ATG"
+#line 938 "cs.ATG"
out string name) {
-#line 953 "cs.ATG"
+#line 938 "cs.ATG"
string qualident; name = "";
if (la.kind == 1) {
Qualident(
-#line 955 "cs.ATG"
+#line 940 "cs.ATG"
out qualident);
-#line 955 "cs.ATG"
+#line 940 "cs.ATG"
name = qualident;
} else if (la.kind == 90) {
lexer.NextToken();
-#line 956 "cs.ATG"
+#line 941 "cs.ATG"
name = "object";
} else if (la.kind == 107) {
lexer.NextToken();
-#line 957 "cs.ATG"
+#line 942 "cs.ATG"
name = "string";
} else SynErr(137);
}
void MemberModifier(
-#line 973 "cs.ATG"
+#line 958 "cs.ATG"
Modifiers m) {
switch (la.kind) {
case 48: {
lexer.NextToken();
-#line 975 "cs.ATG"
+#line 960 "cs.ATG"
m.Add(Modifier.Abstract);
break;
}
case 70: {
lexer.NextToken();
-#line 976 "cs.ATG"
+#line 961 "cs.ATG"
m.Add(Modifier.Extern);
break;
}
case 83: {
lexer.NextToken();
-#line 977 "cs.ATG"
+#line 962 "cs.ATG"
m.Add(Modifier.Internal);
break;
}
case 88: {
lexer.NextToken();
-#line 978 "cs.ATG"
+#line 963 "cs.ATG"
m.Add(Modifier.New);
break;
}
case 93: {
lexer.NextToken();
-#line 979 "cs.ATG"
+#line 964 "cs.ATG"
m.Add(Modifier.Override);
break;
}
case 95: {
lexer.NextToken();
-#line 980 "cs.ATG"
+#line 965 "cs.ATG"
m.Add(Modifier.Private);
break;
}
case 96: {
lexer.NextToken();
-#line 981 "cs.ATG"
+#line 966 "cs.ATG"
m.Add(Modifier.Protected);
break;
}
case 97: {
lexer.NextToken();
-#line 982 "cs.ATG"
+#line 967 "cs.ATG"
m.Add(Modifier.Public);
break;
}
case 98: {
lexer.NextToken();
-#line 983 "cs.ATG"
+#line 968 "cs.ATG"
m.Add(Modifier.Readonly);
break;
}
case 102: {
lexer.NextToken();
-#line 984 "cs.ATG"
+#line 969 "cs.ATG"
m.Add(Modifier.Sealed);
break;
}
case 106: {
lexer.NextToken();
-#line 985 "cs.ATG"
+#line 970 "cs.ATG"
m.Add(Modifier.Static);
break;
}
case 118: {
lexer.NextToken();
-#line 986 "cs.ATG"
+#line 971 "cs.ATG"
m.Add(Modifier.Unsafe);
break;
}
case 121: {
lexer.NextToken();
-#line 987 "cs.ATG"
+#line 972 "cs.ATG"
m.Add(Modifier.Virtual);
break;
}
case 123: {
lexer.NextToken();
-#line 988 "cs.ATG"
+#line 973 "cs.ATG"
m.Add(Modifier.Volatile);
break;
}
@@ -1657,23 +1633,23 @@
}
void ClassMemberDecl(
-#line 1207 "cs.ATG"
+#line 1192 "cs.ATG"
Modifiers m, ArrayList attributes) {
-#line 1208 "cs.ATG"
+#line 1193 "cs.ATG"
Statement stmt = null;
if (StartOf(16)) {
StructMemberDecl(
-#line 1210 "cs.ATG"
+#line 1195 "cs.ATG"
m, attributes);
} else if (la.kind == 25) {
-#line 1211 "cs.ATG"
+#line 1196 "cs.ATG"
m.Check(Modifier.Destructors); Point startPos = t.Location;
lexer.NextToken();
Expect(1);
-#line 1212 "cs.ATG"
+#line 1197 "cs.ATG"
DestructorDeclaration d = new DestructorDeclaration(t.val, attributes);
d.Modifier = m.Modifier;
d.StartLocation = startPos;
@@ -1682,13 +1658,13 @@
Expect(19);
if (la.kind == 14) {
Block(
-#line 1216 "cs.ATG"
+#line 1201 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(139);
-#line 1216 "cs.ATG"
+#line 1201 "cs.ATG"
d.EndLocation = t.EndLocation;
d.Body = (BlockStatement)stmt;
compilationUnit.AddChild(d);
@@ -1697,10 +1673,10 @@
}
void StructMemberDecl(
-#line 999 "cs.ATG"
+#line 984 "cs.ATG"
Modifiers m, ArrayList attributes) {
-#line 1001 "cs.ATG"
+#line 986 "cs.ATG"
string qualident = null;
TypeReference type;
Expression expr;
@@ -1710,68 +1686,68 @@
if (la.kind == 59) {
-#line 1009 "cs.ATG"
+#line 994 "cs.ATG"
m.Check(Modifier.Constants);
lexer.NextToken();
Type(
-#line 1011 "cs.ATG"
+#line 996 "cs.ATG"
out type);
Expect(1);
-#line 1011 "cs.ATG"
+#line 996 "cs.ATG"
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier | Modifier.Const);
VariableDeclaration f = new VariableDeclaration(t.val);
fd.Fields.Add(f);
Expect(3);
Expr(
-#line 1015 "cs.ATG"
+#line 1000 "cs.ATG"
out expr);
-#line 1015 "cs.ATG"
+#line 1000 "cs.ATG"
f.Initializer = expr;
while (la.kind == 12) {
lexer.NextToken();
Expect(1);
-#line 1016 "cs.ATG"
+#line 1001 "cs.ATG"
f = new VariableDeclaration(t.val);
fd.Fields.Add(f);
Expect(3);
Expr(
-#line 1019 "cs.ATG"
+#line 1004 "cs.ATG"
out expr);
-#line 1019 "cs.ATG"
+#line 1004 "cs.ATG"
f.Initializer = expr;
}
Expect(10);
-#line 1020 "cs.ATG"
+#line 1005 "cs.ATG"
fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd);
} else if (
-#line 1023 "cs.ATG"
+#line 1008 "cs.ATG"
NotVoidPointer()) {
-#line 1023 "cs.ATG"
+#line 1008 "cs.ATG"
m.Check(Modifier.PropertysEventsMethods);
Expect(122);
-#line 1024 "cs.ATG"
+#line 1009 "cs.ATG"
Point startPos = t.Location;
Qualident(
-#line 1025 "cs.ATG"
+#line 1010 "cs.ATG"
out qualident);
Expect(18);
if (StartOf(9)) {
FormalParameterList(
-#line 1026 "cs.ATG"
+#line 1011 "cs.ATG"
out p);
}
Expect(19);
-#line 1026 "cs.ATG"
+#line 1011 "cs.ATG"
MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
m.Modifier,
new TypeReference("void"),
@@ -1784,23 +1760,23 @@
if (la.kind == 14) {
Block(
-#line 1036 "cs.ATG"
+#line 1021 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(141);
-#line 1036 "cs.ATG"
+#line 1021 "cs.ATG"
compilationUnit.BlockEnd();
methodDeclaration.Body = (BlockStatement)stmt;
} else if (la.kind == 68) {
-#line 1040 "cs.ATG"
+#line 1025 "cs.ATG"
m.Check(Modifier.PropertysEventsMethods);
lexer.NextToken();
-#line 1041 "cs.ATG"
+#line 1026 "cs.ATG"
EventDeclaration eventDecl = new EventDeclaration(m.Modifier, attributes);
eventDecl.StartLocation = t.Location;
compilationUnit.AddChild(eventDecl);
@@ -1809,102 +1785,102 @@
EventRemoveRegion removeBlock = null;
Type(
-#line 1048 "cs.ATG"
+#line 1033 "cs.ATG"
out type);
-#line 1048 "cs.ATG"
+#line 1033 "cs.ATG"
eventDecl.TypeReference = type;
if (
-#line 1050 "cs.ATG"
+#line 1035 "cs.ATG"
IsVarDecl()) {
VariableDeclarator(
-#line 1050 "cs.ATG"
+#line 1035 "cs.ATG"
variableDeclarators);
while (la.kind == 12) {
lexer.NextToken();
VariableDeclarator(
-#line 1051 "cs.ATG"
+#line 1036 "cs.ATG"
variableDeclarators);
}
Expect(10);
-#line 1051 "cs.ATG"
+#line 1036 "cs.ATG"
eventDecl.VariableDeclarators = variableDeclarators; eventDecl.EndLocation = t.EndLocation;
} else if (la.kind == 1) {
Qualident(
-#line 1052 "cs.ATG"
+#line 1037 "cs.ATG"
out qualident);
-#line 1052 "cs.ATG"
+#line 1037 "cs.ATG"
eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation;
Expect(14);
-#line 1053 "cs.ATG"
+#line 1038 "cs.ATG"
eventDecl.BodyStart = t.Location;
EventAccessorDecls(
-#line 1054 "cs.ATG"
+#line 1039 "cs.ATG"
out addBlock, out removeBlock);
Expect(15);
-#line 1055 "cs.ATG"
+#line 1040 "cs.ATG"
eventDecl.BodyEnd = t.EndLocation;
} else SynErr(142);
-#line 1056 "cs.ATG"
+#line 1041 "cs.ATG"
compilationUnit.BlockEnd();
eventDecl.AddRegion = addBlock;
eventDecl.RemoveRegion = removeBlock;
} else if (
-#line 1063 "cs.ATG"
+#line 1048 "cs.ATG"
IdentAndLPar()) {
-#line 1063 "cs.ATG"
+#line 1048 "cs.ATG"
m.Check(Modifier.Constructors | Modifier.StaticConstructors);
Expect(1);
-#line 1064 "cs.ATG"
+#line 1049 "cs.ATG"
string name = t.val; Point startPos = t.Location;
Expect(18);
if (StartOf(9)) {
-#line 1064 "cs.ATG"
+#line 1049 "cs.ATG"
m.Check(Modifier.Constructors);
FormalParameterList(
-#line 1065 "cs.ATG"
+#line 1050 "cs.ATG"
out p);
}
Expect(19);
-#line 1067 "cs.ATG"
+#line 1052 "cs.ATG"
ConstructorInitializer init = null;
if (la.kind == 9) {
-#line 1068 "cs.ATG"
+#line 1053 "cs.ATG"
m.Check(Modifier.Constructors);
ConstructorInitializer(
-#line 1069 "cs.ATG"
+#line 1054 "cs.ATG"
out init);
}
-#line 1071 "cs.ATG"
+#line 1056 "cs.ATG"
ConstructorDeclaration cd = new ConstructorDeclaration(name, m.Modifier, p, init, attributes);
cd.StartLocation = startPos;
cd.EndLocation = t.EndLocation;
if (la.kind == 14) {
Block(
-#line 1076 "cs.ATG"
+#line 1061 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(143);
-#line 1076 "cs.ATG"
+#line 1061 "cs.ATG"
cd.Body = (BlockStatement)stmt; compilationUnit.AddChild(cd);
} else if (la.kind == 69 || la.kind == 79) {
-#line 1079 "cs.ATG"
+#line 1064 "cs.ATG"
m.Check(Modifier.Operators);
if (m.isNone) Error("at least one modifier must be set");
bool isImplicit = true;
@@ -1914,37 +1890,37 @@
} else {
lexer.NextToken();
-#line 1083 "cs.ATG"
+#line 1068 "cs.ATG"
isImplicit = false;
}
Expect(91);
Type(
-#line 1084 "cs.ATG"
+#line 1069 "cs.ATG"
out type);
-#line 1084 "cs.ATG"
+#line 1069 "cs.ATG"
TypeReference operatorType = type;
Expect(18);
Type(
-#line 1085 "cs.ATG"
+#line 1070 "cs.ATG"
out type);
Expect(1);
-#line 1085 "cs.ATG"
+#line 1070 "cs.ATG"
string varName = t.val;
Expect(19);
if (la.kind == 14) {
Block(
-#line 1085 "cs.ATG"
+#line 1070 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
-#line 1085 "cs.ATG"
+#line 1070 "cs.ATG"
stmt = null;
} else SynErr(144);
-#line 1088 "cs.ATG"
+#line 1073 "cs.ATG"
OperatorDeclarator operatorDeclarator = new OperatorDeclarator(isImplicit ? OperatorType.Implicit : OperatorType.Explicit,
operatorType,
type,
@@ -1955,54 +1931,54 @@
} else if (StartOf(17)) {
TypeDecl(
-#line 1098 "cs.ATG"
+#line 1083 "cs.ATG"
m, attributes);
} else if (StartOf(8)) {
Type(
-#line 1099 "cs.ATG"
+#line 1084 "cs.ATG"
out type);
-#line 1099 "cs.ATG"
+#line 1084 "cs.ATG"
Point startPos = t.Location;
if (la.kind == 91) {
-#line 1101 "cs.ATG"
+#line 1086 "cs.ATG"
Token op;
m.Check(Modifier.Operators);
if (m.isNone) Error("at least one modifier must be set");
lexer.NextToken();
OverloadableOperator(
-#line 1105 "cs.ATG"
+#line 1090 "cs.ATG"
out op);
-#line 1105 "cs.ATG"
+#line 1090 "cs.ATG"
TypeReference firstType, secondType = null; string secondName = null;
Expect(18);
Type(
-#line 1106 "cs.ATG"
+#line 1091 "cs.ATG"
out firstType);
Expect(1);
-#line 1106 "cs.ATG"
+#line 1091 "cs.ATG"
string firstName = t.val;
if (la.kind == 12) {
lexer.NextToken();
Type(
-#line 1107 "cs.ATG"
+#line 1092 "cs.ATG"
out secondType);
Expect(1);
-#line 1107 "cs.ATG"
+#line 1092 "cs.ATG"
secondName = t.val;
-#line 1107 "cs.ATG"
+#line 1092 "cs.ATG"
if (ParserUtil.IsUnaryOperator(op) && !ParserUtil.IsBinaryOperator(op))
Error("too many operands for unary operator");
} else if (la.kind == 19) {
-#line 1110 "cs.ATG"
+#line 1095 "cs.ATG"
if (ParserUtil.IsBinaryOperator(op))
Error("too few operands for binary operator");
@@ -2010,13 +1986,13 @@
Expect(19);
if (la.kind == 14) {
Block(
-#line 1114 "cs.ATG"
+#line 1099 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(146);
-#line 1116 "cs.ATG"
+#line 1101 "cs.ATG"
OperatorDeclarator operatorDeclarator = new OperatorDeclarator(secondType != null ? OperatorType.Binary : OperatorType.Unary,
type,
op.kind,
@@ -2029,43 +2005,43 @@
compilationUnit.AddChild(operatorDeclaration);
} else if (
-#line 1129 "cs.ATG"
+#line 1114 "cs.ATG"
IsVarDecl()) {
-#line 1129 "cs.ATG"
+#line 1114 "cs.ATG"
m.Check(Modifier.Fields);
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier);
fd.StartLocation = startPos;
VariableDeclarator(
-#line 1133 "cs.ATG"
+#line 1118 "cs.ATG"
variableDeclarators);
while (la.kind == 12) {
lexer.NextToken();
VariableDeclarator(
-#line 1134 "cs.ATG"
+#line 1119 "cs.ATG"
variableDeclarators);
}
Expect(10);
-#line 1135 "cs.ATG"
+#line 1120 "cs.ATG"
fd.EndLocation = t.EndLocation; fd.Fields = variableDeclarators; compilationUnit.AddChild(fd);
} else if (la.kind == 110) {
-#line 1138 "cs.ATG"
+#line 1123 "cs.ATG"
m.Check(Modifier.Indexers);
lexer.NextToken();
Expect(16);
FormalParameterList(
-#line 1139 "cs.ATG"
+#line 1124 "cs.ATG"
out p);
Expect(17);
-#line 1139 "cs.ATG"
+#line 1124 "cs.ATG"
Point endLocation = t.EndLocation;
Expect(14);
-#line 1140 "cs.ATG"
+#line 1125 "cs.ATG"
IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
indexer.StartLocation = startPos;
indexer.EndLocation = endLocation;
@@ -2074,11 +2050,11 @@
PropertySetRegion setRegion;
AccessorDecls(
-#line 1147 "cs.ATG"
+#line 1132 "cs.ATG"
out getRegion, out setRegion);
Expect(15);
-#line 1148 "cs.ATG"
+#line 1133 "cs.ATG"
indexer.BodyEnd = t.EndLocation;
indexer.GetRegion = getRegion;
indexer.SetRegion = setRegion;
@@ -2086,25 +2062,25 @@
} else if (la.kind == 1) {
Qualident(
-#line 1153 "cs.ATG"
+#line 1138 "cs.ATG"
out qualident);
-#line 1153 "cs.ATG"
+#line 1138 "cs.ATG"
Point qualIdentEndLocation = t.EndLocation;
if (la.kind == 14 || la.kind == 18) {
if (la.kind == 18) {
-#line 1156 "cs.ATG"
+#line 1141 "cs.ATG"
m.Check(Modifier.PropertysEventsMethods);
lexer.NextToken();
if (StartOf(9)) {
FormalParameterList(
-#line 1157 "cs.ATG"
+#line 1142 "cs.ATG"
out p);
}
Expect(19);
-#line 1157 "cs.ATG"
+#line 1142 "cs.ATG"
MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
m.Modifier,
type,
@@ -2116,18 +2092,18 @@
if (la.kind == 14) {
Block(
-#line 1166 "cs.ATG"
+#line 1151 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(147);
-#line 1166 "cs.ATG"
+#line 1151 "cs.ATG"
methodDeclaration.Body = (BlockStatement)stmt;
} else {
lexer.NextToken();
-#line 1169 "cs.ATG"
+#line 1154 "cs.ATG"
PropertyDeclaration pDecl = new PropertyDeclaration(qualident, type, m.Modifier, attributes);
pDecl.StartLocation = startPos;
pDecl.EndLocation = qualIdentEndLocation;
@@ -2136,11 +2112,11 @@
PropertySetRegion setRegion;
AccessorDecls(
-#line 1176 "cs.ATG"
+#line 1161 "cs.ATG"
out getRegion, out setRegion);
Expect(15);
-#line 1178 "cs.ATG"
+#line 1163 "cs.ATG"
pDecl.GetRegion = getRegion;
pDecl.SetRegion = setRegion;
pDecl.BodyEnd = t.EndLocation;
@@ -2149,17 +2125,17 @@
}
} else if (la.kind == 13) {
-#line 1186 "cs.ATG"
+#line 1171 "cs.ATG"
m.Check(Modifier.Indexers);
lexer.NextToken();
Expect(110);
Expect(16);
FormalParameterList(
-#line 1187 "cs.ATG"
+#line 1172 "cs.ATG"
out p);
Expect(17);
-#line 1188 "cs.ATG"
+#line 1173 "cs.ATG"
IndexerDeclaration indexer = new IndexerDeclaration(type, p, m.Modifier, attributes);
indexer.StartLocation = startPos;
indexer.EndLocation = t.EndLocation;
@@ -2169,14 +2145,14 @@
Expect(14);
-#line 1195 "cs.ATG"
+#line 1180 "cs.ATG"
Point bodyStart = t.Location;
AccessorDecls(
-#line 1196 "cs.ATG"
+#line 1181 "cs.ATG"
out getRegion, out setRegion);
Expect(15);
-#line 1197 "cs.ATG"
+#line 1182 "cs.ATG"
indexer.BodyStart = bodyStart;
indexer.BodyEnd = t.EndLocation;
indexer.GetRegion = getRegion;
@@ -2190,7 +2166,7 @@
void InterfaceMemberDecl() {
-#line 1224 "cs.ATG"
+#line 1209 "cs.ATG"
TypeReference type;
ArrayList p;
AttributeSection section;
@@ -2204,39 +2180,39 @@
while (la.kind == 16) {
AttributeSection(
-#line 1236 "cs.ATG"
+#line 1221 "cs.ATG"
out section);
-#line 1236 "cs.ATG"
+#line 1221 "cs.ATG"
attributes.Add(section);
}
if (la.kind == 88) {
lexer.NextToken();
-#line 1237 "cs.ATG"
+#line 1222 "cs.ATG"
mod = Modifier.New; startLocation = t.Location;
}
if (
-#line 1240 "cs.ATG"
+#line 1225 "cs.ATG"
NotVoidPointer()) {
Expect(122);
-#line 1240 "cs.ATG"
+#line 1225 "cs.ATG"
if (startLocation.X == -1) startLocation = t.Location;
Expect(1);
-#line 1240 "cs.ATG"
+#line 1225 "cs.ATG"
name = t.val;
Expect(18);
if (StartOf(9)) {
FormalParameterList(
-#line 1241 "cs.ATG"
+#line 1226 "cs.ATG"
out parameters);
}
Expect(19);
Expect(10);
-#line 1241 "cs.ATG"
+#line 1226 "cs.ATG"
MethodDeclaration md = new MethodDeclaration(name, mod, new TypeReference("void"), parameters, attributes);
md.StartLocation = startLocation;
md.EndLocation = t.EndLocation;
@@ -2245,27 +2221,27 @@
} else if (StartOf(18)) {
if (StartOf(8)) {
Type(
-#line 1247 "cs.ATG"
+#line 1232 "cs.ATG"
out type);
-#line 1247 "cs.ATG"
+#line 1232 "cs.ATG"
if (startLocation.X == -1) startLocation = t.Location;
if (la.kind == 1) {
lexer.NextToken();
-#line 1249 "cs.ATG"
+#line 1234 "cs.ATG"
name = t.val; Point qualIdentEndLocation = t.EndLocation;
if (la.kind == 18) {
lexer.NextToken();
if (StartOf(9)) {
FormalParameterList(
-#line 1252 "cs.ATG"
+#line 1237 "cs.ATG"
out parameters);
}
Expect(19);
Expect(10);
-#line 1252 "cs.ATG"
+#line 1237 "cs.ATG"
MethodDeclaration md = new MethodDeclaration(name, mod, type, parameters, attributes);
md.StartLocation = startLocation;
md.EndLocation = t.EndLocation;
@@ -2273,72 +2249,72 @@
} else if (la.kind == 14) {
-#line 1258 "cs.ATG"
+#line 1243 "cs.ATG"
PropertyDeclaration pd = new PropertyDeclaration(name, type, mod, attributes); compilationUnit.AddChild(pd);
lexer.NextToken();
-#line 1259 "cs.ATG"
+#line 1244 "cs.ATG"
Point bodyStart = t.Location;
InterfaceAccessors(
-#line 1259 "cs.ATG"
+#line 1244 "cs.ATG"
out getBlock, out setBlock);
Expect(15);
-#line 1259 "cs.ATG"
+#line 1244 "cs.ATG"
pd.GetRegion = getBlock; pd.SetRegion = setBlock; pd.StartLocation = startLocation; pd.EndLocation = qualIdentEndLocation; pd.BodyStart = bodyStart; pd.BodyEnd = t.EndLocation;
} else SynErr(151);
} else if (la.kind == 110) {
lexer.NextToken();
Expect(16);
FormalParameterList(
-#line 1262 "cs.ATG"
+#line 1247 "cs.ATG"
out p);
Expect(17);
-#line 1262 "cs.ATG"
+#line 1247 "cs.ATG"
Point bracketEndLocation = t.EndLocation;
-#line 1262 "cs.ATG"
+#line 1247 "cs.ATG"
IndexerDeclaration id = new IndexerDeclaration(type, p, mod, attributes); compilationUnit.AddChild(id);
Expect(14);
-#line 1263 "cs.ATG"
+#line 1248 "cs.ATG"
Point bodyStart = t.Location;
InterfaceAccessors(
-#line 1263 "cs.ATG"
+#line 1248 "cs.ATG"
out getBlock, out setBlock);
Expect(15);
-#line 1263 "cs.ATG"
+#line 1248 "cs.ATG"
id.GetRegion = getBlock; id.SetRegion = setBlock; id.StartLocation = startLocation; id.EndLocation = bracketEndLocation; id.BodyStart = bodyStart; id.BodyEnd = t.EndLocation;
} else SynErr(152);
} else {
lexer.NextToken();
-#line 1266 "cs.ATG"
+#line 1251 "cs.ATG"
if (startLocation.X == -1) startLocation = t.Location;
Type(
-#line 1266 "cs.ATG"
+#line 1251 "cs.ATG"
out type);
Expect(1);
-#line 1266 "cs.ATG"
+#line 1251 "cs.ATG"
EventDeclaration ed = new EventDeclaration(type, t.val, mod, attributes);
compilationUnit.AddChild(ed);
Expect(10);
-#line 1269 "cs.ATG"
+#line 1254 "cs.ATG"
ed.StartLocation = startLocation; ed.EndLocation = t.EndLocation;
}
} else SynErr(153);
}
void EnumMemberDecl(
-#line 1274 "cs.ATG"
+#line 1259 "cs.ATG"
out FieldDeclaration f) {
-#line 1276 "cs.ATG"
+#line 1261 "cs.ATG"
Expression expr = null;
ArrayList attributes = new ArrayList();
AttributeSection section = null;
@@ -2346,15 +2322,15 @@
while (la.kind == 16) {
AttributeSection(
-#line 1282 "cs.ATG"
+#line 1267 "cs.ATG"
out section);
-#line 1282 "cs.ATG"
+#line 1267 "cs.ATG"
attributes.Add(section);
}
Expect(1);
-#line 1283 "cs.ATG"
+#line 1268 "cs.ATG"
f = new FieldDeclaration(attributes);
varDecl = new VariableDeclaration(t.val);
f.Fields.Add(varDecl);
@@ -2363,89 +2339,89 @@
if (la.kind == 3) {
lexer.NextToken();
Expr(
-#line 1288 "cs.ATG"
+#line 1273 "cs.ATG"
out expr);
-#line 1288 "cs.ATG"
+#line 1273 "cs.ATG"
varDecl.Initializer = expr;
}
}
void SimpleType(
-#line 884 "cs.ATG"
+#line 869 "cs.ATG"
out string name) {
-#line 885 "cs.ATG"
+#line 870 "cs.ATG"
name = String.Empty;
if (StartOf(19)) {
IntegralType(
-#line 887 "cs.ATG"
+#line 872 "cs.ATG"
out name);
} else if (la.kind == 74) {
lexer.NextToken();
-#line 888 "cs.ATG"
+#line 873 "cs.ATG"
name = t.val;
} else if (la.kind == 65) {
lexer.NextToken();
-#line 889 "cs.ATG"
+#line 874 "cs.ATG"
name = t.val;
} else if (la.kind == 61) {
lexer.NextToken();
-#line 890 "cs.ATG"
+#line 875 "cs.ATG"
name = t.val;
} else if (la.kind == 51) {
lexer.NextToken();
-#line 891 "cs.ATG"
+#line 876 "cs.ATG"
name = t.val;
} else SynErr(154);
}
void NonArrayType(
-#line 866 "cs.ATG"
+#line 851 "cs.ATG"
out TypeReference type) {
-#line 868 "cs.ATG"
+#line 853 "cs.ATG"
string name = "";
int pointer = 0;
if (la.kind == 1 || la.kind == 90 || la.kind == 107) {
ClassType(
-#line 872 "cs.ATG"
+#line 857 "cs.ATG"
out name);
} else if (StartOf(14)) {
SimpleType(
-#line 873 "cs.ATG"
+#line 858 "cs.ATG"
out name);
} else if (la.kind == 122) {
lexer.NextToken();
Expect(6);
-#line 874 "cs.ATG"
+#line 859 "cs.ATG"
pointer = 1; name = "void";
} else SynErr(155);
while (
-#line 876 "cs.ATG"
+#line 861 "cs.ATG"
IsPointer()) {
Expect(6);
-#line 877 "cs.ATG"
+#line 862 "cs.ATG"
++pointer;
}
-#line 880 "cs.ATG"
+#line 865 "cs.ATG"
type = new TypeReference(name, pointer, null);
}
void FixedParameter(
-#line 921 "cs.ATG"
+#line 906 "cs.ATG"
out ParameterDeclarationExpression p) {
-#line 923 "cs.ATG"
+#line 908 "cs.ATG"
TypeReference type;
ParamModifiers mod = ParamModifiers.In;
@@ -2453,72 +2429,72 @@
if (la.kind == 99) {
lexer.NextToken();
-#line 928 "cs.ATG"
+#line 913 "cs.ATG"
mod = ParamModifiers.Ref;
} else {
lexer.NextToken();
-#line 929 "cs.ATG"
+#line 914 "cs.ATG"
mod = ParamModifiers.Out;
}
}
Type(
-#line 931 "cs.ATG"
+#line 916 "cs.ATG"
out type);
Expect(1);
-#line 931 "cs.ATG"
+#line 916 "cs.ATG"
p = new ParameterDeclarationExpression(type, t.val, mod);
}
void ParameterArray(
-#line 934 "cs.ATG"
+#line 919 "cs.ATG"
out ParameterDeclarationExpression p) {
-#line 935 "cs.ATG"
+#line 920 "cs.ATG"
TypeReference type;
Expect(94);
Type(
-#line 937 "cs.ATG"
+#line 922 "cs.ATG"
out type);
Expect(1);
-#line 937 "cs.ATG"
+#line 922 "cs.ATG"
p = new ParameterDeclarationExpression(type, t.val, ParamModifiers.Params);
}
void AccessorModifier(
-#line 991 "cs.ATG"
+#line 976 "cs.ATG"
Modifiers m) {
if (la.kind == 83) {
lexer.NextToken();
-#line 993 "cs.ATG"
+#line 978 "cs.ATG"
m.Add(Modifier.Internal);
} else if (la.kind == 97) {
lexer.NextToken();
-#line 994 "cs.ATG"
+#line 979 "cs.ATG"
m.Add(Modifier.Public);
} else if (la.kind == 96) {
lexer.NextToken();
-#line 995 "cs.ATG"
+#line 980 "cs.ATG"
m.Add(Modifier.Protected);
} else if (la.kind == 95) {
lexer.NextToken();
-#line 996 "cs.ATG"
+#line 981 "cs.ATG"
m.Add(Modifier.Private);
} else SynErr(156);
}
void Block(
-#line 1396 "cs.ATG"
+#line 1381 "cs.ATG"
out Statement stmt) {
Expect(14);
-#line 1398 "cs.ATG"
+#line 1383 "cs.ATG"
BlockStatement blockStmt = new BlockStatement();
blockStmt.StartLocation = t.Location;
compilationUnit.BlockStart(blockStmt);
@@ -2528,7 +2504,7 @@
}
Expect(15);
-#line 1403 "cs.ATG"
+#line 1388 "cs.ATG"
stmt = blockStmt;
blockStmt.EndLocation = t.EndLocation;
compilationUnit.BlockEnd();
@@ -2536,34 +2512,34 @@
}
void VariableDeclarator(
-#line 1389 "cs.ATG"
+#line 1374 "cs.ATG"
ArrayList fieldDeclaration) {
-#line 1390 "cs.ATG"
+#line 1375 "cs.ATG"
Expression expr = null;
Expect(1);
-#line 1392 "cs.ATG"
+#line 1377 "cs.ATG"
VariableDeclaration f = new VariableDeclaration(t.val);
if (la.kind == 3) {
lexer.NextToken();
VariableInitializer(
-#line 1393 "cs.ATG"
+#line 1378 "cs.ATG"
out expr);
-#line 1393 "cs.ATG"
+#line 1378 "cs.ATG"
f.Initializer = expr;
}
-#line 1393 "cs.ATG"
+#line 1378 "cs.ATG"
fieldDeclaration.Add(f);
}
void EventAccessorDecls(
-#line 1338 "cs.ATG"
+#line 1323 "cs.ATG"
out EventAddRegion addBlock, out EventRemoveRegion removeBlock) {
-#line 1339 "cs.ATG"
+#line 1324 "cs.ATG"
AttributeSection section;
ArrayList attributes = new ArrayList();
Statement stmt;
@@ -2572,102 +2548,102 @@
while (la.kind == 16) {
AttributeSection(
-#line 1346 "cs.ATG"
+#line 1331 "cs.ATG"
out section);
-#line 1346 "cs.ATG"
+#line 1331 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1348 "cs.ATG"
+#line 1333 "cs.ATG"
IdentIsAdd()) {
-#line 1348 "cs.ATG"
+#line 1333 "cs.ATG"
addBlock = new EventAddRegion(attributes);
AddAccessorDecl(
-#line 1349 "cs.ATG"
+#line 1334 "cs.ATG"
out stmt);
-#line 1349 "cs.ATG"
+#line 1334 "cs.ATG"
attributes = new ArrayList(); addBlock.Block = (BlockStatement)stmt;
while (la.kind == 16) {
AttributeSection(
-#line 1350 "cs.ATG"
+#line 1335 "cs.ATG"
out section);
-#line 1350 "cs.ATG"
+#line 1335 "cs.ATG"
attributes.Add(section);
}
RemoveAccessorDecl(
-#line 1351 "cs.ATG"
+#line 1336 "cs.ATG"
out stmt);
-#line 1351 "cs.ATG"
+#line 1336 "cs.ATG"
removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt;
} else if (
-#line 1352 "cs.ATG"
+#line 1337 "cs.ATG"
IdentIsRemove()) {
RemoveAccessorDecl(
-#line 1353 "cs.ATG"
+#line 1338 "cs.ATG"
out stmt);
-#line 1353 "cs.ATG"
+#line 1338 "cs.ATG"
removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new ArrayList();
while (la.kind == 16) {
AttributeSection(
-#line 1354 "cs.ATG"
+#line 1339 "cs.ATG"
out section);
-#line 1354 "cs.ATG"
+#line 1339 "cs.ATG"
attributes.Add(section);
}
AddAccessorDecl(
-#line 1355 "cs.ATG"
+#line 1340 "cs.ATG"
out stmt);
-#line 1355 "cs.ATG"
+#line 1340 "cs.ATG"
addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt;
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1356 "cs.ATG"
+#line 1341 "cs.ATG"
Error("add or remove accessor declaration expected");
} else SynErr(157);
}
void ConstructorInitializer(
-#line 1425 "cs.ATG"
+#line 1410 "cs.ATG"
out ConstructorInitializer ci) {
-#line 1426 "cs.ATG"
+#line 1411 "cs.ATG"
Expression expr; ci = new ConstructorInitializer();
Expect(9);
if (la.kind == 50) {
lexer.NextToken();
-#line 1430 "cs.ATG"
+#line 1415 "cs.ATG"
ci.ConstructorInitializerType = ConstructorInitializerType.Base;
} else if (la.kind == 110) {
lexer.NextToken();
-#line 1431 "cs.ATG"
+#line 1416 "cs.ATG"
ci.ConstructorInitializerType = ConstructorInitializerType.This;
} else SynErr(158);
Expect(18);
if (StartOf(21)) {
Argument(
-#line 1434 "cs.ATG"
+#line 1419 "cs.ATG"
out expr);
-#line 1434 "cs.ATG"
+#line 1419 "cs.ATG"
ci.Arguments.Add(expr);
while (la.kind == 12) {
lexer.NextToken();
Argument(
-#line 1434 "cs.ATG"
+#line 1419 "cs.ATG"
out expr);
-#line 1434 "cs.ATG"
+#line 1419 "cs.ATG"
ci.Arguments.Add(expr);
}
}
@@ -2675,7 +2651,7 @@
}
void OverloadableOperator(
-#line 1446 "cs.ATG"
+#line 1431 "cs.ATG"
out Token op) {
switch (la.kind) {
case 4: {
@@ -2769,15 +2745,15 @@
default: SynErr(159); break;
}
-#line 1455 "cs.ATG"
+#line 1440 "cs.ATG"
op = t;
}
void AccessorDecls(
-#line 1292 "cs.ATG"
+#line 1277 "cs.ATG"
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
-#line 1294 "cs.ATG"
+#line 1279 "cs.ATG"
ArrayList attributes = new ArrayList();
Modifiers m = new Modifiers (this);
AttributeSection section;
@@ -2786,151 +2762,151 @@
while (la.kind == 16) {
AttributeSection(
-#line 1301 "cs.ATG"
+#line 1286 "cs.ATG"
out section);
-#line 1301 "cs.ATG"
+#line 1286 "cs.ATG"
attributes.Add(section);
}
while (StartOf(22)) {
AccessorModifier(
-#line 1302 "cs.ATG"
+#line 1287 "cs.ATG"
m);
}
if (
-#line 1304 "cs.ATG"
+#line 1289 "cs.ATG"
IdentIsGet()) {
GetAccessorDecl(
-#line 1305 "cs.ATG"
+#line 1290 "cs.ATG"
out getBlock, attributes, m.Modifier);
if (StartOf(23)) {
-#line 1306 "cs.ATG"
+#line 1291 "cs.ATG"
attributes = new ArrayList(); m = new Modifiers (this);
while (la.kind == 16) {
AttributeSection(
-#line 1307 "cs.ATG"
+#line 1292 "cs.ATG"
out section);
-#line 1307 "cs.ATG"
+#line 1292 "cs.ATG"
attributes.Add(section);
}
while (StartOf(22)) {
AccessorModifier(
-#line 1308 "cs.ATG"
+#line 1293 "cs.ATG"
m);
}
SetAccessorDecl(
-#line 1309 "cs.ATG"
+#line 1294 "cs.ATG"
out setBlock, attributes, m.Modifier);
}
} else if (
-#line 1311 "cs.ATG"
+#line 1296 "cs.ATG"
IdentIsSet()) {
SetAccessorDecl(
-#line 1312 "cs.ATG"
+#line 1297 "cs.ATG"
out setBlock, attributes, m.Modifier);
if (StartOf(23)) {
-#line 1313 "cs.ATG"
+#line 1298 "cs.ATG"
attributes = new ArrayList(); m = new Modifiers (this);
while (la.kind == 16) {
AttributeSection(
-#line 1314 "cs.ATG"
+#line 1299 "cs.ATG"
out section);
-#line 1314 "cs.ATG"
+#line 1299 "cs.ATG"
attributes.Add(section);
}
while (StartOf(22)) {
AccessorModifier(
-#line 1315 "cs.ATG"
+#line 1300 "cs.ATG"
m);
}
GetAccessorDecl(
-#line 1316 "cs.ATG"
+#line 1301 "cs.ATG"
out getBlock, attributes, m.Modifier);
}
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1318 "cs.ATG"
+#line 1303 "cs.ATG"
Error("get or set accessor declaration expected");
} else SynErr(160);
}
void InterfaceAccessors(
-#line 1360 "cs.ATG"
+#line 1345 "cs.ATG"
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
-#line 1362 "cs.ATG"
+#line 1347 "cs.ATG"
AttributeSection section;
ArrayList attributes = new ArrayList();
getBlock = null; setBlock = null;
while (la.kind == 16) {
AttributeSection(
-#line 1367 "cs.ATG"
+#line 1352 "cs.ATG"
out section);
-#line 1367 "cs.ATG"
+#line 1352 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1369 "cs.ATG"
+#line 1354 "cs.ATG"
IdentIsGet()) {
Expect(1);
-#line 1369 "cs.ATG"
+#line 1354 "cs.ATG"
getBlock = new PropertyGetRegion(null, attributes);
} else if (
-#line 1370 "cs.ATG"
+#line 1355 "cs.ATG"
IdentIsSet()) {
Expect(1);
-#line 1370 "cs.ATG"
+#line 1355 "cs.ATG"
setBlock = new PropertySetRegion(null, attributes);
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1371 "cs.ATG"
+#line 1356 "cs.ATG"
Error("set or get expected");
} else SynErr(161);
Expect(10);
-#line 1373 "cs.ATG"
+#line 1358 "cs.ATG"
attributes = new ArrayList();
if (la.kind == 1 || la.kind == 16) {
while (la.kind == 16) {
AttributeSection(
-#line 1375 "cs.ATG"
+#line 1360 "cs.ATG"
out section);
-#line 1375 "cs.ATG"
+#line 1360 "cs.ATG"
attributes.Add(section);
}
if (
-#line 1377 "cs.ATG"
+#line 1362 "cs.ATG"
IdentIsGet()) {
Expect(1);
-#line 1377 "cs.ATG"
+#line 1362 "cs.ATG"
if (getBlock != null) Error("get already declared");
else getBlock = new PropertyGetRegion(null, attributes);
} else if (
-#line 1380 "cs.ATG"
+#line 1365 "cs.ATG"
IdentIsSet()) {
Expect(1);
-#line 1380 "cs.ATG"
+#line 1365 "cs.ATG"
if (setBlock != null) Error("set already declared");
else setBlock = new PropertySetRegion(null, attributes);
} else if (la.kind == 1) {
lexer.NextToken();
-#line 1383 "cs.ATG"
+#line 1368 "cs.ATG"
Error("set or get expected");
} else SynErr(162);
Expect(10);
@@ -2938,187 +2914,187 @@
}
void GetAccessorDecl(
-#line 1322 "cs.ATG"
+#line 1307 "cs.ATG"
out PropertyGetRegion getBlock, ArrayList attributes, Modifier m) {
-#line 1323 "cs.ATG"
+#line 1308 "cs.ATG"
Statement stmt = null;
Expect(1);
-#line 1326 "cs.ATG"
+#line 1311 "cs.ATG"
if (t.val != "get") Error("get expected");
if (la.kind == 14) {
Block(
-#line 1327 "cs.ATG"
+#line 1312 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(163);
-#line 1327 "cs.ATG"
+#line 1312 "cs.ATG"
getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes, m);
}
void SetAccessorDecl(
-#line 1330 "cs.ATG"
+#line 1315 "cs.ATG"
out PropertySetRegion setBlock, ArrayList attributes, Modifier m) {
-#line 1331 "cs.ATG"
+#line 1316 "cs.ATG"
Statement stmt = null;
Expect(1);
-#line 1334 "cs.ATG"
+#line 1319 "cs.ATG"
if (t.val != "set") Error("set expected");
if (la.kind == 14) {
Block(
-#line 1335 "cs.ATG"
+#line 1320 "cs.ATG"
out stmt);
} else if (la.kind == 10) {
lexer.NextToken();
} else SynErr(164);
-#line 1335 "cs.ATG"
+#line 1320 "cs.ATG"
setBlock = new PropertySetRegion((BlockStatement)stmt, attributes, m);
}
void AddAccessorDecl(
-#line 1409 "cs.ATG"
+#line 1394 "cs.ATG"
out Statement stmt) {
-#line 1410 "cs.ATG"
+#line 1395 "cs.ATG"
stmt = null;
Expect(1);
-#line 1413 "cs.ATG"
+#line 1398 "cs.ATG"
if (t.val != "add") Error("add expected");
Block(
-#line 1414 "cs.ATG"
+#line 1399 "cs.ATG"
out stmt);
}
void RemoveAccessorDecl(
-#line 1417 "cs.ATG"
+#line 1402 "cs.ATG"
out Statement stmt) {
-#line 1418 "cs.ATG"
+#line 1403 "cs.ATG"
stmt = null;
Expect(1);
-#line 1421 "cs.ATG"
+#line 1406 "cs.ATG"
if (t.val != "remove") Error("remove expected");
Block(
-#line 1422 "cs.ATG"
+#line 1407 "cs.ATG"
out stmt);
}
void VariableInitializer(
-#line 1438 "cs.ATG"
+#line 1423 "cs.ATG"
out Expression initializerExpression) {
-#line 1439 "cs.ATG"
+#line 1424 "cs.ATG"
TypeReference type = null; Expression expr = null; initializerExpression = null;
if (StartOf(4)) {
Expr(
-#line 1441 "cs.ATG"
+#line 1426 "cs.ATG"
out initializerExpression);
} else if (la.kind == 14) {
ArrayInitializer(
-#line 1442 "cs.ATG"
+#line 1427 "cs.ATG"
out initializerExpression);
} else if (la.kind == 105) {
lexer.NextToken();
Type(
-#line 1443 "cs.ATG"
+#line 1428 "cs.ATG"
out type);
Expect(16);
Expr(
-#line 1443 "cs.ATG"
+#line 1428 "cs.ATG"
out expr);
Expect(17);
-#line 1443 "cs.ATG"
+#line 1428 "cs.ATG"
initializerExpression = new StackAllocExpression(type, expr);
} else SynErr(165);
}
void Statement() {
-#line 1526 "cs.ATG"
+#line 1511 "cs.ATG"
TypeReference type;
Expression expr;
Statement stmt;
if (
-#line 1532 "cs.ATG"
+#line 1517 "cs.ATG"
IsLabel()) {
Expect(1);
-#line 1532 "cs.ATG"
+#line 1517 "cs.ATG"
compilationUnit.AddChild(new LabelStatement(t.val));
Expect(9);
Statement();
} else if (la.kind == 59) {
lexer.NextToken();
Type(
-#line 1535 "cs.ATG"
+#line 1520 "cs.ATG"
out type);
-#line 1535 "cs.ATG"
+#line 1520 "cs.ATG"
LocalVariableDeclaration var = new LocalVariableDeclaration(type, Modifier.Const); string ident = null; var.StartLocation = t.Location;
Expect(1);
-#line 1536 "cs.ATG"
+#line 1521 "cs.ATG"
ident = t.val;
Expect(3);
Expr(
-#line 1537 "cs.ATG"
+#line 1522 "cs.ATG"
out expr);
-#line 1537 "cs.ATG"
+#line 1522 "cs.ATG"
var.Variables.Add(new VariableDeclaration(ident, expr));
while (la.kind == 12) {
lexer.NextToken();
Expect(1);
-#line 1538 "cs.ATG"
+#line 1523 "cs.ATG"
ident = t.val;
Expect(3);
Expr(
-#line 1538 "cs.ATG"
+#line 1523 "cs.ATG"
out expr);
-#line 1538 "cs.ATG"
+#line 1523 "cs.ATG"
var.Variables.Add(new VariableDeclaration(ident, expr));
}
Expect(10);
-#line 1539 "cs.ATG"
+#line 1524 "cs.ATG"
compilationUnit.AddChild(var);
} else if (
-#line 1541 "cs.ATG"
+#line 1526 "cs.ATG"
IsLocalVarDecl()) {
LocalVariableDecl(
-#line 1541 "cs.ATG"
+#line 1526 "cs.ATG"
out stmt);
Expect(10);
-#line 1541 "cs.ATG"
+#line 1526 "cs.ATG"
compilationUnit.AddChild(stmt);
} else if (StartOf(24)) {
EmbeddedStatement(
-#line 1542 "cs.ATG"
+#line 1527 "cs.ATG"
out stmt);
-#line 1542 "cs.ATG"
+#line 1527 "cs.ATG"
compilationUnit.AddChild(stmt);
} else SynErr(166);
}
void Argument(
-#line 1458 "cs.ATG"
+#line 1443 "cs.ATG"
out Expression argumentexpr) {
-#line 1460 "cs.ATG"
+#line 1445 "cs.ATG"
Expression expr;
FieldDirection fd = FieldDirection.None;
@@ -3126,48 +3102,48 @@
if (la.kind == 99) {
lexer.NextToken();
-#line 1465 "cs.ATG"
+#line 1450 "cs.ATG"
fd = FieldDirection.Ref;
} else {
lexer.NextToken();
-#line 1466 "cs.ATG"
+#line 1451 "cs.ATG"
fd = FieldDirection.Out;
}
}
Expr(
-#line 1468 "cs.ATG"
+#line 1453 "cs.ATG"
out expr);
-#line 1468 "cs.ATG"
+#line 1453 "cs.ATG"
argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr;
}
void ArrayInitializer(
-#line 1487 "cs.ATG"
+#line 1472 "cs.ATG"
out Expression outExpr) {
-#line 1489 "cs.ATG"
+#line 1474 "cs.ATG"
Expression expr = null;
ArrayInitializerExpression initializer = new ArrayInitializerExpression();
Expect(14);
if (StartOf(25)) {
VariableInitializer(
-#line 1494 "cs.ATG"
+#line 1479 "cs.ATG"
out expr);
-#line 1494 "cs.ATG"
+#line 1479 "cs.ATG"
initializer.CreateExpressions.Add(expr);
while (
-#line 1494 "cs.ATG"
+#line 1479 "cs.ATG"
NotFinalComma()) {
Expect(12);
VariableInitializer(
-#line 1494 "cs.ATG"
+#line 1479 "cs.ATG"
out expr);
-#line 1494 "cs.ATG"
+#line 1479 "cs.ATG"
initializer.CreateExpressions.Add(expr);
}
if (la.kind == 12) {
@@ -3176,91 +3152,91 @@
}
Expect(15);
-#line 1495 "cs.ATG"
+#line 1480 "cs.ATG"
outExpr = initializer;
}
void AssignmentOperator(
-#line 1471 "cs.ATG"
+#line 1456 "cs.ATG"
out AssignmentOperatorType op) {
-#line 1472 "cs.ATG"
+#line 1457 "cs.ATG"
op = AssignmentOperatorType.None;
switch (la.kind) {
case 3: {
lexer.NextToken();
-#line 1474 "cs.ATG"
+#line 1459 "cs.ATG"
op = AssignmentOperatorType.Assign;
break;
}
case 37: {
lexer.NextToken();
-#line 1475 "cs.ATG"
+#line 1460 "cs.ATG"
op = AssignmentOperatorType.Add;
break;
}
case 38: {
lexer.NextToken();
-#line 1476 "cs.ATG"
+#line 1461 "cs.ATG"
op = AssignmentOperatorType.Subtract;
break;
}
case 39: {
lexer.NextToken();
-#line 1477 "cs.ATG"
+#line 1462 "cs.ATG"
op = AssignmentOperatorType.Multiply;
break;
}
case 40: {
lexer.NextToken();
-#line 1478 "cs.ATG"
+#line 1463 "cs.ATG"
op = AssignmentOperatorType.Divide;
break;
}
case 41: {
lexer.NextToken();
-#line 1479 "cs.ATG"
+#line 1464 "cs.ATG"
op = AssignmentOperatorType.Modulus;
break;
}
case 42: {
lexer.NextToken();
-#line 1480 "cs.ATG"
+#line 1465 "cs.ATG"
op = AssignmentOperatorType.BitwiseAnd;
break;
}
case 43: {
lexer.NextToken();
-#line 1481 "cs.ATG"
+#line 1466 "cs.ATG"
op = AssignmentOperatorType.BitwiseOr;
break;
}
case 44: {
lexer.NextToken();
-#line 1482 "cs.ATG"
+#line 1467 "cs.ATG"
op = AssignmentOperatorType.ExclusiveOr;
break;
}
case 45: {
lexer.NextToken();
-#line 1483 "cs.ATG"
+#line 1468 "cs.ATG"
op = AssignmentOperatorType.ShiftLeft;
break;
}
case 46: {
lexer.NextToken();
-#line 1484 "cs.ATG"
+#line 1469 "cs.ATG"
op = AssignmentOperatorType.ShiftRight;
break;
}
@@ -3269,83 +3245,83 @@
}
void LocalVariableDecl(
-#line 1498 "cs.ATG"
+#line 1483 "cs.ATG"
out Statement stmt) {
-#line 1500 "cs.ATG"
+#line 1485 "cs.ATG"
TypeReference type;
VariableDeclaration var = null;
LocalVariableDeclaration localVariableDeclaration;
Type(
-#line 1505 "cs.ATG"
+#line 1490 "cs.ATG"
out type);
-#line 1505 "cs.ATG"
+#line 1490 "cs.ATG"
localVariableDeclaration = new LocalVariableDeclaration(type); localVariableDeclaration.StartLocation = t.Location;
LocalVariableDeclarator(
-#line 1506 "cs.ATG"
+#line 1491 "cs.ATG"
out var);
-#line 1506 "cs.ATG"
+#line 1491 "cs.ATG"
localVariableDeclaration.Variables.Add(var);
while (la.kind == 12) {
lexer.NextToken();
LocalVariableDeclarator(
-#line 1507 "cs.ATG"
+#line 1492 "cs.ATG"
out var);
-#line 1507 "cs.ATG"
+#line 1492 "cs.ATG"
localVariableDeclaration.Variables.Add(var);
}
-#line 1508 "cs.ATG"
+#line 1493 "cs.ATG"
stmt = localVariableDeclaration;
}
void LocalVariableDeclarator(
-#line 1511 "cs.ATG"
+#line 1496 "cs.ATG"
out VariableDeclaration var) {
-#line 1512 "cs.ATG"
+#line 1497 "cs.ATG"
Expression expr = null;
Expect(1);
-#line 1514 "cs.ATG"
+#line 1499 "cs.ATG"
var = new VariableDeclaration(t.val);
if (la.kind == 3) {
lexer.NextToken();
LocalVariableInitializer(
-#line 1514 "cs.ATG"
+#line 1499 "cs.ATG"
out expr);
-#line 1514 "cs.ATG"
+#line 1499 "cs.ATG"
var.Initializer = expr;
}
}
void LocalVariableInitializer(
-#line 1517 "cs.ATG"
+#line 1502 "cs.ATG"
out Expression expr) {
-#line 1518 "cs.ATG"
+#line 1503 "cs.ATG"
expr = null;
if (StartOf(4)) {
Expr(
-#line 1520 "cs.ATG"
+#line 1505 "cs.ATG"
out expr);
} else if (la.kind == 14) {
ArrayInitializer(
-#line 1521 "cs.ATG"
+#line 1506 "cs.ATG"
out expr);
} else SynErr(168);
}
void EmbeddedStatement(
-#line 1548 "cs.ATG"
+#line 1533 "cs.ATG"
out Statement statement) {
-#line 1550 "cs.ATG"
+#line 1535 "cs.ATG"
TypeReference type = null;
Expression expr = null;
Statement embeddedStatement = null;
@@ -3353,177 +3329,177 @@
if (la.kind == 14) {
Block(
-#line 1556 "cs.ATG"
+#line 1541 "cs.ATG"
out statement);
} else if (la.kind == 10) {
lexer.NextToken();
-#line 1558 "cs.ATG"
+#line 1543 "cs.ATG"
statement = new EmptyStatement();
} else if (
-#line 1560 "cs.ATG"
+#line 1545 "cs.ATG"
IdentIsYield ()) {
Expect(1);
if (la.kind == 100) {
lexer.NextToken();
Expr(
-#line 1561 "cs.ATG"
+#line 1546 "cs.ATG"
out expr);
} else if (la.kind == 52) {
lexer.NextToken();
} else SynErr(169);
Expect(10);
-#line 1561 "cs.ATG"
+#line 1546 "cs.ATG"
statement = new YieldStatement(expr);
} else if (
-#line 1563 "cs.ATG"
+#line 1548 "cs.ATG"
UnCheckedAndLBrace()) {
-#line 1563 "cs.ATG"
+#line 1548 "cs.ATG"
Statement block; bool isChecked = true;
if (la.kind == 57) {
lexer.NextToken();
} else if (la.kind == 117) {
lexer.NextToken();
-#line 1564 "cs.ATG"
+#line 1549 "cs.ATG"
isChecked = false;
} else SynErr(170);
Block(
-#line 1565 "cs.ATG"
+#line 1550 "cs.ATG"
out block);
-#line 1565 "cs.ATG"
+#line 1550 "cs.ATG"
statement = isChecked ? (Statement)new CheckedStatement(block) : (Statement)new UncheckedStatement(block);
} else if (StartOf(4)) {
StatementExpr(
-#line 1567 "cs.ATG"
+#line 1552 "cs.ATG"
out statement);
Expect(10);
} else if (la.kind == 78) {
lexer.NextToken();
-#line 1569 "cs.ATG"
+#line 1554 "cs.ATG"
Statement elseStatement = null;
Expect(18);
Expr(
-#line 1570 "cs.ATG"
+#line 1555 "cs.ATG"
out expr);
Expect(19);
EmbeddedStatement(
-#line 1571 "cs.ATG"
+#line 1556 "cs.ATG"
out embeddedStatement);
if (la.kind == 66) {
lexer.NextToken();
EmbeddedStatement(
-#line 1572 "cs.ATG"
+#line 1557 "cs.ATG"
out elseStatement);
}
-#line 1573 "cs.ATG"
+#line 1558 "cs.ATG"
statement = elseStatement != null ? (Statement)new IfElseStatement(expr, embeddedStatement, elseStatement) : (Statement)new IfStatement(expr, embeddedStatement);
} else if (la.kind == 109) {
lexer.NextToken();
-#line 1574 "cs.ATG"
+#line 1559 "cs.ATG"
ArrayList switchSections = new ArrayList();
Expect(18);
Expr(
-#line 1575 "cs.ATG"
+#line 1560 "cs.ATG"
out expr);
Expect(19);
Expect(14);
while (la.kind == 54 || la.kind == 62) {
SwitchSection(
-#line 1576 "cs.ATG"
+#line 1561 "cs.ATG"
out statement);
-#line 1576 "cs.ATG"
+#line 1561 "cs.ATG"
switchSections.Add(statement);
}
Expect(15);
-#line 1577 "cs.ATG"
+#line 1562 "cs.ATG"
statement = new SwitchStatement(expr, switchSections);
} else if (la.kind == 124) {
lexer.NextToken();
Expect(18);
Expr(
-#line 1579 "cs.ATG"
+#line 1564 "cs.ATG"
out expr);
Expect(19);
EmbeddedStatement(
-#line 1580 "cs.ATG"
+#line 1565 "cs.ATG"
out embeddedStatement);
-#line 1580 "cs.ATG"
+#line 1565 "cs.ATG"
statement = new WhileStatement(expr, embeddedStatement);
} else if (la.kind == 64) {
lexer.NextToken();
EmbeddedStatement(
-#line 1581 "cs.ATG"
+#line 1566 "cs.ATG"
out embeddedStatement);
Expect(124);
Expect(18);
Expr(
-#line 1582 "cs.ATG"
+#line 1567 "cs.ATG"
out expr);
Expect(19);
Expect(10);
-#line 1582 "cs.ATG"
+#line 1567 "cs.ATG"
statement = new DoWhileStatement(expr, embeddedStatement);
} else if (la.kind == 75) {
lexer.NextToken();
-#line 1583 "cs.ATG"
+#line 1568 "cs.ATG"
ArrayList initializer = null, iterator = null;
Expect(18);
if (StartOf(4)) {
ForInitializer(
-#line 1584 "cs.ATG"
+#line 1569 "cs.ATG"
out initializer);
}
Expect(10);
if (StartOf(4)) {
Expr(
-#line 1585 "cs.ATG"
+#line 1570 "cs.ATG"
out expr);
}
Expect(10);
if (StartOf(4)) {
ForIterator(
-#line 1586 "cs.ATG"
+#line 1571 "cs.ATG"
out iterator);
}
Expect(19);
EmbeddedStatement(
-#line 1587 "cs.ATG"
+#line 1572 "cs.ATG"
out embeddedStatement);
-#line 1587 "cs.ATG"
+#line 1572 "cs.ATG"
statement = new ForStatement(initializer, expr, iterator, embeddedStatement);
} else if (la.kind == 76) {
lexer.NextToken();
Expect(18);
Type(
-#line 1588 "cs.ATG"
+#line 1573 "cs.ATG"
out type);
Expect(1);
-#line 1588 "cs.ATG"
+#line 1573 "cs.ATG"
string varName = t.val;
Expect(80);
Expr(
-#line 1589 "cs.ATG"
+#line 1574 "cs.ATG"
out expr);
Expect(19);
EmbeddedStatement(
-#line 1590 "cs.ATG"
+#line 1575 "cs.ATG"
out embeddedStatement);
-#line 1590 "cs.ATG"
+#line 1575 "cs.ATG"
statement = new ForeachStatement(type, varName , expr, embeddedStatement);
statement.EndLocation = t.EndLocation;
@@ -3531,363 +3507,363 @@
lexer.NextToken();
Expect(10);
-#line 1594 "cs.ATG"
+#line 1579 "cs.ATG"
statement = new BreakStatement();
} else if (la.kind == 60) {
lexer.NextToken();
Expect(10);
-#line 1595 "cs.ATG"
+#line 1580 "cs.ATG"
statement = new ContinueStatement();
} else if (la.kind == 77) {
GotoStatement(
-#line 1596 "cs.ATG"
+#line 1581 "cs.ATG"
out statement);
} else if (la.kind == 100) {
lexer.NextToken();
if (StartOf(4)) {
Expr(
-#line 1597 "cs.ATG"
+#line 1582 "cs.ATG"
out expr);
}
Expect(10);
-#line 1597 "cs.ATG"
+#line 1582 "cs.ATG"
statement = new ReturnStatement(expr);
} else if (la.kind == 111) {
lexer.NextToken();
if (StartOf(4)) {
Expr(
-#line 1598 "cs.ATG"
+#line 1583 "cs.ATG"
out expr);
}
Expect(10);
-#line 1598 "cs.ATG"
+#line 1583 "cs.ATG"
statement = new ThrowStatement(expr);
} else if (la.kind == 113) {
TryStatement(
-#line 1601 "cs.ATG"
+#line 1586 "cs.ATG"
out statement);
} else if (la.kind == 85) {
lexer.NextToken();
Expect(18);
Expr(
-#line 1603 "cs.ATG"
+#line 1588 "cs.ATG"
out expr);
Expect(19);
EmbeddedStatement(
-#line 1604 "cs.ATG"
+#line 1589 "cs.ATG"
out embeddedStatement);
-#line 1604 "cs.ATG"
+#line 1589 "cs.ATG"
statement = new LockStatement(expr, embeddedStatement);
} else if (la.kind == 120) {
-#line 1606 "cs.ATG"
+#line 1591 "cs.ATG"
Statement resourceAcquisitionStmt = null;
lexer.NextToken();
Expect(18);
ResourceAcquisition(
-#line 1608 "cs.ATG"
+#line 1593 "cs.ATG"
out resourceAcquisitionStmt);
Expect(19);
EmbeddedStatement(
-#line 1609 "cs.ATG"
+#line 1594 "cs.ATG"
out embeddedStatement);
-#line 1609 "cs.ATG"
+#line 1594 "cs.ATG"
statement = new UsingStatement(resourceAcquisitionStmt, embeddedStatement);
} else if (la.kind == 118) {
lexer.NextToken();
Block(
-#line 1611 "cs.ATG"
+#line 1596 "cs.ATG"
out embeddedStatement);
-#line 1611 "cs.ATG"
+#line 1596 "cs.ATG"
statement = new UnsafeStatement(embeddedStatement);
} else if (la.kind == 73) {
lexer.NextToken();
Expect(18);
Type(
-#line 1614 "cs.ATG"
+#line 1599 "cs.ATG"
out type);
-#line 1614 "cs.ATG"
+#line 1599 "cs.ATG"
if (type.PointerNestingLevel == 0) Error("can only fix pointer types");
FixedStatement fxStmt = new FixedStatement(type);
string identifier = null;
Expect(1);
-#line 1618 "cs.ATG"
+#line 1603 "cs.ATG"
identifier = t.val;
Expect(3);
Expr(
-#line 1619 "cs.ATG"
+#line 1604 "cs.ATG"
out expr);
-#line 1619 "cs.ATG"
+#line 1604 "cs.ATG"
fxStmt.PointerDeclarators.Add(new VariableDeclaration(identifier, expr));
while (la.kind == 12) {
lexer.NextToken();
Expect(1);
-#line 1621 "cs.ATG"
+#line 1606 "cs.ATG"
identifier = t.val;
Expect(3);
Expr(
-#line 1622 "cs.ATG"
+#line 1607 "cs.ATG"
out expr);
-#line 1622 "cs.ATG"
+#line 1607 "cs.ATG"
fxStmt.PointerDeclarators.Add(new VariableDeclaration(identifier, expr));
}
Expect(19);
EmbeddedStatement(
-#line 1624 "cs.ATG"
+#line 1609 "cs.ATG"
out embeddedStatement);
-#line 1624 "cs.ATG"
+#line 1609 "cs.ATG"
fxStmt.EmbeddedStatement = embeddedStatement; statement = fxStmt;
} else SynErr(171);
}
void StatementExpr(
-#line 1732 "cs.ATG"
+#line 1717 "cs.ATG"
out Statement stmt) {
-#line 1737 "cs.ATG"
+#line 1722 "cs.ATG"
bool mustBeAssignment = la.kind == Tokens.Plus || la.kind == Tokens.Minus ||
la.kind == Tokens.Not || la.kind == Tokens.BitwiseComplement ||
la.kind == Tokens.Times || la.kind == Tokens.BitwiseAnd || IsTypeCast();
Expression expr = null;
UnaryExpr(
-#line 1743 "cs.ATG"
+#line 1728 "cs.ATG"
out expr);
if (StartOf(6)) {
-#line 1746 "cs.ATG"
+#line 1731 "cs.ATG"
AssignmentOperatorType op; Expression val;
AssignmentOperator(
-#line 1746 "cs.ATG"
+#line 1731 "cs.ATG"
out op);
Expr(
-#line 1746 "cs.ATG"
+#line 1731 "cs.ATG"
out val);
-#line 1746 "cs.ATG"
+#line 1731 "cs.ATG"
expr = new AssignmentExpression(expr, op, val);
} else if (la.kind == 10 || la.kind == 12 || la.kind == 19) {
-#line 1747 "cs.ATG"
+#line 1732 "cs.ATG"
if (mustBeAssignment) Error("error in assignment.");
} else SynErr(172);
-#line 1748 "cs.ATG"
+#line 1733 "cs.ATG"
stmt = new StatementExpression(expr);
}
void SwitchSection(
-#line 1646 "cs.ATG"
+#line 1631 "cs.ATG"
out Statement stmt) {
-#line 1648 "cs.ATG"
+#line 1633 "cs.ATG"
SwitchSection switchSection = new SwitchSection();
Expression expr;
SwitchLabel(
-#line 1652 "cs.ATG"
+#line 1637 "cs.ATG"
out expr);
-#line 1652 "cs.ATG"
+#line 1637 "cs.ATG"
switchSection.SwitchLabels.Add(expr);
while (la.kind == 54 || la.kind == 62) {
SwitchLabel(
-#line 1652 "cs.ATG"
+#line 1637 "cs.ATG"
out expr);
-#line 1652 "cs.ATG"
+#line 1637 "cs.ATG"
switchSection.SwitchLabels.Add(expr);
}
-#line 1653 "cs.ATG"
+#line 1638 "cs.ATG"
compilationUnit.BlockStart(switchSection);
Statement();
while (StartOf(20)) {
Statement();
}
-#line 1656 "cs.ATG"
+#line 1641 "cs.ATG"
compilationUnit.BlockEnd();
stmt = switchSection;
}
void ForInitializer(
-#line 1627 "cs.ATG"
+#line 1612 "cs.ATG"
out ArrayList initializer) {
-#line 1629 "cs.ATG"
+#line 1614 "cs.ATG"
Statement stmt;
initializer = new ArrayList();
if (
-#line 1633 "cs.ATG"
+#line 1618 "cs.ATG"
IsLocalVarDecl()) {
LocalVariableDecl(
-#line 1633 "cs.ATG"
+#line 1618 "cs.ATG"
out stmt);
-#line 1633 "cs.ATG"
+#line 1618 "cs.ATG"
initializer.Add(stmt);
} else if (StartOf(4)) {
StatementExpr(
-#line 1634 "cs.ATG"
+#line 1619 "cs.ATG"
out stmt);
-#line 1634 "cs.ATG"
+#line 1619 "cs.ATG"
initializer.Add(stmt);
while (la.kind == 12) {
lexer.NextToken();
StatementExpr(
-#line 1634 "cs.ATG"
+#line 1619 "cs.ATG"
out stmt);
-#line 1634 "cs.ATG"
+#line 1619 "cs.ATG"
initializer.Add(stmt);
}
-#line 1634 "cs.ATG"
+#line 1619 "cs.ATG"
initializer.Add(stmt);
} else SynErr(173);
}
void ForIterator(
-#line 1637 "cs.ATG"
+#line 1622 "cs.ATG"
out ArrayList iterator) {
-#line 1639 "cs.ATG"
+#line 1624 "cs.ATG"
Statement stmt;
iterator = new ArrayList();
StatementExpr(
-#line 1643 "cs.ATG"
+#line 1628 "cs.ATG"
out stmt);
-#line 1643 "cs.ATG"
+#line 1628 "cs.ATG"
iterator.Add(stmt);
while (la.kind == 12) {
lexer.NextToken();
StatementExpr(
-#line 1643 "cs.ATG"
+#line 1628 "cs.ATG"
out stmt);
-#line 1643 "cs.ATG"
+#line 1628 "cs.ATG"
iterator.Add(stmt);
}
}
void GotoStatement(
-#line 1705 "cs.ATG"
+#line 1690 "cs.ATG"
out Statement stmt) {
-#line 1706 "cs.ATG"
+#line 1691 "cs.ATG"
Expression expr; stmt = null;
Expect(77);
if (la.kind == 1) {
lexer.NextToken();
-#line 1710 "cs.ATG"
+#line 1695 "cs.ATG"
stmt = new GotoStatement(t.val);
Expect(10);
} else if (la.kind == 54) {
lexer.NextToken();
Expr(
-#line 1711 "cs.ATG"
+#line 1696 "cs.ATG"
out expr);
Expect(10);
-#line 1711 "cs.ATG"
+#line 1696 "cs.ATG"
stmt = new GotoCaseStatement(expr);
} else if (la.kind == 62) {
lexer.NextToken();
Expect(10);
-#line 1712 "cs.ATG"
+#line 1697 "cs.ATG"
stmt = new GotoCaseStatement(null);
} else SynErr(174);
}
void TryStatement(
-#line 1668 "cs.ATG"
+#line 1653 "cs.ATG"
out Statement tryStatement) {
-#line 1670 "cs.ATG"
+#line 1655 "cs.ATG"
Statement blockStmt = null, finallyStmt = null;
ArrayList catchClauses = null;
Expect(113);
Block(
-#line 1674 "cs.ATG"
+#line 1659 "cs.ATG"
out blockStmt);
if (la.kind == 55) {
CatchClauses(
-#line 1676 "cs.ATG"
+#line 1661 "cs.ATG"
out catchClauses);
if (la.kind == 72) {
lexer.NextToken();
Block(
-#line 1676 "cs.ATG"
+#line 1661 "cs.ATG"
out finallyStmt);
}
} else if (la.kind == 72) {
lexer.NextToken();
Block(
-#line 1677 "cs.ATG"
+#line 1662 "cs.ATG"
out finallyStmt);
} else SynErr(175);
-#line 1680 "cs.ATG"
+#line 1665 "cs.ATG"
tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
}
void ResourceAcquisition(
-#line 1716 "cs.ATG"
+#line 1701 "cs.ATG"
out Statement stmt) {
-#line 1718 "cs.ATG"
+#line 1703 "cs.ATG"
stmt = null;
Expression expr;
if (
-#line 1723 "cs.ATG"
+#line 1708 "cs.ATG"
IsLocalVarDecl()) {
LocalVariableDecl(
-#line 1723 "cs.ATG"
+#line 1708 "cs.ATG"
out stmt);
} else if (StartOf(4)) {
Expr(
-#line 1724 "cs.ATG"
+#line 1709 "cs.ATG"
out expr);
-#line 1728 "cs.ATG"
+#line 1713 "cs.ATG"
stmt = new StatementExpression(expr);
} else SynErr(176);
}
void SwitchLabel(
-#line 1661 "cs.ATG"
+#line 1646 "cs.ATG"
out Expression expr) {
-#line 1662 "cs.ATG"
+#line 1647 "cs.ATG"
expr = null;
if (la.kind == 54) {
lexer.NextToken();
Expr(
-#line 1664 "cs.ATG"
+#line 1649 "cs.ATG"
out expr);
Expect(9);
} else if (la.kind == 62) {
@@ -3897,153 +3873,153 @@
}
void CatchClauses(
-#line 1685 "cs.ATG"
+#line 1670 "cs.ATG"
out ArrayList catchClauses) {
-#line 1687 "cs.ATG"
+#line 1672 "cs.ATG"
catchClauses = new ArrayList();
Expect(55);
-#line 1690 "cs.ATG"
+#line 1675 "cs.ATG"
string name;
string identifier;
Statement stmt;
if (la.kind == 14) {
Block(
-#line 1696 "cs.ATG"
+#line 1681 "cs.ATG"
out stmt);
-#line 1696 "cs.ATG"
+#line 1681 "cs.ATG"
catchClauses.Add(new CatchClause(stmt));
} else if (la.kind == 18) {
lexer.NextToken();
ClassType(
-#line 1698 "cs.ATG"
+#line 1683 "cs.ATG"
out name);
-#line 1698 "cs.ATG"
+#line 1683 "cs.ATG"
identifier = null;
if (la.kind == 1) {
lexer.NextToken();
-#line 1698 "cs.ATG"
+#line 1683 "cs.ATG"
identifier = t.val;
}
Expect(19);
Block(
-#line 1698 "cs.ATG"
+#line 1683 "cs.ATG"
out stmt);
-#line 1698 "cs.ATG"
+#line 1683 "cs.ATG"
catchClauses.Add(new CatchClause(name, identifier, stmt));
while (
-#line 1699 "cs.ATG"
+#line 1684 "cs.ATG"
IsTypedCatch()) {
Expect(55);
Expect(18);
ClassType(
-#line 1699 "cs.ATG"
+#line 1684 "cs.ATG"
out name);
-#line 1699 "cs.ATG"
+#line 1684 "cs.ATG"
identifier = null;
if (la.kind == 1) {
lexer.NextToken();
-#line 1699 "cs.ATG"
+#line 1684 "cs.ATG"
identifier = t.val;
}
Expect(19);
Block(
-#line 1699 "cs.ATG"
+#line 1684 "cs.ATG"
out stmt);
-#line 1699 "cs.ATG"
+#line 1684 "cs.ATG"
catchClauses.Add(new CatchClause(name, identifier, stmt));
}
if (la.kind == 55) {
lexer.NextToken();
Block(
-#line 1701 "cs.ATG"
+#line 1686 "cs.ATG"
out stmt);
-#line 1701 "cs.ATG"
+#line 1686 "cs.ATG"
catchClauses.Add(new CatchClause(stmt));
}
} else SynErr(178);
}
void UnaryExpr(
-#line 1764 "cs.ATG"
+#line 1749 "cs.ATG"
out Expression uExpr) {
-#line 1766 "cs.ATG"
+#line 1751 "cs.ATG"
TypeReference type = null;
Expression expr;
ArrayList expressions = new ArrayList();
uExpr = null;
while (StartOf(26) ||
-#line 1788 "cs.ATG"
+#line 1773 "cs.ATG"
IsTypeCast()) {
if (la.kind == 4) {
lexer.NextToken();
-#line 1773 "cs.ATG"
+#line 1758 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus));
} else if (la.kind == 5) {
lexer.NextToken();
-#line 1774 "cs.ATG"
+#line 1759 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus));
} else if (la.kind == 22) {
lexer.NextToken();
-#line 1775 "cs.ATG"
+#line 1760 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not));
} else if (la.kind == 25) {
lexer.NextToken();
-#line 1776 "cs.ATG"
+#line 1761 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot));
} else if (la.kind == 6) {
lexer.NextToken();
-#line 1777 "cs.ATG"
+#line 1762 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Star));
} else if (la.kind == 29) {
lexer.NextToken();
-#line 1778 "cs.ATG"
+#line 1763 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment));
} else if (la.kind == 30) {
lexer.NextToken();
-#line 1779 "cs.ATG"
+#line 1764 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement));
} else if (la.kind == 26) {
lexer.NextToken();
-#line 1780 "cs.ATG"
+#line 1765 "cs.ATG"
expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitWiseAnd));
} else {
Expect(18);
Type(
-#line 1788 "cs.ATG"
+#line 1773 "cs.ATG"
out type);
Expect(19);
-#line 1788 "cs.ATG"
+#line 1773 "cs.ATG"
expressions.Add(new CastExpression(type));
}
}
PrimaryExpr(
-#line 1791 "cs.ATG"
+#line 1776 "cs.ATG"
out expr);
-#line 1791 "cs.ATG"
+#line 1776 "cs.ATG"
for (int i = 0; i < expressions.Count; ++i) {
Expression nextExpression = i + 1 < expressions.Count ? (Expression)expressions[i + 1] : expr;
if (expressions[i] is CastExpression) {
@@ -4061,33 +4037,33 @@
}
void ConditionalOrExpr(
-#line 1893 "cs.ATG"
+#line 1878 "cs.ATG"
ref Expression outExpr) {
-#line 1894 "cs.ATG"
+#line 1879 "cs.ATG"
Expression expr;
ConditionalAndExpr(
-#line 1896 "cs.ATG"
+#line 1881 "cs.ATG"
ref outExpr);
while (la.kind == 24) {
lexer.NextToken();
UnaryExpr(
-#line 1896 "cs.ATG"
+#line 1881 "cs.ATG"
out expr);
ConditionalAndExpr(
-#line 1896 "cs.ATG"
+#line 1881 "cs.ATG"
ref expr);
-#line 1896 "cs.ATG"
+#line 1881 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr);
}
}
void PrimaryExpr(
-#line 1808 "cs.ATG"
+#line 1793 "cs.ATG"
out Expression pexpr) {
-#line 1810 "cs.ATG"
+#line 1795 "cs.ATG"
TypeReference type = null;
bool isArrayCreation = false;
Expression expr;
@@ -4097,46 +4073,46 @@
case 112: {
lexer.NextToken();
-#line 1817 "cs.ATG"
+#line 1802 "cs.ATG"
pexpr = new PrimitiveExpression(true, "true");
break;
}
case 71: {
lexer.NextToken();
-#line 1818 "cs.ATG"
+#line 1803 "cs.ATG"
pexpr = new PrimitiveExpression(false, "false");
break;
}
case 89: {
lexer.NextToken();
-#line 1819 "cs.ATG"
+#line 1804 "cs.ATG"
pexpr = new PrimitiveExpression(null, "null");
break;
}
case 2: {
lexer.NextToken();
-#line 1820 "cs.ATG"
+#line 1805 "cs.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val);
break;
}
case 1: {
lexer.NextToken();
-#line 1822 "cs.ATG"
+#line 1807 "cs.ATG"
pexpr = new IdentifierExpression(t.val);
break;
}
case 18: {
lexer.NextToken();
Expr(
-#line 1824 "cs.ATG"
+#line 1809 "cs.ATG"
out expr);
Expect(19);
-#line 1824 "cs.ATG"
+#line 1809 "cs.ATG"
pexpr = new ParenthesizedExpression(expr);
break;
}
@@ -4204,185 +4180,185 @@
}
}
-#line 1830 "cs.ATG"
+#line 1815 "cs.ATG"
string val = t.val; t.val = "";
Expect(13);
Expect(1);
-#line 1830 "cs.ATG"
+#line 1815 "cs.ATG"
pexpr = new FieldReferenceExpression(new TypeReferenceExpression(val), t.val);
break;
}
case 110: {
lexer.NextToken();
-#line 1832 "cs.ATG"
+#line 1817 "cs.ATG"
pexpr = new ThisReferenceExpression();
break;
}
case 50: {
lexer.NextToken();
-#line 1834 "cs.ATG"
+#line 1819 "cs.ATG"
Expression retExpr = new BaseReferenceExpression();
if (la.kind == 13) {
lexer.NextToken();
Expect(1);
-#line 1836 "cs.ATG"
+#line 1821 "cs.ATG"
retExpr = new FieldReferenceExpression(retExpr, t.val);
} else if (la.kind == 16) {
lexer.NextToken();
Expr(
-#line 1837 "cs.ATG"
+#line 1822 "cs.ATG"
out expr);
-#line 1837 "cs.ATG"
+#line 1822 "cs.ATG"
ArrayList indices = new ArrayList(); indices.Add(expr);
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 1838 "cs.ATG"
+#line 1823 "cs.ATG"
out expr);
-#line 1838 "cs.ATG"
+#line 1823 "cs.ATG"
indices.Add(expr);
}
Expect(17);
-#line 1839 "cs.ATG"
+#line 1824 "cs.ATG"
retExpr = new IndexerExpression(retExpr, indices);
} else SynErr(179);
-#line 1840 "cs.ATG"
+#line 1825 "cs.ATG"
pexpr = retExpr;
break;
}
case 88: {
lexer.NextToken();
NonArrayType(
-#line 1841 "cs.ATG"
+#line 1826 "cs.ATG"
out type);
-#line 1841 "cs.ATG"
+#line 1826 "cs.ATG"
ArrayList parameters = new ArrayList();
if (la.kind == 18) {
lexer.NextToken();
-#line 1846 "cs.ATG"
+#line 1831 "cs.ATG"
ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters);
if (StartOf(21)) {
Argument(
-#line 1846 "cs.ATG"
+#line 1831 "cs.ATG"
out expr);
-#line 1846 "cs.ATG"
+#line 1831 "cs.ATG"
parameters.Add(expr);
while (la.kind == 12) {
lexer.NextToken();
Argument(
-#line 1847 "cs.ATG"
+#line 1832 "cs.ATG"
out expr);
-#line 1847 "cs.ATG"
+#line 1832 "cs.ATG"
parameters.Add(expr);
}
}
Expect(19);
-#line 1847 "cs.ATG"
+#line 1832 "cs.ATG"
pexpr = oce;
} else if (la.kind == 16) {
-#line 1849 "cs.ATG"
+#line 1834 "cs.ATG"
isArrayCreation = true; ArrayCreateExpression ace = new ArrayCreateExpression(type); pexpr = ace;
lexer.NextToken();
-#line 1850 "cs.ATG"
+#line 1835 "cs.ATG"
int dims = 0; ArrayList rank = new ArrayList(); ArrayList parameterExpression = new ArrayList();
if (StartOf(4)) {
Expr(
-#line 1852 "cs.ATG"
+#line 1837 "cs.ATG"
out expr);
-#line 1852 "cs.ATG"
+#line 1837 "cs.ATG"
parameterExpression.Add(expr);
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 1852 "cs.ATG"
+#line 1837 "cs.ATG"
out expr);
-#line 1852 "cs.ATG"
+#line 1837 "cs.ATG"
parameterExpression.Add(expr);
}
Expect(17);
-#line 1852 "cs.ATG"
+#line 1837 "cs.ATG"
parameters.Add(new ArrayCreationParameter(parameterExpression)); ace.Parameters = parameters;
while (
-#line 1853 "cs.ATG"
+#line 1838 "cs.ATG"
IsDims()) {
Expect(16);
-#line 1853 "cs.ATG"
+#line 1838 "cs.ATG"
dims =0;
while (la.kind == 12) {
lexer.NextToken();
-#line 1853 "cs.ATG"
+#line 1838 "cs.ATG"
dims++;
}
-#line 1853 "cs.ATG"
+#line 1838 "cs.ATG"
rank.Add(dims); parameters.Add(new ArrayCreationParameter(dims));
Expect(17);
}
-#line 1854 "cs.ATG"
+#line 1839 "cs.ATG"
if (rank.Count > 0) { ace.Rank = (int[])rank.ToArray(typeof (int)); }
if (la.kind == 14) {
ArrayInitializer(
-#line 1855 "cs.ATG"
+#line 1840 "cs.ATG"
out expr);
-#line 1855 "cs.ATG"
+#line 1840 "cs.ATG"
ace.ArrayInitializer = (ArrayInitializerExpression)expr;
}
} else if (la.kind == 12 || la.kind == 17) {
while (la.kind == 12) {
lexer.NextToken();
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
dims++;
}
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
parameters.Add(new ArrayCreationParameter(dims));
Expect(17);
while (
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
IsDims()) {
Expect(16);
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
dims =0;
while (la.kind == 12) {
lexer.NextToken();
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
dims++;
}
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
parameters.Add(new ArrayCreationParameter(dims));
Expect(17);
}
ArrayInitializer(
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
out expr);
-#line 1857 "cs.ATG"
+#line 1842 "cs.ATG"
ace.ArrayInitializer = (ArrayInitializerExpression)expr; ace.Parameters = parameters;
} else SynErr(180);
} else SynErr(181);
@@ -4392,20 +4368,20 @@
lexer.NextToken();
Expect(18);
if (
-#line 1863 "cs.ATG"
+#line 1848 "cs.ATG"
NotVoidPointer()) {
Expect(122);
-#line 1863 "cs.ATG"
+#line 1848 "cs.ATG"
type = new TypeReference("void");
} else if (StartOf(8)) {
Type(
-#line 1864 "cs.ATG"
+#line 1849 "cs.ATG"
out type);
} else SynErr(182);
Expect(19);
-#line 1865 "cs.ATG"
+#line 1850 "cs.ATG"
pexpr = new TypeOfExpression(type);
break;
}
@@ -4413,11 +4389,11 @@
lexer.NextToken();
Expect(18);
Type(
-#line 1866 "cs.ATG"
+#line 1851 "cs.ATG"
out type);
Expect(19);
-#line 1866 "cs.ATG"
+#line 1851 "cs.ATG"
pexpr = new SizeOfExpression(type);
break;
}
@@ -4425,11 +4401,11 @@
lexer.NextToken();
Expect(18);
Expr(
-#line 1867 "cs.ATG"
+#line 1852 "cs.ATG"
out expr);
Expect(19);
-#line 1867 "cs.ATG"
+#line 1852 "cs.ATG"
pexpr = new CheckedExpression(expr);
break;
}
@@ -4437,11 +4413,11 @@
lexer.NextToken();
Expect(18);
Expr(
-#line 1868 "cs.ATG"
+#line 1853 "cs.ATG"
out expr);
Expect(19);
-#line 1868 "cs.ATG"
+#line 1853 "cs.ATG"
pexpr = new CheckedExpression(expr);
break;
}
@@ -4452,350 +4428,350 @@
if (la.kind == 29) {
lexer.NextToken();
-#line 1872 "cs.ATG"
+#line 1857 "cs.ATG"
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement);
} else if (la.kind == 30) {
lexer.NextToken();
-#line 1873 "cs.ATG"
+#line 1858 "cs.ATG"
pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement);
} else SynErr(184);
} else if (la.kind == 47) {
lexer.NextToken();
Expect(1);
-#line 1876 "cs.ATG"
+#line 1861 "cs.ATG"
pexpr = new PointerReferenceExpression(pexpr, t.val);
} else if (la.kind == 13) {
lexer.NextToken();
Expect(1);
-#line 1877 "cs.ATG"
+#line 1862 "cs.ATG"
pexpr = new FieldReferenceExpression(pexpr, t.val);
} else if (la.kind == 18) {
lexer.NextToken();
-#line 1879 "cs.ATG"
+#line 1864 "cs.ATG"
ArrayList parameters = new ArrayList();
if (StartOf(21)) {
Argument(
-#line 1880 "cs.ATG"
+#line 1865 "cs.ATG"
out expr);
-#line 1880 "cs.ATG"
+#line 1865 "cs.ATG"
parameters.Add(expr);
while (la.kind == 12) {
lexer.NextToken();
Argument(
-#line 1881 "cs.ATG"
+#line 1866 "cs.ATG"
out expr);
-#line 1881 "cs.ATG"
+#line 1866 "cs.ATG"
parameters.Add(expr);
}
}
Expect(19);
-#line 1882 "cs.ATG"
+#line 1867 "cs.ATG"
pexpr = new InvocationExpression(pexpr, parameters);
} else {
-#line 1884 "cs.ATG"
+#line 1869 "cs.ATG"
if (isArrayCreation) Error("element access not allow on array creation");
ArrayList indices = new ArrayList();
lexer.NextToken();
Expr(
-#line 1887 "cs.ATG"
+#line 1872 "cs.ATG"
out expr);
-#line 1887 "cs.ATG"
+#line 1872 "cs.ATG"
indices.Add(expr);
while (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 1888 "cs.ATG"
+#line 1873 "cs.ATG"
out expr);
-#line 1888 "cs.ATG"
+#line 1873 "cs.ATG"
indices.Add(expr);
}
Expect(17);
-#line 1889 "cs.ATG"
+#line 1874 "cs.ATG"
pexpr = new IndexerExpression(pexpr, indices);
}
}
}
void ConditionalAndExpr(
-#line 1899 "cs.ATG"
+#line 1884 "cs.ATG"
ref Expression outExpr) {
-#line 1900 "cs.ATG"
+#line 1885 "cs.ATG"
Expression expr;
InclusiveOrExpr(
-#line 1902 "cs.ATG"
+#line 1887 "cs.ATG"
ref outExpr);
while (la.kind == 23) {
lexer.NextToken();
UnaryExpr(
-#line 1902 "cs.ATG"
+#line 1887 "cs.ATG"
out expr);
InclusiveOrExpr(
-#line 1902 "cs.ATG"
+#line 1887 "cs.ATG"
ref expr);
-#line 1902 "cs.ATG"
+#line 1887 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr);
}
}
void InclusiveOrExpr(
-#line 1905 "cs.ATG"
+#line 1890 "cs.ATG"
ref Expression outExpr) {
-#line 1906 "cs.ATG"
+#line 1891 "cs.ATG"
Expression expr;
ExclusiveOrExpr(
-#line 1908 "cs.ATG"
+#line 1893 "cs.ATG"
ref outExpr);
while (la.kind == 27) {
lexer.NextToken();
UnaryExpr(
-#line 1908 "cs.ATG"
+#line 1893 "cs.ATG"
out expr);
ExclusiveOrExpr(
-#line 1908 "cs.ATG"
+#line 1893 "cs.ATG"
ref expr);
-#line 1908 "cs.ATG"
+#line 1893 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr);
}
}
void ExclusiveOrExpr(
-#line 1911 "cs.ATG"
+#line 1896 "cs.ATG"
ref Expression outExpr) {
-#line 1912 "cs.ATG"
+#line 1897 "cs.ATG"
Expression expr;
AndExpr(
-#line 1914 "cs.ATG"
+#line 1899 "cs.ATG"
ref outExpr);
while (la.kind == 28) {
lexer.NextToken();
UnaryExpr(
-#line 1914 "cs.ATG"
+#line 1899 "cs.ATG"
out expr);
AndExpr(
-#line 1914 "cs.ATG"
+#line 1899 "cs.ATG"
ref expr);
-#line 1914 "cs.ATG"
+#line 1899 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr);
}
}
void AndExpr(
-#line 1917 "cs.ATG"
+#line 1902 "cs.ATG"
ref Expression outExpr) {
-#line 1918 "cs.ATG"
+#line 1903 "cs.ATG"
Expression expr;
EqualityExpr(
-#line 1920 "cs.ATG"
+#line 1905 "cs.ATG"
ref outExpr);
while (la.kind == 26) {
lexer.NextToken();
UnaryExpr(
-#line 1920 "cs.ATG"
+#line 1905 "cs.ATG"
out expr);
EqualityExpr(
-#line 1920 "cs.ATG"
+#line 1905 "cs.ATG"
ref expr);
-#line 1920 "cs.ATG"
+#line 1905 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr);
}
}
void EqualityExpr(
-#line 1923 "cs.ATG"
+#line 1908 "cs.ATG"
ref Expression outExpr) {
-#line 1925 "cs.ATG"
+#line 1910 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
RelationalExpr(
-#line 1929 "cs.ATG"
+#line 1914 "cs.ATG"
ref outExpr);
while (la.kind == 31 || la.kind == 32) {
if (la.kind == 32) {
lexer.NextToken();
-#line 1932 "cs.ATG"
+#line 1917 "cs.ATG"
op = BinaryOperatorType.InEquality;
} else {
lexer.NextToken();
-#line 1933 "cs.ATG"
+#line 1918 "cs.ATG"
op = BinaryOperatorType.Equality;
}
UnaryExpr(
-#line 1935 "cs.ATG"
+#line 1920 "cs.ATG"
out expr);
RelationalExpr(
-#line 1935 "cs.ATG"
+#line 1920 "cs.ATG"
ref expr);
-#line 1935 "cs.ATG"
+#line 1920 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void RelationalExpr(
-#line 1939 "cs.ATG"
+#line 1924 "cs.ATG"
ref Expression outExpr) {
-#line 1941 "cs.ATG"
+#line 1926 "cs.ATG"
TypeReference type;
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
ShiftExpr(
-#line 1946 "cs.ATG"
+#line 1931 "cs.ATG"
ref outExpr);
while (StartOf(28)) {
if (StartOf(29)) {
if (la.kind == 21) {
lexer.NextToken();
-#line 1949 "cs.ATG"
+#line 1934 "cs.ATG"
op = BinaryOperatorType.LessThan;
} else if (la.kind == 20) {
lexer.NextToken();
-#line 1950 "cs.ATG"
+#line 1935 "cs.ATG"
op = BinaryOperatorType.GreaterThan;
} else if (la.kind == 34) {
lexer.NextToken();
-#line 1951 "cs.ATG"
+#line 1936 "cs.ATG"
op = BinaryOperatorType.LessThanOrEqual;
} else if (la.kind == 33) {
lexer.NextToken();
-#line 1952 "cs.ATG"
+#line 1937 "cs.ATG"
op = BinaryOperatorType.GreaterThanOrEqual;
} else SynErr(185);
UnaryExpr(
-#line 1954 "cs.ATG"
+#line 1939 "cs.ATG"
out expr);
ShiftExpr(
-#line 1954 "cs.ATG"
+#line 1939 "cs.ATG"
ref expr);
-#line 1954 "cs.ATG"
+#line 1939 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
} else {
if (la.kind == 84) {
lexer.NextToken();
-#line 1957 "cs.ATG"
+#line 1942 "cs.ATG"
op = BinaryOperatorType.IS;
} else if (la.kind == 49) {
lexer.NextToken();
-#line 1958 "cs.ATG"
+#line 1943 "cs.ATG"
op = BinaryOperatorType.AS;
} else SynErr(186);
Type(
-#line 1960 "cs.ATG"
+#line 1945 "cs.ATG"
out type);
-#line 1960 "cs.ATG"
+#line 1945 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, new TypeReferenceExpression(type));
}
}
}
void ShiftExpr(
-#line 1964 "cs.ATG"
+#line 1949 "cs.ATG"
ref Expression outExpr) {
-#line 1966 "cs.ATG"
+#line 1951 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
AdditiveExpr(
-#line 1970 "cs.ATG"
+#line 1955 "cs.ATG"
ref outExpr);
while (la.kind == 35 || la.kind == 36) {
if (la.kind == 35) {
lexer.NextToken();
-#line 1973 "cs.ATG"
+#line 1958 "cs.ATG"
op = BinaryOperatorType.ShiftLeft;
} else {
lexer.NextToken();
-#line 1974 "cs.ATG"
+#line 1959 "cs.ATG"
op = BinaryOperatorType.ShiftRight;
}
UnaryExpr(
-#line 1976 "cs.ATG"
+#line 1961 "cs.ATG"
out expr);
AdditiveExpr(
-#line 1976 "cs.ATG"
+#line 1961 "cs.ATG"
ref expr);
-#line 1976 "cs.ATG"
+#line 1961 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void AdditiveExpr(
-#line 1980 "cs.ATG"
+#line 1965 "cs.ATG"
ref Expression outExpr) {
-#line 1982 "cs.ATG"
+#line 1967 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
MultiplicativeExpr(
-#line 1986 "cs.ATG"
+#line 1971 "cs.ATG"
ref outExpr);
while (la.kind == 4 || la.kind == 5) {
if (la.kind == 4) {
lexer.NextToken();
-#line 1989 "cs.ATG"
+#line 1974 "cs.ATG"
op = BinaryOperatorType.Add;
} else {
lexer.NextToken();
-#line 1990 "cs.ATG"
+#line 1975 "cs.ATG"
op = BinaryOperatorType.Subtract;
}
UnaryExpr(
-#line 1992 "cs.ATG"
+#line 1977 "cs.ATG"
out expr);
MultiplicativeExpr(
-#line 1992 "cs.ATG"
+#line 1977 "cs.ATG"
ref expr);
-#line 1992 "cs.ATG"
+#line 1977 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
void MultiplicativeExpr(
-#line 1996 "cs.ATG"
+#line 1981 "cs.ATG"
ref Expression outExpr) {
-#line 1998 "cs.ATG"
+#line 1983 "cs.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
@@ -4803,24 +4779,24 @@
if (la.kind == 6) {
lexer.NextToken();
-#line 2004 "cs.ATG"
+#line 1989 "cs.ATG"
op = BinaryOperatorType.Multiply;
} else if (la.kind == 7) {
lexer.NextToken();
-#line 2005 "cs.ATG"
+#line 1990 "cs.ATG"
op = BinaryOperatorType.Divide;
} else {
lexer.NextToken();
-#line 2006 "cs.ATG"
+#line 1991 "cs.ATG"
op = BinaryOperatorType.Modulus;
}
UnaryExpr(
-#line 2008 "cs.ATG"
+#line 1993 "cs.ATG"
out expr);
-#line 2008 "cs.ATG"
+#line 1993 "cs.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr);
}
}
@@ -5037,8 +5013,8 @@
static bool[,] set = {
{T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
- {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,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,T, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
- {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,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
+ {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, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,T, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
+ {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, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,x,x,T, T,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x},
{x,T,T,x, T,T,T,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,x,T,T, x,T,x,x, T,T,x,x, x,T,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,T,x,T, T,x,x,T, x,x,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x},
{x,x,x,x, T,T,T,T, T,T,T,T, T,x,x,T, x,T,x,T, T,T,x,T, T,x,T,T, T,x,x,T, T,T,T,T, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x},
@@ -5053,7 +5029,7 @@
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, T,x,x,x, x,x,x,T, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
{x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,T,T, x,T,x,T, x,T,x,T, T,T,x,x, x,x,T,x, x,x,x,T, x,T,T,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, T,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
- {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,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,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,T,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,T, T,x,x,T, x,x,T,x, x,x,x},
{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,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,T,T,x, T,T,T,x, x,x,T,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,x,T,T, T,T,x,x, T,T,x,T, T,T,x,x, T,T,x,x, x,x,x,T, x,T,T,T, T,T,T,x, x,T,x,x, x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,T,x,T, T,x,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,x,x},
More information about the Monodevelop-patches-list
mailing list