diff --git a/src/Libraries/NRefactory/NRefactory.sln b/src/Libraries/NRefactory/NRefactory.sln index 3c0509a5cd..a6dc46667e 100644 --- a/src/Libraries/NRefactory/NRefactory.sln +++ b/src/Libraries/NRefactory/NRefactory.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5705 +# SharpDevelop 4.0.0.5826 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}" diff --git a/src/Libraries/NRefactory/NRefactoryASTGenerator/KeywordGenerator.cs b/src/Libraries/NRefactory/NRefactoryASTGenerator/KeywordGenerator.cs index f69e30721f..f9adcf1077 100644 --- a/src/Libraries/NRefactory/NRefactoryASTGenerator/KeywordGenerator.cs +++ b/src/Libraries/NRefactory/NRefactoryASTGenerator/KeywordGenerator.cs @@ -10,11 +10,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; -using System.Security.Principal; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; -using NRefactoryASTGenerator.Ast; namespace NRefactoryASTGenerator { @@ -107,12 +104,13 @@ namespace NRefactoryASTGenerator { string sourceDir = Path.Combine(testBaseDir, language, "LexerTests.cs"); using (StreamWriter writer = new StreamWriter(new FileStream(sourceDir, FileMode.Create))) { + writer.WriteLine("// this file was autogenerated by a tool."); writer.WriteLine("using System;"); writer.WriteLine("using System.IO;"); writer.WriteLine("using NUnit.Framework;"); writer.WriteLine("using ICSharpCode.NRefactory.Parser;"); writer.WriteLine("using ICSharpCode.NRefactory.Parser.{0};", language == "VBNet" ? "VB" : language); - writer.WriteLine("using ICSharpCode.NRefactory.PrettyPrinter;\n"); + writer.WriteLine("using ICSharpCode.NRefactory.PrettyPrinter;"); writer.WriteLine(); writer.WriteLine("namespace ICSharpCode.NRefactory.Tests.Lexer.{0}", language == "VBNet" ? "VB" : language); writer.WriteLine("{"); @@ -121,7 +119,7 @@ namespace NRefactoryASTGenerator writer.WriteLine("\t{"); writer.WriteLine("\t\tILexer GenerateLexer(StringReader sr)"); writer.WriteLine("\t\t{"); - writer.WriteLine("\t\t\treturn ParserFactory.CreateLexer(SupportedLanguage.CSharp, sr);"); + writer.WriteLine("\t\t\treturn ParserFactory.CreateLexer(SupportedLanguage.{0}, sr);", language); writer.WriteLine("\t\t}"); for (int i = 0; i < specialChars.Values.Count; i++) { writer.WriteLine(); @@ -133,6 +131,8 @@ namespace NRefactoryASTGenerator writer.WriteLine("\t\t}"); } foreach (string keyword in keywords) { + if (keyword == "Rem") + continue; writer.WriteLine(); writer.WriteLine("\t\t[Test]"); writer.WriteLine("\t\tpublic void Test{0}()", UpperCaseFirst(keyword)); @@ -236,18 +236,6 @@ namespace NRefactoryASTGenerator } } - static int FindIndex(this IEnumerable items, Func f) - { - int index = -1; - foreach (T item in items) { - index++; - if (f(item)) - return index; - } - - return -1; - } - static void GenerateKeywords(Dictionary properties, List keywords, string language) { string sourceDir = Path.Combine(baseDir, language, "Keywords.cs"); @@ -388,10 +376,16 @@ namespace NRefactoryASTGenerator tokenValue++; } - - static void WriteList(this StreamWriter writer, Tuple data) + static int FindIndex(this IEnumerable items, Func f) { + int index = -1; + foreach (T item in items) { + index++; + if (f(item)) + return index; + } + return -1; } #endregion } diff --git a/src/Libraries/NRefactory/Project/NRefactory.csproj b/src/Libraries/NRefactory/Project/NRefactory.csproj index a8db5fb6a5..7678fcde9c 100644 --- a/src/Libraries/NRefactory/Project/NRefactory.csproj +++ b/src/Libraries/NRefactory/Project/NRefactory.csproj @@ -55,11 +55,8 @@ - - ParserHelper.atg - + - @@ -87,7 +84,9 @@ - + + ExpressionFinder.atg + @@ -138,17 +137,18 @@ - - ParserHelper.atg - - + + CocoParserGenerator + + ExpressionFinder.atg + - ParserHelper.atg + ExpressionFinder.atg - ParserHelper.atg + ExpressionFinder.atg @@ -156,17 +156,19 @@ - + + CocoParserGenerator + - - + Never CocoParserGenerator - + ICSharpCode.NRefactory.Parser.VB + diff --git a/src/Libraries/NRefactory/Project/Src/Ast/Generated.cs b/src/Libraries/NRefactory/Project/Src/Ast/Generated.cs index 9f20dc4b74..be284b75ec 100644 --- a/src/Libraries/NRefactory/Project/Src/Ast/Generated.cs +++ b/src/Libraries/NRefactory/Project/Src/Ast/Generated.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -1665,15 +1665,15 @@ namespace ICSharpCode.NRefactory.Ast { initializer = Expression.Null; } - public bool HasRemoveRegion { + public bool HasAddRegion { get { - return !removeRegion.IsNull; + return !addRegion.IsNull; } } - public bool HasAddRegion { + public bool HasRemoveRegion { get { - return !addRegion.IsNull; + return !removeRegion.IsNull; } } @@ -2421,21 +2421,18 @@ namespace ICSharpCode.NRefactory.Ast { elseIfSections = new List(); } - - public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement) - : this(condition) { - this.trueStatement.Add(Statement.CheckNull(trueStatement)); - this.falseStatement.Add(Statement.CheckNull(falseStatement)); - if (trueStatement != null) trueStatement.Parent = this; - if (falseStatement != null) falseStatement.Parent = this; - } - public bool HasElseStatements { get { return falseStatement.Count > 0; } } + public bool HasElseIfSections { + get { + return elseIfSections.Count > 0; + } + } + public IfElseStatement(Expression condition, Statement trueStatement) : this(condition) { @@ -2443,11 +2440,14 @@ namespace ICSharpCode.NRefactory.Ast { if (trueStatement != null) trueStatement.Parent = this; } - public bool HasElseIfSections { - get { - return elseIfSections.Count > 0; + + public IfElseStatement(Expression condition, Statement trueStatement, Statement falseStatement) + : this(condition) { + this.trueStatement.Add(Statement.CheckNull(trueStatement)); + this.falseStatement.Add(Statement.CheckNull(falseStatement)); + if (trueStatement != null) trueStatement.Parent = this; + if (falseStatement != null) falseStatement.Parent = this; } - } public override object AcceptVisitor(IAstVisitor visitor, object data) { return visitor.VisitIfElseStatement(this, data); @@ -3403,15 +3403,15 @@ public Location ExtendedEndLocation { get; set; } initializer = Expression.Null; } - public bool HasSetRegion { + public bool HasGetRegion { get { - return !setRegion.IsNull; + return !getRegion.IsNull; } } - public bool HasGetRegion { + public bool HasSetRegion { get { - return !getRegion.IsNull; + return !setRegion.IsNull; } } @@ -5281,10 +5281,10 @@ public Location ExtendedEndLocation { get; set; } Usings = usings; } -public UsingDeclaration(string @namespace) : this(@namespace, TypeReference.Null) {} - public UsingDeclaration(string @namespace, TypeReference alias) { usings = new List(1); usings.Add(new Using(@namespace, alias)); } +public UsingDeclaration(string @namespace) : this(@namespace, TypeReference.Null) {} + public UsingDeclaration(string xmlNamespace, string prefix) { usings = new List(1); usings.Add(new Using(xmlNamespace, prefix)); } public override object AcceptVisitor(IAstVisitor visitor, object data) { diff --git a/src/Libraries/NRefactory/Project/Src/IAstVisitor.cs b/src/Libraries/NRefactory/Project/Src/IAstVisitor.cs index a839045661..133bbd01c6 100644 --- a/src/Libraries/NRefactory/Project/Src/IAstVisitor.cs +++ b/src/Libraries/NRefactory/Project/Src/IAstVisitor.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs index e5f855f495..0ae3a3482b 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs @@ -172,7 +172,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp public static BitArray TypeKW = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal); public static BitArray UnaryHead = NewSet(Plus, Minus, Not, BitwiseComplement, Times, Increment, Decrement, BitwiseAnd); public static BitArray AssnStartOp = NewSet(Plus, Minus, Not, BitwiseComplement, Times); - public static BitArray CastFollower = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal, Identifier, Partial, Where, Get, Set, Add, Remove, Yield, Select, Group, By, Into, From, Ascending, Descending, Orderby, Let, Join, On, Equals, Void, Literal, OpenParenthesis, BitwiseComplement, Not, Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From); + public static BitArray CastFollower = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal, Identifier, Partial, Where, Get, Set, Add, Remove, Yield, Select, Group, By, Into, From, Ascending, Descending, Orderby, Let, Join, On, Equals, Void, Literal, OpenParenthesis, BitwiseComplement, Not, Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, Default); public static BitArray AssgnOps = NewSet(Assign, PlusAssign, MinusAssign, TimesAssign, DivAssign, ModAssign, BitwiseAndAssign, BitwiseOrAssign, ShiftLeftAssign); public static BitArray UnaryOp = NewSet(Plus, Minus, Not, BitwiseComplement, Times, Increment, Decrement, BitwiseAnd); public static BitArray TypeDeclarationKW = NewSet(Class, Interface, Struct, Enum, Delegate); @@ -187,7 +187,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp public static BitArray ExpressionContent = NewSet(As, Is, Out, Ref, In); public static BitArray InterfaceLevel = NewSet(Event); public static BitArray TypeLevel = NewSet(Public, Internal, Class, Interface, Struct, Enum, Delegate, Abstract, Sealed, Static, Unsafe, Partial, Protected, Private, Public, Internal, Const, Event, Explicit, Extern, Fixed, Implicit, New, Operator, Override, Readonly, Virtual, Volatile); - public static BitArray StatementStart = NewSet(Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, As, Is, Out, Ref, In, Break, Case, Catch, Checked, Unchecked, Const, Continue, Default, Do, Else, Finally, Fixed, For, Foreach, Goto, If, Lock, Return, Stackalloc, Switch, Throw, Try, Unsafe, Using, While, Yield); + public static BitArray StatementStart = NewSet(Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, Default, As, Is, Out, Ref, In, Break, Case, Catch, Checked, Unchecked, Const, Continue, Default, Do, Else, Finally, Fixed, For, Foreach, Goto, If, Lock, Return, Stackalloc, Switch, Throw, Try, Unsafe, Using, While, Yield); public static BitArray QueryExpressionClauseStart = NewSet(From, Let, Where, Join, Orderby, Group, Select); public static BitArray InPropertyDeclaration = NewSet(Protected, Private, Public, Internal, Get, Set); public static BitArray InEventDeclaration = NewSet(Add, Remove); diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt index 12e86626cd..346ad5bd2f 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/KeywordList.txt @@ -246,9 +246,13 @@ ConcatStringAssign = "&=" "WriteOnly" "Xor" +#XML specific keywords + #Sets Null("Nothing") BlockSucc("Case", "Catch", "Else", "ElseIf", "End", "Finally", "Loop", "Next") +GlobalLevel("Namespace", "Module", "Class", "Structure") +TypeLevel("Sub", "Function", "Property") # List of keywords that are valid identifiers, must be the same as the "Identifier" production in VBNET.ATG IdentifierTokens("Text", "Binary", "Compare", "Assembly", "Ansi", "Auto", "Preserve", "Unicode", "Until", "Off", "Explicit", "Infer", "From", "Join", "Equals", "Distinct", "Where", "Take", "Skip", "Order", "By", "Ascending", "Descending", "Group", "Into", "Aggregate") diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs index a5c97524ff..f8aa16a1ed 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Tokens.cs @@ -245,9 +245,9 @@ namespace ICSharpCode.NRefactory.Parser.VB } public static BitArray Null = NewSet(Nothing); public static BitArray BlockSucc = NewSet(Case, Catch, Else, ElseIf, End, Finally, Loop, Next); + public static BitArray GlobalLevel = NewSet(Namespace, Module, Class, Structure); + public static BitArray TypeLevel = NewSet(Sub, Function, Property); public static BitArray IdentifierTokens = NewSet(Text, Binary, Compare, Assembly, Ansi, Auto, Preserve, Unicode, Until, Off, Explicit, Infer, From, Join, Equals, Distinct, Where, Take, Skip, Order, By, Ascending, Descending, Group, Into, Aggregate); - public static BitArray TypeLevel = NewSet(Public, Friend, Class, Interface, Structure, Enum, Delegate, Shared, Partial, Protected, Private, Public, Const, Event, Explicit, New, Operator); - public static BitArray GlobalLevel = NewSet(Namespace, Imports, Public, Friend, Class, Interface, Structure, Enum, Delegate, Partial); static string[] tokenList = new string[] { // ----- terminal classes ----- diff --git a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs index 930a336d3d..1547241cac 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/Parser.cs @@ -1,5 +1,3 @@ - -#line 1 "cs.ATG" using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; @@ -8,44 +6,40 @@ using ICSharpCode.NRefactory.Parser; using ICSharpCode.NRefactory.Ast; using ASTAttribute = ICSharpCode.NRefactory.Ast.Attribute; using Types = ICSharpCode.NRefactory.Ast.ClassType; -/* - Parser.frame file for NRefactory. - */ + + + using System; -using System.Reflection; namespace ICSharpCode.NRefactory.Parser.CSharp { - partial class Parser : AbstractParser { - const int maxT = 145; + public const int _EOF = 0; + public const int _ident = 1; + public const int _Literal = 2; + public const int maxT = 145; // 0) { INode node; if (aliasedType != null) { @@ -108,46 +82,30 @@ out aliasedType); node.EndLocation = t.EndLocation; compilationUnit.AddChild(node); } - + } void GlobalAttributeSection() { Expect(18); - -#line 213 "cs.ATG" - Location startPos = t.Location; + Location startPos = t.Location; Identifier(); - -#line 214 "cs.ATG" if (t.val != "assembly" && t.val != "module") Error("global attribute target specifier (assembly or module) expected"); string attributeTarget = t.val; List attributes = new List(); ASTAttribute attribute; - + Expect(9); - Attribute( -#line 219 "cs.ATG" -out attribute); - -#line 219 "cs.ATG" - attributes.Add(attribute); - while ( -#line 220 "cs.ATG" -NotFinalComma()) { + Attribute(out attribute); + attributes.Add(attribute); + while (NotFinalComma()) { Expect(14); - Attribute( -#line 220 "cs.ATG" -out attribute); - -#line 220 "cs.ATG" - attributes.Add(attribute); + Attribute(out attribute); + attributes.Add(attribute); } if (la.kind == 14) { - lexer.NextToken(); + Get(); } Expect(19); - -#line 222 "cs.ATG" AttributeSection section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, @@ -155,32 +113,24 @@ out attribute); EndLocation = t.EndLocation }; compilationUnit.AddChild(section); - + } void NamespaceMemberDecl() { - -#line 326 "cs.ATG" AttributeSection section; List attributes = new List(); ModifierList m = new ModifierList(); string qualident; - - if (la.kind == 88) { - lexer.NextToken(); -#line 332 "cs.ATG" - Location startPos = t.Location; - Qualident( -#line 333 "cs.ATG" -out qualident); - -#line 333 "cs.ATG" + if (la.kind == 88) { + Get(); + Location startPos = t.Location; + Qualident(out qualident); INode node = new NamespaceDeclaration(qualident); node.StartLocation = startPos; compilationUnit.AddChild(node); compilationUnit.BlockStart(node); - + Expect(16); while (la.kind == 71) { ExternAliasDirective(); @@ -193,285 +143,203 @@ out qualident); } Expect(17); if (la.kind == 11) { - lexer.NextToken(); + Get(); } - -#line 343 "cs.ATG" node.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - + } else if (StartOf(2)) { while (la.kind == 18) { - AttributeSection( -#line 347 "cs.ATG" -out section); - -#line 347 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } while (StartOf(3)) { - TypeModifier( -#line 348 "cs.ATG" -m); + TypeModifier(m); } - TypeDecl( -#line 349 "cs.ATG" -m, attributes); + TypeDecl(m, attributes); } else SynErr(146); } - void Qualident( -#line 483 "cs.ATG" -out string qualident) { + void Qualident(out string qualident) { Identifier(); - -#line 485 "cs.ATG" - qualidentBuilder.Length = 0; qualidentBuilder.Append(t.val); - while ( -#line 486 "cs.ATG" -DotAndIdent()) { + qualidentBuilder.Length = 0; qualidentBuilder.Append(t.val); + while (DotAndIdent()) { Expect(15); Identifier(); - -#line 486 "cs.ATG" qualidentBuilder.Append('.'); qualidentBuilder.Append(t.val); - - } -#line 489 "cs.ATG" - qualident = qualidentBuilder.ToString(); + } + qualident = qualidentBuilder.ToString(); } - void NonArrayType( -#line 601 "cs.ATG" -out TypeReference type) { - -#line 603 "cs.ATG" + void NonArrayType(out TypeReference type) { Location startPos = la.Location; string name; int pointer = 0; type = null; - + if (StartOf(4)) { - ClassType( -#line 609 "cs.ATG" -out type, false); + ClassType(out type, false); } else if (StartOf(5)) { - SimpleType( -#line 610 "cs.ATG" -out name); - -#line 610 "cs.ATG" - type = new TypeReference(name, true); + SimpleType(out name); + type = new TypeReference(name, true); } else if (la.kind == 123) { - lexer.NextToken(); + Get(); Expect(6); - -#line 611 "cs.ATG" - pointer = 1; type = new TypeReference("System.Void", true); + pointer = 1; type = new TypeReference("System.Void", true); } else SynErr(147); if (la.kind == 12) { - NullableQuestionMark( -#line 614 "cs.ATG" -ref type); + NullableQuestionMark(ref type); } - while ( -#line 616 "cs.ATG" -IsPointer()) { + while (IsPointer()) { Expect(6); - -#line 617 "cs.ATG" - ++pointer; + ++pointer; } - -#line 619 "cs.ATG" if (type != null) { type.PointerNestingLevel = pointer; type.EndLocation = t.EndLocation; type.StartLocation = startPos; } - + } void Identifier() { switch (la.kind) { case 1: { - lexer.NextToken(); + Get(); break; } case 126: { - lexer.NextToken(); + Get(); break; } case 127: { - lexer.NextToken(); + Get(); break; } case 128: { - lexer.NextToken(); + Get(); break; } case 129: { - lexer.NextToken(); + Get(); break; } case 130: { - lexer.NextToken(); + Get(); break; } case 131: { - lexer.NextToken(); + Get(); break; } case 132: { - lexer.NextToken(); + Get(); break; } case 133: { - lexer.NextToken(); + Get(); break; } case 134: { - lexer.NextToken(); + Get(); break; } case 135: { - lexer.NextToken(); + Get(); break; } case 136: { - lexer.NextToken(); + Get(); break; } case 137: { - lexer.NextToken(); + Get(); break; } case 138: { - lexer.NextToken(); + Get(); break; } case 139: { - lexer.NextToken(); + Get(); break; } case 140: { - lexer.NextToken(); + Get(); break; } case 141: { - lexer.NextToken(); + Get(); break; } case 142: { - lexer.NextToken(); + Get(); break; } case 143: { - lexer.NextToken(); + Get(); break; } case 144: { - lexer.NextToken(); + Get(); break; } default: SynErr(148); break; } } - void Attribute( -#line 232 "cs.ATG" -out ASTAttribute attribute) { - -#line 233 "cs.ATG" + void Attribute(out ASTAttribute attribute) { string qualident; string alias = null; - -#line 237 "cs.ATG" - Location startPos = la.Location; - if ( -#line 238 "cs.ATG" -IdentAndDoubleColon()) { + Location startPos = la.Location; + if (IdentAndDoubleColon()) { Identifier(); - -#line 239 "cs.ATG" - alias = t.val; + alias = t.val; Expect(10); } - Qualident( -#line 242 "cs.ATG" -out qualident); - -#line 243 "cs.ATG" + Qualident(out qualident); List positional = new List(); List named = new List(); string name = (alias != null && alias != "global") ? alias + "." + qualident : qualident; - + if (la.kind == 20) { - AttributeArguments( -#line 247 "cs.ATG" -positional, named); + AttributeArguments(positional, named); } - -#line 248 "cs.ATG" attribute = new ASTAttribute(name, positional, named); attribute.StartLocation = startPos; attribute.EndLocation = t.EndLocation; - + } - void AttributeArguments( -#line 254 "cs.ATG" -List positional, List named) { + void AttributeArguments(List positional, List named) { Expect(20); if (StartOf(6)) { - AttributeArgument( -#line 258 "cs.ATG" -positional, named); + AttributeArgument(positional, named); while (la.kind == 14) { - lexer.NextToken(); - AttributeArgument( -#line 261 "cs.ATG" -positional, named); + Get(); + AttributeArgument(positional, named); } } Expect(21); } - void AttributeArgument( -#line 267 "cs.ATG" -List positional, List named) { - -#line 268 "cs.ATG" - string name = null; bool isNamed = false; Expression expr; - if ( -#line 271 "cs.ATG" -IsAssignment()) { - -#line 271 "cs.ATG" - isNamed = true; + void AttributeArgument(List positional, List named) { + string name = null; bool isNamed = false; Expression expr; + if (IsAssignment()) { + isNamed = true; Identifier(); - -#line 272 "cs.ATG" - name = t.val; + name = t.val; Expect(3); - } else if ( -#line 275 "cs.ATG" -IdentAndColon()) { + } else if (IdentAndColon()) { Identifier(); - -#line 276 "cs.ATG" - name = t.val; + name = t.val; Expect(9); } else if (StartOf(6)) { } else SynErr(149); - Expr( -#line 280 "cs.ATG" -out expr); - -#line 282 "cs.ATG" + Expr(out expr); if (expr != null) { if (isNamed) { named.Add(new NamedArgumentExpression(name, expr)); @@ -483,543 +351,335 @@ out expr); positional.Add(expr); } } - - } - - void Expr( -#line 1780 "cs.ATG" -out Expression expr) { -#line 1781 "cs.ATG" - expr = null; Expression expr1 = null, expr2 = null; AssignmentOperatorType op; + } -#line 1783 "cs.ATG" - Location startLocation = la.Location; - UnaryExpr( -#line 1784 "cs.ATG" -out expr); + void Expr(out Expression expr) { + expr = null; Expression expr1 = null, expr2 = null; AssignmentOperatorType op; + Location startLocation = la.Location; + UnaryExpr(out expr); if (StartOf(7)) { - AssignmentOperator( -#line 1787 "cs.ATG" -out op); - Expr( -#line 1787 "cs.ATG" -out expr1); - -#line 1787 "cs.ATG" - expr = new AssignmentExpression(expr, op, expr1); - } else if ( -#line 1788 "cs.ATG" -la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) { - AssignmentOperator( -#line 1789 "cs.ATG" -out op); - Expr( -#line 1789 "cs.ATG" -out expr1); - -#line 1789 "cs.ATG" - expr = new AssignmentExpression(expr, op, expr1); + AssignmentOperator(out op); + Expr(out expr1); + expr = new AssignmentExpression(expr, op, expr1); + } else if (la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) { + AssignmentOperator(out op); + Expr(out expr1); + expr = new AssignmentExpression(expr, op, expr1); } else if (StartOf(8)) { - ConditionalOrExpr( -#line 1791 "cs.ATG" -ref expr); + ConditionalOrExpr(ref expr); if (la.kind == 13) { - lexer.NextToken(); - Expr( -#line 1792 "cs.ATG" -out expr1); - -#line 1792 "cs.ATG" - expr = new BinaryOperatorExpression(expr, BinaryOperatorType.NullCoalescing, expr1); + Get(); + Expr(out expr1); + expr = new BinaryOperatorExpression(expr, BinaryOperatorType.NullCoalescing, expr1); } if (la.kind == 12) { - lexer.NextToken(); - Expr( -#line 1793 "cs.ATG" -out expr1); + Get(); + Expr(out expr1); Expect(9); - Expr( -#line 1793 "cs.ATG" -out expr2); - -#line 1793 "cs.ATG" - expr = new ConditionalExpression(expr, expr1, expr2); + Expr(out expr2); + expr = new ConditionalExpression(expr, expr1, expr2); } } else SynErr(150); - -#line 1796 "cs.ATG" if (expr != null) { if (expr.StartLocation.IsEmpty) expr.StartLocation = startLocation; if (expr.EndLocation.IsEmpty) expr.EndLocation = t.EndLocation; } - - } - void AttributeSection( -#line 296 "cs.ATG" -out AttributeSection section) { + } -#line 298 "cs.ATG" + void AttributeSection(out AttributeSection section) { string attributeTarget = ""; List attributes = new List(); ASTAttribute attribute; - - - Expect(18); -#line 304 "cs.ATG" - Location startPos = t.Location; - if ( -#line 305 "cs.ATG" -IsLocalAttrTarget()) { - if (la.kind == 69) { - lexer.NextToken(); -#line 306 "cs.ATG" + Expect(18); + Location startPos = t.Location; + if (IsLocalAttrTarget()) { + if (la.kind == 69) { + Get(); attributeTarget = "event"; } else if (la.kind == 101) { - lexer.NextToken(); - -#line 307 "cs.ATG" + Get(); attributeTarget = "return"; - } else { + } else if (StartOf(9)) { Identifier(); - -#line 308 "cs.ATG" - attributeTarget = t.val; - } + attributeTarget = t.val; + } else SynErr(151); Expect(9); } - Attribute( -#line 312 "cs.ATG" -out attribute); - -#line 312 "cs.ATG" - attributes.Add(attribute); - while ( -#line 313 "cs.ATG" -NotFinalComma()) { + Attribute(out attribute); + attributes.Add(attribute); + while (NotFinalComma()) { Expect(14); - Attribute( -#line 313 "cs.ATG" -out attribute); - -#line 313 "cs.ATG" - attributes.Add(attribute); + Attribute(out attribute); + attributes.Add(attribute); } if (la.kind == 14) { - lexer.NextToken(); + Get(); } Expect(19); - -#line 315 "cs.ATG" section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, StartLocation = startPos, EndLocation = t.EndLocation }; - + } - void TypeModifier( -#line 686 "cs.ATG" -ModifierList m) { + void TypeModifier(ModifierList m) { switch (la.kind) { case 89: { - lexer.NextToken(); - -#line 688 "cs.ATG" - m.Add(Modifiers.New, t.Location); + Get(); + m.Add(Modifiers.New, t.Location); break; } case 98: { - lexer.NextToken(); - -#line 689 "cs.ATG" - m.Add(Modifiers.Public, t.Location); + Get(); + m.Add(Modifiers.Public, t.Location); break; } case 97: { - lexer.NextToken(); - -#line 690 "cs.ATG" - m.Add(Modifiers.Protected, t.Location); + Get(); + m.Add(Modifiers.Protected, t.Location); break; } case 84: { - lexer.NextToken(); - -#line 691 "cs.ATG" - m.Add(Modifiers.Internal, t.Location); + Get(); + m.Add(Modifiers.Internal, t.Location); break; } case 96: { - lexer.NextToken(); - -#line 692 "cs.ATG" - m.Add(Modifiers.Private, t.Location); + Get(); + m.Add(Modifiers.Private, t.Location); break; } case 119: { - lexer.NextToken(); - -#line 693 "cs.ATG" - m.Add(Modifiers.Unsafe, t.Location); + Get(); + m.Add(Modifiers.Unsafe, t.Location); break; } case 49: { - lexer.NextToken(); - -#line 694 "cs.ATG" - m.Add(Modifiers.Abstract, t.Location); + Get(); + m.Add(Modifiers.Abstract, t.Location); break; } case 103: { - lexer.NextToken(); - -#line 695 "cs.ATG" - m.Add(Modifiers.Sealed, t.Location); + Get(); + m.Add(Modifiers.Sealed, t.Location); break; } case 107: { - lexer.NextToken(); - -#line 696 "cs.ATG" - m.Add(Modifiers.Static, t.Location); + Get(); + m.Add(Modifiers.Static, t.Location); break; } case 126: { - lexer.NextToken(); - -#line 697 "cs.ATG" - m.Add(Modifiers.Partial, t.Location); + Get(); + m.Add(Modifiers.Partial, t.Location); break; } - default: SynErr(151); break; + default: SynErr(152); break; } } - void TypeDecl( -#line 362 "cs.ATG" -ModifierList m, List attributes) { - -#line 364 "cs.ATG" + void TypeDecl(ModifierList m, List attributes) { TypeReference type; List names; List p = new List(); string name; List templates; - - if (la.kind == 59) { -#line 370 "cs.ATG" - m.Check(Modifiers.Classes); - lexer.NextToken(); - -#line 371 "cs.ATG" + if (la.kind == 59) { + m.Check(Modifiers.Classes); + Get(); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); templates = newType.Templates; compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.StartLocation = m.GetDeclarationLocation(t.Location); - + newType.Type = Types.Class; - - Identifier(); -#line 379 "cs.ATG" - newType.Name = t.val; + Identifier(); + newType.Name = t.val; if (la.kind == 23) { - TypeParameterList( -#line 382 "cs.ATG" -templates); + TypeParameterList(templates); } if (la.kind == 9) { - ClassBase( -#line 384 "cs.ATG" -out names); - -#line 384 "cs.ATG" - newType.BaseTypes = names; + ClassBase(out names); + newType.BaseTypes = names; } while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 387 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } - -#line 389 "cs.ATG" - newType.BodyStartLocation = t.EndLocation; + newType.BodyStartLocation = t.EndLocation; Expect(16); ClassBody(); Expect(17); if (la.kind == 11) { - lexer.NextToken(); + Get(); } - -#line 393 "cs.ATG" newType.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - - } else if (StartOf(9)) { -#line 396 "cs.ATG" - m.Check(Modifiers.StructsInterfacesEnumsDelegates); + } else if (StartOf(10)) { + m.Check(Modifiers.StructsInterfacesEnumsDelegates); if (la.kind == 109) { - lexer.NextToken(); - -#line 397 "cs.ATG" + Get(); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); templates = newType.Templates; newType.StartLocation = m.GetDeclarationLocation(t.Location); compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.Type = Types.Struct; - - Identifier(); -#line 404 "cs.ATG" - newType.Name = t.val; + Identifier(); + newType.Name = t.val; if (la.kind == 23) { - TypeParameterList( -#line 407 "cs.ATG" -templates); + TypeParameterList(templates); } if (la.kind == 9) { - StructInterfaces( -#line 409 "cs.ATG" -out names); - -#line 409 "cs.ATG" - newType.BaseTypes = names; + StructInterfaces(out names); + newType.BaseTypes = names; } while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 412 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } - -#line 415 "cs.ATG" - newType.BodyStartLocation = t.EndLocation; + newType.BodyStartLocation = t.EndLocation; StructBody(); if (la.kind == 11) { - lexer.NextToken(); + Get(); } - -#line 417 "cs.ATG" newType.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - - } else if (la.kind == 83) { - lexer.NextToken(); -#line 421 "cs.ATG" + } else if (la.kind == 83) { + Get(); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); templates = newType.Templates; compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.StartLocation = m.GetDeclarationLocation(t.Location); newType.Type = Types.Interface; - - Identifier(); -#line 428 "cs.ATG" - newType.Name = t.val; + Identifier(); + newType.Name = t.val; if (la.kind == 23) { - TypeParameterList( -#line 431 "cs.ATG" -templates); + TypeParameterList(templates); } if (la.kind == 9) { - InterfaceBase( -#line 433 "cs.ATG" -out names); - -#line 433 "cs.ATG" - newType.BaseTypes = names; + InterfaceBase(out names); + newType.BaseTypes = names; } while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 436 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } - -#line 438 "cs.ATG" - newType.BodyStartLocation = t.EndLocation; + newType.BodyStartLocation = t.EndLocation; InterfaceBody(); if (la.kind == 11) { - lexer.NextToken(); + Get(); } - -#line 440 "cs.ATG" newType.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - - } else if (la.kind == 68) { - lexer.NextToken(); -#line 444 "cs.ATG" + } else if (la.kind == 68) { + Get(); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.StartLocation = m.GetDeclarationLocation(t.Location); newType.Type = Types.Enum; - - Identifier(); -#line 450 "cs.ATG" - newType.Name = t.val; + Identifier(); + newType.Name = t.val; if (la.kind == 9) { - lexer.NextToken(); - IntegralType( -#line 451 "cs.ATG" -out name); - -#line 451 "cs.ATG" - newType.BaseTypes.Add(new TypeReference(name, true)); + Get(); + IntegralType(out name); + newType.BaseTypes.Add(new TypeReference(name, true)); } - -#line 453 "cs.ATG" - newType.BodyStartLocation = t.EndLocation; + newType.BodyStartLocation = t.EndLocation; EnumBody(); if (la.kind == 11) { - lexer.NextToken(); + Get(); } - -#line 455 "cs.ATG" newType.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - - } else { - lexer.NextToken(); -#line 459 "cs.ATG" + } else { + Get(); DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes); templates = delegateDeclr.Templates; delegateDeclr.StartLocation = m.GetDeclarationLocation(t.Location); - - if ( -#line 463 "cs.ATG" -NotVoidPointer()) { - Expect(123); - -#line 463 "cs.ATG" - delegateDeclr.ReturnType = new TypeReference("System.Void", true); - } else if (StartOf(10)) { - Type( -#line 464 "cs.ATG" -out type); -#line 464 "cs.ATG" - delegateDeclr.ReturnType = type; - } else SynErr(152); + if (NotVoidPointer()) { + Expect(123); + delegateDeclr.ReturnType = new TypeReference("System.Void", true); + } else if (StartOf(11)) { + Type(out type); + delegateDeclr.ReturnType = type; + } else SynErr(153); Identifier(); - -#line 466 "cs.ATG" - delegateDeclr.Name = t.val; + delegateDeclr.Name = t.val; if (la.kind == 23) { - TypeParameterList( -#line 469 "cs.ATG" -templates); + TypeParameterList(templates); } Expect(20); - if (StartOf(11)) { - FormalParameterList( -#line 471 "cs.ATG" -p); - -#line 471 "cs.ATG" - delegateDeclr.Parameters = p; + if (StartOf(12)) { + FormalParameterList(p); + delegateDeclr.Parameters = p; } Expect(21); while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 475 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } Expect(11); - -#line 477 "cs.ATG" delegateDeclr.EndLocation = t.EndLocation; compilationUnit.AddChild(delegateDeclr); - + } - } else SynErr(153); + } else SynErr(154); } - void TypeParameterList( -#line 2361 "cs.ATG" -List templates) { - -#line 2363 "cs.ATG" + void TypeParameterList(List templates) { TemplateDefinition template; - - Expect(23); - VariantTypeParameter( -#line 2367 "cs.ATG" -out template); -#line 2367 "cs.ATG" - templates.Add(template); + Expect(23); + VariantTypeParameter(out template); + templates.Add(template); while (la.kind == 14) { - lexer.NextToken(); - VariantTypeParameter( -#line 2369 "cs.ATG" -out template); - -#line 2369 "cs.ATG" - templates.Add(template); + Get(); + VariantTypeParameter(out template); + templates.Add(template); } Expect(22); } - void ClassBase( -#line 492 "cs.ATG" -out List names) { - -#line 494 "cs.ATG" + void ClassBase(out List names) { TypeReference typeRef; names = new List(); - - Expect(9); - ClassType( -#line 498 "cs.ATG" -out typeRef, false); -#line 498 "cs.ATG" - if (typeRef != null) { names.Add(typeRef); } + Expect(9); + ClassType(out typeRef, false); + if (typeRef != null) { names.Add(typeRef); } while (la.kind == 14) { - lexer.NextToken(); - TypeName( -#line 499 "cs.ATG" -out typeRef, false); - -#line 499 "cs.ATG" - if (typeRef != null) { names.Add(typeRef); } + Get(); + TypeName(out typeRef, false); + if (typeRef != null) { names.Add(typeRef); } } } - void TypeParameterConstraintsClause( -#line 2389 "cs.ATG" -List templates) { - -#line 2390 "cs.ATG" - string name = ""; TypeReference type; + void TypeParameterConstraintsClause(List templates) { + string name = ""; TypeReference type; Expect(127); Identifier(); - -#line 2393 "cs.ATG" - name = t.val; + name = t.val; Expect(9); - TypeParameterConstraintsClauseBase( -#line 2395 "cs.ATG" -out type); - -#line 2396 "cs.ATG" + TypeParameterConstraintsClauseBase(out type); TemplateDefinition td = null; foreach (TemplateDefinition d in templates) { if (d.Name == name) { @@ -1028,14 +688,10 @@ out type); } } if ( td != null && type != null) { td.Bases.Add(type); } - - while (la.kind == 14) { - lexer.NextToken(); - TypeParameterConstraintsClauseBase( -#line 2405 "cs.ATG" -out type); -#line 2406 "cs.ATG" + while (la.kind == 14) { + Get(); + TypeParameterConstraintsClauseBase(out type); td = null; foreach (TemplateDefinition d in templates) { if (d.Name == name) { @@ -1044,342 +700,208 @@ out type); } } if ( td != null && type != null) { td.Bases.Add(type); } - + } } void ClassBody() { - -#line 503 "cs.ATG" - AttributeSection section; - while (StartOf(12)) { - -#line 505 "cs.ATG" + AttributeSection section; + while (StartOf(13)) { List attributes = new List(); ModifierList m = new ModifierList(); - - while (!(StartOf(13))) {SynErr(154); lexer.NextToken(); } - while (la.kind == 18) { - AttributeSection( -#line 509 "cs.ATG" -out section); -#line 509 "cs.ATG" - attributes.Add(section); + while (!(StartOf(14))) {SynErr(155); Get();} + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } - MemberModifiers( -#line 510 "cs.ATG" -m); - ClassMemberDecl( -#line 511 "cs.ATG" -m, attributes); + MemberModifiers(m); + ClassMemberDecl(m, attributes); } } - void StructInterfaces( -#line 515 "cs.ATG" -out List names) { - -#line 517 "cs.ATG" + void StructInterfaces(out List names) { TypeReference typeRef; names = new List(); - - Expect(9); - TypeName( -#line 521 "cs.ATG" -out typeRef, false); -#line 521 "cs.ATG" - if (typeRef != null) { names.Add(typeRef); } + Expect(9); + TypeName(out typeRef, false); + if (typeRef != null) { names.Add(typeRef); } while (la.kind == 14) { - lexer.NextToken(); - TypeName( -#line 522 "cs.ATG" -out typeRef, false); - -#line 522 "cs.ATG" - if (typeRef != null) { names.Add(typeRef); } + Get(); + TypeName(out typeRef, false); + if (typeRef != null) { names.Add(typeRef); } } } void StructBody() { - -#line 526 "cs.ATG" - AttributeSection section; + AttributeSection section; Expect(16); - while (StartOf(14)) { - -#line 529 "cs.ATG" + while (StartOf(15)) { List attributes = new List(); ModifierList m = new ModifierList(); - - while (la.kind == 18) { - AttributeSection( -#line 532 "cs.ATG" -out section); -#line 532 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } - MemberModifiers( -#line 533 "cs.ATG" -m); - StructMemberDecl( -#line 534 "cs.ATG" -m, attributes); + MemberModifiers(m); + StructMemberDecl(m, attributes); } Expect(17); } - void InterfaceBase( -#line 539 "cs.ATG" -out List names) { - -#line 541 "cs.ATG" + void InterfaceBase(out List names) { TypeReference typeRef; names = new List(); - - Expect(9); - TypeName( -#line 545 "cs.ATG" -out typeRef, false); -#line 545 "cs.ATG" - if (typeRef != null) { names.Add(typeRef); } + Expect(9); + TypeName(out typeRef, false); + if (typeRef != null) { names.Add(typeRef); } while (la.kind == 14) { - lexer.NextToken(); - TypeName( -#line 546 "cs.ATG" -out typeRef, false); - -#line 546 "cs.ATG" - if (typeRef != null) { names.Add(typeRef); } + Get(); + TypeName(out typeRef, false); + if (typeRef != null) { names.Add(typeRef); } } } void InterfaceBody() { Expect(16); - while (StartOf(15)) { - while (!(StartOf(16))) {SynErr(155); lexer.NextToken(); } + while (StartOf(16)) { + while (!(StartOf(17))) {SynErr(156); Get();} InterfaceMemberDecl(); } Expect(17); } - void IntegralType( -#line 708 "cs.ATG" -out string name) { - -#line 708 "cs.ATG" - name = ""; + void IntegralType(out string name) { + name = ""; switch (la.kind) { case 102: { - lexer.NextToken(); - -#line 710 "cs.ATG" - name = "System.SByte"; + Get(); + name = "System.SByte"; break; } case 54: { - lexer.NextToken(); - -#line 711 "cs.ATG" - name = "System.Byte"; + Get(); + name = "System.Byte"; break; } case 104: { - lexer.NextToken(); - -#line 712 "cs.ATG" - name = "System.Int16"; + Get(); + name = "System.Int16"; break; } case 120: { - lexer.NextToken(); - -#line 713 "cs.ATG" - name = "System.UInt16"; + Get(); + name = "System.UInt16"; break; } case 82: { - lexer.NextToken(); - -#line 714 "cs.ATG" - name = "System.Int32"; + Get(); + name = "System.Int32"; break; } case 116: { - lexer.NextToken(); - -#line 715 "cs.ATG" - name = "System.UInt32"; + Get(); + name = "System.UInt32"; break; } case 87: { - lexer.NextToken(); - -#line 716 "cs.ATG" - name = "System.Int64"; + Get(); + name = "System.Int64"; break; } case 117: { - lexer.NextToken(); - -#line 717 "cs.ATG" - name = "System.UInt64"; + Get(); + name = "System.UInt64"; break; } case 57: { - lexer.NextToken(); - -#line 718 "cs.ATG" - name = "System.Char"; + Get(); + name = "System.Char"; break; } - default: SynErr(156); break; + default: SynErr(157); break; } } void EnumBody() { - -#line 555 "cs.ATG" - FieldDeclaration f; + FieldDeclaration f; Expect(16); - if (StartOf(17)) { - EnumMemberDecl( -#line 558 "cs.ATG" -out f); - -#line 558 "cs.ATG" - compilationUnit.AddChild(f); - while ( -#line 559 "cs.ATG" -NotFinalComma()) { + if (StartOf(18)) { + EnumMemberDecl(out f); + compilationUnit.AddChild(f); + while (NotFinalComma()) { Expect(14); - EnumMemberDecl( -#line 560 "cs.ATG" -out f); - -#line 560 "cs.ATG" - compilationUnit.AddChild(f); + EnumMemberDecl(out f); + compilationUnit.AddChild(f); } if (la.kind == 14) { - lexer.NextToken(); + Get(); } } Expect(17); } - void Type( -#line 566 "cs.ATG" -out TypeReference type) { - TypeWithRestriction( -#line 568 "cs.ATG" -out type, true, false); + void Type(out TypeReference type) { + TypeWithRestriction(out type, true, false); } - void FormalParameterList( -#line 638 "cs.ATG" -List parameter) { - -#line 641 "cs.ATG" + void FormalParameterList(List parameter) { ParameterDeclarationExpression p; AttributeSection section; List attributes = new List(); - - while (la.kind == 18) { - AttributeSection( -#line 646 "cs.ATG" -out section); -#line 646 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } - FixedParameter( -#line 647 "cs.ATG" -out p); - -#line 647 "cs.ATG" + FixedParameter(out p); p.Attributes = attributes; parameter.Add(p); - - while (la.kind == 14) { - lexer.NextToken(); -#line 651 "cs.ATG" - attributes = new List(); + while (la.kind == 14) { + Get(); + attributes = new List(); while (la.kind == 18) { - AttributeSection( -#line 652 "cs.ATG" -out section); - -#line 652 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } - FixedParameter( -#line 653 "cs.ATG" -out p); - -#line 653 "cs.ATG" - p.Attributes = attributes; parameter.Add(p); + FixedParameter(out p); + p.Attributes = attributes; parameter.Add(p); } } - void ClassType( -#line 700 "cs.ATG" -out TypeReference typeRef, bool canBeUnbound) { - -#line 701 "cs.ATG" - TypeReference r; typeRef = null; - if (StartOf(18)) { - TypeName( -#line 703 "cs.ATG" -out r, canBeUnbound); - -#line 703 "cs.ATG" - typeRef = r; + void ClassType(out TypeReference typeRef, bool canBeUnbound) { + TypeReference r; typeRef = null; + if (StartOf(9)) { + TypeName(out r, canBeUnbound); + typeRef = r; } else if (la.kind == 91) { - lexer.NextToken(); - -#line 704 "cs.ATG" - typeRef = new TypeReference("System.Object", true); typeRef.StartLocation = t.Location; + Get(); + typeRef = new TypeReference("System.Object", true); typeRef.StartLocation = t.Location; } else if (la.kind == 108) { - lexer.NextToken(); - -#line 705 "cs.ATG" - typeRef = new TypeReference("System.String", true); typeRef.StartLocation = t.Location; - } else SynErr(157); + Get(); + typeRef = new TypeReference("System.String", true); typeRef.StartLocation = t.Location; + } else SynErr(158); } - void TypeName( -#line 2302 "cs.ATG" -out TypeReference typeRef, bool canBeUnbound) { - -#line 2303 "cs.ATG" + void TypeName(out TypeReference typeRef, bool canBeUnbound) { List typeArguments = null; string alias = null; string qualident; Location startLocation = la.Location; - - if ( -#line 2309 "cs.ATG" -IdentAndDoubleColon()) { - Identifier(); -#line 2310 "cs.ATG" - alias = t.val; + if (IdentAndDoubleColon()) { + Identifier(); + alias = t.val; Expect(10); } - Qualident( -#line 2313 "cs.ATG" -out qualident); + Qualident(out qualident); if (la.kind == 23) { - TypeArgumentList( -#line 2314 "cs.ATG" -out typeArguments, canBeUnbound); + TypeArgumentList(out typeArguments, canBeUnbound); } - -#line 2316 "cs.ATG" if (alias == null) { typeRef = new TypeReference(qualident, typeArguments); } else if (alias == "global") { @@ -1388,199 +910,133 @@ out typeArguments, canBeUnbound); } else { typeRef = new TypeReference(alias + "." + qualident, typeArguments); } - - while ( -#line 2325 "cs.ATG" -DotAndIdent()) { - Expect(15); -#line 2326 "cs.ATG" - typeArguments = null; - Qualident( -#line 2327 "cs.ATG" -out qualident); + while (DotAndIdent()) { + Expect(15); + typeArguments = null; + Qualident(out qualident); if (la.kind == 23) { - TypeArgumentList( -#line 2328 "cs.ATG" -out typeArguments, canBeUnbound); + TypeArgumentList(out typeArguments, canBeUnbound); } - -#line 2329 "cs.ATG" - typeRef = new InnerClassTypeReference(typeRef, qualident, typeArguments); + typeRef = new InnerClassTypeReference(typeRef, qualident, typeArguments); } - -#line 2331 "cs.ATG" - typeRef.StartLocation = startLocation; + typeRef.StartLocation = startLocation; } - void MemberModifiers( -#line 721 "cs.ATG" -ModifierList m) { + void MemberModifiers(ModifierList m) { while (StartOf(19)) { switch (la.kind) { case 49: { - lexer.NextToken(); - -#line 724 "cs.ATG" - m.Add(Modifiers.Abstract, t.Location); + Get(); + m.Add(Modifiers.Abstract, t.Location); break; } case 71: { - lexer.NextToken(); - -#line 725 "cs.ATG" - m.Add(Modifiers.Extern, t.Location); + Get(); + m.Add(Modifiers.Extern, t.Location); break; } case 84: { - lexer.NextToken(); - -#line 726 "cs.ATG" - m.Add(Modifiers.Internal, t.Location); + Get(); + m.Add(Modifiers.Internal, t.Location); break; } case 89: { - lexer.NextToken(); - -#line 727 "cs.ATG" - m.Add(Modifiers.New, t.Location); + Get(); + m.Add(Modifiers.New, t.Location); break; } case 94: { - lexer.NextToken(); - -#line 728 "cs.ATG" - m.Add(Modifiers.Override, t.Location); + Get(); + m.Add(Modifiers.Override, t.Location); break; } case 96: { - lexer.NextToken(); - -#line 729 "cs.ATG" - m.Add(Modifiers.Private, t.Location); + Get(); + m.Add(Modifiers.Private, t.Location); break; } case 97: { - lexer.NextToken(); - -#line 730 "cs.ATG" - m.Add(Modifiers.Protected, t.Location); + Get(); + m.Add(Modifiers.Protected, t.Location); break; } case 98: { - lexer.NextToken(); - -#line 731 "cs.ATG" - m.Add(Modifiers.Public, t.Location); + Get(); + m.Add(Modifiers.Public, t.Location); break; } case 99: { - lexer.NextToken(); - -#line 732 "cs.ATG" - m.Add(Modifiers.ReadOnly, t.Location); + Get(); + m.Add(Modifiers.ReadOnly, t.Location); break; } case 103: { - lexer.NextToken(); - -#line 733 "cs.ATG" - m.Add(Modifiers.Sealed, t.Location); + Get(); + m.Add(Modifiers.Sealed, t.Location); break; } case 107: { - lexer.NextToken(); - -#line 734 "cs.ATG" - m.Add(Modifiers.Static, t.Location); + Get(); + m.Add(Modifiers.Static, t.Location); break; } case 74: { - lexer.NextToken(); - -#line 735 "cs.ATG" - m.Add(Modifiers.Fixed, t.Location); + Get(); + m.Add(Modifiers.Fixed, t.Location); break; } case 119: { - lexer.NextToken(); - -#line 736 "cs.ATG" - m.Add(Modifiers.Unsafe, t.Location); + Get(); + m.Add(Modifiers.Unsafe, t.Location); break; } case 122: { - lexer.NextToken(); - -#line 737 "cs.ATG" - m.Add(Modifiers.Virtual, t.Location); + Get(); + m.Add(Modifiers.Virtual, t.Location); break; } case 124: { - lexer.NextToken(); - -#line 738 "cs.ATG" - m.Add(Modifiers.Volatile, t.Location); + Get(); + m.Add(Modifiers.Volatile, t.Location); break; } case 126: { - lexer.NextToken(); - -#line 739 "cs.ATG" - m.Add(Modifiers.Partial, t.Location); + Get(); + m.Add(Modifiers.Partial, t.Location); break; } } } } - void ClassMemberDecl( -#line 1057 "cs.ATG" -ModifierList m, List attributes) { - -#line 1058 "cs.ATG" - Statement stmt = null; + void ClassMemberDecl(ModifierList m, List attributes) { + Statement stmt = null; if (StartOf(20)) { - StructMemberDecl( -#line 1060 "cs.ATG" -m, attributes); + StructMemberDecl(m, attributes); } else if (la.kind == 27) { - -#line 1061 "cs.ATG" - m.Check(Modifiers.Destructors); Location startPos = la.Location; - lexer.NextToken(); + m.Check(Modifiers.Destructors); Location startPos = la.Location; + Get(); Identifier(); - -#line 1062 "cs.ATG" DestructorDeclaration d = new DestructorDeclaration(t.val, m.Modifier, attributes); d.Modifier = m.Modifier; d.StartLocation = m.GetDeclarationLocation(startPos); - + Expect(20); Expect(21); - -#line 1066 "cs.ATG" - d.EndLocation = t.EndLocation; + d.EndLocation = t.EndLocation; if (la.kind == 16) { - Block( -#line 1066 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(158); - -#line 1067 "cs.ATG" + Get(); + } else SynErr(159); d.Body = (BlockStatement)stmt; compilationUnit.AddChild(d); - - } else SynErr(159); - } - void StructMemberDecl( -#line 743 "cs.ATG" -ModifierList m, List attributes) { + } else SynErr(160); + } -#line 745 "cs.ATG" + void StructMemberDecl(ModifierList m, List attributes) { string qualident = null; TypeReference type; Expression expr; @@ -1589,104 +1045,62 @@ ModifierList m, List attributes) { List templates = new List(); TypeReference explicitInterface = null; bool isExtensionMethod = false; - - if (la.kind == 60) { - -#line 755 "cs.ATG" - m.Check(Modifiers.Constants); - lexer.NextToken(); -#line 756 "cs.ATG" - Location startPos = t.Location; - Type( -#line 757 "cs.ATG" -out type); + if (la.kind == 60) { + m.Check(Modifiers.Constants); + Get(); + Location startPos = t.Location; + Type(out type); Identifier(); - -#line 757 "cs.ATG" FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier | Modifiers.Const); fd.StartLocation = m.GetDeclarationLocation(startPos); VariableDeclaration f = new VariableDeclaration(t.val); f.StartLocation = t.Location; f.TypeReference = type; SafeAdd(fd, fd.Fields, f); - - Expect(3); - Expr( -#line 764 "cs.ATG" -out expr); -#line 764 "cs.ATG" - f.Initializer = expr; + Expect(3); + Expr(out expr); + f.Initializer = expr; while (la.kind == 14) { - lexer.NextToken(); + Get(); Identifier(); - -#line 765 "cs.ATG" f = new VariableDeclaration(t.val); f.StartLocation = t.Location; f.TypeReference = type; SafeAdd(fd, fd.Fields, f); - - Expect(3); - Expr( -#line 770 "cs.ATG" -out expr); -#line 770 "cs.ATG" - f.EndLocation = t.EndLocation; f.Initializer = expr; + Expect(3); + Expr(out expr); + f.EndLocation = t.EndLocation; f.Initializer = expr; } Expect(11); - -#line 771 "cs.ATG" - fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd); - } else if ( -#line 775 "cs.ATG" -NotVoidPointer()) { - -#line 775 "cs.ATG" - m.Check(Modifiers.PropertysEventsMethods); + fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd); + } else if (NotVoidPointer()) { + m.Check(Modifiers.PropertysEventsMethods); Expect(123); - -#line 776 "cs.ATG" - Location startPos = t.Location; - if ( -#line 777 "cs.ATG" -IsExplicitInterfaceImplementation()) { - TypeName( -#line 778 "cs.ATG" -out explicitInterface, false); - -#line 779 "cs.ATG" + Location startPos = t.Location; + if (IsExplicitInterfaceImplementation()) { + TypeName(out explicitInterface, false); if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) { qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface); - } - } else if (StartOf(18)) { + } + } else if (StartOf(9)) { Identifier(); - -#line 782 "cs.ATG" - qualident = t.val; - } else SynErr(160); + qualident = t.val; + } else SynErr(161); if (la.kind == 23) { - TypeParameterList( -#line 785 "cs.ATG" -templates); + TypeParameterList(templates); } Expect(20); if (la.kind == 111) { - lexer.NextToken(); - -#line 788 "cs.ATG" - isExtensionMethod = true; /* C# 3.0 */ + Get(); + isExtensionMethod = true; /* C# 3.0 */ } - if (StartOf(11)) { - FormalParameterList( -#line 789 "cs.ATG" -p); + if (StartOf(12)) { + FormalParameterList(p); } Expect(21); - -#line 790 "cs.ATG" MethodDeclaration methodDeclaration = new MethodDeclaration { Name = qualident, Modifier = m.Modifier, @@ -1702,31 +1116,21 @@ p); SafeAdd(methodDeclaration, methodDeclaration.InterfaceImplementations, new InterfaceImplementation(explicitInterface, qualident)); compilationUnit.AddChild(methodDeclaration); compilationUnit.BlockStart(methodDeclaration); - + while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 808 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } if (la.kind == 16) { - Block( -#line 810 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(161); - -#line 810 "cs.ATG" + Get(); + } else SynErr(162); compilationUnit.BlockEnd(); methodDeclaration.Body = (BlockStatement)stmt; - - } else if (la.kind == 69) { -#line 814 "cs.ATG" - m.Check(Modifiers.PropertysEventsMethods); - lexer.NextToken(); - -#line 816 "cs.ATG" + } else if (la.kind == 69) { + m.Check(Modifiers.PropertysEventsMethods); + Get(); EventDeclaration eventDecl = new EventDeclaration { Modifier = m.Modifier, Attributes = attributes, @@ -1736,162 +1140,90 @@ out stmt); compilationUnit.BlockStart(eventDecl); EventAddRegion addBlock = null; EventRemoveRegion removeBlock = null; - - Type( -#line 826 "cs.ATG" -out type); - -#line 826 "cs.ATG" - eventDecl.TypeReference = type; - if ( -#line 827 "cs.ATG" -IsExplicitInterfaceImplementation()) { - TypeName( -#line 828 "cs.ATG" -out explicitInterface, false); - -#line 829 "cs.ATG" - qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface); - -#line 830 "cs.ATG" - eventDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident)); - } else if (StartOf(18)) { - Identifier(); - -#line 832 "cs.ATG" - qualident = t.val; - } else SynErr(162); -#line 834 "cs.ATG" - eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation; + Type(out type); + eventDecl.TypeReference = type; + if (IsExplicitInterfaceImplementation()) { + TypeName(out explicitInterface, false); + qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface); + eventDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident)); + } else if (StartOf(9)) { + Identifier(); + qualident = t.val; + } else SynErr(163); + eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation; if (la.kind == 3) { - lexer.NextToken(); - Expr( -#line 835 "cs.ATG" -out expr); - -#line 835 "cs.ATG" - eventDecl.Initializer = expr; + Get(); + Expr(out expr); + eventDecl.Initializer = expr; } if (la.kind == 16) { - lexer.NextToken(); - -#line 836 "cs.ATG" - eventDecl.BodyStart = t.Location; - EventAccessorDecls( -#line 837 "cs.ATG" -out addBlock, out removeBlock); + Get(); + eventDecl.BodyStart = t.Location; + EventAccessorDecls(out addBlock, out removeBlock); Expect(17); - -#line 838 "cs.ATG" - eventDecl.BodyEnd = t.EndLocation; + eventDecl.BodyEnd = t.EndLocation; } if (la.kind == 11) { - lexer.NextToken(); + Get(); } - -#line 841 "cs.ATG" compilationUnit.BlockEnd(); eventDecl.AddRegion = addBlock; eventDecl.RemoveRegion = removeBlock; - - } else if ( -#line 847 "cs.ATG" -IdentAndLPar()) { -#line 847 "cs.ATG" - m.Check(Modifiers.Constructors | Modifiers.StaticConstructors); + } else if (IdentAndLPar()) { + m.Check(Modifiers.Constructors | Modifiers.StaticConstructors); Identifier(); - -#line 848 "cs.ATG" - string name = t.val; Location startPos = t.Location; + string name = t.val; Location startPos = t.Location; Expect(20); - if (StartOf(11)) { - -#line 848 "cs.ATG" - m.Check(Modifiers.Constructors); - FormalParameterList( -#line 849 "cs.ATG" -p); + if (StartOf(12)) { + m.Check(Modifiers.Constructors); + FormalParameterList(p); } Expect(21); - -#line 851 "cs.ATG" - ConstructorInitializer init = null; + ConstructorInitializer init = null; if (la.kind == 9) { - -#line 852 "cs.ATG" - m.Check(Modifiers.Constructors); - ConstructorInitializer( -#line 853 "cs.ATG" -out init); + m.Check(Modifiers.Constructors); + ConstructorInitializer(out init); } - -#line 855 "cs.ATG" ConstructorDeclaration cd = new ConstructorDeclaration(name, m.Modifier, p, init, attributes); cd.StartLocation = startPos; cd.EndLocation = t.EndLocation; - + if (la.kind == 16) { - Block( -#line 860 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(163); - -#line 860 "cs.ATG" - cd.Body = (BlockStatement)stmt; compilationUnit.AddChild(cd); + Get(); + } else SynErr(164); + cd.Body = (BlockStatement)stmt; compilationUnit.AddChild(cd); } else if (la.kind == 70 || la.kind == 80) { - -#line 863 "cs.ATG" m.Check(Modifiers.Operators); if (m.isNone) Error("at least one modifier must be set"); bool isImplicit = true; Location startPos = Location.Empty; - - if (la.kind == 80) { - lexer.NextToken(); -#line 868 "cs.ATG" - startPos = t.Location; + if (la.kind == 80) { + Get(); + startPos = t.Location; } else { - lexer.NextToken(); - -#line 868 "cs.ATG" - isImplicit = false; startPos = t.Location; + Get(); + isImplicit = false; startPos = t.Location; } Expect(92); - Type( -#line 869 "cs.ATG" -out type); - -#line 869 "cs.ATG" - TypeReference operatorType = type; + Type(out type); + TypeReference operatorType = type; Expect(20); - Type( -#line 870 "cs.ATG" -out type); + Type(out type); Identifier(); - -#line 870 "cs.ATG" - string varName = t.val; + string varName = t.val; Expect(21); - -#line 871 "cs.ATG" - Location endPos = t.Location; + Location endPos = t.Location; if (la.kind == 16) { - Block( -#line 872 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - -#line 872 "cs.ATG" - stmt = null; - } else SynErr(164); - -#line 875 "cs.ATG" + Get(); + stmt = null; + } else SynErr(165); List parameters = new List(); parameters.Add(new ParameterDeclarationExpression(type, varName)); OperatorDeclaration operatorDeclaration = new OperatorDeclaration { @@ -1906,64 +1238,38 @@ out stmt); EndLocation = endPos }; compilationUnit.AddChild(operatorDeclaration); - - } else if (StartOf(21)) { - TypeDecl( -#line 893 "cs.ATG" -m, attributes); - } else if (StartOf(10)) { - Type( -#line 895 "cs.ATG" -out type); -#line 895 "cs.ATG" - Location startPos = t.Location; + } else if (StartOf(21)) { + TypeDecl(m, attributes); + } else if (StartOf(11)) { + Type(out type); + Location startPos = t.Location; if (la.kind == 92) { - -#line 897 "cs.ATG" OverloadableOperatorType op; m.Check(Modifiers.Operators); if (m.isNone) Error("at least one modifier must be set"); - - lexer.NextToken(); - OverloadableOperator( -#line 901 "cs.ATG" -out op); - -#line 901 "cs.ATG" - TypeReference firstType, secondType = null; string secondName = null; + + Get(); + OverloadableOperator(out op); + TypeReference firstType, secondType = null; string secondName = null; Expect(20); - Type( -#line 902 "cs.ATG" -out firstType); + Type(out firstType); Identifier(); - -#line 902 "cs.ATG" - string firstName = t.val; + string firstName = t.val; if (la.kind == 14) { - lexer.NextToken(); - Type( -#line 903 "cs.ATG" -out secondType); + Get(); + Type(out secondType); Identifier(); - -#line 903 "cs.ATG" - secondName = t.val; + secondName = t.val; } else if (la.kind == 21) { - } else SynErr(165); - -#line 911 "cs.ATG" - Location endPos = t.Location; + } else SynErr(166); + Location endPos = t.Location; Expect(21); if (la.kind == 16) { - Block( -#line 912 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(166); - -#line 914 "cs.ATG" + Get(); + } else SynErr(167); if (op == OverloadableOperatorType.Add && secondType == null) op = OverloadableOperatorType.UnaryPlus; if (op == OverloadableOperatorType.Subtract && secondType == null) @@ -1983,77 +1289,45 @@ out stmt); SafeAdd(operatorDeclaration, operatorDeclaration.Parameters, new ParameterDeclarationExpression(secondType, secondName)); } compilationUnit.AddChild(operatorDeclaration); - - } else if ( -#line 936 "cs.ATG" -IsVarDecl()) { -#line 937 "cs.ATG" + } else if (IsVarDecl()) { m.Check(Modifiers.Fields); FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier); fd.StartLocation = m.GetDeclarationLocation(startPos); - - if ( -#line 941 "cs.ATG" -m.Contains(Modifiers.Fixed)) { - VariableDeclarator( -#line 942 "cs.ATG" -fd); - Expect(18); - Expr( -#line 944 "cs.ATG" -out expr); -#line 944 "cs.ATG" + if (m.Contains(Modifiers.Fixed)) { + VariableDeclarator(fd); + Expect(18); + Expr(out expr); if (fd.Fields.Count > 0) - fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr; + fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr; Expect(19); while (la.kind == 14) { - lexer.NextToken(); - VariableDeclarator( -#line 948 "cs.ATG" -fd); + Get(); + VariableDeclarator(fd); Expect(18); - Expr( -#line 950 "cs.ATG" -out expr); - -#line 950 "cs.ATG" + Expr(out expr); if (fd.Fields.Count > 0) - fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr; + fd.Fields[fd.Fields.Count-1].FixedArrayInitialization = expr; Expect(19); } - } else if (StartOf(18)) { - VariableDeclarator( -#line 955 "cs.ATG" -fd); + } else if (StartOf(9)) { + VariableDeclarator(fd); while (la.kind == 14) { - lexer.NextToken(); - VariableDeclarator( -#line 956 "cs.ATG" -fd); + Get(); + VariableDeclarator(fd); } - } else SynErr(167); + } else SynErr(168); Expect(11); - -#line 958 "cs.ATG" - fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd); + fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd); } else if (la.kind == 111) { - -#line 961 "cs.ATG" - m.Check(Modifiers.Indexers); - lexer.NextToken(); + m.Check(Modifiers.Indexers); + Get(); Expect(18); - FormalParameterList( -#line 962 "cs.ATG" -p); + FormalParameterList(p); Expect(19); - -#line 962 "cs.ATG" - Location endLocation = t.EndLocation; + Location endLocation = t.EndLocation; Expect(16); - -#line 963 "cs.ATG" PropertyDeclaration indexer = new PropertyDeclaration(m.Modifier | Modifiers.Default, attributes, "Item", p); indexer.StartLocation = startPos; indexer.EndLocation = endLocation; @@ -2061,66 +1335,40 @@ p); indexer.TypeReference = type; PropertyGetRegion getRegion; PropertySetRegion setRegion; - - AccessorDecls( -#line 971 "cs.ATG" -out getRegion, out setRegion); - Expect(17); -#line 972 "cs.ATG" + AccessorDecls(out getRegion, out setRegion); + Expect(17); indexer.BodyEnd = t.EndLocation; indexer.GetRegion = getRegion; indexer.SetRegion = setRegion; compilationUnit.AddChild(indexer); - - } else if ( -#line 977 "cs.ATG" -IsIdentifierToken(la)) { - if ( -#line 978 "cs.ATG" -IsExplicitInterfaceImplementation()) { - TypeName( -#line 979 "cs.ATG" -out explicitInterface, false); - -#line 980 "cs.ATG" + + } else if (IsIdentifierToken(la)) { + if (IsExplicitInterfaceImplementation()) { + TypeName(out explicitInterface, false); if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) { qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface); - } - } else if (StartOf(18)) { + } + } else if (StartOf(9)) { Identifier(); - -#line 983 "cs.ATG" - qualident = t.val; - } else SynErr(168); - -#line 985 "cs.ATG" - Location qualIdentEndLocation = t.EndLocation; + qualident = t.val; + } else SynErr(169); + Location qualIdentEndLocation = t.EndLocation; if (la.kind == 16 || la.kind == 20 || la.kind == 23) { if (la.kind == 20 || la.kind == 23) { - -#line 989 "cs.ATG" - m.Check(Modifiers.PropertysEventsMethods); + m.Check(Modifiers.PropertysEventsMethods); if (la.kind == 23) { - TypeParameterList( -#line 991 "cs.ATG" -templates); + TypeParameterList(templates); } Expect(20); if (la.kind == 111) { - lexer.NextToken(); - -#line 993 "cs.ATG" - isExtensionMethod = true; + Get(); + isExtensionMethod = true; } - if (StartOf(11)) { - FormalParameterList( -#line 994 "cs.ATG" -p); + if (StartOf(12)) { + FormalParameterList(p); } Expect(21); - -#line 996 "cs.ATG" MethodDeclaration methodDeclaration = new MethodDeclaration { Name = qualident, Modifier = m.Modifier, @@ -2135,26 +1383,18 @@ p); methodDeclaration.IsExtensionMethod = isExtensionMethod; methodDeclaration.Templates = templates; compilationUnit.AddChild(methodDeclaration); - + while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 1011 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } if (la.kind == 16) { - Block( -#line 1012 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(169); - -#line 1012 "cs.ATG" - methodDeclaration.Body = (BlockStatement)stmt; + Get(); + } else SynErr(170); + methodDeclaration.Body = (BlockStatement)stmt; } else { - lexer.NextToken(); - -#line 1015 "cs.ATG" + Get(); PropertyDeclaration pDecl = new PropertyDeclaration(qualident, type, m.Modifier, attributes); if (explicitInterface != null) pDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident)); @@ -2163,32 +1403,22 @@ out stmt); pDecl.BodyStart = t.Location; PropertyGetRegion getRegion; PropertySetRegion setRegion; - - AccessorDecls( -#line 1024 "cs.ATG" -out getRegion, out setRegion); + + AccessorDecls(out getRegion, out setRegion); Expect(17); - -#line 1026 "cs.ATG" pDecl.GetRegion = getRegion; pDecl.SetRegion = setRegion; pDecl.BodyEnd = t.EndLocation; compilationUnit.AddChild(pDecl); - + } } else if (la.kind == 15) { - -#line 1034 "cs.ATG" - m.Check(Modifiers.Indexers); - lexer.NextToken(); + m.Check(Modifiers.Indexers); + Get(); Expect(111); Expect(18); - FormalParameterList( -#line 1035 "cs.ATG" -p); + FormalParameterList(p); Expect(19); - -#line 1036 "cs.ATG" PropertyDeclaration indexer = new PropertyDeclaration(m.Modifier | Modifiers.Default, attributes, "Item", p); indexer.StartLocation = m.GetDeclarationLocation(startPos); indexer.EndLocation = t.EndLocation; @@ -2197,33 +1427,25 @@ p); SafeAdd(indexer, indexer.InterfaceImplementations, new InterfaceImplementation(explicitInterface, "this")); PropertyGetRegion getRegion; PropertySetRegion setRegion; - + Expect(16); - -#line 1045 "cs.ATG" - Location bodyStart = t.Location; - AccessorDecls( -#line 1046 "cs.ATG" -out getRegion, out setRegion); + Location bodyStart = t.Location; + AccessorDecls(out getRegion, out setRegion); Expect(17); - -#line 1047 "cs.ATG" indexer.BodyStart = bodyStart; indexer.BodyEnd = t.EndLocation; indexer.GetRegion = getRegion; indexer.SetRegion = setRegion; compilationUnit.AddChild(indexer); - - } else SynErr(170); - } else SynErr(171); - } else SynErr(172); + + } else SynErr(171); + } else SynErr(172); + } else SynErr(173); } void InterfaceMemberDecl() { - -#line 1074 "cs.ATG" TypeReference type; - + AttributeSection section; Modifiers mod = Modifiers.None; List attributes = new List(); @@ -2233,1662 +1455,968 @@ out getRegion, out setRegion); PropertySetRegion setBlock; Location startLocation = new Location(-1, -1); List templates = new List(); - - while (la.kind == 18) { - AttributeSection( -#line 1087 "cs.ATG" -out section); -#line 1087 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } if (la.kind == 89) { - lexer.NextToken(); - -#line 1088 "cs.ATG" - mod = Modifiers.New; startLocation = t.Location; + Get(); + mod = Modifiers.New; startLocation = t.Location; } - if ( -#line 1091 "cs.ATG" -NotVoidPointer()) { + if (NotVoidPointer()) { Expect(123); - -#line 1091 "cs.ATG" - if (startLocation.IsEmpty) startLocation = t.Location; + if (startLocation.IsEmpty) startLocation = t.Location; Identifier(); - -#line 1092 "cs.ATG" - name = t.val; + name = t.val; if (la.kind == 23) { - TypeParameterList( -#line 1093 "cs.ATG" -templates); + TypeParameterList(templates); } Expect(20); - if (StartOf(11)) { - FormalParameterList( -#line 1094 "cs.ATG" -parameters); + if (StartOf(12)) { + FormalParameterList(parameters); } Expect(21); while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 1095 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } Expect(11); - -#line 1097 "cs.ATG" MethodDeclaration md = new MethodDeclaration { Name = name, Modifier = mod, TypeReference = new TypeReference("System.Void", true), Parameters = parameters, Attributes = attributes, Templates = templates, StartLocation = startLocation, EndLocation = t.EndLocation }; compilationUnit.AddChild(md); - + } else if (StartOf(22)) { - if (StartOf(10)) { - Type( -#line 1105 "cs.ATG" -out type); - -#line 1105 "cs.ATG" - if (startLocation.IsEmpty) startLocation = t.Location; - if (StartOf(18)) { + if (StartOf(11)) { + Type(out type); + if (startLocation.IsEmpty) startLocation = t.Location; + if (StartOf(9)) { Identifier(); - -#line 1107 "cs.ATG" - name = t.val; Location qualIdentEndLocation = t.EndLocation; + name = t.val; Location qualIdentEndLocation = t.EndLocation; if (la.kind == 20 || la.kind == 23) { if (la.kind == 23) { - TypeParameterList( -#line 1111 "cs.ATG" -templates); + TypeParameterList(templates); } Expect(20); - if (StartOf(11)) { - FormalParameterList( -#line 1112 "cs.ATG" -parameters); + if (StartOf(12)) { + FormalParameterList(parameters); } Expect(21); while (la.kind == 127) { - TypeParameterConstraintsClause( -#line 1114 "cs.ATG" -templates); + TypeParameterConstraintsClause(templates); } Expect(11); - -#line 1115 "cs.ATG" MethodDeclaration md = new MethodDeclaration { Name = name, Modifier = mod, TypeReference = type, Parameters = parameters, Attributes = attributes, Templates = templates, StartLocation = startLocation, EndLocation = t.EndLocation }; compilationUnit.AddChild(md); - - } else if (la.kind == 16) { -#line 1124 "cs.ATG" + } else if (la.kind == 16) { PropertyDeclaration pd = new PropertyDeclaration(name, type, mod, attributes); - compilationUnit.AddChild(pd); - lexer.NextToken(); - -#line 1127 "cs.ATG" + compilationUnit.AddChild(pd); + Get(); Location bodyStart = t.Location; - InterfaceAccessors( -#line 1128 "cs.ATG" -out getBlock, out setBlock); + InterfaceAccessors(out getBlock, out setBlock); Expect(17); - -#line 1129 "cs.ATG" - pd.GetRegion = getBlock; pd.SetRegion = setBlock; pd.StartLocation = startLocation; pd.EndLocation = qualIdentEndLocation; pd.BodyStart = bodyStart; pd.BodyEnd = t.EndLocation; - } else SynErr(173); + pd.GetRegion = getBlock; pd.SetRegion = setBlock; pd.StartLocation = startLocation; pd.EndLocation = qualIdentEndLocation; pd.BodyStart = bodyStart; pd.BodyEnd = t.EndLocation; + } else SynErr(174); } else if (la.kind == 111) { - lexer.NextToken(); + Get(); Expect(18); - FormalParameterList( -#line 1132 "cs.ATG" -parameters); + FormalParameterList(parameters); Expect(19); - -#line 1133 "cs.ATG" - Location bracketEndLocation = t.EndLocation; - -#line 1134 "cs.ATG" + Location bracketEndLocation = t.EndLocation; PropertyDeclaration id = new PropertyDeclaration(mod | Modifiers.Default, attributes, "Item", parameters); id.TypeReference = type; - compilationUnit.AddChild(id); + compilationUnit.AddChild(id); Expect(16); - -#line 1137 "cs.ATG" Location bodyStart = t.Location; - InterfaceAccessors( -#line 1138 "cs.ATG" -out getBlock, out setBlock); + InterfaceAccessors(out getBlock, out setBlock); Expect(17); - -#line 1140 "cs.ATG" id.GetRegion = getBlock; id.SetRegion = setBlock; id.StartLocation = startLocation; id.EndLocation = bracketEndLocation; id.BodyStart = bodyStart; id.BodyEnd = t.EndLocation; - } else SynErr(174); + } else SynErr(175); } else { - lexer.NextToken(); - -#line 1143 "cs.ATG" - if (startLocation.IsEmpty) startLocation = t.Location; - Type( -#line 1144 "cs.ATG" -out type); + Get(); + if (startLocation.IsEmpty) startLocation = t.Location; + Type(out type); Identifier(); - -#line 1145 "cs.ATG" EventDeclaration ed = new EventDeclaration { TypeReference = type, Name = t.val, Modifier = mod, Attributes = attributes }; compilationUnit.AddChild(ed); - - Expect(11); -#line 1151 "cs.ATG" - ed.StartLocation = startLocation; ed.EndLocation = t.EndLocation; + Expect(11); + ed.StartLocation = startLocation; ed.EndLocation = t.EndLocation; } - } else SynErr(175); + } else SynErr(176); } - void EnumMemberDecl( -#line 1156 "cs.ATG" -out FieldDeclaration f) { - -#line 1158 "cs.ATG" + void EnumMemberDecl(out FieldDeclaration f) { Expression expr = null; List attributes = new List(); AttributeSection section = null; VariableDeclaration varDecl = null; - - while (la.kind == 18) { - AttributeSection( -#line 1164 "cs.ATG" -out section); -#line 1164 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } Identifier(); - -#line 1165 "cs.ATG" f = new FieldDeclaration(attributes); varDecl = new VariableDeclaration(t.val); f.Fields.Add(varDecl); f.StartLocation = t.Location; f.EndLocation = t.EndLocation; - - if (la.kind == 3) { - lexer.NextToken(); - Expr( -#line 1171 "cs.ATG" -out expr); -#line 1171 "cs.ATG" - varDecl.Initializer = expr; + if (la.kind == 3) { + Get(); + Expr(out expr); + varDecl.Initializer = expr; } } - void TypeWithRestriction( -#line 571 "cs.ATG" -out TypeReference type, bool allowNullable, bool canBeUnbound) { - -#line 573 "cs.ATG" + void TypeWithRestriction(out TypeReference type, bool allowNullable, bool canBeUnbound) { Location startPos = la.Location; string name; int pointer = 0; type = null; - + if (StartOf(4)) { - ClassType( -#line 579 "cs.ATG" -out type, canBeUnbound); + ClassType(out type, canBeUnbound); } else if (StartOf(5)) { - SimpleType( -#line 580 "cs.ATG" -out name); - -#line 580 "cs.ATG" - type = new TypeReference(name, true); + SimpleType(out name); + type = new TypeReference(name, true); } else if (la.kind == 123) { - lexer.NextToken(); + Get(); Expect(6); - -#line 581 "cs.ATG" - pointer = 1; type = new TypeReference("System.Void", true); - } else SynErr(176); - -#line 582 "cs.ATG" - List r = new List(); - if ( -#line 584 "cs.ATG" -allowNullable && la.kind == Tokens.Question) { - NullableQuestionMark( -#line 584 "cs.ATG" -ref type); - } - while ( -#line 586 "cs.ATG" -IsPointerOrDims()) { - -#line 586 "cs.ATG" - int i = 0; + pointer = 1; type = new TypeReference("System.Void", true); + } else SynErr(177); + List r = new List(); + if (allowNullable && la.kind == Tokens.Question) { + NullableQuestionMark(ref type); + } + while (IsPointerOrDims()) { + int i = 0; if (la.kind == 6) { - lexer.NextToken(); - -#line 587 "cs.ATG" - ++pointer; + Get(); + ++pointer; } else if (la.kind == 18) { - lexer.NextToken(); + Get(); while (la.kind == 14) { - lexer.NextToken(); - -#line 588 "cs.ATG" - ++i; + Get(); + ++i; } Expect(19); - -#line 588 "cs.ATG" - r.Add(i); - } else SynErr(177); + r.Add(i); + } else SynErr(178); } - -#line 591 "cs.ATG" if (type != null) { type.RankSpecifier = r.ToArray(); type.PointerNestingLevel = pointer; type.EndLocation = t.EndLocation; type.StartLocation = startPos; } - - } - void SimpleType( -#line 627 "cs.ATG" -out string name) { + } -#line 628 "cs.ATG" - name = String.Empty; + void SimpleType(out string name) { + name = String.Empty; if (StartOf(23)) { - IntegralType( -#line 630 "cs.ATG" -out name); + IntegralType(out name); } else if (la.kind == 75) { - lexer.NextToken(); - -#line 631 "cs.ATG" - name = "System.Single"; + Get(); + name = "System.Single"; } else if (la.kind == 66) { - lexer.NextToken(); - -#line 632 "cs.ATG" - name = "System.Double"; + Get(); + name = "System.Double"; } else if (la.kind == 62) { - lexer.NextToken(); - -#line 633 "cs.ATG" - name = "System.Decimal"; + Get(); + name = "System.Decimal"; } else if (la.kind == 52) { - lexer.NextToken(); - -#line 634 "cs.ATG" - name = "System.Boolean"; - } else SynErr(178); + Get(); + name = "System.Boolean"; + } else SynErr(179); } - void NullableQuestionMark( -#line 2335 "cs.ATG" -ref TypeReference typeRef) { - -#line 2336 "cs.ATG" - List typeArguments = new List(1); + void NullableQuestionMark(ref TypeReference typeRef) { + List typeArguments = new List(1); Expect(12); - -#line 2340 "cs.ATG" if (typeRef != null) typeArguments.Add(typeRef); typeRef = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; - - } - void FixedParameter( -#line 657 "cs.ATG" -out ParameterDeclarationExpression p) { + } -#line 659 "cs.ATG" + void FixedParameter(out ParameterDeclarationExpression p) { TypeReference type; ParameterModifiers mod = ParameterModifiers.In; Location start = la.Location; Expression expr; - + if (la.kind == 93 || la.kind == 95 || la.kind == 100) { if (la.kind == 100) { - lexer.NextToken(); - -#line 666 "cs.ATG" - mod = ParameterModifiers.Ref; + Get(); + mod = ParameterModifiers.Ref; } else if (la.kind == 93) { - lexer.NextToken(); - -#line 667 "cs.ATG" - mod = ParameterModifiers.Out; + Get(); + mod = ParameterModifiers.Out; } else { - lexer.NextToken(); - -#line 668 "cs.ATG" - mod = ParameterModifiers.Params; + Get(); + mod = ParameterModifiers.Params; } } - Type( -#line 670 "cs.ATG" -out type); + Type(out type); Identifier(); - -#line 671 "cs.ATG" - p = new ParameterDeclarationExpression(type, t.val, mod); + p = new ParameterDeclarationExpression(type, t.val, mod); if (la.kind == 3) { - lexer.NextToken(); - Expr( -#line 672 "cs.ATG" -out expr); - -#line 672 "cs.ATG" - p.DefaultValue = expr; p.ParamModifier |= ParameterModifiers.Optional; + Get(); + Expr(out expr); + p.DefaultValue = expr; p.ParamModifier |= ParameterModifiers.Optional; } - -#line 673 "cs.ATG" - p.StartLocation = start; p.EndLocation = t.EndLocation; + p.StartLocation = start; p.EndLocation = t.EndLocation; } - void AccessorModifiers( -#line 676 "cs.ATG" -out ModifierList m) { - -#line 677 "cs.ATG" - m = new ModifierList(); + void AccessorModifiers(out ModifierList m) { + m = new ModifierList(); if (la.kind == 96) { - lexer.NextToken(); - -#line 679 "cs.ATG" - m.Add(Modifiers.Private, t.Location); + Get(); + m.Add(Modifiers.Private, t.Location); } else if (la.kind == 97) { - lexer.NextToken(); - -#line 680 "cs.ATG" - m.Add(Modifiers.Protected, t.Location); + Get(); + m.Add(Modifiers.Protected, t.Location); if (la.kind == 84) { - lexer.NextToken(); - -#line 681 "cs.ATG" - m.Add(Modifiers.Internal, t.Location); + Get(); + m.Add(Modifiers.Internal, t.Location); } } else if (la.kind == 84) { - lexer.NextToken(); - -#line 682 "cs.ATG" - m.Add(Modifiers.Internal, t.Location); + Get(); + m.Add(Modifiers.Internal, t.Location); if (la.kind == 97) { - lexer.NextToken(); - -#line 683 "cs.ATG" - m.Add(Modifiers.Protected, t.Location); + Get(); + m.Add(Modifiers.Protected, t.Location); } - } else SynErr(179); + } else SynErr(180); } - void Block( -#line 1291 "cs.ATG" -out Statement stmt) { + void Block(out Statement stmt) { Expect(16); - -#line 1293 "cs.ATG" BlockStatement blockStmt = new BlockStatement(); blockStmt.StartLocation = t.Location; compilationUnit.BlockStart(blockStmt); if (!ParseMethodBodies) lexer.SkipCurrentBlock(0); - + while (StartOf(24)) { Statement(); } - while (!(la.kind == 0 || la.kind == 17)) {SynErr(180); lexer.NextToken(); } + while (!(la.kind == 0 || la.kind == 17)) {SynErr(181); Get();} Expect(17); - -#line 1301 "cs.ATG" stmt = blockStmt; blockStmt.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - - } - void EventAccessorDecls( -#line 1228 "cs.ATG" -out EventAddRegion addBlock, out EventRemoveRegion removeBlock) { + } -#line 1229 "cs.ATG" + void EventAccessorDecls(out EventAddRegion addBlock, out EventRemoveRegion removeBlock) { AttributeSection section; List attributes = new List(); Statement stmt; addBlock = null; removeBlock = null; - - while (la.kind == 18) { - AttributeSection( -#line 1236 "cs.ATG" -out section); -#line 1236 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } if (la.kind == 130) { - -#line 1238 "cs.ATG" - addBlock = new EventAddRegion(attributes); - AddAccessorDecl( -#line 1239 "cs.ATG" -out stmt); - -#line 1239 "cs.ATG" - attributes = new List(); addBlock.Block = (BlockStatement)stmt; + addBlock = new EventAddRegion(attributes); + AddAccessorDecl(out stmt); + attributes = new List(); addBlock.Block = (BlockStatement)stmt; while (la.kind == 18) { - AttributeSection( -#line 1240 "cs.ATG" -out section); - -#line 1240 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } - RemoveAccessorDecl( -#line 1241 "cs.ATG" -out stmt); - -#line 1241 "cs.ATG" - removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; + RemoveAccessorDecl(out stmt); + removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; } else if (la.kind == 131) { - RemoveAccessorDecl( -#line 1243 "cs.ATG" -out stmt); - -#line 1243 "cs.ATG" - removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new List(); + RemoveAccessorDecl(out stmt); + removeBlock = new EventRemoveRegion(attributes); removeBlock.Block = (BlockStatement)stmt; attributes = new List(); while (la.kind == 18) { - AttributeSection( -#line 1244 "cs.ATG" -out section); - -#line 1244 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } - AddAccessorDecl( -#line 1245 "cs.ATG" -out stmt); - -#line 1245 "cs.ATG" - addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt; - } else SynErr(181); + AddAccessorDecl(out stmt); + addBlock = new EventAddRegion(attributes); addBlock.Block = (BlockStatement)stmt; + } else SynErr(182); } - void ConstructorInitializer( -#line 1321 "cs.ATG" -out ConstructorInitializer ci) { - -#line 1322 "cs.ATG" - Expression expr; ci = new ConstructorInitializer(); + void ConstructorInitializer(out ConstructorInitializer ci) { + Expression expr; ci = new ConstructorInitializer(); Expect(9); if (la.kind == 51) { - lexer.NextToken(); - -#line 1326 "cs.ATG" - ci.ConstructorInitializerType = ConstructorInitializerType.Base; + Get(); + ci.ConstructorInitializerType = ConstructorInitializerType.Base; } else if (la.kind == 111) { - lexer.NextToken(); - -#line 1327 "cs.ATG" - ci.ConstructorInitializerType = ConstructorInitializerType.This; - } else SynErr(182); + Get(); + ci.ConstructorInitializerType = ConstructorInitializerType.This; + } else SynErr(183); Expect(20); if (StartOf(25)) { - Argument( -#line 1330 "cs.ATG" -out expr); - -#line 1330 "cs.ATG" - SafeAdd(ci, ci.Arguments, expr); + Argument(out expr); + SafeAdd(ci, ci.Arguments, expr); while (la.kind == 14) { - lexer.NextToken(); - Argument( -#line 1331 "cs.ATG" -out expr); - -#line 1331 "cs.ATG" - SafeAdd(ci, ci.Arguments, expr); + Get(); + Argument(out expr); + SafeAdd(ci, ci.Arguments, expr); } } Expect(21); } - void OverloadableOperator( -#line 1344 "cs.ATG" -out OverloadableOperatorType op) { - -#line 1345 "cs.ATG" - op = OverloadableOperatorType.None; + void OverloadableOperator(out OverloadableOperatorType op) { + op = OverloadableOperatorType.None; switch (la.kind) { case 4: { - lexer.NextToken(); - -#line 1347 "cs.ATG" - op = OverloadableOperatorType.Add; + Get(); + op = OverloadableOperatorType.Add; break; } case 5: { - lexer.NextToken(); - -#line 1348 "cs.ATG" - op = OverloadableOperatorType.Subtract; + Get(); + op = OverloadableOperatorType.Subtract; break; } case 24: { - lexer.NextToken(); - -#line 1350 "cs.ATG" - op = OverloadableOperatorType.Not; + Get(); + op = OverloadableOperatorType.Not; break; } case 27: { - lexer.NextToken(); - -#line 1351 "cs.ATG" - op = OverloadableOperatorType.BitNot; + Get(); + op = OverloadableOperatorType.BitNot; break; } case 31: { - lexer.NextToken(); - -#line 1353 "cs.ATG" - op = OverloadableOperatorType.Increment; + Get(); + op = OverloadableOperatorType.Increment; break; } case 32: { - lexer.NextToken(); - -#line 1354 "cs.ATG" - op = OverloadableOperatorType.Decrement; + Get(); + op = OverloadableOperatorType.Decrement; break; } case 113: { - lexer.NextToken(); - -#line 1356 "cs.ATG" - op = OverloadableOperatorType.IsTrue; + Get(); + op = OverloadableOperatorType.IsTrue; break; } case 72: { - lexer.NextToken(); - -#line 1357 "cs.ATG" - op = OverloadableOperatorType.IsFalse; + Get(); + op = OverloadableOperatorType.IsFalse; break; } case 6: { - lexer.NextToken(); - -#line 1359 "cs.ATG" - op = OverloadableOperatorType.Multiply; + Get(); + op = OverloadableOperatorType.Multiply; break; } case 7: { - lexer.NextToken(); - -#line 1360 "cs.ATG" - op = OverloadableOperatorType.Divide; + Get(); + op = OverloadableOperatorType.Divide; break; } case 8: { - lexer.NextToken(); - -#line 1361 "cs.ATG" - op = OverloadableOperatorType.Modulus; + Get(); + op = OverloadableOperatorType.Modulus; break; } case 28: { - lexer.NextToken(); - -#line 1363 "cs.ATG" - op = OverloadableOperatorType.BitwiseAnd; + Get(); + op = OverloadableOperatorType.BitwiseAnd; break; } case 29: { - lexer.NextToken(); - -#line 1364 "cs.ATG" - op = OverloadableOperatorType.BitwiseOr; + Get(); + op = OverloadableOperatorType.BitwiseOr; break; } case 30: { - lexer.NextToken(); - -#line 1365 "cs.ATG" - op = OverloadableOperatorType.ExclusiveOr; + Get(); + op = OverloadableOperatorType.ExclusiveOr; break; } case 37: { - lexer.NextToken(); - -#line 1367 "cs.ATG" - op = OverloadableOperatorType.ShiftLeft; + Get(); + op = OverloadableOperatorType.ShiftLeft; break; } case 33: { - lexer.NextToken(); - -#line 1368 "cs.ATG" - op = OverloadableOperatorType.Equality; + Get(); + op = OverloadableOperatorType.Equality; break; } case 34: { - lexer.NextToken(); - -#line 1369 "cs.ATG" - op = OverloadableOperatorType.InEquality; + Get(); + op = OverloadableOperatorType.InEquality; break; } case 23: { - lexer.NextToken(); - -#line 1370 "cs.ATG" - op = OverloadableOperatorType.LessThan; + Get(); + op = OverloadableOperatorType.LessThan; break; } case 35: { - lexer.NextToken(); - -#line 1371 "cs.ATG" - op = OverloadableOperatorType.GreaterThanOrEqual; + Get(); + op = OverloadableOperatorType.GreaterThanOrEqual; break; } case 36: { - lexer.NextToken(); - -#line 1372 "cs.ATG" - op = OverloadableOperatorType.LessThanOrEqual; + Get(); + op = OverloadableOperatorType.LessThanOrEqual; break; } case 22: { - lexer.NextToken(); - -#line 1373 "cs.ATG" - op = OverloadableOperatorType.GreaterThan; + Get(); + op = OverloadableOperatorType.GreaterThan; if (la.kind == 22) { - lexer.NextToken(); - -#line 1373 "cs.ATG" - op = OverloadableOperatorType.ShiftRight; + Get(); + op = OverloadableOperatorType.ShiftRight; } break; } - default: SynErr(183); break; + default: SynErr(184); break; } } - void VariableDeclarator( -#line 1283 "cs.ATG" -FieldDeclaration parentFieldDeclaration) { - -#line 1284 "cs.ATG" - Expression expr = null; + void VariableDeclarator(FieldDeclaration parentFieldDeclaration) { + Expression expr = null; Identifier(); - -#line 1286 "cs.ATG" - VariableDeclaration f = new VariableDeclaration(t.val); f.StartLocation = t.Location; + VariableDeclaration f = new VariableDeclaration(t.val); f.StartLocation = t.Location; if (la.kind == 3) { - lexer.NextToken(); - VariableInitializer( -#line 1287 "cs.ATG" -out expr); - -#line 1287 "cs.ATG" - f.Initializer = expr; + Get(); + VariableInitializer(out expr); + f.Initializer = expr; } - -#line 1288 "cs.ATG" - f.EndLocation = t.EndLocation; SafeAdd(parentFieldDeclaration, parentFieldDeclaration.Fields, f); + f.EndLocation = t.EndLocation; SafeAdd(parentFieldDeclaration, parentFieldDeclaration.Fields, f); } - void AccessorDecls( -#line 1175 "cs.ATG" -out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { - -#line 1177 "cs.ATG" + void AccessorDecls(out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { List attributes = new List(); AttributeSection section; getBlock = null; setBlock = null; ModifierList modifiers = null; - - while (la.kind == 18) { - AttributeSection( -#line 1184 "cs.ATG" -out section); -#line 1184 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } if (la.kind == 84 || la.kind == 96 || la.kind == 97) { - AccessorModifiers( -#line 1185 "cs.ATG" -out modifiers); + AccessorModifiers(out modifiers); } if (la.kind == 128) { - GetAccessorDecl( -#line 1187 "cs.ATG" -out getBlock, attributes); - -#line 1188 "cs.ATG" - if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } + GetAccessorDecl(out getBlock, attributes); + if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } if (StartOf(26)) { - -#line 1189 "cs.ATG" - attributes = new List(); modifiers = null; + attributes = new List(); modifiers = null; while (la.kind == 18) { - AttributeSection( -#line 1190 "cs.ATG" -out section); - -#line 1190 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } if (la.kind == 84 || la.kind == 96 || la.kind == 97) { - AccessorModifiers( -#line 1191 "cs.ATG" -out modifiers); + AccessorModifiers(out modifiers); } - SetAccessorDecl( -#line 1192 "cs.ATG" -out setBlock, attributes); - -#line 1193 "cs.ATG" - if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } + SetAccessorDecl(out setBlock, attributes); + if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } } } else if (la.kind == 129) { - SetAccessorDecl( -#line 1196 "cs.ATG" -out setBlock, attributes); - -#line 1197 "cs.ATG" - if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } + SetAccessorDecl(out setBlock, attributes); + if (modifiers != null) {setBlock.Modifier = modifiers.Modifier; } if (StartOf(27)) { - -#line 1198 "cs.ATG" - attributes = new List(); modifiers = null; + attributes = new List(); modifiers = null; while (la.kind == 18) { - AttributeSection( -#line 1199 "cs.ATG" -out section); - -#line 1199 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } if (la.kind == 84 || la.kind == 96 || la.kind == 97) { - AccessorModifiers( -#line 1200 "cs.ATG" -out modifiers); + AccessorModifiers(out modifiers); } - GetAccessorDecl( -#line 1201 "cs.ATG" -out getBlock, attributes); - -#line 1202 "cs.ATG" - if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } + GetAccessorDecl(out getBlock, attributes); + if (modifiers != null) {getBlock.Modifier = modifiers.Modifier; } } - } else if (StartOf(18)) { + } else if (StartOf(9)) { Identifier(); - -#line 1204 "cs.ATG" - Error("get or set accessor declaration expected"); - } else SynErr(184); + Error("get or set accessor declaration expected"); + } else SynErr(185); } - void InterfaceAccessors( -#line 1249 "cs.ATG" -out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { - -#line 1251 "cs.ATG" + void InterfaceAccessors(out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { AttributeSection section; List attributes = new List(); getBlock = null; setBlock = null; PropertyGetSetRegion lastBlock = null; - - while (la.kind == 18) { - AttributeSection( -#line 1257 "cs.ATG" -out section); -#line 1257 "cs.ATG" - attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + attributes.Add(section); } - -#line 1258 "cs.ATG" - Location startLocation = la.Location; + Location startLocation = la.Location; if (la.kind == 128) { - lexer.NextToken(); - -#line 1260 "cs.ATG" - getBlock = new PropertyGetRegion(null, attributes); + Get(); + getBlock = new PropertyGetRegion(null, attributes); } else if (la.kind == 129) { - lexer.NextToken(); - -#line 1261 "cs.ATG" - setBlock = new PropertySetRegion(null, attributes); - } else SynErr(185); + Get(); + setBlock = new PropertySetRegion(null, attributes); + } else SynErr(186); Expect(11); - -#line 1264 "cs.ATG" if (getBlock != null) { getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; } if (setBlock != null) { setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; } - attributes = new List(); + attributes = new List(); if (la.kind == 18 || la.kind == 128 || la.kind == 129) { while (la.kind == 18) { - AttributeSection( -#line 1268 "cs.ATG" -out section); - -#line 1268 "cs.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } - -#line 1269 "cs.ATG" - startLocation = la.Location; + startLocation = la.Location; if (la.kind == 128) { - lexer.NextToken(); - -#line 1271 "cs.ATG" + Get(); if (getBlock != null) Error("get already declared"); else { getBlock = new PropertyGetRegion(null, attributes); lastBlock = getBlock; } - + } else if (la.kind == 129) { - lexer.NextToken(); - -#line 1274 "cs.ATG" + Get(); if (setBlock != null) Error("set already declared"); else { setBlock = new PropertySetRegion(null, attributes); lastBlock = setBlock; } - - } else SynErr(186); + + } else SynErr(187); Expect(11); - -#line 1279 "cs.ATG" - if (lastBlock != null) { lastBlock.StartLocation = startLocation; lastBlock.EndLocation = t.EndLocation; } + if (lastBlock != null) { lastBlock.StartLocation = startLocation; lastBlock.EndLocation = t.EndLocation; } } } - void GetAccessorDecl( -#line 1208 "cs.ATG" -out PropertyGetRegion getBlock, List attributes) { - -#line 1209 "cs.ATG" - Statement stmt = null; + void GetAccessorDecl(out PropertyGetRegion getBlock, List attributes) { + Statement stmt = null; Expect(128); - -#line 1212 "cs.ATG" - Location startLocation = t.Location; + Location startLocation = t.Location; if (la.kind == 16) { - Block( -#line 1213 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(187); - -#line 1214 "cs.ATG" - getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes); - -#line 1215 "cs.ATG" - getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; + Get(); + } else SynErr(188); + getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes); + getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; } - void SetAccessorDecl( -#line 1218 "cs.ATG" -out PropertySetRegion setBlock, List attributes) { - -#line 1219 "cs.ATG" - Statement stmt = null; + void SetAccessorDecl(out PropertySetRegion setBlock, List attributes) { + Statement stmt = null; Expect(129); - -#line 1222 "cs.ATG" - Location startLocation = t.Location; + Location startLocation = t.Location; if (la.kind == 16) { - Block( -#line 1223 "cs.ATG" -out stmt); + Block(out stmt); } else if (la.kind == 11) { - lexer.NextToken(); - } else SynErr(188); - -#line 1224 "cs.ATG" - setBlock = new PropertySetRegion((BlockStatement)stmt, attributes); - -#line 1225 "cs.ATG" - setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; + Get(); + } else SynErr(189); + setBlock = new PropertySetRegion((BlockStatement)stmt, attributes); + setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; } - void AddAccessorDecl( -#line 1307 "cs.ATG" -out Statement stmt) { - -#line 1308 "cs.ATG" + void AddAccessorDecl(out Statement stmt) { stmt = null; Expect(130); - Block( -#line 1311 "cs.ATG" -out stmt); + Block(out stmt); } - void RemoveAccessorDecl( -#line 1314 "cs.ATG" -out Statement stmt) { - -#line 1315 "cs.ATG" + void RemoveAccessorDecl(out Statement stmt) { stmt = null; Expect(131); - Block( -#line 1318 "cs.ATG" -out stmt); + Block(out stmt); } - void VariableInitializer( -#line 1336 "cs.ATG" -out Expression initializerExpression) { - -#line 1337 "cs.ATG" - TypeReference type = null; Expression expr = null; initializerExpression = null; + void VariableInitializer(out Expression initializerExpression) { + TypeReference type = null; Expression expr = null; initializerExpression = null; if (StartOf(6)) { - Expr( -#line 1339 "cs.ATG" -out initializerExpression); + Expr(out initializerExpression); } else if (la.kind == 16) { - CollectionInitializer( -#line 1340 "cs.ATG" -out initializerExpression); + CollectionInitializer(out initializerExpression); } else if (la.kind == 106) { - lexer.NextToken(); - Type( -#line 1341 "cs.ATG" -out type); + Get(); + Type(out type); Expect(18); - Expr( -#line 1341 "cs.ATG" -out expr); + Expr(out expr); Expect(19); - -#line 1341 "cs.ATG" - initializerExpression = new StackAllocExpression(type, expr); - } else SynErr(189); + initializerExpression = new StackAllocExpression(type, expr); + } else SynErr(190); } void Statement() { - -#line 1498 "cs.ATG" Statement stmt = null; Location startPos = la.Location; - - while (!(StartOf(28))) {SynErr(190); lexer.NextToken(); } - if ( -#line 1505 "cs.ATG" -IsLabel()) { - Identifier(); -#line 1505 "cs.ATG" - compilationUnit.AddChild(new LabelStatement(t.val)); + while (!(StartOf(28))) {SynErr(191); Get();} + if (IsLabel()) { + Identifier(); + compilationUnit.AddChild(new LabelStatement(t.val)); Expect(9); Statement(); } else if (la.kind == 60) { - lexer.NextToken(); - LocalVariableDecl( -#line 1509 "cs.ATG" -out stmt); - -#line 1510 "cs.ATG" - if (stmt != null) { ((LocalVariableDeclaration)stmt).Modifier |= Modifiers.Const; } + Get(); + LocalVariableDecl(out stmt); + if (stmt != null) { ((LocalVariableDeclaration)stmt).Modifier |= Modifiers.Const; } Expect(11); - -#line 1511 "cs.ATG" - compilationUnit.AddChild(stmt); - } else if ( -#line 1513 "cs.ATG" -IsLocalVarDecl()) { - LocalVariableDecl( -#line 1513 "cs.ATG" -out stmt); + compilationUnit.AddChild(stmt); + } else if (IsLocalVarDecl()) { + LocalVariableDecl(out stmt); Expect(11); - -#line 1513 "cs.ATG" - compilationUnit.AddChild(stmt); + compilationUnit.AddChild(stmt); } else if (StartOf(29)) { - EmbeddedStatement( -#line 1515 "cs.ATG" -out stmt); - -#line 1515 "cs.ATG" - compilationUnit.AddChild(stmt); - } else SynErr(191); - -#line 1521 "cs.ATG" + EmbeddedStatement(out stmt); + compilationUnit.AddChild(stmt); + } else SynErr(192); if (stmt != null) { stmt.StartLocation = startPos; stmt.EndLocation = t.EndLocation; } - - } - - void Argument( -#line 1376 "cs.ATG" -out Expression argumentexpr) { -#line 1377 "cs.ATG" - argumentexpr = null; - if ( -#line 1379 "cs.ATG" -IdentAndColon()) { + } -#line 1380 "cs.ATG" - Token ident; Expression expr; + void Argument(out Expression argumentexpr) { + argumentexpr = null; + if (IdentAndColon()) { + Token ident; Expression expr; Identifier(); - -#line 1381 "cs.ATG" - ident = t; + ident = t; Expect(9); - ArgumentValue( -#line 1383 "cs.ATG" -out expr); - -#line 1384 "cs.ATG" - argumentexpr = new NamedArgumentExpression(ident.val, expr) { StartLocation = ident.Location, EndLocation = t.EndLocation }; + ArgumentValue(out expr); + argumentexpr = new NamedArgumentExpression(ident.val, expr) { StartLocation = ident.Location, EndLocation = t.EndLocation }; } else if (StartOf(25)) { - ArgumentValue( -#line 1386 "cs.ATG" -out argumentexpr); - } else SynErr(192); + ArgumentValue(out argumentexpr); + } else SynErr(193); } - void CollectionInitializer( -#line 1420 "cs.ATG" -out Expression outExpr) { - -#line 1422 "cs.ATG" + void CollectionInitializer(out Expression outExpr) { Expression expr = null; CollectionInitializerExpression initializer = new CollectionInitializerExpression(); - - Expect(16); -#line 1426 "cs.ATG" - initializer.StartLocation = t.Location; + Expect(16); + initializer.StartLocation = t.Location; if (StartOf(30)) { - VariableInitializer( -#line 1427 "cs.ATG" -out expr); - -#line 1428 "cs.ATG" - SafeAdd(initializer, initializer.CreateExpressions, expr); - while ( -#line 1429 "cs.ATG" -NotFinalComma()) { + VariableInitializer(out expr); + SafeAdd(initializer, initializer.CreateExpressions, expr); + while (NotFinalComma()) { Expect(14); - VariableInitializer( -#line 1430 "cs.ATG" -out expr); - -#line 1431 "cs.ATG" - SafeAdd(initializer, initializer.CreateExpressions, expr); + VariableInitializer(out expr); + SafeAdd(initializer, initializer.CreateExpressions, expr); } if (la.kind == 14) { - lexer.NextToken(); + Get(); } } Expect(17); - -#line 1435 "cs.ATG" - initializer.EndLocation = t.Location; outExpr = initializer; + initializer.EndLocation = t.Location; outExpr = initializer; } - void ArgumentValue( -#line 1389 "cs.ATG" -out Expression argumentexpr) { - -#line 1391 "cs.ATG" + void ArgumentValue(out Expression argumentexpr) { Expression expr; FieldDirection fd = FieldDirection.None; - + if (la.kind == 93 || la.kind == 100) { if (la.kind == 100) { - lexer.NextToken(); - -#line 1396 "cs.ATG" - fd = FieldDirection.Ref; + Get(); + fd = FieldDirection.Ref; } else { - lexer.NextToken(); - -#line 1397 "cs.ATG" - fd = FieldDirection.Out; + Get(); + fd = FieldDirection.Out; } } - Expr( -#line 1399 "cs.ATG" -out expr); - -#line 1400 "cs.ATG" - argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; + Expr(out expr); + argumentexpr = fd != FieldDirection.None ? argumentexpr = new DirectionExpression(fd, expr) : expr; } - void AssignmentOperator( -#line 1403 "cs.ATG" -out AssignmentOperatorType op) { - -#line 1404 "cs.ATG" - op = AssignmentOperatorType.None; + void AssignmentOperator(out AssignmentOperatorType op) { + op = AssignmentOperatorType.None; if (la.kind == 3) { - lexer.NextToken(); - -#line 1406 "cs.ATG" - op = AssignmentOperatorType.Assign; + Get(); + op = AssignmentOperatorType.Assign; } else if (la.kind == 38) { - lexer.NextToken(); - -#line 1407 "cs.ATG" - op = AssignmentOperatorType.Add; + Get(); + op = AssignmentOperatorType.Add; } else if (la.kind == 39) { - lexer.NextToken(); - -#line 1408 "cs.ATG" - op = AssignmentOperatorType.Subtract; + Get(); + op = AssignmentOperatorType.Subtract; } else if (la.kind == 40) { - lexer.NextToken(); - -#line 1409 "cs.ATG" - op = AssignmentOperatorType.Multiply; + Get(); + op = AssignmentOperatorType.Multiply; } else if (la.kind == 41) { - lexer.NextToken(); - -#line 1410 "cs.ATG" - op = AssignmentOperatorType.Divide; + Get(); + op = AssignmentOperatorType.Divide; } else if (la.kind == 42) { - lexer.NextToken(); - -#line 1411 "cs.ATG" - op = AssignmentOperatorType.Modulus; + Get(); + op = AssignmentOperatorType.Modulus; } else if (la.kind == 43) { - lexer.NextToken(); - -#line 1412 "cs.ATG" - op = AssignmentOperatorType.BitwiseAnd; + Get(); + op = AssignmentOperatorType.BitwiseAnd; } else if (la.kind == 44) { - lexer.NextToken(); - -#line 1413 "cs.ATG" - op = AssignmentOperatorType.BitwiseOr; + Get(); + op = AssignmentOperatorType.BitwiseOr; } else if (la.kind == 45) { - lexer.NextToken(); - -#line 1414 "cs.ATG" - op = AssignmentOperatorType.ExclusiveOr; + Get(); + op = AssignmentOperatorType.ExclusiveOr; } else if (la.kind == 46) { - lexer.NextToken(); - -#line 1415 "cs.ATG" - op = AssignmentOperatorType.ShiftLeft; - } else if ( -#line 1416 "cs.ATG" -la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) { + Get(); + op = AssignmentOperatorType.ShiftLeft; + } else if (la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) { Expect(22); Expect(35); - -#line 1417 "cs.ATG" - op = AssignmentOperatorType.ShiftRight; - } else SynErr(193); + op = AssignmentOperatorType.ShiftRight; + } else SynErr(194); } - void CollectionOrObjectInitializer( -#line 1438 "cs.ATG" -out Expression outExpr) { - -#line 1440 "cs.ATG" + void CollectionOrObjectInitializer(out Expression outExpr) { Expression expr = null; CollectionInitializerExpression initializer = new CollectionInitializerExpression(); - - Expect(16); -#line 1444 "cs.ATG" - initializer.StartLocation = t.Location; + Expect(16); + initializer.StartLocation = t.Location; if (StartOf(30)) { - ObjectPropertyInitializerOrVariableInitializer( -#line 1445 "cs.ATG" -out expr); - -#line 1446 "cs.ATG" - SafeAdd(initializer, initializer.CreateExpressions, expr); - while ( -#line 1447 "cs.ATG" -NotFinalComma()) { + ObjectPropertyInitializerOrVariableInitializer(out expr); + SafeAdd(initializer, initializer.CreateExpressions, expr); + while (NotFinalComma()) { Expect(14); - ObjectPropertyInitializerOrVariableInitializer( -#line 1448 "cs.ATG" -out expr); - -#line 1449 "cs.ATG" - SafeAdd(initializer, initializer.CreateExpressions, expr); + ObjectPropertyInitializerOrVariableInitializer(out expr); + SafeAdd(initializer, initializer.CreateExpressions, expr); } if (la.kind == 14) { - lexer.NextToken(); + Get(); } } Expect(17); - -#line 1453 "cs.ATG" - initializer.EndLocation = t.Location; outExpr = initializer; + initializer.EndLocation = t.Location; outExpr = initializer; } - void ObjectPropertyInitializerOrVariableInitializer( -#line 1456 "cs.ATG" -out Expression expr) { - -#line 1457 "cs.ATG" - expr = null; - if ( -#line 1459 "cs.ATG" -IdentAndAsgn()) { + void ObjectPropertyInitializerOrVariableInitializer(out Expression expr) { + expr = null; + if (IdentAndAsgn()) { Identifier(); - -#line 1461 "cs.ATG" MemberInitializerExpression mie = new MemberInitializerExpression(t.val, null); mie.StartLocation = t.Location; mie.IsKey = true; - Expression r = null; + Expression r = null; Expect(3); if (la.kind == 16) { - CollectionOrObjectInitializer( -#line 1466 "cs.ATG" -out r); + CollectionOrObjectInitializer(out r); } else if (StartOf(30)) { - VariableInitializer( -#line 1467 "cs.ATG" -out r); - } else SynErr(194); - -#line 1468 "cs.ATG" - mie.Expression = r; mie.EndLocation = t.EndLocation; expr = mie; + VariableInitializer(out r); + } else SynErr(195); + mie.Expression = r; mie.EndLocation = t.EndLocation; expr = mie; } else if (StartOf(30)) { - VariableInitializer( -#line 1470 "cs.ATG" -out expr); - } else SynErr(195); + VariableInitializer(out expr); + } else SynErr(196); } - void LocalVariableDecl( -#line 1474 "cs.ATG" -out Statement stmt) { - -#line 1476 "cs.ATG" + void LocalVariableDecl(out Statement stmt) { TypeReference type; VariableDeclaration var = null; LocalVariableDeclaration localVariableDeclaration; Location startPos = la.Location; - - Type( -#line 1482 "cs.ATG" -out type); - -#line 1482 "cs.ATG" - localVariableDeclaration = new LocalVariableDeclaration(type); localVariableDeclaration.StartLocation = startPos; - LocalVariableDeclarator( -#line 1483 "cs.ATG" -out var); - -#line 1483 "cs.ATG" - SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var); - while (la.kind == 14) { - lexer.NextToken(); - LocalVariableDeclarator( -#line 1484 "cs.ATG" -out var); -#line 1484 "cs.ATG" - SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var); + Type(out type); + localVariableDeclaration = new LocalVariableDeclaration(type); localVariableDeclaration.StartLocation = startPos; + LocalVariableDeclarator(out var); + SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var); + while (la.kind == 14) { + Get(); + LocalVariableDeclarator(out var); + SafeAdd(localVariableDeclaration, localVariableDeclaration.Variables, var); } - -#line 1485 "cs.ATG" - stmt = localVariableDeclaration; stmt.EndLocation = t.EndLocation; + stmt = localVariableDeclaration; stmt.EndLocation = t.EndLocation; } - void LocalVariableDeclarator( -#line 1488 "cs.ATG" -out VariableDeclaration var) { - -#line 1489 "cs.ATG" - Expression expr = null; + void LocalVariableDeclarator(out VariableDeclaration var) { + Expression expr = null; Identifier(); - -#line 1491 "cs.ATG" - var = new VariableDeclaration(t.val); var.StartLocation = t.Location; + var = new VariableDeclaration(t.val); var.StartLocation = t.Location; if (la.kind == 3) { - lexer.NextToken(); - VariableInitializer( -#line 1492 "cs.ATG" -out expr); - -#line 1492 "cs.ATG" - var.Initializer = expr; + Get(); + VariableInitializer(out expr); + var.Initializer = expr; } - -#line 1493 "cs.ATG" - var.EndLocation = t.EndLocation; + var.EndLocation = t.EndLocation; } - void EmbeddedStatement( -#line 1528 "cs.ATG" -out Statement statement) { - -#line 1530 "cs.ATG" + void EmbeddedStatement(out Statement statement) { TypeReference type = null; Expression expr = null; Statement embeddedStatement = null; statement = null; - -#line 1536 "cs.ATG" - Location startLocation = la.Location; + Location startLocation = la.Location; if (la.kind == 16) { - Block( -#line 1538 "cs.ATG" -out statement); + Block(out statement); } else if (la.kind == 11) { - lexer.NextToken(); - -#line 1541 "cs.ATG" - statement = new EmptyStatement(); - } else if ( -#line 1544 "cs.ATG" -UnCheckedAndLBrace()) { - -#line 1544 "cs.ATG" - Statement block; bool isChecked = true; + Get(); + statement = new EmptyStatement(); + } else if (UnCheckedAndLBrace()) { + Statement block; bool isChecked = true; if (la.kind == 58) { - lexer.NextToken(); + Get(); } else if (la.kind == 118) { - lexer.NextToken(); - -#line 1545 "cs.ATG" + Get(); isChecked = false; - } else SynErr(196); - Block( -#line 1546 "cs.ATG" -out block); - -#line 1546 "cs.ATG" - statement = isChecked ? (Statement)new CheckedStatement(block) : (Statement)new UncheckedStatement(block); + } else SynErr(197); + Block(out block); + statement = isChecked ? (Statement)new CheckedStatement(block) : (Statement)new UncheckedStatement(block); } else if (la.kind == 79) { - IfStatement( -#line 1549 "cs.ATG" -out statement); + IfStatement(out statement); } else if (la.kind == 110) { - lexer.NextToken(); - -#line 1551 "cs.ATG" - List switchSections = new List(); + Get(); + List switchSections = new List(); Expect(20); - Expr( -#line 1552 "cs.ATG" -out expr); + Expr(out expr); Expect(21); Expect(16); - SwitchSections( -#line 1553 "cs.ATG" -switchSections); + SwitchSections(switchSections); Expect(17); - -#line 1555 "cs.ATG" - statement = new SwitchStatement(expr, switchSections); + statement = new SwitchStatement(expr, switchSections); } else if (la.kind == 125) { - lexer.NextToken(); + Get(); Expect(20); - Expr( -#line 1558 "cs.ATG" -out expr); + Expr(out expr); Expect(21); - EmbeddedStatement( -#line 1559 "cs.ATG" -out embeddedStatement); - -#line 1560 "cs.ATG" + EmbeddedStatement(out embeddedStatement); statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start); } else if (la.kind == 65) { - lexer.NextToken(); - EmbeddedStatement( -#line 1562 "cs.ATG" -out embeddedStatement); + Get(); + EmbeddedStatement(out embeddedStatement); Expect(125); Expect(20); - Expr( -#line 1563 "cs.ATG" -out expr); + Expr(out expr); Expect(21); Expect(11); - -#line 1564 "cs.ATG" - statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.End); + statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.End); } else if (la.kind == 76) { - lexer.NextToken(); - -#line 1566 "cs.ATG" - List initializer = null; List iterator = null; + Get(); + List initializer = null; List iterator = null; Expect(20); if (StartOf(6)) { - ForInitializer( -#line 1567 "cs.ATG" -out initializer); + ForInitializer(out initializer); } Expect(11); if (StartOf(6)) { - Expr( -#line 1568 "cs.ATG" -out expr); + Expr(out expr); } Expect(11); if (StartOf(6)) { - ForIterator( -#line 1569 "cs.ATG" -out iterator); + ForIterator(out iterator); } Expect(21); - EmbeddedStatement( -#line 1570 "cs.ATG" -out embeddedStatement); - -#line 1571 "cs.ATG" - statement = new ForStatement(initializer, expr, iterator, embeddedStatement); + EmbeddedStatement(out embeddedStatement); + statement = new ForStatement(initializer, expr, iterator, embeddedStatement); } else if (la.kind == 77) { - lexer.NextToken(); + Get(); Expect(20); - Type( -#line 1573 "cs.ATG" -out type); + Type(out type); Identifier(); - -#line 1573 "cs.ATG" - string varName = t.val; + string varName = t.val; Expect(81); - Expr( -#line 1574 "cs.ATG" -out expr); + Expr(out expr); Expect(21); - EmbeddedStatement( -#line 1575 "cs.ATG" -out embeddedStatement); - -#line 1576 "cs.ATG" - statement = new ForeachStatement(type, varName , expr, embeddedStatement); + EmbeddedStatement(out embeddedStatement); + statement = new ForeachStatement(type, varName , expr, embeddedStatement); } else if (la.kind == 53) { - lexer.NextToken(); + Get(); Expect(11); - -#line 1579 "cs.ATG" - statement = new BreakStatement(); + statement = new BreakStatement(); } else if (la.kind == 61) { - lexer.NextToken(); + Get(); Expect(11); - -#line 1580 "cs.ATG" - statement = new ContinueStatement(); + statement = new ContinueStatement(); } else if (la.kind == 78) { - GotoStatement( -#line 1581 "cs.ATG" -out statement); - } else if ( -#line 1583 "cs.ATG" -IsYieldStatement()) { + GotoStatement(out statement); + } else if (IsYieldStatement()) { Expect(132); if (la.kind == 101) { - lexer.NextToken(); - Expr( -#line 1584 "cs.ATG" -out expr); - -#line 1584 "cs.ATG" - statement = new YieldStatement(new ReturnStatement(expr)); + Get(); + Expr(out expr); + statement = new YieldStatement(new ReturnStatement(expr)); } else if (la.kind == 53) { - lexer.NextToken(); - -#line 1585 "cs.ATG" - statement = new YieldStatement(new BreakStatement()); - } else SynErr(197); + Get(); + statement = new YieldStatement(new BreakStatement()); + } else SynErr(198); Expect(11); } else if (la.kind == 101) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - Expr( -#line 1588 "cs.ATG" -out expr); + Expr(out expr); } Expect(11); - -#line 1588 "cs.ATG" - statement = new ReturnStatement(expr); + statement = new ReturnStatement(expr); } else if (la.kind == 112) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - Expr( -#line 1589 "cs.ATG" -out expr); + Expr(out expr); } Expect(11); - -#line 1589 "cs.ATG" - statement = new ThrowStatement(expr); + statement = new ThrowStatement(expr); } else if (StartOf(6)) { - StatementExpr( -#line 1592 "cs.ATG" -out statement); - while (!(la.kind == 0 || la.kind == 11)) {SynErr(198); lexer.NextToken(); } + StatementExpr(out statement); + while (!(la.kind == 0 || la.kind == 11)) {SynErr(199); Get();} Expect(11); } else if (la.kind == 114) { - TryStatement( -#line 1595 "cs.ATG" -out statement); + TryStatement(out statement); } else if (la.kind == 86) { - lexer.NextToken(); + Get(); Expect(20); - Expr( -#line 1598 "cs.ATG" -out expr); + Expr(out expr); Expect(21); - EmbeddedStatement( -#line 1599 "cs.ATG" -out embeddedStatement); - -#line 1599 "cs.ATG" - statement = new LockStatement(expr, embeddedStatement); + EmbeddedStatement(out embeddedStatement); + statement = new LockStatement(expr, embeddedStatement); } else if (la.kind == 121) { - -#line 1602 "cs.ATG" - Statement resourceAcquisitionStmt = null; - lexer.NextToken(); + Statement resourceAcquisitionStmt = null; + Get(); Expect(20); - ResourceAcquisition( -#line 1604 "cs.ATG" -out resourceAcquisitionStmt); + ResourceAcquisition(out resourceAcquisitionStmt); Expect(21); - EmbeddedStatement( -#line 1605 "cs.ATG" -out embeddedStatement); - -#line 1605 "cs.ATG" - statement = new UsingStatement(resourceAcquisitionStmt, embeddedStatement); + EmbeddedStatement(out embeddedStatement); + statement = new UsingStatement(resourceAcquisitionStmt, embeddedStatement); } else if (la.kind == 119) { - lexer.NextToken(); - Block( -#line 1608 "cs.ATG" -out embeddedStatement); - -#line 1608 "cs.ATG" - statement = new UnsafeStatement(embeddedStatement); + Get(); + Block(out embeddedStatement); + statement = new UnsafeStatement(embeddedStatement); } else if (la.kind == 74) { - -#line 1610 "cs.ATG" - Statement pointerDeclarationStmt = null; - lexer.NextToken(); + Statement pointerDeclarationStmt = null; + Get(); Expect(20); - ResourceAcquisition( -#line 1612 "cs.ATG" -out pointerDeclarationStmt); + ResourceAcquisition(out pointerDeclarationStmt); Expect(21); - EmbeddedStatement( -#line 1613 "cs.ATG" -out embeddedStatement); - -#line 1613 "cs.ATG" - statement = new FixedStatement(pointerDeclarationStmt, embeddedStatement); - } else SynErr(199); - -#line 1615 "cs.ATG" + EmbeddedStatement(out embeddedStatement); + statement = new FixedStatement(pointerDeclarationStmt, embeddedStatement); + } else SynErr(200); if (statement != null) { statement.StartLocation = startLocation; statement.EndLocation = t.EndLocation; } - - } - void IfStatement( -#line 1622 "cs.ATG" -out Statement statement) { + } -#line 1624 "cs.ATG" + void IfStatement(out Statement statement) { Expression expr = null; Statement embeddedStatement = null; statement = null; - + Expect(79); Expect(20); - Expr( -#line 1630 "cs.ATG" -out expr); + Expr(out expr); Expect(21); - EmbeddedStatement( -#line 1631 "cs.ATG" -out embeddedStatement); - -#line 1632 "cs.ATG" - Statement elseStatement = null; + EmbeddedStatement(out embeddedStatement); + Statement elseStatement = null; if (la.kind == 67) { - lexer.NextToken(); - EmbeddedStatement( -#line 1633 "cs.ATG" -out elseStatement); + Get(); + EmbeddedStatement(out elseStatement); } - -#line 1634 "cs.ATG" - statement = elseStatement != null ? new IfElseStatement(expr, embeddedStatement, elseStatement) : new IfElseStatement(expr, embeddedStatement); - -#line 1635 "cs.ATG" + statement = elseStatement != null ? new IfElseStatement(expr, embeddedStatement, elseStatement) : new IfElseStatement(expr, embeddedStatement); if (elseStatement is IfElseStatement && (elseStatement as IfElseStatement).TrueStatement.Count == 1) { /* else if-section (otherwise we would have a BlockStatment) */ (statement as IfElseStatement).ElseIfSections.Add( @@ -3897,33 +2425,19 @@ out elseStatement); (statement as IfElseStatement).ElseIfSections.AddRange((elseStatement as IfElseStatement).ElseIfSections); (statement as IfElseStatement).FalseStatement = (elseStatement as IfElseStatement).FalseStatement; } - - } - void SwitchSections( -#line 1665 "cs.ATG" -List switchSections) { + } -#line 1667 "cs.ATG" + void SwitchSections(List switchSections) { SwitchSection switchSection = new SwitchSection(); CaseLabel label; - - SwitchLabel( -#line 1671 "cs.ATG" -out label); - -#line 1671 "cs.ATG" - SafeAdd(switchSection, switchSection.SwitchLabels, label); -#line 1672 "cs.ATG" - compilationUnit.BlockStart(switchSection); + SwitchLabel(out label); + SafeAdd(switchSection, switchSection.SwitchLabels, label); + compilationUnit.BlockStart(switchSection); while (StartOf(31)) { if (la.kind == 55 || la.kind == 63) { - SwitchLabel( -#line 1674 "cs.ATG" -out label); - -#line 1675 "cs.ATG" + SwitchLabel(out label); if (label != null) { if (switchSection.Children.Count > 0) { // open new section @@ -3933,326 +2447,188 @@ out label); } SafeAdd(switchSection, switchSection.SwitchLabels, label); } - + } else { Statement(); } } - -#line 1687 "cs.ATG" - compilationUnit.BlockEnd(); switchSections.Add(switchSection); + compilationUnit.BlockEnd(); switchSections.Add(switchSection); } - void ForInitializer( -#line 1646 "cs.ATG" -out List initializer) { - -#line 1648 "cs.ATG" + void ForInitializer(out List initializer) { Statement stmt; initializer = new List(); - - if ( -#line 1652 "cs.ATG" -IsLocalVarDecl()) { - LocalVariableDecl( -#line 1652 "cs.ATG" -out stmt); - -#line 1652 "cs.ATG" + + if (IsLocalVarDecl()) { + LocalVariableDecl(out stmt); initializer.Add(stmt); } else if (StartOf(6)) { - StatementExpr( -#line 1653 "cs.ATG" -out stmt); - -#line 1653 "cs.ATG" + StatementExpr(out stmt); initializer.Add(stmt); while (la.kind == 14) { - lexer.NextToken(); - StatementExpr( -#line 1653 "cs.ATG" -out stmt); - -#line 1653 "cs.ATG" + Get(); + StatementExpr(out stmt); initializer.Add(stmt); } - } else SynErr(200); + } else SynErr(201); } - void ForIterator( -#line 1656 "cs.ATG" -out List iterator) { - -#line 1658 "cs.ATG" + void ForIterator(out List iterator) { Statement stmt; iterator = new List(); - - StatementExpr( -#line 1662 "cs.ATG" -out stmt); -#line 1662 "cs.ATG" + StatementExpr(out stmt); iterator.Add(stmt); while (la.kind == 14) { - lexer.NextToken(); - StatementExpr( -#line 1662 "cs.ATG" -out stmt); - -#line 1662 "cs.ATG" - iterator.Add(stmt); + Get(); + StatementExpr(out stmt); + iterator.Add(stmt); } } - void GotoStatement( -#line 1744 "cs.ATG" -out Statement stmt) { - -#line 1745 "cs.ATG" - Expression expr; stmt = null; + void GotoStatement(out Statement stmt) { + Expression expr; stmt = null; Expect(78); - if (StartOf(18)) { + if (StartOf(9)) { Identifier(); - -#line 1749 "cs.ATG" - stmt = new GotoStatement(t.val); + stmt = new GotoStatement(t.val); Expect(11); } else if (la.kind == 55) { - lexer.NextToken(); - Expr( -#line 1750 "cs.ATG" -out expr); + Get(); + Expr(out expr); Expect(11); - -#line 1750 "cs.ATG" - stmt = new GotoCaseStatement(expr); + stmt = new GotoCaseStatement(expr); } else if (la.kind == 63) { - lexer.NextToken(); + Get(); Expect(11); - -#line 1751 "cs.ATG" - stmt = new GotoCaseStatement(null); - } else SynErr(201); + stmt = new GotoCaseStatement(null); + } else SynErr(202); } - void StatementExpr( -#line 1771 "cs.ATG" -out Statement stmt) { - -#line 1772 "cs.ATG" - Expression expr; - Expr( -#line 1774 "cs.ATG" -out expr); - -#line 1777 "cs.ATG" - stmt = new ExpressionStatement(expr); + void StatementExpr(out Statement stmt) { + Expression expr; + Expr(out expr); + stmt = new ExpressionStatement(expr); } - void TryStatement( -#line 1697 "cs.ATG" -out Statement tryStatement) { - -#line 1699 "cs.ATG" + void TryStatement(out Statement tryStatement) { Statement blockStmt = null, finallyStmt = null; CatchClause catchClause = null; List catchClauses = new List(); - + Expect(114); - Block( -#line 1704 "cs.ATG" -out blockStmt); + Block(out blockStmt); while (la.kind == 56) { - CatchClause( -#line 1706 "cs.ATG" -out catchClause); - -#line 1707 "cs.ATG" - if (catchClause != null) catchClauses.Add(catchClause); + CatchClause(out catchClause); + if (catchClause != null) catchClauses.Add(catchClause); } if (la.kind == 73) { - lexer.NextToken(); - Block( -#line 1709 "cs.ATG" -out finallyStmt); + Get(); + Block(out finallyStmt); } - -#line 1711 "cs.ATG" tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt); if (catchClauses != null) { foreach (CatchClause cc in catchClauses) cc.Parent = tryStatement; } - - } - void ResourceAcquisition( -#line 1755 "cs.ATG" -out Statement stmt) { + } -#line 1757 "cs.ATG" + void ResourceAcquisition(out Statement stmt) { stmt = null; Expression expr; - - if ( -#line 1762 "cs.ATG" -IsLocalVarDecl()) { - LocalVariableDecl( -#line 1762 "cs.ATG" -out stmt); - } else if (StartOf(6)) { - Expr( -#line 1763 "cs.ATG" -out expr); -#line 1767 "cs.ATG" - stmt = new ExpressionStatement(expr); - } else SynErr(202); + if (IsLocalVarDecl()) { + LocalVariableDecl(out stmt); + } else if (StartOf(6)) { + Expr(out expr); + stmt = new ExpressionStatement(expr); + } else SynErr(203); } - void SwitchLabel( -#line 1690 "cs.ATG" -out CaseLabel label) { - -#line 1691 "cs.ATG" - Expression expr = null; label = null; + void SwitchLabel(out CaseLabel label) { + Expression expr = null; label = null; if (la.kind == 55) { - lexer.NextToken(); - Expr( -#line 1693 "cs.ATG" -out expr); + Get(); + Expr(out expr); Expect(9); - -#line 1693 "cs.ATG" - label = new CaseLabel(expr); + label = new CaseLabel(expr); } else if (la.kind == 63) { - lexer.NextToken(); + Get(); Expect(9); - -#line 1694 "cs.ATG" - label = new CaseLabel(); - } else SynErr(203); + label = new CaseLabel(); + } else SynErr(204); } - void CatchClause( -#line 1718 "cs.ATG" -out CatchClause catchClause) { + void CatchClause(out CatchClause catchClause) { Expect(56); - -#line 1720 "cs.ATG" string identifier; Statement stmt; TypeReference typeRef; Location startPos = t.Location; catchClause = null; - - if (la.kind == 16) { - Block( -#line 1728 "cs.ATG" -out stmt); -#line 1728 "cs.ATG" - catchClause = new CatchClause(stmt); + if (la.kind == 16) { + Block(out stmt); + catchClause = new CatchClause(stmt); } else if (la.kind == 20) { - lexer.NextToken(); - ClassType( -#line 1731 "cs.ATG" -out typeRef, false); - -#line 1731 "cs.ATG" - identifier = null; - if (StartOf(18)) { + Get(); + ClassType(out typeRef, false); + identifier = null; + if (StartOf(9)) { Identifier(); - -#line 1732 "cs.ATG" - identifier = t.val; + identifier = t.val; } Expect(21); - Block( -#line 1733 "cs.ATG" -out stmt); - -#line 1734 "cs.ATG" - catchClause = new CatchClause(typeRef, identifier, stmt); - } else SynErr(204); - -#line 1737 "cs.ATG" + Block(out stmt); + catchClause = new CatchClause(typeRef, identifier, stmt); + } else SynErr(205); if (catchClause != null) { catchClause.StartLocation = startPos; catchClause.EndLocation = t.Location; } - - } - void UnaryExpr( -#line 1806 "cs.ATG" -out Expression uExpr) { + } -#line 1808 "cs.ATG" + void UnaryExpr(out Expression uExpr) { TypeReference type = null; Expression expr = null; ArrayList expressions = new ArrayList(); uExpr = null; - - while (StartOf(32) || -#line 1830 "cs.ATG" -IsTypeCast()) { - if (la.kind == 4) { - lexer.NextToken(); -#line 1817 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus)); + while (StartOf(32)) { + if (la.kind == 4) { + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Plus)); } else if (la.kind == 5) { - lexer.NextToken(); - -#line 1818 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Minus)); } else if (la.kind == 24) { - lexer.NextToken(); - -#line 1819 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Not)); } else if (la.kind == 27) { - lexer.NextToken(); - -#line 1820 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.BitNot)); } else if (la.kind == 6) { - lexer.NextToken(); - -#line 1821 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Dereference)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Dereference)); } else if (la.kind == 31) { - lexer.NextToken(); - -#line 1822 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Increment)); } else if (la.kind == 32) { - lexer.NextToken(); - -#line 1823 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.Decrement)); } else if (la.kind == 28) { - lexer.NextToken(); - -#line 1824 "cs.ATG" - expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.AddressOf)); + Get(); + expressions.Add(new UnaryOperatorExpression(UnaryOperatorType.AddressOf)); } else { Expect(20); - Type( -#line 1830 "cs.ATG" -out type); + Type(out type); Expect(21); - -#line 1830 "cs.ATG" - expressions.Add(new CastExpression(type)); + expressions.Add(new CastExpression(type)); } } - if ( -#line 1835 "cs.ATG" -LastExpressionIsUnaryMinus(expressions) && IsMostNegativeIntegerWithoutTypeSuffix()) { + if (LastExpressionIsUnaryMinus(expressions) && IsMostNegativeIntegerWithoutTypeSuffix()) { Expect(2); - -#line 1838 "cs.ATG" expressions.RemoveAt(expressions.Count - 1); if (t.literalValue is uint) { expr = new PrimitiveExpression(int.MinValue, int.MinValue.ToString()); @@ -4261,14 +2637,10 @@ LastExpressionIsUnaryMinus(expressions) && IsMostNegativeIntegerWithoutTypeSuffi } else { throw new Exception("t.literalValue must be uint or ulong"); } - - } else if (StartOf(33)) { - PrimaryExpr( -#line 1847 "cs.ATG" -out expr); - } else SynErr(205); -#line 1849 "cs.ATG" + } else if (StartOf(33)) { + PrimaryExpr(out expr); + } else SynErr(206); for (int i = 0; i < expressions.Count; ++i) { Expression nextExpression = i + 1 < expressions.Count ? (Expression)expressions[i + 1] : expr; if (expressions[i] is CastExpression) { @@ -4282,1574 +2654,876 @@ out expr); } else { uExpr = expr; } - - } - void ConditionalOrExpr( -#line 2173 "cs.ATG" -ref Expression outExpr) { + } -#line 2174 "cs.ATG" - Expression expr; - ConditionalAndExpr( -#line 2176 "cs.ATG" -ref outExpr); + void ConditionalOrExpr(ref Expression outExpr) { + Expression expr; + ConditionalAndExpr(ref outExpr); while (la.kind == 26) { - lexer.NextToken(); - UnaryExpr( -#line 2176 "cs.ATG" -out expr); - ConditionalAndExpr( -#line 2176 "cs.ATG" -ref expr); - -#line 2176 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr); + Get(); + UnaryExpr(out expr); + ConditionalAndExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalOr, expr); } } - void PrimaryExpr( -#line 1866 "cs.ATG" -out Expression pexpr) { - -#line 1868 "cs.ATG" + void PrimaryExpr(out Expression pexpr) { TypeReference type = null; Expression expr; pexpr = null; - -#line 1873 "cs.ATG" - Location startLocation = la.Location; + Location startLocation = la.Location; if (la.kind == 113) { - lexer.NextToken(); - -#line 1875 "cs.ATG" - pexpr = new PrimitiveExpression(true, "true"); + Get(); + pexpr = new PrimitiveExpression(true, "true"); } else if (la.kind == 72) { - lexer.NextToken(); - -#line 1876 "cs.ATG" - pexpr = new PrimitiveExpression(false, "false"); + Get(); + pexpr = new PrimitiveExpression(false, "false"); } else if (la.kind == 90) { - lexer.NextToken(); - -#line 1877 "cs.ATG" - pexpr = new PrimitiveExpression(null, "null"); + Get(); + pexpr = new PrimitiveExpression(null, "null"); } else if (la.kind == 2) { - lexer.NextToken(); - -#line 1878 "cs.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; - } else if ( -#line 1879 "cs.ATG" -StartOfQueryExpression()) { - QueryExpression( -#line 1880 "cs.ATG" -out pexpr); - } else if ( -#line 1881 "cs.ATG" -IdentAndDoubleColon()) { + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + } else if (StartOfQueryExpression()) { + QueryExpression(out pexpr); + } else if (IdentAndDoubleColon()) { Identifier(); - -#line 1882 "cs.ATG" - type = new TypeReference(t.val); + type = new TypeReference(t.val); Expect(10); - -#line 1883 "cs.ATG" - pexpr = new TypeReferenceExpression(type); + pexpr = new TypeReferenceExpression(type); Identifier(); - -#line 1884 "cs.ATG" - if (type.Type == "global") { type.IsGlobal = true; type.Type = t.val ?? "?"; } else type.Type += "." + (t.val ?? "?"); - } else if (StartOf(18)) { + if (type.Type == "global") { type.IsGlobal = true; type.Type = t.val ?? "?"; } else type.Type += "." + (t.val ?? "?"); + } else if (StartOf(9)) { Identifier(); - -#line 1888 "cs.ATG" - pexpr = new IdentifierExpression(t.val); - if (la.kind == 48 || -#line 1891 "cs.ATG" -IsGenericInSimpleNameOrMemberAccess()) { + pexpr = new IdentifierExpression(t.val); + if (la.kind == 23 || la.kind == 48) { if (la.kind == 48) { - ShortedLambdaExpression( -#line 1890 "cs.ATG" -(IdentifierExpression)pexpr, out pexpr); + ShortedLambdaExpression((IdentifierExpression)pexpr, out pexpr); } else { - -#line 1892 "cs.ATG" - List typeList; - TypeArgumentList( -#line 1893 "cs.ATG" -out typeList, false); - -#line 1894 "cs.ATG" - ((IdentifierExpression)pexpr).TypeArguments = typeList; + List typeList; + TypeArgumentList(out typeList, false); + ((IdentifierExpression)pexpr).TypeArguments = typeList; } } - } else if ( -#line 1896 "cs.ATG" -IsLambdaExpression()) { - LambdaExpression( -#line 1897 "cs.ATG" -out pexpr); + } else if (IsLambdaExpression()) { + LambdaExpression(out pexpr); } else if (la.kind == 20) { - lexer.NextToken(); - Expr( -#line 1900 "cs.ATG" -out expr); + Get(); + Expr(out expr); Expect(21); - -#line 1900 "cs.ATG" - pexpr = new ParenthesizedExpression(expr); + pexpr = new ParenthesizedExpression(expr); } else if (StartOf(34)) { - -#line 1903 "cs.ATG" - string val = null; + string val = null; switch (la.kind) { case 52: { - lexer.NextToken(); - -#line 1904 "cs.ATG" - val = "System.Boolean"; + Get(); + val = "System.Boolean"; break; } case 54: { - lexer.NextToken(); - -#line 1905 "cs.ATG" - val = "System.Byte"; + Get(); + val = "System.Byte"; break; } case 57: { - lexer.NextToken(); - -#line 1906 "cs.ATG" - val = "System.Char"; + Get(); + val = "System.Char"; break; } case 62: { - lexer.NextToken(); - -#line 1907 "cs.ATG" - val = "System.Decimal"; + Get(); + val = "System.Decimal"; break; } case 66: { - lexer.NextToken(); - -#line 1908 "cs.ATG" - val = "System.Double"; + Get(); + val = "System.Double"; break; } case 75: { - lexer.NextToken(); - -#line 1909 "cs.ATG" - val = "System.Single"; + Get(); + val = "System.Single"; break; } case 82: { - lexer.NextToken(); - -#line 1910 "cs.ATG" - val = "System.Int32"; + Get(); + val = "System.Int32"; break; } case 87: { - lexer.NextToken(); - -#line 1911 "cs.ATG" - val = "System.Int64"; + Get(); + val = "System.Int64"; break; } case 91: { - lexer.NextToken(); - -#line 1912 "cs.ATG" - val = "System.Object"; + Get(); + val = "System.Object"; break; } case 102: { - lexer.NextToken(); - -#line 1913 "cs.ATG" - val = "System.SByte"; + Get(); + val = "System.SByte"; break; } case 104: { - lexer.NextToken(); - -#line 1914 "cs.ATG" - val = "System.Int16"; + Get(); + val = "System.Int16"; break; } case 108: { - lexer.NextToken(); - -#line 1915 "cs.ATG" - val = "System.String"; + Get(); + val = "System.String"; break; } case 116: { - lexer.NextToken(); - -#line 1916 "cs.ATG" - val = "System.UInt32"; + Get(); + val = "System.UInt32"; break; } case 117: { - lexer.NextToken(); - -#line 1917 "cs.ATG" - val = "System.UInt64"; + Get(); + val = "System.UInt64"; break; } case 120: { - lexer.NextToken(); - -#line 1918 "cs.ATG" - val = "System.UInt16"; + Get(); + val = "System.UInt16"; break; } case 123: { - lexer.NextToken(); - -#line 1919 "cs.ATG" - val = "System.Void"; + Get(); + val = "System.Void"; break; } } - -#line 1921 "cs.ATG" - pexpr = new TypeReferenceExpression(new TypeReference(val, true)) { StartLocation = t.Location, EndLocation = t.EndLocation }; + pexpr = new TypeReferenceExpression(new TypeReference(val, true)) { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (la.kind == 111) { - lexer.NextToken(); - -#line 1924 "cs.ATG" - pexpr = new ThisReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; + Get(); + pexpr = new ThisReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; } else if (la.kind == 51) { - lexer.NextToken(); - -#line 1926 "cs.ATG" - pexpr = new BaseReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; + Get(); + pexpr = new BaseReferenceExpression(); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; } else if (la.kind == 89) { - NewExpression( -#line 1929 "cs.ATG" -out pexpr); + NewExpression(out pexpr); } else if (la.kind == 115) { - lexer.NextToken(); + Get(); Expect(20); - if ( -#line 1933 "cs.ATG" -NotVoidPointer()) { + if (NotVoidPointer()) { Expect(123); - -#line 1933 "cs.ATG" - type = new TypeReference("System.Void", true); - } else if (StartOf(10)) { - TypeWithRestriction( -#line 1934 "cs.ATG" -out type, true, true); - } else SynErr(206); + type = new TypeReference("System.Void", true); + } else if (StartOf(11)) { + TypeWithRestriction(out type, true, true); + } else SynErr(207); Expect(21); - -#line 1936 "cs.ATG" - pexpr = new TypeOfExpression(type); + pexpr = new TypeOfExpression(type); } else if (la.kind == 63) { - lexer.NextToken(); + Get(); Expect(20); - Type( -#line 1938 "cs.ATG" -out type); + Type(out type); Expect(21); - -#line 1938 "cs.ATG" - pexpr = new DefaultValueExpression(type); + pexpr = new DefaultValueExpression(type); } else if (la.kind == 105) { - lexer.NextToken(); + Get(); Expect(20); - Type( -#line 1939 "cs.ATG" -out type); + Type(out type); Expect(21); - -#line 1939 "cs.ATG" - pexpr = new SizeOfExpression(type); + pexpr = new SizeOfExpression(type); } else if (la.kind == 58) { - lexer.NextToken(); + Get(); Expect(20); - Expr( -#line 1940 "cs.ATG" -out expr); + Expr(out expr); Expect(21); - -#line 1940 "cs.ATG" - pexpr = new CheckedExpression(expr); + pexpr = new CheckedExpression(expr); } else if (la.kind == 118) { - lexer.NextToken(); + Get(); Expect(20); - Expr( -#line 1941 "cs.ATG" -out expr); + Expr(out expr); Expect(21); - -#line 1941 "cs.ATG" - pexpr = new UncheckedExpression(expr); + pexpr = new UncheckedExpression(expr); } else if (la.kind == 64) { - lexer.NextToken(); - AnonymousMethodExpr( -#line 1942 "cs.ATG" -out expr); - -#line 1942 "cs.ATG" - pexpr = expr; - } else SynErr(207); - -#line 1944 "cs.ATG" + Get(); + AnonymousMethodExpr(out expr); + pexpr = expr; + } else SynErr(208); if (pexpr != null) { if (pexpr.StartLocation.IsEmpty) pexpr.StartLocation = startLocation; if (pexpr.EndLocation.IsEmpty) pexpr.EndLocation = t.EndLocation; } - - while (StartOf(35)) { -#line 1952 "cs.ATG" - startLocation = la.Location; + while (StartOf(35)) { + startLocation = la.Location; switch (la.kind) { case 31: { - lexer.NextToken(); - -#line 1954 "cs.ATG" - pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement); + Get(); + pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostIncrement); break; } case 32: { - lexer.NextToken(); - -#line 1956 "cs.ATG" - pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement); + Get(); + pexpr = new UnaryOperatorExpression(pexpr, UnaryOperatorType.PostDecrement); break; } case 47: { - PointerMemberAccess( -#line 1958 "cs.ATG" -out pexpr, pexpr); + PointerMemberAccess(out pexpr, pexpr); break; } case 15: { - MemberAccess( -#line 1959 "cs.ATG" -out pexpr, pexpr); + MemberAccess(out pexpr, pexpr); break; } case 20: { - lexer.NextToken(); - -#line 1963 "cs.ATG" - List parameters = new List(); - -#line 1964 "cs.ATG" - pexpr = new InvocationExpression(pexpr, parameters); + Get(); + List parameters = new List(); + pexpr = new InvocationExpression(pexpr, parameters); if (StartOf(25)) { - Argument( -#line 1965 "cs.ATG" -out expr); - -#line 1965 "cs.ATG" - SafeAdd(pexpr, parameters, expr); + Argument(out expr); + SafeAdd(pexpr, parameters, expr); while (la.kind == 14) { - lexer.NextToken(); - Argument( -#line 1966 "cs.ATG" -out expr); - -#line 1966 "cs.ATG" - SafeAdd(pexpr, parameters, expr); + Get(); + Argument(out expr); + SafeAdd(pexpr, parameters, expr); } } Expect(21); break; } case 18: { - -#line 1972 "cs.ATG" List indices = new List(); pexpr = new IndexerExpression(pexpr, indices); - - lexer.NextToken(); - Expr( -#line 1975 "cs.ATG" -out expr); - -#line 1975 "cs.ATG" - SafeAdd(pexpr, indices, expr); - while (la.kind == 14) { - lexer.NextToken(); - Expr( -#line 1976 "cs.ATG" -out expr); -#line 1976 "cs.ATG" - SafeAdd(pexpr, indices, expr); + Get(); + Expr(out expr); + SafeAdd(pexpr, indices, expr); + while (la.kind == 14) { + Get(); + Expr(out expr); + SafeAdd(pexpr, indices, expr); } Expect(19); break; } } - -#line 1979 "cs.ATG" if (pexpr != null) { if (pexpr.StartLocation.IsEmpty) pexpr.StartLocation = startLocation; if (pexpr.EndLocation.IsEmpty) pexpr.EndLocation = t.EndLocation; } - + } } - void QueryExpression( -#line 2426 "cs.ATG" -out Expression outExpr) { - -#line 2427 "cs.ATG" + void QueryExpression(out Expression outExpr) { QueryExpression q = new QueryExpression(); outExpr = q; q.StartLocation = la.Location; QueryExpressionFromClause fromClause; - - QueryExpressionFromClause( -#line 2431 "cs.ATG" -out fromClause); - -#line 2431 "cs.ATG" - q.FromClause = fromClause; - QueryExpressionBody( -#line 2432 "cs.ATG" -ref q); - -#line 2433 "cs.ATG" + + QueryExpressionFromClause(out fromClause); + q.FromClause = fromClause; + QueryExpressionBody(ref q); q.EndLocation = t.EndLocation; outExpr = q; /* set outExpr to q again if QueryExpressionBody changed it (can happen with 'into' clauses) */ - - } - void ShortedLambdaExpression( -#line 2093 "cs.ATG" -IdentifierExpression ident, out Expression pexpr) { + } -#line 2094 "cs.ATG" - LambdaExpression lambda = new LambdaExpression(); pexpr = lambda; + void ShortedLambdaExpression(IdentifierExpression ident, out Expression pexpr) { + LambdaExpression lambda = new LambdaExpression(); pexpr = lambda; Expect(48); - -#line 2099 "cs.ATG" lambda.StartLocation = ident.StartLocation; SafeAdd(lambda, lambda.Parameters, new ParameterDeclarationExpression(null, ident.Identifier)); lambda.Parameters[0].StartLocation = ident.StartLocation; lambda.Parameters[0].EndLocation = ident.EndLocation; - - LambdaExpressionBody( -#line 2104 "cs.ATG" -lambda); - } - void TypeArgumentList( -#line 2345 "cs.ATG" -out List types, bool canBeUnbound) { + LambdaExpressionBody(lambda); + } -#line 2347 "cs.ATG" + void TypeArgumentList(out List types, bool canBeUnbound) { types = new List(); TypeReference type = null; - - Expect(23); - if ( -#line 2352 "cs.ATG" -canBeUnbound && (la.kind == Tokens.GreaterThan || la.kind == Tokens.Comma)) { -#line 2353 "cs.ATG" - types.Add(TypeReference.Null); + Expect(23); + if (canBeUnbound && (la.kind == Tokens.GreaterThan || la.kind == Tokens.Comma)) { + types.Add(TypeReference.Null); while (la.kind == 14) { - lexer.NextToken(); - -#line 2354 "cs.ATG" - types.Add(TypeReference.Null); + Get(); + types.Add(TypeReference.Null); } - } else if (StartOf(10)) { - Type( -#line 2355 "cs.ATG" -out type); - -#line 2355 "cs.ATG" - if (type != null) { types.Add(type); } + } else if (StartOf(11)) { + Type(out type); + if (type != null) { types.Add(type); } while (la.kind == 14) { - lexer.NextToken(); - Type( -#line 2356 "cs.ATG" -out type); - -#line 2356 "cs.ATG" - if (type != null) { types.Add(type); } + Get(); + Type(out type); + if (type != null) { types.Add(type); } } - } else SynErr(208); + } else SynErr(209); Expect(22); } - void LambdaExpression( -#line 2073 "cs.ATG" -out Expression outExpr) { - -#line 2075 "cs.ATG" + void LambdaExpression(out Expression outExpr) { LambdaExpression lambda = new LambdaExpression(); lambda.StartLocation = la.Location; ParameterDeclarationExpression p; outExpr = lambda; - + Expect(20); if (StartOf(36)) { - LambdaExpressionParameter( -#line 2083 "cs.ATG" -out p); - -#line 2083 "cs.ATG" - SafeAdd(lambda, lambda.Parameters, p); + LambdaExpressionParameter(out p); + SafeAdd(lambda, lambda.Parameters, p); while (la.kind == 14) { - lexer.NextToken(); - LambdaExpressionParameter( -#line 2085 "cs.ATG" -out p); - -#line 2085 "cs.ATG" - SafeAdd(lambda, lambda.Parameters, p); + Get(); + LambdaExpressionParameter(out p); + SafeAdd(lambda, lambda.Parameters, p); } } Expect(21); Expect(48); - LambdaExpressionBody( -#line 2090 "cs.ATG" -lambda); + LambdaExpressionBody(lambda); } - void NewExpression( -#line 2020 "cs.ATG" -out Expression pexpr) { - -#line 2021 "cs.ATG" + void NewExpression(out Expression pexpr) { pexpr = null; List parameters = new List(); TypeReference type = null; Expression expr; - + Expect(89); - if (StartOf(10)) { - NonArrayType( -#line 2028 "cs.ATG" -out type); + if (StartOf(11)) { + NonArrayType(out type); } if (la.kind == 16 || la.kind == 20) { if (la.kind == 20) { - -#line 2034 "cs.ATG" - ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); - lexer.NextToken(); - -#line 2035 "cs.ATG" - if (type == null) Error("Cannot use an anonymous type with arguments for the constructor"); + ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); + Get(); + if (type == null) Error("Cannot use an anonymous type with arguments for the constructor"); if (StartOf(25)) { - Argument( -#line 2036 "cs.ATG" -out expr); - -#line 2036 "cs.ATG" - SafeAdd(oce, parameters, expr); + Argument(out expr); + SafeAdd(oce, parameters, expr); while (la.kind == 14) { - lexer.NextToken(); - Argument( -#line 2037 "cs.ATG" -out expr); - -#line 2037 "cs.ATG" - SafeAdd(oce, parameters, expr); + Get(); + Argument(out expr); + SafeAdd(oce, parameters, expr); } } Expect(21); - -#line 2039 "cs.ATG" - pexpr = oce; + pexpr = oce; if (la.kind == 16) { - CollectionOrObjectInitializer( -#line 2040 "cs.ATG" -out expr); - -#line 2040 "cs.ATG" - oce.ObjectInitializer = (CollectionInitializerExpression)expr; + CollectionOrObjectInitializer(out expr); + oce.ObjectInitializer = (CollectionInitializerExpression)expr; } } else { - -#line 2041 "cs.ATG" - ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); - CollectionOrObjectInitializer( -#line 2042 "cs.ATG" -out expr); - -#line 2042 "cs.ATG" - oce.ObjectInitializer = (CollectionInitializerExpression)expr; - -#line 2043 "cs.ATG" - pexpr = oce; + ObjectCreateExpression oce = new ObjectCreateExpression(type, parameters); + CollectionOrObjectInitializer(out expr); + oce.ObjectInitializer = (CollectionInitializerExpression)expr; + pexpr = oce; } } else if (la.kind == 18) { - lexer.NextToken(); - -#line 2048 "cs.ATG" + Get(); ArrayCreateExpression ace = new ArrayCreateExpression(type); /* we must not change RankSpecifier on the null type reference*/ if (ace.CreateType.IsNull) { ace.CreateType = new TypeReference(""); } pexpr = ace; int dims = 0; List ranks = new List(); - + if (la.kind == 14 || la.kind == 19) { while (la.kind == 14) { - lexer.NextToken(); - -#line 2055 "cs.ATG" - dims += 1; + Get(); + dims += 1; } Expect(19); - -#line 2056 "cs.ATG" - ranks.Add(dims); dims = 0; + ranks.Add(dims); dims = 0; while (la.kind == 18) { - lexer.NextToken(); + Get(); while (la.kind == 14) { - lexer.NextToken(); - -#line 2057 "cs.ATG" - ++dims; + Get(); + ++dims; } Expect(19); - -#line 2057 "cs.ATG" - ranks.Add(dims); dims = 0; + ranks.Add(dims); dims = 0; } - -#line 2058 "cs.ATG" - ace.CreateType.RankSpecifier = ranks.ToArray(); - CollectionInitializer( -#line 2059 "cs.ATG" -out expr); - -#line 2059 "cs.ATG" - ace.ArrayInitializer = (CollectionInitializerExpression)expr; + ace.CreateType.RankSpecifier = ranks.ToArray(); + CollectionInitializer(out expr); + ace.ArrayInitializer = (CollectionInitializerExpression)expr; } else if (StartOf(6)) { - Expr( -#line 2060 "cs.ATG" -out expr); - -#line 2060 "cs.ATG" - if (expr != null) parameters.Add(expr); + Expr(out expr); + if (expr != null) parameters.Add(expr); while (la.kind == 14) { - lexer.NextToken(); - -#line 2061 "cs.ATG" - dims += 1; - Expr( -#line 2062 "cs.ATG" -out expr); - -#line 2062 "cs.ATG" - if (expr != null) parameters.Add(expr); + Get(); + dims += 1; + Expr(out expr); + if (expr != null) parameters.Add(expr); } Expect(19); - -#line 2064 "cs.ATG" - ranks.Add(dims); ace.Arguments = parameters; dims = 0; + ranks.Add(dims); ace.Arguments = parameters; dims = 0; while (la.kind == 18) { - lexer.NextToken(); + Get(); while (la.kind == 14) { - lexer.NextToken(); - -#line 2065 "cs.ATG" - ++dims; + Get(); + ++dims; } Expect(19); - -#line 2065 "cs.ATG" - ranks.Add(dims); dims = 0; + ranks.Add(dims); dims = 0; } - -#line 2066 "cs.ATG" - ace.CreateType.RankSpecifier = ranks.ToArray(); + ace.CreateType.RankSpecifier = ranks.ToArray(); if (la.kind == 16) { - CollectionInitializer( -#line 2067 "cs.ATG" -out expr); - -#line 2067 "cs.ATG" - ace.ArrayInitializer = (CollectionInitializerExpression)expr; + CollectionInitializer(out expr); + ace.ArrayInitializer = (CollectionInitializerExpression)expr; } - } else SynErr(209); - } else SynErr(210); + } else SynErr(210); + } else SynErr(211); } - void AnonymousMethodExpr( -#line 2140 "cs.ATG" -out Expression outExpr) { - -#line 2142 "cs.ATG" + void AnonymousMethodExpr(out Expression outExpr) { AnonymousMethodExpression expr = new AnonymousMethodExpression(); expr.StartLocation = t.Location; BlockStatement stmt; List p = new List(); outExpr = expr; - - if (la.kind == 20) { - lexer.NextToken(); - if (StartOf(11)) { - FormalParameterList( -#line 2151 "cs.ATG" -p); -#line 2151 "cs.ATG" - expr.Parameters = p; + if (la.kind == 20) { + Get(); + if (StartOf(12)) { + FormalParameterList(p); + expr.Parameters = p; } Expect(21); - -#line 2153 "cs.ATG" - expr.HasParameterList = true; + expr.HasParameterList = true; } - BlockInsideExpression( -#line 2155 "cs.ATG" -out stmt); - -#line 2155 "cs.ATG" - expr.Body = stmt; - -#line 2156 "cs.ATG" - expr.EndLocation = t.Location; + BlockInsideExpression(out stmt); + expr.Body = stmt; + expr.EndLocation = t.Location; } - void PointerMemberAccess( -#line 2008 "cs.ATG" -out Expression expr, Expression target) { - -#line 2009 "cs.ATG" - List typeList; + void PointerMemberAccess(out Expression expr, Expression target) { + List typeList; Expect(47); Identifier(); - -#line 2013 "cs.ATG" - expr = new PointerReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation; - if ( -#line 2014 "cs.ATG" -IsGenericInSimpleNameOrMemberAccess()) { - TypeArgumentList( -#line 2015 "cs.ATG" -out typeList, false); - -#line 2016 "cs.ATG" - ((MemberReferenceExpression)expr).TypeArguments = typeList; + expr = new PointerReferenceExpression(target, t.val); expr.StartLocation = t.Location; expr.EndLocation = t.EndLocation; + if (IsGenericInSimpleNameOrMemberAccess()) { + TypeArgumentList(out typeList, false); + ((MemberReferenceExpression)expr).TypeArguments = typeList; } } - void MemberAccess( -#line 1989 "cs.ATG" -out Expression expr, Expression target) { - -#line 1990 "cs.ATG" - List typeList; - -#line 1992 "cs.ATG" + void MemberAccess(out Expression expr, Expression target) { + List typeList; if (ShouldConvertTargetExpressionToTypeReference(target)) { TypeReference type = GetTypeReferenceFromExpression(target); if (type != null) { target = new TypeReferenceExpression(type) { StartLocation = t.Location, EndLocation = t.EndLocation }; } } - - Expect(15); -#line 1999 "cs.ATG" - Location startLocation = t.Location; + Expect(15); + Location startLocation = t.Location; Identifier(); - -#line 2001 "cs.ATG" - expr = new MemberReferenceExpression(target, t.val); expr.StartLocation = startLocation; expr.EndLocation = t.EndLocation; - if ( -#line 2002 "cs.ATG" -IsGenericInSimpleNameOrMemberAccess()) { - TypeArgumentList( -#line 2003 "cs.ATG" -out typeList, false); - -#line 2004 "cs.ATG" - ((MemberReferenceExpression)expr).TypeArguments = typeList; + expr = new MemberReferenceExpression(target, t.val); expr.StartLocation = startLocation; expr.EndLocation = t.EndLocation; + if (IsGenericInSimpleNameOrMemberAccess()) { + TypeArgumentList(out typeList, false); + ((MemberReferenceExpression)expr).TypeArguments = typeList; } } - void LambdaExpressionParameter( -#line 2107 "cs.ATG" -out ParameterDeclarationExpression p) { - -#line 2108 "cs.ATG" + void LambdaExpressionParameter(out ParameterDeclarationExpression p) { Location start = la.Location; p = null; TypeReference type; ParameterModifiers mod = ParameterModifiers.In; - - if ( -#line 2113 "cs.ATG" -Peek(1).kind == Tokens.Comma || Peek(1).kind == Tokens.CloseParenthesis) { - Identifier(); -#line 2115 "cs.ATG" + if (Peek(1).kind == Tokens.Comma || Peek(1).kind == Tokens.CloseParenthesis) { + Identifier(); p = new ParameterDeclarationExpression(null, t.val); p.StartLocation = start; p.EndLocation = t.EndLocation; - + } else if (StartOf(36)) { if (la.kind == 93 || la.kind == 100) { if (la.kind == 100) { - lexer.NextToken(); - -#line 2118 "cs.ATG" - mod = ParameterModifiers.Ref; + Get(); + mod = ParameterModifiers.Ref; } else { - lexer.NextToken(); - -#line 2119 "cs.ATG" - mod = ParameterModifiers.Out; + Get(); + mod = ParameterModifiers.Out; } } - Type( -#line 2121 "cs.ATG" -out type); + Type(out type); Identifier(); - -#line 2123 "cs.ATG" p = new ParameterDeclarationExpression(type, t.val, mod); p.StartLocation = start; p.EndLocation = t.EndLocation; - - } else SynErr(211); - } - - void LambdaExpressionBody( -#line 2129 "cs.ATG" -LambdaExpression lambda) { - -#line 2130 "cs.ATG" - Expression expr; BlockStatement stmt; - if (la.kind == 16) { - BlockInsideExpression( -#line 2133 "cs.ATG" -out stmt); - -#line 2133 "cs.ATG" - lambda.StatementBody = stmt; - } else if (StartOf(6)) { - Expr( -#line 2134 "cs.ATG" -out expr); -#line 2134 "cs.ATG" - lambda.ExpressionBody = expr; } else SynErr(212); - -#line 2136 "cs.ATG" - lambda.EndLocation = t.EndLocation; - -#line 2137 "cs.ATG" - lambda.ExtendedEndLocation = la.Location; } - void BlockInsideExpression( -#line 2159 "cs.ATG" -out BlockStatement outStmt) { - -#line 2160 "cs.ATG" - Statement stmt = null; outStmt = null; - -#line 2164 "cs.ATG" - if (compilationUnit != null) { - Block( -#line 2165 "cs.ATG" -out stmt); - -#line 2165 "cs.ATG" - outStmt = (BlockStatement)stmt; - -#line 2166 "cs.ATG" - } else { + void LambdaExpressionBody(LambdaExpression lambda) { + Expression expr; BlockStatement stmt; + if (la.kind == 16) { + BlockInsideExpression(out stmt); + lambda.StatementBody = stmt; + } else if (StartOf(6)) { + Expr(out expr); + lambda.ExpressionBody = expr; + } else SynErr(213); + lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; + } + + void BlockInsideExpression(out BlockStatement outStmt) { + Statement stmt = null; outStmt = null; + if (compilationUnit != null) { + Block(out stmt); + outStmt = (BlockStatement)stmt; + } else { Expect(16); - -#line 2168 "cs.ATG" - lexer.SkipCurrentBlock(0); + lexer.SkipCurrentBlock(0); Expect(17); - -#line 2170 "cs.ATG" - } + } } - void ConditionalAndExpr( -#line 2179 "cs.ATG" -ref Expression outExpr) { - -#line 2180 "cs.ATG" - Expression expr; - InclusiveOrExpr( -#line 2182 "cs.ATG" -ref outExpr); + void ConditionalAndExpr(ref Expression outExpr) { + Expression expr; + InclusiveOrExpr(ref outExpr); while (la.kind == 25) { - lexer.NextToken(); - UnaryExpr( -#line 2182 "cs.ATG" -out expr); - InclusiveOrExpr( -#line 2182 "cs.ATG" -ref expr); - -#line 2182 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr); + Get(); + UnaryExpr(out expr); + InclusiveOrExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.LogicalAnd, expr); } } - void InclusiveOrExpr( -#line 2185 "cs.ATG" -ref Expression outExpr) { - -#line 2186 "cs.ATG" - Expression expr; - ExclusiveOrExpr( -#line 2188 "cs.ATG" -ref outExpr); + void InclusiveOrExpr(ref Expression outExpr) { + Expression expr; + ExclusiveOrExpr(ref outExpr); while (la.kind == 29) { - lexer.NextToken(); - UnaryExpr( -#line 2188 "cs.ATG" -out expr); - ExclusiveOrExpr( -#line 2188 "cs.ATG" -ref expr); - -#line 2188 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr); + Get(); + UnaryExpr(out expr); + ExclusiveOrExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseOr, expr); } } - void ExclusiveOrExpr( -#line 2191 "cs.ATG" -ref Expression outExpr) { - -#line 2192 "cs.ATG" - Expression expr; - AndExpr( -#line 2194 "cs.ATG" -ref outExpr); + void ExclusiveOrExpr(ref Expression outExpr) { + Expression expr; + AndExpr(ref outExpr); while (la.kind == 30) { - lexer.NextToken(); - UnaryExpr( -#line 2194 "cs.ATG" -out expr); - AndExpr( -#line 2194 "cs.ATG" -ref expr); - -#line 2194 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr); + Get(); + UnaryExpr(out expr); + AndExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.ExclusiveOr, expr); } } - void AndExpr( -#line 2197 "cs.ATG" -ref Expression outExpr) { - -#line 2198 "cs.ATG" - Expression expr; - EqualityExpr( -#line 2200 "cs.ATG" -ref outExpr); + void AndExpr(ref Expression outExpr) { + Expression expr; + EqualityExpr(ref outExpr); while (la.kind == 28) { - lexer.NextToken(); - UnaryExpr( -#line 2200 "cs.ATG" -out expr); - EqualityExpr( -#line 2200 "cs.ATG" -ref expr); - -#line 2200 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr); + Get(); + UnaryExpr(out expr); + EqualityExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.BitwiseAnd, expr); } } - void EqualityExpr( -#line 2203 "cs.ATG" -ref Expression outExpr) { - -#line 2205 "cs.ATG" + void EqualityExpr(ref Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - RelationalExpr( -#line 2209 "cs.ATG" -ref outExpr); + + RelationalExpr(ref outExpr); while (la.kind == 33 || la.kind == 34) { if (la.kind == 34) { - lexer.NextToken(); - -#line 2212 "cs.ATG" - op = BinaryOperatorType.InEquality; + Get(); + op = BinaryOperatorType.InEquality; } else { - lexer.NextToken(); - -#line 2213 "cs.ATG" - op = BinaryOperatorType.Equality; + Get(); + op = BinaryOperatorType.Equality; } - UnaryExpr( -#line 2215 "cs.ATG" -out expr); - RelationalExpr( -#line 2215 "cs.ATG" -ref expr); - -#line 2215 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + UnaryExpr(out expr); + RelationalExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void RelationalExpr( -#line 2219 "cs.ATG" -ref Expression outExpr) { - -#line 2221 "cs.ATG" + void RelationalExpr(ref Expression outExpr) { TypeReference type; Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - ShiftExpr( -#line 2226 "cs.ATG" -ref outExpr); + + ShiftExpr(ref outExpr); while (StartOf(37)) { if (StartOf(38)) { if (la.kind == 23) { - lexer.NextToken(); - -#line 2228 "cs.ATG" - op = BinaryOperatorType.LessThan; + Get(); + op = BinaryOperatorType.LessThan; } else if (la.kind == 22) { - lexer.NextToken(); - -#line 2229 "cs.ATG" - op = BinaryOperatorType.GreaterThan; + Get(); + op = BinaryOperatorType.GreaterThan; } else if (la.kind == 36) { - lexer.NextToken(); - -#line 2230 "cs.ATG" - op = BinaryOperatorType.LessThanOrEqual; - } else if (la.kind == 35) { - lexer.NextToken(); - -#line 2231 "cs.ATG" - op = BinaryOperatorType.GreaterThanOrEqual; - } else SynErr(213); - UnaryExpr( -#line 2233 "cs.ATG" -out expr); - ShiftExpr( -#line 2234 "cs.ATG" -ref expr); - -#line 2235 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + Get(); + op = BinaryOperatorType.LessThanOrEqual; + } else { + Get(); + op = BinaryOperatorType.GreaterThanOrEqual; + } + UnaryExpr(out expr); + ShiftExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } else { if (la.kind == 85) { - lexer.NextToken(); - TypeWithRestriction( -#line 2238 "cs.ATG" -out type, false, false); - if ( -#line 2239 "cs.ATG" -la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) { - NullableQuestionMark( -#line 2240 "cs.ATG" -ref type); + Get(); + TypeWithRestriction(out type, false, false); + if (la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) { + NullableQuestionMark(ref type); } - -#line 2241 "cs.ATG" - outExpr = new TypeOfIsExpression(outExpr, type); - } else if (la.kind == 50) { - lexer.NextToken(); - TypeWithRestriction( -#line 2243 "cs.ATG" -out type, false, false); - if ( -#line 2244 "cs.ATG" -la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) { - NullableQuestionMark( -#line 2245 "cs.ATG" -ref type); + outExpr = new TypeOfIsExpression(outExpr, type); + } else { + Get(); + TypeWithRestriction(out type, false, false); + if (la.kind == Tokens.Question && !IsPossibleExpressionStart(Peek(1).kind)) { + NullableQuestionMark(ref type); } - -#line 2246 "cs.ATG" - outExpr = new CastExpression(type, outExpr, CastType.TryCast); - } else SynErr(214); + outExpr = new CastExpression(type, outExpr, CastType.TryCast); + } } } } - void ShiftExpr( -#line 2251 "cs.ATG" -ref Expression outExpr) { - -#line 2253 "cs.ATG" + void ShiftExpr(ref Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - AdditiveExpr( -#line 2257 "cs.ATG" -ref outExpr); - while (la.kind == 37 || -#line 2260 "cs.ATG" -IsShiftRight()) { - if (la.kind == 37) { - lexer.NextToken(); -#line 2259 "cs.ATG" - op = BinaryOperatorType.ShiftLeft; + AdditiveExpr(ref outExpr); + while (la.kind == 22 || la.kind == 37) { + if (la.kind == 37) { + Get(); + op = BinaryOperatorType.ShiftLeft; } else { Expect(22); Expect(22); - -#line 2261 "cs.ATG" - op = BinaryOperatorType.ShiftRight; + op = BinaryOperatorType.ShiftRight; } - UnaryExpr( -#line 2264 "cs.ATG" -out expr); - AdditiveExpr( -#line 2264 "cs.ATG" -ref expr); - -#line 2264 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + UnaryExpr(out expr); + AdditiveExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void AdditiveExpr( -#line 2268 "cs.ATG" -ref Expression outExpr) { - -#line 2270 "cs.ATG" + void AdditiveExpr(ref Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - MultiplicativeExpr( -#line 2274 "cs.ATG" -ref outExpr); + + MultiplicativeExpr(ref outExpr); while (la.kind == 4 || la.kind == 5) { if (la.kind == 4) { - lexer.NextToken(); - -#line 2277 "cs.ATG" - op = BinaryOperatorType.Add; + Get(); + op = BinaryOperatorType.Add; } else { - lexer.NextToken(); - -#line 2278 "cs.ATG" - op = BinaryOperatorType.Subtract; + Get(); + op = BinaryOperatorType.Subtract; } - UnaryExpr( -#line 2280 "cs.ATG" -out expr); - MultiplicativeExpr( -#line 2280 "cs.ATG" -ref expr); - -#line 2280 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + UnaryExpr(out expr); + MultiplicativeExpr(ref expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void MultiplicativeExpr( -#line 2284 "cs.ATG" -ref Expression outExpr) { - -#line 2286 "cs.ATG" + void MultiplicativeExpr(ref Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - + while (la.kind == 6 || la.kind == 7 || la.kind == 8) { if (la.kind == 6) { - lexer.NextToken(); - -#line 2292 "cs.ATG" - op = BinaryOperatorType.Multiply; + Get(); + op = BinaryOperatorType.Multiply; } else if (la.kind == 7) { - lexer.NextToken(); - -#line 2293 "cs.ATG" - op = BinaryOperatorType.Divide; + Get(); + op = BinaryOperatorType.Divide; } else { - lexer.NextToken(); - -#line 2294 "cs.ATG" - op = BinaryOperatorType.Modulus; + Get(); + op = BinaryOperatorType.Modulus; } - UnaryExpr( -#line 2296 "cs.ATG" -out expr); - -#line 2296 "cs.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + UnaryExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void VariantTypeParameter( -#line 2374 "cs.ATG" -out TemplateDefinition typeParameter) { - -#line 2376 "cs.ATG" + void VariantTypeParameter(out TemplateDefinition typeParameter) { typeParameter = new TemplateDefinition(); AttributeSection section; - - while (la.kind == 18) { - AttributeSection( -#line 2380 "cs.ATG" -out section); -#line 2380 "cs.ATG" - typeParameter.Attributes.Add(section); + while (la.kind == 18) { + AttributeSection(out section); + typeParameter.Attributes.Add(section); } if (la.kind == 81 || la.kind == 93) { if (la.kind == 81) { - lexer.NextToken(); - -#line 2382 "cs.ATG" - typeParameter.VarianceModifier = VarianceModifier.Contravariant; + Get(); + typeParameter.VarianceModifier = VarianceModifier.Contravariant; } else { - lexer.NextToken(); - -#line 2383 "cs.ATG" - typeParameter.VarianceModifier = VarianceModifier.Covariant; + Get(); + typeParameter.VarianceModifier = VarianceModifier.Covariant; } } Identifier(); - -#line 2385 "cs.ATG" - typeParameter.Name = t.val; typeParameter.StartLocation = t.Location; - -#line 2386 "cs.ATG" - typeParameter.EndLocation = t.EndLocation; + typeParameter.Name = t.val; typeParameter.StartLocation = t.Location; + typeParameter.EndLocation = t.EndLocation; } - void TypeParameterConstraintsClauseBase( -#line 2417 "cs.ATG" -out TypeReference type) { - -#line 2418 "cs.ATG" - TypeReference t; type = null; + void TypeParameterConstraintsClauseBase(out TypeReference type) { + TypeReference t; type = null; if (la.kind == 109) { - lexer.NextToken(); - -#line 2420 "cs.ATG" - type = TypeReference.StructConstraint; + Get(); + type = TypeReference.StructConstraint; } else if (la.kind == 59) { - lexer.NextToken(); - -#line 2421 "cs.ATG" - type = TypeReference.ClassConstraint; + Get(); + type = TypeReference.ClassConstraint; } else if (la.kind == 89) { - lexer.NextToken(); + Get(); Expect(20); Expect(21); - -#line 2422 "cs.ATG" - type = TypeReference.NewConstraint; - } else if (StartOf(10)) { - Type( -#line 2423 "cs.ATG" -out t); - -#line 2423 "cs.ATG" - type = t; - } else SynErr(215); + type = TypeReference.NewConstraint; + } else if (StartOf(11)) { + Type(out t); + type = t; + } else SynErr(214); } - void QueryExpressionFromClause( -#line 2438 "cs.ATG" -out QueryExpressionFromClause fc) { - -#line 2439 "cs.ATG" + void QueryExpressionFromClause(out QueryExpressionFromClause fc) { fc = new QueryExpressionFromClause(); fc.StartLocation = la.Location; CollectionRangeVariable variable; - - Expect(137); - QueryExpressionFromOrJoinClause( -#line 2445 "cs.ATG" -out variable); -#line 2446 "cs.ATG" + Expect(137); + QueryExpressionFromOrJoinClause(out variable); fc.EndLocation = t.EndLocation; fc.Sources.Add(variable); - - } - void QueryExpressionBody( -#line 2482 "cs.ATG" -ref QueryExpression q) { + } -#line 2483 "cs.ATG" + void QueryExpressionBody(ref QueryExpression q) { QueryExpressionFromClause fromClause; QueryExpressionWhereClause whereClause; QueryExpressionLetClause letClause; QueryExpressionJoinClause joinClause; QueryExpressionOrderClause orderClause; QueryExpressionSelectClause selectClause; QueryExpressionGroupClause groupClause; - + while (StartOf(39)) { if (la.kind == 137) { - QueryExpressionFromClause( -#line 2489 "cs.ATG" -out fromClause); - -#line 2489 "cs.ATG" - SafeAdd(q, q.MiddleClauses, fromClause); + QueryExpressionFromClause(out fromClause); + SafeAdd(q, q.MiddleClauses, fromClause); } else if (la.kind == 127) { - QueryExpressionWhereClause( -#line 2490 "cs.ATG" -out whereClause); - -#line 2490 "cs.ATG" - SafeAdd(q, q.MiddleClauses, whereClause); + QueryExpressionWhereClause(out whereClause); + SafeAdd(q, q.MiddleClauses, whereClause); } else if (la.kind == 141) { - QueryExpressionLetClause( -#line 2491 "cs.ATG" -out letClause); - -#line 2491 "cs.ATG" - SafeAdd(q, q.MiddleClauses, letClause); + QueryExpressionLetClause(out letClause); + SafeAdd(q, q.MiddleClauses, letClause); } else if (la.kind == 142) { - QueryExpressionJoinClause( -#line 2492 "cs.ATG" -out joinClause); - -#line 2492 "cs.ATG" - SafeAdd(q, q.MiddleClauses, joinClause); + QueryExpressionJoinClause(out joinClause); + SafeAdd(q, q.MiddleClauses, joinClause); } else { - QueryExpressionOrderByClause( -#line 2493 "cs.ATG" -out orderClause); - -#line 2493 "cs.ATG" - SafeAdd(q, q.MiddleClauses, orderClause); + QueryExpressionOrderByClause(out orderClause); + SafeAdd(q, q.MiddleClauses, orderClause); } } if (la.kind == 133) { - QueryExpressionSelectClause( -#line 2495 "cs.ATG" -out selectClause); - -#line 2495 "cs.ATG" - q.SelectOrGroupClause = selectClause; + QueryExpressionSelectClause(out selectClause); + q.SelectOrGroupClause = selectClause; } else if (la.kind == 134) { - QueryExpressionGroupClause( -#line 2496 "cs.ATG" -out groupClause); - -#line 2496 "cs.ATG" - q.SelectOrGroupClause = groupClause; - } else SynErr(216); + QueryExpressionGroupClause(out groupClause); + q.SelectOrGroupClause = groupClause; + } else SynErr(215); if (la.kind == 136) { - QueryExpressionIntoClause( -#line 2498 "cs.ATG" -ref q); + QueryExpressionIntoClause(ref q); } } - void QueryExpressionFromOrJoinClause( -#line 2472 "cs.ATG" -out CollectionRangeVariable variable) { - -#line 2473 "cs.ATG" - TypeReference type; Expression expr; variable = new CollectionRangeVariable(); - -#line 2475 "cs.ATG" - variable.Type = null; - if ( -#line 2476 "cs.ATG" -IsLocalVarDecl()) { - Type( -#line 2476 "cs.ATG" -out type); - -#line 2476 "cs.ATG" - variable.Type = type; + void QueryExpressionFromOrJoinClause(out CollectionRangeVariable variable) { + TypeReference type; Expression expr; variable = new CollectionRangeVariable(); + variable.Type = null; + if (IsLocalVarDecl()) { + Type(out type); + variable.Type = type; } Identifier(); - -#line 2477 "cs.ATG" - variable.Identifier = t.val; + variable.Identifier = t.val; Expect(81); - Expr( -#line 2479 "cs.ATG" -out expr); - -#line 2479 "cs.ATG" - variable.Expression = expr; + Expr(out expr); + variable.Expression = expr; } - void QueryExpressionJoinClause( -#line 2451 "cs.ATG" -out QueryExpressionJoinClause jc) { - -#line 2452 "cs.ATG" + void QueryExpressionJoinClause(out QueryExpressionJoinClause jc) { jc = new QueryExpressionJoinClause(); jc.StartLocation = la.Location; Expression expr; CollectionRangeVariable variable; - + Expect(142); - QueryExpressionFromOrJoinClause( -#line 2458 "cs.ATG" -out variable); + QueryExpressionFromOrJoinClause(out variable); Expect(143); - Expr( -#line 2460 "cs.ATG" -out expr); - -#line 2460 "cs.ATG" - jc.OnExpression = expr; + Expr(out expr); + jc.OnExpression = expr; Expect(144); - Expr( -#line 2462 "cs.ATG" -out expr); - -#line 2462 "cs.ATG" - jc.EqualsExpression = expr; + Expr(out expr); + jc.EqualsExpression = expr; if (la.kind == 136) { - lexer.NextToken(); + Get(); Identifier(); - -#line 2464 "cs.ATG" - jc.IntoIdentifier = t.val; + jc.IntoIdentifier = t.val; } - -#line 2467 "cs.ATG" jc.EndLocation = t.EndLocation; jc.Source = variable; - - } - void QueryExpressionWhereClause( -#line 2501 "cs.ATG" -out QueryExpressionWhereClause wc) { + } -#line 2502 "cs.ATG" - Expression expr; wc = new QueryExpressionWhereClause(); wc.StartLocation = la.Location; + void QueryExpressionWhereClause(out QueryExpressionWhereClause wc) { + Expression expr; wc = new QueryExpressionWhereClause(); wc.StartLocation = la.Location; Expect(127); - Expr( -#line 2505 "cs.ATG" -out expr); - -#line 2505 "cs.ATG" - wc.Condition = expr; - -#line 2506 "cs.ATG" - wc.EndLocation = t.EndLocation; + Expr(out expr); + wc.Condition = expr; + wc.EndLocation = t.EndLocation; } - void QueryExpressionLetClause( -#line 2509 "cs.ATG" -out QueryExpressionLetClause wc) { - -#line 2510 "cs.ATG" - Expression expr; wc = new QueryExpressionLetClause(); wc.StartLocation = la.Location; + void QueryExpressionLetClause(out QueryExpressionLetClause wc) { + Expression expr; wc = new QueryExpressionLetClause(); wc.StartLocation = la.Location; Expect(141); Identifier(); - -#line 2513 "cs.ATG" - wc.Identifier = t.val; + wc.Identifier = t.val; Expect(3); - Expr( -#line 2515 "cs.ATG" -out expr); - -#line 2515 "cs.ATG" - wc.Expression = expr; - -#line 2516 "cs.ATG" - wc.EndLocation = t.EndLocation; + Expr(out expr); + wc.Expression = expr; + wc.EndLocation = t.EndLocation; } - void QueryExpressionOrderByClause( -#line 2519 "cs.ATG" -out QueryExpressionOrderClause oc) { - -#line 2520 "cs.ATG" - QueryExpressionOrdering ordering; oc = new QueryExpressionOrderClause(); oc.StartLocation = la.Location; + void QueryExpressionOrderByClause(out QueryExpressionOrderClause oc) { + QueryExpressionOrdering ordering; oc = new QueryExpressionOrderClause(); oc.StartLocation = la.Location; Expect(140); - QueryExpressionOrdering( -#line 2523 "cs.ATG" -out ordering); - -#line 2523 "cs.ATG" - SafeAdd(oc, oc.Orderings, ordering); + QueryExpressionOrdering(out ordering); + SafeAdd(oc, oc.Orderings, ordering); while (la.kind == 14) { - lexer.NextToken(); - QueryExpressionOrdering( -#line 2525 "cs.ATG" -out ordering); - -#line 2525 "cs.ATG" - SafeAdd(oc, oc.Orderings, ordering); + Get(); + QueryExpressionOrdering(out ordering); + SafeAdd(oc, oc.Orderings, ordering); } - -#line 2527 "cs.ATG" - oc.EndLocation = t.EndLocation; + oc.EndLocation = t.EndLocation; } - void QueryExpressionSelectClause( -#line 2540 "cs.ATG" -out QueryExpressionSelectClause sc) { - -#line 2541 "cs.ATG" - Expression expr; sc = new QueryExpressionSelectClause(); sc.StartLocation = la.Location; + void QueryExpressionSelectClause(out QueryExpressionSelectClause sc) { + Expression expr; sc = new QueryExpressionSelectClause(); sc.StartLocation = la.Location; Expect(133); - Expr( -#line 2544 "cs.ATG" -out expr); - -#line 2544 "cs.ATG" - sc.Projection = expr; - -#line 2545 "cs.ATG" - sc.EndLocation = t.EndLocation; + Expr(out expr); + sc.Projection = expr; + sc.EndLocation = t.EndLocation; } - void QueryExpressionGroupClause( -#line 2548 "cs.ATG" -out QueryExpressionGroupClause gc) { - -#line 2549 "cs.ATG" - Expression expr; gc = new QueryExpressionGroupClause(); gc.StartLocation = la.Location; + void QueryExpressionGroupClause(out QueryExpressionGroupClause gc) { + Expression expr; gc = new QueryExpressionGroupClause(); gc.StartLocation = la.Location; Expect(134); - Expr( -#line 2552 "cs.ATG" -out expr); - -#line 2552 "cs.ATG" - gc.Projection = expr; + Expr(out expr); + gc.Projection = expr; Expect(135); - Expr( -#line 2554 "cs.ATG" -out expr); - -#line 2554 "cs.ATG" - gc.GroupBy = expr; - -#line 2555 "cs.ATG" - gc.EndLocation = t.EndLocation; + Expr(out expr); + gc.GroupBy = expr; + gc.EndLocation = t.EndLocation; } - void QueryExpressionIntoClause( -#line 2558 "cs.ATG" -ref QueryExpression q) { - -#line 2559 "cs.ATG" + void QueryExpressionIntoClause(ref QueryExpression q) { QueryExpression firstQuery = q; QueryExpression continuedQuery = new QueryExpression(); continuedQuery.StartLocation = q.StartLocation; @@ -5862,48 +3536,28 @@ ref QueryExpression q) { fromVariable.Expression = firstQuery; continuedQuery.IsQueryContinuation = true; q = continuedQuery; - + Expect(136); Identifier(); - -#line 2574 "cs.ATG" - fromVariable.Identifier = t.val; - -#line 2575 "cs.ATG" - continuedQuery.FromClause.EndLocation = t.EndLocation; - QueryExpressionBody( -#line 2576 "cs.ATG" -ref q); + fromVariable.Identifier = t.val; + continuedQuery.FromClause.EndLocation = t.EndLocation; + QueryExpressionBody(ref q); } - void QueryExpressionOrdering( -#line 2530 "cs.ATG" -out QueryExpressionOrdering ordering) { - -#line 2531 "cs.ATG" - Expression expr; ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location; - Expr( -#line 2533 "cs.ATG" -out expr); - -#line 2533 "cs.ATG" - ordering.Criteria = expr; + void QueryExpressionOrdering(out QueryExpressionOrdering ordering) { + Expression expr; ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location; + Expr(out expr); + ordering.Criteria = expr; if (la.kind == 138 || la.kind == 139) { if (la.kind == 138) { - lexer.NextToken(); - -#line 2534 "cs.ATG" - ordering.Direction = QueryExpressionOrderingDirection.Ascending; + Get(); + ordering.Direction = QueryExpressionOrderingDirection.Ascending; } else { - lexer.NextToken(); - -#line 2535 "cs.ATG" - ordering.Direction = QueryExpressionOrderingDirection.Descending; + Get(); + ordering.Direction = QueryExpressionOrderingDirection.Descending; } } - -#line 2537 "cs.ATG" - ordering.EndLocation = t.EndLocation; + ordering.EndLocation = t.EndLocation; } @@ -5911,284 +3565,288 @@ out expr); void ParseRoot() { CS(); + Expect(0); // expect end-of-file automatically added } - protected override void SynErr(int line, int col, int errorNumber) - { - string s; - switch (errorNumber) { - case 0: s = "EOF expected"; break; - case 1: s = "ident expected"; break; - case 2: s = "Literal expected"; break; - case 3: s = "\"=\" expected"; break; - case 4: s = "\"+\" expected"; break; - case 5: s = "\"-\" expected"; break; - case 6: s = "\"*\" expected"; break; - case 7: s = "\"/\" expected"; break; - case 8: s = "\"%\" expected"; break; - case 9: s = "\":\" expected"; break; - case 10: s = "\"::\" expected"; break; - case 11: s = "\";\" expected"; break; - case 12: s = "\"?\" expected"; break; - case 13: s = "\"??\" expected"; break; - case 14: s = "\",\" expected"; break; - case 15: s = "\".\" expected"; break; - case 16: s = "\"{\" expected"; break; - case 17: s = "\"}\" expected"; break; - case 18: s = "\"[\" expected"; break; - case 19: s = "\"]\" expected"; break; - case 20: s = "\"(\" expected"; break; - case 21: s = "\")\" expected"; break; - case 22: s = "\">\" expected"; break; - case 23: s = "\"<\" expected"; break; - case 24: s = "\"!\" expected"; break; - case 25: s = "\"&&\" expected"; break; - case 26: s = "\"||\" expected"; break; - case 27: s = "\"~\" expected"; break; - case 28: s = "\"&\" expected"; break; - case 29: s = "\"|\" expected"; break; - case 30: s = "\"^\" expected"; break; - case 31: s = "\"++\" expected"; break; - case 32: s = "\"--\" expected"; break; - case 33: s = "\"==\" expected"; break; - case 34: s = "\"!=\" expected"; break; - case 35: s = "\">=\" expected"; break; - case 36: s = "\"<=\" expected"; break; - case 37: s = "\"<<\" expected"; break; - case 38: s = "\"+=\" expected"; break; - case 39: s = "\"-=\" expected"; break; - case 40: s = "\"*=\" expected"; break; - case 41: s = "\"/=\" expected"; break; - case 42: s = "\"%=\" expected"; break; - case 43: s = "\"&=\" expected"; break; - case 44: s = "\"|=\" expected"; break; - case 45: s = "\"^=\" expected"; break; - case 46: s = "\"<<=\" expected"; break; - case 47: s = "\"->\" expected"; break; - case 48: s = "\"=>\" expected"; break; - case 49: s = "\"abstract\" expected"; break; - case 50: s = "\"as\" expected"; break; - case 51: s = "\"base\" expected"; break; - case 52: s = "\"bool\" expected"; break; - case 53: s = "\"break\" expected"; break; - case 54: s = "\"byte\" expected"; break; - case 55: s = "\"case\" expected"; break; - case 56: s = "\"catch\" expected"; break; - case 57: s = "\"char\" expected"; break; - case 58: s = "\"checked\" expected"; break; - case 59: s = "\"class\" expected"; break; - case 60: s = "\"const\" expected"; break; - case 61: s = "\"continue\" expected"; break; - case 62: s = "\"decimal\" expected"; break; - case 63: s = "\"default\" expected"; break; - case 64: s = "\"delegate\" expected"; break; - case 65: s = "\"do\" expected"; break; - case 66: s = "\"double\" expected"; break; - case 67: s = "\"else\" expected"; break; - case 68: s = "\"enum\" expected"; break; - case 69: s = "\"event\" expected"; break; - case 70: s = "\"explicit\" expected"; break; - case 71: s = "\"extern\" expected"; break; - case 72: s = "\"false\" expected"; break; - case 73: s = "\"finally\" expected"; break; - case 74: s = "\"fixed\" expected"; break; - case 75: s = "\"float\" expected"; break; - case 76: s = "\"for\" expected"; break; - case 77: s = "\"foreach\" expected"; break; - case 78: s = "\"goto\" expected"; break; - case 79: s = "\"if\" expected"; break; - case 80: s = "\"implicit\" expected"; break; - case 81: s = "\"in\" expected"; break; - case 82: s = "\"int\" expected"; break; - case 83: s = "\"interface\" expected"; break; - case 84: s = "\"internal\" expected"; break; - case 85: s = "\"is\" expected"; break; - case 86: s = "\"lock\" expected"; break; - case 87: s = "\"long\" expected"; break; - case 88: s = "\"namespace\" expected"; break; - case 89: s = "\"new\" expected"; break; - case 90: s = "\"null\" expected"; break; - case 91: s = "\"object\" expected"; break; - case 92: s = "\"operator\" expected"; break; - case 93: s = "\"out\" expected"; break; - case 94: s = "\"override\" expected"; break; - case 95: s = "\"params\" expected"; break; - case 96: s = "\"private\" expected"; break; - case 97: s = "\"protected\" expected"; break; - case 98: s = "\"public\" expected"; break; - case 99: s = "\"readonly\" expected"; break; - case 100: s = "\"ref\" expected"; break; - case 101: s = "\"return\" expected"; break; - case 102: s = "\"sbyte\" expected"; break; - case 103: s = "\"sealed\" expected"; break; - case 104: s = "\"short\" expected"; break; - case 105: s = "\"sizeof\" expected"; break; - case 106: s = "\"stackalloc\" expected"; break; - case 107: s = "\"static\" expected"; break; - case 108: s = "\"string\" expected"; break; - case 109: s = "\"struct\" expected"; break; - case 110: s = "\"switch\" expected"; break; - case 111: s = "\"this\" expected"; break; - case 112: s = "\"throw\" expected"; break; - case 113: s = "\"true\" expected"; break; - case 114: s = "\"try\" expected"; break; - case 115: s = "\"typeof\" expected"; break; - case 116: s = "\"uint\" expected"; break; - case 117: s = "\"ulong\" expected"; break; - case 118: s = "\"unchecked\" expected"; break; - case 119: s = "\"unsafe\" expected"; break; - case 120: s = "\"ushort\" expected"; break; - case 121: s = "\"using\" expected"; break; - case 122: s = "\"virtual\" expected"; break; - case 123: s = "\"void\" expected"; break; - case 124: s = "\"volatile\" expected"; break; - case 125: s = "\"while\" expected"; break; - case 126: s = "\"partial\" expected"; break; - case 127: s = "\"where\" expected"; break; - case 128: s = "\"get\" expected"; break; - case 129: s = "\"set\" expected"; break; - case 130: s = "\"add\" expected"; break; - case 131: s = "\"remove\" expected"; break; - case 132: s = "\"yield\" expected"; break; - case 133: s = "\"select\" expected"; break; - case 134: s = "\"group\" expected"; break; - case 135: s = "\"by\" expected"; break; - case 136: s = "\"into\" expected"; break; - case 137: s = "\"from\" expected"; break; - case 138: s = "\"ascending\" expected"; break; - case 139: s = "\"descending\" expected"; break; - case 140: s = "\"orderby\" expected"; break; - case 141: s = "\"let\" expected"; break; - case 142: s = "\"join\" expected"; break; - case 143: s = "\"on\" expected"; break; - case 144: s = "\"equals\" expected"; break; - case 145: s = "??? expected"; break; - case 146: s = "invalid NamespaceMemberDecl"; break; - case 147: s = "invalid NonArrayType"; break; - case 148: s = "invalid Identifier"; break; - case 149: s = "invalid AttributeArgument"; break; - case 150: s = "invalid Expr"; break; - case 151: s = "invalid TypeModifier"; break; - case 152: s = "invalid TypeDecl"; break; - case 153: s = "invalid TypeDecl"; break; - case 154: s = "this symbol not expected in ClassBody"; break; - case 155: s = "this symbol not expected in InterfaceBody"; break; - case 156: s = "invalid IntegralType"; break; - case 157: s = "invalid ClassType"; break; - case 158: s = "invalid ClassMemberDecl"; break; - case 159: s = "invalid ClassMemberDecl"; break; - case 160: s = "invalid StructMemberDecl"; break; - case 161: s = "invalid StructMemberDecl"; break; - case 162: s = "invalid StructMemberDecl"; break; - case 163: s = "invalid StructMemberDecl"; break; - case 164: s = "invalid StructMemberDecl"; break; - case 165: s = "invalid StructMemberDecl"; break; - case 166: s = "invalid StructMemberDecl"; break; - case 167: s = "invalid StructMemberDecl"; break; - case 168: s = "invalid StructMemberDecl"; break; - case 169: s = "invalid StructMemberDecl"; break; - case 170: s = "invalid StructMemberDecl"; break; - case 171: s = "invalid StructMemberDecl"; break; - case 172: s = "invalid StructMemberDecl"; break; - case 173: s = "invalid InterfaceMemberDecl"; break; - case 174: s = "invalid InterfaceMemberDecl"; break; - case 175: s = "invalid InterfaceMemberDecl"; break; - case 176: s = "invalid TypeWithRestriction"; break; - case 177: s = "invalid TypeWithRestriction"; break; - case 178: s = "invalid SimpleType"; break; - case 179: s = "invalid AccessorModifiers"; break; - case 180: s = "this symbol not expected in Block"; break; - case 181: s = "invalid EventAccessorDecls"; break; - case 182: s = "invalid ConstructorInitializer"; break; - case 183: s = "invalid OverloadableOperator"; break; - case 184: s = "invalid AccessorDecls"; break; - case 185: s = "invalid InterfaceAccessors"; break; - case 186: s = "invalid InterfaceAccessors"; break; - case 187: s = "invalid GetAccessorDecl"; break; - case 188: s = "invalid SetAccessorDecl"; break; - case 189: s = "invalid VariableInitializer"; break; - case 190: s = "this symbol not expected in Statement"; break; - case 191: s = "invalid Statement"; break; - case 192: s = "invalid Argument"; break; - case 193: s = "invalid AssignmentOperator"; break; - case 194: s = "invalid ObjectPropertyInitializerOrVariableInitializer"; break; - case 195: s = "invalid ObjectPropertyInitializerOrVariableInitializer"; break; - case 196: s = "invalid EmbeddedStatement"; break; - case 197: s = "invalid EmbeddedStatement"; break; - case 198: s = "this symbol not expected in EmbeddedStatement"; break; - case 199: s = "invalid EmbeddedStatement"; break; - case 200: s = "invalid ForInitializer"; break; - case 201: s = "invalid GotoStatement"; break; - case 202: s = "invalid ResourceAcquisition"; break; - case 203: s = "invalid SwitchLabel"; break; - case 204: s = "invalid CatchClause"; break; - case 205: s = "invalid UnaryExpr"; break; - case 206: s = "invalid PrimaryExpr"; break; - case 207: s = "invalid PrimaryExpr"; break; - case 208: s = "invalid TypeArgumentList"; break; - case 209: s = "invalid NewExpression"; break; - case 210: s = "invalid NewExpression"; break; - case 211: s = "invalid LambdaExpressionParameter"; break; - case 212: s = "invalid LambdaExpressionBody"; break; - case 213: s = "invalid RelationalExpr"; break; - case 214: s = "invalid RelationalExpr"; break; - case 215: s = "invalid TypeParameterConstraintsClauseBase"; break; - case 216: s = "invalid QueryExpressionBody"; break; - - default: s = "error " + errorNumber; break; - } - this.Errors.Error(line, col, s); - } - private bool StartOf(int s) { return set[s, lexer.LookAhead.kind]; } - + + protected override void SynErr(int line, int col, int errorNumber) + { + this.Errors.Error(line, col, ErrorDesc(errorNumber)); + } + static bool[,] set = { - {T,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,T,T,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,T, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,x,T,T, T,T,T,T, T,x,T,T, T,x,T,T, x,T,T,T, x,x,T,x, T,T,T,T, x,T,T,T, T,T,x,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, T,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,x,T, T,T,T,T, T,T,x,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,T,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,T,x,T, x,x,x,x, T,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,T,x,x, x,x,T,x, T,T,T,T, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,T,T, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,T,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,T,x,x, x,x,x,x, T,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {T,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, x,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,T,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, T,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,T,x,x, T,T,T,x, x,x,x} + {T,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,T,T,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,T, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,x,T,T, T,T,T,T, T,x,T,T, T,x,T,T, x,T,T,T, x,x,T,x, T,T,T,T, x,T,T,T, T,T,x,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, T,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,T,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,T, 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,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,x,T, T,T,T,T, T,T,x,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,T,T,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,T,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,T,x,T, x,x,x,x, T,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,T, x,x,T,T, x,x,x,x, T,x,T,T, T,x,x,T, x,T,x,T, x,x,T,x, T,T,T,T, x,x,T,T, T,x,x,T, T,T,x,x, x,x,x,x, T,T,x,T, T,x,T,T, T,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,T,x,x, x,x,T,x, T,T,T,T, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,T, T,x,T,x, T,x,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,T,T, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,T,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,T,x,x, x,x,x,x, T,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {T,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,T,T,x, x,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,T,x, T,T,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,T,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,T,T,x, T,T,T,x, x,x,x,T, x,x,x,x, T,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,T,T,x, T,T,T,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,T, x,x,T,x, x,x,T,T, x,T,T,T, x,x,x,x, x,x,x,x, x,T,T,x, T,T,x,x, T,x,T,T, T,T,T,T, T,T,T,T, T,T,x,T, x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,T, T,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,T,x, x,T,T,x, x,x,T,T, T,x,T,x, x,x,x,x, T,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,T,T,T, x,x,x,x, x,x,x,x, x,x,T,x, T,T,x,x, T,x,x,T, x,T,x,T, T,T,T,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, x,T,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, x,T,x,x, x,x,x,x, T,x,T,x, T,x,x,x, T,x,x,x, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,T,x,x, T,T,T,x, x,x,x} }; + + string ErrorDesc(int errorNumber) + { + switch (errorNumber) { + case 0: return "EOF expected"; + case 1: return "ident expected"; + case 2: return "Literal expected"; + case 3: return "\"=\" expected"; + case 4: return "\"+\" expected"; + case 5: return "\"-\" expected"; + case 6: return "\"*\" expected"; + case 7: return "\"/\" expected"; + case 8: return "\"%\" expected"; + case 9: return "\":\" expected"; + case 10: return "\"::\" expected"; + case 11: return "\";\" expected"; + case 12: return "\"?\" expected"; + case 13: return "\"??\" expected"; + case 14: return "\",\" expected"; + case 15: return "\".\" expected"; + case 16: return "\"{\" expected"; + case 17: return "\"}\" expected"; + case 18: return "\"[\" expected"; + case 19: return "\"]\" expected"; + case 20: return "\"(\" expected"; + case 21: return "\")\" expected"; + case 22: return "\">\" expected"; + case 23: return "\"<\" expected"; + case 24: return "\"!\" expected"; + case 25: return "\"&&\" expected"; + case 26: return "\"||\" expected"; + case 27: return "\"~\" expected"; + case 28: return "\"&\" expected"; + case 29: return "\"|\" expected"; + case 30: return "\"^\" expected"; + case 31: return "\"++\" expected"; + case 32: return "\"--\" expected"; + case 33: return "\"==\" expected"; + case 34: return "\"!=\" expected"; + case 35: return "\">=\" expected"; + case 36: return "\"<=\" expected"; + case 37: return "\"<<\" expected"; + case 38: return "\"+=\" expected"; + case 39: return "\"-=\" expected"; + case 40: return "\"*=\" expected"; + case 41: return "\"/=\" expected"; + case 42: return "\"%=\" expected"; + case 43: return "\"&=\" expected"; + case 44: return "\"|=\" expected"; + case 45: return "\"^=\" expected"; + case 46: return "\"<<=\" expected"; + case 47: return "\"->\" expected"; + case 48: return "\"=>\" expected"; + case 49: return "\"abstract\" expected"; + case 50: return "\"as\" expected"; + case 51: return "\"base\" expected"; + case 52: return "\"bool\" expected"; + case 53: return "\"break\" expected"; + case 54: return "\"byte\" expected"; + case 55: return "\"case\" expected"; + case 56: return "\"catch\" expected"; + case 57: return "\"char\" expected"; + case 58: return "\"checked\" expected"; + case 59: return "\"class\" expected"; + case 60: return "\"const\" expected"; + case 61: return "\"continue\" expected"; + case 62: return "\"decimal\" expected"; + case 63: return "\"default\" expected"; + case 64: return "\"delegate\" expected"; + case 65: return "\"do\" expected"; + case 66: return "\"double\" expected"; + case 67: return "\"else\" expected"; + case 68: return "\"enum\" expected"; + case 69: return "\"event\" expected"; + case 70: return "\"explicit\" expected"; + case 71: return "\"extern\" expected"; + case 72: return "\"false\" expected"; + case 73: return "\"finally\" expected"; + case 74: return "\"fixed\" expected"; + case 75: return "\"float\" expected"; + case 76: return "\"for\" expected"; + case 77: return "\"foreach\" expected"; + case 78: return "\"goto\" expected"; + case 79: return "\"if\" expected"; + case 80: return "\"implicit\" expected"; + case 81: return "\"in\" expected"; + case 82: return "\"int\" expected"; + case 83: return "\"interface\" expected"; + case 84: return "\"internal\" expected"; + case 85: return "\"is\" expected"; + case 86: return "\"lock\" expected"; + case 87: return "\"long\" expected"; + case 88: return "\"namespace\" expected"; + case 89: return "\"new\" expected"; + case 90: return "\"null\" expected"; + case 91: return "\"object\" expected"; + case 92: return "\"operator\" expected"; + case 93: return "\"out\" expected"; + case 94: return "\"override\" expected"; + case 95: return "\"params\" expected"; + case 96: return "\"private\" expected"; + case 97: return "\"protected\" expected"; + case 98: return "\"public\" expected"; + case 99: return "\"readonly\" expected"; + case 100: return "\"ref\" expected"; + case 101: return "\"return\" expected"; + case 102: return "\"sbyte\" expected"; + case 103: return "\"sealed\" expected"; + case 104: return "\"short\" expected"; + case 105: return "\"sizeof\" expected"; + case 106: return "\"stackalloc\" expected"; + case 107: return "\"static\" expected"; + case 108: return "\"string\" expected"; + case 109: return "\"struct\" expected"; + case 110: return "\"switch\" expected"; + case 111: return "\"this\" expected"; + case 112: return "\"throw\" expected"; + case 113: return "\"true\" expected"; + case 114: return "\"try\" expected"; + case 115: return "\"typeof\" expected"; + case 116: return "\"uint\" expected"; + case 117: return "\"ulong\" expected"; + case 118: return "\"unchecked\" expected"; + case 119: return "\"unsafe\" expected"; + case 120: return "\"ushort\" expected"; + case 121: return "\"using\" expected"; + case 122: return "\"virtual\" expected"; + case 123: return "\"void\" expected"; + case 124: return "\"volatile\" expected"; + case 125: return "\"while\" expected"; + case 126: return "\"partial\" expected"; + case 127: return "\"where\" expected"; + case 128: return "\"get\" expected"; + case 129: return "\"set\" expected"; + case 130: return "\"add\" expected"; + case 131: return "\"remove\" expected"; + case 132: return "\"yield\" expected"; + case 133: return "\"select\" expected"; + case 134: return "\"group\" expected"; + case 135: return "\"by\" expected"; + case 136: return "\"into\" expected"; + case 137: return "\"from\" expected"; + case 138: return "\"ascending\" expected"; + case 139: return "\"descending\" expected"; + case 140: return "\"orderby\" expected"; + case 141: return "\"let\" expected"; + case 142: return "\"join\" expected"; + case 143: return "\"on\" expected"; + case 144: return "\"equals\" expected"; + case 145: return "??? expected"; + case 146: return "invalid NamespaceMemberDecl"; + case 147: return "invalid NonArrayType"; + case 148: return "invalid Identifier"; + case 149: return "invalid AttributeArgument"; + case 150: return "invalid Expr"; + case 151: return "invalid AttributeSection"; + case 152: return "invalid TypeModifier"; + case 153: return "invalid TypeDecl"; + case 154: return "invalid TypeDecl"; + case 155: return "this symbol not expected in ClassBody"; + case 156: return "this symbol not expected in InterfaceBody"; + case 157: return "invalid IntegralType"; + case 158: return "invalid ClassType"; + case 159: return "invalid ClassMemberDecl"; + case 160: return "invalid ClassMemberDecl"; + case 161: return "invalid StructMemberDecl"; + case 162: return "invalid StructMemberDecl"; + case 163: return "invalid StructMemberDecl"; + case 164: return "invalid StructMemberDecl"; + case 165: return "invalid StructMemberDecl"; + case 166: return "invalid StructMemberDecl"; + case 167: return "invalid StructMemberDecl"; + case 168: return "invalid StructMemberDecl"; + case 169: return "invalid StructMemberDecl"; + case 170: return "invalid StructMemberDecl"; + case 171: return "invalid StructMemberDecl"; + case 172: return "invalid StructMemberDecl"; + case 173: return "invalid StructMemberDecl"; + case 174: return "invalid InterfaceMemberDecl"; + case 175: return "invalid InterfaceMemberDecl"; + case 176: return "invalid InterfaceMemberDecl"; + case 177: return "invalid TypeWithRestriction"; + case 178: return "invalid TypeWithRestriction"; + case 179: return "invalid SimpleType"; + case 180: return "invalid AccessorModifiers"; + case 181: return "this symbol not expected in Block"; + case 182: return "invalid EventAccessorDecls"; + case 183: return "invalid ConstructorInitializer"; + case 184: return "invalid OverloadableOperator"; + case 185: return "invalid AccessorDecls"; + case 186: return "invalid InterfaceAccessors"; + case 187: return "invalid InterfaceAccessors"; + case 188: return "invalid GetAccessorDecl"; + case 189: return "invalid SetAccessorDecl"; + case 190: return "invalid VariableInitializer"; + case 191: return "this symbol not expected in Statement"; + case 192: return "invalid Statement"; + case 193: return "invalid Argument"; + case 194: return "invalid AssignmentOperator"; + case 195: return "invalid ObjectPropertyInitializerOrVariableInitializer"; + case 196: return "invalid ObjectPropertyInitializerOrVariableInitializer"; + case 197: return "invalid EmbeddedStatement"; + case 198: return "invalid EmbeddedStatement"; + case 199: return "this symbol not expected in EmbeddedStatement"; + case 200: return "invalid EmbeddedStatement"; + case 201: return "invalid ForInitializer"; + case 202: return "invalid GotoStatement"; + case 203: return "invalid ResourceAcquisition"; + case 204: return "invalid SwitchLabel"; + case 205: return "invalid CatchClause"; + case 206: return "invalid UnaryExpr"; + case 207: return "invalid PrimaryExpr"; + case 208: return "invalid PrimaryExpr"; + case 209: return "invalid TypeArgumentList"; + case 210: return "invalid NewExpression"; + case 211: return "invalid NewExpression"; + case 212: return "invalid LambdaExpressionParameter"; + case 213: return "invalid LambdaExpressionBody"; + case 214: return "invalid TypeParameterConstraintsClauseBase"; + case 215: return "invalid QueryExpressionBody"; + + default: return "error " + errorNumber; + } + } + } // end Parser -} \ No newline at end of file +} // end namespace diff --git a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG index e682976a43..62117ecea4 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG +++ b/src/Libraries/NRefactory/Project/Src/Parser/CSharp/cs.ATG @@ -9,11 +9,12 @@ using Types = ICSharpCode.NRefactory.Ast.ClassType; COMPILER CS /* AW 2002-12-30 renamed from CompilationUnit to CS */ +$frameDir=../Frames /*------------------------------------------------------------------------* *----- LEXER TOKEN LIST ------------------------------------------------* *------------------------------------------------------------------------*/ - + /* START AUTOGENERATED TOKENS SECTION */ TOKENS /* ----- terminal classes ----- */ @@ -251,7 +252,7 @@ Attribute .) . -AttributeArguments positional, List named> +AttributeArguments<. List positional, List named .> = "(" [ @@ -264,7 +265,7 @@ AttributeArguments positional, List na ")" . -AttributeArgument positional, List named> +AttributeArgument<. List positional, List named .> (. string name = null; bool isNamed = false; Expression expr; .) = ( @@ -359,7 +360,7 @@ ExternAliasDirective (. compilationUnit.AddChild(ead); .) . -TypeDecl attributes> +TypeDecl<. ModifierList m, List attributes .> (. TypeReference type; List names; @@ -489,7 +490,7 @@ Qualident } (. qualident = qualidentBuilder.ToString(); .) . -ClassBase names> +ClassBase<. out List names .> (. TypeReference typeRef; names = new List(); @@ -512,7 +513,7 @@ ClassBody } . -StructInterfaces names> +StructInterfaces<. out List names .> (. TypeReference typeRef; names = new List(); @@ -536,7 +537,7 @@ StructBody "}" . -InterfaceBase names> +InterfaceBase<. out List names .> (. TypeReference typeRef; names = new List(); @@ -635,7 +636,7 @@ SimpleType . -FormalParameterList parameter> +FormalParameterList<. List parameter .> (. ParameterDeclarationExpression p; @@ -740,7 +741,7 @@ MemberModifiers } . -StructMemberDecl attributes> +StructMemberDecl<. ModifierList m, List attributes .> (. string qualident = null; TypeReference type; @@ -1054,7 +1055,7 @@ StructMemberDecl attributes> ) . -ClassMemberDecl attributes> +ClassMemberDecl<. ModifierList m, List attributes .> (. Statement stmt = null; .) = StructMemberDecl @@ -1205,7 +1206,7 @@ AccessorDecls ) . -GetAccessorDecl attributes> +GetAccessorDecl<. out PropertyGetRegion getBlock, List attributes .> (. Statement stmt = null; .) = "get" @@ -1215,7 +1216,7 @@ GetAccessorDecl attribute (. getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; .) . -SetAccessorDecl attributes> +SetAccessorDecl<. out PropertySetRegion setBlock, List attributes .> (. Statement stmt = null; .) = "set" @@ -1643,7 +1644,7 @@ IfStatement .) . -ForInitializer initializer> +ForInitializer<. out List initializer .> (. Statement stmt; initializer = new List(); @@ -1653,7 +1654,7 @@ ForInitializer initializer> | StatementExpr (.initializer.Add(stmt);.) { "," StatementExpr (. initializer.Add(stmt);.) } . -ForIterator iterator> +ForIterator<. out List iterator .> (. Statement stmt; iterator = new List(); @@ -1662,7 +1663,7 @@ ForIterator iterator> StatementExpr (. iterator.Add(stmt);.) { "," StatementExpr (. iterator.Add(stmt); .) } . -SwitchSections switchSections> +SwitchSections<. List switchSections .> (. SwitchSection switchSection = new SwitchSection(); CaseLabel label; @@ -2342,7 +2343,7 @@ NullableQuestionMark .) . -TypeArgumentList types, bool canBeUnbound> +TypeArgumentList<. out List types, bool canBeUnbound .> (. types = new List(); TypeReference type = null; @@ -2358,7 +2359,7 @@ TypeArgumentList types, bool canBeUnbound> ">" . -TypeParameterList templates> +TypeParameterList<. List templates .> (. TemplateDefinition template; .) @@ -2386,7 +2387,7 @@ VariantTypeParameter (. typeParameter.EndLocation = t.EndLocation; .) . -TypeParameterConstraintsClause templates> +TypeParameterConstraintsClause<. List templates .> (. string name = ""; TypeReference type; .) = "where" diff --git a/src/Libraries/NRefactory/Project/Src/Parser/Frames/Parser.frame b/src/Libraries/NRefactory/Project/Src/Parser/Frames/Parser.frame index 5602370fd6..fc4d9504af 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/Frames/Parser.frame +++ b/src/Libraries/NRefactory/Project/Src/Parser/Frames/Parser.frame @@ -1,13 +1,8 @@ -/* - Parser.frame file for NRefactory. - */ +-->begin using System; -using System.Reflection; -->namespace --->tokens - partial class Parser : AbstractParser { -->constants @@ -16,9 +11,10 @@ partial class Parser : AbstractParser -->declarations -/* + void Get () { -->pragmas -*/ + lexer.NextToken(); + } -->productions @@ -27,24 +23,28 @@ partial class Parser : AbstractParser -->parseRoot } - protected override void SynErr(int line, int col, int errorNumber) - { - string s; - switch (errorNumber) { --->errors - default: s = "error " + errorNumber; break; - } - this.Errors.Error(line, col, s); - } - private bool StartOf(int s) { return set[s, lexer.LookAhead.kind]; } - + + protected override void SynErr(int line, int col, int errorNumber) + { + this.Errors.Error(line, col, ErrorDesc(errorNumber)); + } + static bool[,] set = { -->initialization }; + + string ErrorDesc(int errorNumber) + { + switch (errorNumber) { +-->errors + default: return "error " + errorNumber; + } + } + } // end Parser $$$ diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ParserHelper.atg b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg similarity index 82% rename from src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ParserHelper.atg rename to src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg index e4060de031..2b40c4eedd 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ParserHelper.atg +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg @@ -6,7 +6,7 @@ using ICSharpCode.NRefactory.Ast; using ICSharpCode.NRefactory.Parser.VB; using ASTAttribute = ICSharpCode.NRefactory.Ast.Attribute; -PUSHCOMPILER ParserHelper +PUSHCOMPILER ExpressionFinder /* START AUTOGENERATED TOKENS SECTION */ TOKENS @@ -241,7 +241,7 @@ TOKENS PRODUCTIONS /*------------------------------------------------------------------------*/ -ParserHelper = +ExpressionFinder = (. PushContext(Context.Global); .) { OptionStatement } { ImportsStatement } @@ -257,7 +257,7 @@ OptionStatement = . ImportsStatement = - "Imports" { ANY } StatementTerminator + "Imports" (. nextTokenIsPotentialStartOfXmlMode = true; .) { ANY } StatementTerminator . AttributeBlock = @@ -277,10 +277,10 @@ NamespaceDeclaration = TypeDeclaration = { AttributeBlock } { TypeModifier } - "Module" { ANY } StatementTerminator + ( "Module" | "Class" ) { ANY } StatementTerminator (. PushContext(Context.Type); .) { MemberDeclaration } - "End" "Module" StatementTerminator + "End" ( "Module" | "Class" ) StatementTerminator (. PopContext(); .) . @@ -295,8 +295,8 @@ MemberDeclaration = SubOrFunctionDeclaration = { AttributeBlock } { MemberModifier } ("Sub" | "Function") (. PushContext(Context.IdentifierExpected); .) ANY (. PopContext(); .) - [ "(" [ ParameterList ] ")" ] [ "As" TypeName ] EOL - [ Block ] + [ "(" [ ParameterList ] ")" ] [ "As" TypeName ] + Block "End" ("Sub" | "Function") StatementTerminator . @@ -309,17 +309,32 @@ Parameter = . Block = - EOL + (. PushContext(Context.Body); .) + StatementTerminator + { StatementTerminator } + { Statement } + { StatementTerminator } + (. PopContext(); .) . Expression = - Literal | - ( "(" Expression ")" ) | - ( Identifier [ "(" "Of" TypeName { "," TypeName } ")" ] ) | - "AddressOf" Expression | + (. isExpressionStart = true; .) + ( + Literal (. isExpressionStart = false; .) | + ( "(" (. isExpressionStart = false; .) Expression ")" ) | + ( Identifier (. isExpressionStart = false; .) [ "(" "Of" TypeName { "," TypeName } ")" ] ) | + ( "AddressOf" (. isExpressionStart = false; .) Expression) | + ( "<" (. PushContext(Context.Xml); .) ANY ">" (. PopContext(); .) ) + ) . +/* +XmlLiteralExpression = + "<" + ( "!" | "?" ) +.*/ + PrimitiveTypeName = "Byte" | "SByte" | @@ -345,7 +360,8 @@ TypeSuffix = "(" ( "Of" TypeName { "," TypeName } | { "," /*[ EOL ]*/ } ) ")" . IdentifierOrKeyword = ANY . -Literal = LiteralString | +Literal = + LiteralString | LiteralCharacter | LiteralInteger | LiteralDouble | @@ -361,10 +377,14 @@ Literal = LiteralString | "MyClass" . +Statement = + ( ( Identifier | LiteralInteger ) ":" ) | + ( ( "Dim" | "Static" | "Const" ) Identifier [ "?" ] [ ( "(" { "," } ")" ) ] { "," Identifier [ "?" ] [ ( "(" { "," } ")" ) ] } [ "As" [ "New" ] TypeName [ "(" ")" ] ] [ "=" Expression ] ) +. + /* This production handles pseudo keywords that are needed in the grammar */ -Identifier +Identifier = (. PushContext(Context.IdentifierExpected); .) -= ( IdentifierForFieldDeclaration | @@ -434,5 +454,5 @@ ParameterModifier = . -END ParserHelper. +END ExpressionFinder. diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ParserHelper.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.cs similarity index 64% rename from src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ParserHelper.cs rename to src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.cs index c898c9443c..f4928e7502 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ParserHelper.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.cs @@ -7,21 +7,24 @@ using System; using System.Collections.Generic; +using System.Text; namespace ICSharpCode.NRefactory.Parser.VBNet.Experimental { - public partial class Parser + public partial class ExpressionFinder { Stack stack = new Stack(); + StringBuilder output = new StringBuilder(); + bool isExpressionStart = false; void PopContext() { if (stack.Count > 0) { string indent = new string('\t', stack.Count - 1); var item = stack.Pop(); - Console.WriteLine(indent + "exit " + item); + Print(indent + "exit " + item); } else { - Console.WriteLine("empty stack"); + Print("empty stack"); } } @@ -29,7 +32,7 @@ namespace ICSharpCode.NRefactory.Parser.VBNet.Experimental { string indent = new string('\t', stack.Count); stack.Push(context); - Console.WriteLine(indent + "enter " + context); + Print(indent + "enter " + context); } void SetContext(Context context) @@ -37,12 +40,25 @@ namespace ICSharpCode.NRefactory.Parser.VBNet.Experimental PopContext(); PushContext(context); } + + void Print(string text) + { + Console.WriteLine(text); + output.AppendLine(text); + } + + public string Output { + get { return output.ToString(); } + } } public enum Context { Global, Type, Member, - IdentifierExpected + IdentifierExpected, + Body, + Xml, + Debug } } diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs index dac1de84eb..62e1e512c7 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs @@ -15,7 +15,7 @@ namespace ICSharpCode.NRefactory.Parser.VBNet.Experimental { -partial class Parser { +partial class ExpressionFinder { const bool T = true; const bool x = false; @@ -23,8 +23,9 @@ partial class Parser { int currentState = 1; readonly Stack stateStack = new Stack(); + bool nextTokenIsPotentialStartOfXmlMode = false; - public Parser() + public ExpressionFinder() { stateStack.Push(-1); // required so that we don't crash when leaving the root production } @@ -41,12 +42,13 @@ int currentState = 1; public void InformToken(Token t) { + nextTokenIsPotentialStartOfXmlMode = false; switchlbl: switch (currentState) { case 0: { currentState = stateStack.Pop(); goto switchlbl; } - case 1: { // start of ParserHelper + case 1: { // start of ExpressionFinder PushContext(Context.Global); goto case 3; } @@ -74,7 +76,7 @@ int currentState = 1; } case 6: { stateStack.Push(7); - goto case 23; // AttributeBlock + goto case 24; // AttributeBlock } case 7: { if (t.kind == 28) { @@ -85,7 +87,7 @@ int currentState = 1; } case 8: { stateStack.Push(9); - goto case 31; // NamespaceMemberDeclaration + goto case 32; // NamespaceMemberDeclaration } case 9: { if (set[0, t.kind]) { @@ -146,1623 +148,1967 @@ int currentState = 1; } case 19: { // start of ImportsStatement Expect(124, t); // "Imports" - currentState = 21; + currentState = 20; break; } case 20: { - currentState = 21; - break; + nextTokenIsPotentialStartOfXmlMode = true; + goto case 22; } case 21: { + currentState = 22; + break; + } + case 22: { if (set[1, t.kind]) { - goto case 20; + goto case 21; } else { - goto case 22; + goto case 23; } } - case 22: { + case 23: { goto case 13; // StatementTerminator } - case 23: { // start of AttributeBlock + case 24: { // start of AttributeBlock Expect(28, t); // "<" - currentState = 25; + currentState = 26; break; } - case 24: { - currentState = 25; + case 25: { + currentState = 26; break; } - case 25: { + case 26: { if (set[2, t.kind]) { - goto case 24; + goto case 25; } else { - goto case 26; + goto case 27; } } - case 26: { + case 27: { Expect(27, t); // ">" - currentState = 28; + currentState = 29; break; } - case 27: { + case 28: { Expect(1, t); // EOL currentState = stateStack.Pop(); break; } - case 28: { + case 29: { if (t.kind == 1) { - goto case 27; + goto case 28; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 29: { - goto case 33; // NamespaceDeclaration - } case 30: { - goto case 43; // TypeDeclaration + goto case 34; // NamespaceDeclaration } - case 31: { // start of NamespaceMemberDeclaration + case 31: { + goto case 44; // TypeDeclaration + } + case 32: { // start of NamespaceMemberDeclaration if (t.kind == 146) { - goto case 29; + goto case 30; } else { - goto case 32; + goto case 33; } } - case 32: { + case 33: { if (set[3, t.kind]) { - goto case 30; + goto case 31; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 33: { // start of NamespaceDeclaration + case 34: { // start of NamespaceDeclaration Expect(146, t); // "Namespace" - currentState = 35; + currentState = 36; break; } - case 34: { - currentState = 35; + case 35: { + currentState = 36; break; } - case 35: { + case 36: { if (set[1, t.kind]) { - goto case 34; + goto case 35; } else { - goto case 36; + goto case 37; } } - case 36: { - stateStack.Push(38); - goto case 13; // StatementTerminator - } case 37: { - stateStack.Push(38); - goto case 31; // NamespaceMemberDeclaration + stateStack.Push(39); + goto case 13; // StatementTerminator } case 38: { + stateStack.Push(39); + goto case 32; // NamespaceMemberDeclaration + } + case 39: { if (set[4, t.kind]) { - goto case 37; + goto case 38; } else { - goto case 39; + goto case 40; } } - case 39: { + case 40: { Expect(100, t); // "End" - currentState = 40; + currentState = 41; break; } - case 40: { + case 41: { Expect(146, t); // "Namespace" - currentState = 41; + currentState = 42; break; } - case 41: { + case 42: { goto case 13; // StatementTerminator } - case 42: { - stateStack.Push(43); - goto case 23; // AttributeBlock + case 43: { + stateStack.Push(44); + goto case 24; // AttributeBlock } - case 43: { // start of TypeDeclaration + case 44: { // start of TypeDeclaration if (t.kind == 28) { - goto case 42; + goto case 43; } else { - goto case 45; + goto case 46; } } - case 44: { - stateStack.Push(45); - goto case 277; // TypeModifier - } case 45: { + stateStack.Push(46); + goto case 338; // TypeModifier + } + case 46: { if (set[5, t.kind]) { - goto case 44; + goto case 45; } else { - goto case 46; + goto case 49; } } - case 46: { + case 47: { Expect(141, t); // "Module" - currentState = 48; + currentState = 52; break; } - case 47: { - currentState = 48; + case 48: { + Expect(71, t); // "Class" + currentState = 52; break; } - case 48: { - if (set[1, t.kind]) { + case 49: { + if (t.kind == 141) { goto case 47; } else { - goto case 49; + goto case 50; } } - case 49: { - stateStack.Push(50); - goto case 13; // StatementTerminator - } case 50: { - PushContext(Context.Type); - goto case 52; + if (t.kind == 71) { + goto case 48; + } else { + Error(t); + goto case 52; + } } case 51: { - stateStack.Push(52); - goto case 57; // MemberDeclaration + currentState = 52; + break; } case 52: { - if (set[6, t.kind]) { + if (set[1, t.kind]) { goto case 51; } else { goto case 53; } } case 53: { + stateStack.Push(54); + goto case 13; // StatementTerminator + } + case 54: { + PushContext(Context.Type); + goto case 56; + } + case 55: { + stateStack.Push(56); + goto case 64; // MemberDeclaration + } + case 56: { + if (set[6, t.kind]) { + goto case 55; + } else { + goto case 57; + } + } + case 57: { Expect(100, t); // "End" - currentState = 54; + currentState = 60; break; } - case 54: { + case 58: { Expect(141, t); // "Module" - currentState = 55; + currentState = 62; break; } - case 55: { - stateStack.Push(56); + case 59: { + Expect(71, t); // "Class" + currentState = 62; + break; + } + case 60: { + if (t.kind == 141) { + goto case 58; + } else { + goto case 61; + } + } + case 61: { + if (t.kind == 71) { + goto case 59; + } else { + Error(t); + goto case 62; + } + } + case 62: { + stateStack.Push(63); goto case 13; // StatementTerminator } - case 56: { + case 63: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 57: { // start of MemberDeclaration + case 64: { // start of MemberDeclaration PushContext(Context.Member); - goto case 58; + goto case 65; } - case 58: { - stateStack.Push(59); - goto case 61; // SubOrFunctionDeclaration + case 65: { + stateStack.Push(66); + goto case 68; // SubOrFunctionDeclaration } - case 59: { + case 66: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 60: { - stateStack.Push(61); - goto case 23; // AttributeBlock + case 67: { + stateStack.Push(68); + goto case 24; // AttributeBlock } - case 61: { // start of SubOrFunctionDeclaration + case 68: { // start of SubOrFunctionDeclaration if (t.kind == 28) { - goto case 60; + goto case 67; } else { - goto case 63; + goto case 70; } } - case 62: { - stateStack.Push(63); - goto case 281; // MemberModifier + case 69: { + stateStack.Push(70); + goto case 342; // MemberModifier } - case 63: { + case 70: { if (set[7, t.kind]) { - goto case 62; + goto case 69; } else { - goto case 66; + goto case 73; } } - case 64: { + case 71: { Expect(195, t); // "Sub" - currentState = 68; + currentState = 75; break; } - case 65: { + case 72: { Expect(114, t); // "Function" - currentState = 68; + currentState = 75; break; } - case 66: { + case 73: { if (t.kind == 195) { - goto case 64; + goto case 71; } else { - goto case 67; + goto case 74; } } - case 67: { + case 74: { if (t.kind == 114) { - goto case 65; + goto case 72; } else { Error(t); - goto case 68; + goto case 75; } } - case 68: { + case 75: { PushContext(Context.IdentifierExpected); - goto case 69; + goto case 76; } - case 69: { - currentState = 70; + case 76: { + currentState = 77; break; } - case 70: { + case 77: { PopContext(); - goto case 75; + goto case 82; } - case 71: { + case 78: { Expect(25, t); // "(" - currentState = 73; + currentState = 80; break; } - case 72: { - stateStack.Push(74); - goto case 88; // ParameterList + case 79: { + stateStack.Push(81); + goto case 93; // ParameterList } - case 73: { + case 80: { if (set[8, t.kind]) { - goto case 72; + goto case 79; } else { - goto case 74; + goto case 81; } } - case 74: { + case 81: { Expect(26, t); // ")" - currentState = 78; + currentState = 85; break; } - case 75: { + case 82: { if (t.kind == 25) { - goto case 71; - } else { goto case 78; + } else { + goto case 85; } } - case 76: { + case 83: { Expect(50, t); // "As" - currentState = 77; + currentState = 84; break; } - case 77: { - stateStack.Push(79); - goto case 159; // TypeName + case 84: { + stateStack.Push(86); + goto case 177; // TypeName } - case 78: { + case 85: { if (t.kind == 50) { - goto case 76; + goto case 83; } else { - goto case 79; + goto case 86; } } - case 79: { - Expect(1, t); // EOL - currentState = 81; - break; - } - case 80: { - stateStack.Push(82); - goto case 103; // Block - } - case 81: { - if (t.kind == 1) { - goto case 80; - } else { - goto case 82; - } + case 86: { + stateStack.Push(87); + goto case 108; // Block } - case 82: { + case 87: { Expect(100, t); // "End" - currentState = 85; + currentState = 90; break; } - case 83: { + case 88: { Expect(195, t); // "Sub" - currentState = 87; + currentState = 92; break; } - case 84: { + case 89: { Expect(114, t); // "Function" - currentState = 87; + currentState = 92; break; } - case 85: { + case 90: { if (t.kind == 195) { - goto case 83; + goto case 88; } else { - goto case 86; + goto case 91; } } - case 86: { + case 91: { if (t.kind == 114) { - goto case 84; + goto case 89; } else { Error(t); - goto case 87; + goto case 92; } } - case 87: { + case 92: { goto case 13; // StatementTerminator } - case 88: { // start of ParameterList - stateStack.Push(91); - goto case 93; // Parameter + case 93: { // start of ParameterList + stateStack.Push(96); + goto case 98; // Parameter } - case 89: { + case 94: { Expect(12, t); // "," - currentState = 90; + currentState = 95; break; } - case 90: { - stateStack.Push(91); - goto case 93; // Parameter + case 95: { + stateStack.Push(96); + goto case 98; // Parameter } - case 91: { + case 96: { if (t.kind == 12) { - goto case 89; + goto case 94; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 92: { - stateStack.Push(93); - goto case 23; // AttributeBlock + case 97: { + stateStack.Push(98); + goto case 24; // AttributeBlock } - case 93: { // start of Parameter + case 98: { // start of Parameter if (t.kind == 28) { - goto case 92; + goto case 97; } else { - goto case 95; + goto case 100; } } - case 94: { - stateStack.Push(95); - goto case 297; // ParameterModifier + case 99: { + stateStack.Push(100); + goto case 358; // ParameterModifier } - case 95: { + case 100: { if (set[9, t.kind]) { - goto case 94; + goto case 99; } else { - goto case 96; + goto case 101; } } - case 96: { - stateStack.Push(99); - goto case 210; // Identifier + case 101: { + stateStack.Push(104); + goto case 268; // Identifier } - case 97: { + case 102: { Expect(50, t); // "As" - currentState = 98; + currentState = 103; break; } - case 98: { - stateStack.Push(102); - goto case 159; // TypeName + case 103: { + stateStack.Push(107); + goto case 177; // TypeName } - case 99: { + case 104: { if (t.kind == 50) { - goto case 97; - } else { goto case 102; + } else { + goto case 107; } } - case 100: { + case 105: { Expect(10, t); // "=" - currentState = 101; + currentState = 106; break; } - case 101: { - goto case 108; // Expression + case 106: { + goto case 117; // Expression } - case 102: { + case 107: { if (t.kind == 10) { - goto case 100; + goto case 105; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 103: { // start of Block - Expect(1, t); // EOL - currentState = stateStack.Pop(); - break; + case 108: { // start of Block + PushContext(Context.Body); + goto case 109; } - case 104: { - goto case 184; // Literal + case 109: { + stateStack.Push(111); + goto case 13; // StatementTerminator } - case 105: { - Expect(25, t); // "(" - currentState = 106; - break; + case 110: { + stateStack.Push(111); + goto case 13; // StatementTerminator } - case 106: { - stateStack.Push(107); - goto case 108; // Expression + case 111: { + if (t.kind == 1 || t.kind == 11) { + goto case 110; + } else { + goto case 113; + } } - case 107: { - Expect(26, t); // ")" - currentState = stateStack.Pop(); - break; + case 112: { + stateStack.Push(113); + goto case 266; // Statement } - case 108: { // start of Expression + case 113: { if (set[10, t.kind]) { - goto case 104; + goto case 112; } else { - goto case 109; + goto case 115; } } - case 109: { - if (t.kind == 25) { - goto case 105; + case 114: { + stateStack.Push(115); + goto case 13; // StatementTerminator + } + case 115: { + if (t.kind == 1 || t.kind == 11) { + goto case 114; } else { - goto case 119; + goto case 116; } } - case 110: { - stateStack.Push(118); - goto case 210; // Identifier + case 116: { + PopContext(); + currentState = stateStack.Pop(); + goto switchlbl; } - case 111: { + case 117: { // start of Expression + isExpressionStart = true; + goto case 124; + } + case 118: { + stateStack.Push(119); + goto case 202; // Literal + } + case 119: { + isExpressionStart = false; + currentState = stateStack.Pop(); + goto switchlbl; + } + case 120: { Expect(25, t); // "(" - currentState = 112; + currentState = 121; break; } - case 112: { + case 121: { + isExpressionStart = false; + goto case 122; + } + case 122: { + stateStack.Push(123); + goto case 117; // Expression + } + case 123: { + Expect(26, t); // ")" + currentState = stateStack.Pop(); + break; + } + case 124: { + if (set[11, t.kind]) { + goto case 118; + } else { + goto case 125; + } + } + case 125: { + if (t.kind == 25) { + goto case 120; + } else { + goto case 136; + } + } + case 126: { + stateStack.Push(127); + goto case 268; // Identifier + } + case 127: { + isExpressionStart = false; + goto case 135; + } + case 128: { + Expect(25, t); // "(" + currentState = 129; + break; + } + case 129: { Expect(155, t); // "Of" - currentState = 113; + currentState = 130; break; } - case 113: { - stateStack.Push(116); - goto case 159; // TypeName + case 130: { + stateStack.Push(133); + goto case 177; // TypeName } - case 114: { + case 131: { Expect(12, t); // "," - currentState = 115; + currentState = 132; break; } - case 115: { - stateStack.Push(116); - goto case 159; // TypeName + case 132: { + stateStack.Push(133); + goto case 177; // TypeName } - case 116: { + case 133: { if (t.kind == 12) { - goto case 114; + goto case 131; } else { - goto case 117; + goto case 134; } } - case 117: { + case 134: { Expect(26, t); // ")" currentState = stateStack.Pop(); break; } - case 118: { + case 135: { if (t.kind == 25) { - goto case 111; + goto case 128; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 119: { - if (set[11, t.kind]) { - goto case 110; + case 136: { + if (set[12, t.kind]) { + goto case 126; } else { - goto case 122; + goto case 140; } } - case 120: { + case 137: { Expect(44, t); // "AddressOf" - currentState = 121; + currentState = 138; break; } - case 121: { - goto case 108; // Expression + case 138: { + isExpressionStart = false; + goto case 139; } - case 122: { + case 139: { + goto case 117; // Expression + } + case 140: { if (t.kind == 44) { - goto case 120; + goto case 137; } else { - goto case 124; + goto case 142; } } - case 123: { + case 141: { + Expect(28, t); // "<" currentState = stateStack.Pop(); - goto switchlbl; + break; } - case 124: { - if (false) { - goto case 123; + case 142: { + if (t.kind == 28) { + goto case 141; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 125: { + case 143: { Expect(58, t); // "Byte" currentState = stateStack.Pop(); break; } - case 126: { + case 144: { Expect(181, t); // "SByte" currentState = stateStack.Pop(); break; } - case 127: { // start of PrimitiveTypeName + case 145: { // start of PrimitiveTypeName if (t.kind == 58) { - goto case 125; + goto case 143; } else { - goto case 128; + goto case 146; } } - case 128: { + case 146: { if (t.kind == 181) { - goto case 126; + goto case 144; } else { - goto case 130; + goto case 148; } } - case 129: { + case 147: { Expect(210, t); // "UShort" currentState = stateStack.Pop(); break; } - case 130: { + case 148: { if (t.kind == 210) { - goto case 129; + goto case 147; } else { - goto case 132; + goto case 150; } } - case 131: { + case 149: { Expect(186, t); // "Short" currentState = stateStack.Pop(); break; } - case 132: { + case 150: { if (t.kind == 186) { - goto case 131; + goto case 149; } else { - goto case 134; + goto case 152; } } - case 133: { + case 151: { Expect(206, t); // "UInteger" currentState = stateStack.Pop(); break; } - case 134: { + case 152: { if (t.kind == 206) { - goto case 133; + goto case 151; } else { - goto case 136; + goto case 154; } } - case 135: { + case 153: { Expect(128, t); // "Integer" currentState = stateStack.Pop(); break; } - case 136: { + case 154: { if (t.kind == 128) { - goto case 135; + goto case 153; } else { - goto case 138; + goto case 156; } } - case 137: { + case 155: { Expect(207, t); // "ULong" currentState = stateStack.Pop(); break; } - case 138: { + case 156: { if (t.kind == 207) { - goto case 137; + goto case 155; } else { - goto case 140; + goto case 158; } } - case 139: { + case 157: { Expect(137, t); // "Long" currentState = stateStack.Pop(); break; } - case 140: { + case 158: { if (t.kind == 137) { - goto case 139; + goto case 157; } else { - goto case 142; + goto case 160; } } - case 141: { + case 159: { Expect(187, t); // "Single" currentState = stateStack.Pop(); break; } - case 142: { + case 160: { if (t.kind == 187) { - goto case 141; + goto case 159; } else { - goto case 144; + goto case 162; } } - case 143: { + case 161: { Expect(96, t); // "Double" currentState = stateStack.Pop(); break; } - case 144: { + case 162: { if (t.kind == 96) { - goto case 143; + goto case 161; } else { - goto case 146; + goto case 164; } } - case 145: { + case 163: { Expect(87, t); // "Decimal" currentState = stateStack.Pop(); break; } - case 146: { + case 164: { if (t.kind == 87) { - goto case 145; + goto case 163; } else { - goto case 148; + goto case 166; } } - case 147: { + case 165: { Expect(55, t); // "Boolean" currentState = stateStack.Pop(); break; } - case 148: { + case 166: { if (t.kind == 55) { - goto case 147; + goto case 165; } else { - goto case 150; + goto case 168; } } - case 149: { + case 167: { Expect(86, t); // "Date" currentState = stateStack.Pop(); break; } - case 150: { + case 168: { if (t.kind == 86) { - goto case 149; + goto case 167; } else { - goto case 152; + goto case 170; } } - case 151: { + case 169: { Expect(69, t); // "Char" currentState = stateStack.Pop(); break; } - case 152: { + case 170: { if (t.kind == 69) { - goto case 151; + goto case 169; } else { - goto case 154; + goto case 172; } } - case 153: { + case 171: { Expect(193, t); // "String" currentState = stateStack.Pop(); break; } - case 154: { + case 172: { if (t.kind == 193) { - goto case 153; + goto case 171; } else { - goto case 156; + goto case 174; } } - case 155: { + case 173: { Expect(154, t); // "Object" currentState = stateStack.Pop(); break; } - case 156: { + case 174: { if (t.kind == 154) { - goto case 155; + goto case 173; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 157: { + case 175: { Expect(117, t); // "Global" - currentState = 164; + currentState = 182; break; } - case 158: { - stateStack.Push(164); - goto case 210; // Identifier + case 176: { + stateStack.Push(182); + goto case 268; // Identifier } - case 159: { // start of TypeName + case 177: { // start of TypeName if (t.kind == 117) { - goto case 157; + goto case 175; } else { - goto case 160; + goto case 178; } } - case 160: { - if (set[11, t.kind]) { - goto case 158; + case 178: { + if (set[12, t.kind]) { + goto case 176; } else { - goto case 162; + goto case 180; } } - case 161: { - stateStack.Push(164); - goto case 127; // PrimitiveTypeName + case 179: { + stateStack.Push(182); + goto case 145; // PrimitiveTypeName } - case 162: { - if (set[12, t.kind]) { - goto case 161; + case 180: { + if (set[13, t.kind]) { + goto case 179; } else { Error(t); - goto case 164; + goto case 182; } } - case 163: { - stateStack.Push(164); - goto case 170; // TypeSuffix + case 181: { + stateStack.Push(182); + goto case 188; // TypeSuffix } - case 164: { + case 182: { if (t.kind == 25) { - goto case 163; + goto case 181; } else { - goto case 169; + goto case 187; } } - case 165: { + case 183: { Expect(16, t); // "." - currentState = 166; + currentState = 184; break; } - case 166: { - stateStack.Push(168); - goto case 181; // IdentifierOrKeyword + case 184: { + stateStack.Push(186); + goto case 199; // IdentifierOrKeyword } - case 167: { - stateStack.Push(168); - goto case 170; // TypeSuffix + case 185: { + stateStack.Push(186); + goto case 188; // TypeSuffix } - case 168: { + case 186: { if (t.kind == 25) { - goto case 167; + goto case 185; } else { - goto case 169; + goto case 187; } } - case 169: { + case 187: { if (t.kind == 16) { - goto case 165; + goto case 183; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 170: { // start of TypeSuffix + case 188: { // start of TypeSuffix Expect(25, t); // "(" - currentState = 178; + currentState = 196; break; } - case 171: { + case 189: { Expect(155, t); // "Of" - currentState = 172; + currentState = 190; break; } - case 172: { - stateStack.Push(175); - goto case 159; // TypeName + case 190: { + stateStack.Push(193); + goto case 177; // TypeName } - case 173: { + case 191: { Expect(12, t); // "," - currentState = 174; + currentState = 192; break; } - case 174: { - stateStack.Push(175); - goto case 159; // TypeName + case 192: { + stateStack.Push(193); + goto case 177; // TypeName } - case 175: { + case 193: { if (t.kind == 12) { - goto case 173; + goto case 191; } else { - goto case 180; + goto case 198; } } - case 176: { + case 194: { Expect(12, t); // "," - currentState = 177; + currentState = 195; break; } - case 177: { + case 195: { if (t.kind == 12) { - goto case 176; + goto case 194; } else { - goto case 180; + goto case 198; } } - case 178: { + case 196: { if (t.kind == 155) { - goto case 171; + goto case 189; } else { - goto case 179; + goto case 197; } } - case 179: { + case 197: { if (t.kind == 12 || t.kind == 26) { - goto case 177; + goto case 195; } else { Error(t); - goto case 180; + goto case 198; } } - case 180: { + case 198: { Expect(26, t); // ")" currentState = stateStack.Pop(); break; } - case 181: { // start of IdentifierOrKeyword + case 199: { // start of IdentifierOrKeyword currentState = stateStack.Pop(); break; } - case 182: { + case 200: { Expect(3, t); // LiteralString currentState = stateStack.Pop(); break; } - case 183: { + case 201: { Expect(4, t); // LiteralCharacter currentState = stateStack.Pop(); break; } - case 184: { // start of Literal + case 202: { // start of Literal if (t.kind == 3) { - goto case 182; + goto case 200; } else { - goto case 185; + goto case 203; } } - case 185: { + case 203: { if (t.kind == 4) { - goto case 183; + goto case 201; } else { - goto case 187; + goto case 205; } } - case 186: { + case 204: { Expect(5, t); // LiteralInteger currentState = stateStack.Pop(); break; } - case 187: { + case 205: { if (t.kind == 5) { - goto case 186; + goto case 204; } else { - goto case 189; + goto case 207; } } - case 188: { + case 206: { Expect(6, t); // LiteralDouble currentState = stateStack.Pop(); break; } - case 189: { + case 207: { if (t.kind == 6) { - goto case 188; + goto case 206; } else { - goto case 191; + goto case 209; } } - case 190: { + case 208: { Expect(7, t); // LiteralSingle currentState = stateStack.Pop(); break; } - case 191: { + case 209: { if (t.kind == 7) { - goto case 190; + goto case 208; } else { - goto case 193; + goto case 211; } } - case 192: { + case 210: { Expect(8, t); // LiteralDecimal currentState = stateStack.Pop(); break; } - case 193: { + case 211: { if (t.kind == 8) { - goto case 192; + goto case 210; } else { - goto case 195; + goto case 213; } } - case 194: { + case 212: { Expect(9, t); // LiteralDate currentState = stateStack.Pop(); break; } - case 195: { + case 213: { if (t.kind == 9) { - goto case 194; + goto case 212; } else { - goto case 197; + goto case 215; } } - case 196: { + case 214: { Expect(202, t); // "True" currentState = stateStack.Pop(); break; } - case 197: { + case 215: { if (t.kind == 202) { - goto case 196; + goto case 214; } else { - goto case 199; + goto case 217; } } - case 198: { + case 216: { Expect(109, t); // "False" currentState = stateStack.Pop(); break; } - case 199: { + case 217: { if (t.kind == 109) { - goto case 198; + goto case 216; } else { - goto case 201; + goto case 219; } } - case 200: { + case 218: { Expect(151, t); // "Nothing" currentState = stateStack.Pop(); break; } - case 201: { + case 219: { if (t.kind == 151) { - goto case 200; + goto case 218; } else { - goto case 203; + goto case 221; } } - case 202: { + case 220: { Expect(139, t); // "Me" currentState = stateStack.Pop(); break; } - case 203: { + case 221: { if (t.kind == 139) { - goto case 202; + goto case 220; + } else { + goto case 223; + } + } + case 222: { + Expect(144, t); // "MyBase" + currentState = stateStack.Pop(); + break; + } + case 223: { + if (t.kind == 144) { + goto case 222; + } else { + goto case 225; + } + } + case 224: { + Expect(145, t); // "MyClass" + currentState = stateStack.Pop(); + break; + } + case 225: { + if (t.kind == 145) { + goto case 224; + } else { + Error(t); + currentState = stateStack.Pop(); + goto switchlbl; + } + } + case 226: { + stateStack.Push(230); + goto case 268; // Identifier + } + case 227: { + Expect(5, t); // LiteralInteger + currentState = 230; + break; + } + case 228: { + if (set[12, t.kind]) { + goto case 226; + } else { + goto case 229; + } + } + case 229: { + if (t.kind == 5) { + goto case 227; + } else { + Error(t); + goto case 230; + } + } + case 230: { + Expect(11, t); // ":" + currentState = stateStack.Pop(); + break; + } + case 231: { + Expect(92, t); // "Dim" + currentState = 237; + break; + } + case 232: { + Expect(189, t); // "Static" + currentState = 237; + break; + } + case 233: { + if (t.kind == 92) { + goto case 231; + } else { + goto case 234; + } + } + case 234: { + if (t.kind == 189) { + goto case 232; + } else { + goto case 236; + } + } + case 235: { + Expect(75, t); // "Const" + currentState = 237; + break; + } + case 236: { + if (t.kind == 75) { + goto case 235; + } else { + Error(t); + goto case 237; + } + } + case 237: { + stateStack.Push(239); + goto case 268; // Identifier + } + case 238: { + Expect(21, t); // "?" + currentState = 244; + break; + } + case 239: { + if (t.kind == 21) { + goto case 238; + } else { + goto case 244; + } + } + case 240: { + Expect(25, t); // "(" + currentState = 242; + break; + } + case 241: { + Expect(12, t); // "," + currentState = 242; + break; + } + case 242: { + if (t.kind == 12) { + goto case 241; + } else { + goto case 243; + } + } + case 243: { + Expect(26, t); // ")" + currentState = 254; + break; + } + case 244: { + if (t.kind == 25) { + goto case 240; + } else { + goto case 254; + } + } + case 245: { + Expect(12, t); // "," + currentState = 246; + break; + } + case 246: { + stateStack.Push(248); + goto case 268; // Identifier + } + case 247: { + Expect(21, t); // "?" + currentState = 253; + break; + } + case 248: { + if (t.kind == 21) { + goto case 247; + } else { + goto case 253; + } + } + case 249: { + Expect(25, t); // "(" + currentState = 251; + break; + } + case 250: { + Expect(12, t); // "," + currentState = 251; + break; + } + case 251: { + if (t.kind == 12) { + goto case 250; + } else { + goto case 252; + } + } + case 252: { + Expect(26, t); // ")" + currentState = 254; + break; + } + case 253: { + if (t.kind == 25) { + goto case 249; + } else { + goto case 254; + } + } + case 254: { + if (t.kind == 12) { + goto case 245; + } else { + goto case 262; + } + } + case 255: { + Expect(50, t); // "As" + currentState = 257; + break; + } + case 256: { + Expect(148, t); // "New" + currentState = 258; + break; + } + case 257: { + if (t.kind == 148) { + goto case 256; + } else { + goto case 258; + } + } + case 258: { + stateStack.Push(261); + goto case 177; // TypeName + } + case 259: { + Expect(25, t); // "(" + currentState = 260; + break; + } + case 260: { + Expect(26, t); // ")" + currentState = 265; + break; + } + case 261: { + if (t.kind == 25) { + goto case 259; + } else { + goto case 265; + } + } + case 262: { + if (t.kind == 50) { + goto case 255; } else { - goto case 205; + goto case 265; } } - case 204: { - Expect(144, t); // "MyBase" - currentState = stateStack.Pop(); + case 263: { + Expect(10, t); // "=" + currentState = 264; break; } - case 205: { - if (t.kind == 144) { - goto case 204; + case 264: { + goto case 117; // Expression + } + case 265: { + if (t.kind == 10) { + goto case 263; } else { - goto case 207; + currentState = stateStack.Pop(); + goto switchlbl; } } - case 206: { - Expect(145, t); // "MyClass" - currentState = stateStack.Pop(); - break; + case 266: { // start of Statement + if (set[14, t.kind]) { + goto case 228; + } else { + goto case 267; + } } - case 207: { - if (t.kind == 145) { - goto case 206; + case 267: { + if (t.kind == 75 || t.kind == 92 || t.kind == 189) { + goto case 233; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 208: { - stateStack.Push(212); - goto case 215; // IdentifierForFieldDeclaration + case 268: { // start of Identifier + PushContext(Context.IdentifierExpected); + goto case 271; } - case 209: { + case 269: { + stateStack.Push(273); + goto case 276; // IdentifierForFieldDeclaration + } + case 270: { Expect(85, t); // "Custom" - currentState = 212; + currentState = 273; break; } - case 210: { // start of Identifier - PushContext(Context.IdentifierExpected); - if (set[13, t.kind]) { - goto case 208; + case 271: { + if (set[15, t.kind]) { + goto case 269; } else { - goto case 211; + goto case 272; } } - case 211: { + case 272: { if (t.kind == 85) { - goto case 209; + goto case 270; } else { Error(t); - goto case 212; + goto case 273; } } - case 212: { + case 273: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 213: { + case 274: { Expect(2, t); // ident currentState = stateStack.Pop(); break; } - case 214: { + case 275: { Expect(45, t); // "Aggregate" currentState = stateStack.Pop(); break; } - case 215: { // start of IdentifierForFieldDeclaration + case 276: { // start of IdentifierForFieldDeclaration if (t.kind == 2) { - goto case 213; + goto case 274; } else { - goto case 216; + goto case 277; } } - case 216: { + case 277: { if (t.kind == 45) { - goto case 214; + goto case 275; } else { - goto case 218; + goto case 279; } } - case 217: { + case 278: { Expect(49, t); // "Ansi" currentState = stateStack.Pop(); break; } - case 218: { + case 279: { if (t.kind == 49) { - goto case 217; + goto case 278; } else { - goto case 220; + goto case 281; } } - case 219: { + case 280: { Expect(51, t); // "Ascending" currentState = stateStack.Pop(); break; } - case 220: { + case 281: { if (t.kind == 51) { - goto case 219; + goto case 280; } else { - goto case 222; + goto case 283; } } - case 221: { + case 282: { Expect(52, t); // "Assembly" currentState = stateStack.Pop(); break; } - case 222: { + case 283: { if (t.kind == 52) { - goto case 221; + goto case 282; } else { - goto case 224; + goto case 285; } } - case 223: { + case 284: { Expect(53, t); // "Auto" currentState = stateStack.Pop(); break; } - case 224: { + case 285: { if (t.kind == 53) { - goto case 223; + goto case 284; } else { - goto case 226; + goto case 287; } } - case 225: { + case 286: { Expect(54, t); // "Binary" currentState = stateStack.Pop(); break; } - case 226: { + case 287: { if (t.kind == 54) { - goto case 225; + goto case 286; } else { - goto case 228; + goto case 289; } } - case 227: { + case 288: { Expect(57, t); // "By" currentState = stateStack.Pop(); break; } - case 228: { + case 289: { if (t.kind == 57) { - goto case 227; + goto case 288; } else { - goto case 230; + goto case 291; } } - case 229: { + case 290: { Expect(74, t); // "Compare" currentState = stateStack.Pop(); break; } - case 230: { + case 291: { if (t.kind == 74) { - goto case 229; + goto case 290; } else { - goto case 232; + goto case 293; } } - case 231: { + case 292: { Expect(91, t); // "Descending" currentState = stateStack.Pop(); break; } - case 232: { + case 293: { if (t.kind == 91) { - goto case 231; + goto case 292; } else { - goto case 234; + goto case 295; } } - case 233: { + case 294: { Expect(94, t); // "Distinct" currentState = stateStack.Pop(); break; } - case 234: { + case 295: { if (t.kind == 94) { - goto case 233; + goto case 294; } else { - goto case 236; + goto case 297; } } - case 235: { + case 296: { Expect(103, t); // "Equals" currentState = stateStack.Pop(); break; } - case 236: { + case 297: { if (t.kind == 103) { - goto case 235; + goto case 296; } else { - goto case 238; + goto case 299; } } - case 237: { + case 298: { Expect(108, t); // "Explicit" currentState = stateStack.Pop(); break; } - case 238: { + case 299: { if (t.kind == 108) { - goto case 237; + goto case 298; } else { - goto case 240; + goto case 301; } } - case 239: { + case 300: { Expect(113, t); // "From" currentState = stateStack.Pop(); break; } - case 240: { + case 301: { if (t.kind == 113) { - goto case 239; + goto case 300; } else { - goto case 242; + goto case 303; } } - case 241: { + case 302: { Expect(120, t); // "Group" currentState = stateStack.Pop(); break; } - case 242: { + case 303: { if (t.kind == 120) { - goto case 241; + goto case 302; } else { - goto case 244; + goto case 305; } } - case 243: { + case 304: { Expect(126, t); // "Infer" currentState = stateStack.Pop(); break; } - case 244: { + case 305: { if (t.kind == 126) { - goto case 243; + goto case 304; } else { - goto case 246; + goto case 307; } } - case 245: { + case 306: { Expect(130, t); // "Into" currentState = stateStack.Pop(); break; } - case 246: { + case 307: { if (t.kind == 130) { - goto case 245; + goto case 306; } else { - goto case 248; + goto case 309; } } - case 247: { + case 308: { Expect(133, t); // "Join" currentState = stateStack.Pop(); break; } - case 248: { + case 309: { if (t.kind == 133) { - goto case 247; + goto case 308; } else { - goto case 250; + goto case 311; } } - case 249: { + case 310: { Expect(156, t); // "Off" currentState = stateStack.Pop(); break; } - case 250: { + case 311: { if (t.kind == 156) { - goto case 249; + goto case 310; } else { - goto case 252; + goto case 313; } } - case 251: { + case 312: { Expect(162, t); // "Order" currentState = stateStack.Pop(); break; } - case 252: { + case 313: { if (t.kind == 162) { - goto case 251; + goto case 312; } else { - goto case 254; + goto case 315; } } - case 253: { + case 314: { Expect(169, t); // "Preserve" currentState = stateStack.Pop(); break; } - case 254: { + case 315: { if (t.kind == 169) { - goto case 253; + goto case 314; } else { - goto case 256; + goto case 317; } } - case 255: { + case 316: { Expect(188, t); // "Skip" currentState = stateStack.Pop(); break; } - case 256: { + case 317: { if (t.kind == 188) { - goto case 255; + goto case 316; } else { - goto case 258; + goto case 319; } } - case 257: { + case 318: { Expect(197, t); // "Take" currentState = stateStack.Pop(); break; } - case 258: { + case 319: { if (t.kind == 197) { - goto case 257; + goto case 318; } else { - goto case 260; + goto case 321; } } - case 259: { + case 320: { Expect(198, t); // "Text" currentState = stateStack.Pop(); break; } - case 260: { + case 321: { if (t.kind == 198) { - goto case 259; + goto case 320; } else { - goto case 262; + goto case 323; } } - case 261: { + case 322: { Expect(208, t); // "Unicode" currentState = stateStack.Pop(); break; } - case 262: { + case 323: { if (t.kind == 208) { - goto case 261; + goto case 322; } else { - goto case 264; + goto case 325; } } - case 263: { + case 324: { Expect(209, t); // "Until" currentState = stateStack.Pop(); break; } - case 264: { + case 325: { if (t.kind == 209) { - goto case 263; + goto case 324; } else { - goto case 266; + goto case 327; } } - case 265: { + case 326: { Expect(215, t); // "Where" currentState = stateStack.Pop(); break; } - case 266: { + case 327: { if (t.kind == 215) { - goto case 265; + goto case 326; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 267: { + case 328: { Expect(173, t); // "Public" currentState = stateStack.Pop(); break; } - case 268: { + case 329: { Expect(112, t); // "Friend" currentState = stateStack.Pop(); break; } - case 269: { // start of AccessModifier + case 330: { // start of AccessModifier if (t.kind == 173) { - goto case 267; + goto case 328; } else { - goto case 270; + goto case 331; } } - case 270: { + case 331: { if (t.kind == 112) { - goto case 268; + goto case 329; } else { - goto case 272; + goto case 333; } } - case 271: { + case 332: { Expect(172, t); // "Protected" currentState = stateStack.Pop(); break; } - case 272: { + case 333: { if (t.kind == 172) { - goto case 271; + goto case 332; } else { - goto case 274; + goto case 335; } } - case 273: { + case 334: { Expect(170, t); // "Private" currentState = stateStack.Pop(); break; } - case 274: { + case 335: { if (t.kind == 170) { - goto case 273; + goto case 334; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 275: { - goto case 269; // AccessModifier + case 336: { + goto case 330; // AccessModifier } - case 276: { + case 337: { Expect(184, t); // "Shadows" currentState = stateStack.Pop(); break; } - case 277: { // start of TypeModifier - if (set[14, t.kind]) { - goto case 275; + case 338: { // start of TypeModifier + if (set[16, t.kind]) { + goto case 336; } else { - goto case 278; + goto case 339; } } - case 278: { + case 339: { if (t.kind == 184) { - goto case 276; + goto case 337; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 279: { - goto case 269; // AccessModifier + case 340: { + goto case 330; // AccessModifier } - case 280: { + case 341: { Expect(184, t); // "Shadows" currentState = stateStack.Pop(); break; } - case 281: { // start of MemberModifier - if (set[14, t.kind]) { - goto case 279; + case 342: { // start of MemberModifier + if (set[16, t.kind]) { + goto case 340; } else { - goto case 282; + goto case 343; } } - case 282: { + case 343: { if (t.kind == 184) { - goto case 280; + goto case 341; } else { - goto case 284; + goto case 345; } } - case 283: { + case 344: { Expect(185, t); // "Shared" currentState = stateStack.Pop(); break; } - case 284: { + case 345: { if (t.kind == 185) { - goto case 283; + goto case 344; } else { - goto case 286; + goto case 347; } } - case 285: { + case 346: { Expect(165, t); // "Overridable" currentState = stateStack.Pop(); break; } - case 286: { + case 347: { if (t.kind == 165) { - goto case 285; + goto case 346; } else { - goto case 288; + goto case 349; } } - case 287: { + case 348: { Expect(153, t); // "NotOverridable" currentState = stateStack.Pop(); break; } - case 288: { + case 349: { if (t.kind == 153) { - goto case 287; + goto case 348; } else { - goto case 290; + goto case 351; } } - case 289: { + case 350: { Expect(166, t); // "Overrides" currentState = stateStack.Pop(); break; } - case 290: { + case 351: { if (t.kind == 166) { - goto case 289; + goto case 350; } else { - goto case 292; + goto case 353; } } - case 291: { + case 352: { Expect(164, t); // "Overloads" currentState = stateStack.Pop(); break; } - case 292: { + case 353: { if (t.kind == 164) { - goto case 291; + goto case 352; } else { - goto case 294; + goto case 355; } } - case 293: { + case 354: { Expect(168, t); // "Partial" currentState = stateStack.Pop(); break; } - case 294: { + case 355: { if (t.kind == 168) { - goto case 293; + goto case 354; } else { Error(t); currentState = stateStack.Pop(); goto switchlbl; } } - case 295: { + case 356: { Expect(59, t); // "ByVal" currentState = stateStack.Pop(); break; } - case 296: { + case 357: { Expect(56, t); // "ByRef" currentState = stateStack.Pop(); break; } - case 297: { // start of ParameterModifier + case 358: { // start of ParameterModifier if (t.kind == 59) { - goto case 295; + goto case 356; } else { - goto case 298; + goto case 359; } } - case 298: { + case 359: { if (t.kind == 56) { - goto case 296; + goto case 357; } else { - goto case 300; + goto case 361; } } - case 299: { + case 360: { Expect(160, t); // "Optional" currentState = stateStack.Pop(); break; } - case 300: { + case 361: { if (t.kind == 160) { - goto case 299; + goto case 360; } else { - goto case 302; + goto case 363; } } - case 301: { + case 362: { Expect(167, t); // "ParamArray" currentState = stateStack.Pop(); break; } - case 302: { + case 363: { if (t.kind == 167) { - goto case 301; + goto case 362; } else { Error(t); currentState = stateStack.Pop(); @@ -1774,19 +2120,21 @@ int currentState = 1; } static readonly bool[,] set = { - {x,x,x,x, 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,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,T,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,T,x, T,T,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, 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,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, 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,T,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,T,x, T,T,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,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x}, {x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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, 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,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,T,x, T,T,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, 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, 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,T,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,T,x, T,T,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, 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,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, 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,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,T,x, T,T,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, 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,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, 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,T,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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,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, 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, T,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,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,T, T,T,T,x, T,T,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,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, T,x,T,x, x,x,x,T, x,T,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,T,T,x, x,x,x,x, x,x,x,x, T,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, 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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,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,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, T,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, x,x,x,x, x,x,x,x}, {x,x,x,T, T,T,T,T, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, T,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,T,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,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, 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,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,T,x,x, x,x,T,T, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x} diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.frame b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.frame index 24b844d4e9..f81cc0367a 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.frame +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.frame @@ -29,7 +29,7 @@ using System; -->namespace -public partial class Parser { +public partial class ExpressionFinder { -->constants const bool T = true; const bool x = false; @@ -38,7 +38,7 @@ public partial class Parser { public ILexer lexer; public Errors errors; - public Parser(ILexer lexer) + public ExpressionFinder(ILexer lexer) { this.lexer = lexer; this.errors = new Errors(); diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame index 80751e06b4..2263e99b14 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame @@ -30,15 +30,16 @@ using System.Collections.Generic; -->namespace -partial class Parser { +partial class ExpressionFinder { -->constants const bool T = true; const bool x = false; -->declarations readonly Stack stateStack = new Stack(); + bool nextTokenIsPotentialStartOfXmlMode = false; - public Parser() + public ExpressionFinder() { stateStack.Push(-1); // required so that we don't crash when leaving the root production } @@ -55,6 +56,7 @@ partial class Parser { public void InformToken(Token t) { + nextTokenIsPotentialStartOfXmlMode = false; -->informToken } diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs index 5d4ddf1e07..4427c4afec 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs @@ -7,29 +7,69 @@ using System; +using System.IO; +using ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.Parser; +using VB = ICSharpCode.NRefactory.Parser.VB; +using ICSharpCode.NRefactory.Parser.VBNet.Experimental; using NUnit.Framework; -namespace VBParserExperiment +namespace VBParserExperiment.Tests { [TestFixture] public class ParserTests { [Test] - public void TestMethod() + public void SimpleGlobal() { - // TODO: Add your test. + RunTest( + @"Option Explicit", + @"enter Global +exit Global +" + ); } - [TestFixtureSetUp] - public void Init() + [Test] + public void VariableWithXmlLiteral() { - // TODO: Add Init code. + RunTest( + @"Class Test + Public Sub New() + Dim x = + End Sub +End Class +", + @"enter Global + enter Type + enter Member + enter IdentifierExpected + exit IdentifierExpected + enter Body + enter IdentifierExpected + exit IdentifierExpected + enter Xml + exit Xml + exit Body + exit Member + exit Type +exit Global +" + ); } - [TestFixtureTearDown] - public void Dispose() + void RunTest(string code, string expectedOutput) { - // TODO: Add tear down code. + ExpressionFinder p = new ExpressionFinder(); + ILexer lexer = ParserFactory.CreateLexer(SupportedLanguage.VBNet, new StringReader(code)); + Token t; + + do { + t = lexer.NextToken(); + p.InformToken(t); + } while (t.Kind != VB.Tokens.EOF); + + Assert.AreEqual(expectedOutput, p.Output); } } } diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/Program.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/Program.cs index fb896fdf7d..fbe9cb6fde 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/Program.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/Program.cs @@ -16,38 +16,22 @@ namespace VBParserExperiment { class Program { - static string data = @"Option Explicit -Option Strict On - -Imports System -Imports System.Linq - -Module Program - -End Module - -Namespace Test - Module Functions - Public Sub New() - - End Sub - - Public Sub Test(ByVal x As Integer) - - End Sub - End Module -End Namespace + static string data = @"Class Test + Public Sub New() + Dim x = + End Sub +End Class "; public static void Main(string[] args) { - Parser p = new Parser(); - ILexer lexer = ParserFactory.CreateLexer(SupportedLanguage.VBNet, new StringReader(data)); - Token t; - do { - t = lexer.NextToken(); - p.InformToken(t); - } while (t.Kind != VB.Tokens.EOF); + ExpressionFinder p = new ExpressionFinder(); + ILexer lexer = ParserFactory.CreateLexer(SupportedLanguage.VBNet, new StringReader(data)); + Token t; + do { + t = lexer.NextToken(); + p.InformToken(t); + } while (t.Kind != VB.Tokens.EOF); Console.ReadKey(true); } diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/TokenTests.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/TokenTests.cs new file mode 100644 index 0000000000..66aa3a5ecb --- /dev/null +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/TokenTests.cs @@ -0,0 +1,29 @@ +// +// +// +// +// $Revision$ +// + + +using System; +using ICSharpCode.NRefactory.Parser; +using NUnit.Framework; + +namespace VBParserExperiment +{ + [TestFixture] + public class TokenTests + { + [Test] + public void TestMethod() + { + Assert.DoesNotThrow( + () => { + string text = new Token(71, 1, 1).ToString(); + Console.WriteLine(text); + } + ); + } + } +} diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/VBParserExperiment.csproj b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/VBParserExperiment.csproj index 2248ec5c01..4c83ba917a 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/VBParserExperiment.csproj +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/VBParserExperiment.csproj @@ -50,6 +50,7 @@ + diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs index db74d07184..24f50dea7d 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs @@ -1,5 +1,3 @@ - -#line 1 "VBNET.ATG" using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; @@ -7,37 +5,42 @@ using System.Text; using ICSharpCode.NRefactory.Ast; using ICSharpCode.NRefactory.Parser.VB; using ASTAttribute = ICSharpCode.NRefactory.Ast.Attribute; -/* - Parser.frame file for NRefactory. - */ + + + using System; -using System.Reflection; namespace ICSharpCode.NRefactory.Parser.VB { - partial class Parser : AbstractParser { - const int maxT = 222; + public const int _EOF = 0; + public const int _EOL = 1; + public const int _ident = 2; + public const int _LiteralString = 3; + public const int _LiteralCharacter = 4; + public const int _LiteralInteger = 5; + public const int _LiteralDouble = 6; + public const int _LiteralSingle = 7; + public const int _LiteralDecimal = 8; + public const int _LiteralDate = 9; + public const int maxT = 222; // usings = new List(); - - Expect(124); -#line 303 "VBNET.ATG" + Expect(124); Location startPos = t.Location; Using u; - - ImportClause( -#line 306 "VBNET.ATG" -out u); -#line 306 "VBNET.ATG" - if (u != null) { usings.Add(u); } + ImportClause(out u); + if (u != null) { usings.Add(u); } while (la.kind == 12) { - lexer.NextToken(); - ImportClause( -#line 308 "VBNET.ATG" -out u); - -#line 308 "VBNET.ATG" - if (u != null) { usings.Add(u); } + Get(); + ImportClause(out u); + if (u != null) { usings.Add(u); } } EndOfStmt(); - -#line 312 "VBNET.ATG" UsingDeclaration usingDeclaration = new UsingDeclaration(usings); usingDeclaration.StartLocation = startPos; usingDeclaration.EndLocation = t.Location; compilationUnit.AddChild(usingDeclaration); - + } void GlobalAttributeSection() { Expect(28); - -#line 2573 "VBNET.ATG" - Location startPos = t.Location; + Location startPos = t.Location; if (la.kind == 52) { - lexer.NextToken(); + Get(); } else if (la.kind == 141) { - lexer.NextToken(); + Get(); } else SynErr(226); - -#line 2575 "VBNET.ATG" string attributeTarget = t.val != null ? t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture) : null; List attributes = new List(); ASTAttribute attribute; - + Expect(11); - Attribute( -#line 2579 "VBNET.ATG" -out attribute); - -#line 2579 "VBNET.ATG" - attributes.Add(attribute); - while ( -#line 2580 "VBNET.ATG" -NotFinalComma()) { + Attribute(out attribute); + attributes.Add(attribute); + while (NotFinalComma()) { if (la.kind == 12) { - lexer.NextToken(); + Get(); if (la.kind == 52) { - lexer.NextToken(); + Get(); } else if (la.kind == 141) { - lexer.NextToken(); + Get(); } else SynErr(227); Expect(11); } - Attribute( -#line 2580 "VBNET.ATG" -out attribute); - -#line 2580 "VBNET.ATG" - attributes.Add(attribute); + Attribute(out attribute); + attributes.Add(attribute); } if (la.kind == 12) { - lexer.NextToken(); + Get(); } Expect(27); EndOfStmt(); - -#line 2585 "VBNET.ATG" AttributeSection section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, @@ -233,97 +182,63 @@ out attribute); EndLocation = t.EndLocation }; compilationUnit.AddChild(section); - + } void NamespaceMemberDecl() { - -#line 345 "VBNET.ATG" ModifierList m = new ModifierList(); AttributeSection section; List attributes = new List(); string qualident; - - if (la.kind == 146) { - lexer.NextToken(); -#line 352 "VBNET.ATG" + if (la.kind == 146) { + Get(); Location startPos = t.Location; - - Qualident( -#line 354 "VBNET.ATG" -out qualident); -#line 356 "VBNET.ATG" + Qualident(out qualident); INode node = new NamespaceDeclaration(qualident); node.StartLocation = startPos; compilationUnit.AddChild(node); compilationUnit.BlockStart(node); - + EndOfStmt(); NamespaceBody(); - -#line 364 "VBNET.ATG" node.EndLocation = t.Location; compilationUnit.BlockEnd(); - + } else if (StartOf(2)) { while (la.kind == 28) { - AttributeSection( -#line 368 "VBNET.ATG" -out section); - -#line 368 "VBNET.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } while (StartOf(3)) { - TypeModifier( -#line 369 "VBNET.ATG" -m); + TypeModifier(m); } - NonModuleDeclaration( -#line 369 "VBNET.ATG" -m, attributes); + NonModuleDeclaration(m, attributes); } else SynErr(228); } - void OptionValue( -#line 284 "VBNET.ATG" -ref bool val) { + void OptionValue(ref bool val) { if (la.kind == 157) { - lexer.NextToken(); - -#line 286 "VBNET.ATG" - val = true; + Get(); + val = true; } else if (la.kind == 156) { - lexer.NextToken(); - -#line 288 "VBNET.ATG" - val = false; + Get(); + val = false; } else SynErr(229); } - void ImportClause( -#line 319 "VBNET.ATG" -out Using u) { - -#line 321 "VBNET.ATG" + void ImportClause(out Using u) { string qualident = null; TypeReference aliasedType = null; u = null; - + if (StartOf(4)) { - Qualident( -#line 326 "VBNET.ATG" -out qualident); + Qualident(out qualident); if (la.kind == 10) { - lexer.NextToken(); - TypeName( -#line 327 "VBNET.ATG" -out aliasedType); + Get(); + TypeName(out aliasedType); } - -#line 329 "VBNET.ATG" if (qualident != null && qualident.Length > 0) { if (aliasedType != null) { u = new Using(qualident, aliasedType); @@ -331,82 +246,48 @@ out aliasedType); u = new Using(qualident); } } - - } else if (la.kind == 28) { -#line 337 "VBNET.ATG" - string prefix = null; - lexer.NextToken(); + } else if (la.kind == 28) { + string prefix = null; + Get(); Identifier(); - if (la.kind == 11) { - lexer.NextToken(); - Identifier(); - -#line 338 "VBNET.ATG" - prefix = t.val; - } + prefix = t.val; Expect(10); Expect(3); - -#line 338 "VBNET.ATG" - u = new Using(t.literalValue as string, prefix); + u = new Using(t.literalValue as string, prefix); Expect(27); } else SynErr(230); } - void Qualident( -#line 3331 "VBNET.ATG" -out string qualident) { - -#line 3333 "VBNET.ATG" + void Qualident(out string qualident) { string name; qualidentBuilder.Length = 0; - - Identifier(); -#line 3337 "VBNET.ATG" - qualidentBuilder.Append(t.val); - while ( -#line 3338 "VBNET.ATG" -DotAndIdentOrKw()) { + Identifier(); + qualidentBuilder.Append(t.val); + while (DotAndIdentOrKw()) { Expect(16); - IdentifierOrKeyword( -#line 3338 "VBNET.ATG" -out name); - -#line 3338 "VBNET.ATG" - qualidentBuilder.Append('.'); qualidentBuilder.Append(name); + IdentifierOrKeyword(out name); + qualidentBuilder.Append('.'); qualidentBuilder.Append(name); } - -#line 3340 "VBNET.ATG" - qualident = qualidentBuilder.ToString(); + qualident = qualidentBuilder.ToString(); } - void TypeName( -#line 2446 "VBNET.ATG" -out TypeReference typeref) { - -#line 2447 "VBNET.ATG" - ArrayList rank = null; - NonArrayTypeName( -#line 2449 "VBNET.ATG" -out typeref, false); - ArrayTypeModifiers( -#line 2453 "VBNET.ATG" -out rank); - -#line 2454 "VBNET.ATG" + void TypeName(out TypeReference typeref) { + ArrayList rank = null; + NonArrayTypeName(out typeref, false); + ArrayTypeModifiers(out rank); if (rank != null && typeref != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); } - + } void Identifier() { if (StartOf(5)) { IdentifierForFieldDeclaration(); } else if (la.kind == 85) { - lexer.NextToken(); + Get(); } else SynErr(231); } @@ -425,36 +306,22 @@ out rank); EndOfStmt(); } - void AttributeSection( -#line 2648 "VBNET.ATG" -out AttributeSection section) { - -#line 2650 "VBNET.ATG" + void AttributeSection(out AttributeSection section) { string attributeTarget = "";List attributes = new List(); ASTAttribute attribute; - - - Expect(28); -#line 2654 "VBNET.ATG" - Location startPos = t.Location; - if ( -#line 2655 "VBNET.ATG" -IsLocalAttrTarget()) { - if (la.kind == 106) { - lexer.NextToken(); -#line 2656 "VBNET.ATG" + Expect(28); + Location startPos = t.Location; + if (IsLocalAttrTarget()) { + if (la.kind == 106) { + Get(); attributeTarget = "event"; } else if (la.kind == 180) { - lexer.NextToken(); - -#line 2657 "VBNET.ATG" + Get(); attributeTarget = "return"; - } else { + } else if (StartOf(4)) { Identifier(); - -#line 2660 "VBNET.ATG" string val = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture); if (val != "field" || val != "method" || val != "module" || val != "param" || @@ -462,804 +329,498 @@ IsLocalAttrTarget()) { Error("attribute target specifier (event, return, field," + "method, module, param, property, or type) expected"); attributeTarget = t.val; - - } + + } else SynErr(232); Expect(11); } - Attribute( -#line 2670 "VBNET.ATG" -out attribute); - -#line 2670 "VBNET.ATG" - attributes.Add(attribute); - while ( -#line 2671 "VBNET.ATG" -NotFinalComma()) { + Attribute(out attribute); + attributes.Add(attribute); + while (NotFinalComma()) { Expect(12); - Attribute( -#line 2671 "VBNET.ATG" -out attribute); - -#line 2671 "VBNET.ATG" - attributes.Add(attribute); + Attribute(out attribute); + attributes.Add(attribute); } if (la.kind == 12) { - lexer.NextToken(); + Get(); } Expect(27); - -#line 2675 "VBNET.ATG" section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, StartLocation = startPos, EndLocation = t.EndLocation }; - + } - void TypeModifier( -#line 3414 "VBNET.ATG" -ModifierList m) { + void TypeModifier(ModifierList m) { switch (la.kind) { case 173: { - lexer.NextToken(); - -#line 3415 "VBNET.ATG" - m.Add(Modifiers.Public, t.Location); + Get(); + m.Add(Modifiers.Public, t.Location); break; } case 172: { - lexer.NextToken(); - -#line 3416 "VBNET.ATG" - m.Add(Modifiers.Protected, t.Location); + Get(); + m.Add(Modifiers.Protected, t.Location); break; } case 112: { - lexer.NextToken(); - -#line 3417 "VBNET.ATG" - m.Add(Modifiers.Internal, t.Location); + Get(); + m.Add(Modifiers.Internal, t.Location); break; } case 170: { - lexer.NextToken(); - -#line 3418 "VBNET.ATG" - m.Add(Modifiers.Private, t.Location); + Get(); + m.Add(Modifiers.Private, t.Location); break; } case 185: { - lexer.NextToken(); - -#line 3419 "VBNET.ATG" - m.Add(Modifiers.Static, t.Location); + Get(); + m.Add(Modifiers.Static, t.Location); break; } case 184: { - lexer.NextToken(); - -#line 3420 "VBNET.ATG" - m.Add(Modifiers.New, t.Location); + Get(); + m.Add(Modifiers.New, t.Location); break; } case 142: { - lexer.NextToken(); - -#line 3421 "VBNET.ATG" - m.Add(Modifiers.Abstract, t.Location); + Get(); + m.Add(Modifiers.Abstract, t.Location); break; } case 152: { - lexer.NextToken(); - -#line 3422 "VBNET.ATG" - m.Add(Modifiers.Sealed, t.Location); + Get(); + m.Add(Modifiers.Sealed, t.Location); break; } case 168: { - lexer.NextToken(); - -#line 3423 "VBNET.ATG" - m.Add(Modifiers.Partial, t.Location); + Get(); + m.Add(Modifiers.Partial, t.Location); break; } - default: SynErr(232); break; + default: SynErr(233); break; } } - void NonModuleDeclaration( -#line 428 "VBNET.ATG" -ModifierList m, List attributes) { - -#line 430 "VBNET.ATG" + void NonModuleDeclaration(ModifierList m, List attributes) { TypeReference typeRef = null; List baseInterfaces = null; - + switch (la.kind) { case 71: { - -#line 433 "VBNET.ATG" - m.Check(Modifiers.Classes); - lexer.NextToken(); - -#line 436 "VBNET.ATG" + m.Check(Modifiers.Classes); + Get(); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); newType.StartLocation = t.Location; compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); - + newType.Type = ClassType.Class; - - Identifier(); -#line 443 "VBNET.ATG" - newType.Name = t.val; - TypeParameterList( -#line 444 "VBNET.ATG" -newType.Templates); + Identifier(); + newType.Name = t.val; + TypeParameterList(newType.Templates); EndOfStmt(); - -#line 446 "VBNET.ATG" - newType.BodyStartLocation = t.Location; + newType.BodyStartLocation = t.Location; if (la.kind == 127) { - ClassBaseType( -#line 447 "VBNET.ATG" -out typeRef); - -#line 447 "VBNET.ATG" - SafeAdd(newType, newType.BaseTypes, typeRef); + ClassBaseType(out typeRef); + SafeAdd(newType, newType.BaseTypes, typeRef); } while (la.kind == 123) { - TypeImplementsClause( -#line 448 "VBNET.ATG" -out baseInterfaces); - -#line 448 "VBNET.ATG" - newType.BaseTypes.AddRange(baseInterfaces); + TypeImplementsClause(out baseInterfaces); + newType.BaseTypes.AddRange(baseInterfaces); } - ClassBody( -#line 449 "VBNET.ATG" -newType); + ClassBody(newType); Expect(100); Expect(71); - -#line 450 "VBNET.ATG" - newType.EndLocation = t.EndLocation; + newType.EndLocation = t.EndLocation; EndOfStmt(); - -#line 453 "VBNET.ATG" compilationUnit.BlockEnd(); - + break; } case 141: { - lexer.NextToken(); - -#line 457 "VBNET.ATG" + Get(); m.Check(Modifiers.VBModules); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.StartLocation = m.GetDeclarationLocation(t.Location); newType.Type = ClassType.Module; - - Identifier(); -#line 464 "VBNET.ATG" - newType.Name = t.val; + Identifier(); + newType.Name = t.val; EndOfStmt(); - -#line 466 "VBNET.ATG" - newType.BodyStartLocation = t.Location; - ModuleBody( -#line 467 "VBNET.ATG" -newType); - -#line 469 "VBNET.ATG" + newType.BodyStartLocation = t.Location; + ModuleBody(newType); compilationUnit.BlockEnd(); - + break; } case 194: { - lexer.NextToken(); - -#line 473 "VBNET.ATG" + Get(); m.Check(Modifiers.VBStructures); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.StartLocation = m.GetDeclarationLocation(t.Location); newType.Type = ClassType.Struct; - - Identifier(); -#line 480 "VBNET.ATG" - newType.Name = t.val; - TypeParameterList( -#line 481 "VBNET.ATG" -newType.Templates); + Identifier(); + newType.Name = t.val; + TypeParameterList(newType.Templates); EndOfStmt(); - -#line 483 "VBNET.ATG" - newType.BodyStartLocation = t.Location; + newType.BodyStartLocation = t.Location; while (la.kind == 123) { - TypeImplementsClause( -#line 484 "VBNET.ATG" -out baseInterfaces); - -#line 484 "VBNET.ATG" + TypeImplementsClause(out baseInterfaces); newType.BaseTypes.AddRange(baseInterfaces); } - StructureBody( -#line 485 "VBNET.ATG" -newType); - -#line 487 "VBNET.ATG" + StructureBody(newType); compilationUnit.BlockEnd(); - + break; } case 102: { - lexer.NextToken(); - -#line 492 "VBNET.ATG" + Get(); m.Check(Modifiers.VBEnums); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); newType.StartLocation = m.GetDeclarationLocation(t.Location); compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); - + newType.Type = ClassType.Enum; - - Identifier(); -#line 500 "VBNET.ATG" - newType.Name = t.val; + Identifier(); + newType.Name = t.val; if (la.kind == 50) { - lexer.NextToken(); - NonArrayTypeName( -#line 501 "VBNET.ATG" -out typeRef, false); - -#line 501 "VBNET.ATG" - SafeAdd(newType, newType.BaseTypes, typeRef); + Get(); + NonArrayTypeName(out typeRef, false); + SafeAdd(newType, newType.BaseTypes, typeRef); } EndOfStmt(); - -#line 503 "VBNET.ATG" - newType.BodyStartLocation = t.Location; - EnumBody( -#line 504 "VBNET.ATG" -newType); - -#line 506 "VBNET.ATG" + newType.BodyStartLocation = t.Location; + EnumBody(newType); compilationUnit.BlockEnd(); - + break; } case 129: { - lexer.NextToken(); - -#line 511 "VBNET.ATG" + Get(); m.Check(Modifiers.VBInterfacs); TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes); newType.StartLocation = m.GetDeclarationLocation(t.Location); compilationUnit.AddChild(newType); compilationUnit.BlockStart(newType); newType.Type = ClassType.Interface; - - Identifier(); -#line 518 "VBNET.ATG" - newType.Name = t.val; - TypeParameterList( -#line 519 "VBNET.ATG" -newType.Templates); + Identifier(); + newType.Name = t.val; + TypeParameterList(newType.Templates); EndOfStmt(); - -#line 521 "VBNET.ATG" - newType.BodyStartLocation = t.Location; + newType.BodyStartLocation = t.Location; while (la.kind == 127) { - InterfaceBase( -#line 522 "VBNET.ATG" -out baseInterfaces); - -#line 522 "VBNET.ATG" - newType.BaseTypes.AddRange(baseInterfaces); + InterfaceBase(out baseInterfaces); + newType.BaseTypes.AddRange(baseInterfaces); } - InterfaceBody( -#line 523 "VBNET.ATG" -newType); - -#line 525 "VBNET.ATG" + InterfaceBody(newType); compilationUnit.BlockEnd(); - + break; } case 90: { - lexer.NextToken(); - -#line 530 "VBNET.ATG" + Get(); m.Check(Modifiers.VBDelegates); DelegateDeclaration delegateDeclr = new DelegateDeclaration(m.Modifier, attributes); delegateDeclr.ReturnType = new TypeReference("System.Void", true); delegateDeclr.StartLocation = m.GetDeclarationLocation(t.Location); List p = new List(); - + if (la.kind == 195) { - lexer.NextToken(); + Get(); Identifier(); - -#line 537 "VBNET.ATG" - delegateDeclr.Name = t.val; - TypeParameterList( -#line 538 "VBNET.ATG" -delegateDeclr.Templates); + delegateDeclr.Name = t.val; + TypeParameterList(delegateDeclr.Templates); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 539 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); - -#line 539 "VBNET.ATG" - delegateDeclr.Parameters = p; + delegateDeclr.Parameters = p; } } else if (la.kind == 114) { - lexer.NextToken(); + Get(); Identifier(); - -#line 541 "VBNET.ATG" - delegateDeclr.Name = t.val; - TypeParameterList( -#line 542 "VBNET.ATG" -delegateDeclr.Templates); + delegateDeclr.Name = t.val; + TypeParameterList(delegateDeclr.Templates); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 543 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); - -#line 543 "VBNET.ATG" - delegateDeclr.Parameters = p; + delegateDeclr.Parameters = p; } if (la.kind == 50) { - lexer.NextToken(); - -#line 544 "VBNET.ATG" - TypeReference type; - TypeName( -#line 544 "VBNET.ATG" -out type); - -#line 544 "VBNET.ATG" - delegateDeclr.ReturnType = type; + Get(); + TypeReference type; + TypeName(out type); + delegateDeclr.ReturnType = type; } - } else SynErr(233); - -#line 546 "VBNET.ATG" - delegateDeclr.EndLocation = t.EndLocation; + } else SynErr(234); + delegateDeclr.EndLocation = t.EndLocation; EndOfStmt(); - -#line 549 "VBNET.ATG" compilationUnit.AddChild(delegateDeclr); - + break; } - default: SynErr(234); break; + default: SynErr(235); break; } } - void TypeParameterList( -#line 373 "VBNET.ATG" -List templates) { - -#line 375 "VBNET.ATG" + void TypeParameterList(List templates) { TemplateDefinition template; - - if ( -#line 378 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { - lexer.NextToken(); - Expect(155); - TypeParameter( -#line 379 "VBNET.ATG" -out template); -#line 381 "VBNET.ATG" + if (la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { + Expect(25); + Expect(155); + TypeParameter(out template); if (template != null) templates.Add(template); - - while (la.kind == 12) { - lexer.NextToken(); - TypeParameter( -#line 384 "VBNET.ATG" -out template); -#line 386 "VBNET.ATG" + while (la.kind == 12) { + Get(); + TypeParameter(out template); if (template != null) templates.Add(template); - + } Expect(26); } } - void TypeParameter( -#line 394 "VBNET.ATG" -out TemplateDefinition template) { + void TypeParameter(out TemplateDefinition template) { Identifier(); - -#line 396 "VBNET.ATG" - template = new TemplateDefinition(t.val, null); + template = new TemplateDefinition(t.val, null); if (la.kind == 50) { - TypeParameterConstraints( -#line 397 "VBNET.ATG" -template); + TypeParameterConstraints(template); } } - void TypeParameterConstraints( -#line 401 "VBNET.ATG" -TemplateDefinition template) { - -#line 403 "VBNET.ATG" + void TypeParameterConstraints(TemplateDefinition template) { TypeReference constraint; - + Expect(50); if (la.kind == 23) { - lexer.NextToken(); - TypeParameterConstraint( -#line 409 "VBNET.ATG" -out constraint); - -#line 409 "VBNET.ATG" - if (constraint != null) { template.Bases.Add(constraint); } + Get(); + TypeParameterConstraint(out constraint); + if (constraint != null) { template.Bases.Add(constraint); } while (la.kind == 12) { - lexer.NextToken(); - TypeParameterConstraint( -#line 412 "VBNET.ATG" -out constraint); - -#line 412 "VBNET.ATG" - if (constraint != null) { template.Bases.Add(constraint); } + Get(); + TypeParameterConstraint(out constraint); + if (constraint != null) { template.Bases.Add(constraint); } } Expect(24); } else if (StartOf(7)) { - TypeParameterConstraint( -#line 415 "VBNET.ATG" -out constraint); - -#line 415 "VBNET.ATG" - if (constraint != null) { template.Bases.Add(constraint); } - } else SynErr(235); + TypeParameterConstraint(out constraint); + if (constraint != null) { template.Bases.Add(constraint); } + } else SynErr(236); } - void TypeParameterConstraint( -#line 419 "VBNET.ATG" -out TypeReference constraint) { - -#line 420 "VBNET.ATG" - constraint = null; + void TypeParameterConstraint(out TypeReference constraint) { + constraint = null; if (la.kind == 71) { - lexer.NextToken(); - -#line 421 "VBNET.ATG" - constraint = TypeReference.ClassConstraint; + Get(); + constraint = TypeReference.ClassConstraint; } else if (la.kind == 194) { - lexer.NextToken(); - -#line 422 "VBNET.ATG" - constraint = TypeReference.StructConstraint; + Get(); + constraint = TypeReference.StructConstraint; } else if (la.kind == 148) { - lexer.NextToken(); - -#line 423 "VBNET.ATG" - constraint = TypeReference.NewConstraint; + Get(); + constraint = TypeReference.NewConstraint; } else if (StartOf(8)) { - TypeName( -#line 424 "VBNET.ATG" -out constraint); - } else SynErr(236); + TypeName(out constraint); + } else SynErr(237); } - void ClassBaseType( -#line 769 "VBNET.ATG" -out TypeReference typeRef) { - -#line 771 "VBNET.ATG" + void ClassBaseType(out TypeReference typeRef) { typeRef = null; - + Expect(127); - TypeName( -#line 774 "VBNET.ATG" -out typeRef); + TypeName(out typeRef); EndOfStmt(); } - void TypeImplementsClause( -#line 1586 "VBNET.ATG" -out List baseInterfaces) { - -#line 1588 "VBNET.ATG" + void TypeImplementsClause(out List baseInterfaces) { baseInterfaces = new List(); TypeReference type = null; - - Expect(123); - TypeName( -#line 1591 "VBNET.ATG" -out type); -#line 1593 "VBNET.ATG" + Expect(123); + TypeName(out type); if (type != null) baseInterfaces.Add(type); - - while (la.kind == 12) { - lexer.NextToken(); - TypeName( -#line 1596 "VBNET.ATG" -out type); -#line 1597 "VBNET.ATG" - if (type != null) baseInterfaces.Add(type); + while (la.kind == 12) { + Get(); + TypeName(out type); + if (type != null) baseInterfaces.Add(type); } EndOfStmt(); } - void ClassBody( -#line 563 "VBNET.ATG" -TypeDeclaration newType) { - -#line 564 "VBNET.ATG" - AttributeSection section; + void ClassBody(TypeDeclaration newType) { + AttributeSection section; while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } while (StartOf(9)) { - -#line 567 "VBNET.ATG" List attributes = new List(); ModifierList m = new ModifierList(); - - while (la.kind == 28) { - AttributeSection( -#line 570 "VBNET.ATG" -out section); -#line 570 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } while (StartOf(10)) { - MemberModifier( -#line 571 "VBNET.ATG" -m); + MemberModifier(m); } - ClassMemberDecl( -#line 572 "VBNET.ATG" -m, attributes); + ClassMemberDecl(m, attributes); while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } } } - void ModuleBody( -#line 594 "VBNET.ATG" -TypeDeclaration newType) { - -#line 595 "VBNET.ATG" - AttributeSection section; + void ModuleBody(TypeDeclaration newType) { + AttributeSection section; while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } while (StartOf(9)) { - -#line 598 "VBNET.ATG" List attributes = new List(); ModifierList m = new ModifierList(); - - while (la.kind == 28) { - AttributeSection( -#line 601 "VBNET.ATG" -out section); -#line 601 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } while (StartOf(10)) { - MemberModifier( -#line 602 "VBNET.ATG" -m); + MemberModifier(m); } - ClassMemberDecl( -#line 603 "VBNET.ATG" -m, attributes); + ClassMemberDecl(m, attributes); while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } } Expect(100); Expect(141); - -#line 606 "VBNET.ATG" - newType.EndLocation = t.EndLocation; + newType.EndLocation = t.EndLocation; EndOfStmt(); } - void StructureBody( -#line 577 "VBNET.ATG" -TypeDeclaration newType) { - -#line 578 "VBNET.ATG" - AttributeSection section; + void StructureBody(TypeDeclaration newType) { + AttributeSection section; while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } while (StartOf(9)) { - -#line 581 "VBNET.ATG" List attributes = new List(); ModifierList m = new ModifierList(); - - while (la.kind == 28) { - AttributeSection( -#line 584 "VBNET.ATG" -out section); -#line 584 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } while (StartOf(10)) { - MemberModifier( -#line 585 "VBNET.ATG" -m); + MemberModifier(m); } - StructureMemberDecl( -#line 586 "VBNET.ATG" -m, attributes); + StructureMemberDecl(m, attributes); while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } } Expect(100); Expect(194); - -#line 589 "VBNET.ATG" - newType.EndLocation = t.EndLocation; + newType.EndLocation = t.EndLocation; EndOfStmt(); } - void NonArrayTypeName( -#line 2472 "VBNET.ATG" -out TypeReference typeref, bool canBeUnbound) { - -#line 2474 "VBNET.ATG" + void NonArrayTypeName(out TypeReference typeref, bool canBeUnbound) { string name; typeref = null; bool isGlobal = false; - + if (StartOf(11)) { if (la.kind == 117) { - lexer.NextToken(); + Get(); Expect(16); - -#line 2479 "VBNET.ATG" - isGlobal = true; + isGlobal = true; } - QualIdentAndTypeArguments( -#line 2480 "VBNET.ATG" -out typeref, canBeUnbound); - -#line 2481 "VBNET.ATG" - typeref.IsGlobal = isGlobal; + QualIdentAndTypeArguments(out typeref, canBeUnbound); + typeref.IsGlobal = isGlobal; while (la.kind == 16) { - lexer.NextToken(); - -#line 2482 "VBNET.ATG" - TypeReference nestedTypeRef; - QualIdentAndTypeArguments( -#line 2483 "VBNET.ATG" -out nestedTypeRef, canBeUnbound); - -#line 2484 "VBNET.ATG" - typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes); + Get(); + TypeReference nestedTypeRef; + QualIdentAndTypeArguments(out nestedTypeRef, canBeUnbound); + typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes); } } else if (la.kind == 154) { - lexer.NextToken(); - -#line 2487 "VBNET.ATG" - typeref = new TypeReference("System.Object", true); + Get(); + typeref = new TypeReference("System.Object", true); if (la.kind == 21) { - lexer.NextToken(); - -#line 2491 "VBNET.ATG" + Get(); List typeArguments = new List(1); if (typeref != null) typeArguments.Add(typeref); typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; - + } } else if (StartOf(12)) { - PrimitiveTypeName( -#line 2497 "VBNET.ATG" -out name); - -#line 2497 "VBNET.ATG" - typeref = new TypeReference(name, true); + PrimitiveTypeName(out name); + typeref = new TypeReference(name, true); if (la.kind == 21) { - lexer.NextToken(); - -#line 2501 "VBNET.ATG" + Get(); List typeArguments = new List(1); if (typeref != null) typeArguments.Add(typeref); typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; - + } - } else SynErr(237); + } else SynErr(238); } - void EnumBody( -#line 610 "VBNET.ATG" -TypeDeclaration newType) { - -#line 611 "VBNET.ATG" - FieldDeclaration f; + void EnumBody(TypeDeclaration newType) { + FieldDeclaration f; while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } while (StartOf(13)) { - EnumMemberDecl( -#line 614 "VBNET.ATG" -out f); - -#line 616 "VBNET.ATG" + EnumMemberDecl(out f); compilationUnit.AddChild(f); - + while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } } Expect(100); Expect(102); - -#line 620 "VBNET.ATG" - newType.EndLocation = t.EndLocation; + newType.EndLocation = t.EndLocation; EndOfStmt(); } - void InterfaceBase( -#line 1571 "VBNET.ATG" -out List bases) { - -#line 1573 "VBNET.ATG" + void InterfaceBase(out List bases) { TypeReference type; bases = new List(); - - Expect(127); - TypeName( -#line 1577 "VBNET.ATG" -out type); -#line 1577 "VBNET.ATG" - if (type != null) bases.Add(type); + Expect(127); + TypeName(out type); + if (type != null) bases.Add(type); while (la.kind == 12) { - lexer.NextToken(); - TypeName( -#line 1580 "VBNET.ATG" -out type); - -#line 1580 "VBNET.ATG" - if (type != null) bases.Add(type); + Get(); + TypeName(out type); + if (type != null) bases.Add(type); } EndOfStmt(); } - void InterfaceBody( -#line 624 "VBNET.ATG" -TypeDeclaration newType) { + void InterfaceBody(TypeDeclaration newType) { while (la.kind == 1 || la.kind == 11) { EndOfStmt(); } @@ -1271,253 +832,169 @@ TypeDeclaration newType) { } Expect(100); Expect(129); - -#line 630 "VBNET.ATG" - newType.EndLocation = t.EndLocation; + newType.EndLocation = t.EndLocation; EndOfStmt(); } - void FormalParameterList( -#line 2685 "VBNET.ATG" -List parameter) { - -#line 2686 "VBNET.ATG" - ParameterDeclarationExpression p; - FormalParameter( -#line 2688 "VBNET.ATG" -out p); - -#line 2688 "VBNET.ATG" - if (p != null) parameter.Add(p); + void FormalParameterList(List parameter) { + ParameterDeclarationExpression p; + FormalParameter(out p); + if (p != null) parameter.Add(p); while (la.kind == 12) { - lexer.NextToken(); - FormalParameter( -#line 2690 "VBNET.ATG" -out p); - -#line 2690 "VBNET.ATG" - if (p != null) parameter.Add(p); + Get(); + FormalParameter(out p); + if (p != null) parameter.Add(p); } } - void MemberModifier( -#line 3426 "VBNET.ATG" -ModifierList m) { + void MemberModifier(ModifierList m) { switch (la.kind) { case 142: { - lexer.NextToken(); - -#line 3427 "VBNET.ATG" + Get(); m.Add(Modifiers.Abstract, t.Location); break; } case 89: { - lexer.NextToken(); - -#line 3428 "VBNET.ATG" + Get(); m.Add(Modifiers.Default, t.Location); break; } case 112: { - lexer.NextToken(); - -#line 3429 "VBNET.ATG" + Get(); m.Add(Modifiers.Internal, t.Location); break; } case 184: { - lexer.NextToken(); - -#line 3430 "VBNET.ATG" + Get(); m.Add(Modifiers.New, t.Location); break; } case 166: { - lexer.NextToken(); - -#line 3431 "VBNET.ATG" + Get(); m.Add(Modifiers.Override, t.Location); break; } case 143: { - lexer.NextToken(); - -#line 3432 "VBNET.ATG" + Get(); m.Add(Modifiers.Abstract, t.Location); break; } case 170: { - lexer.NextToken(); - -#line 3433 "VBNET.ATG" + Get(); m.Add(Modifiers.Private, t.Location); break; } case 172: { - lexer.NextToken(); - -#line 3434 "VBNET.ATG" + Get(); m.Add(Modifiers.Protected, t.Location); break; } case 173: { - lexer.NextToken(); - -#line 3435 "VBNET.ATG" + Get(); m.Add(Modifiers.Public, t.Location); break; } case 152: { - lexer.NextToken(); - -#line 3436 "VBNET.ATG" + Get(); m.Add(Modifiers.Sealed, t.Location); break; } case 153: { - lexer.NextToken(); - -#line 3437 "VBNET.ATG" + Get(); m.Add(Modifiers.Sealed, t.Location); break; } case 185: { - lexer.NextToken(); - -#line 3438 "VBNET.ATG" + Get(); m.Add(Modifiers.Static, t.Location); break; } case 165: { - lexer.NextToken(); - -#line 3439 "VBNET.ATG" + Get(); m.Add(Modifiers.Virtual, t.Location); break; } case 164: { - lexer.NextToken(); - -#line 3440 "VBNET.ATG" + Get(); m.Add(Modifiers.Overloads, t.Location); break; } case 175: { - lexer.NextToken(); - -#line 3441 "VBNET.ATG" + Get(); m.Add(Modifiers.ReadOnly, t.Location); break; } case 220: { - lexer.NextToken(); - -#line 3442 "VBNET.ATG" + Get(); m.Add(Modifiers.WriteOnly, t.Location); break; } case 219: { - lexer.NextToken(); - -#line 3443 "VBNET.ATG" + Get(); m.Add(Modifiers.WithEvents, t.Location); break; } case 92: { - lexer.NextToken(); - -#line 3444 "VBNET.ATG" + Get(); m.Add(Modifiers.Dim, t.Location); break; } case 168: { - lexer.NextToken(); - -#line 3445 "VBNET.ATG" + Get(); m.Add(Modifiers.Partial, t.Location); break; } - default: SynErr(238); break; + default: SynErr(239); break; } } - void ClassMemberDecl( -#line 765 "VBNET.ATG" -ModifierList m, List attributes) { - StructureMemberDecl( -#line 766 "VBNET.ATG" -m, attributes); + void ClassMemberDecl(ModifierList m, List attributes) { + StructureMemberDecl(m, attributes); } - void StructureMemberDecl( -#line 779 "VBNET.ATG" -ModifierList m, List attributes) { - -#line 781 "VBNET.ATG" + void StructureMemberDecl(ModifierList m, List attributes) { TypeReference type = null; List p = new List(); Statement stmt = null; List variableDeclarators = new List(); List templates = new List(); - + switch (la.kind) { case 71: case 90: case 102: case 129: case 141: case 194: { - NonModuleDeclaration( -#line 788 "VBNET.ATG" -m, attributes); + NonModuleDeclaration(m, attributes); break; } case 195: { - lexer.NextToken(); - -#line 792 "VBNET.ATG" + Get(); Location startPos = t.Location; - - if (StartOf(4)) { -#line 796 "VBNET.ATG" + if (StartOf(4)) { string name = String.Empty; MethodDeclaration methodDeclaration; List handlesClause = null; List implementsClause = null; - - Identifier(); -#line 802 "VBNET.ATG" + Identifier(); name = t.val; m.Check(Modifiers.VBMethods); - - TypeParameterList( -#line 805 "VBNET.ATG" -templates); + + TypeParameterList(templates); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 806 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 121 || la.kind == 123) { if (la.kind == 123) { - ImplementsClause( -#line 809 "VBNET.ATG" -out implementsClause); + ImplementsClause(out implementsClause); } else { - HandlesClause( -#line 811 "VBNET.ATG" -out handlesClause); + HandlesClause(out handlesClause); } } - -#line 814 "VBNET.ATG" - Location endLocation = t.EndLocation; - if ( -#line 817 "VBNET.ATG" -IsMustOverride(m)) { + Location endLocation = t.EndLocation; + if (IsMustOverride(m)) { EndOfStmt(); - -#line 820 "VBNET.ATG" methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes, StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation, @@ -1527,11 +1004,9 @@ IsMustOverride(m)) { InterfaceImplementations = implementsClause }; compilationUnit.AddChild(methodDeclaration); - - } else if (la.kind == 1) { - lexer.NextToken(); -#line 833 "VBNET.ATG" + } else if (la.kind == 1) { + Get(); methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes, StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation, @@ -1541,150 +1016,98 @@ IsMustOverride(m)) { InterfaceImplementations = implementsClause }; compilationUnit.AddChild(methodDeclaration); - -#line 844 "VBNET.ATG" - if (ParseMethodBodies) { - Block( -#line 845 "VBNET.ATG" -out stmt); + if (ParseMethodBodies) { + Block(out stmt); Expect(100); Expect(195); - -#line 847 "VBNET.ATG" } else { // don't parse method body lexer.SkipCurrentBlock(Tokens.Sub); stmt = new BlockStatement(); } - - -#line 853 "VBNET.ATG" - methodDeclaration.Body = (BlockStatement)stmt; -#line 854 "VBNET.ATG" - methodDeclaration.Body.EndLocation = t.EndLocation; + methodDeclaration.Body = (BlockStatement)stmt; + methodDeclaration.Body.EndLocation = t.EndLocation; EndOfStmt(); - } else SynErr(239); + } else SynErr(240); } else if (la.kind == 148) { - lexer.NextToken(); + Get(); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 858 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } - -#line 859 "VBNET.ATG" - m.Check(Modifiers.Constructors); - -#line 860 "VBNET.ATG" - Location constructorEndLocation = t.EndLocation; + m.Check(Modifiers.Constructors); + Location constructorEndLocation = t.EndLocation; Expect(1); - -#line 863 "VBNET.ATG" - if (ParseMethodBodies) { - Block( -#line 864 "VBNET.ATG" -out stmt); + if (ParseMethodBodies) { + Block(out stmt); Expect(100); Expect(195); - -#line 866 "VBNET.ATG" } else { // don't parse method body lexer.SkipCurrentBlock(Tokens.Sub); stmt = new BlockStatement(); } - -#line 872 "VBNET.ATG" - Location endLocation = t.EndLocation; + Location endLocation = t.EndLocation; EndOfStmt(); - -#line 875 "VBNET.ATG" ConstructorDeclaration cd = new ConstructorDeclaration("New", m.Modifier, p, attributes); cd.StartLocation = m.GetDeclarationLocation(startPos); cd.EndLocation = constructorEndLocation; cd.Body = (BlockStatement)stmt; cd.Body.EndLocation = endLocation; compilationUnit.AddChild(cd); - - } else SynErr(240); + + } else SynErr(241); break; } case 114: { - lexer.NextToken(); - -#line 887 "VBNET.ATG" + Get(); m.Check(Modifiers.VBMethods); string name = String.Empty; Location startPos = t.Location; MethodDeclaration methodDeclaration;List handlesClause = null; List implementsClause = null; AttributeSection returnTypeAttributeSection = null; - - Identifier(); -#line 894 "VBNET.ATG" - name = t.val; - TypeParameterList( -#line 895 "VBNET.ATG" -templates); + Identifier(); + name = t.val; + TypeParameterList(templates); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 896 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 50) { - lexer.NextToken(); + Get(); while (la.kind == 28) { - AttributeSection( -#line 898 "VBNET.ATG" -out returnTypeAttributeSection); - -#line 900 "VBNET.ATG" + AttributeSection(out returnTypeAttributeSection); if (returnTypeAttributeSection != null) { returnTypeAttributeSection.AttributeTarget = "return"; attributes.Add(returnTypeAttributeSection); } - + } - TypeName( -#line 906 "VBNET.ATG" -out type); + TypeName(out type); } - -#line 908 "VBNET.ATG" if(type == null) { type = new TypeReference("System.Object", true); } - + if (la.kind == 121 || la.kind == 123) { if (la.kind == 123) { - ImplementsClause( -#line 914 "VBNET.ATG" -out implementsClause); + ImplementsClause(out implementsClause); } else { - HandlesClause( -#line 916 "VBNET.ATG" -out handlesClause); + HandlesClause(out handlesClause); } } - -#line 919 "VBNET.ATG" - Location endLocation = t.EndLocation; - if ( -#line 922 "VBNET.ATG" -IsMustOverride(m)) { + Location endLocation = t.EndLocation; + if (IsMustOverride(m)) { EndOfStmt(); - -#line 925 "VBNET.ATG" methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, TypeReference = type, Parameters = p, Attributes = attributes, @@ -1694,13 +1117,11 @@ IsMustOverride(m)) { Templates = templates, InterfaceImplementations = implementsClause }; - + compilationUnit.AddChild(methodDeclaration); - - } else if (la.kind == 1) { - lexer.NextToken(); -#line 940 "VBNET.ATG" + } else if (la.kind == 1) { + Get(); methodDeclaration = new MethodDeclaration { Name = name, Modifier = m.Modifier, TypeReference = type, Parameters = p, Attributes = attributes, @@ -1710,17 +1131,13 @@ IsMustOverride(m)) { HandlesClause = handlesClause, InterfaceImplementations = implementsClause }; - + compilationUnit.AddChild(methodDeclaration); - - if (ParseMethodBodies) { - Block( -#line 953 "VBNET.ATG" -out stmt); + + if (ParseMethodBodies) { + Block(out stmt); Expect(100); Expect(114); - -#line 955 "VBNET.ATG" } else { // don't parse method body lexer.SkipCurrentBlock(Tokens.Function); stmt = new BlockStatement(); @@ -1728,143 +1145,105 @@ out stmt); methodDeclaration.Body = (BlockStatement)stmt; methodDeclaration.Body.StartLocation = methodDeclaration.EndLocation; methodDeclaration.Body.EndLocation = t.EndLocation; - + EndOfStmt(); - } else SynErr(241); + } else SynErr(242); break; } case 88: { - lexer.NextToken(); - -#line 969 "VBNET.ATG" + Get(); m.Check(Modifiers.VBExternalMethods); Location startPos = t.Location; CharsetModifier charsetModifer = CharsetModifier.None; string library = String.Empty; string alias = null; string name = String.Empty; - + if (StartOf(15)) { - Charset( -#line 976 "VBNET.ATG" -out charsetModifer); + Charset(out charsetModifer); } if (la.kind == 195) { - lexer.NextToken(); + Get(); Identifier(); - -#line 979 "VBNET.ATG" - name = t.val; + name = t.val; Expect(135); Expect(3); - -#line 980 "VBNET.ATG" - library = t.literalValue as string; + library = t.literalValue as string; if (la.kind == 46) { - lexer.NextToken(); + Get(); Expect(3); - -#line 981 "VBNET.ATG" - alias = t.literalValue as string; + alias = t.literalValue as string; } if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 982 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } EndOfStmt(); - -#line 985 "VBNET.ATG" DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, null, p, attributes, library, alias, charsetModifer); declareDeclaration.StartLocation = m.GetDeclarationLocation(startPos); declareDeclaration.EndLocation = t.EndLocation; compilationUnit.AddChild(declareDeclaration); - + } else if (la.kind == 114) { - lexer.NextToken(); + Get(); Identifier(); - -#line 992 "VBNET.ATG" - name = t.val; + name = t.val; Expect(135); Expect(3); - -#line 993 "VBNET.ATG" - library = t.literalValue as string; + library = t.literalValue as string; if (la.kind == 46) { - lexer.NextToken(); + Get(); Expect(3); - -#line 994 "VBNET.ATG" - alias = t.literalValue as string; + alias = t.literalValue as string; } if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 995 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 996 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } EndOfStmt(); - -#line 999 "VBNET.ATG" DeclareDeclaration declareDeclaration = new DeclareDeclaration(name, m.Modifier, type, p, attributes, library, alias, charsetModifer); declareDeclaration.StartLocation = m.GetDeclarationLocation(startPos); declareDeclaration.EndLocation = t.EndLocation; compilationUnit.AddChild(declareDeclaration); - - } else SynErr(242); + + } else SynErr(243); break; } case 106: { - lexer.NextToken(); - -#line 1009 "VBNET.ATG" + Get(); m.Check(Modifiers.VBEvents); Location startPos = t.Location; EventDeclaration eventDeclaration; string name = String.Empty; List implementsClause = null; - - Identifier(); -#line 1015 "VBNET.ATG" - name= t.val; + Identifier(); + name= t.val; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 1017 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } else if (StartOf(16)) { if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 1019 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } - } else SynErr(243); + } else SynErr(244); if (la.kind == 123) { - ImplementsClause( -#line 1021 "VBNET.ATG" -out implementsClause); + ImplementsClause(out implementsClause); } - -#line 1023 "VBNET.ATG" eventDeclaration = new EventDeclaration { Name = name, TypeReference = type, Modifier = m.Modifier, Parameters = p, Attributes = attributes, InterfaceImplementations = implementsClause, @@ -1872,151 +1251,99 @@ out implementsClause); EndLocation = t.EndLocation }; compilationUnit.AddChild(eventDeclaration); - + EndOfStmt(); break; } case 2: case 45: case 49: case 51: case 52: case 53: case 54: case 57: case 74: case 91: case 94: case 103: case 108: case 113: case 120: case 126: case 130: case 133: case 156: case 162: case 169: case 188: case 197: case 198: case 208: case 209: case 215: { - -#line 1034 "VBNET.ATG" m.Check(Modifiers.Fields); FieldDeclaration fd = new FieldDeclaration(attributes, null, m.Modifier); - - IdentifierForFieldDeclaration(); -#line 1037 "VBNET.ATG" - string name = t.val; - -#line 1038 "VBNET.ATG" - fd.StartLocation = m.GetDeclarationLocation(t.Location); - VariableDeclaratorPartAfterIdentifier( -#line 1040 "VBNET.ATG" -variableDeclarators, name); + IdentifierForFieldDeclaration(); + string name = t.val; + fd.StartLocation = m.GetDeclarationLocation(t.Location); + VariableDeclaratorPartAfterIdentifier(variableDeclarators, name); while (la.kind == 12) { - lexer.NextToken(); - VariableDeclarator( -#line 1041 "VBNET.ATG" -variableDeclarators); + Get(); + VariableDeclarator(variableDeclarators); } EndOfStmt(); - -#line 1044 "VBNET.ATG" fd.EndLocation = t.EndLocation; fd.Fields = variableDeclarators; compilationUnit.AddChild(fd); - + break; } case 75: { - -#line 1049 "VBNET.ATG" - m.Check(Modifiers.Fields); - lexer.NextToken(); - -#line 1050 "VBNET.ATG" - m.Add(Modifiers.Const, t.Location); - -#line 1052 "VBNET.ATG" + m.Check(Modifiers.Fields); + Get(); + m.Add(Modifiers.Const, t.Location); FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier); fd.StartLocation = m.GetDeclarationLocation(t.Location); List constantDeclarators = new List(); - - ConstantDeclarator( -#line 1056 "VBNET.ATG" -constantDeclarators); + + ConstantDeclarator(constantDeclarators); while (la.kind == 12) { - lexer.NextToken(); - ConstantDeclarator( -#line 1057 "VBNET.ATG" -constantDeclarators); + Get(); + ConstantDeclarator(constantDeclarators); } - -#line 1059 "VBNET.ATG" fd.Fields = constantDeclarators; fd.EndLocation = t.Location; - - EndOfStmt(); -#line 1064 "VBNET.ATG" + EndOfStmt(); fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd); - + break; } case 171: { - lexer.NextToken(); - -#line 1070 "VBNET.ATG" + Get(); m.Check(Modifiers.VBProperties); Location startPos = t.Location; List implementsClause = null; AttributeSection returnTypeAttributeSection = null; Expression initializer = null; - - Identifier(); -#line 1076 "VBNET.ATG" - string propertyName = t.val; + Identifier(); + string propertyName = t.val; if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 1077 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 50) { - lexer.NextToken(); + Get(); while (la.kind == 28) { - AttributeSection( -#line 1080 "VBNET.ATG" -out returnTypeAttributeSection); - -#line 1082 "VBNET.ATG" + AttributeSection(out returnTypeAttributeSection); if (returnTypeAttributeSection != null) { returnTypeAttributeSection.AttributeTarget = "return"; attributes.Add(returnTypeAttributeSection); } - + } - if ( -#line 1089 "VBNET.ATG" -IsNewExpression()) { - ObjectCreateExpression( -#line 1089 "VBNET.ATG" -out initializer); - -#line 1091 "VBNET.ATG" + if (IsNewExpression()) { + ObjectCreateExpression(out initializer); if (initializer is ObjectCreateExpression) { type = ((ObjectCreateExpression)initializer).CreateType.Clone(); } else { type = ((ArrayCreateExpression)initializer).CreateType.Clone(); } - + } else if (StartOf(8)) { - TypeName( -#line 1098 "VBNET.ATG" -out type); - } else SynErr(244); + TypeName(out type); + } else SynErr(245); } if (la.kind == 10) { - lexer.NextToken(); - Expr( -#line 1101 "VBNET.ATG" -out initializer); + Get(); + Expr(out initializer); } if (la.kind == 123) { - ImplementsClause( -#line 1102 "VBNET.ATG" -out implementsClause); + ImplementsClause(out implementsClause); } EndOfStmt(); - if ( -#line 1106 "VBNET.ATG" -IsMustOverride(m) || IsAutomaticProperty()) { - -#line 1108 "VBNET.ATG" + if (IsMustOverride(m) || IsAutomaticProperty()) { PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes); pDecl.StartLocation = m.GetDeclarationLocation(startPos); pDecl.EndLocation = t.Location; @@ -2026,10 +1353,8 @@ IsMustOverride(m) || IsAutomaticProperty()) { if (initializer != null) pDecl.Initializer = initializer; compilationUnit.AddChild(pDecl); - - } else if (StartOf(17)) { -#line 1120 "VBNET.ATG" + } else if (StartOf(17)) { PropertyDeclaration pDecl = new PropertyDeclaration(propertyName, type, m.Modifier, attributes); pDecl.StartLocation = m.GetDeclarationLocation(startPos); pDecl.EndLocation = t.Location; @@ -2039,58 +1364,40 @@ IsMustOverride(m) || IsAutomaticProperty()) { pDecl.Parameters = p; PropertyGetRegion getRegion; PropertySetRegion setRegion; - - AccessorDecls( -#line 1130 "VBNET.ATG" -out getRegion, out setRegion); + + AccessorDecls(out getRegion, out setRegion); Expect(100); Expect(171); EndOfStmt(); - -#line 1134 "VBNET.ATG" pDecl.GetRegion = getRegion; pDecl.SetRegion = setRegion; pDecl.BodyEnd = t.Location; // t = EndOfStmt; not "Property" compilationUnit.AddChild(pDecl); - - } else SynErr(245); + + } else SynErr(246); break; } case 85: { - lexer.NextToken(); - -#line 1141 "VBNET.ATG" - Location startPos = t.Location; + Get(); + Location startPos = t.Location; Expect(106); - -#line 1143 "VBNET.ATG" m.Check(Modifiers.VBCustomEvents); EventAddRemoveRegion eventAccessorDeclaration; EventAddRegion addHandlerAccessorDeclaration = null; EventRemoveRegion removeHandlerAccessorDeclaration = null; EventRaiseRegion raiseEventAccessorDeclaration = null; List implementsClause = null; - - Identifier(); -#line 1150 "VBNET.ATG" - string customEventName = t.val; + Identifier(); + string customEventName = t.val; Expect(50); - TypeName( -#line 1151 "VBNET.ATG" -out type); + TypeName(out type); if (la.kind == 123) { - ImplementsClause( -#line 1152 "VBNET.ATG" -out implementsClause); + ImplementsClause(out implementsClause); } EndOfStmt(); while (StartOf(18)) { - EventAccessorDeclaration( -#line 1155 "VBNET.ATG" -out eventAccessorDeclaration); - -#line 1157 "VBNET.ATG" + EventAccessorDeclaration(out eventAccessorDeclaration); if(eventAccessorDeclaration is EventAddRegion) { addHandlerAccessorDeclaration = (EventAddRegion)eventAccessorDeclaration; @@ -2103,61 +1410,51 @@ out eventAccessorDeclaration); { raiseEventAccessorDeclaration = (EventRaiseRegion)eventAccessorDeclaration; } - + } Expect(100); Expect(106); EndOfStmt(); - -#line 1173 "VBNET.ATG" if(addHandlerAccessorDeclaration == null) { Error("Need to provide AddHandler accessor."); } - + if(removeHandlerAccessorDeclaration == null) { Error("Need to provide RemoveHandler accessor."); } - + if(raiseEventAccessorDeclaration == null) { Error("Need to provide RaiseEvent accessor."); } - - EventDeclaration decl = new EventDeclaration { - TypeReference = type, Name = customEventName, Modifier = m.Modifier, - Attributes = attributes, - StartLocation = m.GetDeclarationLocation(startPos), - EndLocation = t.EndLocation, - AddRegion = addHandlerAccessorDeclaration, - RemoveRegion = removeHandlerAccessorDeclaration, - RaiseRegion = raiseEventAccessorDeclaration - }; - compilationUnit.AddChild(decl); - + + EventDeclaration decl = new EventDeclaration { + TypeReference = type, Name = customEventName, Modifier = m.Modifier, + Attributes = attributes, + StartLocation = m.GetDeclarationLocation(startPos), + EndLocation = t.EndLocation, + AddRegion = addHandlerAccessorDeclaration, + RemoveRegion = removeHandlerAccessorDeclaration, + RaiseRegion = raiseEventAccessorDeclaration + }; + compilationUnit.AddChild(decl); + break; } case 147: case 158: case 217: { - -#line 1199 "VBNET.ATG" - ConversionType opConversionType = ConversionType.None; + ConversionType opConversionType = ConversionType.None; if (la.kind == 147 || la.kind == 217) { if (la.kind == 217) { - lexer.NextToken(); - -#line 1200 "VBNET.ATG" - opConversionType = ConversionType.Implicit; + Get(); + opConversionType = ConversionType.Implicit; } else { - lexer.NextToken(); - -#line 1201 "VBNET.ATG" + Get(); opConversionType = ConversionType.Explicit; } } Expect(158); - -#line 1204 "VBNET.ATG" m.Check(Modifiers.VBOperators); Location startPos = t.Location; TypeReference returnType = NullTypeReference.Instance; @@ -2166,79 +1463,51 @@ out eventAccessorDeclaration); OverloadableOperatorType operatorType; AttributeSection section; List parameters = new List(); - - OverloadableOperator( -#line 1213 "VBNET.ATG" -out operatorType); + + OverloadableOperator(out operatorType); Expect(25); if (la.kind == 59) { - lexer.NextToken(); + Get(); } Identifier(); - -#line 1214 "VBNET.ATG" - operandName = t.val; + operandName = t.val; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 1215 "VBNET.ATG" -out operandType); + Get(); + TypeName(out operandType); } - -#line 1216 "VBNET.ATG" - parameters.Add(new ParameterDeclarationExpression(operandType, operandName, ParameterModifiers.In)); + parameters.Add(new ParameterDeclarationExpression(operandType, operandName, ParameterModifiers.In)); while (la.kind == 12) { - lexer.NextToken(); + Get(); if (la.kind == 59) { - lexer.NextToken(); + Get(); } Identifier(); - -#line 1220 "VBNET.ATG" - operandName = t.val; + operandName = t.val; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 1221 "VBNET.ATG" -out operandType); + Get(); + TypeName(out operandType); } - -#line 1222 "VBNET.ATG" - parameters.Add(new ParameterDeclarationExpression(operandType, operandName, ParameterModifiers.In)); + parameters.Add(new ParameterDeclarationExpression(operandType, operandName, ParameterModifiers.In)); } Expect(26); - -#line 1225 "VBNET.ATG" - Location endPos = t.EndLocation; + Location endPos = t.EndLocation; if (la.kind == 50) { - lexer.NextToken(); + Get(); while (la.kind == 28) { - AttributeSection( -#line 1226 "VBNET.ATG" -out section); - -#line 1227 "VBNET.ATG" + AttributeSection(out section); if (section != null) { section.AttributeTarget = "return"; attributes.Add(section); - } + } } - TypeName( -#line 1231 "VBNET.ATG" -out returnType); - -#line 1231 "VBNET.ATG" - endPos = t.EndLocation; + TypeName(out returnType); + endPos = t.EndLocation; } Expect(1); - Block( -#line 1233 "VBNET.ATG" -out stmt); + Block(out stmt); Expect(100); Expect(158); EndOfStmt(); - -#line 1235 "VBNET.ATG" OperatorDeclaration operatorDeclaration = new OperatorDeclaration { Modifier = m.Modifier, Attributes = attributes, @@ -2253,53 +1522,37 @@ out stmt); operatorDeclaration.Body.StartLocation = startPos; operatorDeclaration.Body.EndLocation = t.Location; compilationUnit.AddChild(operatorDeclaration); - + break; } - default: SynErr(246); break; + default: SynErr(247); break; } } - void EnumMemberDecl( -#line 747 "VBNET.ATG" -out FieldDeclaration f) { - -#line 749 "VBNET.ATG" + void EnumMemberDecl(out FieldDeclaration f) { Expression expr = null;List attributes = new List(); AttributeSection section = null; VariableDeclaration varDecl = null; - - while (la.kind == 28) { - AttributeSection( -#line 753 "VBNET.ATG" -out section); -#line 753 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } Identifier(); - -#line 756 "VBNET.ATG" f = new FieldDeclaration(attributes); varDecl = new VariableDeclaration(t.val); f.Fields.Add(varDecl); f.StartLocation = varDecl.StartLocation = t.Location; - - if (la.kind == 10) { - lexer.NextToken(); - Expr( -#line 761 "VBNET.ATG" -out expr); -#line 761 "VBNET.ATG" - varDecl.Initializer = expr; + if (la.kind == 10) { + Get(); + Expr(out expr); + varDecl.Initializer = expr; } EndOfStmt(); } void InterfaceMemberDecl() { - -#line 638 "VBNET.ATG" TypeReference type =null; List p = new List(); List templates = new List(); @@ -2307,83 +1560,57 @@ out expr); ModifierList mod = new ModifierList(); List attributes = new List(); string name; - + if (StartOf(19)) { while (la.kind == 28) { - AttributeSection( -#line 646 "VBNET.ATG" -out section); - -#line 646 "VBNET.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } while (StartOf(10)) { - MemberModifier( -#line 649 "VBNET.ATG" -mod); + MemberModifier(mod); } if (la.kind == 106) { - lexer.NextToken(); - -#line 653 "VBNET.ATG" + Get(); mod.Check(Modifiers.VBInterfaceEvents); Location startLocation = t.Location; - - Identifier(); -#line 656 "VBNET.ATG" - name = t.val; + Identifier(); + name = t.val; if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 657 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 658 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } EndOfStmt(); - -#line 661 "VBNET.ATG" EventDeclaration ed = new EventDeclaration { Name = name, TypeReference = type, Modifier = mod.Modifier, Parameters = p, Attributes = attributes, StartLocation = startLocation, EndLocation = t.EndLocation }; compilationUnit.AddChild(ed); - - } else if (la.kind == 195) { - lexer.NextToken(); -#line 671 "VBNET.ATG" + } else if (la.kind == 195) { + Get(); Location startLocation = t.Location; mod.Check(Modifiers.VBInterfaceMethods); - - Identifier(); -#line 674 "VBNET.ATG" - name = t.val; - TypeParameterList( -#line 675 "VBNET.ATG" -templates); + Identifier(); + name = t.val; + TypeParameterList(templates); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 676 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } EndOfStmt(); - -#line 679 "VBNET.ATG" MethodDeclaration md = new MethodDeclaration { Name = name, Modifier = mod.Modifier, @@ -2395,43 +1622,29 @@ p); Templates = templates }; compilationUnit.AddChild(md); - - } else if (la.kind == 114) { - lexer.NextToken(); -#line 694 "VBNET.ATG" + } else if (la.kind == 114) { + Get(); mod.Check(Modifiers.VBInterfaceMethods); Location startLocation = t.Location; - - Identifier(); -#line 697 "VBNET.ATG" - name = t.val; - TypeParameterList( -#line 698 "VBNET.ATG" -templates); + Identifier(); + name = t.val; + TypeParameterList(templates); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 699 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 50) { - lexer.NextToken(); + Get(); while (la.kind == 28) { - AttributeSection( -#line 700 "VBNET.ATG" -out returnTypeAttributeSection); + AttributeSection(out returnTypeAttributeSection); } - TypeName( -#line 700 "VBNET.ATG" -out type); + TypeName(out type); } - -#line 702 "VBNET.ATG" if(type == null) { type = new TypeReference("System.Object", true); } @@ -2447,360 +1660,262 @@ out type); md.EndLocation = t.EndLocation; md.Templates = templates; compilationUnit.AddChild(md); - + EndOfStmt(); } else if (la.kind == 171) { - lexer.NextToken(); - -#line 722 "VBNET.ATG" + Get(); Location startLocation = t.Location; mod.Check(Modifiers.VBInterfaceProperties); - - Identifier(); -#line 725 "VBNET.ATG" - name = t.val; + Identifier(); + name = t.val; if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 726 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 727 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } - -#line 729 "VBNET.ATG" if(type == null) { type = new TypeReference("System.Object", true); } - - EndOfStmt(); -#line 735 "VBNET.ATG" + EndOfStmt(); PropertyDeclaration pd = new PropertyDeclaration(name, type, mod.Modifier, attributes); pd.Parameters = p; pd.EndLocation = t.EndLocation; pd.StartLocation = startLocation; compilationUnit.AddChild(pd); - - } else SynErr(247); + + } else SynErr(248); } else if (StartOf(20)) { - NonModuleDeclaration( -#line 743 "VBNET.ATG" -mod, attributes); - } else SynErr(248); - } - - void Expr( -#line 1630 "VBNET.ATG" -out Expression expr) { - -#line 1631 "VBNET.ATG" - expr = null; - if ( -#line 1632 "VBNET.ATG" -IsQueryExpression() ) { - QueryExpr( -#line 1633 "VBNET.ATG" -out expr); - } else if (la.kind == 114) { - LambdaExpr( -#line 1634 "VBNET.ATG" -out expr); - } else if (StartOf(21)) { - DisjunctionExpr( -#line 1635 "VBNET.ATG" -out expr); + NonModuleDeclaration(mod, attributes); } else SynErr(249); } - void ImplementsClause( -#line 1603 "VBNET.ATG" -out List baseInterfaces) { + void Expr(out Expression expr) { + expr = null; + if (IsQueryExpression()) { + QueryExpr(out expr); + } else if (la.kind == 114) { + LambdaExpr(out expr); + } else if (StartOf(21)) { + DisjunctionExpr(out expr); + } else SynErr(250); + } -#line 1605 "VBNET.ATG" + void ImplementsClause(out List baseInterfaces) { baseInterfaces = new List(); TypeReference type = null; string memberName = null; - - Expect(123); - NonArrayTypeName( -#line 1610 "VBNET.ATG" -out type, false); - -#line 1611 "VBNET.ATG" - if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type); -#line 1612 "VBNET.ATG" - baseInterfaces.Add(new InterfaceImplementation(type, memberName)); + Expect(123); + NonArrayTypeName(out type, false); + if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type); + baseInterfaces.Add(new InterfaceImplementation(type, memberName)); while (la.kind == 12) { - lexer.NextToken(); - NonArrayTypeName( -#line 1614 "VBNET.ATG" -out type, false); - -#line 1615 "VBNET.ATG" - if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type); - -#line 1616 "VBNET.ATG" - baseInterfaces.Add(new InterfaceImplementation(type, memberName)); + Get(); + NonArrayTypeName(out type, false); + if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type); + baseInterfaces.Add(new InterfaceImplementation(type, memberName)); } } - void HandlesClause( -#line 1561 "VBNET.ATG" -out List handlesClause) { - -#line 1563 "VBNET.ATG" + void HandlesClause(out List handlesClause) { handlesClause = new List(); string name; - - Expect(121); - EventMemberSpecifier( -#line 1566 "VBNET.ATG" -out name); -#line 1566 "VBNET.ATG" - if (name != null) handlesClause.Add(name); + Expect(121); + EventMemberSpecifier(out name); + if (name != null) handlesClause.Add(name); while (la.kind == 12) { - lexer.NextToken(); - EventMemberSpecifier( -#line 1567 "VBNET.ATG" -out name); - -#line 1567 "VBNET.ATG" - if (name != null) handlesClause.Add(name); + Get(); + EventMemberSpecifier(out name); + if (name != null) handlesClause.Add(name); } } - void Block( -#line 2732 "VBNET.ATG" -out Statement stmt) { - -#line 2735 "VBNET.ATG" + void Block(out Statement stmt) { BlockStatement blockStmt = new BlockStatement(); /* in snippet parsing mode, t might be null */ if (t != null) blockStmt.StartLocation = t.EndLocation; compilationUnit.BlockStart(blockStmt); - - while (StartOf(22) || -#line 2741 "VBNET.ATG" -IsEndStmtAhead()) { - if ( -#line 2741 "VBNET.ATG" -IsEndStmtAhead()) { + + while (StartOf(22)) { + if (IsEndStmtAhead()) { Expect(100); EndOfStmt(); - -#line 2741 "VBNET.ATG" - compilationUnit.AddChild(new EndStatement()); + compilationUnit.AddChild(new EndStatement()); } else { Statement(); EndOfStmt(); } } - -#line 2746 "VBNET.ATG" stmt = blockStmt; if (t != null) blockStmt.EndLocation = t.EndLocation; compilationUnit.BlockEnd(); - - } - void Charset( -#line 1553 "VBNET.ATG" -out CharsetModifier charsetModifier) { + } -#line 1554 "VBNET.ATG" - charsetModifier = CharsetModifier.None; + void Charset(out CharsetModifier charsetModifier) { + charsetModifier = CharsetModifier.None; if (la.kind == 114 || la.kind == 195) { } else if (la.kind == 49) { - lexer.NextToken(); - -#line 1555 "VBNET.ATG" - charsetModifier = CharsetModifier.Ansi; + Get(); + charsetModifier = CharsetModifier.Ansi; } else if (la.kind == 53) { - lexer.NextToken(); - -#line 1556 "VBNET.ATG" - charsetModifier = CharsetModifier.Auto; + Get(); + charsetModifier = CharsetModifier.Auto; } else if (la.kind == 208) { - lexer.NextToken(); - -#line 1557 "VBNET.ATG" - charsetModifier = CharsetModifier.Unicode; - } else SynErr(250); + Get(); + charsetModifier = CharsetModifier.Unicode; + } else SynErr(251); } void IdentifierForFieldDeclaration() { switch (la.kind) { case 2: { - lexer.NextToken(); + Get(); break; } case 45: { - lexer.NextToken(); + Get(); break; } case 49: { - lexer.NextToken(); + Get(); break; } case 51: { - lexer.NextToken(); + Get(); break; } case 52: { - lexer.NextToken(); + Get(); break; } case 53: { - lexer.NextToken(); + Get(); break; } case 54: { - lexer.NextToken(); + Get(); break; } case 57: { - lexer.NextToken(); + Get(); break; } case 74: { - lexer.NextToken(); + Get(); break; } case 91: { - lexer.NextToken(); + Get(); break; } case 94: { - lexer.NextToken(); + Get(); break; } case 103: { - lexer.NextToken(); + Get(); break; } case 108: { - lexer.NextToken(); + Get(); break; } case 113: { - lexer.NextToken(); + Get(); break; } case 120: { - lexer.NextToken(); + Get(); break; } case 126: { - lexer.NextToken(); + Get(); break; } case 130: { - lexer.NextToken(); + Get(); break; } case 133: { - lexer.NextToken(); + Get(); break; } case 156: { - lexer.NextToken(); + Get(); break; } case 162: { - lexer.NextToken(); + Get(); break; } case 169: { - lexer.NextToken(); + Get(); break; } case 188: { - lexer.NextToken(); + Get(); break; } case 197: { - lexer.NextToken(); + Get(); break; } case 198: { - lexer.NextToken(); + Get(); break; } case 208: { - lexer.NextToken(); + Get(); break; } case 209: { - lexer.NextToken(); + Get(); break; } case 215: { - lexer.NextToken(); + Get(); break; } - default: SynErr(251); break; + default: SynErr(252); break; } } - void VariableDeclaratorPartAfterIdentifier( -#line 1438 "VBNET.ATG" -List fieldDeclaration, string name) { - -#line 1440 "VBNET.ATG" + void VariableDeclaratorPartAfterIdentifier(List fieldDeclaration, string name) { Expression expr = null; TypeReference type = null; ArrayList rank = null; List dimension = null; Location startLocation = t.Location; - - if ( -#line 1446 "VBNET.ATG" -IsSize() && !IsDims()) { - ArrayInitializationModifier( -#line 1446 "VBNET.ATG" -out dimension); - } - if ( -#line 1447 "VBNET.ATG" -IsDims()) { - ArrayNameModifier( -#line 1447 "VBNET.ATG" -out rank); - } - if ( -#line 1449 "VBNET.ATG" -IsObjectCreation()) { - Expect(50); - ObjectCreateExpression( -#line 1449 "VBNET.ATG" -out expr); -#line 1451 "VBNET.ATG" + if (IsSize() && !IsDims()) { + ArrayInitializationModifier(out dimension); + } + if (IsDims()) { + ArrayNameModifier(out rank); + } + if (IsObjectCreation()) { + Expect(50); + ObjectCreateExpression(out expr); if (expr is ObjectCreateExpression) { type = ((ObjectCreateExpression)expr).CreateType.Clone(); } else { type = ((ArrayCreateExpression)expr).CreateType.Clone(); } - + } else if (StartOf(23)) { if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 1458 "VBNET.ATG" -out type); - -#line 1460 "VBNET.ATG" + Get(); + TypeName(out type); if (type != null) { for (int i = fieldDeclaration.Count - 1; i >= 0; i--) { VariableDeclaration vd = fieldDeclaration[i]; @@ -2810,10 +1925,8 @@ out type); vd.TypeReference = newType; } } - - } -#line 1472 "VBNET.ATG" + } if (type == null && (dimension != null || rank != null)) { type = new TypeReference(""); } @@ -2836,116 +1949,72 @@ out type); type.RankSpecifier = (int[])rank.ToArray(typeof(int)); } } - + if (la.kind == 10) { - lexer.NextToken(); - Expr( -#line 1495 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); } - } else SynErr(252); - -#line 1498 "VBNET.ATG" + } else SynErr(253); VariableDeclaration varDecl = new VariableDeclaration(name, expr, type); varDecl.StartLocation = startLocation; varDecl.EndLocation = t.Location; fieldDeclaration.Add(varDecl); - + } - void VariableDeclarator( -#line 1432 "VBNET.ATG" -List fieldDeclaration) { + void VariableDeclarator(List fieldDeclaration) { Identifier(); - -#line 1434 "VBNET.ATG" - string name = t.val; - VariableDeclaratorPartAfterIdentifier( -#line 1435 "VBNET.ATG" -fieldDeclaration, name); + string name = t.val; + VariableDeclaratorPartAfterIdentifier(fieldDeclaration, name); } - void ConstantDeclarator( -#line 1413 "VBNET.ATG" -List constantDeclaration) { - -#line 1415 "VBNET.ATG" + void ConstantDeclarator(List constantDeclaration) { Expression expr = null; TypeReference type = null; string name = String.Empty; Location location; - - Identifier(); -#line 1420 "VBNET.ATG" - name = t.val; location = t.Location; + Identifier(); + name = t.val; location = t.Location; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 1421 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } Expect(10); - Expr( -#line 1422 "VBNET.ATG" -out expr); - -#line 1424 "VBNET.ATG" + Expr(out expr); VariableDeclaration f = new VariableDeclaration(name, expr); f.TypeReference = type; f.StartLocation = location; constantDeclaration.Add(f); - - } - void ObjectCreateExpression( -#line 1960 "VBNET.ATG" -out Expression oce) { + } -#line 1962 "VBNET.ATG" + void ObjectCreateExpression(out Expression oce) { TypeReference type = null; CollectionInitializerExpression initializer = null; List arguments = null; ArrayList dimensions = null; oce = null; bool canBeNormal; bool canBeReDim; - + Expect(148); if (StartOf(8)) { - NonArrayTypeName( -#line 1970 "VBNET.ATG" -out type, false); + NonArrayTypeName(out type, false); if (la.kind == 25) { - lexer.NextToken(); - NormalOrReDimArgumentList( -#line 1971 "VBNET.ATG" -out arguments, out canBeNormal, out canBeReDim); + Get(); + NormalOrReDimArgumentList(out arguments, out canBeNormal, out canBeReDim); Expect(26); - if (la.kind == 23 || -#line 1972 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis) { - if ( -#line 1972 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis) { - ArrayTypeModifiers( -#line 1973 "VBNET.ATG" -out dimensions); - CollectionInitializer( -#line 1974 "VBNET.ATG" -out initializer); + if (la.kind == 23 || la.kind == 25) { + if (la.kind == Tokens.OpenParenthesis) { + ArrayTypeModifiers(out dimensions); + CollectionInitializer(out initializer); } else { - CollectionInitializer( -#line 1975 "VBNET.ATG" -out initializer); + CollectionInitializer(out initializer); } } - -#line 1977 "VBNET.ATG" - if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); + if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression(); } } - -#line 1981 "VBNET.ATG" if (initializer == null) { oce = new ObjectCreateExpression(type, arguments); } else { @@ -2956,371 +2025,251 @@ out initializer); ace.Arguments = arguments; oce = ace; } - + if (la.kind == 113 || la.kind == 218) { if (la.kind == 218) { - -#line 1996 "VBNET.ATG" MemberInitializerExpression memberInitializer = null; - - lexer.NextToken(); -#line 2000 "VBNET.ATG" + Get(); CollectionInitializerExpression memberInitializers = new CollectionInitializerExpression(); memberInitializers.StartLocation = la.Location; - - Expect(23); - MemberInitializer( -#line 2004 "VBNET.ATG" -out memberInitializer); -#line 2005 "VBNET.ATG" - memberInitializers.CreateExpressions.Add(memberInitializer); + Expect(23); + MemberInitializer(out memberInitializer); + memberInitializers.CreateExpressions.Add(memberInitializer); while (la.kind == 12) { - lexer.NextToken(); - MemberInitializer( -#line 2007 "VBNET.ATG" -out memberInitializer); - -#line 2008 "VBNET.ATG" - memberInitializers.CreateExpressions.Add(memberInitializer); + Get(); + MemberInitializer(out memberInitializer); + memberInitializers.CreateExpressions.Add(memberInitializer); } Expect(24); - -#line 2012 "VBNET.ATG" memberInitializers.EndLocation = t.Location; if(oce is ObjectCreateExpression) { ((ObjectCreateExpression)oce).ObjectInitializer = memberInitializers; } - - } else { - lexer.NextToken(); - CollectionInitializer( -#line 2022 "VBNET.ATG" -out initializer); -#line 2024 "VBNET.ATG" + } else { + Get(); + CollectionInitializer(out initializer); if(oce is ObjectCreateExpression) ((ObjectCreateExpression)oce).ObjectInitializer = initializer; - + } } } - void AccessorDecls( -#line 1347 "VBNET.ATG" -out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { - -#line 1349 "VBNET.ATG" + void AccessorDecls(out PropertyGetRegion getBlock, out PropertySetRegion setBlock) { List attributes = new List(); AttributeSection section; getBlock = null; setBlock = null; - - while (la.kind == 28) { - AttributeSection( -#line 1354 "VBNET.ATG" -out section); -#line 1354 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } if (StartOf(24)) { - GetAccessorDecl( -#line 1356 "VBNET.ATG" -out getBlock, attributes); + GetAccessorDecl(out getBlock, attributes); if (StartOf(25)) { - -#line 1358 "VBNET.ATG" - attributes = new List(); + attributes = new List(); while (la.kind == 28) { - AttributeSection( -#line 1359 "VBNET.ATG" -out section); - -#line 1359 "VBNET.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } - SetAccessorDecl( -#line 1360 "VBNET.ATG" -out setBlock, attributes); + SetAccessorDecl(out setBlock, attributes); } } else if (StartOf(26)) { - SetAccessorDecl( -#line 1363 "VBNET.ATG" -out setBlock, attributes); + SetAccessorDecl(out setBlock, attributes); if (StartOf(27)) { - -#line 1365 "VBNET.ATG" - attributes = new List(); + attributes = new List(); while (la.kind == 28) { - AttributeSection( -#line 1366 "VBNET.ATG" -out section); - -#line 1366 "VBNET.ATG" - attributes.Add(section); + AttributeSection(out section); + attributes.Add(section); } - GetAccessorDecl( -#line 1367 "VBNET.ATG" -out getBlock, attributes); + GetAccessorDecl(out getBlock, attributes); } - } else SynErr(253); + } else SynErr(254); } - void EventAccessorDeclaration( -#line 1310 "VBNET.ATG" -out EventAddRemoveRegion eventAccessorDeclaration) { - -#line 1312 "VBNET.ATG" + void EventAccessorDeclaration(out EventAddRemoveRegion eventAccessorDeclaration) { Statement stmt = null; List p = new List(); AttributeSection section; List attributes = new List(); eventAccessorDeclaration = null; - - while (la.kind == 28) { - AttributeSection( -#line 1318 "VBNET.ATG" -out section); -#line 1318 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } if (la.kind == 43) { - lexer.NextToken(); + Get(); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 1320 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } Expect(1); - Block( -#line 1321 "VBNET.ATG" -out stmt); + Block(out stmt); Expect(100); Expect(43); EndOfStmt(); - -#line 1323 "VBNET.ATG" eventAccessorDeclaration = new EventAddRegion(attributes); eventAccessorDeclaration.Block = (BlockStatement)stmt; eventAccessorDeclaration.Parameters = p; - + } else if (la.kind == 178) { - lexer.NextToken(); + Get(); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 1328 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } Expect(1); - Block( -#line 1329 "VBNET.ATG" -out stmt); + Block(out stmt); Expect(100); Expect(178); EndOfStmt(); - -#line 1331 "VBNET.ATG" eventAccessorDeclaration = new EventRemoveRegion(attributes); eventAccessorDeclaration.Block = (BlockStatement)stmt; eventAccessorDeclaration.Parameters = p; - + } else if (la.kind == 174) { - lexer.NextToken(); + Get(); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 1336 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } Expect(1); - Block( -#line 1337 "VBNET.ATG" -out stmt); + Block(out stmt); Expect(100); Expect(174); EndOfStmt(); - -#line 1339 "VBNET.ATG" eventAccessorDeclaration = new EventRaiseRegion(attributes); eventAccessorDeclaration.Block = (BlockStatement)stmt; eventAccessorDeclaration.Parameters = p; - - } else SynErr(254); - } - void OverloadableOperator( -#line 1252 "VBNET.ATG" -out OverloadableOperatorType operatorType) { + } else SynErr(255); + } -#line 1253 "VBNET.ATG" - operatorType = OverloadableOperatorType.None; + void OverloadableOperator(out OverloadableOperatorType operatorType) { + operatorType = OverloadableOperatorType.None; switch (la.kind) { case 19: { - lexer.NextToken(); - -#line 1255 "VBNET.ATG" - operatorType = OverloadableOperatorType.Add; + Get(); + operatorType = OverloadableOperatorType.Add; break; } case 18: { - lexer.NextToken(); - -#line 1257 "VBNET.ATG" - operatorType = OverloadableOperatorType.Subtract; + Get(); + operatorType = OverloadableOperatorType.Subtract; break; } case 22: { - lexer.NextToken(); - -#line 1259 "VBNET.ATG" - operatorType = OverloadableOperatorType.Multiply; + Get(); + operatorType = OverloadableOperatorType.Multiply; break; } case 14: { - lexer.NextToken(); - -#line 1261 "VBNET.ATG" - operatorType = OverloadableOperatorType.Divide; + Get(); + operatorType = OverloadableOperatorType.Divide; break; } case 15: { - lexer.NextToken(); - -#line 1263 "VBNET.ATG" - operatorType = OverloadableOperatorType.DivideInteger; + Get(); + operatorType = OverloadableOperatorType.DivideInteger; break; } case 13: { - lexer.NextToken(); - -#line 1265 "VBNET.ATG" - operatorType = OverloadableOperatorType.Concat; + Get(); + operatorType = OverloadableOperatorType.Concat; break; } case 136: { - lexer.NextToken(); - -#line 1267 "VBNET.ATG" - operatorType = OverloadableOperatorType.Like; + Get(); + operatorType = OverloadableOperatorType.Like; break; } case 140: { - lexer.NextToken(); - -#line 1269 "VBNET.ATG" - operatorType = OverloadableOperatorType.Modulus; + Get(); + operatorType = OverloadableOperatorType.Modulus; break; } case 47: { - lexer.NextToken(); - -#line 1271 "VBNET.ATG" - operatorType = OverloadableOperatorType.BitwiseAnd; + Get(); + operatorType = OverloadableOperatorType.BitwiseAnd; break; } case 161: { - lexer.NextToken(); - -#line 1273 "VBNET.ATG" - operatorType = OverloadableOperatorType.BitwiseOr; + Get(); + operatorType = OverloadableOperatorType.BitwiseOr; break; } case 221: { - lexer.NextToken(); - -#line 1275 "VBNET.ATG" - operatorType = OverloadableOperatorType.ExclusiveOr; + Get(); + operatorType = OverloadableOperatorType.ExclusiveOr; break; } case 20: { - lexer.NextToken(); - -#line 1277 "VBNET.ATG" - operatorType = OverloadableOperatorType.Power; + Get(); + operatorType = OverloadableOperatorType.Power; break; } case 32: { - lexer.NextToken(); - -#line 1279 "VBNET.ATG" - operatorType = OverloadableOperatorType.ShiftLeft; + Get(); + operatorType = OverloadableOperatorType.ShiftLeft; break; } case 33: { - lexer.NextToken(); - -#line 1281 "VBNET.ATG" - operatorType = OverloadableOperatorType.ShiftRight; + Get(); + operatorType = OverloadableOperatorType.ShiftRight; break; } case 10: { - lexer.NextToken(); - -#line 1283 "VBNET.ATG" - operatorType = OverloadableOperatorType.Equality; + Get(); + operatorType = OverloadableOperatorType.Equality; break; } case 29: { - lexer.NextToken(); - -#line 1285 "VBNET.ATG" - operatorType = OverloadableOperatorType.InEquality; + Get(); + operatorType = OverloadableOperatorType.InEquality; break; } case 28: { - lexer.NextToken(); - -#line 1287 "VBNET.ATG" - operatorType = OverloadableOperatorType.LessThan; + Get(); + operatorType = OverloadableOperatorType.LessThan; break; } case 31: { - lexer.NextToken(); - -#line 1289 "VBNET.ATG" - operatorType = OverloadableOperatorType.LessThanOrEqual; + Get(); + operatorType = OverloadableOperatorType.LessThanOrEqual; break; } case 27: { - lexer.NextToken(); - -#line 1291 "VBNET.ATG" - operatorType = OverloadableOperatorType.GreaterThan; + Get(); + operatorType = OverloadableOperatorType.GreaterThan; break; } case 30: { - lexer.NextToken(); - -#line 1293 "VBNET.ATG" - operatorType = OverloadableOperatorType.GreaterThanOrEqual; + Get(); + operatorType = OverloadableOperatorType.GreaterThanOrEqual; break; } case 81: { - lexer.NextToken(); - -#line 1295 "VBNET.ATG" - operatorType = OverloadableOperatorType.CType; + Get(); + operatorType = OverloadableOperatorType.CType; break; } case 2: case 45: case 49: case 51: case 52: case 53: case 54: case 57: case 74: case 85: case 91: case 94: case 103: case 108: case 113: case 120: case 126: case 130: case 133: case 156: case 162: case 169: case 188: case 197: case 198: case 208: case 209: case 215: { Identifier(); - -#line 1299 "VBNET.ATG" string opName = t.val; if (string.Equals(opName, "istrue", StringComparison.InvariantCultureIgnoreCase)) { operatorType = OverloadableOperatorType.IsTrue; @@ -3329,1104 +2278,697 @@ out OverloadableOperatorType operatorType) { } else { Error("Invalid operator. Possible operators are '+', '-', 'Not', 'IsTrue', 'IsFalse'."); } - + break; } - default: SynErr(255); break; + default: SynErr(256); break; } } - void GetAccessorDecl( -#line 1373 "VBNET.ATG" -out PropertyGetRegion getBlock, List attributes) { - -#line 1374 "VBNET.ATG" - Statement stmt = null; Modifiers m; - PropertyAccessorAccessModifier( -#line 1376 "VBNET.ATG" -out m); + void GetAccessorDecl(out PropertyGetRegion getBlock, List attributes) { + Statement stmt = null; Modifiers m; + PropertyAccessorAccessModifier(out m); Expect(115); - -#line 1378 "VBNET.ATG" - Location startLocation = t.Location; + Location startLocation = t.Location; Expect(1); - Block( -#line 1380 "VBNET.ATG" -out stmt); - -#line 1381 "VBNET.ATG" - getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes); + Block(out stmt); + getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes); Expect(100); Expect(115); - -#line 1383 "VBNET.ATG" - getBlock.Modifier = m; - -#line 1384 "VBNET.ATG" - getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; + getBlock.Modifier = m; + getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation; EndOfStmt(); } - void SetAccessorDecl( -#line 1389 "VBNET.ATG" -out PropertySetRegion setBlock, List attributes) { - -#line 1391 "VBNET.ATG" + void SetAccessorDecl(out PropertySetRegion setBlock, List attributes) { Statement stmt = null; List p = new List(); Modifiers m; - - PropertyAccessorAccessModifier( -#line 1396 "VBNET.ATG" -out m); - Expect(183); -#line 1398 "VBNET.ATG" - Location startLocation = t.Location; + PropertyAccessorAccessModifier(out m); + Expect(183); + Location startLocation = t.Location; if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 1399 "VBNET.ATG" -p); + FormalParameterList(p); } Expect(26); } Expect(1); - Block( -#line 1401 "VBNET.ATG" -out stmt); - -#line 1403 "VBNET.ATG" + Block(out stmt); setBlock = new PropertySetRegion((BlockStatement)stmt, attributes); setBlock.Modifier = m; setBlock.Parameters = p; - + Expect(100); Expect(183); - -#line 1408 "VBNET.ATG" - setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; + setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation; EndOfStmt(); } - void PropertyAccessorAccessModifier( -#line 3448 "VBNET.ATG" -out Modifiers m) { - -#line 3449 "VBNET.ATG" - m = Modifiers.None; + void PropertyAccessorAccessModifier(out Modifiers m) { + m = Modifiers.None; while (StartOf(28)) { if (la.kind == 173) { - lexer.NextToken(); - -#line 3451 "VBNET.ATG" - m |= Modifiers.Public; + Get(); + m |= Modifiers.Public; } else if (la.kind == 172) { - lexer.NextToken(); - -#line 3452 "VBNET.ATG" - m |= Modifiers.Protected; + Get(); + m |= Modifiers.Protected; } else if (la.kind == 112) { - lexer.NextToken(); - -#line 3453 "VBNET.ATG" - m |= Modifiers.Internal; + Get(); + m |= Modifiers.Internal; } else { - lexer.NextToken(); - -#line 3454 "VBNET.ATG" - m |= Modifiers.Private; + Get(); + m |= Modifiers.Private; } } } - void ArrayInitializationModifier( -#line 1506 "VBNET.ATG" -out List arrayModifiers) { - -#line 1508 "VBNET.ATG" + void ArrayInitializationModifier(out List arrayModifiers) { arrayModifiers = null; - + Expect(25); - InitializationRankList( -#line 1510 "VBNET.ATG" -out arrayModifiers); + InitializationRankList(out arrayModifiers); Expect(26); } - void ArrayNameModifier( -#line 2525 "VBNET.ATG" -out ArrayList arrayModifiers) { - -#line 2527 "VBNET.ATG" + void ArrayNameModifier(out ArrayList arrayModifiers) { arrayModifiers = null; - - ArrayTypeModifiers( -#line 2529 "VBNET.ATG" -out arrayModifiers); - } - void InitializationRankList( -#line 1514 "VBNET.ATG" -out List rank) { + ArrayTypeModifiers(out arrayModifiers); + } -#line 1516 "VBNET.ATG" + void InitializationRankList(out List rank) { rank = new List(); Expression expr = null; - - Expr( -#line 1519 "VBNET.ATG" -out expr); - if (la.kind == 201) { - lexer.NextToken(); -#line 1520 "VBNET.ATG" - EnsureIsZero(expr); - Expr( -#line 1521 "VBNET.ATG" -out expr); + Expr(out expr); + if (la.kind == 201) { + Get(); + EnsureIsZero(expr); + Expr(out expr); } - -#line 1523 "VBNET.ATG" - if (expr != null) { rank.Add(expr); } + if (expr != null) { rank.Add(expr); } while (la.kind == 12) { - lexer.NextToken(); - Expr( -#line 1525 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); if (la.kind == 201) { - lexer.NextToken(); - -#line 1526 "VBNET.ATG" - EnsureIsZero(expr); - Expr( -#line 1527 "VBNET.ATG" -out expr); + Get(); + EnsureIsZero(expr); + Expr(out expr); } - -#line 1529 "VBNET.ATG" - if (expr != null) { rank.Add(expr); } + if (expr != null) { rank.Add(expr); } } } - void CollectionInitializer( -#line 1534 "VBNET.ATG" -out CollectionInitializerExpression outExpr) { - -#line 1536 "VBNET.ATG" + void CollectionInitializer(out CollectionInitializerExpression outExpr) { Expression expr = null; CollectionInitializerExpression initializer = new CollectionInitializerExpression(); - + Expect(23); if (StartOf(29)) { - Expr( -#line 1541 "VBNET.ATG" -out expr); - -#line 1543 "VBNET.ATG" + Expr(out expr); if (expr != null) { initializer.CreateExpressions.Add(expr); } - - while ( -#line 1546 "VBNET.ATG" -NotFinalComma()) { - Expect(12); - Expr( -#line 1546 "VBNET.ATG" -out expr); -#line 1547 "VBNET.ATG" - if (expr != null) { initializer.CreateExpressions.Add(expr); } + while (NotFinalComma()) { + Expect(12); + Expr(out expr); + if (expr != null) { initializer.CreateExpressions.Add(expr); } } } Expect(24); - -#line 1550 "VBNET.ATG" - outExpr = initializer; + outExpr = initializer; } - void EventMemberSpecifier( -#line 1620 "VBNET.ATG" -out string name) { - -#line 1621 "VBNET.ATG" - string eventName; + void EventMemberSpecifier(out string name) { + string eventName; if (StartOf(4)) { Identifier(); } else if (la.kind == 144) { - lexer.NextToken(); + Get(); } else if (la.kind == 139) { - lexer.NextToken(); - } else SynErr(256); - -#line 1624 "VBNET.ATG" - name = t.val; + Get(); + } else SynErr(257); + name = t.val; Expect(16); - IdentifierOrKeyword( -#line 1626 "VBNET.ATG" -out eventName); - -#line 1627 "VBNET.ATG" - name = name + "." + eventName; + IdentifierOrKeyword(out eventName); + name = name + "." + eventName; } - void IdentifierOrKeyword( -#line 3381 "VBNET.ATG" -out string name) { - -#line 3383 "VBNET.ATG" - lexer.NextToken(); name = t.val; + void IdentifierOrKeyword(out string name) { + Get(); + name = t.val; } - void QueryExpr( -#line 2049 "VBNET.ATG" -out Expression expr) { - -#line 2051 "VBNET.ATG" + void QueryExpr(out Expression expr) { QueryExpressionVB qexpr = new QueryExpressionVB(); qexpr.StartLocation = la.Location; expr = qexpr; - - FromOrAggregateQueryOperator( -#line 2055 "VBNET.ATG" -qexpr.Clauses); + + FromOrAggregateQueryOperator(qexpr.Clauses); while (StartOf(30)) { - QueryOperator( -#line 2056 "VBNET.ATG" -qexpr.Clauses); + QueryOperator(qexpr.Clauses); } - -#line 2058 "VBNET.ATG" qexpr.EndLocation = t.EndLocation; - - } - void LambdaExpr( -#line 2031 "VBNET.ATG" -out Expression expr) { + } -#line 2033 "VBNET.ATG" + void LambdaExpr(out Expression expr) { Expression inner = null; LambdaExpression lambda = new LambdaExpression(); lambda.StartLocation = la.Location; - + Expect(114); if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(6)) { - FormalParameterList( -#line 2039 "VBNET.ATG" -lambda.Parameters); + FormalParameterList(lambda.Parameters); } Expect(26); } - Expr( -#line 2040 "VBNET.ATG" -out inner); - -#line 2042 "VBNET.ATG" + Expr(out inner); lambda.ExpressionBody = inner; lambda.EndLocation = t.EndLocation; // la.Location? - + expr = lambda; - - } - void DisjunctionExpr( -#line 1804 "VBNET.ATG" -out Expression outExpr) { + } -#line 1806 "VBNET.ATG" + void DisjunctionExpr(out Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - ConjunctionExpr( -#line 1809 "VBNET.ATG" -out outExpr); + + ConjunctionExpr(out outExpr); while (la.kind == 161 || la.kind == 163 || la.kind == 221) { if (la.kind == 161) { - lexer.NextToken(); - -#line 1812 "VBNET.ATG" - op = BinaryOperatorType.BitwiseOr; + Get(); + op = BinaryOperatorType.BitwiseOr; } else if (la.kind == 163) { - lexer.NextToken(); - -#line 1813 "VBNET.ATG" - op = BinaryOperatorType.LogicalOr; + Get(); + op = BinaryOperatorType.LogicalOr; } else { - lexer.NextToken(); - -#line 1814 "VBNET.ATG" - op = BinaryOperatorType.ExclusiveOr; + Get(); + op = BinaryOperatorType.ExclusiveOr; } - ConjunctionExpr( -#line 1816 "VBNET.ATG" -out expr); - -#line 1816 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + ConjunctionExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void AssignmentOperator( -#line 1638 "VBNET.ATG" -out AssignmentOperatorType op) { - -#line 1639 "VBNET.ATG" - op = AssignmentOperatorType.None; + void AssignmentOperator(out AssignmentOperatorType op) { + op = AssignmentOperatorType.None; switch (la.kind) { case 10: { - lexer.NextToken(); - -#line 1640 "VBNET.ATG" - op = AssignmentOperatorType.Assign; + Get(); + op = AssignmentOperatorType.Assign; break; } case 42: { - lexer.NextToken(); - -#line 1641 "VBNET.ATG" - op = AssignmentOperatorType.ConcatString; + Get(); + op = AssignmentOperatorType.ConcatString; break; } case 34: { - lexer.NextToken(); - -#line 1642 "VBNET.ATG" - op = AssignmentOperatorType.Add; + Get(); + op = AssignmentOperatorType.Add; break; } case 36: { - lexer.NextToken(); - -#line 1643 "VBNET.ATG" - op = AssignmentOperatorType.Subtract; + Get(); + op = AssignmentOperatorType.Subtract; break; } case 37: { - lexer.NextToken(); - -#line 1644 "VBNET.ATG" - op = AssignmentOperatorType.Multiply; + Get(); + op = AssignmentOperatorType.Multiply; break; } case 38: { - lexer.NextToken(); - -#line 1645 "VBNET.ATG" - op = AssignmentOperatorType.Divide; + Get(); + op = AssignmentOperatorType.Divide; break; } case 39: { - lexer.NextToken(); - -#line 1646 "VBNET.ATG" - op = AssignmentOperatorType.DivideInteger; + Get(); + op = AssignmentOperatorType.DivideInteger; break; } case 35: { - lexer.NextToken(); - -#line 1647 "VBNET.ATG" - op = AssignmentOperatorType.Power; + Get(); + op = AssignmentOperatorType.Power; break; } case 40: { - lexer.NextToken(); - -#line 1648 "VBNET.ATG" - op = AssignmentOperatorType.ShiftLeft; + Get(); + op = AssignmentOperatorType.ShiftLeft; break; } case 41: { - lexer.NextToken(); - -#line 1649 "VBNET.ATG" - op = AssignmentOperatorType.ShiftRight; + Get(); + op = AssignmentOperatorType.ShiftRight; break; } - default: SynErr(257); break; + default: SynErr(258); break; } } - void SimpleExpr( -#line 1653 "VBNET.ATG" -out Expression pexpr) { - -#line 1654 "VBNET.ATG" - string name; - SimpleNonInvocationExpression( -#line 1656 "VBNET.ATG" -out pexpr); + void SimpleExpr(out Expression pexpr) { + string name; + SimpleNonInvocationExpression(out pexpr); while (la.kind == 16 || la.kind == 17 || la.kind == 25) { if (la.kind == 16) { - lexer.NextToken(); - IdentifierOrKeyword( -#line 1658 "VBNET.ATG" -out name); - -#line 1659 "VBNET.ATG" - pexpr = new MemberReferenceExpression(pexpr, name); - if ( -#line 1660 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { - lexer.NextToken(); + Get(); + IdentifierOrKeyword(out name); + pexpr = new MemberReferenceExpression(pexpr, name); + if (la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { + Expect(25); Expect(155); - TypeArgumentList( -#line 1661 "VBNET.ATG" -((MemberReferenceExpression)pexpr).TypeArguments); + TypeArgumentList(((MemberReferenceExpression)pexpr).TypeArguments); Expect(26); } } else if (la.kind == 17) { - lexer.NextToken(); - IdentifierOrKeyword( -#line 1663 "VBNET.ATG" -out name); - -#line 1663 "VBNET.ATG" - pexpr = new BinaryOperatorExpression(pexpr, BinaryOperatorType.DictionaryAccess, new PrimitiveExpression(name, name)); + Get(); + IdentifierOrKeyword(out name); + pexpr = new BinaryOperatorExpression(pexpr, BinaryOperatorType.DictionaryAccess, new PrimitiveExpression(name, name)); } else { - InvocationExpression( -#line 1664 "VBNET.ATG" -ref pexpr); + InvocationExpression(ref pexpr); } } } - void SimpleNonInvocationExpression( -#line 1668 "VBNET.ATG" -out Expression pexpr) { - -#line 1670 "VBNET.ATG" + void SimpleNonInvocationExpression(out Expression pexpr) { Expression expr; CollectionInitializerExpression cie; TypeReference type = null; string name = String.Empty; pexpr = null; - + if (StartOf(31)) { switch (la.kind) { case 3: { - lexer.NextToken(); - -#line 1679 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 4: { - lexer.NextToken(); - -#line 1680 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 7: { - lexer.NextToken(); - -#line 1681 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 6: { - lexer.NextToken(); - -#line 1682 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 5: { - lexer.NextToken(); - -#line 1683 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 9: { - lexer.NextToken(); - -#line 1684 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 8: { - lexer.NextToken(); - -#line 1685 "VBNET.ATG" - pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; + Get(); + pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat }; break; } case 202: { - lexer.NextToken(); - -#line 1687 "VBNET.ATG" - pexpr = new PrimitiveExpression(true, "true"); + Get(); + pexpr = new PrimitiveExpression(true, "true"); break; } case 109: { - lexer.NextToken(); - -#line 1688 "VBNET.ATG" - pexpr = new PrimitiveExpression(false, "false"); + Get(); + pexpr = new PrimitiveExpression(false, "false"); break; } case 151: { - lexer.NextToken(); - -#line 1689 "VBNET.ATG" - pexpr = new PrimitiveExpression(null, "null"); + Get(); + pexpr = new PrimitiveExpression(null, "null"); break; } case 25: { - lexer.NextToken(); - Expr( -#line 1690 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); Expect(26); - -#line 1690 "VBNET.ATG" - pexpr = new ParenthesizedExpression(expr); + pexpr = new ParenthesizedExpression(expr); break; } case 2: case 45: case 49: case 51: case 52: case 53: case 54: case 57: case 74: case 85: case 91: case 94: case 103: case 108: case 113: case 120: case 126: case 130: case 133: case 156: case 162: case 169: case 188: case 197: case 198: case 208: case 209: case 215: { Identifier(); - -#line 1692 "VBNET.ATG" pexpr = new IdentifierExpression(t.val); pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation; - - if ( -#line 1695 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { - lexer.NextToken(); + + if (la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { + Expect(25); Expect(155); - TypeArgumentList( -#line 1696 "VBNET.ATG" -((IdentifierExpression)pexpr).TypeArguments); + TypeArgumentList(((IdentifierExpression)pexpr).TypeArguments); Expect(26); } break; } case 55: case 58: case 69: case 86: case 87: case 96: case 128: case 137: case 154: case 181: case 186: case 187: case 193: case 206: case 207: case 210: { - -#line 1698 "VBNET.ATG" - string val = String.Empty; + string val = String.Empty; if (StartOf(12)) { - PrimitiveTypeName( -#line 1699 "VBNET.ATG" -out val); - } else if (la.kind == 154) { - lexer.NextToken(); - -#line 1699 "VBNET.ATG" - val = "System.Object"; - } else SynErr(258); - -#line 1700 "VBNET.ATG" - pexpr = new TypeReferenceExpression(new TypeReference(val, true)); + PrimitiveTypeName(out val); + } else { + Get(); + val = "System.Object"; + } + pexpr = new TypeReferenceExpression(new TypeReference(val, true)); break; } case 139: { - lexer.NextToken(); - -#line 1701 "VBNET.ATG" - pexpr = new ThisReferenceExpression(); + Get(); + pexpr = new ThisReferenceExpression(); break; } case 144: case 145: { - -#line 1702 "VBNET.ATG" - Expression retExpr = null; + Expression retExpr = null; if (la.kind == 144) { - lexer.NextToken(); - -#line 1703 "VBNET.ATG" - retExpr = new BaseReferenceExpression(); - } else if (la.kind == 145) { - lexer.NextToken(); - -#line 1704 "VBNET.ATG" - retExpr = new ClassReferenceExpression(); - } else SynErr(259); + Get(); + retExpr = new BaseReferenceExpression(); + } else { + Get(); + retExpr = new ClassReferenceExpression(); + } Expect(16); - IdentifierOrKeyword( -#line 1706 "VBNET.ATG" -out name); - -#line 1706 "VBNET.ATG" - pexpr = new MemberReferenceExpression(retExpr, name); + IdentifierOrKeyword(out name); + pexpr = new MemberReferenceExpression(retExpr, name); break; } case 117: { - lexer.NextToken(); + Get(); Expect(16); Identifier(); - -#line 1708 "VBNET.ATG" - type = new TypeReference(t.val ?? ""); - -#line 1710 "VBNET.ATG" - type.IsGlobal = true; - -#line 1711 "VBNET.ATG" - pexpr = new TypeReferenceExpression(type); + type = new TypeReference(t.val ?? ""); + type.IsGlobal = true; + pexpr = new TypeReferenceExpression(type); break; } case 148: { - ObjectCreateExpression( -#line 1712 "VBNET.ATG" -out expr); - -#line 1712 "VBNET.ATG" - pexpr = expr; + ObjectCreateExpression(out expr); + pexpr = expr; break; } case 23: { - CollectionInitializer( -#line 1713 "VBNET.ATG" -out cie); - -#line 1713 "VBNET.ATG" - pexpr = cie; + CollectionInitializer(out cie); + pexpr = cie; break; } case 81: case 93: case 204: { - -#line 1715 "VBNET.ATG" - CastType castType = CastType.Cast; + CastType castType = CastType.Cast; if (la.kind == 93) { - lexer.NextToken(); + Get(); } else if (la.kind == 81) { - lexer.NextToken(); - -#line 1717 "VBNET.ATG" - castType = CastType.Conversion; - } else if (la.kind == 204) { - lexer.NextToken(); - -#line 1718 "VBNET.ATG" - castType = CastType.TryCast; - } else SynErr(260); + Get(); + castType = CastType.Conversion; + } else { + Get(); + castType = CastType.TryCast; + } Expect(25); - Expr( -#line 1720 "VBNET.ATG" -out expr); + Expr(out expr); Expect(12); - TypeName( -#line 1720 "VBNET.ATG" -out type); + TypeName(out type); Expect(26); - -#line 1721 "VBNET.ATG" - pexpr = new CastExpression(type, expr, castType); + pexpr = new CastExpression(type, expr, castType); break; } case 63: case 64: case 65: case 66: case 67: case 68: case 70: case 72: case 73: case 77: case 78: case 79: case 80: case 82: case 83: case 84: { - CastTarget( -#line 1722 "VBNET.ATG" -out type); + CastTarget(out type); Expect(25); - Expr( -#line 1722 "VBNET.ATG" -out expr); + Expr(out expr); Expect(26); - -#line 1722 "VBNET.ATG" - pexpr = new CastExpression(type, expr, CastType.PrimitiveConversion); + pexpr = new CastExpression(type, expr, CastType.PrimitiveConversion); break; } case 44: { - lexer.NextToken(); - Expr( -#line 1723 "VBNET.ATG" -out expr); - -#line 1723 "VBNET.ATG" - pexpr = new AddressOfExpression(expr); + Get(); + Expr(out expr); + pexpr = new AddressOfExpression(expr); break; } case 116: { - lexer.NextToken(); + Get(); Expect(25); - GetTypeTypeName( -#line 1724 "VBNET.ATG" -out type); + GetTypeTypeName(out type); Expect(26); - -#line 1724 "VBNET.ATG" - pexpr = new TypeOfExpression(type); + pexpr = new TypeOfExpression(type); break; } case 205: { - lexer.NextToken(); - SimpleExpr( -#line 1725 "VBNET.ATG" -out expr); + Get(); + SimpleExpr(out expr); Expect(131); - TypeName( -#line 1725 "VBNET.ATG" -out type); - -#line 1725 "VBNET.ATG" - pexpr = new TypeOfIsExpression(expr, type); + TypeName(out type); + pexpr = new TypeOfIsExpression(expr, type); break; } case 122: { - ConditionalExpression( -#line 1726 "VBNET.ATG" -out pexpr); + ConditionalExpression(out pexpr); break; } } } else if (la.kind == 16) { - lexer.NextToken(); - IdentifierOrKeyword( -#line 1730 "VBNET.ATG" -out name); - -#line 1730 "VBNET.ATG" + Get(); + IdentifierOrKeyword(out name); pexpr = new MemberReferenceExpression(null, name); - } else SynErr(261); + } else SynErr(259); } - void TypeArgumentList( -#line 2561 "VBNET.ATG" -List typeArguments) { - -#line 2563 "VBNET.ATG" + void TypeArgumentList(List typeArguments) { TypeReference typeref; - - TypeName( -#line 2565 "VBNET.ATG" -out typeref); -#line 2565 "VBNET.ATG" - if (typeref != null) typeArguments.Add(typeref); + TypeName(out typeref); + if (typeref != null) typeArguments.Add(typeref); while (la.kind == 12) { - lexer.NextToken(); - TypeName( -#line 2568 "VBNET.ATG" -out typeref); - -#line 2568 "VBNET.ATG" - if (typeref != null) typeArguments.Add(typeref); + Get(); + TypeName(out typeref); + if (typeref != null) typeArguments.Add(typeref); } } - void InvocationExpression( -#line 1768 "VBNET.ATG" -ref Expression pexpr) { - -#line 1769 "VBNET.ATG" - List parameters = null; + void InvocationExpression(ref Expression pexpr) { + List parameters = null; Expect(25); - -#line 1771 "VBNET.ATG" - Location start = t.Location; - ArgumentList( -#line 1772 "VBNET.ATG" -out parameters); + Location start = t.Location; + ArgumentList(out parameters); Expect(26); - -#line 1775 "VBNET.ATG" pexpr = new InvocationExpression(pexpr, parameters); - -#line 1777 "VBNET.ATG" - pexpr.StartLocation = start; pexpr.EndLocation = t.Location; + pexpr.StartLocation = start; pexpr.EndLocation = t.Location; } - void PrimitiveTypeName( -#line 3388 "VBNET.ATG" -out string type) { - -#line 3389 "VBNET.ATG" - type = String.Empty; + void PrimitiveTypeName(out string type) { + type = String.Empty; switch (la.kind) { case 55: { - lexer.NextToken(); - -#line 3390 "VBNET.ATG" - type = "System.Boolean"; + Get(); + type = "System.Boolean"; break; } case 86: { - lexer.NextToken(); - -#line 3391 "VBNET.ATG" - type = "System.DateTime"; + Get(); + type = "System.DateTime"; break; } case 69: { - lexer.NextToken(); - -#line 3392 "VBNET.ATG" - type = "System.Char"; + Get(); + type = "System.Char"; break; } case 193: { - lexer.NextToken(); - -#line 3393 "VBNET.ATG" - type = "System.String"; + Get(); + type = "System.String"; break; } case 87: { - lexer.NextToken(); - -#line 3394 "VBNET.ATG" - type = "System.Decimal"; + Get(); + type = "System.Decimal"; break; } case 58: { - lexer.NextToken(); - -#line 3395 "VBNET.ATG" - type = "System.Byte"; + Get(); + type = "System.Byte"; break; } case 186: { - lexer.NextToken(); - -#line 3396 "VBNET.ATG" - type = "System.Int16"; + Get(); + type = "System.Int16"; break; } case 128: { - lexer.NextToken(); - -#line 3397 "VBNET.ATG" - type = "System.Int32"; + Get(); + type = "System.Int32"; break; } case 137: { - lexer.NextToken(); - -#line 3398 "VBNET.ATG" - type = "System.Int64"; + Get(); + type = "System.Int64"; break; } case 187: { - lexer.NextToken(); - -#line 3399 "VBNET.ATG" - type = "System.Single"; + Get(); + type = "System.Single"; break; } case 96: { - lexer.NextToken(); - -#line 3400 "VBNET.ATG" - type = "System.Double"; + Get(); + type = "System.Double"; break; } case 206: { - lexer.NextToken(); - -#line 3401 "VBNET.ATG" - type = "System.UInt32"; + Get(); + type = "System.UInt32"; break; } case 207: { - lexer.NextToken(); - -#line 3402 "VBNET.ATG" - type = "System.UInt64"; + Get(); + type = "System.UInt64"; break; } case 210: { - lexer.NextToken(); - -#line 3403 "VBNET.ATG" - type = "System.UInt16"; + Get(); + type = "System.UInt16"; break; } case 181: { - lexer.NextToken(); - -#line 3404 "VBNET.ATG" - type = "System.SByte"; + Get(); + type = "System.SByte"; break; } - default: SynErr(262); break; + default: SynErr(260); break; } } - void CastTarget( -#line 1782 "VBNET.ATG" -out TypeReference type) { - -#line 1784 "VBNET.ATG" + void CastTarget(out TypeReference type) { type = null; - + switch (la.kind) { case 63: { - lexer.NextToken(); - -#line 1786 "VBNET.ATG" - type = new TypeReference("System.Boolean", true); + Get(); + type = new TypeReference("System.Boolean", true); break; } case 64: { - lexer.NextToken(); - -#line 1787 "VBNET.ATG" - type = new TypeReference("System.Byte", true); + Get(); + type = new TypeReference("System.Byte", true); break; } case 77: { - lexer.NextToken(); - -#line 1788 "VBNET.ATG" - type = new TypeReference("System.SByte", true); + Get(); + type = new TypeReference("System.SByte", true); break; } case 65: { - lexer.NextToken(); - -#line 1789 "VBNET.ATG" - type = new TypeReference("System.Char", true); + Get(); + type = new TypeReference("System.Char", true); break; } case 66: { - lexer.NextToken(); - -#line 1790 "VBNET.ATG" - type = new TypeReference("System.DateTime", true); + Get(); + type = new TypeReference("System.DateTime", true); break; } case 68: { - lexer.NextToken(); - -#line 1791 "VBNET.ATG" - type = new TypeReference("System.Decimal", true); + Get(); + type = new TypeReference("System.Decimal", true); break; } case 67: { - lexer.NextToken(); - -#line 1792 "VBNET.ATG" - type = new TypeReference("System.Double", true); + Get(); + type = new TypeReference("System.Double", true); break; } case 78: { - lexer.NextToken(); - -#line 1793 "VBNET.ATG" - type = new TypeReference("System.Int16", true); + Get(); + type = new TypeReference("System.Int16", true); break; } case 70: { - lexer.NextToken(); - -#line 1794 "VBNET.ATG" - type = new TypeReference("System.Int32", true); + Get(); + type = new TypeReference("System.Int32", true); break; } case 72: { - lexer.NextToken(); - -#line 1795 "VBNET.ATG" - type = new TypeReference("System.Int64", true); + Get(); + type = new TypeReference("System.Int64", true); break; } case 84: { - lexer.NextToken(); - -#line 1796 "VBNET.ATG" - type = new TypeReference("System.UInt16", true); + Get(); + type = new TypeReference("System.UInt16", true); break; } case 82: { - lexer.NextToken(); - -#line 1797 "VBNET.ATG" - type = new TypeReference("System.UInt32", true); + Get(); + type = new TypeReference("System.UInt32", true); break; } case 83: { - lexer.NextToken(); - -#line 1798 "VBNET.ATG" - type = new TypeReference("System.UInt64", true); + Get(); + type = new TypeReference("System.UInt64", true); break; } case 73: { - lexer.NextToken(); - -#line 1799 "VBNET.ATG" - type = new TypeReference("System.Object", true); + Get(); + type = new TypeReference("System.Object", true); break; } case 79: { - lexer.NextToken(); - -#line 1800 "VBNET.ATG" - type = new TypeReference("System.Single", true); + Get(); + type = new TypeReference("System.Single", true); break; } case 80: { - lexer.NextToken(); - -#line 1801 "VBNET.ATG" - type = new TypeReference("System.String", true); + Get(); + type = new TypeReference("System.String", true); break; } - default: SynErr(263); break; + default: SynErr(261); break; } } - void GetTypeTypeName( -#line 2460 "VBNET.ATG" -out TypeReference typeref) { - -#line 2461 "VBNET.ATG" - ArrayList rank = null; - NonArrayTypeName( -#line 2463 "VBNET.ATG" -out typeref, true); - ArrayTypeModifiers( -#line 2464 "VBNET.ATG" -out rank); - -#line 2465 "VBNET.ATG" + void GetTypeTypeName(out TypeReference typeref) { + ArrayList rank = null; + NonArrayTypeName(out typeref, true); + ArrayTypeModifiers(out rank); if (rank != null && typeref != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); } - - } - void ConditionalExpression( -#line 1734 "VBNET.ATG" -out Expression expr) { + } -#line 1736 "VBNET.ATG" + void ConditionalExpression(out Expression expr) { ConditionalExpression conditionalExpression = new ConditionalExpression(); BinaryOperatorExpression binaryOperatorExpression = new BinaryOperatorExpression(); conditionalExpression.StartLocation = binaryOperatorExpression.StartLocation = la.Location; - + Expression condition = null; Expression trueExpr = null; Expression falseExpr = null; - + Expect(122); Expect(25); - Expr( -#line 1745 "VBNET.ATG" -out condition); + Expr(out condition); Expect(12); - Expr( -#line 1745 "VBNET.ATG" -out trueExpr); + Expr(out trueExpr); if (la.kind == 12) { - lexer.NextToken(); - Expr( -#line 1745 "VBNET.ATG" -out falseExpr); + Get(); + Expr(out falseExpr); } Expect(26); - -#line 1747 "VBNET.ATG" if(falseExpr != null) { conditionalExpression.Condition = condition; @@ -4445,1309 +2987,753 @@ out falseExpr); expr = binaryOperatorExpression; } - - } - void ArgumentList( -#line 2392 "VBNET.ATG" -out List arguments) { + } -#line 2394 "VBNET.ATG" + void ArgumentList(out List arguments) { arguments = new List(); Expression expr = null; - + if (StartOf(29)) { - Argument( -#line 2397 "VBNET.ATG" -out expr); + Argument(out expr); } while (la.kind == 12) { - lexer.NextToken(); - -#line 2398 "VBNET.ATG" - arguments.Add(expr ?? Expression.Null); expr = null; + Get(); + arguments.Add(expr ?? Expression.Null); expr = null; if (StartOf(29)) { - Argument( -#line 2399 "VBNET.ATG" -out expr); + Argument(out expr); } - -#line 2400 "VBNET.ATG" - if (expr == null) expr = Expression.Null; + if (expr == null) expr = Expression.Null; } - -#line 2402 "VBNET.ATG" - if (expr != null) arguments.Add(expr); + if (expr != null) arguments.Add(expr); } - void ConjunctionExpr( -#line 1820 "VBNET.ATG" -out Expression outExpr) { - -#line 1822 "VBNET.ATG" + void ConjunctionExpr(out Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - NotExpr( -#line 1825 "VBNET.ATG" -out outExpr); + + NotExpr(out outExpr); while (la.kind == 47 || la.kind == 48) { if (la.kind == 47) { - lexer.NextToken(); - -#line 1828 "VBNET.ATG" - op = BinaryOperatorType.BitwiseAnd; + Get(); + op = BinaryOperatorType.BitwiseAnd; } else { - lexer.NextToken(); - -#line 1829 "VBNET.ATG" - op = BinaryOperatorType.LogicalAnd; + Get(); + op = BinaryOperatorType.LogicalAnd; } - NotExpr( -#line 1831 "VBNET.ATG" -out expr); - -#line 1831 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + NotExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void NotExpr( -#line 1835 "VBNET.ATG" -out Expression outExpr) { - -#line 1836 "VBNET.ATG" - UnaryOperatorType uop = UnaryOperatorType.None; + void NotExpr(out Expression outExpr) { + UnaryOperatorType uop = UnaryOperatorType.None; while (la.kind == 150) { - lexer.NextToken(); - -#line 1837 "VBNET.ATG" - uop = UnaryOperatorType.Not; + Get(); + uop = UnaryOperatorType.Not; } - ComparisonExpr( -#line 1838 "VBNET.ATG" -out outExpr); - -#line 1839 "VBNET.ATG" + ComparisonExpr(out outExpr); if (uop != UnaryOperatorType.None) outExpr = new UnaryOperatorExpression(outExpr, uop); - - } - void ComparisonExpr( -#line 1844 "VBNET.ATG" -out Expression outExpr) { + } -#line 1846 "VBNET.ATG" + void ComparisonExpr(out Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - ShiftExpr( -#line 1849 "VBNET.ATG" -out outExpr); + + ShiftExpr(out outExpr); while (StartOf(32)) { switch (la.kind) { case 28: { - lexer.NextToken(); - -#line 1852 "VBNET.ATG" - op = BinaryOperatorType.LessThan; + Get(); + op = BinaryOperatorType.LessThan; break; } case 27: { - lexer.NextToken(); - -#line 1853 "VBNET.ATG" - op = BinaryOperatorType.GreaterThan; + Get(); + op = BinaryOperatorType.GreaterThan; break; } case 31: { - lexer.NextToken(); - -#line 1854 "VBNET.ATG" - op = BinaryOperatorType.LessThanOrEqual; + Get(); + op = BinaryOperatorType.LessThanOrEqual; break; } case 30: { - lexer.NextToken(); - -#line 1855 "VBNET.ATG" - op = BinaryOperatorType.GreaterThanOrEqual; + Get(); + op = BinaryOperatorType.GreaterThanOrEqual; break; } case 29: { - lexer.NextToken(); - -#line 1856 "VBNET.ATG" - op = BinaryOperatorType.InEquality; + Get(); + op = BinaryOperatorType.InEquality; break; } case 10: { - lexer.NextToken(); - -#line 1857 "VBNET.ATG" - op = BinaryOperatorType.Equality; + Get(); + op = BinaryOperatorType.Equality; break; } case 136: { - lexer.NextToken(); - -#line 1858 "VBNET.ATG" - op = BinaryOperatorType.Like; + Get(); + op = BinaryOperatorType.Like; break; } case 131: { - lexer.NextToken(); - -#line 1859 "VBNET.ATG" - op = BinaryOperatorType.ReferenceEquality; + Get(); + op = BinaryOperatorType.ReferenceEquality; break; } case 132: { - lexer.NextToken(); - -#line 1860 "VBNET.ATG" - op = BinaryOperatorType.ReferenceInequality; + Get(); + op = BinaryOperatorType.ReferenceInequality; break; } } if (StartOf(33)) { - ShiftExpr( -#line 1863 "VBNET.ATG" -out expr); - -#line 1863 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + ShiftExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } else if (la.kind == 150) { - lexer.NextToken(); - ShiftExpr( -#line 1866 "VBNET.ATG" -out expr); - -#line 1866 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, new UnaryOperatorExpression(expr, UnaryOperatorType.Not)); - } else SynErr(264); + Get(); + ShiftExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, new UnaryOperatorExpression(expr, UnaryOperatorType.Not)); + } else SynErr(262); } } - void ShiftExpr( -#line 1871 "VBNET.ATG" -out Expression outExpr) { - -#line 1873 "VBNET.ATG" + void ShiftExpr(out Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - ConcatenationExpr( -#line 1876 "VBNET.ATG" -out outExpr); + + ConcatenationExpr(out outExpr); while (la.kind == 32 || la.kind == 33) { if (la.kind == 32) { - lexer.NextToken(); - -#line 1879 "VBNET.ATG" - op = BinaryOperatorType.ShiftLeft; + Get(); + op = BinaryOperatorType.ShiftLeft; } else { - lexer.NextToken(); - -#line 1880 "VBNET.ATG" - op = BinaryOperatorType.ShiftRight; + Get(); + op = BinaryOperatorType.ShiftRight; } - ConcatenationExpr( -#line 1882 "VBNET.ATG" -out expr); - -#line 1882 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + ConcatenationExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void ConcatenationExpr( -#line 1886 "VBNET.ATG" -out Expression outExpr) { - -#line 1887 "VBNET.ATG" - Expression expr; - AdditiveExpr( -#line 1889 "VBNET.ATG" -out outExpr); + void ConcatenationExpr(out Expression outExpr) { + Expression expr; + AdditiveExpr(out outExpr); while (la.kind == 13) { - lexer.NextToken(); - AdditiveExpr( -#line 1889 "VBNET.ATG" -out expr); - -#line 1889 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Concat, expr); + Get(); + AdditiveExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Concat, expr); } } - void AdditiveExpr( -#line 1892 "VBNET.ATG" -out Expression outExpr) { - -#line 1894 "VBNET.ATG" + void AdditiveExpr(out Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - ModuloExpr( -#line 1897 "VBNET.ATG" -out outExpr); + + ModuloExpr(out outExpr); while (la.kind == 18 || la.kind == 19) { if (la.kind == 19) { - lexer.NextToken(); - -#line 1900 "VBNET.ATG" - op = BinaryOperatorType.Add; + Get(); + op = BinaryOperatorType.Add; } else { - lexer.NextToken(); - -#line 1901 "VBNET.ATG" - op = BinaryOperatorType.Subtract; + Get(); + op = BinaryOperatorType.Subtract; } - ModuloExpr( -#line 1903 "VBNET.ATG" -out expr); - -#line 1903 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + ModuloExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void ModuloExpr( -#line 1907 "VBNET.ATG" -out Expression outExpr) { - -#line 1908 "VBNET.ATG" - Expression expr; - IntegerDivisionExpr( -#line 1910 "VBNET.ATG" -out outExpr); + void ModuloExpr(out Expression outExpr) { + Expression expr; + IntegerDivisionExpr(out outExpr); while (la.kind == 140) { - lexer.NextToken(); - IntegerDivisionExpr( -#line 1910 "VBNET.ATG" -out expr); - -#line 1910 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Modulus, expr); + Get(); + IntegerDivisionExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Modulus, expr); } } - void IntegerDivisionExpr( -#line 1913 "VBNET.ATG" -out Expression outExpr) { - -#line 1914 "VBNET.ATG" - Expression expr; - MultiplicativeExpr( -#line 1916 "VBNET.ATG" -out outExpr); + void IntegerDivisionExpr(out Expression outExpr) { + Expression expr; + MultiplicativeExpr(out outExpr); while (la.kind == 15) { - lexer.NextToken(); - MultiplicativeExpr( -#line 1916 "VBNET.ATG" -out expr); - -#line 1916 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.DivideInteger, expr); + Get(); + MultiplicativeExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.DivideInteger, expr); } } - void MultiplicativeExpr( -#line 1919 "VBNET.ATG" -out Expression outExpr) { - -#line 1921 "VBNET.ATG" + void MultiplicativeExpr(out Expression outExpr) { Expression expr; BinaryOperatorType op = BinaryOperatorType.None; - - UnaryExpr( -#line 1924 "VBNET.ATG" -out outExpr); + + UnaryExpr(out outExpr); while (la.kind == 14 || la.kind == 22) { if (la.kind == 22) { - lexer.NextToken(); - -#line 1927 "VBNET.ATG" - op = BinaryOperatorType.Multiply; + Get(); + op = BinaryOperatorType.Multiply; } else { - lexer.NextToken(); - -#line 1928 "VBNET.ATG" - op = BinaryOperatorType.Divide; + Get(); + op = BinaryOperatorType.Divide; } - UnaryExpr( -#line 1930 "VBNET.ATG" -out expr); - -#line 1930 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, op, expr); + UnaryExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, op, expr); } } - void UnaryExpr( -#line 1934 "VBNET.ATG" -out Expression uExpr) { - -#line 1936 "VBNET.ATG" + void UnaryExpr(out Expression uExpr) { Expression expr; UnaryOperatorType uop = UnaryOperatorType.None; bool isUOp = false; - + while (la.kind == 18 || la.kind == 19 || la.kind == 22) { if (la.kind == 19) { - lexer.NextToken(); - -#line 1940 "VBNET.ATG" - uop = UnaryOperatorType.Plus; isUOp = true; + Get(); + uop = UnaryOperatorType.Plus; isUOp = true; } else if (la.kind == 18) { - lexer.NextToken(); - -#line 1941 "VBNET.ATG" - uop = UnaryOperatorType.Minus; isUOp = true; + Get(); + uop = UnaryOperatorType.Minus; isUOp = true; } else { - lexer.NextToken(); - -#line 1942 "VBNET.ATG" + Get(); uop = UnaryOperatorType.Dereference; isUOp = true; } } - ExponentiationExpr( -#line 1944 "VBNET.ATG" -out expr); - -#line 1946 "VBNET.ATG" + ExponentiationExpr(out expr); if (isUOp) { uExpr = new UnaryOperatorExpression(expr, uop); } else { uExpr = expr; } - - } - void ExponentiationExpr( -#line 1954 "VBNET.ATG" -out Expression outExpr) { + } -#line 1955 "VBNET.ATG" - Expression expr; - SimpleExpr( -#line 1957 "VBNET.ATG" -out outExpr); + void ExponentiationExpr(out Expression outExpr) { + Expression expr; + SimpleExpr(out outExpr); while (la.kind == 20) { - lexer.NextToken(); - SimpleExpr( -#line 1957 "VBNET.ATG" -out expr); - -#line 1957 "VBNET.ATG" - outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Power, expr); + Get(); + SimpleExpr(out expr); + outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Power, expr); } } - void NormalOrReDimArgumentList( -#line 2406 "VBNET.ATG" -out List arguments, out bool canBeNormal, out bool canBeRedim) { - -#line 2408 "VBNET.ATG" + void NormalOrReDimArgumentList(out List arguments, out bool canBeNormal, out bool canBeRedim) { arguments = new List(); canBeNormal = true; canBeRedim = !IsNamedAssign(); Expression expr = null; - + if (StartOf(29)) { - Argument( -#line 2413 "VBNET.ATG" -out expr); + Argument(out expr); if (la.kind == 201) { - lexer.NextToken(); - -#line 2414 "VBNET.ATG" - EnsureIsZero(expr); canBeNormal = false; - Expr( -#line 2415 "VBNET.ATG" -out expr); + Get(); + EnsureIsZero(expr); canBeNormal = false; + Expr(out expr); } } while (la.kind == 12) { - lexer.NextToken(); - -#line 2418 "VBNET.ATG" - if (expr == null) canBeRedim = false; - -#line 2419 "VBNET.ATG" - arguments.Add(expr ?? Expression.Null); expr = null; - -#line 2420 "VBNET.ATG" - canBeRedim &= !IsNamedAssign(); + Get(); + if (expr == null) canBeRedim = false; + arguments.Add(expr ?? Expression.Null); expr = null; + canBeRedim &= !IsNamedAssign(); if (StartOf(29)) { - Argument( -#line 2421 "VBNET.ATG" -out expr); + Argument(out expr); if (la.kind == 201) { - lexer.NextToken(); - -#line 2422 "VBNET.ATG" - EnsureIsZero(expr); canBeNormal = false; - Expr( -#line 2423 "VBNET.ATG" -out expr); + Get(); + EnsureIsZero(expr); canBeNormal = false; + Expr(out expr); } } - -#line 2425 "VBNET.ATG" - if (expr == null) { canBeRedim = false; expr = Expression.Null; } + if (expr == null) { canBeRedim = false; expr = Expression.Null; } } - -#line 2427 "VBNET.ATG" - if (expr != null) arguments.Add(expr); else canBeRedim = false; + if (expr != null) arguments.Add(expr); else canBeRedim = false; } - void ArrayTypeModifiers( -#line 2534 "VBNET.ATG" -out ArrayList arrayModifiers) { - -#line 2536 "VBNET.ATG" + void ArrayTypeModifiers(out ArrayList arrayModifiers) { arrayModifiers = new ArrayList(); int i = 0; - - while ( -#line 2539 "VBNET.ATG" -IsDims()) { + + while (IsDims()) { Expect(25); if (la.kind == 12 || la.kind == 26) { - RankList( -#line 2541 "VBNET.ATG" -out i); + RankList(out i); } - -#line 2543 "VBNET.ATG" arrayModifiers.Add(i); - + Expect(26); } - -#line 2548 "VBNET.ATG" if(arrayModifiers.Count == 0) { arrayModifiers = null; } - - } - void MemberInitializer( -#line 2373 "VBNET.ATG" -out MemberInitializerExpression memberInitializer) { + } -#line 2375 "VBNET.ATG" + void MemberInitializer(out MemberInitializerExpression memberInitializer) { memberInitializer = new MemberInitializerExpression(); memberInitializer.StartLocation = la.Location; Expression initExpr = null; bool isKey = false; string name = null; - + Expect(16); - IdentifierOrKeyword( -#line 2382 "VBNET.ATG" -out name); + IdentifierOrKeyword(out name); Expect(10); - Expr( -#line 2382 "VBNET.ATG" -out initExpr); - -#line 2384 "VBNET.ATG" + Expr(out initExpr); memberInitializer.Name = name; memberInitializer.Expression = initExpr; memberInitializer.IsKey = isKey; memberInitializer.EndLocation = t.EndLocation; - - } - void FromOrAggregateQueryOperator( -#line 2062 "VBNET.ATG" -List middleClauses) { + } -#line 2064 "VBNET.ATG" + void FromOrAggregateQueryOperator(List middleClauses) { QueryExpressionFromClause fromClause = null; QueryExpressionAggregateClause aggregateClause = null; - - if (la.kind == 113) { - FromQueryOperator( -#line 2067 "VBNET.ATG" -out fromClause); -#line 2068 "VBNET.ATG" - middleClauses.Add(fromClause); + if (la.kind == 113) { + FromQueryOperator(out fromClause); + middleClauses.Add(fromClause); } else if (la.kind == 45) { - AggregateQueryOperator( -#line 2069 "VBNET.ATG" -out aggregateClause); - -#line 2070 "VBNET.ATG" - middleClauses.Add(aggregateClause); - } else SynErr(265); + AggregateQueryOperator(out aggregateClause); + middleClauses.Add(aggregateClause); + } else SynErr(263); } - void QueryOperator( -#line 2073 "VBNET.ATG" -List middleClauses) { - -#line 2075 "VBNET.ATG" + void QueryOperator(List middleClauses) { QueryExpressionJoinVBClause joinClause = null; QueryExpressionGroupVBClause groupByClause = null; QueryExpressionPartitionVBClause partitionClause = null; QueryExpressionGroupJoinVBClause groupJoinClause = null; QueryExpressionFromClause fromClause = null; QueryExpressionAggregateClause aggregateClause = null; - - if (la.kind == 113) { - FromQueryOperator( -#line 2082 "VBNET.ATG" -out fromClause); -#line 2083 "VBNET.ATG" - middleClauses.Add(fromClause); + if (la.kind == 113) { + FromQueryOperator(out fromClause); + middleClauses.Add(fromClause); } else if (la.kind == 45) { - AggregateQueryOperator( -#line 2084 "VBNET.ATG" -out aggregateClause); - -#line 2085 "VBNET.ATG" - middleClauses.Add(aggregateClause); + AggregateQueryOperator(out aggregateClause); + middleClauses.Add(aggregateClause); } else if (la.kind == 182) { - SelectQueryOperator( -#line 2086 "VBNET.ATG" -middleClauses); + SelectQueryOperator(middleClauses); } else if (la.kind == 94) { - DistinctQueryOperator( -#line 2087 "VBNET.ATG" -middleClauses); + DistinctQueryOperator(middleClauses); } else if (la.kind == 215) { - WhereQueryOperator( -#line 2088 "VBNET.ATG" -middleClauses); + WhereQueryOperator(middleClauses); } else if (la.kind == 162) { - OrderByQueryOperator( -#line 2089 "VBNET.ATG" -middleClauses); + OrderByQueryOperator(middleClauses); } else if (la.kind == 188 || la.kind == 197) { - PartitionQueryOperator( -#line 2090 "VBNET.ATG" -out partitionClause); - -#line 2091 "VBNET.ATG" - middleClauses.Add(partitionClause); + PartitionQueryOperator(out partitionClause); + middleClauses.Add(partitionClause); } else if (la.kind == 134) { - LetQueryOperator( -#line 2092 "VBNET.ATG" -middleClauses); + LetQueryOperator(middleClauses); } else if (la.kind == 133) { - JoinQueryOperator( -#line 2093 "VBNET.ATG" -out joinClause); - -#line 2094 "VBNET.ATG" - middleClauses.Add(joinClause); - } else if ( -#line 2095 "VBNET.ATG" -la.kind == Tokens.Group && Peek(1).kind == Tokens.Join) { - GroupJoinQueryOperator( -#line 2095 "VBNET.ATG" -out groupJoinClause); - -#line 2096 "VBNET.ATG" - middleClauses.Add(groupJoinClause); + JoinQueryOperator(out joinClause); + middleClauses.Add(joinClause); + } else if (la.kind == Tokens.Group && Peek(1).kind == Tokens.Join) { + GroupJoinQueryOperator(out groupJoinClause); + middleClauses.Add(groupJoinClause); } else if (la.kind == 120) { - GroupByQueryOperator( -#line 2097 "VBNET.ATG" -out groupByClause); - -#line 2098 "VBNET.ATG" - middleClauses.Add(groupByClause); - } else SynErr(266); + GroupByQueryOperator(out groupByClause); + middleClauses.Add(groupByClause); + } else SynErr(264); } - void FromQueryOperator( -#line 2173 "VBNET.ATG" -out QueryExpressionFromClause fromClause) { - -#line 2175 "VBNET.ATG" + void FromQueryOperator(out QueryExpressionFromClause fromClause) { fromClause = new QueryExpressionFromClause(); fromClause.StartLocation = la.Location; - - Expect(113); - CollectionRangeVariableDeclarationList( -#line 2178 "VBNET.ATG" -fromClause.Sources); -#line 2180 "VBNET.ATG" + Expect(113); + CollectionRangeVariableDeclarationList(fromClause.Sources); fromClause.EndLocation = t.EndLocation; - - } - void AggregateQueryOperator( -#line 2242 "VBNET.ATG" -out QueryExpressionAggregateClause aggregateClause) { + } -#line 2244 "VBNET.ATG" + void AggregateQueryOperator(out QueryExpressionAggregateClause aggregateClause) { aggregateClause = new QueryExpressionAggregateClause(); aggregateClause.IntoVariables = new List(); aggregateClause.StartLocation = la.Location; CollectionRangeVariable source; - - Expect(45); - CollectionRangeVariableDeclaration( -#line 2249 "VBNET.ATG" -out source); -#line 2251 "VBNET.ATG" + Expect(45); + CollectionRangeVariableDeclaration(out source); aggregateClause.Source = source; - + while (StartOf(30)) { - QueryOperator( -#line 2254 "VBNET.ATG" -aggregateClause.MiddleClauses); + QueryOperator(aggregateClause.MiddleClauses); } Expect(130); - ExpressionRangeVariableDeclarationList( -#line 2256 "VBNET.ATG" -aggregateClause.IntoVariables); - -#line 2258 "VBNET.ATG" + ExpressionRangeVariableDeclarationList(aggregateClause.IntoVariables); aggregateClause.EndLocation = t.EndLocation; - - } - void SelectQueryOperator( -#line 2184 "VBNET.ATG" -List middleClauses) { + } -#line 2186 "VBNET.ATG" + void SelectQueryOperator(List middleClauses) { QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause(); selectClause.StartLocation = la.Location; - - Expect(182); - ExpressionRangeVariableDeclarationList( -#line 2189 "VBNET.ATG" -selectClause.Variables); -#line 2191 "VBNET.ATG" + Expect(182); + ExpressionRangeVariableDeclarationList(selectClause.Variables); selectClause.EndLocation = t.Location; middleClauses.Add(selectClause); - - } - void DistinctQueryOperator( -#line 2196 "VBNET.ATG" -List middleClauses) { + } -#line 2198 "VBNET.ATG" + void DistinctQueryOperator(List middleClauses) { QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause(); distinctClause.StartLocation = la.Location; - - Expect(94); -#line 2203 "VBNET.ATG" + Expect(94); distinctClause.EndLocation = t.EndLocation; middleClauses.Add(distinctClause); - - } - void WhereQueryOperator( -#line 2208 "VBNET.ATG" -List middleClauses) { + } -#line 2210 "VBNET.ATG" + void WhereQueryOperator(List middleClauses) { QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause(); whereClause.StartLocation = la.Location; Expression operand = null; - - Expect(215); - Expr( -#line 2214 "VBNET.ATG" -out operand); -#line 2216 "VBNET.ATG" + Expect(215); + Expr(out operand); whereClause.Condition = operand; whereClause.EndLocation = t.EndLocation; - + middleClauses.Add(whereClause); - - } - void OrderByQueryOperator( -#line 2101 "VBNET.ATG" -List middleClauses) { + } -#line 2103 "VBNET.ATG" + void OrderByQueryOperator(List middleClauses) { QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause(); orderClause.StartLocation = la.Location; List orderings = null; - + Expect(162); Expect(57); - OrderExpressionList( -#line 2107 "VBNET.ATG" -out orderings); - -#line 2109 "VBNET.ATG" + OrderExpressionList(out orderings); orderClause.Orderings = orderings; orderClause.EndLocation = t.EndLocation; middleClauses.Add(orderClause); - - } - void PartitionQueryOperator( -#line 2223 "VBNET.ATG" -out QueryExpressionPartitionVBClause partitionClause) { + } -#line 2225 "VBNET.ATG" + void PartitionQueryOperator(out QueryExpressionPartitionVBClause partitionClause) { partitionClause = new QueryExpressionPartitionVBClause(); partitionClause.StartLocation = la.Location; Expression expr = null; - - if (la.kind == 197) { - lexer.NextToken(); -#line 2230 "VBNET.ATG" - partitionClause.PartitionType = QueryExpressionPartitionType.Take; + if (la.kind == 197) { + Get(); + partitionClause.PartitionType = QueryExpressionPartitionType.Take; if (la.kind == 216) { - lexer.NextToken(); - -#line 2231 "VBNET.ATG" - partitionClause.PartitionType = QueryExpressionPartitionType.TakeWhile; + Get(); + partitionClause.PartitionType = QueryExpressionPartitionType.TakeWhile; } } else if (la.kind == 188) { - lexer.NextToken(); - -#line 2232 "VBNET.ATG" - partitionClause.PartitionType = QueryExpressionPartitionType.Skip; + Get(); + partitionClause.PartitionType = QueryExpressionPartitionType.Skip; if (la.kind == 216) { - lexer.NextToken(); - -#line 2233 "VBNET.ATG" - partitionClause.PartitionType = QueryExpressionPartitionType.SkipWhile; + Get(); + partitionClause.PartitionType = QueryExpressionPartitionType.SkipWhile; } - } else SynErr(267); - Expr( -#line 2235 "VBNET.ATG" -out expr); - -#line 2237 "VBNET.ATG" + } else SynErr(265); + Expr(out expr); partitionClause.Expression = expr; partitionClause.EndLocation = t.EndLocation; - - } - void LetQueryOperator( -#line 2262 "VBNET.ATG" -List middleClauses) { + } -#line 2264 "VBNET.ATG" + void LetQueryOperator(List middleClauses) { QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause(); letClause.StartLocation = la.Location; - - Expect(134); - ExpressionRangeVariableDeclarationList( -#line 2267 "VBNET.ATG" -letClause.Variables); -#line 2269 "VBNET.ATG" + Expect(134); + ExpressionRangeVariableDeclarationList(letClause.Variables); letClause.EndLocation = t.EndLocation; middleClauses.Add(letClause); - - } - void JoinQueryOperator( -#line 2306 "VBNET.ATG" -out QueryExpressionJoinVBClause joinClause) { + } -#line 2308 "VBNET.ATG" + void JoinQueryOperator(out QueryExpressionJoinVBClause joinClause) { joinClause = new QueryExpressionJoinVBClause(); joinClause.StartLocation = la.Location; CollectionRangeVariable joinVariable = null; QueryExpressionJoinVBClause subJoin = null; QueryExpressionJoinConditionVB condition = null; - - - Expect(133); - CollectionRangeVariableDeclaration( -#line 2315 "VBNET.ATG" -out joinVariable); -#line 2316 "VBNET.ATG" - joinClause.JoinVariable = joinVariable; - if (la.kind == 133) { - JoinQueryOperator( -#line 2318 "VBNET.ATG" -out subJoin); -#line 2319 "VBNET.ATG" - joinClause.SubJoin = subJoin; + Expect(133); + CollectionRangeVariableDeclaration(out joinVariable); + joinClause.JoinVariable = joinVariable; + if (la.kind == 133) { + JoinQueryOperator(out subJoin); + joinClause.SubJoin = subJoin; } Expect(157); - JoinCondition( -#line 2322 "VBNET.ATG" -out condition); - -#line 2323 "VBNET.ATG" - SafeAdd(joinClause, joinClause.Conditions, condition); + JoinCondition(out condition); + SafeAdd(joinClause, joinClause.Conditions, condition); while (la.kind == 47) { - lexer.NextToken(); - JoinCondition( -#line 2325 "VBNET.ATG" -out condition); - -#line 2326 "VBNET.ATG" - SafeAdd(joinClause, joinClause.Conditions, condition); + Get(); + JoinCondition(out condition); + SafeAdd(joinClause, joinClause.Conditions, condition); } - -#line 2329 "VBNET.ATG" joinClause.EndLocation = t.EndLocation; - - } - void GroupJoinQueryOperator( -#line 2159 "VBNET.ATG" -out QueryExpressionGroupJoinVBClause groupJoinClause) { + } -#line 2161 "VBNET.ATG" + void GroupJoinQueryOperator(out QueryExpressionGroupJoinVBClause groupJoinClause) { groupJoinClause = new QueryExpressionGroupJoinVBClause(); groupJoinClause.StartLocation = la.Location; QueryExpressionJoinVBClause joinClause = null; - + Expect(120); - JoinQueryOperator( -#line 2165 "VBNET.ATG" -out joinClause); + JoinQueryOperator(out joinClause); Expect(130); - ExpressionRangeVariableDeclarationList( -#line 2166 "VBNET.ATG" -groupJoinClause.IntoVariables); - -#line 2168 "VBNET.ATG" + ExpressionRangeVariableDeclarationList(groupJoinClause.IntoVariables); groupJoinClause.JoinClause = joinClause; groupJoinClause.EndLocation = t.EndLocation; - - } - void GroupByQueryOperator( -#line 2146 "VBNET.ATG" -out QueryExpressionGroupVBClause groupByClause) { + } -#line 2148 "VBNET.ATG" + void GroupByQueryOperator(out QueryExpressionGroupVBClause groupByClause) { groupByClause = new QueryExpressionGroupVBClause(); groupByClause.StartLocation = la.Location; - + Expect(120); - ExpressionRangeVariableDeclarationList( -#line 2151 "VBNET.ATG" -groupByClause.GroupVariables); + ExpressionRangeVariableDeclarationList(groupByClause.GroupVariables); Expect(57); - ExpressionRangeVariableDeclarationList( -#line 2152 "VBNET.ATG" -groupByClause.ByVariables); + ExpressionRangeVariableDeclarationList(groupByClause.ByVariables); Expect(130); - ExpressionRangeVariableDeclarationList( -#line 2153 "VBNET.ATG" -groupByClause.IntoVariables); - -#line 2155 "VBNET.ATG" + ExpressionRangeVariableDeclarationList(groupByClause.IntoVariables); groupByClause.EndLocation = t.EndLocation; - - } - void OrderExpressionList( -#line 2115 "VBNET.ATG" -out List orderings) { + } -#line 2117 "VBNET.ATG" + void OrderExpressionList(out List orderings) { orderings = new List(); QueryExpressionOrdering ordering = null; - - OrderExpression( -#line 2120 "VBNET.ATG" -out ordering); -#line 2121 "VBNET.ATG" - orderings.Add(ordering); + OrderExpression(out ordering); + orderings.Add(ordering); while (la.kind == 12) { - lexer.NextToken(); - OrderExpression( -#line 2123 "VBNET.ATG" -out ordering); - -#line 2124 "VBNET.ATG" - orderings.Add(ordering); + Get(); + OrderExpression(out ordering); + orderings.Add(ordering); } } - void OrderExpression( -#line 2128 "VBNET.ATG" -out QueryExpressionOrdering ordering) { - -#line 2130 "VBNET.ATG" + void OrderExpression(out QueryExpressionOrdering ordering) { ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location; ordering.Direction = QueryExpressionOrderingDirection.None; Expression orderExpr = null; - - Expr( -#line 2135 "VBNET.ATG" -out orderExpr); -#line 2137 "VBNET.ATG" + Expr(out orderExpr); ordering.Criteria = orderExpr; - + if (la.kind == 51 || la.kind == 91) { if (la.kind == 51) { - lexer.NextToken(); - -#line 2140 "VBNET.ATG" - ordering.Direction = QueryExpressionOrderingDirection.Ascending; + Get(); + ordering.Direction = QueryExpressionOrderingDirection.Ascending; } else { - lexer.NextToken(); - -#line 2141 "VBNET.ATG" - ordering.Direction = QueryExpressionOrderingDirection.Descending; + Get(); + ordering.Direction = QueryExpressionOrderingDirection.Descending; } } - -#line 2143 "VBNET.ATG" - ordering.EndLocation = t.EndLocation; + ordering.EndLocation = t.EndLocation; } - void ExpressionRangeVariableDeclarationList( -#line 2274 "VBNET.ATG" -List variables) { - -#line 2276 "VBNET.ATG" + void ExpressionRangeVariableDeclarationList(List variables) { ExpressionRangeVariable variable = null; - - ExpressionRangeVariableDeclaration( -#line 2278 "VBNET.ATG" -out variable); -#line 2279 "VBNET.ATG" - variables.Add(variable); + ExpressionRangeVariableDeclaration(out variable); + variables.Add(variable); while (la.kind == 12) { - lexer.NextToken(); - ExpressionRangeVariableDeclaration( -#line 2280 "VBNET.ATG" -out variable); - -#line 2280 "VBNET.ATG" - variables.Add(variable); + Get(); + ExpressionRangeVariableDeclaration(out variable); + variables.Add(variable); } } - void CollectionRangeVariableDeclarationList( -#line 2333 "VBNET.ATG" -List rangeVariables) { - -#line 2334 "VBNET.ATG" - CollectionRangeVariable variableDeclaration; - CollectionRangeVariableDeclaration( -#line 2336 "VBNET.ATG" -out variableDeclaration); - -#line 2337 "VBNET.ATG" - rangeVariables.Add(variableDeclaration); + void CollectionRangeVariableDeclarationList(List rangeVariables) { + CollectionRangeVariable variableDeclaration; + CollectionRangeVariableDeclaration(out variableDeclaration); + rangeVariables.Add(variableDeclaration); while (la.kind == 12) { - lexer.NextToken(); - CollectionRangeVariableDeclaration( -#line 2338 "VBNET.ATG" -out variableDeclaration); - -#line 2338 "VBNET.ATG" - rangeVariables.Add(variableDeclaration); + Get(); + CollectionRangeVariableDeclaration(out variableDeclaration); + rangeVariables.Add(variableDeclaration); } } - void CollectionRangeVariableDeclaration( -#line 2341 "VBNET.ATG" -out CollectionRangeVariable rangeVariable) { - -#line 2343 "VBNET.ATG" + void CollectionRangeVariableDeclaration(out CollectionRangeVariable rangeVariable) { rangeVariable = new CollectionRangeVariable(); rangeVariable.StartLocation = la.Location; TypeReference typeName = null; Expression inExpr = null; - - Identifier(); -#line 2348 "VBNET.ATG" - rangeVariable.Identifier = t.val; + Identifier(); + rangeVariable.Identifier = t.val; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 2349 "VBNET.ATG" -out typeName); - -#line 2349 "VBNET.ATG" - rangeVariable.Type = typeName; + Get(); + TypeName(out typeName); + rangeVariable.Type = typeName; } Expect(125); - Expr( -#line 2350 "VBNET.ATG" -out inExpr); - -#line 2352 "VBNET.ATG" + Expr(out inExpr); rangeVariable.Expression = inExpr; rangeVariable.EndLocation = t.EndLocation; - - } - void ExpressionRangeVariableDeclaration( -#line 2283 "VBNET.ATG" -out ExpressionRangeVariable variable) { + } -#line 2285 "VBNET.ATG" + void ExpressionRangeVariableDeclaration(out ExpressionRangeVariable variable) { variable = new ExpressionRangeVariable(); variable.StartLocation = la.Location; Expression rhs = null; TypeReference typeName = null; - - if ( -#line 2291 "VBNET.ATG" -IsIdentifiedExpressionRange()) { - Identifier(); -#line 2292 "VBNET.ATG" - variable.Identifier = t.val; + if (IsIdentifiedExpressionRange()) { + Identifier(); + variable.Identifier = t.val; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 2294 "VBNET.ATG" -out typeName); - -#line 2295 "VBNET.ATG" - variable.Type = typeName; + Get(); + TypeName(out typeName); + variable.Type = typeName; } Expect(10); } - Expr( -#line 2299 "VBNET.ATG" -out rhs); - -#line 2301 "VBNET.ATG" + Expr(out rhs); variable.Expression = rhs; variable.EndLocation = t.EndLocation; - - } - void JoinCondition( -#line 2357 "VBNET.ATG" -out QueryExpressionJoinConditionVB condition) { + } -#line 2359 "VBNET.ATG" + void JoinCondition(out QueryExpressionJoinConditionVB condition) { condition = new QueryExpressionJoinConditionVB(); condition.StartLocation = la.Location; - + Expression lhs = null; Expression rhs = null; - - Expr( -#line 2365 "VBNET.ATG" -out lhs); - Expect(103); - Expr( -#line 2365 "VBNET.ATG" -out rhs); -#line 2367 "VBNET.ATG" + Expr(out lhs); + Expect(103); + Expr(out rhs); condition.LeftSide = lhs; condition.RightSide = rhs; condition.EndLocation = t.EndLocation; - - } - void Argument( -#line 2431 "VBNET.ATG" -out Expression argumentexpr) { + } -#line 2433 "VBNET.ATG" + void Argument(out Expression argumentexpr) { Expression expr; argumentexpr = null; string name; - - if ( -#line 2437 "VBNET.ATG" -IsNamedAssign()) { - Identifier(); -#line 2437 "VBNET.ATG" - name = t.val; + if (IsNamedAssign()) { + Identifier(); + name = t.val; Expect(11); Expect(10); - Expr( -#line 2437 "VBNET.ATG" -out expr); - -#line 2439 "VBNET.ATG" + Expr(out expr); argumentexpr = new NamedArgumentExpression(name, expr); - + } else if (StartOf(29)) { - Expr( -#line 2442 "VBNET.ATG" -out argumentexpr); - } else SynErr(268); - } - - void QualIdentAndTypeArguments( -#line 2508 "VBNET.ATG" -out TypeReference typeref, bool canBeUnbound) { - -#line 2509 "VBNET.ATG" - string name; typeref = null; - Qualident( -#line 2511 "VBNET.ATG" -out name); - -#line 2512 "VBNET.ATG" - typeref = new TypeReference(name); - if ( -#line 2513 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { - lexer.NextToken(); - Expect(155); - if ( -#line 2515 "VBNET.ATG" -canBeUnbound && (la.kind == Tokens.CloseParenthesis || la.kind == Tokens.Comma)) { + Expr(out argumentexpr); + } else SynErr(266); + } -#line 2516 "VBNET.ATG" - typeref.GenericTypes.Add(NullTypeReference.Instance); + void QualIdentAndTypeArguments(out TypeReference typeref, bool canBeUnbound) { + string name; typeref = null; + Qualident(out name); + typeref = new TypeReference(name); + if (la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { + Expect(25); + Expect(155); + if (canBeUnbound && (la.kind == Tokens.CloseParenthesis || la.kind == Tokens.Comma)) { + typeref.GenericTypes.Add(NullTypeReference.Instance); while (la.kind == 12) { - lexer.NextToken(); - -#line 2517 "VBNET.ATG" - typeref.GenericTypes.Add(NullTypeReference.Instance); + Get(); + typeref.GenericTypes.Add(NullTypeReference.Instance); } } else if (StartOf(8)) { - TypeArgumentList( -#line 2518 "VBNET.ATG" -typeref.GenericTypes); - } else SynErr(269); + TypeArgumentList(typeref.GenericTypes); + } else SynErr(267); Expect(26); } } - void RankList( -#line 2555 "VBNET.ATG" -out int i) { - -#line 2556 "VBNET.ATG" - i = 0; + void RankList(out int i) { + i = 0; while (la.kind == 12) { - lexer.NextToken(); - -#line 2557 "VBNET.ATG" - ++i; + Get(); + ++i; } } - void Attribute( -#line 2596 "VBNET.ATG" -out ASTAttribute attribute) { - -#line 2597 "VBNET.ATG" + void Attribute(out ASTAttribute attribute) { string name; List positional = new List(); List named = new List(); - + if (la.kind == 117) { - lexer.NextToken(); + Get(); Expect(16); } - Qualident( -#line 2602 "VBNET.ATG" -out name); + Qualident(out name); if (la.kind == 25) { - AttributeArguments( -#line 2603 "VBNET.ATG" -positional, named); + AttributeArguments(positional, named); } - -#line 2605 "VBNET.ATG" attribute = new ASTAttribute(name, positional, named); - - } - void AttributeArguments( -#line 2610 "VBNET.ATG" -List positional, List named) { + } -#line 2612 "VBNET.ATG" + void AttributeArguments(List positional, List named) { bool nameFound = false; string name = ""; Expression expr; - + Expect(25); - if ( -#line 2618 "VBNET.ATG" -IsNotClosingParenthesis()) { - if ( -#line 2620 "VBNET.ATG" -IsNamedAssign()) { - -#line 2620 "VBNET.ATG" - nameFound = true; - IdentifierOrKeyword( -#line 2621 "VBNET.ATG" -out name); + if (IsNotClosingParenthesis()) { + if (IsNamedAssign()) { + nameFound = true; + IdentifierOrKeyword(out name); if (la.kind == 11) { - lexer.NextToken(); + Get(); } Expect(10); } - Expr( -#line 2623 "VBNET.ATG" -out expr); - -#line 2625 "VBNET.ATG" + Expr(out expr); if (expr != null) { if (string.IsNullOrEmpty(name)) { positional.Add(expr); } else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; } } - + while (la.kind == 12) { - lexer.NextToken(); - if ( -#line 2633 "VBNET.ATG" -IsNamedAssign()) { - -#line 2633 "VBNET.ATG" - nameFound = true; - IdentifierOrKeyword( -#line 2634 "VBNET.ATG" -out name); + Get(); + if (IsNamedAssign()) { + nameFound = true; + IdentifierOrKeyword(out name); if (la.kind == 11) { - lexer.NextToken(); + Get(); } Expect(10); } else if (StartOf(29)) { - -#line 2636 "VBNET.ATG" - if (nameFound) Error("no positional argument after named argument"); - } else SynErr(270); - Expr( -#line 2637 "VBNET.ATG" -out expr); - -#line 2637 "VBNET.ATG" + if (nameFound) Error("no positional argument after named argument"); + } else SynErr(268); + Expr(out expr); if (expr != null) { if(name == "") positional.Add(expr); else { named.Add(new NamedArgumentExpression(name, expr)); name = ""; } } - + } } Expect(26); } - void FormalParameter( -#line 2694 "VBNET.ATG" -out ParameterDeclarationExpression p) { - -#line 2696 "VBNET.ATG" + void FormalParameter(out ParameterDeclarationExpression p) { AttributeSection section; List attributes = new List(); TypeReference type = null; @@ -5755,39 +3741,23 @@ out ParameterDeclarationExpression p) { Expression expr = null; p = null; ArrayList arrayModifiers = null; - - while (la.kind == 28) { - AttributeSection( -#line 2705 "VBNET.ATG" -out section); -#line 2705 "VBNET.ATG" - attributes.Add(section); + while (la.kind == 28) { + AttributeSection(out section); + attributes.Add(section); } while (StartOf(34)) { - ParameterModifier( -#line 2706 "VBNET.ATG" -mod); + ParameterModifier(mod); } Identifier(); - -#line 2707 "VBNET.ATG" - string parameterName = t.val; - if ( -#line 2708 "VBNET.ATG" -IsDims()) { - ArrayTypeModifiers( -#line 2708 "VBNET.ATG" -out arrayModifiers); + string parameterName = t.val; + if (IsDims()) { + ArrayTypeModifiers(out arrayModifiers); } if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 2709 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } - -#line 2711 "VBNET.ATG" if(type != null) { if (arrayModifiers != null) { if (type.RankSpecifier != null) { @@ -5799,391 +3769,245 @@ out type); } else { type = new TypeReference("System.Object", arrayModifiers == null ? null : (int[])arrayModifiers.ToArray(typeof(int))); } - + if (la.kind == 10) { - lexer.NextToken(); - Expr( -#line 2723 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); } - -#line 2725 "VBNET.ATG" mod.Check(); p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr); p.Attributes = attributes; - + } - void ParameterModifier( -#line 3407 "VBNET.ATG" -ParamModifierList m) { + void ParameterModifier(ParamModifierList m) { if (la.kind == 59) { - lexer.NextToken(); - -#line 3408 "VBNET.ATG" - m.Add(ParameterModifiers.In); + Get(); + m.Add(ParameterModifiers.In); } else if (la.kind == 56) { - lexer.NextToken(); - -#line 3409 "VBNET.ATG" - m.Add(ParameterModifiers.Ref); + Get(); + m.Add(ParameterModifiers.Ref); } else if (la.kind == 160) { - lexer.NextToken(); - -#line 3410 "VBNET.ATG" - m.Add(ParameterModifiers.Optional); + Get(); + m.Add(ParameterModifiers.Optional); } else if (la.kind == 167) { - lexer.NextToken(); - -#line 3411 "VBNET.ATG" - m.Add(ParameterModifiers.Params); - } else SynErr(271); + Get(); + m.Add(ParameterModifiers.Params); + } else SynErr(269); } void Statement() { - -#line 2754 "VBNET.ATG" Statement stmt = null; Location startPos = la.Location; string label = String.Empty; - - + + if (la.kind == 1 || la.kind == 11) { - } else if ( -#line 2760 "VBNET.ATG" -IsLabel()) { - LabelName( -#line 2760 "VBNET.ATG" -out label); - -#line 2762 "VBNET.ATG" + } else if (IsLabel()) { + LabelName(out label); compilationUnit.AddChild(new LabelStatement(t.val)); - + Expect(11); Statement(); } else if (StartOf(35)) { - EmbeddedStatement( -#line 2765 "VBNET.ATG" -out stmt); - -#line 2765 "VBNET.ATG" - compilationUnit.AddChild(stmt); - } else SynErr(272); - -#line 2768 "VBNET.ATG" + EmbeddedStatement(out stmt); + compilationUnit.AddChild(stmt); + } else SynErr(270); if (stmt != null) { stmt.StartLocation = startPos; stmt.EndLocation = t.Location; } - - } - void LabelName( -#line 3183 "VBNET.ATG" -out string name) { + } -#line 3185 "VBNET.ATG" + void LabelName(out string name) { name = String.Empty; - + if (StartOf(4)) { Identifier(); - -#line 3187 "VBNET.ATG" - name = t.val; + name = t.val; } else if (la.kind == 5) { - lexer.NextToken(); - -#line 3188 "VBNET.ATG" - name = t.val; - } else SynErr(273); + Get(); + name = t.val; + } else SynErr(271); } - void EmbeddedStatement( -#line 2807 "VBNET.ATG" -out Statement statement) { - -#line 2809 "VBNET.ATG" + void EmbeddedStatement(out Statement statement) { Statement embeddedStatement = null; statement = null; Expression expr = null; string name = String.Empty; List p = null; - - if (la.kind == 107) { - lexer.NextToken(); -#line 2815 "VBNET.ATG" - ExitType exitType = ExitType.None; + if (la.kind == 107) { + Get(); + ExitType exitType = ExitType.None; switch (la.kind) { case 195: { - lexer.NextToken(); - -#line 2817 "VBNET.ATG" - exitType = ExitType.Sub; + Get(); + exitType = ExitType.Sub; break; } case 114: { - lexer.NextToken(); - -#line 2819 "VBNET.ATG" - exitType = ExitType.Function; + Get(); + exitType = ExitType.Function; break; } case 171: { - lexer.NextToken(); - -#line 2821 "VBNET.ATG" - exitType = ExitType.Property; + Get(); + exitType = ExitType.Property; break; } case 95: { - lexer.NextToken(); - -#line 2823 "VBNET.ATG" - exitType = ExitType.Do; + Get(); + exitType = ExitType.Do; break; } case 111: { - lexer.NextToken(); - -#line 2825 "VBNET.ATG" - exitType = ExitType.For; + Get(); + exitType = ExitType.For; break; } case 203: { - lexer.NextToken(); - -#line 2827 "VBNET.ATG" - exitType = ExitType.Try; + Get(); + exitType = ExitType.Try; break; } case 216: { - lexer.NextToken(); - -#line 2829 "VBNET.ATG" - exitType = ExitType.While; + Get(); + exitType = ExitType.While; break; } case 182: { - lexer.NextToken(); - -#line 2831 "VBNET.ATG" - exitType = ExitType.Select; + Get(); + exitType = ExitType.Select; break; } - default: SynErr(274); break; + default: SynErr(272); break; } - -#line 2833 "VBNET.ATG" - statement = new ExitStatement(exitType); + statement = new ExitStatement(exitType); } else if (la.kind == 203) { - TryStatement( -#line 2834 "VBNET.ATG" -out statement); + TryStatement(out statement); } else if (la.kind == 76) { - lexer.NextToken(); - -#line 2835 "VBNET.ATG" - ContinueType continueType = ContinueType.None; + Get(); + ContinueType continueType = ContinueType.None; if (la.kind == 95 || la.kind == 111 || la.kind == 216) { if (la.kind == 95) { - lexer.NextToken(); - -#line 2835 "VBNET.ATG" - continueType = ContinueType.Do; + Get(); + continueType = ContinueType.Do; } else if (la.kind == 111) { - lexer.NextToken(); - -#line 2835 "VBNET.ATG" - continueType = ContinueType.For; + Get(); + continueType = ContinueType.For; } else { - lexer.NextToken(); - -#line 2835 "VBNET.ATG" - continueType = ContinueType.While; + Get(); + continueType = ContinueType.While; } } - -#line 2835 "VBNET.ATG" - statement = new ContinueStatement(continueType); + statement = new ContinueStatement(continueType); } else if (la.kind == 200) { - lexer.NextToken(); + Get(); if (StartOf(29)) { - Expr( -#line 2837 "VBNET.ATG" -out expr); + Expr(out expr); } - -#line 2837 "VBNET.ATG" - statement = new ThrowStatement(expr); + statement = new ThrowStatement(expr); } else if (la.kind == 180) { - lexer.NextToken(); + Get(); if (StartOf(29)) { - Expr( -#line 2839 "VBNET.ATG" -out expr); + Expr(out expr); } - -#line 2839 "VBNET.ATG" - statement = new ReturnStatement(expr); + statement = new ReturnStatement(expr); } else if (la.kind == 196) { - lexer.NextToken(); - Expr( -#line 2841 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); EndOfStmt(); - Block( -#line 2841 "VBNET.ATG" -out embeddedStatement); + Block(out embeddedStatement); Expect(100); Expect(196); - -#line 2842 "VBNET.ATG" - statement = new LockStatement(expr, embeddedStatement); + statement = new LockStatement(expr, embeddedStatement); } else if (la.kind == 174) { - lexer.NextToken(); + Get(); Identifier(); - -#line 2844 "VBNET.ATG" - name = t.val; + name = t.val; if (la.kind == 25) { - lexer.NextToken(); + Get(); if (StartOf(36)) { - ArgumentList( -#line 2845 "VBNET.ATG" -out p); + ArgumentList(out p); } Expect(26); } - -#line 2847 "VBNET.ATG" statement = new RaiseEventStatement(name, p); - + } else if (la.kind == 218) { - WithStatement( -#line 2850 "VBNET.ATG" -out statement); + WithStatement(out statement); } else if (la.kind == 43) { - lexer.NextToken(); - -#line 2852 "VBNET.ATG" - Expression handlerExpr = null; - Expr( -#line 2853 "VBNET.ATG" -out expr); + Get(); + Expression handlerExpr = null; + Expr(out expr); Expect(12); - Expr( -#line 2853 "VBNET.ATG" -out handlerExpr); - -#line 2855 "VBNET.ATG" + Expr(out handlerExpr); statement = new AddHandlerStatement(expr, handlerExpr); - - } else if (la.kind == 178) { - lexer.NextToken(); -#line 2858 "VBNET.ATG" - Expression handlerExpr = null; - Expr( -#line 2859 "VBNET.ATG" -out expr); + } else if (la.kind == 178) { + Get(); + Expression handlerExpr = null; + Expr(out expr); Expect(12); - Expr( -#line 2859 "VBNET.ATG" -out handlerExpr); - -#line 2861 "VBNET.ATG" + Expr(out handlerExpr); statement = new RemoveHandlerStatement(expr, handlerExpr); - + } else if (la.kind == 216) { - lexer.NextToken(); - Expr( -#line 2864 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); EndOfStmt(); - Block( -#line 2865 "VBNET.ATG" -out embeddedStatement); + Block(out embeddedStatement); Expect(100); Expect(216); - -#line 2867 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start); - - } else if (la.kind == 95) { - lexer.NextToken(); -#line 2872 "VBNET.ATG" + } else if (la.kind == 95) { + Get(); ConditionType conditionType = ConditionType.None; - + if (la.kind == 209 || la.kind == 216) { - WhileOrUntil( -#line 2875 "VBNET.ATG" -out conditionType); - Expr( -#line 2875 "VBNET.ATG" -out expr); + WhileOrUntil(out conditionType); + Expr(out expr); EndOfStmt(); - Block( -#line 2876 "VBNET.ATG" -out embeddedStatement); + Block(out embeddedStatement); Expect(138); - -#line 2879 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType == ConditionType.While ? ConditionType.DoWhile : conditionType, ConditionPosition.Start); - + } else if (la.kind == 1 || la.kind == 11) { EndOfStmt(); - Block( -#line 2886 "VBNET.ATG" -out embeddedStatement); + Block(out embeddedStatement); Expect(138); if (la.kind == 209 || la.kind == 216) { - WhileOrUntil( -#line 2887 "VBNET.ATG" -out conditionType); - Expr( -#line 2887 "VBNET.ATG" -out expr); + WhileOrUntil(out conditionType); + Expr(out expr); } - -#line 2889 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End); - - } else SynErr(275); - } else if (la.kind == 111) { - lexer.NextToken(); -#line 2894 "VBNET.ATG" + } else SynErr(273); + } else if (la.kind == 111) { + Get(); Expression group = null; TypeReference typeReference; string typeName; Location startLocation = t.Location; - + if (la.kind == 97) { - lexer.NextToken(); - LoopControlVariable( -#line 2901 "VBNET.ATG" -out typeReference, out typeName); + Get(); + LoopControlVariable(out typeReference, out typeName); Expect(125); - Expr( -#line 2902 "VBNET.ATG" -out group); + Expr(out group); EndOfStmt(); - Block( -#line 2903 "VBNET.ATG" -out embeddedStatement); + Block(out embeddedStatement); Expect(149); if (StartOf(29)) { - Expr( -#line 2904 "VBNET.ATG" -out expr); + Expr(out expr); } - -#line 2906 "VBNET.ATG" statement = new ForeachStatement(typeReference, typeName, group, @@ -6191,72 +4015,44 @@ out expr); expr); statement.StartLocation = startLocation; statement.EndLocation = t.EndLocation; - - - } else if (StartOf(37)) { -#line 2917 "VBNET.ATG" + + } else if (StartOf(37)) { Expression start = null; Expression end = null; Expression step = null; Expression variableExpr = null; Expression nextExpr = null; List nextExpressions = null; - - if ( -#line 2924 "VBNET.ATG" -IsLoopVariableDeclaration()) { - LoopControlVariable( -#line 2925 "VBNET.ATG" -out typeReference, out typeName); - } else { -#line 2927 "VBNET.ATG" - typeReference = null; typeName = null; - SimpleExpr( -#line 2928 "VBNET.ATG" -out variableExpr); + if (IsLoopVariableDeclaration()) { + LoopControlVariable(out typeReference, out typeName); + } else { + typeReference = null; typeName = null; + SimpleExpr(out variableExpr); } Expect(10); - Expr( -#line 2930 "VBNET.ATG" -out start); + Expr(out start); Expect(201); - Expr( -#line 2930 "VBNET.ATG" -out end); + Expr(out end); if (la.kind == 190) { - lexer.NextToken(); - Expr( -#line 2930 "VBNET.ATG" -out step); + Get(); + Expr(out step); } EndOfStmt(); - Block( -#line 2931 "VBNET.ATG" -out embeddedStatement); + Block(out embeddedStatement); Expect(149); if (StartOf(29)) { - Expr( -#line 2934 "VBNET.ATG" -out nextExpr); - -#line 2936 "VBNET.ATG" + Expr(out nextExpr); nextExpressions = new List(); nextExpressions.Add(nextExpr); - - while (la.kind == 12) { - lexer.NextToken(); - Expr( -#line 2939 "VBNET.ATG" -out nextExpr); -#line 2939 "VBNET.ATG" - nextExpressions.Add(nextExpr); + while (la.kind == 12) { + Get(); + Expr(out nextExpr); + nextExpressions.Add(nextExpr); } } - -#line 2942 "VBNET.ATG" statement = new ForNextStatement { TypeReference = typeReference, VariableName = typeName, @@ -6267,516 +4063,300 @@ out nextExpr); EmbeddedStatement = embeddedStatement, NextExpressions = nextExpressions }; - - } else SynErr(276); - } else if (la.kind == 105) { - lexer.NextToken(); - Expr( -#line 2955 "VBNET.ATG" -out expr); -#line 2955 "VBNET.ATG" - statement = new ErrorStatement(expr); + } else SynErr(274); + } else if (la.kind == 105) { + Get(); + Expr(out expr); + statement = new ErrorStatement(expr); } else if (la.kind == 176) { - lexer.NextToken(); - -#line 2957 "VBNET.ATG" - bool isPreserve = false; + Get(); + bool isPreserve = false; if (la.kind == 169) { - lexer.NextToken(); - -#line 2957 "VBNET.ATG" - isPreserve = true; + Get(); + isPreserve = true; } - ReDimClause( -#line 2958 "VBNET.ATG" -out expr); - -#line 2960 "VBNET.ATG" + ReDimClause(out expr); ReDimStatement reDimStatement = new ReDimStatement(isPreserve); statement = reDimStatement; SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); - - while (la.kind == 12) { - lexer.NextToken(); - ReDimClause( -#line 2964 "VBNET.ATG" -out expr); -#line 2965 "VBNET.ATG" - SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); + while (la.kind == 12) { + Get(); + ReDimClause(out expr); + SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); } } else if (la.kind == 104) { - lexer.NextToken(); - Expr( -#line 2969 "VBNET.ATG" -out expr); - -#line 2971 "VBNET.ATG" + Get(); + Expr(out expr); EraseStatement eraseStatement = new EraseStatement(); if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr);} - - while (la.kind == 12) { - lexer.NextToken(); - Expr( -#line 2974 "VBNET.ATG" -out expr); -#line 2974 "VBNET.ATG" + while (la.kind == 12) { + Get(); + Expr(out expr); if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr); } } - -#line 2975 "VBNET.ATG" - statement = eraseStatement; + statement = eraseStatement; } else if (la.kind == 191) { - lexer.NextToken(); - -#line 2977 "VBNET.ATG" - statement = new StopStatement(); - } else if ( -#line 2979 "VBNET.ATG" -la.kind == Tokens.If) { + Get(); + statement = new StopStatement(); + } else if (la.kind == Tokens.If) { Expect(122); - -#line 2980 "VBNET.ATG" - Location ifStartLocation = t.Location; - Expr( -#line 2980 "VBNET.ATG" -out expr); + Location ifStartLocation = t.Location; + Expr(out expr); if (la.kind == 199) { - lexer.NextToken(); + Get(); } if (la.kind == 1 || la.kind == 11) { EndOfStmt(); - Block( -#line 2983 "VBNET.ATG" -out embeddedStatement); - -#line 2985 "VBNET.ATG" + Block(out embeddedStatement); IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement); ifStatement.StartLocation = ifStartLocation; Location elseIfStart; - - while (la.kind == 99 || -#line 2991 "VBNET.ATG" -IsElseIf()) { - if ( -#line 2991 "VBNET.ATG" -IsElseIf()) { - Expect(98); -#line 2991 "VBNET.ATG" - elseIfStart = t.Location; + while (la.kind == 98 || la.kind == 99) { + if (IsElseIf()) { + Expect(98); + elseIfStart = t.Location; Expect(122); } else { - lexer.NextToken(); - -#line 2992 "VBNET.ATG" - elseIfStart = t.Location; + Get(); + elseIfStart = t.Location; } - -#line 2994 "VBNET.ATG" - Expression condition = null; Statement block = null; - Expr( -#line 2995 "VBNET.ATG" -out condition); + Expression condition = null; Statement block = null; + Expr(out condition); if (la.kind == 199) { - lexer.NextToken(); + Get(); } EndOfStmt(); - Block( -#line 2996 "VBNET.ATG" -out block); - -#line 2998 "VBNET.ATG" + Block(out block); ElseIfSection elseIfSection = new ElseIfSection(condition, block); elseIfSection.StartLocation = elseIfStart; elseIfSection.EndLocation = t.Location; elseIfSection.Parent = ifStatement; ifStatement.ElseIfSections.Add(elseIfSection); - + } if (la.kind == 98) { - lexer.NextToken(); + Get(); if (la.kind == 1 || la.kind == 11) { EndOfStmt(); } - Block( -#line 3007 "VBNET.ATG" -out embeddedStatement); - -#line 3009 "VBNET.ATG" + Block(out embeddedStatement); ifStatement.FalseStatement.Add(embeddedStatement); - + } Expect(100); Expect(122); - -#line 3013 "VBNET.ATG" ifStatement.EndLocation = t.Location; statement = ifStatement; - - } else if (StartOf(38)) { -#line 3018 "VBNET.ATG" + } else if (StartOf(38)) { IfElseStatement ifStatement = new IfElseStatement(expr); ifStatement.StartLocation = ifStartLocation; - - SingleLineStatementList( -#line 3021 "VBNET.ATG" -ifStatement.TrueStatement); + + SingleLineStatementList(ifStatement.TrueStatement); if (la.kind == 98) { - lexer.NextToken(); + Get(); if (StartOf(38)) { - SingleLineStatementList( -#line 3024 "VBNET.ATG" -ifStatement.FalseStatement); + SingleLineStatementList(ifStatement.FalseStatement); } } - -#line 3026 "VBNET.ATG" - ifStatement.EndLocation = t.Location; statement = ifStatement; - } else SynErr(277); + ifStatement.EndLocation = t.Location; statement = ifStatement; + } else SynErr(275); } else if (la.kind == 182) { - lexer.NextToken(); + Get(); if (la.kind == 61) { - lexer.NextToken(); + Get(); } - Expr( -#line 3029 "VBNET.ATG" -out expr); + Expr(out expr); EndOfStmt(); - -#line 3030 "VBNET.ATG" List selectSections = new List(); Statement block = null; - - while (la.kind == 61) { -#line 3034 "VBNET.ATG" - List caseClauses = null; Location caseLocation = la.Location; - lexer.NextToken(); - CaseClauses( -#line 3035 "VBNET.ATG" -out caseClauses); - if ( -#line 3035 "VBNET.ATG" -IsNotStatementSeparator()) { - lexer.NextToken(); + while (la.kind == 61) { + List caseClauses = null; Location caseLocation = la.Location; + Get(); + CaseClauses(out caseClauses); + if (IsNotStatementSeparator()) { + Expect(11); } EndOfStmt(); - -#line 3037 "VBNET.ATG" SwitchSection selectSection = new SwitchSection(caseClauses); selectSection.StartLocation = caseLocation; - - Block( -#line 3040 "VBNET.ATG" -out block); -#line 3042 "VBNET.ATG" + Block(out block); selectSection.Children = block.Children; selectSection.EndLocation = t.EndLocation; selectSections.Add(selectSection); - - } -#line 3048 "VBNET.ATG" + } statement = new SwitchStatement(expr, selectSections); - + Expect(100); Expect(182); } else if (la.kind == 157) { - -#line 3051 "VBNET.ATG" - OnErrorStatement onErrorStatement = null; - OnErrorStatement( -#line 3052 "VBNET.ATG" -out onErrorStatement); - -#line 3052 "VBNET.ATG" - statement = onErrorStatement; + OnErrorStatement onErrorStatement = null; + OnErrorStatement(out onErrorStatement); + statement = onErrorStatement; } else if (la.kind == 119) { - -#line 3053 "VBNET.ATG" - GotoStatement goToStatement = null; - GotoStatement( -#line 3054 "VBNET.ATG" -out goToStatement); - -#line 3054 "VBNET.ATG" - statement = goToStatement; + GotoStatement goToStatement = null; + GotoStatement(out goToStatement); + statement = goToStatement; } else if (la.kind == 179) { - -#line 3055 "VBNET.ATG" - ResumeStatement resumeStatement = null; - ResumeStatement( -#line 3056 "VBNET.ATG" -out resumeStatement); - -#line 3056 "VBNET.ATG" - statement = resumeStatement; + ResumeStatement resumeStatement = null; + ResumeStatement(out resumeStatement); + statement = resumeStatement; } else if (StartOf(37)) { - -#line 3059 "VBNET.ATG" Expression val = null; AssignmentOperatorType op; - + bool mustBeAssignment = la.kind == Tokens.Plus || la.kind == Tokens.Minus || la.kind == Tokens.Not || la.kind == Tokens.Times; - - SimpleExpr( -#line 3065 "VBNET.ATG" -out expr); + + SimpleExpr(out expr); if (StartOf(39)) { - AssignmentOperator( -#line 3067 "VBNET.ATG" -out op); - Expr( -#line 3067 "VBNET.ATG" -out val); - -#line 3067 "VBNET.ATG" - expr = new AssignmentExpression(expr, op, val); + AssignmentOperator(out op); + Expr(out val); + expr = new AssignmentExpression(expr, op, val); } else if (la.kind == 1 || la.kind == 11 || la.kind == 98) { - -#line 3068 "VBNET.ATG" - if (mustBeAssignment) Error("error in assignment."); - } else SynErr(278); - -#line 3071 "VBNET.ATG" - // a field reference expression that stands alone is a - // invocation expression without parantheses and arguments + if (mustBeAssignment) Error("error in assignment."); + } else SynErr(276); if(expr is MemberReferenceExpression || expr is IdentifierExpression) { - expr = new InvocationExpression(expr); + expr = new InvocationExpression(expr); } statement = new ExpressionStatement(expr); - - } else if (la.kind == 60) { - lexer.NextToken(); - SimpleExpr( -#line 3078 "VBNET.ATG" -out expr); -#line 3078 "VBNET.ATG" - statement = new ExpressionStatement(expr); + } else if (la.kind == 60) { + Get(); + SimpleExpr(out expr); + statement = new ExpressionStatement(expr); } else if (la.kind == 211) { - lexer.NextToken(); - -#line 3080 "VBNET.ATG" - Statement block; - if ( -#line 3081 "VBNET.ATG" -Peek(1).kind == Tokens.As) { - -#line 3082 "VBNET.ATG" - LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); - VariableDeclarator( -#line 3083 "VBNET.ATG" -resourceAquisition.Variables); + Get(); + Statement block; + if (Peek(1).kind == Tokens.As) { + LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); + VariableDeclarator(resourceAquisition.Variables); while (la.kind == 12) { - lexer.NextToken(); - VariableDeclarator( -#line 3085 "VBNET.ATG" -resourceAquisition.Variables); + Get(); + VariableDeclarator(resourceAquisition.Variables); } - Block( -#line 3087 "VBNET.ATG" -out block); - -#line 3089 "VBNET.ATG" + Block(out block); statement = new UsingStatement(resourceAquisition, block); - + } else if (StartOf(29)) { - Expr( -#line 3091 "VBNET.ATG" -out expr); - Block( -#line 3092 "VBNET.ATG" -out block); - -#line 3093 "VBNET.ATG" - statement = new UsingStatement(new ExpressionStatement(expr), block); - } else SynErr(279); + Expr(out expr); + Block(out block); + statement = new UsingStatement(new ExpressionStatement(expr), block); + } else SynErr(277); Expect(100); Expect(211); } else if (StartOf(40)) { - LocalDeclarationStatement( -#line 3096 "VBNET.ATG" -out statement); - } else SynErr(280); + LocalDeclarationStatement(out statement); + } else SynErr(278); } - void LocalDeclarationStatement( -#line 2776 "VBNET.ATG" -out Statement statement) { - -#line 2778 "VBNET.ATG" + void LocalDeclarationStatement(out Statement statement) { ModifierList m = new ModifierList(); LocalVariableDeclaration localVariableDeclaration; bool dimfound = false; - + while (la.kind == 75 || la.kind == 92 || la.kind == 189) { if (la.kind == 75) { - lexer.NextToken(); - -#line 2784 "VBNET.ATG" - m.Add(Modifiers.Const, t.Location); + Get(); + m.Add(Modifiers.Const, t.Location); } else if (la.kind == 189) { - lexer.NextToken(); - -#line 2785 "VBNET.ATG" - m.Add(Modifiers.Static, t.Location); + Get(); + m.Add(Modifiers.Static, t.Location); } else { - lexer.NextToken(); - -#line 2786 "VBNET.ATG" - dimfound = true; + Get(); + dimfound = true; } } - -#line 2789 "VBNET.ATG" if(dimfound && (m.Modifier & Modifiers.Const) != 0) { Error("Dim is not allowed on constants."); } - + if(m.isNone && dimfound == false) { Error("Const, Dim or Static expected"); } - + localVariableDeclaration = new LocalVariableDeclaration(m.Modifier); localVariableDeclaration.StartLocation = t.Location; - - VariableDeclarator( -#line 2800 "VBNET.ATG" -localVariableDeclaration.Variables); + + VariableDeclarator(localVariableDeclaration.Variables); while (la.kind == 12) { - lexer.NextToken(); - VariableDeclarator( -#line 2801 "VBNET.ATG" -localVariableDeclaration.Variables); + Get(); + VariableDeclarator(localVariableDeclaration.Variables); } - -#line 2803 "VBNET.ATG" statement = localVariableDeclaration; - - } - void TryStatement( -#line 3297 "VBNET.ATG" -out Statement tryStatement) { + } -#line 3299 "VBNET.ATG" + void TryStatement(out Statement tryStatement) { Statement blockStmt = null, finallyStmt = null;List catchClauses = null; - + Expect(203); EndOfStmt(); - Block( -#line 3302 "VBNET.ATG" -out blockStmt); + Block(out blockStmt); if (la.kind == 62 || la.kind == 100 || la.kind == 110) { - CatchClauses( -#line 3303 "VBNET.ATG" -out catchClauses); + CatchClauses(out catchClauses); } if (la.kind == 110) { - lexer.NextToken(); + Get(); EndOfStmt(); - Block( -#line 3304 "VBNET.ATG" -out finallyStmt); + Block(out finallyStmt); } Expect(100); Expect(203); - -#line 3307 "VBNET.ATG" tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt); - - } - void WithStatement( -#line 3277 "VBNET.ATG" -out Statement withStatement) { + } -#line 3279 "VBNET.ATG" + void WithStatement(out Statement withStatement) { Statement blockStmt = null; Expression expr = null; - - Expect(218); -#line 3282 "VBNET.ATG" - Location start = t.Location; - Expr( -#line 3283 "VBNET.ATG" -out expr); + Expect(218); + Location start = t.Location; + Expr(out expr); EndOfStmt(); - -#line 3285 "VBNET.ATG" withStatement = new WithStatement(expr); withStatement.StartLocation = start; - - Block( -#line 3288 "VBNET.ATG" -out blockStmt); -#line 3290 "VBNET.ATG" + Block(out blockStmt); ((WithStatement)withStatement).Body = (BlockStatement)blockStmt; - + Expect(100); Expect(218); - -#line 3293 "VBNET.ATG" - withStatement.EndLocation = t.Location; + withStatement.EndLocation = t.Location; } - void WhileOrUntil( -#line 3270 "VBNET.ATG" -out ConditionType conditionType) { - -#line 3271 "VBNET.ATG" - conditionType = ConditionType.None; + void WhileOrUntil(out ConditionType conditionType) { + conditionType = ConditionType.None; if (la.kind == 216) { - lexer.NextToken(); - -#line 3272 "VBNET.ATG" - conditionType = ConditionType.While; + Get(); + conditionType = ConditionType.While; } else if (la.kind == 209) { - lexer.NextToken(); - -#line 3273 "VBNET.ATG" - conditionType = ConditionType.Until; - } else SynErr(281); + Get(); + conditionType = ConditionType.Until; + } else SynErr(279); } - void LoopControlVariable( -#line 3113 "VBNET.ATG" -out TypeReference type, out string name) { - -#line 3114 "VBNET.ATG" + void LoopControlVariable(out TypeReference type, out string name) { ArrayList arrayModifiers = null; type = null; - - Qualident( -#line 3118 "VBNET.ATG" -out name); - if ( -#line 3119 "VBNET.ATG" -IsDims()) { - ArrayTypeModifiers( -#line 3119 "VBNET.ATG" -out arrayModifiers); + + Qualident(out name); + if (IsDims()) { + ArrayTypeModifiers(out arrayModifiers); } if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 3120 "VBNET.ATG" -out type); - -#line 3120 "VBNET.ATG" - if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } + Get(); + TypeName(out type); + if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } } - -#line 3122 "VBNET.ATG" if (type != null) { if(type.RankSpecifier != null && arrayModifiers != null) { Error("array rank only allowed one time"); @@ -6784,117 +4364,71 @@ out type); type.RankSpecifier = (int[])arrayModifiers.ToArray(typeof(int)); } } - - } - void ReDimClause( -#line 3192 "VBNET.ATG" -out Expression expr) { - SimpleNonInvocationExpression( -#line 3194 "VBNET.ATG" -out expr); - ReDimClauseInternal( -#line 3195 "VBNET.ATG" -ref expr); } - void SingleLineStatementList( -#line 3099 "VBNET.ATG" -List list) { + void ReDimClause(out Expression expr) { + SimpleNonInvocationExpression(out expr); + ReDimClauseInternal(ref expr); + } -#line 3100 "VBNET.ATG" - Statement embeddedStatement = null; + void SingleLineStatementList(List list) { + Statement embeddedStatement = null; if (la.kind == 100) { - lexer.NextToken(); - -#line 3102 "VBNET.ATG" - embeddedStatement = new EndStatement(); + Get(); + embeddedStatement = new EndStatement(); } else if (StartOf(35)) { - EmbeddedStatement( -#line 3103 "VBNET.ATG" -out embeddedStatement); - } else SynErr(282); - -#line 3104 "VBNET.ATG" - if (embeddedStatement != null) list.Add(embeddedStatement); + EmbeddedStatement(out embeddedStatement); + } else SynErr(280); + if (embeddedStatement != null) list.Add(embeddedStatement); while (la.kind == 11) { - lexer.NextToken(); + Get(); while (la.kind == 11) { - lexer.NextToken(); + Get(); } if (la.kind == 100) { - lexer.NextToken(); - -#line 3106 "VBNET.ATG" - embeddedStatement = new EndStatement(); + Get(); + embeddedStatement = new EndStatement(); } else if (StartOf(35)) { - EmbeddedStatement( -#line 3107 "VBNET.ATG" -out embeddedStatement); - } else SynErr(283); - -#line 3108 "VBNET.ATG" - if (embeddedStatement != null) list.Add(embeddedStatement); + EmbeddedStatement(out embeddedStatement); + } else SynErr(281); + if (embeddedStatement != null) list.Add(embeddedStatement); } } - void CaseClauses( -#line 3230 "VBNET.ATG" -out List caseClauses) { - -#line 3232 "VBNET.ATG" + void CaseClauses(out List caseClauses) { caseClauses = new List(); CaseLabel caseClause = null; - - CaseClause( -#line 3235 "VBNET.ATG" -out caseClause); -#line 3235 "VBNET.ATG" - if (caseClause != null) { caseClauses.Add(caseClause); } + CaseClause(out caseClause); + if (caseClause != null) { caseClauses.Add(caseClause); } while (la.kind == 12) { - lexer.NextToken(); - CaseClause( -#line 3236 "VBNET.ATG" -out caseClause); - -#line 3236 "VBNET.ATG" - if (caseClause != null) { caseClauses.Add(caseClause); } + Get(); + CaseClause(out caseClause); + if (caseClause != null) { caseClauses.Add(caseClause); } } } - void OnErrorStatement( -#line 3133 "VBNET.ATG" -out OnErrorStatement stmt) { - -#line 3135 "VBNET.ATG" + void OnErrorStatement(out OnErrorStatement stmt) { stmt = null; GotoStatement goToStatement = null; - + Expect(157); Expect(105); - if ( -#line 3141 "VBNET.ATG" -IsNegativeLabelName()) { + if (IsNegativeLabelName()) { Expect(119); Expect(18); Expect(5); - -#line 3143 "VBNET.ATG" long intLabel = Int64.Parse(t.val); if(intLabel != 1) { Error("invalid label in on error statement."); } stmt = new OnErrorStatement(new GotoStatement((intLabel * -1).ToString())); - - } else if (la.kind == 119) { - GotoStatement( -#line 3149 "VBNET.ATG" -out goToStatement); -#line 3151 "VBNET.ATG" + } else if (la.kind == 119) { + GotoStatement(out goToStatement); string val = goToStatement.Label; - + // if value is numeric, make sure that is 0 try { long intLabel = Int64.Parse(val); @@ -6904,93 +4438,55 @@ out goToStatement); } catch { } stmt = new OnErrorStatement(goToStatement); - + } else if (la.kind == 179) { - lexer.NextToken(); + Get(); Expect(149); - -#line 3165 "VBNET.ATG" stmt = new OnErrorStatement(new ResumeStatement(true)); - - } else SynErr(284); - } - void GotoStatement( -#line 3171 "VBNET.ATG" -out GotoStatement goToStatement) { + } else SynErr(282); + } -#line 3173 "VBNET.ATG" + void GotoStatement(out GotoStatement goToStatement) { string label = String.Empty; - - Expect(119); - LabelName( -#line 3176 "VBNET.ATG" -out label); -#line 3178 "VBNET.ATG" + Expect(119); + LabelName(out label); goToStatement = new GotoStatement(label); - - } - void ResumeStatement( -#line 3219 "VBNET.ATG" -out ResumeStatement resumeStatement) { + } -#line 3221 "VBNET.ATG" + void ResumeStatement(out ResumeStatement resumeStatement) { resumeStatement = null; string label = String.Empty; - - if ( -#line 3224 "VBNET.ATG" -IsResumeNext()) { + + if (IsResumeNext()) { Expect(179); Expect(149); - -#line 3225 "VBNET.ATG" - resumeStatement = new ResumeStatement(true); + resumeStatement = new ResumeStatement(true); } else if (la.kind == 179) { - lexer.NextToken(); + Get(); if (StartOf(41)) { - LabelName( -#line 3226 "VBNET.ATG" -out label); + LabelName(out label); } - -#line 3226 "VBNET.ATG" - resumeStatement = new ResumeStatement(label); - } else SynErr(285); + resumeStatement = new ResumeStatement(label); + } else SynErr(283); } - void ReDimClauseInternal( -#line 3198 "VBNET.ATG" -ref Expression expr) { - -#line 3199 "VBNET.ATG" - List arguments; bool canBeNormal; bool canBeRedim; string name; - while (la.kind == 16 || -#line 3202 "VBNET.ATG" -la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { + void ReDimClauseInternal(ref Expression expr) { + List arguments; bool canBeNormal; bool canBeRedim; string name; + while (la.kind == 16 || la.kind == 25) { if (la.kind == 16) { - lexer.NextToken(); - IdentifierOrKeyword( -#line 3201 "VBNET.ATG" -out name); - -#line 3201 "VBNET.ATG" - expr = new MemberReferenceExpression(expr, name); + Get(); + IdentifierOrKeyword(out name); + expr = new MemberReferenceExpression(expr, name); } else { - InvocationExpression( -#line 3203 "VBNET.ATG" -ref expr); + InvocationExpression(ref expr); } } Expect(25); - NormalOrReDimArgumentList( -#line 3206 "VBNET.ATG" -out arguments, out canBeNormal, out canBeRedim); + NormalOrReDimArgumentList(out arguments, out canBeNormal, out canBeRedim); Expect(26); - -#line 3208 "VBNET.ATG" expr = new InvocationExpression(expr, arguments); if (canBeRedim == false || canBeNormal && (la.kind == Tokens.Dot || la.kind == Tokens.OpenParenthesis)) { if (this.Errors.Count == 0) { @@ -6998,135 +4494,93 @@ out arguments, out canBeNormal, out canBeRedim); ReDimClauseInternal(ref expr); } } - - } - void CaseClause( -#line 3240 "VBNET.ATG" -out CaseLabel caseClause) { + } -#line 3242 "VBNET.ATG" + void CaseClause(out CaseLabel caseClause) { Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; caseClause = null; - - if (la.kind == 98) { - lexer.NextToken(); -#line 3248 "VBNET.ATG" - caseClause = new CaseLabel(); + if (la.kind == 98) { + Get(); + caseClause = new CaseLabel(); } else if (StartOf(42)) { if (la.kind == 131) { - lexer.NextToken(); + Get(); } switch (la.kind) { case 28: { - lexer.NextToken(); - -#line 3252 "VBNET.ATG" - op = BinaryOperatorType.LessThan; + Get(); + op = BinaryOperatorType.LessThan; break; } case 27: { - lexer.NextToken(); - -#line 3253 "VBNET.ATG" - op = BinaryOperatorType.GreaterThan; + Get(); + op = BinaryOperatorType.GreaterThan; break; } case 31: { - lexer.NextToken(); - -#line 3254 "VBNET.ATG" - op = BinaryOperatorType.LessThanOrEqual; + Get(); + op = BinaryOperatorType.LessThanOrEqual; break; } case 30: { - lexer.NextToken(); - -#line 3255 "VBNET.ATG" - op = BinaryOperatorType.GreaterThanOrEqual; + Get(); + op = BinaryOperatorType.GreaterThanOrEqual; break; } case 10: { - lexer.NextToken(); - -#line 3256 "VBNET.ATG" - op = BinaryOperatorType.Equality; + Get(); + op = BinaryOperatorType.Equality; break; } case 29: { - lexer.NextToken(); - -#line 3257 "VBNET.ATG" - op = BinaryOperatorType.InEquality; + Get(); + op = BinaryOperatorType.InEquality; break; } - default: SynErr(286); break; + default: SynErr(284); break; } - Expr( -#line 3259 "VBNET.ATG" -out expr); - -#line 3261 "VBNET.ATG" + Expr(out expr); caseClause = new CaseLabel(op, expr); - + } else if (StartOf(29)) { - Expr( -#line 3263 "VBNET.ATG" -out expr); + Expr(out expr); if (la.kind == 201) { - lexer.NextToken(); - Expr( -#line 3263 "VBNET.ATG" -out sexpr); + Get(); + Expr(out sexpr); } - -#line 3265 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); - - } else SynErr(287); - } - void CatchClauses( -#line 3312 "VBNET.ATG" -out List catchClauses) { + } else SynErr(285); + } -#line 3314 "VBNET.ATG" + void CatchClauses(out List catchClauses) { catchClauses = new List(); TypeReference type = null; Statement blockStmt = null; Expression expr = null; string name = String.Empty; - + while (la.kind == 62) { - lexer.NextToken(); + Get(); if (StartOf(4)) { Identifier(); - -#line 3322 "VBNET.ATG" - name = t.val; + name = t.val; if (la.kind == 50) { - lexer.NextToken(); - TypeName( -#line 3322 "VBNET.ATG" -out type); + Get(); + TypeName(out type); } } if (la.kind == 214) { - lexer.NextToken(); - Expr( -#line 3323 "VBNET.ATG" -out expr); + Get(); + Expr(out expr); } EndOfStmt(); - Block( -#line 3325 "VBNET.ATG" -out blockStmt); - -#line 3326 "VBNET.ATG" - catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); + Block(out blockStmt); + catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); } } @@ -7135,358 +4589,361 @@ out blockStmt); void ParseRoot() { VBNET(); + Expect(0); // expect end-of-file automatically added } - protected override void SynErr(int line, int col, int errorNumber) - { - string s; - switch (errorNumber) { - case 0: s = "EOF expected"; break; - case 1: s = "EOL expected"; break; - case 2: s = "ident expected"; break; - case 3: s = "LiteralString expected"; break; - case 4: s = "LiteralCharacter expected"; break; - case 5: s = "LiteralInteger expected"; break; - case 6: s = "LiteralDouble expected"; break; - case 7: s = "LiteralSingle expected"; break; - case 8: s = "LiteralDecimal expected"; break; - case 9: s = "LiteralDate expected"; break; - case 10: s = "\"=\" expected"; break; - case 11: s = "\":\" expected"; break; - case 12: s = "\",\" expected"; break; - case 13: s = "\"&\" expected"; break; - case 14: s = "\"/\" expected"; break; - case 15: s = "\"\\\\\" expected"; break; - case 16: s = "\".\" expected"; break; - case 17: s = "\"!\" expected"; break; - case 18: s = "\"-\" expected"; break; - case 19: s = "\"+\" expected"; break; - case 20: s = "\"^\" expected"; break; - case 21: s = "\"?\" expected"; break; - case 22: s = "\"*\" expected"; break; - case 23: s = "\"{\" expected"; break; - case 24: s = "\"}\" expected"; break; - case 25: s = "\"(\" expected"; break; - case 26: s = "\")\" expected"; break; - case 27: s = "\">\" expected"; break; - case 28: s = "\"<\" expected"; break; - case 29: s = "\"<>\" expected"; break; - case 30: s = "\">=\" expected"; break; - case 31: s = "\"<=\" expected"; break; - case 32: s = "\"<<\" expected"; break; - case 33: s = "\">>\" expected"; break; - case 34: s = "\"+=\" expected"; break; - case 35: s = "\"^=\" expected"; break; - case 36: s = "\"-=\" expected"; break; - case 37: s = "\"*=\" expected"; break; - case 38: s = "\"/=\" expected"; break; - case 39: s = "\"\\\\=\" expected"; break; - case 40: s = "\"<<=\" expected"; break; - case 41: s = "\">>=\" expected"; break; - case 42: s = "\"&=\" expected"; break; - case 43: s = "\"AddHandler\" expected"; break; - case 44: s = "\"AddressOf\" expected"; break; - case 45: s = "\"Aggregate\" expected"; break; - case 46: s = "\"Alias\" expected"; break; - case 47: s = "\"And\" expected"; break; - case 48: s = "\"AndAlso\" expected"; break; - case 49: s = "\"Ansi\" expected"; break; - case 50: s = "\"As\" expected"; break; - case 51: s = "\"Ascending\" expected"; break; - case 52: s = "\"Assembly\" expected"; break; - case 53: s = "\"Auto\" expected"; break; - case 54: s = "\"Binary\" expected"; break; - case 55: s = "\"Boolean\" expected"; break; - case 56: s = "\"ByRef\" expected"; break; - case 57: s = "\"By\" expected"; break; - case 58: s = "\"Byte\" expected"; break; - case 59: s = "\"ByVal\" expected"; break; - case 60: s = "\"Call\" expected"; break; - case 61: s = "\"Case\" expected"; break; - case 62: s = "\"Catch\" expected"; break; - case 63: s = "\"CBool\" expected"; break; - case 64: s = "\"CByte\" expected"; break; - case 65: s = "\"CChar\" expected"; break; - case 66: s = "\"CDate\" expected"; break; - case 67: s = "\"CDbl\" expected"; break; - case 68: s = "\"CDec\" expected"; break; - case 69: s = "\"Char\" expected"; break; - case 70: s = "\"CInt\" expected"; break; - case 71: s = "\"Class\" expected"; break; - case 72: s = "\"CLng\" expected"; break; - case 73: s = "\"CObj\" expected"; break; - case 74: s = "\"Compare\" expected"; break; - case 75: s = "\"Const\" expected"; break; - case 76: s = "\"Continue\" expected"; break; - case 77: s = "\"CSByte\" expected"; break; - case 78: s = "\"CShort\" expected"; break; - case 79: s = "\"CSng\" expected"; break; - case 80: s = "\"CStr\" expected"; break; - case 81: s = "\"CType\" expected"; break; - case 82: s = "\"CUInt\" expected"; break; - case 83: s = "\"CULng\" expected"; break; - case 84: s = "\"CUShort\" expected"; break; - case 85: s = "\"Custom\" expected"; break; - case 86: s = "\"Date\" expected"; break; - case 87: s = "\"Decimal\" expected"; break; - case 88: s = "\"Declare\" expected"; break; - case 89: s = "\"Default\" expected"; break; - case 90: s = "\"Delegate\" expected"; break; - case 91: s = "\"Descending\" expected"; break; - case 92: s = "\"Dim\" expected"; break; - case 93: s = "\"DirectCast\" expected"; break; - case 94: s = "\"Distinct\" expected"; break; - case 95: s = "\"Do\" expected"; break; - case 96: s = "\"Double\" expected"; break; - case 97: s = "\"Each\" expected"; break; - case 98: s = "\"Else\" expected"; break; - case 99: s = "\"ElseIf\" expected"; break; - case 100: s = "\"End\" expected"; break; - case 101: s = "\"EndIf\" expected"; break; - case 102: s = "\"Enum\" expected"; break; - case 103: s = "\"Equals\" expected"; break; - case 104: s = "\"Erase\" expected"; break; - case 105: s = "\"Error\" expected"; break; - case 106: s = "\"Event\" expected"; break; - case 107: s = "\"Exit\" expected"; break; - case 108: s = "\"Explicit\" expected"; break; - case 109: s = "\"False\" expected"; break; - case 110: s = "\"Finally\" expected"; break; - case 111: s = "\"For\" expected"; break; - case 112: s = "\"Friend\" expected"; break; - case 113: s = "\"From\" expected"; break; - case 114: s = "\"Function\" expected"; break; - case 115: s = "\"Get\" expected"; break; - case 116: s = "\"GetType\" expected"; break; - case 117: s = "\"Global\" expected"; break; - case 118: s = "\"GoSub\" expected"; break; - case 119: s = "\"GoTo\" expected"; break; - case 120: s = "\"Group\" expected"; break; - case 121: s = "\"Handles\" expected"; break; - case 122: s = "\"If\" expected"; break; - case 123: s = "\"Implements\" expected"; break; - case 124: s = "\"Imports\" expected"; break; - case 125: s = "\"In\" expected"; break; - case 126: s = "\"Infer\" expected"; break; - case 127: s = "\"Inherits\" expected"; break; - case 128: s = "\"Integer\" expected"; break; - case 129: s = "\"Interface\" expected"; break; - case 130: s = "\"Into\" expected"; break; - case 131: s = "\"Is\" expected"; break; - case 132: s = "\"IsNot\" expected"; break; - case 133: s = "\"Join\" expected"; break; - case 134: s = "\"Let\" expected"; break; - case 135: s = "\"Lib\" expected"; break; - case 136: s = "\"Like\" expected"; break; - case 137: s = "\"Long\" expected"; break; - case 138: s = "\"Loop\" expected"; break; - case 139: s = "\"Me\" expected"; break; - case 140: s = "\"Mod\" expected"; break; - case 141: s = "\"Module\" expected"; break; - case 142: s = "\"MustInherit\" expected"; break; - case 143: s = "\"MustOverride\" expected"; break; - case 144: s = "\"MyBase\" expected"; break; - case 145: s = "\"MyClass\" expected"; break; - case 146: s = "\"Namespace\" expected"; break; - case 147: s = "\"Narrowing\" expected"; break; - case 148: s = "\"New\" expected"; break; - case 149: s = "\"Next\" expected"; break; - case 150: s = "\"Not\" expected"; break; - case 151: s = "\"Nothing\" expected"; break; - case 152: s = "\"NotInheritable\" expected"; break; - case 153: s = "\"NotOverridable\" expected"; break; - case 154: s = "\"Object\" expected"; break; - case 155: s = "\"Of\" expected"; break; - case 156: s = "\"Off\" expected"; break; - case 157: s = "\"On\" expected"; break; - case 158: s = "\"Operator\" expected"; break; - case 159: s = "\"Option\" expected"; break; - case 160: s = "\"Optional\" expected"; break; - case 161: s = "\"Or\" expected"; break; - case 162: s = "\"Order\" expected"; break; - case 163: s = "\"OrElse\" expected"; break; - case 164: s = "\"Overloads\" expected"; break; - case 165: s = "\"Overridable\" expected"; break; - case 166: s = "\"Overrides\" expected"; break; - case 167: s = "\"ParamArray\" expected"; break; - case 168: s = "\"Partial\" expected"; break; - case 169: s = "\"Preserve\" expected"; break; - case 170: s = "\"Private\" expected"; break; - case 171: s = "\"Property\" expected"; break; - case 172: s = "\"Protected\" expected"; break; - case 173: s = "\"Public\" expected"; break; - case 174: s = "\"RaiseEvent\" expected"; break; - case 175: s = "\"ReadOnly\" expected"; break; - case 176: s = "\"ReDim\" expected"; break; - case 177: s = "\"Rem\" expected"; break; - case 178: s = "\"RemoveHandler\" expected"; break; - case 179: s = "\"Resume\" expected"; break; - case 180: s = "\"Return\" expected"; break; - case 181: s = "\"SByte\" expected"; break; - case 182: s = "\"Select\" expected"; break; - case 183: s = "\"Set\" expected"; break; - case 184: s = "\"Shadows\" expected"; break; - case 185: s = "\"Shared\" expected"; break; - case 186: s = "\"Short\" expected"; break; - case 187: s = "\"Single\" expected"; break; - case 188: s = "\"Skip\" expected"; break; - case 189: s = "\"Static\" expected"; break; - case 190: s = "\"Step\" expected"; break; - case 191: s = "\"Stop\" expected"; break; - case 192: s = "\"Strict\" expected"; break; - case 193: s = "\"String\" expected"; break; - case 194: s = "\"Structure\" expected"; break; - case 195: s = "\"Sub\" expected"; break; - case 196: s = "\"SyncLock\" expected"; break; - case 197: s = "\"Take\" expected"; break; - case 198: s = "\"Text\" expected"; break; - case 199: s = "\"Then\" expected"; break; - case 200: s = "\"Throw\" expected"; break; - case 201: s = "\"To\" expected"; break; - case 202: s = "\"True\" expected"; break; - case 203: s = "\"Try\" expected"; break; - case 204: s = "\"TryCast\" expected"; break; - case 205: s = "\"TypeOf\" expected"; break; - case 206: s = "\"UInteger\" expected"; break; - case 207: s = "\"ULong\" expected"; break; - case 208: s = "\"Unicode\" expected"; break; - case 209: s = "\"Until\" expected"; break; - case 210: s = "\"UShort\" expected"; break; - case 211: s = "\"Using\" expected"; break; - case 212: s = "\"Variant\" expected"; break; - case 213: s = "\"Wend\" expected"; break; - case 214: s = "\"When\" expected"; break; - case 215: s = "\"Where\" expected"; break; - case 216: s = "\"While\" expected"; break; - case 217: s = "\"Widening\" expected"; break; - case 218: s = "\"With\" expected"; break; - case 219: s = "\"WithEvents\" expected"; break; - case 220: s = "\"WriteOnly\" expected"; break; - case 221: s = "\"Xor\" expected"; break; - case 222: s = "??? expected"; break; - case 223: s = "invalid EndOfStmt"; break; - case 224: s = "invalid OptionStmt"; break; - case 225: s = "invalid OptionStmt"; break; - case 226: s = "invalid GlobalAttributeSection"; break; - case 227: s = "invalid GlobalAttributeSection"; break; - case 228: s = "invalid NamespaceMemberDecl"; break; - case 229: s = "invalid OptionValue"; break; - case 230: s = "invalid ImportClause"; break; - case 231: s = "invalid Identifier"; break; - case 232: s = "invalid TypeModifier"; break; - case 233: s = "invalid NonModuleDeclaration"; break; - case 234: s = "invalid NonModuleDeclaration"; break; - case 235: s = "invalid TypeParameterConstraints"; break; - case 236: s = "invalid TypeParameterConstraint"; break; - case 237: s = "invalid NonArrayTypeName"; break; - case 238: s = "invalid MemberModifier"; break; - case 239: s = "invalid StructureMemberDecl"; break; - case 240: s = "invalid StructureMemberDecl"; break; - case 241: s = "invalid StructureMemberDecl"; break; - case 242: s = "invalid StructureMemberDecl"; break; - case 243: s = "invalid StructureMemberDecl"; break; - case 244: s = "invalid StructureMemberDecl"; break; - case 245: s = "invalid StructureMemberDecl"; break; - case 246: s = "invalid StructureMemberDecl"; break; - case 247: s = "invalid InterfaceMemberDecl"; break; - case 248: s = "invalid InterfaceMemberDecl"; break; - case 249: s = "invalid Expr"; break; - case 250: s = "invalid Charset"; break; - case 251: s = "invalid IdentifierForFieldDeclaration"; break; - case 252: s = "invalid VariableDeclaratorPartAfterIdentifier"; break; - case 253: s = "invalid AccessorDecls"; break; - case 254: s = "invalid EventAccessorDeclaration"; break; - case 255: s = "invalid OverloadableOperator"; break; - case 256: s = "invalid EventMemberSpecifier"; break; - case 257: s = "invalid AssignmentOperator"; break; - case 258: s = "invalid SimpleNonInvocationExpression"; break; - case 259: s = "invalid SimpleNonInvocationExpression"; break; - case 260: s = "invalid SimpleNonInvocationExpression"; break; - case 261: s = "invalid SimpleNonInvocationExpression"; break; - case 262: s = "invalid PrimitiveTypeName"; break; - case 263: s = "invalid CastTarget"; break; - case 264: s = "invalid ComparisonExpr"; break; - case 265: s = "invalid FromOrAggregateQueryOperator"; break; - case 266: s = "invalid QueryOperator"; break; - case 267: s = "invalid PartitionQueryOperator"; break; - case 268: s = "invalid Argument"; break; - case 269: s = "invalid QualIdentAndTypeArguments"; break; - case 270: s = "invalid AttributeArguments"; break; - case 271: s = "invalid ParameterModifier"; break; - case 272: s = "invalid Statement"; break; - case 273: s = "invalid LabelName"; break; - case 274: s = "invalid EmbeddedStatement"; break; - case 275: s = "invalid EmbeddedStatement"; break; - case 276: s = "invalid EmbeddedStatement"; break; - case 277: s = "invalid EmbeddedStatement"; break; - case 278: s = "invalid EmbeddedStatement"; break; - case 279: s = "invalid EmbeddedStatement"; break; - case 280: s = "invalid EmbeddedStatement"; break; - case 281: s = "invalid WhileOrUntil"; break; - case 282: s = "invalid SingleLineStatementList"; break; - case 283: s = "invalid SingleLineStatementList"; break; - case 284: s = "invalid OnErrorStatement"; break; - case 285: s = "invalid ResumeStatement"; break; - case 286: s = "invalid CaseClause"; break; - case 287: s = "invalid CaseClause"; break; - - default: s = "error " + errorNumber; break; - } - this.Errors.Error(line, col, s); - } - private bool StartOf(int s) { return set[s, lexer.LookAhead.kind]; } - + + protected override void SynErr(int line, int col, int errorNumber) + { + this.Errors.Error(line, col, ErrorDesc(errorNumber)); + } + 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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,x,x, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,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, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,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, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,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, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, T,T,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,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, T,x,T,x, x,x,x,T, x,T,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,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,T,T, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,T,x, x,T,T,x, x,x,x,x, x,x,T,T, T,T,T,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,T, x,T,T,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,T,T,T, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,x,x, x,x,T,T, T,T,T,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,T, x,x,x,x, x,x,x,x, x,T,x,x, T,T,T,T, T,x,T,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,T,T,x, x,x,x,x, T,x,x,x, x,x,T,x, x,T,T,x, x,T,x,x, x,x,x,x, x,T,T,T, x,x,x,T, x,x,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,T,T,x, T,T,T,T, T,T,x,T, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,T,T, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, x,T,x,T, T,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,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,T,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,x, T,T,x,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,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, 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,T,x,x, x,x,T,T, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, T,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,T,T,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,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,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,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,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,x,x, 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,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, x,x,x,x, x,x,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,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, 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,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,x,x, 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,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, T,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,T,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x,x, T,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,T, T,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,T,T, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,T,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, - {x,T,T,T, T,T,T,T, T,T,x,T, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,x,x, x,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,x, x,x,x,x}, - {x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,T,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,T,x, T,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,x, x,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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, 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, T,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,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, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,T,T, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,T,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,T,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,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,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,T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,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, 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,T, x,x,x,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,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,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,T,T, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, - {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,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, T,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,x,x, x,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,x,x, T,x,x,x, T,x,T,T, x,x,T,T, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,T,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,T,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, - {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,x,x, T,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,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,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, T,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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} + {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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,x,x, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,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, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,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, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,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, T,x,T,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, T,T,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,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, T,x,T,x, x,x,x,T, x,T,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,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,x, x,x,x,x, x,T,x,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,T,T, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,T,x, x,T,T,x, x,x,x,x, x,x,T,T, T,T,T,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,T, x,T,T,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,T,T,T, x,x,x,T, x,x,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,x,x, x,x,T,T, T,T,T,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,T, x,x,x,x, x,x,x,x, x,T,x,x, T,T,T,T, T,x,T,x, x,x,x,x, x,x,T,T, x,x,T,x, T,x,x,x, T,T,T,x, x,x,x,x, T,x,x,x, x,x,T,x, x,T,T,x, x,T,x,x, x,x,x,x, x,T,T,T, x,x,x,T, x,x,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,T,T,x, T,T,T,T, T,T,x,T, x,x,x,x, x,x,x,x, T,T,x,x, T,x,x,x, x,x,T,T, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, x,T,x,T, T,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,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,T,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,x, T,T,x,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, 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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,T,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,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, 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,T,x,x, x,x,T,T, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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, 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,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, T,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, T,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,T,T,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,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,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,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,T,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,x,x, 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,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, x,x,x,x, x,x,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,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, 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,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,x,x, 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,T,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, T,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,T,T, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,x,x,x, T,T,T,x, T,x,T,T, T,T,x,T, x,x,x,x, x,x,x,x, T,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,T, T,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,T,T, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,T,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, + {x,T,T,T, T,T,T,T, T,T,x,T, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,x,x, T,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,x, x,x,x,x}, + {x,T,T,T, T,T,T,T, T,T,T,T, T,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,T,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,T,x, T,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,x, x,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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, 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, T,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, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,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, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, 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,T,x, T,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,T,T, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,T,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,T,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,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,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,T,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, T,x,x,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,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, 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,T, x,x,x,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,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,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,T,T, x,x,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,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, T,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,x,x, x,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,x,x, T,x,x,x, T,x,T,T, x,x,T,T, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,T,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,T,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, x,x,x,T, T,T,T,T, T,T,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, x,T,T,x, T,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,T,x,x, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,T,T, T,x,x,x, x,T,x,x, x,T,T,x, x,x,T,x, T,T,T,T, T,T,T,x, x,x,x,T, x,x,x,x, x,x,x,x}, + {x,x,T,T, T,T,T,T, T,T,x,x, x,x,x,x, T,x,x,x, x,x,x,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,T, x,T,T,x, T,x,x,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,T,T,T, T,x,x,x, T,x,x,T, T,T,x,T, T,T,x,T, x,T,x,x, T,T,x,T, T,x,T,x, x,x,T,x, T,x,T,x, x,T,x,x, x,T,x,T, x,x,x,x, T,T,x,x, T,x,x,T, x,x,T,x, T,T,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,T,x, T,x,T,T, T,T,T,x, x,x,T,T, T,T,x,T, x,T,x,x, T,T,T,x, T,x,T,T, T,T,T,T, T,T,T,T, x,x,x,T, T,x,T,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,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,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,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, T,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,T,x,x, x,x,x,T, 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,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,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, T,x,x,x, x,x,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, T,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,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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} }; + + string ErrorDesc(int errorNumber) + { + switch (errorNumber) { + case 0: return "EOF expected"; + case 1: return "EOL expected"; + case 2: return "ident expected"; + case 3: return "LiteralString expected"; + case 4: return "LiteralCharacter expected"; + case 5: return "LiteralInteger expected"; + case 6: return "LiteralDouble expected"; + case 7: return "LiteralSingle expected"; + case 8: return "LiteralDecimal expected"; + case 9: return "LiteralDate expected"; + case 10: return "\"=\" expected"; + case 11: return "\":\" expected"; + case 12: return "\",\" expected"; + case 13: return "\"&\" expected"; + case 14: return "\"/\" expected"; + case 15: return "\"\\\\\" expected"; + case 16: return "\".\" expected"; + case 17: return "\"!\" expected"; + case 18: return "\"-\" expected"; + case 19: return "\"+\" expected"; + case 20: return "\"^\" expected"; + case 21: return "\"?\" expected"; + case 22: return "\"*\" expected"; + case 23: return "\"{\" expected"; + case 24: return "\"}\" expected"; + case 25: return "\"(\" expected"; + case 26: return "\")\" expected"; + case 27: return "\">\" expected"; + case 28: return "\"<\" expected"; + case 29: return "\"<>\" expected"; + case 30: return "\">=\" expected"; + case 31: return "\"<=\" expected"; + case 32: return "\"<<\" expected"; + case 33: return "\">>\" expected"; + case 34: return "\"+=\" expected"; + case 35: return "\"^=\" expected"; + case 36: return "\"-=\" expected"; + case 37: return "\"*=\" expected"; + case 38: return "\"/=\" expected"; + case 39: return "\"\\\\=\" expected"; + case 40: return "\"<<=\" expected"; + case 41: return "\">>=\" expected"; + case 42: return "\"&=\" expected"; + case 43: return "\"AddHandler\" expected"; + case 44: return "\"AddressOf\" expected"; + case 45: return "\"Aggregate\" expected"; + case 46: return "\"Alias\" expected"; + case 47: return "\"And\" expected"; + case 48: return "\"AndAlso\" expected"; + case 49: return "\"Ansi\" expected"; + case 50: return "\"As\" expected"; + case 51: return "\"Ascending\" expected"; + case 52: return "\"Assembly\" expected"; + case 53: return "\"Auto\" expected"; + case 54: return "\"Binary\" expected"; + case 55: return "\"Boolean\" expected"; + case 56: return "\"ByRef\" expected"; + case 57: return "\"By\" expected"; + case 58: return "\"Byte\" expected"; + case 59: return "\"ByVal\" expected"; + case 60: return "\"Call\" expected"; + case 61: return "\"Case\" expected"; + case 62: return "\"Catch\" expected"; + case 63: return "\"CBool\" expected"; + case 64: return "\"CByte\" expected"; + case 65: return "\"CChar\" expected"; + case 66: return "\"CDate\" expected"; + case 67: return "\"CDbl\" expected"; + case 68: return "\"CDec\" expected"; + case 69: return "\"Char\" expected"; + case 70: return "\"CInt\" expected"; + case 71: return "\"Class\" expected"; + case 72: return "\"CLng\" expected"; + case 73: return "\"CObj\" expected"; + case 74: return "\"Compare\" expected"; + case 75: return "\"Const\" expected"; + case 76: return "\"Continue\" expected"; + case 77: return "\"CSByte\" expected"; + case 78: return "\"CShort\" expected"; + case 79: return "\"CSng\" expected"; + case 80: return "\"CStr\" expected"; + case 81: return "\"CType\" expected"; + case 82: return "\"CUInt\" expected"; + case 83: return "\"CULng\" expected"; + case 84: return "\"CUShort\" expected"; + case 85: return "\"Custom\" expected"; + case 86: return "\"Date\" expected"; + case 87: return "\"Decimal\" expected"; + case 88: return "\"Declare\" expected"; + case 89: return "\"Default\" expected"; + case 90: return "\"Delegate\" expected"; + case 91: return "\"Descending\" expected"; + case 92: return "\"Dim\" expected"; + case 93: return "\"DirectCast\" expected"; + case 94: return "\"Distinct\" expected"; + case 95: return "\"Do\" expected"; + case 96: return "\"Double\" expected"; + case 97: return "\"Each\" expected"; + case 98: return "\"Else\" expected"; + case 99: return "\"ElseIf\" expected"; + case 100: return "\"End\" expected"; + case 101: return "\"EndIf\" expected"; + case 102: return "\"Enum\" expected"; + case 103: return "\"Equals\" expected"; + case 104: return "\"Erase\" expected"; + case 105: return "\"Error\" expected"; + case 106: return "\"Event\" expected"; + case 107: return "\"Exit\" expected"; + case 108: return "\"Explicit\" expected"; + case 109: return "\"False\" expected"; + case 110: return "\"Finally\" expected"; + case 111: return "\"For\" expected"; + case 112: return "\"Friend\" expected"; + case 113: return "\"From\" expected"; + case 114: return "\"Function\" expected"; + case 115: return "\"Get\" expected"; + case 116: return "\"GetType\" expected"; + case 117: return "\"Global\" expected"; + case 118: return "\"GoSub\" expected"; + case 119: return "\"GoTo\" expected"; + case 120: return "\"Group\" expected"; + case 121: return "\"Handles\" expected"; + case 122: return "\"If\" expected"; + case 123: return "\"Implements\" expected"; + case 124: return "\"Imports\" expected"; + case 125: return "\"In\" expected"; + case 126: return "\"Infer\" expected"; + case 127: return "\"Inherits\" expected"; + case 128: return "\"Integer\" expected"; + case 129: return "\"Interface\" expected"; + case 130: return "\"Into\" expected"; + case 131: return "\"Is\" expected"; + case 132: return "\"IsNot\" expected"; + case 133: return "\"Join\" expected"; + case 134: return "\"Let\" expected"; + case 135: return "\"Lib\" expected"; + case 136: return "\"Like\" expected"; + case 137: return "\"Long\" expected"; + case 138: return "\"Loop\" expected"; + case 139: return "\"Me\" expected"; + case 140: return "\"Mod\" expected"; + case 141: return "\"Module\" expected"; + case 142: return "\"MustInherit\" expected"; + case 143: return "\"MustOverride\" expected"; + case 144: return "\"MyBase\" expected"; + case 145: return "\"MyClass\" expected"; + case 146: return "\"Namespace\" expected"; + case 147: return "\"Narrowing\" expected"; + case 148: return "\"New\" expected"; + case 149: return "\"Next\" expected"; + case 150: return "\"Not\" expected"; + case 151: return "\"Nothing\" expected"; + case 152: return "\"NotInheritable\" expected"; + case 153: return "\"NotOverridable\" expected"; + case 154: return "\"Object\" expected"; + case 155: return "\"Of\" expected"; + case 156: return "\"Off\" expected"; + case 157: return "\"On\" expected"; + case 158: return "\"Operator\" expected"; + case 159: return "\"Option\" expected"; + case 160: return "\"Optional\" expected"; + case 161: return "\"Or\" expected"; + case 162: return "\"Order\" expected"; + case 163: return "\"OrElse\" expected"; + case 164: return "\"Overloads\" expected"; + case 165: return "\"Overridable\" expected"; + case 166: return "\"Overrides\" expected"; + case 167: return "\"ParamArray\" expected"; + case 168: return "\"Partial\" expected"; + case 169: return "\"Preserve\" expected"; + case 170: return "\"Private\" expected"; + case 171: return "\"Property\" expected"; + case 172: return "\"Protected\" expected"; + case 173: return "\"Public\" expected"; + case 174: return "\"RaiseEvent\" expected"; + case 175: return "\"ReadOnly\" expected"; + case 176: return "\"ReDim\" expected"; + case 177: return "\"Rem\" expected"; + case 178: return "\"RemoveHandler\" expected"; + case 179: return "\"Resume\" expected"; + case 180: return "\"Return\" expected"; + case 181: return "\"SByte\" expected"; + case 182: return "\"Select\" expected"; + case 183: return "\"Set\" expected"; + case 184: return "\"Shadows\" expected"; + case 185: return "\"Shared\" expected"; + case 186: return "\"Short\" expected"; + case 187: return "\"Single\" expected"; + case 188: return "\"Skip\" expected"; + case 189: return "\"Static\" expected"; + case 190: return "\"Step\" expected"; + case 191: return "\"Stop\" expected"; + case 192: return "\"Strict\" expected"; + case 193: return "\"String\" expected"; + case 194: return "\"Structure\" expected"; + case 195: return "\"Sub\" expected"; + case 196: return "\"SyncLock\" expected"; + case 197: return "\"Take\" expected"; + case 198: return "\"Text\" expected"; + case 199: return "\"Then\" expected"; + case 200: return "\"Throw\" expected"; + case 201: return "\"To\" expected"; + case 202: return "\"True\" expected"; + case 203: return "\"Try\" expected"; + case 204: return "\"TryCast\" expected"; + case 205: return "\"TypeOf\" expected"; + case 206: return "\"UInteger\" expected"; + case 207: return "\"ULong\" expected"; + case 208: return "\"Unicode\" expected"; + case 209: return "\"Until\" expected"; + case 210: return "\"UShort\" expected"; + case 211: return "\"Using\" expected"; + case 212: return "\"Variant\" expected"; + case 213: return "\"Wend\" expected"; + case 214: return "\"When\" expected"; + case 215: return "\"Where\" expected"; + case 216: return "\"While\" expected"; + case 217: return "\"Widening\" expected"; + case 218: return "\"With\" expected"; + case 219: return "\"WithEvents\" expected"; + case 220: return "\"WriteOnly\" expected"; + case 221: return "\"Xor\" expected"; + case 222: return "??? expected"; + case 223: return "invalid EndOfStmt"; + case 224: return "invalid OptionStmt"; + case 225: return "invalid OptionStmt"; + case 226: return "invalid GlobalAttributeSection"; + case 227: return "invalid GlobalAttributeSection"; + case 228: return "invalid NamespaceMemberDecl"; + case 229: return "invalid OptionValue"; + case 230: return "invalid ImportClause"; + case 231: return "invalid Identifier"; + case 232: return "invalid AttributeSection"; + case 233: return "invalid TypeModifier"; + case 234: return "invalid NonModuleDeclaration"; + case 235: return "invalid NonModuleDeclaration"; + case 236: return "invalid TypeParameterConstraints"; + case 237: return "invalid TypeParameterConstraint"; + case 238: return "invalid NonArrayTypeName"; + case 239: return "invalid MemberModifier"; + case 240: return "invalid StructureMemberDecl"; + case 241: return "invalid StructureMemberDecl"; + case 242: return "invalid StructureMemberDecl"; + case 243: return "invalid StructureMemberDecl"; + case 244: return "invalid StructureMemberDecl"; + case 245: return "invalid StructureMemberDecl"; + case 246: return "invalid StructureMemberDecl"; + case 247: return "invalid StructureMemberDecl"; + case 248: return "invalid InterfaceMemberDecl"; + case 249: return "invalid InterfaceMemberDecl"; + case 250: return "invalid Expr"; + case 251: return "invalid Charset"; + case 252: return "invalid IdentifierForFieldDeclaration"; + case 253: return "invalid VariableDeclaratorPartAfterIdentifier"; + case 254: return "invalid AccessorDecls"; + case 255: return "invalid EventAccessorDeclaration"; + case 256: return "invalid OverloadableOperator"; + case 257: return "invalid EventMemberSpecifier"; + case 258: return "invalid AssignmentOperator"; + case 259: return "invalid SimpleNonInvocationExpression"; + case 260: return "invalid PrimitiveTypeName"; + case 261: return "invalid CastTarget"; + case 262: return "invalid ComparisonExpr"; + case 263: return "invalid FromOrAggregateQueryOperator"; + case 264: return "invalid QueryOperator"; + case 265: return "invalid PartitionQueryOperator"; + case 266: return "invalid Argument"; + case 267: return "invalid QualIdentAndTypeArguments"; + case 268: return "invalid AttributeArguments"; + case 269: return "invalid ParameterModifier"; + case 270: return "invalid Statement"; + case 271: return "invalid LabelName"; + case 272: return "invalid EmbeddedStatement"; + case 273: return "invalid EmbeddedStatement"; + case 274: return "invalid EmbeddedStatement"; + case 275: return "invalid EmbeddedStatement"; + case 276: return "invalid EmbeddedStatement"; + case 277: return "invalid EmbeddedStatement"; + case 278: return "invalid EmbeddedStatement"; + case 279: return "invalid WhileOrUntil"; + case 280: return "invalid SingleLineStatementList"; + case 281: return "invalid SingleLineStatementList"; + case 282: return "invalid OnErrorStatement"; + case 283: return "invalid ResumeStatement"; + case 284: return "invalid CaseClause"; + case 285: return "invalid CaseClause"; + + default: return "error " + errorNumber; + } + } + } // end Parser -} \ No newline at end of file +} // end namespace diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG index 32f13fc824..233f732046 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG @@ -8,6 +8,8 @@ using ASTAttribute = ICSharpCode.NRefactory.Ast.Attribute; COMPILER VBNET +$frameDir=../Frames + /* START AUTOGENERATED TOKENS SECTION */ TOKENS /* ----- terminal classes ----- */ @@ -335,7 +337,7 @@ ImportClause } .) ) | ( (. string prefix = null; .) - "<" Identifier /* TODO this is "xmlns" */ [ ":" Identifier (. prefix = t.val; .) ] "=" LiteralString /* TODO support single-quote xml strings */ (. u = new Using(t.literalValue as string, prefix); .) ">" + "<" Identifier (. prefix = t.val; .) "=" LiteralString /* TODO support single-quote xml strings */ (. u = new Using(t.literalValue as string, prefix); .) ">" ) . @@ -370,10 +372,11 @@ NamespaceMemberDecl . /* 4.9.1 */ -TypeParameterList templates> - =(. +TypeParameterList<. List templates .> +(. TemplateDefinition template; .) += [ IF (la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) "(" "Of" TypeParameter @@ -425,7 +428,7 @@ TypeParameterConstraint . /* 6.4.2 */ -NonModuleDeclaration attributes> +NonModuleDeclaration<. ModifierList m, List attributes .> (. TypeReference typeRef = null; List baseInterfaces = null; @@ -762,7 +765,7 @@ EnumMemberDecl EndOfStmt . -ClassMemberDecl attributes> = +ClassMemberDecl<. ModifierList m, List attributes .> = StructureMemberDecl . @@ -776,7 +779,7 @@ ClassBaseType . /* 7.6.1 */ -StructureMemberDecl attributes> +StructureMemberDecl<. ModifierList m, List attributes .> (. TypeReference type = null; List p = new List(); @@ -1370,7 +1373,7 @@ AccessorDecls . /* 9.7.1 */ -GetAccessorDecl attributes> +GetAccessorDecl<. out PropertyGetRegion getBlock, List attributes .> (. Statement stmt = null; Modifiers m; .) = PropertyAccessorAccessModifier @@ -1386,7 +1389,7 @@ GetAccessorDecl attribute . /* 9.7.2 */ -SetAccessorDecl attributes> +SetAccessorDecl<. out PropertySetRegion setBlock, List attributes .> (. Statement stmt = null; List p = new List(); @@ -1410,7 +1413,7 @@ SetAccessorDecl attribute . /* 9.5 */ -ConstantDeclarator constantDeclaration> +ConstantDeclarator<. List constantDeclaration .> (. Expression expr = null; TypeReference type = null; @@ -1429,13 +1432,13 @@ ConstantDeclarator constantDeclaration> . /* 9.6 */ -VariableDeclarator fieldDeclaration> +VariableDeclarator<. List fieldDeclaration .> = Identifier (. string name = t.val; .) VariableDeclaratorPartAfterIdentifier . -VariableDeclaratorPartAfterIdentifier fieldDeclaration, string name> +VariableDeclaratorPartAfterIdentifier<. List fieldDeclaration, string name .> (. Expression expr = null; TypeReference type = null; @@ -1503,7 +1506,7 @@ VariableDeclaratorPartAfterIdentifier fieldDeclaration . /* 6.8 */ -ArrayInitializationModifier arrayModifiers> +ArrayInitializationModifier<. out List arrayModifiers .> (. arrayModifiers = null; .) = @@ -1511,7 +1514,7 @@ ArrayInitializationModifier arrayModifiers> . /* 7.5.4.3 */ -InitializationRankList rank> +InitializationRankList<. out List rank .> (. rank = new List(); Expression expr = null; @@ -1558,7 +1561,7 @@ Charset . /* 9.2.6 */ -HandlesClause handlesClause> +HandlesClause<. out List handlesClause .> (. handlesClause = new List(); string name; @@ -1568,7 +1571,7 @@ HandlesClause handlesClause> . /* 7.8. */ -InterfaceBase bases> +InterfaceBase<. out List bases .> (. TypeReference type; bases = new List(); @@ -1583,7 +1586,7 @@ InterfaceBase bases> . /* 7.2 */ -TypeImplementsClause baseInterfaces> +TypeImplementsClause<. out List baseInterfaces .> (. baseInterfaces = new List(); TypeReference type = null; @@ -1600,7 +1603,7 @@ TypeImplementsClause baseInterfaces> . /* 9.1 */ -ImplementsClause baseInterfaces> +ImplementsClause<. out List baseInterfaces .> (. baseInterfaces = new List(); TypeReference type = null; @@ -2059,7 +2062,7 @@ QueryExpr .) . -FromOrAggregateQueryOperator middleClauses> +FromOrAggregateQueryOperator<. List middleClauses .> (. QueryExpressionFromClause fromClause = null; QueryExpressionAggregateClause aggregateClause = null; @@ -2070,7 +2073,7 @@ FromOrAggregateQueryOperator middleClauses> (. middleClauses.Add(aggregateClause); .) . -QueryOperator middleClauses> +QueryOperator<. List middleClauses .> (. QueryExpressionJoinVBClause joinClause = null; QueryExpressionGroupVBClause groupByClause = null; @@ -2098,7 +2101,7 @@ QueryOperator middleClauses> (. middleClauses.Add(groupByClause); .) . -OrderByQueryOperator middleClauses> +OrderByQueryOperator<. List middleClauses .> (. QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause(); orderClause.StartLocation = la.Location; @@ -2112,7 +2115,7 @@ OrderByQueryOperator middleClauses> .) . -OrderExpressionList orderings> +OrderExpressionList<. out List orderings .> (. orderings = new List(); QueryExpressionOrdering ordering = null; @@ -2181,7 +2184,7 @@ FromQueryOperator .) . -SelectQueryOperator middleClauses> +SelectQueryOperator<. List middleClauses .> (. QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause(); selectClause.StartLocation = la.Location; @@ -2193,7 +2196,7 @@ SelectQueryOperator middleClauses> .) . -DistinctQueryOperator middleClauses> +DistinctQueryOperator<. List middleClauses .> (. QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause(); distinctClause.StartLocation = la.Location; @@ -2205,7 +2208,7 @@ DistinctQueryOperator middleClauses> .) . -WhereQueryOperator middleClauses> +WhereQueryOperator<. List middleClauses .> (. QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause(); whereClause.StartLocation = la.Location; @@ -2259,7 +2262,7 @@ AggregateQueryOperator .) . -LetQueryOperator middleClauses> +LetQueryOperator<. List middleClauses .> (. QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause(); letClause.StartLocation = la.Location; @@ -2271,7 +2274,7 @@ LetQueryOperator middleClauses> .) . -ExpressionRangeVariableDeclarationList variables> +ExpressionRangeVariableDeclarationList<. List variables .> (. ExpressionRangeVariable variable = null; .) = @@ -2330,7 +2333,7 @@ JoinQueryOperator .) . -CollectionRangeVariableDeclarationList rangeVariables> +CollectionRangeVariableDeclarationList<. List rangeVariables .> (. CollectionRangeVariable variableDeclaration; .) = CollectionRangeVariableDeclaration @@ -2389,7 +2392,7 @@ MemberInitializer . /* 9.3.2 */ -ArgumentList arguments> +ArgumentList<. out List arguments .> (. arguments = new List(); Expression expr = null; @@ -2403,7 +2406,7 @@ ArgumentList arguments> . /* argument list that hasn't decided if it is method call or array initialisation */ -NormalOrReDimArgumentList arguments, out bool canBeNormal, out bool canBeRedim> +NormalOrReDimArgumentList<. out List arguments, out bool canBeNormal, out bool canBeRedim .> (. arguments = new List(); canBeNormal = true; canBeRedim = !IsNamedAssign(); @@ -2558,7 +2561,7 @@ RankList . /* 7.12 */ -TypeArgumentList typeArguments> +TypeArgumentList<. List typeArguments .> (. TypeReference typeref; .) = @@ -2607,7 +2610,7 @@ Attribute . /* Spec, 5.2.2 */ -AttributeArguments positional, List named> +AttributeArguments<. List positional, List named .> (. bool nameFound = false; string name = ""; @@ -2682,7 +2685,7 @@ AttributeSection . /* 9.2.5 */ -FormalParameterList parameter> +FormalParameterList<. List parameter .> (. ParameterDeclarationExpression p; .) = FormalParameter (. if (p != null) parameter.Add(p); .) @@ -2729,7 +2732,7 @@ FormalParameter . /* 10.1 */ -Block +Block = (. BlockStatement blockStmt = new BlockStatement(); @@ -3096,7 +3099,7 @@ EmbeddedStatement | LocalDeclarationStatement . -SingleLineStatementList list> +SingleLineStatementList<. List list .> (. Statement embeddedStatement = null; .) = ( "End" (. embeddedStatement = new EndStatement(); .) @@ -3227,7 +3230,7 @@ ResumeStatement . /* 18.8.2 */ -CaseClauses caseClauses> +CaseClauses<. out List caseClauses .> (. caseClauses = new List(); CaseLabel caseClause = null; @@ -3309,7 +3312,7 @@ TryStatement . /* 10.10.1.2 */ -CatchClauses catchClauses> +CatchClauses<. out List catchClauses .> (. catchClauses = new List(); TypeReference type = null; @@ -3380,7 +3383,7 @@ IdentifierForFieldDeclaration = IdentifierOrKeyword = - (. lexer.NextToken(); name = t.val; .) + ANY (. name = t.val; .) . @@ -3433,7 +3436,7 @@ MemberModifier = | "Private" (.m.Add(Modifiers.Private, t.Location);.) | "Protected" (.m.Add(Modifiers.Protected, t.Location);.) | "Public" (.m.Add(Modifiers.Public, t.Location);.) - | "NotInheritable" (.m.Add(Modifiers.Sealed, t.Location);.) + | "NotInheritable" (.m.Add(Modifiers.Sealed, t.Location);.) | "NotOverridable" (.m.Add(Modifiers.Sealed, t.Location);.) | "Shared" (.m.Add(Modifiers.Static, t.Location);.) | "Overridable" (.m.Add(Modifiers.Virtual, t.Location);.) diff --git a/src/Libraries/NRefactory/Project/Src/Visitors/AbstractASTVisitor.cs b/src/Libraries/NRefactory/Project/Src/Visitors/AbstractASTVisitor.cs index babdd0bbf5..3d810d0fcc 100644 --- a/src/Libraries/NRefactory/Project/Src/Visitors/AbstractASTVisitor.cs +++ b/src/Libraries/NRefactory/Project/Src/Visitors/AbstractASTVisitor.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Libraries/NRefactory/Project/Src/Visitors/AbstractAstTransformer.cs b/src/Libraries/NRefactory/Project/Src/Visitors/AbstractAstTransformer.cs index c91116c79a..13f886995c 100644 --- a/src/Libraries/NRefactory/Project/Src/Visitors/AbstractAstTransformer.cs +++ b/src/Libraries/NRefactory/Project/Src/Visitors/AbstractAstTransformer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Libraries/NRefactory/Project/Src/Visitors/NodeTrackingAstVisitor.cs b/src/Libraries/NRefactory/Project/Src/Visitors/NodeTrackingAstVisitor.cs index 9a169cdd04..f8b31e47c1 100644 --- a/src/Libraries/NRefactory/Project/Src/Visitors/NodeTrackingAstVisitor.cs +++ b/src/Libraries/NRefactory/Project/Src/Visitors/NodeTrackingAstVisitor.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Libraries/NRefactory/Project/Src/Visitors/NotImplementedAstVisitor.cs b/src/Libraries/NRefactory/Project/Src/Visitors/NotImplementedAstVisitor.cs index 7a398aa60c..2a64c2ac66 100644 --- a/src/Libraries/NRefactory/Project/Src/Visitors/NotImplementedAstVisitor.cs +++ b/src/Libraries/NRefactory/Project/Src/Visitors/NotImplementedAstVisitor.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Libraries/NRefactory/Test/Lexer/CSharp/LexerTests.cs b/src/Libraries/NRefactory/Test/Lexer/CSharp/LexerTests.cs index cf4235f9af..cff08f18c1 100644 --- a/src/Libraries/NRefactory/Test/Lexer/CSharp/LexerTests.cs +++ b/src/Libraries/NRefactory/Test/Lexer/CSharp/LexerTests.cs @@ -1,10 +1,4 @@ -// -// -// -// -// $Revision$ -// - +// this file was autogenerated by a tool. using System; using System.IO; using NUnit.Framework; @@ -344,557 +338,676 @@ namespace ICSharpCode.NRefactory.Tests.Lexer.CSharp Assert.AreEqual(Tokens.LambdaArrow, lexer.NextToken().Kind); } - [Test()] + [Test] public void TestAbstract() { ILexer lexer = GenerateLexer(new StringReader("abstract")); Assert.AreEqual(Tokens.Abstract, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAs() { ILexer lexer = GenerateLexer(new StringReader("as")); Assert.AreEqual(Tokens.As, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBase() { ILexer lexer = GenerateLexer(new StringReader("base")); Assert.AreEqual(Tokens.Base, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBool() { ILexer lexer = GenerateLexer(new StringReader("bool")); Assert.AreEqual(Tokens.Bool, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBreak() { ILexer lexer = GenerateLexer(new StringReader("break")); Assert.AreEqual(Tokens.Break, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestByte() { ILexer lexer = GenerateLexer(new StringReader("byte")); Assert.AreEqual(Tokens.Byte, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCase() { ILexer lexer = GenerateLexer(new StringReader("case")); Assert.AreEqual(Tokens.Case, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCatch() { ILexer lexer = GenerateLexer(new StringReader("catch")); Assert.AreEqual(Tokens.Catch, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestChar() { ILexer lexer = GenerateLexer(new StringReader("char")); Assert.AreEqual(Tokens.Char, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestChecked() { ILexer lexer = GenerateLexer(new StringReader("checked")); Assert.AreEqual(Tokens.Checked, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestClass() { ILexer lexer = GenerateLexer(new StringReader("class")); Assert.AreEqual(Tokens.Class, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestConst() { ILexer lexer = GenerateLexer(new StringReader("const")); Assert.AreEqual(Tokens.Const, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestContinue() { ILexer lexer = GenerateLexer(new StringReader("continue")); Assert.AreEqual(Tokens.Continue, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDecimal() { ILexer lexer = GenerateLexer(new StringReader("decimal")); Assert.AreEqual(Tokens.Decimal, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDefault() { ILexer lexer = GenerateLexer(new StringReader("default")); Assert.AreEqual(Tokens.Default, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDelegate() { ILexer lexer = GenerateLexer(new StringReader("delegate")); Assert.AreEqual(Tokens.Delegate, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDo() { ILexer lexer = GenerateLexer(new StringReader("do")); Assert.AreEqual(Tokens.Do, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDouble() { ILexer lexer = GenerateLexer(new StringReader("double")); Assert.AreEqual(Tokens.Double, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestElse() { ILexer lexer = GenerateLexer(new StringReader("else")); Assert.AreEqual(Tokens.Else, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEnum() { ILexer lexer = GenerateLexer(new StringReader("enum")); Assert.AreEqual(Tokens.Enum, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEvent() { ILexer lexer = GenerateLexer(new StringReader("event")); Assert.AreEqual(Tokens.Event, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestExplicit() { ILexer lexer = GenerateLexer(new StringReader("explicit")); Assert.AreEqual(Tokens.Explicit, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestExtern() { ILexer lexer = GenerateLexer(new StringReader("extern")); Assert.AreEqual(Tokens.Extern, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFalse() { ILexer lexer = GenerateLexer(new StringReader("false")); Assert.AreEqual(Tokens.False, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFinally() { ILexer lexer = GenerateLexer(new StringReader("finally")); Assert.AreEqual(Tokens.Finally, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFixed() { ILexer lexer = GenerateLexer(new StringReader("fixed")); Assert.AreEqual(Tokens.Fixed, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFloat() { ILexer lexer = GenerateLexer(new StringReader("float")); Assert.AreEqual(Tokens.Float, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFor() { ILexer lexer = GenerateLexer(new StringReader("for")); Assert.AreEqual(Tokens.For, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestForeach() { ILexer lexer = GenerateLexer(new StringReader("foreach")); Assert.AreEqual(Tokens.Foreach, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGoto() { ILexer lexer = GenerateLexer(new StringReader("goto")); Assert.AreEqual(Tokens.Goto, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIf() { ILexer lexer = GenerateLexer(new StringReader("if")); Assert.AreEqual(Tokens.If, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestImplicit() { ILexer lexer = GenerateLexer(new StringReader("implicit")); Assert.AreEqual(Tokens.Implicit, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIn() { ILexer lexer = GenerateLexer(new StringReader("in")); Assert.AreEqual(Tokens.In, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInt() { ILexer lexer = GenerateLexer(new StringReader("int")); Assert.AreEqual(Tokens.Int, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInterface() { ILexer lexer = GenerateLexer(new StringReader("interface")); Assert.AreEqual(Tokens.Interface, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInternal() { ILexer lexer = GenerateLexer(new StringReader("internal")); Assert.AreEqual(Tokens.Internal, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIs() { ILexer lexer = GenerateLexer(new StringReader("is")); Assert.AreEqual(Tokens.Is, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLock() { ILexer lexer = GenerateLexer(new StringReader("lock")); Assert.AreEqual(Tokens.Lock, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLong() { ILexer lexer = GenerateLexer(new StringReader("long")); Assert.AreEqual(Tokens.Long, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNamespace() { ILexer lexer = GenerateLexer(new StringReader("namespace")); Assert.AreEqual(Tokens.Namespace, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNew() { ILexer lexer = GenerateLexer(new StringReader("new")); Assert.AreEqual(Tokens.New, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNull() { ILexer lexer = GenerateLexer(new StringReader("null")); Assert.AreEqual(Tokens.Null, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestObject() { ILexer lexer = GenerateLexer(new StringReader("object")); Assert.AreEqual(Tokens.Object, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOperator() { ILexer lexer = GenerateLexer(new StringReader("operator")); Assert.AreEqual(Tokens.Operator, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOut() { ILexer lexer = GenerateLexer(new StringReader("out")); Assert.AreEqual(Tokens.Out, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOverride() { ILexer lexer = GenerateLexer(new StringReader("override")); Assert.AreEqual(Tokens.Override, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestParams() { ILexer lexer = GenerateLexer(new StringReader("params")); Assert.AreEqual(Tokens.Params, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPrivate() { ILexer lexer = GenerateLexer(new StringReader("private")); Assert.AreEqual(Tokens.Private, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestProtected() { ILexer lexer = GenerateLexer(new StringReader("protected")); Assert.AreEqual(Tokens.Protected, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPublic() { ILexer lexer = GenerateLexer(new StringReader("public")); Assert.AreEqual(Tokens.Public, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestReadonly() { ILexer lexer = GenerateLexer(new StringReader("readonly")); Assert.AreEqual(Tokens.Readonly, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestRef() { ILexer lexer = GenerateLexer(new StringReader("ref")); Assert.AreEqual(Tokens.Ref, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestReturn() { ILexer lexer = GenerateLexer(new StringReader("return")); Assert.AreEqual(Tokens.Return, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSbyte() { ILexer lexer = GenerateLexer(new StringReader("sbyte")); Assert.AreEqual(Tokens.Sbyte, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSealed() { ILexer lexer = GenerateLexer(new StringReader("sealed")); Assert.AreEqual(Tokens.Sealed, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestShort() { ILexer lexer = GenerateLexer(new StringReader("short")); Assert.AreEqual(Tokens.Short, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSizeof() { ILexer lexer = GenerateLexer(new StringReader("sizeof")); Assert.AreEqual(Tokens.Sizeof, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStackalloc() { ILexer lexer = GenerateLexer(new StringReader("stackalloc")); Assert.AreEqual(Tokens.Stackalloc, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStatic() { ILexer lexer = GenerateLexer(new StringReader("static")); Assert.AreEqual(Tokens.Static, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestString() { ILexer lexer = GenerateLexer(new StringReader("string")); Assert.AreEqual(Tokens.String, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStruct() { ILexer lexer = GenerateLexer(new StringReader("struct")); Assert.AreEqual(Tokens.Struct, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSwitch() { ILexer lexer = GenerateLexer(new StringReader("switch")); Assert.AreEqual(Tokens.Switch, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestThis() { ILexer lexer = GenerateLexer(new StringReader("this")); Assert.AreEqual(Tokens.This, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestThrow() { ILexer lexer = GenerateLexer(new StringReader("throw")); Assert.AreEqual(Tokens.Throw, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTrue() { ILexer lexer = GenerateLexer(new StringReader("true")); Assert.AreEqual(Tokens.True, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTry() { ILexer lexer = GenerateLexer(new StringReader("try")); Assert.AreEqual(Tokens.Try, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTypeof() { ILexer lexer = GenerateLexer(new StringReader("typeof")); Assert.AreEqual(Tokens.Typeof, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUint() { ILexer lexer = GenerateLexer(new StringReader("uint")); Assert.AreEqual(Tokens.Uint, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUlong() { ILexer lexer = GenerateLexer(new StringReader("ulong")); Assert.AreEqual(Tokens.Ulong, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUnchecked() { ILexer lexer = GenerateLexer(new StringReader("unchecked")); Assert.AreEqual(Tokens.Unchecked, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUnsafe() { ILexer lexer = GenerateLexer(new StringReader("unsafe")); Assert.AreEqual(Tokens.Unsafe, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUshort() { ILexer lexer = GenerateLexer(new StringReader("ushort")); Assert.AreEqual(Tokens.Ushort, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUsing() { ILexer lexer = GenerateLexer(new StringReader("using")); Assert.AreEqual(Tokens.Using, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestVirtual() { ILexer lexer = GenerateLexer(new StringReader("virtual")); Assert.AreEqual(Tokens.Virtual, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestVoid() { ILexer lexer = GenerateLexer(new StringReader("void")); Assert.AreEqual(Tokens.Void, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestVolatile() { ILexer lexer = GenerateLexer(new StringReader("volatile")); Assert.AreEqual(Tokens.Volatile, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWhile() { ILexer lexer = GenerateLexer(new StringReader("while")); Assert.AreEqual(Tokens.While, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPartial() { ILexer lexer = GenerateLexer(new StringReader("partial")); Assert.AreEqual(Tokens.Partial, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWhere() { ILexer lexer = GenerateLexer(new StringReader("where")); Assert.AreEqual(Tokens.Where, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGet() { ILexer lexer = GenerateLexer(new StringReader("get")); Assert.AreEqual(Tokens.Get, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSet() { ILexer lexer = GenerateLexer(new StringReader("set")); Assert.AreEqual(Tokens.Set, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAdd() { ILexer lexer = GenerateLexer(new StringReader("add")); Assert.AreEqual(Tokens.Add, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestRemove() { ILexer lexer = GenerateLexer(new StringReader("remove")); Assert.AreEqual(Tokens.Remove, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestYield() { ILexer lexer = GenerateLexer(new StringReader("yield")); Assert.AreEqual(Tokens.Yield, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSelect() { ILexer lexer = GenerateLexer(new StringReader("select")); Assert.AreEqual(Tokens.Select, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGroup() { ILexer lexer = GenerateLexer(new StringReader("group")); Assert.AreEqual(Tokens.Group, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBy() { ILexer lexer = GenerateLexer(new StringReader("by")); Assert.AreEqual(Tokens.By, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInto() { ILexer lexer = GenerateLexer(new StringReader("into")); Assert.AreEqual(Tokens.Into, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFrom() { ILexer lexer = GenerateLexer(new StringReader("from")); Assert.AreEqual(Tokens.From, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAscending() { ILexer lexer = GenerateLexer(new StringReader("ascending")); Assert.AreEqual(Tokens.Ascending, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDescending() { ILexer lexer = GenerateLexer(new StringReader("descending")); Assert.AreEqual(Tokens.Descending, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOrderby() { ILexer lexer = GenerateLexer(new StringReader("orderby")); Assert.AreEqual(Tokens.Orderby, lexer.NextToken().Kind); } + + [Test] + public void TestLet() + { + ILexer lexer = GenerateLexer(new StringReader("let")); + Assert.AreEqual(Tokens.Let, lexer.NextToken().Kind); + } + + [Test] + public void TestJoin() + { + ILexer lexer = GenerateLexer(new StringReader("join")); + Assert.AreEqual(Tokens.Join, lexer.NextToken().Kind); + } + + [Test] + public void TestOn() + { + ILexer lexer = GenerateLexer(new StringReader("on")); + Assert.AreEqual(Tokens.On, lexer.NextToken().Kind); + } + + [Test] + public void TestEquals() + { + ILexer lexer = GenerateLexer(new StringReader("equals")); + Assert.AreEqual(Tokens.Equals, lexer.NextToken().Kind); + } } } diff --git a/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerTests.cs b/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerTests.cs index fdb5a6e7c5..6333c6fa8a 100644 --- a/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerTests.cs +++ b/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerTests.cs @@ -1,7 +1,7 @@ +// this file was autogenerated by a tool. using System; using System.IO; using NUnit.Framework; - using ICSharpCode.NRefactory.Parser; using ICSharpCode.NRefactory.Parser.VB; using ICSharpCode.NRefactory.PrettyPrinter; @@ -247,1069 +247,1246 @@ namespace ICSharpCode.NRefactory.Tests.Lexer.VB Assert.AreEqual(Tokens.ConcatStringAssign, lexer.NextToken().Kind); } - [Test()] + [Test] public void TestAddHandler() { ILexer lexer = GenerateLexer(new StringReader("AddHandler")); Assert.AreEqual(Tokens.AddHandler, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAddressOf() { ILexer lexer = GenerateLexer(new StringReader("AddressOf")); Assert.AreEqual(Tokens.AddressOf, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAggregate() { ILexer lexer = GenerateLexer(new StringReader("Aggregate")); Assert.AreEqual(Tokens.Aggregate, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAlias() { ILexer lexer = GenerateLexer(new StringReader("Alias")); Assert.AreEqual(Tokens.Alias, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAnd() { ILexer lexer = GenerateLexer(new StringReader("And")); Assert.AreEqual(Tokens.And, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAndAlso() { ILexer lexer = GenerateLexer(new StringReader("AndAlso")); Assert.AreEqual(Tokens.AndAlso, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAnsi() { ILexer lexer = GenerateLexer(new StringReader("Ansi")); Assert.AreEqual(Tokens.Ansi, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAs() { ILexer lexer = GenerateLexer(new StringReader("As")); Assert.AreEqual(Tokens.As, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAscending() { ILexer lexer = GenerateLexer(new StringReader("Ascending")); Assert.AreEqual(Tokens.Ascending, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAssembly() { ILexer lexer = GenerateLexer(new StringReader("Assembly")); Assert.AreEqual(Tokens.Assembly, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestAuto() { ILexer lexer = GenerateLexer(new StringReader("Auto")); Assert.AreEqual(Tokens.Auto, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBinary() { ILexer lexer = GenerateLexer(new StringReader("Binary")); Assert.AreEqual(Tokens.Binary, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBoolean() { ILexer lexer = GenerateLexer(new StringReader("Boolean")); Assert.AreEqual(Tokens.Boolean, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestByRef() { ILexer lexer = GenerateLexer(new StringReader("ByRef")); Assert.AreEqual(Tokens.ByRef, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestBy() { ILexer lexer = GenerateLexer(new StringReader("By")); Assert.AreEqual(Tokens.By, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestByte() { ILexer lexer = GenerateLexer(new StringReader("Byte")); Assert.AreEqual(Tokens.Byte, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestByVal() { ILexer lexer = GenerateLexer(new StringReader("ByVal")); Assert.AreEqual(Tokens.ByVal, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCall() { ILexer lexer = GenerateLexer(new StringReader("Call")); Assert.AreEqual(Tokens.Call, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCase() { ILexer lexer = GenerateLexer(new StringReader("Case")); Assert.AreEqual(Tokens.Case, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCatch() { ILexer lexer = GenerateLexer(new StringReader("Catch")); Assert.AreEqual(Tokens.Catch, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCBool() { ILexer lexer = GenerateLexer(new StringReader("CBool")); Assert.AreEqual(Tokens.CBool, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCByte() { ILexer lexer = GenerateLexer(new StringReader("CByte")); Assert.AreEqual(Tokens.CByte, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCChar() { ILexer lexer = GenerateLexer(new StringReader("CChar")); Assert.AreEqual(Tokens.CChar, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCDate() { ILexer lexer = GenerateLexer(new StringReader("CDate")); Assert.AreEqual(Tokens.CDate, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCDbl() { ILexer lexer = GenerateLexer(new StringReader("CDbl")); Assert.AreEqual(Tokens.CDbl, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCDec() { ILexer lexer = GenerateLexer(new StringReader("CDec")); Assert.AreEqual(Tokens.CDec, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestChar() { ILexer lexer = GenerateLexer(new StringReader("Char")); Assert.AreEqual(Tokens.Char, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCInt() { ILexer lexer = GenerateLexer(new StringReader("CInt")); Assert.AreEqual(Tokens.CInt, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestClass() { ILexer lexer = GenerateLexer(new StringReader("Class")); Assert.AreEqual(Tokens.Class, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCLng() { ILexer lexer = GenerateLexer(new StringReader("CLng")); Assert.AreEqual(Tokens.CLng, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCObj() { ILexer lexer = GenerateLexer(new StringReader("CObj")); Assert.AreEqual(Tokens.CObj, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCompare() { ILexer lexer = GenerateLexer(new StringReader("Compare")); Assert.AreEqual(Tokens.Compare, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestConst() { ILexer lexer = GenerateLexer(new StringReader("Const")); Assert.AreEqual(Tokens.Const, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestContinue() { ILexer lexer = GenerateLexer(new StringReader("Continue")); Assert.AreEqual(Tokens.Continue, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCSByte() { ILexer lexer = GenerateLexer(new StringReader("CSByte")); Assert.AreEqual(Tokens.CSByte, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCShort() { ILexer lexer = GenerateLexer(new StringReader("CShort")); Assert.AreEqual(Tokens.CShort, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCSng() { ILexer lexer = GenerateLexer(new StringReader("CSng")); Assert.AreEqual(Tokens.CSng, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCStr() { ILexer lexer = GenerateLexer(new StringReader("CStr")); Assert.AreEqual(Tokens.CStr, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCType() { ILexer lexer = GenerateLexer(new StringReader("CType")); Assert.AreEqual(Tokens.CType, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCUInt() { ILexer lexer = GenerateLexer(new StringReader("CUInt")); Assert.AreEqual(Tokens.CUInt, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCULng() { ILexer lexer = GenerateLexer(new StringReader("CULng")); Assert.AreEqual(Tokens.CULng, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCUShort() { ILexer lexer = GenerateLexer(new StringReader("CUShort")); Assert.AreEqual(Tokens.CUShort, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestCustom() { ILexer lexer = GenerateLexer(new StringReader("Custom")); Assert.AreEqual(Tokens.Custom, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDate() { ILexer lexer = GenerateLexer(new StringReader("Date")); Assert.AreEqual(Tokens.Date, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDecimal() { ILexer lexer = GenerateLexer(new StringReader("Decimal")); Assert.AreEqual(Tokens.Decimal, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDeclare() { ILexer lexer = GenerateLexer(new StringReader("Declare")); Assert.AreEqual(Tokens.Declare, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDefault() { ILexer lexer = GenerateLexer(new StringReader("Default")); Assert.AreEqual(Tokens.Default, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDelegate() { ILexer lexer = GenerateLexer(new StringReader("Delegate")); Assert.AreEqual(Tokens.Delegate, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDescending() { ILexer lexer = GenerateLexer(new StringReader("Descending")); Assert.AreEqual(Tokens.Descending, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDim() { ILexer lexer = GenerateLexer(new StringReader("Dim")); Assert.AreEqual(Tokens.Dim, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDirectCast() { ILexer lexer = GenerateLexer(new StringReader("DirectCast")); Assert.AreEqual(Tokens.DirectCast, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDistinct() { ILexer lexer = GenerateLexer(new StringReader("Distinct")); Assert.AreEqual(Tokens.Distinct, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDo() { ILexer lexer = GenerateLexer(new StringReader("Do")); Assert.AreEqual(Tokens.Do, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestDouble() { ILexer lexer = GenerateLexer(new StringReader("Double")); Assert.AreEqual(Tokens.Double, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEach() { ILexer lexer = GenerateLexer(new StringReader("Each")); Assert.AreEqual(Tokens.Each, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestElse() { ILexer lexer = GenerateLexer(new StringReader("Else")); Assert.AreEqual(Tokens.Else, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestElseIf() { ILexer lexer = GenerateLexer(new StringReader("ElseIf")); Assert.AreEqual(Tokens.ElseIf, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEnd() { ILexer lexer = GenerateLexer(new StringReader("End")); Assert.AreEqual(Tokens.End, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEndIf() { ILexer lexer = GenerateLexer(new StringReader("EndIf")); Assert.AreEqual(Tokens.EndIf, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEnum() { ILexer lexer = GenerateLexer(new StringReader("Enum")); Assert.AreEqual(Tokens.Enum, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEquals() { ILexer lexer = GenerateLexer(new StringReader("Equals")); Assert.AreEqual(Tokens.Equals, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestErase() { ILexer lexer = GenerateLexer(new StringReader("Erase")); Assert.AreEqual(Tokens.Erase, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestError() { ILexer lexer = GenerateLexer(new StringReader("Error")); Assert.AreEqual(Tokens.Error, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestEvent() { ILexer lexer = GenerateLexer(new StringReader("Event")); Assert.AreEqual(Tokens.Event, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestExit() { ILexer lexer = GenerateLexer(new StringReader("Exit")); Assert.AreEqual(Tokens.Exit, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestExplicit() { ILexer lexer = GenerateLexer(new StringReader("Explicit")); Assert.AreEqual(Tokens.Explicit, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFalse() { ILexer lexer = GenerateLexer(new StringReader("False")); Assert.AreEqual(Tokens.False, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFinally() { ILexer lexer = GenerateLexer(new StringReader("Finally")); Assert.AreEqual(Tokens.Finally, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFor() { ILexer lexer = GenerateLexer(new StringReader("For")); Assert.AreEqual(Tokens.For, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFriend() { ILexer lexer = GenerateLexer(new StringReader("Friend")); Assert.AreEqual(Tokens.Friend, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFrom() { ILexer lexer = GenerateLexer(new StringReader("From")); Assert.AreEqual(Tokens.From, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestFunction() { ILexer lexer = GenerateLexer(new StringReader("Function")); Assert.AreEqual(Tokens.Function, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGet() { ILexer lexer = GenerateLexer(new StringReader("Get")); Assert.AreEqual(Tokens.Get, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGetType() { ILexer lexer = GenerateLexer(new StringReader("GetType")); Assert.AreEqual(Tokens.GetType, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGlobal() { ILexer lexer = GenerateLexer(new StringReader("Global")); Assert.AreEqual(Tokens.Global, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGoSub() { ILexer lexer = GenerateLexer(new StringReader("GoSub")); Assert.AreEqual(Tokens.GoSub, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGoTo() { ILexer lexer = GenerateLexer(new StringReader("GoTo")); Assert.AreEqual(Tokens.GoTo, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestGroup() { ILexer lexer = GenerateLexer(new StringReader("Group")); Assert.AreEqual(Tokens.Group, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestHandles() { ILexer lexer = GenerateLexer(new StringReader("Handles")); Assert.AreEqual(Tokens.Handles, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIf() { ILexer lexer = GenerateLexer(new StringReader("If")); Assert.AreEqual(Tokens.If, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestImplements() { ILexer lexer = GenerateLexer(new StringReader("Implements")); Assert.AreEqual(Tokens.Implements, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestImports() { ILexer lexer = GenerateLexer(new StringReader("Imports")); Assert.AreEqual(Tokens.Imports, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIn() { ILexer lexer = GenerateLexer(new StringReader("In")); Assert.AreEqual(Tokens.In, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInfer() { ILexer lexer = GenerateLexer(new StringReader("Infer")); Assert.AreEqual(Tokens.Infer, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInherits() { ILexer lexer = GenerateLexer(new StringReader("Inherits")); Assert.AreEqual(Tokens.Inherits, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInteger() { ILexer lexer = GenerateLexer(new StringReader("Integer")); Assert.AreEqual(Tokens.Integer, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInterface() { ILexer lexer = GenerateLexer(new StringReader("Interface")); Assert.AreEqual(Tokens.Interface, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestInto() { ILexer lexer = GenerateLexer(new StringReader("Into")); Assert.AreEqual(Tokens.Into, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIs() { ILexer lexer = GenerateLexer(new StringReader("Is")); Assert.AreEqual(Tokens.Is, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestIsNot() { ILexer lexer = GenerateLexer(new StringReader("IsNot")); Assert.AreEqual(Tokens.IsNot, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestJoin() { ILexer lexer = GenerateLexer(new StringReader("Join")); Assert.AreEqual(Tokens.Join, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLet() { ILexer lexer = GenerateLexer(new StringReader("Let")); Assert.AreEqual(Tokens.Let, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLib() { ILexer lexer = GenerateLexer(new StringReader("Lib")); Assert.AreEqual(Tokens.Lib, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLike() { ILexer lexer = GenerateLexer(new StringReader("Like")); Assert.AreEqual(Tokens.Like, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLong() { ILexer lexer = GenerateLexer(new StringReader("Long")); Assert.AreEqual(Tokens.Long, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestLoop() { ILexer lexer = GenerateLexer(new StringReader("Loop")); Assert.AreEqual(Tokens.Loop, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestMe() { ILexer lexer = GenerateLexer(new StringReader("Me")); Assert.AreEqual(Tokens.Me, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestMod() { ILexer lexer = GenerateLexer(new StringReader("Mod")); Assert.AreEqual(Tokens.Mod, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestModule() { ILexer lexer = GenerateLexer(new StringReader("Module")); Assert.AreEqual(Tokens.Module, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestMustInherit() { ILexer lexer = GenerateLexer(new StringReader("MustInherit")); Assert.AreEqual(Tokens.MustInherit, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestMustOverride() { ILexer lexer = GenerateLexer(new StringReader("MustOverride")); Assert.AreEqual(Tokens.MustOverride, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestMyBase() { ILexer lexer = GenerateLexer(new StringReader("MyBase")); Assert.AreEqual(Tokens.MyBase, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestMyClass() { ILexer lexer = GenerateLexer(new StringReader("MyClass")); Assert.AreEqual(Tokens.MyClass, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNamespace() { ILexer lexer = GenerateLexer(new StringReader("Namespace")); Assert.AreEqual(Tokens.Namespace, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNarrowing() { ILexer lexer = GenerateLexer(new StringReader("Narrowing")); Assert.AreEqual(Tokens.Narrowing, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNew() { ILexer lexer = GenerateLexer(new StringReader("New")); Assert.AreEqual(Tokens.New, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNext() { ILexer lexer = GenerateLexer(new StringReader("Next")); Assert.AreEqual(Tokens.Next, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNot() { ILexer lexer = GenerateLexer(new StringReader("Not")); Assert.AreEqual(Tokens.Not, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNothing() { ILexer lexer = GenerateLexer(new StringReader("Nothing")); Assert.AreEqual(Tokens.Nothing, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNotInheritable() { ILexer lexer = GenerateLexer(new StringReader("NotInheritable")); Assert.AreEqual(Tokens.NotInheritable, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestNotOverridable() { ILexer lexer = GenerateLexer(new StringReader("NotOverridable")); Assert.AreEqual(Tokens.NotOverridable, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestObject() { ILexer lexer = GenerateLexer(new StringReader("Object")); Assert.AreEqual(Tokens.Object, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOf() { ILexer lexer = GenerateLexer(new StringReader("Of")); Assert.AreEqual(Tokens.Of, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOff() { ILexer lexer = GenerateLexer(new StringReader("Off")); Assert.AreEqual(Tokens.Off, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOn() { ILexer lexer = GenerateLexer(new StringReader("On")); Assert.AreEqual(Tokens.On, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOperator() { ILexer lexer = GenerateLexer(new StringReader("Operator")); Assert.AreEqual(Tokens.Operator, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOption() { ILexer lexer = GenerateLexer(new StringReader("Option")); Assert.AreEqual(Tokens.Option, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOptional() { ILexer lexer = GenerateLexer(new StringReader("Optional")); Assert.AreEqual(Tokens.Optional, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOr() { ILexer lexer = GenerateLexer(new StringReader("Or")); Assert.AreEqual(Tokens.Or, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOrder() { ILexer lexer = GenerateLexer(new StringReader("Order")); Assert.AreEqual(Tokens.Order, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOrElse() { ILexer lexer = GenerateLexer(new StringReader("OrElse")); Assert.AreEqual(Tokens.OrElse, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOverloads() { ILexer lexer = GenerateLexer(new StringReader("Overloads")); Assert.AreEqual(Tokens.Overloads, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOverridable() { ILexer lexer = GenerateLexer(new StringReader("Overridable")); Assert.AreEqual(Tokens.Overridable, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestOverrides() { ILexer lexer = GenerateLexer(new StringReader("Overrides")); Assert.AreEqual(Tokens.Overrides, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestParamArray() { ILexer lexer = GenerateLexer(new StringReader("ParamArray")); Assert.AreEqual(Tokens.ParamArray, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPartial() { ILexer lexer = GenerateLexer(new StringReader("Partial")); Assert.AreEqual(Tokens.Partial, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPreserve() { ILexer lexer = GenerateLexer(new StringReader("Preserve")); Assert.AreEqual(Tokens.Preserve, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPrivate() { ILexer lexer = GenerateLexer(new StringReader("Private")); Assert.AreEqual(Tokens.Private, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestProperty() { ILexer lexer = GenerateLexer(new StringReader("Property")); Assert.AreEqual(Tokens.Property, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestProtected() { ILexer lexer = GenerateLexer(new StringReader("Protected")); Assert.AreEqual(Tokens.Protected, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestPublic() { ILexer lexer = GenerateLexer(new StringReader("Public")); Assert.AreEqual(Tokens.Public, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestRaiseEvent() { ILexer lexer = GenerateLexer(new StringReader("RaiseEvent")); Assert.AreEqual(Tokens.RaiseEvent, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestReadOnly() { ILexer lexer = GenerateLexer(new StringReader("ReadOnly")); Assert.AreEqual(Tokens.ReadOnly, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestReDim() { ILexer lexer = GenerateLexer(new StringReader("ReDim")); Assert.AreEqual(Tokens.ReDim, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestRemoveHandler() { ILexer lexer = GenerateLexer(new StringReader("RemoveHandler")); Assert.AreEqual(Tokens.RemoveHandler, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestResume() { ILexer lexer = GenerateLexer(new StringReader("Resume")); Assert.AreEqual(Tokens.Resume, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestReturn() { ILexer lexer = GenerateLexer(new StringReader("Return")); Assert.AreEqual(Tokens.Return, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSByte() { ILexer lexer = GenerateLexer(new StringReader("SByte")); Assert.AreEqual(Tokens.SByte, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSelect() { ILexer lexer = GenerateLexer(new StringReader("Select")); Assert.AreEqual(Tokens.Select, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSet() { ILexer lexer = GenerateLexer(new StringReader("Set")); Assert.AreEqual(Tokens.Set, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestShadows() { ILexer lexer = GenerateLexer(new StringReader("Shadows")); Assert.AreEqual(Tokens.Shadows, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestShared() { ILexer lexer = GenerateLexer(new StringReader("Shared")); Assert.AreEqual(Tokens.Shared, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestShort() { ILexer lexer = GenerateLexer(new StringReader("Short")); Assert.AreEqual(Tokens.Short, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSingle() { ILexer lexer = GenerateLexer(new StringReader("Single")); Assert.AreEqual(Tokens.Single, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSkip() { ILexer lexer = GenerateLexer(new StringReader("Skip")); Assert.AreEqual(Tokens.Skip, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStatic() { ILexer lexer = GenerateLexer(new StringReader("Static")); Assert.AreEqual(Tokens.Static, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStep() { ILexer lexer = GenerateLexer(new StringReader("Step")); Assert.AreEqual(Tokens.Step, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStop() { ILexer lexer = GenerateLexer(new StringReader("Stop")); Assert.AreEqual(Tokens.Stop, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStrict() { ILexer lexer = GenerateLexer(new StringReader("Strict")); Assert.AreEqual(Tokens.Strict, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestString() { ILexer lexer = GenerateLexer(new StringReader("String")); Assert.AreEqual(Tokens.String, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestStructure() { ILexer lexer = GenerateLexer(new StringReader("Structure")); Assert.AreEqual(Tokens.Structure, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSub() { ILexer lexer = GenerateLexer(new StringReader("Sub")); Assert.AreEqual(Tokens.Sub, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestSyncLock() { ILexer lexer = GenerateLexer(new StringReader("SyncLock")); Assert.AreEqual(Tokens.SyncLock, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTake() { ILexer lexer = GenerateLexer(new StringReader("Take")); Assert.AreEqual(Tokens.Take, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestText() { ILexer lexer = GenerateLexer(new StringReader("Text")); Assert.AreEqual(Tokens.Text, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestThen() { ILexer lexer = GenerateLexer(new StringReader("Then")); Assert.AreEqual(Tokens.Then, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestThrow() { ILexer lexer = GenerateLexer(new StringReader("Throw")); Assert.AreEqual(Tokens.Throw, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTo() { ILexer lexer = GenerateLexer(new StringReader("To")); Assert.AreEqual(Tokens.To, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTrue() { ILexer lexer = GenerateLexer(new StringReader("True")); Assert.AreEqual(Tokens.True, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTry() { ILexer lexer = GenerateLexer(new StringReader("Try")); Assert.AreEqual(Tokens.Try, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTryCast() { ILexer lexer = GenerateLexer(new StringReader("TryCast")); Assert.AreEqual(Tokens.TryCast, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestTypeOf() { ILexer lexer = GenerateLexer(new StringReader("TypeOf")); Assert.AreEqual(Tokens.TypeOf, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUInteger() { ILexer lexer = GenerateLexer(new StringReader("UInteger")); Assert.AreEqual(Tokens.UInteger, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestULong() { ILexer lexer = GenerateLexer(new StringReader("ULong")); Assert.AreEqual(Tokens.ULong, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUnicode() { ILexer lexer = GenerateLexer(new StringReader("Unicode")); Assert.AreEqual(Tokens.Unicode, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUntil() { ILexer lexer = GenerateLexer(new StringReader("Until")); Assert.AreEqual(Tokens.Until, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUShort() { ILexer lexer = GenerateLexer(new StringReader("UShort")); Assert.AreEqual(Tokens.UShort, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestUsing() { ILexer lexer = GenerateLexer(new StringReader("Using")); Assert.AreEqual(Tokens.Using, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestVariant() { ILexer lexer = GenerateLexer(new StringReader("Variant")); Assert.AreEqual(Tokens.Variant, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWend() { ILexer lexer = GenerateLexer(new StringReader("Wend")); Assert.AreEqual(Tokens.Wend, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWhen() { ILexer lexer = GenerateLexer(new StringReader("When")); Assert.AreEqual(Tokens.When, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWhere() { ILexer lexer = GenerateLexer(new StringReader("Where")); Assert.AreEqual(Tokens.Where, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWhile() { ILexer lexer = GenerateLexer(new StringReader("While")); Assert.AreEqual(Tokens.While, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWidening() { ILexer lexer = GenerateLexer(new StringReader("Widening")); Assert.AreEqual(Tokens.Widening, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWith() { ILexer lexer = GenerateLexer(new StringReader("With")); Assert.AreEqual(Tokens.With, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWithEvents() { ILexer lexer = GenerateLexer(new StringReader("WithEvents")); Assert.AreEqual(Tokens.WithEvents, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestWriteOnly() { ILexer lexer = GenerateLexer(new StringReader("WriteOnly")); Assert.AreEqual(Tokens.WriteOnly, lexer.NextToken().Kind); } - [Test()] + + [Test] public void TestXor() { ILexer lexer = GenerateLexer(new StringReader("Xor")); diff --git a/src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs b/src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs index 74ff5ab66c..b8bf4f9158 100644 --- a/src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs +++ b/src/Libraries/NRefactory/Test/Output/VBNet/VBNetOutputTest.cs @@ -547,5 +547,11 @@ End Using"); { TestTypeMember("Dim WithEvents a As Button"); } + + [Test] + public void FriendWithEventsField() + { + TestTypeMember("Friend WithEvents Button1 As System.Windows.Forms.Button"); + } } }