From 6c62b4c9545b5c2654a9b45e382e73d2730b1499 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 15 Apr 2011 17:10:42 +0200 Subject: [PATCH] Squashed 'NRefactory/' changes from 56fde51..b8330be MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b8330be Remove parent pointer from ITypeParameter and enable sharing type parameters. ca6b0e1 fixed primitve types. 094cac4 Added some creation constructors. b7cd75a Fixed unit test. 9fedc31 Handled undocumented expressions. 7d4ef1a Added support for quoted identifiers. f30490c Add some parser unit tests. 307559c Remove NextStatement/PrevStatement properties - too many properties can be confusing (e.g. a loop's EmbeddedStatement would show up next to those two properties) 90542d2 Fix parsing of query continuations for queries with multiple from clauses. ccd06a4 Fixed query expression tests. Had to add a new node type: AnonymousTypeCreateExpression. d4eaffb Make pattern matching AST independent from C# AST. e8d472b Rename FixedVariableInitializer.Initializer to CountExpression (this makes it consistent with StackAllocExpression). 16715bb Renamed CSharpFormattingPolicy to CSharpFormattingOptions. 92df3e5 Fixed some TypeReferenceExpression tests. f4450d1 Fixed some invocation expression tests. 42463a4 Fixed unit test TestIdentifierContainingEscapeSequence. 021a9fb Fixed typeofexpression tests. bd51bee Fixed GlobalFullNamespaceGenericFieldReferenceExpressionTest. 040e164 Fixed lambdaexpression tests. 0722289 Updated mcs, fixed failing unit test. c35eb4d Enabled typ declaration tests. 94c18d6 Fixed delegate declaration tests. a45fa11 Fixed event declaration tests. 9083bee Fixed constructor declaration tests. 2e82144 * TypeDeclarationTests.cs: * PropertyDeclarationTests.cs: enabled property declaration tests. 873c185 Added attribute section parsing / fixed indexer declaration tests. 2353804 Fixed field declaration tests. 4e60911 Fixed method declaration tests. 58caab2 Fixed statement unit tests. cad9d18 Fixed fixed statement. a4ce5aa Updated mcs/fixed pointer reference expression bug. ca77589 Fixed partial modifier. 8c7e017 Fixed UsingDeclarationTests. 293dba5 Worked on pointer reference expression. cc209b4 Fixed ArrayObjectCreateExpression tests. 58856b1 Activated cast expression tests. c0e20a6 Fixed qualified alias member tests. 44388b2 Fixed anonymous method tests. git-subtree-dir: NRefactory git-subtree-split: b8330bebd6a1cb3a2895fc924f472292bc1cf85e --- ICSharpCode.NRefactory.Demo/MainForm.cs | 4 +- .../CSharp/InsertParenthesesVisitorTests.cs | 4 +- .../AliasReferenceExpressionTests.cs | 11 +- .../Parser/Expression/AnonymousMethodTests.cs | 6 +- .../ArrayObjectCreateExpressionTests.cs | 4 +- .../Parser/Expression/CastExpressionTests.cs | 4 +- .../Expression/ConditionalExpressionTests.cs | 2 +- .../Expression/DefaultValueExpressionTests.cs | 2 +- .../Expression/IdentifierExpressionTests.cs | 11 +- .../Expression/InvocationExpressionTests.cs | 2 +- .../Expression/LambdaExpressionTests.cs | 10 +- .../MemberReferenceExpressionTests.cs | 20 +- .../PointerReferenceExpressionTests.cs | 4 +- .../Parser/Expression/QueryExpressionTests.cs | 77 +- .../Expression/TypeOfExpressionTests.cs | 14 +- .../TypeReferenceExpressionTests.cs | 48 +- .../GeneralScope/AttributeSectionTests.cs | 57 +- .../GeneralScope/DelegateDeclarationTests.cs | 2 +- .../GeneralScope/TypeDeclarationTests.cs | 17 +- .../GeneralScope/UsingDeclarationTests.cs | 3 +- .../CSharp/Parser/ParseUtil.cs | 21 +- .../Parser/Statements/BlockStatementTests.cs | 5 +- .../Parser/Statements/FixedStatementTests.cs | 30 +- .../Parser/Statements/ForStatementTests.cs | 4 +- .../Parser/Statements/GotoStatementTests.cs | 2 +- .../Statements/TryCatchStatementTests.cs | 5 +- .../Parser/Statements/UsingStatementTests.cs | 18 +- .../VariableDeclarationStatementTests.cs | 191 +- .../ConstructorDeclarationTests.cs | 4 +- .../TypeMembers/EventDeclarationTests.cs | 4 +- .../TypeMembers/FieldDeclarationTests.cs | 15 +- .../TypeMembers/IndexerDeclarationTests.cs | 4 +- .../TypeMembers/MethodDeclarationTests.cs | 21 +- .../TypeMembers/PropertyDeclarationTests.cs | 7 +- .../CSharp/Resolver/LambdaTests.cs | 14 + .../Resolver/OverloadResolutionTests.cs | 8 +- .../TestBlankLineFormatting.cs | 14 +- .../FormattingTests/TestBraceStlye.cs | 32 +- .../FormattingTests/TestFormattingBugs.cs | 16 +- .../FormattingTests/TestSpacingVisitor.cs | 168 +- .../TestStatementIndentation.cs | 120 +- .../TestTypeLevelIndentation.cs | 40 +- .../FormattingTests/TextEditorTestAdapter.cs | 6 +- .../ICSharpCode.NRefactory.Tests.csproj | 8 +- .../TypeSystem/GetAllBaseTypesTest.cs | 2 +- .../TypeSystem/TestInterningProvider.cs | 25 +- .../TypeSystem/TypeSystemTests.cs | 10 +- ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs | 84 +- .../CSharp/Ast/AstNodeCollection.cs | 36 +- ICSharpCode.NRefactory/CSharp/Ast/AstType.cs | 58 + .../CSharp/Ast/DepthFirstAstVisitor.cs | 14 +- .../Expressions/AnonymousMethodExpression.cs | 18 + .../AnonymousTypeCreateExpression.cs | 79 + .../CSharp/Ast/Expressions/AsExpression.cs | 10 + .../Ast/Expressions/AssignmentExpression.cs | 7 + .../CSharp/Ast/Expressions/CastExpression.cs | 10 + .../Ast/Expressions/CheckedExpression.cs | 9 + .../Ast/Expressions/ConditionalExpression.cs | 11 + .../Ast/Expressions/DefaultValueExpression.cs | 9 + .../Ast/Expressions/DirectionExpression.cs | 10 + .../CSharp/Ast/Expressions/Expression.cs | 38 +- .../Ast/Expressions/IndexerExpression.cs | 18 + .../Ast/Expressions/InvocationExpression.cs | 18 + .../Expressions/MemberReferenceExpression.cs | 19 + .../Expressions/NamedArgumentExpression.cs | 4 + .../Expressions/NullReferenceExpression.cs | 22 + .../Ast/Expressions/ObjectCreateExpression.cs | 18 + .../Expressions/ParenthesizedExpression.cs | 9 + .../Ast/Expressions/SizeOfExpression.cs | 9 + .../Ast/Expressions/TypeOfExpression.cs | 9 + .../Expressions/TypeReferenceExpression.cs | 9 + .../Ast/Expressions/UncheckedExpression.cs | 9 + ...xpression.cs => UndocumentedExpression.cs} | 25 +- .../Ast/GeneralScope/AttributeSection.cs | 92 +- .../Ast/GeneralScope/NamespaceDeclaration.cs | 13 + .../Ast/GeneralScope/UsingAliasDeclaration.cs | 16 + .../Ast/GeneralScope/UsingDeclaration.cs | 14 + .../CSharp/Ast/IAstVisitor.cs | 5 +- .../CSharp/Ast/Identifier.cs | 10 +- ICSharpCode.NRefactory/CSharp/Ast/NodeType.cs | 7 +- .../CSharp/Ast/PatternMatching/Choice.cs | 54 - .../Ast/PatternMatching/OptionalNode.cs | 42 - .../CSharp/Ast/PatternMatching/Pattern.cs | 95 - .../CSharp/Ast/PatternMatching/Placeholder.cs | 242 - .../CSharp/Ast/Statements/BlockStatement.cs | 36 + .../CSharp/Ast/Statements/CheckedStatement.cs | 11 +- .../CSharp/Ast/Statements/ReturnStatement.cs | 9 + .../CSharp/Ast/Statements/Statement.cs | 60 +- .../CSharp/Ast/Statements/SwitchStatement.cs | 36 + .../CSharp/Ast/Statements/ThrowStatement.cs | 9 + .../Ast/Statements/TryCatchStatement.cs | 36 + .../Ast/Statements/UncheckedStatement.cs | 11 +- .../Ast/TypeMembers/ConstructorDeclaration.cs | 8 + .../TypeMembers/FixedVariableInitializer.cs | 12 +- .../Ast/TypeMembers/VariableInitializer.cs | 38 +- .../CSharp/Formatter/AstFormattingVisitor.cs | 18 +- ...ngPolicy.cs => CSharpFormattingOptions.cs} | 24 +- .../CSharp/OutputVisitor/OutputVisitor.cs | 125 +- .../CSharp/Parser/CSharpParser.cs | 696 +- .../CSharp/Parser/TypeSystemConvertVisitor.cs | 8 +- .../CSharp/Parser/mcs/anonymous.cs | 24 +- .../CSharp/Parser/mcs/assembly.cs | 30 +- .../CSharp/Parser/mcs/attribute.cs | 61 +- .../CSharp/Parser/mcs/cfold.cs | 20 +- .../CSharp/Parser/mcs/class.cs | 64 +- .../CSharp/Parser/mcs/constant.cs | 27 +- .../CSharp/Parser/mcs/context.cs | 4 +- .../CSharp/Parser/mcs/cs-parser.cs | 9822 +++++++++-------- .../CSharp/Parser/mcs/cs-parser.jay | 453 +- .../CSharp/Parser/mcs/cs-tokenizer.cs | 27 +- .../CSharp/Parser/mcs/decl.cs | 55 +- .../CSharp/Parser/mcs/delegate.cs | 4 +- .../CSharp/Parser/mcs/doc.cs | 819 +- .../CSharp/Parser/mcs/driver.cs | 4 +- .../CSharp/Parser/mcs/dynamic.cs | 15 +- .../CSharp/Parser/mcs/ecore.cs | 336 +- .../CSharp/Parser/mcs/enum.cs | 10 +- .../CSharp/Parser/mcs/eval.cs | 7 +- .../CSharp/Parser/mcs/expression.cs | 142 +- .../CSharp/Parser/mcs/field.cs | 2 +- .../CSharp/Parser/mcs/generic.cs | 64 +- .../CSharp/Parser/mcs/import.cs | 48 +- .../CSharp/Parser/mcs/iterators.cs | 2 +- .../CSharp/Parser/mcs/linq.cs | 27 +- .../CSharp/Parser/mcs/location.cs | 4 +- .../CSharp/Parser/mcs/method.cs | 81 +- .../CSharp/Parser/mcs/namespace.cs | 428 +- .../CSharp/Parser/mcs/nullable.cs | 14 +- .../CSharp/Parser/mcs/parameter.cs | 30 +- .../CSharp/Parser/mcs/pending.cs | 19 +- .../CSharp/Parser/mcs/property.cs | 31 +- .../CSharp/Parser/mcs/report.cs | 6 +- .../CSharp/Parser/mcs/roottypes.cs | 69 +- .../CSharp/Parser/mcs/statement.cs | 83 +- .../CSharp/Parser/mcs/typemanager.cs | 101 +- .../CSharp/Parser/mcs/typespec.cs | 98 +- .../CSharp/Parser/mcs/visit.cs | 33 +- .../CSharp/Resolver/ResolveVisitor.cs | 5 +- .../CSharp/Resolver/TypeInference.cs | 16 +- .../ICSharpCode.NRefactory.csproj | 28 +- .../Ast => }/PatternMatching/AnyNode.cs | 9 +- .../Ast => }/PatternMatching/Backreference.cs | 24 +- .../PatternMatching/BacktrackingInfo.cs | 16 + .../PatternMatching/Choice.cs | 58 + .../PatternMatching/INode.cs | 54 + .../PatternMatching/IPatternAstVisitor.cs | 8 +- .../{CSharp/Ast => }/PatternMatching/Match.cs | 33 +- .../Ast => }/PatternMatching/NamedNode.cs | 23 +- .../PatternMatching/OptionalNode.cs | 48 + .../PatternMatching/Pattern.cs | 101 + .../Ast => }/PatternMatching/Repeat.cs | 35 +- .../TypeSystem/CecilLoader.cs | 14 +- .../TypeSystem/ITypeParameter.cs | 48 +- .../Implementation/DefaultTypeParameter.cs | 90 +- .../MethodTypeParameterSubstitution.cs | 2 +- .../TypeSystem/ParameterizedType.cs | 2 +- NRefactory.sln | 2 +- 157 files changed, 9423 insertions(+), 7642 deletions(-) create mode 100644 ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs rename ICSharpCode.NRefactory/CSharp/Ast/Expressions/{ArgListExpression.cs => UndocumentedExpression.cs} (72%) delete mode 100644 ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Choice.cs delete mode 100644 ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/OptionalNode.cs delete mode 100644 ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Pattern.cs delete mode 100644 ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Placeholder.cs rename ICSharpCode.NRefactory/CSharp/Formatter/{CSharpFormattingPolicy.cs => CSharpFormattingOptions.cs} (96%) rename ICSharpCode.NRefactory/{CSharp/Ast => }/PatternMatching/AnyNode.cs (67%) rename ICSharpCode.NRefactory/{CSharp/Ast => }/PatternMatching/Backreference.cs (63%) create mode 100644 ICSharpCode.NRefactory/PatternMatching/BacktrackingInfo.cs create mode 100644 ICSharpCode.NRefactory/PatternMatching/Choice.cs create mode 100644 ICSharpCode.NRefactory/PatternMatching/INode.cs rename ICSharpCode.NRefactory/{CSharp/Ast => }/PatternMatching/IPatternAstVisitor.cs (73%) rename ICSharpCode.NRefactory/{CSharp/Ast => }/PatternMatching/Match.cs (59%) rename ICSharpCode.NRefactory/{CSharp/Ast => }/PatternMatching/NamedNode.cs (50%) create mode 100644 ICSharpCode.NRefactory/PatternMatching/OptionalNode.cs create mode 100644 ICSharpCode.NRefactory/PatternMatching/Pattern.cs rename ICSharpCode.NRefactory/{CSharp/Ast => }/PatternMatching/Repeat.cs (52%) diff --git a/ICSharpCode.NRefactory.Demo/MainForm.cs b/ICSharpCode.NRefactory.Demo/MainForm.cs index 43627de73..285428d8f 100644 --- a/ICSharpCode.NRefactory.Demo/MainForm.cs +++ b/ICSharpCode.NRefactory.Demo/MainForm.cs @@ -1,4 +1,4 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under MIT X11 license (for details please see \doc\license.txt) using System; @@ -126,7 +126,7 @@ namespace ICSharpCode.NRefactory.Demo void CSharpGenerateCodeButtonClick(object sender, EventArgs e) { StringWriter w = new StringWriter(); - OutputVisitor output = new OutputVisitor(w, new CSharpFormattingPolicy()); + OutputVisitor output = new OutputVisitor(w, new CSharpFormattingOptions()); compilationUnit.AcceptVisitor(output, null); csharpCodeTextBox.Text = w.ToString(); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs index ea7a3e43f..701aa4b35 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs @@ -10,12 +10,12 @@ namespace ICSharpCode.NRefactory.CSharp [TestFixture] public class InsertParenthesesVisitorTests { - CSharpFormattingPolicy policy; + CSharpFormattingOptions policy; [SetUp] public void SetUp() { - policy = new CSharpFormattingPolicy(); + policy = new CSharpFormattingOptions(); } string InsertReadable(Expression expr) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AliasReferenceExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AliasReferenceExpressionTests.cs index 41ba8452c..a3ec92054 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AliasReferenceExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AliasReferenceExpressionTests.cs @@ -5,10 +5,11 @@ using System; using System.IO; using NUnit.Framework; +using ICSharpCode.NRefactory.PatternMatching; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { - [TestFixture, Ignore("Aliases not yet implemented")] + [TestFixture] public class AliasReferenceExpressionTests { [Test] @@ -16,12 +17,12 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { CSharpParser parser = new CSharpParser(); AstType type = parser.ParseTypeReference(new StringReader("global::System")); - Assert.IsNotNull( + Assert.IsTrue( new MemberType { Target = new SimpleType("global"), IsDoubleColon = true, MemberName = "System" - }.Match(type) + }.IsMatch(type) ); } @@ -29,7 +30,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression public void GlobalTypeDeclaration() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("global::System.String a;"); - Assert.IsNotNull( + Assert.IsTrue( new VariableDeclarationStatement { Type = new MemberType { Target = new MemberType { @@ -43,7 +44,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression Variables = { new VariableInitializer("a") } - }.Match(lvd) + }.IsMatch(lvd) ); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs index a1d4e1a45..710df07ec 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs @@ -34,7 +34,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression Assert.AreEqual(0, ame.Body.Statements.Count()); } - [Test, Ignore("Parameter list is broken")] + [Test] public void EmptyAnonymousMethod() { AnonymousMethodExpression ame = Parse("delegate() {}"); @@ -43,14 +43,14 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression Assert.IsTrue(ame.HasParameterList); } - [Test, Ignore("Parameter list is broken")] + [Test] public void SimpleAnonymousMethod() { AnonymousMethodExpression ame = Parse("delegate(int a, int b) { return a + b; }"); Assert.IsTrue(ame.HasParameterList); Assert.AreEqual(2, ame.Parameters.Count()); Assert.AreEqual(1, ame.Body.Statements.Count()); - Assert.IsTrue(ame.Body.Children.First() is ReturnStatement); + Assert.IsTrue(ame.Body.Statements.First() is ReturnStatement); } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ArrayObjectCreateExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ArrayObjectCreateExpressionTests.cs index fbe1af58e..a6d3ec017 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ArrayObjectCreateExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ArrayObjectCreateExpressionTests.cs @@ -20,7 +20,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }); } - [Test, Ignore("AdditionalArraySpecifiers not yet implemented")] + [Test] public void MultidimensionalNestedArray() { ParseUtilCSharp.AssertExpression( @@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }); } - [Test, Ignore("Array initializers not yet implemented")] + [Test] public void ImplicitlyTypedArrayCreateExpression() { ParseUtilCSharp.AssertExpression( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/CastExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/CastExpressionTests.cs index 54d8d8c8b..2909f7184 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/CastExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/CastExpressionTests.cs @@ -6,7 +6,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { - [TestFixture, Ignore("Port unit tests to new DOM")] + [TestFixture] public class CastExpressionTests { [Test] @@ -151,7 +151,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }); } - [Test] + [Test, Ignore ("TODO")] public void IntMaxValueToBigInt() { ParseUtilCSharp.AssertExpression( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ConditionalExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ConditionalExpressionTests.cs index 21c8a5d94..819b16582 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ConditionalExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/ConditionalExpressionTests.cs @@ -30,7 +30,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression Assert.IsTrue(ce.FalseExpression is MemberReferenceExpression); } - [Test, Ignore("crashes the parser")] + [Test] public void ConditionalIsWithNullableExpressionTest() { ConditionalExpression ce = ParseUtilCSharp.ParseExpression("a is b? ? a() : a.B"); diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/DefaultValueExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/DefaultValueExpressionTests.cs index 9c5296920..03f561753 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/DefaultValueExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/DefaultValueExpressionTests.cs @@ -6,7 +6,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { - [TestFixture, Ignore("Aliases not yet implemented")] + [TestFixture] public class DefaultValueExpressionTests { [Test] diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/IdentifierExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/IdentifierExpressionTests.cs index d79658eff..5a054efe6 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/IdentifierExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/IdentifierExpressionTests.cs @@ -3,6 +3,7 @@ using System; using NUnit.Framework; +using ICSharpCode.NRefactory.PatternMatching; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { @@ -33,7 +34,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression CheckIdentifier(@"\u006cexer", "lexer"); } - [Test, Ignore("Mono parser bug?")] + [Test] public void TestIdentifierContainingEscapeSequence() { CheckIdentifier(@"l\U00000065xer", "lexer"); @@ -61,26 +62,26 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression public void GenericMethodReference() { IdentifierExpression ident = ParseUtilCSharp.ParseExpression("M"); - Assert.IsNotNull( + Assert.IsTrue( new IdentifierExpression { Identifier = "M" , TypeArguments = { new PrimitiveType("int") } - }.Match(ident)); + }.IsMatch(ident)); } [Test] public void GenericMethodReference2() { IdentifierExpression ident = ParseUtilCSharp.ParseExpression("TargetMethod"); - Assert.IsNotNull( + Assert.IsTrue( new IdentifierExpression { Identifier = "TargetMethod" , TypeArguments = { new PrimitiveType("string") } - }.Match(ident)); + }.IsMatch(ident)); } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/InvocationExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/InvocationExpressionTests.cs index 73ad17502..53c89bbf8 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/InvocationExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/InvocationExpressionTests.cs @@ -153,7 +153,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }.Invoke("Foo")); } - [Test, Ignore("named arguments not yet supported")] + [Test] public void InvocationWithNamedArgument() { ParseUtilCSharp.AssertExpression( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs index 8350a6756..d389bac7c 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs @@ -9,7 +9,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression [TestFixture] public class LambdaExpressionTests { - [Test, Ignore("Lambdas with expression body not yet supported")] + [Test] public void ImplicitlyTypedExpressionBody() { ParseUtilCSharp.AssertExpression( @@ -20,7 +20,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }); } - [Test, Ignore("Lambdas with expression body not yet supported")] + [Test] public void ImplicitlyTypedExpressionBodyWithoutParenthesis() { ParseUtilCSharp.AssertExpression( @@ -73,7 +73,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }}}); } - [Test, Ignore("Lambdas with expression body not yet supported")] + [Test] public void ExplicitlyTypedWithRefParameter() { ParseUtilCSharp.AssertExpression( @@ -83,14 +83,14 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression new ParameterDeclaration { ParameterModifier = ParameterModifier.Ref, Type = new PrimitiveType("int"), - Name = "x" + Name = "i" } }, Body = new AssignmentExpression(new IdentifierExpression("i"), new PrimitiveExpression(1)) }); } - [Test, Ignore("Lambdas with expression body not yet supported")] + [Test] public void LambdaExpressionContainingConditionalExpression() { ParseUtilCSharp.AssertExpression( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/MemberReferenceExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/MemberReferenceExpressionTests.cs index 960b53355..038b33644 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/MemberReferenceExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/MemberReferenceExpressionTests.cs @@ -57,19 +57,23 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression ); } - [Test, Ignore("Aliases not yet implemented")] + [Test] public void GlobalFullNamespaceGenericFieldReferenceExpressionTest() { - ParseUtilCSharp.AssertExpression( - "global::Namespace.Subnamespace.SomeClass.myField", - new MemberReferenceExpression { - Target = new MemberType { + var target = new MemberType { Target = new SimpleType("global"), IsDoubleColon = true, MemberName = "Namespace" - }.Member("Subnamespace"), - TypeArguments = { new PrimitiveType("string") } - }.Member("myField") + }.Member("Subnamespace").Member ("SomeClass"); + + target.AddChild (new PrimitiveType("string"), MemberReferenceExpression.Roles.TypeArgument); + + ParseUtilCSharp.AssertExpression( + "global::Namespace.Subnamespace.SomeClass.myField", + new MemberReferenceExpression { + Target = target, + MemberName = "myField" + } ); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/PointerReferenceExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/PointerReferenceExpressionTests.cs index 895ffff4c..8104524b9 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/PointerReferenceExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/PointerReferenceExpressionTests.cs @@ -9,7 +9,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression [TestFixture] public class PointerReferenceExpressionTests { - [Test, Ignore("Parser bug!")] + [Test] public void PointerReferenceExpressionTest() { PointerReferenceExpression pre = ParseUtilCSharp.ParseExpression("myObj.field->b"); @@ -17,7 +17,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression Assert.AreEqual("b", pre.MemberName); } - [Test, Ignore("Parser bug!")] + [Test] public void PointerReferenceGenericMethodTest() { ParseUtilCSharp.AssertExpression( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs index 5601797c9..35e3f5489 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/QueryExpressionTests.cs @@ -6,7 +6,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { - [TestFixture, Ignore("Query expressions not yet implemented")] + [TestFixture] public class QueryExpressionTests { [Test] @@ -125,19 +125,17 @@ select new { c.Name, o.OrderID, o.Total }", }, new QueryWhereClause { Condition = new BinaryOperatorExpression { - Left = new IdentifierExpression("c").Member("OrderDate").Member("Year"), + Left = new IdentifierExpression("o").Member("OrderDate").Member("Year"), Operator = BinaryOperatorType.Equality, Right = new PrimitiveExpression(2005) } }, new QuerySelectClause { - Expression = new ObjectCreateExpression { - Initializer = new ArrayInitializerExpression { - Elements = { - new IdentifierExpression("c").Member("Name"), - new IdentifierExpression("o").Member("OrderID"), - new IdentifierExpression("o").Member("Total") - } + Expression = new AnonymousTypeCreateExpression { + Initializer = { + new IdentifierExpression("c").Member("Name"), + new IdentifierExpression("o").Member("OrderID"), + new IdentifierExpression("o").Member("Total") } } } @@ -221,5 +219,66 @@ select new { c.Name, o.OrderID, o.Total }", } ); } + + + [Test] + public void QueryContinuationWithMultipleFrom() + { + ParseUtilCSharp.AssertExpression( + "from a in b from c in d select e into f select g", + new QueryExpression { + Clauses = { + new QueryContinuationClause { + PrecedingQuery = new QueryExpression { + Clauses = { + new QueryFromClause { + Identifier = "a", + Expression = new IdentifierExpression("b") + }, + new QueryFromClause { + Identifier = "c", + Expression = new IdentifierExpression("d") + }, + new QuerySelectClause { Expression = new IdentifierExpression("e") } + } + }, + Identifier = "f" + }, + new QuerySelectClause { Expression = new IdentifierExpression("g") } + } + } + ); + } + + [Test] + public void MultipleQueryContinuation() + { + ParseUtilCSharp.AssertExpression( + "from a in b select c into d select e into f select g", + new QueryExpression { + Clauses = { + new QueryContinuationClause { + PrecedingQuery = new QueryExpression { + Clauses = { + new QueryContinuationClause { + PrecedingQuery = new QueryExpression { + Clauses = { + new QueryFromClause { + Identifier = "a", + Expression = new IdentifierExpression("b") + }, + new QuerySelectClause { Expression = new IdentifierExpression("c") } + } + }, + Identifier = "d" + }, + new QuerySelectClause { Expression = new IdentifierExpression("e") } + } + }, + Identifier = "f" + }, + new QuerySelectClause { Expression = new IdentifierExpression("g") } + }}); + } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeOfExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeOfExpressionTests.cs index 3dcc932d9..65fca770a 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeOfExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeOfExpressionTests.cs @@ -24,7 +24,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }}); } - [Test, Ignore("Aliases not yet implemented")] + [Test] public void GlobalTypeOfExpressionTest() { ParseUtilCSharp.AssertExpression( @@ -108,11 +108,17 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression }}); } - [Test, Ignore("How do we represent unbound types in the AST?")] + [Test] public void UnboundTypeOfExpressionTest() { - TypeOfExpression toe = ParseUtilCSharp.ParseExpression("typeof(MyType<,>)"); - throw new NotImplementedException("How do we represent unbound types in the AST?"); + var type = new SimpleType("MyType"); + type.AddChild (new SimpleType (), SimpleType.Roles.TypeArgument); + type.AddChild (new SimpleType (), SimpleType.Roles.TypeArgument); + ParseUtilCSharp.AssertExpression( + "typeof(MyType<,>)", + new TypeOfExpression { + Type = type + }); } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeReferenceExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeReferenceExpressionTests.cs index cf32e089d..31f01ce39 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeReferenceExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/TypeReferenceExpressionTests.cs @@ -3,44 +3,60 @@ using System; using NUnit.Framework; +using ICSharpCode.NRefactory.PatternMatching; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { - [TestFixture, Ignore] + [TestFixture] public class TypeReferenceExpressionTests { [Test] public void GlobalTypeReferenceExpression() { - /*TypeReferenceExpression tr = ParseUtilCSharp.ParseExpression("global::System"); - Assert.AreEqual("System", tr.TypeReference.Type); - Assert.IsTrue(tr.TypeReference.IsGlobal);*/ - throw new NotImplementedException(); + TypeReferenceExpression tr = ParseUtilCSharp.ParseExpression("global::System"); + Assert.IsTrue (tr.IsMatch (new TypeReferenceExpression () { + Type = new MemberType () { + Target = new SimpleType ("global"), + IsDoubleColon = true, + MemberName = "System" + } + })); } - /* TODO - [Test] + [Test, Ignore ("Doesn't work")] public void GlobalTypeReferenceExpressionWithoutTypeName() { TypeReferenceExpression tr = ParseUtilCSharp.ParseExpression("global::", true); - Assert.AreEqual("?", tr.TypeReference.Type); - Assert.IsTrue(tr.TypeReference.IsGlobal); + Assert.IsTrue (tr.IsMatch (new TypeReferenceExpression () { + Type = new MemberType () { + Target = new SimpleType ("global"), + IsDoubleColon = true, + } + })); } - [Test] + [Test, Ignore("Primitive types as member reference target are not supported yet")] public void IntReferenceExpression() { MemberReferenceExpression fre = ParseUtilCSharp.ParseExpression("int.MaxValue"); - Assert.AreEqual("MaxValue", fre.MemberName); - Assert.AreEqual("System.Int32", ((TypeReferenceExpression)fre.TargetObject).TypeReference.Type); + Assert.IsTrue (fre.IsMatch (new MemberReferenceExpression () { + Target = new TypeReferenceExpression () { + Type = new PrimitiveType("int") + }, + MemberName = "MaxValue" + })); } - [Test] + /* [Test] public void StandaloneIntReferenceExpression() { + // doesn't work because a = int; gives a compiler error. + // But how do we handle this case for code completion? TypeReferenceExpression tre = ParseUtilCSharp.ParseExpression("int"); - Assert.AreEqual("System.Int32", tre.TypeReference.Type); - } - */ + Assert.IsNotNull (tre.Match (new TypeReferenceExpression () { + Type = new SimpleType ("int") + })); + }*/ + } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/AttributeSectionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/AttributeSectionTests.cs index ce21addc4..11450dd97 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/AttributeSectionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/AttributeSectionTests.cs @@ -3,28 +3,31 @@ using System; using System.Linq; +using System.Text.RegularExpressions; +using ICSharpCode.NRefactory.PatternMatching; using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope { - [TestFixture, Ignore] + [TestFixture] public class AttributeSectionTests { - [Test, Ignore] + [Test, Ignore("Parser crash")] public void GlobalAttributeCSharp() { string program = @"[global::Microsoft.VisualBasic.CompilerServices.DesignerGenerated()] [someprefix::DesignerGenerated()] public class Form1 { }"; - // TODO This old NRefactory test checked that [global] attributes are incorrectly applied to the following type??? - //TypeDeclaration decl = ParseUtilCSharp.ParseGlobal(program); - //Assert.AreEqual("Microsoft.VisualBasic.CompilerServices.DesignerGenerated", decl.Attributes.First().Attributes.Single().Name); - //Assert.AreEqual("someprefix.DesignerGenerated", decl.Attributes.Last().Attributes.Single().Name); + TypeDeclaration decl = ParseUtilCSharp.ParseGlobal(program); + Assert.AreEqual(2, decl.Attributes.Count); + Assert.AreEqual("global::Microsoft.VisualBasic.CompilerServices.DesignerGenerated", + decl.Attributes.First().Attributes.Single().Type.ToString()); + Assert.AreEqual("someprefix::DesignerGenerated", decl.Attributes.Last().Attributes.Single().Type.ToString()); } - [Test] + [Test, Ignore("assembly/module attributes are broken")] public void AssemblyAttributeCSharp() { string program = @"[assembly: System.Attribute()]"; @@ -33,7 +36,7 @@ public class Form1 { Assert.AreEqual("assembly", decl.AttributeTarget); } - [Test] + [Test, Ignore("assembly/module attributes are broken")] public void AssemblyAttributeCSharpWithNamedArguments() { string program = @"[assembly: Foo(1, namedArg: 2, prop = 3)]"; @@ -43,16 +46,25 @@ public class Form1 { Assert.AreEqual("Foo", a.Type); Assert.AreEqual(3, a.Arguments.Count()); - // TODO: check arguments + Assert.IsTrue(a.Arguments.ElementAt(0).IsMatch(new PrimitiveExpression(1))); + Assert.IsTrue(a.Arguments.ElementAt(1).IsMatch(new NamedArgumentExpression { + Identifier = "namedArg", + Expression = new PrimitiveExpression(2) + })); + Assert.IsTrue(a.Arguments.ElementAt(2).IsMatch(new AssignmentExpression { + Left = new IdentifierExpression("prop"), + Operator = AssignmentOperatorType.Assign, + Right = new PrimitiveExpression(3) + })); } - [Test] + [Test, Ignore("assembly/module attributes are broken")] public void ModuleAttributeCSharp() { string program = @"[module: System.Attribute()]"; AttributeSection decl = ParseUtilCSharp.ParseGlobal(program); Assert.AreEqual(new AstLocation(1, 1), decl.StartLocation); - Assert.AreEqual(AttributeTarget.Module, decl.AttributeTarget); + Assert.AreEqual("module", decl.AttributeTarget); } [Test] @@ -62,7 +74,28 @@ public class Form1 { TypeDeclaration type = ParseUtilCSharp.ParseGlobal(program); AttributeSection decl = type.Attributes.Single(); Assert.AreEqual(new AstLocation(1, 1), decl.StartLocation); - Assert.AreEqual(AttributeTarget.Type, decl.AttributeTarget); + Assert.AreEqual("type", decl.AttributeTarget); + } + + [Test, Ignore("Parser doesn't support attributes on type parameters")] + public void AttributesOnTypeParameter() + { + string program = @"class Test<[A,B]C> {}"; + TypeDeclaration type = ParseUtilCSharp.ParseGlobal(program); + Assert.IsTrue( + new TypeParameterDeclaration { + Attributes = { + new AttributeSection { + Attributes = { + new Attribute { Type = new SimpleType("A") }, + new Attribute { Type = new SimpleType("B") } + } + } + }, + Name = "C" + }.IsMatch(type.TypeParameters.Single())); } + + // TODO: Tests for other contexts where attributes can appear } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/DelegateDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/DelegateDeclarationTests.cs index e443e7b94..b41c5e569 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/DelegateDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/DelegateDeclarationTests.cs @@ -26,7 +26,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope }}); } - [Test, Ignore("Generics not yet supported")] + [Test] public void GenericDelegateDeclarationTest() { ParseUtilCSharp.AssertGlobal( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/TypeDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/TypeDeclarationTests.cs index 19183532c..4a0b5fad0 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/TypeDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/TypeDeclarationTests.cs @@ -18,8 +18,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope Assert.AreEqual(ClassType.Class, td.ClassType); Assert.AreEqual("MyClass", td.Name); - //Assert.AreEqual("My.Base.Class", td.BaseTypes[0].Type); - Assert.Ignore("need to check base type"); // TODO + Assert.AreEqual("My.Base.Class", td.BaseTypes.First ().ToString ()); Assert.AreEqual(Modifiers.None, td.Modifiers); } @@ -37,7 +36,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope Assert.AreEqual(2, td.EndLocation.Column, "EndLocation.Y"); } - [Test, Ignore("partial modifier is broken")] + [Test] public void SimplePartialClassTypeDeclarationTest() { TypeDeclaration td = ParseUtilCSharp.ParseGlobal("partial class MyClass { }"); @@ -47,7 +46,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope Assert.AreEqual(Modifiers.Partial, td.Modifiers); } - [Test, Ignore("nested classes are broken")] + [Test] public void NestedClassesTest() { TypeDeclaration td = ParseUtilCSharp.ParseGlobal("class MyClass { partial class P1 {} public partial class P2 {} static class P3 {} internal static class P4 {} }"); @@ -70,7 +69,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope Assert.AreEqual(Modifiers.Static, td.Modifiers); } - [Test, Ignore("Generics not yet supported")] + [Test] public void GenericClassTypeDeclarationTest() { ParseUtilCSharp.AssertGlobal( @@ -83,7 +82,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope }); } - [Test, Ignore("Constraints not yet supported")] + [Test] public void GenericClassWithWhere() { ParseUtilCSharp.AssertGlobal( @@ -101,7 +100,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope }}); } - [Test, Ignore("Generic classes not yet supported")] + [Test, Ignore ("Mono parser bug.")] public void ComplexGenericClassTypeDeclarationTest() { ParseUtilCSharp.AssertGlobal( @@ -144,7 +143,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope }); } - [Test, Ignore("Base types not yet implemented")] + [Test] public void ComplexClassTypeDeclarationTest() { ParseUtilCSharp.AssertGlobal( @@ -217,7 +216,7 @@ public abstract class MyClass : MyBase, Interface1, My.Test.Interface2 new TypeParameterDeclaration { Attributes = { new AttributeSection { - AttributeTarget = AttributeTarget.Unknown, + AttributeTarget = "partial", Attributes = { new Attribute { Type = new SimpleType("where") } } } }, diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/UsingDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/UsingDeclarationTests.cs index c9d4b7801..e5a82c3ea 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/UsingDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/GeneralScope/UsingDeclarationTests.cs @@ -12,7 +12,6 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope public class UsingDeclarationTests { [Test] - [Ignore("error reporting not yet implemented")] public void WrongUsingTest() { string program = "using\n"; @@ -43,7 +42,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.GeneralScope Assert.AreEqual("My.Name.Space", ud.Namespace); } - [Test, Ignore("Aliases to generic types not yet supported")] + [Test] public void UsingAliasDeclarationTest() { string program = "using TESTME=System;\n" + diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs index 7522b0284..cef1f5652 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs @@ -1,9 +1,11 @@ -// Copyright (c) 2010 AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// Copyright (c) 2010 AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under MIT X11 license (for details please see \doc\license.txt) using System; using System.IO; using System.Linq; + +using ICSharpCode.NRefactory.PatternMatching; using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser @@ -29,7 +31,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser public static void AssertGlobal(string code, AstNode expectedNode) { var node = ParseGlobal(code); - if (expectedNode.Match(node) == null) { + if (!expectedNode.IsMatch(node)) { Assert.Fail("Expected '{0}' but was '{1}'", ToCSharp(expectedNode), ToCSharp(node)); } } @@ -50,20 +52,19 @@ namespace ICSharpCode.NRefactory.CSharp.Parser public static void AssertStatement(string code, CSharp.Statement expectedStmt) { var stmt = ParseStatement(code); - if (expectedStmt.Match(stmt) == null) { + if (!expectedStmt.IsMatch(stmt)) { Assert.Fail("Expected '{0}' but was '{1}'", ToCSharp(expectedStmt), ToCSharp(stmt)); } } public static T ParseExpression(string expr, bool expectErrors = false) where T : AstNode { - if (expectErrors) Assert.Ignore("errors not yet implemented"); - CSharpParser parser = new CSharpParser(); AstNode parsedExpression = parser.ParseExpression(new StringReader(expr)); Assert.AreEqual(expectErrors, parser.HasErrors, "HasErrors"); - + if (expectErrors && parsedExpression == null) + return default (T); Type type = typeof(T); Assert.IsTrue(type.IsAssignableFrom(parsedExpression.GetType()), String.Format("Parsed expression was {0} instead of {1} ({2})", parsedExpression.GetType(), type, parsedExpression)); return (T)parsedExpression; @@ -72,15 +73,13 @@ namespace ICSharpCode.NRefactory.CSharp.Parser public static void AssertExpression(string code, CSharp.Expression expectedExpr) { var expr = ParseExpression(code); - if (expectedExpr.Match(expr) == null) { + if (!expectedExpr.IsMatch(expr)) { Assert.Fail("Expected '{0}' but was '{1}'", ToCSharp(expectedExpr), ToCSharp(expr)); } } public static T ParseTypeMember(string expr, bool expectErrors = false) where T : AttributedNode { - if (expectErrors) Assert.Ignore("errors not yet implemented"); - CSharpParser parser = new CSharpParser(); var members = parser.ParseTypeMembers(new StringReader(expr)); @@ -95,7 +94,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser public static void AssertTypeMember(string code, CSharp.AttributedNode expectedMember) { var member = ParseTypeMember(code); - if (expectedMember.Match(member) == null) { + if (!expectedMember.IsMatch(member)) { Assert.Fail("Expected '{0}' but was '{1}'", ToCSharp(expectedMember), ToCSharp(member)); } } @@ -103,7 +102,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser static string ToCSharp(AstNode node) { StringWriter w = new StringWriter(); - node.AcceptVisitor(new OutputVisitor(w, new CSharpFormattingPolicy()), null); + node.AcceptVisitor(new OutputVisitor(w, new CSharpFormattingOptions()), null); return w.ToString(); } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/BlockStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/BlockStatementTests.cs index f0fb9885e..2aaa2c57b 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/BlockStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/BlockStatementTests.cs @@ -17,7 +17,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements Assert.AreEqual(0, blockStmt.Statements.Count()); } - [Test, Ignore("position isn't correct when only parsing a block")] + [Test] public void ComplexBlockStatementPositionTest() { string code = @"{ @@ -30,7 +30,8 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements }; }"; BlockStatement blockStmt = ParseUtilCSharp.ParseStatement(code); - Assert.AreEqual(1, blockStmt.StartLocation.Column); +// start column gets moved by ParseStatement +// Assert.AreEqual(1, blockStmt.StartLocation.Column); Assert.AreEqual(1, blockStmt.StartLocation.Line); Assert.AreEqual(2, blockStmt.EndLocation.Column); Assert.AreEqual(9, blockStmt.EndLocation.Line); diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/FixedStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/FixedStatementTests.cs index bf62bec0e..374bf760b 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/FixedStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/FixedStatementTests.cs @@ -6,21 +6,43 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Statements { - [TestFixture, Ignore("fixed is not implemented")] + [TestFixture] public class FixedStatementTests { [Test] public void FixedStatementTest() { - FixedStatement fixedStmt = ParseUtilCSharp.ParseStatement("fixed (int* ptr = &myIntArr) { }"); ParseUtilCSharp.AssertStatement( - "fixed (int* ptr = &myIntArr) { }", + "fixed (int* ptr = myIntArr) { }", new FixedStatement { Type = new PrimitiveType("int").MakePointerType(), Variables = { new VariableInitializer { Name = "ptr", - Initializer = new UnaryOperatorExpression(UnaryOperatorType.AddressOf, new IdentifierExpression("myIntArr")) + Initializer = new IdentifierExpression("myIntArr") + } + }, + EmbeddedStatement = new BlockStatement() + }); + } + + [Test] + public void FixedStatementWithMultipleVariables() + { + ParseUtilCSharp.AssertStatement( + "fixed (int* ptr1 = &myIntArr[1], ptr2 = myIntArr) { }", + new FixedStatement { + Type = new PrimitiveType("int").MakePointerType(), + Variables = { + new VariableInitializer { + Name = "ptr1", + Initializer = new UnaryOperatorExpression( + UnaryOperatorType.AddressOf, + new IndexerExpression { Target = new IdentifierExpression("myIntArr"), Arguments = { new PrimitiveExpression(1) } }) + }, + new VariableInitializer { + Name = "ptr2", + Initializer = new IdentifierExpression("myIntArr") } }, EmbeddedStatement = new BlockStatement() diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/ForStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/ForStatementTests.cs index fc18cdab4..44232de5a 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/ForStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/ForStatementTests.cs @@ -10,7 +10,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements [TestFixture] public class ForStatementTests { - [Test, Ignore("variable type in foreach is broken")] + [Test] public void ForeachStatementTest() { ParseUtilCSharp.AssertStatement( @@ -23,7 +23,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements }); } - [Test, Ignore("for statement is broken when Initializers.Count()!=1")] + [Test] public void EmptyForStatementTest() { ForStatement forStmt = ParseUtilCSharp.ParseStatement("for (;;) ;"); diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/GotoStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/GotoStatementTests.cs index ce1df02fc..f5a882b0b 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/GotoStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/GotoStatementTests.cs @@ -10,7 +10,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements [TestFixture] public class GotoStatementTests { - [Test, Ignore("regular goto statement is broken")] + [Test] public void GotoStatementTest() { var gotoStmt = ParseUtilCSharp.ParseStatement("goto myLabel;"); diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/TryCatchStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/TryCatchStatementTests.cs index 7187f4b5d..5854bf904 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/TryCatchStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/TryCatchStatementTests.cs @@ -4,6 +4,7 @@ using System; using System.Linq; using NUnit.Framework; +using ICSharpCode.NRefactory.PatternMatching; namespace ICSharpCode.NRefactory.CSharp.Parser.Statements { @@ -66,8 +67,8 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements CatchClauses = { new CatchClause { Body = new BlockStatement() } }, FinallyBlock = new BlockStatement() }; - Assert.IsNull(c1.Match(c2)); - Assert.IsNull(c2.Match(c1)); // and vice versa + Assert.IsFalse(c1.IsMatch(c2)); + Assert.IsFalse(c2.IsMatch(c1)); // and vice versa } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/UsingStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/UsingStatementTests.cs index 785b91355..db377d078 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/UsingStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/UsingStatementTests.cs @@ -2,6 +2,7 @@ // This code is distributed under MIT X11 license (for details please see \doc\license.txt) using System; +using System.Linq; using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Statements @@ -9,11 +10,22 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements [TestFixture] public class UsingStatementTests { - [Test] - public void UsingStatementTest() + [Test, Ignore("Parser doesn't report the VariableDeclarationStatement")] + public void UsingStatementWithVariableDeclaration() { UsingStatement usingStmt = ParseUtilCSharp.ParseStatement("using (MyVar var = new MyVar()) { } "); - // TODO : Extend test. + VariableDeclarationStatement varDecl = (VariableDeclarationStatement)usingStmt.ResourceAcquisition; + Assert.AreEqual("var", varDecl.Variables.Single().Name); + Assert.IsTrue(varDecl.Variables.Single().Initializer is ObjectCreateExpression); + Assert.AreEqual("MyVar", ((SimpleType)varDecl.Type).Identifier); + Assert.IsTrue(usingStmt.EmbeddedStatement is BlockStatement); + } + + public void UsingStatementWithExpression() + { + UsingStatement usingStmt = ParseUtilCSharp.ParseStatement("using (new MyVar()) { } "); + Assert.IsTrue(usingStmt.ResourceAcquisition is ObjectCreateExpression); + Assert.IsTrue(usingStmt.EmbeddedStatement is BlockStatement); } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/VariableDeclarationStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/VariableDeclarationStatementTests.cs index e9217e189..74564a6bf 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/VariableDeclarationStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/VariableDeclarationStatementTests.cs @@ -3,11 +3,12 @@ using System; using System.Linq; +using ICSharpCode.NRefactory.PatternMatching; using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Statements { - [TestFixture, Ignore] + [TestFixture] public class VariableDeclarationStatementTests { [Test] @@ -15,191 +16,143 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("int a = 5;"); Assert.AreEqual(1, lvd.Variables.Count()); - /*Assert.AreEqual("a", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("System.Int32", type.Type); - Assert.AreEqual(5, ((PrimitiveExpression)lvd.Variables[0].Initializer).Value);*/ throw new NotImplementedException(); + Assert.AreEqual("a", lvd.Variables.First ().Name); + var type = lvd.Type; + Assert.AreEqual("int", type.ToString ()); + Assert.AreEqual(5, ((PrimitiveExpression)lvd.Variables.First ().Initializer).Value); } - /* TODO port unit tests [Test] public void VoidPointerVariableDeclarationTest() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("void *a;"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("a", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("System.Void", type.Type); - Assert.AreEqual(1, type.PointerNestingLevel); + Assert.IsTrue(new VariableDeclarationStatement(new PrimitiveType("void").MakePointerType(), "a").IsMatch(lvd)); } [Test] public void ComplexGenericVariableDeclarationStatementTest() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("Generic > where = new Generic>();"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("where", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("Generic", type.Type); - Assert.AreEqual(2, type.GenericTypes.Count); - Assert.AreEqual("Namespace.Printable", type.GenericTypes[0].Type); - Assert.AreEqual(0, type.GenericTypes[0].GenericTypes.Count); - Assert.AreEqual("G", type.GenericTypes[1].Type); - Assert.AreEqual(1, type.GenericTypes[1].GenericTypes.Count); - Assert.AreEqual("Printable", type.GenericTypes[1].GenericTypes[0].Type); - - // TODO: Check initializer + AstType type = new SimpleType("Generic") { + TypeArguments = { + new MemberType { Target = new SimpleType("Namespace"), MemberName = "Printable" }, + new SimpleType("G") { TypeArguments = { new SimpleType("Printable").MakeArrayType() } } + }}; + Assert.IsTrue(new VariableDeclarationStatement(type, "where", new ObjectCreateExpression { Type = type.Clone() }).IsMatch(lvd)); } [Test] public void NestedGenericVariableDeclarationStatementTest() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("MyType.InnerClass.InnerInnerClass a;"); - Assert.AreEqual(1, lvd.Variables.Count); - InnerClassTypeReference ic = (InnerClassTypeReference)lvd.GetTypeForVariable(0); - Assert.AreEqual("InnerInnerClass", ic.Type); - Assert.AreEqual(0, ic.GenericTypes.Count); - ic = (InnerClassTypeReference)ic.BaseType; - Assert.AreEqual("InnerClass", ic.Type); - Assert.AreEqual(1, ic.GenericTypes.Count); - Assert.AreEqual("System.Int32", ic.GenericTypes[0].Type); - Assert.AreEqual("MyType", ic.BaseType.Type); - Assert.AreEqual(1, ic.BaseType.GenericTypes.Count); - Assert.AreEqual("System.String", ic.BaseType.GenericTypes[0].Type); + AstType type = new MemberType { + Target = new MemberType { + Target = new SimpleType("MyType") { TypeArguments = { new PrimitiveType("string") } }, + MemberName = "InnerClass", + TypeArguments = { new PrimitiveType("int") } + }, + MemberName = "InnerInnerClass" + }; + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] public void GenericWithArrayVariableDeclarationStatementTest1() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("G[] a;"); - Assert.AreEqual(1, lvd.Variables.Count); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("G", type.Type); - Assert.AreEqual(1, type.GenericTypes.Count); - Assert.AreEqual("System.Int32", type.GenericTypes[0].Type); - Assert.AreEqual(0, type.GenericTypes[0].GenericTypes.Count); - Assert.IsFalse(type.GenericTypes[0].IsArrayType); - Assert.AreEqual(new int[] {0}, type.RankSpecifier); + AstType type = new SimpleType("G") { + TypeArguments = { new PrimitiveType("int") } + }.MakeArrayType(); + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] public void GenericWithArrayVariableDeclarationStatementTest2() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("G a;"); - Assert.AreEqual(1, lvd.Variables.Count); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("G", type.Type); - Assert.AreEqual(1, type.GenericTypes.Count); - Assert.AreEqual("System.Int32", type.GenericTypes[0].Type); - Assert.AreEqual(0, type.GenericTypes[0].GenericTypes.Count); - Assert.IsFalse(type.IsArrayType); - Assert.AreEqual(new int[] {0}, type.GenericTypes[0].RankSpecifier); + AstType type = new SimpleType("G") { + TypeArguments = { new PrimitiveType("int").MakeArrayType() } + }; + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] public void GenericVariableDeclarationStatementTest2() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("G > a;"); - Assert.AreEqual(1, lvd.Variables.Count); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("G", type.Type); - Assert.AreEqual(1, type.GenericTypes.Count); - Assert.AreEqual("G", type.GenericTypes[0].Type); - Assert.AreEqual(1, type.GenericTypes[0].GenericTypes.Count); - Assert.AreEqual("System.Int32", type.GenericTypes[0].GenericTypes[0].Type); + AstType type = new SimpleType("G") { + TypeArguments = { + new SimpleType("G") { TypeArguments = { new PrimitiveType("int") } } + } + }; + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] public void GenericVariableDeclarationStatementTest2WithoutSpace() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("G> a;"); - Assert.AreEqual(1, lvd.Variables.Count); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("G", type.Type); - Assert.AreEqual(1, type.GenericTypes.Count); - Assert.AreEqual("G", type.GenericTypes[0].Type); - Assert.AreEqual(1, type.GenericTypes[0].GenericTypes.Count); - Assert.AreEqual("System.Int32", type.GenericTypes[0].GenericTypes[0].Type); + AstType type = new SimpleType("G") { + TypeArguments = { + new SimpleType("G") { TypeArguments = { new PrimitiveType("int") } } + } + }; + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] public void GenericVariableDeclarationStatementTest() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("G a;"); - Assert.AreEqual(1, lvd.Variables.Count); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("G", type.Type); - Assert.AreEqual(1, type.GenericTypes.Count); - Assert.AreEqual("System.Int32", type.GenericTypes[0].Type); + AstType type = new SimpleType("G") { + TypeArguments = { new PrimitiveType("int") } + }; + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] public void SimpleVariableDeclarationStatementTest() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("MyVar var = new MyVar();"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("var", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("MyVar", type.Type); - // TODO: Check initializer + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("MyVar"), "var", new ObjectCreateExpression { Type = new SimpleType("MyVar") }).IsMatch(lvd)); } [Test] public void SimpleVariableDeclarationStatementTest1() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("yield yield = new yield();"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("yield", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("yield", type.Type); - // TODO: Check initializer + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("yield"), "yield", new ObjectCreateExpression { Type = new SimpleType("yield") }).IsMatch(lvd)); } [Test] public void NullableVariableDeclarationStatementTest1() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("int? a;"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("a", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("System.Nullable", type.Type); - Assert.AreEqual("System.Int32", type.GenericTypes[0].Type); + Assert.IsTrue(new VariableDeclarationStatement(new PrimitiveType("int").MakeNullableType(), "a").IsMatch(lvd)); } [Test] public void NullableVariableDeclarationStatementTest2() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("DateTime? a;"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("a", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("System.Nullable", type.Type); - Assert.AreEqual("DateTime", type.GenericTypes[0].Type); + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("DateTime").MakeNullableType(), "a").IsMatch(lvd)); } - [Test] + [Test, Ignore("The parser creates nested ComposedTypes while MakeArrayType() adds the specifier to the existing ComposedType")] public void NullableVariableDeclarationStatementTest3() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("DateTime?[] a;"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("a", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.IsTrue(type.IsArrayType); - Assert.AreEqual("System.Nullable", type.Type); - Assert.AreEqual("DateTime", type.GenericTypes[0].Type); + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("DateTime").MakeNullableType().MakeArrayType(), "a").IsMatch(lvd)); } [Test] public void NullableVariableDeclarationStatementTest4() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("SomeStruct? a;"); - Assert.AreEqual(1, lvd.Variables.Count); - Assert.AreEqual("a", ((VariableDeclaration)lvd.Variables[0]).Name); - TypeReference type = lvd.GetTypeForVariable(0); - Assert.AreEqual("System.Nullable", type.Type); - Assert.AreEqual("SomeStruct", type.GenericTypes[0].Type); - Assert.AreEqual("System.Nullable", type.GenericTypes[0].GenericTypes[0].Type); - Assert.AreEqual("System.Int32", type.GenericTypes[0].GenericTypes[0].GenericTypes[0].Type); + AstType type = new SimpleType("SomeStruct") { + TypeArguments = { new PrimitiveType("int").MakeNullableType() } + }.MakeNullableType(); + Assert.IsTrue(new VariableDeclarationStatement(type, "a").IsMatch(lvd)); } [Test] @@ -216,11 +169,39 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements public void PositionTestWithModifier() { VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("\nconst double w = 7;"); - Assert.AreEqual(Modifiers.Const, lvd.Modifier); + Assert.AreEqual(Modifiers.Const, lvd.Modifiers); Assert.AreEqual(2, lvd.StartLocation.Line); Assert.AreEqual(1, lvd.StartLocation.Column); Assert.AreEqual(2, lvd.EndLocation.Line); Assert.AreEqual(20, lvd.EndLocation.Column); - }*/ + } + + [Test, Ignore("Nested arrays are broken in the parser")] + public void NestedArray() + { + VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("DateTime[,][] a;"); + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("DateTime").MakeArrayType(1).MakeArrayType(2), "a").IsMatch(lvd)); + } + + [Test, Ignore("Nested pointers are broken in the parser")] + public void NestedPointers() + { + VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("DateTime*** a;"); + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("DateTime").MakePointerType().MakePointerType().MakePointerType(), "a").IsMatch(lvd)); + } + + [Test, Ignore("The parser creates nested ComposedTypes while MakeArrayType() adds the specifier to the existing ComposedType")] + public void ArrayOfPointers() + { + VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("DateTime*[] a;"); + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("DateTime").MakePointerType().MakeArrayType(), "a").IsMatch(lvd)); + } + + [Test, Ignore("The parser creates nested ComposedTypes while MakeArrayType() adds the specifier to the existing ComposedType")] + public void ArrayOfNullables() + { + VariableDeclarationStatement lvd = ParseUtilCSharp.ParseStatement("DateTime?[] a;"); + Assert.IsTrue(new VariableDeclarationStatement(new SimpleType("DateTime").MakeNullableType().MakeArrayType(), "a").IsMatch(lvd)); + } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/ConstructorDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/ConstructorDeclarationTests.cs index 340c43430..3d3124a39 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/ConstructorDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/ConstructorDeclarationTests.cs @@ -17,7 +17,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.IsTrue(cd.Initializer.IsNull); } - [Test, Ignore("Constructor initializer is broken")] + [Test] public void ConstructorDeclarationTest2() { ConstructorDeclaration cd = ParseUtilCSharp.ParseTypeMember("MyClass() : this(5) {}"); @@ -25,7 +25,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.AreEqual(1, cd.Initializer.Arguments.Count()); } - [Test, Ignore("Constructor initializer is broken")] + [Test] public void ConstructorDeclarationTest3() { ConstructorDeclaration cd = ParseUtilCSharp.ParseTypeMember("MyClass() : base(1, 2, 3) {}"); diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/EventDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/EventDeclarationTests.cs index 7e9d13453..35c98a4a1 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/EventDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/EventDeclarationTests.cs @@ -6,7 +6,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers { - [TestFixture, Ignore("events are broken")] + [TestFixture] public class EventDeclarationTests { [Test] @@ -38,7 +38,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers }, new VariableInitializer { Name = "B", - Initializer = new AnonymousMethodExpression() + Initializer = new AnonymousMethodExpression() { Body = new BlockStatement ()} } }}); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/FieldDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/FieldDeclarationTests.cs index 6f47dc588..1ed04478b 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/FieldDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/FieldDeclarationTests.cs @@ -9,7 +9,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers [TestFixture] public class FieldDeclarationTests { - [Test, Ignore("multidimensional array rank incorrect?")] + [Test] public void SimpleFieldDeclarationTest() { ParseUtilCSharp.AssertTypeMember( @@ -56,12 +56,21 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers }}); } - [Test, Ignore("How do we represent fixed-size fields in the AST?")] + [Test] public void FieldWithFixedSize() { ParseUtilCSharp.AssertTypeMember( "public unsafe fixed int Field[100];", - new FieldDeclaration()); + new FixedFieldDeclaration() { + Modifiers = Modifiers.Public | Modifiers.Unsafe, + ReturnType = new PrimitiveType("int"), + Variables = { + new FixedVariableInitializer { + Name = "Field", + CountExpression = new PrimitiveExpression(100) + } + } + }); } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/IndexerDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/IndexerDeclarationTests.cs index 5353808fc..a324c51b1 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/IndexerDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/IndexerDeclarationTests.cs @@ -22,7 +22,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.AreEqual(Modifiers.Protected, id.Setter.Modifiers); } - [Test, Ignore("explicit interface implementation not yet supported")] + [Test] public void IndexerImplementingInterfaceTest() { IndexerDeclaration id = ParseUtilCSharp.ParseTypeMember("int MyInterface.this[int a, string b] { get { } set { } }"); @@ -33,7 +33,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.AreEqual("MyInterface", ((SimpleType)id.PrivateImplementationType).Identifier); } - [Test, Ignore("explicit interface implementation not yet supported")] + [Test] public void IndexerImplementingGenericInterfaceTest() { ParseUtilCSharp.AssertTypeMember( diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs index e3302d7c0..c0a8ab3c3 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs @@ -8,7 +8,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers { - [TestFixture, Ignore("Generics not yet implemented")] + [TestFixture] public class MethodDeclarationTests { [Test] @@ -89,7 +89,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers public void MethodWithUnnamedParameterDeclarationTest() { MethodDeclaration md = ParseUtilCSharp.ParseTypeMember("void MyMethod(int) {} ", true); - Assert.AreEqual("System.Void", md.ReturnType); + Assert.AreEqual("void", md.ReturnType.ToString ()); Assert.AreEqual(1, md.Parameters.Count()); Assert.AreEqual("int", ((PrimitiveType)md.Parameters.Single().Type).Keyword); } @@ -202,6 +202,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers ", new TypeDeclaration { ClassType = ClassType.Interface, + Name = "MyInterface", BaseTypes = { new SimpleType("IDisposable") }, Members = { new MethodDeclaration { @@ -214,7 +215,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers [Test] public void MethodImplementingInterfaceTest() { - ParseUtilCSharp.AssertGlobal( + ParseUtilCSharp.AssertTypeMember( "int MyInterface.MyMethod() {} ", new MethodDeclaration { ReturnType = new PrimitiveType("int"), @@ -227,7 +228,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers [Test] public void MethodImplementingGenericInterfaceTest() { - ParseUtilCSharp.AssertGlobal( + ParseUtilCSharp.AssertTypeMember( "int MyInterface.MyMethod() {} ", new MethodDeclaration { ReturnType = new PrimitiveType("int"), @@ -240,7 +241,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers [Test] public void VoidMethodImplementingInterfaceTest() { - ParseUtilCSharp.AssertGlobal( + ParseUtilCSharp.AssertTypeMember ( "void MyInterface.MyMethod() {} ", new MethodDeclaration { ReturnType = new PrimitiveType("void"), @@ -253,11 +254,11 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers [Test] public void VoidMethodImplementingGenericInterfaceTest() { - ParseUtilCSharp.AssertGlobal( + ParseUtilCSharp.AssertTypeMember ( "void MyInterface.MyMethod() {} ", new MethodDeclaration { ReturnType = new PrimitiveType("void"), - PrivateImplementationType = new SimpleType("MyInterface"), + PrivateImplementationType = new SimpleType("MyInterface") { TypeArguments = { new PrimitiveType("string") } }, Name = "MyMethod", Body = new BlockStatement() }); @@ -305,15 +306,15 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers public void MethodWithEmptyAssignmentErrorInBody() { MethodDeclaration md = ParseUtilCSharp.ParseTypeMember( - "void A\n" + + "void A ()\n" + "{\n" + "int a = 3;\n" + " = 4;\n" + "}", true // expect errors ); Assert.AreEqual("A", md.Name); - Assert.AreEqual(new AstLocation(1, 2), md.Body.StartLocation); - Assert.AreEqual(new AstLocation(2, 5), md.Body.EndLocation); + Assert.AreEqual(new AstLocation(2, 1), md.Body.StartLocation); + Assert.AreEqual(new AstLocation(5, 2), md.Body.EndLocation); } [Test] diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/PropertyDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/PropertyDeclarationTests.cs index fba68f26e..a9d0711d4 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/PropertyDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/PropertyDeclarationTests.cs @@ -5,6 +5,7 @@ using System; using System.IO; using System.Linq; using NUnit.Framework; +using ICSharpCode.NRefactory.PatternMatching; namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers { @@ -66,7 +67,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.AreEqual(new AstLocation(4, code.IndexOf("}\n\t}") + 1 - line4Pos + 1), pd.Setter.Body.EndLocation); } - [Test, Ignore("explicit interface implementation not yet implemented")] + [Test] public void PropertyImplementingInterfaceTest() { PropertyDeclaration pd = ParseUtilCSharp.ParseTypeMember("int MyInterface.MyProperty { get {} } "); @@ -77,7 +78,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.AreEqual("MyInterface", ((SimpleType)pd.PrivateImplementationType).Identifier); } - [Test, Ignore("explicit interface implementation not yet implemented")] + [Test] public void PropertyImplementingGenericInterfaceTest() { PropertyDeclaration pd = ParseUtilCSharp.ParseTypeMember("int MyInterface.MyProperty { get {} } "); @@ -85,7 +86,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers Assert.IsFalse(pd.Getter.IsNull); Assert.IsTrue(pd.Setter.IsNull); - Assert.IsNotNull(new SimpleType { Identifier = "MyInterface", TypeArguments = { new PrimitiveType("string") } }.Match(pd.PrivateImplementationType)); + Assert.IsTrue(new SimpleType { Identifier = "MyInterface", TypeArguments = { new PrimitiveType("string") } }.IsMatch(pd.PrivateImplementationType)); } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs index f98155d96..9df45f3d9 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs @@ -274,5 +274,19 @@ class TestClass { var lrr = Resolve(program); Assert.AreEqual("System.Int32", lrr.Type.ReflectionName); } + + /* TODO write test for this +class A +{ + static void Foo(string x, Action y) { Console.WriteLine(1); } + static void Foo(object x, Func, int> y) { Console.WriteLine(2); } + + static void Main() + { + Foo(null, x => x()); // Prints 1 + Foo(null, x => (x())); // Prints 2 + } +} + */ } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs index eaf63795b..f1701156c 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs @@ -138,7 +138,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver // static void Foo(T? ignored = default(T?)) where T : struct var m1 = MakeMethod(); - m1.TypeParameters.Add(new DefaultTypeParameter(m1, 0, "T") { HasValueTypeConstraint = true }); + m1.TypeParameters.Add(new DefaultTypeParameter(EntityType.Method, 0, "T") { HasValueTypeConstraint = true }); m1.Parameters.Add(MakeOptionalParameter( NullableType.Create(m1.TypeParameters[0], context), "ignored" @@ -146,12 +146,12 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver // class ClassConstraint where T : class {} DefaultTypeDefinition classConstraint = new DefaultTypeDefinition(dummyClass, "ClassConstraint"); - classConstraint.TypeParameters.Add(new DefaultTypeParameter(classConstraint, 0, "T") { HasReferenceTypeConstraint = true }); + classConstraint.TypeParameters.Add(new DefaultTypeParameter(EntityType.TypeDefinition, 0, "T") { HasReferenceTypeConstraint = true }); // static void Foo(ClassConstraint ignored = default(ClassConstraint)) // where T : class var m2 = MakeMethod(); - m2.TypeParameters.Add(new DefaultTypeParameter(m2, 0, "T") { HasReferenceTypeConstraint = true }); + m2.TypeParameters.Add(new DefaultTypeParameter(EntityType.Method, 0, "T") { HasReferenceTypeConstraint = true }); m2.Parameters.Add(MakeOptionalParameter( new ParameterizedType(classConstraint, new[] { m2.TypeParameters[0] }), "ignored" @@ -159,7 +159,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver // static void Foo() var m3 = MakeMethod(); - m3.TypeParameters.Add(new DefaultTypeParameter(m3, 0, "T")); + m3.TypeParameters.Add(new DefaultTypeParameter(EntityType.Method, 0, "T")); // Call: Foo(); OverloadResolution o; diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs index ad8a6584b..d231327f1 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBlankLinesAfterUsings () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesAfterUsings = 2; var adapter = Test (policy, @"using System; @@ -65,7 +65,7 @@ namespace Test [Test()] public void TestBlankLinesBeforeUsings () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesAfterUsings = 0; policy.BlankLinesBeforeUsings = 2; @@ -94,7 +94,7 @@ namespace Test [Test()] public void TestBlankLinesBeforeFirstDeclaration () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesBeforeFirstDeclaration = 2; var adapter = Test (policy, @"namespace Test @@ -125,7 +125,7 @@ namespace Test [Test()] public void TestBlankLinesBetweenTypes () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesBetweenTypes = 1; var adapter = Test (policy, @"namespace Test @@ -173,7 +173,7 @@ namespace Test [Test()] public void TestBlankLinesBetweenFields () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesBetweenFields = 1; var adapter = Test (policy, @"class Test @@ -203,7 +203,7 @@ namespace Test [Test()] public void TestBlankLinesBetweenEventFields () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesBetweenEventFields = 1; var adapter = Test (policy, @"class Test @@ -234,7 +234,7 @@ namespace Test [Test()] public void TestBlankLinesBetweenMembers () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.BlankLinesBetweenMembers = 1; var adapter = Test (policy,@"class Test diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs index ed83c8d4a..033bf1924 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestNamespaceBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.NamespaceBraceStyle = BraceStyle.EndOfLine; policy.ClassBraceStyle = BraceStyle.DoNotChange; @@ -67,7 +67,7 @@ namespace B { [Test()] public void TestClassBraceStlye () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @@ -79,7 +79,7 @@ namespace B { [Test()] public void TestStructBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StructBraceStyle = BraceStyle.NextLine; Test (policy, @@ -92,7 +92,7 @@ namespace B { [Test()] public void TestInterfaceBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.InterfaceBraceStyle = BraceStyle.NextLine; Test (policy, @@ -105,7 +105,7 @@ namespace B { [Test()] public void TestEnumBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.EnumBraceStyle = BraceStyle.NextLineShifted; Test (policy, @"enum Test { @@ -120,7 +120,7 @@ namespace B { [Test()] public void TestMethodBraceStlye () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.MethodBraceStyle = BraceStyle.NextLine; Test (policy, @"class Test @@ -138,7 +138,7 @@ namespace B { [Test()] public void TestConstructorBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ConstructorBraceStyle = BraceStyle.NextLine; Test (policy, @"class Test @@ -156,7 +156,7 @@ namespace B { [Test()] public void TestDestructorBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.DestructorBraceStyle = BraceStyle.NextLine; Test (policy, @"class Test @@ -174,7 +174,7 @@ namespace B { [Test()] public void TestPropertyBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyBraceStyle = BraceStyle.NextLine; Test (policy, @"class Test @@ -197,7 +197,7 @@ namespace B { [Test()] public void TestPropertyGetBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyGetBraceStyle = BraceStyle.NextLine; Test (policy, @"class Test @@ -225,7 +225,7 @@ namespace B { public void TestAllowPropertyGetBlockInline () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyBraceStyle = BraceStyle.DoNotChange; policy.AllowPropertyGetBlockInline = true; policy.AllowPropertySetBlockInline = false; @@ -265,7 +265,7 @@ namespace B { [Test()] public void TestAllowPropertySetBlockInline () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyBraceStyle = BraceStyle.DoNotChange; policy.AllowPropertyGetBlockInline = false; policy.AllowPropertySetBlockInline = true; @@ -305,7 +305,7 @@ namespace B { [Test()] public void TestPropertySetBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertySetBraceStyle = BraceStyle.NextLine; Test (policy, @"class Test @@ -332,7 +332,7 @@ namespace B { [Test()] public void TestEventBraceStyle () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.EventBraceStyle = BraceStyle.NextLine; policy.EventAddBraceStyle = BraceStyle.NextLine; policy.EventRemoveBraceStyle = BraceStyle.NextLine; @@ -363,7 +363,7 @@ namespace B { [Test()] public void TestAllowEventAddBlockInline () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.AllowEventAddBlockInline = true; policy.AllowEventRemoveBlockInline = false; @@ -388,7 +388,7 @@ namespace B { [Test()] public void TestAllowEventRemoveBlockInline () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.AllowEventAddBlockInline = false; policy.AllowEventRemoveBlockInline = true; diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs index b4370368a..025ea8f0a 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs @@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBug325187 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceElseOnNewLine = true; TestStatementFormatting (policy, @@ -62,7 +62,7 @@ Console.WriteLine (""Bad indent"");", [Test()] public void TestBug415469 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); TestStatementFormatting (policy, @"switch (condition) { @@ -86,7 +86,7 @@ case CONDITION2: [Test()] public void TestBug540043 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); TestStatementFormatting (policy, @"using (IDisposable a = null) @@ -105,7 +105,7 @@ using (IDisposable b = null) { [Test()] public void TestBug655635 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); TestStatementFormatting (policy, @"try { @@ -121,7 +121,7 @@ using (IDisposable b = null) { }"); } - void TestStatementFormatting (CSharpFormattingPolicy policy, string input, string expectedOutput) + void TestStatementFormatting (CSharpFormattingOptions policy, string input, string expectedOutput) { var result = GetResult (policy, @"class Test { @@ -143,7 +143,7 @@ using (IDisposable b = null) { [Test()] public void TestBug659675 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); TestStatementFormatting (policy, "@string=@int;", "@string = @int;"); } @@ -153,7 +153,7 @@ using (IDisposable b = null) { [Test()] public void TestBug670213 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.MethodBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test @@ -176,7 +176,7 @@ using (IDisposable b = null) { [Test()] public void TestBug677261 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ConstructorBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs index 0f4bc4416..a3ca7666c 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestFieldSpacesBeforeComma1 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; policy.SpaceBeforeFieldDeclarationComma = false; policy.SpaceAfterFieldDeclarationComma = false; @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestFieldSpacesBeforeComma2 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; policy.SpaceBeforeFieldDeclarationComma = true; policy.SpaceAfterFieldDeclarationComma = true; @@ -69,7 +69,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestFixedFieldSpacesBeforeComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; policy.SpaceAfterFieldDeclarationComma = true; policy.SpaceBeforeFieldDeclarationComma = true; @@ -85,7 +85,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestConstFieldSpacesBeforeComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; policy.SpaceAfterFieldDeclarationComma = false; policy.SpaceBeforeFieldDeclarationComma = false; @@ -101,7 +101,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeMethodDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodDeclarationParentheses = true; Test (policy, @"public abstract class Test @@ -117,7 +117,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeConstructorDeclarationParenthesesDestructorCase () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeConstructorDeclarationParentheses = true; Test (policy, @"class Test @@ -134,7 +134,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); } - static void TestBinaryOperator (CSharpFormattingPolicy policy, string op) + static void TestBinaryOperator (CSharpFormattingOptions policy, string op) { var result = GetResult (policy, "class Test { void TestMe () { result = left" + op + "right; } }"); @@ -148,7 +148,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundMultiplicativeOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundMultiplicativeOperator = true; TestBinaryOperator (policy, "*"); @@ -158,7 +158,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundShiftOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundShiftOperator = true; TestBinaryOperator (policy, "<<"); TestBinaryOperator (policy, ">>"); @@ -167,7 +167,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundAdditiveOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundAdditiveOperator = true; TestBinaryOperator (policy, "+"); @@ -177,7 +177,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundBitwiseOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundBitwiseOperator = true; TestBinaryOperator (policy, "&"); @@ -188,7 +188,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundRelationalOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundRelationalOperator = true; TestBinaryOperator (policy, "<"); @@ -200,7 +200,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundEqualityOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundEqualityOperator = true; TestBinaryOperator (policy, "=="); @@ -210,7 +210,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAroundLogicalOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundLogicalOperator = true; TestBinaryOperator (policy, "&&"); @@ -220,7 +220,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestConditionalOperator () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeConditionalOperatorCondition = true; policy.SpaceAfterConditionalOperatorCondition = true; policy.SpaceBeforeConditionalOperatorSeparator = true; @@ -256,7 +256,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeMethodCallParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodCallParentheses = true; var result = GetResult (policy, @"class Test { @@ -288,7 +288,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinMethodCallParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceWithinMethodCallParentheses = true; var result = GetResult (policy, @"class Test { @@ -318,7 +318,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeIfParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeIfParentheses = true; var result = GetResult (policy, @"class Test { @@ -335,7 +335,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinIfParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinIfParentheses = true; var result = GetResult (policy, @"class Test { @@ -352,7 +352,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeWhileParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeWhileParentheses = true; var result = GetResult (policy, @"class Test { @@ -369,7 +369,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinWhileParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinWhileParentheses = true; var result = GetResult (policy, @"class Test { @@ -387,7 +387,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeForParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeForParentheses = true; var result = GetResult (policy, @"class Test { @@ -404,7 +404,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinForParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinForParentheses = true; var result = GetResult (policy, @"class Test { @@ -421,7 +421,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeForeachParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeForeachParentheses = true; var result = GetResult (policy, @"class Test { @@ -438,7 +438,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinForeachParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinForeachParentheses = true; var result = GetResult (policy, @"class Test { @@ -455,7 +455,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeCatchParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeCatchParentheses = true; var result = GetResult (policy, @"class Test { @@ -472,7 +472,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinCatchParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinCatchParentheses = true; var result = GetResult (policy, @"class Test { @@ -489,7 +489,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestBeforeLockParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeLockParentheses = true; var result = GetResult (policy, @"class Test { @@ -506,7 +506,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestWithinLockParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinLockParentheses = true; var result = GetResult (policy, @"class Test { @@ -523,7 +523,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAfterForSemicolon () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAfterForSemicolon = true; var result = GetResult (policy, @"class Test { @@ -541,7 +541,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesBeforeForSemicolon () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeForSemicolon = true; policy.SpaceAfterForSemicolon = false; @@ -560,7 +560,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestSpacesAfterTypecast () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAfterTypecast = true; var result = GetResult (policy, @"class Test { @@ -578,7 +578,7 @@ return (Test)null; [Test()] public void TestBeforeUsingParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeUsingParentheses = true; var result = GetResult (policy, @"class Test { @@ -595,7 +595,7 @@ return (Test)null; [Test()] public void TestWithinUsingParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinUsingParentheses = true; var result = GetResult (policy, @"class Test { @@ -609,7 +609,7 @@ return (Test)null; Assert.AreEqual (@"( a )", result.GetTextAt (i1, i2 - i1)); } - static void TestAssignmentOperator (CSharpFormattingPolicy policy, string op) + static void TestAssignmentOperator (CSharpFormattingOptions policy, string op) { var result = GetResult (policy, "class Test { void TestMe () { left" + op + "right; } }"); @@ -623,7 +623,7 @@ return (Test)null; [Test()] public void TestAroundAssignmentSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundAssignment = true; TestAssignmentOperator (policy, "="); @@ -642,7 +642,7 @@ return (Test)null; [Test()] public void TestAroundAssignmentSpaceInDeclarations () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAroundAssignment = true; var result = GetResult (policy, @"class Test { void TestMe () @@ -659,7 +659,7 @@ return (Test)null; [Test()] public void TestBeforeSwitchParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeSwitchParentheses = true; var result = GetResult (policy, @"class Test { @@ -676,7 +676,7 @@ return (Test)null; [Test()] public void TestWithinSwitchParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinSwitchParentheses = true; var result = GetResult (policy, @"class Test { @@ -693,7 +693,7 @@ return (Test)null; [Test()] public void TestWithinParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinParentheses = true; var result = GetResult (policy, @"class Test { @@ -710,7 +710,7 @@ return (Test)null; [Test()] public void TestWithinMethodDeclarationParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceWithinMethodDeclarationParentheses = true; var result = GetResult (policy, @"class Test { @@ -726,7 +726,7 @@ return (Test)null; [Test()] public void TestWithinCastParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinCastParentheses = true; var result = GetResult (policy, @"class Test { @@ -743,7 +743,7 @@ return (Test)null; [Test()] public void TestWithinSizeOfParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinSizeOfParentheses = true; var result = GetResult (policy, @"class Test { @@ -760,7 +760,7 @@ return (Test)null; [Test()] public void TestBeforeSizeOfParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeSizeOfParentheses = true; var result = GetResult (policy, @"class Test { @@ -777,7 +777,7 @@ return (Test)null; [Test()] public void TestWithinTypeOfParenthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinTypeOfParentheses = true; var result = GetResult (policy, @"class Test { @@ -794,7 +794,7 @@ return (Test)null; [Test()] public void TestBeforeTypeOfParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeTypeOfParentheses = true; var result = GetResult (policy, @"class Test { @@ -812,7 +812,7 @@ return (Test)null; [Test()] public void TestWithinCheckedExpressionParanthesesSpace () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinCheckedExpressionParantheses = true; var result = GetResult (policy, @"class Test { @@ -841,7 +841,7 @@ return (Test)null; [Test()] public void TestSpaceBeforeNewParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeNewParentheses = true; var result = GetResult (policy, @"class Test { @@ -858,7 +858,7 @@ return (Test)null; [Test()] public void TestWithinNewParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinNewParentheses = true; var result = GetResult (policy, @"class Test { @@ -875,7 +875,7 @@ return (Test)null; [Test()] public void TestBetweenEmptyNewParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesBetweenEmptyNewParentheses = true; var result = GetResult (policy, @"class Test { @@ -892,7 +892,7 @@ return (Test)null; [Test()] public void TestBeforeNewParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeNewParameterComma = true; policy.SpaceAfterNewParameterComma = false; @@ -910,7 +910,7 @@ return (Test)null; [Test()] public void TestAfterNewParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAfterNewParameterComma = true; var result = GetResult (policy, @"class Test { @@ -927,7 +927,7 @@ return (Test)null; [Test()] public void TestFieldDeclarationComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeFieldDeclarationComma = false; policy.SpaceAfterFieldDeclarationComma = true; @@ -955,7 +955,7 @@ return (Test)null; [Test()] public void TestBeforeMethodDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodDeclarationParameterComma = true; policy.SpaceAfterMethodDeclarationParameterComma = false; @@ -976,7 +976,7 @@ return (Test)null; [Test()] public void TestAfterMethodDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodDeclarationParameterComma = false; policy.SpaceAfterMethodDeclarationParameterComma = true; @@ -997,7 +997,7 @@ return (Test)null; [Test()] public void TestSpacesInLambdaExpression () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinWhileParentheses = true; var result = GetResult (policy, @"class Test { @@ -1014,7 +1014,7 @@ return (Test)null; [Test()] public void TestBeforeLocalVariableDeclarationComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeLocalVariableDeclarationComma = true; policy.SpaceAfterLocalVariableDeclarationComma = false; @@ -1041,7 +1041,7 @@ return (Test)null; [Test()] public void TestLocalVariableDeclarationComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeLocalVariableDeclarationComma = true; policy.SpaceAfterLocalVariableDeclarationComma = true; @@ -1071,7 +1071,7 @@ return (Test)null; [Test()] public void TestBeforeConstructorDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeConstructorDeclarationParentheses = true; var result = GetResult (policy, @"class Test @@ -1092,7 +1092,7 @@ return (Test)null; [Test()] public void TestBeforeConstructorDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeConstructorDeclarationParameterComma = true; policy.SpaceAfterConstructorDeclarationParameterComma = false; @@ -1115,7 +1115,7 @@ return (Test)null; [Test()] public void TestAfterConstructorDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeConstructorDeclarationParameterComma = false; policy.SpaceAfterConstructorDeclarationParameterComma = true; @@ -1136,7 +1136,7 @@ return (Test)null; [Test()] public void TestWithinConstructorDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceWithinConstructorDeclarationParentheses = true; var result = GetResult (policy, @"class Test { @@ -1152,7 +1152,7 @@ return (Test)null; [Test()] public void TestBetweenEmptyConstructorDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBetweenEmptyConstructorDeclarationParentheses = true; var result = GetResult (policy, @"class Test { @@ -1171,7 +1171,7 @@ return (Test)null; [Test()] public void TestBeforeDelegateDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeDelegateDeclarationParentheses = true; var result = GetResult (policy, @"delegate void Test();"); @@ -1182,7 +1182,7 @@ return (Test)null; [Test()] public void TestBeforeDelegateDeclarationParenthesesComplex () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeDelegateDeclarationParentheses = true; var result = GetResult (policy, "delegate void TestDelegate\t\t\t();"); @@ -1193,7 +1193,7 @@ return (Test)null; [Test()] public void TestBeforeDelegateDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeDelegateDeclarationParameterComma = true; policy.SpaceAfterDelegateDeclarationParameterComma = false; @@ -1213,7 +1213,7 @@ return (Test)null; [Test()] public void TestAfterDelegateDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeDelegateDeclarationParameterComma = false; policy.SpaceAfterDelegateDeclarationParameterComma = true; @@ -1233,7 +1233,7 @@ return (Test)null; [Test()] public void TestWithinDelegateDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceWithinDelegateDeclarationParentheses = true; var result = GetResult (policy, @"delegate void Test (int a);"); @@ -1245,7 +1245,7 @@ return (Test)null; [Test()] public void TestBetweenEmptyDelegateDeclarationParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBetweenEmptyDelegateDeclarationParentheses = true; var result = GetResult (policy, @"delegate void Test();"); @@ -1260,7 +1260,7 @@ return (Test)null; [Test()] public void TestBeforeMethodCallParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodCallParentheses = true; var result = GetResult (policy, @"class FooBar @@ -1283,7 +1283,7 @@ return (Test)null; [Test()] public void TestBeforeMethodCallParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodCallParameterComma = true; policy.SpaceAfterMethodCallParameterComma = false; @@ -1308,7 +1308,7 @@ return (Test)null; [Test()] public void TestAfterMethodCallParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeMethodCallParameterComma = false; policy.SpaceAfterMethodCallParameterComma = true; @@ -1333,7 +1333,7 @@ return (Test)null; [Test()] public void TestWithinMethodCallParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceWithinMethodCallParentheses = true; var result = GetResult (policy, @"class FooBar @@ -1351,7 +1351,7 @@ return (Test)null; [Test()] public void TestBetweenEmptyMethodCallParentheses () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBetweenEmptyMethodCallParentheses = true; var result = GetResult (policy, @"class FooBar @@ -1373,7 +1373,7 @@ return (Test)null; public void TestBeforeIndexerDeclarationBracket () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeIndexerDeclarationBracket = true; var result = GetResult (policy, @"class FooBar @@ -1397,7 +1397,7 @@ return (Test)null; [Test()] public void TestBeforeIndexerDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeIndexerDeclarationParameterComma = true; policy.SpaceAfterIndexerDeclarationParameterComma = false; @@ -1418,7 +1418,7 @@ return (Test)null; [Test()] public void TestAfterIndexerDeclarationParameterComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAfterIndexerDeclarationParameterComma = true; var result = GetResult (policy, @"class FooBar @@ -1437,7 +1437,7 @@ return (Test)null; [Test()] public void TestWithinIndexerDeclarationBracket () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceWithinIndexerDeclarationBracket = true; var result = GetResult (policy, @"class FooBar @@ -1460,7 +1460,7 @@ return (Test)null; [Test()] public void TestSpacesWithinBrackets () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesWithinBrackets = true; policy.SpacesBeforeBrackets = false; @@ -1484,7 +1484,7 @@ return (Test)null; [Test()] public void TestSpacesBeforeBrackets () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpacesBeforeBrackets = true; var result = GetResult (policy, @"class Test @@ -1508,7 +1508,7 @@ return (Test)null; [Test()] public void TestBeforeBracketComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeBracketComma = true; policy.SpaceAfterBracketComma = false; @@ -1527,7 +1527,7 @@ return (Test)null; [Test()] public void TestAfterBracketComma () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceAfterBracketComma = true; var result = GetResult (policy, @"class Test { @@ -1547,7 +1547,7 @@ return (Test)null; [Test()] public void TestSpacesBeforeArrayDeclarationBrackets () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.SpaceBeforeArrayDeclarationBrackets = true; var result = GetResult (policy, @"class Test { @@ -1567,7 +1567,7 @@ return (Test)null; [Test()] public void TestRemoveWhitespacesBeforeSemicolon () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); var result = GetResult (policy, @"class Test { void TestMe () { diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs index 38a5d6c4a..e0bf27ad9 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestInvocationIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @@ -58,7 +58,7 @@ this.TestMethod (); [Test()] public void TestIndentBlocks () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentBlocks = true; var adapter = Test (policy, @@ -94,7 +94,7 @@ this.TestMethod (); [Test()] public void TestBreakIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @@ -115,7 +115,7 @@ this.TestMethod (); [Test()] public void TestCheckedIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -137,7 +137,7 @@ checked { [Test()] public void TestBaseIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -156,7 +156,7 @@ checked { [Test()] public void TestUncheckedIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -178,7 +178,7 @@ unchecked { [Test()] public void TestContinueIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -198,7 +198,7 @@ continue; [Test()] public void TestEmptyStatementIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -217,7 +217,7 @@ continue; [Test()] public void TestFixedStatementIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -239,7 +239,7 @@ fixed (object* obj = &obj) [Test()] public void TestFixedForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.FixedBraceForcement = BraceForcement.AddBraces; @@ -269,7 +269,7 @@ fixed (object* obj = &obj) [Test()] public void TestForeachIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test @@ -292,7 +292,7 @@ foreach (var obj in col) { [Test()] public void TestForIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -314,7 +314,7 @@ for (;;) { [Test()] public void TestGotoIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -334,7 +334,7 @@ goto label; [Test()] public void TestReturnIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -354,7 +354,7 @@ return; [Test()] public void TestLockIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -376,7 +376,7 @@ lock (this) { [Test()] public void TestThrowIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -397,7 +397,7 @@ throw new NotSupportedException (); [Test()] public void TestUnsafeIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -420,7 +420,7 @@ unsafe { [Test()] public void TestUsingIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -442,7 +442,7 @@ using (var o = new MyObj()) { [Test()] public void TestUsingForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.UsingBraceForcement = BraceForcement.AddBraces; @@ -472,7 +472,7 @@ using (var o = new MyObj()) { [Test()] public void TestUsingForcementDoNotChange () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.UsingBraceForcement = BraceForcement.DoNotChange; @@ -501,7 +501,7 @@ using (var o = new MyObj()) { [Test()] public void TestUsingAlignment () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.AlignEmbeddedUsingStatements = true; policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -535,7 +535,7 @@ using (var o = new MyObj()) { [Test()] public void TestVariableDeclarationIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -555,7 +555,7 @@ Test a; [Test()] public void TestConstantVariableDeclarationIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -575,7 +575,7 @@ const int a = 5; [Test()] public void TestYieldIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -595,7 +595,7 @@ yield return null; [Test()] public void TestWhileIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -618,7 +618,7 @@ while (true) [Test()] public void TestDoWhileIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test { @@ -640,7 +640,7 @@ do { [Test()] public void TestForeachBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; Test (policy, @"class Test @@ -663,7 +663,7 @@ do { [Test()] public void TestForeachBracketPlacement2 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLineShifted2; Test (policy, @"class Test @@ -688,7 +688,7 @@ do { [Test()] public void TestForEachBraceForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLine; policy.ForEachBraceForcement = BraceForcement.AddBraces; @@ -720,7 +720,7 @@ do { [Test()] public void TestForBraceForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLine; policy.ForBraceForcement = BraceForcement.AddBraces; @@ -753,7 +753,7 @@ do { [Test()] public void TestForEachBraceForcementRemove () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLine; policy.ForEachBraceForcement = BraceForcement.RemoveBraces; @@ -790,7 +790,7 @@ do { [Test()] public void TestIfBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -814,7 +814,7 @@ do { [Test()] public void TestAllowIfBlockInline () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.AllowIfBlockInline = true; @@ -884,7 +884,7 @@ do { [Test()] public void TestIfElseBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -909,7 +909,7 @@ do { [Test()] public void TestIfForcementRemove () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLine; policy.IfElseBraceForcement = BraceForcement.RemoveBraces; @@ -947,7 +947,7 @@ do { [Test()] public void TestIfAlignment () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.AlignEmbeddedIfStatements = true; policy.ClassBraceStyle = BraceStyle.EndOfLine; @@ -981,7 +981,7 @@ if (b) { [Test()] public void TestIfForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.IfElseBraceForcement = BraceForcement.AddBraces; @@ -1008,7 +1008,7 @@ if (b) { [Test()] public void TestIfForcementWithComment () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.IfElseBraceForcement = BraceForcement.AddBraces; @@ -1036,7 +1036,7 @@ if (b) { [Test()] public void TestIfElseForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.IfElseBraceForcement = BraceForcement.AddBraces; @@ -1067,7 +1067,7 @@ if (b) { [Test()] public void TestIfElseIFForcementAdd () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.IfElseBraceForcement = BraceForcement.AddBraces; @@ -1098,7 +1098,7 @@ if (b) { [Test()] public void TestElseOnNewLine () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceElseOnNewLine = true; Test (policy, @"class Test @@ -1129,7 +1129,7 @@ if (b) { [Test()] public void TestElseIfOnNewLine () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceElseIfOnNewLine = true; Test (policy, @"class Test @@ -1160,7 +1160,7 @@ if (b) { [Test()] public void TestElseOnNewLineOff () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceElseOnNewLine = false; Test (policy, @"class Test @@ -1191,7 +1191,7 @@ if (b) { [Test()] public void TestSimpleIfElseComment () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; policy.PlaceElseIfOnNewLine = false; // for simple statements it must be new line. @@ -1218,7 +1218,7 @@ if (b) { [Test()] public void TestWhileForcementRemove () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLine; policy.WhileBraceForcement = BraceForcement.RemoveBraces; @@ -1256,7 +1256,7 @@ if (b) { [Test()] public void TestFixedBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.NextLineShifted; policy.FixedBraceForcement = BraceForcement.AddBraces; @@ -1285,7 +1285,7 @@ if (b) { [Test()] public void TestForBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLineWithoutSpace; Test (policy, @"class Test @@ -1309,7 +1309,7 @@ if (b) { [Test()] public void TestCheckedBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLineWithoutSpace; @@ -1334,7 +1334,7 @@ if (b) { [Test()] public void TestUncheckedBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLineWithoutSpace; @@ -1359,7 +1359,7 @@ if (b) { [Test()] public void TestLockBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -1387,7 +1387,7 @@ if (b) { [Test()] public void TestUnsafeBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -1415,7 +1415,7 @@ if (b) { [Test()] public void TestUsingBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -1443,7 +1443,7 @@ if (b) { [Test()] public void TestWhileBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -1471,7 +1471,7 @@ if (b) { [Test()] public void TestDoWhileBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -1499,7 +1499,7 @@ if (b) { [Test()] public void TestSwitchFormatting1 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentSwitchBody = true; policy.IndentCaseBody = true; @@ -1532,7 +1532,7 @@ if (b) { [Test()] public void TestSwitchFormatting2 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentSwitchBody = false; policy.IndentCaseBody = false; @@ -1565,7 +1565,7 @@ if (b) { [Test()] public void TestTryCatchBracketPlacement () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.StatementBraceStyle = BraceStyle.EndOfLine; @@ -1592,7 +1592,7 @@ if (b) { [Test()] public void TestPlaceCatchOnNewLine () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceCatchOnNewLine = true; @@ -1624,7 +1624,7 @@ if (b) { [Test()] public void TestPlaceFinallyOnNewLine () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceFinallyOnNewLine = true; Test (policy, @"class Test @@ -1655,7 +1655,7 @@ if (b) { [Test()] public void TestPlaceWhileOnNewLine () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PlaceWhileOnNewLine = true; diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs index 4e486b79f..2d31322a4 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestClassIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.DoNotChange; Test (policy, @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestClassIndentationInNamespaces () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.NamespaceBraceStyle = BraceStyle.EndOfLine; policy.ClassBraceStyle = BraceStyle.DoNotChange; @@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.FormattingTests [Test()] public void TestNoIndentationInNamespaces () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.NamespaceBraceStyle = BraceStyle.EndOfLine; policy.ClassBraceStyle = BraceStyle.DoNotChange; policy.IndentNamespaceBody = false; @@ -78,7 +78,7 @@ class Test {} [Test()] public void TestClassIndentationInNamespacesCase2 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.NamespaceBraceStyle = BraceStyle.NextLine; policy.ClassBraceStyle = BraceStyle.NextLine; policy.ConstructorBraceStyle = BraceStyle.NextLine; @@ -108,7 +108,7 @@ namespace MonoDevelop.CSharp.Formatting [Test()] public void TestIndentClassBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentClassBody = true; Test (policy, @"class Test @@ -134,7 +134,7 @@ Test a; [Test()] public void TestIndentInterfaceBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentInterfaceBody = true; Test (policy, @@ -159,7 +159,7 @@ Test Foo (); [Test()] public void TestIndentStructBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentStructBody = true; Test (policy, @@ -184,7 +184,7 @@ Test Foo (); [Test()] public void TestIndentEnumBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentEnumBody = true; Test (policy, @@ -209,7 +209,7 @@ A [Test()] public void TestIndentMethodBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentMethodBody = true; Test (policy, @@ -252,7 +252,7 @@ A [Test()] public void TestIndentMethodBodyOperatorCase () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentMethodBody = true; var adapter = Test (policy, @@ -286,7 +286,7 @@ A [Test()] public void TestIndentPropertyBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentPropertyBody = true; var adapter = Test (policy, @@ -319,7 +319,7 @@ set; [Test()] public void TestIndentPropertyOneLine () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyFormatting = PropertyFormatting.AllowOneLine; policy.AllowPropertyGetBlockInline = true; policy.AllowPropertySetBlockInline = true; @@ -338,7 +338,7 @@ set; [Test()] public void TestIndentPropertyOneLineCase2 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyFormatting = PropertyFormatting.AllowOneLine; policy.AllowPropertyGetBlockInline = true; policy.AllowPropertySetBlockInline = true; @@ -357,7 +357,7 @@ set; [Test()] public void TestIndentPropertyBodyIndexerCase () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentPropertyBody = true; var adapter = Test (policy, @@ -402,7 +402,7 @@ set { [Test()] public void TestPropertyAlignment () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyFormatting = PropertyFormatting.AllowOneLine; var adapter = Test (policy, @"class Test @@ -435,7 +435,7 @@ set { [Test()] public void TestIndentNamespaceBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.ClassBraceStyle = BraceStyle.DoNotChange; policy.NamespaceBraceStyle = BraceStyle.EndOfLine; policy.IndentNamespaceBody = true; @@ -458,7 +458,7 @@ class FooBar {} [Test()] public void TestMethodIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.MethodBraceStyle = BraceStyle.DoNotChange; Test (policy, @@ -475,7 +475,7 @@ MyType TestMethod () {} [Test()] public void TestPropertyIndentation () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.PropertyBraceStyle = BraceStyle.DoNotChange; Test (policy, @@ -491,7 +491,7 @@ MyType TestMethod () {} [Test()] public void TestPropertyIndentationCase2 () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); Test (policy, @"class Test @@ -514,7 +514,7 @@ set; [Test()] public void TestIndentEventBody () { - CSharpFormattingPolicy policy = new CSharpFormattingPolicy (); + CSharpFormattingOptions policy = new CSharpFormattingOptions (); policy.IndentEventBody = true; var adapter = Test (policy, diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs index f5b489fe1..4b2ca1b52 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs @@ -221,7 +221,7 @@ namespace ICSharpCode.NRefactory.FormattingTests public abstract class TestBase { - protected static ITextEditorAdapter GetResult (CSharpFormattingPolicy policy, string input) + protected static ITextEditorAdapter GetResult (CSharpFormattingOptions policy, string input) { var adapter = new TextEditorTestAdapter (input); var visitior = new AstFormattingVisitor (policy, adapter); @@ -233,7 +233,7 @@ namespace ICSharpCode.NRefactory.FormattingTests return adapter; } - protected static ITextEditorAdapter Test (CSharpFormattingPolicy policy, string input, string expectedOutput) + protected static ITextEditorAdapter Test (CSharpFormattingOptions policy, string input, string expectedOutput) { var adapter = new TextEditorTestAdapter (input); var visitior = new AstFormattingVisitor (policy, adapter); @@ -245,7 +245,7 @@ namespace ICSharpCode.NRefactory.FormattingTests return adapter; } - protected static void Continue (CSharpFormattingPolicy policy, ITextEditorAdapter adapter, string expectedOutput) + protected static void Continue (CSharpFormattingOptions policy, ITextEditorAdapter adapter, string expectedOutput) { var visitior = new AstFormattingVisitor (policy, adapter); diff --git a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj index 2ad573734..3c1e05fb0 100644 --- a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj +++ b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj @@ -34,22 +34,24 @@ 4 true + ..\ICSharpCode.NRefactory\bin\Debug\ 4 true + ..\ICSharpCode.NRefactory\bin\Release\ - - ..\..\Mono.Cecil\Test\libs\nunit-2.4.8\nunit.framework.dll - + + ..\..\Mono.Cecil\Test\libs\nunit-2.4.8\nunit.framework.dll + diff --git a/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs b/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs index 88e9cb8b1..af7453b70 100644 --- a/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs +++ b/ICSharpCode.NRefactory.Tests/TypeSystem/GetAllBaseTypesTest.cs @@ -84,7 +84,7 @@ namespace ICSharpCode.NRefactory.TypeSystem { // class C : C> {} DefaultTypeDefinition c = new DefaultTypeDefinition(mscorlib, string.Empty, "C"); - c.TypeParameters.Add(new DefaultTypeParameter(c, 0, "X")); + c.TypeParameters.Add(new DefaultTypeParameter(EntityType.TypeDefinition, 0, "X")); c.BaseTypes.Add(new ParameterizedType(c, new [] { new ParameterizedType(c, new [] { c.TypeParameters[0] }) })); Assert.AreEqual(new [] { c }, c.GetAllBaseTypes(context).ToArray()); } diff --git a/ICSharpCode.NRefactory.Tests/TypeSystem/TestInterningProvider.cs b/ICSharpCode.NRefactory.Tests/TypeSystem/TestInterningProvider.cs index 098298bb7..8df59cf46 100644 --- a/ICSharpCode.NRefactory.Tests/TypeSystem/TestInterningProvider.cs +++ b/ICSharpCode.NRefactory.Tests/TypeSystem/TestInterningProvider.cs @@ -140,15 +140,36 @@ namespace ICSharpCode.NRefactory.TypeSystem } } + IProjectContent[] LoadProjects(CecilLoader loader) + { + const string dir = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\"; + return new IProjectContent[] { + loader.LoadAssemblyFile(dir + "mscorlib.dll"), + loader.LoadAssemblyFile(dir + "System.dll"), + loader.LoadAssemblyFile(dir + "System.Core.dll"), + loader.LoadAssemblyFile(dir + "System.Xml.dll"), + loader.LoadAssemblyFile(dir + "System.Xml.Linq.dll"), + loader.LoadAssemblyFile(dir + "System.Data.dll"), + loader.LoadAssemblyFile(dir + "System.Drawing.dll"), + loader.LoadAssemblyFile(dir + "System.Windows.Forms.dll"), + loader.LoadAssemblyFile(dir + "WindowsBase.dll"), + loader.LoadAssemblyFile(dir + "PresentationCore.dll"), + loader.LoadAssemblyFile(dir + "PresentationFramework.dll") + }; + } + [Test] public void PrintStatistics() { long startMemory = GC.GetTotalMemory(true); - IProjectContent pc = new CecilLoader().LoadAssemblyFile(typeof(object).Assembly.Location); + IProjectContent[] pc = LoadProjects(new CecilLoader()); long memoryWithFullPC = GC.GetTotalMemory(true) - startMemory; InterningProvider p = new InterningProvider(); - p.InternProject(pc); + CecilLoader loader = new CecilLoader(); + loader.InterningProvider = p; + pc = LoadProjects(loader); PrintStatistics(p); + loader = null; p = null; long memoryWithInternedPC = GC.GetTotalMemory(true) - startMemory; GC.KeepAlive(pc); diff --git a/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs b/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs index 2959f00ed..6432046df 100644 --- a/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs +++ b/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs @@ -134,8 +134,8 @@ namespace ICSharpCode.NRefactory.TypeSystem public void TestClassTypeParameters() { var testClass = testCasePC.GetClass(typeof(GenericClass<,>)); - Assert.AreSame(testClass, testClass.TypeParameters[0].ParentClass); - Assert.AreSame(testClass, testClass.TypeParameters[1].ParentClass); + Assert.AreEqual(EntityType.TypeDefinition, testClass.TypeParameters[0].OwnerType); + Assert.AreEqual(EntityType.TypeDefinition, testClass.TypeParameters[1].OwnerType); Assert.AreSame(testClass.TypeParameters[1], testClass.TypeParameters[0].Constraints[0].Resolve(ctx)); } @@ -147,8 +147,8 @@ namespace ICSharpCode.NRefactory.TypeSystem IMethod m = testClass.Methods.Single(me => me.Name == "TestMethod"); Assert.AreEqual("K", m.TypeParameters[0].Name); Assert.AreEqual("V", m.TypeParameters[1].Name); - Assert.AreSame(m, m.TypeParameters[0].ParentMethod); - Assert.AreSame(m, m.TypeParameters[1].ParentMethod); + Assert.AreEqual(EntityType.Method, m.TypeParameters[0].OwnerType); + Assert.AreEqual(EntityType.Method, m.TypeParameters[1].OwnerType); Assert.AreEqual("System.IComparable`1[[``1]]", m.TypeParameters[0].Constraints[0].Resolve(ctx).ReflectionName); Assert.AreSame(m.TypeParameters[0], m.TypeParameters[1].Constraints[0].Resolve(ctx)); @@ -161,7 +161,7 @@ namespace ICSharpCode.NRefactory.TypeSystem IMethod m = testClass.Methods.Single(me => me.Name == "GetIndex"); Assert.AreEqual("T", m.TypeParameters[0].Name); - Assert.AreSame(m, m.TypeParameters[0].ParentMethod); + Assert.AreEqual(EntityType.Method, m.TypeParameters[0].OwnerType); ParameterizedType constraint = (ParameterizedType)m.TypeParameters[0].Constraints[0].Resolve(ctx); Assert.AreEqual("IEquatable", constraint.Name); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs b/ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs index ab8377685..d055c25a2 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs @@ -31,11 +31,9 @@ using System.Diagnostics; using System.Linq; using System.Threading; -using ICSharpCode.NRefactory.CSharp.PatternMatching; - namespace ICSharpCode.NRefactory.CSharp { - public abstract class AstNode + public abstract class AstNode : PatternMatching.INode { #region Null public static readonly AstNode Null = new NullAstNode (); @@ -66,6 +64,42 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion + #region PatternPlaceholder + public static implicit operator AstNode(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : AstNode, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + AstNode parent; AstNode prevSibling; AstNode nextSibling; @@ -562,38 +596,32 @@ namespace ICSharpCode.NRefactory.CSharp public abstract S AcceptVisitor (IAstVisitor visitor, T data); #region Pattern Matching - /// - /// Performs a pattern matching operation. - /// this is the pattern, is the AST that is being matched. - /// - /// - /// If successful, a match object containing the matched groups. - /// If the match failed, returns null. - /// - /// - /// Patterns are ASTs that contain special pattern nodes (from the PatternMatching namespace). - /// However, it is also possible to match two ASTs without any pattern nodes - doing so will produce an empty match object - /// if the two ASTs are structurally identical; or will return null if the ASTs are not identical. - /// - public Match Match(AstNode other) - { - Match match = new Match(); - if (DoMatch(other, match)) - return match; - else - return null; - } - protected static bool MatchString(string name1, string name2) { return string.IsNullOrEmpty(name1) || name1 == name2; } - protected internal abstract bool DoMatch(AstNode other, Match match); + protected internal abstract bool DoMatch(AstNode other, PatternMatching.Match match); - internal virtual bool DoMatchCollection (Role role, AstNode pos, Match match, Stack backtrackingStack) + bool PatternMatching.INode.DoMatch(PatternMatching.INode other, PatternMatching.Match match) { - return DoMatch (pos, match); + AstNode o = other as AstNode; + // try matching if other is null, or if other is an AstNode + return (other == null || o != null) && DoMatch(o, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + AstNode o = pos as AstNode; + return (pos == null || o != null) && DoMatch (o, match); + } + + PatternMatching.INode PatternMatching.INode.NextSibling { + get { return nextSibling; } + } + + PatternMatching.INode PatternMatching.INode.FirstChild { + get { return firstChild; } } #endregion diff --git a/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs b/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs index 98beaeaef..adc6e5e41 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs @@ -6,7 +6,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using ICSharpCode.NRefactory.CSharp.PatternMatching; +using ICSharpCode.NRefactory.PatternMatching; namespace ICSharpCode.NRefactory.CSharp { @@ -159,39 +159,7 @@ namespace ICSharpCode.NRefactory.CSharp internal bool DoMatch(AstNodeCollection other, Match match) { - Stack patternStack = new Stack(); - Stack stack = new Stack(); - patternStack.Push(this.node.FirstChild); - stack.Push(new Pattern.PossibleMatch(other.node.FirstChild, match.CheckPoint())); - while (stack.Count > 0) { - AstNode cur1 = patternStack.Pop(); - AstNode cur2 = stack.Peek().NextOther; - match.RestoreCheckPoint(stack.Pop().Checkpoint); - bool success = true; - while (cur1 != null && success) { - while (cur1 != null && cur1.Role != role) - cur1 = cur1.NextSibling; - while (cur2 != null && cur2.Role != role) - cur2 = cur2.NextSibling; - if (cur1 == null) - break; - - Debug.Assert(stack.Count == patternStack.Count); - success = cur1.DoMatchCollection(role, cur2, match, stack); - Debug.Assert(stack.Count >= patternStack.Count); - while (stack.Count > patternStack.Count) - patternStack.Push(cur1.NextSibling); - - cur1 = cur1.NextSibling; - if (cur2 != null) - cur2 = cur2.NextSibling; - } - while (cur2 != null && cur2.Role != role) - cur2 = cur2.NextSibling; - if (success && cur2 == null) - return true; - } - return false; + return Pattern.DoMatchCollection(role, node.FirstChild, other.node.FirstChild, match); } public void InsertAfter(T existingItem, T newItem) diff --git a/ICSharpCode.NRefactory/CSharp/Ast/AstType.cs b/ICSharpCode.NRefactory/CSharp/Ast/AstType.cs index 5582b9012..4c6c0f0b0 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/AstType.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/AstType.cs @@ -31,20 +31,78 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion + #region PatternPlaceholder + public static implicit operator AstType(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : AstType, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public override NodeType NodeType { get { return NodeType.TypeReference; } } + public new AstType Clone() + { + return (AstType)base.Clone(); + } + + /// + /// Creates a pointer type from this type by nesting it in a . + /// If this type already is a pointer type, this method just increases the PointerRank of the existing pointer type. + /// public virtual AstType MakePointerType() { return new ComposedType { BaseType = this }.MakePointerType(); } + /// + /// Creates an array type from this type by nesting it in a . + /// If this type already is an array type, the additional rank is prepended to the existing array specifier list. + /// Thus, new SimpleType("T").MakeArrayType(1).MakeArrayType(2) will result in "T[,][]". + /// public virtual AstType MakeArrayType(int rank = 1) { return new ComposedType { BaseType = this }.MakeArrayType(rank); } + /// + /// Creates a nullable type from this type by nesting it in a . + /// + public AstType MakeNullableType() + { + return new ComposedType { BaseType = this, HasNullableSpecifier = true }; + } + /// /// Builds an expression that can be used to access a static member on this type. /// diff --git a/ICSharpCode.NRefactory/CSharp/Ast/DepthFirstAstVisitor.cs b/ICSharpCode.NRefactory/CSharp/Ast/DepthFirstAstVisitor.cs index dc4a97905..ecc5210a1 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/DepthFirstAstVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/DepthFirstAstVisitor.cs @@ -440,6 +440,11 @@ namespace ICSharpCode.NRefactory.CSharp return VisitChildren (objectCreateExpression, data); } + public virtual S VisitAnonymousTypeCreateExpression(AnonymousTypeCreateExpression anonymousTypeCreateExpression, T data) + { + return VisitChildren (anonymousTypeCreateExpression, data); + } + public virtual S VisitArrayCreateExpression (ArrayCreateExpression arrayObjectCreateExpression, T data) { return VisitChildren (arrayObjectCreateExpression, data); @@ -560,9 +565,9 @@ namespace ICSharpCode.NRefactory.CSharp return VisitChildren (defaultValueExpression, data); } - public virtual S VisitArgListExpression (ArgListExpression argListExpression, T data) + public virtual S VisitUndocumentedExpression (UndocumentedExpression undocumentedExpression, T data) { - return VisitChildren (argListExpression, data); + return VisitChildren (undocumentedExpression, data); } public virtual S VisitArrayInitializerExpression (ArrayInitializerExpression arrayInitializerExpression, T data) @@ -584,5 +589,10 @@ namespace ICSharpCode.NRefactory.CSharp { return VisitChildren (emptyExpression, data); } + + public virtual S VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern, T data) + { + return VisitChildren (placeholder, data); + } } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousMethodExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousMethodExpression.cs index b586d9157..f8c8cefac 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousMethodExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousMethodExpression.cs @@ -60,6 +60,24 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Body, value); } } + public AnonymousMethodExpression () + { + } + + public AnonymousMethodExpression (BlockStatement body, IEnumerable parameters = null) + { + if (parameters != null) { + foreach (var parameter in parameters) { + AddChild (parameter, Roles.Parameter); + } + } + AddChild (body, Roles.Body); + } + + public AnonymousMethodExpression (BlockStatement body, params ParameterDeclaration[] parameters) : this (body, (IEnumerable)parameters) + { + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitAnonymousMethodExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs new file mode 100644 index 000000000..940249d8d --- /dev/null +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs @@ -0,0 +1,79 @@ +// +// AnonymousTypeCreateExpression.cs +// +// Author: +// Mike Krüger +// +// Copyright (c) 2011 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Collections.Generic; + +namespace ICSharpCode.NRefactory.CSharp +{ + /// + /// new { [ExpressionList] } + /// + public class AnonymousTypeCreateExpression : Expression + { + public CSharpTokenNode NewToken { + get { return GetChildByRole (Roles.Keyword); } + } + + public CSharpTokenNode LParToken { + get { return GetChildByRole (Roles.LPar); } + } + + public AstNodeCollection Initializer { + get { return GetChildrenByRole (Roles.Expression); } + } + + public CSharpTokenNode RParToken { + get { return GetChildByRole (Roles.RPar); } + } + + public AnonymousTypeCreateExpression () + { + } + + public AnonymousTypeCreateExpression (IEnumerable initializer) + { + foreach (var ini in initializer) { + AddChild (ini, Roles.Expression); + } + } + + public AnonymousTypeCreateExpression (params Expression[] initializer) : this ((IEnumerable)initializer) + { + } + + public override S AcceptVisitor (IAstVisitor visitor, T data) + { + return visitor.VisitAnonymousTypeCreateExpression (this, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + var o = other as AnonymousTypeCreateExpression; + return o != null && this.Initializer.DoMatch(o.Initializer, match); + } + } +} + diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AsExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AsExpression.cs index b08ecd08d..b1a1b8065 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AsExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AsExpression.cs @@ -45,6 +45,16 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(Roles.Type, value); } } + public AsExpression () + { + } + + public AsExpression (Expression expression, AstType type) + { + AddChild (expression, Roles.Expression); + AddChild (type, Roles.Type); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitAsExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AssignmentExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AssignmentExpression.cs index 6db96ec89..998ab78fb 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AssignmentExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/AssignmentExpression.cs @@ -48,6 +48,13 @@ namespace ICSharpCode.NRefactory.CSharp this.Right = right; } + public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right) + { + this.Left = left; + this.Operator = op; + this.Right = right; + } + public AssignmentOperatorType Operator { get; set; diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CastExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CastExpression.cs index 049376d13..88c7dcfe3 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CastExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CastExpression.cs @@ -49,6 +49,16 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } + public CastExpression () + { + } + + public CastExpression (AstType castToType, Expression expression) + { + AddChild (castToType, Roles.Type); + AddChild (expression, Roles.Expression); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitCastExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CheckedExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CheckedExpression.cs index 02b229644..349976c68 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CheckedExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/CheckedExpression.cs @@ -48,6 +48,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } + public CheckedExpression () + { + } + + public CheckedExpression (Expression expression) + { + AddChild (expression, Roles.Expression); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitCheckedExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ConditionalExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ConditionalExpression.cs index d0c1ddc5d..5e8099432 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ConditionalExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ConditionalExpression.cs @@ -60,6 +60,17 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(FalseRole, value); } } + public ConditionalExpression () + { + } + + public ConditionalExpression (Expression condition, Expression trueExpression, Expression falseExpression) + { + AddChild (condition, ConditionRole); + AddChild (trueExpression, TrueRole); + AddChild (falseExpression, FalseRole); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitConditionalExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DefaultValueExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DefaultValueExpression.cs index d171f86b7..1a91d6d08 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DefaultValueExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DefaultValueExpression.cs @@ -48,6 +48,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } + public DefaultValueExpression () + { + } + + public DefaultValueExpression (AstType type) + { + AddChild (type, Roles.Type); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitDefaultValueExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DirectionExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DirectionExpression.cs index 5ba19bd6b..0c19b2ca7 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DirectionExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/DirectionExpression.cs @@ -52,6 +52,16 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } + public DirectionExpression () + { + } + + public DirectionExpression (FieldDirection direction, Expression expression) + { + this.FieldDirection = direction; + AddChild (expression, Roles.Expression); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitDirectionExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/Expression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/Expression.cs index ea5e22f64..db0cee257 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/Expression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/Expression.cs @@ -40,6 +40,42 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion + #region PatternPlaceholder + public static implicit operator Expression(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : Expression, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public override NodeType NodeType { get { return NodeType.Expression; @@ -57,7 +93,7 @@ namespace ICSharpCode.NRefactory.CSharp if (IsNull) return "Null"; StringWriter w = new StringWriter(); - AcceptVisitor(new OutputVisitor(w, new CSharpFormattingPolicy()), null); + AcceptVisitor(new OutputVisitor(w, new CSharpFormattingOptions()), null); return w.ToString(); } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IndexerExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IndexerExpression.cs index 89ee4ec8b..045d8d038 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IndexerExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/IndexerExpression.cs @@ -50,6 +50,24 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBracket); } } + public IndexerExpression () + { + } + + public IndexerExpression (Expression target, IEnumerable arguments) + { + AddChild (target, Roles.TargetExpression); + if (arguments != null) { + foreach (var arg in arguments) { + AddChild (arg, Roles.Argument); + } + } + } + + public IndexerExpression (Expression target, params Expression[] arguments) : this (target, (IEnumerable)arguments) + { + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitIndexerExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/InvocationExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/InvocationExpression.cs index 47f66ac4e..84d0830fe 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/InvocationExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/InvocationExpression.cs @@ -55,6 +55,24 @@ namespace ICSharpCode.NRefactory.CSharp return visitor.VisitInvocationExpression (this, data); } + public InvocationExpression () + { + } + + public InvocationExpression (Expression target, IEnumerable arguments) + { + AddChild (target, Roles.TargetExpression); + if (arguments != null) { + foreach (var arg in arguments) { + AddChild (arg, Roles.Argument); + } + } + } + + public InvocationExpression (Expression target, params Expression[] arguments) : this (target, (IEnumerable)arguments) + { + } + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { InvocationExpression o = other as InvocationExpression; diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/MemberReferenceExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/MemberReferenceExpression.cs index bcc7a71e6..60d7a17ed 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/MemberReferenceExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/MemberReferenceExpression.cs @@ -59,6 +59,25 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RChevron); } } + public MemberReferenceExpression () + { + } + + public MemberReferenceExpression (Expression target, string memberName, IEnumerable arguments = null) + { + AddChild (target, Roles.TargetExpression); + MemberName = memberName; + if (arguments != null) { + foreach (var arg in arguments) { + AddChild (arg, Roles.TypeArgument); + } + } + } + + public MemberReferenceExpression (Expression target, string memberName, params AstType[] arguments) : this (target, memberName, (IEnumerable)arguments) + { + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitMemberReferenceExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NamedArgumentExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NamedArgumentExpression.cs index a390e33ee..df51dcf93 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NamedArgumentExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NamedArgumentExpression.cs @@ -19,6 +19,10 @@ namespace ICSharpCode.NRefactory.CSharp } } + public CSharpTokenNode AssignToken { + get { return GetChildByRole (Roles.Assign); } + } + public Expression Expression { get { return GetChildByRole (Roles.Expression); } set { SetChildByRole (Roles.Expression, value); } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NullReferenceExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NullReferenceExpression.cs index afd309d18..df95202b8 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NullReferenceExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/NullReferenceExpression.cs @@ -31,6 +31,28 @@ namespace ICSharpCode.NRefactory.CSharp /// public class NullReferenceExpression : Expression { + AstLocation location; + public override AstLocation StartLocation { + get { + return location; + } + } + + public override AstLocation EndLocation { + get { + return new AstLocation (location.Line, location.Column + "null".Length); + } + } + + public NullReferenceExpression () + { + } + + public NullReferenceExpression (AstLocation location) + { + this.location = location; + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitNullReferenceExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ObjectCreateExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ObjectCreateExpression.cs index fa113d530..7bb5dc821 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ObjectCreateExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ObjectCreateExpression.cs @@ -61,6 +61,24 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (InitializerRole, value); } } + public ObjectCreateExpression () + { + } + + public ObjectCreateExpression (AstType type, IEnumerable arguments = null) + { + AddChild (type, Roles.Type); + if (arguments != null) { + foreach (var arg in arguments) { + AddChild (arg, Roles.Argument); + } + } + } + + public ObjectCreateExpression (AstType type, params Expression[] arguments) : this (type, (IEnumerable)arguments) + { + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitObjectCreateExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ParenthesizedExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ParenthesizedExpression.cs index 94219bb8a..8cdb5cfd1 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ParenthesizedExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ParenthesizedExpression.cs @@ -44,6 +44,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } + public ParenthesizedExpression() + { + } + + public ParenthesizedExpression(Expression expr) + { + Expression = expr; + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitParenthesizedExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/SizeOfExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/SizeOfExpression.cs index 2a6e22034..6e7a740d6 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/SizeOfExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/SizeOfExpression.cs @@ -48,6 +48,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } + public SizeOfExpression () + { + } + + public SizeOfExpression (AstType type) + { + AddChild (type, Roles.Type); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitSizeOfExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeOfExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeOfExpression.cs index e6e7c97dc..09e8931ff 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeOfExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeOfExpression.cs @@ -49,6 +49,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } + public TypeOfExpression () + { + } + + public TypeOfExpression (AstType type) + { + AddChild (type, Roles.Type); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitTypeOfExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeReferenceExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeReferenceExpression.cs index 5818340a4..9104235f8 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeReferenceExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/TypeReferenceExpression.cs @@ -21,6 +21,15 @@ namespace ICSharpCode.NRefactory.CSharp return visitor.VisitTypeReferenceExpression(this, data); } + public TypeReferenceExpression () + { + } + + public TypeReferenceExpression (AstType type) + { + AddChild (type, Roles.Type); + } + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { TypeReferenceExpression o = other as TypeReferenceExpression; diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UncheckedExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UncheckedExpression.cs index 2165437b3..6e9e61923 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UncheckedExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UncheckedExpression.cs @@ -48,6 +48,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } + public UncheckedExpression () + { + } + + public UncheckedExpression (Expression expression) + { + AddChild (expression, Roles.Expression); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitUncheckedExpression (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ArgListExpression.cs b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UndocumentedExpression.cs similarity index 72% rename from ICSharpCode.NRefactory/CSharp/Ast/Expressions/ArgListExpression.cs rename to ICSharpCode.NRefactory/CSharp/Ast/Expressions/UndocumentedExpression.cs index c84f87389..8bbd81a5f 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Expressions/ArgListExpression.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Expressions/UndocumentedExpression.cs @@ -1,5 +1,5 @@ // -// ArgListExpression.cs +// UndocumentedExpression.cs // // Author: // Mike Krüger @@ -28,16 +28,25 @@ using System.Collections.Generic; namespace ICSharpCode.NRefactory.CSharp { + public enum UndocumentedExpressionType + { + ArgListAccess, // __arglist + ArgList, // __arglist (a1, a2, ..., an) + RefValue, // __refvalue (expr , type) + RefType, // __reftype (expr) + MakeRef // __makeref (expr) + } + /// - /// Represents the undocumented __arglist keyword. + /// Represents undocumented expressions. /// - public class ArgListExpression : Expression + public class UndocumentedExpression : Expression { - public bool IsAccess { // access is __arglist, otherwise it's __arglist (a1, a2, ..., an) + public UndocumentedExpressionType UndocumentedExpressionType { get; set; } - public CSharpTokenNode ArgListToken { + public CSharpTokenNode UndocumentedToken { get { return GetChildByRole (Roles.Keyword); } } @@ -55,13 +64,13 @@ namespace ICSharpCode.NRefactory.CSharp public override S AcceptVisitor (IAstVisitor visitor, T data) { - return visitor.VisitArgListExpression (this, data); + return visitor.VisitUndocumentedExpression (this, data); } protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { - ArgListExpression o = other as ArgListExpression; - return o != null && this.IsAccess == o.IsAccess && this.Arguments.DoMatch(o.Arguments, match); + UndocumentedExpression o = other as UndocumentedExpression; + return o != null && this.UndocumentedExpressionType == o.UndocumentedExpressionType && this.Arguments.DoMatch(o.Arguments, match); } } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/AttributeSection.cs b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/AttributeSection.cs index 901f6ba06..bce347c92 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/AttributeSection.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/AttributeSection.cs @@ -35,6 +35,42 @@ namespace ICSharpCode.NRefactory.CSharp /// public class AttributeSection : AstNode { + #region PatternPlaceholder + public static implicit operator AttributeSection(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : AttributeSection, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public static readonly Role AttributeRole = new Role("Attribute"); public static readonly Role TargetRole = new Role("Target", CSharpTokenNode.Null); @@ -44,7 +80,11 @@ namespace ICSharpCode.NRefactory.CSharp } } - public AttributeTarget AttributeTarget { + public CSharpTokenNode LBracketToken { + get { return GetChildByRole (Roles.LBracket); } + } + + public string AttributeTarget { get; set; } @@ -53,6 +93,10 @@ namespace ICSharpCode.NRefactory.CSharp get { return base.GetChildrenByRole (AttributeRole); } } + public CSharpTokenNode RBracketToken { + get { return GetChildByRole (Roles.RBracket); } + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitAttributeSection (this, data); @@ -73,29 +117,29 @@ namespace ICSharpCode.NRefactory.CSharp this.Attributes.Add(attr); } - public static string GetAttributeTargetName(AttributeTarget attributeTarget) - { - switch (attributeTarget) { - case AttributeTarget.None: - return null; - case AttributeTarget.Assembly: - return "assembly"; - case AttributeTarget.Module: - return "module"; - case AttributeTarget.Type: - return "type"; - case AttributeTarget.Param: - return "param"; - case AttributeTarget.Field: - return "field"; - case AttributeTarget.Return: - return "return"; - case AttributeTarget.Method: - return "method"; - default: - throw new NotSupportedException("Invalid value for AttributeTarget"); - } - } +// public static string GetAttributeTargetName(AttributeTarget attributeTarget) +// { +// switch (attributeTarget) { +// case AttributeTarget.None: +// return null; +// case AttributeTarget.Assembly: +// return "assembly"; +// case AttributeTarget.Module: +// return "module"; +// case AttributeTarget.Type: +// return "type"; +// case AttributeTarget.Param: +// return "param"; +// case AttributeTarget.Field: +// return "field"; +// case AttributeTarget.Return: +// return "return"; +// case AttributeTarget.Method: +// return "method"; +// default: +// throw new NotSupportedException("Invalid value for AttributeTarget"); +// } +// } } public enum AttributeTarget { diff --git a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/NamespaceDeclaration.cs b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/NamespaceDeclaration.cs index 41cc39253..07dee45b7 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/NamespaceDeclaration.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/NamespaceDeclaration.cs @@ -86,6 +86,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } + public NamespaceDeclaration () + { + } + + public NamespaceDeclaration (string name) + { + this.Name = name; + } + public static string BuildQualifiedName (string name1, string name2) { if (string.IsNullOrEmpty (name1)) @@ -95,6 +104,10 @@ namespace ICSharpCode.NRefactory.CSharp return name1 + "." + name2; } + public void AddMember (AstNode child) + { + AddChild (child, MemberRole); + } public override S AcceptVisitor (IAstVisitor visitor, T data) { diff --git a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs index 41aee352d..a157ce62f 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs @@ -66,6 +66,22 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } + public UsingAliasDeclaration () + { + } + + public UsingAliasDeclaration (string alias, string nameSpace) + { + AddChild (new Identifier (alias, AstLocation.Empty), AliasRole); + AddChild (new SimpleType (nameSpace), ImportRole); + } + + public UsingAliasDeclaration (string alias, AstType import) + { + AddChild (new Identifier (alias, AstLocation.Empty), AliasRole); + AddChild (import, ImportRole); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitUsingAliasDeclaration (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingDeclaration.cs b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingDeclaration.cs index 12beb31be..77c2697f8 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingDeclaration.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/GeneralScope/UsingDeclaration.cs @@ -60,6 +60,20 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } + public UsingDeclaration () + { + } + + public UsingDeclaration (string nameSpace) + { + AddChild (new SimpleType (nameSpace), ImportRole); + } + + public UsingDeclaration (AstType import) + { + AddChild (import, ImportRole); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitUsingDeclaration (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/IAstVisitor.cs b/ICSharpCode.NRefactory/CSharp/Ast/IAstVisitor.cs index 5f0bee4e0..4092d5671 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/IAstVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/IAstVisitor.cs @@ -11,7 +11,7 @@ namespace ICSharpCode.NRefactory.CSharp public interface IAstVisitor { S VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, T data); - S VisitArgListExpression(ArgListExpression argListExpression, T data); + S VisitUndocumentedExpression(UndocumentedExpression undocumentedExpression, T data); S VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, T data); S VisitArrayInitializerExpression(ArrayInitializerExpression arrayInitializerExpression, T data); S VisitAsExpression(AsExpression asExpression, T data); @@ -32,6 +32,7 @@ namespace ICSharpCode.NRefactory.CSharp S VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, T data); S VisitNullReferenceExpression(NullReferenceExpression nullReferenceExpression, T data); S VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, T data); + S VisitAnonymousTypeCreateExpression(AnonymousTypeCreateExpression anonymousTypeCreateExpression, T data); S VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, T data); S VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, T data); S VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, T data); @@ -124,5 +125,7 @@ namespace ICSharpCode.NRefactory.CSharp S VisitConstraint(Constraint constraint, T data); S VisitCSharpTokenNode(CSharpTokenNode cSharpTokenNode, T data); S VisitIdentifier(Identifier identifier, T data); + + S VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern, T data); } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Identifier.cs b/ICSharpCode.NRefactory/CSharp/Ast/Identifier.cs index 2db1b06e0..09639ab0b 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Identifier.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Identifier.cs @@ -66,6 +66,11 @@ namespace ICSharpCode.NRefactory.CSharp } } + public bool IsQuoted { + get; + set; + } + AstLocation startLocation; public override AstLocation StartLocation { get { @@ -75,7 +80,7 @@ namespace ICSharpCode.NRefactory.CSharp public override AstLocation EndLocation { get { - return new AstLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length); + return new AstLocation (StartLocation.Line, StartLocation.Column + (Name ?? "").Length + (IsQuoted ? 1 : 0)); } } @@ -88,7 +93,8 @@ namespace ICSharpCode.NRefactory.CSharp { if (name == null) throw new ArgumentNullException("name"); - this.Name = name; + IsQuoted = name.StartsWith ("@"); + this.Name = IsQuoted ? name.Substring (1) : name; this.startLocation = location; } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/NodeType.cs b/ICSharpCode.NRefactory/CSharp/Ast/NodeType.cs index 5d831be04..5fd175c77 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/NodeType.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/NodeType.cs @@ -44,8 +44,9 @@ namespace ICSharpCode.NRefactory.CSharp Expression, Token, QueryClause, - Pattern, - Placeholder + /// + /// Placeholder for a pattern + /// + Pattern } - } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Choice.cs b/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Choice.cs deleted file mode 100644 index b2352e402..000000000 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Choice.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under MIT X11 license (for details please see \doc\license.txt) - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace ICSharpCode.NRefactory.CSharp.PatternMatching -{ - /// - /// Matches one of several alternatives. - /// - public class Choice : Pattern, IEnumerable - { - public static readonly Role AlternativeRole = new Role("Alternative", AstNode.Null); - - public void Add(string name, AstNode alternative) - { - AddChild(new NamedNode(name, alternative), AlternativeRole); - } - - public void Add(AstNode alternative) - { - AddChild(alternative, AlternativeRole); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - var checkPoint = match.CheckPoint(); - foreach (AstNode alt in GetChildrenByRole(AlternativeRole)) { - if (alt.DoMatch(other, match)) - return true; - else - match.RestoreCheckPoint(checkPoint); - } - return false; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetChildrenByRole(AlternativeRole).GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetChildrenByRole(AlternativeRole).GetEnumerator(); - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitChoice(this, data); - } - } -} diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/OptionalNode.cs b/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/OptionalNode.cs deleted file mode 100644 index 349f4393d..000000000 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/OptionalNode.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under MIT X11 license (for details please see \doc\license.txt) - -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace ICSharpCode.NRefactory.CSharp.PatternMatching -{ - public class OptionalNode : Pattern - { - public static readonly Role ElementRole = new Role("Element", AstNode.Null); - - public OptionalNode(AstNode childNode) - { - AddChild(childNode, ElementRole); - } - - public OptionalNode(string groupName, AstNode childNode) : this(new NamedNode(groupName, childNode)) - { - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - backtrackingStack.Push(new PossibleMatch(pos, match.CheckPoint())); - return GetChildByRole(ElementRole).DoMatch(pos, match); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - if (other == null || other.IsNull) - return true; - else - return GetChildByRole(ElementRole).DoMatch(other, match); - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitOptionalNode(this, data); - } - } -} diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Pattern.cs b/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Pattern.cs deleted file mode 100644 index 6d893b58c..000000000 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Pattern.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under MIT X11 license (for details please see \doc\license.txt) - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; - -namespace ICSharpCode.NRefactory.CSharp.PatternMatching -{ - /// - /// Base class for all patterns. - /// - public abstract class Pattern : AstNode - { - public override NodeType NodeType { - get { return NodeType.Pattern; } - } - - internal struct PossibleMatch - { - public readonly AstNode NextOther; // next node after the last matched node - public readonly int Checkpoint; // checkpoint - - public PossibleMatch(AstNode nextOther, int checkpoint) - { - this.NextOther = nextOther; - this.Checkpoint = checkpoint; - } - } - - public static implicit operator AstType(Pattern p) - { - return p != null ? new TypePlaceholder(p) : null; - } - - public AstType ToType() - { - return new TypePlaceholder(this); - } - - public static implicit operator Expression(Pattern p) - { - return p != null ? new ExpressionPlaceholder(p) : null; - } - - public Expression ToExpression() - { - return new ExpressionPlaceholder(this); - } - - public static implicit operator Statement(Pattern p) - { - return p != null ? new StatementPlaceholder(p) : null; - } - - public Statement ToStatement() - { - return new StatementPlaceholder(this); - } - - public static implicit operator BlockStatement(Pattern p) - { - return p != null ? new BlockStatementPlaceholder(p) : null; - } - - public static implicit operator VariableInitializer(Pattern p) - { - return p != null ? new VariablePlaceholder(p) : null; - } - - public static implicit operator AttributeSection(Pattern p) - { - return p != null ? new AttributeSectionPlaceholder(p) : null; - } - - public static implicit operator SwitchSection(Pattern p) - { - return p != null ? new SwitchSectionPlaceholder(p) : null; - } - - public static implicit operator CatchClause(Pattern p) - { - return p != null ? new CatchClausePlaceholder(p) : null; - } - - // Make debugging easier by giving Patterns a ToString() implementation - public override string ToString() - { - StringWriter w = new StringWriter(); - AcceptVisitor(new OutputVisitor(w, new CSharpFormattingPolicy()), null); - return w.ToString(); - } - } -} diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Placeholder.cs b/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Placeholder.cs deleted file mode 100644 index b30ca58f2..000000000 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Placeholder.cs +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under MIT X11 license (for details please see \doc\license.txt) - -using System; -using System.Collections.Generic; - -namespace ICSharpCode.NRefactory.CSharp.PatternMatching -{ - // Placeholders do not store their child in the AST tree; but keep it as a separate child. - // This allows reusing the child in multiple placeholders; thus enabling the sharing of AST subtrees. - sealed class TypePlaceholder : AstType - { - readonly AstNode child; - - public TypePlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class ExpressionPlaceholder : Expression - { - readonly AstNode child; - - public ExpressionPlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class StatementPlaceholder : Statement - { - readonly AstNode child; - - public StatementPlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class BlockStatementPlaceholder : BlockStatement - { - readonly AstNode child; - - public BlockStatementPlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class VariablePlaceholder : VariableInitializer - { - readonly AstNode child; - - public VariablePlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class AttributeSectionPlaceholder : AttributeSection - { - readonly AstNode child; - - public AttributeSectionPlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class SwitchSectionPlaceholder : SwitchSection - { - readonly AstNode child; - - public SwitchSectionPlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } - - sealed class CatchClausePlaceholder : CatchClause - { - readonly AstNode child; - - public CatchClausePlaceholder(AstNode child) - { - this.child = child; - } - - public override NodeType NodeType { - get { return NodeType.Placeholder; } - } - - public override S AcceptVisitor(IAstVisitor visitor, T data) - { - return ((IPatternAstVisitor)visitor).VisitPlaceholder(this, child, data); - } - - protected internal override bool DoMatch(AstNode other, Match match) - { - return child.DoMatch(other, match); - } - - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) - { - return child.DoMatchCollection(role, pos, match, backtrackingStack); - } - } -} diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/BlockStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/BlockStatement.cs index 9ee89966d..50cf3e6cd 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/BlockStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/BlockStatement.cs @@ -57,6 +57,42 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion + #region PatternPlaceholder + public static implicit operator BlockStatement(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : BlockStatement, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public CSharpTokenNode LBraceToken { get { return GetChildByRole (Roles.LBrace); } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/CheckedStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/CheckedStatement.cs index d80dc6d57..731649f4a 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/CheckedStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/CheckedStatement.cs @@ -27,7 +27,7 @@ namespace ICSharpCode.NRefactory.CSharp { /// - /// checked { Body } + /// checked BodyBlock /// public class CheckedStatement : Statement { @@ -40,6 +40,15 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Body, value); } } + public CheckedStatement () + { + } + + public CheckedStatement (BlockStatement body) + { + AddChild (body, Roles.Body); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitCheckedStatement (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/ReturnStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/ReturnStatement.cs index d8368d442..075a22589 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/ReturnStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/ReturnStatement.cs @@ -44,6 +44,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } + public ReturnStatement () + { + } + + public ReturnStatement (Expression returnExpression) + { + AddChild (returnExpression, Roles.Expression); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitReturnStatement (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/Statement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/Statement.cs index 41cbe67f5..e2d607571 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/Statement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/Statement.cs @@ -38,37 +38,41 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - /// - /// Gets the previous statement within the current block. - /// This is usually equivalent to , but will skip any non-statements (e.g. comments) - /// - public Statement PreviousStatement { - get { - AstNode node = this; - while ((node = node.PrevSibling) != null) { - Statement stmt = node as Statement; - if (stmt != null) - return stmt; - } - return null; - } + #region PatternPlaceholder + public static implicit operator Statement(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; } - /// - /// Gets the next statement within the current block. - /// This is usually equivalent to , but will skip any non-statements (e.g. comments) - /// - public Statement NextStatement { - get { - AstNode node = this; - while ((node = node.NextSibling) != null) { - Statement stmt = node as Statement; - if (stmt != null) - return stmt; - } - return null; + sealed class PatternPlaceholder : Statement, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); } } + #endregion public new Statement Clone() { @@ -92,7 +96,7 @@ namespace ICSharpCode.NRefactory.CSharp if (IsNull) return "Null"; StringWriter w = new StringWriter(); - AcceptVisitor(new OutputVisitor(w, new CSharpFormattingPolicy()), null); + AcceptVisitor(new OutputVisitor(w, new CSharpFormattingOptions()), null); string text = w.ToString().TrimEnd().Replace("\t", "").Replace(w.NewLine, " "); if (text.Length > 100) return text.Substring(0, 97) + "..."; diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/SwitchStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/SwitchStatement.cs index 09b82be63..f7404229a 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/SwitchStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/SwitchStatement.cs @@ -79,6 +79,42 @@ namespace ICSharpCode.NRefactory.CSharp public class SwitchSection : AstNode { + #region PatternPlaceholder + public static implicit operator SwitchSection(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : SwitchSection, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public static readonly Role CaseLabelRole = new Role("CaseLabel"); public override NodeType NodeType { diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/ThrowStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/ThrowStatement.cs index fc9f34237..2eafdd977 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/ThrowStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/ThrowStatement.cs @@ -44,6 +44,15 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } + public ThrowStatement () + { + } + + public ThrowStatement (Expression expression) + { + AddChild (expression, Roles.Expression); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitThrowStatement (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/TryCatchStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/TryCatchStatement.cs index bfba09de2..ccd1fb7b6 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/TryCatchStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/TryCatchStatement.cs @@ -79,6 +79,42 @@ namespace ICSharpCode.NRefactory.CSharp /// public class CatchClause : AstNode { + #region PatternPlaceholder + public static implicit operator CatchClause(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : CatchClause, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public override NodeType NodeType { get { return NodeType.Unknown; diff --git a/ICSharpCode.NRefactory/CSharp/Ast/Statements/UncheckedStatement.cs b/ICSharpCode.NRefactory/CSharp/Ast/Statements/UncheckedStatement.cs index a0bef129e..af40fa5a9 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/Statements/UncheckedStatement.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/Statements/UncheckedStatement.cs @@ -27,7 +27,7 @@ namespace ICSharpCode.NRefactory.CSharp { /// - /// unchecked { Body } + /// unchecked BodyBlock /// public class UncheckedStatement : Statement { @@ -40,6 +40,15 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Body, value); } } + public UncheckedStatement () + { + } + + public UncheckedStatement (BlockStatement body) + { + AddChild (body, Roles.Body); + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitUncheckedStatement (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/ConstructorDeclaration.cs b/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/ConstructorDeclaration.cs index 4971a4eec..a86214b97 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/ConstructorDeclaration.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/ConstructorDeclaration.cs @@ -123,10 +123,18 @@ namespace ICSharpCode.NRefactory.CSharp set; } + public CSharpTokenNode LParToken { + get { return GetChildByRole (Roles.LPar); } + } + public AstNodeCollection Arguments { get { return GetChildrenByRole (Roles.Argument); } } + public CSharpTokenNode RParToken { + get { return GetChildByRole (Roles.RPar); } + } + public override S AcceptVisitor (IAstVisitor visitor, T data) { return visitor.VisitConstructorInitializer (this, data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/FixedVariableInitializer.cs b/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/FixedVariableInitializer.cs index 75857e111..930d31a0e 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/FixedVariableInitializer.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/FixedVariableInitializer.cs @@ -1,4 +1,4 @@ -// +// // FixedFieldDeclaration.cs // // Author: @@ -29,7 +29,7 @@ using System; namespace ICSharpCode.NRefactory.CSharp { /// - /// name [ ] + /// Name [ CountExpression ] /// public class FixedVariableInitializer : AstNode { @@ -46,7 +46,7 @@ namespace ICSharpCode.NRefactory.CSharp public FixedVariableInitializer (string name, Expression initializer = null) { this.Name = name; - this.Initializer = initializer; + this.CountExpression = initializer; } public string Name { @@ -62,7 +62,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.LBracket); } } - public Expression Initializer { + public Expression CountExpression { get { return GetChildByRole (Roles.Expression); } set { SetChildByRole (Roles.Expression, value); } } @@ -76,10 +76,10 @@ namespace ICSharpCode.NRefactory.CSharp return visitor.VisitFixedVariableInitializer (this, data); } - protected internal override bool DoMatch (AstNode other, ICSharpCode.NRefactory.CSharp.PatternMatching.Match match) + protected internal override bool DoMatch (AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match) { var o = other as FixedVariableInitializer; - return o != null && MatchString (this.Name, o.Name) && this.Initializer.DoMatch (o.Initializer, match); + return o != null && MatchString (this.Name, o.Name) && this.CountExpression.DoMatch (o.CountExpression, match); } } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/VariableInitializer.cs b/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/VariableInitializer.cs index 860f52f36..c90d172c1 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/VariableInitializer.cs +++ b/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/VariableInitializer.cs @@ -28,6 +28,42 @@ namespace ICSharpCode.NRefactory.CSharp { public class VariableInitializer : AstNode { + #region PatternPlaceholder + public static implicit operator VariableInitializer(PatternMatching.Pattern pattern) + { + return pattern != null ? new PatternPlaceholder(pattern) : null; + } + + sealed class PatternPlaceholder : VariableInitializer, PatternMatching.INode + { + readonly PatternMatching.Pattern child; + + public PatternPlaceholder(PatternMatching.Pattern child) + { + this.child = child; + } + + public override NodeType NodeType { + get { return NodeType.Pattern; } + } + + public override S AcceptVisitor(IAstVisitor visitor, T data) + { + return visitor.VisitPatternPlaceholder(this, child, data); + } + + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) + { + return child.DoMatch(other, match); + } + + bool PatternMatching.INode.DoMatchCollection(Role role, PatternMatching.INode pos, PatternMatching.Match match, PatternMatching.BacktrackingInfo backtrackingInfo) + { + return child.DoMatchCollection(role, pos, match, backtrackingInfo); + } + } + #endregion + public override NodeType NodeType { get { return NodeType.Unknown; @@ -67,7 +103,7 @@ namespace ICSharpCode.NRefactory.CSharp return visitor.VisitVariableInitializer (this, data); } - protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.CSharp.PatternMatching.Match match) + protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { VariableInitializer o = other as VariableInitializer; return o != null && MatchString(this.Name, o.Name) && this.Initializer.DoMatch(o.Initializer, match); diff --git a/ICSharpCode.NRefactory/CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory/CSharp/Formatter/AstFormattingVisitor.cs index 0533d9566..f28e42ff5 100644 --- a/ICSharpCode.NRefactory/CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/Formatter/AstFormattingVisitor.cs @@ -33,7 +33,7 @@ namespace ICSharpCode.NRefactory.CSharp { public class AstFormattingVisitor : DepthFirstAstVisitor { - CSharpFormattingPolicy policy; + CSharpFormattingOptions policy; ITextEditorAdapter data; List changes = new List (); Indent curIndent = new Indent (); @@ -66,7 +66,7 @@ namespace ICSharpCode.NRefactory.CSharp set; } - public AstFormattingVisitor (CSharpFormattingPolicy policy, ITextEditorAdapter data) + public AstFormattingVisitor (CSharpFormattingOptions policy, ITextEditorAdapter data) { this.policy = policy; this.data = data; @@ -521,13 +521,25 @@ namespace ICSharpCode.NRefactory.CSharp { FixIndentationForceNewLine (fieldDeclaration.StartLocation); FormatCommas (fieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); - if (fieldDeclaration.NextSibling is FieldDeclaration) { + if (fieldDeclaration.NextSibling is FieldDeclaration || fieldDeclaration.NextSibling is FixedFieldDeclaration) { EnsureBlankLinesAfter (fieldDeclaration, policy.BlankLinesBetweenFields); } else if (IsMember (fieldDeclaration.NextSibling)) { EnsureBlankLinesAfter (fieldDeclaration, policy.BlankLinesBetweenMembers); } return base.VisitFieldDeclaration (fieldDeclaration, data); } + + public override object VisitFixedFieldDeclaration (FixedFieldDeclaration fixedFieldDeclaration, object data) + { + FixIndentationForceNewLine (fixedFieldDeclaration.StartLocation); + FormatCommas (fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); + if (fixedFieldDeclaration.NextSibling is FieldDeclaration || fixedFieldDeclaration.NextSibling is FixedFieldDeclaration ) { + EnsureBlankLinesAfter (fixedFieldDeclaration, policy.BlankLinesBetweenFields); + } else if (IsMember (fixedFieldDeclaration.NextSibling)) { + EnsureBlankLinesAfter (fixedFieldDeclaration, policy.BlankLinesBetweenMembers); + } + return base.VisitFixedFieldDeclaration (fixedFieldDeclaration, data); + } public override object VisitEnumMemberDeclaration (EnumMemberDeclaration enumMemberDeclaration, object data) { diff --git a/ICSharpCode.NRefactory/CSharp/Formatter/CSharpFormattingPolicy.cs b/ICSharpCode.NRefactory/CSharp/Formatter/CSharpFormattingOptions.cs similarity index 96% rename from ICSharpCode.NRefactory/CSharp/Formatter/CSharpFormattingPolicy.cs rename to ICSharpCode.NRefactory/CSharp/Formatter/CSharpFormattingOptions.cs index ceb666d1e..17c4a5899 100644 --- a/ICSharpCode.NRefactory/CSharp/Formatter/CSharpFormattingPolicy.cs +++ b/ICSharpCode.NRefactory/CSharp/Formatter/CSharpFormattingOptions.cs @@ -1,5 +1,5 @@ // -// CSharpFormattingPolicy.cs +// CSharpFormattingOptions.cs // // Author: // Mike Krüger @@ -60,7 +60,7 @@ namespace ICSharpCode.NRefactory.CSharp ForceNewLine } - public class CSharpFormattingPolicy + public class CSharpFormattingOptions { public string Name { get; @@ -72,9 +72,9 @@ namespace ICSharpCode.NRefactory.CSharp set; } - public CSharpFormattingPolicy Clone () + public CSharpFormattingOptions Clone () { - return (CSharpFormattingPolicy)MemberwiseClone (); + return (CSharpFormattingOptions)MemberwiseClone (); } #region Indentation @@ -766,7 +766,7 @@ namespace ICSharpCode.NRefactory.CSharp #endregion - public CSharpFormattingPolicy () + public CSharpFormattingOptions () { IndentNamespaceBody = true; IndentClassBody = IndentInterfaceBody = IndentStructBody = IndentEnumBody = true; @@ -880,22 +880,22 @@ namespace ICSharpCode.NRefactory.CSharp BlankLinesBetweenMembers = 1; } - /*public static CSharpFormattingPolicy Load (FilePath selectedFile) + /*public static CSharpFormattingOptions Load (FilePath selectedFile) { using (var stream = System.IO.File.OpenRead (selectedFile)) { return Load (stream); } } - public static CSharpFormattingPolicy Load (System.IO.Stream input) + public static CSharpFormattingOptions Load (System.IO.Stream input) { - CSharpFormattingPolicy result = new CSharpFormattingPolicy (); + CSharpFormattingOptions result = new CSharpFormattingOptions (); result.Name = "noname"; using (XmlTextReader reader = new XmlTextReader (input)) { while (reader.Read ()) { if (reader.NodeType == XmlNodeType.Element) { if (reader.LocalName == "Property") { - var info = typeof(CSharpFormattingPolicy).GetProperty (reader.GetAttribute ("name")); + var info = typeof(CSharpFormattingOptions).GetProperty (reader.GetAttribute ("name")); string valString = reader.GetAttribute ("value"); object value; if (info.PropertyType == typeof(bool)) { @@ -926,7 +926,7 @@ namespace ICSharpCode.NRefactory.CSharp writer.IndentChar = '\t'; writer.WriteStartElement ("FormattingProfile"); writer.WriteAttributeString ("name", Name); - foreach (PropertyInfo info in typeof (CSharpFormattingPolicy).GetProperties ()) { + foreach (PropertyInfo info in typeof (CSharpFormattingOptions).GetProperties ()) { if (info.GetCustomAttributes (false).Any (o => o.GetType () == typeof(ItemPropertyAttribute))) { writer.WriteStartElement ("Property"); writer.WriteAttributeString ("name", info.Name); @@ -938,9 +938,9 @@ namespace ICSharpCode.NRefactory.CSharp } } - public bool Equals (CSharpFormattingPolicy other) + public bool Equals (CSharpFormattingOptions other) { - foreach (PropertyInfo info in typeof (CSharpFormattingPolicy).GetProperties ()) { + foreach (PropertyInfo info in typeof (CSharpFormattingOptions).GetProperties ()) { if (info.GetCustomAttributes (false).Any (o => o.GetType () == typeof(ItemPropertyAttribute))) { object val = info.GetValue (this, null); object otherVal = info.GetValue (other, null); diff --git a/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs b/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs index e8a9f408f..e1cfcf64a 100644 --- a/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs @@ -9,7 +9,7 @@ using System.IO; using System.Linq; using System.Text; -using ICSharpCode.NRefactory.CSharp.PatternMatching; +using ICSharpCode.NRefactory.PatternMatching; using ICSharpCode.NRefactory.TypeSystem; namespace ICSharpCode.NRefactory.CSharp @@ -17,10 +17,10 @@ namespace ICSharpCode.NRefactory.CSharp /// /// Outputs the AST. /// - public class OutputVisitor : IPatternAstVisitor + public class OutputVisitor : IAstVisitor, IPatternAstVisitor { readonly IOutputFormatter formatter; - readonly CSharpFormattingPolicy policy; + readonly CSharpFormattingOptions policy; readonly Stack containerStack = new Stack(); readonly Stack positionStack = new Stack(); @@ -42,7 +42,7 @@ namespace ICSharpCode.NRefactory.CSharp Division } - public OutputVisitor(TextWriter textWriter, CSharpFormattingPolicy formattingPolicy) + public OutputVisitor(TextWriter textWriter, CSharpFormattingOptions formattingPolicy) { if (textWriter == null) throw new ArgumentNullException("textWriter"); @@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp this.policy = formattingPolicy; } - public OutputVisitor(IOutputFormatter formatter, CSharpFormattingPolicy formattingPolicy) + public OutputVisitor(IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy) { if (formatter == null) throw new ArgumentNullException("formatter"); @@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.CSharp { // Ensure that nodes are visited in the proper nested order. // Jumps to different subtrees are allowed only for the child of a placeholder node. - Debug.Assert(containerStack.Count == 0 || node.Parent == containerStack.Peek() || containerStack.Peek().NodeType == NodeType.Placeholder); + Debug.Assert(containerStack.Count == 0 || node.Parent == containerStack.Peek() || containerStack.Peek().NodeType == NodeType.Pattern); if (positionStack.Count > 0) WriteSpecialsUpToNode(node); containerStack.Push(node); @@ -468,15 +468,29 @@ namespace ICSharpCode.NRefactory.CSharp return EndNode(anonymousMethodExpression); } - public object VisitArgListExpression(ArgListExpression argListExpression, object data) - { - StartNode(argListExpression); - WriteKeyword("__arglist"); - if (!argListExpression.IsAccess) { + public object VisitUndocumentedExpression(UndocumentedExpression undocumentedExpression, object data) + { + StartNode(undocumentedExpression); + switch (undocumentedExpression.UndocumentedExpressionType) { + case UndocumentedExpressionType.ArgList: + case UndocumentedExpressionType.ArgListAccess: + WriteKeyword("__arglist"); + break; + case UndocumentedExpressionType.MakeRef: + WriteKeyword("__makeref"); + break; + case UndocumentedExpressionType.RefType: + WriteKeyword("__reftype"); + break; + case UndocumentedExpressionType.RefValue: + WriteKeyword("__refvalue"); + break; + } + if (undocumentedExpression.Arguments.Count > 0) { Space(policy.SpaceBeforeMethodCallParentheses); - WriteCommaSeparatedListInParenthesis(argListExpression.Arguments, policy.SpaceWithinMethodCallParentheses); + WriteCommaSeparatedListInParenthesis(undocumentedExpression.Arguments, policy.SpaceWithinMethodCallParentheses); } - return EndNode(argListExpression); + return EndNode(undocumentedExpression); } public object VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) @@ -501,7 +515,7 @@ namespace ICSharpCode.NRefactory.CSharp style = BraceStyle.EndOfLine; OpenBrace(style); bool isFirst = true; - foreach (AstNode node in arrayInitializerExpression.Children) { + foreach (AstNode node in arrayInitializerExpression.Elements) { if (isFirst) { isFirst = false; } else { @@ -771,6 +785,25 @@ namespace ICSharpCode.NRefactory.CSharp return EndNode(objectCreateExpression); } + public object VisitAnonymousTypeCreateExpression(AnonymousTypeCreateExpression anonymousTypeCreateExpression, object data) + { + StartNode(anonymousTypeCreateExpression); + WriteKeyword("new"); + Space(); + LPar(); + RPar(); + Space(); + OpenBrace(policy.AnonymousMethodBraceStyle); + foreach (AstNode node in anonymousTypeCreateExpression.Initializer) { + node.AcceptVisitor(this, null); + if (node.NextSibling != null) + Comma(node); + NewLine (); + } + CloseBrace(policy.AnonymousMethodBraceStyle); + return EndNode(anonymousTypeCreateExpression); + } + public object VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) { StartNode(parenthesizedExpression); @@ -1026,7 +1059,8 @@ namespace ICSharpCode.NRefactory.CSharp if (first) { first = false; } else { - NewLine(); + if (!(clause is QueryContinuationClause)) + NewLine(); } clause.AcceptVisitor(this, data); } @@ -1169,8 +1203,8 @@ namespace ICSharpCode.NRefactory.CSharp { StartNode(attributeSection); WriteToken("[", AstNode.Roles.LBracket); - if (attributeSection.AttributeTarget != AttributeTarget.None) { - WriteToken(AttributeSection.GetAttributeTargetName(attributeSection.AttributeTarget), AttributeSection.TargetRole); + if (!string.IsNullOrEmpty (attributeSection.AttributeTarget)) { + WriteToken(attributeSection.AttributeTarget, AttributeSection.TargetRole); WriteToken(":", AttributeSection.Roles.Colon); Space(); } @@ -1847,7 +1881,6 @@ namespace ICSharpCode.NRefactory.CSharp StartNode(fixedFieldDeclaration); WriteAttributes(fixedFieldDeclaration.Attributes); WriteModifiers(fixedFieldDeclaration.ModifierTokens); - Space(); WriteKeyword("fixed"); Space(); fixedFieldDeclaration.ReturnType.AcceptVisitor (this, data); @@ -1861,10 +1894,10 @@ namespace ICSharpCode.NRefactory.CSharp { StartNode(fixedVariableInitializer); WriteIdentifier(fixedVariableInitializer.Name); - if (!fixedVariableInitializer.Initializer.IsNull) { + if (!fixedVariableInitializer.CountExpression.IsNull) { WriteToken("[", AstNode.Roles.LBracket); Space(policy.SpacesWithinBrackets); - fixedVariableInitializer.Initializer.AcceptVisitor(this, data); + fixedVariableInitializer.CountExpression.AcceptVisitor(this, data); Space(policy.SpacesWithinBrackets); WriteToken("]", AstNode.Roles.RBracket); } @@ -2140,77 +2173,71 @@ namespace ICSharpCode.NRefactory.CSharp #endregion #region Pattern Nodes - object IPatternAstVisitor.VisitPlaceholder(AstNode placeholder, AstNode child, object data) + public object VisitPatternPlaceholder(AstNode placeholder, PatternMatching.Pattern pattern, object data) { StartNode(placeholder); - child.AcceptVisitor(this, data); + pattern.AcceptVisitor(this, data); return EndNode(placeholder); } object IPatternAstVisitor.VisitAnyNode(AnyNode anyNode, object data) { - StartNode(anyNode); if (!string.IsNullOrEmpty(anyNode.GroupName)) { WriteIdentifier(anyNode.GroupName); WriteToken(":", AstNode.Roles.Colon); } WriteKeyword("anyNode"); - return EndNode(anyNode); + return null; } object IPatternAstVisitor.VisitBackreference(Backreference backreference, object data) { - StartNode(backreference); WriteKeyword("backreference"); LPar(); WriteIdentifier(backreference.ReferencedGroupName); RPar(); - return EndNode(backreference); + return null; } object IPatternAstVisitor.VisitIdentifierExpressionBackreference(IdentifierExpressionBackreference identifierExpressionBackreference, object data) { - StartNode(identifierExpressionBackreference); WriteKeyword("identifierBackreference"); LPar(); WriteIdentifier(identifierExpressionBackreference.ReferencedGroupName); RPar(); - return EndNode(identifierExpressionBackreference); + return null; } object IPatternAstVisitor.VisitChoice(Choice choice, object data) { - StartNode(choice); WriteKeyword("choice"); Space(); LPar(); NewLine(); formatter.Indent(); - foreach (AstNode alternative in choice) { - alternative.AcceptVisitor(this, data); - if (alternative != choice.LastChild) + foreach (INode alternative in choice) { + VisitNodeInPattern(alternative, data); + if (alternative != choice.Last()) WriteToken(",", AstNode.Roles.Comma); NewLine(); } formatter.Unindent(); RPar(); - return EndNode(choice); + return null; } object IPatternAstVisitor.VisitNamedNode(NamedNode namedNode, object data) { - StartNode(namedNode); if (!string.IsNullOrEmpty(namedNode.GroupName)) { WriteIdentifier(namedNode.GroupName); WriteToken(":", AstNode.Roles.Colon); } - namedNode.GetChildByRole(NamedNode.ElementRole).AcceptVisitor(this, data); - return EndNode(namedNode); + VisitNodeInPattern(namedNode.ChildNode, data); + return null; } object IPatternAstVisitor.VisitRepeat(Repeat repeat, object data) { - StartNode(repeat); WriteKeyword("repeat"); LPar(); if (repeat.MinCount != 0 || repeat.MaxCount != int.MaxValue) { @@ -2219,19 +2246,33 @@ namespace ICSharpCode.NRefactory.CSharp WriteIdentifier(repeat.MaxCount.ToString()); WriteToken(",", AstNode.Roles.Comma); } - repeat.GetChildByRole(Repeat.ElementRole).AcceptVisitor(this, data); + VisitNodeInPattern(repeat.ChildNode, data); RPar(); - return EndNode(repeat); + return null; } object IPatternAstVisitor.VisitOptionalNode(OptionalNode optionalNode, object data) { - StartNode(optionalNode); WriteKeyword("optional"); LPar(); - optionalNode.GetChildByRole(OptionalNode.ElementRole).AcceptVisitor(this, data); + VisitNodeInPattern(optionalNode.ChildNode, data); RPar(); - return EndNode(optionalNode); + return null; + } + + void VisitNodeInPattern(INode childNode, object data) + { + AstNode astNode = childNode as AstNode; + if (astNode != null) { + astNode.AcceptVisitor(this, data); + } else { + Pattern pattern = childNode as Pattern; + if (pattern != null) { + pattern.AcceptVisitor(this, data); + } else { + throw new InvalidOperationException("Unknown node type in pattern"); + } + } } #endregion } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs index f9a20b45b..778aeacb9 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs @@ -69,13 +69,30 @@ namespace ICSharpCode.NRefactory.CSharp void AddTypeArguments (ATypeNameExpression texpr, AstType result) { - if (!texpr.HasTypeArguments) + if (texpr.TypeArguments == null || texpr.TypeArguments.Args == null) return; foreach (var arg in texpr.TypeArguments.Args) { result.AddChild (ConvertToType (arg), AstType.Roles.TypeArgument); } } + AstType ConvertToType (MemberName memberName) + { + AstType result; + if (memberName.Left != null) { + result = new MemberType () { MemberName = memberName.Name }; + result.AddChild (ConvertToType (memberName.Left), MemberType.TargetRole); + } else { + result = new SimpleType () { Identifier = memberName.Name }; + } + if (memberName.TypeArguments != null && !memberName.TypeArguments.IsEmpty) { + foreach (var arg in memberName.TypeArguments.Args) { + result.AddChild (ConvertToType (arg), AstType.Roles.TypeArgument); + } + } + return result; + } + AstType ConvertToType (Mono.CSharp.Expression typeName) { if (typeName is TypeExpression) { @@ -85,9 +102,15 @@ namespace ICSharpCode.NRefactory.CSharp if (typeName is Mono.CSharp.QualifiedAliasMember) { var qam = (Mono.CSharp.QualifiedAliasMember)typeName; - // TODO: Overwork the return type model - atm we don't have a good representation - // for qualified alias members. - return new SimpleType (qam.Name, Convert (qam.Location)); + var memberType = new MemberType (); + if (qam.LeftExpression == null) { + memberType.Target = new SimpleType("global"); + } else { + memberType.Target = ConvertToType (qam.LeftExpression); + } + memberType.IsDoubleColon = true; + memberType.MemberName = qam.Name; + return memberType; } if (typeName is MemberAccess) { @@ -119,7 +142,7 @@ namespace ICSharpCode.NRefactory.CSharp result.PointerRank++; } else { var location = LocationsBag.GetLocations (cc.Spec); - var spec = new ArraySpecifier () { Dimensions = cc.Spec.Dimension - 1 }; + var spec = new ArraySpecifier () { Dimensions = cc.Spec.Dimension }; spec.AddChild (new CSharpTokenNode (Convert (cc.Spec.Location), 1), FieldDeclaration.Roles.LBracket); if (location != null) spec.AddChild (new CSharpTokenNode (Convert (location [0]), 1), FieldDeclaration.Roles.RBracket); @@ -134,6 +157,56 @@ namespace ICSharpCode.NRefactory.CSharp return new SimpleType ("unknown"); } + IEnumerable GetAttributes (Attributes optAttributes) + { + if (optAttributes == null || optAttributes.Attrs == null) + yield break; + + foreach (var attr in optAttributes.Attrs) { + Attribute result = new Attribute (); + result.Type = ConvertToType (attr.TypeNameExpression); + + if (attr.PosArguments != null) { + foreach (var arg in attr.PosArguments) { + result.AddChild ((Expression)arg.Expr.Accept (this), Attribute.Roles.Argument); + } + } + if (attr.NamedArguments != null) { + foreach (NamedArgument na in attr.NamedArguments) { + NamedArgumentExpression newArg = new NamedArgumentExpression(); + newArg.AddChild (new Identifier (na.Name, Convert (na.Location)), NamedArgumentExpression.Roles.Identifier); + + var loc = LocationsBag.GetLocations (na); + if (loc != null) + newArg.AddChild (new CSharpTokenNode (Convert (loc[0]), 1), NamedArgumentExpression.Roles.Assign); + newArg.AddChild ((Expression)na.Expr.Accept (this), NamedArgumentExpression.Roles.Expression); + result.AddChild (newArg, Attribute.Roles.Argument); + } + } + yield return result; + } + } + + AttributeSection ConvertAttributeSection (Attributes optAttributes) + { + if (optAttributes == null || optAttributes.Attrs == null) + return null; + AttributeSection result = new AttributeSection (); + var loc = LocationsBag.GetLocations (optAttributes); + if (loc != null) + result.AddChild (new CSharpTokenNode (Convert (loc [0]), 1), AttributeSection.Roles.LBracket); + + result.AttributeTarget = optAttributes.Attrs.First ().ExplicitTarget; + + foreach (var attr in GetAttributes (optAttributes)) { + result.AddChild (attr, AttributeSection.AttributeRole); + } + + if (loc != null) + result.AddChild (new CSharpTokenNode (Convert (loc [1]), 1), AttributeSection.Roles.RBracket); + return result; + } + public override void Visit (UsingsBag.Namespace nspace) { NamespaceDeclaration nDecl = null; @@ -207,11 +280,12 @@ namespace ICSharpCode.NRefactory.CSharp t.IsDoubleColon = memberName.IsDoubleColon; t.AddChild (ConvertImport (memberName.Left), MemberType.TargetRole); t.AddChild (new Identifier (memberName.Name, Convert(memberName.Location)), MemberType.Roles.Identifier); + AddTypeArguments (t, (List)null, memberName.TypeArguments); return t; } else { SimpleType t = new SimpleType(); t.AddChild (new Identifier (memberName.Name, Convert(memberName.Location)), SimpleType.Roles.Identifier); - // TODO type arguments + AddTypeArguments (t, (List)null, memberName.TypeArguments); return t; } } @@ -228,12 +302,13 @@ namespace ICSharpCode.NRefactory.CSharp { TypeDeclaration newType = new TypeDeclaration (); newType.ClassType = ClassType.Class; + AddAttributeSection (newType, c); var location = LocationsBag.GetMemberLocation (c); AddModifiers (newType, location); if (location != null) newType.AddChild (new CSharpTokenNode (Convert (location[0]), "class".Length), TypeDeclaration.Roles.Keyword); - newType.AddChild (new Identifier (c.Basename, Convert (c.MemberName.Location)), AstNode.Roles.Identifier); + newType.AddChild (new Identifier (c.MemberName.Name, Convert (c.MemberName.Location)), AstNode.Roles.Identifier); if (c.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (c.MemberName); if (typeArgLocation != null) @@ -243,6 +318,11 @@ namespace ICSharpCode.NRefactory.CSharp newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); AddConstraints (newType, c); } + if (c.TypeBaseExpressions != null) { + foreach (var baseTypes in c.TypeBaseExpressions) { + newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + } + } if (location != null && location.Count > 1) newType.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -257,12 +337,12 @@ namespace ICSharpCode.NRefactory.CSharp { TypeDeclaration newType = new TypeDeclaration (); newType.ClassType = ClassType.Struct; - + AddAttributeSection (newType, s); var location = LocationsBag.GetMemberLocation (s); AddModifiers (newType, location); if (location != null) newType.AddChild (new CSharpTokenNode (Convert (location[0]), "struct".Length), TypeDeclaration.Roles.Keyword); - newType.AddChild (new Identifier (s.Basename, Convert (s.MemberName.Location)), AstNode.Roles.Identifier); + newType.AddChild (new Identifier (s.MemberName.Name, Convert (s.MemberName.Location)), AstNode.Roles.Identifier); if (s.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (s.MemberName); if (typeArgLocation != null) @@ -272,6 +352,13 @@ namespace ICSharpCode.NRefactory.CSharp newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); AddConstraints (newType, s); } + + if (s.TypeBaseExpressions != null) { + foreach (var baseTypes in s.TypeBaseExpressions) { + newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + } + } + if (location != null && location.Count > 1) newType.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -286,12 +373,12 @@ namespace ICSharpCode.NRefactory.CSharp { TypeDeclaration newType = new TypeDeclaration (); newType.ClassType = ClassType.Interface; - + AddAttributeSection (newType, i); var location = LocationsBag.GetMemberLocation (i); AddModifiers (newType, location); if (location != null) newType.AddChild (new CSharpTokenNode (Convert (location[0]), "interface".Length), TypeDeclaration.Roles.Keyword); - newType.AddChild (new Identifier (i.Basename, Convert (i.MemberName.Location)), AstNode.Roles.Identifier); + newType.AddChild (new Identifier (i.MemberName.Name, Convert (i.MemberName.Location)), AstNode.Roles.Identifier); if (i.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (i.MemberName); if (typeArgLocation != null) @@ -301,6 +388,11 @@ namespace ICSharpCode.NRefactory.CSharp newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), MemberReferenceExpression.Roles.RChevron); AddConstraints (newType, i); } + if (i.TypeBaseExpressions != null) { + foreach (var baseTypes in i.TypeBaseExpressions) { + newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + } + } if (location != null && location.Count > 1) newType.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -315,12 +407,12 @@ namespace ICSharpCode.NRefactory.CSharp { DelegateDeclaration newDelegate = new DelegateDeclaration (); var location = LocationsBag.GetMemberLocation (d); - + AddAttributeSection (newDelegate, d); AddModifiers (newDelegate, location); if (location != null) newDelegate.AddChild (new CSharpTokenNode (Convert (location[0]), "delegate".Length), TypeDeclaration.Roles.Keyword); newDelegate.AddChild (ConvertToType (d.ReturnType), AstNode.Roles.Type); - newDelegate.AddChild (new Identifier (d.Basename, Convert (d.MemberName.Location)), AstNode.Roles.Identifier); + newDelegate.AddChild (new Identifier (d.MemberName.Name, Convert (d.MemberName.Location)), AstNode.Roles.Identifier); if (d.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (d.MemberName); if (typeArgLocation != null) @@ -362,13 +454,21 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (Mono.CSharp.Enum e) { TypeDeclaration newType = new TypeDeclaration (); + AddAttributeSection (newType, e); newType.ClassType = ClassType.Enum; var location = LocationsBag.GetMemberLocation (e); AddModifiers (newType, location); if (location != null) newType.AddChild (new CSharpTokenNode (Convert (location[0]), "enum".Length), TypeDeclaration.Roles.Keyword); - newType.AddChild (new Identifier (e.Basename, Convert (e.MemberName.Location)), AstNode.Roles.Identifier); + newType.AddChild (new Identifier (e.MemberName.Name, Convert (e.MemberName.Location)), AstNode.Roles.Identifier); + + if (e.TypeBaseExpressions != null) { + foreach (var baseTypes in e.TypeBaseExpressions) { + newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + } + } + if (location != null && location.Count > 1) newType.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -382,7 +482,7 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (EnumMember em) { EnumMemberDeclaration newField = new EnumMemberDeclaration (); - // TODO: attributes, 'new' modifier + AddAttributeSection (newField, em); newField.AddChild (new Identifier (em.Name, Convert (em.Location)), AstNode.Roles.Identifier); if (em.Initializer != null) { @@ -401,7 +501,7 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (f); var newField = new FixedFieldDeclaration (); - + AddAttributeSection (newField, f); AddModifiers (newField, location); if (location != null) newField.AddChild (new CSharpTokenNode (Convert (location [0]), "fixed".Length), FixedFieldDeclaration.Roles.Keyword); @@ -450,7 +550,7 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (f); FieldDeclaration newField = new FieldDeclaration (); - + AddAttributeSection (newField, f); AddModifiers (newField, location); newField.AddChild (ConvertToType (f.TypeName), FieldDeclaration.Roles.Type); @@ -489,7 +589,7 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (f); FieldDeclaration newField = new FieldDeclaration (); - + AddAttributeSection (newField, f); AddModifiers (newField, location); if (location != null) newField.AddChild (new CSharpTokenNode (Convert (location[0]), "const".Length), FieldDeclaration.Roles.Keyword); @@ -532,7 +632,7 @@ namespace ICSharpCode.NRefactory.CSharp newOperator.OperatorType = (OperatorType)o.OperatorType; var location = LocationsBag.GetMemberLocation (o); - + AddAttributeSection (newOperator, o); AddModifiers (newOperator, location); newOperator.AddChild (ConvertToType (o.TypeName), AstNode.Roles.Type); @@ -585,14 +685,22 @@ namespace ICSharpCode.NRefactory.CSharp typeStack.Peek ().AddChild (newOperator, TypeDeclaration.MemberRole); } + public void AddAttributeSection (AttributedNode parent, Attributable a) + { + if (a.OptAttributes != null && a.OptAttributes.Attrs != null) + parent.AddChild (ConvertAttributeSection (a.OptAttributes), AttributedNode.AttributeRole); + } + public override void Visit (Indexer indexer) { IndexerDeclaration newIndexer = new IndexerDeclaration (); - + AddAttributeSection (newIndexer, indexer); var location = LocationsBag.GetMemberLocation (indexer); AddModifiers (newIndexer, location); - newIndexer.AddChild (ConvertToType (indexer.TypeName), AstNode.Roles.Type); + if (indexer.MemberName.Left != null) + newIndexer.AddChild (ConvertToType (indexer.MemberName.Left), IndexerDeclaration.PrivateImplementationTypeRole); + newIndexer.AddChild (ConvertToType (indexer.TypeName), IndexerDeclaration.Roles.Type); if (location != null) newIndexer.AddChild (new CSharpTokenNode (Convert (location[0]), 1), IndexerDeclaration.Roles.LBracket); @@ -605,6 +713,7 @@ namespace ICSharpCode.NRefactory.CSharp if (indexer.Get != null) { Accessor getAccessor = new Accessor (); var getLocation = LocationsBag.GetMemberLocation (indexer.Get); + AddAttributeSection (getAccessor, indexer.Get); AddModifiers (getAccessor, getLocation); if (getLocation != null) getAccessor.AddChild (new CSharpTokenNode (Convert (indexer.Get.Location), "get".Length), PropertyDeclaration.Roles.Keyword); @@ -620,6 +729,7 @@ namespace ICSharpCode.NRefactory.CSharp if (indexer.Set != null) { Accessor setAccessor = new Accessor (); var setLocation = LocationsBag.GetMemberLocation (indexer.Set); + AddAttributeSection (setAccessor, indexer.Set); AddModifiers (setAccessor, setLocation); if (setLocation != null) setAccessor.AddChild (new CSharpTokenNode (Convert (indexer.Set.Location), "set".Length), PropertyDeclaration.Roles.Keyword); @@ -642,12 +752,15 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (Method m) { MethodDeclaration newMethod = new MethodDeclaration (); - + AddAttributeSection (newMethod, m); var location = LocationsBag.GetMemberLocation (m); AddModifiers (newMethod, location); newMethod.AddChild (ConvertToType (m.TypeName), AstNode.Roles.Type); - newMethod.AddChild (new Identifier (m.Name, Convert (m.Location)), AstNode.Roles.Identifier); + if (m.MethodName.Left != null) + newMethod.AddChild (ConvertToType (m.MethodName.Left), MethodDeclaration.PrivateImplementationTypeRole); + + newMethod.AddChild (new Identifier (m.MethodName.Name, Convert (m.Location)), AstNode.Roles.Identifier); if (m.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (m.MemberName); @@ -656,7 +769,6 @@ namespace ICSharpCode.NRefactory.CSharp AddTypeParameters (newMethod, typeArgLocation, m.MemberName.TypeArguments); if (typeArgLocation != null) newMethod.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), MemberReferenceExpression.Roles.RChevron); - AddConstraints (newMethod, m.GenericMethod); } @@ -731,16 +843,21 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (Property p) { PropertyDeclaration newProperty = new PropertyDeclaration (); - + AddAttributeSection (newProperty, p); var location = LocationsBag.GetMemberLocation (p); AddModifiers (newProperty, location); newProperty.AddChild (ConvertToType (p.TypeName), AstNode.Roles.Type); - newProperty.AddChild (new Identifier (p.MemberName.Name, Convert (p.MemberName.Location)), AstNode.Roles.Identifier); + if (p.MemberName.Left != null) + newProperty.AddChild (ConvertToType (p.MemberName.Left), PropertyDeclaration.PrivateImplementationTypeRole); + + newProperty.AddChild (new Identifier (p.MemberName.Name, Convert (p.Location)), PropertyDeclaration.Roles.Identifier); + if (location != null) newProperty.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MethodDeclaration.Roles.LBrace); if (p.Get != null) { Accessor getAccessor = new Accessor (); + AddAttributeSection (getAccessor, p.Get); var getLocation = LocationsBag.GetMemberLocation (p.Get); AddModifiers (getAccessor, getLocation); getAccessor.AddChild (new CSharpTokenNode (Convert (p.Get.Location), "get".Length), PropertyDeclaration.Roles.Keyword); @@ -756,6 +873,7 @@ namespace ICSharpCode.NRefactory.CSharp if (p.Set != null) { Accessor setAccessor = new Accessor (); + AddAttributeSection (setAccessor, p.Set); var setLocation = LocationsBag.GetMemberLocation (p.Set); AddModifiers (setAccessor, setLocation); setAccessor.AddChild (new CSharpTokenNode (Convert (p.Set.Location), "set".Length), PropertyDeclaration.Roles.Keyword); @@ -777,6 +895,7 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (Constructor c) { ConstructorDeclaration newConstructor = new ConstructorDeclaration (); + AddAttributeSection (newConstructor, c); var location = LocationsBag.GetMemberLocation (c); AddModifiers (newConstructor, location); newConstructor.AddChild (new Identifier (c.MemberName.Name, Convert (c.MemberName.Location)), AstNode.Roles.Identifier); @@ -787,6 +906,21 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) newConstructor.AddChild (new CSharpTokenNode (Convert (location[1]), 1), MethodDeclaration.Roles.RPar); + if (c.Initializer != null) { + var initializer = new ConstructorInitializer (); + initializer.ConstructorInitializerType = c.Initializer is ConstructorBaseInitializer ? ConstructorInitializerType.Base : ConstructorInitializerType.This; + var initializerLocation = LocationsBag.GetLocations (c.Initializer); + + if (initializerLocation != null) + newConstructor.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ConstructorDeclaration.Roles.Colon); + if (initializerLocation != null) + initializer.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ConstructorDeclaration.Roles.LPar); + AddArguments (initializer, LocationsBag.GetLocations (c.Initializer.Arguments), c.Initializer.Arguments); + if (initializerLocation != null) + initializer.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ConstructorDeclaration.Roles.RPar); + newConstructor.AddChild (initializer, ConstructorDeclaration.InitializerRole); + } + if (c.Block != null) newConstructor.AddChild ((BlockStatement)c.Block.Accept (this), ConstructorDeclaration.Roles.Body); @@ -796,6 +930,7 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (Destructor d) { DestructorDeclaration newDestructor = new DestructorDeclaration (); + AddAttributeSection (newDestructor, d); var location = LocationsBag.GetMemberLocation (d); AddModifiers (newDestructor, location); if (location != null) @@ -816,14 +951,40 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (EventField e) { EventDeclaration newEvent = new EventDeclaration (); - + AddAttributeSection (newEvent, e); var location = LocationsBag.GetMemberLocation (e); AddModifiers (newEvent, location); if (location != null) newEvent.AddChild (new CSharpTokenNode (Convert (location[0]), "event".Length), EventDeclaration.Roles.Keyword); newEvent.AddChild (ConvertToType (e.TypeName), AstNode.Roles.Type); - newEvent.AddChild (new Identifier (e.MemberName.Name, Convert (e.MemberName.Location)), EventDeclaration.Roles.Identifier); + + VariableInitializer variable = new VariableInitializer (); + variable.AddChild (new Identifier (e.MemberName.Name, Convert (e.MemberName.Location)), FieldDeclaration.Roles.Identifier); + + if (e.Initializer != null) { + if (location != null) + variable.AddChild (new CSharpTokenNode (Convert (location[0]), 1), FieldDeclaration.Roles.Assign); + variable.AddChild ((Expression)e.Initializer.Accept (this), VariableInitializer.Roles.Expression); + } + newEvent.AddChild (variable, FieldDeclaration.Roles.Variable); + if (e.Declarators != null) { + foreach (var decl in e.Declarators) { + var declLoc = LocationsBag.GetLocations (decl); + if (declLoc != null) + newEvent.AddChild (new CSharpTokenNode (Convert (declLoc[0]), 1), FieldDeclaration.Roles.Comma); + + variable = new VariableInitializer (); + variable.AddChild (new Identifier (decl.Name.Value, Convert (decl.Name.Location)), VariableInitializer.Roles.Identifier); + + if (decl.Initializer != null) { + variable.AddChild (new CSharpTokenNode (Convert (decl.Initializer.Location), 1), FieldDeclaration.Roles.Assign); + variable.AddChild ((Expression)decl.Initializer.Accept (this), VariableInitializer.Roles.Expression); + } + newEvent.AddChild (variable, FieldDeclaration.Roles.Variable); + } + } + if (location != null) newEvent.AddChild (new CSharpTokenNode (Convert (location[1]), ";".Length), EventDeclaration.Roles.Semicolon); @@ -833,19 +994,24 @@ namespace ICSharpCode.NRefactory.CSharp public override void Visit (EventProperty ep) { CustomEventDeclaration newEvent = new CustomEventDeclaration (); - + AddAttributeSection (newEvent, ep); var location = LocationsBag.GetMemberLocation (ep); AddModifiers (newEvent, location); if (location != null) newEvent.AddChild (new CSharpTokenNode (Convert (location[0]), "event".Length), CustomEventDeclaration.Roles.Keyword); newEvent.AddChild (ConvertToType (ep.TypeName), CustomEventDeclaration.Roles.Type); - newEvent.AddChild (new Identifier (ep.MemberName.Name, Convert (ep.MemberName.Location)), CustomEventDeclaration.Roles.Identifier); + if (ep.MemberName.Left != null) + newEvent.AddChild (ConvertToType (ep.MemberName.Left), CustomEventDeclaration.PrivateImplementationTypeRole); + + newEvent.AddChild (new Identifier (ep.MemberName.Name, Convert (ep.Location)), CustomEventDeclaration.Roles.Identifier); + if (location != null && location.Count >= 2) newEvent.AddChild (new CSharpTokenNode (Convert (location[1]), 1), CustomEventDeclaration.Roles.LBrace); if (ep.Add != null) { Accessor addAccessor = new Accessor (); + AddAttributeSection (addAccessor, ep.Add); var addLocation = LocationsBag.GetMemberLocation (ep.Add); AddModifiers (addAccessor, addLocation); addAccessor.AddChild (new CSharpTokenNode (Convert (ep.Add.Location), "add".Length), CustomEventDeclaration.Roles.Keyword); @@ -856,6 +1022,7 @@ namespace ICSharpCode.NRefactory.CSharp if (ep.Remove != null) { Accessor removeAccessor = new Accessor (); + AddAttributeSection (removeAccessor, ep.Remove); var removeLocation = LocationsBag.GetMemberLocation (ep.Remove); AddModifiers (removeAccessor, removeLocation); removeAccessor.AddChild (new CSharpTokenNode (Convert (ep.Remove.Location), "remove".Length), CustomEventDeclaration.Roles.Keyword); @@ -1037,8 +1204,11 @@ namespace ICSharpCode.NRefactory.CSharp return; if (init is StatementList) { foreach (var stmt in ((StatementList)init).Statements) { + Console.WriteLine ("stmt:" + stmt); forStatement.AddChild ((Statement)stmt.Accept (this), role); } + } else if (init is Mono.CSharp.EmptyStatement) { + } else { forStatement.AddChild ((Statement)init.Accept (this), role); } @@ -1335,13 +1505,35 @@ namespace ICSharpCode.NRefactory.CSharp result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), FixedStatement.Roles.LPar); if (fixedStatement.Variables != null) { -// result.AddChild (ConvertToType (fixedStatement.Variables), UsingStatement.Roles.Type); - result.AddChild (new Identifier (fixedStatement.Variables.Variable.Name, Convert (fixedStatement.Variables.Variable.Location)), UsingStatement.Roles.Identifier); - var loc = LocationsBag.GetLocations (fixedStatement.Variables); - if (loc != null) - result.AddChild (new CSharpTokenNode (Convert (loc[1]), 1), ContinueStatement.Roles.Assign); -// if (fixedStatement.Variables.Initializer != null) -// result.AddChild (fixedStatement.Variables.Initializer.Accept (this), UsingStatement.Roles.Variable); + var blockVariableDeclaration = fixedStatement.Variables; + result.AddChild (ConvertToType (blockVariableDeclaration.TypeExpression), FixedStatement.Roles.Type); + var varInit = new VariableInitializer (); + var initLocation = LocationsBag.GetLocations (blockVariableDeclaration); + varInit.AddChild (new Identifier (blockVariableDeclaration.Variable.Name, Convert (blockVariableDeclaration.Variable.Location)), VariableInitializer.Roles.Identifier); + if (blockVariableDeclaration.Initializer != null) { + if (initLocation != null) + varInit.AddChild (new CSharpTokenNode (Convert (location[0]), 1), VariableInitializer.Roles.Assign); + varInit.AddChild ((Expression)blockVariableDeclaration.Initializer.Accept (this), VariableInitializer.Roles.Expression); + } + + result.AddChild (varInit, FixedStatement.Roles.Variable); + + if (blockVariableDeclaration.Declarators != null) { + foreach (var decl in blockVariableDeclaration.Declarators) { + var loc = LocationsBag.GetLocations (decl); + var init = new VariableInitializer (); + if (loc != null && loc.Count > 0) + result.AddChild (new CSharpTokenNode (Convert (loc [0]), 1), VariableInitializer.Roles.Comma); + init.AddChild (new Identifier (decl.Variable.Name, Convert (decl.Variable.Location)), VariableInitializer.Roles.Identifier); + if (decl.Initializer != null) { + if (loc != null && loc.Count > 1) + result.AddChild (new CSharpTokenNode (Convert (loc [1]), 1), VariableInitializer.Roles.Assign); + init.AddChild ((Expression)decl.Initializer.Accept (this), VariableInitializer.Roles.Expression); + } else { + } + result.AddChild (init, FixedStatement.Roles.Variable); + } + } } if (location != null) @@ -1433,7 +1625,7 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ForeachStatement.Roles.LPar); - if (foreachStatement.TypeExpr == null) + if (foreachStatement.TypeExpr != null) result.AddChild (ConvertToType (foreachStatement.TypeExpr), ForeachStatement.Roles.Type); if (foreachStatement.Variable != null) result.AddChild (new Identifier (foreachStatement.Variable.Name, Convert (foreachStatement.Variable.Location)), ForeachStatement.Roles.Identifier); @@ -1495,7 +1687,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object Visit (TypeExpression typeExpression) { - return new IdentifierExpression (keywordTable [(int)typeExpression.Type.BuiltinType], Convert (typeExpression.Location)); + return new TypeReferenceExpression (new PrimitiveType (keywordTable [(int)typeExpression.Type.BuiltinType], Convert (typeExpression.Location))); } public override object Visit (LocalVariableReference localVariableReference) @@ -1505,12 +1697,23 @@ namespace ICSharpCode.NRefactory.CSharp public override object Visit (MemberAccess memberAccess) { - var result = new MemberReferenceExpression (); - if (memberAccess.LeftExpression != null) { - var leftExpr = memberAccess.LeftExpression.Accept (this); - result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression); + Expression result; + Console.WriteLine (memberAccess.LeftExpression + "/" + memberAccess.Name); + if (memberAccess.LeftExpression is Indirection) { + var ind = memberAccess.LeftExpression as Indirection; + result = new PointerReferenceExpression (); + result.AddChild ((Expression)ind.Expr.Accept (this), PointerReferenceExpression.Roles.TargetExpression); + result.AddChild (new CSharpTokenNode (Convert (ind.Location), "->".Length), PointerReferenceExpression.ArrowRole); + } else { + result = new MemberReferenceExpression (); + if (memberAccess.LeftExpression != null) { + var leftExpr = memberAccess.LeftExpression.Accept (this); + result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression); + } } + result.AddChild (new Identifier (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier); + if (memberAccess.TypeArguments != null) { var location = LocationsBag.GetLocations (memberAccess); if (location != null) @@ -1522,8 +1725,19 @@ namespace ICSharpCode.NRefactory.CSharp return result; } + public override object Visit (QualifiedAliasMember qualifiedAliasMember) + { + var result = new MemberType (); + result.Target = new SimpleType (qualifiedAliasMember.alias); + result.IsDoubleColon = true; + result.AddChild (new Identifier (qualifiedAliasMember.Name, Convert (qualifiedAliasMember.Location)), MemberReferenceExpression.Roles.Identifier); + return new TypeReferenceExpression () { Type = result }; + } + public override object Visit (Constant constant) { + if (constant.GetValue () == null) + return new NullReferenceExpression (Convert (constant.Location)); var result = new PrimitiveExpression (constant.GetValue (), Convert (constant.Location), constant.GetValueAsLiteral ().Length); return result; } @@ -1839,7 +2053,8 @@ namespace ICSharpCode.NRefactory.CSharp } if (p.TypeExpression != null) // lambdas may have no types (a, b) => ... parameterDeclarationExpression.AddChild (ConvertToType (p.TypeExpression), ParameterDeclaration.Roles.Type); - parameterDeclarationExpression.AddChild (new Identifier (p.Name, Convert (p.Location)), ParameterDeclaration.Roles.Identifier); + if (p.Name != null) + parameterDeclarationExpression.AddChild (new Identifier (p.Name, Convert (p.Location)), ParameterDeclaration.Roles.Identifier); if (p.HasDefaultValue) { if (location != null) parameterDeclarationExpression.AddChild (new CSharpTokenNode (Convert (location [1]), 1), ParameterDeclaration.Roles.Assign); @@ -1900,28 +2115,32 @@ namespace ICSharpCode.NRefactory.CSharp { if (d == null || d.Constraints == null) return; - for (int i = 0; i < d.Constraints.Count; i++) { - Constraints c = d.Constraints [i]; + for (int i = 0; i < d.PlainConstraints.Count; i++) { + Constraints c = d.PlainConstraints [i]; var location = LocationsBag.GetLocations (c); var constraint = new Constraint (); - constraint.AddChild (new CSharpTokenNode (Convert (location [0]), "where".Length), InvocationExpression.Roles.Keyword); + if (location != null) + constraint.AddChild (new CSharpTokenNode (Convert (location [0]), "where".Length), InvocationExpression.Roles.Keyword); constraint.AddChild (new Identifier (c.TypeParameter.Value, Convert (c.TypeParameter.Location)), InvocationExpression.Roles.Identifier); - constraint.AddChild (new CSharpTokenNode (Convert (location [1]), 1), Constraint.ColonRole); + if (location != null && location.Count > 1) + constraint.AddChild (new CSharpTokenNode (Convert (location [1]), 1), Constraint.ColonRole); foreach (var expr in c.ConstraintExpressions) constraint.AddChild (ConvertToType (expr), Constraint.BaseTypeRole); parent.AddChild (constraint, AstNode.Roles.Constraint); } } - void AddArguments (AstNode parent, object location, Mono.CSharp.Arguments args) + Expression ConvertArgument (Argument arg) { - if (args == null) - return; - - var commaLocations = LocationsBag.GetLocations (args); - - for (int i = 0; i < args.Count; i++) { - Argument arg = args[i]; + if (arg is NamedArgument) { + var na = (NamedArgument)arg; + NamedArgumentExpression newArg = new NamedArgumentExpression(); + newArg.AddChild (new Identifier (na.Name, Convert (na.Location)), NamedArgumentExpression.Roles.Identifier); + + var loc = LocationsBag.GetLocations (na); + if (loc != null) + newArg.AddChild (new CSharpTokenNode (Convert (loc[0]), 1), NamedArgumentExpression.Roles.Assign); + if (arg.ArgType == Argument.AType.Out || arg.ArgType == Argument.AType.Ref) { DirectionExpression direction = new DirectionExpression (); direction.FieldDirection = arg.ArgType == Argument.AType.Out ? FieldDirection.Out : FieldDirection.Ref; @@ -1929,11 +2148,35 @@ namespace ICSharpCode.NRefactory.CSharp if (argLocation != null) direction.AddChild (new CSharpTokenNode (Convert (argLocation[0]), "123".Length), InvocationExpression.Roles.Keyword); direction.AddChild ((Expression)arg.Expr.Accept (this), InvocationExpression.Roles.Expression); - - parent.AddChild (direction, InvocationExpression.Roles.Argument); + newArg.AddChild (direction, NamedArgumentExpression.Roles.Expression); } else { - parent.AddChild ((Expression)arg.Expr.Accept (this), InvocationExpression.Roles.Argument); + newArg.AddChild ((Expression)na.Expr.Accept (this), NamedArgumentExpression.Roles.Expression); } + return newArg; + } + + if (arg.ArgType == Argument.AType.Out || arg.ArgType == Argument.AType.Ref) { + DirectionExpression direction = new DirectionExpression (); + direction.FieldDirection = arg.ArgType == Argument.AType.Out ? FieldDirection.Out : FieldDirection.Ref; + var argLocation = LocationsBag.GetLocations (arg); + if (argLocation != null) + direction.AddChild (new CSharpTokenNode (Convert (argLocation[0]), "123".Length), InvocationExpression.Roles.Keyword); + direction.AddChild ((Expression)arg.Expr.Accept (this), InvocationExpression.Roles.Expression); + return direction; + } + + return (Expression)arg.Expr.Accept (this); + } + + void AddArguments (AstNode parent, object location, Mono.CSharp.Arguments args) + { + if (args == null) + return; + + var commaLocations = LocationsBag.GetLocations (args); + + for (int i = 0; i < args.Count; i++) { + parent.AddChild (ConvertArgument (args[i]), InvocationExpression.Roles.Argument); if (commaLocations != null && i > 0) { int idx = commaLocations.Count - i; if (idx >= 0) @@ -1974,8 +2217,25 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), ObjectCreateExpression.Roles.RPar); - // TODO: Collection initializer ? - + return result; + } + + public override object Visit (NewAnonymousType newAnonymousType) + { + var result = new AnonymousTypeCreateExpression (); + foreach (var par in newAnonymousType.Parameters) { + var location = LocationsBag.GetLocations (par); + + if (location == null) { + result.AddChild ((Expression)par.Expr.Accept (this), AnonymousTypeCreateExpression.Roles.Expression); + } else { + var namedArgument = new NamedArgumentExpression (); + namedArgument.AddChild (new Identifier (par.Name, Convert (par.Location)), AnonymousTypeCreateExpression.Roles.Identifier); + namedArgument.AddChild (new CSharpTokenNode (Convert (location[0]), 1), AnonymousTypeCreateExpression.Roles.Assign); + namedArgument.AddChild ((Expression)par.Expr.Accept (this), AnonymousTypeCreateExpression.Roles.Expression); + result.AddChild (namedArgument, AnonymousTypeCreateExpression.Roles.Expression); + } + } return result; } @@ -2004,8 +2264,6 @@ namespace ICSharpCode.NRefactory.CSharp var result = new ArrayCreateExpression (); var location = LocationsBag.GetLocations (arrayCreationExpression); - result.AddChild (new CSharpTokenNode (Convert (arrayCreationExpression.Location), "new".Length), ArrayCreateExpression.Roles.Keyword); - if (arrayCreationExpression.NewType != null) result.AddChild (ConvertToType (arrayCreationExpression.NewType), ArrayCreateExpression.Roles.Type); if (location != null) @@ -2018,24 +2276,36 @@ namespace ICSharpCode.NRefactory.CSharp result.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i]), 1), ArrayCreateExpression.Roles.Comma); } } + var next = arrayCreationExpression.Rank.Next; + while (next != null) { + ArraySpecifier spec = new ArraySpecifier (next.Dimension); + var loc = LocationsBag.GetLocations (next); + spec.AddChild (new CSharpTokenNode (Convert (next.Location), 1), ArraySpecifier.Roles.LBracket); + if (loc != null) + result.AddChild (new CSharpTokenNode (Convert (loc[0]), 1), ArraySpecifier.Roles.RBracket); + result.AddChild (spec, ArrayCreateExpression.AdditionalArraySpecifierRole); + next = next.Next; + } + if (location != null) result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), ArrayCreateExpression.Roles.RBracket); if (arrayCreationExpression.Initializers != null && arrayCreationExpression.Initializers.Count != 0) { - //throw new NotImplementedException(); - /* TODO: use ArrayInitializerExpression var initLocation = LocationsBag.GetLocations (arrayCreationExpression.Initializers); - result.AddChild (new CSharpTokenNode (Convert (arrayCreationExpression.Initializers.Location), 1), ArrayCreateExpression.Roles.LBrace); + ArrayInitializerExpression initializer = new ArrayInitializerExpression(); + + initializer.AddChild (new CSharpTokenNode (Convert (arrayCreationExpression.Initializers.Location), 1), ArrayCreateExpression.Roles.LBrace); var commaLocations = LocationsBag.GetLocations (arrayCreationExpression.Initializers.Elements); for (int i = 0; i < arrayCreationExpression.Initializers.Count; i++) { - result.AddChild ((AstNode)arrayCreationExpression.Initializers[i].Accept (this), ObjectCreateExpression.Roles.Variable); + initializer.AddChild ((Expression)arrayCreationExpression.Initializers[i].Accept (this), ArrayInitializerExpression.Roles.Expression); if (commaLocations != null && i > 0) { - result.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i]), 1), IndexerExpression.Roles.Comma); + initializer.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i]), 1), IndexerExpression.Roles.Comma); } } if (initLocation != null) - result.AddChild (new CSharpTokenNode (Convert (initLocation[initLocation.Count - 1]), 1), ArrayCreateExpression.Roles.RBrace); */ + initializer.AddChild (new CSharpTokenNode (Convert (initLocation[initLocation.Count - 1]), 1), ArrayCreateExpression.Roles.RBrace); + result.AddChild (initializer, ArrayCreateExpression.InitializerRole); } return result; @@ -2050,26 +2320,79 @@ namespace ICSharpCode.NRefactory.CSharp public override object Visit (ArglistAccess argListAccessExpression) { - var result = new ArgListExpression (); - result.IsAccess = true; - result.AddChild (new CSharpTokenNode (Convert (argListAccessExpression.Location), "__arglist".Length), ArgListExpression.Roles.Keyword); + var result = new UndocumentedExpression () { + UndocumentedExpressionType = UndocumentedExpressionType.ArgListAccess + }; + result.AddChild (new CSharpTokenNode (Convert (argListAccessExpression.Location), "__arglist".Length), UndocumentedExpression.Roles.Keyword); return result; } + #region Undocumented expressions public override object Visit (Arglist argListExpression) { - var result = new ArgListExpression (); - result.AddChild (new CSharpTokenNode (Convert (argListExpression.Location), "__arglist".Length), ArgListExpression.Roles.Keyword); + var result = new UndocumentedExpression () { UndocumentedExpressionType = UndocumentedExpressionType.ArgListAccess }; + result.AddChild (new CSharpTokenNode (Convert (argListExpression.Location), "__arglist".Length), UndocumentedExpression.Roles.Keyword); var location = LocationsBag.GetLocations (argListExpression); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ArgListExpression.Roles.LPar); + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), UndocumentedExpression.Roles.LPar); AddArguments (result, location, argListExpression.Arguments); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), ArgListExpression.Roles.RPar); + result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), UndocumentedExpression.Roles.RPar); + return result; + } + + public override object Visit (MakeRefExpr makeRefExpr) + { + var result = new UndocumentedExpression () { UndocumentedExpressionType = UndocumentedExpressionType.RefValue }; + result.AddChild (new CSharpTokenNode (Convert (makeRefExpr.Location), "__makeref".Length), UndocumentedExpression.Roles.Keyword); + var location = LocationsBag.GetLocations (makeRefExpr); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), UndocumentedExpression.Roles.LPar); + if (makeRefExpr.Expr != null) + result.AddChild ((Expression)makeRefExpr.Expr.Accept (this), UndocumentedExpression.Roles.Argument); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), UndocumentedExpression.Roles.RPar); + return result; + } + + public override object Visit (RefTypeExpr refTypeExpr) + { + var result = new UndocumentedExpression () { UndocumentedExpressionType = UndocumentedExpressionType.RefValue }; + result.AddChild (new CSharpTokenNode (Convert (refTypeExpr.Location), "__reftype".Length), UndocumentedExpression.Roles.Keyword); + var location = LocationsBag.GetLocations (refTypeExpr); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), UndocumentedExpression.Roles.LPar); + + if (refTypeExpr.Expr != null) + result.AddChild ((Expression)refTypeExpr.Expr.Accept (this), UndocumentedExpression.Roles.Argument); + + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), UndocumentedExpression.Roles.RPar); + return result; + } + + public override object Visit (RefValueExpr refValueExpr) + { + var result = new UndocumentedExpression () { UndocumentedExpressionType = UndocumentedExpressionType.RefValue }; + result.AddChild (new CSharpTokenNode (Convert (refValueExpr.Location), "__refvalue".Length), UndocumentedExpression.Roles.Keyword); + var location = LocationsBag.GetLocations (refValueExpr); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), UndocumentedExpression.Roles.LPar); + + + if (refValueExpr.Expr != null) + result.AddChild ((Expression)refValueExpr.Expr.Accept (this), UndocumentedExpression.Roles.Argument); + + if (refValueExpr.FullNamedExpression != null) + result.AddChild ((Expression)refValueExpr.FullNamedExpression.Accept (this), UndocumentedExpression.Roles.Argument); + + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), UndocumentedExpression.Roles.RPar); return result; } + #endregion public override object Visit (TypeOf typeOfExpression) { @@ -2165,7 +2488,6 @@ namespace ICSharpCode.NRefactory.CSharp if (simpleAssign.Target != null) result.AddChild ((Expression)simpleAssign.Target.Accept (this), AssignmentExpression.LeftRole); result.AddChild (new CSharpTokenNode (Convert (simpleAssign.Location), 1), AssignmentExpression.OperatorRole); - if (simpleAssign.Source != null) { result.AddChild ((Expression)simpleAssign.Source.Accept (this), AssignmentExpression.RightRole); } @@ -2222,17 +2544,16 @@ namespace ICSharpCode.NRefactory.CSharp var result = new AnonymousMethodExpression (); var location = LocationsBag.GetLocations (anonymousMethodExpression); if (location != null) { - result.AddChild (new CSharpTokenNode (Convert (location[0]), "delegate".Length), AssignmentExpression.Roles.Keyword); + result.AddChild (new CSharpTokenNode (Convert (location[0]), "delegate".Length), AnonymousMethodExpression.Roles.Keyword); if (location.Count > 1) { result.HasParameterList = true; - result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AssignmentExpression.Roles.LPar); + result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AnonymousMethodExpression.Roles.LPar); AddParameter (result, anonymousMethodExpression.Parameters); - result.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AssignmentExpression.Roles.RPar); + result.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AnonymousMethodExpression.Roles.RPar); } } - - result.AddChild ((BlockStatement)anonymousMethodExpression.Block.Accept (this), AssignmentExpression.Roles.Body); + result.AddChild ((BlockStatement)anonymousMethodExpression.Block.Accept (this), AnonymousMethodExpression.Roles.Body); return result; } @@ -2291,47 +2612,75 @@ namespace ICSharpCode.NRefactory.CSharp #endregion #region LINQ expressions -/* public override object Visit (Mono.CSharp.Linq.Query queryExpression) + public override object Visit (Mono.CSharp.Linq.QueryExpression queryExpression) { - var result = new QueryFromClause (); - var location = LocationsBag.GetLocations (queryExpression); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "from".Length), QueryFromClause.FromKeywordRole); - // TODO: select identifier - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[1]), "in".Length), QueryFromClause.InKeywordRole); - var query = queryExpression.Expr as Mono.CSharp.Linq.AQueryClause; -// if (query != null && query.Expr != null) -// result.AddChild ((AstNode)query.Expr.Accept (this), QueryFromClause.Roles.Expression); + var result = new QueryExpression (); + + var currentClause = queryExpression.next; + + while (currentClause != null) { + Console.WriteLine (currentClause); + QueryClause clause = (QueryClause)currentClause.Accept (this); + if (clause is QueryContinuationClause) { + // insert preceding query at beginning of QueryContinuationClause + clause.InsertChildAfter(null, result, QueryContinuationClause.PrecedingQueryRole); + // create a new QueryExpression for the remaining query + result = new QueryExpression(); + } + result.AddChild (clause, QueryExpression.ClauseRole); + currentClause = currentClause.next; + } + return result; - } */ + } - public override object Visit (Mono.CSharp.Linq.SelectMany selectMany) + public override object Visit (Mono.CSharp.Linq.QueryStartClause queryStart) { - var result = new QueryFromClause (); - // TODO: -// Mono.CSharp.Linq.Cast cast = selectMany.Expr as Mono.CSharp.Linq.Cast; - var location = LocationsBag.GetLocations (selectMany); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "from".Length), QueryFromClause.FromKeywordRole); + if (queryStart.Expr == null) { + var intoClause = new QueryContinuationClause (); + intoClause.AddChild (new CSharpTokenNode (Convert (queryStart.Location), "into".Length), QueryContinuationClause.IntoKeywordRole); + intoClause.AddChild (new Identifier (queryStart.IntoVariable.Name, Convert(queryStart.IntoVariable.Location)), QueryContinuationClause.Roles.Identifier); + return intoClause; + } - // result.AddChild ((AstNode)cast.TypeExpr.Accept (this), QueryFromClause.Roles.ReturnType); -// if (cast != null) + var fromClause = new QueryFromClause (); + var location = LocationsBag.GetLocations (queryStart); -// result.AddChild (new Identifier (selectMany.SelectIdentifier.Value, Convert (selectMany.SelectIdentifier.Location)), QueryFromClause.Roles.Identifier); - // result.AddChild (new CSharpTokenNode (Convert (location[1]), "in".Length), QueryFromClause.InKeywordRole); + fromClause.AddChild (new CSharpTokenNode (Convert (queryStart.Location), "from".Length), QueryFromClause.FromKeywordRole); - // result.AddChild ((AstNode)(cast != null ? cast.Expr : selectMany.Expr).Accept (this), QueryFromClause.Roles.Expression); + if (queryStart.IdentifierType != null) + fromClause.AddChild (ConvertToType (queryStart.IdentifierType), QueryFromClause.Roles.Type); + fromClause.AddChild (new Identifier (queryStart.IntoVariable.Name, Convert(queryStart.IntoVariable.Location)), QueryFromClause.Roles.Identifier); - return result; + if (location != null) + fromClause.AddChild (new CSharpTokenNode (Convert (location[0]), "in".Length), QueryFromClause.InKeywordRole); + fromClause.AddChild ((Expression)queryStart.Expr.Accept (this), QueryFromClause.Roles.Expression); + return fromClause; + } + + public override object Visit (Mono.CSharp.Linq.SelectMany queryStart) + { + var fromClause = new QueryFromClause (); + var location = LocationsBag.GetLocations (queryStart); + + fromClause.AddChild (new CSharpTokenNode (Convert (queryStart.Location), "from".Length), QueryFromClause.FromKeywordRole); + + if (queryStart.IdentifierType != null) + fromClause.AddChild (ConvertToType (queryStart.IdentifierType), QueryFromClause.Roles.Type); + + fromClause.AddChild (new Identifier (queryStart.IntoVariable.Name, Convert(queryStart.IntoVariable.Location)), QueryFromClause.Roles.Identifier); + + if (location != null) + fromClause.AddChild (new CSharpTokenNode (Convert (location[0]), "in".Length), QueryFromClause.InKeywordRole); + fromClause.AddChild ((Expression)queryStart.Expr.Accept (this), QueryFromClause.Roles.Expression); + return fromClause; } public override object Visit (Mono.CSharp.Linq.Select sel) { var result = new QuerySelectClause (); - var location = LocationsBag.GetLocations (sel); - result.AddChild (new CSharpTokenNode (Convert (location[0]), "select".Length), QueryWhereClause.Roles.Keyword); + result.AddChild (new CSharpTokenNode (Convert (sel.Location), "select".Length), QueryWhereClause.Roles.Keyword); result.AddChild ((Expression)sel.Expr.Accept (this), QueryWhereClause.Roles.Expression); return result; } @@ -2340,12 +2689,11 @@ namespace ICSharpCode.NRefactory.CSharp { var result = new QueryGroupClause (); var location = LocationsBag.GetLocations (groupBy); + result.AddChild (new CSharpTokenNode (Convert (groupBy.Location), "group".Length), QueryGroupClause.GroupKeywordRole); + result.AddChild ((Expression)groupBy.ElementSelector.Accept (this), QueryGroupClause.KeyRole); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "group".Length), QueryGroupClause.GroupKeywordRole); -// result.AddChild ((AstNode)groupBy.ElementSelector.Accept (this), QueryGroupClause.GroupByExpressionRole); -// if (location != null) -// result.AddChild (new CSharpTokenNode (Convert (location[1]), "by".Length), QueryGroupClause.ByKeywordRole); -// result.AddChild ((AstNode)groupBy.Expr.Accept (this), QueryGroupClause.ProjectionExpressionRole); + result.AddChild (new CSharpTokenNode (Convert (location[0]), "by".Length), QueryGroupClause.ByKeywordRole); + result.AddChild ((Expression)groupBy.Expr.Accept (this), QueryGroupClause.ProjectionRole); return result; } @@ -2354,17 +2702,11 @@ namespace ICSharpCode.NRefactory.CSharp var result = new QueryLetClause (); var location = LocationsBag.GetLocations (l); + result.AddChild (new CSharpTokenNode (Convert (l.Location), "let".Length), QueryLetClause.Roles.Keyword); + result.AddChild (new Identifier (l.IntoVariable.Name, Convert (l.IntoVariable.Location)), Identifier.Roles.Identifier); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "let".Length), QueryWhereClause.Roles.Keyword); - - NewAnonymousType aType = l.Expr as NewAnonymousType; - AnonymousTypeParameter param = ((AnonymousTypeParameter)aType.Parameters[1]); - result.AddChild (new Identifier (param.Name, Convert (param.Location)), Identifier.Roles.Identifier); - - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), QueryWhereClause.Roles.Assign); - - result.AddChild ((Expression)param.Expr.Accept (this), QueryWhereClause.Roles.Condition); + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), QueryLetClause.Roles.Assign); + result.AddChild ((Expression)l.Expr.Accept (this), QueryLetClause.Roles.Expression); return result; } @@ -2381,98 +2723,117 @@ namespace ICSharpCode.NRefactory.CSharp public override object Visit (Mono.CSharp.Linq.Join join) { var result = new QueryJoinClause (); - /* var location = LocationsBag.GetLocations (join); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "join".Length), QueryJoinClause.JoinKeywordRole); + var location = LocationsBag.GetLocations (join); + result.AddChild (new CSharpTokenNode (Convert (join.Location), "join".Length), QueryJoinClause.JoinKeywordRole); result.AddChild (new Identifier (join.JoinVariable.Name, Convert (join.JoinVariable.Location)), Identifier.Roles.Identifier); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[1]), "in".Length), QueryJoinClause.InKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[0]), "in".Length), QueryJoinClause.InKeywordRole); - result.AddChild ((AstNode)join.Expr.Accept (this), QueryJoinClause.Roles.Expression); + result.AddChild ((Expression)join.Expr.Accept (this), QueryJoinClause.Roles.Expression); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[2]), "on".Length), QueryJoinClause.OnKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[1]), "on".Length), QueryJoinClause.OnKeywordRole); // TODO: on expression if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[3]), "equals".Length), QueryJoinClause.EqualsKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[2]), "equals".Length), QueryJoinClause.EqualsKeywordRole); // TODO: equals expression - */ + return result; } - public override object Visit (Mono.CSharp.Linq.GroupJoin groupJoin) + public override object Visit (Mono.CSharp.Linq.GroupJoin join) { var result = new QueryJoinClause (); -/* var location = LocationsBag.GetLocations (groupJoin); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "join".Length), QueryJoinClause.JoinKeywordRole); + var location = LocationsBag.GetLocations (join); + result.AddChild (new CSharpTokenNode (Convert (join.Location), "join".Length), QueryJoinClause.JoinKeywordRole); - result.AddChild (new Identifier (groupJoin.JoinVariable.Name, Convert (groupJoin.JoinVariable.Location)), Identifier.Roles.Identifier); + result.AddChild (new Identifier (join.JoinVariable.Name, Convert (join.JoinVariable.Location)), Identifier.Roles.Identifier); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[1]), "in".Length), QueryJoinClause.InKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[0]), "in".Length), QueryJoinClause.InKeywordRole); - result.AddChild ((AstNode)groupJoin.Expr.Accept (this), QueryJoinClause.Roles.Expression); + result.AddChild ((Expression)join.Expr.Accept (this), QueryJoinClause.Roles.Expression); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[2]), "on".Length), QueryJoinClause.OnKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[1]), "on".Length), QueryJoinClause.OnKeywordRole); + // TODO: on expression if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[3]), "equals".Length), QueryJoinClause.EqualsKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[2]), "equals".Length), QueryJoinClause.EqualsKeywordRole); // TODO: equals expression if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[4]), "into".Length), QueryJoinClause.IntoKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[3]), "into".Length), QueryJoinClause.IntoKeywordRole); - result.AddChild (new Identifier (groupJoin.JoinVariable.Name, Convert (groupJoin.JoinVariable.Location)), Identifier.Roles.Identifier);*/ + result.AddChild (new Identifier (join.JoinVariable.Name, Convert (join.JoinVariable.Location)), Identifier.Roles.Identifier); return result; } public override object Visit (Mono.CSharp.Linq.OrderByAscending orderByAscending) { var result = new QueryOrderClause (); - /* result.OrderAscending = true; - result.AddChild ((AstNode)orderByAscending.Expr.Accept (this), QueryWhereClause.Roles.Expression); + + var ordering = new QueryOrdering (); + + ordering.AddChild ((Expression)orderByAscending.Expr.Accept (this), QueryWhereClause.Roles.Expression); var location = LocationsBag.GetLocations (orderByAscending); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "ascending".Length), QueryWhereClause.Roles.Keyword);*/ + if (location != null) { + ordering.Direction = QueryOrderingDirection.Ascending; + ordering.AddChild (new CSharpTokenNode (Convert (location[0]), "ascending".Length), QueryWhereClause.Roles.Keyword); + } + result.AddChild (ordering, QueryOrderClause.OrderingRole); return result; } public override object Visit (Mono.CSharp.Linq.OrderByDescending orderByDescending) { var result = new QueryOrderClause (); - /* result.OrderAscending = false; - result.AddChild ((AstNode)orderByDescending.Expr.Accept (this), QueryWhereClause.Roles.Expression); + + var ordering = new QueryOrdering (); + + ordering.AddChild ((Expression)orderByDescending.Expr.Accept (this), QueryWhereClause.Roles.Expression); var location = LocationsBag.GetLocations (orderByDescending); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "descending".Length), QueryWhereClause.Roles.Keyword);*/ + if (location != null) { + ordering.Direction = QueryOrderingDirection.Descending; + ordering.AddChild (new CSharpTokenNode (Convert (location[0]), "ascending".Length), QueryWhereClause.Roles.Keyword); + } + result.AddChild (ordering, QueryOrderClause.OrderingRole); return result; - } + } public override object Visit (Mono.CSharp.Linq.ThenByAscending thenByAscending) { var result = new QueryOrderClause (); - /* result.OrderAscending = true; - result.AddChild ((AstNode)thenByAscending.Expr.Accept (this), QueryWhereClause.Roles.Expression); + + var ordering = new QueryOrdering (); + + ordering.AddChild ((Expression)thenByAscending.Expr.Accept (this), QueryWhereClause.Roles.Expression); var location = LocationsBag.GetLocations (thenByAscending); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "ascending".Length), QueryWhereClause.Roles.Keyword);*/ + if (location != null) { + ordering.Direction = QueryOrderingDirection.Ascending; + ordering.AddChild (new CSharpTokenNode (Convert (location[0]), "ascending".Length), QueryWhereClause.Roles.Keyword); + } + result.AddChild (ordering, QueryOrderClause.OrderingRole); return result; } public override object Visit (Mono.CSharp.Linq.ThenByDescending thenByDescending) { var result = new QueryOrderClause (); -/* result.OrderAscending = false; - result.AddChild ((AstNode)thenByDescending.Expr.Accept (this), QueryWhereClause.Roles.Expression); + + var ordering = new QueryOrdering (); + + ordering.AddChild ((Expression)thenByDescending.Expr.Accept (this), QueryWhereClause.Roles.Expression); var location = LocationsBag.GetLocations (thenByDescending); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "descending".Length), QueryWhereClause.Roles.Keyword);*/ + if (location != null) { + ordering.Direction = QueryOrderingDirection.Descending; + ordering.AddChild (new CSharpTokenNode (Convert (location[0]), "ascending".Length), QueryWhereClause.Roles.Keyword); + } + result.AddChild (ordering, QueryOrderClause.OrderingRole); return result; } #endregion @@ -2532,6 +2893,7 @@ namespace ICSharpCode.NRefactory.CSharp public override void Print (AbstractMessage msg) { + Console.WriteLine (msg.MessageType + " (" + msg.Location + ")" + ": "+ msg.Text); base.Print (msg); // Error newError = new Error (msg.IsWarning ? ErrorType.Warning : ErrorType.Error, msg.Location.Row, msg.Location.Column, msg.Text); // Errors.Add (newError); @@ -2575,8 +2937,7 @@ namespace ICSharpCode.NRefactory.CSharp public CompilationUnit Parse (Stream stream) { lock (CompilerCallableEntryPoint.parseLock) { - CompilerCompilationUnit top = CompilerCallableEntryPoint.ParseFile (new string[] { "-v", "-unsafe"}, stream, "parsed.cs", Console.Out); - + CompilerCompilationUnit top = CompilerCallableEntryPoint.ParseFile (new string[] { "-v", "-unsafe"}, stream, "parsed.cs", errorReportPrinter); if (top == null) return null; CSharpParser.ConversionVisitor conversionVisitor = new ConversionVisitor (top.LocationsBag); @@ -2588,7 +2949,7 @@ namespace ICSharpCode.NRefactory.CSharp public IEnumerable ParseTypeMembers(TextReader reader) { - string code = "class MyClass { " + reader.ReadToEnd() + "}"; + string code = "unsafe partial class MyClass { " + reader.ReadToEnd() + "}"; var cu = Parse(new StringReader(code)); var td = cu.Children.FirstOrDefault() as TypeDeclaration; if (td != null) @@ -2608,8 +2969,13 @@ namespace ICSharpCode.NRefactory.CSharp public AstType ParseTypeReference(TextReader reader) { - // TODO: add support for parsing type references - throw new NotImplementedException(); + string code = reader.ReadToEnd() + " a;"; + var members = ParseTypeMembers(new StringReader(code)); + var field = members.FirstOrDefault() as FieldDeclaration; + Console.WriteLine ("field : " +field.ReturnType); + if (field != null) + return field.ReturnType; + return AstType.Null; } public AstNode ParseExpression(TextReader reader) diff --git a/ICSharpCode.NRefactory/CSharp/Parser/TypeSystemConvertVisitor.cs b/ICSharpCode.NRefactory/CSharp/Parser/TypeSystemConvertVisitor.cs index 6fac5b0da..b3dfd30b5 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/TypeSystemConvertVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/TypeSystemConvertVisitor.cs @@ -308,8 +308,8 @@ namespace ICSharpCode.NRefactory.CSharp ConvertTypeParameters(m.TypeParameters, methodDeclaration.TypeParameters, methodDeclaration.Constraints); m.ReturnType = ConvertType(methodDeclaration.ReturnType); - ConvertAttributes(m.Attributes, methodDeclaration.Attributes.Where(s => s.AttributeTarget != AttributeTarget.Return)); - ConvertAttributes(m.ReturnTypeAttributes, methodDeclaration.Attributes.Where(s => s.AttributeTarget == AttributeTarget.Return)); + ConvertAttributes(m.Attributes, methodDeclaration.Attributes.Where(s => s.AttributeTarget != "return")); + ConvertAttributes(m.ReturnTypeAttributes, methodDeclaration.Attributes.Where(s => s.AttributeTarget == "return")); ApplyModifiers(m, methodDeclaration.Modifiers); m.IsExtensionMethod = methodDeclaration.IsExtensionMethod; @@ -346,8 +346,8 @@ namespace ICSharpCode.NRefactory.CSharp m.BodyRegion = MakeRegion(operatorDeclaration.Body); m.ReturnType = ConvertType(operatorDeclaration.ReturnType); - ConvertAttributes(m.Attributes, operatorDeclaration.Attributes.Where(s => s.AttributeTarget != AttributeTarget.Return)); - ConvertAttributes(m.ReturnTypeAttributes, operatorDeclaration.Attributes.Where(s => s.AttributeTarget == AttributeTarget.Return)); + ConvertAttributes(m.Attributes, operatorDeclaration.Attributes.Where(s => s.AttributeTarget != "return")); + ConvertAttributes(m.ReturnTypeAttributes, operatorDeclaration.Attributes.Where(s => s.AttributeTarget == "return")); ApplyModifiers(m, operatorDeclaration.Modifiers); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/anonymous.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/anonymous.cs index c92e95a13..71503b8da 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/anonymous.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/anonymous.cs @@ -591,7 +591,7 @@ namespace Mono.CSharp { protected override Expression DoResolve (ResolveContext ec) { eclass = ExprClass.Value; - type = ec.Module.PredefinedTypes.Expression.Resolve (Location); + type = ec.Module.PredefinedTypes.Expression.Resolve (); return this; } @@ -1662,15 +1662,6 @@ namespace Mono.CSharp { // public class AnonymousTypeClass : CompilerGeneratedClass { - // TODO: Merge with AnonymousTypeParameter - public class GeneratedParameter : Parameter - { - public GeneratedParameter (FullNamedExpression type, AnonymousTypeParameter p) - : base (type, p.Name, Modifier.NONE, null, p.Location) - { - } - } - static int types_counter; public const string ClassNamePrefix = "<>__AnonType"; public const string SignatureForError = "anonymous type"; @@ -1701,10 +1692,21 @@ namespace Mono.CSharp { Parameter[] ctor_params = new Parameter[parameters.Count]; for (int i = 0; i < parameters.Count; ++i) { AnonymousTypeParameter p = parameters[i]; + for (int ii = 0; ii < i; ++ii) { + if (parameters[ii].Name == p.Name) { + parent.Compiler.Report.Error (833, parameters[ii].Location, + "`{0}': An anonymous type cannot have multiple properties with the same name", + p.Name); + + p = new AnonymousTypeParameter (null, "$" + i.ToString (), p.Location); + parameters[i] = p; + break; + } + } t_args[i] = new SimpleName ("<" + p.Name + ">__T", p.Location); t_params[i] = new TypeParameterName (t_args[i].Name, null, p.Location); - ctor_params[i] = new GeneratedParameter (t_args[i], p); + ctor_params[i] = new Parameter (t_args[i], p.Name, Parameter.Modifier.NONE, null, p.Location); } all_parameters = new ParametersCompiled (ctor_params); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/assembly.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/assembly.cs index 704f5c1f9..153934000 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/assembly.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/assembly.cs @@ -376,6 +376,12 @@ namespace Mono.CSharp a.FullName); } + var ci = a.Assembly.GetName ().CultureInfo; + if (!ci.Equals (System.Globalization.CultureInfo.InvariantCulture)) { + Report.Warning (1607, 1, "Referenced assembly `{0}' has different culture setting of `{1}'", + a.Name, ci.Name); + } + if (!a.IsFriendAssemblyTo (this)) continue; @@ -866,26 +872,24 @@ namespace Mono.CSharp } if (entry_point == null) { - if (Compiler.Settings.MainClass != null) { - // TODO: Should use MemberCache - DeclSpace main_cont = module.GetDefinition (Compiler.Settings.MainClass) as DeclSpace; - if (main_cont == null) { - Report.Error (1555, "Could not find `{0}' specified for Main method", Compiler.Settings.MainClass); + string main_class = Compiler.Settings.MainClass; + if (main_class != null) { + // TODO: Handle dotted names + var texpr = module.GlobalRootNamespace.LookupType (module, main_class, 0, Location.Null); + if (texpr == null) { + Report.Error (1555, "Could not find `{0}' specified for Main method", main_class); return; } - if (!(main_cont is ClassOrStruct)) { - Report.Error (1556, "`{0}' specified for Main method must be a valid class or struct", Compiler.Settings.MainClass); + var mtype = texpr.Type.MemberDefinition as ClassOrStruct; + if (mtype == null) { + Report.Error (1556, "`{0}' specified for Main method must be a valid class or struct", main_class); return; } - Report.Error (1558, main_cont.Location, "`{0}' does not have a suitable static Main method", main_cont.GetSignatureForError ()); - return; - } - - if (Report.Errors == 0) { + Report.Error (1558, mtype.Location, "`{0}' does not have a suitable static Main method", mtype.GetSignatureForError ()); + } else { string pname = file_name == null ? name : Path.GetFileName (file_name); - Report.Error (5001, "Program `{0}' does not contain a static `Main' method suitable for an entry point", pname); } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/attribute.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/attribute.cs index c994e2141..f3ec19485 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/attribute.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/attribute.cs @@ -165,7 +165,7 @@ namespace Mono.CSharp { } // When re-attaching global attributes - if (context is NamespaceEntry) { + if (context is NamespaceContainer) { this.targets[0] = target; this.context = context; return; @@ -245,20 +245,13 @@ namespace Mono.CSharp { } } - TypeSpec ResolvePossibleAttributeType (ATypeNameExpression expr, ref bool is_attr) + TypeSpec ResolvePossibleAttributeType (ATypeNameExpression expr) { - TypeExpr te = expr.ResolveAsTypeTerminal (context, false); + TypeExpr te = expr.ResolveAsType (context); if (te == null) return null; - TypeSpec t = te.Type; - if (t.IsAttribute) { - is_attr = true; - } else { - Report.SymbolRelatedToPreviousError (t); - Report.Error (616, Location, "`{0}': is not an attribute class", TypeManager.CSharpName (t)); - } - return t; + return te.Type; } /// @@ -274,8 +267,15 @@ namespace Mono.CSharp { TypeSpec t1, t2; ATypeNameExpression expanded = null; + // TODO: Additional warnings such as CS0436 are swallowed because we don't + // print on success + try { - t1 = ResolvePossibleAttributeType (expression, ref t1_is_attr); + t1 = ResolvePossibleAttributeType (expression); + if (t1 != null) + t1_is_attr = t1.IsAttribute; + + resolve_printer.EndSession (); if (nameEscaped) { t2 = null; @@ -283,15 +283,15 @@ namespace Mono.CSharp { expanded = (ATypeNameExpression) expression.Clone (null); expanded.Name += "Attribute"; - t2 = ResolvePossibleAttributeType (expanded, ref t2_is_attr); + t2 = ResolvePossibleAttributeType (expanded); + if (t2 != null) + t2_is_attr = t2.IsAttribute; } - - resolve_printer.EndSession (); } finally { context.Module.Compiler.Report.SetPrinter (prev_recorder); } - if (t1_is_attr && t2_is_attr) { + if (t1_is_attr && t2_is_attr && t1 != t2) { Report.Error (1614, Location, "`{0}' is ambiguous between `{1}' and `{2}'. Use either `@{0}' or `{0}Attribute'", GetSignatureForError (), expression.GetSignatureForError (), expanded.GetSignatureForError ()); resolve_error = true; @@ -308,8 +308,23 @@ namespace Mono.CSharp { return; } - resolve_printer.Merge (prev_recorder); resolve_error = true; + + if (t1 != null) { + resolve_printer.Merge (prev_recorder); + + Report.SymbolRelatedToPreviousError (t1); + Report.Error (616, Location, "`{0}': is not an attribute class", t1.GetSignatureForError ()); + return; + } + + if (t2 != null) { + Report.SymbolRelatedToPreviousError (t2); + Report.Error (616, Location, "`{0}': is not an attribute class", t2.GetSignatureForError ()); + return; + } + + resolve_printer.Merge (prev_recorder); } public TypeSpec ResolveType () @@ -431,7 +446,7 @@ namespace Mono.CSharp { // Add [module: DefaultCharSet] to all DllImport import attributes // var module = context.Module; - if (Type == module.PredefinedAttributes.DllImport && module.HasDefaultCharSet) { + if ((Type == module.PredefinedAttributes.DllImport || Type == module.PredefinedAttributes.UnmanagedFunctionPointer) && module.HasDefaultCharSet) { if (rc == null) rc = CreateResolveContext (); @@ -1146,7 +1161,7 @@ namespace Mono.CSharp { return true; } - public void ConvertGlobalAttributes (TypeContainer member, NamespaceEntry currentNamespace, bool isGlobal) + public void ConvertGlobalAttributes (TypeContainer member, NamespaceContainer currentNamespace, bool isGlobal) { var member_explicit_targets = member.ValidAttributeTargets; for (int i = 0; i < Attrs.Count; ++i) { @@ -1621,8 +1636,6 @@ namespace Mono.CSharp { public readonly PredefinedAttribute DefaultParameterValue; public readonly PredefinedAttribute OptionalParameter; public readonly PredefinedAttribute UnverifiableCode; - - // New in .NET 2.0 public readonly PredefinedAttribute DefaultCharset; public readonly PredefinedAttribute TypeForwarder; public readonly PredefinedAttribute FixedBuffer; @@ -1631,6 +1644,7 @@ namespace Mono.CSharp { public readonly PredefinedAttribute RuntimeCompatibility; public readonly PredefinedAttribute DebuggerHidden; public readonly PredefinedAttribute UnsafeValueType; + public readonly PredefinedAttribute UnmanagedFunctionPointer; // New in .NET 3.5 public readonly PredefinedAttribute Extension; @@ -1650,8 +1664,8 @@ namespace Mono.CSharp { { ParamArray = new PredefinedAttribute (module, "System", "ParamArrayAttribute"); Out = new PredefinedAttribute (module, "System.Runtime.InteropServices", "OutAttribute"); - ParamArray.Resolve (Location.Null); - Out.Resolve (Location.Null); + ParamArray.Resolve (); + Out.Resolve (); Obsolete = new PredefinedAttribute (module, "System", "ObsoleteAttribute"); DllImport = new PredefinedAttribute (module, "System.Runtime.InteropServices", "DllImportAttribute"); @@ -1684,6 +1698,7 @@ namespace Mono.CSharp { RuntimeCompatibility = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "RuntimeCompatibilityAttribute"); DebuggerHidden = new PredefinedAttribute (module, "System.Diagnostics", "DebuggerHiddenAttribute"); UnsafeValueType = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "UnsafeValueTypeAttribute"); + UnmanagedFunctionPointer = new PredefinedAttribute (module, "System.Runtime.InteropServices", "UnmanagedFunctionPointerAttribute"); Extension = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "ExtensionAttribute"); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cfold.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cfold.cs index ada59bc66..31297fa0c 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cfold.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cfold.cs @@ -467,7 +467,7 @@ namespace Mono.CSharp { } if (left is NullLiteral && right is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -563,7 +563,7 @@ namespace Mono.CSharp { case Binary.Operator.Multiply: if (left is NullLiteral && right is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -658,7 +658,7 @@ namespace Mono.CSharp { case Binary.Operator.Division: if (left is NullLiteral && right is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -757,7 +757,7 @@ namespace Mono.CSharp { case Binary.Operator.Modulus: if (left is NullLiteral && right is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -846,7 +846,7 @@ namespace Mono.CSharp { // case Binary.Operator.LeftShift: if (left is NullLiteral && right is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -882,7 +882,7 @@ namespace Mono.CSharp { // case Binary.Operator.RightShift: if (left is NullLiteral && right is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -1003,7 +1003,7 @@ namespace Mono.CSharp { case Binary.Operator.LessThan: if (right is NullLiteral) { if (left is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -1042,7 +1042,7 @@ namespace Mono.CSharp { case Binary.Operator.GreaterThan: if (right is NullLiteral) { if (left is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -1081,7 +1081,7 @@ namespace Mono.CSharp { case Binary.Operator.GreaterThanOrEqual: if (right is NullLiteral) { if (left is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } @@ -1120,7 +1120,7 @@ namespace Mono.CSharp { case Binary.Operator.LessThanOrEqual: if (right is NullLiteral) { if (left is NullLiteral) { - var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsTypeTerminal (ec, false); + var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc).ResolveAsType (ec); return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right, loc).Resolve (ec); } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/class.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/class.cs index 969fe84b2..446d88c5c 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/class.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/class.cs @@ -32,12 +32,19 @@ using System.Reflection; using System.Reflection.Emit; #endif -namespace Mono.CSharp { +namespace Mono.CSharp +{ + + public interface ITypesContainer + { + Location Location { get; } + MemberName MemberName { get; } + } /// /// This is the base class for structs and classes. /// - public abstract class TypeContainer : DeclSpace, ITypeDefinition + public abstract class TypeContainer : DeclSpace, ITypeDefinition, ITypesContainer { // // Different context is needed when resolving type container base @@ -96,7 +103,7 @@ namespace Mono.CSharp { return tc.GetSignatureForError (); } - public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope) + public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) { return null; } @@ -232,7 +239,7 @@ namespace Mono.CSharp { /// PendingImplementation pending; - public TypeContainer (NamespaceEntry ns, DeclSpace parent, MemberName name, + public TypeContainer (NamespaceContainer ns, DeclSpace parent, MemberName name, Attributes attrs, MemberKind kind) : base (ns, parent, name, attrs) { @@ -909,7 +916,7 @@ namespace Mono.CSharp { for (int i = 0, j = 0; i < count; i++){ FullNamedExpression fne = type_bases [i]; - TypeExpr fne_resolved = fne.ResolveAsTypeTerminal (base_context, false); + TypeExpr fne_resolved = fne.ResolveAsType (base_context); if (fne_resolved == null) continue; @@ -1079,11 +1086,6 @@ namespace Mono.CSharp { int type_size = Kind == MemberKind.Struct && first_nonstatic_field == null ? 1 : 0; if (IsTopLevel) { - // TODO: Completely wrong - if (Module.GlobalRootNamespace.IsNamespace (Name)) { - Report.Error (519, Location, "`{0}' clashes with a predefined namespace", Name); - } - TypeBuilder = Module.CreateBuilder (Name, TypeAttr, type_size); } else { TypeBuilder = Parent.TypeBuilder.DefineNestedType (Basename, TypeAttr, null, type_size); @@ -1145,7 +1147,7 @@ namespace Mono.CSharp { var cloned_params = ParametersCompiled.CreateFullyResolved (base_parameters, method.Parameters.Types); if (method.Parameters.HasArglist) { cloned_params.FixedParameters[0] = new Parameter (null, "__arglist", Parameter.Modifier.NONE, null, Location); - cloned_params.Types[0] = Module.PredefinedTypes.RuntimeArgumentHandle.Resolve (Location); + cloned_params.Types[0] = Module.PredefinedTypes.RuntimeArgumentHandle.Resolve (); } GenericMethod generic_method; @@ -2031,7 +2033,7 @@ namespace Mono.CSharp { // Performs the validation on a Method's modifiers (properties have // the same properties). // - // TODO: Why is it not done at parse stage ? + // TODO: Why is it not done at parse stage, move to Modifiers::Check // public bool MethodModifiersValid (MemberCore mc) { @@ -2192,7 +2194,6 @@ namespace Mono.CSharp { return e; e = null; - int errors = Report.Errors; if (arity == 0) { TypeParameter[] tp = CurrentTypeParameters; @@ -2210,12 +2211,18 @@ namespace Mono.CSharp { e = new TypeExpression (t, Location.Null); else if (Parent != null) { e = Parent.LookupNamespaceOrType (name, arity, loc, ignore_cs0104); - } else + } else { + int errors = Report.Errors; + e = NamespaceEntry.LookupNamespaceOrType (name, arity, loc, ignore_cs0104); + + if (errors != Report.Errors) + return e; + } } // TODO MemberCache: How to cache arity stuff ? - if (errors == Report.Errors && arity == 0) + if (arity == 0) Cache[name] = e; return e; @@ -2298,7 +2305,7 @@ namespace Mono.CSharp { { SecurityType declarative_security; - public ClassOrStruct (NamespaceEntry ns, DeclSpace parent, + public ClassOrStruct (NamespaceContainer ns, DeclSpace parent, MemberName name, Attributes attrs, MemberKind kind) : base (ns, parent, name, attrs, kind) { @@ -2423,7 +2430,7 @@ namespace Mono.CSharp { } } - public override IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope) + public override IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) { DeclSpace top_level = Parent; if (top_level != null) { @@ -2463,7 +2470,7 @@ namespace Mono.CSharp { public const TypeAttributes StaticClassAttribute = TypeAttributes.Abstract | TypeAttributes.Sealed; - public Class (NamespaceEntry ns, DeclSpace parent, MemberName name, Modifiers mod, + public Class (NamespaceContainer ns, DeclSpace parent, MemberName name, Modifiers mod, Attributes attrs) : base (ns, parent, name, attrs, MemberKind.Class) { @@ -2707,7 +2714,7 @@ namespace Mono.CSharp { Modifiers.UNSAFE | Modifiers.PRIVATE; - public Struct (NamespaceEntry ns, DeclSpace parent, MemberName name, + public Struct (NamespaceContainer ns, DeclSpace parent, MemberName name, Modifiers mod, Attributes attrs) : base (ns, parent, name, attrs, MemberKind.Struct) { @@ -2898,7 +2905,7 @@ namespace Mono.CSharp { Modifiers.UNSAFE | Modifiers.PRIVATE; - public Interface (NamespaceEntry ns, DeclSpace parent, MemberName name, Modifiers mod, + public Interface (NamespaceContainer ns, DeclSpace parent, MemberName name, Modifiers mod, Attributes attrs) : base (ns, parent, name, attrs, MemberKind.Interface) { @@ -3242,7 +3249,7 @@ namespace Mono.CSharp { } if (IsExplicitImpl) { - TypeExpr iface_texpr = MemberName.Left.GetTypeExpression ().ResolveAsTypeTerminal (Parent, false); + TypeExpr iface_texpr = MemberName.Left.GetTypeExpression ().ResolveAsType (Parent); if (iface_texpr == null) return false; @@ -3408,6 +3415,14 @@ namespace Mono.CSharp { return TypeManager.CSharpName (InterfaceType) + "." + name; } + public override string GetSignatureForDocumentation () + { + if (IsExplicitImpl) + return Parent.GetSignatureForDocumentation () + "." + InterfaceType.GetExplicitNameSignatureForDocumentation () + "#" + ShortName; + + return Parent.GetSignatureForDocumentation () + "." + ShortName; + } + protected override bool VerifyClsCompliance () { if (!base.VerifyClsCompliance ()) { @@ -3553,12 +3568,17 @@ namespace Mono.CSharp { return true; } + public override string GetSignatureForDocumentation () + { + return Parent.Name + "." + Name; + } + protected virtual bool ResolveMemberType () { if (member_type != null) throw new InternalErrorException ("Multi-resolve"); - TypeExpr te = type_expr.ResolveAsTypeTerminal (this, false); + TypeExpr te = type_expr.ResolveAsType (this); if (te == null) return false; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/constant.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/constant.cs index 872b9952c..1a815dad7 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/constant.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/constant.cs @@ -2026,19 +2026,26 @@ namespace Mono.CSharp { public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) { - // Type it as string cast - if (targetType.BuiltinType == BuiltinTypeSpec.Type.Object) + switch (targetType.BuiltinType) { + case BuiltinTypeSpec.Type.Object: + // Type it as string cast enc.Encode (rc.Module.Compiler.BuiltinTypes.String); - - var ac = targetType as ArrayContainer; - if (ac != null) { - if (ac.Rank != 1 || ac.Element.IsArray) - base.EncodeAttributeValue (rc, enc, targetType); - else - enc.Encode (uint.MaxValue); - } else { + goto case BuiltinTypeSpec.Type.String; + case BuiltinTypeSpec.Type.String: + case BuiltinTypeSpec.Type.Type: enc.Encode (byte.MaxValue); + return; + default: + var ac = targetType as ArrayContainer; + if (ac != null && ac.Rank == 1 && !ac.Element.IsArray) { + enc.Encode (uint.MaxValue); + return; + } + + break; } + + base.EncodeAttributeValue (rc, enc, targetType); } public override void Emit (EmitContext ec) diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/context.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/context.cs index 7715ce3d7..ff84ce57f 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/context.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/context.cs @@ -52,7 +52,7 @@ namespace Mono.CSharp string GetSignatureForError (); - IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope); + IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope); FullNamedExpression LookupNamespaceOrType (string name, int arity, Location loc, bool ignore_cs0104); FullNamedExpression LookupNamespaceAlias (string name); } @@ -515,7 +515,7 @@ namespace Mono.CSharp return MemberContext.GetSignatureForError (); } - public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope) + public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) { return MemberContext.LookupExtensionMethod (extensionType, name, arity, ref scope); } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.cs index 4d2bedfe5..e0dc4b101 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.cs @@ -46,7 +46,7 @@ namespace Mono.CSharp static readonly object ModifierNone = 0; - NamespaceEntry current_namespace; + NamespaceContainer current_namespace; TypeContainer current_container; DeclSpace current_class; PropertyBase current_property; @@ -129,6 +129,7 @@ namespace Mono.CSharp readonly LanguageVersion lang_version; readonly bool doc_support; readonly CompilerSettings settings; + readonly Report report; // // Instead of allocating carrier array everytime we @@ -143,7 +144,7 @@ namespace Mono.CSharp LocationsBag lbag; UsingsBag ubag; List> mod_locations; - Location parameterModifierLocation, savedLocation; + Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; #line default /** error output stream. @@ -181,7 +182,7 @@ namespace Mono.CSharp */ //t internal yydebug.yyDebug debug; - protected const int yyFinal = 6; + protected const int yyFinal = 7; //t // Put this array into a separate class so it is only initialized if debugging is actually used //t // Use MarshalByRefObject to disable inlining //t class YYRules : MarshalByRefObject { @@ -190,6 +191,7 @@ namespace Mono.CSharp //t "compilation_unit : outer_declaration opt_EOF", //t "$$1 :", //t "compilation_unit : interactive_parsing $$1 opt_EOF", +//t "compilation_unit : documentation_parsing", //t "outer_declaration : opt_extern_alias_directives opt_using_directives", //t "outer_declaration : opt_extern_alias_directives opt_using_directives namespace_or_type_declarations opt_attributes", //t "outer_declaration : opt_extern_alias_directives opt_using_directives attribute_sections", @@ -724,7 +726,7 @@ namespace Mono.CSharp //t "sizeof_expression : SIZEOF open_parens_any type CLOSE_PARENS", //t "checked_expression : CHECKED open_parens_any expression CLOSE_PARENS", //t "unchecked_expression : UNCHECKED open_parens_any expression CLOSE_PARENS", -//t "pointer_member_access : primary_expression OP_PTR IDENTIFIER", +//t "pointer_member_access : primary_expression OP_PTR IDENTIFIER opt_type_argument_list", //t "$$65 :", //t "anonymous_method_expression : DELEGATE opt_anonymous_method_signature $$65 block", //t "opt_anonymous_method_signature :", @@ -1112,6 +1114,26 @@ namespace Mono.CSharp //t "opt_COMPLETE_COMPLETION : COMPLETE_COMPLETION", //t "close_brace_or_complete_completion : CLOSE_BRACE", //t "close_brace_or_complete_completion : COMPLETE_COMPLETION", +//t "documentation_parsing : DOC_SEE doc_cref", +//t "doc_cref : doc_type_declaration_name opt_doc_method_sig", +//t "doc_cref : builtin_types opt_doc_method_sig", +//t "doc_cref : builtin_types DOT IDENTIFIER opt_doc_method_sig", +//t "doc_cref : doc_type_declaration_name DOT THIS", +//t "$$109 :", +//t "doc_cref : doc_type_declaration_name DOT THIS OPEN_BRACKET $$109 opt_doc_parameters CLOSE_BRACKET", +//t "doc_cref : EXPLICIT OPERATOR type opt_doc_method_sig", +//t "doc_cref : IMPLICIT OPERATOR type opt_doc_method_sig", +//t "doc_cref : OPERATOR overloadable_operator opt_doc_method_sig", +//t "doc_type_declaration_name : type_declaration_name", +//t "doc_type_declaration_name : doc_type_declaration_name DOT type_declaration_name", +//t "opt_doc_method_sig :", +//t "$$110 :", +//t "opt_doc_method_sig : OPEN_PARENS $$110 opt_doc_parameters CLOSE_PARENS", +//t "opt_doc_parameters :", +//t "opt_doc_parameters : doc_parameters", +//t "doc_parameters : doc_parameter", +//t "doc_parameters : doc_parameters COMMA doc_parameter", +//t "doc_parameter : opt_parameter_modifier parameter_type", //t }; //t public static string getRule (int index) { //t return yyRule [index]; @@ -1164,7 +1186,7 @@ namespace Mono.CSharp "IDENTIFIER","OPEN_PARENS_LAMBDA","OPEN_PARENS_CAST", "GENERIC_DIMENSION","DEFAULT_COLON","OPEN_BRACKET_EXPR", "EVAL_STATEMENT_PARSER","EVAL_COMPILATION_UNIT_PARSER", - "EVAL_USING_DECLARATIONS_UNIT_PARSER","GENERATE_COMPLETION", + "EVAL_USING_DECLARATIONS_UNIT_PARSER","DOC_SEE","GENERATE_COMPLETION", "COMPLETE_COMPLETION","UMINUS", }; @@ -1351,39 +1373,36 @@ namespace Mono.CSharp yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: -#line 376 "cs-parser.jay" +#line 379 "cs-parser.jay" { Lexer.check_incorrect_doc_comment (); } break; case 2: -#line 377 "cs-parser.jay" +#line 380 "cs-parser.jay" { Lexer.CompleteOnEOF = false; } break; -case 5: - case_5(); - break; case 6: -#line 393 "cs-parser.jay" + case_6(); + break; +case 7: +#line 397 "cs-parser.jay" { module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace); } break; -case 7: - case_7(); - break; -case 12: - case_12(); +case 8: + case_8(); break; case 13: -#line 431 "cs-parser.jay" + case_13(); + break; +case 14: +#line 435 "cs-parser.jay" { syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected"); /* TODO: better*/ } break; -case 16: - case_16(); - break; case 17: case_17(); break; @@ -1414,29 +1433,26 @@ case 25: case 26: case_26(); break; -case 31: - case_31(); +case 27: + case_27(); break; -case 40: - case_40(); +case 32: + case_32(); break; case 41: -#line 619 "cs-parser.jay" + case_41(); + break; +case 42: +#line 628 "cs-parser.jay" { current_namespace.DeclarationFound = true; } break; -case 49: - case_49(); - break; case 50: case_50(); break; case 51: -#line 668 "cs-parser.jay" - { - lexer.parsing_attribute_section = true; - } + case_51(); break; case 52: case_52(); @@ -1448,59 +1464,56 @@ case 54: case_54(); break; case 55: -#line 698 "cs-parser.jay" - { - yyVal = yyVals[-2+yyTop]; - } + case_55(); break; case 56: case_56(); break; case 57: -#line 707 "cs-parser.jay" - { yyVal = "event"; } + case_57(); break; case 58: -#line 708 "cs-parser.jay" - { yyVal = "return"; } +#line 721 "cs-parser.jay" + { yyVal = "event"; } break; case 59: - case_59(); +#line 722 "cs-parser.jay" + { yyVal = "return"; } break; case 60: -#line 725 "cs-parser.jay" + case_60(); + break; +case 61: +#line 739 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } break; -case 61: - case_61(); - break; case 62: -#line 739 "cs-parser.jay" + case_62(); + break; +case 63: +#line 753 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 63: - case_63(); +case 64: + case_64(); break; -case 65: -#line 760 "cs-parser.jay" +case 66: +#line 774 "cs-parser.jay" { yyVal = null; } break; -case 66: -#line 764 "cs-parser.jay" +case 67: +#line 778 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; -case 67: -#line 769 "cs-parser.jay" - { yyVal = null; } - break; case 68: - case_68(); +#line 783 "cs-parser.jay" + { yyVal = null; } break; case 69: case_69(); @@ -1512,51 +1525,51 @@ case 71: case_71(); break; case 72: -#line 813 "cs-parser.jay" + case_72(); + break; +case 73: +#line 827 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; -case 74: -#line 821 "cs-parser.jay" +case 75: +#line 835 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 75: - case_75(); - break; case 76: case_76(); break; case 77: -#line 845 "cs-parser.jay" - { yyVal = null; } + case_77(); break; case 78: -#line 849 "cs-parser.jay" +#line 860 "cs-parser.jay" + { yyVal = null; } + break; +case 79: +#line 864 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; -case 79: -#line 853 "cs-parser.jay" +case 80: +#line 868 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; -case 94: - case_94(); - break; case 95: -#line 894 "cs-parser.jay" + case_95(); + break; +case 96: +#line 909 "cs-parser.jay" { lexer.ConstraintsParsing = true; } break; -case 96: - case_96(); - break; case 97: case_97(); break; @@ -1567,55 +1580,55 @@ case 99: case_99(); break; case 100: -#line 926 "cs-parser.jay" + case_100(); + break; +case 101: +#line 941 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; -case 101: - case_101(); - break; case 102: -#line 938 "cs-parser.jay" + case_102(); + break; +case 103: +#line 953 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } break; -case 117: - case_117(); - break; case 118: case_118(); break; -case 121: -#line 1007 "cs-parser.jay" - { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); - } +case 119: + case_119(); break; case 122: -#line 1011 "cs-parser.jay" +#line 1022 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 123: - case_123(); +#line 1026 "cs-parser.jay" + { + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; case 124: -#line 1027 "cs-parser.jay" + case_124(); + break; +case 125: +#line 1042 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 125: - case_125(); - break; case 126: case_126(); break; -case 129: - case_129(); +case 127: + case_127(); break; case 130: case_130(); @@ -1627,70 +1640,70 @@ case 132: case_132(); break; case 133: -#line 1106 "cs-parser.jay" + case_133(); + break; +case 134: +#line 1121 "cs-parser.jay" { - Report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name"); + report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name"); } break; -case 135: - case_135(); - break; case 136: case_136(); break; -case 139: -#line 1136 "cs-parser.jay" - { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); - } +case 137: + case_137(); break; case 140: -#line 1140 "cs-parser.jay" +#line 1151 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 141: - case_141(); +#line 1155 "cs-parser.jay" + { + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; case 142: -#line 1153 "cs-parser.jay" + case_142(); + break; +case 143: +#line 1168 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 143: - case_143(); +case 144: + case_144(); break; -case 146: -#line 1172 "cs-parser.jay" +case 147: +#line 1187 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; -case 147: -#line 1176 "cs-parser.jay" +case 148: +#line 1191 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; -case 148: - case_148(); - break; case 149: -#line 1192 "cs-parser.jay" + case_149(); + break; +case 150: +#line 1207 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 150: - case_150(); - break; case 151: case_151(); break; -case 154: - case_154(); +case 152: + case_152(); break; case 155: case_155(); @@ -1699,48 +1712,48 @@ case 156: case_156(); break; case 157: -#line 1249 "cs-parser.jay" + case_157(); + break; +case 158: +#line 1264 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; -case 158: -#line 1253 "cs-parser.jay" +case 159: +#line 1268 "cs-parser.jay" { lexer.ConstraintsParsing = true; } break; -case 159: - case_159(); - break; case 160: -#line 1294 "cs-parser.jay" + case_160(); + break; +case 161: +#line 1309 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; -case 161: -#line 1298 "cs-parser.jay" +case 162: +#line 1313 "cs-parser.jay" { lexer.ConstraintsParsing = true; } break; -case 162: - case_162(); - break; case 163: case_163(); break; -case 165: -#line 1374 "cs-parser.jay" - { yyVal = null; } +case 164: + case_164(); break; case 166: -#line 1378 "cs-parser.jay" - { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } +#line 1389 "cs-parser.jay" + { yyVal = null; } break; -case 168: - case_168(); +case 167: +#line 1393 "cs-parser.jay" + { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 169: case_169(); @@ -1761,20 +1774,20 @@ case 174: case_174(); break; case 175: -#line 1437 "cs-parser.jay" + case_175(); + break; +case 176: +#line 1452 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; -case 176: -#line 1441 "cs-parser.jay" +case 177: +#line 1456 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } break; -case 177: - case_177(); - break; case 178: case_178(); break; @@ -1791,20 +1804,20 @@ case 182: case_182(); break; case 183: -#line 1516 "cs-parser.jay" + case_183(); + break; +case 184: +#line 1531 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 184: - case_184(); - break; case 185: -#line 1557 "cs-parser.jay" - { yyVal = Parameter.Modifier.NONE; } + case_185(); break; -case 187: - case_187(); +case 186: +#line 1572 "cs-parser.jay" + { yyVal = Parameter.Modifier.NONE; } break; case 188: case_188(); @@ -1834,14 +1847,14 @@ case 196: case_196(); break; case 197: -#line 1655 "cs-parser.jay" + case_197(); + break; +case 198: +#line 1670 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } break; -case 198: - case_198(); - break; case 199: case_199(); break; @@ -1855,25 +1868,25 @@ case 202: case_202(); break; case 203: -#line 1709 "cs-parser.jay" + case_203(); + break; +case 204: +#line 1724 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } break; -case 204: - case_204(); - break; case 205: -#line 1739 "cs-parser.jay" + case_205(); + break; +case 206: +#line 1754 "cs-parser.jay" { lexer.PropertyParsing = false; } break; -case 206: - case_206(); - break; -case 211: - case_211(); +case 207: + case_207(); break; case 212: case_212(); @@ -1887,21 +1900,21 @@ case 214: case 215: case_215(); break; -case 217: - case_217(); +case 216: + case_216(); break; case 218: case_218(); break; case 219: -#line 1881 "cs-parser.jay" + case_219(); + break; +case 220: +#line 1896 "cs-parser.jay" { lexer.ConstraintsParsing = true; } break; -case 220: - case_220(); - break; case 221: case_221(); break; @@ -1912,171 +1925,171 @@ case 223: case_223(); break; case 224: -#line 1914 "cs-parser.jay" - { - Error_SyntaxError (yyToken); - } + case_224(); break; -case 229: -#line 1931 "cs-parser.jay" +case 225: +#line 1929 "cs-parser.jay" { - Report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); + Error_SyntaxError (yyToken); } break; case 230: -#line 1935 "cs-parser.jay" +#line 1946 "cs-parser.jay" { - Report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); + report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; -case 235: -#line 1943 "cs-parser.jay" +case 231: +#line 1950 "cs-parser.jay" { - Report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); + report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 236: -#line 1947 "cs-parser.jay" +#line 1958 "cs-parser.jay" { - Report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); + report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 237: -#line 1951 "cs-parser.jay" +#line 1962 "cs-parser.jay" { - Report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); + report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 238: -#line 1957 "cs-parser.jay" +#line 1966 "cs-parser.jay" { + report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 239: - case_239(); +#line 1972 "cs-parser.jay" + { + } break; -case 241: -#line 1984 "cs-parser.jay" - { yyVal = null; } +case 240: + case_240(); break; -case 243: - case_243(); +case 242: +#line 1999 "cs-parser.jay" + { yyVal = null; } break; case 244: -#line 2000 "cs-parser.jay" + case_244(); + break; +case 245: +#line 2015 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } break; -case 245: - case_245(); +case 246: + case_246(); break; -case 247: -#line 2046 "cs-parser.jay" +case 248: +#line 2061 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; -case 248: -#line 2047 "cs-parser.jay" +case 249: +#line 2062 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; -case 249: -#line 2048 "cs-parser.jay" +case 250: +#line 2063 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; -case 250: -#line 2049 "cs-parser.jay" +case 251: +#line 2064 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; -case 251: -#line 2050 "cs-parser.jay" +case 252: +#line 2065 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; -case 252: -#line 2051 "cs-parser.jay" +case 253: +#line 2066 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; -case 253: -#line 2053 "cs-parser.jay" +case 254: +#line 2068 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; -case 254: -#line 2054 "cs-parser.jay" +case 255: +#line 2069 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; -case 255: -#line 2056 "cs-parser.jay" +case 256: +#line 2071 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; -case 256: -#line 2057 "cs-parser.jay" +case 257: +#line 2072 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; -case 257: -#line 2058 "cs-parser.jay" +case 258: +#line 2073 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; -case 258: -#line 2059 "cs-parser.jay" +case 259: +#line 2074 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; -case 259: -#line 2060 "cs-parser.jay" +case 260: +#line 2075 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; -case 260: -#line 2061 "cs-parser.jay" +case 261: +#line 2076 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; -case 261: -#line 2062 "cs-parser.jay" +case 262: +#line 2077 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; -case 262: -#line 2063 "cs-parser.jay" +case 263: +#line 2078 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; -case 263: -#line 2064 "cs-parser.jay" +case 264: +#line 2079 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; -case 264: -#line 2065 "cs-parser.jay" +case 265: +#line 2080 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; -case 265: -#line 2066 "cs-parser.jay" +case 266: +#line 2081 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; -case 266: -#line 2067 "cs-parser.jay" +case 267: +#line 2082 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; -case 267: -#line 2068 "cs-parser.jay" +case 268: +#line 2083 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; -case 268: -#line 2069 "cs-parser.jay" +case 269: +#line 2084 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; -case 269: -#line 2076 "cs-parser.jay" +case 270: +#line 2091 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } break; -case 270: - case_270(); - break; case 271: -#line 2095 "cs-parser.jay" + case_271(); + break; +case 272: +#line 2110 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } break; -case 272: - case_272(); - break; case 273: case_273(); break; @@ -2095,28 +2108,28 @@ case 277: case 278: case_278(); break; -case 280: -#line 2198 "cs-parser.jay" +case 279: + case_279(); + break; +case 281: +#line 2213 "cs-parser.jay" { current_block = null; yyVal = null; } break; -case 283: -#line 2210 "cs-parser.jay" +case 284: +#line 2225 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 284: - case_284(); - break; case 285: -#line 2220 "cs-parser.jay" + case_285(); + break; +case 286: +#line 2235 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 286: - case_286(); - break; case 287: case_287(); break; @@ -2141,51 +2154,51 @@ case 293: case 294: case_294(); break; -case 296: -#line 2329 "cs-parser.jay" +case 295: + case_295(); + break; +case 297: +#line 2344 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 297: - case_297(); +case 298: + case_298(); break; -case 300: -#line 2346 "cs-parser.jay" +case 301: +#line 2361 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; -case 301: -#line 2350 "cs-parser.jay" +case 302: +#line 2365 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; -case 302: - case_302(); - break; case 303: -#line 2363 "cs-parser.jay" + case_303(); + break; +case 304: +#line 2378 "cs-parser.jay" { ++lexer.parsing_block; } break; -case 304: - case_304(); - break; case 305: case_305(); break; case 306: -#line 2388 "cs-parser.jay" + case_306(); + break; +case 307: +#line 2403 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 309: - case_309(); - break; case 310: case_310(); break; @@ -2207,8 +2220,8 @@ case 315: case 316: case_316(); break; -case 318: - case_318(); +case 317: + case_317(); break; case 319: case_319(); @@ -2219,21 +2232,21 @@ case 320: case 321: case_321(); break; -case 323: - case_323(); +case 322: + case_322(); break; case 324: case_324(); break; -case 327: -#line 2543 "cs-parser.jay" +case 325: + case_325(); + break; +case 328: +#line 2558 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; -case 329: - case_329(); - break; case 330: case_330(); break; @@ -2244,37 +2257,37 @@ case 332: case_332(); break; case 333: -#line 2601 "cs-parser.jay" + case_333(); + break; +case 334: +#line 2616 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } break; -case 334: - case_334(); - break; case 335: -#line 2621 "cs-parser.jay" + case_335(); + break; +case 336: +#line 2636 "cs-parser.jay" { lexer.ConstraintsParsing = false; } break; -case 336: - case_336(); - break; -case 338: - case_338(); +case 337: + case_337(); break; -case 340: - case_340(); +case 339: + case_339(); break; -case 342: - case_342(); +case 341: + case_341(); break; case 343: case_343(); break; -case 345: - case_345(); +case 344: + case_344(); break; case 346: case_346(); @@ -2286,19 +2299,19 @@ case 348: case_348(); break; case 349: -#line 2719 "cs-parser.jay" + case_349(); + break; +case 350: +#line 2734 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } break; -case 350: - case_350(); - break; case 351: case_351(); break; -case 353: - case_353(); +case 352: + case_352(); break; case 354: case_354(); @@ -2315,8 +2328,8 @@ case 357: case 358: case_358(); break; -case 360: - case_360(); +case 359: + case_359(); break; case 361: case_361(); @@ -2330,60 +2343,60 @@ case 363: case 364: case_364(); break; -case 366: -#line 2837 "cs-parser.jay" +case 365: + case_365(); + break; +case 367: +#line 2852 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; -case 367: -#line 2844 "cs-parser.jay" +case 368: +#line 2859 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } break; -case 369: - case_369(); +case 370: + case_370(); break; -case 371: - case_371(); +case 372: + case_372(); break; -case 373: - case_373(); +case 374: + case_374(); break; -case 375: -#line 2882 "cs-parser.jay" +case 376: +#line 2897 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 376: - case_376(); - break; case 377: -#line 2902 "cs-parser.jay" + case_377(); + break; +case 378: +#line 2917 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 378: - case_378(); - break; case 379: -#line 2911 "cs-parser.jay" + case_379(); + break; +case 380: +#line 2926 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 380: -#line 2915 "cs-parser.jay" +case 381: +#line 2930 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 381: - case_381(); - break; case 382: case_382(); break; @@ -2394,95 +2407,95 @@ case 384: case_384(); break; case 385: -#line 2953 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } + case_385(); break; case 386: -#line 2954 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } +#line 2968 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 2955 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } +#line 2969 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 2956 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } +#line 2970 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 2957 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } +#line 2971 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 2958 "cs-parser.jay" +#line 2972 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } + break; +case 391: +#line 2973 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; -case 392: -#line 2963 "cs-parser.jay" +case 393: +#line 2978 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; -case 393: -#line 2964 "cs-parser.jay" +case 394: +#line 2979 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; -case 394: -#line 2965 "cs-parser.jay" +case 395: +#line 2980 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; -case 395: -#line 2966 "cs-parser.jay" +case 396: +#line 2981 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; -case 396: -#line 2967 "cs-parser.jay" +case 397: +#line 2982 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; -case 397: -#line 2968 "cs-parser.jay" +case 398: +#line 2983 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; -case 398: -#line 2969 "cs-parser.jay" +case 399: +#line 2984 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; -case 399: -#line 2970 "cs-parser.jay" +case 400: +#line 2985 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; -case 400: -#line 2971 "cs-parser.jay" +case 401: +#line 2986 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; -case 421: - case_421(); - break; case 422: case_422(); break; -case 426: -#line 3018 "cs-parser.jay" - { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } +case 423: + case_423(); break; case 427: -#line 3022 "cs-parser.jay" - { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } +#line 3033 "cs-parser.jay" + { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 428: -#line 3023 "cs-parser.jay" - { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } +#line 3037 "cs-parser.jay" + { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; -case 433: - case_433(); +case 429: +#line 3038 "cs-parser.jay" + { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 434: -#line 3056 "cs-parser.jay" + case_434(); + break; +case 435: +#line 3071 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } break; -case 435: - case_435(); - break; case 436: case_436(); break; @@ -2493,49 +2506,49 @@ case 438: case_438(); break; case 439: -#line 3087 "cs-parser.jay" + case_439(); + break; +case 440: +#line 3102 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } break; -case 440: - case_440(); - break; case 441: -#line 3095 "cs-parser.jay" + case_441(); + break; +case 442: +#line 3110 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } break; -case 442: - case_442(); - break; case 443: case_443(); break; case 444: -#line 3111 "cs-parser.jay" - { yyVal = null; } + case_444(); break; -case 446: - case_446(); +case 445: +#line 3126 "cs-parser.jay" + { yyVal = null; } break; case 447: case_447(); break; case 448: -#line 3134 "cs-parser.jay" - { yyVal = null; } + case_448(); break; case 449: -#line 3138 "cs-parser.jay" +#line 3149 "cs-parser.jay" + { yyVal = null; } + break; +case 450: +#line 3153 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 450: - case_450(); - break; case 451: case_451(); break; @@ -2546,26 +2559,26 @@ case 453: case_453(); break; case 454: -#line 3170 "cs-parser.jay" + case_454(); + break; +case 455: +#line 3185 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } break; -case 455: - case_455(); - break; case 456: case_456(); break; case 457: case_457(); break; -case 460: -#line 3198 "cs-parser.jay" - { yyVal = null; } +case 458: + case_458(); break; -case 462: - case_462(); +case 461: +#line 3213 "cs-parser.jay" + { yyVal = null; } break; case 463: case_463(); @@ -2580,14 +2593,14 @@ case 466: case_466(); break; case 467: -#line 3250 "cs-parser.jay" + case_467(); + break; +case 468: +#line 3265 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; -case 471: - case_471(); - break; case 472: case_472(); break; @@ -2597,8 +2610,8 @@ case 473: case 474: case_474(); break; -case 476: - case_476(); +case 475: + case_475(); break; case 477: case_477(); @@ -2616,38 +2629,38 @@ case 481: case_481(); break; case 482: -#line 3337 "cs-parser.jay" + case_482(); + break; +case 483: +#line 3352 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; -case 484: -#line 3345 "cs-parser.jay" +case 485: +#line 3360 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } break; -case 485: - case_485(); - break; case 486: case_486(); break; case 487: -#line 3365 "cs-parser.jay" + case_487(); + break; +case 488: +#line 3380 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; -case 488: -#line 3372 "cs-parser.jay" +case 489: +#line 3387 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; -case 489: - case_489(); - break; case 490: case_490(); break; @@ -2667,23 +2680,23 @@ case 495: case_495(); break; case 496: -#line 3438 "cs-parser.jay" + case_496(); + break; +case 497: +#line 3453 "cs-parser.jay" { ++lexer.parsing_type; } break; -case 497: - case_497(); - break; case 498: case_498(); break; -case 501: -#line 3465 "cs-parser.jay" - { yyVal = null; } +case 499: + case_499(); break; -case 503: - case_503(); +case 502: +#line 3480 "cs-parser.jay" + { yyVal = null; } break; case 504: case_504(); @@ -2700,8 +2713,8 @@ case 507: case 508: case_508(); break; -case 512: - case_512(); +case 509: + case_509(); break; case 513: case_513(); @@ -2710,32 +2723,32 @@ case 514: case_514(); break; case 515: -#line 3541 "cs-parser.jay" + case_515(); + break; +case 516: +#line 3556 "cs-parser.jay" { yyVal = 2; } break; -case 516: -#line 3545 "cs-parser.jay" +case 517: +#line 3560 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; -case 517: -#line 3552 "cs-parser.jay" +case 518: +#line 3567 "cs-parser.jay" { yyVal = null; } break; -case 518: -#line 3556 "cs-parser.jay" +case 519: +#line 3571 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 519: - case_519(); - break; case 520: case_520(); break; @@ -2746,16 +2759,16 @@ case 522: case_522(); break; case 523: -#line 3600 "cs-parser.jay" + case_523(); + break; +case 524: +#line 3615 "cs-parser.jay" { lexer.TypeOfParsing = true; } break; -case 524: - case_524(); - break; -case 527: - case_527(); +case 525: + case_525(); break; case 528: case_528(); @@ -2791,127 +2804,124 @@ case 538: case_538(); break; case 539: -#line 3713 "cs-parser.jay" - { - start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); - } + case_539(); break; case 540: -#line 3717 "cs-parser.jay" +#line 3728 "cs-parser.jay" { - yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); + start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 541: -#line 3724 "cs-parser.jay" + case_541(); + break; +case 542: +#line 3744 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; -case 543: -#line 3732 "cs-parser.jay" +case 544: +#line 3752 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 544: - case_544(); - break; case 545: case_545(); break; -case 547: -#line 3756 "cs-parser.jay" +case 546: + case_546(); + break; +case 548: +#line 3778 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 548: -#line 3760 "cs-parser.jay" +case 549: +#line 3782 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 550: - case_550(); +case 551: + case_551(); break; -case 552: -#line 3781 "cs-parser.jay" +case 553: +#line 3803 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 553: -#line 3785 "cs-parser.jay" +case 554: +#line 3807 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 554: -#line 3789 "cs-parser.jay" +case 555: +#line 3811 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 555: -#line 3793 "cs-parser.jay" +case 556: +#line 3815 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 556: -#line 3797 "cs-parser.jay" +case 557: +#line 3819 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 557: -#line 3801 "cs-parser.jay" +case 558: +#line 3823 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 559: - case_559(); - break; case 560: case_560(); break; case 561: case_561(); break; -case 563: - case_563(); +case 562: + case_562(); break; case 564: -#line 3833 "cs-parser.jay" + case_564(); + break; +case 565: +#line 3855 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 565: - case_565(); - break; case 566: -#line 3842 "cs-parser.jay" + case_566(); + break; +case 567: +#line 3864 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 567: -#line 3846 "cs-parser.jay" +case 568: +#line 3868 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 569: - case_569(); - break; case 570: case_570(); break; -case 572: - case_572(); +case 571: + case_571(); break; case 573: case_573(); @@ -2922,42 +2932,42 @@ case 574: case 575: case_575(); break; -case 577: - case_577(); +case 576: + case_576(); break; case 578: case_578(); break; -case 580: - case_580(); +case 579: + case_579(); break; -case 582: - case_582(); +case 581: + case_581(); break; -case 584: - case_584(); +case 583: + case_583(); break; -case 586: - case_586(); +case 585: + case_585(); break; -case 588: - case_588(); +case 587: + case_587(); break; -case 590: - case_590(); +case 589: + case_589(); break; -case 592: - case_592(); +case 591: + case_591(); break; case 593: -#line 3970 "cs-parser.jay" + case_593(); + break; +case 594: +#line 3992 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 594: - case_594(); - break; case 595: case_595(); break; @@ -3001,23 +3011,23 @@ case 608: case_608(); break; case 609: -#line 4065 "cs-parser.jay" - { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } + case_609(); break; case 610: - case_610(); +#line 4087 "cs-parser.jay" + { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; -case 613: -#line 4080 "cs-parser.jay" +case 611: + case_611(); + break; +case 614: +#line 4102 "cs-parser.jay" { start_block (lexer.Location); } break; -case 614: - case_614(); - break; -case 616: - case_616(); +case 615: + case_615(); break; case 617: case_617(); @@ -3034,36 +3044,36 @@ case 620: case 621: case_621(); break; -case 627: -#line 4142 "cs-parser.jay" +case 622: + case_622(); + break; +case 628: +#line 4164 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } break; -case 628: - case_628(); - break; case 629: case_629(); break; case 630: case_630(); break; -case 632: -#line 4171 "cs-parser.jay" +case 631: + case_631(); + break; +case 633: +#line 4193 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; -case 633: -#line 4184 "cs-parser.jay" +case 634: +#line 4206 "cs-parser.jay" { lexer.ConstraintsParsing = true; } break; -case 634: - case_634(); - break; case 635: case_635(); break; @@ -3074,18 +3084,18 @@ case 637: case_637(); break; case 638: -#line 4223 "cs-parser.jay" - { yyVal = null; } + case_638(); break; case 639: -#line 4225 "cs-parser.jay" - { yyVal = yyVals[0+yyTop]; } +#line 4245 "cs-parser.jay" + { yyVal = null; } break; case 640: - case_640(); +#line 4247 "cs-parser.jay" + { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; -case 643: - case_643(); +case 641: + case_641(); break; case 644: case_644(); @@ -3132,21 +3142,21 @@ case 657: case 658: case_658(); break; -case 660: -#line 4345 "cs-parser.jay" +case 659: + case_659(); + break; +case 661: +#line 4367 "cs-parser.jay" { current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } break; -case 662: -#line 4353 "cs-parser.jay" +case 663: +#line 4375 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 663: - case_663(); - break; case 664: case_664(); break; @@ -3169,50 +3179,50 @@ case 670: case_670(); break; case 671: -#line 4442 "cs-parser.jay" + case_671(); + break; +case 672: +#line 4464 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; -case 672: -#line 4446 "cs-parser.jay" +case 673: +#line 4468 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; -case 673: -#line 4453 "cs-parser.jay" +case 674: +#line 4475 "cs-parser.jay" { yyVal = Variance.None; } break; -case 674: - case_674(); - break; case 675: -#line 4467 "cs-parser.jay" + case_675(); + break; +case 676: +#line 4489 "cs-parser.jay" { yyVal = Variance.Covariant; } break; -case 676: -#line 4471 "cs-parser.jay" +case 677: +#line 4493 "cs-parser.jay" { yyVal = Variance.Contravariant; } break; -case 677: - case_677(); - break; case 678: -#line 4496 "cs-parser.jay" + case_678(); + break; +case 679: +#line 4518 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 679: - case_679(); - break; case 680: case_680(); break; @@ -3222,36 +3232,36 @@ case 681: case 682: case_682(); break; -case 687: -#line 4540 "cs-parser.jay" +case 683: + case_683(); + break; +case 688: +#line 4562 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 688: -#line 4544 "cs-parser.jay" +case 689: +#line 4566 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 690: - case_690(); +case 691: + case_691(); break; -case 693: -#line 4568 "cs-parser.jay" +case 694: +#line 4590 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 694: -#line 4572 "cs-parser.jay" +case 695: +#line 4594 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 723: - case_723(); - break; case 724: case_724(); break; @@ -3264,8 +3274,8 @@ case 726: case 727: case_727(); break; -case 730: - case_730(); +case 728: + case_728(); break; case 731: case_731(); @@ -3277,32 +3287,32 @@ case 733: case_733(); break; case 734: -#line 4716 "cs-parser.jay" + case_734(); + break; +case 735: +#line 4738 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 735: -#line 4720 "cs-parser.jay" +case 736: +#line 4742 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 736: - case_736(); - break; -case 738: - case_738(); +case 737: + case_737(); break; case 739: -#line 4741 "cs-parser.jay" + case_739(); + break; +case 740: +#line 4763 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } break; -case 740: - case_740(); - break; case 741: case_741(); break; @@ -3312,32 +3322,32 @@ case 742: case 743: case_743(); break; -case 745: - case_745(); +case 744: + case_744(); break; case 746: case_746(); break; -case 751: - case_751(); +case 747: + case_747(); break; case 752: case_752(); break; case 753: -#line 4830 "cs-parser.jay" - { - Report.Error (145, lexer.Location, "A const field requires a value to be provided"); - } + case_753(); break; case 754: - case_754(); +#line 4852 "cs-parser.jay" + { + report.Error (145, lexer.Location, "A const field requires a value to be provided"); + } break; -case 759: - case_759(); +case 755: + case_755(); break; -case 761: - case_761(); +case 760: + case_760(); break; case 762: case_762(); @@ -3346,19 +3356,19 @@ case 763: case_763(); break; case 764: -#line 4880 "cs-parser.jay" - { yyVal = yyVals[-1+yyTop]; } + case_764(); break; case 765: -#line 4884 "cs-parser.jay" +#line 4902 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 766: -#line 4885 "cs-parser.jay" +#line 4906 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 767: - case_767(); +#line 4907 "cs-parser.jay" + { yyVal = yyVals[-1+yyTop]; } break; case 768: case_768(); @@ -3366,26 +3376,26 @@ case 768: case 769: case_769(); break; -case 772: - case_772(); +case 770: + case_770(); break; case 773: case_773(); break; case 774: -#line 4953 "cs-parser.jay" + case_774(); + break; +case 775: +#line 4975 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } break; -case 775: - case_775(); - break; case 776: case_776(); break; -case 778: - case_778(); +case 777: + case_777(); break; case 779: case_779(); @@ -3394,20 +3404,20 @@ case 780: case_780(); break; case 781: -#line 4997 "cs-parser.jay" + case_781(); + break; +case 782: +#line 5019 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; -case 782: -#line 5001 "cs-parser.jay" +case 783: +#line 5023 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } break; -case 783: - case_783(); - break; case 784: case_784(); break; @@ -3415,14 +3425,14 @@ case 785: case_785(); break; case 786: -#line 5030 "cs-parser.jay" + case_786(); + break; +case 787: +#line 5052 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } break; -case 791: - case_791(); - break; case 792: case_792(); break; @@ -3430,38 +3440,38 @@ case 793: case_793(); break; case 794: -#line 5069 "cs-parser.jay" + case_794(); + break; +case 795: +#line 5091 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 795: - case_795(); - break; case 796: case_796(); break; case 797: -#line 5097 "cs-parser.jay" - { yyVal = new EmptyStatement (lexer.Location); } + case_797(); break; -case 799: - case_799(); +case 798: +#line 5119 "cs-parser.jay" + { yyVal = new EmptyStatement (lexer.Location); } break; case 800: case_800(); break; -case 802: -#line 5118 "cs-parser.jay" +case 801: + case_801(); + break; +case 803: +#line 5140 "cs-parser.jay" { yyVal = null; } break; -case 804: -#line 5123 "cs-parser.jay" +case 805: +#line 5145 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; -case 808: - case_808(); - break; case 809: case_809(); break; @@ -3471,8 +3481,8 @@ case 810: case 811: case_811(); break; -case 818: - case_818(); +case 812: + case_812(); break; case 819: case_819(); @@ -3498,15 +3508,15 @@ case 825: case 826: case_826(); break; -case 829: -#line 5278 "cs-parser.jay" +case 827: + case_827(); + break; +case 830: +#line 5300 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } break; -case 830: - case_830(); - break; case 831: case_831(); break; @@ -3519,48 +3529,48 @@ case 833: case 834: case_834(); break; -case 837: -#line 5331 "cs-parser.jay" +case 835: + case_835(); + break; +case 838: +#line 5353 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 838: - case_838(); - break; case 839: -#line 5350 "cs-parser.jay" + case_839(); + break; +case 840: +#line 5372 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; -case 840: - case_840(); - break; case 841: -#line 5368 "cs-parser.jay" + case_841(); + break; +case 842: +#line 5390 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 842: -#line 5375 "cs-parser.jay" +case 843: +#line 5397 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 843: - case_843(); - break; case 844: -#line 5385 "cs-parser.jay" + case_844(); + break; +case 845: +#line 5407 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } break; -case 845: - case_845(); - break; case 846: case_846(); break; @@ -3583,13 +3593,13 @@ case 852: case_852(); break; case 853: -#line 5468 "cs-parser.jay" - { - Report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); - } + case_853(); break; case 854: - case_854(); +#line 5490 "cs-parser.jay" + { + report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); + } break; case 855: case_855(); @@ -3616,38 +3626,38 @@ case 862: case_862(); break; case 863: -#line 5568 "cs-parser.jay" + case_863(); + break; +case 864: +#line 5590 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 864: - case_864(); - break; case 865: -#line 5583 "cs-parser.jay" + case_865(); + break; +case 866: +#line 5605 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 866: - case_866(); - break; case 867: case_867(); break; -case 869: - case_869(); +case 868: + case_868(); break; case 870: -#line 5628 "cs-parser.jay" + case_870(); + break; +case 871: +#line 5650 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 871: - case_871(); - break; case 872: case_872(); break; @@ -3657,27 +3667,27 @@ case 873: case 874: case_874(); break; -case 878: - case_878(); +case 875: + case_875(); + break; +case 879: + case_879(); break; -case 884: -#line 5686 "cs-parser.jay" +case 885: +#line 5709 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 885: - case_885(); - break; case 886: -#line 5704 "cs-parser.jay" + case_886(); + break; +case 887: +#line 5728 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 887: - case_887(); - break; case 888: case_888(); break; @@ -3702,81 +3712,147 @@ case 894: case 895: case_895(); break; -case 897: -#line 5846 "cs-parser.jay" +case 896: + case_896(); + break; +case 898: +#line 5872 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 898: -#line 5853 "cs-parser.jay" +case 899: +#line 5879 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 899: - case_899(); - break; -case 901: - case_901(); +case 900: + case_900(); break; case 902: case_902(); break; -case 904: - case_904(); +case 903: + case_903(); break; case 905: case_905(); break; case 906: -#line 5899 "cs-parser.jay" - { - yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); - } + case_906(); break; case 907: -#line 5903 "cs-parser.jay" +#line 5925 "cs-parser.jay" { - yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); + yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } break; case 908: -#line 5907 "cs-parser.jay" - { - yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); - } + case_908(); break; case 909: -#line 5914 "cs-parser.jay" - { - yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); - } + case_909(); break; case 910: -#line 5918 "cs-parser.jay" +#line 5942 "cs-parser.jay" { - yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); + yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } break; case 911: -#line 5922 "cs-parser.jay" - { - yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); - } + case_911(); break; -case 913: - case_913(); +case 912: + case_912(); break; case 914: case_914(); break; -case 917: - case_917(); +case 915: + case_915(); break; case 918: case_918(); break; +case 919: + case_919(); + break; +case 927: +#line 6066 "cs-parser.jay" + { + module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; + } + break; +case 928: +#line 6073 "cs-parser.jay" + { + module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; + } + break; +case 929: + case_929(); + break; +case 930: + case_930(); + break; +case 931: +#line 6090 "cs-parser.jay" + { + yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); + } + break; +case 932: +#line 6094 "cs-parser.jay" + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + } + break; +case 933: + case_933(); + break; +case 934: + case_934(); + break; +case 935: + case_935(); + break; +case 936: + case_936(); + break; +case 938: +#line 6130 "cs-parser.jay" + { + yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); + } + break; +case 940: +#line 6138 "cs-parser.jay" + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + } + break; +case 941: +#line 6142 "cs-parser.jay" + { + yyVal = yyVals[-1+yyTop]; + } + break; +case 942: +#line 6149 "cs-parser.jay" + { + yyVal = new List (0); + } + break; +case 944: + case_944(); + break; +case 945: + case_945(); + break; +case 946: + case_946(); + break; #line default } yyTop -= yyLen[yyN]; @@ -3812,27 +3888,27 @@ case 918: /* All more than 3 lines long rules are wrapped into a method */ -void case_5() -#line 383 "cs-parser.jay" +void case_6() +#line 387 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { Attributes attrs = (Attributes) yyVals[0+yyTop]; - Report.Error (1730, attrs.Attrs [0].Location, + report.Error (1730, attrs.Attrs [0].Location, "Assembly and module attributes must precede all other elements except using clauses and extern alias declarations"); } } -void case_7() -#line 395 "cs-parser.jay" +void case_8() +#line 399 "cs-parser.jay" { if (yyToken == Token.EXTERN_ALIAS) - Report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); + report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); else Error_SyntaxError (yyToken); } -void case_12() -#line 415 "cs-parser.jay" +void case_13() +#line 419 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -3842,31 +3918,31 @@ void case_12() FeatureIsNotAvailable (lt.Location, "external alias"); } else { lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; - current_namespace.AddUsingExternalAlias (lt.Value, lt.Location, Report); + current_namespace.AddUsingExternalAlias (lt.Value, lt.Location, report); ubag.AddExternAlias (GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop]), lt, GetLocation (yyVals[0+yyTop])); } } -void case_16() -#line 441 "cs-parser.jay" +void case_17() +#line 445 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_17() -#line 446 "cs-parser.jay" +void case_18() +#line 450 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_18() -#line 454 "cs-parser.jay" +void case_19() +#line 458 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") { - Report.Warning (440, 2, lt.Location, + report.Warning (440, 2, lt.Location, "An alias named `global' will not be used when resolving `global::'. The global namespace will be used instead"); } @@ -3874,22 +3950,22 @@ void case_18() ubag.AddUsingAlias (GetLocation (yyVals[-4+yyTop]), lt, GetLocation (yyVals[-2+yyTop]), (MemberName) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } -void case_19() -#line 465 "cs-parser.jay" +void case_20() +#line 469 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_20() -#line 473 "cs-parser.jay" +void case_21() +#line 477 "cs-parser.jay" { current_namespace.AddUsing ((MemberName) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); ubag.AddUsing (GetLocation (yyVals[-2+yyTop]), (MemberName) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } -void case_21() -#line 486 "cs-parser.jay" +void case_22() +#line 490 "cs-parser.jay" { Attributes attrs = (Attributes) yyVals[-2+yyTop]; MemberName name = (MemberName) yyVals[0+yyTop]; @@ -3908,28 +3984,29 @@ void case_21() } if (!valid_global_attrs) - Report.Error (1671, name.Location, "A namespace declaration cannot have modifiers or attributes"); + report.Error (1671, name.Location, "A namespace declaration cannot have modifiers or attributes"); } + + module.AddAttributes (attrs, current_namespace); - current_namespace = new NamespaceEntry (module, current_namespace, file, name.GetName ()); + current_namespace = new NamespaceContainer (name, module, current_namespace, file); + module.AddTypesContainer (current_namespace); current_class = current_namespace.SlaveDeclSpace; current_container = current_class.PartialContainer; - module.AddAttributes (attrs, current_namespace); - ubag.DeclareNamespace (GetLocation (yyVals[-1+yyTop]), name); } -void case_22() -#line 516 "cs-parser.jay" +void case_23() +#line 521 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; ubag.OpenNamespace (GetLocation (yyVals[0+yyTop])); } -void case_23() -#line 522 "cs-parser.jay" +void case_24() +#line 527 "cs-parser.jay" { if (yyVals[0+yyTop] != null) lbag.AddLocation (current_namespace, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); @@ -3943,29 +4020,29 @@ void case_23() ubag.EndNamespace (GetLocation (yyVals[-1+yyTop])); } -void case_24() -#line 538 "cs-parser.jay" +void case_25() +#line 543 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName (lt.Value, lt.Location); } -void case_25() -#line 543 "cs-parser.jay" +void case_26() +#line 552 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); } -void case_26() -#line 548 "cs-parser.jay" +void case_27() +#line 557 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } -void case_31() -#line 566 "cs-parser.jay" +void case_32() +#line 575 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -3975,14 +4052,14 @@ void case_31() yyVal = name; } -void case_40() -#line 598 "cs-parser.jay" +void case_41() +#line 607 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; if ((ds.ModFlags & (Modifiers.PRIVATE | Modifiers.PROTECTED)) != 0){ - Report.Error (1527, ds.Location, + report.Error (1527, ds.Location, "Namespace elements cannot be explicitly declared as private, protected or protected internal"); } @@ -3996,15 +4073,16 @@ void case_40() current_namespace.DeclarationFound = true; } -void case_49() -#line 648 "cs-parser.jay" +void case_50() +#line 657 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); + lbag.AddLocation (yyVal, savedOpenLocation, savedCloseLocation); } -void case_50() -#line 653 "cs-parser.jay" +void case_51() +#line 663 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4013,17 +4091,25 @@ void case_50() else attrs.AddAttributes (sect); yyVal = attrs; + lbag.AddLocation (yyVal, savedOpenLocation, savedCloseLocation); } void case_52() -#line 670 "cs-parser.jay" +#line 677 "cs-parser.jay" +{ + lexer.parsing_attribute_section = true; + savedOpenLocation = GetLocation (yyVals[0+yyTop]); + } + +void case_53() +#line 682 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } -void case_53() -#line 678 "cs-parser.jay" +void case_54() +#line 690 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4031,8 +4117,8 @@ void case_53() } } -void case_54() -#line 685 "cs-parser.jay" +void case_55() +#line 697 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4042,17 +4128,25 @@ void case_54() current_attr_target = null; lexer.parsing_attribute_section = false; + savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_56() -#line 703 "cs-parser.jay" +#line 709 "cs-parser.jay" +{ + yyVal = yyVals[-2+yyTop]; + savedCloseLocation = GetLocation (yyVals[0+yyTop]); + } + +void case_57() +#line 717 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } -void case_59() -#line 710 "cs-parser.jay" +void case_60() +#line 724 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4063,8 +4157,8 @@ void case_59() } } -void case_61() -#line 727 "cs-parser.jay" +void case_62() +#line 741 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4072,13 +4166,13 @@ void case_61() yyVal = attrs; } -void case_63() -#line 741 "cs-parser.jay" +void case_64() +#line 755 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; if (mname.IsGeneric) { - Report.Error (404, lexer.Location, + report.Error (404, lexer.Location, "'<' unexpected: attributes cannot be generic"); } @@ -4087,28 +4181,28 @@ void case_63() yyVal = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); } -void case_68() -#line 771 "cs-parser.jay" +void case_69() +#line 785 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); yyVal = new Arguments [] { a, null }; } -void case_69() -#line 777 "cs-parser.jay" +void case_70() +#line 791 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); yyVal = new Arguments [] { null, a }; } -void case_70() -#line 783 "cs-parser.jay" +void case_71() +#line 797 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { - Report.Error (1016, ((Argument) yyVals[0+yyTop]).Expr.Location, "Named attribute arguments must appear after the positional arguments"); + report.Error (1016, ((Argument) yyVals[0+yyTop]).Expr.Location, "Named attribute arguments must appear after the positional arguments"); o [0] = new Arguments (4); } @@ -4120,8 +4214,8 @@ void case_70() lbag.AppendTo (args, GetLocation (yyVals[-1+yyTop])); } -void case_71() -#line 798 "cs-parser.jay" +void case_72() +#line 812 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4132,16 +4226,17 @@ void case_71() lbag.AppendTo (o[1], GetLocation (yyVals[-1+yyTop])); } -void case_75() -#line 823 "cs-parser.jay" +void case_76() +#line 837 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]); + lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop])); } -void case_76() -#line 832 "cs-parser.jay" +void case_77() +#line 847 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4153,24 +4248,24 @@ void case_76() yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod); } -void case_94() -#line 879 "cs-parser.jay" +void case_95() +#line 894 "cs-parser.jay" { - Report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", + report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); yyVal = null; lexer.parsing_generic_declaration = false; } -void case_96() -#line 896 "cs-parser.jay" +void case_97() +#line 911 "cs-parser.jay" { MemberName name = MakeName ((MemberName) yyVals[0+yyTop]); push_current_class (new Struct (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]); } -void case_97() -#line 902 "cs-parser.jay" +void case_98() +#line 917 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4182,30 +4277,30 @@ void case_97() lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-5+yyTop])); } -void case_98() -#line 913 "cs-parser.jay" +void case_99() +#line 928 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_99() -#line 919 "cs-parser.jay" +void case_100() +#line 934 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[0+yyTop])); yyVal = pop_current_class (); } -void case_101() -#line 931 "cs-parser.jay" +void case_102() +#line 946 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_117() -#line 973 "cs-parser.jay" +void case_118() +#line 988 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4213,14 +4308,14 @@ void case_117() current_container.AddConstant ((Const) current_field); if ((mod & Modifiers.STATIC) != 0) { - Report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ()); + report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ()); } yyVal = current_field; } -void case_118() -#line 986 "cs-parser.jay" +void case_119() +#line 1001 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4232,37 +4327,37 @@ void case_118() current_field = null; } -void case_123() -#line 1016 "cs-parser.jay" +void case_124() +#line 1031 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_125() -#line 1029 "cs-parser.jay" +void case_126() +#line 1044 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_126() -#line 1035 "cs-parser.jay" +void case_127() +#line 1050 "cs-parser.jay" { - Report.Error (145, lexer.Location, "A const field requires a value to be provided"); + report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } -void case_129() -#line 1050 "cs-parser.jay" +void case_130() +#line 1065 "cs-parser.jay" { lexer.parsing_generic_declaration = false; FullNamedExpression type = (FullNamedExpression) yyVals[-1+yyTop]; if (type.Type != null && type.Type.Kind == MemberKind.Void) - Report.Error (670, GetLocation (yyVals[-1+yyTop]), "Fields cannot have void type"); + report.Error (670, GetLocation (yyVals[-1+yyTop]), "Fields cannot have void type"); var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; current_field = new Field (current_class, type, (Modifiers) yyVals[-2+yyTop], new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-3+yyTop]); @@ -4270,8 +4365,8 @@ void case_129() yyVal = current_field; } -void case_130() -#line 1065 "cs-parser.jay" +void case_131() +#line 1080 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4283,8 +4378,8 @@ void case_130() current_field = null; } -void case_131() -#line 1078 "cs-parser.jay" +void case_132() +#line 1093 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4296,8 +4391,8 @@ void case_131() current_container.AddField (current_field); } -void case_132() -#line 1089 "cs-parser.jay" +void case_133() +#line 1104 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4310,16 +4405,16 @@ void case_132() current_field = null; } -void case_135() -#line 1112 "cs-parser.jay" +void case_136() +#line 1127 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; start_block (GetLocation (yyVals[0+yyTop])); } -void case_136() -#line 1118 "cs-parser.jay" +void case_137() +#line 1133 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4328,16 +4423,16 @@ void case_136() current_local_parameters = null; } -void case_141() -#line 1145 "cs-parser.jay" +void case_142() +#line 1160 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_143() -#line 1155 "cs-parser.jay" +void case_144() +#line 1170 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4345,39 +4440,39 @@ void case_143() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_148() -#line 1181 "cs-parser.jay" +void case_149() +#line 1196 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_150() -#line 1194 "cs-parser.jay" +void case_151() +#line 1209 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_151() -#line 1200 "cs-parser.jay" +void case_152() +#line 1215 "cs-parser.jay" { - Report.Error (443, lexer.Location, "Value or constant expected"); + report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } -void case_154() -#line 1210 "cs-parser.jay" +void case_155() +#line 1225 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); yyVal = null; } -void case_155() -#line 1219 "cs-parser.jay" +void case_156() +#line 1234 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4386,14 +4481,14 @@ void case_155() current_container.AddMethod ((Method) yyVals[0+yyTop]); } -void case_156() -#line 1227 "cs-parser.jay" +void case_157() +#line 1242 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; if (current_container.Kind == MemberKind.Interface && method.Block != null) { - Report.Error (531, method.Location, "`{0}': interface members cannot have a definition", method.GetSignatureForError ()); + report.Error (531, method.Location, "`{0}': interface members cannot have a definition", method.GetSignatureForError ()); } current_local_parameters = null; @@ -4402,8 +4497,8 @@ void case_156() Lexer.doc_state = XmlCommentState.Allowed; } -void case_159() -#line 1255 "cs-parser.jay" +void case_160() +#line 1270 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4417,7 +4512,7 @@ void case_159() generic.SetParameterInfo ((List) yyVals[0+yyTop]); } else if (yyVals[0+yyTop] != null) { - Report.Error (80, GetLocation (yyVals[0+yyTop]), + report.Error (80, GetLocation (yyVals[0+yyTop]), "Constraints are not allowed on non-generic declarations"); } @@ -4425,7 +4520,7 @@ void case_159() name, current_local_parameters, (Attributes) yyVals[-9+yyTop]); if (yyVals[0+yyTop] != null && ((method.ModFlags & Modifiers.OVERRIDE) != 0 || method.IsExplicitImpl)) { - Report.Error (460, method.Location, + report.Error (460, method.Location, "`{0}': Cannot specify constraints for overrides and explicit interface implementation methods", method.GetSignatureForError ()); } @@ -4437,8 +4532,8 @@ void case_159() yyVal = method; } -void case_162() -#line 1300 "cs-parser.jay" +void case_163() +#line 1315 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4447,7 +4542,7 @@ void case_162() current_local_parameters = (ParametersCompiled) yyVals[-3+yyTop]; if (yyVals[-1+yyTop] != null && name.TypeArguments == null) - Report.Error (80, lexer.Location, + report.Error (80, lexer.Location, "Constraints are not allowed on non-generic declarations"); Method method; @@ -4467,13 +4562,13 @@ void case_162() Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.SEALED | Modifiers.VIRTUAL; if ((modifiers & invalid_partial_mod) != 0) { - Report.Error (750, name.Location, "A partial method cannot define access modifier or " + + report.Error (750, name.Location, "A partial method cannot define access modifier or " + "any of abstract, extern, new, override, sealed, or virtual modifiers"); modifiers &= ~invalid_partial_mod; } if ((current_class.ModFlags & Modifiers.PARTIAL) == 0) { - Report.Error (751, name.Location, "A partial method must be declared within a " + + report.Error (751, name.Location, "A partial method must be declared within a " + "partial class or partial struct"); } @@ -4491,11 +4586,11 @@ void case_162() yyVal = method; } -void case_163() -#line 1355 "cs-parser.jay" +void case_164() +#line 1370 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; - Report.Error (1585, name.Location, + report.Error (1585, name.Location, "Member modifier `{0}' must precede the member type and name", ModifiersExtensions.Name ((Modifiers) yyVals[-4+yyTop])); Method method = new Method (current_class, null, (FullNamedExpression) yyVals[-5+yyTop], @@ -4509,16 +4604,16 @@ void case_163() yyVal = method; } -void case_168() -#line 1384 "cs-parser.jay" +void case_169() +#line 1399 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); lbag.AddLocation (yyVal, lbag.GetLocations (pars_list)); } -void case_169() -#line 1390 "cs-parser.jay" +void case_170() +#line 1405 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4526,28 +4621,28 @@ void case_169() yyVal = new ParametersCompiled (pars_list.ToArray ()); } -void case_170() -#line 1397 "cs-parser.jay" +void case_171() +#line 1412 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); yyVal = new ParametersCompiled (pars_list.ToArray (), true); } -void case_171() -#line 1403 "cs-parser.jay" +void case_172() +#line 1418 "cs-parser.jay" { if (yyVals[-2+yyTop] != null) - Report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list"); + report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list"); yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[-2+yyTop] } ); } -void case_172() -#line 1410 "cs-parser.jay" +void case_173() +#line 1425 "cs-parser.jay" { if (yyVals[-2+yyTop] != null) - Report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list"); + report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list"); var pars_list = (List) yyVals[-4+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[-2+yyTop]))); @@ -4555,18 +4650,18 @@ void case_172() yyVal = new ParametersCompiled (pars_list.ToArray (), true); } -void case_173() -#line 1420 "cs-parser.jay" +void case_174() +#line 1435 "cs-parser.jay" { - Report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); + report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[-2+yyTop])) }, true); } -void case_174() -#line 1426 "cs-parser.jay" +void case_175() +#line 1441 "cs-parser.jay" { - Report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); + report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); var pars_list = (List) yyVals[-4+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[-2+yyTop]))); @@ -4574,15 +4669,15 @@ void case_174() yyVal = new ParametersCompiled (pars_list.ToArray (), true); } -void case_177() -#line 1443 "cs-parser.jay" +void case_178() +#line 1458 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } -void case_178() -#line 1451 "cs-parser.jay" +void case_179() +#line 1466 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4592,16 +4687,16 @@ void case_178() yyVal = parameters_bucket; } -void case_179() -#line 1460 "cs-parser.jay" +void case_180() +#line 1475 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; if (p != null) { if (p.HasExtensionMethodModifier) - Report.Error (1100, p.Location, "The parameter modifier `this' can only be used on the first parameter"); + report.Error (1100, p.Location, "The parameter modifier `this' can only be used on the first parameter"); else if (!p.HasDefaultValue && default_parameter_used) - Report.Error (1737, p.Location, "Optional parameter cannot precede required parameters"); + report.Error (1737, p.Location, "Optional parameter cannot precede required parameters"); default_parameter_used |= p.HasDefaultValue; pars.Add (p); @@ -4612,34 +4707,34 @@ void case_179() yyVal = yyVals[-2+yyTop]; } -void case_180() -#line 1484 "cs-parser.jay" +void case_181() +#line 1499 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], lt.Location); lbag.AddLocation (yyVal, parameterModifierLocation); } -void case_181() -#line 1493 "cs-parser.jay" +void case_182() +#line 1508 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; - Report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); + report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); yyVal = new Parameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Parameter.Modifier) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop], lt.Location); lbag.AddLocation (yyVal, parameterModifierLocation); } -void case_182() -#line 1503 "cs-parser.jay" +void case_183() +#line 1518 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); - yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], "NeedSomeGeneratorHere", (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], l); + yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], null, (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], l); lbag.AddLocation (yyVal, parameterModifierLocation); } -void case_184() -#line 1518 "cs-parser.jay" +void case_185() +#line 1533 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4651,12 +4746,12 @@ void case_184() switch (mod) { case Parameter.Modifier.REF: case Parameter.Modifier.OUT: - Report.Error (1741, GetLocation (yyVals[-5+yyTop]), "Cannot specify a default value for the `{0}' parameter", + report.Error (1741, GetLocation (yyVals[-5+yyTop]), "Cannot specify a default value for the `{0}' parameter", Parameter.GetModifierSignature (mod)); break; case Parameter.Modifier.This: - Report.Error (1743, GetLocation (yyVals[-5+yyTop]), "Cannot specify a default value for the `{0}' parameter", + report.Error (1743, GetLocation (yyVals[-5+yyTop]), "Cannot specify a default value for the `{0}' parameter", Parameter.GetModifierSignature (mod)); break; default: @@ -4667,7 +4762,7 @@ void case_184() } if ((valid_param_mod & ParameterModifierType.DefaultValue) == 0) - Report.Error (1065, GetLocation (yyVals[-2+yyTop]), "Optional parameter is not valid in this context"); + report.Error (1065, GetLocation (yyVals[-2+yyTop]), "Optional parameter is not valid in this context"); var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; yyVal = new Parameter ((FullNamedExpression) yyVals[-4+yyTop], lt.Value, mod, (Attributes) yyVals[-6+yyTop], lt.Location); @@ -4677,15 +4772,15 @@ void case_184() ((Parameter) yyVal).DefaultValue = new DefaultParameterValueExpression ((Expression) yyVals[0+yyTop]); } -void case_187() -#line 1563 "cs-parser.jay" +void case_188() +#line 1578 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; parameterModifierLocation = GetLocation (yyVals[0+yyTop]); } -void case_188() -#line 1568 "cs-parser.jay" +void case_189() +#line 1583 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4694,21 +4789,21 @@ void case_188() } else { switch (mod & ~Parameter.Modifier.This) { case Parameter.Modifier.REF: - Report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether"); + report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether"); break; case Parameter.Modifier.OUT: - Report.Error (1102, lexer.Location, "The parameter modifiers `this' and `out' cannot be used altogether"); + report.Error (1102, lexer.Location, "The parameter modifiers `this' and `out' cannot be used altogether"); break; default: - Report.Error (1108, lexer.Location, "A parameter cannot have specified more than one modifier"); + report.Error (1108, lexer.Location, "A parameter cannot have specified more than one modifier"); break; } } yyVal = mod; } -void case_189() -#line 1592 "cs-parser.jay" +void case_190() +#line 1607 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4716,8 +4811,8 @@ void case_189() yyVal = Parameter.Modifier.REF; } -void case_190() -#line 1599 "cs-parser.jay" +void case_191() +#line 1614 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4725,8 +4820,8 @@ void case_190() yyVal = Parameter.Modifier.OUT; } -void case_191() -#line 1606 "cs-parser.jay" +void case_192() +#line 1621 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4737,70 +4832,70 @@ void case_191() yyVal = Parameter.Modifier.This; } -void case_192() -#line 1619 "cs-parser.jay" +void case_193() +#line 1634 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Attributes) yyVals[-3+yyTop], lt.Location); } -void case_193() -#line 1624 "cs-parser.jay" +void case_194() +#line 1639 "cs-parser.jay" { - Report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); + report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Attributes) yyVals[-5+yyTop], lt.Location); } -void case_194() -#line 1631 "cs-parser.jay" +void case_195() +#line 1646 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_195() -#line 1639 "cs-parser.jay" +void case_196() +#line 1654 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Params) == 0) - Report.Error (1670, (GetLocation (yyVals[0+yyTop])), "The `params' modifier is not allowed in current context"); + report.Error (1670, (GetLocation (yyVals[0+yyTop])), "The `params' modifier is not allowed in current context"); } -void case_196() -#line 1644 "cs-parser.jay" +void case_197() +#line 1659 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { - Report.Error (1104, GetLocation (yyVals[-1+yyTop]), "The parameter modifiers `this' and `params' cannot be used altogether"); + report.Error (1104, GetLocation (yyVals[-1+yyTop]), "The parameter modifiers `this' and `params' cannot be used altogether"); } else { - Report.Error (1611, GetLocation (yyVals[-1+yyTop]), "The params parameter cannot be declared as ref or out"); + report.Error (1611, GetLocation (yyVals[-1+yyTop]), "The params parameter cannot be declared as ref or out"); } } -void case_198() -#line 1660 "cs-parser.jay" +void case_199() +#line 1675 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) - Report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); + report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } -void case_199() -#line 1671 "cs-parser.jay" +void case_200() +#line 1686 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } -void case_200() -#line 1676 "cs-parser.jay" +void case_201() +#line 1691 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], (MemberName) yyVals[-2+yyTop], (Attributes) yyVals[-5+yyTop]); if (type.Type != null && type.Type.Kind == MemberKind.Void) - Report.Error (547, GetLocation (yyVals[-3+yyTop]), "`{0}': property or indexer cannot have void type", current_property.GetSignatureForError ()); + report.Error (547, GetLocation (yyVals[-3+yyTop]), "`{0}': property or indexer cannot have void type", current_property.GetSignatureForError ()); current_container.AddProperty ((Property)current_property); lbag.AddMember (current_property, GetModifierLocations (), GetLocation (yyVals[0+yyTop])); @@ -4808,8 +4903,8 @@ void case_200() lexer.PropertyParsing = true; } -void case_201() -#line 1690 "cs-parser.jay" +void case_202() +#line 1705 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -4817,15 +4912,15 @@ void case_201() current_property.DocComment = ConsumeStoredComment (); } -void case_202() -#line 1697 "cs-parser.jay" +void case_203() +#line 1712 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } -void case_204() -#line 1711 "cs-parser.jay" +void case_205() +#line 1726 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -4838,10 +4933,10 @@ void case_204() lbag.AddMember (current_property, GetModifierLocations (), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); if (type.Type != null && type.Type.Kind == MemberKind.Void) - Report.Error (620, GetLocation (yyVals[-6+yyTop]), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ()); + report.Error (620, GetLocation (yyVals[-6+yyTop]), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ()); if (indexer.Parameters.IsEmpty) { - Report.Error (1551, GetLocation (yyVals[-4+yyTop]), "Indexers must have at least one parameter"); + report.Error (1551, GetLocation (yyVals[-4+yyTop]), "Indexers must have at least one parameter"); } if (doc_support) { @@ -4852,8 +4947,8 @@ void case_204() lexer.PropertyParsing = true; } -void case_206() -#line 1741 "cs-parser.jay" +void case_207() +#line 1756 "cs-parser.jay" { if (doc_support) current_property.DocComment = ConsumeStoredComment (); @@ -4862,28 +4957,28 @@ void case_206() current_property = null; } -void case_211() -#line 1757 "cs-parser.jay" +void case_212() +#line 1772 "cs-parser.jay" { if (yyToken == Token.CLOSE_BRACE) { - Report.Error (548, lexer.Location, "`{0}': property or indexer must have at least one accessor", current_property.GetSignatureForError ()); + report.Error (548, lexer.Location, "`{0}': property or indexer must have at least one accessor", current_property.GetSignatureForError ()); } else { if (yyToken == Token.SEMICOLON) - Report.Error (1597, lexer.Location, "Semicolon after method or accessor block is not valid"); + report.Error (1597, lexer.Location, "Semicolon after method or accessor block is not valid"); else - Report.Error (1014, GetLocation (yyVals[0+yyTop]), "A get or set accessor expected"); + report.Error (1014, GetLocation (yyVals[0+yyTop]), "A get or set accessor expected"); } } -void case_212() -#line 1771 "cs-parser.jay" +void case_213() +#line 1786 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); } if (current_property.Get != null) { - Report.Error (1007, GetLocation (yyVals[0+yyTop]), "Property accessor already defined"); + report.Error (1007, GetLocation (yyVals[0+yyTop]), "Property accessor already defined"); } if (current_property is Indexer) { @@ -4899,14 +4994,14 @@ void case_212() lexer.PropertyParsing = false; } -void case_213() -#line 1793 "cs-parser.jay" +void case_214() +#line 1808 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_property.Get.Block.StartLocation, + report.Error (531, current_property.Get.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Get.GetSignatureForError ()); } } @@ -4919,15 +5014,15 @@ void case_213() Lexer.doc_state = XmlCommentState.NotAllowed; } -void case_214() -#line 1814 "cs-parser.jay" +void case_215() +#line 1829 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); } if (current_property.Set != null) { - Report.Error (1007, GetLocation (yyVals[0+yyTop]), "Property accessor already defined"); + report.Error (1007, GetLocation (yyVals[0+yyTop]), "Property accessor already defined"); } if (current_property is Indexer) { @@ -4948,14 +5043,14 @@ void case_214() lexer.PropertyParsing = false; } -void case_215() -#line 1841 "cs-parser.jay" +void case_216() +#line 1856 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_property.Set.Block.StartLocation, + report.Error (531, current_property.Set.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Set.GetSignatureForError ()); } } @@ -4968,30 +5063,30 @@ void case_215() Lexer.doc_state = XmlCommentState.NotAllowed; } -void case_217() -#line 1863 "cs-parser.jay" +void case_218() +#line 1878 "cs-parser.jay" { lbag.AppendToMember (lbag.LastMember, GetLocation (yyVals[0+yyTop])); yyVal = null; } -void case_218() -#line 1868 "cs-parser.jay" +void case_219() +#line 1883 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } -void case_220() -#line 1883 "cs-parser.jay" +void case_221() +#line 1898 "cs-parser.jay" { MemberName name = MakeName ((MemberName) yyVals[0+yyTop]); push_current_class (new Interface (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]); lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); } -void case_221() -#line 1890 "cs-parser.jay" +void case_222() +#line 1905 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5003,23 +5098,23 @@ void case_221() } } -void case_222() -#line 1901 "cs-parser.jay" +void case_223() +#line 1916 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_223() -#line 1907 "cs-parser.jay" +void case_224() +#line 1922 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); yyVal = pop_current_class (); } -void case_239() -#line 1959 "cs-parser.jay" +void case_240() +#line 1974 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5042,15 +5137,15 @@ void case_239() current_local_parameters = null; } -void case_243() -#line 1990 "cs-parser.jay" +void case_244() +#line 2005 "cs-parser.jay" { - Report.Error (590, GetLocation (yyVals[0+yyTop]), "User-defined operators cannot return void"); + report.Error (590, GetLocation (yyVals[0+yyTop]), "User-defined operators cannot return void"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_245() -#line 2002 "cs-parser.jay" +void case_246() +#line 2017 "cs-parser.jay" { valid_param_mod = 0; @@ -5068,17 +5163,17 @@ void case_245() if (IsUnaryOperator (op)) { if (p_count == 2) { - Report.Error (1020, loc, "Overloadable binary operator expected"); + report.Error (1020, loc, "Overloadable binary operator expected"); } else if (p_count != 1) { - Report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter", + report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter", Operator.GetName (op)); } } else { if (p_count > 2) { - Report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters", + report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters", Operator.GetName (op)); } else if (p_count != 2) { - Report.Error (1019, loc, "Overloadable unary operator expected"); + report.Error (1019, loc, "Overloadable unary operator expected"); } } @@ -5091,8 +5186,8 @@ void case_245() lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_270() -#line 2078 "cs-parser.jay" +void case_271() +#line 2093 "cs-parser.jay" { valid_param_mod = 0; @@ -5108,8 +5203,8 @@ void case_270() lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_272() -#line 2097 "cs-parser.jay" +void case_273() +#line 2112 "cs-parser.jay" { valid_param_mod = 0; @@ -5125,24 +5220,24 @@ void case_272() lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_273() -#line 2112 "cs-parser.jay" +void case_274() +#line 2127 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; yyVal = new OperatorDeclaration (Operator.OpType.Implicit, null, GetLocation (yyVals[-1+yyTop])); } -void case_274() -#line 2118 "cs-parser.jay" +void case_275() +#line 2133 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; yyVal = new OperatorDeclaration (Operator.OpType.Explicit, null, GetLocation (yyVals[-1+yyTop])); } -void case_275() -#line 2128 "cs-parser.jay" +void case_276() +#line 2143 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5157,8 +5252,8 @@ void case_275() Lexer.doc_state = XmlCommentState.Allowed; } -void case_276() -#line 2147 "cs-parser.jay" +void case_277() +#line 2162 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5168,8 +5263,8 @@ void case_276() valid_param_mod = ParameterModifierType.All; } -void case_277() -#line 2156 "cs-parser.jay" +void case_278() +#line 2171 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5181,8 +5276,8 @@ void case_277() start_block (lexer.Location); } -void case_278() -#line 2167 "cs-parser.jay" +void case_279() +#line 2182 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5192,15 +5287,15 @@ void case_278() (Attributes) yyVals[-8+yyTop], current_local_parameters, ci, lt.Location); if (lt.Value != current_container.MemberName.Name) { - Report.Error (1520, c.Location, "Class, struct, or interface method must have a return type"); + report.Error (1520, c.Location, "Class, struct, or interface method must have a return type"); } else if ((mods & Modifiers.STATIC) != 0) { if ((mods & Modifiers.AccessibilityMask) != 0){ - Report.Error (515, c.Location, + report.Error (515, c.Location, "`{0}': static constructor cannot have an access modifier", c.GetSignatureForError ()); } if (ci != null) { - Report.Error (514, c.Location, + report.Error (514, c.Location, "`{0}': static constructor cannot have an explicit `this' or `base' constructor call", c.GetSignatureForError ()); @@ -5211,31 +5306,31 @@ void case_278() yyVal = c; } -void case_284() -#line 2212 "cs-parser.jay" +void case_285() +#line 2227 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_286() -#line 2222 "cs-parser.jay" +void case_287() +#line 2237 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_287() -#line 2228 "cs-parser.jay" +void case_288() +#line 2243 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_288() -#line 2236 "cs-parser.jay" +void case_289() +#line 2251 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5245,14 +5340,14 @@ void case_288() current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; } -void case_289() -#line 2245 "cs-parser.jay" +void case_290() +#line 2260 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ - Report.Error (574, lt.Location, "Name of destructor must match name of class"); + report.Error (574, lt.Location, "Name of destructor must match name of class"); } else if (current_container.Kind != MemberKind.Class){ - Report.Error (575, lt.Location, "Only class types can contain destructor"); + report.Error (575, lt.Location, "Only class types can contain destructor"); } Destructor d = new Destructor (current_class, (Modifiers) yyVals[-6+yyTop], @@ -5267,22 +5362,22 @@ void case_289() current_local_parameters = null; } -void case_290() -#line 2270 "cs-parser.jay" +void case_291() +#line 2285 "cs-parser.jay" { current_event_field = new EventField (current_class, (FullNamedExpression) yyVals[-1+yyTop], (Modifiers) yyVals[-3+yyTop], (MemberName) yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop]); current_container.AddEvent (current_event_field); if (current_event_field.MemberName.Left != null) { - Report.Error (71, current_event_field.Location, "`{0}': An explicit interface implementation of an event must use property syntax", + report.Error (71, current_event_field.Location, "`{0}': An explicit interface implementation of an event must use property syntax", current_event_field.GetSignatureForError ()); } yyVal = current_event_field; } -void case_291() -#line 2284 "cs-parser.jay" +void case_292() +#line 2299 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5293,8 +5388,8 @@ void case_291() current_event_field = null; } -void case_292() -#line 2297 "cs-parser.jay" +void case_293() +#line 2312 "cs-parser.jay" { current_event = new EventProperty (current_class, (FullNamedExpression) yyVals[-2+yyTop], (Modifiers) yyVals[-4+yyTop], (MemberName) yyVals[-1+yyTop], (Attributes) yyVals[-5+yyTop]); current_container.AddEvent (current_event); @@ -5303,17 +5398,17 @@ void case_292() lexer.EventParsing = true; } -void case_293() -#line 2305 "cs-parser.jay" +void case_294() +#line 2320 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) - Report.Error (69, GetLocation (yyVals[-2+yyTop]), "Event in interface cannot have add or remove accessors"); + report.Error (69, GetLocation (yyVals[-2+yyTop]), "Event in interface cannot have add or remove accessors"); lexer.EventParsing = false; } -void case_294() -#line 2312 "cs-parser.jay" +void case_295() +#line 2327 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5325,23 +5420,23 @@ void case_294() current_local_parameters = null; } -void case_297() -#line 2331 "cs-parser.jay" +void case_298() +#line 2346 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } -void case_302() -#line 2355 "cs-parser.jay" +void case_303() +#line 2370 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_304() -#line 2365 "cs-parser.jay" +void case_305() +#line 2380 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5349,46 +5444,46 @@ void case_304() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_305() -#line 2374 "cs-parser.jay" +void case_306() +#line 2389 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { - Report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", + report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", current_event_field.GetSignatureForError ()); } if ((current_event_field.ModFlags & Modifiers.ABSTRACT) != 0) { - Report.Error (74, lexer.Location, "`{0}': abstract event cannot have an initializer", + report.Error (74, lexer.Location, "`{0}': abstract event cannot have an initializer", current_event_field.GetSignatureForError ()); } } -void case_309() -#line 2395 "cs-parser.jay" +void case_310() +#line 2410 "cs-parser.jay" { - Report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", + report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } -void case_310() -#line 2400 "cs-parser.jay" +void case_311() +#line 2415 "cs-parser.jay" { - Report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", + report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } -void case_311() -#line 2405 "cs-parser.jay" +void case_312() +#line 2420 "cs-parser.jay" { - Report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); + report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } -void case_312() -#line 2413 "cs-parser.jay" +void case_313() +#line 2428 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { - Report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); + report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); } current_event.Add = new EventProperty.AddDelegateMethod (current_event, (Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop])); @@ -5398,26 +5493,26 @@ void case_312() lexer.EventParsing = false; } -void case_313() -#line 2425 "cs-parser.jay" +void case_314() +#line 2440 "cs-parser.jay" { lexer.EventParsing = true; current_event.Add.Block = (ToplevelBlock) yyVals[0+yyTop]; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_event.Add.Block.StartLocation, + report.Error (531, current_event.Add.Block.StartLocation, "`{0}': interface members cannot have a definition", current_event.Add.GetSignatureForError ()); } current_local_parameters = null; } -void case_314() -#line 2441 "cs-parser.jay" +void case_315() +#line 2456 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { - Report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); + report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); } current_event.Remove = new EventProperty.RemoveDelegateMethod (current_event, (Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop])); @@ -5427,59 +5522,59 @@ void case_314() lexer.EventParsing = false; } -void case_315() -#line 2453 "cs-parser.jay" +void case_316() +#line 2468 "cs-parser.jay" { lexer.EventParsing = true; current_event.Remove.Block = (ToplevelBlock) yyVals[0+yyTop]; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_event.Remove.Block.StartLocation, + report.Error (531, current_event.Remove.Block.StartLocation, "`{0}': interface members cannot have a definition", current_event.Remove.GetSignatureForError ()); } current_local_parameters = null; } -void case_316() -#line 2469 "cs-parser.jay" +void case_317() +#line 2484 "cs-parser.jay" { - Report.Error (73, lexer.Location, "An add or remove accessor must have a body"); + report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } -void case_318() -#line 2481 "cs-parser.jay" +void case_319() +#line 2496 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } -void case_319() -#line 2486 "cs-parser.jay" +void case_320() +#line 2501 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; MemberName name = (MemberName) yyVals[-3+yyTop]; if (name.IsGeneric) { - Report.Error (1675, name.Location, "Enums cannot have type parameters"); + report.Error (1675, name.Location, "Enums cannot have type parameters"); } push_current_class (new Enum (current_namespace, current_class, (TypeExpression) yyVals[-2+yyTop], (Modifiers) yyVals[-5+yyTop], MakeName (name), (Attributes) yyVals[-6+yyTop]), null); } -void case_320() -#line 2498 "cs-parser.jay" +void case_321() +#line 2513 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_321() -#line 2504 "cs-parser.jay" +void case_322() +#line 2519 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5493,34 +5588,34 @@ void case_321() yyVal = pop_current_class (); } -void case_323() -#line 2521 "cs-parser.jay" +void case_324() +#line 2536 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { - Enum.Error_1008 (GetLocation (yyVals[0+yyTop]), Report); + Enum.Error_1008 (GetLocation (yyVals[0+yyTop]), report); yyVal = null; } else { yyVal = yyVals[0+yyTop]; } } -void case_324() -#line 2531 "cs-parser.jay" +void case_325() +#line 2546 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } -void case_329() -#line 2549 "cs-parser.jay" +void case_330() +#line 2564 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } -void case_330() -#line 2557 "cs-parser.jay" +void case_331() +#line 2572 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var em = new EnumMember ((Enum) current_class, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-1+yyTop]); @@ -5534,8 +5629,8 @@ void case_330() yyVal = em; } -void case_331() -#line 2570 "cs-parser.jay" +void case_332() +#line 2585 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5544,8 +5639,8 @@ void case_331() } } -void case_332() -#line 2578 "cs-parser.jay" +void case_333() +#line 2593 "cs-parser.jay" { --lexer.parsing_block; @@ -5560,8 +5655,8 @@ void case_332() yyVal = em; } -void case_334() -#line 2603 "cs-parser.jay" +void case_335() +#line 2618 "cs-parser.jay" { valid_param_mod = 0; @@ -5578,8 +5673,8 @@ void case_334() lexer.ConstraintsParsing = true; } -void case_336() -#line 2623 "cs-parser.jay" +void case_337() +#line 2638 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5594,8 +5689,8 @@ void case_336() current_delegate = null; } -void case_338() -#line 2641 "cs-parser.jay" +void case_339() +#line 2656 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5603,8 +5698,8 @@ void case_338() yyVal = ComposedTypeSpecifier.CreateNullable (GetLocation (yyVals[0+yyTop])); } -void case_340() -#line 2652 "cs-parser.jay" +void case_341() +#line 2667 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5612,23 +5707,23 @@ void case_340() yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location); } -void case_342() -#line 2663 "cs-parser.jay" +void case_343() +#line 2678 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_343() -#line 2672 "cs-parser.jay" +void case_344() +#line 2687 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_345() -#line 2684 "cs-parser.jay" +void case_346() +#line 2699 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5636,39 +5731,39 @@ void case_345() yyVal = yyVals[-1+yyTop]; } -void case_346() -#line 2691 "cs-parser.jay" +void case_347() +#line 2706 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } -void case_347() -#line 2699 "cs-parser.jay" +void case_348() +#line 2714 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = type_args; } -void case_348() -#line 2705 "cs-parser.jay" +void case_349() +#line 2720 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = type_args; } -void case_350() -#line 2721 "cs-parser.jay" +void case_351() +#line 2736 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_351() -#line 2730 "cs-parser.jay" +void case_352() +#line 2745 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5676,38 +5771,38 @@ void case_351() mn.GetSignatureForError ())); } -void case_353() -#line 2741 "cs-parser.jay" +void case_354() +#line 2756 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location); } -void case_354() -#line 2750 "cs-parser.jay" +void case_355() +#line 2765 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } -void case_355() -#line 2755 "cs-parser.jay" +void case_356() +#line 2770 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } -void case_356() -#line 2763 "cs-parser.jay" +void case_357() +#line 2778 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_357() -#line 2769 "cs-parser.jay" +void case_358() +#line 2784 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5716,16 +5811,16 @@ void case_357() lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_358() -#line 2777 "cs-parser.jay" +void case_359() +#line 2792 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_360() -#line 2787 "cs-parser.jay" +void case_361() +#line 2802 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5734,16 +5829,16 @@ void case_360() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_361() -#line 2798 "cs-parser.jay" +void case_362() +#line 2813 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); yyVal = type_args; } -void case_362() -#line 2804 "cs-parser.jay" +void case_363() +#line 2819 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5751,47 +5846,47 @@ void case_362() lbag.AddLocation (yyVals[0+yyTop], GetLocation (yyVals[0+yyTop])); } -void case_363() -#line 2814 "cs-parser.jay" +void case_364() +#line 2829 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new TypeParameterName (lt.Value, (Attributes)yyVals[-2+yyTop], (Variance) yyVals[-1+yyTop], lt.Location); } -void case_364() -#line 2819 "cs-parser.jay" +void case_365() +#line 2834 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") - Report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); + report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); else Error_SyntaxError (yyToken); yyVal = new TypeParameterName ("", null, lexer.Location); } -void case_369() -#line 2853 "cs-parser.jay" +void case_370() +#line 2868 "cs-parser.jay" { - Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), Report); + Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_371() -#line 2862 "cs-parser.jay" +void case_372() +#line 2877 "cs-parser.jay" { - Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), Report); + Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_373() -#line 2871 "cs-parser.jay" +void case_374() +#line 2886 "cs-parser.jay" { - Report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); + report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_376() -#line 2887 "cs-parser.jay" +void case_377() +#line 2902 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -5805,92 +5900,92 @@ void case_376() } } -void case_378() -#line 2904 "cs-parser.jay" +void case_379() +#line 2919 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_381() -#line 2920 "cs-parser.jay" +void case_382() +#line 2935 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = types; } -void case_382() -#line 2926 "cs-parser.jay" +void case_383() +#line 2941 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = types; } -void case_383() -#line 2935 "cs-parser.jay" +void case_384() +#line 2950 "cs-parser.jay" { if (yyVals[0+yyTop] is ComposedCast) { - Report.Error (1521, GetLocation (yyVals[0+yyTop]), "Invalid base type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ()); + report.Error (1521, GetLocation (yyVals[0+yyTop]), "Invalid base type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ()); } yyVal = yyVals[0+yyTop]; } -void case_384() -#line 2942 "cs-parser.jay" +void case_385() +#line 2957 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } -void case_421() -#line 3004 "cs-parser.jay" +void case_422() +#line 3019 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_422() -#line 3008 "cs-parser.jay" +void case_423() +#line 3023 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } -void case_433() -#line 3049 "cs-parser.jay" +void case_434() +#line 3064 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_435() -#line 3061 "cs-parser.jay" +void case_436() +#line 3076 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_436() -#line 3067 "cs-parser.jay" +void case_437() +#line 3082 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_437() -#line 3073 "cs-parser.jay" +void case_438() +#line 3088 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_438() -#line 3079 "cs-parser.jay" +void case_439() +#line 3094 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5898,29 +5993,29 @@ void case_438() yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location); } -void case_440() -#line 3088 "cs-parser.jay" +void case_441() +#line 3103 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } -void case_442() -#line 3096 "cs-parser.jay" +void case_443() +#line 3111 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } -void case_443() -#line 3104 "cs-parser.jay" +void case_444() +#line 3119 "cs-parser.jay" { yyVal = new Invocation ((Expression) yyVals[-3+yyTop], (Arguments) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_446() -#line 3117 "cs-parser.jay" +void case_447() +#line 3132 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -5931,46 +6026,46 @@ void case_446() } } -void case_447() -#line 3127 "cs-parser.jay" +void case_448() +#line 3142 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_450() -#line 3143 "cs-parser.jay" +void case_451() +#line 3158 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); yyVal = a; } -void case_451() -#line 3149 "cs-parser.jay" +void case_452() +#line 3164 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); yyVal = a; } -void case_452() -#line 3154 "cs-parser.jay" +void case_453() +#line 3169 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } -void case_453() -#line 3162 "cs-parser.jay" +void case_454() +#line 3177 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_455() -#line 3171 "cs-parser.jay" +void case_456() +#line 3186 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -5979,8 +6074,8 @@ void case_455() yyVal = new CompletionElementInitializer (csn.Prefix, csn.Location); } -void case_456() -#line 3179 "cs-parser.jay" +void case_457() +#line 3194 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -5988,23 +6083,23 @@ void case_456() yyVal = new CollectionElementInitializer ((List)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_457() -#line 3186 "cs-parser.jay" +void case_458() +#line 3201 "cs-parser.jay" { - Report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); + report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } -void case_462() -#line 3204 "cs-parser.jay" +void case_463() +#line 3219 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); yyVal = list; } -void case_463() -#line 3210 "cs-parser.jay" +void case_464() +#line 3225 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6015,15 +6110,15 @@ void case_463() yyVal = list; } -void case_464() -#line 3220 "cs-parser.jay" +void case_465() +#line 3235 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; for (int i = 0; i < list.Count; ++i) { NamedArgument na = list [i] as NamedArgument; if (na != null && na.Name == a.Name) - Report.Error (1740, na.Location, "Named argument `{0}' specified multiple times", + report.Error (1740, na.Location, "Named argument `{0}' specified multiple times", na.Name); } @@ -6032,65 +6127,65 @@ void case_464() yyVal = list; } -void case_465() -#line 3235 "cs-parser.jay" +void case_466() +#line 3250 "cs-parser.jay" { - Report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); + report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } -void case_466() -#line 3240 "cs-parser.jay" +void case_467() +#line 3255 "cs-parser.jay" { - Report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); + report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } -void case_471() -#line 3261 "cs-parser.jay" +void case_472() +#line 3276 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_472() -#line 3266 "cs-parser.jay" +void case_473() +#line 3281 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_473() -#line 3271 "cs-parser.jay" +void case_474() +#line 3286 "cs-parser.jay" { yyVal = new Argument (new Arglist ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]))); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_474() -#line 3276 "cs-parser.jay" +void case_475() +#line 3291 "cs-parser.jay" { yyVal = new Argument (new Arglist (GetLocation (yyVals[-2+yyTop]))); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_476() -#line 3288 "cs-parser.jay" +void case_477() +#line 3303 "cs-parser.jay" { yyVal = new ElementAccess ((Expression) yyVals[-3+yyTop], (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_477() -#line 3296 "cs-parser.jay" +void case_478() +#line 3311 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); yyVal = list; } -void case_478() -#line 3302 "cs-parser.jay" +void case_479() +#line 3317 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6098,23 +6193,23 @@ void case_478() yyVal = list; } -void case_479() -#line 3308 "cs-parser.jay" +void case_480() +#line 3323 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } -void case_480() -#line 3316 "cs-parser.jay" +void case_481() +#line 3331 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); yyVal = args; } -void case_481() -#line 3322 "cs-parser.jay" +void case_482() +#line 3337 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6125,22 +6220,22 @@ void case_481() yyVal = args; } -void case_485() -#line 3350 "cs-parser.jay" +void case_486() +#line 3365 "cs-parser.jay" { yyVal = new ElementAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_486() -#line 3355 "cs-parser.jay" +void case_487() +#line 3370 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } -void case_489() -#line 3377 "cs-parser.jay" +void case_490() +#line 3392 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6154,8 +6249,8 @@ void case_489() lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_490() -#line 3390 "cs-parser.jay" +void case_491() +#line 3405 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6163,8 +6258,8 @@ void case_490() yyVal = new NewInitialize ((FullNamedExpression) yyVals[-1+yyTop], null, (CollectionOrObjectInitializers) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_491() -#line 3402 "cs-parser.jay" +void case_492() +#line 3417 "cs-parser.jay" { yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], (List) yyVals[-3+yyTop], new ComposedTypeSpecifier (((List) yyVals[-3+yyTop]).Count, GetLocation (yyVals[-4+yyTop])) { @@ -6173,17 +6268,17 @@ void case_491() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_492() -#line 3410 "cs-parser.jay" +void case_493() +#line 3425 "cs-parser.jay" { if (yyVals[0+yyTop] == null) - Report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); + report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-2+yyTop], (ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); } -void case_493() -#line 3417 "cs-parser.jay" +void case_494() +#line 3432 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6191,29 +6286,29 @@ void case_493() yyVal = new ImplicitlyTypedArrayCreation ((ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_494() -#line 3424 "cs-parser.jay" +void case_495() +#line 3439 "cs-parser.jay" { - Report.Error (178, GetLocation (yyVals[-1+yyTop]), "Invalid rank specifier, expecting `,' or `]'"); + report.Error (178, GetLocation (yyVals[-1+yyTop]), "Invalid rank specifier, expecting `,' or `]'"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], null, GetLocation (yyVals[-6+yyTop])); } -void case_495() -#line 3429 "cs-parser.jay" +void case_496() +#line 3444 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } -void case_497() -#line 3440 "cs-parser.jay" +void case_498() +#line 3455 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } -void case_498() -#line 3448 "cs-parser.jay" +void case_499() +#line 3463 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6224,76 +6319,76 @@ void case_498() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_503() -#line 3471 "cs-parser.jay" +void case_504() +#line 3486 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); yyVal = a; } -void case_504() -#line 3477 "cs-parser.jay" +void case_505() +#line 3492 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); yyVal = a; } -void case_505() -#line 3486 "cs-parser.jay" +void case_506() +#line 3501 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_506() -#line 3492 "cs-parser.jay" +void case_507() +#line 3507 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), lt.Value, lt.Location); } -void case_507() -#line 3498 "cs-parser.jay" +void case_508() +#line 3513 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } -void case_508() -#line 3503 "cs-parser.jay" +void case_509() +#line 3518 "cs-parser.jay" { - Report.Error (746, lexer.Location, + report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); yyVal = null; } -void case_512() -#line 3518 "cs-parser.jay" +void case_513() +#line 3533 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_513() -#line 3526 "cs-parser.jay" +void case_514() +#line 3541 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_514() -#line 3531 "cs-parser.jay" +void case_515() +#line 3546 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_519() -#line 3561 "cs-parser.jay" +void case_520() +#line 3576 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6301,8 +6396,8 @@ void case_519() yyVal = ai; } -void case_520() -#line 3568 "cs-parser.jay" +void case_521() +#line 3583 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6314,16 +6409,16 @@ void case_520() yyVal = ai; } -void case_521() -#line 3582 "cs-parser.jay" +void case_522() +#line 3597 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); yyVal = list; } -void case_522() -#line 3588 "cs-parser.jay" +void case_523() +#line 3603 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6331,31 +6426,31 @@ void case_522() yyVal = list; } -void case_524() -#line 3602 "cs-parser.jay" +void case_525() +#line 3617 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_527() -#line 3613 "cs-parser.jay" +void case_528() +#line 3628 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } -void case_528() -#line 3621 "cs-parser.jay" +void case_529() +#line 3636 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (int) yyVals[0+yyTop], lt.Location); } -void case_529() -#line 3627 "cs-parser.jay" +void case_530() +#line 3642 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6363,24 +6458,24 @@ void case_529() yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) yyVals[0+yyTop], lt1.Location); } -void case_530() -#line 3634 "cs-parser.jay" +void case_531() +#line 3649 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location); } -void case_531() -#line 3640 "cs-parser.jay" +void case_532() +#line 3655 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (int) yyVals[0+yyTop], lt.Location); } -void case_532() -#line 3646 "cs-parser.jay" +void case_533() +#line 3661 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6390,8 +6485,8 @@ void case_532() yyVal = new MemberAccess (te, lt.Value, (int) yyVals[0+yyTop], lt.Location); } -void case_533() -#line 3658 "cs-parser.jay" +void case_534() +#line 3673 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6399,8 +6494,8 @@ void case_533() yyVal = yyVals[0+yyTop]; } -void case_534() -#line 3668 "cs-parser.jay" +void case_535() +#line 3683 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6409,43 +6504,56 @@ void case_534() yyVal = lt; } -void case_535() -#line 3679 "cs-parser.jay" +void case_536() +#line 3694 "cs-parser.jay" { yyVal = new SizeOf ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_536() -#line 3687 "cs-parser.jay" +void case_537() +#line 3702 "cs-parser.jay" { yyVal = new CheckedExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_537() -#line 3695 "cs-parser.jay" +void case_538() +#line 3710 "cs-parser.jay" { yyVal = new UnCheckedExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_538() -#line 3703 "cs-parser.jay" +void case_539() +#line 3718 "cs-parser.jay" { - var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; - yyVal = new MemberAccess (new Indirection ((Expression) yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])), lt.Value, lt.Location); + var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; + yyVal = new MemberAccess (new Indirection ((Expression) yyVals[-3+yyTop], GetLocation (yyVals[-2+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location); } -void case_544() -#line 3734 "cs-parser.jay" +void case_541() +#line 3730 "cs-parser.jay" +{ + yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); + if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { + lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), savedOpenLocation, savedCloseLocation); + } else { + lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop])); + } + } + +void case_545() +#line 3754 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; + savedOpenLocation = GetLocation (yyVals[-3+yyTop]); + savedCloseLocation = GetLocation (yyVals[-2+yyTop]); } -void case_545() -#line 3742 "cs-parser.jay" +void case_546() +#line 3764 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6454,141 +6562,141 @@ void case_545() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_550() -#line 3766 "cs-parser.jay" +void case_551() +#line 3788 "cs-parser.jay" { yyVal = new Cast ((FullNamedExpression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_559() -#line 3807 "cs-parser.jay" +void case_560() +#line 3829 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_560() -#line 3812 "cs-parser.jay" +void case_561() +#line 3834 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_561() -#line 3817 "cs-parser.jay" +void case_562() +#line 3839 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_563() -#line 3826 "cs-parser.jay" +void case_564() +#line 3848 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_565() -#line 3835 "cs-parser.jay" +void case_566() +#line 3857 "cs-parser.jay" { /* Shift/Reduce conflict*/ yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_569() -#line 3852 "cs-parser.jay" +void case_570() +#line 3874 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_570() -#line 3857 "cs-parser.jay" +void case_571() +#line 3879 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_572() -#line 3866 "cs-parser.jay" +void case_573() +#line 3888 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_573() -#line 3871 "cs-parser.jay" +void case_574() +#line 3893 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_574() -#line 3876 "cs-parser.jay" +void case_575() +#line 3898 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_575() -#line 3881 "cs-parser.jay" +void case_576() +#line 3903 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_577() -#line 3890 "cs-parser.jay" +void case_578() +#line 3912 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_578() -#line 3895 "cs-parser.jay" +void case_579() +#line 3917 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_580() -#line 3904 "cs-parser.jay" +void case_581() +#line 3926 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_582() -#line 3913 "cs-parser.jay" +void case_583() +#line 3935 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_584() -#line 3922 "cs-parser.jay" +void case_585() +#line 3944 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_586() -#line 3931 "cs-parser.jay" +void case_587() +#line 3953 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_588() -#line 3940 "cs-parser.jay" +void case_589() +#line 3962 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_590() -#line 3949 "cs-parser.jay" +void case_591() +#line 3971 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6596,85 +6704,85 @@ void case_590() yyVal = new Nullable.NullCoalescingOperator ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_592() -#line 3960 "cs-parser.jay" +void case_593() +#line 3982 "cs-parser.jay" { yyVal = new Conditional (new BooleanExpression ((Expression) yyVals[-4+yyTop]), (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_594() -#line 3972 "cs-parser.jay" +void case_595() +#line 3994 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_595() -#line 3977 "cs-parser.jay" +void case_596() +#line 3999 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_596() -#line 3982 "cs-parser.jay" +void case_597() +#line 4004 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_597() -#line 3987 "cs-parser.jay" +void case_598() +#line 4009 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_598() -#line 3992 "cs-parser.jay" +void case_599() +#line 4014 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_599() -#line 3997 "cs-parser.jay" +void case_600() +#line 4019 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_600() -#line 4002 "cs-parser.jay" +void case_601() +#line 4024 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_601() -#line 4007 "cs-parser.jay" +void case_602() +#line 4029 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_602() -#line 4012 "cs-parser.jay" +void case_603() +#line 4034 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_603() -#line 4017 "cs-parser.jay" +void case_604() +#line 4039 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_604() -#line 4025 "cs-parser.jay" +void case_605() +#line 4047 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6682,51 +6790,51 @@ void case_604() yyVal = pars; } -void case_605() -#line 4032 "cs-parser.jay" +void case_606() +#line 4054 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; if (pars[0].GetType () != p.GetType ()) { - Report.Error (748, p.Location, "All lambda parameters must be typed either explicitly or implicitly"); + report.Error (748, p.Location, "All lambda parameters must be typed either explicitly or implicitly"); } pars.Add (p); yyVal = pars; } -void case_606() -#line 4046 "cs-parser.jay" +void case_607() +#line 4068 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], null, lt.Location); } -void case_607() -#line 4052 "cs-parser.jay" +void case_608() +#line 4074 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, Parameter.Modifier.NONE, null, lt.Location); } -void case_608() -#line 4058 "cs-parser.jay" +void case_609() +#line 4080 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } -void case_610() -#line 4066 "cs-parser.jay" +void case_611() +#line 4088 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } -void case_614() -#line 4082 "cs-parser.jay" +void case_615() +#line 4104 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6734,30 +6842,30 @@ void case_614() yyVal = b; } -void case_616() -#line 4093 "cs-parser.jay" +void case_617() +#line 4115 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } -void case_617() -#line 4101 "cs-parser.jay" +void case_618() +#line 4123 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); start_anonymous (true, new ParametersCompiled (p), GetLocation (yyVals[-1+yyTop])); } -void case_618() -#line 4107 "cs-parser.jay" +void case_619() +#line 4129 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_619() -#line 4112 "cs-parser.jay" +void case_620() +#line 4134 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "lambda expressions"); @@ -6765,43 +6873,43 @@ void case_619() valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } -void case_620() -#line 4119 "cs-parser.jay" +void case_621() +#line 4141 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop])); } -void case_621() -#line 4124 "cs-parser.jay" +void case_622() +#line 4146 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_628() -#line 4147 "cs-parser.jay" +void case_629() +#line 4169 "cs-parser.jay" { yyVal = new RefValueExpr ((Expression) yyVals[-3+yyTop], (FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-5+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_629() -#line 4152 "cs-parser.jay" +void case_630() +#line 4174 "cs-parser.jay" { yyVal = new RefTypeExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_630() -#line 4157 "cs-parser.jay" +void case_631() +#line 4179 "cs-parser.jay" { yyVal = new MakeRefExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_634() -#line 4186 "cs-parser.jay" +void case_635() +#line 4208 "cs-parser.jay" { MemberName name = MakeName ((MemberName) yyVals[0+yyTop]); Class c = new Class (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]); @@ -6812,8 +6920,8 @@ void case_634() push_current_class (c, yyVals[-3+yyTop]); } -void case_635() -#line 4197 "cs-parser.jay" +void case_636() +#line 4219 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -6826,142 +6934,142 @@ void case_635() } } -void case_636() -#line 4209 "cs-parser.jay" +void case_637() +#line 4231 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_637() -#line 4215 "cs-parser.jay" +void case_638() +#line 4237 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); yyVal = pop_current_class (); } -void case_640() -#line 4230 "cs-parser.jay" +void case_641() +#line 4252 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } -void case_643() -#line 4240 "cs-parser.jay" +void case_644() +#line 4262 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; if ((m1 & m2) != 0) { - Report.Error (1004, lexer.Location - ModifiersExtensions.Name (m2).Length, + report.Error (1004, lexer.Location - ModifiersExtensions.Name (m2).Length, "Duplicate `{0}' modifier", ModifiersExtensions.Name (m2)); } else if ((m2 & Modifiers.AccessibilityMask) != 0 && (m1 & Modifiers.AccessibilityMask) != 0 && ((m2 | m1 & Modifiers.AccessibilityMask) != (Modifiers.PROTECTED | Modifiers.INTERNAL))) { - Report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length, + report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length, "More than one protection modifier specified"); } yyVal = m1 | m2; } -void case_644() -#line 4259 "cs-parser.jay" +void case_645() +#line 4281 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); if (current_container == module) - Report.Error (1530, GetLocation (yyVals[0+yyTop]), "Keyword `new' is not allowed on namespace elements"); + report.Error (1530, GetLocation (yyVals[0+yyTop]), "Keyword `new' is not allowed on namespace elements"); } -void case_645() -#line 4267 "cs-parser.jay" +void case_646() +#line 4289 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_646() -#line 4272 "cs-parser.jay" +void case_647() +#line 4294 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_647() -#line 4277 "cs-parser.jay" +void case_648() +#line 4299 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_648() -#line 4282 "cs-parser.jay" +void case_649() +#line 4304 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_649() -#line 4287 "cs-parser.jay" +void case_650() +#line 4309 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_650() -#line 4292 "cs-parser.jay" +void case_651() +#line 4314 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_651() -#line 4297 "cs-parser.jay" +void case_652() +#line 4319 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_652() -#line 4302 "cs-parser.jay" +void case_653() +#line 4324 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_653() -#line 4307 "cs-parser.jay" +void case_654() +#line 4329 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_654() -#line 4312 "cs-parser.jay" +void case_655() +#line 4334 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_655() -#line 4317 "cs-parser.jay" +void case_656() +#line 4339 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_656() -#line 4322 "cs-parser.jay" +void case_657() +#line 4344 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_657() -#line 4327 "cs-parser.jay" +void case_658() +#line 4349 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -6969,37 +7077,37 @@ void case_657() Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } -void case_658() -#line 4334 "cs-parser.jay" +void case_659() +#line 4356 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_663() -#line 4355 "cs-parser.jay" +void case_664() +#line 4377 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_664() -#line 4363 "cs-parser.jay" +void case_665() +#line 4385 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); yyVal = constraints; } -void case_665() -#line 4369 "cs-parser.jay" +void case_666() +#line 4391 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; foreach (Constraints c in constraints) { if (new_constraint.TypeParameter.Value == c.TypeParameter.Value) { - Report.Error (409, new_constraint.Location, + report.Error (409, new_constraint.Location, "A constraint clause has already been specified for type parameter `{0}'", new_constraint.TypeParameter.Value); } @@ -7009,38 +7117,38 @@ void case_665() yyVal = constraints; } -void case_666() -#line 4388 "cs-parser.jay" +void case_667() +#line 4410 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); } -void case_667() -#line 4396 "cs-parser.jay" +void case_668() +#line 4418 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = constraints; } -void case_668() -#line 4402 "cs-parser.jay" +void case_669() +#line 4424 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; if (prev != null && (prev.Constraint & SpecialConstraint.Constructor) != 0) { - Report.Error (401, GetLocation (yyVals[-1+yyTop]), "The `new()' constraint must be the last constraint specified"); + report.Error (401, GetLocation (yyVals[-1+yyTop]), "The `new()' constraint must be the last constraint specified"); } prev = yyVals[0+yyTop] as SpecialContraintExpr; if (prev != null) { if ((prev.Constraint & (SpecialConstraint.Class | SpecialConstraint.Struct)) != 0) { - Report.Error (449, prev.Location, "The `class' or `struct' constraint must be the first constraint specified"); + report.Error (449, prev.Location, "The `class' or `struct' constraint must be the first constraint specified"); } else { prev = constraints [0] as SpecialContraintExpr; if (prev != null && (prev.Constraint & SpecialConstraint.Struct) != 0) { - Report.Error (451, GetLocation (yyVals[0+yyTop]), "The `new()' constraint cannot be used with the `struct' constraint"); + report.Error (451, GetLocation (yyVals[0+yyTop]), "The `new()' constraint cannot be used with the `struct' constraint"); } } } @@ -7049,24 +7157,24 @@ void case_668() yyVal = constraints; } -void case_669() -#line 4428 "cs-parser.jay" +void case_670() +#line 4450 "cs-parser.jay" { if (yyVals[0+yyTop] is ComposedCast) - Report.Error (706, GetLocation (yyVals[0+yyTop]), "Invalid constraint type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ()); + report.Error (706, GetLocation (yyVals[0+yyTop]), "Invalid constraint type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ()); yyVal = yyVals[0+yyTop]; } -void case_670() -#line 4435 "cs-parser.jay" +void case_671() +#line 4457 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Constructor, GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_674() -#line 4455 "cs-parser.jay" +void case_675() +#line 4477 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7074,78 +7182,78 @@ void case_674() yyVal = yyVals[0+yyTop]; } -void case_677() -#line 4489 "cs-parser.jay" +void case_678() +#line 4511 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } -void case_679() -#line 4501 "cs-parser.jay" +void case_680() +#line 4523 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } -void case_680() -#line 4506 "cs-parser.jay" +void case_681() +#line 4528 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } -void case_681() -#line 4515 "cs-parser.jay" +void case_682() +#line 4537 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } -void case_682() -#line 4520 "cs-parser.jay" +void case_683() +#line 4542 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } -void case_690() -#line 4547 "cs-parser.jay" +void case_691() +#line 4569 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_723() -#line 4611 "cs-parser.jay" +void case_724() +#line 4633 "cs-parser.jay" { - Report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); + report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } -void case_724() -#line 4616 "cs-parser.jay" +void case_725() +#line 4638 "cs-parser.jay" { - Report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); + report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } -void case_725() -#line 4621 "cs-parser.jay" +void case_726() +#line 4643 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_726() -#line 4629 "cs-parser.jay" +void case_727() +#line 4651 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } -void case_727() -#line 4637 "cs-parser.jay" +void case_728() +#line 4659 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7154,8 +7262,8 @@ void case_727() current_block.AddStatement (labeled); } -void case_730() -#line 4650 "cs-parser.jay" +void case_731() +#line 4672 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7163,8 +7271,8 @@ void case_730() yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_731() -#line 4666 "cs-parser.jay" +void case_732() +#line 4688 "cs-parser.jay" { /* Ok, the above "primary_expression" is there to get rid of*/ /* both reduce/reduce and shift/reduces in the grammar, it should*/ @@ -7195,8 +7303,8 @@ void case_731() } } -void case_732() -#line 4696 "cs-parser.jay" +void case_733() +#line 4718 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7208,8 +7316,8 @@ void case_732() } } -void case_733() -#line 4707 "cs-parser.jay" +void case_734() +#line 4729 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7217,22 +7325,22 @@ void case_733() yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_736() -#line 4722 "cs-parser.jay" +void case_737() +#line 4744 "cs-parser.jay" { - Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), Report); + Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_738() -#line 4731 "cs-parser.jay" +void case_739() +#line 4753 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_740() -#line 4746 "cs-parser.jay" +void case_741() +#line 4768 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7240,16 +7348,16 @@ void case_740() current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_741() -#line 4753 "cs-parser.jay" +void case_742() +#line 4775 "cs-parser.jay" { yyVal = current_variable; current_variable = null; lbag.AppendTo (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_742() -#line 4759 "cs-parser.jay" +void case_743() +#line 4781 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7257,8 +7365,8 @@ void case_742() current_variable = new BlockConstantDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_743() -#line 4766 "cs-parser.jay" +void case_744() +#line 4788 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7269,26 +7377,26 @@ void case_743() current_variable = null; } -void case_745() -#line 4780 "cs-parser.jay" +void case_746() +#line 4802 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } -void case_746() -#line 4785 "cs-parser.jay" +void case_747() +#line 4807 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { - Report.Error (650, lexer.Location, + report.Error (650, lexer.Location, "Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type"); } else { Error_SyntaxError (yyToken); } } -void case_751() -#line 4807 "cs-parser.jay" +void case_752() +#line 4829 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7298,8 +7406,8 @@ void case_751() lbag.AddLocation (d, GetLocation (yyVals[-1+yyTop])); } -void case_752() -#line 4816 "cs-parser.jay" +void case_753() +#line 4838 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7309,15 +7417,15 @@ void case_752() lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_754() -#line 4832 "cs-parser.jay" +void case_755() +#line 4854 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } -void case_759() -#line 4850 "cs-parser.jay" +void case_760() +#line 4872 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7327,41 +7435,41 @@ void case_759() lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_761() -#line 4863 "cs-parser.jay" +void case_762() +#line 4885 "cs-parser.jay" { yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_762() -#line 4868 "cs-parser.jay" +void case_763() +#line 4890 "cs-parser.jay" { - Report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type"); + report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type"); yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop])); } -void case_763() -#line 4876 "cs-parser.jay" +void case_764() +#line 4898 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_767() -#line 4894 "cs-parser.jay" +void case_768() +#line 4916 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { - Expression.Error_InvalidExpressionStatement (Report, GetLocation (yyVals[0+yyTop])); + Expression.Error_InvalidExpressionStatement (report, GetLocation (yyVals[0+yyTop])); s = EmptyExpressionStatement.Instance; } yyVal = new StatementExpression (s); } -void case_768() -#line 4907 "cs-parser.jay" +void case_769() +#line 4929 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7370,15 +7478,15 @@ void case_768() yyVal = new StatementExpression (s); } -void case_769() -#line 4915 "cs-parser.jay" +void case_770() +#line 4937 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_772() -#line 4929 "cs-parser.jay" +void case_773() +#line 4951 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7387,8 +7495,8 @@ void case_772() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_773() -#line 4938 "cs-parser.jay" +void case_774() +#line 4960 "cs-parser.jay" { yyVal = new If ((BooleanExpression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-6+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); @@ -7399,23 +7507,23 @@ void case_773() Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_775() -#line 4955 "cs-parser.jay" +void case_776() +#line 4977 "cs-parser.jay" { yyVal = new Switch ((Expression) yyVals[-5+yyTop], (ExplicitBlock) current_block.Explicit, (List) yyVals[-1+yyTop], GetLocation (yyVals[-7+yyTop])); end_block (GetLocation (yyVals[0+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_776() -#line 4964 "cs-parser.jay" +void case_777() +#line 4986 "cs-parser.jay" { - Report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); + report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } -void case_778() -#line 4973 "cs-parser.jay" +void case_779() +#line 4995 "cs-parser.jay" { var sections = new List (4); @@ -7423,8 +7531,8 @@ void case_778() yyVal = sections; } -void case_779() -#line 4980 "cs-parser.jay" +void case_780() +#line 5002 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7432,15 +7540,15 @@ void case_779() yyVal = sections; } -void case_780() -#line 4987 "cs-parser.jay" +void case_781() +#line 5009 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } -void case_783() -#line 5006 "cs-parser.jay" +void case_784() +#line 5028 "cs-parser.jay" { var labels = new List (2); @@ -7448,8 +7556,8 @@ void case_783() yyVal = labels; } -void case_784() -#line 5013 "cs-parser.jay" +void case_785() +#line 5035 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7457,15 +7565,15 @@ void case_784() yyVal = labels; } -void case_785() -#line 5023 "cs-parser.jay" +void case_786() +#line 5045 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_791() -#line 5042 "cs-parser.jay" +void case_792() +#line 5064 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7474,22 +7582,22 @@ void case_791() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_792() -#line 5054 "cs-parser.jay" +void case_793() +#line 5076 "cs-parser.jay" { yyVal = new Do ((Statement) yyVals[-5+yyTop], (BooleanExpression) yyVals[-2+yyTop], GetLocation (yyVals[-6+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_793() -#line 5062 "cs-parser.jay" +void case_794() +#line 5084 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } -void case_795() -#line 5078 "cs-parser.jay" +void case_796() +#line 5100 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7502,15 +7610,15 @@ void case_795() yyVal = end_block (GetLocation (yyVals[-5+yyTop])); } -void case_796() -#line 5090 "cs-parser.jay" +void case_797() +#line 5112 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } -void case_799() -#line 5103 "cs-parser.jay" +void case_800() +#line 5125 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7518,15 +7626,15 @@ void case_799() current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_800() -#line 5110 "cs-parser.jay" +void case_801() +#line 5132 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_808() -#line 5134 "cs-parser.jay" +void case_809() +#line 5156 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7540,15 +7648,15 @@ void case_808() yyVal = sl; } -void case_809() -#line 5150 "cs-parser.jay" +void case_810() +#line 5172 "cs-parser.jay" { - Report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); + report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } -void case_810() -#line 5155 "cs-parser.jay" +void case_811() +#line 5177 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7558,8 +7666,8 @@ void case_810() yyVal = li; } -void case_811() -#line 5164 "cs-parser.jay" +void case_812() +#line 5186 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7571,65 +7679,65 @@ void case_811() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_818() -#line 5187 "cs-parser.jay" +void case_819() +#line 5209 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_819() -#line 5195 "cs-parser.jay" +void case_820() +#line 5217 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_820() -#line 5203 "cs-parser.jay" +void case_821() +#line 5225 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_821() -#line 5209 "cs-parser.jay" +void case_822() +#line 5231 "cs-parser.jay" { yyVal = new GotoCase ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_822() -#line 5214 "cs-parser.jay" +void case_823() +#line 5236 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_823() -#line 5222 "cs-parser.jay" +void case_824() +#line 5244 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_824() -#line 5230 "cs-parser.jay" +void case_825() +#line 5252 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_825() -#line 5238 "cs-parser.jay" +void case_826() +#line 5260 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; if (s != "yield"){ - Report.Error (1003, lt.Location, "; expected"); + report.Error (1003, lt.Location, "; expected"); } else if (yyVals[-1+yyTop] == null) { - Report.Error (1627, GetLocation (yyVals[0+yyTop]), "Expression expected after yield return"); + report.Error (1627, GetLocation (yyVals[0+yyTop]), "Expression expected after yield return"); } else if (lang_version == LanguageVersion.ISO_1){ FeatureIsNotAvailable (lt.Location, "iterators"); } @@ -7639,13 +7747,13 @@ void case_825() lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_826() -#line 5254 "cs-parser.jay" +void case_827() +#line 5276 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; if (s != "yield"){ - Report.Error (1003, lt.Location, "; expected"); + report.Error (1003, lt.Location, "; expected"); } else if (lang_version == LanguageVersion.ISO_1){ FeatureIsNotAvailable (lt.Location, "iterators"); } @@ -7655,29 +7763,29 @@ void case_826() lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_830() -#line 5280 "cs-parser.jay" +void case_831() +#line 5302 "cs-parser.jay" { yyVal = new TryFinally ((Statement) yyVals[-2+yyTop], (Block) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_831() -#line 5285 "cs-parser.jay" +void case_832() +#line 5307 "cs-parser.jay" { yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]), true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_832() -#line 5290 "cs-parser.jay" +void case_833() +#line 5312 "cs-parser.jay" { - Report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); + report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } -void case_833() -#line 5298 "cs-parser.jay" +void case_834() +#line 5320 "cs-parser.jay" { var l = new List (2); @@ -7685,14 +7793,14 @@ void case_833() yyVal = l; } -void case_834() -#line 5305 "cs-parser.jay" +void case_835() +#line 5327 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; Catch c = (Catch) yyVals[0+yyTop]; if (l [0].IsGeneral) { - Report.Error (1017, c.loc, "Try statement already has an empty catch block"); + report.Error (1017, c.loc, "Try statement already has an empty catch block"); } else { if (c.IsGeneral) l.Insert (0, c); @@ -7703,8 +7811,8 @@ void case_834() yyVal = l; } -void case_838() -#line 5333 "cs-parser.jay" +void case_839() +#line 5355 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -7720,11 +7828,11 @@ void case_838() yyVal = c; } -void case_840() -#line 5352 "cs-parser.jay" +void case_841() +#line 5374 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { - Report.Error (1015, lexer.Location, + report.Error (1015, lexer.Location, "A type that derives from `System.Exception', `object', or `string' expected"); } else { Error_SyntaxError (yyToken); @@ -7733,15 +7841,15 @@ void case_840() yyVal = new Catch (null, GetLocation (yyVals[-2+yyTop])); } -void case_843() -#line 5380 "cs-parser.jay" +void case_844() +#line 5402 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } -void case_845() -#line 5390 "cs-parser.jay" +void case_846() +#line 5412 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7750,8 +7858,8 @@ void case_845() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_846() -#line 5401 "cs-parser.jay" +void case_847() +#line 5423 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -7762,15 +7870,15 @@ void case_846() current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_847() -#line 5411 "cs-parser.jay" +void case_848() +#line 5433 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_848() -#line 5416 "cs-parser.jay" +void case_849() +#line 5438 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7781,8 +7889,8 @@ void case_848() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_849() -#line 5429 "cs-parser.jay" +void case_850() +#line 5451 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -7793,15 +7901,15 @@ void case_849() current_variable = new Using.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_850() -#line 5439 "cs-parser.jay" +void case_851() +#line 5461 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_851() -#line 5444 "cs-parser.jay" +void case_852() +#line 5466 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7812,8 +7920,8 @@ void case_851() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_852() -#line 5454 "cs-parser.jay" +void case_853() +#line 5476 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7823,15 +7931,15 @@ void case_852() yyVal = u; } -void case_854() -#line 5470 "cs-parser.jay" +void case_855() +#line 5492 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } -void case_855() -#line 5481 "cs-parser.jay" +void case_856() +#line 5503 "cs-parser.jay" { lexer.query_parsing = false; @@ -7844,8 +7952,8 @@ void case_855() current_block = current_block.Parent; } -void case_856() -#line 5493 "cs-parser.jay" +void case_857() +#line 5515 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -7856,8 +7964,8 @@ void case_856() current_block = current_block.Parent; } -void case_857() -#line 5504 "cs-parser.jay" +void case_858() +#line 5526 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -7866,16 +7974,16 @@ void case_857() current_block = current_block.Parent; } -void case_858() -#line 5511 "cs-parser.jay" +void case_859() +#line 5533 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; } -void case_859() -#line 5520 "cs-parser.jay" +void case_860() +#line 5542 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -7884,8 +7992,8 @@ void case_859() yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]))); } -void case_860() -#line 5528 "cs-parser.jay" +void case_861() +#line 5550 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -7898,8 +8006,8 @@ void case_860() ); } -void case_861() -#line 5543 "cs-parser.jay" +void case_862() +#line 5565 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -7908,8 +8016,8 @@ void case_861() yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]))); } -void case_862() -#line 5551 "cs-parser.jay" +void case_863() +#line 5573 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -7922,8 +8030,8 @@ void case_862() ); } -void case_864() -#line 5570 "cs-parser.jay" +void case_865() +#line 5592 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -7935,8 +8043,8 @@ void case_864() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_866() -#line 5585 "cs-parser.jay" +void case_867() +#line 5607 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -7951,8 +8059,8 @@ void case_866() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_867() -#line 5602 "cs-parser.jay" +void case_868() +#line 5624 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -7968,15 +8076,15 @@ void case_867() yyVal = head; } -void case_869() -#line 5618 "cs-parser.jay" +void case_870() +#line 5640 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_871() -#line 5630 "cs-parser.jay" +void case_872() +#line 5652 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -7984,8 +8092,8 @@ void case_871() current_block = current_block.Parent; } -void case_872() -#line 5637 "cs-parser.jay" +void case_873() +#line 5659 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -7994,8 +8102,8 @@ void case_872() linq_clause_blocks.Push ((Linq.QueryBlock)current_block); } -void case_873() -#line 5645 "cs-parser.jay" +void case_874() +#line 5667 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8003,37 +8111,39 @@ void case_873() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_874() -#line 5652 "cs-parser.jay" +void case_875() +#line 5674 "cs-parser.jay" { yyVal = new Linq.GroupBy ((Linq.QueryBlock)current_block, (Expression)yyVals[-3+yyTop], linq_clause_blocks.Pop (), (Expression)yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop])); + lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; } -void case_878() -#line 5668 "cs-parser.jay" +void case_879() +#line 5691 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_885() -#line 5688 "cs-parser.jay" +void case_886() +#line 5711 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); yyVal = new Linq.Let ((Linq.QueryBlock) current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop])); - + lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); + current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_887() -#line 5706 "cs-parser.jay" +void case_888() +#line 5730 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8041,8 +8151,8 @@ void case_887() current_block = current_block.Parent; } -void case_888() -#line 5716 "cs-parser.jay" +void case_889() +#line 5740 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8051,8 +8161,8 @@ void case_888() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_889() -#line 5724 "cs-parser.jay" +void case_890() +#line 5748 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8061,8 +8171,8 @@ void case_889() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_890() -#line 5732 "cs-parser.jay" +void case_891() +#line 5756 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8071,8 +8181,8 @@ void case_890() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_891() -#line 5740 "cs-parser.jay" +void case_892() +#line 5764 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8087,6 +8197,7 @@ void case_891() if (yyVals[0+yyTop] == null) { into = sn; yyVal = new Linq.Join (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, GetLocation (yyVals[-11+yyTop])); + lbag.AddLocation (yyVal, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-3+yyTop])); } else { /**/ /* Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions*/ @@ -8103,14 +8214,15 @@ void case_891() into = new Linq.RangeVariable (lt.Value, lt.Location); yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-11+yyTop])); + lbag.AddLocation (yyVal, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } current_block = block.Parent; ((Linq.QueryBlock)current_block).AddRangeVariable (into); } -void case_892() -#line 5776 "cs-parser.jay" +void case_893() +#line 5802 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8119,8 +8231,8 @@ void case_892() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_893() -#line 5784 "cs-parser.jay" +void case_894() +#line 5810 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8129,8 +8241,8 @@ void case_893() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_894() -#line 5792 "cs-parser.jay" +void case_895() +#line 5818 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8139,8 +8251,8 @@ void case_894() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_895() -#line 5800 "cs-parser.jay" +void case_896() +#line 5826 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8181,8 +8293,8 @@ void case_895() ((Linq.QueryBlock)current_block).AddRangeVariable (into); } -void case_899() -#line 5855 "cs-parser.jay" +void case_900() +#line 5881 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8190,8 +8302,8 @@ void case_899() yyVal = yyVals[0+yyTop]; } -void case_901() -#line 5866 "cs-parser.jay" +void case_902() +#line 5892 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8199,15 +8311,15 @@ void case_901() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_902() -#line 5873 "cs-parser.jay" +void case_903() +#line 5899 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } -void case_904() -#line 5882 "cs-parser.jay" +void case_905() +#line 5908 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8215,15 +8327,43 @@ void case_904() current_block = new Linq.QueryBlock ((Linq.QueryBlock) current_block, lexer.Location); } -void case_905() -#line 5889 "cs-parser.jay" +void case_906() +#line 5915 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } -void case_913() -#line 5929 "cs-parser.jay" +void case_908() +#line 5927 "cs-parser.jay" +{ + yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); + lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); + } + +void case_909() +#line 5932 "cs-parser.jay" +{ + yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); + lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); + } + +void case_911() +#line 5944 "cs-parser.jay" +{ + yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); + lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); + } + +void case_912() +#line 5949 "cs-parser.jay" +{ + yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); + lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); + } + +void case_914() +#line 5959 "cs-parser.jay" { /* query continuation block is not linked with query block but with block*/ /* before. This means each query can use same range variable names for*/ @@ -8240,8 +8380,8 @@ void case_913() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_914() -#line 5945 "cs-parser.jay" +void case_915() +#line 5975 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8251,8 +8391,8 @@ void case_914() }; } -void case_917() -#line 5972 "cs-parser.jay" +void case_918() +#line 6002 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8283,8 +8423,8 @@ void case_917() start_block (lexer.Location); } -void case_918() -#line 6002 "cs-parser.jay" +void case_919() +#line 6032 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8295,2297 +8435,2322 @@ void case_918() current_local_parameters = null; } +void case_929() +#line 6075 "cs-parser.jay" +{ + module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; + module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; + yyVal = null; + } + +void case_930() +#line 6081 "cs-parser.jay" +{ + module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; + module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; + var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; + yyVal = new MemberName (lt.Value); + } + +void case_933() +#line 6096 "cs-parser.jay" +{ + module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; + yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); + } + +void case_934() +#line 6101 "cs-parser.jay" +{ + var p = (List)yyVals[0+yyTop] ?? new List (1); + p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); + module.DocumentationBuilder.ParsedParameters = p; + module.DocumentationBuilder.ParsedOperator = Operator.OpType.Explicit; + yyVal = null; + } + +void case_935() +#line 6109 "cs-parser.jay" +{ + var p = (List)yyVals[0+yyTop] ?? new List (1); + p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); + module.DocumentationBuilder.ParsedParameters = p; + module.DocumentationBuilder.ParsedOperator = Operator.OpType.Implicit; + yyVal = null; + } + +void case_936() +#line 6117 "cs-parser.jay" +{ + var p = (List)yyVals[0+yyTop] ?? new List (1); + module.DocumentationBuilder.ParsedParameters = p; + module.DocumentationBuilder.ParsedOperator = (Operator.OpType) yyVals[-1+yyTop]; + yyVal = null; + } + +void case_944() +#line 6155 "cs-parser.jay" +{ + var parameters = new List (); + parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); + yyVal = parameters; + } + +void case_945() +#line 6161 "cs-parser.jay" +{ + var parameters = yyVals[-2+yyTop] as List; + parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); + yyVal = parameters; + } + +void case_946() +#line 6170 "cs-parser.jay" +{ + if (yyVals[-1+yyTop] != null) + yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); + else + yyVal = new DocumentationParameter ((FullNamedExpression) yyVals[0+yyTop]); + } + #line default static readonly short [] yyLhs = { -1, - 0, 4, 0, 1, 1, 1, 1, 2, 2, 10, - 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, - 20, 21, 18, 19, 19, 19, 23, 23, 24, 24, - 17, 6, 6, 5, 5, 22, 22, 7, 7, 25, - 25, 26, 26, 26, 26, 26, 8, 8, 9, 9, - 34, 32, 37, 33, 33, 35, 35, 35, 35, 36, - 36, 41, 38, 39, 40, 40, 42, 42, 42, 42, - 42, 43, 43, 47, 44, 46, 48, 48, 48, 49, - 49, 50, 50, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 64, 66, 69, 70, 28, 28, - 72, 68, 71, 71, 73, 73, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 77, 52, 78, 78, - 79, 79, 80, 82, 76, 76, 81, 81, 87, 53, - 91, 53, 53, 86, 94, 86, 88, 88, 95, 95, - 96, 97, 96, 92, 92, 98, 98, 99, 100, 90, - 90, 93, 93, 93, 103, 54, 106, 107, 101, 108, - 109, 101, 101, 102, 102, 105, 105, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 113, 113, 116, - 116, 116, 119, 116, 117, 117, 120, 120, 121, 121, - 121, 114, 114, 114, 122, 122, 122, 115, 124, 126, - 127, 55, 129, 130, 131, 57, 125, 125, 125, 125, - 125, 135, 132, 136, 133, 134, 134, 134, 137, 138, - 139, 141, 29, 29, 140, 140, 142, 142, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 146, 58, 145, - 145, 147, 147, 150, 144, 144, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 152, 151, - 153, 151, 151, 151, 59, 156, 158, 154, 155, 155, - 157, 157, 162, 160, 163, 160, 160, 164, 60, 166, - 56, 169, 170, 56, 165, 172, 165, 167, 167, 173, - 173, 174, 175, 174, 176, 171, 168, 168, 168, 168, - 168, 180, 177, 181, 178, 179, 179, 183, 185, 186, - 30, 182, 182, 182, 184, 184, 184, 187, 187, 188, - 189, 188, 190, 191, 192, 31, 193, 193, 16, 16, - 194, 194, 197, 196, 196, 196, 198, 198, 200, 63, - 123, 104, 104, 128, 128, 201, 201, 201, 199, 199, - 202, 202, 203, 203, 205, 205, 85, 75, 75, 89, - 89, 118, 118, 148, 148, 206, 206, 206, 206, 206, - 210, 210, 211, 211, 209, 209, 209, 209, 209, 209, - 209, 212, 212, 212, 212, 212, 212, 212, 212, 212, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - 214, 214, 214, 215, 215, 215, 235, 235, 236, 236, - 237, 237, 217, 217, 234, 234, 234, 234, 234, 234, - 234, 234, 219, 238, 238, 239, 239, 240, 240, 242, - 242, 242, 243, 243, 243, 243, 243, 244, 244, 161, - 161, 248, 248, 248, 248, 248, 250, 250, 249, 249, - 251, 251, 251, 251, 252, 220, 247, 247, 247, 253, - 253, 254, 254, 221, 222, 222, 223, 224, 225, 225, - 216, 216, 216, 216, 216, 259, 255, 226, 260, 260, - 261, 261, 262, 262, 263, 263, 263, 263, 256, 256, - 207, 207, 258, 258, 264, 264, 257, 257, 84, 84, - 265, 265, 266, 227, 267, 267, 267, 268, 268, 268, - 268, 268, 269, 195, 228, 229, 230, 231, 271, 232, - 270, 270, 273, 272, 218, 274, 274, 274, 274, 276, - 275, 275, 275, 275, 275, 275, 275, 277, 277, 277, - 277, 278, 278, 278, 278, 278, 278, 279, 279, 279, - 280, 280, 280, 280, 280, 281, 281, 281, 282, 282, - 283, 283, 284, 284, 285, 285, 286, 286, 287, 287, - 288, 288, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 290, 290, 291, 291, 291, 292, 292, - 293, 293, 296, 294, 295, 295, 298, 297, 299, 300, - 297, 45, 45, 245, 245, 245, 245, 233, 233, 233, - 83, 302, 303, 304, 305, 306, 27, 62, 62, 61, - 61, 110, 110, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 65, 65, - 67, 67, 67, 308, 308, 309, 310, 310, 311, 311, - 311, 311, 204, 204, 312, 312, 314, 111, 315, 315, - 316, 159, 313, 313, 317, 317, 318, 318, 318, 318, - 322, 322, 323, 323, 323, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 320, 320, 320, 320, 324, 324, - 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, - 324, 338, 338, 338, 338, 325, 339, 321, 340, 340, - 341, 341, 341, 341, 341, 341, 208, 208, 342, 344, - 319, 347, 319, 343, 343, 343, 345, 345, 350, 350, - 351, 351, 346, 346, 348, 348, 352, 352, 353, 349, - 349, 349, 326, 326, 337, 337, 354, 355, 355, 327, - 327, 356, 356, 359, 357, 358, 358, 360, 360, 360, - 363, 361, 362, 362, 364, 364, 328, 328, 328, 328, - 365, 366, 370, 367, 369, 369, 371, 371, 375, 374, - 374, 372, 372, 373, 373, 377, 376, 376, 368, 378, - 368, 329, 329, 329, 329, 329, 329, 379, 380, 381, - 381, 381, 382, 383, 384, 384, 385, 385, 330, 330, - 330, 330, 386, 386, 388, 388, 387, 389, 387, 387, - 331, 332, 390, 335, 333, 392, 393, 336, 394, 395, - 334, 334, 391, 391, 301, 301, 301, 301, 396, 396, - 398, 398, 400, 399, 401, 399, 397, 397, 397, 405, - 403, 406, 407, 403, 402, 402, 408, 408, 409, 409, - 409, 409, 409, 414, 410, 415, 411, 416, 417, 418, - 412, 420, 421, 422, 412, 419, 419, 424, 413, 423, - 427, 423, 426, 429, 426, 425, 425, 425, 428, 428, - 428, 404, 430, 404, 3, 3, 431, 3, 3, 432, - 432, 246, 246, 241, 241, + 0, 4, 0, 0, 1, 1, 1, 1, 2, 2, + 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, + 16, 21, 22, 19, 20, 20, 20, 24, 24, 25, + 25, 18, 7, 7, 6, 6, 23, 23, 8, 8, + 26, 26, 27, 27, 27, 27, 27, 9, 9, 10, + 10, 35, 33, 38, 34, 34, 36, 36, 36, 36, + 37, 37, 42, 39, 40, 41, 41, 43, 43, 43, + 43, 43, 44, 44, 48, 45, 47, 49, 49, 49, + 50, 50, 51, 51, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 65, 67, 70, 71, 29, + 29, 73, 69, 72, 72, 74, 74, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 78, 53, 79, + 79, 80, 80, 81, 83, 77, 77, 82, 82, 88, + 54, 92, 54, 54, 87, 95, 87, 89, 89, 96, + 96, 97, 98, 97, 93, 93, 99, 99, 100, 101, + 91, 91, 94, 94, 94, 104, 55, 107, 108, 102, + 109, 110, 102, 102, 103, 103, 106, 106, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 114, 114, + 117, 117, 117, 120, 117, 118, 118, 121, 121, 122, + 122, 122, 115, 115, 115, 123, 123, 123, 116, 125, + 127, 128, 56, 130, 131, 132, 58, 126, 126, 126, + 126, 126, 136, 133, 137, 134, 135, 135, 135, 138, + 139, 140, 142, 30, 30, 141, 141, 143, 143, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 147, 59, + 146, 146, 148, 148, 151, 145, 145, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 153, + 152, 154, 152, 152, 152, 60, 157, 159, 155, 156, + 156, 158, 158, 163, 161, 164, 161, 161, 165, 61, + 167, 57, 170, 171, 57, 166, 173, 166, 168, 168, + 174, 174, 175, 176, 175, 177, 172, 169, 169, 169, + 169, 169, 181, 178, 182, 179, 180, 180, 184, 186, + 187, 31, 183, 183, 183, 185, 185, 185, 188, 188, + 189, 190, 189, 191, 192, 193, 32, 194, 194, 17, + 17, 195, 195, 198, 197, 197, 197, 199, 199, 201, + 64, 124, 105, 105, 129, 129, 202, 202, 202, 200, + 200, 203, 203, 204, 204, 206, 206, 86, 76, 76, + 90, 90, 119, 119, 149, 149, 207, 207, 207, 207, + 207, 211, 211, 212, 212, 210, 210, 210, 210, 210, + 210, 210, 213, 213, 213, 213, 213, 213, 213, 213, + 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, + 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, + 214, 215, 215, 215, 216, 216, 216, 236, 236, 237, + 237, 238, 238, 218, 218, 235, 235, 235, 235, 235, + 235, 235, 235, 220, 239, 239, 240, 240, 241, 241, + 243, 243, 243, 244, 244, 244, 244, 244, 245, 245, + 162, 162, 249, 249, 249, 249, 249, 251, 251, 250, + 250, 252, 252, 252, 252, 253, 221, 248, 248, 248, + 254, 254, 255, 255, 222, 223, 223, 224, 225, 226, + 226, 217, 217, 217, 217, 217, 260, 256, 227, 261, + 261, 262, 262, 263, 263, 264, 264, 264, 264, 257, + 257, 208, 208, 259, 259, 265, 265, 258, 258, 85, + 85, 266, 266, 267, 228, 268, 268, 268, 269, 269, + 269, 269, 269, 270, 196, 229, 230, 231, 232, 272, + 233, 271, 271, 274, 273, 219, 275, 275, 275, 275, + 277, 276, 276, 276, 276, 276, 276, 276, 278, 278, + 278, 278, 279, 279, 279, 279, 279, 279, 280, 280, + 280, 281, 281, 281, 281, 281, 282, 282, 282, 283, + 283, 284, 284, 285, 285, 286, 286, 287, 287, 288, + 288, 289, 289, 290, 290, 290, 290, 290, 290, 290, + 290, 290, 290, 290, 291, 291, 292, 292, 292, 293, + 293, 294, 294, 297, 295, 296, 296, 299, 298, 300, + 301, 298, 46, 46, 246, 246, 246, 246, 234, 234, + 234, 84, 303, 304, 305, 306, 307, 28, 63, 63, + 62, 62, 111, 111, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 308, 308, 308, 308, 308, 308, 66, + 66, 68, 68, 68, 309, 309, 310, 311, 311, 312, + 312, 312, 312, 205, 205, 313, 313, 315, 112, 316, + 316, 317, 160, 314, 314, 318, 318, 319, 319, 319, + 319, 323, 323, 324, 324, 324, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 325, + 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + 325, 325, 339, 339, 339, 339, 326, 340, 322, 341, + 341, 342, 342, 342, 342, 342, 342, 209, 209, 343, + 345, 320, 348, 320, 344, 344, 344, 346, 346, 351, + 351, 352, 352, 347, 347, 349, 349, 353, 353, 354, + 350, 350, 350, 327, 327, 338, 338, 355, 356, 356, + 328, 328, 357, 357, 360, 358, 359, 359, 361, 361, + 361, 364, 362, 363, 363, 365, 365, 329, 329, 329, + 329, 366, 367, 371, 368, 370, 370, 372, 372, 376, + 375, 375, 373, 373, 374, 374, 378, 377, 377, 369, + 379, 369, 330, 330, 330, 330, 330, 330, 380, 381, + 382, 382, 382, 383, 384, 385, 385, 386, 386, 331, + 331, 331, 331, 387, 387, 389, 389, 388, 390, 388, + 388, 332, 333, 391, 336, 334, 393, 394, 337, 395, + 396, 335, 335, 392, 392, 302, 302, 302, 302, 397, + 397, 399, 399, 401, 400, 402, 400, 398, 398, 398, + 406, 404, 407, 408, 404, 403, 403, 409, 409, 410, + 410, 410, 410, 410, 415, 411, 416, 412, 417, 418, + 419, 413, 421, 422, 423, 413, 420, 420, 425, 414, + 424, 428, 424, 427, 430, 427, 426, 426, 426, 429, + 429, 429, 405, 431, 405, 3, 3, 432, 3, 3, + 433, 433, 247, 247, 242, 242, 5, 434, 434, 434, + 434, 438, 434, 434, 434, 434, 435, 435, 436, 439, + 436, 437, 437, 440, 440, 441, }; static readonly short [] yyLen = { 2, - 2, 0, 3, 2, 4, 3, 1, 0, 1, 1, - 2, 4, 2, 1, 2, 1, 1, 5, 2, 3, - 0, 0, 11, 1, 3, 1, 0, 1, 0, 1, - 1, 0, 1, 0, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, - 0, 3, 0, 6, 3, 1, 1, 1, 1, 1, - 3, 0, 3, 1, 0, 3, 0, 1, 1, 3, - 3, 1, 1, 0, 4, 4, 0, 1, 1, 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, 13, 5, - 0, 4, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 9, 0, 1, - 1, 2, 3, 0, 3, 1, 1, 1, 0, 8, - 0, 9, 6, 0, 0, 3, 0, 1, 1, 2, - 2, 0, 5, 0, 1, 1, 2, 3, 0, 4, - 2, 1, 1, 1, 0, 3, 0, 0, 10, 0, - 0, 11, 8, 1, 1, 0, 1, 1, 3, 3, - 3, 5, 3, 5, 1, 1, 1, 1, 3, 4, - 6, 4, 0, 7, 0, 1, 1, 2, 1, 1, - 1, 4, 6, 4, 1, 2, 2, 1, 0, 0, - 0, 10, 0, 0, 0, 13, 1, 2, 1, 2, - 1, 0, 5, 0, 5, 1, 1, 1, 0, 0, - 0, 0, 15, 5, 0, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 5, 1, - 1, 1, 1, 0, 7, 1, 1, 1, 1, 1, + 2, 0, 3, 1, 2, 4, 3, 1, 0, 1, + 1, 2, 4, 2, 1, 2, 1, 1, 5, 2, + 3, 0, 0, 11, 1, 3, 1, 0, 1, 0, + 1, 1, 0, 1, 0, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, + 2, 0, 3, 0, 6, 3, 1, 1, 1, 1, + 1, 3, 0, 3, 1, 0, 3, 0, 1, 1, + 3, 3, 1, 1, 0, 4, 4, 0, 1, 1, + 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 13, + 5, 0, 4, 0, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 9, 0, + 1, 1, 2, 3, 0, 3, 1, 1, 1, 0, + 8, 0, 9, 6, 0, 0, 3, 0, 1, 1, + 2, 2, 0, 5, 0, 1, 1, 2, 3, 0, + 4, 2, 1, 1, 1, 0, 3, 0, 0, 10, + 0, 0, 11, 8, 1, 1, 0, 1, 1, 3, + 3, 3, 5, 3, 5, 1, 1, 1, 1, 3, + 4, 6, 4, 0, 7, 0, 1, 1, 2, 1, + 1, 1, 4, 6, 4, 1, 2, 2, 1, 0, + 0, 0, 10, 0, 0, 0, 13, 1, 2, 1, + 2, 1, 0, 5, 0, 5, 1, 1, 1, 0, + 0, 0, 0, 15, 5, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 5, + 1, 1, 1, 1, 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 7, - 0, 7, 2, 2, 2, 0, 0, 9, 1, 1, - 0, 1, 0, 6, 0, 6, 1, 0, 8, 0, - 9, 0, 0, 10, 0, 0, 3, 0, 1, 1, - 2, 2, 0, 5, 0, 2, 2, 2, 1, 1, - 1, 0, 5, 0, 5, 1, 1, 0, 0, 0, - 12, 0, 2, 2, 0, 1, 2, 1, 3, 2, - 0, 5, 0, 0, 0, 13, 0, 1, 1, 3, - 1, 4, 2, 0, 3, 2, 1, 3, 0, 3, - 1, 1, 3, 1, 2, 3, 4, 4, 0, 3, - 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 7, 0, 7, 2, 2, 2, 0, 0, 9, 1, + 1, 0, 1, 0, 6, 0, 6, 1, 0, 8, + 0, 9, 0, 0, 10, 0, 0, 3, 0, 1, + 1, 2, 2, 0, 5, 0, 2, 2, 2, 1, + 1, 1, 0, 5, 0, 5, 1, 1, 0, 0, + 0, 12, 0, 2, 2, 0, 1, 2, 1, 3, + 2, 0, 5, 0, 0, 0, 13, 0, 1, 1, + 3, 1, 4, 2, 0, 3, 2, 1, 3, 0, + 3, 1, 1, 3, 1, 2, 3, 4, 4, 0, + 3, 1, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 4, 4, 4, 3, 3, 4, - 3, 4, 4, 0, 1, 3, 4, 0, 1, 1, - 3, 2, 3, 1, 2, 3, 2, 1, 1, 0, - 1, 1, 3, 3, 2, 2, 1, 1, 1, 1, - 2, 2, 4, 3, 1, 4, 1, 3, 2, 1, - 3, 1, 1, 1, 4, 3, 2, 2, 6, 3, - 7, 4, 3, 7, 3, 0, 2, 4, 1, 2, - 0, 1, 1, 3, 3, 1, 1, 1, 0, 1, - 1, 2, 2, 3, 1, 2, 0, 1, 2, 4, - 1, 3, 0, 5, 1, 1, 1, 2, 3, 3, - 4, 4, 1, 2, 4, 4, 4, 3, 0, 4, - 0, 1, 0, 4, 4, 1, 2, 2, 1, 4, - 1, 2, 2, 2, 2, 2, 2, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, - 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 5, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 1, 3, 3, 2, 1, 0, 1, - 1, 1, 0, 2, 1, 1, 0, 4, 0, 0, - 7, 1, 1, 1, 1, 1, 1, 6, 4, 4, - 1, 1, 0, 0, 0, 0, 15, 0, 1, 0, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 4, 4, 4, 3, 3, + 4, 3, 4, 4, 0, 1, 3, 4, 0, 1, + 1, 3, 2, 3, 1, 2, 3, 2, 1, 1, + 0, 1, 1, 3, 3, 2, 2, 1, 1, 1, + 1, 2, 2, 4, 3, 1, 4, 1, 3, 2, + 1, 3, 1, 1, 1, 4, 3, 2, 2, 6, + 3, 7, 4, 3, 7, 3, 0, 2, 4, 1, + 2, 0, 1, 1, 3, 3, 1, 1, 1, 0, + 1, 1, 2, 2, 3, 1, 2, 0, 1, 2, + 4, 1, 3, 0, 5, 1, 1, 1, 2, 3, + 3, 4, 4, 1, 2, 4, 4, 4, 4, 0, + 4, 0, 1, 0, 4, 4, 1, 2, 2, 1, + 4, 1, 2, 2, 2, 2, 2, 2, 1, 3, + 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, + 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 5, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 3, 3, 2, 1, 0, + 1, 1, 1, 0, 2, 1, 1, 0, 4, 0, + 0, 7, 1, 1, 1, 1, 1, 1, 6, 4, + 4, 1, 1, 0, 0, 0, 0, 15, 0, 1, + 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 0, 1, 1, 1, 2, 4, 1, 3, 1, + 3, 1, 1, 0, 1, 1, 1, 0, 4, 1, + 1, 0, 4, 0, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, - 0, 1, 1, 1, 2, 4, 1, 3, 1, 3, - 1, 1, 0, 1, 1, 1, 0, 4, 1, 1, - 0, 4, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 4, 1, 2, - 2, 2, 2, 2, 2, 1, 1, 2, 1, 0, - 6, 0, 7, 0, 2, 1, 0, 1, 1, 2, - 2, 4, 0, 2, 0, 1, 1, 2, 4, 1, - 5, 2, 2, 2, 2, 2, 1, 1, 1, 1, - 1, 5, 7, 0, 8, 0, 1, 1, 2, 1, - 0, 3, 1, 2, 3, 1, 1, 1, 1, 1, - 5, 7, 0, 4, 7, 1, 0, 1, 0, 5, - 1, 0, 1, 0, 1, 1, 1, 3, 6, 0, - 9, 1, 1, 1, 1, 1, 1, 2, 2, 3, - 4, 3, 3, 3, 4, 3, 0, 1, 3, 4, - 5, 3, 1, 2, 0, 1, 2, 0, 7, 3, - 2, 2, 0, 3, 5, 0, 0, 10, 0, 0, - 10, 5, 0, 2, 2, 2, 2, 2, 4, 5, - 4, 5, 0, 5, 0, 6, 3, 2, 1, 0, - 3, 0, 0, 6, 0, 1, 1, 2, 1, 1, - 1, 1, 1, 0, 5, 0, 3, 0, 0, 0, - 12, 0, 0, 0, 13, 0, 2, 0, 3, 1, - 0, 4, 1, 0, 4, 1, 2, 2, 1, 2, - 2, 0, 0, 4, 2, 3, 0, 4, 2, 2, - 3, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 4, 1, + 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, + 0, 6, 0, 7, 0, 2, 1, 0, 1, 1, + 2, 2, 4, 0, 2, 0, 1, 1, 2, 4, + 1, 5, 2, 2, 2, 2, 2, 1, 1, 1, + 1, 1, 5, 7, 0, 8, 0, 1, 1, 2, + 1, 0, 3, 1, 2, 3, 1, 1, 1, 1, + 1, 5, 7, 0, 4, 7, 1, 0, 1, 0, + 5, 1, 0, 1, 0, 1, 1, 1, 3, 6, + 0, 9, 1, 1, 1, 1, 1, 1, 2, 2, + 3, 4, 3, 3, 3, 4, 3, 0, 1, 3, + 4, 5, 3, 1, 2, 0, 1, 2, 0, 7, + 3, 2, 2, 0, 3, 5, 0, 0, 10, 0, + 0, 10, 5, 0, 2, 2, 2, 2, 2, 4, + 5, 4, 5, 0, 5, 0, 6, 3, 2, 1, + 0, 3, 0, 0, 6, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 0, 5, 0, 3, 0, 0, + 0, 12, 0, 0, 0, 13, 0, 2, 0, 3, + 1, 0, 4, 1, 0, 4, 1, 2, 2, 1, + 2, 2, 0, 0, 4, 2, 3, 0, 4, 2, + 2, 3, 0, 1, 1, 1, 2, 2, 2, 4, + 3, 0, 7, 4, 4, 3, 1, 3, 0, 0, + 4, 0, 1, 1, 3, 2, }; static readonly short [] yyDefRed = { 0, - 7, 0, 0, 0, 0, 0, 0, 2, 0, 0, - 10, 13, 0, 915, 0, 0, 919, 0, 0, 14, - 16, 17, 9, 1, 0, 0, 0, 11, 0, 769, - 0, 387, 0, 393, 400, 0, 0, 0, 388, 0, - 0, 0, 390, 428, 0, 389, 0, 0, 0, 0, - 396, 0, 398, 0, 426, 385, 0, 392, 394, 0, - 386, 0, 484, 0, 427, 0, 523, 397, 399, 0, - 843, 395, 0, 0, 0, 627, 0, 0, 0, 0, - 0, 677, 0, 726, 0, 0, 0, 0, 0, 0, - 0, 0, 425, 0, 619, 0, 768, 709, 0, 0, - 391, 0, 0, 402, 403, 0, 405, 406, 407, 408, - 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, - 419, 420, 423, 424, 623, 551, 0, 549, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 624, - 622, 625, 626, 693, 695, 0, 691, 694, 710, 712, - 713, 714, 715, 716, 717, 718, 719, 720, 721, 711, - 0, 0, 0, 770, 771, 787, 788, 789, 790, 812, - 813, 814, 815, 816, 817, 0, 0, 0, 19, 0, - 0, 0, 339, 0, 341, 923, 15, 916, 3, 51, - 0, 0, 0, 41, 38, 40, 42, 43, 44, 45, - 46, 49, 12, 0, 0, 0, 818, 429, 430, 841, - 0, 0, 0, 0, 0, 404, 0, 819, 0, 543, - 539, 542, 725, 767, 696, 723, 722, 724, 697, 698, + 8, 0, 0, 0, 0, 0, 0, 0, 2, 4, + 0, 0, 11, 14, 0, 916, 0, 0, 920, 0, + 0, 15, 17, 18, 388, 394, 401, 389, 391, 0, + 390, 0, 397, 399, 386, 0, 393, 395, 387, 398, + 400, 396, 350, 937, 0, 392, 927, 0, 10, 1, + 0, 0, 0, 12, 0, 770, 0, 0, 0, 0, + 0, 0, 0, 0, 429, 0, 0, 0, 0, 0, + 0, 0, 427, 0, 0, 0, 485, 0, 428, 0, + 524, 0, 844, 0, 0, 0, 628, 0, 0, 0, + 0, 0, 678, 0, 727, 0, 0, 0, 0, 0, + 0, 0, 0, 426, 0, 620, 0, 769, 710, 0, + 0, 0, 0, 403, 404, 0, 406, 407, 408, 409, + 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 424, 425, 624, 552, 0, 550, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 625, + 623, 626, 627, 694, 696, 0, 692, 695, 711, 713, + 714, 715, 716, 717, 718, 719, 720, 721, 722, 712, + 0, 0, 0, 771, 772, 788, 789, 790, 791, 813, + 814, 815, 816, 817, 818, 0, 0, 0, 20, 0, + 0, 0, 340, 0, 342, 924, 16, 917, 0, 0, + 253, 252, 249, 254, 255, 248, 267, 266, 259, 260, + 256, 258, 257, 261, 250, 251, 262, 263, 269, 268, + 264, 265, 0, 0, 940, 0, 929, 0, 928, 3, + 52, 0, 0, 0, 42, 39, 41, 43, 44, 45, + 46, 47, 50, 13, 0, 0, 0, 819, 430, 431, + 842, 0, 0, 0, 0, 0, 405, 0, 820, 0, + 544, 540, 543, 726, 768, 697, 724, 723, 725, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, - 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 828, 0, 401, 0, - 0, 0, 0, 0, 0, 842, 0, 0, 0, 739, - 735, 0, 0, 0, 0, 0, 0, 368, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 548, 552, 553, - 547, 557, 556, 554, 555, 0, 0, 617, 727, 534, - 0, 422, 421, 0, 0, 0, 0, 338, 0, 733, - 734, 0, 487, 488, 0, 0, 0, 731, 732, 0, + 709, 0, 0, 0, 794, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 829, 0, 402, + 0, 0, 0, 0, 0, 0, 843, 0, 0, 0, + 740, 736, 0, 0, 0, 0, 0, 0, 369, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 549, 553, + 554, 548, 558, 557, 555, 556, 0, 0, 618, 728, + 535, 0, 423, 422, 0, 0, 0, 0, 339, 0, + 734, 735, 0, 488, 489, 0, 0, 0, 732, 733, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 918, 692, 740, 730, 0, 765, 766, - 869, 886, 0, 0, 0, 898, 857, 855, 879, 0, - 0, 877, 880, 881, 882, 883, 858, 856, 0, 0, - 0, 343, 0, 20, 0, 0, 0, 39, 649, 655, - 647, 0, 644, 654, 648, 646, 645, 652, 650, 651, - 657, 653, 656, 658, 0, 0, 642, 50, 486, 0, - 0, 482, 483, 0, 480, 0, 742, 0, 0, 0, - 0, 763, 764, 0, 0, 0, 631, 0, 822, 820, - 632, 0, 0, 508, 0, 0, 0, 499, 0, 503, - 513, 515, 0, 495, 0, 0, 0, 0, 0, 490, - 0, 493, 0, 497, 370, 823, 0, 0, 824, 832, - 0, 0, 0, 833, 0, 0, 844, 0, 0, 738, - 0, 380, 0, 376, 377, 0, 375, 378, 379, 0, - 0, 0, 558, 0, 0, 690, 0, 0, 685, 687, - 688, 689, 433, 434, 826, 0, 0, 0, 346, 347, - 0, 190, 189, 191, 0, 0, 0, 0, 372, 0, - 604, 0, 0, 438, 0, 441, 0, 439, 538, 0, - 0, 0, 0, 0, 467, 470, 0, 0, 462, 469, - 468, 0, 593, 594, 595, 596, 597, 598, 599, 600, - 601, 603, 602, 559, 561, 560, 566, 567, 0, 0, + 0, 0, 0, 0, 919, 693, 741, 731, 0, 766, + 767, 870, 887, 0, 0, 0, 899, 858, 856, 880, + 0, 0, 878, 881, 882, 883, 884, 859, 857, 0, + 0, 0, 344, 0, 21, 0, 0, 0, 936, 0, + 351, 0, 0, 0, 938, 0, 0, 40, 650, 656, + 648, 0, 645, 655, 649, 647, 646, 653, 651, 652, + 658, 654, 657, 659, 0, 0, 643, 51, 487, 0, + 0, 483, 484, 0, 481, 0, 743, 0, 0, 0, + 0, 764, 765, 0, 0, 0, 632, 0, 823, 821, + 633, 0, 0, 509, 0, 0, 0, 500, 0, 504, + 514, 516, 0, 496, 0, 0, 0, 0, 0, 491, + 0, 494, 0, 498, 371, 824, 0, 0, 825, 833, + 0, 0, 0, 834, 0, 0, 845, 0, 0, 739, + 0, 381, 0, 377, 378, 0, 376, 379, 380, 0, + 0, 0, 559, 0, 0, 691, 0, 0, 686, 688, + 689, 690, 434, 435, 827, 0, 0, 0, 347, 348, + 0, 191, 190, 192, 0, 0, 0, 0, 373, 0, + 605, 0, 0, 439, 0, 442, 0, 440, 0, 0, + 0, 0, 0, 0, 468, 471, 0, 0, 463, 470, + 469, 0, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 604, 603, 560, 562, 561, 567, 568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 590, 0, 0, 512, 0, 0, 0, - 0, 0, 0, 0, 870, 872, 868, 0, 878, 0, - 0, 340, 59, 57, 58, 0, 0, 52, 0, 0, - 60, 62, 26, 24, 0, 0, 0, 639, 0, 643, - 437, 0, 485, 0, 536, 0, 545, 177, 198, 0, - 0, 167, 0, 0, 0, 178, 540, 0, 846, 796, - 0, 807, 794, 0, 798, 0, 0, 0, 821, 0, - 0, 0, 498, 0, 514, 516, 0, 0, 454, 0, - 0, 450, 0, 0, 477, 0, 518, 492, 0, 154, - 519, 152, 153, 521, 0, 535, 0, 837, 0, 830, - 0, 834, 527, 0, 0, 0, 365, 0, 525, 0, - 0, 537, 0, 849, 0, 861, 0, 859, 0, 0, - 629, 630, 679, 680, 678, 686, 825, 612, 618, 611, - 0, 728, 0, 345, 607, 0, 0, 0, 550, 442, - 436, 440, 435, 476, 475, 472, 471, 0, 466, 431, - 432, 443, 0, 0, 746, 0, 0, 887, 863, 0, - 888, 0, 884, 0, 899, 0, 0, 0, 0, 867, - 18, 342, 53, 0, 0, 0, 0, 0, 0, 367, - 349, 0, 633, 0, 0, 79, 78, 0, 481, 0, - 0, 0, 0, 0, 187, 0, 544, 0, 0, 0, - 0, 0, 799, 0, 0, 0, 0, 0, 845, 505, - 504, 457, 0, 0, 924, 925, 446, 452, 0, 455, - 0, 479, 0, 0, 0, 0, 0, 774, 840, 0, - 831, 533, 528, 0, 0, 524, 0, 852, 0, 791, - 862, 860, 0, 616, 615, 614, 348, 606, 605, 620, - 474, 0, 464, 463, 592, 0, 760, 745, 0, 0, - 0, 749, 0, 865, 0, 892, 0, 907, 908, 901, - 871, 873, 913, 0, 61, 55, 0, 63, 25, 22, - 0, 0, 0, 318, 0, 224, 0, 100, 0, 76, - 754, 127, 128, 0, 0, 0, 757, 196, 197, 0, - 188, 0, 0, 0, 170, 179, 171, 173, 0, 0, - 0, 0, 803, 0, 808, 809, 0, 0, 456, 458, - 459, 453, 447, 451, 0, 510, 0, 478, 489, 445, - 522, 520, 0, 836, 0, 0, 529, 0, 0, 628, - 0, 473, 0, 0, 741, 750, 864, 0, 0, 0, - 885, 0, 0, 0, 0, 0, 0, 68, 69, 72, - 73, 0, 333, 0, 350, 324, 323, 0, 634, 220, - 96, 0, 743, 758, 182, 0, 194, 0, 0, 0, - 792, 854, 0, 0, 0, 810, 773, 494, 491, 780, - 0, 786, 0, 0, 778, 0, 783, 838, 532, 531, - 0, 621, 0, 0, 866, 889, 0, 0, 0, 903, - 0, 914, 0, 74, 66, 0, 0, 0, 364, 0, - 0, 361, 319, 0, 0, 0, 0, 0, 183, 0, - 174, 172, 847, 800, 0, 0, 805, 0, 0, 775, - 779, 0, 784, 0, 850, 0, 752, 0, 893, 910, - 911, 904, 874, 54, 0, 70, 71, 0, 0, 676, - 675, 0, 674, 0, 360, 0, 0, 0, 0, 0, - 759, 181, 0, 193, 0, 0, 811, 785, 0, 681, - 839, 0, 761, 0, 0, 0, 75, 0, 0, 334, - 363, 362, 0, 320, 0, 328, 384, 383, 0, 381, - 663, 0, 635, 0, 664, 221, 97, 184, 848, 795, - 0, 851, 890, 0, 905, 0, 0, 0, 0, 0, - 0, 0, 0, 665, 0, 0, 0, 0, 894, 28, - 23, 335, 0, 0, 329, 382, 0, 0, 0, 101, - 98, 682, 0, 0, 0, 0, 321, 671, 0, 672, - 669, 0, 667, 94, 0, 93, 0, 0, 82, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 155, 0, - 0, 237, 229, 230, 231, 232, 233, 234, 235, 236, - 0, 0, 227, 0, 0, 0, 891, 0, 336, 332, - 0, 0, 0, 636, 83, 0, 280, 275, 279, 0, - 222, 228, 115, 107, 108, 109, 110, 111, 112, 113, - 114, 116, 0, 0, 105, 99, 897, 895, 670, 668, - 0, 0, 0, 0, 0, 0, 0, 288, 0, 0, - 238, 0, 0, 246, 0, 165, 156, 164, 0, 102, - 106, 0, 0, 274, 0, 0, 273, 0, 0, 0, - 0, 354, 0, 352, 0, 0, 199, 0, 0, 0, - 0, 0, 637, 223, 117, 0, 351, 0, 0, 0, - 0, 131, 0, 0, 0, 0, 0, 0, 157, 0, - 0, 203, 0, 355, 0, 241, 240, 239, 252, 251, - 248, 253, 254, 247, 266, 265, 258, 259, 255, 257, - 256, 260, 249, 250, 261, 262, 268, 267, 263, 264, - 0, 0, 292, 0, 271, 133, 0, 269, 160, 0, - 0, 135, 0, 356, 0, 0, 200, 0, 0, 0, - 353, 244, 126, 124, 0, 0, 296, 0, 0, 0, - 0, 0, 0, 0, 277, 0, 0, 0, 0, 139, - 0, 0, 0, 0, 357, 358, 0, 0, 0, 0, - 0, 121, 311, 0, 293, 0, 0, 305, 0, 0, - 0, 300, 0, 151, 0, 0, 0, 0, 146, 0, - 0, 289, 0, 136, 0, 130, 140, 158, 163, 211, - 0, 201, 0, 0, 0, 0, 125, 0, 118, 122, - 0, 0, 0, 307, 0, 308, 297, 0, 0, 291, - 301, 272, 0, 0, 132, 147, 270, 161, 287, 0, - 278, 282, 142, 0, 0, 0, 208, 210, 204, 245, - 123, 312, 314, 294, 0, 0, 306, 303, 150, 148, - 0, 0, 0, 0, 159, 212, 214, 202, 0, 0, - 0, 305, 162, 283, 285, 143, 0, 0, 205, 316, - 317, 313, 315, 304, 0, 0, 218, 217, 216, 213, - 215, 0, 0, 0, 206, 284, 286, + 0, 0, 0, 591, 0, 0, 513, 0, 0, 0, + 0, 0, 0, 0, 871, 873, 869, 0, 879, 0, + 0, 341, 934, 935, 365, 0, 0, 362, 0, 0, + 188, 0, 0, 944, 930, 932, 60, 58, 59, 0, + 0, 53, 0, 0, 61, 63, 27, 25, 0, 0, + 0, 640, 0, 644, 438, 0, 486, 0, 537, 0, + 546, 178, 199, 0, 0, 168, 0, 0, 0, 179, + 541, 0, 847, 797, 0, 808, 795, 0, 799, 0, + 0, 0, 822, 0, 0, 0, 499, 0, 515, 517, + 0, 0, 455, 0, 0, 451, 0, 0, 478, 0, + 519, 493, 0, 155, 520, 153, 154, 522, 0, 536, + 0, 838, 0, 831, 0, 835, 528, 0, 0, 0, + 366, 0, 526, 0, 0, 538, 0, 850, 0, 862, + 0, 860, 0, 0, 630, 631, 680, 681, 679, 687, + 826, 613, 619, 612, 0, 729, 0, 346, 608, 0, + 0, 0, 551, 443, 437, 441, 436, 539, 477, 476, + 473, 472, 0, 467, 432, 433, 444, 0, 0, 747, + 0, 0, 888, 864, 0, 889, 0, 885, 0, 900, + 0, 0, 0, 0, 868, 19, 343, 677, 676, 0, + 675, 0, 361, 946, 189, 941, 0, 0, 54, 0, + 0, 0, 0, 0, 0, 368, 0, 634, 0, 0, + 80, 79, 0, 482, 0, 0, 0, 0, 0, 545, + 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, + 0, 846, 506, 505, 458, 0, 0, 925, 926, 447, + 453, 0, 456, 0, 480, 0, 0, 0, 0, 0, + 775, 841, 0, 832, 534, 529, 0, 0, 525, 0, + 853, 0, 792, 863, 861, 0, 617, 616, 615, 349, + 607, 606, 621, 475, 0, 465, 464, 593, 0, 761, + 746, 0, 0, 0, 750, 0, 866, 0, 893, 0, + 908, 909, 902, 872, 874, 914, 364, 363, 945, 0, + 0, 62, 56, 0, 64, 26, 23, 0, 0, 319, + 0, 225, 0, 101, 0, 77, 755, 128, 129, 0, + 0, 0, 758, 197, 198, 0, 0, 0, 0, 171, + 180, 172, 174, 0, 0, 0, 0, 804, 0, 809, + 810, 0, 0, 457, 459, 460, 454, 448, 452, 0, + 511, 0, 479, 490, 446, 523, 521, 0, 837, 0, + 0, 530, 0, 0, 629, 0, 474, 0, 0, 742, + 751, 865, 0, 0, 0, 886, 0, 0, 0, 933, + 0, 0, 0, 69, 70, 73, 74, 0, 334, 325, + 324, 0, 635, 221, 97, 0, 744, 759, 183, 0, + 195, 0, 0, 0, 793, 855, 0, 0, 0, 811, + 774, 495, 492, 781, 0, 787, 0, 0, 779, 0, + 784, 839, 533, 532, 0, 622, 0, 0, 867, 890, + 0, 0, 0, 904, 0, 915, 0, 75, 67, 0, + 0, 0, 320, 0, 0, 0, 0, 0, 184, 0, + 175, 173, 848, 801, 0, 0, 806, 0, 0, 776, + 780, 0, 785, 0, 851, 0, 753, 0, 894, 911, + 912, 905, 875, 55, 0, 71, 72, 0, 0, 0, + 0, 0, 0, 0, 760, 182, 0, 194, 0, 0, + 812, 786, 0, 682, 840, 0, 762, 0, 0, 0, + 76, 0, 0, 335, 0, 321, 0, 329, 385, 384, + 0, 382, 664, 0, 636, 0, 665, 222, 98, 185, + 849, 796, 0, 852, 891, 0, 906, 0, 0, 0, + 0, 0, 0, 0, 0, 666, 0, 0, 0, 0, + 895, 29, 24, 336, 0, 0, 330, 383, 0, 0, + 0, 102, 99, 683, 0, 0, 0, 0, 322, 672, + 0, 673, 670, 0, 668, 95, 0, 94, 0, 0, + 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 156, 0, 0, 238, 230, 231, 232, 233, 234, 235, + 236, 237, 0, 0, 228, 0, 0, 0, 892, 0, + 337, 333, 0, 0, 0, 637, 84, 0, 281, 276, + 280, 0, 223, 229, 116, 108, 109, 110, 111, 112, + 113, 114, 115, 117, 0, 0, 106, 100, 898, 896, + 671, 669, 0, 0, 0, 0, 0, 0, 0, 289, + 0, 0, 239, 0, 0, 247, 0, 166, 157, 165, + 0, 103, 107, 0, 0, 275, 0, 0, 274, 0, + 0, 0, 0, 355, 0, 353, 0, 0, 200, 0, + 0, 0, 0, 0, 638, 224, 118, 0, 352, 0, + 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, + 158, 0, 0, 204, 0, 356, 0, 242, 241, 240, + 0, 0, 293, 0, 272, 134, 0, 270, 161, 0, + 0, 136, 0, 357, 0, 0, 201, 0, 0, 0, + 354, 245, 127, 125, 0, 0, 297, 0, 0, 0, + 0, 0, 0, 0, 278, 0, 0, 0, 0, 140, + 0, 0, 0, 0, 358, 359, 0, 0, 0, 0, + 0, 122, 312, 0, 294, 0, 0, 306, 0, 0, + 0, 301, 0, 152, 0, 0, 0, 0, 147, 0, + 0, 290, 0, 137, 0, 131, 141, 159, 164, 212, + 0, 202, 0, 0, 0, 0, 126, 0, 119, 123, + 0, 0, 0, 308, 0, 309, 298, 0, 0, 292, + 302, 273, 0, 0, 133, 148, 271, 162, 288, 0, + 279, 283, 143, 0, 0, 0, 209, 211, 205, 246, + 124, 313, 315, 295, 0, 0, 307, 304, 151, 149, + 0, 0, 0, 0, 160, 213, 215, 203, 0, 0, + 0, 306, 163, 284, 286, 144, 0, 0, 206, 317, + 318, 314, 316, 305, 0, 0, 219, 218, 217, 214, + 216, 0, 0, 0, 207, 285, 287, }; - protected static readonly short [] yyDgoto = { 6, - 7, 24, 8, 25, 9, 26, 191, 610, 380, 10, - 11, 27, 20, 21, 22, 276, 182, 194, 595, 738, - 922, 1049, 1420, 735, 195, 196, 197, 198, 199, 200, - 201, 202, 588, 386, 589, 590, 834, 591, 592, 838, - 736, 917, 918, 919, 224, 526, 1015, 748, 1117, 1118, - 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, - 405, 599, 1214, 849, 1028, 986, 1063, 1101, 1086, 1145, - 1173, 1144, 1174, 1175, 1058, 1295, 1272, 1320, 1321, 1322, - 851, 1318, 852, 653, 1190, 1283, 1237, 1308, 454, 1301, - 1277, 1337, 817, 1306, 1309, 1310, 1404, 1338, 1339, 1335, - 1129, 1197, 1156, 1215, 611, 1285, 1384, 1303, 1401, 406, - 225, 612, 613, 614, 615, 616, 753, 507, 1033, 754, - 508, 756, 1217, 1241, 1352, 1313, 1386, 1218, 1288, 1409, - 1432, 1353, 1354, 1430, 1417, 1418, 847, 985, 1085, 1141, - 1199, 1142, 1143, 1191, 1248, 1221, 1192, 278, 1271, 1317, - 1194, 1302, 1299, 1130, 1158, 1211, 1381, 1343, 1041, 1382, - 527, 1425, 1426, 1210, 1298, 1274, 1330, 1325, 1296, 1362, - 1367, 1328, 1331, 1332, 1412, 1368, 1326, 1327, 1422, 1410, - 1411, 844, 928, 1054, 1026, 1079, 1055, 1056, 1093, 978, - 1077, 1105, 474, 183, 99, 382, 185, 501, 925, 842, - 1229, 981, 982, 1022, 740, 279, 357, 472, 258, 1059, - 1060, 101, 102, 259, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 211, 712, 889, 450, 640, - 777, 641, 642, 882, 125, 188, 646, 528, 529, 530, - 531, 706, 414, 415, 253, 887, 648, 358, 255, 437, - 438, 439, 440, 443, 655, 265, 670, 671, 793, 221, - 420, 222, 419, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 510, - 511, 512, 689, 690, 806, 691, 142, 497, 304, 901, - 143, 432, 845, 984, 1083, 1195, 407, 1064, 1065, 1112, - 1113, 1023, 487, 286, 685, 1071, 488, 489, 226, 227, - 228, 146, 147, 148, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 160, 241, 498, 161, - 162, 272, 717, 566, 820, 751, 606, 855, 818, 821, - 822, 856, 857, 242, 163, 164, 165, 953, 893, 954, - 955, 956, 1002, 957, 166, 167, 168, 169, 623, 425, - 624, 874, 995, 625, 872, 626, 997, 998, 170, 171, - 172, 173, 174, 175, 260, 463, 464, 895, 1004, 268, - 871, 762, 1035, 799, 1042, 176, 368, 177, 369, 823, - 908, 370, 578, 730, 727, 728, 913, 371, 372, 373, - 374, 375, 376, 827, 568, 825, 1008, 1088, 1147, 910, - 1045, 1104, 725, 574, 726, 969, 912, 970, 1046, 914, - 15, 17, + protected static readonly short [] yyDgoto = { 7, + 8, 50, 9, 51, 10, 11, 52, 232, 674, 421, + 12, 13, 53, 22, 23, 24, 317, 192, 235, 659, + 814, 998, 1113, 1460, 811, 236, 237, 238, 239, 240, + 241, 242, 243, 652, 436, 653, 654, 911, 655, 656, + 915, 812, 993, 994, 995, 265, 576, 1085, 823, 1179, + 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, + 1190, 455, 663, 1276, 925, 1092, 1056, 1125, 1163, 1148, + 1207, 1235, 1206, 1236, 1237, 1120, 1335, 1312, 1360, 1361, + 1362, 927, 1358, 928, 717, 1252, 1323, 1299, 1348, 504, + 1341, 1317, 1377, 890, 1346, 1349, 1350, 1444, 1378, 1379, + 1375, 1191, 1259, 1218, 1277, 675, 1325, 1424, 1343, 1441, + 456, 266, 676, 677, 678, 679, 680, 639, 557, 1097, + 640, 641, 829, 1279, 1303, 1392, 1353, 1426, 1280, 1328, + 1449, 1472, 1393, 1394, 1470, 1457, 1458, 923, 1055, 1147, + 1203, 1261, 1204, 1205, 1253, 1310, 1283, 1254, 319, 223, + 1357, 1256, 1342, 1339, 1192, 1220, 1273, 1421, 1383, 1105, + 1422, 577, 1465, 1466, 1272, 1338, 1314, 1370, 1365, 1336, + 1402, 1407, 1368, 1371, 1372, 1452, 1408, 1366, 1367, 1462, + 1450, 1451, 920, 1002, 1116, 1090, 1141, 1117, 1118, 1155, + 1052, 1139, 1167, 524, 193, 110, 423, 195, 551, 431, + 224, 1291, 637, 638, 800, 816, 320, 398, 522, 299, + 1121, 1122, 46, 112, 300, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 252, 777, 964, 500, + 704, 850, 705, 706, 957, 135, 198, 710, 578, 579, + 580, 581, 771, 464, 465, 294, 962, 712, 399, 296, + 487, 488, 489, 490, 493, 719, 306, 734, 735, 866, + 262, 470, 263, 469, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 560, 561, 562, 753, 754, 879, 755, 152, 547, 345, + 976, 153, 482, 921, 1054, 1145, 1257, 457, 1126, 1127, + 1174, 1175, 801, 537, 327, 749, 1133, 538, 539, 267, + 268, 269, 156, 157, 158, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 170, 282, 548, + 171, 172, 313, 782, 616, 893, 826, 670, 931, 891, + 894, 895, 932, 933, 283, 173, 174, 175, 1027, 968, + 1028, 1029, 1030, 1072, 1031, 176, 177, 178, 179, 687, + 475, 688, 949, 1065, 689, 947, 690, 1067, 1068, 180, + 181, 182, 183, 184, 185, 301, 513, 514, 970, 1074, + 309, 946, 835, 1099, 872, 1106, 186, 409, 187, 410, + 896, 983, 411, 628, 795, 792, 793, 988, 412, 413, + 414, 415, 416, 417, 900, 618, 898, 1078, 1150, 1209, + 985, 1109, 1166, 790, 624, 791, 1043, 987, 1044, 1110, + 989, 17, 19, 47, 48, 227, 642, 808, 432, 643, + 644, }; - protected static readonly short [] yySindex = { -151, - 0, -209, -107, 23, 140, 0, 328, 0, 140, 23, - 0, 0, 198, 0, 6308, 140, 0, -171, -32, 0, - 0, 0, 0, 0, 328, 268, 140, 0, 286, 0, - -20, 0, 348, 0, 0, 185,10950, 378, 0, -227, - 315, 6464, 0, 0, -227, 0, -227, -227, -157, -227, - 0, -227, 0, 142, 0, 0,10045, 0, 0, -227, - 0, -227, 0,10045, 0, 343, 0, 0, 0, 185, - 0, 0, -227, 420, -227, 0, 7729, 7885, 449, -227, - -227, 0,10045, 0,10720,10720,10720,10720,10720,10720, -10720,10720, 0, 92, 0,10791, 0, 0, 410, 334, - 0, 634, 340, 0, 0, 456, 0, 0, 0, 0, + protected static readonly short [] yySindex = { -159, + 0, -192, -124, -184, -8,11425, 0, 185, 0, 0, + -8, -184, 0, 0, 45, 0, 6321, -8, 0, -186, + -241, 0, 0, 0, 0, 0, 0, 0, 0, 198, + 0, 238, 0, 0, 0, 2124, 0, 0, 0, 0, + 0, 0, 0, 0, 344, 0, 0, 591, 0, 0, + 185, 194, -8, 0, 190, 0, 128, 206, 89,10941, + 251, 170, 263, 6477, 0, 170, 170, 170, -203, 170, + 170, 613, 0,10036, 170, 170, 0,10036, 0, 278, + 0, 89, 0, 170, 270, 170, 0,11436,11507, 306, + 170, 170, 0,10036, 0,10711,10711,10711,10711,10711, +10711,10711,10711, 0, -128, 0,11518, 0, 0, 272, + 358, 595, 168, 0, 0, 339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 826, 0, 672, 124, - 524, 504, 571, 454, 469, 514, 471, -264, 523, 0, - 0, 0, 0, 0, 0, 2538, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 930, 0, 743, 72, + 619, 634, 435, 311, 349, 356, 323, -32, 359, 0, + 0, 0, 0, 0, 0, 3174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 458, 535, 118, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -186, -183, 268, 0, 119, - 562, 577, 0, 530, 0, 0, 0, 0, 0, 0, - 268, 4841, 268, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 760, 605,10180, 0, 0, 0, 0, -10045, -227, -227, 298, 634, 0, 618, 0,10791, 0, + 362, 387, 99, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -196, -181, 194, 0, 464, + 498, 512, 0, 473, 0, 0, 0, 0,11518,11518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 711, 145,10950, 0,10791,10045, 691, 697,10045,10045, - 8295, 489, 93, 709,11395, 281, 0, 714, 0, 718, -10791,10045, 722, 492, -227, 0,10045, 343, 9505, 0, - 0, 420,10045, 420, -203, 382, 683, 0, 535, 340, - -114, 687,10045,10045,10045, 6620, -256, 0, 0, 0, - 0, 0, 0, 0, 0, 734,10045, 0, 0, 0, - 4110, 0, 0,11363, 126, 753, 729, 0, -271, 0, - 0, 77, 0, 0, 728,10180, 9235, 0, 0,10720, -10045,10045,10045,10045,10045,10045,10045,10045,10045,10045, -10045,10720,10720,10720,10791,10791,10720,10720,10720,10720, -10720,10720,10720,10720,10720,10720,10720,10720,10720,10720, -10720,10720,10045, 0, 0, 0, 0, 535, 0, 0, - 0, 0,11439,11463, 743, 0, 0, 0, 0, -226, - 598, 0, 0, 0, 0, 0, 0, 0, 268, 268, - 750, 0, 759, 0, 729, -181, 4841, 0, 0, 0, - 0, -168, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -174,12240, 0, 0, 0, 729, - 194, 0, 0, 623, 0, 801, 0, 809, 6, 343, - -227, 0, 0, 764, 7400, -223, 0, 795, 0, 0, - 0, 811, 813, 0, 279, 0, 818, 0, 814, 0, - 0, 0, 639, 0, 8138, 644,10045, 709, 9235, 0, - 7088, 0, 420, 0, 0, 0, 815, 820, 0, 0, - 185, 343, 101, 0, 7105, 823, 0, 827, 772, 0, - 828, 0,10045, 0, 0, 903, 0, 0, 0,10045, - 907, 829, 0, 834, 836, 0, -250, 6620, 0, 0, - 0, 0, 0, 0, 0, 837, 343, 6620, 0, 0, - -232, 0, 0, 0, 420, 126, 787,11507, 0, 838, - 0, 839,10720, 0, 205, 0, 373, 0, 0, 650, -10045,10045, 843, 952, 0, 0, -66, 841, 0, 0, - 0, 672, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 672, 672, - 124, 124, 524, 524, 524, 524, 504, 504, 571, 454, - 469, 514, 471, 0, 842, -201, 0,10045, -28, 798, - 1, 821, 857,10045, 0, 0, 0, 883, 0, -16, - 729, 0, 0, 0, 0, 126, 562, 0, 866, 869, - 0, 0, 0, 0, 871,11531, 830, 0, -147, 0, - 0, 466, 0,10180, 0, 868, 0, 0, 0, 507, - 875, 0, 877, 878, 879, 0, 0,10045, 0, 0, - 840, 0, 0, 880, 0, 881,10045, 959, 0, 6464, - 6464, 7556, 0, 8295, 0, 0, 9640, 270, 0, -230, - -148, 0, 831, 844, 0, -38, 0, 0, 885, 0, - 0, 0, 0, 0, 886, 0, 895, 0, 7261, 0, - 343, 0, 0, 420, 355, 416, 0, 845, 0, 892, - 896, 0, 6464, 0, 6464, 0,10045, 0,10045,10791, + 0, 0, 539, 518, 0, 520, 0, 13, 0, 0, + 0, 194,12469, 194, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 691, 554,10171, 0, 0, 0, + 0,10036, 170, 170, 390, 595, 0, 567, 0,11518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 7712, 0,10791, 0, 0, 847,11363, 924, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9100, 0, 0, - 0, 0, 9370,10045, 0, 7244, 897, 0, 0, 977, - 0, 979, 0, 626, 0, 901,10045,10045, 858, 0, - 0, 0, 0, 750, 909, 906, 862, 914, 830, 0, - 0, 912, 0, 1027, 1031, 0, 0,10045, 0, 9775, - 915, 507,11507, 510, 0,10791, 0, 28, 1037, 1040, - 930, 922, 0,10045,10045, 933,10045, 1026, 0, 0, - 0, 0, 71, 9910, 0, 0, 0, 0, 8003, 0, - 1054, 0, 535,10045, 946, 7556, 947, 0, 0, 900, - 0, 0, 0, 902, 363, 0, 905, 0, 922, 0, - 0, 0, 942, 0, 0, 0, 0, 0, 0, 0, - 0, 167, 0, 0, 0,11395, 0, 0, 908, 943, - 897, 0,10045, 0,10045, 0,10045, 0, 0, 0, - 0, 0, 0, 750, 0, 0,10315, 0, 0, 0, - 957, 917, 7417, 0, 830, 0, 830, 0, 830, 0, - 0, 0, 0, 911, 954, 915, 0, 0, 0, -167, - 0, -150, 960, 963, 0, 0, 0, 0, 962, 7556, - 897, -201, 0, 964, 0, 0, 961, 6464, 0, 0, - 0, 0, 0, 0, 969, 0, 709, 0, 0, 0, - 0, 0, -199, 0, 970, 363, 0, 920, 897, 0, - 343, 0, 921, 965, 0, 0, 0,10045, 995,10045, - 0,10045, 997, 208, 869, 168, 481, 0, 0, 0, - 0, 23, 0, -138, 0, 0, 0, 980, 0, 0, - 0, 971, 0, 0, 0, 273, 0, 972, 1093, 1094, - 0, 0, 983, 897,10045, 0, 0, 0, 0, 0, -10045, 0, 990, -194, 0, -194, 0, 0, 0, 0, - 991, 0,10045, 7244, 0, 0, 1012, 708, 993, 0, -10045, 0, 992, 0, 0,10315, 140, 6, 0, 508, - 316, 0, 0, 989, 989, 989, 9775, 998, 0,10045, - 0, 0, 0, 0, 999, 881, 0, 6464, 1000, 0, - 0, 6620, 0, 1003, 0, 1002, 0,10045, 0, 0, - 0, 0, 0, 0,10045, 0, 0, 268, 1004, 0, - 0, 956, 0, -138, 0, 268, 7573, 108, 108, 108, - 0, 0,10045, 0, 6464, 6464, 0, 0, 6620, 0, - 0, 6464, 0, 1016,10045,10045, 0, 268, 1009, 0, - 0, 0, 967, 0, 1006, 0, 0, 0, 1007, 0, - 0, 968, 0, 1038, 0, 0, 0, 0, 0, 0, - 6620, 0, 0, 1033, 0, 1011, 108, 0, 1020, 268, - 7573, 1017, 1028, 0, 1030, 1034, 1035,10045, 0, 0, - 0, 0, 1013, 1011, 0, 0, 321, -81, 268, 0, - 0, 0, 1041,10045, 1029,10045, 0, 0, 1039, 0, - 0, 1042, 0, 0,12240, 0, 1036, -81, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, -12240, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1047, 268, 0, 268, 1011, 984, 0, 1041, 0, 0, - 1048, 321,11135, 0, 0, 235, 0, 0, 0,11203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1057, 268, 0, 0, 0, 0, 0, 0, -10791,10791, 98,11395, 294, 420, 1088, 0, 126, 8225, - 0, 1121, 0, 0, 1011, 0, 0, 0, 1011, 0, - 0, 1010, 1014, 0,10791, -146, 0,10791, 1014, 1018, - 1059, 0, 126, 0, 1060, 9051, 0, 1065, 1019, -235, - 260, 1352, 0, 0, 0, 126, 0, 1071, 1022, 1070, - 1067, 0, 1073, 1075, 1076, 6, 1068, 1078, 0, 1081, - 1086, 0, 729, 0, 597, 0, 0, 0, 0, 0, + 0, 657, 117,10941, 0,11518,10036, 664, 672,10036, +10036, 956, 400, -185, 689,11589, 78, 0, 706, 0, + 711,11518,10036, 731, 540, 170, 0,10036, 278, 9496, + 0, 0, 270,10036, 270, -132, 489, 666, 0, 387, + 168, -103, 684,10036,10036,10036, 6633, -52, 0, 0, + 0, 0, 0, 0, 0, 0, 764,10036, 0, 0, + 0, 4209, 0, 0,11354, 241, 798, 777, 0, 208, + 0, 0, 264, 0, 0, 758,10171, 9226, 0, 0, +10711,10036,10036,10036,10036,10036,10036,10036,10036,10036, +10036,10036,10711,10711,10711,11518,11518,10711,10711,10711, +10711,10711,10711,10711,10711,10711,10711,10711,10711,10711, +10711,10711,10711,10036, 0, 0, 0, 0, 387, 0, + 0, 0, 0,11600,11671, 793, 0, 0, 0, 0, + 9, 808, 0, 0, 0, 0, 0, 0, 0, 194, + 194, 796, 0, 821, 0, 777, 539, 539, 0, -147, + 0, 651, 539, 825, 0, -200,12469, 0, 0, 0, + 0, -173, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -166,12504, 0, 0, 0, 777, + 237, 0, 0, 560, 0, 881, 0, 886, -180, 278, + 170, 0, 0, 849, 7550, -208, 0, 892, 0, 0, + 0, 899, 900, 0, 233, 0, 906, 0, 903, 0, + 0, 0, 638, 0, 7685, 654,10036, 689, 9226, 0, + 7101, 0, 270, 0, 0, 0, 908, 909, 0, 0, + 89, 278, 260, 0, 4367, 911, 0, 913, 860, 0, + 918, 0,10036, 0, 0, 997, 0, 0, 0,10036, + 998, 920, 0, 925, 926, 0, -259, 6633, 0, 0, + 0, 0, 0, 0, 0, 923, 278, 6633, 0, 0, + 144, 0, 0, 0, 270, 241, 882,11682, 0, 927, + 0, 932,10711, 0, 319, 0, 377, 0, 777, 669, +10036,10036, 931, 1048, 0, 0, 15, 933, 0, 0, + 0, 743, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 743, 743, + 72, 72, 619, 619, 619, 619, 634, 634, 435, 311, + 349, 356, 323, 0, 934, -187, 0,10036, 6, 895, + 48, 896, 929,10036, 0, 0, 0, 958, 0, -245, + 777, 0, 0, 0, 0, -140, 286, 0,11682, 651, + 0, 944, 946, 0, 0, 0, 0, 0, 0, 241, + 498, 0, 948, 947, 0, 0, 0, 0, 951,11753, + 910, 0, 205, 0, 0, 316, 0,10171, 0, 962, + 0, 0, 0, 697, 957, 0, 970, 971, 972, 0, + 0,10036, 0, 0, 936, 0, 0, 973, 0, 974, +10036, 1052, 0, 6477, 6477, 7843, 0, 956, 0, 0, + 9631, 355, 0, -236, -163, 0, 921, 928, 0, -53, + 0, 0, 983, 0, 0, 0, 0, 0, 982, 0, + 990, 0, 7118, 0, 278, 0, 0, 270, 460, 553, + 0, 940, 0, 991, 989, 0, 6477, 0, 6477, 0, +10036, 0,10036,11518, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7999, 0,11518, 0, 0, 949, +11354, 1020, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9091, 0, 0, 0, 0, 9361,10036, 0, + 7257, 992, 0, 0, 1070, 0, 1073, 0, 735, 0, + 995,10036,10036, 952, 0, 0, 0, 0, 0, 953, + 0, -147, 0, 0, 0, 0, 651, 651, 0, 796, + 1002, 1004, 961, 1013, 910, 0, 1006, 0, 1125, 1126, + 0, 0,10036, 0, 9766, 1010, 697,11682,11518, 0, + -231, 1130, 1131, 1017, 1009, 0,10036,10036, 1032,10036, + 1124, 0, 0, 0, 0, -89, 9901, 0, 0, 0, + 0, 7392, 0, 1153, 0, 387,10036, 1044, 7843, 1045, + 0, 0, 994, 0, 0, 0, 999, -117, 0, 1001, + 0, 1009, 0, 0, 0, 1043, 0, 0, 0, 0, + 0, 0, 0, 0, 696, 0, 0, 0,11589, 0, + 0, 1005, 1049, 992, 0,10036, 0,10036, 0,10036, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1054, + 796, 0, 0,10306, 0, 0, 0, 1055, 7274, 0, + 910, 0, 910, 0, 910, 0, 0, 0, 0, 1011, + 1051, 1010, 0, 0, 0, -169, -157, 1060, 1061, 0, + 0, 0, 0, 1064, 7843, 992, -187, 0, 1065, 0, + 0, 1071, 6477, 0, 0, 0, 0, 0, 0, 1072, + 0, 689, 0, 0, 0, 0, 0, -205, 0, 1079, + -117, 0, 1031, 992, 0, 278, 0, 1033, 1074, 0, + 0, 0,10036, 1109,10036, 0,10036, 1106, 334, 0, + 947, 451, 725, 0, 0, 0, 0, -184, 0, 0, + 0, 1095, 0, 0, 0, 1083, 0, 0, 0, 532, + 0, 1084, 1209, 1210, 0, 0, 1096, 992,10036, 0, + 0, 0, 0, 0,10036, 0, 1102, -194, 0, -194, + 0, 0, 0, 0, 1099, 0,10036, 7257, 0, 0, + 1129, 762, 1098, 0,10036, 0, 1103, 0, 0,10306, + -8, -180, 0, 1104, 1104, 1104, 9766, 1108, 0,10036, + 0, 0, 0, 0, 1111, 974, 0, 6477, 1105, 0, + 0, 6633, 0, 1107, 0, 1115, 0,10036, 0, 0, + 0, 0, 0, 0,10036, 0, 0, 194, 1119, 194, + 7567, -150, -150, -150, 0, 0,10036, 0, 6477, 6477, + 0, 0, 6633, 0, 0, 6477, 0, 1132,10036,10036, + 0, 194, 1128, 0, 1075, 0, 1118, 0, 0, 0, + 1133, 0, 0, 1080, 0, 1160, 0, 0, 0, 0, + 0, 0, 6633, 0, 0, 1156, 0, 1134, -150, 0, + 1138, 194, 7567, 1136, 1141, 0, 1145, 1147, 1148,10036, + 0, 0, 0, 0, 1137, 1134, 0, 0,10782, -79, + 194, 0, 0, 0, 1158,10036, 1143,10036, 0, 0, + 1149, 0, 0, 1150, 0, 0,12504, 0, 1154, -79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1085, -180, 0, 1077, 0, 0, 1090, 0, 0, 1089, - 1091, 0, 1083, 0, 6, 6, 0, 6, 1087, 1092, - 0, 0, 0, 0, 1096, -78, 0, 1114, 6, 1205, - 1115, 6, 6, 235, 0, 7556, 1046, 1116, 1083, 0, - 1118, 1119, 69, 1123, 0, 0, 6, 9775, 1079, 1120, - 1096, 0, 0,12240, 0, 268, 268, 0, 1100, 1125, - 1114, 0, 1122, 0,10045, 1101, 1127, 1115, 0, 1132, - 1148, 0, -170, 0, 1140, 0, 0, 0, 0, 0, -12240, 0, 69, 69, 1099, 1150, 0, -180, 0, 0, - 251, 1131,12240, 0,12240, 0, 0, 7556, 1142, 0, - 0, 0, 1136, 1090, 0, 0, 0, 0, 0, -160, - 0, 0, 0, 108, 719, 1156, 0, 0, 0, 0, - 0, 0, 0, 0, 1179, 1261, 0, 0, 0, 0, - 108, 1155, 1162, 7556, 0, 0, 0, 0, 69, 376, - 376, 0, 0, 0, 0, 0, 64, 64, 0, 0, - 0, 0, 0, 0, 9235, 9235, 0, 0, 0, 0, - 0, 1159, 1165, 1166, 0, 0, 0, + 0, 452,12504, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1155, 194, 0, 194, 1134, 1114, 0, 1158, + 0, 0, 1157,10782,11126, 0, 0, 485, 0, 0, + 0,11194, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1165, 194, 0, 0, 0, 0, + 0, 0,11518,11518, 300,11589, 342, 270, 1183, 0, + 241, 8991, 0, 1220, 0, 0, 1134, 0, 0, 0, + 1134, 0, 0, 1116, 1117, 0,11518, -149, 0,11518, + 1117, 1135, 1166, 0, 241, 0, 1178, 9021, 0, 1181, + 1139, 14, 528, 2124, 0, 0, 0, 241, 0, 1185, + 1142, 1184, 1180, 0, 1197, 1200, 1211, -180, 1173, 1232, + 0, 1235, 1241, 0, 777, 0, 789, 0, 0, 0, + 1239, -160, 0, 1231, 0, 0, 1244, 0, 0, 1243, + 1247, 0, 1242, 0, -180, -180, 0, -180, 1248, 1249, + 0, 0, 0, 0, 1250, 56, 0, 1256, -180, 1366, + 1259, -180, -180, 485, 0, 7843, 1224, 1267, 1242, 0, + 1272, 1273, 58, 1277, 0, 0, -180, 9766, 1236, 1281, + 1250, 0, 0,12504, 0, 194, 194, 0, 1240, 1283, + 1256, 0, 1290, 0,10036, 1251, 1291, 1259, 0, 1294, + 1296, 0, -168, 0, 1289, 0, 0, 0, 0, 0, +12504, 0, 58, 58, 1304, 1300, 0, -160, 0, 0, + -151, 1305,12504, 0,12504, 0, 0, 7843, 1293, 0, + 0, 0, 1306, 1244, 0, 0, 0, 0, 0, -129, + 0, 0, 0, -150, 843, 1310, 0, 0, 0, 0, + 0, 0, 0, 0, 1365, 1418, 0, 0, 0, 0, + -150, 1313, 1326, 7843, 0, 0, 0, 0, 58, 555, + 555, 0, 0, 0, 0, 0, -83, -83, 0, 0, + 0, 0, 0, 0, 9226, 9226, 0, 0, 0, 0, + 0, 1331, 1328, 1332, 0, 0, 0, }; - protected static readonly short [] yyRindex = { 1870, - 0, 0, 6776, 1870, 0, 0, 1530, 0, 2055, 988, - 0, 0, 0, 0, 0, 2055, 0, 0, 43, 0, - 0, 0, 0, 0, 1530, 1111, 1939, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1174, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,11575, 0, 0, 1167, 0, 0, 0, - 0, 0, 0, 1167, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 210, 0, 0, 0, 0, 0, 0, + protected static readonly short [] yyRindex = { 2744, + 0, 0, 6789, 2744, 0, 0, 0, 1702, 0, 0, + 2899, 2675, 0, 0, 0, 0, 0, 2899, 0, 0, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3543, 0, 0, 0, 0, 0, 240, - 0, 4109, 3701, 0, 0, 3951, 0, 0, 0, 0, + 0, 0, 0, 0, 1706, 0, 0, 1706, 0, 0, + 1702, 307, 2787, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1341, 0, 0, 0, 0, 0, 0, 0, + 0,11764, 0, 1333, 0, 0, 0, 1333, 0, 0, + 0, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4497, 0, 4564, 4904, - 5105, 5440, 5641, 5775, 5909, 6043, 494, 4196, 1160, 0, - 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, + 0, 0, 0, 0, 3642, 0, 0, 0, 0, 0, + 301, 4366, 3800, 0, 0, 4208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1124, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 782, 782, 2128, 0, 405, - 1168, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2195, 713, 2264, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4521, 0, 4588, 4928, + 5129, 5464, 5665, 5799, 5933, 1046, 4451, 6201, 2295, 0, + 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3054, 0, 0, 0, 0, 0, 0, + 0, 1292, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 776, 776, 2942, 0, 149, + 1335, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1706, 113, 0, 0, 0, 0, 0, 0, + 0, 3009, 708, 3052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1177, 0, 0, 0, 0, 3054, 0, 0, 0, 0, + 0, 0, 0, 0, 3260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2786, 0, 4394, -228, 2931, 0, 0, 3213, 2931, - -228, 0, 0, 0, 0, -43, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1167, 0, 0, 0, - 0, 0, 0, 1180, 4264, 0, 3054, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1344, 0, 0, 0, 0, 3260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2374, 0, 0, + 0, 0, 1806, 0, 2338, 385, 1935, 0, 0, 2064, + 1935, 385, 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1333, 0, 0, + 0, 0, 0, 0, 1342, 2193, 0, 3260, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 29, 0, 0, 0, 0, 0, 0, 0, 2331, 1497, - 0, 0, 0, 0, 2641, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 310,10868, 0, 0, 0, 3054, - 3859, 0, 0, 0, 0, 0, 0, 0,11235, 0, - 0, 0, 0, 0, 1170, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 374, 735, 0, 0, 1187, 0, - 0, 0, 0, 0, -34, 0, 0, 3635, 1193, 0, - 0, 0, -154, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -14, 0, 0, - 0, 0, 0, 0, 0, 0, 7868, 0, 0, 0, - 0, 0, 0, 0, -140, 630, 0, 0, 0, 1194, - 0, 0, 0, 0, 3054, 0, 3054, 0, 0, 0, - 0, 0, 56, 0, 0, 0, 0, 117, 0, 0, - 0, 4667, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4734, 4837, - 4971, 5038, 5172, 5239, 5306, 5373, 5507, 5574, 5708, 5842, - 5976, 6110, 6177, 0, 0, 679, 0, 0, -228, 0, - -228, 0, 0, 0, 0, 0, 0, 3017, 0, 0, - 2641, 0, 0, 0, 0, 670, 100, 0, 0, 1197, - 0, 0, 0, 0, 1202, 0, 0, 0, 0, 0, - 0,10450, 0, 0, 0, 694, 0, 0, 0,11599, - 0, 0, 707, 723, 727, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1200, 0, 0, 0, 0, - 0, 0, 0, 1209, 0, 0, 0, 3385, 0, 0, - 57, 0, 73, 3319, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1211, 0, 0, 0, 0, 0, - 0, 0, 0, -243, 539, 656, 0, 0, 0, 0, - 1212, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 23, 0, 0, 0, 0, 0, 0, 0, 3095, + 2495, 0, 0, 0, 0, 1654, 1706, 1706, 0, -215, + 0, 7860, 1706, 1712, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 338,10859, 0, 0, 0, 3260, + 3958, 0, 0, 0, 0, 0, 0, 0,11226, 0, + 0, 0, 0, 0, 1339, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 712, 786, 0, 0, 1348, 0, + 0, 0, 0, 0, 12, 0, 0, 3734, 1345, 0, + 0, 0, 322, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 203, 0, 0, 0, 1213, 0, 0, 0, - 0, 0, 0, 329, 0, 538, 0, 0, 0, 0, - 0, 0, 0, 1220, 0, 665, 0, 0, 0, 0, - 0, 1214, 0, 1173, 1175, 0, 0, 0, 0, 0, - 1216,11643, 0,11667, 0, 0, 0,11319, 0, 0, - 0, 730, 0, 1218, 0, 0, 0, 1630, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 8155, 0, 0, 0, + 0, 0, 0, 0, -189, 285, 0, 0, 0, 1346, + 0, 0, 0, 0, 3260, 0, 3260, 0, 3892, 0, + 0, 0, 94, 0, 0, 0, 0, 95, 0, 0, + 0, 4691, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4758, 4861, + 4995, 5062, 5196, 5263, 5330, 5397, 5531, 5598, 5732, 5866, + 6000, 6067, 6134, 0, 0, 771, 0, 0, 385, 0, + 385, 0, 0, 0, 0, 0, 0, 3538, 0, 0, + 1654, 0, 0, 0, 0, 1301, 0, 0, 0,11835, + 0, 0, 794, 0, 0, 0, 0, 0, 0, 740, + 496, 0, 0, 1350, 0, 0, 0, 0, 1357, 0, + 0, 0, 0, 0, 0,10441, 0, 0, 0, 782, + 0, 0, 0,11846, 0, 0, 799, 811, 814, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1349, + 0, 0, 0, 0, 0, 0, 0, 1358, 0, 0, + 0, 3326, 0, 0, 53, 0, 61, 3418, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1361, 0, + 0, 0, 0, 0, 0, 0, 0, 177, 587, 65, + 0, 0, 0, 0, 1362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3477, 0, 3793, 1227, 0, 0, 0, 1224, - 0, 0, 0, 0, 539, 0, 0, 0, 730, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 675, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 745, 0, 0, 0, - 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1222, 0, 0, 0, 0, - 0, 0, 748, 751, 0, 0, 0, 0, 0, 0, - 1228, 679, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3635, 0, 0, 0, - 0, 0, 1235, 0, 0, 539, 0, 777, 1228, 0, - 7868, 0, 505, 560, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 1197, 8291, 0, 0, 0, 0, - 0,11730, 0, -121, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 572, 0, 586, 0, 0, - 0, 0, 0, 1213, 1232, 0, 0, 0, 0, 0, - 0, 0, 0, 1238, 0, 6932, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 445, 570, 0, - 0, 0, 0, 0, 0, 0,11798,11235, 0, 1201, - 0, 0, 0, 151, 151, 151, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, + 0, 1354, 0, 0, 0, 0, 0, 0, 439, 0, + 596, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -215, 0, 0, 0, 0,11846, 8016, 0, 1363, + 0, 680, 0, 0, 0, 0, 1368, 0, 1314, 1323, + 0, 0, 0, 0, 0, 1367,11917, 0, 0, 0, +11310, 0, 0, 0, 815, 0, 1369, 0, 0, 0, + 1526, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3576, 0, 4050, 1374, 0, + 0, 0, 1375, 0, 0, 0, 0, 587, 0, 0, + 0, 815, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,11952, 0, 0, - 0, 0, 0, -121, 0, -275, 0, 1255, 1255, 1255, - 0, 0, 0, 0, 0, 0, 0, 0, -222, 0, - 0, 0, 0, 0, 0, 0, 0,11995, 0, 0, - 0, 0, 0, 0, 1257, 0, 0, 0, 153, 0, - 0, 0, 0, 451, 0, 0, 0, 0, 0, 0, - 1258, 0, 0, 0, 0, 1982, 1253, 486, 0, -255, + 0, 0, 0, 683, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1802, 0, 0, 0, 8453, 8817, 0, - 0, 0, 614, 0, 0, 0, 0, 0, 0, 0, - 0, 351, 0, 0,11021, 0, 0, 8544, 0, 0, + 0, 0, 0, 816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11103, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8908, 0, 8635, 1802, 0, 0, 614, 0, 0, - 0, 0, 310, 0, 0, 0, 0, 0, 0, 310, + 0, 1372, 0, 0, 0, 0, 0, 829, 830, 0, + 0, 0, 0, 0, 0, 1377, 771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8726, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 4393, 391, 0, 8952, 0, - 0, 0, 9021, 0, 1802, 0, 0, 0, 1802, 0, + 0, 3734, 0, 0, 0, 0, 0, 1382, 0, 0, + 587, 0, 846, 1377, 0, 8155, 0, 542, 621, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, + 1350, 8205, 0, 0, 0, 0, 0,11948, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 726, + 0, 751, 0, 0, 0, 0, 0, 1354, 1379, 0, + 0, 0, 0, 0, 0, 0, 0, 1386, 0, 6945, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 715, 0, 1263, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 786, 0, 552, 0, 0, - 0, 0, 0, 0, 0,11235, 755, 0, 0, 0, - 0, 0, 1259, 0, 604, 0, 0, 0, 0, 0, + 0, 461, 649, 0, 0, 0, 0, 0, 0, 0, +12016,11226, 0, -161, -161, -161, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,12170, 0, -242, + 0, 1389, 1389, 1389, 0, 0, 0, 0, 0, 0, + 0, 0, -214, 0, 0, 0, 0, 0, 0, 0, + 0,12213, 0, 0, 0, 0, 1390, 0, 0, 0, + 21, 0, 0, 0, 0, 561, 0, 0, 0, 0, + 0, 0, 1391, 0, 0, 0, 0, 2830, 1381, 404, + 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2607, 0, 0, 0, 8358, + 8722, 0, 0, 0, 713, 0, 0, 0, 0, 0, + 0, 0, 0, 420, 0, 0,11012, 0, 0, 8449, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 762, 0, 0, 0, 0, 0, 0, - 0, 0, 1260, 0,11235,11235, 0,11279, 0, 0, - 0, 0, 0, 0, 1264, 4671, 0, 1265,11235,10585, - 1266,11235,11235, 0, 0, 0, 0, 0, 1270, 0, - 0, 0,12205, 0, 0, 0,11235, 0, 0, 0, - 1271, 0, 0, 317, 0,12132,12162, 0, 0, 0, - 1275, 0, 0, 0, 0, 0, 0, 1276, 0, 0, - 0, 0, 485, 0, 763, 0, 0, 0, 0, 0, - 799, 0,12038,12073, 0, 0, 0, 0, 0, 0, - 0, 0, 1317, 0, 1370, 0, 0, 0, 768, 0, + 0, 0,11094, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8813, 0, 8540, 2607, 0, 0, 713, + 0, 0, 0, 0, 338, 0, 0, 0, 0, 0, + 0, 338, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8631, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 8926, 340, 0, + 8857, 0, 0, 0, 8956, 0, 2607, 0, 0, 0, + 2607, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 770, 0, 1393, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 801, 0, 661, + 0, 0, 0, 0, 0, 0, 0,11226, 841, 0, + 0, 0, 0, 0, 1388, 0, 870, 0, 0, 0, + 0, 0, 0, 864, 0, 0, 0, 0, 0, 0, + 0, 0, 1387, 0,11226,11226, 0,11270, 0, 0, + 0, 0, 0, 0, 1392,12439, 0, 1394,11226,10576, + 1395,11226,11226, 0, 0, 0, 0, 0, 1396, 0, + 0, 0,12380, 0, 0, 0,11226, 0, 0, 0, + 1397, 0, 0, 70, 0, 4526,12350, 0, 0, 0, + 1398, 0, 0, 0, 0, 0, 0, 1399, 0, 0, + 0, 0, 603, 0, 873, 0, 0, 0, 0, 0, + 861, 0,12256,12291, 0, 0, 0, 0, 0, 0, + 0, 0, 1446, 0, 1500, 0, 0, 0, 874, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 526, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 526, 0, 0, 0, 0, 0, 0, 0,12205,11841, -11884, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1193, 1193, 0, 0, 0, 0, + 643, 0, 0, 0, 0, 0, 0, 0,12380,12059, +12102, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1345, 1345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; protected static readonly short [] yyGindex = { 0, - 0, 1609, 0, 0, 7, -4, -162, -19, 1610, 0, - 1628, 1648, 701, 0, 0, 2, 0, 0, 0, 0, - 0, 0, -719, -617, -177, -569, 0, 0, 0, 0, - 0, -141, 0, 0, 0, 822, 0, 928, 0, 0, - 0, 0, 678, 688, -15, -189, 0, 0, 0, 0, - 537, -723, -646, -504, -497, -488, -470, -384, -335,-1023, --1071, 0, -513, 0, 179, 0, -990, 0, 0, 0, - 0, 0, 0, 495, 36, 305, 0, 0, 0, 345, - -953, 0, -233, -253, 1072, 0, 0, 0, -786, 296, - 0, 0, -442, 0, 0, 362, 0, 0, 337, 0, - 0, 368, 0, -301, -831, 0, 0, 0, 0, 487, - -12, 0, 0, 918, 923, 926, 0, -467, 0, 0, - -549, 934, 475, 0, -964, 0, 0, 0, 0, 0, - 0, 0, 0, 262, 0, 0, 0, 0, 0, 0, - 0, 0, 540, 0, 0, 0, 0, -279, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 555, 0, - -443, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 276, 0, 0, 358, 0, 0, 364, 366, 282, 0, - 0, 0, 0, 0, 0, 0, 0, 610, 0, 0, - 0, 0, -37, 0, -13, -92, 0, 0, 450, 0, - 506, 0, 673, 0, 1229, -245, -220, -52, 685, 0, - 621, 0, -6, 35, 0, 0, 8, 0, 0, 0, + 0, 1713, 0, 0, 0, 2, -16, -177, -42, 1714, + 0, 1753, 1763, 81, 0, 0, 5, 0, 0, 0, + 0, 0, 0, -832, -680, -220, -565, 0, 0, 0, + 0, 0, -176, 0, 0, 0, 869, 0, 965, 0, + 0, 0, 0, 734, 736, -17, -229, 0, 0, 0, + 0, 605, -604, -407, -368, -322, -318, -302, -254, -253, + -869,-1115, 0, 1, 0, 173, 0,-1058, 0, 0, + 0, 0, 0, 0, 551, -48, 391, 0, 0, 0, + 434,-1023, 0, -273, -294, 1152, 0, 0, 0, -856, + 384, 0, 0, -488, 0, 0, 458, 0, 0, 430, + 0, 0, 465, 0, -246, -592, 0, 0, 0, 0, + 558, -14, 0, 0, 988, 993, 996, 1146, -515, 0, + 0, -308, 1007, 557, 0,-1304, 0, 0, 0, 0, + 0, 0, 0, 0, 365, 0, 0, 0, 0, 0, + 0, 0, 0, 627, 0, 0, 0, 0, -317, 548, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 641, + 0, -491, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 383, 0, 0, 466, 0, 0, 469, 472, 388, + 0, 0, 0, 0, 0, 0, 0, 0, 699, 0, + 0, 0, 0, -64, 0, 216, -96, 0, 0, 536, + 0, 594, 0, 1047, 0, 1347, -292, -270, -58, 162, + 0, 704, 0, -31, -12, 0, 0, 474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -224, 0, 517, 0, 0, -419, 0, - 0, 0, 925, 0, -257, -118, 1069, 1005, 0, 994, - 0, 1183, 1392, 1106, 0, 0, 824, 1660, 0, 0, - 0, 0, 1082, 0, 0, 0, 0, 0, -465, 0, - 0, 0, 0, 0, 1134, 0, 491, 835, 771, 833, - 1368, 1369, 1373, 1375, 1367, 0, 1371, 0, 0, 0, - 1044, 0, 825, 0, 0, 0, 0, 0, 0, 0, - 0, -238, 0, 0, 0, 0, -391, 0, 655, 0, - 580, 0, 671, 0, 0, 0, 749, -469, -11, -265, - -7, 0, 1606, 0, 38, 0, 47, 52, 63, 65, - 67, 94, 111, 115, 137, 139, 0, -594, 0, -5, - 0, 0, 887, 0, -532, 0, 0, 0, 789, 0, - 936, 0, 899, -402, 0, 0, 0, 0, 0, 0, - 807, 0, 0, 812, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 832, 0, 0, 0, 0, - 0, 0, 0, 0, -8, 0, 1300, 0, 0, 0, - 966, 0, 0, 0, 0, 0, -159, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1400, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 625, 0, - 0, 0, 0, 0, 0, 0, 0, 737, 0, 0, - 0, 0, + 0, 0, 0, 0, -266, 0, 637, 0, 0, -522, + 0, 0, 0, 1012, 0, -301, -125, 1164, 1100, 0, + 1090, 0, 1297, 1515, 1206, 0, 0, 914, 1803, 0, + 0, 0, 0, 1179, 0, 0, 0, 0, 0, -776, + 0, 0, 0, 0, 0, 20, 0, 484, 883, 690, + 868, 1490, 1491, 1489, 1492, 1493, 0, 1488, 0, 0, + 0, 1121, 0, 915, 0, 0, 0, 0, 0, 0, + 0, 0, -268, 0, 0, 0, 0, -441, 0, 763, + 0, 670, 0, 757, 0, 0, 0, 822, -518, -1, + -305, 4, 0, 1739, 0, 55, 0, 63, 67, 68, + 83, 84, 86, 115, 119, 123, 124, 0, -590, 0, + -28, 0, 0, 950, 0, -848, 0, 0, 0, 862, + 0, 1014, 0, 966, -456, 0, 0, 0, 0, 0, + 0, 871, 0, 0, 876, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 888, 0, 0, 0, + 0, 0, 0, 0, 0, -36, 0, 1400, 0, 0, + 0, 1040, 0, 0, 0, 0, 0, -170, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1502, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 709, + 0, 0, 0, 0, 0, 0, 0, 0, 810, 0, + 0, 0, 0, 0, 0, -10, 1113, 0, 0, 0, + 1120, }; - protected static readonly short [] yyTable = { 97, - 452, 303, 98, 144, 184, 649, 192, 145, 654, 455, - 16, 178, 428, 388, 600, 379, 413, 378, 686, 181, - 491, 271, 622, 210, 509, 482, 436, 354, 692, 903, - 215, 217, 448, 1031, 471, 768, 769, 787, 1066, 1067, - 696, 257, 922, 1153, 216, 782, 12, 311, 257, 103, - 319, 408, 149, 264, 715, 263, 950, 266, 477, 1160, - 755, 150, 310, 184, 184, 318, 151, 287, 951, 361, - 627, 103, 361, 951, 583, 1293, 103, 152, 798, 153, - 800, 154, 184, 742, 179, 1379, 1092, 593, 935, 1244, - 473, 325, 216, 216, 216, 216, 216, 216, 216, 216, - 584, 371, 596, 1402, 1, 937, 597, 778, 155, 1231, - 246, 327, 277, 282, 493, 373, 683, 979, 247, 5, - 1172, 303, 575, 576, 743, 156, 413, 366, 344, 157, - 97, 306, 585, 98, 144, 351, 775, 567, 145, 344, - 693, 47, 208, 344, 782, 515, 1019, 352, 744, 14, - 1172, 158, 362, 159, 516, 362, 344, 363, 192, 364, - 363, 47, 364, 303, 1403, 365, 366, 598, 365, 366, - 494, 387, 47, 366, 1114, 745, 684, 1323, 716, 480, - 103, 1245, 694, 149, 47, 667, 300, 643, 344, 770, - 412, 209, 150, 628, 647, 416, 776, 151, 782, 1294, - 577, 388, 858, 1380, 861, 184, 2, 13, 152, 301, - 153, 371, 154, 371, 514, 371, 371, 782, 371, 470, - 371, 952, 491, 475, 779, 841, 952, 479, 509, 190, - 427, 184, 491, 431, 433, 586, 215, 424, 408, 155, - 367, 184, 478, 377, 215, 180, 458, 184, 594, 936, - 216, 466, 1361, 468, 418, 467, 156, 431, 216, 248, - 157, 608, 371, 469, 371, 719, 938, 371, 484, 485, - 1232, 3, 4, 5, 490, 300, 373, 103, 492, 1385, - 426, 257, 158, 947, 159, 860, 190, 184, 496, 190, - 184, 1395, 582, 1396, 721, 47, 457, 973, 301, 922, - 412, 525, 18, 103, 710, 533, 534, 535, 536, 537, - 538, 539, 540, 541, 542, 543, 667, 601, 303, 1427, - 103, 184, 184, 683, 1350, 460, 782, 216, 922, 897, - 783, 929, 448, 930, 784, 931, 500, 565, 943, 216, - 216, 216, 303, 891, 216, 216, 609, 204, 444, 184, - 184, 205, 684, 1204, 881, 383, 1091, 296, 731, 192, - 711, 300, 875, 1061, 1357, 890, 961, 184, 863, 461, - 547, 548, 184, 190, 1107, 1133, 5, 876, 876, 761, - 2, 460, 580, 683, 301, 335, 661, 587, 1387, 1388, - 300, 640, 448, 1405, 186, 190, 640, 1206, 570, 572, - 640, 206, 1205, 1037, 1281, 297, 659, 617, 660, 436, - 1413, 994, 684, 301, 413, 640, 359, 509, 1133, 621, - 1164, 336, 701, 449, 703, 1176, 627, 942, 627, 82, - 959, 645, 960, 525, 298, 652, 190, 879, 1428, 922, - 1069, 1070, 640, 784, 1419, 922, 1062, 1072, 658, 660, - 1164, 668, 1134, 1311, 1312, 876, 1314, 676, 445, 103, - 446, 640, 208, 361, 678, 299, 666, 1333, 64, 64, - 1340, 1341, 64, 509, 18, 1223, 490, 875, 875, 1224, - 492, 300, 627, 449, 688, 1356, 490, 461, 732, 659, - 492, 660, 359, 517, 184, 1134, 853, 1165, 381, 359, - 337, 338, 518, 1040, 301, 705, 705, 251, 300, 252, - 298, 209, 1157, 1392, 447, 300, 659, 302, 660, 422, - 216, 643, 103, 813, 780, 873, 359, 1165, 1116, 1132, - 359, 301, 103, 359, 359, 359, 298, 902, 301, 713, - 359, 602, 622, 461, 360, 303, 362, 974, 1116, 1207, - 82, 363, 718, 364, 208, 875, 219, 300, 724, 365, - 366, 243, 886, 244, 245, 1393, 249, 602, 250, 686, - 455, 423, 1132, 465, 1163, 465, 261, 736, 262, 640, - 301, 638, 184, 300, 23, 32, 267, 34, 412, 269, - 35, 273, 1108, 302, 1135, 39, 284, 285, 1208, 43, - 82, 1136, 431, 209, 1163, 638, 301, 337, 46, 1196, - 1137, 766, 298, 475, 29, 51, 652, 301, 317, 302, - 53, 645, 1109, 298, 56, 82, 736, 215, 1138, 465, - 700, 640, 638, 647, 1246, 190, 58, 1135, 59, 1166, - 988, 216, 61, 1110, 1136, 184, 1167, 921, 791, 774, - 68, 69, 989, 1137, 72, 1168, 337, 274, 632, 300, - 203, 801, 639, 802, 103, 103, 184, 906, 300, 1166, - 300, 1138, 906, 1169, 906, 805, 1167, 906, 906, 184, - 906, 906, 301, 184, 220, 1168, 639, 300, 1024, 666, - 308, 301, 525, 301, 790, 302, 308, 525, 815, 100, - 652, 906, 582, 1169, 302, 309, 302, 103, 82, 103, - 301, 831, 832, 639, 1139, 803, 666, 999, 270, 187, - 184, 100, 207, 302, 270, 666, 100, 187, 807, 267, - 1025, 317, 850, 853, 427, 587, 491, 305, 308, 184, - 506, 82, 184, 344, 300, 344, 506, 460, 431, 587, - 1090, 877, 218, 383, 972, 906, 1034, 1139, 880, 1170, - 461, 280, 280, 1140, 344, 344, 270, 301, 888, 449, - 652, 746, 308, 491, 792, 301, 344, 462, 747, 344, - 280, 465, 792, 909, 344, 301, 921, 794, 909, 1170, - 909, 862, 344, 909, 909, 344, 909, 909, 702, 1068, - 270, 1020, 184, 732, 270, 491, 1140, 907, 1171, 909, - 532, 911, 502, 1021, 752, 502, 662, 909, 283, 503, - 184, 920, 503, 303, 600, 662, 307, 549, 550, 184, - 100, 504, 587, 320, 504, 587, 347, 587, 1171, 587, - 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, - 281, 975, 330, 976, 652, 1048, 348, 441, 330, 281, - 587, 442, 587, 1344, 587, 331, 587, 587, 587, 350, - 388, 909, 1150, 1193, 356, 762, 900, 762, 927, 762, - 1193, 900, 587, 900, 341, 342, 900, 900, 688, 900, - 900, 661, 965, 587, 967, 344, 968, 349, 343, 344, - 661, 1227, 252, 280, 980, 587, 344, 1234, 902, 344, - 344, 353, 103, 902, 1240, 902, 339, 340, 902, 902, - 587, 902, 902, 344, 290, 1397, 290, 100, 977, 280, - 751, 290, 751, 383, 751, 427, 362, 618, 455, 280, - 180, 363, 180, 364, 180, 280, 385, 1006, 652, 365, - 366, 384, 896, 100, 192, 1013, 192, 896, 192, 896, - 920, 1416, 896, 896, 900, 896, 896, 345, 346, 359, - 100, 427, 1018, 359, 427, 344, 359, 659, 359, 828, - 829, 1433, 1434, 359, 640, 280, 344, 35, 280, 640, - 490, 603, 1044, 640, 492, 604, 902, 344, 192, 1047, - 608, 344, 608, 208, 980, 312, 1053, 635, 640, 301, - 924, 636, 644, 184, 344, 409, 442, 427, 704, 280, - 280, 410, 604, 337, 313, 314, 337, 490, 192, 1074, - 968, 492, 103, 65, 417, 640, 103, 65, 344, 344, - 896, 344, 344, 56, 315, 748, 344, 280, 280, 748, - 421, 744, 209, 744, 640, 316, 332, 333, 334, 490, - 1053, 1010, 1011, 492, 853, 429, 753, 184, 753, 103, - 103, 430, 1103, 103, 451, 168, 103, 168, 1115, 1131, - 349, 1406, 1407, 184, 349, 309, 344, 129, 1148, 129, - 427, 175, 456, 175, 129, 176, 459, 176, 1115, 476, - 853, 507, 853, 481, 423, 103, 423, 507, 495, 100, - 4, 553, 554, 555, 556, 67, 198, 67, 198, 169, - 1238, 169, 1131, 513, 1115, 423, 423, 134, 349, 134, - 875, 875, 1111, 1238, 295, 141, 295, 141, 184, 184, - 302, 301, 302, 1198, 519, 423, 184, 530, 530, 280, - 1289, 349, 1290, 423, 1115, 349, 423, 344, 349, 573, - 349, 640, 640, 1029, 1030, 349, 305, 184, 184, 629, - 184, 605, 100, 551, 552, 581, 1219, 557, 558, 607, - 619, 630, 100, 631, 633, 656, 634, 1111, 674, 1219, - 657, 184, 280, 672, 184, 1219, 677, 673, 675, 349, - 679, 680, 1219, 695, 681, 321, 682, 709, 1247, 698, - 697, 687, 708, 713, 720, 714, 1202, 1203, 288, 289, - 290, 291, 292, 293, 294, 295, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 723, 722, 729, 733, - 1230, 734, 737, 1233, 35, 757, 741, 750, 35, 758, - 759, 760, 767, 765, 764, 785, 763, 186, 786, 35, - 788, 795, 796, 808, 35, 781, 810, 797, 35, 819, - 824, 35, 826, 830, 833, 837, 1324, 836, 839, 840, - 280, 829, 846, 35, 35, 843, 848, 854, 35, 35, - 652, 1198, 867, 1351, 35, 868, 35, 35, 35, 35, - 869, 870, 427, 876, 35, 878, 1363, 1365, 35, 885, - 35, 445, 900, 892, 100, 100, 894, 905, 896, 1373, - 35, 898, 35, 35, 904, 35, 923, 932, 933, 35, - 924, 946, 939, 1351, 1351, 940, 941, 948, 945, 792, - 958, 966, 963, 280, 964, 983, 35, 971, 991, 992, - 987, 990, 652, 993, 35, 35, 1000, 100, 1009, 100, - 1014, 1005, 1027, 1073, 280, 1012, 1032, 4, 1040, 1036, - 1043, 47, 1051, 1038, 1050, 1076, 1062, 280, 1080, 1081, - 1089, 280, 47, 1078, 1082, 1090, 1094, 47, 652, 1351, - 1097, 47, 1106, 1098, 47, 1099, 1146, 1421, 1421, 1100, - 1177, 1102, 1154, 1149, 1429, 1429, 47, 47, 1151, 525, - 525, 47, 47, 1161, 1152, 591, 483, 47, 1179, 47, - 47, 47, 47, 1200, 1209, 1222, 1225, 47, 1236, 1239, - 1226, 47, 1242, 47, 1235, 1243, 1273, 280, 1245, 1275, - 280, 1276, 1278, 47, 1279, 1280, 47, 1282, 47, 1284, - 1286, 1287, 47, 483, 1292, 1307, 1297, 1300, 1315, 1304, - 1334, 1305, 1345, 1316, 1389, 544, 545, 546, 1319, 47, - 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, - 483, 483, 483, 483, 483, 483, 1329, 1336, 1348, 1349, - 1346, 1355, 1372, 1393, 1359, 1358, 48, 1394, 591, 1370, - 280, 1375, 1377, 591, 1399, 591, 591, 591, 591, 591, - 591, 591, 591, 591, 591, 591, 1369, 1374, 1378, 1383, - 1390, 1398, 1408, 1392, 1414, 1435, 591, 280, 591, 8, - 591, 1415, 591, 591, 591, 1436, 1437, 829, 829, 541, - 729, 827, 31, 501, 797, 829, 829, 829, 829, 829, - 609, 829, 829, 502, 829, 829, 829, 829, 829, 829, - 829, 829, 100, 460, 610, 29, 829, 21, 829, 829, - 829, 829, 829, 829, 801, 500, 829, 29, 483, 322, - 829, 829, 526, 829, 829, 829, 591, 747, 30, 219, - 755, 95, 802, 30, 835, 829, 756, 829, 747, 829, - 829, 776, 804, 829, 777, 829, 829, 829, 829, 829, - 829, 829, 829, 829, 829, 829, 829, 673, 829, 806, - 661, 829, 829, 326, 683, 829, 829, 661, 351, 772, - 344, 640, 640, 189, 137, 193, 1249, 28, 119, 298, - 144, 829, 829, 829, 138, 120, 699, 829, 829, 299, - 145, 829, 19, 1016, 1155, 915, 829, 829, 829, 829, - 829, 835, 1391, 1017, 829, 1360, 829, 739, 1201, 1400, - 1347, 1342, 829, 829, 1376, 864, 1216, 1228, 1250, 1431, - 865, 1162, 100, 866, 1159, 859, 100, 1424, 1371, 1095, - 1366, 1364, 1423, 669, 1291, 1220, 1052, 829, 829, 829, - 829, 1096, 829, 884, 707, 773, 814, 520, 829, 749, - 949, 280, 812, 254, 559, 771, 560, 563, 1084, 100, - 100, 561, 564, 100, 562, 962, 100, 1251, 1252, 1253, - 1254, 1180, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, - 809, 1087, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, - 1039, 355, 1007, 48, 934, 100, 906, 48, 944, 48, - 1001, 48, 662, 48, 899, 280, 48, 1003, 48, 48, - 579, 48, 1178, 48, 0, 48, 996, 48, 48, 48, - 48, 280, 1075, 48, 48, 0, 0, 0, 0, 48, - 48, 48, 48, 48, 0, 0, 48, 48, 48, 0, - 48, 27, 48, 48, 48, 48, 48, 48, 48, 48, - 0, 48, 48, 48, 48, 0, 0, 48, 48, 48, - 0, 48, 0, 0, 0, 0, 48, 48, 0, 48, - 48, 0, 48, 48, 48, 0, 280, 280, 48, 0, - 0, 0, 0, 0, 280, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 48, 0, 0, 0, 48, - 48, 0, 0, 0, 0, 280, 280, 0, 280, 34, + protected static readonly short [] yyTable = { 108, + 502, 188, 109, 505, 113, 18, 44, 713, 344, 233, + 420, 438, 718, 478, 664, 154, 419, 463, 686, 750, + 155, 541, 532, 498, 191, 486, 312, 559, 256, 756, + 395, 258, 978, 1095, 1128, 1129, 558, 229, 860, 318, + 323, 304, 760, 923, 251, 521, 351, 113, 359, 527, + 1024, 113, 352, 783, 360, 647, 298, 458, 347, 402, + 298, 1215, 1025, 14, 287, 305, 374, 307, 780, 189, + 494, 159, 288, 1025, 402, 672, 328, 1222, 48, 160, + 1154, 648, 657, 161, 162, 691, 1009, 1419, 1427, 1428, + 48, 972, 851, 20, 660, 1333, 1, 1017, 1011, 163, + 164, 197, 165, 841, 842, 1123, 1293, 747, 635, 938, + 660, 1432, 360, 649, 661, 329, 330, 331, 332, 333, + 334, 335, 336, 804, 326, 1035, 424, 463, 617, 796, + 848, 166, 16, 197, 1442, 167, 231, 337, 108, 168, + 169, 109, 403, 113, 1459, 233, 871, 404, 873, 405, + 427, 428, 783, 798, 154, 406, 407, 403, 344, 155, + 673, 523, 404, 1433, 405, 799, 855, 45, 748, 1064, + 406, 407, 1467, 2, 48, 662, 1176, 660, 111, 374, + 495, 374, 496, 374, 249, 338, 196, 231, 1124, 437, + 530, 849, 781, 707, 1033, 1443, 1034, 731, 2, 438, + 344, 48, 855, 711, 660, 1420, 783, 843, 692, 852, + 159, 468, 429, 289, 339, 1026, 650, 6, 160, 1334, + 231, 111, 161, 162, 15, 111, 1026, 374, 435, 462, + 190, 408, 541, 250, 466, 194, 497, 476, 163, 164, + 559, 165, 541, 658, 458, 340, 418, 1010, 1401, 321, + 321, 564, 256, 507, 520, 474, 528, 341, 525, 1012, + 256, 341, 529, 3, 4, 5, 6, 1294, 321, 477, + 166, 113, 481, 483, 167, 1425, 661, 954, 168, 169, + 342, 519, 93, 857, 342, 508, 341, 1435, 231, 1436, + 516, 1468, 518, 550, 517, 342, 481, 113, 343, 784, + 923, 546, 865, 194, 194, 1153, 5, 534, 535, 342, + 1047, 1363, 936, 1390, 113, 856, 923, 111, 543, 857, + 298, 559, 194, 1169, 956, 540, 20, 597, 598, 632, + 542, 805, 641, 376, 1397, 965, 1234, 434, 1306, 462, + 575, 786, 731, 533, 583, 584, 585, 586, 587, 588, + 589, 590, 591, 592, 593, 620, 622, 625, 626, 661, + 321, 321, 1021, 665, 344, 1445, 1234, 392, 360, 377, + 966, 877, 877, 684, 1238, 544, 615, 233, 449, 393, + 533, 950, 1453, 685, 641, 775, 661, 636, 344, 1268, + 876, 876, 594, 595, 596, 341, 461, 533, 533, 533, + 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, + 533, 533, 533, 834, 194, 194, 633, 634, 342, 450, + 339, 321, 645, 231, 1285, 231, 630, 923, 1286, 43, + 1307, 486, 338, 923, 684, 338, 627, 341, 463, 449, + 651, 49, 776, 559, 685, 111, 685, 321, 378, 379, + 877, 360, 558, 461, 93, 681, 1016, 321, 249, 1089, + 342, 55, 113, 321, 628, 462, 628, 341, 765, 876, + 767, 111, 768, 400, 6, 194, 818, 1101, 360, 709, + 450, 575, 360, 716, 360, 360, 360, 360, 111, 641, + 342, 472, 360, 328, 641, 245, 722, 724, 641, 246, + 819, 194, 199, 321, 343, 740, 321, 250, 1131, 1132, + 559, 194, 742, 641, 533, 1134, 757, 194, 934, 730, + 345, 628, 462, 345, 349, 113, 401, 820, 511, 466, + 929, 466, 752, 257, 797, 113, 540, 321, 321, 249, + 641, 542, 200, 48, 473, 725, 540, 367, 886, 247, + 707, 542, 311, 770, 770, 1266, 1195, 194, 758, 641, + 194, 231, 686, 5, 244, 321, 321, 48, 948, 257, + 257, 257, 257, 257, 257, 257, 257, 372, 48, 339, + 248, 853, 763, 48, 750, 961, 466, 48, 250, 402, + 48, 194, 194, 367, 1178, 1194, 505, 1269, 737, 1195, + 783, 1226, 48, 48, 1267, 344, 789, 48, 48, 639, + 666, 640, 696, 48, 1178, 48, 48, 48, 48, 194, + 194, 821, 341, 48, 565, 259, 341, 48, 822, 48, + 341, 1226, 261, 639, 566, 640, 111, 194, 1194, 48, + 1225, 345, 48, 93, 48, 342, 1270, 737, 48, 342, + 462, 194, 345, 342, 311, 609, 345, 609, 802, 343, + 639, 817, 640, 343, 481, 48, 256, 711, 338, 345, + 1225, 525, 403, 839, 863, 324, 321, 404, 716, 405, + 567, 113, 113, 709, 997, 406, 407, 372, 348, 372, + 568, 372, 372, 388, 372, 876, 372, 339, 260, 111, + 803, 345, 284, 285, 286, 1321, 290, 291, 880, 111, + 864, 302, 303, 225, 349, 226, 361, 338, 308, 321, + 310, 391, 314, 874, 113, 875, 113, 325, 326, 350, + 732, 342, 1351, 1352, 847, 1354, 389, 878, 372, 390, + 372, 345, 311, 372, 341, 764, 1373, 394, 358, 1380, + 1381, 1069, 345, 1196, 293, 575, 345, 257, 667, 636, + 575, 888, 929, 716, 1396, 257, 541, 342, 491, 345, + 331, 632, 492, 194, 904, 905, 331, 907, 397, 341, + 937, 343, 907, 332, 907, 667, 1098, 907, 907, 342, + 907, 907, 1197, 339, 667, 510, 1196, 541, 1227, 910, + 321, 345, 342, 766, 910, 926, 910, 477, 511, 910, + 910, 907, 910, 910, 651, 918, 343, 1104, 1046, 481, + 997, 321, 952, 1130, 666, 512, 1219, 541, 1227, 955, + 1048, 386, 387, 910, 257, 1197, 664, 1228, 1198, 963, + 341, 716, 1199, 422, 582, 349, 257, 257, 257, 341, + 93, 257, 257, 341, 194, 111, 111, 1384, 1200, 1258, + 424, 599, 600, 342, 65, 65, 907, 1228, 65, 424, + 1001, 533, 342, 311, 797, 194, 342, 343, 982, 865, + 984, 1198, 986, 1229, 321, 1199, 425, 1230, 910, 426, + 308, 438, 358, 93, 1212, 344, 996, 1255, 111, 1058, + 111, 1200, 1308, 1231, 1255, 321, 1201, 1202, 225, 349, + 1112, 1059, 763, 1229, 763, 651, 763, 1230, 321, 1437, + 93, 1003, 321, 1004, 867, 1005, 663, 716, 667, 1152, + 499, 430, 668, 1231, 901, 663, 433, 311, 194, 901, + 113, 901, 515, 345, 901, 901, 459, 901, 901, 1201, + 1202, 1232, 1233, 505, 345, 1456, 552, 345, 345, 194, + 225, 752, 228, 553, 249, 1039, 353, 1041, 282, 1042, + 460, 345, 194, 1473, 1474, 554, 194, 282, 292, 641, + 293, 1232, 1233, 467, 641, 354, 355, 903, 641, 321, + 321, 752, 903, 752, 903, 752, 471, 903, 903, 1051, + 903, 903, 552, 641, 827, 356, 699, 477, 662, 553, + 700, 380, 381, 250, 382, 383, 357, 662, 1289, 1076, + 716, 554, 708, 901, 1296, 194, 492, 1083, 384, 385, + 641, 1302, 996, 291, 1088, 291, 257, 769, 479, 477, + 291, 668, 477, 194, 194, 233, 480, 1115, 66, 641, + 321, 897, 66, 749, 501, 113, 897, 749, 897, 113, + 1108, 897, 897, 929, 897, 897, 977, 1111, 778, 233, + 540, 603, 604, 605, 606, 542, 903, 350, 507, 477, + 321, 345, 526, 345, 507, 506, 113, 113, 901, 902, + 113, 1136, 1042, 113, 181, 1049, 181, 1050, 181, 1115, + 531, 540, 345, 345, 194, 509, 542, 682, 345, 345, + 1173, 345, 345, 57, 111, 1080, 1081, 1177, 1193, 193, + 113, 193, 345, 193, 876, 876, 194, 373, 374, 375, + 345, 540, 1165, 345, 194, 350, 542, 1177, 545, 350, + 897, 345, 130, 745, 130, 745, 403, 723, 1210, 130, + 477, 404, 508, 405, 754, 424, 754, 424, 508, 406, + 407, 1193, 943, 1177, 943, 1173, 350, 169, 563, 169, + 350, 257, 345, 350, 569, 350, 424, 424, 1300, 176, + 350, 176, 177, 350, 177, 854, 68, 854, 68, 342, + 512, 1300, 646, 1177, 1264, 1265, 424, 199, 170, 199, + 170, 342, 430, 1260, 424, 1446, 1447, 424, 1329, 623, + 1330, 484, 346, 135, 350, 135, 531, 531, 1292, 57, + 25, 1295, 26, 641, 641, 27, 253, 1093, 1094, 111, + 28, 62, 63, 111, 29, 360, 296, 631, 296, 360, + 65, 345, 360, 31, 360, 142, 303, 142, 303, 360, + 33, 669, 321, 607, 608, 34, 671, 72, 73, 35, + 111, 111, 601, 602, 111, 683, 693, 111, 1309, 694, + 695, 37, 697, 38, 75, 698, 738, 39, 720, 721, + 77, 736, 79, 737, 81, 40, 41, 254, 739, 42, + 741, 743, 744, 1364, 111, 745, 746, 751, 759, 761, + 773, 586, 762, 774, 321, 778, 194, 779, 788, 362, + 1391, 785, 787, 794, 806, 90, 91, 92, 807, 810, + 321, 809, 813, 1403, 1405, 94, 43, 830, 716, 1260, + 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, + 477, 825, 831, 832, 833, 840, 838, 837, 196, 854, + 1391, 1391, 836, 858, 859, 861, 868, 1413, 194, 830, + 870, 869, 883, 897, 892, 881, 899, 903, 906, 907, + 913, 104, 485, 914, 194, 321, 321, 916, 917, 919, + 922, 924, 930, 321, 586, 942, 943, 944, 945, 586, + 716, 586, 586, 586, 586, 586, 586, 586, 586, 586, + 586, 586, 951, 953, 321, 321, 1391, 321, 960, 495, + 969, 967, 586, 975, 586, 971, 586, 973, 586, 586, + 586, 979, 990, 980, 999, 1007, 716, 1006, 321, 194, + 194, 321, 1013, 1014, 586, 1461, 1461, 194, 1015, 1019, + 1022, 1020, 1469, 1469, 586, 586, 512, 575, 575, 1032, + 865, 512, 512, 1038, 1037, 1040, 1045, 586, 194, 194, + 1053, 194, 1057, 1060, 1061, 1062, 1063, 1281, 1070, 1075, + 1082, 1084, 1104, 586, 512, 1079, 1096, 1091, 1102, 1135, + 1281, 1100, 194, 1107, 512, 194, 1281, 512, 512, 1114, + 1142, 1140, 512, 1281, 1138, 512, 1144, 512, 1124, 512, + 512, 512, 512, 1151, 1156, 1143, 1160, 512, 1152, 1159, + 1161, 512, 1162, 1208, 1164, 512, 1168, 1211, 1213, 1271, + 1216, 1223, 1214, 512, 1284, 773, 512, 1241, 512, 512, + 1239, 1262, 1287, 1288, 512, 1298, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 1301, 1304, 512, + 1313, 1297, 1322, 1315, 1316, 1305, 512, 512, 1307, 512, + 512, 512, 512, 512, 512, 512, 1318, 512, 512, 1319, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 1320, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, + 512, 512, 512, 1324, 1326, 512, 1327, 512, 1332, 512, + 1337, 1340, 512, 1344, 1347, 830, 830, 1345, 512, 1355, + 1356, 1374, 1359, 830, 830, 830, 830, 830, 1369, 830, + 830, 1376, 830, 830, 830, 830, 830, 830, 830, 830, + 1385, 1386, 1388, 1389, 830, 1395, 830, 830, 830, 830, + 830, 830, 1398, 345, 830, 1399, 1409, 1410, 830, 830, + 1412, 830, 830, 830, 1417, 1415, 1418, 1414, 1423, 1429, + 1430, 1434, 1438, 830, 1439, 830, 1448, 830, 830, 1433, + 1432, 830, 1454, 830, 830, 830, 830, 830, 830, 830, + 830, 830, 830, 830, 830, 1455, 830, 1475, 1476, 830, + 830, 9, 1477, 830, 830, 939, 542, 828, 730, 32, + 502, 931, 610, 798, 503, 461, 611, 674, 30, 830, + 830, 830, 22, 802, 501, 830, 830, 30, 748, 830, + 220, 31, 527, 323, 830, 830, 830, 830, 830, 96, + 31, 756, 830, 803, 830, 836, 757, 748, 777, 805, + 830, 830, 778, 807, 662, 662, 327, 684, 352, 345, + 641, 138, 641, 230, 54, 234, 120, 21, 299, 145, + 139, 121, 300, 146, 912, 830, 830, 830, 830, 991, + 830, 773, 773, 1086, 1217, 1087, 1263, 830, 1431, 773, + 773, 773, 773, 773, 1400, 773, 773, 1440, 773, 773, + 773, 773, 773, 773, 773, 738, 1387, 1416, 1382, 1278, + 773, 815, 773, 773, 773, 773, 773, 773, 939, 828, + 773, 1290, 1471, 940, 773, 773, 941, 773, 773, 773, + 1224, 1311, 1221, 935, 1464, 1406, 1411, 1404, 1463, 773, + 1157, 773, 1331, 773, 773, 1282, 1158, 773, 908, 773, + 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, + 773, 733, 773, 959, 846, 773, 773, 887, 772, 773, + 773, 570, 885, 824, 295, 1023, 844, 609, 611, 610, + 614, 882, 612, 1242, 613, 773, 773, 773, 1146, 1149, + 1036, 773, 773, 1103, 396, 773, 1018, 1008, 1071, 1077, + 773, 773, 773, 773, 773, 1073, 1066, 981, 773, 345, + 773, 974, 726, 629, 345, 345, 773, 773, 1240, 1137, + 910, 0, 0, 0, 0, 0, 909, 0, 0, 0, + 0, 0, 0, 0, 338, 0, 0, 345, 0, 0, + 0, 773, 773, 773, 773, 0, 773, 345, 0, 0, + 345, 345, 0, 773, 0, 345, 0, 0, 345, 0, + 345, 0, 345, 345, 345, 345, 0, 0, 0, 0, + 345, 0, 0, 0, 345, 0, 0, 0, 345, 0, + 0, 0, 0, 0, 0, 0, 345, 0, 0, 345, + 0, 345, 345, 0, 0, 0, 0, 345, 0, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 0, 345, 0, 0, 0, 0, 0, 0, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 0, + 345, 345, 0, 0, 345, 345, 345, 345, 345, 0, + 0, 345, 345, 0, 0, 0, 345, 345, 345, 345, + 345, 345, 345, 345, 0, 0, 0, 0, 0, 0, + 0, 738, 0, 375, 0, 345, 738, 738, 345, 0, + 345, 0, 345, 0, 0, 345, 0, 0, 0, 0, + 0, 345, 0, 0, 0, 0, 0, 0, 0, 738, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 738, + 0, 0, 738, 738, 0, 0, 0, 738, 0, 0, + 738, 0, 738, 0, 738, 738, 738, 738, 0, 0, + 0, 0, 738, 0, 0, 0, 738, 0, 0, 0, + 738, 0, 0, 0, 0, 0, 0, 0, 738, 0, + 0, 738, 0, 738, 738, 0, 0, 0, 0, 738, + 0, 738, 738, 738, 738, 738, 738, 738, 738, 738, + 738, 738, 0, 0, 738, 0, 0, 0, 0, 0, + 0, 738, 738, 738, 738, 738, 738, 0, 738, 738, + 738, 0, 738, 738, 0, 0, 738, 738, 738, 738, + 338, 0, 345, 738, 738, 338, 338, 0, 738, 738, + 738, 738, 738, 738, 738, 738, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 738, 338, 0, + 738, 0, 738, 0, 738, 0, 0, 738, 338, 0, + 0, 338, 338, 738, 0, 0, 338, 0, 0, 338, + 0, 338, 0, 338, 338, 338, 338, 0, 0, 0, + 0, 338, 0, 0, 0, 338, 0, 0, 0, 338, + 0, 0, 0, 0, 0, 0, 0, 338, 0, 0, + 338, 0, 338, 338, 0, 0, 0, 0, 338, 0, + 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, + 338, 0, 0, 338, 0, 0, 0, 0, 0, 0, + 338, 338, 338, 338, 338, 338, 0, 338, 338, 338, + 0, 338, 338, 0, 0, 338, 338, 338, 338, 375, + 0, 0, 338, 338, 375, 375, 0, 338, 338, 338, + 338, 338, 338, 338, 338, 0, 0, 370, 0, 0, + 0, 0, 0, 0, 0, 0, 338, 375, 0, 338, + 0, 338, 0, 338, 0, 0, 338, 375, 0, 0, + 375, 375, 338, 0, 0, 375, 0, 0, 375, 0, + 375, 0, 375, 375, 375, 375, 0, 0, 0, 0, + 375, 0, 0, 0, 375, 0, 0, 0, 375, 0, + 0, 0, 0, 0, 0, 0, 375, 0, 0, 375, + 0, 375, 375, 0, 0, 0, 0, 375, 201, 375, + 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, + 0, 0, 375, 0, 0, 0, 0, 0, 0, 375, + 375, 0, 375, 375, 375, 0, 375, 375, 375, 0, + 375, 375, 0, 0, 375, 375, 375, 375, 345, 0, + 202, 375, 375, 0, 345, 0, 375, 375, 375, 375, + 375, 375, 375, 375, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 375, 0, 0, 375, 0, + 375, 0, 0, 0, 0, 0, 345, 0, 0, 0, + 345, 375, 0, 0, 49, 0, 0, 0, 0, 203, + 204, 205, 206, 0, 207, 208, 209, 210, 211, 212, + 213, 214, 0, 0, 215, 216, 217, 218, 219, 220, + 221, 222, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 345, 0, 0, 0, 0, 345, 0, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 592, 0, 0, 0, 0, 0, 0, 0, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 0, 345, + 345, 0, 0, 345, 345, 345, 345, 345, 0, 0, + 345, 345, 0, 0, 0, 345, 345, 345, 345, 345, + 345, 345, 345, 370, 0, 0, 0, 0, 0, 370, + 0, 0, 0, 0, 345, 0, 28, 345, 0, 345, + 0, 345, 0, 0, 345, 0, 0, 0, 0, 0, + 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 370, 0, 592, 0, 370, 0, 0, 592, 0, + 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, + 592, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 592, 0, 592, 0, 592, 0, 592, 592, 592, + 0, 0, 0, 0, 36, 0, 370, 0, 0, 0, + 0, 370, 0, 370, 370, 370, 370, 370, 370, 370, + 370, 370, 370, 370, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 370, 370, 0, 370, 370, 370, 0, + 370, 370, 370, 0, 370, 370, 0, 0, 370, 370, + 370, 370, 592, 0, 0, 370, 370, 0, 0, 0, + 370, 370, 370, 370, 370, 370, 370, 370, 0, 0, + 0, 0, 0, 35, 0, 0, 0, 0, 0, 370, + 0, 49, 370, 0, 370, 49, 0, 49, 0, 49, + 0, 49, 0, 0, 49, 370, 49, 49, 0, 49, + 0, 49, 0, 49, 0, 49, 49, 49, 49, 0, + 0, 49, 49, 0, 0, 0, 34, 49, 49, 49, + 49, 49, 0, 0, 49, 49, 49, 0, 49, 0, + 49, 49, 49, 49, 49, 49, 49, 49, 0, 49, + 49, 49, 49, 0, 0, 49, 49, 49, 0, 49, + 0, 0, 0, 0, 49, 49, 0, 49, 49, 28, + 49, 49, 49, 0, 0, 0, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 49, 0, 0, 0, 49, 49, 0, + 0, 0, 28, 28, 0, 0, 0, 28, 0, 0, + 49, 28, 0, 28, 0, 0, 28, 0, 28, 28, + 0, 28, 0, 28, 0, 28, 0, 28, 28, 28, + 28, 0, 0, 28, 28, 0, 0, 0, 33, 28, + 0, 28, 28, 28, 0, 0, 28, 28, 28, 0, + 28, 49, 0, 28, 0, 28, 28, 28, 28, 0, + 0, 0, 28, 28, 28, 0, 0, 28, 28, 28, + 0, 36, 0, 0, 0, 36, 28, 28, 0, 28, + 28, 921, 28, 28, 28, 0, 36, 0, 28, 0, + 0, 36, 0, 0, 0, 36, 0, 0, 36, 0, + 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, + 36, 36, 0, 28, 28, 36, 36, 0, 0, 0, + 0, 36, 28, 36, 36, 36, 36, 0, 0, 0, + 0, 36, 0, 0, 0, 36, 0, 36, 0, 0, + 35, 0, 0, 0, 35, 0, 0, 36, 48, 36, + 36, 0, 36, 0, 0, 35, 36, 0, 0, 0, + 35, 0, 0, 28, 35, 0, 0, 35, 0, 0, + 0, 0, 0, 36, 0, 0, 0, 0, 0, 35, + 35, 36, 36, 34, 35, 35, 0, 34, 0, 0, + 35, 7, 35, 35, 35, 35, 0, 0, 34, 0, + 35, 0, 0, 34, 35, 0, 35, 34, 0, 0, + 34, 0, 0, 0, 0, 0, 35, 0, 35, 35, + 0, 35, 34, 34, 0, 35, 28, 34, 34, 0, + 28, 0, 0, 34, 922, 34, 34, 34, 34, 0, + 0, 28, 35, 34, 0, 0, 28, 34, 0, 34, + 28, 35, 0, 28, 0, 0, 0, 0, 0, 34, + 0, 0, 34, 0, 34, 28, 28, 0, 34, 0, + 28, 28, 0, 0, 0, 0, 28, 0, 28, 28, + 28, 28, 0, 0, 0, 34, 28, 0, 0, 0, + 28, 0, 28, 34, 34, 33, 0, 0, 0, 33, + 0, 0, 28, 0, 0, 28, 0, 28, 0, 0, + 33, 28, 0, 0, 0, 33, 0, 0, 0, 33, + 0, 0, 33, 0, 0, 0, 0, 0, 28, 0, + 0, 0, 0, 0, 33, 33, 28, 28, 921, 33, + 33, 0, 48, 0, 0, 33, 0, 33, 33, 33, + 33, 0, 0, 48, 0, 33, 0, 0, 48, 33, + 0, 33, 48, 0, 0, 48, 0, 0, 0, 0, + 0, 33, 0, 0, 33, 0, 33, 48, 48, 0, + 33, 0, 48, 48, 0, 0, 0, 0, 48, 0, + 48, 48, 48, 48, 0, 0, 0, 33, 48, 0, + 0, 0, 48, 0, 48, 48, 33, 0, 0, 48, + 0, 0, 0, 0, 48, 0, 0, 48, 0, 48, + 48, 0, 0, 48, 0, 48, 0, 0, 0, 48, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 772, 772, 0, 0, 280, - 0, 0, 280, 772, 772, 772, 772, 772, 0, 772, - 772, 0, 772, 772, 772, 772, 772, 772, 772, 0, - 0, 0, 483, 48, 772, 0, 772, 772, 772, 772, - 772, 772, 0, 0, 772, 0, 0, 0, 772, 772, - 0, 772, 772, 772, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 772, 0, 772, 0, 772, 772, 0, - 0, 772, 0, 772, 772, 772, 772, 772, 772, 772, - 772, 772, 772, 772, 772, 0, 772, 0, 0, 772, - 772, 0, 0, 772, 772, 0, 0, 0, 0, 0, - 0, 27, 0, 0, 0, 0, 0, 0, 0, 772, - 772, 772, 0, 0, 0, 772, 772, 0, 0, 772, - 0, 0, 0, 0, 772, 772, 772, 772, 772, 0, - 0, 0, 772, 0, 772, 0, 0, 0, 0, 0, - 772, 772, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 0, 0, 0, 48, 48, 0, 0, 7, 48, + 48, 0, 49, 0, 0, 48, 0, 48, 48, 48, + 48, 0, 0, 49, 0, 48, 0, 0, 49, 48, + 0, 48, 49, 0, 0, 49, 0, 0, 0, 0, + 0, 48, 0, 0, 48, 0, 48, 49, 49, 0, + 48, 922, 49, 49, 0, 48, 0, 0, 49, 0, + 49, 49, 49, 49, 0, 0, 48, 48, 49, 0, + 0, 48, 49, 0, 49, 48, 0, 0, 48, 0, + 0, 0, 0, 0, 49, 0, 0, 49, 0, 49, + 48, 48, 0, 49, 0, 48, 48, 0, 0, 0, + 0, 48, 0, 48, 48, 48, 48, 0, 0, 0, + 49, 48, 0, 0, 0, 48, 0, 48, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 56, + 48, 0, 48, 0, 0, 0, 48, 57, 25, 58, + 26, 0, 0, 27, 59, 0, 60, 61, 28, 62, + 63, 64, 29, 48, 0, 0, 0, 0, 65, 0, + 66, 31, 67, 68, 69, 70, 0, 0, 33, 0, + 0, 0, 71, 34, 0, 72, 73, 35, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 0, 37, + 0, 38, 75, 0, 0, 39, 0, 76, 77, 78, + 79, 80, 81, 40, 41, 82, 83, 42, 84, 0, + 85, 0, 0, 86, 87, 345, 0, 88, 89, 0, + 0, 345, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 90, 91, 92, 0, 0, 0, 93, + 0, 0, 0, 94, 0, 0, 0, 0, 95, 96, + 97, 98, 99, 0, 0, 0, 100, 345, 101, 0, + 0, 0, 0, 0, 102, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 345, 0, 0, 0, 0, 0, 345, 0, 104, + 105, 106, 107, 0, 0, 0, 0, 0, 345, 0, + 0, 196, 0, 345, 0, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 0, 0, 0, + 0, 0, 0, 345, 0, 0, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 0, 345, 345, 0, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 0, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 0, 514, 0, 0, 345, 0, 345, 514, + 0, 345, 0, 0, 0, 0, 0, 345, 0, 0, + 0, 0, 345, 0, 0, 345, 0, 345, 345, 0, + 0, 0, 345, 345, 0, 0, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 514, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 345, 0, 0, + 0, 0, 0, 0, 345, 0, 0, 345, 0, 0, + 0, 0, 0, 345, 0, 0, 514, 0, 0, 0, + 0, 514, 0, 514, 514, 514, 514, 514, 514, 514, + 514, 514, 514, 514, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 514, 514, 514, 514, 514, 514, 514, + 514, 514, 514, 913, 514, 514, 0, 514, 514, 514, + 514, 514, 514, 514, 514, 514, 514, 0, 514, 514, + 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, + 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, + 0, 510, 0, 0, 0, 0, 514, 510, 0, 0, + 0, 0, 0, 0, 0, 514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 772, 772, 772, 772, 0, - 772, 0, 0, 0, 32, 0, 772, 27, 27, 0, - 0, 0, 27, 0, 0, 0, 27, 0, 27, 0, - 0, 27, 0, 27, 27, 0, 27, 0, 27, 0, - 27, 0, 27, 27, 27, 27, 0, 0, 27, 27, - 0, 0, 0, 0, 27, 0, 27, 27, 27, 0, - 0, 27, 27, 27, 0, 27, 0, 0, 27, 0, - 27, 27, 27, 27, 0, 0, 0, 27, 27, 27, - 0, 0, 27, 27, 27, 0, 34, 920, 0, 0, - 34, 27, 27, 0, 27, 27, 0, 27, 27, 27, - 0, 34, 0, 27, 0, 0, 34, 0, 0, 0, - 34, 0, 0, 34, 0, 0, 0, 0, 0, 0, - 27, 0, 0, 0, 0, 34, 34, 0, 27, 27, - 34, 34, 0, 0, 0, 0, 34, 27, 34, 34, - 34, 34, 0, 0, 0, 0, 34, 0, 0, 0, - 34, 0, 34, 0, 47, 33, 0, 0, 0, 33, - 0, 0, 34, 0, 34, 34, 0, 34, 0, 0, - 33, 34, 0, 0, 0, 33, 0, 0, 27, 33, - 0, 0, 33, 0, 0, 0, 0, 0, 34, 0, - 0, 0, 0, 0, 33, 33, 0, 34, 27, 33, - 33, 0, 27, 0, 0, 33, 0, 33, 33, 33, - 33, 0, 0, 27, 0, 33, 0, 0, 27, 33, - 0, 33, 27, 6, 0, 27, 0, 0, 0, 0, - 0, 33, 0, 0, 33, 0, 33, 27, 27, 0, - 33, 0, 27, 27, 0, 0, 0, 0, 27, 0, - 27, 27, 27, 27, 0, 0, 0, 33, 27, 0, - 0, 0, 27, 0, 27, 33, 33, 0, 0, 0, - 0, 32, 0, 0, 27, 32, 0, 27, 0, 27, - 0, 0, 0, 27, 0, 0, 32, 0, 0, 0, - 921, 32, 0, 0, 0, 32, 0, 0, 32, 0, - 27, 0, 0, 0, 0, 0, 0, 0, 27, 27, - 32, 32, 0, 0, 0, 32, 32, 0, 0, 0, - 0, 32, 0, 32, 32, 32, 32, 0, 0, 0, - 0, 32, 0, 0, 0, 32, 0, 32, 0, 0, - 0, 0, 0, 0, 920, 0, 0, 32, 47, 0, - 32, 0, 32, 0, 0, 0, 32, 0, 0, 47, - 0, 0, 0, 0, 47, 0, 0, 0, 47, 0, - 0, 47, 0, 32, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 47, 47, 0, 0, 0, 47, 47, - 0, 0, 0, 0, 47, 0, 47, 47, 47, 47, - 0, 0, 0, 0, 47, 0, 0, 0, 47, 0, - 47, 47, 0, 0, 0, 47, 0, 0, 0, 0, - 47, 0, 0, 47, 0, 47, 47, 0, 0, 47, - 0, 47, 0, 0, 0, 47, 0, 0, 47, 0, - 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, - 47, 47, 0, 0, 0, 47, 47, 0, 0, 0, - 0, 47, 0, 47, 47, 47, 47, 0, 0, 0, - 0, 47, 0, 0, 0, 47, 0, 47, 0, 0, - 6, 0, 0, 0, 48, 0, 0, 47, 0, 0, - 47, 0, 47, 0, 0, 48, 47, 0, 0, 0, - 48, 0, 0, 0, 48, 0, 0, 48, 0, 0, - 0, 0, 0, 47, 0, 0, 0, 0, 0, 48, - 48, 0, 0, 0, 48, 48, 0, 0, 0, 0, - 48, 0, 48, 48, 48, 48, 0, 0, 0, 0, - 48, 0, 0, 0, 48, 0, 48, 921, 0, 0, - 0, 47, 0, 0, 0, 0, 48, 0, 0, 48, - 0, 48, 47, 0, 0, 48, 0, 47, 0, 0, - 0, 47, 0, 0, 47, 0, 0, 0, 0, 0, - 0, 0, 48, 0, 0, 0, 47, 47, 0, 511, - 0, 47, 47, 0, 511, 511, 0, 47, 0, 47, - 47, 47, 47, 0, 0, 0, 0, 47, 0, 0, - 0, 47, 0, 47, 0, 0, 0, 511, 0, 0, - 0, 0, 0, 47, 0, 0, 47, 511, 47, 0, - 511, 511, 47, 0, 0, 511, 0, 0, 511, 0, - 511, 0, 511, 511, 511, 511, 0, 0, 0, 47, - 511, 0, 0, 0, 511, 0, 0, 0, 511, 0, - 0, 0, 0, 0, 0, 0, 511, 0, 0, 511, - 0, 511, 511, 0, 0, 0, 0, 511, 0, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 0, 0, 511, 0, 0, 0, 0, 0, 0, 511, - 511, 0, 511, 511, 511, 511, 511, 511, 511, 0, - 511, 511, 0, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 0, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, - 511, 511, 511, 511, 511, 511, 0, 0, 511, 0, - 511, 0, 511, 30, 0, 511, 0, 0, 0, 0, - 511, 31, 32, 33, 34, 0, 0, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 43, 0, 0, 0, - 0, 0, 44, 0, 45, 46, 47, 48, 49, 50, - 0, 0, 51, 0, 0, 0, 52, 53, 0, 54, - 55, 56, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 57, 0, 58, 0, 59, 60, 0, 0, 61, - 0, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 0, 74, 0, 0, 75, 76, 0, - 0, 77, 78, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 344, 79, 80, 81, - 0, 344, 344, 82, 0, 0, 0, 83, 0, 0, - 0, 0, 84, 85, 86, 87, 88, 0, 0, 0, - 89, 0, 90, 0, 344, 0, 0, 0, 91, 92, - 0, 0, 0, 0, 344, 0, 0, 344, 344, 0, - 0, 0, 344, 0, 0, 344, 0, 344, 0, 344, - 344, 344, 344, 93, 94, 95, 96, 344, 0, 0, - 0, 344, 0, 0, 186, 344, 0, 0, 0, 0, - 0, 0, 0, 344, 0, 0, 344, 0, 344, 344, - 0, 0, 0, 0, 344, 0, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 0, 344, - 0, 0, 0, 0, 0, 0, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 0, 344, 344, 0, - 0, 344, 344, 344, 344, 344, 0, 0, 344, 344, - 0, 0, 0, 344, 344, 344, 344, 344, 344, 344, - 344, 737, 0, 0, 0, 0, 737, 737, 0, 0, - 0, 0, 344, 0, 0, 344, 0, 344, 0, 344, - 0, 0, 344, 0, 0, 0, 0, 344, 0, 737, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 737, - 0, 0, 737, 737, 0, 0, 0, 737, 0, 0, - 737, 0, 737, 0, 737, 737, 737, 737, 0, 0, - 0, 0, 737, 0, 0, 0, 737, 0, 0, 0, - 737, 0, 0, 0, 0, 0, 0, 0, 737, 0, - 0, 737, 0, 737, 737, 0, 0, 0, 0, 737, - 0, 737, 737, 737, 737, 737, 737, 737, 737, 737, - 737, 737, 0, 0, 737, 0, 0, 0, 0, 0, - 0, 737, 737, 737, 737, 737, 737, 0, 737, 737, - 737, 0, 737, 737, 0, 0, 737, 737, 737, 737, - 0, 0, 0, 737, 737, 0, 0, 0, 737, 737, - 737, 737, 737, 737, 737, 737, 337, 0, 0, 0, - 0, 337, 337, 0, 0, 0, 0, 737, 0, 0, - 737, 0, 737, 0, 737, 0, 0, 737, 0, 0, - 0, 0, 737, 0, 337, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 337, 0, 0, 337, 337, 0, - 0, 0, 337, 0, 0, 337, 0, 337, 0, 337, - 337, 337, 337, 0, 0, 0, 0, 337, 0, 0, - 0, 337, 0, 0, 0, 337, 0, 0, 0, 0, - 0, 0, 0, 337, 0, 0, 337, 0, 337, 337, - 0, 0, 912, 0, 337, 0, 337, 337, 337, 337, - 337, 337, 337, 337, 337, 337, 337, 0, 0, 337, - 0, 0, 0, 0, 0, 0, 337, 337, 337, 337, - 337, 337, 0, 337, 337, 337, 0, 337, 337, 344, - 0, 337, 337, 337, 337, 344, 0, 0, 337, 337, - 0, 0, 0, 337, 337, 337, 337, 337, 337, 337, - 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 337, 0, 0, 337, 0, 337, 0, 337, - 0, 344, 337, 0, 0, 912, 0, 337, 0, 0, - 912, 0, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 912, 0, 912, 0, 912, 0, 912, - 912, 912, 344, 0, 0, 0, 0, 344, 0, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 0, - 344, 344, 0, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 912, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 0, 0, 374, 0, - 344, 0, 344, 374, 374, 344, 0, 0, 0, 0, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 374, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 374, 0, 0, 374, - 374, 0, 0, 0, 374, 0, 0, 374, 0, 374, - 0, 374, 374, 374, 374, 0, 0, 0, 0, 374, - 0, 0, 0, 374, 0, 0, 0, 374, 0, 0, - 0, 0, 0, 0, 0, 374, 0, 0, 374, 0, - 374, 374, 0, 0, 0, 0, 374, 0, 374, 374, - 374, 374, 374, 374, 374, 374, 374, 374, 374, 0, - 0, 374, 0, 0, 513, 0, 0, 0, 374, 374, - 513, 374, 374, 374, 0, 374, 374, 374, 0, 374, - 374, 0, 0, 374, 374, 374, 374, 0, 0, 0, - 374, 374, 0, 0, 0, 374, 374, 374, 374, 374, - 374, 374, 374, 0, 0, 0, 513, 0, 0, 0, - 0, 0, 0, 0, 374, 0, 0, 374, 0, 374, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 374, - 344, 0, 0, 0, 0, 0, 344, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 513, 0, 0, - 0, 0, 513, 0, 513, 513, 513, 513, 513, 513, - 513, 513, 513, 513, 513, 0, 0, 0, 0, 0, - 0, 0, 344, 0, 513, 513, 513, 513, 513, 513, - 513, 513, 513, 513, 0, 513, 513, 0, 513, 513, - 513, 513, 513, 513, 513, 513, 513, 513, 0, 513, - 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, - 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, - 513, 0, 509, 0, 0, 0, 0, 513, 509, 0, - 0, 0, 0, 0, 0, 513, 0, 0, 0, 0, - 0, 344, 0, 0, 344, 0, 344, 344, 0, 0, - 0, 344, 344, 0, 0, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 509, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 344, 344, 0, 0, 0, - 0, 0, 0, 344, 344, 0, 344, 0, 0, 0, - 0, 344, 0, 0, 0, 509, 0, 0, 0, 0, - 509, 0, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 0, 0, 0, 0, 0, 0, 0, - 344, 0, 509, 509, 0, 509, 509, 509, 509, 509, - 509, 509, 0, 509, 509, 0, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 0, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 0, - 517, 0, 0, 0, 0, 509, 517, 0, 509, 344, - 0, 0, 0, 509, 0, 0, 0, 0, 0, 0, - 344, 0, 344, 0, 344, 0, 0, 344, 0, 344, - 344, 0, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 517, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 0, 0, 0, 0, 344, - 0, 344, 401, 0, 344, 0, 0, 0, 0, 344, - 0, 0, 0, 517, 0, 0, 0, 0, 517, 0, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 0, 0, 0, 0, 0, 0, 0, 401, 0, - 0, 517, 0, 517, 517, 517, 517, 517, 517, 517, - 0, 517, 517, 0, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 0, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 0, 444, 0, - 0, 0, 0, 517, 444, 0, 517, 0, 0, 0, - 0, 517, 0, 0, 0, 0, 0, 0, 337, 0, - 401, 401, 401, 401, 0, 401, 0, 401, 401, 0, - 401, 401, 401, 401, 401, 0, 401, 401, 401, 401, - 444, 401, 401, 401, 401, 401, 401, 401, 401, 401, - 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, - 401, 401, 401, 0, 0, 0, 0, 337, 0, 401, - 344, 0, 401, 0, 0, 0, 0, 401, 0, 0, - 0, 444, 0, 0, 0, 0, 444, 0, 444, 444, - 444, 444, 444, 444, 444, 444, 444, 444, 444, 0, - 0, 0, 0, 0, 0, 0, 344, 0, 0, 444, - 0, 444, 444, 444, 444, 444, 444, 444, 0, 444, - 444, 0, 444, 444, 444, 444, 444, 444, 444, 444, - 444, 444, 0, 444, 444, 444, 444, 444, 444, 444, - 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, - 444, 444, 444, 444, 444, 0, 404, 0, 0, 0, - 0, 444, 404, 0, 444, 0, 0, 0, 0, 444, - 0, 0, 0, 0, 0, 0, 0, 344, 344, 344, - 344, 344, 0, 0, 0, 344, 344, 0, 344, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 404, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 0, 0, 0, 0, 0, 0, 344, 0, 0, - 344, 0, 0, 0, 0, 344, 0, 0, 0, 404, - 0, 0, 0, 0, 404, 0, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 404, 404, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 404, 0, 404, - 404, 404, 404, 404, 404, 404, 0, 404, 0, 0, - 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 0, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, - 404, 404, 404, 0, 546, 499, 0, 0, 0, 404, - 546, 0, 404, 0, 32, 0, 34, 404, 0, 35, - 0, 0, 0, 0, 39, 0, 0, 0, 43, 0, - 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, - 0, 0, 0, 0, 51, 0, 546, 0, 0, 53, - 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 59, 0, 0, - 0, 61, 0, 0, 0, 0, 0, 0, 0, 68, - 69, 0, 0, 72, 0, 0, 274, 546, 0, 0, - 0, 589, 546, 0, 546, 546, 546, 546, 546, 546, - 546, 546, 546, 546, 546, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 546, 0, 546, 0, 546, - 0, 546, 546, 546, 0, 546, 546, 0, 546, 546, - 546, 546, 546, 546, 546, 546, 546, 546, 0, 0, - 0, 546, 546, 546, 546, 546, 546, 546, 546, 546, - 546, 546, 546, 546, 546, 546, 546, 546, 546, 344, - 546, 0, 0, 0, 0, 344, 305, 0, 0, 0, - 0, 0, 0, 0, 589, 546, 0, 0, 0, 589, - 0, 589, 589, 589, 589, 589, 589, 589, 589, 589, - 589, 589, 0, 0, 0, 0, 0, 344, 0, 0, - 0, 344, 589, 0, 589, 0, 589, 0, 589, 589, - 589, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 344, 0, 0, 0, 0, 344, 0, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 0, 589, 0, 0, 0, 0, 0, 0, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 0, - 344, 344, 0, 0, 344, 344, 344, 344, 344, 369, - 0, 344, 344, 366, 0, 369, 344, 344, 344, 344, - 344, 344, 344, 344, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 344, 366, 0, 344, 0, - 344, 0, 344, 0, 0, 344, 0, 369, 0, 366, - 344, 369, 0, 0, 366, 0, 0, 243, 0, 366, - 0, 366, 366, 366, 366, 0, 0, 0, 0, 366, - 0, 0, 0, 366, 0, 0, 0, 366, 0, 0, - 0, 0, 0, 0, 0, 366, 0, 0, 366, 0, - 366, 0, 369, 0, 0, 0, 0, 369, 0, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 0, 366, 558, 0, 0, 0, 0, 0, 558, 369, - 369, 0, 369, 369, 369, 0, 369, 369, 369, 0, - 369, 369, 0, 0, 369, 369, 369, 369, 0, 0, - 0, 369, 369, 0, 0, 0, 369, 369, 369, 369, - 369, 369, 369, 369, 558, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 369, 0, 0, 369, 366, - 369, 0, 0, 0, 0, 0, 0, 0, 0, 562, - 369, 0, 0, 0, 0, 562, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 558, 0, 0, 0, 0, - 558, 0, 558, 558, 558, 558, 558, 558, 558, 558, - 558, 558, 558, 0, 0, 0, 0, 0, 0, 0, - 0, 562, 0, 558, 0, 558, 0, 558, 0, 558, - 558, 558, 0, 558, 558, 0, 0, 558, 558, 558, - 558, 558, 558, 558, 558, 558, 0, 0, 0, 558, - 558, 558, 558, 558, 558, 558, 558, 0, 0, 0, - 0, 0, 562, 0, 0, 0, 0, 562, 558, 562, - 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, - 0, 0, 565, 558, 0, 0, 0, 0, 565, 0, - 562, 47, 562, 47, 562, 0, 562, 562, 562, 0, - 562, 562, 0, 0, 562, 562, 562, 562, 0, 0, - 0, 562, 562, 0, 47, 0, 562, 562, 562, 562, - 562, 562, 562, 562, 565, 0, 0, 47, 0, 0, - 0, 0, 47, 0, 0, 562, 0, 47, 0, 47, - 47, 47, 47, 0, 0, 47, 0, 47, 0, 563, - 562, 47, 0, 0, 0, 563, 0, 0, 0, 0, - 0, 0, 0, 47, 0, 565, 47, 0, 47, 0, - 565, 0, 565, 565, 565, 565, 565, 565, 565, 565, - 565, 565, 565, 0, 0, 0, 0, 0, 0, 47, - 0, 563, 0, 565, 0, 565, 0, 565, 0, 565, - 565, 565, 0, 565, 565, 0, 0, 565, 565, 565, - 565, 0, 0, 0, 565, 565, 0, 0, 0, 565, + 0, 0, 0, 510, 0, 0, 913, 0, 0, 0, + 0, 913, 0, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 345, 913, 0, 913, 0, 913, 0, + 913, 913, 913, 0, 510, 0, 0, 0, 0, 510, + 0, 510, 510, 510, 510, 510, 510, 510, 510, 510, + 510, 510, 0, 0, 0, 0, 0, 0, 0, 345, + 0, 510, 510, 0, 510, 510, 510, 510, 510, 510, + 510, 0, 510, 510, 0, 510, 510, 510, 510, 510, + 510, 510, 510, 510, 510, 913, 510, 510, 510, 510, + 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, + 510, 510, 510, 510, 510, 510, 510, 510, 0, 518, + 0, 0, 0, 0, 510, 518, 0, 510, 345, 0, + 0, 0, 0, 510, 0, 0, 0, 0, 0, 345, + 0, 345, 0, 345, 0, 0, 345, 0, 345, 345, + 0, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 518, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 0, 0, 0, 0, 345, 0, + 345, 402, 0, 345, 0, 0, 0, 0, 0, 345, + 0, 0, 518, 0, 0, 0, 0, 518, 0, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, + 518, 0, 518, 518, 518, 518, 518, 518, 518, 0, + 518, 518, 0, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 0, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 0, 345, 0, 0, + 0, 0, 518, 345, 0, 518, 0, 0, 0, 0, + 0, 518, 0, 0, 0, 0, 0, 338, 0, 402, + 402, 402, 402, 0, 402, 0, 402, 402, 0, 402, + 402, 402, 402, 402, 0, 402, 402, 402, 402, 345, + 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, + 402, 402, 0, 0, 0, 0, 338, 0, 402, 345, + 0, 402, 0, 0, 0, 0, 0, 402, 0, 0, + 345, 0, 0, 0, 0, 345, 0, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 0, 0, + 0, 0, 0, 0, 0, 345, 0, 0, 345, 0, + 345, 345, 345, 345, 345, 345, 345, 0, 345, 345, + 0, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 0, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 0, 445, 0, 0, 0, 0, + 345, 445, 0, 345, 0, 0, 0, 0, 0, 345, + 0, 0, 0, 0, 0, 0, 345, 345, 345, 345, + 345, 0, 0, 0, 345, 345, 0, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 445, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 0, 0, 0, 0, 0, 0, 345, 0, 0, 345, + 0, 0, 0, 0, 0, 345, 0, 0, 445, 0, + 0, 0, 0, 445, 0, 445, 445, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 445, 0, 445, 445, + 445, 445, 445, 445, 445, 0, 445, 445, 0, 445, + 445, 445, 445, 445, 445, 445, 445, 445, 445, 0, + 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, + 445, 445, 0, 405, 549, 0, 0, 0, 445, 405, + 0, 445, 0, 25, 0, 26, 0, 445, 27, 0, + 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 0, 0, 0, 33, 0, 405, 0, 0, 34, 0, + 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 37, 0, 38, 0, 0, 0, + 39, 0, 0, 0, 0, 0, 0, 0, 40, 41, + 0, 0, 42, 0, 0, 315, 405, 0, 0, 0, + 0, 405, 0, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 405, 0, 405, 405, 405, 405, + 405, 405, 405, 0, 405, 0, 0, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 0, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 0, 547, 727, 0, 0, 346, 405, 547, 0, 405, + 0, 25, 0, 26, 0, 405, 27, 0, 0, 0, + 0, 28, 0, 0, 0, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, + 0, 33, 0, 547, 0, 0, 34, 0, 0, 0, + 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 37, 0, 38, 0, 0, 0, 39, 0, + 0, 0, 0, 0, 0, 0, 40, 41, 0, 0, + 42, 0, 0, 728, 547, 0, 588, 0, 0, 547, + 0, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 547, 0, 547, 0, 547, 0, 547, 547, + 547, 0, 547, 547, 0, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 0, 0, 0, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 559, 547, 0, 0, + 0, 0, 559, 729, 0, 0, 48, 0, 0, 588, + 0, 0, 0, 547, 588, 0, 588, 588, 588, 588, + 588, 588, 588, 588, 588, 588, 588, 0, 0, 48, + 0, 0, 0, 0, 0, 0, 0, 588, 559, 588, + 0, 588, 48, 588, 588, 588, 0, 48, 0, 0, + 0, 0, 48, 0, 48, 48, 48, 48, 0, 588, + 48, 0, 48, 563, 0, 0, 48, 0, 0, 563, + 588, 0, 0, 0, 0, 0, 0, 0, 48, 559, + 0, 48, 588, 48, 559, 0, 559, 559, 559, 559, + 559, 559, 559, 559, 559, 559, 559, 0, 588, 0, + 0, 0, 0, 0, 48, 563, 0, 559, 0, 559, + 0, 559, 310, 559, 559, 559, 0, 559, 559, 0, + 0, 559, 559, 559, 559, 559, 559, 559, 559, 559, + 0, 0, 0, 559, 559, 559, 559, 559, 559, 559, + 559, 0, 0, 0, 0, 0, 563, 0, 0, 0, + 0, 563, 559, 563, 563, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 0, 0, 566, 0, 559, 0, + 0, 0, 566, 0, 563, 0, 563, 0, 563, 0, + 563, 563, 563, 0, 563, 563, 0, 0, 563, 563, + 563, 563, 0, 0, 0, 563, 563, 0, 0, 0, + 563, 563, 563, 563, 563, 563, 563, 563, 566, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 563, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 564, 0, 563, 0, 0, 0, 564, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 0, 0, 566, 0, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 0, 0, 0, + 0, 0, 0, 0, 0, 564, 0, 566, 0, 566, + 0, 566, 0, 566, 566, 566, 0, 566, 566, 0, + 0, 566, 566, 566, 566, 0, 0, 0, 566, 566, + 0, 0, 0, 566, 566, 566, 566, 566, 566, 566, + 566, 0, 0, 0, 0, 0, 564, 0, 0, 0, + 0, 564, 566, 564, 564, 564, 564, 564, 564, 564, + 564, 564, 564, 564, 0, 0, 565, 0, 566, 0, + 0, 0, 565, 0, 564, 0, 564, 0, 564, 0, + 564, 564, 564, 0, 564, 564, 0, 0, 564, 564, + 564, 564, 0, 0, 0, 564, 564, 0, 0, 0, + 564, 564, 564, 564, 564, 564, 564, 564, 565, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 564, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 569, 0, 564, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 565, + 0, 0, 0, 0, 565, 0, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 0, 0, 0, - 0, 0, 563, 0, 0, 0, 0, 563, 565, 563, - 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, - 0, 0, 564, 565, 0, 0, 0, 0, 564, 0, - 563, 389, 563, 0, 563, 0, 563, 563, 563, 0, - 563, 563, 0, 0, 563, 563, 563, 563, 0, 0, - 0, 563, 563, 0, 390, 0, 563, 563, 563, 563, - 563, 563, 563, 563, 564, 0, 0, 391, 0, 0, - 0, 392, 393, 0, 0, 563, 0, 394, 0, 395, - 396, 397, 398, 0, 0, 0, 0, 399, 0, 568, - 563, 400, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 401, 0, 564, 402, 0, 403, 0, - 564, 0, 564, 564, 564, 564, 564, 564, 564, 564, - 564, 564, 564, 0, 0, 0, 0, 0, 0, 404, - 0, 0, 0, 564, 0, 564, 0, 564, 0, 564, - 564, 564, 0, 564, 564, 0, 0, 564, 564, 564, - 564, 0, 0, 0, 564, 564, 569, 0, 0, 564, - 564, 564, 564, 564, 564, 564, 564, 0, 0, 0, - 0, 0, 568, 0, 0, 0, 0, 568, 564, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 0, 0, 0, 564, 0, 0, 0, 0, 0, 0, - 568, 0, 568, 0, 568, 0, 568, 568, 568, 0, - 0, 0, 0, 0, 568, 568, 568, 568, 0, 0, - 0, 568, 568, 570, 0, 0, 568, 568, 568, 568, - 568, 568, 568, 568, 0, 0, 0, 0, 0, 569, - 0, 0, 0, 0, 569, 568, 569, 569, 569, 569, - 569, 569, 569, 569, 569, 569, 569, 0, 0, 0, - 568, 0, 0, 0, 0, 0, 0, 569, 0, 569, - 0, 569, 0, 569, 569, 569, 0, 0, 0, 0, - 0, 569, 569, 569, 569, 0, 0, 0, 569, 569, - 571, 0, 0, 569, 569, 569, 569, 569, 569, 569, - 569, 0, 0, 0, 0, 0, 570, 0, 0, 0, - 0, 570, 569, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 0, 0, 0, 569, 0, 0, - 0, 0, 0, 0, 570, 0, 570, 0, 570, 0, - 570, 570, 570, 0, 0, 0, 0, 0, 570, 570, - 570, 570, 0, 0, 0, 570, 570, 572, 0, 0, - 570, 570, 570, 570, 570, 570, 570, 570, 0, 0, - 0, 0, 0, 571, 0, 0, 0, 0, 571, 570, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 0, 0, 0, 570, 0, 0, 0, 0, 0, - 0, 571, 0, 571, 0, 571, 0, 571, 571, 571, - 0, 0, 0, 0, 0, 571, 571, 571, 571, 0, - 0, 0, 571, 571, 573, 0, 0, 0, 0, 571, - 571, 571, 571, 571, 571, 0, 0, 0, 0, 0, - 572, 0, 0, 0, 0, 572, 571, 572, 572, 572, - 572, 572, 572, 572, 572, 572, 572, 572, 0, 0, - 0, 571, 0, 0, 0, 0, 0, 0, 572, 0, - 572, 0, 572, 0, 572, 572, 572, 0, 0, 0, - 0, 0, 572, 572, 572, 572, 0, 0, 0, 572, - 572, 574, 0, 0, 0, 0, 572, 572, 572, 572, - 572, 572, 0, 0, 0, 0, 0, 573, 0, 0, - 0, 0, 573, 572, 573, 573, 573, 573, 573, 573, - 573, 573, 573, 573, 573, 0, 0, 0, 572, 0, - 0, 0, 0, 0, 0, 573, 0, 573, 0, 573, - 0, 573, 573, 573, 0, 0, 0, 0, 0, 573, - 573, 573, 573, 0, 0, 0, 573, 573, 575, 0, - 0, 0, 0, 573, 573, 573, 573, 573, 573, 0, - 0, 0, 0, 0, 574, 0, 0, 0, 0, 574, - 573, 574, 574, 574, 574, 574, 574, 574, 574, 574, - 574, 574, 0, 0, 0, 573, 0, 0, 0, 0, - 0, 0, 574, 0, 574, 0, 574, 0, 574, 574, - 574, 0, 0, 0, 0, 0, 574, 574, 574, 574, - 0, 0, 0, 574, 574, 576, 0, 0, 0, 0, - 574, 574, 574, 574, 574, 574, 0, 0, 0, 0, - 0, 575, 0, 0, 0, 0, 575, 574, 575, 575, - 575, 575, 575, 575, 575, 575, 575, 575, 575, 0, - 0, 0, 574, 0, 0, 0, 0, 0, 0, 575, - 0, 575, 0, 575, 0, 575, 575, 575, 0, 0, - 0, 0, 0, 575, 575, 575, 575, 0, 0, 0, - 575, 575, 577, 0, 0, 0, 0, 575, 575, 575, - 575, 575, 575, 0, 0, 0, 0, 0, 576, 0, - 0, 0, 0, 576, 575, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576, 576, 0, 0, 0, 575, - 0, 0, 0, 0, 0, 0, 576, 0, 576, 0, - 576, 0, 576, 576, 576, 0, 0, 0, 0, 0, - 0, 0, 576, 576, 0, 0, 0, 576, 576, 578, - 0, 0, 0, 0, 0, 0, 576, 576, 576, 576, - 0, 0, 0, 0, 0, 577, 0, 0, 0, 0, - 577, 576, 577, 577, 577, 577, 577, 577, 577, 577, - 577, 577, 577, 0, 0, 0, 576, 0, 0, 0, - 0, 0, 0, 577, 0, 577, 0, 577, 0, 577, - 577, 577, 0, 0, 0, 0, 0, 0, 0, 577, - 577, 0, 0, 0, 577, 577, 579, 0, 0, 0, - 0, 0, 0, 577, 577, 577, 577, 0, 0, 0, - 0, 0, 578, 0, 0, 0, 0, 578, 577, 578, - 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, - 0, 0, 0, 577, 0, 0, 0, 0, 0, 0, - 578, 0, 578, 0, 578, 0, 578, 578, 578, 0, - 0, 0, 0, 0, 0, 0, 578, 578, 0, 0, - 0, 578, 578, 580, 0, 0, 0, 0, 0, 0, - 578, 578, 578, 578, 0, 0, 0, 0, 0, 579, - 0, 0, 0, 0, 579, 578, 579, 579, 579, 579, - 579, 579, 579, 579, 579, 579, 579, 0, 0, 0, - 578, 0, 0, 0, 0, 0, 0, 579, 0, 579, - 0, 579, 0, 579, 579, 579, 0, 0, 0, 0, - 0, 0, 0, 579, 579, 0, 0, 0, 579, 579, - 581, 0, 0, 0, 0, 0, 0, 0, 0, 579, - 579, 0, 0, 0, 0, 0, 580, 0, 0, 0, - 0, 580, 579, 580, 580, 580, 580, 580, 580, 580, - 580, 580, 580, 580, 0, 0, 0, 579, 0, 0, - 0, 0, 0, 0, 580, 0, 580, 0, 580, 0, - 580, 580, 580, 0, 0, 0, 0, 0, 0, 0, - 580, 580, 0, 0, 0, 580, 580, 582, 0, 0, - 0, 0, 0, 0, 0, 0, 580, 580, 0, 0, - 0, 0, 0, 581, 0, 0, 0, 0, 581, 580, - 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, - 581, 0, 0, 0, 580, 0, 0, 0, 0, 0, - 0, 581, 0, 581, 0, 581, 0, 581, 581, 581, - 0, 0, 0, 0, 0, 0, 0, 0, 581, 0, - 0, 0, 581, 581, 583, 0, 0, 0, 0, 0, - 0, 0, 0, 581, 581, 0, 0, 0, 0, 0, - 582, 0, 0, 0, 0, 582, 581, 582, 582, 582, - 582, 582, 582, 582, 582, 582, 582, 582, 0, 0, - 0, 581, 0, 0, 0, 0, 0, 0, 582, 0, - 582, 0, 582, 0, 582, 582, 582, 0, 0, 0, - 0, 0, 0, 0, 0, 582, 0, 0, 0, 582, - 582, 584, 0, 0, 0, 0, 0, 0, 0, 0, - 582, 582, 0, 0, 0, 0, 0, 583, 0, 0, - 0, 0, 583, 582, 583, 583, 583, 583, 583, 583, - 583, 583, 583, 583, 583, 0, 0, 0, 582, 0, - 0, 0, 0, 0, 0, 583, 0, 583, 0, 583, - 0, 583, 583, 583, 0, 0, 0, 0, 0, 0, - 0, 0, 583, 0, 0, 0, 0, 583, 585, 0, - 0, 0, 0, 0, 0, 0, 0, 583, 583, 0, - 0, 0, 0, 0, 584, 0, 0, 0, 0, 584, - 583, 584, 584, 584, 584, 584, 584, 584, 584, 584, - 584, 584, 0, 0, 0, 583, 0, 0, 0, 0, - 0, 0, 584, 0, 584, 0, 584, 0, 584, 584, - 584, 0, 0, 0, 0, 0, 0, 0, 0, 584, - 0, 0, 0, 0, 584, 586, 0, 0, 0, 0, - 0, 0, 0, 0, 584, 584, 0, 0, 0, 0, - 0, 585, 0, 0, 0, 0, 585, 584, 585, 585, - 585, 585, 585, 585, 585, 585, 585, 585, 585, 0, - 0, 0, 584, 0, 0, 0, 0, 0, 0, 585, - 0, 585, 0, 585, 0, 585, 585, 585, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 565, 0, 565, + 0, 565, 0, 565, 565, 565, 0, 565, 565, 0, + 0, 565, 565, 565, 565, 0, 0, 0, 565, 565, + 570, 0, 0, 565, 565, 565, 565, 565, 565, 565, + 565, 0, 0, 0, 0, 0, 569, 0, 0, 0, + 0, 569, 565, 569, 569, 569, 569, 569, 569, 569, + 569, 569, 569, 569, 0, 0, 0, 0, 565, 0, + 0, 0, 0, 0, 569, 0, 569, 0, 569, 0, + 569, 569, 569, 0, 0, 0, 0, 0, 569, 569, + 569, 569, 0, 0, 0, 569, 569, 571, 0, 0, + 569, 569, 569, 569, 569, 569, 569, 569, 0, 0, + 0, 0, 0, 570, 0, 0, 0, 0, 570, 569, + 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, + 570, 0, 0, 0, 0, 569, 0, 0, 0, 0, + 0, 570, 0, 570, 0, 570, 0, 570, 570, 570, + 0, 0, 0, 0, 0, 570, 570, 570, 570, 0, + 0, 0, 570, 570, 572, 0, 0, 570, 570, 570, + 570, 570, 570, 570, 570, 0, 0, 0, 0, 0, + 571, 0, 0, 0, 0, 571, 570, 571, 571, 571, + 571, 571, 571, 571, 571, 571, 571, 571, 0, 0, + 0, 0, 570, 0, 0, 0, 0, 0, 571, 0, + 571, 0, 571, 0, 571, 571, 571, 0, 0, 0, + 0, 0, 571, 571, 571, 571, 0, 0, 0, 571, + 571, 573, 0, 0, 571, 571, 571, 571, 571, 571, + 571, 571, 0, 0, 0, 0, 0, 572, 0, 0, + 0, 0, 572, 571, 572, 572, 572, 572, 572, 572, + 572, 572, 572, 572, 572, 0, 0, 0, 0, 571, + 0, 0, 0, 0, 0, 572, 0, 572, 0, 572, + 0, 572, 572, 572, 0, 0, 0, 0, 0, 572, + 572, 572, 572, 0, 0, 0, 572, 572, 574, 0, + 0, 0, 0, 572, 572, 572, 572, 572, 572, 0, + 0, 0, 0, 0, 573, 0, 0, 0, 0, 573, + 572, 573, 573, 573, 573, 573, 573, 573, 573, 573, + 573, 573, 0, 0, 0, 0, 572, 0, 0, 0, + 0, 0, 573, 0, 573, 0, 573, 0, 573, 573, + 573, 0, 0, 0, 0, 0, 573, 573, 573, 573, + 0, 0, 0, 573, 573, 575, 0, 0, 0, 0, + 573, 573, 573, 573, 573, 573, 0, 0, 0, 0, + 0, 574, 0, 0, 0, 0, 574, 573, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 574, 574, 0, + 0, 0, 0, 573, 0, 0, 0, 0, 0, 574, + 0, 574, 0, 574, 0, 574, 574, 574, 0, 0, + 0, 0, 0, 574, 574, 574, 574, 0, 0, 0, + 574, 574, 576, 0, 0, 0, 0, 574, 574, 574, + 574, 574, 574, 0, 0, 0, 0, 0, 575, 0, + 0, 0, 0, 575, 574, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 0, 0, 0, 0, + 574, 0, 0, 0, 0, 0, 575, 0, 575, 0, + 575, 0, 575, 575, 575, 0, 0, 0, 0, 0, + 575, 575, 575, 575, 0, 0, 0, 575, 575, 577, + 0, 0, 0, 0, 575, 575, 575, 575, 575, 575, + 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, + 576, 575, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576, 0, 0, 0, 0, 575, 0, 0, + 0, 0, 0, 576, 0, 576, 0, 576, 0, 576, + 576, 576, 0, 0, 0, 0, 0, 576, 576, 576, + 576, 0, 0, 0, 576, 576, 578, 0, 0, 0, + 0, 576, 576, 576, 576, 576, 576, 0, 0, 0, + 0, 0, 577, 0, 0, 0, 0, 577, 576, 577, + 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, + 0, 0, 0, 0, 576, 0, 0, 0, 0, 0, + 577, 0, 577, 0, 577, 0, 577, 577, 577, 0, + 0, 0, 0, 0, 0, 0, 577, 577, 0, 0, + 0, 577, 577, 579, 0, 0, 0, 0, 0, 0, + 577, 577, 577, 577, 0, 0, 0, 0, 0, 578, + 0, 0, 0, 0, 578, 577, 578, 578, 578, 578, + 578, 578, 578, 578, 578, 578, 578, 0, 0, 0, + 0, 577, 0, 0, 0, 0, 0, 578, 0, 578, + 0, 578, 0, 578, 578, 578, 0, 0, 0, 0, + 0, 0, 0, 578, 578, 0, 0, 0, 578, 578, + 580, 0, 0, 0, 0, 0, 0, 578, 578, 578, + 578, 0, 0, 0, 0, 0, 579, 0, 0, 0, + 0, 579, 578, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 0, 0, 0, 0, 578, 0, + 0, 0, 0, 0, 579, 0, 579, 0, 579, 0, + 579, 579, 579, 0, 0, 0, 0, 0, 0, 0, + 579, 579, 0, 0, 0, 579, 579, 581, 0, 0, + 0, 0, 0, 0, 579, 579, 579, 579, 0, 0, + 0, 0, 0, 580, 0, 0, 0, 0, 580, 579, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 0, 0, 0, 0, 579, 0, 0, 0, 0, + 0, 580, 0, 580, 0, 580, 0, 580, 580, 580, + 0, 0, 0, 0, 0, 0, 0, 580, 580, 0, + 0, 0, 580, 580, 582, 0, 0, 0, 0, 0, + 0, 0, 0, 580, 580, 0, 0, 0, 0, 0, + 581, 0, 0, 0, 0, 581, 580, 581, 581, 581, + 581, 581, 581, 581, 581, 581, 581, 581, 0, 0, + 0, 0, 580, 0, 0, 0, 0, 0, 581, 0, + 581, 0, 581, 0, 581, 581, 581, 0, 0, 0, + 0, 0, 0, 0, 581, 581, 0, 0, 0, 581, + 581, 583, 0, 0, 0, 0, 0, 0, 0, 0, + 581, 581, 0, 0, 0, 0, 0, 582, 0, 0, + 0, 0, 582, 581, 582, 582, 582, 582, 582, 582, + 582, 582, 582, 582, 582, 0, 0, 0, 0, 581, + 0, 0, 0, 0, 0, 582, 0, 582, 0, 582, + 0, 582, 582, 582, 0, 0, 0, 0, 0, 0, + 0, 0, 582, 0, 0, 0, 582, 582, 584, 0, + 0, 0, 0, 0, 0, 0, 0, 582, 582, 0, + 0, 0, 0, 0, 583, 0, 0, 0, 0, 583, + 582, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 0, 0, 0, 0, 582, 0, 0, 0, + 0, 0, 583, 0, 583, 0, 583, 0, 583, 583, + 583, 0, 0, 0, 0, 0, 0, 0, 0, 583, + 0, 0, 0, 583, 583, 585, 0, 0, 0, 0, + 0, 0, 0, 0, 583, 583, 0, 0, 0, 0, + 0, 584, 0, 0, 0, 0, 584, 583, 584, 584, + 584, 584, 584, 584, 584, 584, 584, 584, 584, 0, + 0, 0, 0, 583, 0, 0, 0, 0, 0, 584, + 0, 584, 0, 584, 0, 584, 584, 584, 0, 0, + 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, + 0, 584, 587, 0, 0, 0, 0, 0, 0, 0, + 0, 584, 584, 0, 0, 0, 0, 0, 585, 0, + 0, 0, 0, 585, 584, 585, 585, 585, 585, 585, + 585, 585, 585, 585, 585, 585, 0, 0, 0, 0, + 584, 0, 0, 0, 0, 0, 585, 0, 585, 0, + 585, 0, 585, 585, 585, 0, 0, 0, 0, 0, + 0, 0, 0, 585, 0, 0, 0, 0, 585, 589, + 0, 0, 0, 0, 0, 0, 0, 0, 585, 585, + 0, 0, 0, 0, 0, 587, 0, 0, 0, 0, + 587, 585, 587, 587, 587, 587, 587, 587, 587, 587, + 587, 587, 587, 0, 0, 0, 0, 585, 0, 0, + 0, 0, 0, 587, 0, 587, 0, 587, 0, 587, + 587, 587, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 587, 590, 0, 0, 0, + 0, 0, 0, 0, 0, 587, 587, 0, 0, 0, + 0, 0, 589, 0, 0, 0, 0, 589, 587, 589, + 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, + 0, 0, 0, 0, 587, 0, 0, 0, 0, 0, + 589, 0, 589, 0, 589, 0, 589, 589, 589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 585, 588, 0, 0, 0, 0, 0, 0, 0, - 0, 585, 585, 0, 0, 0, 0, 0, 586, 0, - 0, 0, 0, 586, 585, 586, 586, 586, 586, 586, - 586, 586, 586, 586, 586, 586, 0, 0, 0, 585, - 0, 0, 0, 0, 0, 0, 586, 0, 586, 0, - 586, 0, 586, 586, 586, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 586, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 586, 586, - 0, 0, 0, 0, 0, 588, 0, 0, 0, 0, - 588, 586, 588, 588, 588, 588, 588, 588, 588, 588, - 588, 588, 588, 0, 0, 0, 586, 0, 0, 0, - 0, 0, 0, 588, 0, 588, 0, 588, 0, 588, - 588, 588, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 30, 0, 588, 0, 0, 0, 0, - 0, 31, 32, 33, 34, 0, 588, 35, 36, 0, - 37, 38, 39, 40, 41, 42, 43, 0, 588, 0, - 0, 0, 44, 0, 45, 46, 47, 48, 49, 50, - 0, 0, 51, 588, 0, 0, 52, 53, 0, 54, - 55, 56, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 57, 0, 58, 0, 59, 60, 0, 0, 61, - 0, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 0, 74, 0, 0, 75, 76, 0, - 0, 77, 78, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 79, 80, 81, - 0, 0, 0, 82, 0, 0, 0, 83, 0, 0, - 0, 0, 84, 85, 86, 87, 88, 0, 0, 0, - 89, 0, 90, 0, 0, 0, 0, 0, 91, 92, + 0, 0, 589, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 589, 0, 0, 0, 0, 0, 590, + 0, 0, 0, 0, 590, 589, 590, 590, 590, 590, + 590, 590, 590, 590, 590, 590, 590, 0, 0, 0, + 0, 589, 0, 0, 0, 0, 0, 590, 0, 590, + 0, 590, 0, 590, 590, 590, 56, 0, 0, 0, + 0, 0, 0, 0, 57, 25, 58, 26, 0, 590, + 27, 59, 0, 60, 61, 28, 62, 63, 64, 29, + 0, 0, 0, 0, 0, 65, 0, 66, 31, 67, + 68, 69, 70, 0, 0, 33, 0, 0, 0, 71, + 34, 0, 72, 73, 35, 0, 0, 0, 590, 0, + 0, 0, 0, 0, 74, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 76, 77, 78, 79, 80, 81, + 40, 41, 82, 83, 42, 84, 0, 85, 0, 0, + 86, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, - 0, 0, 0, 93, 94, 95, 96, 31, 32, 33, - 34, 0, 0, 35, 36, 0, 37, 38, 39, 40, - 41, 42, 43, 0, 0, 0, 0, 0, 44, 0, - 45, 46, 47, 48, 49, 50, 0, 0, 51, 0, - 0, 0, 52, 53, 0, 54, 55, 56, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 57, 0, 58, - 0, 59, 60, 0, 0, 61, 0, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, - 74, 0, 0, 75, 76, 0, 0, 77, 78, 0, + 90, 91, 92, 0, 0, 0, 93, 0, 0, 0, + 94, 0, 0, 0, 0, 95, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 79, 80, 81, 0, 0, 0, 82, - 0, 0, 0, 83, 0, 0, 0, 0, 84, 85, - 86, 87, 88, 0, 0, 0, 89, 0, 90, 0, - 0, 0, 0, 0, 91, 92, 0, 0, 0, 0, + 0, 0, 264, 0, 0, 0, 104, 105, 106, 107, + 57, 25, 58, 26, 0, 0, 27, 59, 0, 60, + 61, 28, 62, 63, 64, 29, 0, 0, 0, 0, + 0, 65, 0, 66, 31, 67, 68, 69, 70, 0, + 0, 33, 0, 0, 0, 71, 34, 0, 72, 73, + 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 74, 0, 37, 0, 38, 75, 0, 0, 39, 0, + 76, 77, 78, 79, 80, 81, 40, 41, 82, 83, + 42, 84, 0, 85, 0, 0, 86, 87, 0, 0, + 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 90, 91, 92, 0, + 0, 0, 93, 0, 0, 0, 94, 0, 0, 0, + 0, 95, 96, 97, 98, 99, 0, 0, 0, 100, + 0, 101, 0, 0, 0, 0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 486, 0, 0, 0, 93, - 94, 95, 96, 31, 32, 33, 34, 0, 0, 35, - 36, 0, 37, 38, 39, 40, 41, 42, 43, 0, - 0, 0, 0, 0, 44, 0, 45, 46, 47, 48, - 49, 50, 0, 0, 51, 0, 0, 0, 52, 53, - 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 57, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 0, 74, 0, 0, 75, - 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 82, 0, 0, 0, 83, - 0, 0, 0, 0, 84, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 536, 0, + 0, 0, 104, 105, 106, 107, 57, 25, 58, 26, + 0, 0, 27, 59, 0, 60, 61, 28, 62, 63, + 64, 29, 0, 0, 0, 0, 0, 65, 0, 66, + 31, 67, 68, 69, 70, 0, 0, 33, 0, 0, + 0, 71, 34, 0, 72, 73, 35, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 74, 0, 37, 0, + 38, 75, 0, 0, 39, 0, 76, 77, 78, 79, + 80, 81, 40, 41, 82, 83, 42, 84, 0, 85, + 0, 0, 86, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 917, 0, 0, 0, 93, 94, 95, 96, 917, - 917, 917, 917, 0, 0, 917, 917, 0, 917, 917, - 917, 917, 917, 917, 917, 0, 0, 0, 0, 0, - 917, 0, 917, 917, 917, 917, 917, 917, 0, 0, - 917, 0, 0, 0, 917, 917, 0, 917, 917, 917, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 917, - 0, 917, 0, 917, 917, 0, 0, 917, 0, 917, - 917, 917, 917, 917, 917, 917, 917, 917, 917, 917, - 917, 0, 917, 0, 0, 917, 917, 0, 0, 917, - 917, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 917, 917, 917, 0, 0, - 0, 917, 0, 0, 0, 917, 0, 0, 0, 0, - 917, 917, 917, 917, 917, 0, 0, 0, 917, 0, - 917, 0, 0, 0, 0, 0, 917, 917, 0, 0, + 0, 0, 90, 91, 92, 0, 0, 0, 93, 0, + 0, 0, 94, 0, 0, 0, 0, 95, 96, 97, + 98, 99, 0, 0, 0, 100, 0, 101, 0, 0, + 0, 0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, - 0, 917, 917, 917, 917, 781, 781, 781, 781, 0, - 0, 781, 781, 0, 781, 781, 781, 781, 781, 781, - 781, 0, 0, 0, 0, 0, 781, 0, 781, 781, - 781, 781, 781, 781, 0, 0, 781, 0, 0, 0, - 781, 781, 0, 781, 781, 781, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 781, 0, 781, 0, 781, - 781, 0, 0, 781, 0, 781, 781, 781, 781, 781, - 781, 781, 781, 781, 781, 781, 781, 0, 781, 0, - 0, 781, 781, 0, 0, 781, 781, 0, 0, 0, + 0, 0, 0, 0, 918, 0, 0, 0, 104, 105, + 106, 107, 918, 918, 918, 918, 0, 0, 918, 918, + 0, 918, 918, 918, 918, 918, 918, 918, 0, 0, + 0, 0, 0, 918, 0, 918, 918, 918, 918, 918, + 918, 0, 0, 918, 0, 0, 0, 918, 918, 0, + 918, 918, 918, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 918, 0, 918, 0, 918, 918, 0, 0, + 918, 0, 918, 918, 918, 918, 918, 918, 918, 918, + 918, 918, 918, 918, 0, 918, 0, 0, 918, 918, + 0, 0, 918, 918, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 918, 918, + 918, 0, 0, 0, 918, 0, 0, 0, 918, 0, + 0, 0, 0, 918, 918, 918, 918, 918, 0, 0, + 0, 918, 0, 918, 0, 0, 0, 0, 0, 918, + 918, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 781, 781, 781, 0, 0, 0, 781, 0, 0, - 0, 781, 0, 0, 0, 0, 781, 781, 781, 781, - 781, 0, 0, 0, 781, 0, 781, 0, 0, 0, - 0, 0, 781, 781, 0, 0, 0, 0, 0, 0, + 782, 0, 0, 0, 918, 918, 918, 918, 782, 782, + 782, 782, 0, 0, 782, 782, 0, 782, 782, 782, + 782, 782, 782, 782, 0, 0, 0, 0, 0, 782, + 0, 782, 782, 782, 782, 782, 782, 0, 0, 782, + 0, 0, 0, 782, 782, 0, 782, 782, 782, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 782, 0, + 782, 0, 782, 782, 0, 0, 782, 0, 782, 782, + 782, 782, 782, 782, 782, 782, 782, 782, 782, 782, + 0, 782, 0, 0, 782, 782, 0, 0, 782, 782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 650, 0, 0, 0, 781, 781, 781, - 781, 31, 32, 0, 34, 0, 0, 35, 212, 0, - 663, 0, 39, 40, 41, 0, 43, 0, 0, 32, - 0, 34, 44, 0, 35, 46, 0, 0, 0, 39, - 0, 0, 51, 43, 0, 0, 0, 53, 0, 54, - 55, 56, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 58, 53, 59, 60, 0, 56, 61, - 0, 0, 63, 0, 65, 0, 67, 68, 69, 213, - 58, 72, 59, 0, 0, 0, 61, 0, 76, 0, - 0, 77, 78, 0, 68, 69, 0, 0, 72, 0, - 0, 664, 0, 0, 0, 0, 0, 79, 80, 81, - 0, 0, 0, 451, 651, 0, 0, 83, 0, 0, - 0, 0, 0, 85, 86, 87, 88, 0, 0, 0, - 89, 0, 90, 0, 0, 0, 0, 0, 91, 92, + 0, 0, 0, 0, 782, 782, 782, 0, 0, 0, + 782, 0, 0, 0, 782, 0, 0, 0, 0, 782, + 782, 782, 782, 782, 0, 0, 0, 782, 0, 782, + 0, 0, 0, 0, 0, 782, 782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 650, - 0, 0, 0, 93, 256, 95, 96, 31, 32, 0, - 34, 0, 0, 35, 212, 0, 789, 0, 39, 40, - 41, 665, 43, 0, 0, 32, 0, 34, 44, 0, - 35, 46, 0, 0, 0, 39, 0, 0, 51, 43, - 0, 0, 0, 53, 0, 54, 55, 56, 46, 0, - 0, 0, 0, 0, 0, 51, 0, 0, 0, 58, - 53, 59, 60, 816, 56, 61, 0, 0, 63, 0, - 65, 0, 67, 68, 69, 213, 58, 72, 59, 0, - 0, 0, 61, 0, 76, 0, 0, 77, 78, 0, - 68, 69, 0, 0, 72, 0, 0, 274, 0, 0, - 0, 0, 0, 79, 80, 81, 0, 0, 0, 451, - 0, 0, 0, 83, 0, 0, 0, 0, 0, 85, - 86, 87, 88, 0, 0, 0, 89, 0, 90, 0, - 0, 0, 0, 0, 91, 92, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 714, 0, 0, 0, + 782, 782, 782, 782, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 862, 0, 28, 62, 63, 0, 29, + 0, 0, 25, 0, 26, 65, 0, 27, 31, 0, + 0, 0, 28, 0, 0, 33, 29, 0, 0, 0, + 34, 0, 72, 73, 35, 31, 0, 0, 0, 0, + 0, 0, 33, 0, 0, 0, 37, 34, 38, 75, + 0, 35, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 37, 42, 38, 0, 0, 0, 39, + 0, 87, 0, 0, 88, 89, 0, 40, 41, 0, + 0, 42, 0, 0, 315, 0, 0, 0, 0, 0, + 90, 91, 92, 0, 0, 0, 501, 715, 0, 0, + 94, 0, 0, 0, 0, 0, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 620, 0, 0, 0, 93, - 256, 95, 96, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 926, 0, 39, 40, 41, 305, 43, 0, - 0, 32, 0, 34, 44, 0, 35, 46, 0, 0, - 0, 39, 0, 0, 51, 43, 0, 0, 0, 53, - 0, 54, 55, 56, 46, 0, 0, 0, 0, 0, - 0, 51, 0, 0, 0, 58, 53, 59, 60, 0, - 56, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 58, 72, 59, 0, 74, 0, 61, 0, - 76, 0, 0, 77, 78, 0, 68, 69, 0, 0, - 72, 0, 0, 274, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 0, 0, 0, 83, - 0, 0, 0, 0, 0, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 714, 0, 0, 0, 104, 297, 106, 107, + 57, 25, 0, 26, 0, 0, 27, 253, 0, 1000, + 0, 28, 62, 63, 346, 29, 0, 0, 25, 0, + 26, 65, 0, 27, 31, 0, 0, 0, 28, 0, + 0, 33, 29, 0, 0, 0, 34, 0, 72, 73, + 35, 31, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 37, 34, 38, 75, 889, 35, 39, 0, + 0, 77, 0, 79, 0, 81, 40, 41, 254, 37, + 42, 38, 0, 0, 0, 39, 0, 87, 0, 0, + 88, 89, 0, 40, 41, 0, 0, 42, 0, 0, + 315, 0, 0, 0, 0, 0, 90, 91, 92, 0, + 0, 0, 501, 0, 0, 0, 94, 0, 0, 0, + 0, 0, 96, 97, 98, 99, 0, 0, 0, 100, + 0, 101, 0, 0, 0, 0, 0, 102, 103, 0, + 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, + 0, 27, 253, 0, 0, 0, 28, 62, 63, 0, + 29, 0, 104, 297, 106, 107, 65, 0, 0, 31, + 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, + 346, 34, 0, 72, 73, 35, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 37, 0, 38, + 75, 0, 0, 39, 0, 0, 77, 0, 79, 0, + 81, 40, 41, 254, 0, 42, 0, 0, 0, 0, + 0, 0, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 650, 0, 0, 0, 93, 256, 95, 96, 31, - 32, 0, 34, 0, 0, 35, 212, 0, 1057, 0, - 39, 40, 41, 305, 43, 0, 0, 32, 0, 34, - 44, 0, 35, 46, 0, 0, 0, 39, 0, 0, - 51, 43, 0, 0, 0, 53, 0, 54, 55, 56, - 46, 0, 0, 0, 0, 0, 0, 51, 0, 0, - 0, 58, 53, 59, 60, 0, 56, 61, 0, 0, - 63, 0, 65, 0, 67, 68, 69, 213, 58, 72, - 59, 0, 0, 0, 61, 0, 76, 0, 0, 77, - 78, 0, 68, 69, 0, 0, 72, 0, 0, 274, - 0, 0, 0, 0, 0, 79, 80, 81, 0, 0, - 0, 451, 0, 0, 0, 83, 0, 0, 0, 0, - 0, 85, 86, 87, 88, 0, 0, 0, 89, 0, - 90, 0, 0, 0, 0, 0, 91, 92, 0, 0, + 0, 90, 91, 92, 0, 0, 0, 701, 958, 0, + 0, 94, 0, 0, 0, 0, 0, 96, 97, 98, + 99, 0, 0, 0, 100, 0, 101, 0, 0, 0, + 0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 804, 0, 0, - 0, 93, 256, 95, 96, 31, 32, 0, 34, 0, - 0, 35, 212, 0, 0, 0, 39, 40, 41, 305, - 43, 0, 0, 32, 0, 34, 44, 0, 35, 46, - 0, 0, 0, 39, 0, 0, 51, 43, 0, 0, - 0, 53, 0, 54, 55, 56, 46, 0, 0, 0, - 0, 0, 0, 51, 0, 0, 0, 58, 53, 59, - 60, 0, 56, 61, 0, 0, 63, 0, 65, 0, - 67, 68, 69, 213, 58, 72, 59, 0, 0, 0, - 61, 0, 76, 0, 0, 77, 78, 0, 68, 69, - 0, 0, 72, 0, 0, 274, 0, 0, 0, 0, - 0, 79, 80, 81, 0, 0, 0, 0, 0, 0, - 0, 83, 0, 0, 0, 0, 0, 85, 86, 87, - 88, 0, 0, 0, 89, 0, 90, 0, 0, 0, - 0, 0, 91, 92, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 684, 0, 104, 702, 106, + 107, 0, 0, 57, 25, 0, 26, 0, 703, 27, + 253, 0, 1119, 0, 28, 62, 63, 0, 29, 0, + 0, 25, 0, 26, 65, 0, 27, 31, 0, 0, + 0, 28, 0, 0, 33, 29, 0, 0, 0, 34, + 0, 72, 73, 35, 31, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 0, 37, 34, 38, 75, 0, + 35, 39, 0, 0, 77, 0, 79, 0, 81, 40, + 41, 254, 37, 42, 38, 0, 85, 0, 39, 0, + 87, 0, 0, 88, 89, 0, 40, 41, 0, 0, + 42, 0, 0, 315, 0, 0, 0, 0, 0, 90, + 91, 92, 0, 0, 0, 0, 0, 0, 0, 94, + 0, 0, 0, 0, 0, 96, 97, 98, 99, 0, + 0, 0, 100, 0, 101, 0, 0, 0, 0, 0, + 102, 103, 0, 0, 0, 0, 0, 0, 57, 25, + 0, 26, 0, 0, 27, 253, 0, 0, 0, 28, + 62, 63, 0, 29, 0, 104, 297, 106, 107, 65, + 0, 0, 31, 0, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 346, 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 613, 0, 0, 0, 93, 256, 95, - 96, 613, 613, 0, 613, 0, 0, 613, 613, 0, - 0, 0, 613, 613, 613, 275, 613, 0, 0, 32, - 0, 34, 613, 0, 35, 613, 0, 0, 0, 39, - 0, 0, 613, 43, 0, 0, 0, 613, 0, 613, - 613, 613, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 613, 53, 613, 613, 0, 56, 613, - 0, 0, 613, 0, 613, 0, 613, 613, 613, 613, - 58, 613, 59, 0, 0, 0, 61, 0, 613, 0, - 0, 613, 613, 0, 68, 69, 0, 0, 72, 0, - 0, 274, 0, 0, 0, 0, 0, 613, 613, 613, - 0, 0, 0, 0, 0, 0, 0, 613, 0, 0, - 0, 0, 0, 613, 613, 613, 613, 0, 0, 0, - 613, 0, 613, 0, 0, 0, 0, 0, 613, 613, - 0, 0, 0, 0, 0, 0, 31, 32, 0, 34, - 0, 0, 35, 212, 0, 0, 0, 39, 40, 41, - 0, 43, 0, 613, 613, 613, 613, 44, 0, 0, - 46, 0, 0, 0, 0, 0, 0, 51, 0, 0, - 0, 281, 53, 0, 54, 55, 56, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, - 59, 60, 0, 0, 61, 0, 0, 63, 0, 65, - 0, 67, 68, 69, 213, 0, 72, 0, 0, 0, - 0, 0, 0, 76, 0, 0, 77, 78, 0, 0, + 37, 0, 38, 75, 0, 0, 39, 0, 0, 77, + 0, 79, 0, 81, 40, 41, 254, 0, 42, 0, + 0, 0, 0, 0, 0, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 79, 80, 81, 0, 0, 0, 637, 883, - 0, 0, 83, 0, 0, 0, 0, 0, 85, 86, - 87, 88, 0, 0, 0, 89, 0, 90, 0, 0, - 0, 0, 0, 91, 92, 0, 0, 0, 0, 0, - 0, 31, 32, 0, 34, 0, 0, 35, 212, 0, - 0, 0, 39, 40, 41, 0, 43, 0, 93, 638, - 95, 96, 44, 0, 0, 46, 0, 0, 639, 0, - 0, 0, 51, 0, 0, 0, 0, 53, 0, 54, - 55, 56, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 0, 59, 60, 0, 0, 61, - 0, 0, 63, 0, 65, 0, 67, 68, 69, 213, - 0, 72, 0, 0, 0, 0, 0, 0, 76, 0, - 0, 77, 78, 0, 0, 389, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 79, 80, 81, - 0, 0, 0, 637, 0, 0, 0, 83, 390, 0, - 0, 0, 0, 85, 86, 87, 88, 0, 0, 0, - 89, 391, 90, 0, 0, 0, 393, 0, 91, 92, - 0, 394, 0, 395, 396, 397, 398, 0, 0, 0, - 0, 399, 0, 0, 0, 400, 0, 0, 0, 1212, - 434, 0, 344, 93, 638, 95, 96, 401, 31, 32, - 402, 34, 403, 639, 35, 212, 0, 0, 0, 39, - 40, 41, 0, 43, 0, 0, 0, 0, 0, 44, - 0, 0, 46, 404, 0, 0, 0, 0, 344, 51, - 0, 0, 0, 0, 53, 0, 54, 55, 56, 0, + 0, 0, 0, 0, 90, 91, 92, 0, 0, 0, + 701, 0, 0, 0, 94, 0, 0, 0, 0, 0, + 96, 97, 98, 99, 0, 0, 0, 100, 0, 101, + 0, 0, 0, 0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 59, 60, 0, 0, 61, 0, 0, 63, - 0, 65, 0, 67, 68, 69, 213, 0, 72, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 714, 0, + 104, 702, 106, 107, 0, 0, 57, 25, 0, 26, + 0, 703, 27, 253, 0, 0, 0, 28, 62, 63, + 0, 29, 0, 0, 186, 0, 186, 65, 0, 186, + 31, 0, 0, 0, 186, 0, 0, 33, 186, 0, + 0, 0, 34, 0, 72, 73, 35, 186, 0, 0, + 0, 0, 0, 0, 186, 0, 0, 0, 37, 186, + 38, 75, 0, 186, 39, 0, 0, 77, 0, 79, + 0, 81, 40, 41, 254, 186, 42, 186, 0, 0, + 0, 186, 0, 87, 0, 0, 88, 89, 0, 186, + 186, 0, 0, 186, 0, 0, 186, 0, 0, 0, + 0, 0, 90, 91, 92, 0, 0, 0, 501, 0, + 0, 0, 94, 0, 0, 0, 0, 0, 96, 97, + 98, 99, 0, 0, 0, 100, 0, 101, 0, 0, + 942, 0, 0, 102, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1213, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 80, 81, 0, 0, 0, - 344, 344, 344, 344, 83, 0, 0, 344, 344, 0, - 0, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 0, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, - 344, 344, 344, 0, 0, 0, 0, 0, 0, 344, - 93, 435, 344, 47, 0, 0, 0, 47, 0, 47, - 0, 0, 47, 0, 47, 47, 0, 47, 0, 47, - 0, 47, 0, 47, 47, 47, 47, 0, 0, 47, - 47, 0, 0, 0, 0, 47, 0, 47, 47, 47, - 0, 0, 47, 0, 47, 0, 47, 0, 0, 47, - 0, 47, 47, 47, 47, 0, 0, 0, 47, 47, - 47, 0, 0, 47, 47, 47, 0, 0, 0, 0, - 0, 0, 47, 47, 0, 47, 47, 0, 47, 47, - 47, 0, 0, 0, 47, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 0, 0, 0, 47, 0, - 47, 47, 0, 47, 0, 47, 47, 0, 47, 80, - 47, 0, 47, 0, 47, 47, 47, 47, 47, 0, - 47, 47, 0, 0, 0, 0, 47, 0, 47, 47, - 47, 0, 0, 47, 0, 47, 0, 47, 0, 0, - 47, 0, 47, 47, 47, 47, 0, 0, 0, 47, - 47, 47, 0, 0, 47, 47, 47, 0, 0, 47, - 0, 0, 0, 47, 47, 0, 47, 47, 0, 47, - 47, 47, 0, 0, 0, 47, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 47, 0, 0, 0, 47, - 0, 47, 47, 0, 47, 0, 47, 47, 0, 47, - 81, 47, 0, 47, 0, 47, 47, 47, 47, 47, - 0, 47, 47, 0, 0, 0, 0, 47, 0, 47, - 47, 47, 0, 0, 47, 0, 47, 0, 47, 0, - 0, 47, 0, 47, 47, 47, 47, 0, 0, 0, - 47, 47, 47, 0, 0, 47, 47, 47, 0, 0, - 47, 0, 0, 0, 47, 47, 0, 47, 47, 0, - 47, 47, 47, 0, 0, 0, 47, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, - 47, 0, 47, 47, 0, 47, 0, 47, 47, 0, - 47, 103, 47, 0, 47, 0, 47, 47, 47, 47, - 47, 0, 47, 47, 0, 0, 0, 0, 47, 0, - 47, 47, 47, 0, 0, 47, 0, 47, 0, 47, - 0, 0, 47, 0, 47, 47, 47, 47, 0, 0, - 0, 47, 47, 47, 0, 0, 47, 47, 47, 0, - 0, 47, 0, 0, 0, 47, 47, 0, 47, 47, - 0, 47, 47, 47, 0, 0, 0, 47, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, - 0, 47, 0, 47, 47, 0, 47, 0, 47, 47, - 0, 47, 104, 47, 0, 47, 0, 47, 47, 47, - 47, 47, 0, 47, 47, 0, 0, 0, 0, 47, - 0, 47, 47, 47, 0, 0, 47, 0, 47, 0, - 47, 0, 0, 47, 0, 47, 47, 47, 47, 0, - 0, 0, 47, 47, 47, 0, 0, 47, 47, 47, - 0, 0, 47, 0, 0, 0, 47, 47, 0, 47, - 47, 0, 47, 47, 47, 0, 0, 0, 47, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, - 0, 0, 47, 0, 47, 47, 0, 47, 0, 47, - 47, 0, 47, 225, 47, 0, 47, 0, 47, 47, - 47, 47, 0, 0, 47, 47, 0, 0, 0, 0, - 47, 0, 47, 47, 47, 0, 0, 47, 0, 47, - 0, 47, 344, 0, 47, 0, 47, 47, 47, 47, - 0, 0, 0, 47, 47, 47, 0, 0, 47, 47, - 47, 0, 0, 47, 0, 344, 0, 47, 47, 0, - 47, 47, 0, 47, 47, 47, 0, 0, 344, 47, - 0, 0, 0, 344, 0, 0, 344, 0, 344, 0, - 344, 344, 344, 344, 0, 0, 47, 0, 344, 0, - 0, 0, 344, 0, 226, 0, 344, 0, 0, 0, - 0, 365, 0, 0, 344, 0, 0, 344, 0, 344, + 0, 0, 0, 0, 877, 0, 0, 0, 104, 297, + 106, 107, 57, 25, 0, 26, 0, 0, 27, 253, + 0, 0, 0, 28, 62, 63, 186, 29, 0, 0, + 186, 0, 186, 65, 0, 186, 31, 0, 0, 0, + 186, 0, 0, 33, 186, 0, 0, 0, 34, 0, + 72, 73, 35, 186, 0, 0, 0, 0, 0, 0, + 186, 0, 0, 0, 37, 186, 38, 75, 0, 186, + 39, 0, 0, 77, 0, 79, 0, 81, 40, 41, + 254, 186, 42, 186, 0, 0, 0, 186, 0, 87, + 0, 0, 88, 89, 0, 186, 186, 0, 0, 186, + 0, 0, 186, 0, 0, 0, 0, 0, 90, 91, + 92, 0, 0, 0, 0, 0, 0, 0, 94, 0, + 0, 0, 0, 0, 96, 97, 98, 99, 0, 0, + 0, 100, 0, 101, 942, 0, 0, 0, 0, 102, + 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 365, 0, 0, 0, 344, 0, - 344, 389, 0, 0, 0, 0, 0, 365, 0, 344, - 0, 276, 365, 344, 47, 242, 0, 365, 0, 365, - 365, 365, 365, 0, 390, 0, 344, 365, 0, 0, - 0, 365, 0, 0, 0, 365, 0, 391, 0, 0, - 0, 0, 393, 365, 0, 0, 365, 394, 365, 395, - 396, 397, 398, 31, 32, 0, 34, 399, 344, 35, - 212, 400, 0, 0, 39, 40, 41, 0, 43, 365, - 0, 0, 0, 401, 44, 0, 402, 46, 403, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 521, 0, 0, 0, 404, - 0, 0, 522, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 0, 0, 0, 365, 0, 0, - 523, 0, 0, 77, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 0, 1226, 0, 83, - 811, 0, 524, 0, 0, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 31, 32, - 0, 34, 0, 0, 35, 212, 0, 0, 0, 39, - 40, 41, 0, 43, 0, 93, 411, 95, 96, 44, - 0, 0, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 0, 53, 0, 54, 55, 56, 0, - 521, 0, 0, 0, 0, 0, 0, 522, 0, 0, - 58, 0, 59, 60, 0, 0, 61, 0, 0, 63, - 0, 65, 0, 67, 68, 69, 213, 0, 72, 0, - 0, 0, 0, 0, 0, 523, 0, 0, 77, 78, + 614, 0, 0, 0, 104, 297, 106, 107, 614, 614, + 0, 614, 0, 0, 614, 614, 0, 0, 0, 614, + 614, 614, 186, 614, 0, 0, 0, 0, 0, 614, + 0, 0, 614, 0, 0, 0, 0, 0, 0, 614, + 0, 0, 0, 0, 614, 0, 614, 614, 614, 0, + 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, + 614, 0, 614, 614, 0, 0, 614, 0, 0, 614, + 0, 614, 0, 614, 614, 614, 614, 0, 614, 0, + 0, 0, 0, 0, 0, 614, 0, 0, 614, 614, + 0, 0, 345, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 614, 614, 614, 0, 0, 0, + 0, 0, 0, 0, 614, 0, 0, 0, 0, 0, + 614, 614, 614, 614, 0, 0, 0, 614, 0, 614, + 0, 0, 0, 0, 0, 614, 614, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 80, 81, 0, 0, 0, - 0, 0, 0, 0, 83, 0, 0, 524, 0, 0, - 85, 86, 87, 88, 0, 0, 0, 89, 0, 90, - 0, 0, 0, 0, 0, 91, 92, 0, 0, 0, - 0, 0, 0, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 0, 0, 39, 40, 41, 0, 43, 0, - 93, 411, 95, 96, 44, 0, 0, 46, 0, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 521, 0, 0, 0, 0, - 0, 0, 522, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 0, 0, 0, 0, 0, 0, - 523, 0, 0, 77, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 0, 0, 0, 83, - 0, 0, 0, 0, 0, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 31, 32, - 0, 34, 0, 0, 35, 212, 0, 0, 0, 39, - 40, 41, 0, 43, 0, 93, 411, 95, 96, 44, - 0, 0, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 0, 53, 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 59, 60, 0, 0, 61, 0, 0, 63, - 0, 65, 0, 67, 68, 69, 213, 0, 72, 0, - 0, 74, 0, 0, 0, 76, 0, 0, 77, 78, + 614, 614, 614, 614, 345, 345, 345, 345, 0, 0, + 0, 345, 345, 0, 0, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 0, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, + 345, 345, 345, 345, 345, 345, 345, 0, 48, 0, + 0, 0, 48, 345, 48, 0, 345, 48, 0, 48, + 48, 0, 48, 0, 48, 0, 48, 0, 48, 48, + 48, 48, 0, 0, 48, 48, 0, 0, 0, 0, + 48, 0, 48, 48, 48, 0, 0, 48, 0, 48, + 0, 48, 0, 0, 48, 0, 48, 48, 48, 48, + 0, 0, 0, 48, 48, 48, 0, 0, 48, 48, + 48, 0, 0, 0, 0, 0, 0, 48, 48, 0, + 48, 48, 0, 48, 48, 48, 0, 0, 0, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 0, 48, 0, 48, 48, 0, 48, 0, + 48, 48, 0, 48, 81, 48, 0, 48, 0, 48, + 48, 48, 48, 48, 0, 48, 48, 0, 0, 0, + 0, 48, 0, 48, 48, 48, 0, 0, 48, 0, + 48, 0, 48, 0, 0, 48, 0, 48, 48, 48, + 48, 0, 0, 0, 48, 48, 48, 0, 0, 48, + 48, 48, 0, 0, 48, 0, 0, 0, 48, 48, + 0, 48, 48, 0, 48, 48, 48, 0, 0, 0, + 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 0, 0, 0, 48, 0, 48, 48, 0, 48, + 0, 48, 48, 0, 48, 82, 48, 0, 48, 0, + 48, 48, 48, 48, 48, 0, 48, 48, 0, 0, + 0, 0, 48, 0, 48, 48, 48, 0, 0, 48, + 0, 48, 0, 48, 0, 0, 48, 0, 48, 48, + 48, 48, 0, 0, 0, 48, 48, 48, 0, 0, + 48, 48, 48, 0, 0, 48, 0, 0, 0, 48, + 48, 0, 48, 48, 0, 48, 48, 48, 0, 0, + 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 48, 0, 0, 0, 48, 0, 48, 48, 0, + 48, 0, 48, 48, 0, 48, 104, 48, 0, 48, + 0, 48, 48, 48, 48, 48, 0, 48, 48, 0, + 0, 0, 0, 48, 0, 48, 48, 48, 0, 0, + 48, 0, 48, 0, 48, 0, 0, 48, 0, 48, + 48, 48, 48, 0, 0, 0, 48, 48, 48, 0, + 0, 48, 48, 48, 0, 0, 48, 0, 0, 0, + 48, 48, 0, 48, 48, 0, 48, 48, 48, 0, + 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 48, 0, 0, 0, 48, 0, 48, 48, + 0, 48, 0, 48, 48, 0, 48, 105, 48, 0, + 48, 0, 48, 48, 48, 48, 48, 0, 48, 48, + 0, 0, 0, 0, 48, 0, 48, 48, 48, 0, + 0, 48, 0, 48, 0, 48, 0, 0, 48, 0, + 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, + 0, 0, 48, 48, 48, 0, 0, 48, 0, 0, + 0, 48, 48, 0, 48, 48, 0, 48, 48, 48, + 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 0, 48, 0, 48, + 48, 0, 48, 0, 48, 48, 0, 48, 226, 48, + 0, 48, 0, 48, 48, 48, 48, 0, 0, 48, + 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, + 0, 0, 48, 0, 48, 0, 48, 345, 0, 48, + 0, 48, 48, 48, 48, 0, 0, 0, 48, 48, + 48, 0, 0, 48, 48, 48, 0, 0, 48, 0, + 345, 0, 48, 48, 0, 48, 48, 0, 48, 48, + 48, 0, 0, 345, 48, 0, 0, 0, 345, 0, + 0, 345, 0, 345, 0, 345, 345, 345, 345, 0, + 0, 48, 0, 345, 0, 0, 0, 345, 0, 227, + 0, 345, 0, 0, 0, 0, 367, 0, 0, 345, + 0, 0, 345, 0, 345, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, + 0, 0, 0, 345, 0, 345, 366, 0, 0, 0, + 0, 0, 367, 0, 345, 0, 277, 367, 345, 48, + 244, 0, 367, 0, 367, 367, 367, 367, 0, 366, + 0, 345, 367, 0, 0, 0, 367, 0, 0, 0, + 367, 439, 366, 0, 0, 0, 0, 366, 367, 0, + 243, 367, 366, 367, 366, 366, 366, 366, 0, 0, + 0, 0, 366, 345, 440, 0, 366, 0, 0, 0, + 366, 439, 0, 0, 367, 0, 0, 441, 366, 0, + 0, 366, 443, 366, 0, 0, 0, 444, 0, 445, + 446, 447, 448, 0, 440, 0, 0, 449, 0, 0, + 0, 450, 0, 0, 366, 1274, 0, 441, 0, 0, + 0, 0, 443, 451, 0, 0, 452, 444, 453, 445, + 446, 447, 448, 0, 0, 0, 0, 449, 0, 0, + 0, 450, 367, 0, 0, 0, 0, 0, 0, 454, + 0, 0, 0, 451, 57, 25, 452, 26, 453, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 0, 366, 0, 0, 65, 0, 0, 31, 454, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 571, 0, 0, 0, + 0, 0, 0, 572, 0, 0, 37, 1275, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 0, 0, 0, 0, 0, + 0, 573, 0, 0, 88, 89, 0, 1288, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 90, 91, 92, 0, 0, 0, 0, 0, 0, 0, + 94, 884, 0, 574, 0, 0, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 253, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 104, 461, 106, 107, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, + 0, 571, 0, 0, 0, 0, 0, 0, 572, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 254, 0, 42, + 0, 0, 0, 0, 0, 0, 573, 0, 0, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 91, 92, 0, 0, + 0, 0, 0, 0, 0, 94, 0, 0, 574, 0, + 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, + 101, 0, 0, 0, 0, 0, 102, 103, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 104, 461, 106, 107, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 571, 0, 0, 0, + 0, 0, 0, 572, 0, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 0, 0, 0, 0, 0, + 0, 573, 0, 0, 88, 89, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 90, 91, 92, 0, 0, 0, 0, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 253, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 104, 461, 106, 107, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 80, 81, 0, 0, 0, - 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, - 85, 86, 87, 88, 0, 0, 0, 89, 0, 90, - 0, 0, 0, 0, 0, 91, 92, 0, 0, 0, - 0, 0, 0, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 0, 0, 39, 40, 41, 0, 43, 0, - 93, 256, 95, 96, 44, 0, 0, 46, 0, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 0, 0, 0, 0, 0, 0, - 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 772, 0, 0, 83, - 0, 0, 0, 0, 0, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 31, 32, - 0, 34, 0, 0, 35, 212, 0, 0, 0, 39, - 40, 41, 0, 43, 0, 93, 256, 95, 96, 44, - 0, 0, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 0, 53, 0, 54, 55, 56, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 254, 0, 42, + 0, 0, 85, 0, 0, 0, 87, 0, 0, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 91, 92, 0, 0, + 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, + 101, 0, 0, 0, 0, 0, 102, 103, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 104, 297, 106, 107, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 0, 0, 0, 0, 0, + 0, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 59, 60, 0, 0, 61, 0, 0, 63, - 0, 65, 0, 67, 68, 69, 213, 0, 72, 0, - 0, 0, 0, 0, 0, 76, 0, 0, 77, 78, + 90, 91, 92, 0, 0, 0, 0, 845, 0, 0, + 94, 0, 0, 0, 0, 0, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 253, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 104, 297, 106, 107, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 80, 81, 0, 0, 0, - 451, 0, 0, 0, 83, 0, 0, 0, 0, 0, - 85, 86, 87, 88, 0, 0, 0, 89, 0, 90, - 0, 0, 0, 0, 0, 91, 92, 0, 0, 0, - 0, 0, 0, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 0, 0, 39, 40, 41, 0, 43, 0, - 93, 256, 95, 96, 44, 0, 0, 46, 0, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 0, 0, 0, 0, 0, 0, - 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 445, 0, 0, 0, 83, - 0, 0, 0, 0, 0, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 31, 32, - 0, 34, 0, 0, 35, 212, 0, 0, 0, 39, - 40, 41, 0, 43, 0, 93, 256, 95, 96, 44, - 0, 0, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 0, 53, 0, 54, 55, 56, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 254, 0, 42, + 0, 0, 0, 0, 0, 0, 87, 0, 0, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 91, 92, 0, 0, + 0, 501, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, + 101, 0, 0, 0, 0, 0, 102, 103, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 104, 297, 106, 107, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 0, 0, 0, 0, 0, + 0, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 59, 60, 0, 0, 61, 0, 0, 63, - 0, 65, 0, 67, 68, 69, 213, 0, 72, 0, - 0, 0, 0, 0, 0, 76, 0, 0, 77, 78, + 90, 91, 92, 0, 0, 0, 495, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 253, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 104, 297, 106, 107, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 80, 81, 0, 0, 0, - 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, - 85, 86, 87, 88, 0, 0, 0, 89, 0, 90, - 0, 0, 0, 0, 0, 91, 92, 0, 0, 0, - 0, 0, 0, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 0, 0, 39, 40, 41, 0, 43, 0, - 93, 256, 95, 96, 44, 0, 0, 46, 0, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 0, 0, 0, 0, 0, 0, - 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, - 80, 81, 0, 0, 0, 0, 0, 0, 0, 83, - 0, 0, 0, 0, 0, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 0, 0, 0, 0, 31, 32, - 0, 34, 0, 0, 35, 212, 0, 0, 0, 39, - 40, 41, 0, 43, 0, 93, 411, 95, 96, 44, - 0, 0, 46, 0, 0, 0, 0, 0, 0, 51, - 0, 0, 0, 0, 53, 0, 54, 55, 56, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 254, 0, 42, + 0, 0, 0, 0, 0, 0, 87, 0, 0, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 91, 92, 0, 0, + 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, + 101, 0, 0, 0, 0, 0, 102, 103, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 104, 297, 106, 107, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 0, 0, 0, 0, 0, + 0, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 58, 0, 59, 60, 0, 0, 61, 0, 0, 63, - 0, 65, 0, 67, 68, 69, 213, 0, 72, 0, - 0, 0, 0, 0, 0, 76, 0, 0, 77, 78, + 90, 91, 92, 0, 0, 0, 0, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 253, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 104, 461, 106, 107, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 80, 81, 0, 0, 0, - 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, - 85, 86, 87, 88, 0, 0, 0, 89, 0, 90, - 0, 0, 0, 0, 0, 91, 92, 0, 0, 0, - 0, 0, 0, 77, 77, 0, 77, 0, 0, 77, - 77, 0, 0, 0, 77, 77, 77, 0, 77, 0, - 93, 916, 95, 96, 77, 0, 0, 77, 0, 0, - 0, 0, 0, 0, 77, 0, 0, 0, 0, 77, - 0, 77, 77, 77, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 77, 0, 77, 77, 0, - 0, 77, 0, 0, 77, 0, 77, 0, 77, 77, - 77, 77, 0, 77, 0, 0, 0, 0, 0, 0, - 77, 0, 0, 77, 77, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, - 77, 77, 0, 0, 0, 0, 0, 0, 0, 77, - 0, 0, 0, 0, 0, 77, 77, 77, 77, 0, - 0, 0, 77, 0, 77, 0, 0, 0, 0, 0, - 77, 77, 0, 0, 0, 0, 0, 0, 149, 149, - 0, 149, 0, 0, 149, 149, 0, 0, 0, 149, - 149, 149, 0, 149, 0, 77, 77, 77, 77, 149, - 0, 0, 149, 0, 0, 0, 0, 0, 0, 149, - 0, 0, 0, 0, 149, 0, 149, 149, 149, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 254, 0, 42, + 0, 0, 0, 0, 0, 0, 87, 0, 0, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 91, 92, 0, 0, + 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, + 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, + 101, 0, 0, 0, 0, 0, 102, 103, 0, 0, + 0, 0, 0, 0, 78, 78, 0, 78, 0, 0, + 78, 78, 0, 0, 0, 78, 78, 78, 0, 78, + 0, 104, 992, 106, 107, 78, 0, 0, 78, 0, + 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, + 78, 0, 78, 78, 78, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 78, 0, 78, 78, + 0, 0, 78, 0, 0, 78, 0, 78, 0, 78, + 78, 78, 78, 0, 78, 0, 0, 0, 0, 0, + 0, 78, 0, 0, 78, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 149, 0, 149, 149, 0, 0, 149, 0, 0, 149, - 0, 149, 0, 149, 149, 149, 149, 0, 149, 0, - 0, 0, 0, 0, 0, 149, 0, 0, 149, 149, + 78, 78, 78, 0, 0, 0, 0, 0, 0, 0, + 78, 0, 0, 0, 0, 0, 78, 78, 78, 78, + 0, 0, 0, 78, 0, 78, 0, 0, 0, 0, + 0, 78, 78, 0, 0, 0, 0, 0, 0, 150, + 150, 0, 150, 0, 0, 150, 150, 0, 0, 0, + 150, 150, 150, 0, 150, 0, 78, 78, 78, 78, + 150, 0, 0, 150, 0, 0, 0, 0, 0, 0, + 150, 0, 0, 0, 0, 150, 0, 150, 150, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 149, 149, 149, 0, 0, 0, - 0, 0, 0, 0, 149, 0, 0, 0, 0, 0, - 149, 149, 149, 149, 0, 0, 0, 149, 0, 149, - 0, 0, 0, 0, 0, 149, 149, 0, 0, 0, - 0, 0, 0, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 0, 0, 39, 40, 41, 0, 43, 0, - 149, 149, 149, 149, 44, 0, 0, 46, 0, 0, - 0, 0, 0, 0, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 0, 32, 0, 34, 0, 0, - 35, 0, 0, 0, 0, 39, 0, 0, 0, 43, - 0, 0, 0, 0, 0, 0, 0, 0, 46, 79, - 80, 81, 0, 0, 0, 51, 0, 0, 0, 83, - 53, 0, 0, 0, 56, 85, 86, 87, 88, 0, - 0, 0, 89, 0, 90, 0, 58, 0, 59, 0, - 91, 92, 61, 0, 0, 0, 0, 0, 0, 0, - 68, 69, 0, 0, 72, 0, 0, 274, 0, 0, - 641, 0, 641, 0, 641, 93, 214, 641, 96, 641, - 641, 0, 641, 0, 641, 0, 641, 0, 641, 641, - 641, 0, 0, 0, 641, 641, 0, 0, 0, 0, - 641, 0, 641, 641, 0, 0, 0, 641, 0, 0, - 0, 641, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 641, 641, 0, 641, 0, 0, 0, 641, - 641, 0, 0, 0, 0, 0, 0, 641, 641, 0, - 0, 641, 0, 0, 641, 0, 0, 305, 0, 641, - 0, 0, 0, 31, 32, 0, 34, 0, 0, 35, - 212, 0, 0, 0, 39, 40, 41, 0, 43, 0, - 641, 641, 0, 0, 44, 0, 0, 46, 0, 0, - 0, 0, 0, 641, 51, 0, 0, 0, 0, 53, - 0, 54, 55, 56, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 59, 60, 0, - 0, 61, 0, 0, 63, 0, 65, 0, 67, 68, - 69, 213, 0, 72, 641, 640, 74, 640, 0, 0, - 640, 0, 640, 640, 0, 640, 0, 640, 0, 640, - 0, 640, 640, 640, 0, 0, 0, 640, 640, 79, - 80, 81, 0, 640, 0, 640, 640, 0, 0, 83, - 640, 0, 0, 0, 640, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 640, 0, 640, 0, - 0, 0, 640, 640, 0, 0, 0, 0, 0, 0, - 640, 640, 0, 0, 640, 0, 0, 640, 0, 0, - 0, 0, 640, 0, 0, 93, 214, 640, 0, 640, - 0, 0, 640, 0, 640, 640, 0, 640, 0, 640, - 0, 640, 0, 640, 640, 640, 0, 0, 0, 640, - 640, 0, 0, 0, 0, 640, 640, 640, 640, 32, - 0, 34, 640, 0, 35, 0, 640, 1181, 0, 39, - 0, 596, 0, 43, 0, 597, 1182, 1183, 640, 0, - 640, 1184, 46, 0, 640, 640, 0, 1185, 0, 51, - 0, 0, 640, 640, 53, 0, 640, 640, 56, 640, - 0, 0, 0, 0, 640, 0, 0, 0, 0, 0, - 58, 0, 59, 0, 0, 0, 61, 0, 0, 0, - 0, 0, 0, 0, 68, 69, 0, 32, 72, 34, - 0, 1186, 35, 0, 0, 1181, 1187, 39, 0, 596, - 0, 43, 0, 597, 1182, 1183, 0, 0, 0, 1184, - 46, 0, 0, 0, 0, 1185, 0, 51, 0, 47, - 0, 47, 53, 0, 47, 0, 56, 0, 0, 47, - 1188, 0, 0, 47, 0, 0, 0, 0, 58, 640, - 59, 0, 47, 0, 61, 0, 0, 0, 0, 47, - 0, 0, 68, 69, 47, 0, 72, 0, 47, 1186, - 47, 0, 47, 47, 1187, 47, 0, 47, 47, 0, - 47, 1189, 47, 47, 0, 0, 47, 47, 0, 47, - 0, 0, 0, 0, 47, 47, 47, 0, 47, 0, - 0, 47, 0, 47, 0, 0, 0, 0, 47, 0, - 0, 0, 47, 47, 47, 47, 47, 0, 47, 0, - 0, 47, 0, 47, 47, 0, 47, 47, 0, 0, - 47, 0, 0, 47, 0, 166, 47, 0, 47, 47, - 0, 0, 47, 47, 0, 47, 0, 0, 47, 1189, - 0, 0, 47, 0, 47, 0, 47, 32, 0, 34, - 0, 47, 35, 0, 47, 0, 47, 39, 0, 0, - 47, 43, 0, 47, 0, 0, 0, 166, 47, 47, - 46, 47, 47, 0, 0, 47, 0, 51, 0, 32, - 0, 34, 53, 0, 35, 0, 56, 0, 502, 39, - 0, 0, 0, 43, 0, 503, 0, 0, 58, 0, - 59, 0, 46, 0, 61, 0, 0, 504, 0, 51, - 0, 0, 68, 69, 53, 47, 72, 0, 56, 505, - 0, 0, 0, 32, 0, 34, 0, 0, 35, 0, - 58, 0, 59, 39, 0, 0, 61, 43, 0, 0, - 0, 0, 0, 0, 68, 69, 46, 32, 72, 34, - 0, 453, 35, 51, 0, 47, 0, 39, 53, 0, - 0, 43, 56, 0, 0, 0, 0, 0, 0, 0, - 46, 0, 0, 0, 58, 0, 59, 51, 0, 0, - 61, 0, 53, 0, 0, 0, 56, 0, 68, 69, - 0, 32, 72, 34, 0, 274, 35, 0, 58, 506, - 59, 39, 0, 0, 61, 43, 0, 0, 0, 0, - 0, 0, 68, 69, 46, 32, 72, 34, 0, 274, - 35, 51, 0, 0, 0, 39, 53, 0, 0, 43, - 56, 305, 0, 0, 0, 0, 0, 0, 46, 0, - 0, 0, 58, 0, 59, 51, 0, 0, 61, 0, - 53, 0, 0, 0, 56, 0, 68, 69, 0, 496, - 72, 496, 0, 505, 496, 0, 58, 0, 59, 496, - 0, 0, 61, 496, 0, 569, 0, 0, 0, 0, - 68, 69, 496, 185, 72, 185, 0, 664, 185, 496, - 0, 0, 0, 185, 496, 0, 0, 185, 496, 571, - 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, - 496, 0, 496, 185, 0, 0, 496, 0, 185, 0, - 0, 0, 185, 0, 496, 496, 0, 195, 496, 195, - 0, 496, 195, 0, 185, 0, 185, 195, 0, 0, - 185, 195, 0, 305, 0, 0, 0, 0, 185, 185, - 195, 186, 185, 186, 0, 185, 186, 195, 0, 0, - 0, 186, 195, 0, 0, 186, 195, 305, 0, 0, - 0, 0, 0, 0, 186, 0, 0, 0, 195, 0, - 195, 186, 0, 0, 195, 0, 186, 0, 0, 0, - 186, 0, 195, 195, 0, 0, 195, 0, 0, 195, - 0, 0, 186, 0, 186, 0, 0, 0, 186, 0, - 34, 496, 0, 0, 0, 0, 186, 186, 0, 0, - 186, 34, 0, 186, 0, 0, 34, 0, 0, 0, - 34, 0, 0, 34, 0, 185, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 34, 34, 0, 0, 0, - 34, 34, 0, 0, 0, 0, 34, 0, 34, 34, - 34, 34, 0, 0, 0, 0, 34, 0, 0, 0, - 34, 0, 34, 0, 0, 0, 0, 0, 32, 195, - 0, 0, 34, 0, 34, 34, 0, 34, 0, 32, - 0, 34, 0, 0, 32, 0, 0, 0, 32, 0, - 0, 32, 0, 186, 0, 0, 0, 0, 34, 0, - 0, 0, 0, 32, 32, 0, 34, 34, 32, 32, - 0, 27, 0, 0, 32, 0, 32, 32, 32, 32, - 0, 0, 0, 0, 32, 0, 0, 0, 32, 0, - 32, 0, 0, 0, 27, 0, 0, 0, 0, 0, - 32, 0, 0, 32, 0, 32, 0, 27, 0, 32, - 0, 0, 27, 0, 27, 0, 27, 27, 0, 27, - 27, 27, 27, 0, 0, 27, 32, 27, 0, 0, - 0, 27, 0, 0, 32, 32, 0, 27, 0, 0, - 0, 0, 0, 27, 0, 0, 27, 0, 27, 0, - 27, 0, 0, 0, 0, 27, 0, 0, 0, 0, - 27, 0, 27, 27, 27, 27, 0, 0, 0, 27, - 27, 0, 0, 0, 27, 0, 0, 27, 27, 0, - 0, 0, 47, 0, 0, 0, 27, 0, 0, 27, - 0, 27, 0, 47, 0, 0, 0, 0, 47, 0, - 0, 0, 47, 0, 0, 47, 0, 0, 0, 0, - 0, 0, 27, 0, 0, 0, 0, 47, 47, 0, - 27, 27, 47, 47, 0, 47, 0, 0, 47, 0, - 47, 47, 47, 47, 0, 0, 47, 0, 47, 0, - 0, 47, 47, 0, 47, 47, 0, 0, 47, 0, - 0, 0, 0, 0, 47, 0, 0, 47, 0, 47, - 47, 47, 0, 47, 0, 47, 47, 0, 47, 0, - 0, 47, 0, 47, 47, 47, 47, 0, 0, 0, - 47, 47, 0, 0, 0, 47, 0, 47, 36, 0, - 0, 47, 0, 0, 0, 0, 0, 47, 0, 0, - 47, 0, 47, 47, 47, 0, 47, 0, 0, 47, - 0, 0, 0, 0, 47, 0, 47, 47, 47, 47, - 0, 0, 0, 47, 47, 0, 47, 0, 47, 0, - 0, 37, 0, 0, 0, 0, 0, 0, 0, 47, - 47, 0, 0, 47, 47, 47, 0, 0, 0, 47, - 0, 47, 47, 47, 47, 0, 0, 0, 0, 47, - 0, 0, 47, 47, 0, 0, 47, 0, 0, 0, - 47, 47, 0, 0, 207, 47, 0, 0, 47, 0, - 47, 0, 0, 0, 0, 47, 0, 0, 0, 0, - 0, 0, 47, 0, 47, 0, 0, 0, 47, 0, - 0, 47, 0, 47, 0, 47, 47, 0, 47, 209, - 47, 47, 47, 47, 0, 47, 47, 0, 47, 0, - 0, 0, 47, 0, 0, 0, 0, 0, 47, 0, - 0, 0, 0, 47, 47, 47, 0, 47, 47, 47, - 47, 47, 47, 47, 0, 0, 0, 0, 47, 0, - 0, 0, 47, 0, 0, 0, 0, 0, 47, 0, - 47, 0, 0, 0, 47, 0, 0, 47, 309, 47, - 389, 47, 0, 0, 0, 0, 47, 0, 0, 0, - 0, 47, 0, 47, 47, 47, 47, 0, 0, 0, - 47, 47, 0, 390, 0, 47, 0, 0, 310, 0, - 0, 0, 0, 0, 0, 0, 391, 47, 0, 0, - 47, 393, 47, 0, 0, 0, 394, 0, 395, 396, - 397, 398, 0, 0, 0, 0, 399, 0, 0, 0, - 400, 0, 0, 47, 0, 0, 0, 47, 47, 0, - 0, 0, 401, 0, 0, 402, 0, 403, 0, 0, + 0, 150, 0, 150, 150, 0, 0, 150, 0, 0, + 150, 0, 150, 0, 150, 150, 150, 150, 0, 150, + 0, 0, 0, 0, 0, 0, 150, 0, 0, 150, + 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 150, 150, 150, 0, 0, + 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, + 0, 150, 150, 150, 150, 0, 0, 0, 150, 0, + 150, 0, 0, 0, 0, 0, 150, 150, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 150, 150, 150, 150, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 0, 25, 0, 26, 0, + 0, 27, 0, 1170, 0, 0, 28, 0, 0, 0, + 29, 0, 0, 0, 0, 0, 0, 0, 0, 31, + 90, 91, 92, 0, 0, 0, 33, 0, 0, 0, + 94, 34, 0, 1171, 0, 35, 96, 97, 98, 99, + 0, 0, 0, 100, 0, 101, 0, 37, 0, 38, + 0, 102, 103, 39, 1172, 0, 0, 0, 0, 0, + 0, 40, 41, 0, 0, 42, 0, 0, 315, 0, + 0, 642, 0, 642, 0, 642, 104, 255, 642, 107, + 642, 642, 0, 642, 0, 642, 0, 642, 0, 642, + 642, 642, 0, 0, 0, 642, 642, 0, 0, 0, + 0, 642, 0, 642, 642, 0, 0, 0, 642, 0, + 0, 0, 642, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 642, 642, 0, 642, 0, 0, 0, + 642, 642, 0, 0, 0, 0, 0, 0, 642, 642, + 0, 0, 642, 0, 0, 642, 0, 0, 346, 0, + 642, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 253, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 642, 642, 0, 0, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 642, 33, 0, 0, 0, 0, + 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 38, 75, + 0, 0, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 254, 0, 42, 642, 641, 85, 641, 0, + 0, 641, 0, 641, 641, 0, 641, 0, 641, 0, + 641, 0, 641, 641, 641, 0, 0, 0, 641, 641, + 90, 91, 92, 0, 641, 0, 641, 641, 0, 0, + 94, 641, 0, 0, 0, 641, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 641, 0, 641, + 0, 0, 0, 641, 641, 0, 0, 0, 0, 0, + 0, 641, 641, 0, 0, 641, 0, 0, 641, 0, + 0, 0, 0, 641, 0, 0, 104, 255, 641, 0, + 641, 0, 0, 641, 0, 641, 641, 0, 641, 0, + 641, 0, 641, 0, 641, 641, 641, 0, 0, 0, + 641, 641, 0, 0, 0, 0, 641, 641, 641, 641, + 25, 0, 26, 641, 0, 27, 0, 641, 1243, 0, + 28, 0, 660, 0, 29, 0, 661, 1244, 1245, 641, + 0, 641, 1246, 31, 0, 641, 641, 0, 1247, 0, + 33, 0, 0, 641, 641, 34, 0, 641, 641, 35, + 641, 0, 0, 0, 0, 641, 0, 0, 0, 0, + 0, 37, 0, 38, 0, 0, 0, 39, 0, 0, + 0, 0, 0, 0, 0, 40, 41, 0, 25, 42, + 26, 0, 1248, 27, 0, 0, 1243, 1249, 28, 0, + 660, 0, 29, 0, 661, 1244, 1245, 0, 0, 0, + 1246, 31, 0, 0, 0, 0, 1247, 0, 33, 0, + 48, 0, 48, 34, 0, 48, 0, 35, 0, 0, + 48, 1250, 0, 0, 48, 0, 0, 0, 0, 37, + 641, 38, 0, 48, 0, 39, 0, 0, 0, 0, + 48, 0, 0, 40, 41, 48, 0, 42, 0, 48, + 1248, 48, 0, 48, 48, 1249, 48, 0, 48, 48, + 0, 48, 1251, 48, 48, 0, 0, 48, 48, 0, + 48, 0, 0, 0, 0, 48, 48, 48, 0, 48, + 0, 0, 48, 0, 48, 0, 0, 0, 0, 48, + 0, 0, 0, 48, 48, 48, 48, 48, 0, 48, + 0, 0, 48, 0, 48, 48, 0, 48, 48, 0, + 0, 48, 0, 0, 48, 0, 167, 48, 0, 48, + 48, 0, 0, 48, 48, 0, 48, 0, 0, 48, + 1251, 0, 0, 48, 0, 48, 0, 48, 25, 0, + 26, 0, 48, 27, 0, 48, 0, 48, 28, 0, + 0, 48, 29, 0, 48, 0, 0, 0, 167, 48, + 48, 31, 48, 48, 0, 0, 48, 0, 33, 0, + 0, 0, 0, 34, 0, 0, 0, 35, 0, 552, + 0, 0, 0, 0, 0, 0, 553, 0, 0, 37, + 0, 38, 0, 0, 0, 39, 0, 0, 554, 0, + 0, 0, 0, 40, 41, 0, 48, 42, 0, 25, + 555, 26, 0, 0, 27, 0, 0, 0, 0, 28, + 25, 0, 26, 29, 0, 27, 0, 30, 0, 0, + 28, 0, 31, 0, 29, 0, 0, 32, 0, 33, + 0, 0, 0, 31, 34, 0, 48, 0, 35, 36, + 33, 0, 0, 0, 0, 34, 0, 0, 0, 35, + 37, 0, 38, 0, 0, 0, 39, 0, 0, 0, + 0, 37, 0, 38, 40, 41, 0, 39, 42, 0, + 0, 0, 0, 0, 0, 40, 41, 0, 0, 42, + 556, 25, 315, 26, 0, 0, 27, 0, 0, 0, + 0, 28, 25, 0, 26, 29, 0, 27, 0, 0, + 0, 0, 28, 0, 31, 0, 29, 0, 0, 0, + 0, 33, 0, 0, 0, 31, 34, 0, 0, 0, + 35, 0, 33, 0, 0, 0, 0, 34, 0, 0, + 0, 35, 37, 0, 38, 0, 0, 0, 39, 0, + 0, 0, 0, 37, 0, 38, 40, 41, 0, 39, + 42, 43, 0, 315, 0, 0, 0, 40, 41, 0, + 0, 42, 316, 25, 315, 26, 0, 0, 27, 0, + 0, 0, 0, 28, 25, 0, 26, 29, 0, 27, + 0, 0, 0, 0, 28, 0, 31, 0, 29, 0, + 0, 0, 0, 33, 0, 0, 0, 31, 34, 0, + 0, 0, 35, 0, 33, 0, 0, 0, 0, 34, + 0, 0, 0, 35, 37, 0, 38, 0, 0, 0, + 39, 0, 0, 0, 0, 37, 0, 38, 40, 41, + 0, 39, 42, 322, 0, 503, 0, 0, 0, 40, + 41, 0, 0, 42, 346, 25, 315, 26, 0, 0, + 27, 0, 0, 0, 0, 28, 25, 0, 26, 29, + 0, 27, 0, 0, 0, 0, 28, 0, 31, 0, + 29, 0, 0, 0, 0, 33, 0, 0, 0, 31, + 34, 0, 0, 0, 35, 0, 33, 0, 0, 0, + 0, 34, 0, 0, 0, 35, 37, 0, 38, 0, + 0, 0, 39, 0, 0, 0, 0, 37, 0, 38, + 40, 41, 0, 39, 42, 346, 0, 315, 0, 0, + 0, 40, 41, 0, 0, 42, 619, 25, 555, 26, + 0, 0, 27, 0, 0, 0, 0, 28, 497, 0, + 497, 29, 0, 497, 0, 0, 0, 0, 497, 0, + 31, 0, 497, 0, 0, 0, 0, 33, 0, 0, + 0, 497, 34, 0, 0, 0, 35, 0, 497, 0, + 0, 0, 0, 497, 0, 0, 0, 497, 37, 0, + 38, 0, 0, 0, 39, 0, 0, 0, 0, 497, + 0, 497, 40, 41, 0, 497, 42, 621, 0, 728, + 0, 0, 0, 497, 497, 0, 0, 497, 346, 187, + 497, 187, 0, 0, 187, 0, 0, 0, 0, 187, + 186, 0, 186, 187, 0, 186, 0, 0, 0, 0, + 186, 0, 187, 0, 186, 0, 0, 0, 0, 187, + 0, 0, 0, 186, 187, 0, 0, 0, 187, 0, + 186, 0, 0, 0, 0, 186, 0, 0, 0, 186, + 187, 0, 187, 0, 0, 0, 187, 0, 0, 0, + 0, 186, 0, 186, 187, 187, 0, 186, 187, 346, + 0, 187, 0, 0, 0, 186, 186, 0, 0, 186, + 497, 196, 186, 196, 0, 0, 196, 0, 0, 0, + 0, 196, 0, 0, 0, 196, 0, 0, 0, 0, + 0, 0, 0, 0, 196, 0, 0, 0, 35, 0, + 0, 196, 0, 0, 0, 0, 196, 0, 0, 35, + 196, 0, 0, 0, 35, 0, 0, 0, 35, 0, + 0, 35, 196, 0, 196, 0, 0, 0, 196, 0, + 0, 0, 0, 35, 35, 0, 196, 196, 35, 35, + 196, 187, 0, 196, 35, 0, 35, 35, 35, 35, + 0, 0, 186, 0, 35, 0, 0, 0, 35, 0, + 35, 0, 0, 0, 0, 0, 33, 0, 0, 0, + 35, 0, 35, 35, 0, 35, 0, 33, 0, 35, + 0, 0, 33, 0, 0, 0, 33, 0, 0, 33, + 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, + 0, 33, 33, 0, 35, 35, 33, 33, 0, 28, + 0, 0, 33, 0, 33, 33, 33, 33, 0, 0, + 0, 0, 33, 196, 0, 0, 33, 0, 33, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 33, 0, + 0, 33, 0, 33, 0, 28, 0, 33, 0, 0, + 28, 0, 28, 0, 28, 28, 0, 28, 28, 28, + 28, 0, 0, 28, 33, 28, 0, 0, 0, 28, + 0, 0, 33, 33, 0, 28, 0, 0, 0, 0, + 0, 28, 0, 0, 28, 0, 28, 0, 28, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 28, 0, + 28, 28, 28, 28, 0, 0, 0, 28, 28, 0, + 0, 0, 28, 0, 0, 28, 28, 0, 0, 0, + 48, 0, 0, 0, 28, 0, 0, 28, 0, 28, + 0, 48, 0, 0, 0, 0, 48, 0, 0, 0, + 48, 0, 0, 48, 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 48, 48, 0, 28, 28, + 48, 48, 0, 48, 0, 0, 48, 0, 48, 48, + 48, 48, 0, 0, 48, 0, 48, 0, 0, 48, + 48, 0, 48, 48, 0, 0, 48, 0, 0, 0, + 0, 0, 48, 0, 0, 48, 0, 48, 48, 48, + 0, 48, 0, 48, 48, 0, 48, 0, 0, 48, + 0, 48, 48, 48, 48, 0, 0, 0, 48, 48, + 0, 0, 0, 48, 0, 48, 37, 0, 0, 48, + 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, + 48, 48, 48, 0, 48, 0, 0, 48, 0, 0, + 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, + 0, 48, 48, 0, 48, 0, 48, 0, 0, 38, + 0, 0, 0, 0, 0, 0, 0, 48, 48, 0, + 0, 48, 48, 48, 0, 0, 0, 48, 0, 48, + 48, 48, 48, 0, 0, 0, 0, 48, 0, 0, + 48, 48, 48, 0, 48, 0, 0, 0, 48, 48, + 0, 0, 208, 48, 0, 0, 48, 0, 48, 0, + 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, + 48, 0, 0, 0, 0, 0, 48, 0, 0, 48, + 0, 48, 0, 48, 48, 0, 48, 210, 48, 48, + 48, 48, 0, 48, 0, 0, 48, 0, 0, 0, + 48, 0, 0, 0, 0, 0, 48, 0, 0, 0, + 0, 48, 48, 0, 0, 48, 48, 48, 48, 48, + 48, 48, 0, 0, 0, 0, 48, 0, 0, 48, + 48, 48, 0, 0, 0, 0, 0, 0, 48, 0, + 0, 0, 48, 0, 0, 48, 311, 48, 0, 0, + 0, 0, 48, 0, 0, 0, 0, 0, 0, 439, + 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, + 48, 0, 48, 48, 0, 48, 0, 48, 48, 48, + 48, 0, 440, 48, 0, 48, 0, 0, 0, 48, + 0, 0, 0, 0, 439, 441, 0, 0, 0, 442, + 443, 48, 0, 0, 48, 444, 48, 445, 446, 447, + 448, 0, 0, 0, 0, 449, 0, 440, 0, 450, + 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, + 441, 451, 0, 0, 452, 443, 453, 0, 0, 0, + 444, 0, 445, 446, 447, 448, 0, 0, 0, 0, + 449, 0, 0, 0, 450, 0, 0, 454, 0, 0, + 0, 0, 0, 0, 0, 0, 451, 0, 0, 452, + 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 404, + 0, 0, 454, }; - protected static readonly short [] yyCheck = { 15, - 254, 94, 15, 15, 18, 449, 26, 15, 451, 255, - 4, 16, 246, 191, 406, 178, 206, 177, 488, 18, - 286, 74, 425, 36, 304, 283, 251, 146, 498, 816, - 37, 37, 253, 987, 273, 630, 631, 655, 1029, 1030, - 508, 57, 0, 1115, 37, 268, 256, 100, 64, 15, - 103, 193, 15, 66, 256, 64, 256, 70, 279, 1131, - 610, 15, 100, 77, 78, 103, 15, 83, 268, 256, - 294, 37, 256, 268, 256, 256, 42, 15, 673, 15, - 675, 15, 96, 597, 256, 256, 1077, 256, 256, 325, - 294, 367, 85, 86, 87, 88, 89, 90, 91, 92, - 282, 256, 277, 264, 256, 256, 281, 256, 15, 256, - 268, 367, 77, 78, 371, 256, 367, 256, 276, 0, - 1144, 214, 349, 350, 272, 15, 316, 371, 357, 15, - 146, 96, 314, 146, 146, 400, 367, 358, 146, 368, - 373, 417, 370, 372, 367, 417, 978, 412, 296, 257, - 1174, 15, 339, 15, 426, 339, 385, 344, 178, 346, - 344, 417, 346, 256, 325, 352, 353, 342, 352, 353, - 427, 191, 294, 417, 256, 323, 427, 256, 380, 294, - 146, 417, 415, 146, 306, 465, 390, 445, 417, 632, - 206, 419, 146, 417, 448, 211, 427, 146, 421, 380, - 427, 379, 752, 374, 754, 219, 358, 417, 146, 413, - 146, 366, 146, 368, 307, 370, 371, 256, 373, 272, - 375, 421, 488, 276, 373, 739, 421, 280, 508, 368, - 246, 245, 498, 249, 250, 417, 243, 243, 380, 146, - 427, 255, 280, 427, 251, 417, 262, 261, 417, 417, - 243, 267, 1324, 269, 219, 268, 146, 273, 251, 417, - 146, 256, 417, 269, 419, 294, 417, 422, 284, 285, - 417, 423, 424, 425, 286, 390, 417, 243, 286, 1351, - 245, 297, 146, 878, 146, 753, 368, 301, 297, 368, - 304, 1363, 385, 1365, 294, 417, 261, 915, 413, 257, - 316, 317, 335, 269, 371, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 596, 410, 411, 256, - 286, 335, 336, 367, 256, 371, 256, 320, 256, 795, - 369, 845, 367, 847, 373, 849, 301, 353, 871, 332, - 333, 334, 435, 786, 337, 338, 341, 368, 256, 363, - 364, 372, 367, 256, 774, 372, 1076, 266, 375, 379, - 427, 390, 765, 256, 1318, 785, 899, 381, 341, 269, - 335, 336, 386, 368, 1094, 1099, 257, 349, 350, 618, - 358, 427, 381, 427, 413, 262, 286, 386, 1353, 1354, - 390, 272, 427, 1384, 427, 368, 277, 1184, 363, 364, - 281, 422, 305, 998, 1236, 314, 256, 420, 256, 634, - 1401, 944, 427, 413, 604, 296, 256, 697, 1142, 425, - 1144, 298, 515, 367, 517, 1145, 371, 870, 373, 366, - 896, 447, 898, 449, 343, 451, 368, 367, 375, 367, - 1035, 1036, 323, 373, 1409, 373, 339, 1042, 461, 462, - 1174, 465, 1099, 1285, 1286, 427, 1288, 473, 366, 425, - 368, 342, 370, 256, 480, 374, 465, 1299, 369, 370, - 1302, 1303, 373, 753, 335, 1195, 488, 349, 350, 1199, - 488, 390, 427, 427, 497, 1317, 498, 371, 581, 339, - 498, 339, 375, 417, 508, 1142, 750, 1144, 380, 339, - 377, 378, 426, 366, 413, 521, 522, 366, 390, 368, - 343, 419, 375, 263, 422, 390, 366, 426, 366, 375, - 513, 779, 488, 713, 643, 764, 366, 1174, 1098, 1099, - 370, 413, 498, 373, 374, 375, 343, 371, 413, 373, - 380, 374, 945, 427, 427, 638, 339, 380, 1118, 256, - 366, 344, 568, 346, 370, 427, 40, 390, 574, 352, - 353, 45, 783, 47, 48, 315, 50, 374, 52, 1039, - 816, 427, 1142, 371, 1144, 373, 60, 368, 62, 263, - 413, 272, 596, 390, 257, 265, 70, 267, 604, 73, - 270, 75, 272, 426, 1099, 275, 80, 81, 305, 279, - 366, 1099, 618, 419, 1174, 296, 413, 368, 288, 375, - 1099, 627, 343, 666, 417, 295, 632, 413, 102, 426, - 300, 637, 302, 343, 304, 366, 417, 634, 1099, 427, - 426, 315, 323, 887, 375, 368, 316, 1142, 318, 1144, - 368, 634, 322, 323, 1142, 659, 1144, 837, 661, 380, - 330, 331, 380, 1142, 334, 1144, 417, 337, 380, 390, - 375, 677, 272, 679, 630, 631, 680, 339, 390, 1174, - 390, 1142, 344, 1144, 346, 691, 1174, 349, 350, 693, - 352, 353, 413, 697, 370, 1174, 296, 390, 373, 339, - 357, 413, 708, 413, 659, 426, 357, 713, 714, 15, - 716, 373, 795, 1174, 426, 372, 426, 673, 366, 675, - 413, 727, 728, 323, 1099, 680, 366, 951, 385, 19, - 734, 37, 375, 426, 385, 375, 42, 27, 693, 213, - 415, 215, 748, 987, 750, 734, 1002, 417, 357, 753, - 367, 366, 756, 370, 390, 372, 373, 256, 764, 256, - 375, 767, 375, 372, 914, 427, 990, 1142, 774, 1144, - 269, 77, 78, 1099, 391, 392, 385, 413, 784, 253, - 786, 306, 357, 1039, 420, 413, 372, 286, 313, 375, - 96, 265, 420, 339, 411, 413, 976, 372, 344, 1174, - 346, 756, 419, 349, 350, 422, 352, 353, 426, 1033, - 385, 294, 816, 896, 385, 1071, 1142, 823, 1144, 825, - 320, 827, 306, 306, 308, 306, 366, 373, 370, 313, - 834, 837, 313, 916, 1216, 375, 417, 337, 338, 843, - 146, 325, 339, 378, 325, 834, 383, 344, 1174, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 366, 371, 367, 373, 870, 1018, 388, 369, 373, 375, - 367, 373, 369, 1306, 371, 380, 373, 374, 375, 399, - 1048, 427, 1106, 1153, 417, 371, 339, 373, 843, 375, - 1160, 344, 389, 346, 381, 382, 349, 350, 901, 352, - 353, 366, 908, 400, 910, 357, 912, 384, 395, 396, - 375, 1203, 368, 219, 924, 412, 368, 1209, 339, 371, - 372, 389, 878, 344, 1216, 346, 393, 394, 349, 350, - 427, 352, 353, 385, 373, 1368, 375, 243, 922, 245, - 371, 380, 373, 372, 375, 951, 339, 421, 1184, 255, - 369, 344, 371, 346, 373, 261, 417, 963, 964, 352, - 353, 375, 339, 269, 369, 971, 371, 344, 373, 346, - 976, 1404, 349, 350, 427, 352, 353, 397, 398, 366, - 286, 987, 977, 370, 990, 372, 373, 461, 375, 354, - 355, 1425, 1426, 380, 272, 301, 357, 0, 304, 277, - 1002, 369, 1008, 281, 1002, 373, 427, 368, 1018, 1015, - 371, 372, 373, 370, 1024, 372, 1026, 369, 296, 413, - 414, 373, 369, 1027, 385, 256, 373, 1033, 369, 335, - 336, 417, 373, 368, 391, 392, 371, 1039, 1048, 1045, - 1046, 1039, 998, 369, 417, 323, 1002, 373, 369, 370, - 427, 372, 373, 374, 411, 371, 417, 363, 364, 375, - 340, 373, 419, 375, 342, 422, 385, 386, 387, 1071, - 1080, 354, 355, 1071, 1318, 375, 373, 1081, 375, 1035, - 1036, 375, 1088, 1039, 366, 369, 1042, 371, 1098, 1099, - 366, 363, 364, 1097, 370, 372, 372, 373, 1104, 375, - 1106, 369, 375, 371, 380, 369, 375, 371, 1118, 417, - 371, 367, 373, 417, 370, 1071, 372, 373, 375, 425, - 0, 341, 342, 343, 344, 371, 369, 373, 371, 369, - 1213, 371, 1142, 371, 1144, 391, 392, 373, 414, 375, - 349, 350, 1097, 1226, 373, 373, 375, 375, 1152, 1153, - 373, 413, 375, 1156, 417, 411, 1160, 371, 372, 465, - 1243, 366, 1245, 419, 1174, 370, 422, 372, 373, 417, - 375, 363, 364, 985, 986, 380, 417, 1181, 1182, 375, - 1184, 371, 488, 339, 340, 417, 1190, 345, 346, 371, - 417, 371, 498, 371, 367, 371, 373, 1152, 417, 1203, - 371, 1205, 508, 371, 1208, 1209, 294, 371, 371, 414, - 294, 373, 1216, 417, 371, 380, 371, 256, 1221, 371, - 373, 375, 370, 373, 417, 374, 1181, 1182, 85, 86, - 87, 88, 89, 90, 91, 92, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 380, 417, 356, 374, - 1205, 373, 372, 1208, 257, 371, 417, 380, 261, 373, - 373, 373, 294, 373, 375, 371, 417, 427, 373, 272, - 366, 417, 371, 417, 277, 422, 343, 372, 281, 373, - 294, 284, 294, 373, 417, 370, 1296, 369, 417, 366, - 596, 0, 256, 296, 297, 374, 256, 373, 301, 302, - 1306, 1304, 256, 1313, 307, 256, 309, 310, 311, 312, - 371, 380, 1318, 371, 317, 280, 1326, 1327, 321, 256, - 323, 366, 371, 367, 630, 631, 417, 375, 417, 1335, - 333, 417, 335, 336, 417, 338, 370, 417, 375, 342, - 414, 371, 373, 1353, 1354, 373, 375, 369, 375, 420, - 371, 347, 422, 659, 380, 366, 359, 351, 256, 256, - 380, 380, 1368, 371, 367, 368, 367, 673, 347, 675, - 369, 371, 374, 348, 680, 373, 369, 257, 366, 371, - 369, 261, 417, 374, 371, 367, 339, 693, 373, 373, - 348, 697, 272, 417, 417, 375, 367, 277, 1404, 1409, - 374, 281, 380, 366, 284, 366, 356, 1410, 1411, 366, - 417, 367, 367, 375, 1417, 1418, 296, 297, 370, 1425, - 1426, 301, 302, 367, 373, 256, 283, 307, 371, 309, - 310, 311, 312, 367, 337, 305, 417, 317, 370, 370, - 417, 321, 368, 323, 417, 417, 366, 753, 417, 370, - 756, 375, 370, 333, 370, 370, 336, 380, 338, 372, - 370, 366, 342, 320, 370, 373, 380, 368, 372, 371, - 256, 371, 417, 372, 366, 332, 333, 334, 373, 359, - 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, - 347, 348, 349, 350, 351, 352, 373, 373, 371, 371, - 375, 369, 371, 315, 375, 417, 0, 367, 339, 375, - 816, 375, 371, 344, 369, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 417, 417, 371, 380, - 371, 380, 367, 263, 370, 367, 367, 843, 369, 0, - 371, 370, 373, 374, 375, 371, 371, 256, 257, 366, - 417, 375, 375, 367, 375, 264, 265, 266, 267, 268, - 371, 270, 271, 367, 273, 274, 275, 276, 277, 278, - 279, 280, 878, 371, 371, 369, 285, 366, 287, 288, - 289, 290, 291, 292, 375, 367, 295, 367, 445, 366, - 299, 300, 371, 302, 303, 304, 427, 375, 369, 417, - 375, 417, 375, 367, 371, 314, 375, 316, 371, 318, - 319, 367, 371, 322, 367, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 417, 337, 371, - 366, 340, 341, 367, 367, 344, 345, 375, 366, 0, - 372, 315, 263, 25, 375, 26, 285, 10, 375, 375, - 375, 360, 361, 362, 375, 375, 513, 366, 367, 375, - 375, 370, 5, 976, 1118, 834, 375, 376, 377, 378, - 379, 734, 1358, 976, 383, 1321, 385, 596, 1174, 1374, - 1309, 1304, 391, 392, 1338, 758, 1190, 1203, 327, 1418, - 758, 1142, 998, 758, 1130, 752, 1002, 1412, 1331, 1080, - 1327, 1326, 1411, 465, 1245, 1190, 1024, 416, 417, 418, - 419, 1081, 421, 779, 522, 637, 713, 316, 427, 604, - 887, 1027, 708, 54, 347, 634, 348, 351, 1064, 1035, - 1036, 349, 352, 1039, 350, 901, 1042, 376, 377, 378, - 379, 1152, 381, 382, 383, 384, 385, 386, 387, 388, - 697, 1071, 391, 392, 393, 394, 395, 396, 397, 398, - 1002, 146, 964, 257, 856, 1071, 821, 261, 872, 263, - 954, 265, 463, 267, 799, 1081, 270, 956, 272, 273, - 371, 275, 1148, 277, -1, 279, 945, 281, 282, 283, - 284, 1097, 1046, 287, 288, -1, -1, -1, -1, 293, - 294, 295, 296, 297, -1, -1, 300, 301, 302, -1, - 304, 0, 306, 307, 308, 309, 310, 311, 312, 313, - -1, 315, 316, 317, 318, -1, -1, 321, 322, 323, - -1, 325, -1, -1, -1, -1, 330, 331, -1, 333, - 334, -1, 336, 337, 338, -1, 1152, 1153, 342, -1, - -1, -1, -1, -1, 1160, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 359, -1, -1, -1, 363, - 364, -1, -1, -1, -1, 1181, 1182, -1, 1184, 0, - -1, -1, 376, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 256, 257, -1, -1, 1205, - -1, -1, 1208, 264, 265, 266, 267, 268, -1, 270, - 271, -1, 273, 274, 275, 276, 277, 278, 279, -1, - -1, -1, 779, 417, 285, -1, 287, 288, 289, 290, - 291, 292, -1, -1, 295, -1, -1, -1, 299, 300, - -1, 302, 303, 304, -1, -1, -1, -1, 0, -1, - -1, -1, -1, 314, -1, 316, -1, 318, 319, -1, - -1, 322, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, 335, -1, 337, -1, -1, 340, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, 0, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, 366, 367, -1, -1, 370, - -1, -1, -1, -1, 375, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 416, 417, 418, 419, -1, - 421, -1, -1, -1, 0, -1, 427, 256, 257, -1, - -1, -1, 261, -1, -1, -1, 265, -1, 267, -1, - -1, 270, -1, 272, 273, -1, 275, -1, 277, -1, - 279, -1, 281, 282, 283, 284, -1, -1, 287, 288, - -1, -1, -1, -1, 293, -1, 295, 296, 297, -1, - -1, 300, 301, 302, -1, 304, -1, -1, 307, -1, - 309, 310, 311, 312, -1, -1, -1, 316, 317, 318, - -1, -1, 321, 322, 323, -1, 257, 0, -1, -1, - 261, 330, 331, -1, 333, 334, -1, 336, 337, 338, - -1, 272, -1, 342, -1, -1, 277, -1, -1, -1, - 281, -1, -1, 284, -1, -1, -1, -1, -1, -1, - 359, -1, -1, -1, -1, 296, 297, -1, 367, 368, - 301, 302, -1, -1, -1, -1, 307, 376, 309, 310, - 311, 312, -1, -1, -1, -1, 317, -1, -1, -1, - 321, -1, 323, -1, 0, 257, -1, -1, -1, 261, - -1, -1, 333, -1, 335, 336, -1, 338, -1, -1, - 272, 342, -1, -1, -1, 277, -1, -1, 417, 281, - -1, -1, 284, -1, -1, -1, -1, -1, 359, -1, - -1, -1, -1, -1, 296, 297, -1, 368, 257, 301, - 302, -1, 261, -1, -1, 307, -1, 309, 310, 311, - 312, -1, -1, 272, -1, 317, -1, -1, 277, 321, - -1, 323, 281, 0, -1, 284, -1, -1, -1, -1, - -1, 333, -1, -1, 336, -1, 338, 296, 297, -1, - 342, -1, 301, 302, -1, -1, -1, -1, 307, -1, - 309, 310, 311, 312, -1, -1, -1, 359, 317, -1, - -1, -1, 321, -1, 323, 367, 368, -1, -1, -1, - -1, 257, -1, -1, 333, 261, -1, 336, -1, 338, - -1, -1, -1, 342, -1, -1, 272, -1, -1, -1, - 0, 277, -1, -1, -1, 281, -1, -1, 284, -1, - 359, -1, -1, -1, -1, -1, -1, -1, 367, 368, - 296, 297, -1, -1, -1, 301, 302, -1, -1, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - -1, 317, -1, -1, -1, 321, -1, 323, -1, -1, - -1, -1, -1, -1, 257, -1, -1, 333, 261, -1, - 336, -1, 338, -1, -1, -1, 342, -1, -1, 272, - -1, -1, -1, -1, 277, -1, -1, -1, 281, -1, - -1, 284, -1, 359, -1, -1, -1, -1, -1, -1, - -1, -1, 368, 296, 297, -1, -1, -1, 301, 302, - -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, - -1, -1, -1, -1, 317, -1, -1, -1, 321, -1, - 323, 257, -1, -1, -1, 261, -1, -1, -1, -1, - 333, -1, -1, 336, -1, 338, 272, -1, -1, 342, - -1, 277, -1, -1, -1, 281, -1, -1, 284, -1, - -1, -1, -1, -1, -1, -1, 359, -1, -1, -1, - 296, 297, -1, -1, -1, 301, 302, -1, -1, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - -1, 317, -1, -1, -1, 321, -1, 323, -1, -1, - 257, -1, -1, -1, 261, -1, -1, 333, -1, -1, - 336, -1, 338, -1, -1, 272, 342, -1, -1, -1, - 277, -1, -1, -1, 281, -1, -1, 284, -1, -1, - -1, -1, -1, 359, -1, -1, -1, -1, -1, 296, - 297, -1, -1, -1, 301, 302, -1, -1, -1, -1, + protected static readonly short [] yyCheck = { 17, + 295, 18, 17, 296, 17, 4, 6, 499, 105, 52, + 188, 232, 501, 287, 456, 17, 187, 247, 475, 538, + 17, 327, 324, 294, 20, 292, 85, 345, 60, 548, + 156, 60, 889, 1057, 1093, 1094, 345, 48, 719, 88, + 89, 78, 558, 0, 59, 314, 111, 60, 113, 320, + 256, 64, 111, 268, 113, 256, 74, 234, 107, 256, + 78, 1177, 268, 256, 268, 80, 256, 82, 256, 256, + 256, 17, 276, 268, 256, 256, 94, 1193, 294, 17, + 1139, 282, 256, 17, 17, 294, 256, 256, 1393, 1394, + 306, 868, 256, 335, 256, 256, 256, 946, 256, 17, + 17, 21, 17, 694, 695, 256, 256, 367, 256, 341, + 277, 263, 0, 314, 281, 96, 97, 98, 99, 100, + 101, 102, 103, 639, 367, 974, 372, 357, 399, 375, + 367, 17, 257, 53, 264, 17, 368, 266, 156, 17, + 17, 156, 339, 156, 1449, 188, 737, 344, 739, 346, + 199, 200, 367, 294, 156, 352, 353, 339, 255, 156, + 341, 294, 344, 315, 346, 306, 256, 6, 428, 1018, + 352, 353, 256, 358, 417, 342, 256, 339, 17, 369, + 366, 371, 368, 373, 370, 314, 428, 368, 339, 232, + 294, 428, 380, 495, 971, 325, 973, 515, 358, 420, + 297, 417, 256, 498, 366, 374, 421, 696, 417, 373, + 156, 260, 223, 417, 343, 421, 417, 0, 156, 380, + 368, 60, 156, 156, 417, 64, 421, 417, 228, 247, + 417, 428, 538, 419, 252, 20, 422, 286, 156, 156, + 558, 156, 548, 417, 421, 374, 428, 417, 1364, 88, + 89, 348, 284, 302, 313, 284, 321, 390, 317, 417, + 292, 390, 321, 423, 424, 425, 426, 417, 107, 287, + 156, 284, 290, 291, 156, 1391, 256, 367, 156, 156, + 413, 310, 366, 373, 413, 303, 390, 1403, 368, 1405, + 308, 375, 310, 342, 309, 413, 314, 310, 427, 294, + 257, 338, 420, 88, 89, 1138, 0, 325, 326, 413, + 991, 256, 828, 256, 327, 369, 256, 156, 371, 373, + 338, 639, 107, 1156, 847, 327, 335, 376, 377, 426, + 327, 640, 263, 262, 1358, 858, 1206, 325, 325, 357, + 358, 294, 660, 324, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 404, 405, 349, 350, 339, + 199, 200, 953, 460, 461, 1424, 1236, 400, 256, 298, + 859, 349, 350, 367, 1207, 428, 394, 420, 367, 412, + 361, 838, 1441, 367, 315, 371, 366, 430, 485, 1246, + 349, 350, 373, 374, 375, 390, 371, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 392, 393, 682, 199, 200, 427, 428, 413, 367, + 343, 260, 433, 368, 1257, 368, 422, 367, 1261, 417, + 417, 698, 368, 373, 428, 371, 428, 390, 668, 428, + 436, 257, 428, 761, 428, 284, 475, 286, 377, 378, + 428, 339, 761, 428, 366, 470, 945, 296, 370, 1052, + 413, 417, 475, 302, 371, 371, 373, 390, 565, 428, + 567, 310, 569, 375, 257, 260, 272, 1068, 366, 497, + 428, 499, 370, 501, 372, 373, 374, 375, 327, 272, + 413, 375, 380, 367, 277, 368, 511, 512, 281, 372, + 296, 286, 305, 342, 427, 523, 345, 419, 1099, 1100, + 828, 296, 530, 296, 495, 1106, 373, 302, 827, 515, + 372, 428, 428, 375, 357, 538, 428, 323, 269, 371, + 825, 373, 547, 60, 631, 548, 538, 376, 377, 370, + 323, 538, 305, 417, 428, 286, 548, 371, 778, 422, + 852, 548, 385, 571, 572, 256, 1161, 342, 415, 342, + 345, 368, 1019, 257, 375, 404, 405, 261, 837, 96, + 97, 98, 99, 100, 101, 102, 103, 256, 272, 343, + 375, 707, 563, 277, 1103, 856, 428, 281, 419, 256, + 284, 376, 377, 417, 1160, 1161, 889, 256, 368, 1204, + 618, 1206, 296, 297, 305, 702, 624, 301, 302, 272, + 374, 272, 380, 307, 1180, 309, 310, 311, 312, 404, + 405, 306, 390, 317, 417, 375, 390, 321, 313, 323, + 390, 1236, 370, 296, 427, 296, 475, 422, 1204, 333, + 1206, 357, 336, 366, 338, 413, 305, 417, 342, 413, + 668, 436, 368, 413, 385, 371, 372, 373, 373, 427, + 323, 661, 323, 427, 682, 359, 698, 962, 368, 385, + 1236, 730, 339, 691, 723, 370, 515, 344, 696, 346, + 417, 694, 695, 701, 914, 352, 353, 366, 417, 368, + 427, 370, 371, 383, 373, 744, 375, 343, 62, 538, + 415, 417, 66, 67, 68, 1298, 70, 71, 757, 548, + 725, 75, 76, 370, 357, 372, 378, 417, 82, 558, + 84, 399, 86, 741, 737, 743, 739, 91, 92, 372, + 515, 413, 1325, 1326, 380, 1328, 388, 755, 417, 384, + 419, 357, 385, 422, 390, 427, 1339, 389, 112, 1342, + 1343, 1025, 368, 1161, 368, 773, 372, 284, 339, 802, + 778, 779, 1057, 781, 1357, 292, 1072, 413, 369, 385, + 367, 868, 373, 558, 792, 793, 373, 339, 417, 390, + 829, 427, 344, 380, 346, 366, 1060, 349, 350, 413, + 352, 353, 1161, 343, 375, 256, 1204, 1103, 1206, 339, + 639, 417, 413, 427, 344, 823, 346, 825, 269, 349, + 350, 373, 352, 353, 810, 815, 427, 366, 989, 837, + 1050, 660, 840, 1097, 374, 286, 375, 1133, 1236, 847, + 380, 397, 398, 373, 361, 1204, 1278, 1206, 1161, 857, + 390, 859, 1161, 380, 361, 357, 373, 374, 375, 390, + 366, 378, 379, 390, 639, 694, 695, 1346, 1161, 375, + 372, 378, 379, 413, 369, 370, 428, 1236, 373, 372, + 919, 852, 413, 385, 971, 660, 413, 427, 896, 420, + 898, 1204, 900, 1206, 723, 1204, 375, 1206, 428, 417, + 254, 1112, 256, 366, 1168, 992, 914, 1215, 737, 368, + 739, 1204, 375, 1206, 1222, 744, 1161, 1161, 370, 357, + 1088, 380, 371, 1236, 373, 911, 375, 1236, 757, 1408, + 366, 921, 761, 923, 372, 925, 366, 945, 369, 375, + 294, 414, 373, 1236, 339, 375, 417, 385, 723, 344, + 953, 346, 306, 357, 349, 350, 256, 352, 353, 1204, + 1204, 1206, 1206, 1246, 368, 1444, 306, 371, 372, 744, + 370, 976, 372, 313, 370, 983, 372, 985, 366, 987, + 417, 385, 757, 1465, 1466, 325, 761, 375, 366, 272, + 368, 1236, 1236, 417, 277, 391, 392, 339, 281, 828, + 829, 371, 344, 373, 346, 375, 340, 349, 350, 998, + 352, 353, 306, 296, 308, 411, 369, 1025, 366, 313, + 373, 393, 394, 419, 381, 382, 422, 375, 1265, 1037, + 1038, 325, 369, 428, 1271, 810, 373, 1045, 395, 396, + 323, 1278, 1050, 373, 1051, 375, 563, 369, 375, 1057, + 380, 373, 1060, 828, 829, 1088, 375, 1090, 369, 342, + 889, 339, 373, 371, 366, 1068, 344, 375, 346, 1072, + 1078, 349, 350, 1358, 352, 353, 371, 1085, 373, 1112, + 1072, 382, 383, 384, 385, 1072, 428, 372, 367, 1097, + 919, 370, 417, 372, 373, 375, 1099, 1100, 354, 355, + 1103, 1109, 1110, 1106, 369, 371, 371, 373, 373, 1142, + 417, 1103, 391, 392, 889, 375, 1103, 471, 369, 370, + 1159, 372, 373, 374, 953, 354, 355, 1160, 1161, 369, + 1133, 371, 411, 373, 349, 350, 911, 385, 386, 387, + 419, 1133, 1150, 422, 919, 366, 1133, 1180, 375, 370, + 428, 372, 373, 373, 375, 375, 339, 511, 1166, 380, + 1168, 344, 367, 346, 373, 370, 375, 372, 373, 352, + 353, 1204, 369, 1206, 371, 1214, 366, 369, 371, 371, + 370, 698, 372, 373, 417, 375, 391, 392, 1275, 369, + 380, 371, 369, 414, 371, 371, 371, 373, 373, 413, + 0, 1288, 368, 1236, 1243, 1244, 411, 369, 369, 371, + 371, 413, 414, 1218, 419, 363, 364, 422, 1305, 417, + 1307, 256, 417, 373, 414, 375, 371, 372, 1267, 264, + 265, 1270, 267, 363, 364, 270, 271, 1055, 1056, 1068, + 275, 276, 277, 1072, 279, 366, 373, 417, 375, 370, + 285, 372, 373, 288, 375, 373, 373, 375, 375, 380, + 295, 371, 1091, 386, 387, 300, 371, 302, 303, 304, + 1099, 1100, 380, 381, 1103, 417, 375, 1106, 1283, 371, + 371, 316, 367, 318, 319, 373, 417, 322, 371, 371, + 325, 371, 327, 371, 329, 330, 331, 332, 371, 334, + 294, 294, 373, 1336, 1133, 371, 371, 375, 417, 373, + 370, 256, 371, 256, 1143, 373, 1091, 374, 380, 380, + 1353, 417, 417, 356, 371, 360, 361, 362, 373, 373, + 1159, 374, 372, 1366, 1367, 370, 417, 371, 1346, 1344, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 1358, 380, 373, 373, 373, 294, 373, 375, 428, 422, + 1393, 1394, 417, 371, 373, 366, 417, 1375, 1143, 0, + 372, 371, 343, 294, 373, 417, 294, 373, 417, 417, + 369, 416, 417, 370, 1159, 1214, 1215, 417, 366, 374, + 256, 256, 373, 1222, 339, 256, 256, 371, 380, 344, + 1408, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 371, 280, 1243, 1244, 1449, 1246, 256, 366, + 417, 367, 367, 371, 369, 417, 371, 417, 373, 374, + 375, 417, 369, 375, 370, 375, 1444, 417, 1267, 1214, + 1215, 1270, 373, 373, 389, 1450, 1451, 1222, 375, 375, + 369, 371, 1457, 1458, 399, 400, 256, 1465, 1466, 371, + 420, 261, 262, 380, 422, 347, 351, 412, 1243, 1244, + 366, 1246, 380, 380, 256, 256, 371, 1252, 367, 371, + 373, 369, 366, 428, 284, 347, 369, 374, 374, 348, + 1265, 371, 1267, 369, 294, 1270, 1271, 297, 298, 371, + 373, 417, 302, 1278, 367, 305, 417, 307, 339, 309, + 310, 311, 312, 348, 367, 373, 366, 317, 375, 374, + 366, 321, 366, 356, 367, 325, 380, 375, 370, 337, + 367, 367, 373, 333, 305, 0, 336, 371, 338, 339, + 417, 367, 417, 417, 344, 370, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, 370, 368, 359, + 366, 417, 380, 370, 375, 417, 366, 367, 417, 369, + 370, 371, 372, 373, 374, 375, 370, 377, 378, 370, + 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, + 370, 391, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, + 410, 411, 412, 372, 370, 415, 366, 417, 370, 419, + 380, 368, 422, 371, 373, 256, 257, 371, 428, 372, + 372, 256, 373, 264, 265, 266, 267, 268, 373, 270, + 271, 373, 273, 274, 275, 276, 277, 278, 279, 280, + 417, 375, 371, 371, 285, 369, 287, 288, 289, 290, + 291, 292, 417, 0, 295, 375, 417, 375, 299, 300, + 371, 302, 303, 304, 371, 375, 371, 417, 380, 366, + 371, 367, 380, 314, 369, 316, 367, 318, 319, 315, + 263, 322, 370, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 370, 337, 367, 371, 340, + 341, 0, 371, 344, 345, 0, 366, 375, 417, 375, + 367, 0, 371, 375, 367, 371, 371, 417, 369, 360, + 361, 362, 366, 375, 367, 366, 367, 367, 375, 370, + 417, 369, 371, 366, 375, 376, 377, 378, 379, 417, + 367, 375, 383, 375, 385, 371, 375, 371, 367, 371, + 391, 392, 367, 371, 366, 375, 367, 367, 366, 372, + 315, 375, 263, 51, 12, 52, 375, 5, 375, 375, + 375, 375, 375, 375, 810, 416, 417, 418, 419, 911, + 421, 256, 257, 1050, 1180, 1050, 1236, 428, 1398, 264, + 265, 266, 267, 268, 1361, 270, 271, 1414, 273, 274, + 275, 276, 277, 278, 279, 0, 1349, 1378, 1344, 1252, + 285, 660, 287, 288, 289, 290, 291, 292, 831, 674, + 295, 1265, 1458, 831, 299, 300, 831, 302, 303, 304, + 1204, 1284, 1192, 827, 1452, 1367, 1371, 1366, 1451, 314, + 1142, 316, 1307, 318, 319, 1252, 1143, 322, 802, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 515, 337, 852, 701, 340, 341, 778, 572, 344, + 345, 357, 773, 668, 72, 962, 698, 388, 390, 389, + 393, 761, 391, 1214, 392, 360, 361, 362, 1126, 1133, + 976, 366, 367, 1072, 156, 370, 947, 932, 1028, 1038, + 375, 376, 377, 378, 379, 1030, 1019, 894, 383, 256, + 385, 872, 513, 412, 261, 262, 391, 392, 1210, 1110, + 808, -1, -1, -1, -1, -1, 807, -1, -1, -1, + -1, -1, -1, -1, 0, -1, -1, 284, -1, -1, + -1, 416, 417, 418, 419, -1, 421, 294, -1, -1, + 297, 298, -1, 428, -1, 302, -1, -1, 305, -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, - 317, -1, -1, -1, 321, -1, 323, 257, -1, -1, - -1, 261, -1, -1, -1, -1, 333, -1, -1, 336, - -1, 338, 272, -1, -1, 342, -1, 277, -1, -1, - -1, 281, -1, -1, 284, -1, -1, -1, -1, -1, - -1, -1, 359, -1, -1, -1, 296, 297, -1, 256, - -1, 301, 302, -1, 261, 262, -1, 307, -1, 309, - 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, - -1, 321, -1, 323, -1, -1, -1, 284, -1, -1, - -1, -1, -1, 333, -1, -1, 336, 294, 338, -1, - 297, 298, 342, -1, -1, 302, -1, -1, 305, -1, - 307, -1, 309, 310, 311, 312, -1, -1, -1, 359, 317, -1, -1, -1, 321, -1, -1, -1, 325, -1, -1, -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, 338, 339, -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, 359, -1, -1, -1, -1, -1, -1, 366, - 367, -1, 369, 370, 371, 372, 373, 374, 375, -1, - 377, 378, -1, 380, 381, 382, 383, 384, 385, 386, - 387, 388, 389, -1, 391, 392, 393, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, 412, -1, -1, 415, -1, - 417, -1, 419, 256, -1, 422, -1, -1, -1, -1, - 427, 264, 265, 266, 267, -1, -1, 270, 271, -1, - 273, 274, 275, 276, 277, 278, 279, -1, -1, -1, - -1, -1, 285, -1, 287, 288, 289, 290, 291, 292, - -1, -1, 295, -1, -1, -1, 299, 300, -1, 302, - 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 314, -1, 316, -1, 318, 319, -1, -1, 322, - -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 335, -1, 337, -1, -1, 340, 341, -1, - -1, 344, 345, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 256, 360, 361, 362, - -1, 261, 262, 366, -1, -1, -1, 370, -1, -1, - -1, -1, 375, 376, 377, 378, 379, -1, -1, -1, - 383, -1, 385, -1, 284, -1, -1, -1, 391, 392, - -1, -1, -1, -1, 294, -1, -1, 297, 298, -1, - -1, -1, 302, -1, -1, 305, -1, 307, -1, 309, - 310, 311, 312, 416, 417, 418, 419, 317, -1, -1, - -1, 321, -1, -1, 427, 325, -1, -1, -1, -1, - -1, -1, -1, 333, -1, -1, 336, -1, 338, 339, - -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, -1, 359, - -1, -1, -1, -1, -1, -1, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, -1, 377, 378, -1, - -1, 381, 382, 383, 384, 385, -1, -1, 388, 389, - -1, -1, -1, 393, 394, 395, 396, 397, 398, 399, - 400, 256, -1, -1, -1, -1, 261, 262, -1, -1, - -1, -1, 412, -1, -1, 415, -1, 417, -1, 419, - -1, -1, 422, -1, -1, -1, -1, 427, -1, 284, + 357, -1, 359, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, 370, 371, 372, 373, 374, 375, -1, + 377, 378, -1, -1, 381, 382, 383, 384, 385, -1, + -1, 388, 389, -1, -1, -1, 393, 394, 395, 396, + 397, 398, 399, 400, -1, -1, -1, -1, -1, -1, + -1, 256, -1, 0, -1, 412, 261, 262, 415, -1, + 417, -1, 419, -1, -1, 422, -1, -1, -1, -1, + -1, 428, -1, -1, -1, -1, -1, -1, -1, 284, -1, -1, -1, -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, 298, -1, -1, -1, 302, -1, -1, 305, -1, 307, -1, 309, 310, 311, 312, -1, -1, @@ -10596,457 +10761,570 @@ void case_918() 355, 356, -1, -1, 359, -1, -1, -1, -1, -1, -1, 366, 367, 368, 369, 370, 371, -1, 373, 374, 375, -1, 377, 378, -1, -1, 381, 382, 383, 384, - -1, -1, -1, 388, 389, -1, -1, -1, 393, 394, - 395, 396, 397, 398, 399, 400, 256, -1, -1, -1, - -1, 261, 262, -1, -1, -1, -1, 412, -1, -1, - 415, -1, 417, -1, 419, -1, -1, 422, -1, -1, - -1, -1, 427, -1, 284, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 294, -1, -1, 297, 298, -1, - -1, -1, 302, -1, -1, 305, -1, 307, -1, 309, - 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, - -1, 321, -1, -1, -1, 325, -1, -1, -1, -1, - -1, -1, -1, 333, -1, -1, 336, -1, 338, 339, - -1, -1, 256, -1, 344, -1, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, -1, -1, 359, - -1, -1, -1, -1, -1, -1, 366, 367, 368, 369, - 370, 371, -1, 373, 374, 375, -1, 377, 378, 256, - -1, 381, 382, 383, 384, 262, -1, -1, 388, 389, - -1, -1, -1, 393, 394, 395, 396, 397, 398, 399, - 400, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 412, -1, -1, 415, -1, 417, -1, 419, - -1, 298, 422, -1, -1, 339, -1, 427, -1, -1, - 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, - 374, 375, 339, -1, -1, -1, -1, 344, -1, 346, + 256, -1, 0, 388, 389, 261, 262, -1, 393, 394, + 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 412, 284, -1, + 415, -1, 417, -1, 419, -1, -1, 422, 294, -1, + -1, 297, 298, 428, -1, -1, 302, -1, -1, 305, + -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, + -1, 317, -1, -1, -1, 321, -1, -1, -1, 325, + -1, -1, -1, -1, -1, -1, -1, 333, -1, -1, + 336, -1, 338, 339, -1, -1, -1, -1, 344, -1, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, -1, -1, 359, -1, -1, -1, -1, -1, -1, + 366, 367, 368, 369, 370, 371, -1, 373, 374, 375, + -1, 377, 378, -1, -1, 381, 382, 383, 384, 256, + -1, -1, 388, 389, 261, 262, -1, 393, 394, 395, + 396, 397, 398, 399, 400, -1, -1, 0, -1, -1, + -1, -1, -1, -1, -1, -1, 412, 284, -1, 415, + -1, 417, -1, 419, -1, -1, 422, 294, -1, -1, + 297, 298, 428, -1, -1, 302, -1, -1, 305, -1, + 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, + 317, -1, -1, -1, 321, -1, -1, -1, 325, -1, + -1, -1, -1, -1, -1, -1, 333, -1, -1, 336, + -1, 338, 339, -1, -1, -1, -1, 344, 285, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 357, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 367, 368, 369, 370, 371, 372, 373, 374, 375, -1, - 377, 378, -1, 380, 381, 382, 383, 384, 385, 386, - 387, 388, 389, 427, 391, 392, 393, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, 412, -1, -1, 256, -1, - 417, -1, 419, 261, 262, 422, -1, -1, -1, -1, - 427, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 284, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, - 298, -1, -1, -1, 302, -1, -1, 305, -1, 307, - -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, - -1, -1, -1, 321, -1, -1, -1, 325, -1, -1, - -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, - 338, 339, -1, -1, -1, -1, 344, -1, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, 359, -1, -1, 256, -1, -1, -1, 366, 367, - 262, 369, 370, 371, -1, 373, 374, 375, -1, 377, - 378, -1, -1, 381, 382, 383, 384, -1, -1, -1, + -1, -1, 359, -1, -1, -1, -1, -1, -1, 366, + 367, -1, 369, 370, 371, -1, 373, 374, 375, -1, + 377, 378, -1, -1, 381, 382, 383, 384, 256, -1, + 327, 388, 389, -1, 262, -1, 393, 394, 395, 396, + 397, 398, 399, 400, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 412, -1, -1, 415, -1, + 417, -1, -1, -1, -1, -1, 294, -1, -1, -1, + 298, 428, -1, -1, 0, -1, -1, -1, -1, 376, + 377, 378, 379, -1, 381, 382, 383, 384, 385, 386, + 387, 388, -1, -1, 391, 392, 393, 394, 395, 396, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 339, -1, -1, -1, -1, 344, -1, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 256, -1, -1, -1, -1, -1, -1, -1, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, -1, 377, + 378, -1, -1, 381, 382, 383, 384, 385, -1, -1, 388, 389, -1, -1, -1, 393, 394, 395, 396, 397, - 398, 399, 400, -1, -1, -1, 298, -1, -1, -1, - -1, -1, -1, -1, 412, -1, -1, 415, -1, 417, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, - 256, -1, -1, -1, -1, -1, 262, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 339, -1, -1, - -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, -1, - -1, -1, 298, -1, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, -1, 377, 378, -1, 380, 381, - 382, 383, 384, 385, 386, 387, 388, 389, -1, 391, - 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 412, -1, 256, -1, -1, -1, -1, 419, 262, -1, - -1, -1, -1, -1, -1, 427, -1, -1, -1, -1, - -1, 367, -1, -1, 370, -1, 372, 373, -1, -1, - -1, 377, 378, -1, -1, 381, 382, 383, 384, 385, - 386, 387, 388, 389, 298, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 411, 412, -1, -1, -1, - -1, -1, -1, 419, 262, -1, 422, -1, -1, -1, - -1, 427, -1, -1, -1, 339, -1, -1, -1, -1, - 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, -1, -1, -1, - 298, -1, 366, 367, -1, 369, 370, 371, 372, 373, - 374, 375, -1, 377, 378, -1, 380, 381, 382, 383, - 384, 385, 386, 387, 388, 389, -1, 391, 392, 393, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 408, 409, 410, 411, 412, -1, - 256, -1, -1, -1, -1, 419, 262, -1, 422, 357, - -1, -1, -1, 427, -1, -1, -1, -1, -1, -1, - 368, -1, 370, -1, 372, -1, -1, 375, -1, 377, - 378, -1, 380, 381, 382, 383, 384, 385, 386, 387, - 388, 389, 298, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, -1, -1, -1, -1, 417, - -1, 419, 262, -1, 422, -1, -1, -1, -1, 427, - -1, -1, -1, 339, -1, -1, -1, -1, 344, -1, + 398, 399, 400, 256, -1, -1, -1, -1, -1, 262, + -1, -1, -1, -1, 412, -1, 0, 415, -1, 417, + -1, 419, -1, -1, 422, -1, -1, -1, -1, -1, + 428, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 294, -1, 339, -1, 298, -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, -1, -1, -1, -1, 298, -1, - -1, 367, -1, 369, 370, 371, 372, 373, 374, 375, - -1, 377, 378, -1, 380, 381, 382, 383, 384, 385, - 386, 387, 388, 389, -1, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 411, 412, -1, 256, -1, - -1, -1, -1, 419, 262, -1, 422, -1, -1, -1, - -1, 427, -1, -1, -1, -1, -1, -1, 368, -1, - 370, 371, 372, 373, -1, 375, -1, 377, 378, -1, - 380, 381, 382, 383, 384, -1, 386, 387, 388, 389, - 298, 391, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 412, -1, -1, -1, -1, 417, -1, 419, - 262, -1, 422, -1, -1, -1, -1, 427, -1, -1, - -1, 339, -1, -1, -1, -1, 344, -1, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, -1, -1, -1, -1, 298, -1, -1, 367, - -1, 369, 370, 371, 372, 373, 374, 375, -1, 377, - 378, -1, 380, 381, 382, 383, 384, 385, 386, 387, - 388, 389, -1, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, -1, 256, -1, -1, -1, - -1, 419, 262, -1, 422, -1, -1, -1, -1, 427, - -1, -1, -1, -1, -1, -1, -1, 369, 370, 371, - 372, 373, -1, -1, -1, 377, 378, -1, 380, 381, - 382, 383, 384, 385, 386, 387, 388, 389, 298, 391, - 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 412, -1, -1, -1, -1, -1, -1, 419, -1, -1, - 422, -1, -1, -1, -1, 427, -1, -1, -1, 339, - -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 367, -1, 369, - 370, 371, 372, 373, 374, 375, -1, 377, -1, -1, - 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, - -1, 391, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 412, -1, 256, 256, -1, -1, -1, 419, - 262, -1, 422, -1, 265, -1, 267, 427, -1, 270, - -1, -1, -1, -1, 275, -1, -1, -1, 279, -1, - -1, -1, -1, -1, -1, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, 298, -1, -1, 300, - -1, -1, -1, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, -1, -1, - -1, 322, -1, -1, -1, -1, -1, -1, -1, 330, - 331, -1, -1, 334, -1, -1, 337, 339, -1, -1, - -1, 256, 344, -1, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, - -1, 373, 374, 375, -1, 377, 378, -1, 380, 381, - 382, 383, 384, 385, 386, 387, 388, 389, -1, -1, - -1, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 256, - 412, -1, -1, -1, -1, 262, 417, -1, -1, -1, - -1, -1, -1, -1, 339, 427, -1, -1, -1, 344, - -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, -1, -1, 294, -1, -1, - -1, 298, 367, -1, 369, -1, 371, -1, 373, 374, - 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 389, -1, -1, -1, -1, -1, + 356, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, + -1, -1, -1, -1, 0, -1, 339, -1, -1, -1, + -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 366, 367, -1, 369, 370, 371, -1, + 373, 374, 375, -1, 377, 378, -1, -1, 381, 382, + 383, 384, 428, -1, -1, 388, 389, -1, -1, -1, + 393, 394, 395, 396, 397, 398, 399, 400, -1, -1, + -1, -1, -1, 0, -1, -1, -1, -1, -1, 412, + -1, 257, 415, -1, 417, 261, -1, 263, -1, 265, + -1, 267, -1, -1, 270, 428, 272, 273, -1, 275, + -1, 277, -1, 279, -1, 281, 282, 283, 284, -1, + -1, 287, 288, -1, -1, -1, 0, 293, 294, 295, + 296, 297, -1, -1, 300, 301, 302, -1, 304, -1, + 306, 307, 308, 309, 310, 311, 312, 313, -1, 315, + 316, 317, 318, -1, -1, 321, 322, 323, -1, 325, + -1, -1, -1, -1, 330, 331, -1, 333, 334, 0, + 336, 337, 338, -1, -1, -1, 342, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 359, -1, -1, -1, 363, 364, -1, + -1, -1, 256, 257, -1, -1, -1, 261, -1, -1, + 376, 265, -1, 267, -1, -1, 270, -1, 272, 273, + -1, 275, -1, 277, -1, 279, -1, 281, 282, 283, + 284, -1, -1, 287, 288, -1, -1, -1, 0, 293, + -1, 295, 296, 297, -1, -1, 300, 301, 302, -1, + 304, 417, -1, 307, -1, 309, 310, 311, 312, -1, + -1, -1, 316, 317, 318, -1, -1, 321, 322, 323, + -1, 257, -1, -1, -1, 261, 330, 331, -1, 333, + 334, 0, 336, 337, 338, -1, 272, -1, 342, -1, + -1, 277, -1, -1, -1, 281, -1, -1, 284, -1, + -1, -1, -1, -1, -1, 359, -1, -1, -1, -1, + 296, 297, -1, 367, 368, 301, 302, -1, -1, -1, + -1, 307, 376, 309, 310, 311, 312, -1, -1, -1, + -1, 317, -1, -1, -1, 321, -1, 323, -1, -1, + 257, -1, -1, -1, 261, -1, -1, 333, 0, 335, + 336, -1, 338, -1, -1, 272, 342, -1, -1, -1, + 277, -1, -1, 417, 281, -1, -1, 284, -1, -1, + -1, -1, -1, 359, -1, -1, -1, -1, -1, 296, + 297, 367, 368, 257, 301, 302, -1, 261, -1, -1, + 307, 0, 309, 310, 311, 312, -1, -1, 272, -1, + 317, -1, -1, 277, 321, -1, 323, 281, -1, -1, + 284, -1, -1, -1, -1, -1, 333, -1, 335, 336, + -1, 338, 296, 297, -1, 342, 257, 301, 302, -1, + 261, -1, -1, 307, 0, 309, 310, 311, 312, -1, + -1, 272, 359, 317, -1, -1, 277, 321, -1, 323, + 281, 368, -1, 284, -1, -1, -1, -1, -1, 333, + -1, -1, 336, -1, 338, 296, 297, -1, 342, -1, + 301, 302, -1, -1, -1, -1, 307, -1, 309, 310, + 311, 312, -1, -1, -1, 359, 317, -1, -1, -1, + 321, -1, 323, 367, 368, 257, -1, -1, -1, 261, + -1, -1, 333, -1, -1, 336, -1, 338, -1, -1, + 272, 342, -1, -1, -1, 277, -1, -1, -1, 281, + -1, -1, 284, -1, -1, -1, -1, -1, 359, -1, + -1, -1, -1, -1, 296, 297, 367, 368, 257, 301, + 302, -1, 261, -1, -1, 307, -1, 309, 310, 311, + 312, -1, -1, 272, -1, 317, -1, -1, 277, 321, + -1, 323, 281, -1, -1, 284, -1, -1, -1, -1, + -1, 333, -1, -1, 336, -1, 338, 296, 297, -1, + 342, -1, 301, 302, -1, -1, -1, -1, 307, -1, + 309, 310, 311, 312, -1, -1, -1, 359, 317, -1, + -1, -1, 321, -1, 323, 257, 368, -1, -1, 261, + -1, -1, -1, -1, 333, -1, -1, 336, -1, 338, + 272, -1, -1, 342, -1, 277, -1, -1, -1, 281, + -1, -1, 284, -1, -1, -1, -1, -1, -1, -1, + 359, -1, -1, -1, 296, 297, -1, -1, 257, 301, + 302, -1, 261, -1, -1, 307, -1, 309, 310, 311, + 312, -1, -1, 272, -1, 317, -1, -1, 277, 321, + -1, 323, 281, -1, -1, 284, -1, -1, -1, -1, + -1, 333, -1, -1, 336, -1, 338, 296, 297, -1, + 342, 257, 301, 302, -1, 261, -1, -1, 307, -1, + 309, 310, 311, 312, -1, -1, 272, 359, 317, -1, + -1, 277, 321, -1, 323, 281, -1, -1, 284, -1, + -1, -1, -1, -1, 333, -1, -1, 336, -1, 338, + 296, 297, -1, 342, -1, 301, 302, -1, -1, -1, + -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, + 359, 317, -1, -1, -1, 321, -1, 323, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 333, -1, 256, + 336, -1, 338, -1, -1, -1, 342, 264, 265, 266, + 267, -1, -1, 270, 271, -1, 273, 274, 275, 276, + 277, 278, 279, 359, -1, -1, -1, -1, 285, -1, + 287, 288, 289, 290, 291, 292, -1, -1, 295, -1, + -1, -1, 299, 300, -1, 302, 303, 304, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, + -1, 318, 319, -1, -1, 322, -1, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, -1, + 337, -1, -1, 340, 341, 256, -1, 344, 345, -1, + -1, 262, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 360, 361, 362, -1, -1, -1, 366, + -1, -1, -1, 370, -1, -1, -1, -1, 375, 376, + 377, 378, 379, -1, -1, -1, 383, 298, 385, -1, + -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 256, -1, -1, -1, -1, -1, 262, -1, 416, + 417, 418, 419, -1, -1, -1, -1, -1, 339, -1, + -1, 428, -1, 344, -1, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, -1, -1, -1, + -1, -1, -1, 298, -1, -1, 367, 368, 369, 370, + 371, 372, 373, 374, 375, -1, 377, 378, -1, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, -1, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, -1, 256, -1, -1, 417, -1, 419, 262, + -1, 422, -1, -1, -1, -1, -1, 428, -1, -1, + -1, -1, 367, -1, -1, 370, -1, 372, 373, -1, + -1, -1, 377, 378, -1, -1, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 298, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 411, 412, -1, -1, + -1, -1, -1, -1, 419, -1, -1, 422, -1, -1, + -1, -1, -1, 428, -1, -1, 339, -1, -1, -1, + -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 256, 377, 378, -1, 380, 381, 382, + 383, 384, 385, 386, 387, 388, 389, -1, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + -1, 256, -1, -1, -1, -1, 419, 262, -1, -1, + -1, -1, -1, -1, -1, 428, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 298, -1, -1, 339, -1, -1, -1, + -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 262, 367, -1, 369, -1, 371, -1, + 373, 374, 375, -1, 339, -1, -1, -1, -1, 344, + -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, -1, -1, -1, -1, -1, -1, -1, 298, + -1, 366, 367, -1, 369, 370, 371, 372, 373, 374, + 375, -1, 377, 378, -1, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 428, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, -1, 256, + -1, -1, -1, -1, 419, 262, -1, 422, 357, -1, + -1, -1, -1, 428, -1, -1, -1, -1, -1, 368, + -1, 370, -1, 372, -1, -1, 375, -1, 377, 378, + -1, 380, 381, 382, 383, 384, 385, 386, 387, 388, + 389, 298, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, -1, -1, -1, -1, 417, -1, + 419, 262, -1, 422, -1, -1, -1, -1, -1, 428, -1, -1, 339, -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 357, -1, 427, -1, -1, -1, -1, -1, -1, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, -1, - 377, 378, -1, -1, 381, 382, 383, 384, 385, 256, - -1, 388, 389, 261, -1, 262, 393, 394, 395, 396, - 397, 398, 399, 400, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 412, 284, -1, 415, -1, - 417, -1, 419, -1, -1, 422, -1, 294, -1, 297, - 427, 298, -1, -1, 302, -1, -1, 305, -1, 307, - -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, - -1, -1, -1, 321, -1, -1, -1, 325, -1, -1, - -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, - 338, -1, 339, -1, -1, -1, -1, 344, -1, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, 359, 256, -1, -1, -1, -1, -1, 262, 366, - 367, -1, 369, 370, 371, -1, 373, 374, 375, -1, - 377, 378, -1, -1, 381, 382, 383, 384, -1, -1, - -1, 388, 389, -1, -1, -1, 393, 394, 395, 396, - 397, 398, 399, 400, 298, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 412, -1, -1, 415, 417, - 417, -1, -1, -1, -1, -1, -1, -1, -1, 256, - 427, -1, -1, -1, -1, 262, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, - 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, -1, -1, -1, - -1, 298, -1, 367, -1, 369, -1, 371, -1, 373, - 374, 375, -1, 377, 378, -1, -1, 381, 382, 383, - 384, 385, 386, 387, 388, 389, -1, -1, -1, 393, - 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, 256, 427, -1, -1, -1, -1, 262, -1, - 367, 261, 369, 263, 371, -1, 373, 374, 375, -1, - 377, 378, -1, -1, 381, 382, 383, 384, -1, -1, - -1, 388, 389, -1, 284, -1, 393, 394, 395, 396, - 397, 398, 399, 400, 298, -1, -1, 297, -1, -1, - -1, -1, 302, -1, -1, 412, -1, 307, -1, 309, - 310, 311, 312, -1, -1, 315, -1, 317, -1, 256, - 427, 321, -1, -1, -1, 262, -1, -1, -1, -1, - -1, -1, -1, 333, -1, 339, 336, -1, 338, -1, - 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, -1, -1, 359, - -1, 298, -1, 367, -1, 369, -1, 371, -1, 373, - 374, 375, -1, 377, 378, -1, -1, 381, 382, 383, - 384, -1, -1, -1, 388, 389, -1, -1, -1, 393, - 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, 256, 427, -1, -1, -1, -1, 262, -1, - 367, 261, 369, -1, 371, -1, 373, 374, 375, -1, - 377, 378, -1, -1, 381, 382, 383, 384, -1, -1, - -1, 388, 389, -1, 284, -1, 393, 394, 395, 396, - 397, 398, 399, 400, 298, -1, -1, 297, -1, -1, - -1, 301, 302, -1, -1, 412, -1, 307, -1, 309, - 310, 311, 312, -1, -1, -1, -1, 317, -1, 256, - 427, 321, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 333, -1, 339, 336, -1, 338, -1, - 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, -1, -1, 359, - -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, - 374, 375, -1, 377, 378, -1, -1, 381, 382, 383, - 384, -1, -1, -1, 388, 389, 256, -1, -1, 393, - 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, 427, -1, -1, -1, -1, -1, -1, - 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, - -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, - -1, 388, 389, 256, -1, -1, 393, 394, 395, 396, - 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, - -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, + -1, -1, -1, -1, -1, -1, -1, 298, -1, -1, + 367, -1, 369, 370, 371, 372, 373, 374, 375, -1, + 377, 378, -1, 380, 381, 382, 383, 384, 385, 386, + 387, 388, 389, -1, 391, 392, 393, 394, 395, 396, + 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 409, 410, 411, 412, -1, 256, -1, -1, + -1, -1, 419, 262, -1, 422, -1, -1, -1, -1, + -1, 428, -1, -1, -1, -1, -1, 368, -1, 370, + 371, 372, 373, -1, 375, -1, 377, 378, -1, 380, + 381, 382, 383, 384, -1, 386, 387, 388, 389, 298, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, -1, -1, -1, -1, 417, -1, 419, 262, + -1, 422, -1, -1, -1, -1, -1, 428, -1, -1, + 339, -1, -1, -1, -1, 344, -1, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, -1, -1, -1, -1, 298, -1, -1, 367, -1, + 369, 370, 371, 372, 373, 374, 375, -1, 377, 378, + -1, 380, 381, 382, 383, 384, 385, 386, 387, 388, + 389, -1, 391, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, -1, 256, -1, -1, -1, -1, + 419, 262, -1, 422, -1, -1, -1, -1, -1, 428, + -1, -1, -1, -1, -1, -1, 369, 370, 371, 372, + 373, -1, -1, -1, 377, 378, -1, 380, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 298, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + -1, -1, -1, -1, -1, -1, 419, -1, -1, 422, + -1, -1, -1, -1, -1, 428, -1, -1, 339, -1, + -1, -1, -1, 344, -1, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 367, -1, 369, 370, + 371, 372, 373, 374, 375, -1, 377, 378, -1, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, -1, + 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, + 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, + 411, 412, -1, 256, 256, -1, -1, -1, 419, 262, + -1, 422, -1, 265, -1, 267, -1, 428, 270, -1, + -1, -1, -1, 275, -1, -1, -1, 279, -1, -1, + -1, -1, -1, -1, -1, -1, 288, -1, -1, -1, + -1, -1, -1, 295, -1, 298, -1, -1, 300, -1, + -1, -1, 304, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 316, -1, 318, -1, -1, -1, + 322, -1, -1, -1, -1, -1, -1, -1, 330, 331, + -1, -1, 334, -1, -1, 337, 339, -1, -1, -1, + -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 367, -1, 369, 370, 371, 372, + 373, 374, 375, -1, 377, -1, -1, 380, 381, 382, + 383, 384, 385, 386, 387, 388, 389, -1, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + -1, 256, 256, -1, -1, 417, 419, 262, -1, 422, + -1, 265, -1, 267, -1, 428, 270, -1, -1, -1, + -1, 275, -1, -1, -1, 279, -1, -1, -1, -1, + -1, -1, -1, -1, 288, -1, -1, -1, -1, -1, + -1, 295, -1, 298, -1, -1, 300, -1, -1, -1, + 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 316, -1, 318, -1, -1, -1, 322, -1, + -1, -1, -1, -1, -1, -1, 330, 331, -1, -1, + 334, -1, -1, 337, 339, -1, 256, -1, -1, 344, + -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, + 375, -1, 377, 378, -1, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, -1, -1, -1, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 256, 412, -1, -1, + -1, -1, 262, 417, -1, -1, 261, -1, -1, 339, + -1, -1, -1, 428, 344, -1, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, 284, + -1, -1, -1, -1, -1, -1, -1, 367, 298, 369, + -1, 371, 297, 373, 374, 375, -1, 302, -1, -1, + -1, -1, 307, -1, 309, 310, 311, 312, -1, 389, + 315, -1, 317, 256, -1, -1, 321, -1, -1, 262, + 400, -1, -1, -1, -1, -1, -1, -1, 333, 339, + -1, 336, 412, 338, 344, -1, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, 428, -1, + -1, -1, -1, -1, 359, 298, -1, 367, -1, 369, + -1, 371, 367, 373, 374, 375, -1, 377, 378, -1, + -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, + -1, -1, -1, 393, 394, 395, 396, 397, 398, 399, + 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, + -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, 256, -1, 428, -1, + -1, -1, 262, -1, 367, -1, 369, -1, 371, -1, + 373, 374, 375, -1, 377, 378, -1, -1, 381, 382, + 383, 384, -1, -1, -1, 388, 389, -1, -1, -1, + 393, 394, 395, 396, 397, 398, 399, 400, 298, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 412, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 256, -1, 428, -1, -1, -1, 262, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - 427, -1, -1, -1, -1, -1, -1, 367, -1, 369, - -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 298, -1, 367, -1, 369, + -1, 371, -1, 373, 374, 375, -1, 377, 378, -1, + -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, + -1, -1, -1, 393, 394, 395, 396, 397, 398, 399, + 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, + -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, 256, -1, 428, -1, + -1, -1, 262, -1, 367, -1, 369, -1, 371, -1, + 373, 374, 375, -1, 377, 378, -1, -1, 381, 382, + 383, 384, -1, -1, -1, 388, 389, -1, -1, -1, + 393, 394, 395, 396, 397, 398, 399, 400, 298, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 412, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 256, -1, 428, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 367, -1, 369, + -1, 371, -1, 373, 374, 375, -1, 377, 378, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, 393, 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, -1, -1, -1, 427, -1, -1, + 353, 354, 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, 393, 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, 427, -1, -1, -1, -1, -1, + 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, - -1, -1, 388, 389, 256, -1, -1, -1, -1, 395, + -1, -1, 388, 389, 256, -1, -1, 393, 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, 427, -1, -1, -1, -1, -1, -1, 367, -1, + -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, - 389, 256, -1, -1, -1, -1, 395, 396, 397, 398, + 389, 256, -1, -1, 393, 394, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, 427, -1, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, 427, -1, -1, -1, -1, + 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, 427, -1, -1, -1, -1, -1, -1, 367, + -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, -1, -1, -1, 427, - -1, -1, -1, -1, -1, -1, 367, -1, 369, -1, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, - -1, -1, 383, 384, -1, -1, -1, 388, 389, 256, - -1, -1, -1, -1, -1, -1, 397, 398, 399, 400, + 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, + -1, -1, -1, -1, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, 427, -1, -1, -1, + 354, 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, - 374, 375, -1, -1, -1, -1, -1, -1, -1, 383, + 374, 375, -1, -1, -1, -1, -1, 381, 382, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, - -1, -1, -1, 397, 398, 399, 400, -1, -1, -1, + -1, 395, 396, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, 427, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, -1, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, -1, -1, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - 427, -1, -1, -1, -1, -1, -1, 367, -1, 369, + -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, -1, 383, 384, -1, -1, -1, 388, 389, - 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, + 256, -1, -1, -1, -1, -1, -1, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, -1, -1, -1, 427, -1, -1, + 353, 354, 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, -1, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, - -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, + -1, -1, -1, -1, 397, 398, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, 427, -1, -1, -1, -1, -1, + 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, - -1, -1, -1, -1, -1, -1, -1, -1, 384, -1, + -1, -1, -1, -1, -1, -1, -1, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, 427, -1, -1, -1, -1, -1, -1, 367, -1, + -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, - -1, -1, -1, -1, -1, 384, -1, -1, -1, 388, + -1, -1, -1, -1, 383, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, 427, -1, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, - -1, -1, 384, -1, -1, -1, -1, 389, 256, -1, + -1, -1, 384, -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, 427, -1, -1, -1, -1, + 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, -1, -1, 384, - -1, -1, -1, -1, 389, 256, -1, -1, -1, -1, + -1, -1, -1, 388, 389, 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, 427, -1, -1, -1, -1, -1, -1, 367, + -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 384, -1, -1, -1, -1, 389, 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, -1, -1, -1, 427, - -1, -1, -1, -1, -1, -1, 367, -1, 369, -1, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 389, -1, + -1, -1, -1, 384, -1, -1, -1, -1, 389, 256, -1, -1, -1, -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, 427, -1, -1, -1, + 354, 355, 356, -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 256, -1, 389, -1, -1, -1, -1, - -1, 264, 265, 266, 267, -1, 400, 270, 271, -1, - 273, 274, 275, 276, 277, 278, 279, -1, 412, -1, - -1, -1, 285, -1, 287, 288, 289, 290, 291, 292, - -1, -1, 295, 427, -1, -1, 299, 300, -1, 302, - 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 314, -1, 316, -1, 318, 319, -1, -1, 322, - -1, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 335, -1, 337, -1, -1, 340, 341, -1, - -1, 344, 345, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, - -1, -1, -1, 366, -1, -1, -1, 370, -1, -1, - -1, -1, 375, 376, 377, 378, 379, -1, -1, -1, - 383, -1, 385, -1, -1, -1, -1, -1, 391, 392, + -1, -1, -1, -1, -1, 389, 256, -1, -1, -1, + -1, -1, -1, -1, -1, 399, 400, -1, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 412, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, -1, -1, -1, 428, -1, -1, -1, -1, -1, + 367, -1, 369, -1, 371, -1, 373, 374, 375, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, - -1, -1, -1, 416, 417, 418, 419, 264, 265, 266, - 267, -1, -1, 270, 271, -1, 273, 274, 275, 276, - 277, 278, 279, -1, -1, -1, -1, -1, 285, -1, - 287, 288, 289, 290, 291, 292, -1, -1, 295, -1, - -1, -1, 299, 300, -1, 302, 303, 304, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 314, -1, 316, - -1, 318, 319, -1, -1, 322, -1, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 333, 334, 335, -1, - 337, -1, -1, 340, 341, -1, -1, 344, 345, -1, + -1, -1, 389, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 400, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, 412, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, + -1, 428, -1, -1, -1, -1, -1, 367, -1, 369, + -1, 371, -1, 373, 374, 375, 256, -1, -1, -1, + -1, -1, -1, -1, 264, 265, 266, 267, -1, 389, + 270, 271, -1, 273, 274, 275, 276, 277, 278, 279, + -1, -1, -1, -1, -1, 285, -1, 287, 288, 289, + 290, 291, 292, -1, -1, 295, -1, -1, -1, 299, + 300, -1, 302, 303, 304, -1, -1, -1, 428, -1, + -1, -1, -1, -1, 314, -1, 316, -1, 318, 319, + -1, -1, 322, -1, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 335, -1, 337, -1, -1, + 340, 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 360, 361, 362, -1, -1, -1, 366, - -1, -1, -1, 370, -1, -1, -1, -1, 375, 376, - 377, 378, 379, -1, -1, -1, 383, -1, 385, -1, - -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, 366, -1, -1, -1, + 370, -1, -1, -1, -1, 375, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 256, -1, -1, -1, 416, - 417, 418, 419, 264, 265, 266, 267, -1, -1, 270, - 271, -1, 273, 274, 275, 276, 277, 278, 279, -1, - -1, -1, -1, -1, 285, -1, 287, 288, 289, 290, - 291, 292, -1, -1, 295, -1, -1, -1, 299, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 314, -1, 316, -1, 318, 319, -1, - -1, 322, -1, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, 335, -1, 337, -1, -1, 340, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, 366, -1, -1, -1, 370, - -1, -1, -1, -1, 375, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 256, -1, -1, -1, 416, 417, 418, 419, + 264, 265, 266, 267, -1, -1, 270, 271, -1, 273, + 274, 275, 276, 277, 278, 279, -1, -1, -1, -1, + -1, 285, -1, 287, 288, 289, 290, 291, 292, -1, + -1, 295, -1, -1, -1, 299, 300, -1, 302, 303, + 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 314, -1, 316, -1, 318, 319, -1, -1, 322, -1, + 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, + 334, 335, -1, 337, -1, -1, 340, 341, -1, -1, + 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 360, 361, 362, -1, + -1, -1, 366, -1, -1, -1, 370, -1, -1, -1, + -1, 375, 376, 377, 378, 379, -1, -1, -1, 383, + -1, 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 256, -1, -1, -1, 416, 417, 418, 419, 264, - 265, 266, 267, -1, -1, 270, 271, -1, 273, 274, - 275, 276, 277, 278, 279, -1, -1, -1, -1, -1, - 285, -1, 287, 288, 289, 290, 291, 292, -1, -1, - 295, -1, -1, -1, 299, 300, -1, 302, 303, 304, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 314, - -1, 316, -1, 318, 319, -1, -1, 322, -1, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, -1, 337, -1, -1, 340, 341, -1, -1, 344, - 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, - -1, 366, -1, -1, -1, 370, -1, -1, -1, -1, - 375, 376, 377, 378, 379, -1, -1, -1, 383, -1, - 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, + -1, -1, 416, 417, 418, 419, 264, 265, 266, 267, + -1, -1, 270, 271, -1, 273, 274, 275, 276, 277, + 278, 279, -1, -1, -1, -1, -1, 285, -1, 287, + 288, 289, 290, 291, 292, -1, -1, 295, -1, -1, + -1, 299, 300, -1, 302, 303, 304, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 314, -1, 316, -1, + 318, 319, -1, -1, 322, -1, 324, 325, 326, 327, + 328, 329, 330, 331, 332, 333, 334, 335, -1, 337, + -1, -1, 340, 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, - -1, 416, 417, 418, 419, 264, 265, 266, 267, -1, - -1, 270, 271, -1, 273, 274, 275, 276, 277, 278, - 279, -1, -1, -1, -1, -1, 285, -1, 287, 288, - 289, 290, 291, 292, -1, -1, 295, -1, -1, -1, - 299, 300, -1, 302, 303, 304, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 314, -1, 316, -1, 318, - 319, -1, -1, 322, -1, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 334, 335, -1, 337, -1, - -1, 340, 341, -1, -1, 344, 345, -1, -1, -1, + -1, -1, 360, 361, 362, -1, -1, -1, 366, -1, + -1, -1, 370, -1, -1, -1, -1, 375, 376, 377, + 378, 379, -1, -1, -1, 383, -1, 385, -1, -1, + -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 360, 361, 362, -1, -1, -1, 366, -1, -1, - -1, 370, -1, -1, -1, -1, 375, 376, 377, 378, - 379, -1, -1, -1, 383, -1, 385, -1, -1, -1, - -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 256, -1, -1, -1, 416, 417, + 418, 419, 264, 265, 266, 267, -1, -1, 270, 271, + -1, 273, 274, 275, 276, 277, 278, 279, -1, -1, + -1, -1, -1, 285, -1, 287, 288, 289, 290, 291, + 292, -1, -1, 295, -1, -1, -1, 299, 300, -1, + 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 314, -1, 316, -1, 318, 319, -1, -1, + 322, -1, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 333, 334, 335, -1, 337, -1, -1, 340, 341, + -1, -1, 344, 345, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 360, 361, + 362, -1, -1, -1, 366, -1, -1, -1, 370, -1, + -1, -1, -1, 375, 376, 377, 378, 379, -1, -1, + -1, 383, -1, 385, -1, -1, -1, -1, -1, 391, + 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 256, -1, -1, -1, 416, 417, 418, - 419, 264, 265, -1, 267, -1, -1, 270, 271, -1, - 256, -1, 275, 276, 277, -1, 279, -1, -1, 265, - -1, 267, 285, -1, 270, 288, -1, -1, -1, 275, - -1, -1, 295, 279, -1, -1, -1, 300, -1, 302, - 303, 304, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, 316, 300, 318, 319, -1, 304, 322, - -1, -1, 325, -1, 327, -1, 329, 330, 331, 332, - 316, 334, 318, -1, -1, -1, 322, -1, 341, -1, - -1, 344, 345, -1, 330, 331, -1, -1, 334, -1, - -1, 337, -1, -1, -1, -1, -1, 360, 361, 362, - -1, -1, -1, 366, 367, -1, -1, 370, -1, -1, - -1, -1, -1, 376, 377, 378, 379, -1, -1, -1, - 383, -1, 385, -1, -1, -1, -1, -1, 391, 392, + 256, -1, -1, -1, 416, 417, 418, 419, 264, 265, + 266, 267, -1, -1, 270, 271, -1, 273, 274, 275, + 276, 277, 278, 279, -1, -1, -1, -1, -1, 285, + -1, 287, 288, 289, 290, 291, 292, -1, -1, 295, + -1, -1, -1, 299, 300, -1, 302, 303, 304, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 314, -1, + 316, -1, 318, 319, -1, -1, 322, -1, 324, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + -1, 337, -1, -1, 340, 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, - -1, -1, -1, 416, 417, 418, 419, 264, 265, -1, - 267, -1, -1, 270, 271, -1, 256, -1, 275, 276, - 277, 417, 279, -1, -1, 265, -1, 267, 285, -1, - 270, 288, -1, -1, -1, 275, -1, -1, 295, 279, - -1, -1, -1, 300, -1, 302, 303, 304, 288, -1, - -1, -1, -1, -1, -1, 295, -1, -1, -1, 316, - 300, 318, 319, 320, 304, 322, -1, -1, 325, -1, - 327, -1, 329, 330, 331, 332, 316, 334, 318, -1, - -1, -1, 322, -1, 341, -1, -1, 344, 345, -1, - 330, 331, -1, -1, 334, -1, -1, 337, -1, -1, - -1, -1, -1, 360, 361, 362, -1, -1, -1, 366, - -1, -1, -1, 370, -1, -1, -1, -1, -1, 376, - 377, 378, 379, -1, -1, -1, 383, -1, 385, -1, - -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, + -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, + 366, -1, -1, -1, 370, -1, -1, -1, -1, 375, + 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, + -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, + 416, 417, 418, 419, 264, 265, -1, 267, -1, -1, + 270, 271, -1, 256, -1, 275, 276, 277, -1, 279, + -1, -1, 265, -1, 267, 285, -1, 270, 288, -1, + -1, -1, 275, -1, -1, 295, 279, -1, -1, -1, + 300, -1, 302, 303, 304, 288, -1, -1, -1, -1, + -1, -1, 295, -1, -1, -1, 316, 300, 318, 319, + -1, 304, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, 316, 334, 318, -1, -1, -1, 322, + -1, 341, -1, -1, 344, 345, -1, 330, 331, -1, + -1, 334, -1, -1, 337, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, 366, 367, -1, -1, + 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 256, -1, -1, -1, 416, - 417, 418, 419, 264, 265, -1, 267, -1, -1, 270, - 271, -1, 256, -1, 275, 276, 277, 417, 279, -1, + -1, -1, 256, -1, -1, -1, 416, 417, 418, 419, + 264, 265, -1, 267, -1, -1, 270, 271, -1, 256, + -1, 275, 276, 277, 417, 279, -1, -1, 265, -1, + 267, 285, -1, 270, 288, -1, -1, -1, 275, -1, + -1, 295, 279, -1, -1, -1, 300, -1, 302, 303, + 304, 288, -1, -1, -1, -1, -1, -1, 295, -1, + -1, -1, 316, 300, 318, 319, 320, 304, 322, -1, + -1, 325, -1, 327, -1, 329, 330, 331, 332, 316, + 334, 318, -1, -1, -1, 322, -1, 341, -1, -1, + 344, 345, -1, 330, 331, -1, -1, 334, -1, -1, + 337, -1, -1, -1, -1, -1, 360, 361, 362, -1, + -1, -1, 366, -1, -1, -1, 370, -1, -1, -1, + -1, -1, 376, 377, 378, 379, -1, -1, -1, 383, + -1, 385, -1, -1, -1, -1, -1, 391, 392, -1, + -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, + -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, + 279, -1, 416, 417, 418, 419, 285, -1, -1, 288, + -1, -1, -1, -1, -1, -1, 295, -1, -1, -1, + 417, 300, -1, 302, 303, 304, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 316, -1, 318, + 319, -1, -1, 322, -1, -1, 325, -1, 327, -1, + 329, 330, 331, 332, -1, 334, -1, -1, -1, -1, + -1, -1, 341, -1, -1, 344, 345, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 360, 361, 362, -1, -1, -1, 366, 367, -1, + -1, 370, -1, -1, -1, -1, -1, 376, 377, 378, + 379, -1, -1, -1, 383, -1, 385, -1, -1, -1, + -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 256, -1, 416, 417, 418, + 419, -1, -1, 264, 265, -1, 267, -1, 427, 270, + 271, -1, 256, -1, 275, 276, 277, -1, 279, -1, -1, 265, -1, 267, 285, -1, 270, 288, -1, -1, -1, 275, -1, -1, 295, 279, -1, -1, -1, 300, -1, 302, 303, 304, 288, -1, -1, -1, -1, -1, @@ -11058,235 +11336,11 @@ void case_918() 361, 362, -1, -1, -1, -1, -1, -1, -1, 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 256, -1, -1, -1, 416, 417, 418, 419, 264, - 265, -1, 267, -1, -1, 270, 271, -1, 256, -1, - 275, 276, 277, 417, 279, -1, -1, 265, -1, 267, - 285, -1, 270, 288, -1, -1, -1, 275, -1, -1, - 295, 279, -1, -1, -1, 300, -1, 302, 303, 304, - 288, -1, -1, -1, -1, -1, -1, 295, -1, -1, - -1, 316, 300, 318, 319, -1, 304, 322, -1, -1, - 325, -1, 327, -1, 329, 330, 331, 332, 316, 334, - 318, -1, -1, -1, 322, -1, 341, -1, -1, 344, - 345, -1, 330, 331, -1, -1, 334, -1, -1, 337, - -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, - -1, 366, -1, -1, -1, 370, -1, -1, -1, -1, - -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, - 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, - -1, 416, 417, 418, 419, 264, 265, -1, 267, -1, - -1, 270, 271, -1, -1, -1, 275, 276, 277, 417, - 279, -1, -1, 265, -1, 267, 285, -1, 270, 288, - -1, -1, -1, 275, -1, -1, 295, 279, -1, -1, - -1, 300, -1, 302, 303, 304, 288, -1, -1, -1, - -1, -1, -1, 295, -1, -1, -1, 316, 300, 318, - 319, -1, 304, 322, -1, -1, 325, -1, 327, -1, - 329, 330, 331, 332, 316, 334, 318, -1, -1, -1, - 322, -1, 341, -1, -1, 344, 345, -1, 330, 331, - -1, -1, 334, -1, -1, 337, -1, -1, -1, -1, - -1, 360, 361, 362, -1, -1, -1, -1, -1, -1, - -1, 370, -1, -1, -1, -1, -1, 376, 377, 378, - 379, -1, -1, -1, 383, -1, 385, -1, -1, -1, - -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 256, -1, -1, -1, 416, 417, 418, - 419, 264, 265, -1, 267, -1, -1, 270, 271, -1, - -1, -1, 275, 276, 277, 417, 279, -1, -1, 265, - -1, 267, 285, -1, 270, 288, -1, -1, -1, 275, - -1, -1, 295, 279, -1, -1, -1, 300, -1, 302, - 303, 304, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, 316, 300, 318, 319, -1, 304, 322, - -1, -1, 325, -1, 327, -1, 329, 330, 331, 332, - 316, 334, 318, -1, -1, -1, 322, -1, 341, -1, - -1, 344, 345, -1, 330, 331, -1, -1, 334, -1, - -1, 337, -1, -1, -1, -1, -1, 360, 361, 362, - -1, -1, -1, -1, -1, -1, -1, 370, -1, -1, - -1, -1, -1, 376, 377, 378, 379, -1, -1, -1, - 383, -1, 385, -1, -1, -1, -1, -1, 391, 392, - -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, - -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, - -1, 279, -1, 416, 417, 418, 419, 285, -1, -1, - 288, -1, -1, -1, -1, -1, -1, 295, -1, -1, - -1, 417, 300, -1, 302, 303, 304, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 316, -1, - 318, 319, -1, -1, 322, -1, -1, 325, -1, 327, - -1, 329, 330, 331, 332, -1, 334, -1, -1, -1, - -1, -1, -1, 341, -1, -1, 344, 345, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 360, 361, 362, -1, -1, -1, 366, 367, - -1, -1, 370, -1, -1, -1, -1, -1, 376, 377, - 378, 379, -1, -1, -1, 383, -1, 385, -1, -1, - -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, - -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, - -1, -1, 275, 276, 277, -1, 279, -1, 416, 417, - 418, 419, 285, -1, -1, 288, -1, -1, 426, -1, - -1, -1, 295, -1, -1, -1, -1, 300, -1, 302, - 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 316, -1, 318, 319, -1, -1, 322, - -1, -1, 325, -1, 327, -1, 329, 330, 331, 332, - -1, 334, -1, -1, -1, -1, -1, -1, 341, -1, - -1, 344, 345, -1, -1, 261, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, - -1, -1, -1, 366, -1, -1, -1, 370, 284, -1, - -1, -1, -1, 376, 377, 378, 379, -1, -1, -1, - 383, 297, 385, -1, -1, -1, 302, -1, 391, 392, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - -1, 317, -1, -1, -1, 321, -1, -1, -1, 325, - 256, -1, 262, 416, 417, 418, 419, 333, 264, 265, - 336, 267, 338, 426, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, -1, -1, -1, -1, 285, - -1, -1, 288, 359, -1, -1, -1, -1, 298, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, - -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 417, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, - 370, 371, 372, 373, 370, -1, -1, 377, 378, -1, - -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, - -1, 391, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 412, -1, -1, -1, -1, -1, -1, 419, - 416, 417, 422, 261, -1, -1, -1, 265, -1, 267, - -1, -1, 270, -1, 272, 273, -1, 275, -1, 277, - -1, 279, -1, 281, 282, 283, 284, -1, -1, 287, - 288, -1, -1, -1, -1, 293, -1, 295, 296, 297, - -1, -1, 300, -1, 302, -1, 304, -1, -1, 307, - -1, 309, 310, 311, 312, -1, -1, -1, 316, 317, - 318, -1, -1, 321, 322, 323, -1, -1, -1, -1, - -1, -1, 330, 331, -1, 333, 334, -1, 336, 337, - 338, -1, -1, -1, 342, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 261, -1, -1, -1, 265, -1, - 267, 359, -1, 270, -1, 272, 273, -1, 275, 367, - 277, -1, 279, -1, 281, 282, 283, 284, 376, -1, - 287, 288, -1, -1, -1, -1, 293, -1, 295, 296, - 297, -1, -1, 300, -1, 302, -1, 304, -1, -1, - 307, -1, 309, 310, 311, 312, -1, -1, -1, 316, - 317, 318, -1, -1, 321, 322, 323, -1, -1, 417, - -1, -1, -1, 330, 331, -1, 333, 334, -1, 336, - 337, 338, -1, -1, -1, 342, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 261, -1, -1, -1, 265, - -1, 267, 359, -1, 270, -1, 272, 273, -1, 275, - 367, 277, -1, 279, -1, 281, 282, 283, 284, 376, - -1, 287, 288, -1, -1, -1, -1, 293, -1, 295, - 296, 297, -1, -1, 300, -1, 302, -1, 304, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - 316, 317, 318, -1, -1, 321, 322, 323, -1, -1, - 417, -1, -1, -1, 330, 331, -1, 333, 334, -1, - 336, 337, 338, -1, -1, -1, 342, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 261, -1, -1, -1, - 265, -1, 267, 359, -1, 270, -1, 272, 273, -1, - 275, 367, 277, -1, 279, -1, 281, 282, 283, 284, - 376, -1, 287, 288, -1, -1, -1, -1, 293, -1, - 295, 296, 297, -1, -1, 300, -1, 302, -1, 304, - -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, - -1, 316, 317, 318, -1, -1, 321, 322, 323, -1, - -1, 417, -1, -1, -1, 330, 331, -1, 333, 334, - -1, 336, 337, 338, -1, -1, -1, 342, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 261, -1, -1, - -1, 265, -1, 267, 359, -1, 270, -1, 272, 273, - -1, 275, 367, 277, -1, 279, -1, 281, 282, 283, - 284, 376, -1, 287, 288, -1, -1, -1, -1, 293, - -1, 295, 296, 297, -1, -1, 300, -1, 302, -1, - 304, -1, -1, 307, -1, 309, 310, 311, 312, -1, - -1, -1, 316, 317, 318, -1, -1, 321, 322, 323, - -1, -1, 417, -1, -1, -1, 330, 331, -1, 333, - 334, -1, 336, 337, 338, -1, -1, -1, 342, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 261, -1, - -1, -1, 265, -1, 267, 359, -1, 270, -1, 272, - 273, -1, 275, 367, 277, -1, 279, -1, 281, 282, - 283, 284, -1, -1, 287, 288, -1, -1, -1, -1, - 293, -1, 295, 296, 297, -1, -1, 300, -1, 302, - -1, 304, 261, -1, 307, -1, 309, 310, 311, 312, - -1, -1, -1, 316, 317, 318, -1, -1, 321, 322, - 323, -1, -1, 417, -1, 284, -1, 330, 331, -1, - 333, 334, -1, 336, 337, 338, -1, -1, 297, 342, - -1, -1, -1, 302, -1, -1, 305, -1, 307, -1, - 309, 310, 311, 312, -1, -1, 359, -1, 317, -1, - -1, -1, 321, -1, 367, -1, 325, -1, -1, -1, - -1, 261, -1, -1, 333, -1, -1, 336, -1, 338, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 284, -1, -1, -1, 357, -1, - 359, 261, -1, -1, -1, -1, -1, 297, -1, 368, - -1, 370, 302, 372, 417, 305, -1, 307, -1, 309, - 310, 311, 312, -1, 284, -1, 385, 317, -1, -1, - -1, 321, -1, -1, -1, 325, -1, 297, -1, -1, - -1, -1, 302, 333, -1, -1, 336, 307, 338, 309, - 310, 311, 312, 264, 265, -1, 267, 317, 417, 270, - 271, 321, -1, -1, 275, 276, 277, -1, 279, 359, - -1, -1, -1, 333, 285, -1, 336, 288, 338, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, 306, -1, -1, -1, 359, - -1, -1, 313, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, -1, -1, 417, -1, -1, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, -1, -1, 417, -1, 370, - 371, -1, 373, -1, -1, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, 264, 265, - -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 416, 417, 418, 419, 285, - -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, - 306, -1, -1, -1, -1, -1, -1, 313, -1, -1, - 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, - -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, - -1, -1, -1, -1, -1, 341, -1, -1, 344, 345, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, - -1, -1, -1, -1, 370, -1, -1, 373, -1, -1, - 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, - -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, 306, -1, -1, -1, -1, - -1, -1, 313, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, -1, -1, -1, -1, -1, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, -1, -1, -1, -1, 370, - -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, 264, 265, - -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 416, 417, 418, 419, 285, - -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, - -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, - -1, 337, -1, -1, -1, 341, -1, -1, 344, 345, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, - -1, -1, -1, -1, 370, -1, -1, -1, -1, -1, - 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, - -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, -1, -1, -1, -1, -1, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, -1, 367, -1, -1, 370, - -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, + -1, -1, -1, 417, 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, @@ -11296,252 +11350,488 @@ void case_918() 366, -1, -1, -1, 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, -1, -1, -1, -1, -1, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, 366, -1, -1, -1, 370, - -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, 264, 265, - -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 416, 417, 418, 419, 285, - -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, - -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, - -1, -1, -1, -1, -1, 341, -1, -1, 344, 345, + -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, + 416, 417, 418, 419, -1, -1, 264, 265, -1, 267, + -1, 427, 270, 271, -1, -1, -1, 275, 276, 277, + -1, 279, -1, -1, 265, -1, 267, 285, -1, 270, + 288, -1, -1, -1, 275, -1, -1, 295, 279, -1, + -1, -1, 300, -1, 302, 303, 304, 288, -1, -1, + -1, -1, -1, -1, 295, -1, -1, -1, 316, 300, + 318, 319, -1, 304, 322, -1, -1, 325, -1, 327, + -1, 329, 330, 331, 332, 316, 334, 318, -1, -1, + -1, 322, -1, 341, -1, -1, 344, 345, -1, 330, + 331, -1, -1, 334, -1, -1, 337, -1, -1, -1, + -1, -1, 360, 361, 362, -1, -1, -1, 366, -1, + -1, -1, 370, -1, -1, -1, -1, -1, 376, 377, + 378, 379, -1, -1, -1, 383, -1, 385, -1, -1, + 371, -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, - -1, -1, -1, -1, 370, -1, -1, -1, -1, -1, - 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, - -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, -1, -1, -1, -1, -1, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, -1, -1, -1, -1, 370, - -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, 264, 265, + -1, -1, -1, -1, 256, -1, -1, -1, 416, 417, + 418, 419, 264, 265, -1, 267, -1, -1, 270, 271, + -1, -1, -1, 275, 276, 277, 417, 279, -1, -1, + 265, -1, 267, 285, -1, 270, 288, -1, -1, -1, + 275, -1, -1, 295, 279, -1, -1, -1, 300, -1, + 302, 303, 304, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, 316, 300, 318, 319, -1, 304, + 322, -1, -1, 325, -1, 327, -1, 329, 330, 331, + 332, 316, 334, 318, -1, -1, -1, 322, -1, 341, + -1, -1, 344, 345, -1, 330, 331, -1, -1, 334, + -1, -1, 337, -1, -1, -1, -1, -1, 360, 361, + 362, -1, -1, -1, -1, -1, -1, -1, 370, -1, + -1, -1, -1, -1, 376, 377, 378, 379, -1, -1, + -1, 383, -1, 385, 369, -1, -1, -1, -1, 391, + 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 256, -1, -1, -1, 416, 417, 418, 419, 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 416, 417, 418, 419, 285, + 276, 277, 417, 279, -1, -1, -1, -1, -1, 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 262, -1, -1, -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, -1, 341, -1, -1, 344, 345, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 298, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, -1, -1, -1, -1, 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, -1, -1, -1, -1, -1, - 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 360, - 361, 362, -1, -1, -1, -1, -1, -1, -1, 370, - -1, -1, -1, -1, -1, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, 264, 265, - -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 416, 417, 418, 419, 285, - -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 316, -1, 318, 319, -1, -1, 322, -1, -1, 325, - -1, 327, -1, 329, 330, 331, 332, -1, 334, -1, - -1, -1, -1, -1, -1, 341, -1, -1, 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, -1, -1, -1, - -1, -1, -1, -1, 370, -1, -1, -1, -1, -1, - 376, 377, 378, 379, -1, -1, -1, 383, -1, 385, - -1, -1, -1, -1, -1, 391, 392, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 416, 417, 418, 419, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, -1, 265, -1, 267, -1, -1, - 270, -1, -1, -1, -1, 275, -1, -1, -1, 279, - -1, -1, -1, -1, -1, -1, -1, -1, 288, 360, - 361, 362, -1, -1, -1, 295, -1, -1, -1, 370, - 300, -1, -1, -1, 304, 376, 377, 378, 379, -1, - -1, -1, 383, -1, 385, -1, 316, -1, 318, -1, - 391, 392, 322, -1, -1, -1, -1, -1, -1, -1, - 330, 331, -1, -1, 334, -1, -1, 337, -1, -1, - 263, -1, 265, -1, 267, 416, 417, 270, 419, 272, + 416, 417, 418, 419, 370, 371, 372, 373, -1, -1, + -1, 377, 378, -1, -1, 381, 382, 383, 384, 385, + 386, 387, 388, 389, -1, 391, 392, 393, 394, 395, + 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 411, 412, -1, 261, -1, + -1, -1, 265, 419, 267, -1, 422, 270, -1, 272, 273, -1, 275, -1, 277, -1, 279, -1, 281, 282, - 283, -1, -1, -1, 287, 288, -1, -1, -1, -1, - 293, -1, 295, 296, -1, -1, -1, 300, -1, -1, - -1, 304, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 315, 316, -1, 318, -1, -1, -1, 322, + 283, 284, -1, -1, 287, 288, -1, -1, -1, -1, + 293, -1, 295, 296, 297, -1, -1, 300, -1, 302, + -1, 304, -1, -1, 307, -1, 309, 310, 311, 312, + -1, -1, -1, 316, 317, 318, -1, -1, 321, 322, 323, -1, -1, -1, -1, -1, -1, 330, 331, -1, - -1, 334, -1, -1, 337, -1, -1, 417, -1, 342, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 363, 364, -1, -1, 285, -1, -1, 288, -1, -1, - -1, -1, -1, 376, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 316, -1, 318, 319, -1, - -1, 322, -1, -1, 325, -1, 327, -1, 329, 330, - 331, 332, -1, 334, 417, 265, 337, 267, -1, -1, - 270, -1, 272, 273, -1, 275, -1, 277, -1, 279, - -1, 281, 282, 283, -1, -1, -1, 287, 288, 360, - 361, 362, -1, 293, -1, 295, 296, -1, -1, 370, - 300, -1, -1, -1, 304, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 316, -1, 318, -1, - -1, -1, 322, 323, -1, -1, -1, -1, -1, -1, - 330, 331, -1, -1, 334, -1, -1, 337, -1, -1, - -1, -1, 342, -1, -1, 416, 417, 265, -1, 267, - -1, -1, 270, -1, 272, 273, -1, 275, -1, 277, - -1, 279, -1, 281, 282, 283, -1, -1, -1, 287, - 288, -1, -1, -1, -1, 293, 376, 295, 296, 265, - -1, 267, 300, -1, 270, -1, 304, 273, -1, 275, - -1, 277, -1, 279, -1, 281, 282, 283, 316, -1, - 318, 287, 288, -1, 322, 323, -1, 293, -1, 295, - -1, -1, 330, 331, 300, -1, 334, 417, 304, 337, - -1, -1, -1, -1, 342, -1, -1, -1, -1, -1, + 333, 334, -1, 336, 337, 338, -1, -1, -1, 342, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, + -1, -1, -1, 265, -1, 267, 359, -1, 270, -1, + 272, 273, -1, 275, 367, 277, -1, 279, -1, 281, + 282, 283, 284, 376, -1, 287, 288, -1, -1, -1, + -1, 293, -1, 295, 296, 297, -1, -1, 300, -1, + 302, -1, 304, -1, -1, 307, -1, 309, 310, 311, + 312, -1, -1, -1, 316, 317, 318, -1, -1, 321, + 322, 323, -1, -1, 417, -1, -1, -1, 330, 331, + -1, 333, 334, -1, 336, 337, 338, -1, -1, -1, + 342, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 261, -1, -1, -1, 265, -1, 267, 359, -1, 270, + -1, 272, 273, -1, 275, 367, 277, -1, 279, -1, + 281, 282, 283, 284, 376, -1, 287, 288, -1, -1, + -1, -1, 293, -1, 295, 296, 297, -1, -1, 300, + -1, 302, -1, 304, -1, -1, 307, -1, 309, 310, + 311, 312, -1, -1, -1, 316, 317, 318, -1, -1, + 321, 322, 323, -1, -1, 417, -1, -1, -1, 330, + 331, -1, 333, 334, -1, 336, 337, 338, -1, -1, + -1, 342, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 261, -1, -1, -1, 265, -1, 267, 359, -1, + 270, -1, 272, 273, -1, 275, 367, 277, -1, 279, + -1, 281, 282, 283, 284, 376, -1, 287, 288, -1, + -1, -1, -1, 293, -1, 295, 296, 297, -1, -1, + 300, -1, 302, -1, 304, -1, -1, 307, -1, 309, + 310, 311, 312, -1, -1, -1, 316, 317, 318, -1, + -1, 321, 322, 323, -1, -1, 417, -1, -1, -1, + 330, 331, -1, 333, 334, -1, 336, 337, 338, -1, + -1, -1, 342, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 261, -1, -1, -1, 265, -1, 267, 359, + -1, 270, -1, 272, 273, -1, 275, 367, 277, -1, + 279, -1, 281, 282, 283, 284, 376, -1, 287, 288, + -1, -1, -1, -1, 293, -1, 295, 296, 297, -1, + -1, 300, -1, 302, -1, 304, -1, -1, 307, -1, + 309, 310, 311, 312, -1, -1, -1, 316, 317, 318, + -1, -1, 321, 322, 323, -1, -1, 417, -1, -1, + -1, 330, 331, -1, 333, 334, -1, 336, 337, 338, + -1, -1, -1, 342, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 261, -1, -1, -1, 265, -1, 267, + 359, -1, 270, -1, 272, 273, -1, 275, 367, 277, + -1, 279, -1, 281, 282, 283, 284, -1, -1, 287, + 288, -1, -1, -1, -1, 293, -1, 295, 296, 297, + -1, -1, 300, -1, 302, -1, 304, 261, -1, 307, + -1, 309, 310, 311, 312, -1, -1, -1, 316, 317, + 318, -1, -1, 321, 322, 323, -1, -1, 417, -1, + 284, -1, 330, 331, -1, 333, 334, -1, 336, 337, + 338, -1, -1, 297, 342, -1, -1, -1, 302, -1, + -1, 305, -1, 307, -1, 309, 310, 311, 312, -1, + -1, 359, -1, 317, -1, -1, -1, 321, -1, 367, + -1, 325, -1, -1, -1, -1, 261, -1, -1, 333, + -1, -1, 336, -1, 338, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 284, + -1, -1, -1, 357, -1, 359, 261, -1, -1, -1, + -1, -1, 297, -1, 368, -1, 370, 302, 372, 417, + 305, -1, 307, -1, 309, 310, 311, 312, -1, 284, + -1, 385, 317, -1, -1, -1, 321, -1, -1, -1, + 325, 261, 297, -1, -1, -1, -1, 302, 333, -1, + 305, 336, 307, 338, 309, 310, 311, 312, -1, -1, + -1, -1, 317, 417, 284, -1, 321, -1, -1, -1, + 325, 261, -1, -1, 359, -1, -1, 297, 333, -1, + -1, 336, 302, 338, -1, -1, -1, 307, -1, 309, + 310, 311, 312, -1, 284, -1, -1, 317, -1, -1, + -1, 321, -1, -1, 359, 325, -1, 297, -1, -1, + -1, -1, 302, 333, -1, -1, 336, 307, 338, 309, + 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, + -1, 321, 417, -1, -1, -1, -1, -1, -1, 359, + -1, -1, -1, 333, 264, 265, 336, 267, 338, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, -1, 417, -1, -1, 285, -1, -1, 288, 359, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, 306, -1, -1, -1, + -1, -1, -1, 313, -1, -1, 316, 417, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, + -1, 341, -1, -1, 344, 345, -1, 417, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, -1, -1, -1, -1, + 370, 371, -1, 373, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + -1, 306, -1, -1, -1, -1, -1, -1, 313, -1, + -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, + -1, -1, -1, -1, -1, -1, 341, -1, -1, 344, + 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, + -1, -1, -1, -1, -1, 370, -1, -1, 373, -1, + -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, + 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, 306, -1, -1, -1, + -1, -1, -1, 313, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, + -1, 341, -1, -1, 344, 345, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, -1, -1, -1, -1, + 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, + -1, -1, 337, -1, -1, -1, 341, -1, -1, 344, + 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, + -1, -1, -1, -1, -1, 370, -1, -1, -1, -1, + -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, + 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, + -1, 341, -1, -1, 344, 345, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, -1, 367, -1, -1, + 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, + -1, -1, -1, -1, -1, -1, 341, -1, -1, 344, + 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, + -1, 366, -1, -1, -1, 370, -1, -1, -1, -1, + -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, + 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, + -1, 341, -1, -1, 344, 345, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, 366, -1, -1, -1, + 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, + -1, -1, -1, -1, -1, -1, 341, -1, -1, 344, + 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, + -1, -1, -1, -1, -1, 370, -1, -1, -1, -1, + -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, + 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, + -1, 341, -1, -1, 344, 345, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, -1, -1, -1, -1, + 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, + -1, -1, -1, -1, -1, -1, 341, -1, -1, 344, + 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, + -1, -1, -1, -1, -1, 370, -1, -1, -1, -1, + -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, + 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, -1, -1, -1, -1, + -1, 341, -1, -1, 344, 345, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, 361, 362, -1, -1, -1, -1, -1, -1, -1, + 370, -1, -1, -1, -1, -1, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, -1, -1, -1, + -1, 391, 392, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 416, 417, 418, 419, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 316, -1, 318, 319, -1, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, -1, 334, + -1, -1, -1, -1, -1, -1, 341, -1, -1, 344, + 345, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 360, 361, 362, -1, -1, + -1, -1, -1, -1, -1, 370, -1, -1, -1, -1, + -1, 376, 377, 378, 379, -1, -1, -1, 383, -1, + 385, -1, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 416, 417, 418, 419, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, -1, 265, -1, 267, -1, + -1, 270, -1, 272, -1, -1, 275, -1, -1, -1, + 279, -1, -1, -1, -1, -1, -1, -1, -1, 288, + 360, 361, 362, -1, -1, -1, 295, -1, -1, -1, + 370, 300, -1, 302, -1, 304, 376, 377, 378, 379, + -1, -1, -1, 383, -1, 385, -1, 316, -1, 318, + -1, 391, 392, 322, 323, -1, -1, -1, -1, -1, + -1, 330, 331, -1, -1, 334, -1, -1, 337, -1, + -1, 263, -1, 265, -1, 267, 416, 417, 270, 419, + 272, 273, -1, 275, -1, 277, -1, 279, -1, 281, + 282, 283, -1, -1, -1, 287, 288, -1, -1, -1, + -1, 293, -1, 295, 296, -1, -1, -1, 300, -1, + -1, -1, 304, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 315, 316, -1, 318, -1, -1, -1, + 322, 323, -1, -1, -1, -1, -1, -1, 330, 331, + -1, -1, 334, -1, -1, 337, -1, -1, 417, -1, + 342, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 363, 364, -1, -1, 285, -1, -1, 288, -1, + -1, -1, -1, -1, 376, 295, -1, -1, -1, -1, + 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 316, -1, 318, 319, + -1, -1, 322, -1, -1, 325, -1, 327, -1, 329, + 330, 331, 332, -1, 334, 417, 265, 337, 267, -1, + -1, 270, -1, 272, 273, -1, 275, -1, 277, -1, + 279, -1, 281, 282, 283, -1, -1, -1, 287, 288, + 360, 361, 362, -1, 293, -1, 295, 296, -1, -1, + 370, 300, -1, -1, -1, 304, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 316, -1, 318, + -1, -1, -1, 322, 323, -1, -1, -1, -1, -1, + -1, 330, 331, -1, -1, 334, -1, -1, 337, -1, + -1, -1, -1, 342, -1, -1, 416, 417, 265, -1, + 267, -1, -1, 270, -1, 272, 273, -1, 275, -1, + 277, -1, 279, -1, 281, 282, 283, -1, -1, -1, + 287, 288, -1, -1, -1, -1, 293, 376, 295, 296, + 265, -1, 267, 300, -1, 270, -1, 304, 273, -1, + 275, -1, 277, -1, 279, -1, 281, 282, 283, 316, + -1, 318, 287, 288, -1, 322, 323, -1, 293, -1, + 295, -1, -1, 330, 331, 300, -1, 334, 417, 304, + 337, -1, -1, -1, -1, 342, -1, -1, -1, -1, + -1, 316, -1, 318, -1, -1, -1, 322, -1, -1, + -1, -1, -1, -1, -1, 330, 331, -1, 265, 334, + 267, -1, 337, 270, -1, -1, 273, 342, 275, -1, + 277, -1, 279, -1, 281, 282, 283, -1, -1, -1, + 287, 288, -1, -1, -1, -1, 293, -1, 295, -1, + 265, -1, 267, 300, -1, 270, -1, 304, -1, -1, + 275, 376, -1, -1, 279, -1, -1, -1, -1, 316, + 417, 318, -1, 288, -1, 322, -1, -1, -1, -1, + 295, -1, -1, 330, 331, 300, -1, 334, -1, 304, + 337, 306, -1, 308, 265, 342, 267, -1, 313, 270, + -1, 316, 417, 318, 275, -1, -1, 322, 279, -1, + 325, -1, -1, -1, -1, 330, 331, 288, -1, 334, + -1, -1, 337, -1, 295, -1, -1, -1, -1, 300, + -1, -1, -1, 304, 265, 306, 267, 308, -1, 270, + -1, -1, 313, -1, 275, 316, -1, 318, 279, -1, + -1, 322, -1, -1, 325, -1, 371, 288, -1, 330, + 331, -1, -1, 334, 295, -1, 337, -1, -1, 300, + 417, -1, -1, 304, -1, 306, -1, 308, 265, -1, + 267, -1, 313, 270, -1, 316, -1, 318, 275, -1, + -1, 322, 279, -1, 325, -1, -1, -1, 369, 330, + 331, 288, 417, 334, -1, -1, 337, -1, 295, -1, + -1, -1, -1, 300, -1, -1, -1, 304, -1, 306, + -1, -1, -1, -1, -1, -1, 313, -1, -1, 316, + -1, 318, -1, -1, -1, 322, -1, -1, 325, -1, + -1, -1, -1, 330, 331, -1, 417, 334, -1, 265, + 337, 267, -1, -1, 270, -1, -1, -1, -1, 275, + 265, -1, 267, 279, -1, 270, -1, 283, -1, -1, + 275, -1, 288, -1, 279, -1, -1, 293, -1, 295, + -1, -1, -1, 288, 300, -1, 417, -1, 304, 305, + 295, -1, -1, -1, -1, 300, -1, -1, -1, 304, 316, -1, 318, -1, -1, -1, 322, -1, -1, -1, - -1, -1, -1, -1, 330, 331, -1, 265, 334, 267, - -1, 337, 270, -1, -1, 273, 342, 275, -1, 277, - -1, 279, -1, 281, 282, 283, -1, -1, -1, 287, - 288, -1, -1, -1, -1, 293, -1, 295, -1, 265, - -1, 267, 300, -1, 270, -1, 304, -1, -1, 275, - 376, -1, -1, 279, -1, -1, -1, -1, 316, 417, - 318, -1, 288, -1, 322, -1, -1, -1, -1, 295, - -1, -1, 330, 331, 300, -1, 334, -1, 304, 337, - 306, -1, 308, 265, 342, 267, -1, 313, 270, -1, - 316, 417, 318, 275, -1, -1, 322, 279, -1, 325, - -1, -1, -1, -1, 330, 331, 288, -1, 334, -1, - -1, 337, -1, 295, -1, -1, -1, -1, 300, -1, - -1, -1, 304, 265, 306, 267, 308, -1, 270, -1, - -1, 313, -1, 275, 316, -1, 318, 279, -1, -1, - 322, -1, -1, 325, -1, 371, 288, -1, 330, 331, - -1, -1, 334, 295, -1, 337, -1, -1, 300, 417, - -1, -1, 304, -1, 306, -1, 308, 265, -1, 267, - -1, 313, 270, -1, 316, -1, 318, 275, -1, -1, - 322, 279, -1, 325, -1, -1, -1, 369, 330, 331, - 288, 417, 334, -1, -1, 337, -1, 295, -1, 265, - -1, 267, 300, -1, 270, -1, 304, -1, 306, 275, - -1, -1, -1, 279, -1, 313, -1, -1, 316, -1, - 318, -1, 288, -1, 322, -1, -1, 325, -1, 295, - -1, -1, 330, 331, 300, 417, 334, -1, 304, 337, - -1, -1, -1, 265, -1, 267, -1, -1, 270, -1, - 316, -1, 318, 275, -1, -1, 322, 279, -1, -1, - -1, -1, -1, -1, 330, 331, 288, 265, 334, 267, - -1, 337, 270, 295, -1, 417, -1, 275, 300, -1, - -1, 279, 304, -1, -1, -1, -1, -1, -1, -1, - 288, -1, -1, -1, 316, -1, 318, 295, -1, -1, - 322, -1, 300, -1, -1, -1, 304, -1, 330, 331, - -1, 265, 334, 267, -1, 337, 270, -1, 316, 417, - 318, 275, -1, -1, 322, 279, -1, -1, -1, -1, - -1, -1, 330, 331, 288, 265, 334, 267, -1, 337, - 270, 295, -1, -1, -1, 275, 300, -1, -1, 279, - 304, 417, -1, -1, -1, -1, -1, -1, 288, -1, - -1, -1, 316, -1, 318, 295, -1, -1, 322, -1, - 300, -1, -1, -1, 304, -1, 330, 331, -1, 265, - 334, 267, -1, 337, 270, -1, 316, -1, 318, 275, - -1, -1, 322, 279, -1, 417, -1, -1, -1, -1, - 330, 331, 288, 265, 334, 267, -1, 337, 270, 295, - -1, -1, -1, 275, 300, -1, -1, 279, 304, 417, - -1, -1, -1, -1, -1, -1, 288, -1, -1, -1, - 316, -1, 318, 295, -1, -1, 322, -1, 300, -1, - -1, -1, 304, -1, 330, 331, -1, 265, 334, 267, - -1, 337, 270, -1, 316, -1, 318, 275, -1, -1, - 322, 279, -1, 417, -1, -1, -1, -1, 330, 331, - 288, 265, 334, 267, -1, 337, 270, 295, -1, -1, - -1, 275, 300, -1, -1, 279, 304, 417, -1, -1, - -1, -1, -1, -1, 288, -1, -1, -1, 316, -1, - 318, 295, -1, -1, 322, -1, 300, -1, -1, -1, - 304, -1, 330, 331, -1, -1, 334, -1, -1, 337, - -1, -1, 316, -1, 318, -1, -1, -1, 322, -1, - 261, 417, -1, -1, -1, -1, 330, 331, -1, -1, - 334, 272, -1, 337, -1, -1, 277, -1, -1, -1, - 281, -1, -1, 284, -1, 417, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 296, 297, -1, -1, -1, - 301, 302, -1, -1, -1, -1, 307, -1, 309, 310, - 311, 312, -1, -1, -1, -1, 317, -1, -1, -1, - 321, -1, 323, -1, -1, -1, -1, -1, 261, 417, - -1, -1, 333, -1, 335, 336, -1, 338, -1, 272, - -1, 342, -1, -1, 277, -1, -1, -1, 281, -1, - -1, 284, -1, 417, -1, -1, -1, -1, 359, -1, - -1, -1, -1, 296, 297, -1, 367, 368, 301, 302, - -1, 261, -1, -1, 307, -1, 309, 310, 311, 312, - -1, -1, -1, -1, 317, -1, -1, -1, 321, -1, - 323, -1, -1, -1, 284, -1, -1, -1, -1, -1, - 333, -1, -1, 336, -1, 338, -1, 297, -1, 342, - -1, -1, 302, -1, 261, -1, 263, 307, -1, 309, - 310, 311, 312, -1, -1, 315, 359, 317, -1, -1, - -1, 321, -1, -1, 367, 368, -1, 284, -1, -1, - -1, -1, -1, 333, -1, -1, 336, -1, 338, -1, - 297, -1, -1, -1, -1, 302, -1, -1, -1, -1, - 307, -1, 309, 310, 311, 312, -1, -1, -1, 359, - 317, -1, -1, -1, 321, -1, -1, 367, 368, -1, - -1, -1, 261, -1, -1, -1, 333, -1, -1, 336, - -1, 338, -1, 272, -1, -1, -1, -1, 277, -1, - -1, -1, 281, -1, -1, 284, -1, -1, -1, -1, - -1, -1, 359, -1, -1, -1, -1, 296, 297, -1, - 367, 368, 301, 302, -1, 261, -1, -1, 307, -1, - 309, 310, 311, 312, -1, -1, 272, -1, 317, -1, - -1, 277, 321, -1, 323, 281, -1, -1, 284, -1, - -1, -1, -1, -1, 333, -1, -1, 336, -1, 338, - 296, 297, -1, 342, -1, 301, 302, -1, 261, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - 359, 317, -1, -1, -1, 321, -1, 323, 367, -1, - -1, 284, -1, -1, -1, -1, -1, 333, -1, -1, - 336, -1, 338, 261, 297, -1, 342, -1, -1, 302, - -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, - -1, -1, -1, 359, 317, -1, 284, -1, 321, -1, - -1, 367, -1, -1, -1, -1, -1, -1, -1, 297, - 333, -1, -1, 336, 302, 338, -1, -1, -1, 307, - -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, - -1, -1, 261, 321, -1, -1, 359, -1, -1, -1, - 363, 364, -1, -1, 367, 333, -1, -1, 336, -1, - 338, -1, -1, -1, -1, 284, -1, -1, -1, -1, - -1, -1, 261, -1, 263, -1, -1, -1, 297, -1, - -1, 359, -1, 302, -1, 363, 364, -1, 307, 367, - 309, 310, 311, 312, -1, 284, 315, -1, 317, -1, - -1, -1, 321, -1, -1, -1, -1, -1, 297, -1, - -1, -1, -1, 302, 333, 261, -1, 336, 307, 338, - 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, - -1, -1, 321, -1, -1, -1, -1, -1, 284, -1, - 359, -1, -1, -1, 333, -1, -1, 336, 367, 338, - 261, 297, -1, -1, -1, -1, 302, -1, -1, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - 359, 317, -1, 284, -1, 321, -1, -1, 367, -1, - -1, -1, -1, -1, -1, -1, 297, 333, -1, -1, - 336, 302, 338, -1, -1, -1, 307, -1, 309, 310, - 311, 312, -1, -1, -1, -1, 317, -1, -1, -1, - 321, -1, -1, 359, -1, -1, -1, 363, 364, -1, - -1, -1, 333, -1, -1, 336, -1, 338, -1, -1, + -1, 316, -1, 318, 330, 331, -1, 322, 334, -1, + -1, -1, -1, -1, -1, 330, 331, -1, -1, 334, + 417, 265, 337, 267, -1, -1, 270, -1, -1, -1, + -1, 275, 265, -1, 267, 279, -1, 270, -1, -1, + -1, -1, 275, -1, 288, -1, 279, -1, -1, -1, + -1, 295, -1, -1, -1, 288, 300, -1, -1, -1, + 304, -1, 295, -1, -1, -1, -1, 300, -1, -1, + -1, 304, 316, -1, 318, -1, -1, -1, 322, -1, + -1, -1, -1, 316, -1, 318, 330, 331, -1, 322, + 334, 417, -1, 337, -1, -1, -1, 330, 331, -1, + -1, 334, 417, 265, 337, 267, -1, -1, 270, -1, + -1, -1, -1, 275, 265, -1, 267, 279, -1, 270, + -1, -1, -1, -1, 275, -1, 288, -1, 279, -1, + -1, -1, -1, 295, -1, -1, -1, 288, 300, -1, + -1, -1, 304, -1, 295, -1, -1, -1, -1, 300, + -1, -1, -1, 304, 316, -1, 318, -1, -1, -1, + 322, -1, -1, -1, -1, 316, -1, 318, 330, 331, + -1, 322, 334, 417, -1, 337, -1, -1, -1, 330, + 331, -1, -1, 334, 417, 265, 337, 267, -1, -1, + 270, -1, -1, -1, -1, 275, 265, -1, 267, 279, + -1, 270, -1, -1, -1, -1, 275, -1, 288, -1, + 279, -1, -1, -1, -1, 295, -1, -1, -1, 288, + 300, -1, -1, -1, 304, -1, 295, -1, -1, -1, + -1, 300, -1, -1, -1, 304, 316, -1, 318, -1, + -1, -1, 322, -1, -1, -1, -1, 316, -1, 318, + 330, 331, -1, 322, 334, 417, -1, 337, -1, -1, + -1, 330, 331, -1, -1, 334, 417, 265, 337, 267, + -1, -1, 270, -1, -1, -1, -1, 275, 265, -1, + 267, 279, -1, 270, -1, -1, -1, -1, 275, -1, + 288, -1, 279, -1, -1, -1, -1, 295, -1, -1, + -1, 288, 300, -1, -1, -1, 304, -1, 295, -1, + -1, -1, -1, 300, -1, -1, -1, 304, 316, -1, + 318, -1, -1, -1, 322, -1, -1, -1, -1, 316, + -1, 318, 330, 331, -1, 322, 334, 417, -1, 337, + -1, -1, -1, 330, 331, -1, -1, 334, 417, 265, + 337, 267, -1, -1, 270, -1, -1, -1, -1, 275, + 265, -1, 267, 279, -1, 270, -1, -1, -1, -1, + 275, -1, 288, -1, 279, -1, -1, -1, -1, 295, + -1, -1, -1, 288, 300, -1, -1, -1, 304, -1, + 295, -1, -1, -1, -1, 300, -1, -1, -1, 304, + 316, -1, 318, -1, -1, -1, 322, -1, -1, -1, + -1, 316, -1, 318, 330, 331, -1, 322, 334, 417, + -1, 337, -1, -1, -1, 330, 331, -1, -1, 334, + 417, 265, 337, 267, -1, -1, 270, -1, -1, -1, + -1, 275, -1, -1, -1, 279, -1, -1, -1, -1, + -1, -1, -1, -1, 288, -1, -1, -1, 261, -1, + -1, 295, -1, -1, -1, -1, 300, -1, -1, 272, + 304, -1, -1, -1, 277, -1, -1, -1, 281, -1, + -1, 284, 316, -1, 318, -1, -1, -1, 322, -1, + -1, -1, -1, 296, 297, -1, 330, 331, 301, 302, + 334, 417, -1, 337, 307, -1, 309, 310, 311, 312, + -1, -1, 417, -1, 317, -1, -1, -1, 321, -1, + 323, -1, -1, -1, -1, -1, 261, -1, -1, -1, + 333, -1, 335, 336, -1, 338, -1, 272, -1, 342, + -1, -1, 277, -1, -1, -1, 281, -1, -1, 284, + -1, -1, -1, -1, -1, -1, 359, -1, -1, -1, + -1, 296, 297, -1, 367, 368, 301, 302, -1, 261, + -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, + -1, -1, 317, 417, -1, -1, 321, -1, 323, -1, + -1, -1, 284, -1, -1, -1, -1, -1, 333, -1, + -1, 336, -1, 338, -1, 297, -1, 342, -1, -1, + 302, -1, 261, -1, 263, 307, -1, 309, 310, 311, + 312, -1, -1, 315, 359, 317, -1, -1, -1, 321, + -1, -1, 367, 368, -1, 284, -1, -1, -1, -1, + -1, 333, -1, -1, 336, -1, 338, -1, 297, -1, + -1, -1, -1, 302, -1, -1, -1, -1, 307, -1, + 309, 310, 311, 312, -1, -1, -1, 359, 317, -1, + -1, -1, 321, -1, -1, 367, 368, -1, -1, -1, + 261, -1, -1, -1, 333, -1, -1, 336, -1, 338, + -1, 272, -1, -1, -1, -1, 277, -1, -1, -1, + 281, -1, -1, 284, -1, -1, -1, -1, -1, -1, + 359, -1, -1, -1, -1, 296, 297, -1, 367, 368, + 301, 302, -1, 261, -1, -1, 307, -1, 309, 310, + 311, 312, -1, -1, 272, -1, 317, -1, -1, 277, + 321, -1, 323, 281, -1, -1, 284, -1, -1, -1, + -1, -1, 333, -1, -1, 336, -1, 338, 296, 297, + -1, 342, -1, 301, 302, -1, 261, -1, -1, 307, + -1, 309, 310, 311, 312, -1, -1, -1, 359, 317, + -1, -1, -1, 321, -1, 323, 367, -1, -1, 284, + -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, + 338, 261, 297, -1, 342, -1, -1, 302, -1, -1, + -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, + -1, 359, 317, -1, 284, -1, 321, -1, -1, 367, + -1, -1, -1, -1, -1, -1, -1, 297, 333, -1, + -1, 336, 302, 338, -1, -1, -1, 307, -1, 309, + 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, + 261, 321, 263, -1, 359, -1, -1, -1, 363, 364, + -1, -1, 367, 333, -1, -1, 336, -1, 338, -1, + -1, -1, -1, 284, -1, -1, -1, -1, -1, -1, + 261, -1, -1, -1, -1, -1, 297, -1, -1, 359, + -1, 302, -1, 363, 364, -1, 307, 367, 309, 310, + 311, 312, -1, 284, -1, -1, 317, -1, -1, -1, + 321, -1, -1, -1, -1, -1, 297, -1, -1, -1, + -1, 302, 333, -1, -1, 336, 307, 338, 309, 310, + 311, 312, -1, -1, -1, -1, 317, -1, -1, 261, + 321, 263, -1, -1, -1, -1, -1, -1, 359, -1, + -1, -1, 333, -1, -1, 336, 367, 338, -1, -1, + -1, -1, 284, -1, -1, -1, -1, -1, -1, 261, + -1, -1, -1, -1, -1, 297, -1, -1, 359, -1, + 302, -1, 363, 364, -1, 307, -1, 309, 310, 311, + 312, -1, 284, 315, -1, 317, -1, -1, -1, 321, + -1, -1, -1, -1, 261, 297, -1, -1, -1, 301, + 302, 333, -1, -1, 336, 307, 338, 309, 310, 311, + 312, -1, -1, -1, -1, 317, -1, 284, -1, 321, + -1, -1, -1, -1, -1, -1, -1, 359, -1, -1, + 297, 333, -1, -1, 336, 302, 338, -1, -1, -1, + 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, + 317, -1, -1, -1, 321, -1, -1, 359, -1, -1, + -1, -1, -1, -1, -1, -1, 333, -1, -1, 336, + -1, 338, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 359, + -1, -1, 359, }; -#line 6029 "cs-parser.jay" +#line 6179 "cs-parser.jay" // // A class used to hold info about an operator declarator @@ -11562,42 +11852,42 @@ class OperatorDeclaration { void Error_ExpectingTypeName (Expression expr) { if (expr is Invocation){ - Report.Error (1002, expr.Location, "Expecting `;'"); + report.Error (1002, expr.Location, "Expecting `;'"); } else { - Expression.Error_InvalidExpressionStatement (Report, expr.Location); + Expression.Error_InvalidExpressionStatement (report, expr.Location); } } void Error_ParameterModifierNotValid (string modifier, Location loc) { - Report.Error (631, loc, "The parameter modifier `{0}' is not valid in this context", + report.Error (631, loc, "The parameter modifier `{0}' is not valid in this context", modifier); } void Error_DuplicateParameterModifier (Location loc, Parameter.Modifier mod) { - Report.Error (1107, loc, "Duplicate parameter modifier `{0}'", + report.Error (1107, loc, "Duplicate parameter modifier `{0}'", Parameter.GetModifierSignature (mod)); } void Error_TypeExpected (Location loc) { - Report.Error (1031, loc, "Type expected"); + report.Error (1031, loc, "Type expected"); } void Error_UnsafeCodeNotAllowed (Location loc) { - Report.Error (227, loc, "Unsafe code requires the `unsafe' command line option to be specified"); + report.Error (227, loc, "Unsafe code requires the `unsafe' command line option to be specified"); } void Warning_EmptyStatement (Location loc) { - Report.Warning (642, 3, loc, "Possible mistaken empty statement"); + report.Warning (642, 3, loc, "Possible mistaken empty statement"); } void Error_NamedArgumentExpected (NamedArgument a) { - Report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); + report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); } void push_current_class (TypeContainer tc, object partial_token) @@ -11675,7 +11965,7 @@ string CheckAttributeTarget (string a, Location l) return a; } - Report.Warning (658, 1, l, + report.Warning (658, 1, l, "`{0}' is invalid attribute target. All attributes in this attribute section will be ignored", a); return string.Empty; } @@ -11699,7 +11989,7 @@ static bool IsUnaryOperator (Operator.OpType op) void syntax_error (Location l, string msg) { - Report.Error (1003, l, "Syntax error, " + msg); + report.Error (1003, l, "Syntax error, " + msg); } Tokenizer lexer; @@ -11716,6 +12006,11 @@ static CSharpParser () } public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file) + : this (reader, file, file.NamespaceContainer.Module.Compiler.Report) +{ +} + +public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file, Report report) { this.file = file; current_namespace = file.NamespaceContainer; @@ -11723,6 +12018,8 @@ public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file) this.module = current_namespace.Module; this.compiler = module.Compiler; this.settings = compiler.Settings; + this.report = report; + lang_version = settings.Version; doc_support = settings.DocumentationFile != null; current_class = current_namespace.SlaveDeclSpace; @@ -11754,13 +12051,13 @@ public void parse () } if (e is yyParser.yyException) { - Report.Error (-25, lexer.Location, "Parsing error"); + report.Error (-25, lexer.Location, "Parsing error"); } else { // Used by compiler-tester to test internal errors if (yacc_verbose_flag > 0) throw; - Report.Error (589, lexer.Location, "Internal compiler error during parsing"); + report.Error (589, lexer.Location, "Internal compiler error during parsing"); } } } @@ -11768,9 +12065,9 @@ public void parse () void CheckToken (int error, int yyToken, string msg, Location loc) { if (yyToken >= Token.FIRST_KEYWORD && yyToken <= Token.LAST_KEYWORD) - Report.Error (error, loc, "{0}: `{1}' is a keyword", msg, GetTokenName (yyToken)); + report.Error (error, loc, "{0}: `{1}' is a keyword", msg, GetTokenName (yyToken)); else - Report.Error (error, loc, msg); + report.Error (error, loc, msg); } string ConsumeStoredComment () @@ -11783,7 +12080,7 @@ string ConsumeStoredComment () void FeatureIsNotAvailable (Location loc, string feature) { - compiler.Report.FeatureIsNotAvailable (compiler, loc, feature); + report.FeatureIsNotAvailable (compiler, loc, feature); } Location GetLocation (object obj) @@ -11803,10 +12100,6 @@ Location GetLocation (object obj) return lexer.Location; } -Report Report { - get { return compiler.Report; } -} - public LocationsBag LocationsBag { get { return lbag; @@ -11885,12 +12178,6 @@ AnonymousMethodExpression end_anonymous (ParametersBlock anon_block) return retval; } -public NamespaceEntry CurrentNamespace { - get { - return current_namespace; - } -} - void Error_SyntaxError (int token) { Error_SyntaxError (0, token, "Unexpected symbol"); @@ -11909,7 +12196,7 @@ void Error_SyntaxError (int error_code, int token, string msg) if (error_code == 0) { if (expecting == "`identifier'") { if (token > Token.FIRST_KEYWORD && token < Token.LAST_KEYWORD) { - Report.Error (1041, loc, "Identifier expected, `{0}' is a keyword", symbol); + report.Error (1041, loc, "Identifier expected, `{0}' is a keyword", symbol); return; } @@ -11923,9 +12210,9 @@ void Error_SyntaxError (int error_code, int token, string msg) } if (string.IsNullOrEmpty (expecting)) - Report.Error (error_code, loc, "{1} `{0}'", symbol, msg); + report.Error (error_code, loc, "{1} `{0}'", symbol, msg); else - Report.Error (error_code, loc, "{2} `{0}', expecting {1}", symbol, expecting, msg); + report.Error (error_code, loc, "{2} `{0}', expecting {1}", symbol, expecting, msg); } string GetExpecting () @@ -12632,9 +12919,10 @@ namespace yydebug { public const int EVAL_STATEMENT_PARSER = 423; public const int EVAL_COMPILATION_UNIT_PARSER = 424; public const int EVAL_USING_DECLARATIONS_UNIT_PARSER = 425; - public const int GENERATE_COMPLETION = 426; - public const int COMPLETE_COMPLETION = 427; - public const int UMINUS = 428; + public const int DOC_SEE = 426; + public const int GENERATE_COMPLETION = 427; + public const int COMPLETE_COMPLETION = 428; + public const int UMINUS = 429; public const int yyErrorCode = 256; } namespace yyParser { diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.jay index 46c39443c..4cca86530 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-parser.jay @@ -44,7 +44,7 @@ namespace Mono.CSharp static readonly object ModifierNone = 0; - NamespaceEntry current_namespace; + NamespaceContainer current_namespace; TypeContainer current_container; DeclSpace current_class; PropertyBase current_property; @@ -127,6 +127,7 @@ namespace Mono.CSharp readonly LanguageVersion lang_version; readonly bool doc_support; readonly CompilerSettings settings; + readonly Report report; // // Instead of allocating carrier array everytime we @@ -141,7 +142,7 @@ namespace Mono.CSharp LocationsBag lbag; UsingsBag ubag; List> mod_locations; - Location parameterModifierLocation, savedLocation; + Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; %} %token EOF @@ -334,6 +335,8 @@ namespace Mono.CSharp %token EVAL_COMPILATION_UNIT_PARSER %token EVAL_USING_DECLARATIONS_UNIT_PARSER +%token DOC_SEE + // // This token is generated to trigger the completion engine at this point // @@ -375,6 +378,7 @@ compilation_unit Lexer.check_incorrect_doc_comment (); } | interactive_parsing { Lexer.CompleteOnEOF = false; } opt_EOF + | documentation_parsing ; outer_declaration @@ -383,7 +387,7 @@ outer_declaration { if ($4 != null) { Attributes attrs = (Attributes) $4; - Report.Error (1730, attrs.Attrs [0].Location, + report.Error (1730, attrs.Attrs [0].Location, "Assembly and module attributes must precede all other elements except using clauses and extern alias declarations"); } } @@ -394,7 +398,7 @@ outer_declaration | error { if (yyToken == Token.EXTERN_ALIAS) - Report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); + report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); else Error_SyntaxError (yyToken); } @@ -421,7 +425,7 @@ extern_alias_directive FeatureIsNotAvailable (lt.Location, "external alias"); } else { lt = (Tokenizer.LocatedToken) $3; - current_namespace.AddUsingExternalAlias (lt.Value, lt.Location, Report); + current_namespace.AddUsingExternalAlias (lt.Value, lt.Location, report); ubag.AddExternAlias (GetLocation ($1), GetLocation ($2), lt, GetLocation ($4)); } } @@ -454,7 +458,7 @@ using_alias_directive { var lt = (Tokenizer.LocatedToken) $2; if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") { - Report.Warning (440, 2, lt.Location, + report.Warning (440, 2, lt.Location, "An alias named `global' will not be used when resolving `global::'. The global namespace will be used instead"); } @@ -501,15 +505,16 @@ namespace_declaration } if (!valid_global_attrs) - Report.Error (1671, name.Location, "A namespace declaration cannot have modifiers or attributes"); + report.Error (1671, name.Location, "A namespace declaration cannot have modifiers or attributes"); } + + module.AddAttributes (attrs, current_namespace); - current_namespace = new NamespaceEntry (module, current_namespace, file, name.GetName ()); + current_namespace = new NamespaceContainer (name, module, current_namespace, file); + module.AddTypesContainer (current_namespace); current_class = current_namespace.SlaveDeclSpace; current_container = current_class.PartialContainer; - module.AddAttributes (attrs, current_namespace); - ubag.DeclareNamespace (GetLocation ($2), name); } OPEN_BRACE @@ -600,7 +605,7 @@ namespace_or_type_declaration TypeContainer ds = (TypeContainer)$1; if ((ds.ModFlags & (Modifiers.PRIVATE | Modifiers.PROTECTED)) != 0){ - Report.Error (1527, ds.Location, + report.Error (1527, ds.Location, "Namespace elements cannot be explicitly declared as private, protected or protected internal"); } @@ -630,7 +635,7 @@ type_declaration // // | error { // Console.WriteLine ("Token=" + yyToken); -// Report.Error (1518, GetLocation ($1), "Expected class, struct, interface, enum or delegate"); +// report.Error (1518, GetLocation ($1), "Expected class, struct, interface, enum or delegate"); // } ; @@ -648,6 +653,7 @@ attribute_sections { var sect = (List) $1; $$ = new Attributes (sect); + lbag.AddLocation ($$, savedOpenLocation, savedCloseLocation); } | attribute_sections attribute_section { @@ -658,6 +664,7 @@ attribute_sections else attrs.AddAttributes (sect); $$ = attrs; + lbag.AddLocation ($$, savedOpenLocation, savedCloseLocation); } ; @@ -665,6 +672,7 @@ attribute_section : OPEN_BRACKET { lexer.parsing_attribute_section = true; + savedOpenLocation = GetLocation ($1); } attribute_section_cont { @@ -691,10 +699,12 @@ attribute_section_cont current_attr_target = null; lexer.parsing_attribute_section = false; + savedCloseLocation = GetLocation ($6); } | attribute_list opt_comma CLOSE_BRACKET { $$ = $1; + savedCloseLocation = GetLocation ($3); } ; @@ -742,7 +752,7 @@ attribute --lexer.parsing_block; MemberName mname = (MemberName) $1; if (mname.IsGeneric) { - Report.Error (404, lexer.Location, + report.Error (404, lexer.Location, "'<' unexpected: attributes cannot be generic"); } @@ -783,7 +793,7 @@ attribute_arguments { Arguments[] o = (Arguments[]) $1; if (o [1] != null) { - Report.Error (1016, ((Argument) $3).Expr.Location, "Named attribute arguments must appear after the positional arguments"); + report.Error (1016, ((Argument) $3).Expr.Location, "Named attribute arguments must appear after the positional arguments"); o [0] = new Arguments (4); } @@ -824,6 +834,7 @@ named_attribute_argument --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) $1; $$ = new NamedArgument (lt.Value, lt.Location, (Expression) $4); + lbag.AddLocation ($$, GetLocation($2)); } ; @@ -877,7 +888,7 @@ class_member_declaration | type_declaration | error { - Report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", + report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); $$ = null; lexer.parsing_generic_declaration = false; @@ -977,7 +988,7 @@ constant_declaration current_container.AddConstant ((Const) current_field); if ((mod & Modifiers.STATIC) != 0) { - Report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ()); + report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ()); } $$ = current_field; @@ -1033,7 +1044,7 @@ constant_initializer } | error { - Report.Error (145, lexer.Location, "A const field requires a value to be provided"); + report.Error (145, lexer.Location, "A const field requires a value to be provided"); $$ = null; } ; @@ -1052,7 +1063,7 @@ field_declaration FullNamedExpression type = (FullNamedExpression) $3; if (type.Type != null && type.Type.Kind == MemberKind.Void) - Report.Error (670, GetLocation ($3), "Fields cannot have void type"); + report.Error (670, GetLocation ($3), "Fields cannot have void type"); var lt = (Tokenizer.LocatedToken) $4; current_field = new Field (current_class, type, (Modifiers) $2, new MemberName (lt.Value, lt.Location), (Attributes) $1); @@ -1102,7 +1113,7 @@ field_declaration FIXED simple_type error SEMICOLON { - Report.Error (1641, GetLocation ($5), "A fixed size buffer field must have the array size specifier after the field name"); + report.Error (1641, GetLocation ($5), "A fixed size buffer field must have the array size specifier after the field name"); } ; @@ -1198,7 +1209,7 @@ fixed_field_size } | OPEN_BRACKET error { - Report.Error (443, lexer.Location, "Value or constant expected"); + report.Error (443, lexer.Location, "Value or constant expected"); $$ = null; } ; @@ -1229,7 +1240,7 @@ method_declaration method.Block = (ToplevelBlock) $3; if (current_container.Kind == MemberKind.Interface && method.Block != null) { - Report.Error (531, method.Location, "`{0}': interface members cannot have a definition", method.GetSignatureForError ()); + report.Error (531, method.Location, "`{0}': interface members cannot have a definition", method.GetSignatureForError ()); } current_local_parameters = null; @@ -1265,7 +1276,7 @@ method_header generic.SetParameterInfo ((List) $10); } else if ($10 != null) { - Report.Error (80, GetLocation ($10), + report.Error (80, GetLocation ($10), "Constraints are not allowed on non-generic declarations"); } @@ -1273,7 +1284,7 @@ method_header name, current_local_parameters, (Attributes) $1); if ($10 != null && ((method.ModFlags & Modifiers.OVERRIDE) != 0 || method.IsExplicitImpl)) { - Report.Error (460, method.Location, + report.Error (460, method.Location, "`{0}': Cannot specify constraints for overrides and explicit interface implementation methods", method.GetSignatureForError ()); } @@ -1305,7 +1316,7 @@ method_header current_local_parameters = (ParametersCompiled) $8; if ($10 != null && name.TypeArguments == null) - Report.Error (80, lexer.Location, + report.Error (80, lexer.Location, "Constraints are not allowed on non-generic declarations"); Method method; @@ -1325,13 +1336,13 @@ method_header Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.SEALED | Modifiers.VIRTUAL; if ((modifiers & invalid_partial_mod) != 0) { - Report.Error (750, name.Location, "A partial method cannot define access modifier or " + + report.Error (750, name.Location, "A partial method cannot define access modifier or " + "any of abstract, extern, new, override, sealed, or virtual modifiers"); modifiers &= ~invalid_partial_mod; } if ((current_class.ModFlags & Modifiers.PARTIAL) == 0) { - Report.Error (751, name.Location, "A partial method must be declared within a " + + report.Error (751, name.Location, "A partial method must be declared within a " + "partial class or partial struct"); } @@ -1354,7 +1365,7 @@ method_header modifiers method_declaration_name OPEN_PARENS opt_formal_parameter_list CLOSE_PARENS { MemberName name = (MemberName) $5; - Report.Error (1585, name.Location, + report.Error (1585, name.Location, "Member modifier `{0}' must precede the member type and name", ModifiersExtensions.Name ((Modifiers) $4)); Method method = new Method (current_class, null, (FullNamedExpression) $3, @@ -1402,14 +1413,14 @@ formal_parameter_list | parameter_array COMMA error { if ($1 != null) - Report.Error (231, ((Parameter) $1).Location, "A params parameter must be the last parameter in a formal parameter list"); + report.Error (231, ((Parameter) $1).Location, "A params parameter must be the last parameter in a formal parameter list"); $$ = new ParametersCompiled (new Parameter[] { (Parameter) $1 } ); } | fixed_parameters COMMA parameter_array COMMA error { if ($3 != null) - Report.Error (231, ((Parameter) $3).Location, "A params parameter must be the last parameter in a formal parameter list"); + report.Error (231, ((Parameter) $3).Location, "A params parameter must be the last parameter in a formal parameter list"); var pars_list = (List) $1; pars_list.Add (new ArglistParameter (GetLocation ($3))); @@ -1418,13 +1429,13 @@ formal_parameter_list } | arglist_modifier COMMA error { - Report.Error (257, GetLocation ($1), "An __arglist parameter must be the last parameter in a formal parameter list"); + report.Error (257, GetLocation ($1), "An __arglist parameter must be the last parameter in a formal parameter list"); $$ = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation ($1)) }, true); } | fixed_parameters COMMA ARGLIST COMMA error { - Report.Error (257, GetLocation ($3), "An __arglist parameter must be the last parameter in a formal parameter list"); + report.Error (257, GetLocation ($3), "An __arglist parameter must be the last parameter in a formal parameter list"); var pars_list = (List) $1; pars_list.Add (new ArglistParameter (GetLocation ($3))); @@ -1462,9 +1473,9 @@ fixed_parameters Parameter p = (Parameter) $3; if (p != null) { if (p.HasExtensionMethodModifier) - Report.Error (1100, p.Location, "The parameter modifier `this' can only be used on the first parameter"); + report.Error (1100, p.Location, "The parameter modifier `this' can only be used on the first parameter"); else if (!p.HasDefaultValue && default_parameter_used) - Report.Error (1737, p.Location, "Optional parameter cannot precede required parameters"); + report.Error (1737, p.Location, "Optional parameter cannot precede required parameters"); default_parameter_used |= p.HasDefaultValue; pars.Add (p); @@ -1492,7 +1503,7 @@ fixed_parameter IDENTIFIER OPEN_BRACKET CLOSE_BRACKET { var lt = (Tokenizer.LocatedToken) $4; - Report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); + report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); $$ = new Parameter ((FullNamedExpression) $3, lt.Value, (Parameter.Modifier) $2, (Attributes) $1, lt.Location); lbag.AddLocation ($$, parameterModifierLocation); } @@ -1503,7 +1514,7 @@ fixed_parameter { Error_SyntaxError (yyToken); Location l = GetLocation ($4); - $$ = new Parameter ((FullNamedExpression) $3, "NeedSomeGeneratorHere", (Parameter.Modifier) $2, (Attributes) $1, l); + $$ = new Parameter ((FullNamedExpression) $3, null, (Parameter.Modifier) $2, (Attributes) $1, l); lbag.AddLocation ($$, parameterModifierLocation); } | opt_attributes @@ -1526,12 +1537,12 @@ fixed_parameter switch (mod) { case Parameter.Modifier.REF: case Parameter.Modifier.OUT: - Report.Error (1741, GetLocation ($2), "Cannot specify a default value for the `{0}' parameter", + report.Error (1741, GetLocation ($2), "Cannot specify a default value for the `{0}' parameter", Parameter.GetModifierSignature (mod)); break; case Parameter.Modifier.This: - Report.Error (1743, GetLocation ($2), "Cannot specify a default value for the `{0}' parameter", + report.Error (1743, GetLocation ($2), "Cannot specify a default value for the `{0}' parameter", Parameter.GetModifierSignature (mod)); break; default: @@ -1542,7 +1553,7 @@ fixed_parameter } if ((valid_param_mod & ParameterModifierType.DefaultValue) == 0) - Report.Error (1065, GetLocation ($5), "Optional parameter is not valid in this context"); + report.Error (1065, GetLocation ($5), "Optional parameter is not valid in this context"); var lt = (Tokenizer.LocatedToken) $4; $$ = new Parameter ((FullNamedExpression) $3, lt.Value, mod, (Attributes) $1, lt.Location); @@ -1573,13 +1584,13 @@ parameter_modifiers } else { switch (mod & ~Parameter.Modifier.This) { case Parameter.Modifier.REF: - Report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether"); + report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether"); break; case Parameter.Modifier.OUT: - Report.Error (1102, lexer.Location, "The parameter modifiers `this' and `out' cannot be used altogether"); + report.Error (1102, lexer.Location, "The parameter modifiers `this' and `out' cannot be used altogether"); break; default: - Report.Error (1108, lexer.Location, "A parameter cannot have specified more than one modifier"); + report.Error (1108, lexer.Location, "A parameter cannot have specified more than one modifier"); break; } } @@ -1622,7 +1633,7 @@ parameter_array } | opt_attributes params_modifier type IDENTIFIER ASSIGN constant_expression { - Report.Error (1751, GetLocation ($2), "Cannot specify a default value for a parameter array"); + report.Error (1751, GetLocation ($2), "Cannot specify a default value for a parameter array"); var lt = (Tokenizer.LocatedToken) $4; $$ = new ParamsParameter ((FullNamedExpression) $3, lt.Value, (Attributes) $1, lt.Location); @@ -1638,15 +1649,15 @@ params_modifier : PARAMS { if ((valid_param_mod & ParameterModifierType.Params) == 0) - Report.Error (1670, (GetLocation ($1)), "The `params' modifier is not allowed in current context"); + report.Error (1670, (GetLocation ($1)), "The `params' modifier is not allowed in current context"); } | PARAMS parameter_modifier { Parameter.Modifier mod = (Parameter.Modifier)$2; if ((mod & Parameter.Modifier.This) != 0) { - Report.Error (1104, GetLocation ($1), "The parameter modifiers `this' and `params' cannot be used altogether"); + report.Error (1104, GetLocation ($1), "The parameter modifiers `this' and `params' cannot be used altogether"); } else { - Report.Error (1611, GetLocation ($1), "The params parameter cannot be declared as ref or out"); + report.Error (1611, GetLocation ($1), "The params parameter cannot be declared as ref or out"); } } | PARAMS params_modifier @@ -1659,7 +1670,7 @@ arglist_modifier : ARGLIST { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) - Report.Error (1669, GetLocation ($1), "__arglist is not valid in this context"); + report.Error (1669, GetLocation ($1), "__arglist is not valid in this context"); } ; @@ -1679,7 +1690,7 @@ property_declaration (MemberName) $4, (Attributes) $1); if (type.Type != null && type.Type.Kind == MemberKind.Void) - Report.Error (547, GetLocation ($3), "`{0}': property or indexer cannot have void type", current_property.GetSignatureForError ()); + report.Error (547, GetLocation ($3), "`{0}': property or indexer cannot have void type", current_property.GetSignatureForError ()); current_container.AddProperty ((Property)current_property); lbag.AddMember (current_property, GetModifierLocations (), GetLocation ($6)); @@ -1720,10 +1731,10 @@ indexer_declaration lbag.AddMember (current_property, GetModifierLocations (), GetLocation ($5), GetLocation ($8), GetLocation ($9)); if (type.Type != null && type.Type.Kind == MemberKind.Void) - Report.Error (620, GetLocation ($3), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ()); + report.Error (620, GetLocation ($3), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ()); if (indexer.Parameters.IsEmpty) { - Report.Error (1551, GetLocation ($5), "Indexers must have at least one parameter"); + report.Error (1551, GetLocation ($5), "Indexers must have at least one parameter"); } if (doc_support) { @@ -1756,12 +1767,12 @@ accessor_declarations | error { if (yyToken == Token.CLOSE_BRACE) { - Report.Error (548, lexer.Location, "`{0}': property or indexer must have at least one accessor", current_property.GetSignatureForError ()); + report.Error (548, lexer.Location, "`{0}': property or indexer must have at least one accessor", current_property.GetSignatureForError ()); } else { if (yyToken == Token.SEMICOLON) - Report.Error (1597, lexer.Location, "Semicolon after method or accessor block is not valid"); + report.Error (1597, lexer.Location, "Semicolon after method or accessor block is not valid"); else - Report.Error (1014, GetLocation ($1), "A get or set accessor expected"); + report.Error (1014, GetLocation ($1), "A get or set accessor expected"); } } ; @@ -1774,7 +1785,7 @@ get_accessor_declaration } if (current_property.Get != null) { - Report.Error (1007, GetLocation ($3), "Property accessor already defined"); + report.Error (1007, GetLocation ($3), "Property accessor already defined"); } if (current_property is Indexer) { @@ -1795,7 +1806,7 @@ get_accessor_declaration current_property.Get.Block = (ToplevelBlock) $5; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_property.Get.Block.StartLocation, + report.Error (531, current_property.Get.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Get.GetSignatureForError ()); } } @@ -1817,7 +1828,7 @@ set_accessor_declaration } if (current_property.Set != null) { - Report.Error (1007, GetLocation ($3), "Property accessor already defined"); + report.Error (1007, GetLocation ($3), "Property accessor already defined"); } if (current_property is Indexer) { @@ -1843,7 +1854,7 @@ set_accessor_declaration current_property.Set.Block = (ToplevelBlock) $5; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_property.Set.Block.StartLocation, + report.Error (531, current_property.Set.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Set.GetSignatureForError ()); } } @@ -1927,11 +1938,11 @@ interface_member_declarations interface_member_declaration : constant_declaration { - Report.Error (525, GetLocation ($1), "Interfaces cannot contain fields or constants"); + report.Error (525, GetLocation ($1), "Interfaces cannot contain fields or constants"); } | field_declaration { - Report.Error (525, GetLocation ($1), "Interfaces cannot contain fields or constants"); + report.Error (525, GetLocation ($1), "Interfaces cannot contain fields or constants"); } | method_declaration | property_declaration @@ -1939,15 +1950,15 @@ interface_member_declaration | indexer_declaration | operator_declaration { - Report.Error (567, GetLocation ($1), "Interfaces cannot contain operators"); + report.Error (567, GetLocation ($1), "Interfaces cannot contain operators"); } | constructor_declaration { - Report.Error (526, GetLocation ($1), "Interfaces cannot contain contructors"); + report.Error (526, GetLocation ($1), "Interfaces cannot contain contructors"); } | type_declaration { - Report.Error (524, GetLocation ($1), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); + report.Error (524, GetLocation ($1), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } ; @@ -1988,7 +1999,7 @@ operator_type : type_expression_or_array | VOID { - Report.Error (590, GetLocation ($1), "User-defined operators cannot return void"); + report.Error (590, GetLocation ($1), "User-defined operators cannot return void"); $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1)); } ; @@ -2016,17 +2027,17 @@ operator_declarator if (IsUnaryOperator (op)) { if (p_count == 2) { - Report.Error (1020, loc, "Overloadable binary operator expected"); + report.Error (1020, loc, "Overloadable binary operator expected"); } else if (p_count != 1) { - Report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter", + report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter", Operator.GetName (op)); } } else { if (p_count > 2) { - Report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters", + report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters", Operator.GetName (op)); } else if (p_count != 2) { - Report.Error (1019, loc, "Overloadable unary operator expected"); + report.Error (1019, loc, "Overloadable unary operator expected"); } } @@ -2173,15 +2184,15 @@ constructor_declarator (Attributes) $1, current_local_parameters, ci, lt.Location); if (lt.Value != current_container.MemberName.Name) { - Report.Error (1520, c.Location, "Class, struct, or interface method must have a return type"); + report.Error (1520, c.Location, "Class, struct, or interface method must have a return type"); } else if ((mods & Modifiers.STATIC) != 0) { if ((mods & Modifiers.AccessibilityMask) != 0){ - Report.Error (515, c.Location, + report.Error (515, c.Location, "`{0}': static constructor cannot have an access modifier", c.GetSignatureForError ()); } if (ci != null) { - Report.Error (514, c.Location, + report.Error (514, c.Location, "`{0}': static constructor cannot have an explicit `this' or `base' constructor call", c.GetSignatureForError ()); @@ -2245,9 +2256,9 @@ destructor_declaration { var lt = (Tokenizer.LocatedToken) $5; if (lt.Value != current_container.MemberName.Name){ - Report.Error (574, lt.Location, "Name of destructor must match name of class"); + report.Error (574, lt.Location, "Name of destructor must match name of class"); } else if (current_container.Kind != MemberKind.Class){ - Report.Error (575, lt.Location, "Only class types can contain destructor"); + report.Error (575, lt.Location, "Only class types can contain destructor"); } Destructor d = new Destructor (current_class, (Modifiers) $2, @@ -2272,7 +2283,7 @@ event_declaration current_container.AddEvent (current_event_field); if (current_event_field.MemberName.Left != null) { - Report.Error (71, current_event_field.Location, "`{0}': An explicit interface implementation of an event must use property syntax", + report.Error (71, current_event_field.Location, "`{0}': An explicit interface implementation of an event must use property syntax", current_event_field.GetSignatureForError ()); } @@ -2304,7 +2315,7 @@ event_declaration event_accessor_declarations { if (current_container.Kind == MemberKind.Interface) - Report.Error (69, GetLocation ($6), "Event in interface cannot have add or remove accessors"); + report.Error (69, GetLocation ($6), "Event in interface cannot have add or remove accessors"); lexer.EventParsing = false; } @@ -2373,12 +2384,12 @@ event_declarator event_variable_initializer : { if (current_container.Kind == MemberKind.Interface) { - Report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", + report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", current_event_field.GetSignatureForError ()); } if ((current_event_field.ModFlags & Modifiers.ABSTRACT) != 0) { - Report.Error (74, lexer.Location, "`{0}': abstract event cannot have an initializer", + report.Error (74, lexer.Location, "`{0}': abstract event cannot have an initializer", current_event_field.GetSignatureForError ()); } } @@ -2393,17 +2404,17 @@ event_accessor_declarations | remove_accessor_declaration add_accessor_declaration | add_accessor_declaration { - Report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", + report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } | remove_accessor_declaration { - Report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", + report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } | error { - Report.Error (1055, GetLocation ($1), "An add or remove accessor expected"); + report.Error (1055, GetLocation ($1), "An add or remove accessor expected"); $$ = null; } ; @@ -2412,7 +2423,7 @@ add_accessor_declaration : opt_attributes opt_modifiers ADD { if ($2 != ModifierNone) { - Report.Error (1609, GetLocation ($2), "Modifiers cannot be placed on event accessor declarations"); + report.Error (1609, GetLocation ($2), "Modifiers cannot be placed on event accessor declarations"); } current_event.Add = new EventProperty.AddDelegateMethod (current_event, (Attributes) $1, GetLocation ($3)); @@ -2428,7 +2439,7 @@ add_accessor_declaration current_event.Add.Block = (ToplevelBlock) $5; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_event.Add.Block.StartLocation, + report.Error (531, current_event.Add.Block.StartLocation, "`{0}': interface members cannot have a definition", current_event.Add.GetSignatureForError ()); } @@ -2440,7 +2451,7 @@ remove_accessor_declaration : opt_attributes opt_modifiers REMOVE { if ($2 != ModifierNone) { - Report.Error (1609, GetLocation ($2), "Modifiers cannot be placed on event accessor declarations"); + report.Error (1609, GetLocation ($2), "Modifiers cannot be placed on event accessor declarations"); } current_event.Remove = new EventProperty.RemoveDelegateMethod (current_event, (Attributes) $1, GetLocation ($3)); @@ -2456,7 +2467,7 @@ remove_accessor_declaration current_event.Remove.Block = (ToplevelBlock) $5; if (current_container.Kind == MemberKind.Interface) { - Report.Error (531, current_event.Remove.Block.StartLocation, + report.Error (531, current_event.Remove.Block.StartLocation, "`{0}': interface members cannot have a definition", current_event.Remove.GetSignatureForError ()); } @@ -2467,7 +2478,7 @@ remove_accessor_declaration event_accessor_block : opt_semicolon { - Report.Error (73, lexer.Location, "An add or remove accessor must have a body"); + report.Error (73, lexer.Location, "An add or remove accessor must have a body"); $$ = null; } | block; @@ -2489,7 +2500,7 @@ enum_declaration MemberName name = (MemberName) $4; if (name.IsGeneric) { - Report.Error (1675, name.Location, "Enums cannot have type parameters"); + report.Error (1675, name.Location, "Enums cannot have type parameters"); } push_current_class (new Enum (current_namespace, current_class, (TypeExpression) $5, (Modifiers) $2, MakeName (name), (Attributes) $1), null); @@ -2521,7 +2532,7 @@ opt_enum_base { var te = $2 as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { - Enum.Error_1008 (GetLocation ($2), Report); + Enum.Error_1008 (GetLocation ($2), report); $$ = null; } else { $$ = $2; @@ -2818,7 +2829,7 @@ type_parameter | error { if (GetTokenName (yyToken) == "type") - Report.Error (81, GetLocation ($1), "Type parameter declaration must be an identifier not a type"); + report.Error (81, GetLocation ($1), "Type parameter declaration must be an identifier not a type"); else Error_SyntaxError (yyToken); @@ -2851,7 +2862,7 @@ type : type_expression_or_array | VOID { - Expression.Error_VoidInvalidInTheContext (GetLocation ($1), Report); + Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report); $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1)); } ; @@ -2860,7 +2871,7 @@ simple_type : type_expression | VOID { - Expression.Error_VoidInvalidInTheContext (GetLocation ($1), Report); + Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report); $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1)); } ; @@ -2869,7 +2880,7 @@ parameter_type : type_expression_or_array | VOID { - Report.Error (1536, GetLocation ($1), "Invalid parameter type `void'"); + report.Error (1536, GetLocation ($1), "Invalid parameter type `void'"); $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1)); } ; @@ -2934,7 +2945,7 @@ base_type_name : type { if ($1 is ComposedCast) { - Report.Error (1521, GetLocation ($1), "Invalid base type `{0}'", ((ComposedCast)$1).GetSignatureForError ()); + report.Error (1521, GetLocation ($1), "Invalid base type `{0}'", ((ComposedCast)$1).GetSignatureForError ()); } $$ = $1; } @@ -3184,7 +3195,7 @@ member_initializer } | OPEN_BRACE CLOSE_BRACE { - Report.Error (1920, GetLocation ($1), "An element initializer cannot be empty"); + report.Error (1920, GetLocation ($1), "An element initializer cannot be empty"); $$ = null; } ; @@ -3223,7 +3234,7 @@ argument_list for (int i = 0; i < list.Count; ++i) { NamedArgument na = list [i] as NamedArgument; if (na != null && na.Name == a.Name) - Report.Error (1740, na.Location, "Named argument `{0}' specified multiple times", + report.Error (1740, na.Location, "Named argument `{0}' specified multiple times", na.Name); } @@ -3233,12 +3244,12 @@ argument_list } | argument_list COMMA { - Report.Error (839, GetLocation ($2), "An argument is missing"); + report.Error (839, GetLocation ($2), "An argument is missing"); $$ = $1; } | COMMA error { - Report.Error (839, GetLocation ($1), "An argument is missing"); + report.Error (839, GetLocation ($1), "An argument is missing"); $$ = null; } ; @@ -3409,7 +3420,7 @@ array_creation_expression | NEW new_expr_type rank_specifiers opt_array_initializer { if ($4 == null) - Report.Error (1586, GetLocation ($1), "Array creation must have array size or array initializer"); + report.Error (1586, GetLocation ($1), "Array creation must have array size or array initializer"); $$ = new ArrayCreation ((FullNamedExpression) $2, (ComposedTypeSpecifier) $3, (ArrayInitializer) $4, GetLocation ($1)); } @@ -3422,7 +3433,7 @@ array_creation_expression } | NEW new_expr_type OPEN_BRACKET CLOSE_BRACKET OPEN_BRACKET_EXPR error CLOSE_BRACKET { - Report.Error (178, GetLocation ($6), "Invalid rank specifier, expecting `,' or `]'"); + report.Error (178, GetLocation ($6), "Invalid rank specifier, expecting `,' or `]'"); $$ = new ArrayCreation ((FullNamedExpression) $2, null, GetLocation ($1)); } | NEW new_expr_type error @@ -3501,7 +3512,7 @@ anonymous_type_parameter } | error { - Report.Error (746, lexer.Location, + report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); $$ = null; } @@ -3698,11 +3709,11 @@ unchecked_expression } ; -pointer_member_access - : primary_expression OP_PTR IDENTIFIER +pointer_member_access + : primary_expression OP_PTR IDENTIFIER opt_type_argument_list { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess (new Indirection ((Expression) $1, GetLocation ($2)), lt.Value, lt.Location); + $$ = new MemberAccess (new Indirection ((Expression) $1, GetLocation ($2)), lt.Value, (TypeArguments) $4, lt.Location); } ; @@ -3714,6 +3725,11 @@ anonymous_method_expression block { $$ = end_anonymous ((ParametersBlock) $4); + if ((ParametersCompiled) $2 != ParametersCompiled.Undefined) { + lbag.AddLocation ($$, GetLocation ($1), savedOpenLocation, savedCloseLocation); + } else { + lbag.AddLocation ($$, GetLocation ($1)); + } } ; @@ -3734,6 +3750,8 @@ anonymous_method_signature { valid_param_mod = 0; $$ = $3; + savedOpenLocation = GetLocation ($1); + savedCloseLocation = GetLocation ($2); } ; @@ -4033,7 +4051,7 @@ lambda_parameter_list var pars = (List) $1; Parameter p = (Parameter)$3; if (pars[0].GetType () != p.GetType ()) { - Report.Error (748, p.Location, "All lambda parameters must be typed either explicitly or implicitly"); + report.Error (748, p.Location, "All lambda parameters must be typed either explicitly or implicitly"); } pars.Add (p); @@ -4222,7 +4240,7 @@ opt_partial : /* empty */ { $$ = null; } | PARTIAL - { $$ = $1; } // location + { $$ = $1; StoreModifierLocation (Modifiers.PARTIAL, GetLocation ($1)); } // location ; opt_modifiers @@ -4242,11 +4260,11 @@ modifiers var m2 = (Modifiers) $2; if ((m1 & m2) != 0) { - Report.Error (1004, lexer.Location - ModifiersExtensions.Name (m2).Length, + report.Error (1004, lexer.Location - ModifiersExtensions.Name (m2).Length, "Duplicate `{0}' modifier", ModifiersExtensions.Name (m2)); } else if ((m2 & Modifiers.AccessibilityMask) != 0 && (m1 & Modifiers.AccessibilityMask) != 0 && ((m2 | m1 & Modifiers.AccessibilityMask) != (Modifiers.PROTECTED | Modifiers.INTERNAL))) { - Report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length, + report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length, "More than one protection modifier specified"); } @@ -4261,7 +4279,7 @@ modifier StoreModifierLocation ($$, GetLocation ($1)); if (current_container == module) - Report.Error (1530, GetLocation ($1), "Keyword `new' is not allowed on namespace elements"); + report.Error (1530, GetLocation ($1), "Keyword `new' is not allowed on namespace elements"); } | PUBLIC { @@ -4372,7 +4390,7 @@ type_parameter_constraints_clauses foreach (Constraints c in constraints) { if (new_constraint.TypeParameter.Value == c.TypeParameter.Value) { - Report.Error (409, new_constraint.Location, + report.Error (409, new_constraint.Location, "A constraint clause has already been specified for type parameter `{0}'", new_constraint.TypeParameter.Value); } @@ -4403,17 +4421,17 @@ type_parameter_constraints var constraints = (List) $1; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; if (prev != null && (prev.Constraint & SpecialConstraint.Constructor) != 0) { - Report.Error (401, GetLocation ($2), "The `new()' constraint must be the last constraint specified"); + report.Error (401, GetLocation ($2), "The `new()' constraint must be the last constraint specified"); } prev = $3 as SpecialContraintExpr; if (prev != null) { if ((prev.Constraint & (SpecialConstraint.Class | SpecialConstraint.Struct)) != 0) { - Report.Error (449, prev.Location, "The `class' or `struct' constraint must be the first constraint specified"); + report.Error (449, prev.Location, "The `class' or `struct' constraint must be the first constraint specified"); } else { prev = constraints [0] as SpecialContraintExpr; if (prev != null && (prev.Constraint & SpecialConstraint.Struct) != 0) { - Report.Error (451, GetLocation ($3), "The `new()' constraint cannot be used with the `struct' constraint"); + report.Error (451, GetLocation ($3), "The `new()' constraint cannot be used with the `struct' constraint"); } } } @@ -4427,7 +4445,7 @@ type_parameter_constraint : type { if ($1 is ComposedCast) - Report.Error (706, GetLocation ($1), "Invalid constraint type `{0}'", ((ComposedCast)$1).GetSignatureForError ()); + report.Error (706, GetLocation ($1), "Invalid constraint type `{0}'", ((ComposedCast)$1).GetSignatureForError ()); $$ = $1; } @@ -4609,12 +4627,12 @@ embedded_statement : valid_declaration_statement | block_variable_declaration { - Report.Error (1023, GetLocation ($1), "An embedded statement may not be a declaration or labeled statement"); + report.Error (1023, GetLocation ($1), "An embedded statement may not be a declaration or labeled statement"); $$ = null; } | labeled_statement { - Report.Error (1023, GetLocation ($1), "An embedded statement may not be a declaration or labeled statement"); + report.Error (1023, GetLocation ($1), "An embedded statement may not be a declaration or labeled statement"); $$ = null; } | error @@ -4720,7 +4738,7 @@ variable_type_simple } | VOID { - Expression.Error_VoidInvalidInTheContext (GetLocation ($1), Report); + Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report); $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1)); } ; @@ -4784,7 +4802,7 @@ opt_local_variable_initializer | error { if (yyToken == Token.OPEN_BRACKET_EXPR) { - Report.Error (650, lexer.Location, + report.Error (650, lexer.Location, "Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type"); } else { Error_SyntaxError (yyToken); @@ -4826,7 +4844,7 @@ variable_declarator const_variable_initializer : /* empty */ { - Report.Error (145, lexer.Location, "A const field requires a value to be provided"); + report.Error (145, lexer.Location, "A const field requires a value to be provided"); } | ASSIGN constant_initializer_expr { @@ -4866,7 +4884,7 @@ block_variable_initializer } | STACKALLOC simple_type { - Report.Error (1575, GetLocation ($1), "A stackalloc expression requires [] after type"); + report.Error (1575, GetLocation ($1), "A stackalloc expression requires [] after type"); $$ = new StackAlloc ((Expression) $2, null, GetLocation ($1)); } ; @@ -4894,7 +4912,7 @@ statement_expression { ExpressionStatement s = $1 as ExpressionStatement; if (s == null) { - Expression.Error_InvalidExpressionStatement (Report, GetLocation ($1)); + Expression.Error_InvalidExpressionStatement (report, GetLocation ($1)); s = EmptyExpressionStatement.Instance; } @@ -4962,7 +4980,7 @@ switch_statement opt_switch_sections : /* empty */ { - Report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); + report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); $$ = new List (); } | switch_sections @@ -5148,7 +5166,7 @@ statement_expression_list foreach_statement : FOREACH open_parens_any type IN expression CLOSE_PARENS { - Report.Error (230, GetLocation ($1), "Type and identifier are both required in a foreach statement"); + report.Error (230, GetLocation ($1), "Type and identifier are both required in a foreach statement"); $$ = null; } | FOREACH open_parens_any type IDENTIFIER IN expression CLOSE_PARENS @@ -5239,9 +5257,9 @@ yield_statement var lt = (Tokenizer.LocatedToken) $1; string s = lt.Value; if (s != "yield"){ - Report.Error (1003, lt.Location, "; expected"); + report.Error (1003, lt.Location, "; expected"); } else if ($3 == null) { - Report.Error (1627, GetLocation ($4), "Expression expected after yield return"); + report.Error (1627, GetLocation ($4), "Expression expected after yield return"); } else if (lang_version == LanguageVersion.ISO_1){ FeatureIsNotAvailable (lt.Location, "iterators"); } @@ -5255,7 +5273,7 @@ yield_statement var lt = (Tokenizer.LocatedToken) $1; string s = lt.Value; if (s != "yield"){ - Report.Error (1003, lt.Location, "; expected"); + report.Error (1003, lt.Location, "; expected"); } else if (lang_version == LanguageVersion.ISO_1){ FeatureIsNotAvailable (lt.Location, "iterators"); } @@ -5288,7 +5306,7 @@ try_statement } | TRY block error { - Report.Error (1524, GetLocation ($1), "Expected catch or finally"); + report.Error (1524, GetLocation ($1), "Expected catch or finally"); $$ = null; } ; @@ -5307,7 +5325,7 @@ catch_clauses Catch c = (Catch) $2; if (l [0].IsGeneral) { - Report.Error (1017, c.loc, "Try statement already has an empty catch block"); + report.Error (1017, c.loc, "Try statement already has an empty catch block"); } else { if (c.IsGeneral) l.Insert (0, c); @@ -5351,7 +5369,7 @@ catch_clause | CATCH open_parens_any error { if (yyToken == Token.CLOSE_PARENS) { - Report.Error (1015, lexer.Location, + report.Error (1015, lexer.Location, "A type that derives from `System.Exception', `object', or `string' expected"); } else { Error_SyntaxError (yyToken); @@ -5464,7 +5482,7 @@ using_statement using_or_fixed_variable_initializer : /* empty */ { - Report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); + report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } | ASSIGN variable_initializer { @@ -5651,6 +5669,7 @@ select_or_group_clause BY expression { $$ = new Linq.GroupBy ((Linq.QueryBlock)current_block, (Expression)$3, linq_clause_blocks.Pop (), (Expression)$6, GetLocation ($1)); + lbag.AddLocation ($$, GetLocation ($5)); current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -5689,7 +5708,8 @@ let_clause var lt = (Tokenizer.LocatedToken) $2; var sn = new Linq.RangeVariable (lt.Value, lt.Location); $$ = new Linq.Let ((Linq.QueryBlock) current_block, sn, (Expression)$5, GetLocation ($1)); - + lbag.AddLocation ($$, GetLocation ($3)); + current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -5751,6 +5771,7 @@ join_clause if ($12 == null) { into = sn; $$ = new Linq.Join (block, sn, (Expression)$5, outer_selector, (Linq.QueryBlock) current_block, GetLocation ($1)); + lbag.AddLocation ($$, GetLocation ($3), GetLocation ($6), GetLocation ($9)); } else { // // Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions @@ -5767,6 +5788,7 @@ join_clause into = new Linq.RangeVariable (lt.Value, lt.Location); $$ = new Linq.GroupJoin (block, sn, (Expression)$5, outer_selector, (Linq.QueryBlock) current_block, into, GetLocation ($1)); + lbag.AddLocation ($$, GetLocation ($3), GetLocation ($6), GetLocation ($9), GetLocation ($12)); } current_block = block.Parent; @@ -5900,10 +5922,12 @@ order_by | expression ASCENDING { $$ = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)$1); + lbag.AddLocation ($$, GetLocation ($2)); } | expression DESCENDING { $$ = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)$1); + lbag.AddLocation ($$, GetLocation ($2)); } ; @@ -5915,10 +5939,12 @@ then_by | expression ASCENDING { $$ = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)$1); + lbag.AddLocation ($$, GetLocation ($2)); } | expression DESCENDING { $$ = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)$1); + lbag.AddLocation ($$, GetLocation ($2)); } ; @@ -6025,6 +6051,126 @@ close_brace_or_complete_completion : CLOSE_BRACE | COMPLETE_COMPLETION ; + +// +// XML documentation code references micro parser +// +documentation_parsing + : DOC_SEE doc_cref + { + module.DocumentationBuilder.ParsedName = (MemberName) $2; + } + ; + +doc_cref + : doc_type_declaration_name opt_doc_method_sig + { + module.DocumentationBuilder.ParsedParameters = (List)$2; + } + | builtin_types opt_doc_method_sig + { + module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)$1; + module.DocumentationBuilder.ParsedParameters = (List)$2; + $$ = null; + } + | builtin_types DOT IDENTIFIER opt_doc_method_sig + { + module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)$1; + module.DocumentationBuilder.ParsedParameters = (List)$4; + var lt = (Tokenizer.LocatedToken) $3; + $$ = new MemberName (lt.Value); + } + | doc_type_declaration_name DOT THIS + { + $$ = new MemberName ((MemberName) $1, new MemberName (MemberCache.IndexerNameAlias)); + } + | doc_type_declaration_name DOT THIS OPEN_BRACKET + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + } + opt_doc_parameters CLOSE_BRACKET + { + module.DocumentationBuilder.ParsedParameters = (List)$6; + $$ = new MemberName ((MemberName) $1, new MemberName (MemberCache.IndexerNameAlias)); + } + | EXPLICIT OPERATOR type opt_doc_method_sig + { + var p = (List)$4 ?? new List (1); + p.Add (new DocumentationParameter ((FullNamedExpression) $3)); + module.DocumentationBuilder.ParsedParameters = p; + module.DocumentationBuilder.ParsedOperator = Operator.OpType.Explicit; + $$ = null; + } + | IMPLICIT OPERATOR type opt_doc_method_sig + { + var p = (List)$4 ?? new List (1); + p.Add (new DocumentationParameter ((FullNamedExpression) $3)); + module.DocumentationBuilder.ParsedParameters = p; + module.DocumentationBuilder.ParsedOperator = Operator.OpType.Implicit; + $$ = null; + } + | OPERATOR overloadable_operator opt_doc_method_sig + { + var p = (List)$3 ?? new List (1); + module.DocumentationBuilder.ParsedParameters = p; + module.DocumentationBuilder.ParsedOperator = (Operator.OpType) $2; + $$ = null; + } + ; + +doc_type_declaration_name + : type_declaration_name + | doc_type_declaration_name DOT type_declaration_name + { + $$ = new MemberName (((MemberName) $1), (MemberName) $3); + } + ; + +opt_doc_method_sig + : /* empty */ + | OPEN_PARENS + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + } + opt_doc_parameters CLOSE_PARENS + { + $$ = $3; + } + ; + +opt_doc_parameters + : /* empty */ + { + $$ = new List (0); + } + | doc_parameters + ; + +doc_parameters + : doc_parameter + { + var parameters = new List (); + parameters.Add ((DocumentationParameter) $1); + $$ = parameters; + } + | doc_parameters COMMA doc_parameter + { + var parameters = $1 as List; + parameters.Add ((DocumentationParameter) $3); + $$ = parameters; + } + ; + +doc_parameter + : opt_parameter_modifier parameter_type + { + if ($1 != null) + $$ = new DocumentationParameter ((Parameter.Modifier) $1, (FullNamedExpression) $2); + else + $$ = new DocumentationParameter ((FullNamedExpression) $2); + } + ; + %% // @@ -6046,42 +6192,42 @@ class OperatorDeclaration { void Error_ExpectingTypeName (Expression expr) { if (expr is Invocation){ - Report.Error (1002, expr.Location, "Expecting `;'"); + report.Error (1002, expr.Location, "Expecting `;'"); } else { - Expression.Error_InvalidExpressionStatement (Report, expr.Location); + Expression.Error_InvalidExpressionStatement (report, expr.Location); } } void Error_ParameterModifierNotValid (string modifier, Location loc) { - Report.Error (631, loc, "The parameter modifier `{0}' is not valid in this context", + report.Error (631, loc, "The parameter modifier `{0}' is not valid in this context", modifier); } void Error_DuplicateParameterModifier (Location loc, Parameter.Modifier mod) { - Report.Error (1107, loc, "Duplicate parameter modifier `{0}'", + report.Error (1107, loc, "Duplicate parameter modifier `{0}'", Parameter.GetModifierSignature (mod)); } void Error_TypeExpected (Location loc) { - Report.Error (1031, loc, "Type expected"); + report.Error (1031, loc, "Type expected"); } void Error_UnsafeCodeNotAllowed (Location loc) { - Report.Error (227, loc, "Unsafe code requires the `unsafe' command line option to be specified"); + report.Error (227, loc, "Unsafe code requires the `unsafe' command line option to be specified"); } void Warning_EmptyStatement (Location loc) { - Report.Warning (642, 3, loc, "Possible mistaken empty statement"); + report.Warning (642, 3, loc, "Possible mistaken empty statement"); } void Error_NamedArgumentExpected (NamedArgument a) { - Report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); + report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); } void push_current_class (TypeContainer tc, object partial_token) @@ -6159,7 +6305,7 @@ string CheckAttributeTarget (string a, Location l) return a; } - Report.Warning (658, 1, l, + report.Warning (658, 1, l, "`{0}' is invalid attribute target. All attributes in this attribute section will be ignored", a); return string.Empty; } @@ -6183,7 +6329,7 @@ static bool IsUnaryOperator (Operator.OpType op) void syntax_error (Location l, string msg) { - Report.Error (1003, l, "Syntax error, " + msg); + report.Error (1003, l, "Syntax error, " + msg); } Tokenizer lexer; @@ -6200,6 +6346,11 @@ static CSharpParser () } public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file) + : this (reader, file, file.NamespaceContainer.Module.Compiler.Report) +{ +} + +public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file, Report report) { this.file = file; current_namespace = file.NamespaceContainer; @@ -6207,6 +6358,8 @@ public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file) this.module = current_namespace.Module; this.compiler = module.Compiler; this.settings = compiler.Settings; + this.report = report; + lang_version = settings.Version; doc_support = settings.DocumentationFile != null; current_class = current_namespace.SlaveDeclSpace; @@ -6238,13 +6391,13 @@ public void parse () } if (e is yyParser.yyException) { - Report.Error (-25, lexer.Location, "Parsing error"); + report.Error (-25, lexer.Location, "Parsing error"); } else { // Used by compiler-tester to test internal errors if (yacc_verbose_flag > 0) throw; - Report.Error (589, lexer.Location, "Internal compiler error during parsing"); + report.Error (589, lexer.Location, "Internal compiler error during parsing"); } } } @@ -6252,9 +6405,9 @@ public void parse () void CheckToken (int error, int yyToken, string msg, Location loc) { if (yyToken >= Token.FIRST_KEYWORD && yyToken <= Token.LAST_KEYWORD) - Report.Error (error, loc, "{0}: `{1}' is a keyword", msg, GetTokenName (yyToken)); + report.Error (error, loc, "{0}: `{1}' is a keyword", msg, GetTokenName (yyToken)); else - Report.Error (error, loc, msg); + report.Error (error, loc, msg); } string ConsumeStoredComment () @@ -6267,7 +6420,7 @@ string ConsumeStoredComment () void FeatureIsNotAvailable (Location loc, string feature) { - compiler.Report.FeatureIsNotAvailable (compiler, loc, feature); + report.FeatureIsNotAvailable (compiler, loc, feature); } Location GetLocation (object obj) @@ -6287,10 +6440,6 @@ Location GetLocation (object obj) return lexer.Location; } -Report Report { - get { return compiler.Report; } -} - public LocationsBag LocationsBag { get { return lbag; @@ -6369,12 +6518,6 @@ AnonymousMethodExpression end_anonymous (ParametersBlock anon_block) return retval; } -public NamespaceEntry CurrentNamespace { - get { - return current_namespace; - } -} - void Error_SyntaxError (int token) { Error_SyntaxError (0, token, "Unexpected symbol"); @@ -6393,7 +6536,7 @@ void Error_SyntaxError (int error_code, int token, string msg) if (error_code == 0) { if (expecting == "`identifier'") { if (token > Token.FIRST_KEYWORD && token < Token.LAST_KEYWORD) { - Report.Error (1041, loc, "Identifier expected, `{0}' is a keyword", symbol); + report.Error (1041, loc, "Identifier expected, `{0}' is a keyword", symbol); return; } @@ -6407,9 +6550,9 @@ void Error_SyntaxError (int error_code, int token, string msg) } if (string.IsNullOrEmpty (expecting)) - Report.Error (error_code, loc, "{1} `{0}'", symbol, msg); + report.Error (error_code, loc, "{1} `{0}'", symbol, msg); else - Report.Error (error_code, loc, "{2} `{0}', expecting {1}", symbol, expecting, msg); + report.Error (error_code, loc, "{2} `{0}', expecting {1}", symbol, expecting, msg); } string GetExpecting () diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-tokenizer.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-tokenizer.cs index da7328bc6..d7819ee5f 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-tokenizer.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/cs-tokenizer.cs @@ -196,6 +196,7 @@ namespace Mono.CSharp // Set when parsing generic declaration (type or method header) // public bool parsing_generic_declaration; + public bool parsing_generic_declaration_doc; // // The value indicates that we have not reach any declaration or @@ -205,18 +206,19 @@ namespace Mono.CSharp public bool parsing_attribute_section; // - // The special character to inject on streams to trigger the EXPRESSION_PARSE - // token to be returned. It just happens to be a Unicode character that - // would never be part of a program (can not be an identifier). + // The special characters to inject on streams to run the unit parser + // in the special expression mode. Using private characters from + // Plane Sixteen (U+100000 to U+10FFFD) // // This character is only tested just before the tokenizer is about to report // an error; So on the regular operation mode, this addition will have no // impact on the tokenizer's performance. // - public const int EvalStatementParserCharacter = 0x2190; // Unicode Left Arrow - public const int EvalCompilationUnitParserCharacter = 0x2191; // Unicode Arrow - public const int EvalUsingDeclarationsParserCharacter = 0x2192; // Unicode Arrow + public const int EvalStatementParserCharacter = 0x100000; + public const int EvalCompilationUnitParserCharacter = 0x100001; + public const int EvalUsingDeclarationsParserCharacter = 0x100002; + public const int DocumentationXref = 0x100003; // // XML documentation buffer. The save point is used to divide @@ -1177,6 +1179,7 @@ namespace Mono.CSharp case Token.CLOSE_PARENS: case Token.OPEN_BRACKET: case Token.OP_GENERICS_GT: + case Token.INTERR: next_token = Token.INTERR_NULLABLE; break; @@ -2759,9 +2762,10 @@ namespace Mono.CSharp if (c == '\\') { int surrogate; c = escape (c, out surrogate); + if (is_identifier_part_character ((char) c)) + id_builder[pos++] = (char) c; + if (surrogate != 0) { - if (is_identifier_part_character ((char) c)) - id_builder[pos++] = (char) c; c = surrogate; } @@ -3116,7 +3120,8 @@ namespace Mono.CSharp WarningMisplacedComment (Location - 3); } } else { - check_incorrect_doc_comment (); + if (xml_comment_buffer.Length > 0) + doc_state = XmlCommentState.NotAllowed; } } else { bool isDoc = peek_char () == '/'; @@ -3310,6 +3315,8 @@ namespace Mono.CSharp return Token.EVAL_COMPILATION_UNIT_PARSER; case EvalUsingDeclarationsParserCharacter: return Token.EVAL_USING_DECLARATIONS_UNIT_PARSER; + case DocumentationXref: + return Token.DOC_SEE; } if (is_identifier_start_character (c)) { @@ -3389,7 +3396,7 @@ namespace Mono.CSharp // Save current position and parse next token. PushPosition (); if (parse_less_than ()) { - if (parsing_generic_declaration && token () != Token.DOT) { + if (parsing_generic_declaration && (parsing_generic_declaration_doc || token () != Token.DOT)) { d = Token.OP_GENERICS_LT_DECL; } else { d = Token.OP_GENERICS_LT; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/decl.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/decl.cs index ff0363b41..66d5cf432 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/decl.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/decl.cs @@ -13,6 +13,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; #if NET_2_1 using XmlElement = System.Object; @@ -26,6 +27,7 @@ using IKVM.Reflection.Emit; #else using System.Reflection; using System.Reflection.Emit; +using Mono.Collections.Generic; #endif namespace Mono.CSharp { @@ -33,6 +35,7 @@ namespace Mono.CSharp { // // Better name would be DottenName // + [DebuggerDisplay ("{GetSignatureForError()}")] public class MemberName { public readonly string Name; public TypeArguments TypeArguments; @@ -691,7 +694,7 @@ namespace Mono.CSharp { return true; } - public virtual IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope) + public virtual IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) { return Parent.LookupExtensionMethod (extensionType, name, arity, ref scope); } @@ -814,22 +817,11 @@ namespace Mono.CSharp { return true; } - // - // Raised (and passed an XmlElement that contains the comment) - // when GenerateDocComment is writing documentation expectedly. - // - internal virtual void OnGenerateDocComment (XmlElement intermediateNode) - { - } - // // Returns a string that represents the signature for this // member which should be used in XML documentation. // - public virtual string GetDocCommentName () - { - return DocCommentHeader + Parent.Name + "." + Name; - } + public abstract string GetSignatureForDocumentation (); // // Generates xml doc comments (if any), and if required, @@ -1089,6 +1081,11 @@ namespace Mono.CSharp { return cls == false; } + public virtual string GetSignatureForDocumentation () + { + return DeclaringType.GetSignatureForDocumentation () + "." + Name; + } + public virtual string GetSignatureForError () { var bf = MemberDefinition as Property.BackingField; @@ -1252,7 +1249,7 @@ namespace Mono.CSharp { // This is the namespace in which this typecontainer // was declared. We use this to resolve names. // - public NamespaceEntry NamespaceEntry; + public NamespaceContainer NamespaceEntry; public readonly string Basename; @@ -1281,7 +1278,7 @@ namespace Mono.CSharp { static readonly string[] attribute_targets = new string [] { "type" }; - public DeclSpace (NamespaceEntry ns, DeclSpace parent, MemberName name, + public DeclSpace (NamespaceContainer ns, DeclSpace parent, MemberName name, Attributes attrs) : base (parent, name, attrs) { @@ -1324,17 +1321,13 @@ namespace Mono.CSharp { return false; } - if (this is ModuleContainer) { - Report.Error (101, symbol.Location, - "The namespace `{0}' already contains a definition for `{1}'", - ((DeclSpace)symbol).NamespaceEntry.GetSignatureForError (), symbol.MemberName.Name); - } else if (symbol is TypeParameter) { + if (symbol is TypeParameter) { Report.Error (692, symbol.Location, "Duplicate type parameter `{0}'", symbol.GetSignatureForError ()); } else { Report.Error (102, symbol.Location, - "The type `{0}' already contains a definition for `{1}'", - GetSignatureForError (), symbol.MemberName.Name); + "The type `{0}' already contains a definition for `{1}'", + GetSignatureForError (), symbol.MemberName.Name); } return false; @@ -1385,9 +1378,9 @@ namespace Mono.CSharp { type.GetSignatureForError ()); } - public override string GetDocCommentName () + public override string GetSignatureForDocumentation () { - return DocCommentHeader + Name; + return Name; } public override string GetSignatureForError () @@ -1433,6 +1426,13 @@ namespace Mono.CSharp { return type_param_list; } +#if FULL_AST + public List PlainConstraints { + get; + private set; + } +#endif + public List Constraints { get; private set; @@ -1440,7 +1440,14 @@ namespace Mono.CSharp { public virtual void SetParameterInfo (List constraints_list) { +#if FULL_AST + if (constraints_list != null) { + this.PlainConstraints = constraints_list; + constraints_list = this.Constraints = new List (constraints_list); + } +#else this.Constraints = constraints_list; +#endif if (!is_generic) { if (constraints_list != null) { Report.Error ( diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/delegate.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/delegate.cs index e79894dd7..8809c95a2 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/delegate.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/delegate.cs @@ -54,7 +54,7 @@ namespace Mono.CSharp { Modifiers.UNSAFE | Modifiers.PRIVATE; - public Delegate (NamespaceEntry ns, DeclSpace parent, FullNamedExpression type, + public Delegate (NamespaceContainer ns, DeclSpace parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, ParametersCompiled param_list, Attributes attrs) : base (ns, parent, name, attrs, MemberKind.Delegate) @@ -150,7 +150,7 @@ namespace Mono.CSharp { } } - ReturnType = ReturnType.ResolveAsTypeTerminal (this, false); + ReturnType = ReturnType.ResolveAsType (this); if (ReturnType == null) return false; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/doc.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/doc.cs index 41dc98467..46da315aa 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/doc.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/doc.cs @@ -1,8 +1,9 @@ // // doc.cs: Support for XML documentation comment. // -// Author: +// Authors: // Atsushi Enomoto +// Marek Safar (marek.safar@gmail.com> // // Dual licensed under the terms of the MIT X11 or GNU GPL // @@ -17,7 +18,6 @@ using System.Text; using System.Xml; using System.Linq; - namespace Mono.CSharp { // @@ -35,10 +35,9 @@ namespace Mono.CSharp // // The output for XML documentation. // - public XmlWriter XmlCommentOutput; + XmlWriter XmlCommentOutput; static readonly string line_head = Environment.NewLine + " "; - static readonly char[] wsChars = new char[] { ' ', '\t', '\n', '\r' }; // // Stores XmlDocuments that are included in XML documentation. @@ -59,6 +58,22 @@ namespace Mono.CSharp } } + public MemberName ParsedName { + get; set; + } + + public List ParsedParameters { + get; set; + } + + public TypeExpression ParsedBuiltinType { + get; set; + } + + public Operator.OpType? ParsedOperator { + get; set; + } + XmlNode GetDocCommentNode (MemberCore mc, string name) { // FIXME: It could be even optimizable as not @@ -101,13 +116,16 @@ namespace Mono.CSharp // internal void GenerateDocumentationForMember (MemberCore mc) { - string name = mc.GetDocCommentName (); + string name = mc.DocCommentHeader + mc.GetSignatureForDocumentation (); XmlNode n = GetDocCommentNode (mc, name); XmlElement el = n as XmlElement; if (el != null) { - mc.OnGenerateDocComment (el); + var pm = mc as IParametersMember; + if (pm != null) { + CheckParametersComments (mc, pm, el); + } // FIXME: it could be done with XmlReader XmlNodeList nl = n.SelectNodes (".//include"); @@ -211,435 +229,235 @@ namespace Mono.CSharp HandleXrefCommon (mc, ds, seealso); } - // - // returns a full runtime type name from a name which might - // be C# specific type name. - // - TypeSpec FindDocumentedType (MemberCore mc, string name, DeclSpace ds, string cref) - { - bool is_array = false; - string identifier = name; - if (name [name.Length - 1] == ']') { - string tmp = name.Substring (0, name.Length - 1).Trim (wsChars); - if (tmp [tmp.Length - 1] == '[') { - identifier = tmp.Substring (0, tmp.Length - 1).Trim (wsChars); - is_array = true; - } - } - TypeSpec t = FindDocumentedTypeNonArray (mc, identifier, ds, cref); - if (t != null && is_array) - t = ArrayContainer.MakeType (mc.Module, t); - return t; - } - - TypeSpec FindDocumentedTypeNonArray (MemberCore mc, string identifier, DeclSpace ds, string cref) + FullNamedExpression ResolveMemberName (IMemberContext context, MemberName mn) { - var types = module.Compiler.BuiltinTypes; - switch (identifier) { - case "int": - return types.Int; - case "uint": - return types.UInt; - case "short": - return types.Short; - case "ushort": - return types.UShort; - case "long": - return types.Long; - case "ulong": - return types.ULong; - case "float": - return types.Float; - case "double": - return types.Double; - case "char": - return types.Char; - case "decimal": - return types.Decimal; - case "byte": - return types.Byte; - case "sbyte": - return types.SByte; - case "object": - return types.Object; - case "bool": - return types.Bool; - case "string": - return types.String; - case "void": - return types.Void; - } - FullNamedExpression e = ds.LookupNamespaceOrType (identifier, 0, mc.Location, false); - if (e != null) { - if (!(e is TypeExpr)) - return null; - return e.Type; - } - int index = identifier.LastIndexOf ('.'); - if (index < 0) - return null; + if (mn.Left == null) + return context.LookupNamespaceOrType (mn.Name, mn.Arity, Location.Null, /*ignore_cs0104=*/ false); - var nsName = identifier.Substring (0, index); - var typeName = identifier.Substring (index + 1); - Namespace ns = ds.NamespaceEntry.NS.GetNamespace (nsName, false); - ns = ns ?? mc.Module.GlobalRootNamespace.GetNamespace(nsName, false); - if (ns != null) { - var te = ns.LookupType(mc, typeName, 0, true, mc.Location); - if(te != null) - return te.Type; - } + var left = ResolveMemberName (context, mn.Left); + var ns = left as Namespace; + if (ns != null) + return ns.LookupTypeOrNamespace (context, mn.Name, mn.Arity, Location.Null); - int warn; - TypeSpec parent = FindDocumentedType (mc, identifier.Substring (0, index), ds, cref); - if (parent == null) - return null; - // no need to detect warning 419 here - var ts = FindDocumentedMember (mc, parent, - identifier.Substring (index + 1), - null, ds, out warn, cref, false, null) as TypeSpec; - if (ts != null) - return ts; - return null; - } + TypeExpr texpr = left as TypeExpr; + if (texpr != null) { + var found = MemberCache.FindNestedType (texpr.Type, ParsedName.Name, ParsedName.Arity); + if (found != null) + return new TypeExpression (found, Location.Null); - // - // Returns a MemberInfo that is referenced in XML documentation - // (by "see" or "seealso" elements). - // - MemberSpec FindDocumentedMember (MemberCore mc, - TypeSpec type, string member_name, AParametersCollection param_list, - DeclSpace ds, out int warning_type, string cref, - bool warn419, string name_for_error) - { -// for (; type != null; type = type.DeclaringType) { - var mi = FindDocumentedMemberNoNest ( - mc, type, member_name, param_list, ds, - out warning_type, cref, warn419, - name_for_error); - if (mi != null) - return mi; // new FoundMember (type, mi); -// } - warning_type = 0; - return null; - } - - MemberSpec FindDocumentedMemberNoNest ( - MemberCore mc, TypeSpec type, string member_name, - AParametersCollection param_list, DeclSpace ds, out int warning_type, - string cref, bool warn419, string name_for_error) - { - warning_type = 0; -// var filter = new MemberFilter (member_name, 0, MemberKind.All, param_list, null); - IList found = null; - while (type != null && found == null) { - found = MemberCache.FindMembers (type, member_name, false); - type = type.DeclaringType; - } - - if (found == null) return null; - - if (warn419 && found.Count > 1) { - Report419 (mc, name_for_error, found.ToArray ()); - } - - return found [0]; - -/* - if (param_list == null) { - // search for fields/events etc. - mis = TypeManager.MemberLookup (type, null, - type, MemberKind.All, - BindingRestriction.None, - member_name, null); - mis = FilterOverridenMembersOut (mis); - if (mis == null || mis.Length == 0) - return null; - if (warn419 && IsAmbiguous (mis)) - Report419 (mc, name_for_error, mis, Report); - return mis [0]; } - MethodSignature msig = new MethodSignature (member_name, null, param_list); - mis = FindMethodBase (type, - BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance, - msig); - - if (warn419 && mis.Length > 0) { - if (IsAmbiguous (mis)) - Report419 (mc, name_for_error, mis, Report); - return mis [0]; - } - - // search for operators (whose parameters exactly - // matches with the list) and possibly report CS1581. - string oper = null; - string return_type_name = null; - if (member_name.StartsWith ("implicit operator ")) { - Operator.GetMetadataName (Operator.OpType.Implicit); - return_type_name = member_name.Substring (18).Trim (wsChars); - } - else if (member_name.StartsWith ("explicit operator ")) { - oper = Operator.GetMetadataName (Operator.OpType.Explicit); - return_type_name = member_name.Substring (18).Trim (wsChars); - } - else if (member_name.StartsWith ("operator ")) { - oper = member_name.Substring (9).Trim (wsChars); - switch (oper) { - // either unary or binary - case "+": - oper = param_list.Length == 2 ? - Operator.GetMetadataName (Operator.OpType.Addition) : - Operator.GetMetadataName (Operator.OpType.UnaryPlus); - break; - case "-": - oper = param_list.Length == 2 ? - Operator.GetMetadataName (Operator.OpType.Subtraction) : - Operator.GetMetadataName (Operator.OpType.UnaryNegation); - break; - default: - oper = Operator.GetMetadataName (oper); - if (oper != null) - break; - - warning_type = 1584; - Report.Warning (1020, 1, mc.Location, "Overloadable {0} operator is expected", param_list.Length == 2 ? "binary" : "unary"); - Report.Warning (1584, 1, mc.Location, "XML comment on `{0}' has syntactically incorrect cref attribute `{1}'", - mc.GetSignatureForError (), cref); - return null; - } - } - // here we still don't consider return type (to - // detect CS1581 or CS1002+CS1584). - msig = new MethodSignature (oper, null, param_list); - - mis = FindMethodBase (type, - BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance, - msig); - if (mis.Length == 0) - return null; // CS1574 - var mi = mis [0]; - TypeSpec expected = mi is MethodSpec ? - ((MethodSpec) mi).ReturnType : - mi is PropertySpec ? - ((PropertySpec) mi).PropertyType : - null; - if (return_type_name != null) { - TypeSpec returnType = FindDocumentedType (mc, return_type_name, ds, cref, Report); - if (returnType == null || returnType != expected) { - warning_type = 1581; - Report.Warning (1581, 1, mc.Location, "Invalid return type in XML comment cref attribute `{0}'", cref); - return null; - } - } - return mis [0]; -*/ + return left; } // - // Processes "see" or "seealso" elements. - // Checks cref attribute. + // Processes "see" or "seealso" elements from cref attribute. // void HandleXrefCommon (MemberCore mc, DeclSpace ds, XmlElement xref) { - string cref = xref.GetAttribute ("cref").Trim (wsChars); + string cref = xref.GetAttribute ("cref"); // when, XmlReader, "if (cref == null)" if (!xref.HasAttribute ("cref")) return; - if (cref.Length == 0) - Report.Warning (1001, 1, mc.Location, "Identifier expected"); - // ... and continue until CS1584. - - string signature; // "x:" are stripped - string name; // method invokation "(...)" are removed - string parameters; // method parameter list - - // When it found '?:' ('T:' 'M:' 'F:' 'P:' 'E:' etc.), - // MS ignores not only its member kind, but also - // the entire syntax correctness. Nor it also does - // type fullname resolution i.e. "T:List(int)" is kept - // as T:List(int), not - // T:System.Collections.Generic.List<System.Int32> + + // Nothing to be resolved the reference is marked explicitly if (cref.Length > 2 && cref [1] == ':') return; - else - signature = cref; - - // Also note that without "T:" any generic type - // indication fails. - - int parens_pos = signature.IndexOf ('('); - int brace_pos = parens_pos >= 0 ? -1 : - signature.IndexOf ('['); - if (parens_pos > 0 && signature [signature.Length - 1] == ')') { - name = signature.Substring (0, parens_pos).Trim (wsChars); - parameters = signature.Substring (parens_pos + 1, signature.Length - parens_pos - 2).Trim (wsChars); - } - else if (brace_pos > 0 && signature [signature.Length - 1] == ']') { - name = signature.Substring (0, brace_pos).Trim (wsChars); - parameters = signature.Substring (brace_pos + 1, signature.Length - brace_pos - 2).Trim (wsChars); - } - else { - name = signature; - parameters = null; - } - Normalize (mc, ref name); - - string identifier = GetBodyIdentifierFromName (name); - - // Check if identifier is valid. - // This check is not necessary to mark as error, but - // csc specially reports CS1584 for wrong identifiers. - string [] name_elems = identifier.Split ('.'); - for (int i = 0; i < name_elems.Length; i++) { - string nameElem = GetBodyIdentifierFromName (name_elems [i]); - if (i > 0) - Normalize (mc, ref nameElem); - if (!Tokenizer.IsValidIdentifier (nameElem) - && nameElem.IndexOf ("operator") < 0) { - Report.Warning (1584, 1, mc.Location, "XML comment on `{0}' has syntactically incorrect cref attribute `{1}'", - mc.GetSignatureForError (), cref); - xref.SetAttribute ("cref", "!:" + signature); - return; - } + + // Additional symbols for < and > are allowed for easier XML typing + cref = cref.Replace ('{', '<').Replace ('}', '>'); + + var encoding = module.Compiler.Settings.Encoding; + var s = new MemoryStream (encoding.GetBytes (cref)); + SeekableStreamReader seekable = new SeekableStreamReader (s, encoding); + + var source_file = new CompilationSourceFile ("{documentation}", "", 1); + var doc_module = new ModuleContainer (module.Compiler); + doc_module.DocumentationBuilder = this; + source_file.NamespaceContainer = new NamespaceContainer (null, doc_module, null, source_file); + + Report parse_report = new Report (new NullReportPrinter ()); + var parser = new CSharpParser (seekable, source_file, parse_report); + ParsedParameters = null; + ParsedName = null; + ParsedBuiltinType = null; + ParsedOperator = null; + parser.Lexer.putback_char = Tokenizer.DocumentationXref; + parser.Lexer.parsing_generic_declaration_doc = true; + parser.parse (); + if (parse_report.Errors > 0) { + Report.Warning (1584, 1, mc.Location, "XML comment on `{0}' has syntactically incorrect cref attribute `{1}'", + mc.GetSignatureForError (), cref); + + xref.SetAttribute ("cref", "!:" + cref); + return; } - // check if parameters are valid - AParametersCollection parameter_types; - if (parameters == null) - parameter_types = null; - else if (parameters.Length == 0) - parameter_types = ParametersCompiled.EmptyReadOnlyParameters; - else { - string [] param_list = parameters.Split (','); - var plist = new List (); - for (int i = 0; i < param_list.Length; i++) { - string param_type_name = param_list [i].Trim (wsChars); - Normalize (mc, ref param_type_name); - TypeSpec param_type = FindDocumentedType (mc, param_type_name, ds, cref); - if (param_type == null) { - Report.Warning (1580, 1, mc.Location, "Invalid type for parameter `{0}' in XML comment cref attribute `{1}'", - (i + 1).ToString (), cref); - return; + MemberSpec member; + string prefix = null; + FullNamedExpression fne = null; + + // + // Try built-in type first because we are using ParsedName as identifier of + // member names on built-in types + // + if (ParsedBuiltinType != null && (ParsedParameters == null || ParsedName != null)) { + member = ParsedBuiltinType.Type; + } else { + member = null; + } + + if (ParsedName != null || ParsedOperator.HasValue) { + TypeSpec type = null; + string member_name = null; + + if (member == null) { + if (ParsedOperator.HasValue) { + type = mc.CurrentType; + } else if (ParsedName.Left != null) { + fne = ResolveMemberName (mc, ParsedName.Left); + if (fne != null) { + var ns = fne as Namespace; + if (ns != null) { + fne = ns.LookupTypeOrNamespace (mc, ParsedName.Name, ParsedName.Arity, Location.Null); + if (fne != null) { + member = fne.Type; + } + } else { + type = fne.Type; + } + } + } else { + fne = ResolveMemberName (mc, ParsedName); + if (fne == null) { + type = mc.CurrentType; + } else if (ParsedParameters == null) { + member = fne.Type; + } else if (fne.Type.MemberDefinition == mc.CurrentType.MemberDefinition) { + member_name = Constructor.ConstructorName; + type = fne.Type; + } } - plist.Add (param_type); + } else { + type = (TypeSpec) member; + member = null; } - parameter_types = ParametersCompiled.CreateFullyResolved (plist.ToArray ()); - } - - TypeSpec type = FindDocumentedType (mc, name, ds, cref); - if (type != null - // delegate must not be referenced with args - && (!type.IsDelegate - || parameter_types == null)) { - string result = GetSignatureForDoc (type) - + (brace_pos < 0 ? String.Empty : signature.Substring (brace_pos)); - xref.SetAttribute ("cref", "T:" + result); - return; // a type - } + if (ParsedParameters != null) { + var old_printer = mc.Module.Compiler.Report.SetPrinter (new NullReportPrinter ()); + foreach (var pp in ParsedParameters) { + pp.Resolve (mc); + } + mc.Module.Compiler.Report.SetPrinter (old_printer); + } - int period = name.LastIndexOf ('.'); - if (period > 0) { - string typeName = name.Substring (0, period); - string member_name = name.Substring (period + 1); - string lookup_name = member_name == "this" ? MemberCache.IndexerNameAlias : member_name; - Normalize (mc, ref lookup_name); - Normalize (mc, ref member_name); - type = FindDocumentedType (mc, typeName, ds, cref); - int warn_result; if (type != null) { - var mi = FindDocumentedMember (mc, type, lookup_name, parameter_types, ds, out warn_result, cref, true, name); - if (warn_result > 0) - return; - if (mi != null) { - // we cannot use 'type' directly - // to get its name, since mi - // could be from DeclaringType - // for nested types. - xref.SetAttribute ("cref", GetMemberDocHead (mi) + GetSignatureForDoc (mi.DeclaringType) + "." + member_name + GetParametersFormatted (mi)); - return; // a member of a type + if (member_name == null) + member_name = ParsedOperator.HasValue ? + Operator.GetMetadataName (ParsedOperator.Value) : ParsedName.Name; + + int parsed_param_count; + if (ParsedOperator == Operator.OpType.Explicit || ParsedOperator == Operator.OpType.Implicit) { + parsed_param_count = ParsedParameters.Count - 1; + } else if (ParsedParameters != null) { + parsed_param_count = ParsedParameters.Count; + } else { + parsed_param_count = 0; } - } - } else { - int warn_result; - var mi = FindDocumentedMember (mc, ds.PartialContainer.Definition, name, parameter_types, ds, out warn_result, cref, true, name); - - if (warn_result > 0) - return; - if (mi != null) { - // we cannot use 'type' directly - // to get its name, since mi - // could be from DeclaringType - // for nested types. - xref.SetAttribute ("cref", GetMemberDocHead (mi) + GetSignatureForDoc (mi.DeclaringType) + "." + name + GetParametersFormatted (mi)); - return; // local member name - } - } - // It still might be part of namespace name. - Namespace ns = ds.NamespaceEntry.NS.GetNamespace (name, false); - if (ns != null) { - xref.SetAttribute ("cref", "N:" + ns.GetSignatureForError ()); - return; // a namespace - } - if (mc.Module.GlobalRootNamespace.IsNamespace (name)) { - xref.SetAttribute ("cref", "N:" + name); - return; // a namespace - } + int parameters_match = -1; + do { + var members = MemberCache.FindMembers (type, member_name, true); + if (members != null) { + foreach (var m in members) { + if (ParsedName != null && m.Arity != ParsedName.Arity) + continue; + + if (ParsedParameters != null) { + IParametersMember pm = m as IParametersMember; + if (pm == null) + continue; + + if (m.Kind == MemberKind.Operator && !ParsedOperator.HasValue) + continue; + + int i; + for (i = 0; i < parsed_param_count; ++i) { + var pparam = ParsedParameters[i]; + + if (i >= pm.Parameters.Count || pparam == null || + pparam.TypeSpec != pm.Parameters.Types[i] || + (pparam.Modifier & Parameter.Modifier.SignatureMask) != (pm.Parameters.FixedParameters[i].ModFlags & Parameter.Modifier.SignatureMask)) { + + if (i > parameters_match) { + parameters_match = i; + } + + i = -1; + break; + } + } + + if (i < 0) + continue; + + if (ParsedOperator == Operator.OpType.Explicit || ParsedOperator == Operator.OpType.Implicit) { + if (pm.MemberType != ParsedParameters[parsed_param_count].TypeSpec) { + parameters_match = parsed_param_count + 1; + continue; + } + } else { + if (parsed_param_count != pm.Parameters.Count) + continue; + } + } + + if (member != null) { + Report.Warning (419, 3, mc.Location, + "Ambiguous reference in cref attribute `{0}'. Assuming `{1}' but other overloads including `{2}' have also matched", + cref, member.GetSignatureForError (), m.GetSignatureForError ()); + + break; + } + + member = m; + } + } - Report.Warning (1574, 1, mc.Location, "XML comment on `{0}' has cref attribute `{1}' that could not be resolved", - mc.GetSignatureForError (), cref); + // Continue with parent type for nested types + if (member == null) { + type = type.DeclaringType; + } else { + type = null; + } + } while (type != null); - xref.SetAttribute ("cref", "!:" + name); - } + if (member == null && parameters_match >= 0) { + for (int i = parameters_match; i < parsed_param_count; ++i) { + Report.Warning (1580, 1, mc.Location, "Invalid type for parameter `{0}' in XML comment cref attribute `{1}'", + (i + 1).ToString (), cref); + } - static string GetParametersFormatted (MemberSpec mi) - { - var pm = mi as IParametersMember; - if (pm == null || pm.Parameters.IsEmpty) - return string.Empty; - - AParametersCollection parameters = pm.Parameters; -/* - if (parameters == null || parameters.Count == 0) - return String.Empty; -*/ - StringBuilder sb = new StringBuilder (); - sb.Append ('('); - for (int i = 0; i < parameters.Count; i++) { -// if (is_setter && i + 1 == parameters.Count) -// break; // skip "value". - if (i > 0) - sb.Append (','); - TypeSpec t = parameters.Types [i]; - sb.Append (GetSignatureForDoc (t)); + if (parameters_match == parsed_param_count + 1) { + Report.Warning (1581, 1, mc.Location, "Invalid return type in XML comment cref attribute `{0}'", cref); + } + } + } } - sb.Append (')'); - return sb.ToString (); - } - static string GetBodyIdentifierFromName (string name) - { - string identifier = name; - - if (name.Length > 0 && name [name.Length - 1] == ']') { - string tmp = name.Substring (0, name.Length - 1).Trim (wsChars); - int last = tmp.LastIndexOf ('['); - if (last > 0) - identifier = tmp.Substring (0, last).Trim (wsChars); + if (member == null) { + Report.Warning (1574, 1, mc.Location, "XML comment on `{0}' has cref attribute `{1}' that could not be resolved", + mc.GetSignatureForError (), cref); + cref = "!:" + cref; + } else if (member == InternalType.Namespace) { + cref = "N:" + fne.GetSignatureForError (); + } else { + prefix = GetMemberDocHead (member); + cref = prefix + member.GetSignatureForDocumentation (); } - return identifier; - } - - void Report419 (MemberCore mc, string member_name, MemberSpec [] mis) - { - Report.Warning (419, 3, mc.Location, - "Ambiguous reference in cref attribute `{0}'. Assuming `{1}' but other overloads including `{2}' have also matched", - member_name, - TypeManager.GetFullNameSignature (mis [0]), - TypeManager.GetFullNameSignature (mis [1])); + xref.SetAttribute ("cref", cref); } // @@ -659,97 +477,7 @@ namespace Mono.CSharp if (type is TypeSpec) return "T:"; - return "!:"; - } - - // MethodCore - - // - // Returns a string that represents the signature for this - // member which should be used in XML documentation. - // - public static string GetMethodDocCommentName (MemberCore mc, ParametersCompiled parameters) - { - IParameterData [] plist = parameters.FixedParameters; - string paramSpec = String.Empty; - if (plist != null) { - StringBuilder psb = new StringBuilder (); - int i = 0; - foreach (Parameter p in plist) { - psb.Append (psb.Length != 0 ? "," : "("); - psb.Append (GetSignatureForDoc (parameters.Types [i++])); - if ((p.ModFlags & Parameter.Modifier.ISBYREF) != 0) - psb.Append ('@'); - } - paramSpec = psb.ToString (); - } - - if (paramSpec.Length > 0) - paramSpec += ")"; - - string name = mc.Name; - if (mc is Constructor) - name = "#ctor"; - else if (mc is InterfaceMemberBase) { - var imb = (InterfaceMemberBase) mc; - name = imb.GetFullName (imb.ShortName); - } - name = name.Replace ('.', '#'); - - if (mc.MemberName.TypeArguments != null && mc.MemberName.TypeArguments.Count > 0) - name += "``" + mc.MemberName.CountTypeArguments; - - string suffix = String.Empty; - Operator op = mc as Operator; - if (op != null) { - switch (op.OperatorType) { - case Operator.OpType.Implicit: - case Operator.OpType.Explicit: - suffix = "~" + GetSignatureForDoc (op.ReturnType); - break; - } - } - return String.Concat (mc.DocCommentHeader, mc.Parent.Name, ".", name, paramSpec, suffix); - } - - static string GetSignatureForDoc (TypeSpec type) - { - var tp = type as TypeParameterSpec; - if (tp != null) { - int c = 0; - type = type.DeclaringType; - while (type != null && type.DeclaringType != null) { - type = type.DeclaringType; - c += type.MemberDefinition.TypeParametersCount; - } - var prefix = tp.IsMethodOwned ? "``" : "`"; - return prefix + (c + tp.DeclaredPosition); - } - - var pp = type as PointerContainer; - if (pp != null) - return GetSignatureForDoc (pp.Element) + "*"; - - ArrayContainer ap = type as ArrayContainer; - if (ap != null) - return GetSignatureForDoc (ap.Element) + - ArrayContainer.GetPostfixSignature (ap.Rank); - - if (TypeManager.IsGenericType (type)) { - string g = type.MemberDefinition.Namespace; - if (g != null && g.Length > 0) - g += '.'; - int idx = type.Name.LastIndexOf ('`'); - g += (idx < 0 ? type.Name : type.Name.Substring (0, idx)) + '{'; - int argpos = 0; - foreach (TypeSpec t in TypeManager.GetTypeArguments (type)) - g += (argpos++ > 0 ? "," : String.Empty) + GetSignatureForDoc (t); - g += '}'; - return g; - } - - string name = type.GetMetaInfo ().FullName != null ? type.GetMetaInfo ().FullName : type.Name; - return name.Replace ("+", ".").Replace ('&', '@'); + throw new NotImplementedException (type.GetType ().ToString ()); } // @@ -759,62 +487,43 @@ namespace Mono.CSharp // FIXME: with a few effort, it could be done with XmlReader, // that means removal of DOM use. // - internal static void OnMethodGenerateDocComment ( - MethodCore mc, XmlElement el, Report Report) + void CheckParametersComments (MemberCore member, IParametersMember paramMember, XmlElement el) { - var paramTags = new Dictionary (); + HashSet found_tags = null; foreach (XmlElement pelem in el.SelectNodes ("param")) { string xname = pelem.GetAttribute ("name"); if (xname.Length == 0) continue; // really? but MS looks doing so - if (xname != "" && mc.ParameterInfo.GetParameterIndexByName (xname) < 0) - Report.Warning (1572, 2, mc.Location, "XML comment on `{0}' has a param tag for `{1}', but there is no parameter by that name", - mc.GetSignatureForError (), xname); - else if (paramTags.ContainsKey (xname)) - Report.Warning (1571, 2, mc.Location, "XML comment on `{0}' has a duplicate param tag for `{1}'", - mc.GetSignatureForError (), xname); - paramTags [xname] = xname; - } - IParameterData [] plist = mc.ParameterInfo.FixedParameters; - foreach (Parameter p in plist) { - if (paramTags.Count > 0 && !paramTags.ContainsKey (p.Name)) - Report.Warning (1573, 4, mc.Location, "Parameter `{0}' has no matching param tag in the XML comment for `{1}'", - p.Name, mc.GetSignatureForError ()); - } - } - void Normalize (MemberCore mc, ref string name) - { - if (name.Length > 0 && name [0] == '@') - name = name.Substring (1); - else if (name == "this") - name = "Item"; - else if (Tokenizer.IsKeyword (name) && !IsTypeName (name)) - Report.Warning (1041, 1, mc.Location, "Identifier expected. `{0}' is a keyword", name); - } + if (found_tags == null) { + found_tags = new HashSet (); + } - private static bool IsTypeName (string name) - { - switch (name) { - case "bool": - case "byte": - case "char": - case "decimal": - case "double": - case "float": - case "int": - case "long": - case "object": - case "sbyte": - case "short": - case "string": - case "uint": - case "ulong": - case "ushort": - case "void": - return true; + if (xname != "" && paramMember.Parameters.GetParameterIndexByName (xname) < 0) { + Report.Warning (1572, 2, member.Location, + "XML comment on `{0}' has a param tag for `{1}', but there is no parameter by that name", + member.GetSignatureForError (), xname); + continue; + } + + if (found_tags.Contains (xname)) { + Report.Warning (1571, 2, member.Location, + "XML comment on `{0}' has a duplicate param tag for `{1}'", + member.GetSignatureForError (), xname); + continue; + } + + found_tags.Add (xname); + } + + if (found_tags != null) { + foreach (Parameter p in paramMember.Parameters.FixedParameters) { + if (!found_tags.Contains (p.Name) && !(p is ArglistParameter)) + Report.Warning (1573, 4, member.Location, + "Parameter `{0}' has no matching param tag in the XML comment for `{1}'", + p.Name, member.GetSignatureForError ()); + } } - return false; } // @@ -843,7 +552,7 @@ namespace Mono.CSharp w.WriteEndDocument (); return true; } catch (Exception ex) { - module.Compiler.Report.Error (1569, "Error generating XML documentation file `{0}' (`{1}')", xmlFileName, ex.Message); + Report.Error (1569, "Error generating XML documentation file `{0}' (`{1}')", xmlFileName, ex.Message); return false; } finally { if (w != null) @@ -851,4 +560,32 @@ namespace Mono.CSharp } } } + + class DocumentationParameter + { + public readonly Parameter.Modifier Modifier; + public FullNamedExpression Type; + + public DocumentationParameter (Parameter.Modifier modifier, FullNamedExpression type) + : this (type) + { + this.Modifier = modifier; + } + + public DocumentationParameter (FullNamedExpression type) + { + this.Type = type; + } + + public TypeSpec TypeSpec { + get { + return Type == null ? null : Type.Type; + } + } + + public void Resolve (IMemberContext context) + { + Type = Type.ResolveAsType (context); + } + } } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/driver.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/driver.cs index 87378eaab..e01ad0a78 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/driver.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/driver.cs @@ -110,7 +110,7 @@ namespace Mono.CSharp public void Parse (SeekableStreamReader reader, CompilationSourceFile file, ModuleContainer module) { - file.NamespaceContainer = new NamespaceEntry (module, null, file, null); + file.NamespaceContainer = new NamespaceContainer (null, module, null, file); CSharpParser parser = new CSharpParser (reader, file); parser.parse (); @@ -439,7 +439,7 @@ namespace Mono.CSharp var files = new List (); var unit = new CompilationSourceFile (inputFile, inputFile, 0); var module = new ModuleContainer (ctx); - unit.NamespaceContainer = new NamespaceEntry (module, null, unit, null); + unit.NamespaceContainer = new NamespaceContainer (null, module, null, unit); files.Add (unit); Location.Initialize (files); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/dynamic.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/dynamic.cs index 8cf647fc3..db4ec43e3 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/dynamic.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/dynamic.cs @@ -47,8 +47,9 @@ namespace Mono.CSharp this.loc = loc; } - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) + public override TypeExpr ResolveAsType (IMemberContext ec) { + eclass = ExprClass.Type; type = ec.Module.Compiler.BuiltinTypes.Dynamic; return this; } @@ -232,7 +233,7 @@ namespace Mono.CSharp { Child = new IntConstant (ec.BuiltinTypes, (int) (flags | statement.flags), statement.loc); - type = ec.Module.PredefinedTypes.BinderFlags.Resolve (loc); + type = ec.Module.PredefinedTypes.BinderFlags.Resolve (); eclass = Child.eclass; return this; } @@ -283,9 +284,9 @@ namespace Mono.CSharp int errors = rc.Report.Errors; var pt = rc.Module.PredefinedTypes; - binder_type = pt.Binder.Resolve (loc); - pt.CallSite.Resolve (loc); - pt.CallSiteGeneric.Resolve (loc); + binder_type = pt.Binder.Resolve (); + pt.CallSite.Resolve (); + pt.CallSiteGeneric.Resolve (); eclass = ExprClass.Value; @@ -382,7 +383,7 @@ namespace Mono.CSharp TypeExpr te = null; Namespace type_ns = module.GlobalRootNamespace.GetNamespace ("System", true); if (type_ns != null) { - te = type_ns.LookupType (module, d_name, dyn_args_count + default_args, true, Location.Null); + te = type_ns.LookupType (module, d_name, dyn_args_count + default_args, Location.Null); } if (te != null) { @@ -463,7 +464,7 @@ namespace Mono.CSharp BlockContext bc = new BlockContext (ec.MemberContext, null, ec.BuiltinTypes.Void); - instanceAccessExprType = instanceAccessExprType.ResolveAsTypeStep (bc, false); + instanceAccessExprType = instanceAccessExprType.ResolveAsType (bc); if (instanceAccessExprType == null) return; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/ecore.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/ecore.cs index 75c9a1fd2..38c4d4b1a 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/ecore.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/ecore.cs @@ -186,66 +186,16 @@ namespace Mono.CSharp { // This is used if the expression should be resolved as a type or namespace name. // the default implementation fails. // - public virtual FullNamedExpression ResolveAsTypeStep (IMemberContext rc, bool silent) + public virtual TypeExpr ResolveAsType (IMemberContext mc) { - if (!silent) { - ResolveContext ec = new ResolveContext (rc); - Expression e = Resolve (ec); - if (e != null) - e.Error_UnexpectedKind (ec, ResolveFlags.Type, loc); - } + ResolveContext ec = new ResolveContext (mc); + Expression e = Resolve (ec); + if (e != null) + e.Error_UnexpectedKind (ec, ResolveFlags.Type, loc); return null; } - // - // This is used to resolve the expression as a type, a null - // value will be returned if the expression is not a type - // reference - // - public virtual TypeExpr ResolveAsTypeTerminal (IMemberContext ec , bool silent) - { - // FIXME: THIS IS TOO SLOW and it should not be needed either - int errors = ec.Module.Compiler.Report.Errors; - - FullNamedExpression fne = ResolveAsTypeStep (ec, silent); - - if (fne == null) - return null; - - TypeExpr te = fne as TypeExpr; - if (te == null) { - if (!silent && errors == ec.Module.Compiler.Report.Errors) - fne.Error_UnexpectedKind (ec.Module.Compiler.Report, null, "type", loc); - return null; - } - - if (!te.type.IsAccessible (ec)) { - ec.Module.Compiler.Report.SymbolRelatedToPreviousError (te.Type); - ErrorIsInaccesible (ec, te.Type.GetSignatureForError (), loc); - } - - te.loc = loc; - - var dep = te.type.GetMissingDependencies (); - if (dep != null) { - ImportedTypeDefinition.Error_MissingDependency (ec, dep, loc); - } - - // - // Obsolete checks cannot be done when resolving base context as they - // require type dependecies to be set but we are just resolving them - // - if (!silent && !(ec is TypeContainer.BaseContext)) { - ObsoleteAttribute obsolete_attr = te.Type.GetAttributeObsolete (); - if (obsolete_attr != null && !ec.IsObsolete) { - AttributeTester.Report_ObsoleteMessage (obsolete_attr, te.GetSignatureForError (), Location, ec.Module.Compiler.Report); - } - } - - return te; - } - public static void ErrorIsInaccesible (IMemberContext rc, string member, Location loc) { rc.Module.Compiler.Report.Error (122, loc, "`{0}' is inaccessible due to its protection level", member); @@ -316,10 +266,11 @@ namespace Mono.CSharp { } } - public void Error_TypeArgumentsCannotBeUsed (Report report, Location loc, MemberSpec member, int arity) + public void Error_TypeArgumentsCannotBeUsed (IMemberContext context, MemberSpec member, int arity, Location loc) { // Better message for possible generic expressions if (member != null && (member.Kind & MemberKind.GenericMask) != 0) { + var report = context.Module.Compiler.Report; report.SymbolRelatedToPreviousError (member); if (member is TypeSpec) member = ((TypeSpec) member).GetDefinition (); @@ -335,13 +286,13 @@ namespace Mono.CSharp { name, member.GetSignatureForError ()); } } else { - Error_TypeArgumentsCannotBeUsed (report, ExprClassName, GetSignatureForError (), loc); + Error_TypeArgumentsCannotBeUsed (context, ExprClassName, GetSignatureForError (), loc); } } - public void Error_TypeArgumentsCannotBeUsed (Report report, string exprType, string name, Location loc) + public void Error_TypeArgumentsCannotBeUsed (IMemberContext context, string exprType, string name, Location loc) { - report.Error (307, loc, "The {0} `{1}' cannot be used with type arguments", + context.Module.Compiler.Report.Error (307, loc, "The {0} `{1}' cannot be used with type arguments", exprType, name); } @@ -564,7 +515,15 @@ namespace Mono.CSharp { } var r = new OverloadResolver (ctors, OverloadResolver.Restrictions.NoBaseMembers, loc); - return r.ResolveMember (rc, ref args); + var ctor = r.ResolveMember (rc, ref args); + if (ctor == null) + return null; + + if ((ctor.Modifiers & Modifiers.PROTECTED) != 0 && !rc.HasSet (ResolveContext.Options.BaseInitializer)) { + MemberExpr.CheckProtectedMemberAccess (rc, ctor, ctor.DeclaringType, loc); + } + + return ctor; } [Flags] @@ -913,7 +872,7 @@ namespace Mono.CSharp { protected static TypeExpr CreateExpressionTypeExpression (ResolveContext ec, Location loc) { - var t = ec.Module.PredefinedTypes.Expression.Resolve (loc); + var t = ec.Module.PredefinedTypes.Expression.Resolve (); if (t == null) return null; @@ -2116,34 +2075,11 @@ namespace Mono.CSharp { return; } } - - /* - // TODO MemberCache: Implement - - string ns = ec.CurrentType.Namespace; - string fullname = (ns.Length > 0) ? ns + "." + Name : Name; - foreach (Assembly a in GlobalRootNamespace.Instance.Assemblies) { - var type = a.GetType (fullname); - if (type != null) { - ec.Compiler.Report.SymbolRelatedToPreviousError (type); - Expression.ErrorIsInaccesible (loc, TypeManager.CSharpName (type), ec.Compiler.Report); - return; - } - } - - if (ec.CurrentTypeDefinition != null) { - TypeSpec t = ec.CurrentTypeDefinition.LookupAnyGeneric (Name); - if (t != null) { - Namespace.Error_InvalidNumberOfTypeArguments (ec.Compiler.Report, t, loc); - return; - } - } - */ } FullNamedExpression retval = ec.LookupNamespaceOrType (Name, -System.Math.Max (1, Arity), loc, true); if (retval != null) { - Error_TypeArgumentsCannotBeUsed (ec.Module.Compiler.Report, loc, retval.Type, Arity); + Error_TypeArgumentsCannotBeUsed (ec, retval.Type, Arity, loc); /* var te = retval as TypeExpr; if (HasTypeArguments && te != null && !te.Type.IsGeneric) @@ -2154,7 +2090,7 @@ namespace Mono.CSharp { return; } - NamespaceEntry.Error_NamespaceNotFound (loc, Name, ec.Module.Compiler.Report); + NamespaceContainer.Error_NamespaceNotFound (loc, Name, ec.Module.Compiler.Report); } protected override Expression DoResolve (ResolveContext ec) @@ -2167,16 +2103,15 @@ namespace Mono.CSharp { return SimpleNameResolve (ec, right_side, false); } - public override FullNamedExpression ResolveAsTypeStep (IMemberContext ec, bool silent) + public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext ec) { - int errors = ec.Module.Compiler.Report.Errors; FullNamedExpression fne = ec.LookupNamespaceOrType (Name, Arity, loc, /*ignore_cs0104=*/ false); if (fne != null) { if (fne.Type != null && Arity > 0) { if (HasTypeArguments) { GenericTypeExpr ct = new GenericTypeExpr (fne.Type, targs, loc); - return ct.ResolveAsTypeStep (ec, false); + return ct.ResolveAsType (ec); } return new GenericOpenTypeExpr (fne.Type, loc); @@ -2196,19 +2131,21 @@ namespace Mono.CSharp { ec.Module.PredefinedAttributes.Dynamic.GetSignatureForError ()); } - return new DynamicTypeExpr (loc).ResolveAsTypeStep (ec, silent); + return new DynamicTypeExpr (loc).ResolveAsType (ec); } if (fne != null) return fne; - if (silent || errors != ec.Module.Compiler.Report.Errors) - return null; - Error_TypeOrNamespaceNotFound (ec); return null; } + public bool IsPossibleTypeOrNamespace (IMemberContext mc) + { + return mc.LookupNamespaceOrType (Name, Arity, loc, /*ignore_cs0104=*/ false) != null; + } + public override Expression LookupNameExpression (ResolveContext rc, MemberLookupRestrictions restrictions) { int lookup_arity = Arity; @@ -2235,7 +2172,7 @@ namespace Mono.CSharp { e = variable.CreateReferenceExpression (rc, loc); if (e != null) { if (Arity > 0) - Error_TypeArgumentsCannotBeUsed (rc.Report, "variable", Name, loc); + Error_TypeArgumentsCannotBeUsed (rc, "variable", Name, loc); return e; } @@ -2320,14 +2257,13 @@ namespace Mono.CSharp { // Stage 3: Lookup nested types, namespaces and type parameters in the context // if ((restrictions & MemberLookupRestrictions.InvocableOnly) == 0 && !variable_found) { - e = ResolveAsTypeStep (rc, lookup_arity == 0 || !errorMode); - if (e != null) { + if (IsPossibleTypeOrNamespace (rc)) { if (variable != null) { rc.Report.SymbolRelatedToPreviousError (variable.Location, Name); rc.Report.Error (135, loc, "`{0}' conflicts with a declaration in a child block", Name); } - return e; + return ResolveAsTypeOrNamespace (rc); } } @@ -2335,7 +2271,38 @@ namespace Mono.CSharp { if (variable_found) { rc.Report.Error (841, loc, "A local variable `{0}' cannot be used before it is declared", Name); } else { - rc.Report.Error (103, loc, "The name `{0}' does not exist in the current context", Name); + if (Arity > 0) { + TypeParameter[] tparams = rc.CurrentTypeParameters; + if (tparams != null) { + foreach (var ctp in tparams) { + if (ctp.Name == Name) { + Error_TypeArgumentsCannotBeUsed (rc, "type parameter", Name, loc); + return null; + } + } + } + + var ct = rc.CurrentType; + do { + if (ct.MemberDefinition.TypeParametersCount > 0) { + foreach (var ctp in ct.MemberDefinition.TypeParameters) { + if (ctp.Name == Name) { + Error_TypeArgumentsCannotBeUsed (rc, "type parameter", Name, loc); + return null; + } + } + } + + ct = ct.DeclaringType; + } while (ct != null); + } + + var retval = rc.LookupNamespaceOrType (Name, -System.Math.Max (1, Arity), loc, true); + if (retval != null) { + Error_TypeArgumentsCannotBeUsed (rc, retval.Type, Arity, loc); + } else { + rc.Report.Error (103, loc, "The name `{0}' does not exist in the current context", Name); + } } return null; @@ -2398,11 +2365,53 @@ namespace Mono.CSharp { throw new NotSupportedException ("ET"); } - public override FullNamedExpression ResolveAsTypeStep (IMemberContext ec, bool silent) + public abstract FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc); + + // + // This is used to resolve the expression as a type, a null + // value will be returned if the expression is not a type + // reference + // + public override TypeExpr ResolveAsType (IMemberContext mc) { - return this; + FullNamedExpression fne = ResolveAsTypeOrNamespace (mc); + + if (fne == null) + return null; + + TypeExpr te = fne as TypeExpr; + if (te == null) { + fne.Error_UnexpectedKind (mc.Module.Compiler.Report, null, "type", loc); + return null; + } + + if (!te.type.IsAccessible (mc)) { + mc.Module.Compiler.Report.SymbolRelatedToPreviousError (te.Type); + ErrorIsInaccesible (mc, te.Type.GetSignatureForError (), loc); + } + + te.loc = loc; + + var dep = te.type.GetMissingDependencies (); + if (dep != null) { + ImportedTypeDefinition.Error_MissingDependency (mc, dep, loc); + } + + // + // Obsolete checks cannot be done when resolving base context as they + // require type dependecies to be set but we are just resolving them + // + if (!(mc is TypeContainer.BaseContext)) { + ObsoleteAttribute obsolete_attr = te.Type.GetAttributeObsolete (); + if (obsolete_attr != null && !mc.IsObsolete) { + AttributeTester.Report_ObsoleteMessage (obsolete_attr, te.GetSignatureForError (), Location, mc.Module.Compiler.Report); + } + } + + return te; } + public override void Emit (EmitContext ec) { throw new InternalErrorException ("FullNamedExpression `{0}' found in resolved tree", @@ -2413,24 +2422,18 @@ namespace Mono.CSharp { /// /// Expression that evaluates to a type /// - public abstract class TypeExpr : FullNamedExpression { - public override FullNamedExpression ResolveAsTypeStep (IMemberContext ec, bool silent) + public abstract class TypeExpr : FullNamedExpression + { + public sealed override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc) { - TypeExpr t = DoResolveAsTypeStep (ec); - if (t == null) - return null; - - eclass = ExprClass.Type; - return t; + return ResolveAsType (mc); } - protected override Expression DoResolve (ResolveContext ec) + protected sealed override Expression DoResolve (ResolveContext ec) { - return ResolveAsTypeTerminal (ec, false); + return ResolveAsType (ec); } - protected abstract TypeExpr DoResolveAsTypeStep (IMemberContext ec); - public override bool Equals (object obj) { TypeExpr tobj = obj as TypeExpr; @@ -2449,7 +2452,8 @@ namespace Mono.CSharp { /// /// Fully resolved Expression that already evaluated to a type /// - public class TypeExpression : TypeExpr { + public class TypeExpression : TypeExpr + { public TypeExpression (TypeSpec t, Location l) { Type = t; @@ -2457,12 +2461,7 @@ namespace Mono.CSharp { loc = l; } - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) - { - return this; - } - - public override TypeExpr ResolveAsTypeTerminal (IMemberContext ec, bool silent) + public sealed override TypeExpr ResolveAsType (IMemberContext ec) { return this; } @@ -2588,21 +2587,25 @@ namespace Mono.CSharp { return; if ((member.Modifiers & Modifiers.PROTECTED) != 0 && !(InstanceExpression is This)) { - var ct = rc.CurrentType; - var expr_type = InstanceExpression.Type; - if (ct == expr_type) - return; + CheckProtectedMemberAccess (rc, member, InstanceExpression.Type, loc); + } + } - if ((member.Modifiers & Modifiers.INTERNAL) != 0 && member.DeclaringType.MemberDefinition.IsInternalAsPublic (ct.MemberDefinition.DeclaringAssembly)) - return; + public static void CheckProtectedMemberAccess (ResolveContext rc, T member, TypeSpec qualifier, Location loc) where T : MemberSpec + { + var ct = rc.CurrentType; + if (ct == qualifier) + return; - expr_type = expr_type.GetDefinition (); - if (ct != expr_type && !IsSameOrBaseQualifier (ct, expr_type)) { - rc.Report.SymbolRelatedToPreviousError (member); - rc.Report.Error (1540, loc, - "Cannot access protected member `{0}' via a qualifier of type `{1}'. The qualifier must be of type `{2}' or derived from it", - member.GetSignatureForError (), expr_type.GetSignatureForError (), ct.GetSignatureForError ()); - } + if ((member.Modifiers & Modifiers.INTERNAL) != 0 && member.DeclaringType.MemberDefinition.IsInternalAsPublic (ct.MemberDefinition.DeclaringAssembly)) + return; + + qualifier = qualifier.GetDefinition (); + if (ct != qualifier && !IsSameOrBaseQualifier (ct, qualifier)) { + rc.Report.SymbolRelatedToPreviousError (member); + rc.Report.Error (1540, loc, + "Cannot access protected member `{0}' via a qualifier of type `{1}'. The qualifier must be of type `{2}' or derived from it", + member.GetSignatureForError (), qualifier.GetSignatureForError (), ct.GetSignatureForError ()); } } @@ -2817,10 +2820,10 @@ namespace Mono.CSharp { // class ExtensionMethodGroupExpr : MethodGroupExpr, OverloadResolver.IErrorHandler { - NamespaceEntry namespace_entry; + NamespaceContainer namespace_entry; public readonly Expression ExtensionExpression; - public ExtensionMethodGroupExpr (IList list, NamespaceEntry n, Expression extensionExpr, Location l) + public ExtensionMethodGroupExpr (IList list, NamespaceContainer n, Expression extensionExpr, Location l) : base (list.Cast().ToList (), extensionExpr.Type, l) { this.namespace_entry = n; @@ -2956,6 +2959,12 @@ namespace Mono.CSharp { } } + public IList Candidates { + get { + return Methods; + } + } + protected override TypeSpec DeclaringType { get { return queried_type; @@ -3173,7 +3182,7 @@ namespace Mono.CSharp { return null; int arity = type_arguments == null ? 0 : type_arguments.Count; - NamespaceEntry methods_scope = null; + NamespaceContainer methods_scope = null; var methods = rc.LookupExtensionMethod (InstanceExpression.Type, Methods[0].Name, arity, ref methods_scope); if (methods == null) return null; @@ -4293,6 +4302,13 @@ namespace Mono.CSharp { return null; } + // + // These flags indicates we are running delegate probing conversion. No need to + // do more expensive checks + // + if ((restrictions & (Restrictions.ProbingOnly | Restrictions.CovariantDelegate)) == (Restrictions.CovariantDelegate | Restrictions.ProbingOnly)) + return (T) best_candidate; + if (ambiguous_candidates != null) { // // Now check that there are no ambiguities i.e the selected method @@ -4416,7 +4432,7 @@ namespace Mono.CSharp { if (ta_count != best_candidate.Arity && (ta_count > 0 || ((IParametersMember) best_candidate).Parameters.IsEmpty)) { var mg = new MethodGroupExpr (new [] { best_candidate }, best_candidate.DeclaringType, loc); - mg.Error_TypeArgumentsCannotBeUsed (rc.Report, loc, best_candidate, ta_count); + mg.Error_TypeArgumentsCannotBeUsed (rc, best_candidate, ta_count, loc); return; } @@ -4643,7 +4659,7 @@ namespace Mono.CSharp { public class ConstantExpr : MemberExpr { - ConstSpec constant; + readonly ConstSpec constant; public ConstantExpr (ConstSpec constant, Location loc) { @@ -4695,7 +4711,7 @@ namespace Mono.CSharp { public override void SetTypeArguments (ResolveContext ec, TypeArguments ta) { - Error_TypeArgumentsCannotBeUsed (ec.Report, "constant", GetSignatureForError (), loc); + Error_TypeArgumentsCannotBeUsed (ec, "constant", GetSignatureForError (), loc); } } @@ -4824,32 +4840,34 @@ namespace Mono.CSharp { { bool lvalue_instance = rhs != null && IsInstance && spec.DeclaringType.IsStruct; - if (ResolveInstanceExpression (ec, rhs)) { - // Resolve the field's instance expression while flow analysis is turned - // off: when accessing a field "a.b", we must check whether the field - // "a.b" is initialized, not whether the whole struct "a" is initialized. + if (rhs != this) { + if (ResolveInstanceExpression (ec, rhs)) { + // Resolve the field's instance expression while flow analysis is turned + // off: when accessing a field "a.b", we must check whether the field + // "a.b" is initialized, not whether the whole struct "a" is initialized. - if (lvalue_instance) { - using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) { - bool out_access = rhs == EmptyExpression.OutAccess || rhs == EmptyExpression.LValueMemberOutAccess; + if (lvalue_instance) { + using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) { + bool out_access = rhs == EmptyExpression.OutAccess || rhs == EmptyExpression.LValueMemberOutAccess; - Expression right_side = - out_access ? EmptyExpression.LValueMemberOutAccess : EmptyExpression.LValueMemberAccess; + Expression right_side = + out_access ? EmptyExpression.LValueMemberOutAccess : EmptyExpression.LValueMemberAccess; - InstanceExpression = InstanceExpression.ResolveLValue (ec, right_side); - } - } else { - using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) { - InstanceExpression = InstanceExpression.Resolve (ec, ResolveFlags.VariableOrValue); + InstanceExpression = InstanceExpression.ResolveLValue (ec, right_side); + } + } else { + using (ec.With (ResolveContext.Options.DoFlowAnalysis, false)) { + InstanceExpression = InstanceExpression.Resolve (ec, ResolveFlags.VariableOrValue); + } } + + if (InstanceExpression == null) + return null; } - if (InstanceExpression == null) - return null; + DoBestMemberChecks (ec, spec); } - DoBestMemberChecks (ec, spec); - var fb = spec as FixedFieldSpec; IVariableReference var = InstanceExpression as IVariableReference; @@ -5155,7 +5173,7 @@ namespace Mono.CSharp { public override void SetTypeArguments (ResolveContext ec, TypeArguments ta) { - Error_TypeArgumentsCannotBeUsed (ec.Report, "field", GetSignatureForError (), loc); + Error_TypeArgumentsCannotBeUsed (ec, "field", GetSignatureForError (), loc); } } @@ -5357,7 +5375,7 @@ namespace Mono.CSharp { public override void SetTypeArguments (ResolveContext ec, TypeArguments ta) { - Error_TypeArgumentsCannotBeUsed (ec.Report, "property", GetSignatureForError (), loc); + Error_TypeArgumentsCannotBeUsed (ec, "property", GetSignatureForError (), loc); } } @@ -5685,7 +5703,7 @@ namespace Mono.CSharp { public override void SetTypeArguments (ResolveContext ec, TypeArguments ta) { - Error_TypeArgumentsCannotBeUsed (ec.Report, "event", GetSignatureForError (), loc); + Error_TypeArgumentsCannotBeUsed (ec, "event", GetSignatureForError (), loc); } } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/enum.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/enum.cs index ea6f2a226..8c092d66e 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/enum.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/enum.cs @@ -27,16 +27,12 @@ namespace Mono.CSharp { { class EnumTypeExpr : TypeExpr { - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) + public override TypeExpr ResolveAsType (IMemberContext ec) { type = ec.CurrentType; + eclass = ExprClass.Type; return this; } - - public override TypeExpr ResolveAsTypeTerminal (IMemberContext ec, bool silent) - { - return DoResolveAsTypeStep (ec); - } } public EnumMember (Enum parent, MemberName name, Attributes attrs) @@ -160,7 +156,7 @@ namespace Mono.CSharp { Modifiers.INTERNAL | Modifiers.PRIVATE; - public Enum (NamespaceEntry ns, DeclSpace parent, TypeExpression type, + public Enum (NamespaceContainer ns, DeclSpace parent, TypeExpression type, Modifiers mod_flags, MemberName name, Attributes attrs) : base (ns, parent, name, attrs, MemberKind.Enum) { diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/eval.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/eval.cs index d09dfa289..dcfd1cb6f 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/eval.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/eval.cs @@ -76,7 +76,7 @@ namespace Mono.CSharp module.Evaluator = this; source_file = new CompilationSourceFile ("{interactive}", "", 1); - source_file.NamespaceContainer = new NamespaceEntry (module, null, source_file, null); + source_file.NamespaceContainer = new NamespaceContainer (null, module, null, source_file); ctx.SourceFiles.Add (source_file); @@ -528,8 +528,9 @@ namespace Mono.CSharp Reset (); Tokenizer.LocatedToken.Initialize (); - Stream s = new MemoryStream (Encoding.Default.GetBytes (input)); - SeekableStreamReader seekable = new SeekableStreamReader (s, Encoding.Default); + var enc = ctx.Settings.Encoding; + var s = new MemoryStream (enc.GetBytes (input)); + SeekableStreamReader seekable = new SeekableStreamReader (s, enc); InputKind kind = ToplevelOrStatement (seekable); if (kind == InputKind.Error){ diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/expression.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/expression.cs index 7c923a627..087068c73 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/expression.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/expression.cs @@ -1297,7 +1297,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { - probe_type_expr = ProbeType.ResolveAsTypeTerminal (ec, false); + probe_type_expr = ProbeType.ResolveAsType (ec); if (probe_type_expr == null) return null; @@ -1632,7 +1632,7 @@ namespace Mono.CSharp if (expr == null) return null; - TypeExpr target = target_type.ResolveAsTypeTerminal (ec, false); + TypeExpr target = target_type.ResolveAsType (ec); if (target == null) return null; @@ -1734,7 +1734,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { - TypeExpr texpr = expr.ResolveAsTypeTerminal (ec, false); + TypeExpr texpr = expr.ResolveAsType (ec); if (texpr == null) return null; @@ -2606,7 +2606,7 @@ namespace Mono.CSharp break; return left; } - Error_OperatorCannotBeApplied (ec, this.left, this.right); + return null; } @@ -3616,11 +3616,6 @@ namespace Mono.CSharp return combined; } - public override TypeExpr ResolveAsTypeTerminal (IMemberContext ec, bool silent) - { - return null; - } - void CheckOutOfRangeComparison (ResolveContext ec, Constant c, TypeSpec type) { if (c is IntegralConstant || c is CharConstant) { @@ -3878,7 +3873,7 @@ namespace Mono.CSharp if ((oper & Operator.LogicalMask) != 0) flags |= CSharpBinderFlags.BinaryOperationLogical; - binder_args.Add (new Argument (new EnumConstant (new IntLiteral (ec.BuiltinTypes, (int) flags, loc), ec.Module.PredefinedTypes.BinderFlags.Resolve (loc)))); + binder_args.Add (new Argument (new EnumConstant (new IntLiteral (ec.BuiltinTypes, (int) flags, loc), ec.Module.PredefinedTypes.BinderFlags.Resolve ()))); binder_args.Add (new Argument (new MemberAccess (new MemberAccess (sle, "ExpressionType", loc), GetOperatorExpressionTypeName (), loc))); binder_args.Add (new Argument (new TypeOf (new TypeExpression (ec.CurrentType, loc), loc))); binder_args.Add (new Argument (new ImplicitlyTypedArrayCreation (args.CreateDynamicBinderArguments (ec), loc))); @@ -4494,11 +4489,6 @@ namespace Mono.CSharp return this; } - public override TypeExpr ResolveAsTypeTerminal (IMemberContext ec, bool silent) - { - return null; - } - public override void Emit (EmitContext ec) { Label false_target = ec.DefineLabel (); @@ -4954,6 +4944,9 @@ namespace Mono.CSharp bool DoResolveBase (ResolveContext ec) { + if (eclass != ExprClass.Unresolved) + return true; + type = pi.ParameterType; eclass = ExprClass.Variable; @@ -5644,7 +5637,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { - TypeExpr texpr = RequestedType.ResolveAsTypeTerminal (ec, false); + TypeExpr texpr = RequestedType.ResolveAsType (ec); if (texpr == null) return null; @@ -6302,7 +6295,7 @@ namespace Mono.CSharp array_type_expr = requested_base_type; } - array_type_expr = array_type_expr.ResolveAsTypeTerminal (ec, false); + array_type_expr = array_type_expr.ResolveAsType (ec); if (array_type_expr == null) return false; @@ -7027,7 +7020,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { eclass = ExprClass.Variable; - type = ec.Module.PredefinedTypes.RuntimeArgumentHandle.Resolve (loc); + type = ec.Module.PredefinedTypes.RuntimeArgumentHandle.Resolve (); if (ec.HasSet (ResolveContext.Options.FieldInitializerScope) || !ec.CurrentBlock.ParametersBlock.Parameters.HasArglist) { ec.Report.Error (190, loc, @@ -7120,10 +7113,12 @@ namespace Mono.CSharp } } - class RefValueExpr : ShimExpression + public class RefValueExpr : ShimExpression { FullNamedExpression texpr; - + + public FullNamedExpression FullNamedExpression { get { return texpr; }} + public RefValueExpr (Expression expr, FullNamedExpression texpr, Location loc) : base (expr) { @@ -7134,12 +7129,12 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext rc) { expr = expr.Resolve (rc); - texpr = texpr.ResolveAsTypeTerminal (rc, false); + texpr = texpr.ResolveAsType (rc); if (expr == null || texpr == null) return null; type = texpr.Type; - expr = Convert.ImplicitConversionRequired (rc, expr, rc.Module.PredefinedTypes.TypedReference.Resolve (loc), loc); + expr = Convert.ImplicitConversionRequired (rc, expr, rc.Module.PredefinedTypes.TypedReference.Resolve (), loc); eclass = ExprClass.Value; return this; } @@ -7150,9 +7145,14 @@ namespace Mono.CSharp ec.Emit (OpCodes.Refanyval, type); ec.EmitLoadFromPtr (type); } + + public override object Accept (StructuralVisitor visitor) + { + return visitor.Visit (this); + } } - class RefTypeExpr : ShimExpression + public class RefTypeExpr : ShimExpression { public RefTypeExpr (Expression expr, Location loc) : base (expr) @@ -7166,7 +7166,7 @@ namespace Mono.CSharp if (expr == null) return null; - expr = Convert.ImplicitConversionRequired (rc, expr, rc.Module.PredefinedTypes.TypedReference.Resolve (loc), loc); + expr = Convert.ImplicitConversionRequired (rc, expr, rc.Module.PredefinedTypes.TypedReference.Resolve (), loc); if (expr == null) return null; @@ -7183,9 +7183,14 @@ namespace Mono.CSharp if (m != null) ec.Emit (OpCodes.Call, m); } + + public override object Accept (StructuralVisitor visitor) + { + return visitor.Visit (this); + } } - class MakeRefExpr : ShimExpression + public class MakeRefExpr : ShimExpression { public MakeRefExpr (Expression expr, Location loc) : base (expr) @@ -7196,7 +7201,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext rc) { expr = expr.ResolveLValue (rc, EmptyExpression.LValueMemberAccess); - type = rc.Module.PredefinedTypes.TypedReference.Resolve (loc); + type = rc.Module.PredefinedTypes.TypedReference.Resolve (); eclass = ExprClass.Value; return this; } @@ -7206,6 +7211,11 @@ namespace Mono.CSharp ((IMemoryLocation) expr).AddressOf (ec, AddressOp.Load); ec.Emit (OpCodes.Mkrefany, expr.Type); } + + public override object Accept (StructuralVisitor visitor) + { + return visitor.Visit (this); + } } /// @@ -7252,7 +7262,7 @@ namespace Mono.CSharp // Pointer types are allowed without explicit unsafe, they are just tokens // using (ec.Set (ResolveContext.Options.UnsafeScope)) { - texpr = QueriedType.ResolveAsTypeTerminal (ec, false); + texpr = QueriedType.ResolveAsType (ec); } if (texpr == null) @@ -7353,9 +7363,9 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { if (member.IsConstructor) { - type = ec.Module.PredefinedTypes.ConstructorInfo.Resolve (loc); + type = ec.Module.PredefinedTypes.ConstructorInfo.Resolve (); } else { - type = ec.Module.PredefinedTypes.MethodInfo.Resolve (loc); + type = ec.Module.PredefinedTypes.MethodInfo.Resolve (); } if (type == null) @@ -7436,7 +7446,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { - type = ec.Module.PredefinedTypes.FieldInfo.Resolve (loc); + type = ec.Module.PredefinedTypes.FieldInfo.Resolve (); if (type == null) return null; @@ -7481,7 +7491,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { - TypeExpr texpr = QueriedType.ResolveAsTypeTerminal (ec, false); + TypeExpr texpr = QueriedType.ResolveAsType (ec); if (texpr == null) return null; @@ -7529,7 +7539,7 @@ namespace Mono.CSharp /// public class QualifiedAliasMember : MemberAccess { - readonly string alias; + public readonly string alias; public static readonly string GlobalAlias = "global"; public QualifiedAliasMember (string alias, string identifier, Location l) @@ -7550,11 +7560,11 @@ namespace Mono.CSharp this.alias = alias; } - public override FullNamedExpression ResolveAsTypeStep (IMemberContext ec, bool silent) + public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext ec) { if (alias == GlobalAlias) { expr = ec.Module.GlobalRootNamespace; - return base.ResolveAsTypeStep (ec, silent); + return base.ResolveAsTypeOrNamespace (ec); } int errors = ec.Module.Compiler.Report.Errors; @@ -7565,15 +7575,14 @@ namespace Mono.CSharp return null; } - FullNamedExpression fne = base.ResolveAsTypeStep (ec, silent); + FullNamedExpression fne = base.ResolveAsTypeOrNamespace (ec); if (fne == null) return null; if (expr.eclass == ExprClass.Type) { - if (!silent) { - ec.Module.Compiler.Report.Error (431, loc, - "Alias `{0}' cannot be used with '::' since it denotes a type. Consider replacing '::' with '.'", alias); - } + ec.Module.Compiler.Report.Error (431, loc, + "Alias `{0}' cannot be used with '::' since it denotes a type. Consider replacing '::' with '.'", alias); + return null; } @@ -7582,7 +7591,7 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { - return ResolveAsTypeStep (ec, false); + return ResolveAsTypeOrNamespace (ec); } protected override void Error_IdentifierNotFound (IMemberContext rc, TypeSpec expr_type, string identifier) @@ -7611,6 +7620,11 @@ namespace Mono.CSharp { // Nothing } + + public override object Accept (StructuralVisitor visitor) + { + return visitor.Visit (this); + } } /// @@ -7715,7 +7729,7 @@ namespace Mono.CSharp Namespace ns = expr as Namespace; if (ns != null) { - FullNamedExpression retval = ns.Lookup (rc, Name, Arity, loc); + var retval = ns.LookupTypeOrNamespace (rc, Name, Arity, loc); if (retval == null) { ns.Error_NamespaceDoesNotExist (loc, Name, Arity, rc); @@ -7761,7 +7775,7 @@ namespace Mono.CSharp // Try to look for extension method when member lookup failed // if (MethodGroupExpr.IsExtensionMethodArgument (expr)) { - NamespaceEntry scope = null; + NamespaceContainer scope = null; var methods = rc.LookupExtensionMethod (expr_type, Name, lookup_arity, ref scope); if (methods != null) { var emg = new ExtensionMethodGroupExpr (methods, scope, expr, loc); @@ -7854,33 +7868,31 @@ namespace Mono.CSharp return me; } - public override FullNamedExpression ResolveAsTypeStep (IMemberContext ec, bool silent) + public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext rc) { - return ResolveNamespaceOrType (ec, silent); - } + FullNamedExpression fexpr = expr as FullNamedExpression; + if (fexpr == null) + return expr.ResolveAsType (rc); - public FullNamedExpression ResolveNamespaceOrType (IMemberContext rc, bool silent) - { - FullNamedExpression expr_resolved = expr.ResolveAsTypeStep (rc, silent); + FullNamedExpression expr_resolved = fexpr.ResolveAsTypeOrNamespace (rc); if (expr_resolved == null) return null; Namespace ns = expr_resolved as Namespace; if (ns != null) { - FullNamedExpression retval = ns.Lookup (rc, Name, Arity, loc); + FullNamedExpression retval = ns.LookupTypeOrNamespace (rc, Name, Arity, loc); if (retval == null) { - if (!silent) - ns.Error_NamespaceDoesNotExist (loc, Name, Arity, rc); + ns.Error_NamespaceDoesNotExist (loc, Name, Arity, rc); } else if (HasTypeArguments) { - retval = new GenericTypeExpr (retval.Type, targs, loc).ResolveAsTypeStep (rc, silent); + retval = new GenericTypeExpr (retval.Type, targs, loc).ResolveAsType (rc); } return retval; } - TypeExpr tnew_expr = expr_resolved.ResolveAsTypeTerminal (rc, false); + TypeExpr tnew_expr = expr_resolved.ResolveAsType (rc); if (tnew_expr == null) return null; @@ -7895,9 +7907,6 @@ namespace Mono.CSharp while (expr_type != null) { nested = MemberCache.FindNestedType (expr_type, Name, Arity); if (nested == null) { - if (silent) - return null; - if (expr_type == tnew_expr.Type) { Error_IdentifierNotFound (rc, expr_type, Name); return null; @@ -7927,7 +7936,7 @@ namespace Mono.CSharp texpr = new TypeExpression (nested, loc); } - return texpr.ResolveAsTypeStep (rc, false); + return texpr.ResolveAsTypeOrNamespace (rc); } protected virtual void Error_IdentifierNotFound (IMemberContext rc, TypeSpec expr_type, string identifier) @@ -7935,7 +7944,7 @@ namespace Mono.CSharp var nested = MemberCache.FindNestedType (expr_type, Name, -System.Math.Max (1, Arity)); if (nested != null) { - Error_TypeArgumentsCannotBeUsed (rc.Module.Compiler.Report, expr.Location, nested, Arity); + Error_TypeArgumentsCannotBeUsed (rc, nested, Arity, expr.Location); return; } @@ -8634,7 +8643,7 @@ namespace Mono.CSharp public override void SetTypeArguments (ResolveContext ec, TypeArguments ta) { - Error_TypeArgumentsCannotBeUsed (ec.Report, "indexer", GetSignatureForError (), loc); + Error_TypeArgumentsCannotBeUsed (ec, "indexer", GetSignatureForError (), loc); } #region IBaseMembersProvider Members @@ -8977,9 +8986,9 @@ namespace Mono.CSharp this.loc = spec.Location; } - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) + public override TypeExpr ResolveAsType (IMemberContext ec) { - TypeExpr lexpr = left.ResolveAsTypeTerminal (ec, false); + TypeExpr lexpr = left.ResolveAsType (ec); if (lexpr == null) return null; @@ -8990,7 +8999,7 @@ namespace Mono.CSharp if (single_spec.IsNullable) { lexpr = new Nullable.NullableType (lexpr, loc); - lexpr = lexpr.ResolveAsTypeTerminal (ec, false); + lexpr = lexpr.ResolveAsType (ec); if (lexpr != null) type = lexpr.Type; @@ -9183,7 +9192,7 @@ namespace Mono.CSharp ec.Report.Error (255, loc, "Cannot use stackalloc in finally or catch"); } - TypeExpr texpr = t.ResolveAsTypeTerminal (ec, false); + TypeExpr texpr = t.ResolveAsType (ec); if (texpr == null) return null; @@ -9678,7 +9687,7 @@ namespace Mono.CSharp public override object Accept (StructuralVisitor visitor) { return visitor.Visit (this); - } + } } public class NewAnonymousType : New @@ -9791,6 +9800,11 @@ namespace Mono.CSharp RequestedType = new GenericTypeExpr (anonymous_type.Definition, new TypeArguments (t_args), loc); return base.DoResolve (ec); } + + public override object Accept (StructuralVisitor visitor) + { + return visitor.Visit (this); + } } public class AnonymousTypeParameter : ShimExpression diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/field.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/field.cs index 3fb807f53..077375c41 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/field.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/field.cs @@ -613,7 +613,7 @@ namespace Mono.CSharp MetaType[] required_modifier = null; if ((ModFlags & Modifiers.VOLATILE) != 0) { - var mod = Module.PredefinedTypes.IsVolatile.Resolve (Location); + var mod = Module.PredefinedTypes.IsVolatile.Resolve (); if (mod != null) required_modifier = new MetaType[] { mod.GetMetaInfo () }; } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/generic.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/generic.cs index 826555276..0eb735f3e 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/generic.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/generic.cs @@ -59,6 +59,11 @@ namespace Mono.CSharp { { throw new NotImplementedException (); } + + public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext ec) + { + throw new NotImplementedException (); + } } // @@ -169,7 +174,7 @@ namespace Mono.CSharp { continue; } - var type_expr = constraints[i] = constraint.ResolveAsTypeTerminal (context, false); + var type_expr = constraints[i] = constraint.ResolveAsType (context); if (type_expr == null) continue; @@ -571,6 +576,11 @@ namespace Mono.CSharp { throw new NotSupportedException (); } + public override string GetSignatureForDocumentation () + { + throw new NotImplementedException (); + } + public override string GetSignatureForError () { return MemberName.Name; @@ -847,6 +857,19 @@ namespace Mono.CSharp { return BaseType; } + public override string GetSignatureForDocumentation () + { + int c = 0; + var type = DeclaringType; + while (type != null && type.DeclaringType != null) { + type = type.DeclaringType; + c += type.MemberDefinition.TypeParametersCount; + } + + var prefix = IsMethodOwned ? "``" : "`"; + return prefix + (c + DeclaredPosition); + } + public override string GetSignatureForError () { return Name; @@ -1344,23 +1367,12 @@ namespace Mono.CSharp { /// /// A TypeExpr which already resolved to a type parameter. /// - public class TypeParameterExpr : TypeExpr { - + public class TypeParameterExpr : TypeExpression + { public TypeParameterExpr (TypeParameter type_parameter, Location loc) + : base (type_parameter.Type, loc) { - this.type = type_parameter.Type; this.eclass = ExprClass.TypeParameter; - this.loc = loc; - } - - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) - { - throw new NotSupportedException (); - } - - public override FullNamedExpression ResolveAsTypeStep (IMemberContext ec, bool silent) - { - return this; } } @@ -1793,7 +1805,7 @@ namespace Mono.CSharp { atypes = new TypeSpec [count]; for (int i = 0; i < count; i++){ - TypeExpr te = args[i].ResolveAsTypeTerminal (ec, false); + TypeExpr te = args[i].ResolveAsType (ec); if (te == null) { ok = false; continue; @@ -1911,7 +1923,7 @@ namespace Mono.CSharp { return TypeManager.CSharpName (type); } - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) + public override TypeExpr ResolveAsType (IMemberContext ec) { if (!args.Resolve (ec)) return null; @@ -1922,6 +1934,7 @@ namespace Mono.CSharp { // Now bind the parameters // type = open_type.MakeGenericType (ec, atypes); + eclass = ExprClass.Type; // // Check constraints when context is not method/base type @@ -1943,6 +1956,9 @@ namespace Mono.CSharp { constraints_checked = true; + if ((type.Modifiers & Modifiers.COMPILER_GENERATED) != 0) + return true; + var gtype = (InflatedTypeSpec) type; var constraints = gtype.Constraints; if (constraints == null) @@ -2001,17 +2017,11 @@ namespace Mono.CSharp { // // Generic type with unbound type arguments, used for typeof (G<,,>) // - class GenericOpenTypeExpr : TypeExpr + class GenericOpenTypeExpr : TypeExpression { public GenericOpenTypeExpr (TypeSpec type, /*UnboundTypeArguments args,*/ Location loc) + : base (type.GetDefinition (), loc) { - this.type = type.GetDefinition (); - this.loc = loc; - } - - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) - { - return this; } } @@ -2286,14 +2296,14 @@ namespace Mono.CSharp { { ParametersCompiled parameters; - public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name, + public GenericMethod (NamespaceContainer ns, DeclSpace parent, MemberName name, FullNamedExpression return_type, ParametersCompiled parameters) : base (ns, parent, name, null) { this.parameters = parameters; } - public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name, TypeParameter[] tparams, + public GenericMethod (NamespaceContainer ns, DeclSpace parent, MemberName name, TypeParameter[] tparams, FullNamedExpression return_type, ParametersCompiled parameters) : this (ns, parent, name, return_type, parameters) { diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/import.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/import.cs index 779cfbc70..834134f48 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/import.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/import.cs @@ -387,20 +387,30 @@ namespace Mono.CSharp // Cannot set to OVERRIDE without full hierarchy checks // this flag indicates that the method could be override // but further validation is needed - if ((mod & Modifiers.OVERRIDE) != 0 && kind == MemberKind.Method && declaringType.BaseType != null) { - var filter = MemberFilter.Method (name, tparams != null ? tparams.Length : 0, parameters, null); - var candidate = MemberCache.FindMember (declaringType.BaseType, filter, BindingRestriction.None); + if ((mod & Modifiers.OVERRIDE) != 0) { + bool is_real_override = false; + if (kind == MemberKind.Method && declaringType.BaseType != null) { + var filter = MemberFilter.Method (name, tparams != null ? tparams.Length : 0, parameters, null); + var candidate = MemberCache.FindMember (declaringType.BaseType, filter, BindingRestriction.None); - // - // For imported class method do additional validation to be sure that metadata - // override flag was correct - // - // Difference between protected internal and protected is ok - // - const Modifiers conflict_mask = Modifiers.AccessibilityMask & ~Modifiers.INTERNAL; - if (candidate == null || (candidate.Modifiers & conflict_mask) != (mod & conflict_mask) || candidate.IsStatic) { + // + // For imported class method do additional validation to be sure that metadata + // override flag was correct + // + // Difference between protected internal and protected is ok + // + const Modifiers conflict_mask = Modifiers.AccessibilityMask & ~Modifiers.INTERNAL; + if (candidate != null && (candidate.Modifiers & conflict_mask) == (mod & conflict_mask) && !candidate.IsStatic) { + is_real_override = true; + } + } + + if (!is_real_override) { mod &= ~Modifiers.OVERRIDE; - mod |= Modifiers.VIRTUAL; + if ((mod & Modifiers.SEALED) != 0) + mod &= ~Modifiers.SEALED; + else + mod |= Modifiers.VIRTUAL; } } } @@ -1168,15 +1178,21 @@ namespace Mono.CSharp return mod; } + // It can be sealed and override if ((ma & MethodAttributes.Final) != 0) mod |= Modifiers.SEALED; - // It can be sealed and override if ((ma & MethodAttributes.Virtual) != 0) { - if ((ma & MethodAttributes.NewSlot) != 0 || !declaringType.IsClass) { - // No private virtual or sealed virtual - if ((mod & (Modifiers.PRIVATE | Modifiers.SEALED)) == 0) + // Not every member can be detected based on MethodAttribute, we + // set virtual or non-virtual only when we are certain. Further checks + // to really find out what `virtual' means for this member are done + // later + if ((ma & MethodAttributes.NewSlot) != 0) { + if ((mod & Modifiers.SEALED) != 0) { + mod &= ~Modifiers.SEALED; + } else { mod |= Modifiers.VIRTUAL; + } } else { mod |= Modifiers.OVERRIDE; } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/iterators.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/iterators.cs index 2c9e66709..a02665c06 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/iterators.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/iterators.cs @@ -488,7 +488,7 @@ namespace Mono.CSharp { reset.Block = new ToplevelBlock (Compiler, Location); - TypeSpec ex_type = Module.PredefinedTypes.NotSupportedException.Resolve (Location); + TypeSpec ex_type = Module.PredefinedTypes.NotSupportedException.Resolve (); if (ex_type == null) return; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/linq.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/linq.cs index 3046ae240..070b6df10 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/linq.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/linq.cs @@ -273,7 +273,13 @@ namespace Mono.CSharp.Linq } protected RangeVariable identifier; - + + public RangeVariable IntoVariable { + get { + return identifier; + } + } + protected ARangeVariableQueryClause (QueryBlock block, RangeVariable identifier, Expression expr, Location loc) : base (block, expr, loc) { @@ -434,6 +440,11 @@ namespace Mono.CSharp.Linq protected override string MethodName { get { throw new NotSupportedException (); } } + + public override object Accept (StructuralVisitor visitor) + { + return visitor.Visit (this); + } } @@ -500,7 +511,19 @@ namespace Mono.CSharp.Linq public RangeVariable JoinVariable { get { return this.GetIntoVariable (); } } - + + public QueryBlock InnerSelector { + get { + return inner_selector; + } + } + + public QueryBlock OuterSelector { + get { + return outer_selector; + } + } + public Join (QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, Location loc) : base (block, lt, inner, loc) { diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/location.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/location.cs index 60faf9ca1..88f12d01f 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/location.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/location.cs @@ -84,7 +84,7 @@ namespace Mono.CSharp { CompileUnitEntry comp_unit; Dictionary include_files; Dictionary conditionals; - NamespaceEntry ns_container; + NamespaceContainer ns_container; public CompilationSourceFile (string name, string fullPathName, int index) : base (name, fullPathName, index) @@ -99,7 +99,7 @@ namespace Mono.CSharp { get { return comp_unit; } } - public NamespaceEntry NamespaceContainer { + public NamespaceContainer NamespaceContainer { get { return ns_container; } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/method.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/method.cs index d9c319368..2f8080939 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/method.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/method.cs @@ -126,27 +126,6 @@ namespace Mono.CSharp { return base.CheckBase (); } - // - // Returns a string that represents the signature for this - // member which should be used in XML documentation. - // - public override string GetDocCommentName () - { - return DocumentationBuilder.GetMethodDocCommentName (this, parameters); - } - - // - // Raised (and passed an XmlElement that contains the comment) - // when GenerateDocComment is writing documentation expectedly. - // - // FIXME: with a few effort, it could be done with XmlReader, - // that means removal of DOM use. - // - internal override void OnGenerateDocComment (XmlElement el) - { - DocumentationBuilder.OnMethodGenerateDocComment (this, el, Report); - } - // // Represents header string for documentation comment. // @@ -168,6 +147,15 @@ namespace Mono.CSharp { return base.EnableOverloadChecks (overload); } + public override string GetSignatureForDocumentation () + { + string s = base.GetSignatureForDocumentation (); + if (MemberName.Arity > 0) + s += "``" + MemberName.Arity.ToString (); + + return s + parameters.GetSignatureForDocumentation (); + } + public MethodSpec Spec { get { return spec; } } @@ -349,6 +337,36 @@ namespace Mono.CSharp { return inflatedMetaInfo; } + public override string GetSignatureForDocumentation () + { + string name; + switch (Kind) { + case MemberKind.Constructor: + name = "#ctor"; + break; + case MemberKind.Method: + if (Arity > 0) + name = Name + "``" + Arity.ToString (); + else + name = Name; + + break; + default: + name = Name; + break; + } + + name = DeclaringType.GetSignatureForDocumentation () + "." + name + parameters.GetSignatureForDocumentation (); + if (Kind == MemberKind.Operator) { + var op = Operator.GetType (Name).Value; + if (op == Operator.OpType.Explicit || op == Operator.OpType.Implicit) { + name += "~" + ReturnType.GetSignatureForDocumentation (); + } + } + + return name; + } + public override string GetSignatureForError () { string name; @@ -1636,6 +1654,11 @@ namespace Mono.CSharp { return null; } + public override string GetSignatureForDocumentation () + { + return Parent.GetSignatureForDocumentation () + ".#ctor" + parameters.GetSignatureForDocumentation (); + } + public override string GetSignatureForError() { return base.GetSignatureForError () + parameters.GetSignatureForError (); @@ -2259,6 +2282,12 @@ namespace Mono.CSharp { return false; } + public override string GetSignatureForDocumentation () + { + // should not be called + throw new NotSupportedException (); + } + public override bool IsClsComplianceRequired() { return false; @@ -2603,6 +2632,16 @@ namespace Mono.CSharp { } } + public override string GetSignatureForDocumentation () + { + string s = base.GetSignatureForDocumentation (); + if (OperatorType == OpType.Implicit || OperatorType == OpType.Explicit) { + s = s + "~" + ReturnType.GetSignatureForDocumentation (); + } + + return s; + } + public override string GetSignatureForError () { StringBuilder sb = new StringBuilder (); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/namespace.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/namespace.cs index 05afdc29b..a19f5938a 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/namespace.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/namespace.cs @@ -72,14 +72,14 @@ namespace Mono.CSharp { } } - /// - /// Keeps track of the namespaces defined in the C# code. - /// - /// This is an Expression to allow it to be referenced in the - /// compiler parse/intermediate tree during name resolution. - /// - public class Namespace : FullNamedExpression { - + // + // Namespace cache for imported and compiled namespaces + // + // This is an Expression to allow it to be referenced in the + // compiler parse/intermediate tree during name resolution. + // + public class Namespace : FullNamedExpression + { Namespace parent; string fullname; protected Dictionary namespaces; @@ -99,7 +99,7 @@ namespace Mono.CSharp { { // Expression members. this.eclass = ExprClass.Namespace; - this.Type = InternalType.FakeInternalType; + this.Type = InternalType.Namespace; this.loc = Location.Null; this.parent = parent; @@ -161,15 +161,15 @@ namespace Mono.CSharp { public virtual void Error_NamespaceDoesNotExist (Location loc, string name, int arity, IMemberContext ctx) { - FullNamedExpression retval = Lookup (ctx, name, -System.Math.Max (1, arity), loc); + var retval = LookupType (ctx, name, -System.Math.Max (1, arity), loc); if (retval != null) { - Error_TypeArgumentsCannotBeUsed (ctx.Module.Compiler.Report, loc, retval.Type, arity); + Error_TypeArgumentsCannotBeUsed (ctx, retval.Type, arity, loc); return; } Namespace ns; if (arity > 0 && namespaces.TryGetValue (name, out ns)) { - ns.Error_TypeArgumentsCannotBeUsed (ctx.Module.Compiler.Report, loc, null, arity); + ns.Error_TypeArgumentsCannotBeUsed (ctx, null, arity, loc); return; } @@ -208,7 +208,16 @@ namespace Mono.CSharp { return ns; } - public TypeExpr LookupType (IMemberContext ctx, string name, int arity, bool silent, Location loc) + public IList GetAllTypes (string name) + { + IList found; + if (types == null || !types.TryGetValue (name, out found)) + return null; + + return found; + } + + public TypeExpr LookupType (IMemberContext ctx, string name, int arity, Location loc) { if (types == null) return null; @@ -229,33 +238,10 @@ namespace Mono.CSharp { continue; } - var pts = best as BuiltinTypeSpec; - if (pts == null) - pts = ts as BuiltinTypeSpec; - - if (pts != null) { - ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (best); - ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (ts); - - // TODO: This should use different warning number but we want to be csc compatible - ctx.Module.Compiler.Report.Warning (1685, 1, loc, - "The predefined type `{0}.{1}' is redefined in the source code. Ignoring the local type definition", - pts.Namespace, pts.Name); - best = pts; - continue; - } - if (best.MemberDefinition.IsImported && ts.MemberDefinition.IsImported) { ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (best); ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (ts); - if (silent) { - ctx.Module.Compiler.Report.Warning (1685, 1, loc, - "The predefined type `{0}' is defined in multiple assemblies. Using definition from `{1}'", - ts.GetSignatureForError (), best.MemberDefinition.DeclaringAssembly.Name); - } else { - ctx.Module.Compiler.Report.Error (433, loc, "The imported type `{0}' is defined multiple times", ts.GetSignatureForError ()); - } - + ctx.Module.Compiler.Report.Error (433, loc, "The imported type `{0}' is defined multiple times", ts.GetSignatureForError ()); break; } @@ -265,9 +251,6 @@ namespace Mono.CSharp { if ((best.Modifiers & Modifiers.INTERNAL) != 0 && !best.MemberDefinition.IsInternalAsPublic (ctx.Module.DeclaringAssembly)) continue; - if (silent) - continue; - if (ts.MemberDefinition.IsImported) ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (ts); @@ -297,7 +280,7 @@ namespace Mono.CSharp { te = new TypeExpression (best, Location.Null); // TODO MemberCache: Cache more - if (arity == 0 && !silent) + if (arity == 0) cached_types.Add (name, te); return te; @@ -334,12 +317,26 @@ namespace Mono.CSharp { return null; } - public FullNamedExpression Lookup (IMemberContext ctx, string name, int arity, Location loc) + public FullNamedExpression LookupTypeOrNamespace (IMemberContext ctx, string name, int arity, Location loc) { - if (arity == 0 && namespaces.ContainsKey (name)) - return namespaces [name]; + var texpr = LookupType (ctx, name, arity, loc); + + Namespace ns; + if (arity == 0 && namespaces.TryGetValue (name, out ns)) { + if (texpr == null) + return ns; + + ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (texpr.Type); + // ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (ns.loc, ""); + ctx.Module.Compiler.Report.Warning (437, 2, loc, + "The type `{0}' conflicts with the imported namespace `{1}'. Using the definition found in the source file", + texpr.GetSignatureForError (), ns.GetSignatureForError ()); + + if (texpr.Type.MemberDefinition.IsImported) + return ns; + } - return LookupType (ctx, name, arity, false, loc); + return texpr; } // @@ -469,12 +466,17 @@ namespace Mono.CSharp { cached_types.Remove (name); } - public void ReplaceTypeWithPredefined (TypeSpec ts, BuiltinTypeSpec pts) + public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc) { - var found = types [ts.Name]; - cached_types.Remove (ts.Name); + return this; + } + + public void SetBuiltinType (BuiltinTypeSpec pts) + { + var found = types[pts.Name]; + cached_types.Remove (pts.Name); if (found.Count == 1) { - types[ts.Name][0] = pts; + types[pts.Name][0] = pts; } else { throw new NotImplementedException (); } @@ -538,138 +540,23 @@ namespace Mono.CSharp { } // - // Namespace container as created by the parser + // Namespace block as created by the parser // - public class NamespaceEntry : IMemberContext { - - public class UsingEntry { - readonly MemberName name; - Namespace resolved; - - public UsingEntry (MemberName name) - { - this.name = name; - } - - public string GetSignatureForError () - { - return name.GetSignatureForError (); - } - - public Location Location { - get { return name.Location; } - } - - public MemberName MemberName { - get { return name; } - } - - public string Name { - get { return GetSignatureForError (); } - } - - public Namespace Resolve (IMemberContext rc) - { - if (resolved != null) - return resolved; - - FullNamedExpression fne = name.GetTypeExpression ().ResolveAsTypeStep (rc, false); - if (fne == null) - return null; - - resolved = fne as Namespace; - if (resolved == null) { - rc.Module.Compiler.Report.SymbolRelatedToPreviousError (fne.Type); - rc.Module.Compiler.Report.Error (138, Location, - "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces", - GetSignatureForError ()); - } - return resolved; - } - - public override string ToString () - { - return Name; - } - } - - public class UsingAliasEntry { - public readonly string Alias; - public Location Location; - - public UsingAliasEntry (string alias, Location loc) - { - this.Alias = alias; - this.Location = loc; - } - - public virtual FullNamedExpression Resolve (IMemberContext rc, bool local) - { - FullNamedExpression fne = rc.Module.GetRootNamespace (Alias); - if (fne == null) { - rc.Module.Compiler.Report.Error (430, Location, - "The extern alias `{0}' was not specified in -reference option", - Alias); - } - - return fne; - } - - public override string ToString () - { - return Alias; - } - - } - - class LocalUsingAliasEntry : UsingAliasEntry { - FullNamedExpression resolved; - MemberName value; - - public LocalUsingAliasEntry (string alias, MemberName name, Location loc) - : base (alias, loc) - { - this.value = name; - } - - public override FullNamedExpression Resolve (IMemberContext rc, bool local) - { - if (resolved != null || value == null) - return resolved; - - if (local) - return null; - - resolved = value.GetTypeExpression ().ResolveAsTypeStep (rc, false); - if (resolved == null) { - value = null; - return null; - } - - if (resolved is TypeExpr) - resolved = resolved.ResolveAsTypeTerminal (rc, false); - - return resolved; - } - - public override string ToString () - { - return String.Format ("{0} = {1}", Alias, value.GetSignatureForError ()); - } - } - + public class NamespaceContainer : IMemberContext, ITypesContainer + { Namespace ns; readonly ModuleContainer module; - readonly NamespaceEntry parent; + readonly NamespaceContainer parent; readonly CompilationSourceFile file; + readonly Location loc; - NamespaceEntry implicit_parent; + NamespaceContainer implicit_parent; int symfile_id; // Namespace using import block - List using_aliases; - List using_clauses; + List using_aliases; + List using_clauses; public bool DeclarationFound; // End @@ -682,23 +569,24 @@ namespace Mono.CSharp { Namespace [] namespace_using_table; - public NamespaceEntry (ModuleContainer module, NamespaceEntry parent, CompilationSourceFile sourceFile, string name) + public NamespaceContainer (MemberName name, ModuleContainer module, NamespaceContainer parent, CompilationSourceFile sourceFile) { this.module = module; this.parent = parent; this.file = sourceFile; + this.loc = name == null ? Location.Null : name.Location; if (parent != null) - ns = parent.NS.GetNamespace (name, true); + ns = parent.NS.GetNamespace (name.GetName (), true); else if (name != null) - ns = module.GlobalRootNamespace.GetNamespace (name, true); + ns = module.GlobalRootNamespace.GetNamespace (name.GetName (), true); else ns = module.GlobalRootNamespace; SlaveDeclSpace = new RootDeclSpace (module, this); } - private NamespaceEntry (ModuleContainer module, NamespaceEntry parent, CompilationSourceFile file, Namespace ns, bool slave) + private NamespaceContainer (ModuleContainer module, NamespaceContainer parent, CompilationSourceFile file, Namespace ns, bool slave) { this.module = module; this.parent = parent; @@ -708,31 +596,47 @@ namespace Mono.CSharp { this.SlaveDeclSpace = slave ? new RootDeclSpace (module, this) : null; } + #region Properties + + public Location Location { + get { + return loc; + } + } + + public MemberName MemberName { + get { + return ns.MemberName; + } + } + public CompilationSourceFile SourceFile { get { return file; } } - public List Usings { + public List Usings { get { return using_clauses; } } + #endregion + // // Extracts the using alises and using clauses into a couple of // arrays that might already have the same information; Used by the // C# Eval mode. // - public void Extract (List out_using_aliases, List out_using_clauses) + public void Extract (List out_using_aliases, List out_using_clauses) { if (using_aliases != null){ - foreach (UsingAliasEntry uae in using_aliases){ + foreach (NamespaceUsingAlias uae in using_aliases){ bool replaced = false; for (int i = 0; i < out_using_aliases.Count; i++){ - UsingAliasEntry out_uea = (UsingAliasEntry) out_using_aliases [i]; + NamespaceUsingAlias out_uea = (NamespaceUsingAlias) out_using_aliases [i]; if (out_uea.Alias == uae.Alias){ out_using_aliases [i] = uae; @@ -746,10 +650,10 @@ namespace Mono.CSharp { } if (using_clauses != null){ - foreach (UsingEntry ue in using_clauses){ + foreach (NamespaceUsing ue in using_clauses){ bool found = false; - foreach (UsingEntry out_ue in out_using_clauses) + foreach (NamespaceUsing out_ue in out_using_clauses) if (out_ue.Name == ue.Name){ found = true; break; @@ -770,11 +674,11 @@ namespace Mono.CSharp { // To implement these rules, the expressions in the using directives are resolved using // the "doppelganger" (ghostly bodiless duplicate). // - NamespaceEntry doppelganger; - NamespaceEntry Doppelganger { + NamespaceContainer doppelganger; + NamespaceContainer Doppelganger { get { if (!IsImplicit && doppelganger == null) { - doppelganger = new NamespaceEntry (module, ImplicitParent, file, ns, true); + doppelganger = new NamespaceContainer (module, ImplicitParent, file, ns, true); doppelganger.using_aliases = using_aliases; } return doppelganger; @@ -785,18 +689,18 @@ namespace Mono.CSharp { get { return ns; } } - public NamespaceEntry Parent { + public NamespaceContainer Parent { get { return parent; } } - public NamespaceEntry ImplicitParent { + public NamespaceContainer ImplicitParent { get { if (parent == null) return null; if (implicit_parent == null) { implicit_parent = (parent.NS == ns.Parent) ? parent - : new NamespaceEntry (module, parent, file, ns.Parent, false); + : new NamespaceContainer (module, parent, file, ns.Parent, false); } return implicit_parent; } @@ -812,9 +716,9 @@ namespace Mono.CSharp { } if (using_clauses == null) { - using_clauses = new List (); + using_clauses = new List (); } else { - foreach (UsingEntry old_entry in using_clauses) { + foreach (NamespaceUsing old_entry in using_clauses) { if (name.Equals (old_entry.MemberName)) { Compiler.Report.SymbolRelatedToPreviousError (old_entry.Location, old_entry.GetSignatureForError ()); Compiler.Report.Warning (105, 3, loc, "The using directive for `{0}' appeared previously in this namespace", name.GetSignatureForError ()); @@ -823,12 +727,11 @@ namespace Mono.CSharp { } } - using_clauses.Add (new UsingEntry (name)); + using_clauses.Add (new NamespaceUsing (name)); } public void AddUsingAlias (string alias, MemberName name, Location loc) { - // TODO: This is parser bussines if (DeclarationFound){ Compiler.Report.Error (1529, loc, "A using clause must precede all other namespace elements except extern alias declarations"); } @@ -838,10 +741,9 @@ namespace Mono.CSharp { public void AddUsingExternalAlias (string alias, Location loc, Report Report) { - // TODO: Do this in parser bool not_first = using_clauses != null || DeclarationFound; if (using_aliases != null && !not_first) { - foreach (UsingAliasEntry uae in using_aliases) { + foreach (NamespaceUsingAlias uae in using_aliases) { if (uae is LocalUsingAliasEntry) { not_first = true; break; @@ -857,15 +759,15 @@ namespace Mono.CSharp { return; } - AddUsingAlias (new UsingAliasEntry (alias, loc)); + AddUsingAlias (new NamespaceUsingAlias (alias, loc)); } - void AddUsingAlias (UsingAliasEntry uae) + void AddUsingAlias (NamespaceUsingAlias uae) { if (using_aliases == null) { - using_aliases = new List (); + using_aliases = new List (); } else { - foreach (UsingAliasEntry entry in using_aliases) { + foreach (NamespaceUsingAlias entry in using_aliases) { if (uae.Alias == entry.Alias) { Compiler.Report.SymbolRelatedToPreviousError (uae.Location, uae.Alias); Compiler.Report.Error (1537, entry.Location, "The using alias `{0}' appeared previously in this namespace", @@ -882,7 +784,7 @@ namespace Mono.CSharp { // Does extension methods look up to find a method which matches name and extensionType. // Search starts from this namespace and continues hierarchically up to top level. // - public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope) + public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) { List candidates = null; foreach (Namespace n in GetUsingTable ()) { @@ -925,7 +827,7 @@ namespace Mono.CSharp { { // Precondition: Only simple names (no dots) will be looked up with this function. FullNamedExpression resolved = null; - for (NamespaceEntry curr_ns = this; curr_ns != null; curr_ns = curr_ns.ImplicitParent) { + for (NamespaceContainer curr_ns = this; curr_ns != null; curr_ns = curr_ns.ImplicitParent) { if ((resolved = curr_ns.Lookup (name, arity, loc, ignore_cs0104)) != null) break; } @@ -937,7 +839,7 @@ namespace Mono.CSharp { { IEnumerable all = Enumerable.Empty (); - for (NamespaceEntry curr_ns = this; curr_ns != null; curr_ns = curr_ns.ImplicitParent){ + for (NamespaceContainer curr_ns = this; curr_ns != null; curr_ns = curr_ns.ImplicitParent){ foreach (Namespace using_ns in GetUsingTable ()){ if (prefix.StartsWith (using_ns.Name)){ int ld = prefix.LastIndexOf ('.'); @@ -957,11 +859,11 @@ namespace Mono.CSharp { // Looks-up a alias named @name in this and surrounding namespace declarations public FullNamedExpression LookupNamespaceAlias (string name) { - for (NamespaceEntry n = this; n != null; n = n.ImplicitParent) { + for (NamespaceContainer n = this; n != null; n = n.ImplicitParent) { if (n.using_aliases == null) continue; - foreach (UsingAliasEntry ue in n.using_aliases) { + foreach (NamespaceUsingAlias ue in n.using_aliases) { if (ue.Alias == name) return ue.Resolve (Doppelganger ?? this, Doppelganger == null); } @@ -975,13 +877,13 @@ namespace Mono.CSharp { // // Check whether it's in the namespace. // - FullNamedExpression fne = ns.Lookup (this, name, arity, loc); + FullNamedExpression fne = ns.LookupTypeOrNamespace (this, name, arity, loc); // // Check aliases. // if (using_aliases != null && arity == 0) { - foreach (UsingAliasEntry ue in using_aliases) { + foreach (NamespaceUsingAlias ue in using_aliases) { if (ue.Alias == name) { if (fne != null) { if (Doppelganger != null) { @@ -1016,7 +918,7 @@ namespace Mono.CSharp { foreach (Namespace using_ns in GetUsingTable ()) { // A using directive imports only types contained in the namespace, it // does not import any nested namespaces - fne = using_ns.LookupType (this, name, arity, false, loc); + fne = using_ns.LookupType (this, name, arity, loc); if (fne == null) continue; @@ -1067,7 +969,7 @@ namespace Mono.CSharp { var list = new List (using_clauses.Count); - foreach (UsingEntry ue in using_clauses) { + foreach (NamespaceUsing ue in using_clauses) { Namespace using_ns = ue.Resolve (Doppelganger); if (using_ns == null) continue; @@ -1088,7 +990,7 @@ namespace Mono.CSharp { if (using_clauses != null) { using_list = new string [using_clauses.Count]; for (int i = 0; i < using_clauses.Count; i++) - using_list [i] = ((UsingEntry) using_clauses [i]).MemberName.GetName (); + using_list [i] = ((NamespaceUsing) using_clauses [i]).MemberName.GetName (); } symfile_id = SymbolWriter.DefineNamespace (ns.Name, file.CompileUnitEntry, using_list, parent_id); @@ -1152,12 +1054,12 @@ namespace Mono.CSharp { resolved = true; if (using_aliases != null) { - foreach (UsingAliasEntry ue in using_aliases) + foreach (NamespaceUsingAlias ue in using_aliases) ue.Resolve (Doppelganger, Doppelganger == null); } if (using_clauses != null) { - foreach (UsingEntry ue in using_clauses) + foreach (NamespaceUsing ue in using_clauses) ue.Resolve (Doppelganger); } @@ -1211,4 +1113,110 @@ namespace Mono.CSharp { #endregion } + + public class NamespaceUsing + { + readonly MemberName name; + Namespace resolved; + + public NamespaceUsing (MemberName name) + { + this.name = name; + } + + public string GetSignatureForError () + { + return name.GetSignatureForError (); + } + + public Location Location + { + get { return name.Location; } + } + + public MemberName MemberName + { + get { return name; } + } + + public string Name + { + get { return GetSignatureForError (); } + } + + public Namespace Resolve (IMemberContext rc) + { + if (resolved != null) + return resolved; + + FullNamedExpression fne = name.GetTypeExpression ().ResolveAsTypeOrNamespace (rc); + if (fne == null) + return null; + + resolved = fne as Namespace; + if (resolved == null) { + rc.Module.Compiler.Report.SymbolRelatedToPreviousError (fne.Type); + rc.Module.Compiler.Report.Error (138, Location, + "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces", + GetSignatureForError ()); + } + return resolved; + } + } + + public class NamespaceUsingAlias + { + public readonly string Alias; + public Location Location; + + public NamespaceUsingAlias (string alias, Location loc) + { + this.Alias = alias; + this.Location = loc; + } + + public virtual FullNamedExpression Resolve (IMemberContext rc, bool local) + { + FullNamedExpression fne = rc.Module.GetRootNamespace (Alias); + if (fne == null) { + rc.Module.Compiler.Report.Error (430, Location, + "The extern alias `{0}' was not specified in -reference option", + Alias); + } + + return fne; + } + } + + class LocalUsingAliasEntry : NamespaceUsingAlias + { + FullNamedExpression resolved; + MemberName value; + + public LocalUsingAliasEntry (string alias, MemberName name, Location loc) + : base (alias, loc) + { + this.value = name; + } + + public override FullNamedExpression Resolve (IMemberContext rc, bool local) + { + if (resolved != null || value == null) + return resolved; + + if (local) + return null; + + resolved = value.GetTypeExpression ().ResolveAsTypeOrNamespace (rc); + if (resolved == null) { + value = null; + return null; + } + + if (resolved is TypeExpr) + resolved = resolved.ResolveAsType (rc); + + return resolved; + } + } } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/nullable.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/nullable.cs index e12a7316a..f5e215570 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/nullable.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/nullable.cs @@ -37,15 +37,15 @@ namespace Mono.CSharp.Nullable : this (new TypeExpression (type, loc), loc) { } - protected override TypeExpr DoResolveAsTypeStep (IMemberContext ec) + public override TypeExpr ResolveAsType (IMemberContext ec) { - var type = ec.Module.PredefinedTypes.Nullable.Resolve (loc); + var type = ec.Module.PredefinedTypes.Nullable.Resolve (); if (type == null) return null; TypeArguments args = new TypeArguments (underlying); GenericTypeExpr ctype = new GenericTypeExpr (type, args, loc); - return ctype.ResolveAsTypeTerminal (ec, false); + return ctype.ResolveAsType (ec); } } @@ -522,7 +522,7 @@ namespace Mono.CSharp.Nullable Expression LiftExpression (ResolveContext ec, Expression expr) { TypeExpr lifted_type = new NullableType (expr.Type, expr.Location); - lifted_type = lifted_type.ResolveAsTypeTerminal (ec, false); + lifted_type = lifted_type.ResolveAsType (ec); if (lifted_type == null) return null; @@ -872,7 +872,7 @@ namespace Mono.CSharp.Nullable // if (left_unwrap == null || IsLeftNullLifted || left_unwrap.Type != left.Type || (left_unwrap != null && IsRightNullLifted)) { lifted_type = new NullableType (left.Type, loc); - lifted_type = lifted_type.ResolveAsTypeTerminal (ec, false); + lifted_type = lifted_type.ResolveAsType (ec); if (lifted_type == null) return null; @@ -884,7 +884,7 @@ namespace Mono.CSharp.Nullable if (left != right && (right_unwrap == null || IsRightNullLifted || right_unwrap.Type != right.Type || (right_unwrap != null && IsLeftNullLifted))) { lifted_type = new NullableType (right.Type, loc); - lifted_type = lifted_type.ResolveAsTypeTerminal (ec, false); + lifted_type = lifted_type.ResolveAsType (ec); if (lifted_type == null) return null; @@ -900,7 +900,7 @@ namespace Mono.CSharp.Nullable if ((Oper & Operator.ComparisonMask) == 0) { lifted_type = new NullableType (res_expr.Type, loc); - lifted_type = lifted_type.ResolveAsTypeTerminal (ec, false); + lifted_type = lifted_type.ResolveAsType (ec); if (lifted_type == null) return null; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/parameter.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/parameter.cs index 26028250d..40ea21707 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/parameter.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/parameter.cs @@ -215,6 +215,7 @@ namespace Mono.CSharp { ISBYREF = 8, REFMASK = 32, OUTMASK = 64, + SignatureMask = REFMASK | OUTMASK, This = 128 } @@ -281,6 +282,9 @@ namespace Mono.CSharp { get { return parameter_type; } + set { + parameter_type = value; + } } public FullNamedExpression TypeExpression { @@ -353,7 +357,7 @@ namespace Mono.CSharp { if (attributes != null) attributes.AttachTo (this, rc); - var expr = texpr.ResolveAsTypeTerminal (rc, false); + var expr = texpr.ResolveAsType (rc); if (expr == null) return null; @@ -559,7 +563,7 @@ namespace Mono.CSharp { var def_value = DefaultValue; Constant c = def_value != null ? def_value.Child as Constant : default_expr as Constant; if (c != null) { - if (default_expr.Type.BuiltinType == BuiltinTypeSpec.Type.Decimal) { + if (c.Type.BuiltinType == BuiltinTypeSpec.Type.Decimal) { pa.DecimalConstant.EmitAttribute (builder, (decimal) c.GetValue (), c.Location); } else { builder.SetConstant (c.GetValue ()); @@ -657,7 +661,7 @@ namespace Mono.CSharp { // public static TypeExpr ResolveParameterExpressionType (IMemberContext ec, Location location) { - TypeSpec p_type = ec.Module.PredefinedTypes.ParameterExpression.Resolve (location); + TypeSpec p_type = ec.Module.PredefinedTypes.ParameterExpression.Resolve (); return new TypeExpression (p_type, location); } @@ -800,6 +804,26 @@ namespace Mono.CSharp { return -1; } + public string GetSignatureForDocumentation () + { + if (IsEmpty) + return string.Empty; + + StringBuilder sb = new StringBuilder ("("); + for (int i = 0; i < Count; ++i) { + if (i != 0) + sb.Append (","); + + sb.Append (types [i].GetSignatureForDocumentation ()); + + if ((parameters[i].ModFlags & Parameter.Modifier.ISBYREF) != 0) + sb.Append ("@"); + } + sb.Append (")"); + + return sb.ToString (); + } + public string GetSignatureForError () { return GetSignatureForError ("(", ")", Count); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/pending.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/pending.cs index 038960728..3800f2921 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/pending.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/pending.cs @@ -327,10 +327,11 @@ namespace Mono.CSharp { MethodBuilder proxy = container.TypeBuilder.DefineMethod ( proxy_name, + MethodAttributes.Private | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.CheckAccessOnOverride | - MethodAttributes.Virtual, + MethodAttributes.Virtual | MethodAttributes.Final, CallingConventions.Standard | CallingConventions.HasThis, base_method.ReturnType.GetMetaInfo (), param.GetMetaInfo ()); @@ -383,10 +384,20 @@ namespace Mono.CSharp { if (!TypeSpecComparer.Override.IsEqual (mi.ReturnType, base_method.ReturnType)) return false; - if (!base_method.IsAbstract && !base_method.IsVirtual) - // FIXME: We can avoid creating a proxy if base_method can be marked 'final virtual' instead. - // However, it's too late now, the MethodBuilder has already been created (see bug 377519) + if (!base_method.IsVirtual) { +#if STATIC + var base_builder = base_method.GetMetaInfo () as MethodBuilder; + if (base_builder != null) { + // + // We can avoid creating a proxy if base_method can be marked 'final virtual'. This can + // be done for all methods from compiled assembly + // + base_builder.__SetAttributes (base_builder.Attributes | MethodAttributes.Virtual | MethodAttributes.Final | MethodAttributes.NewSlot); + return true; + } +#endif DefineProxy (iface_type, base_method, mi); + } return true; } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/property.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/property.cs index 05e1721ce..588f5b07a 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/property.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/property.cs @@ -805,11 +805,6 @@ namespace Mono.CSharp base.Emit (); } - - public override string GetDocCommentName () - { - return String.Concat (DocCommentHeader, Parent.Name, ".", GetFullName (ShortName).Replace ('.', '#')); - } } /// @@ -1118,7 +1113,7 @@ namespace Mono.CSharp public abstract class AEventAccessor : AbstractPropertyEventMethod { protected readonly Event method; - ParametersCompiled parameters; + readonly ParametersCompiled parameters; static readonly string[] attribute_targets = new string [] { "method", "param", "return" }; @@ -1169,7 +1164,10 @@ namespace Mono.CSharp public virtual MethodBuilder Define (DeclSpace parent) { - parameters.Resolve (this); + // Fill in already resolved event type to speed things up and + // avoid confusing duplicate errors + ((Parameter) parameters.FixedParameters[0]).Type = method.member_type; + parameters.Types = new TypeSpec[] { method.member_type }; method_data = new MethodData (method, method.ModFlags, method.flags | MethodAttributes.HideBySig | MethodAttributes.SpecialName, this); @@ -1576,24 +1574,24 @@ namespace Mono.CSharp return base.EnableOverloadChecks (overload); } - public override string GetDocCommentName () - { - return DocumentationBuilder.GetMethodDocCommentName (this, parameters); - } - public override string GetSignatureForError () { StringBuilder sb = new StringBuilder (Parent.GetSignatureForError ()); if (MemberName.Left != null) { - sb.Append ('.'); + sb.Append ("."); sb.Append (MemberName.Left.GetSignatureForError ()); } sb.Append (".this"); - sb.Append (parameters.GetSignatureForError ().Replace ('(', '[').Replace (')', ']')); + sb.Append (parameters.GetSignatureForError ("[", "]", parameters.Count)); return sb.ToString (); } + public override string GetSignatureForDocumentation () + { + return base.GetSignatureForDocumentation () + parameters.GetSignatureForDocumentation (); + } + public AParametersCollection Parameters { get { return parameters; @@ -1634,6 +1632,11 @@ namespace Mono.CSharp } #endregion + public override string GetSignatureForDocumentation () + { + return base.GetSignatureForDocumentation () + parameters.GetSignatureForDocumentation (); + } + public override string GetSignatureForError () { return DeclaringType.GetSignatureForError () + ".this" + parameters.GetSignatureForError ("[", "]", parameters.Count); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/report.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/report.cs index 1b8b19af8..633b18586 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/report.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/report.cs @@ -54,7 +54,7 @@ namespace Mono.CSharp { 28, 67, 78, 105, 108, 109, 114, 162, 164, 168, 169, 183, 184, 197, 219, 251, 252, 253, 278, 282, - 402, 414, 419, 420, 429, 436, 440, 458, 464, 465, 467, 469, 472, + 402, 414, 419, 420, 429, 436, 437, 440, 458, 464, 465, 467, 469, 472, 612, 618, 626, 628, 642, 649, 652, 657, 658, 659, 660, 661, 665, 672, 675, 693, 728, 809, 824, @@ -677,6 +677,10 @@ namespace Mono.CSharp { } } + sealed class NullReportPrinter : ReportPrinter + { + } + // // Default message recorder, it uses two types of message groups. // Common messages: messages reported in all sessions. diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/roottypes.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/roottypes.cs index 12c213d58..260259037 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/roottypes.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/roottypes.cs @@ -124,6 +124,9 @@ namespace Mono.CSharp readonly Dictionary reference_types; readonly Dictionary attrs_cache; + // Used for unique namespaces/types during parsing + Dictionary defined_type_containers; + AssemblyDefinition assembly; readonly CompilerContext context; readonly RootNamespace global_ns; @@ -154,6 +157,8 @@ namespace Mono.CSharp pointer_types = new Dictionary (); reference_types = new Dictionary (); attrs_cache = new Dictionary (); + + defined_type_containers = new Dictionary (); } #region Properties @@ -197,6 +202,10 @@ namespace Mono.CSharp } } + internal DocumentationBuilder DocumentationBuilder { + get; set; + } + public Evaluator Evaluator { get; set; } @@ -366,7 +375,7 @@ namespace Mono.CSharp public RootNamespace CreateRootNamespace (string alias) { if (alias == global_ns.Alias) { - NamespaceEntry.Error_GlobalNamespaceRedefined (Location.Null, Report); + NamespaceContainer.Error_GlobalNamespaceRedefined (Location.Null, Report); return global_ns; } @@ -387,6 +396,9 @@ namespace Mono.CSharp public new void CreateType () { + // Release cache used by parser only + defined_type_containers = null; + foreach (TypeContainer tc in types) tc.CreateType (); } @@ -486,12 +498,53 @@ namespace Mono.CSharp return DeclaringAssembly.IsCLSCompliant; } - protected override bool AddMemberType (TypeContainer ds) + protected override bool AddMemberType (TypeContainer tc) { - if (!AddToContainer (ds, ds.Name)) - return false; - ds.NamespaceEntry.NS.AddType (this, ds.Definition); - return true; + if (AddTypesContainer (tc)) { + if ((tc.ModFlags & Modifiers.PARTIAL) != 0) + defined_names.Add (tc.Name, tc); + + tc.NamespaceEntry.NS.AddType (this, tc.Definition); + return true; + } + + return false; + } + + public bool AddTypesContainer (ITypesContainer container) + { + var mn = container.MemberName; + ITypesContainer found; + if (!defined_type_containers.TryGetValue (mn, out found)) { + defined_type_containers.Add (mn, container); + return true; + } + + if (container is NamespaceContainer && found is NamespaceContainer) + return true; + + var container_tc = container as TypeContainer; + var found_tc = found as TypeContainer; + if (container_tc != null && found_tc != null && container_tc.Kind == found_tc.Kind) { + if ((found_tc.ModFlags & container_tc.ModFlags & Modifiers.PARTIAL) != 0) { + return false; + } + + if (((found_tc.ModFlags | container_tc.ModFlags) & Modifiers.PARTIAL) != 0) { + Report.SymbolRelatedToPreviousError (found_tc); + Error_MissingPartialModifier (container_tc); + return false; + } + } + + string ns = mn.Left != null ? mn.Left.GetSignatureForError () : Module.GlobalRootNamespace.GetSignatureForError (); + mn = new MemberName (mn.Name, mn.TypeArguments, mn.Location); + + Report.SymbolRelatedToPreviousError (found.Location, ""); + Report.Error (101, container.Location, + "The namespace `{0}' already contains a definition for `{1}'", + ns, mn.GetSignatureForError ()); + return false; } protected override void RemoveMemberType (TypeContainer ds) @@ -517,7 +570,7 @@ namespace Mono.CSharp } sealed class RootDeclSpace : TypeContainer { - public RootDeclSpace (ModuleContainer module, NamespaceEntry ns) + public RootDeclSpace (ModuleContainer module, NamespaceContainer ns) : base (ns, null, MemberName.Null, null, 0) { PartialContainer = module; @@ -558,7 +611,7 @@ namespace Mono.CSharp return PartialContainer.IsClsComplianceRequired (); } - public override IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceEntry scope) + public override IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) { return null; } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/statement.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/statement.cs index c840d0b7e..e196b2346 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/statement.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/statement.cs @@ -1366,46 +1366,45 @@ namespace Mono.CSharp { { if (li.Type == null) { TypeSpec type = null; - if (type_expr is VarExpr) { - // - // C# 3.0 introduced contextual keywords (var) which behaves like a type if type with - // same name exists or as a keyword when no type was found - // - var texpr = type_expr.ResolveAsTypeTerminal (bc, true); - if (texpr == null) { - if (bc.Module.Compiler.Settings.Version < LanguageVersion.V_3) - bc.Report.FeatureIsNotAvailable (bc.Module.Compiler, loc, "implicitly typed local variable"); - - if (li.IsFixed) { - bc.Report.Error (821, loc, "A fixed statement cannot use an implicitly typed local variable"); - return false; - } + var vexpr = type_expr as VarExpr; - if (li.IsConstant) { - bc.Report.Error (822, loc, "An implicitly typed local variable cannot be a constant"); - return false; - } + // + // C# 3.0 introduced contextual keywords (var) which behaves like a type if type with + // same name exists or as a keyword when no type was found + // + if (vexpr != null && !vexpr.IsPossibleTypeOrNamespace (bc)) { + if (bc.Module.Compiler.Settings.Version < LanguageVersion.V_3) + bc.Report.FeatureIsNotAvailable (bc.Module.Compiler, loc, "implicitly typed local variable"); - if (Initializer == null) { - bc.Report.Error (818, loc, "An implicitly typed local variable declarator must include an initializer"); - return false; - } + if (li.IsFixed) { + bc.Report.Error (821, loc, "A fixed statement cannot use an implicitly typed local variable"); + return false; + } - if (declarators != null) { - bc.Report.Error (819, loc, "An implicitly typed local variable declaration cannot include multiple declarators"); - declarators = null; - } + if (li.IsConstant) { + bc.Report.Error (822, loc, "An implicitly typed local variable cannot be a constant"); + return false; + } - Initializer = Initializer.Resolve (bc); - if (Initializer != null) { - ((VarExpr) type_expr).InferType (bc, Initializer); - type = type_expr.Type; - } + if (Initializer == null) { + bc.Report.Error (818, loc, "An implicitly typed local variable declarator must include an initializer"); + return false; + } + + if (declarators != null) { + bc.Report.Error (819, loc, "An implicitly typed local variable declaration cannot include multiple declarators"); + declarators = null; + } + + Initializer = Initializer.Resolve (bc); + if (Initializer != null) { + ((VarExpr) type_expr).InferType (bc, Initializer); + type = type_expr.Type; } } if (type == null) { - var texpr = type_expr.ResolveAsTypeTerminal (bc, false); + var texpr = type_expr.ResolveAsType (bc); if (texpr == null) return false; @@ -1982,14 +1981,7 @@ namespace Mono.CSharp { var pi = variable as ParametersBlock.ParameterInfo; if (pi != null) { var p = pi.Parameter; - if (p is AnonymousTypeClass.GeneratedParameter) { - ParametersBlock.TopBlock.Report.Error (833, p.Location, "`{0}': An anonymous type cannot have multiple properties with the same name", - p.Name); - } else { - ParametersBlock.TopBlock.Report.Error (100, p.Location, "The parameter name `{0}' is a duplicate", p.Name); - } - - return; + ParametersBlock.TopBlock.Report.Error (100, p.Location, "The parameter name `{0}' is a duplicate", p.Name); } ParametersBlock.TopBlock.Report.Error (128, variable.Location, @@ -2621,7 +2613,8 @@ namespace Mono.CSharp { // TODO: Should use Parameter only and more block there parameter_info[i] = new ParameterInfo (this, i); - AddLocalName (p.Name, parameter_info[i]); + if (p.Name != null) + AddLocalName (p.Name, parameter_info[i]); } } @@ -3760,7 +3753,7 @@ namespace Mono.CSharp { } else if (ec.Module.PredefinedTypes.Hashtable.Define ()) { string_dictionary_type = new TypeExpression (ec.Module.PredefinedTypes.Hashtable.TypeSpec, loc); } else { - ec.Module.PredefinedTypes.Dictionary.Resolve (loc); + ec.Module.PredefinedTypes.Dictionary.Resolve (); return; } @@ -4777,7 +4770,7 @@ namespace Mono.CSharp { { using (ec.With (ResolveContext.Options.CatchScope, true)) { if (type_expr != null) { - TypeExpr te = type_expr.ResolveAsTypeTerminal (ec, false); + TypeExpr te = type_expr.ResolveAsType (ec); if (te == null) return false; @@ -5335,7 +5328,7 @@ namespace Mono.CSharp { var_type = new TypeExpression (access.Type, ve.Location); } - var_type = var_type.ResolveAsTypeTerminal (ec, false); + var_type = var_type.ResolveAsType (ec); if (var_type == null) return false; @@ -5698,7 +5691,7 @@ namespace Mono.CSharp { current_pe = EmptyCast.Create (current_pe, ec.BuiltinTypes.Dynamic); } - var_type = var_type.ResolveAsTypeTerminal (ec, false); + var_type = var_type.ResolveAsType (ec); if (var_type == null) return false; diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/typemanager.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/typemanager.cs index ea02af6d0..f7bb20207 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/typemanager.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/typemanager.cs @@ -15,6 +15,7 @@ using System; using System.Globalization; using System.Collections.Generic; using System.Text; +using System.IO; namespace Mono.CSharp { @@ -142,14 +143,14 @@ namespace Mono.CSharp { var ctx = module.Compiler; foreach (var p in types) { - var found = PredefinedType.Resolve (module, p.Kind, p.Namespace, p.Name, p.Arity, Location.Null); + var found = PredefinedType.Resolve (module, p.Kind, p.Namespace, p.Name, p.Arity); if (found == null || found == p) continue; var tc = found.MemberDefinition as TypeContainer; if (tc != null) { var ns = module.GlobalRootNamespace.GetNamespace (p.Namespace, false); - ns.ReplaceTypeWithPredefined (found, p); + ns.SetBuiltinType (p); tc.SetPredefinedSpec (p); p.SetDefinition (found); @@ -529,14 +530,8 @@ namespace Mono.CSharp if (type != null) return true; - Namespace type_ns = module.GlobalRootNamespace.GetNamespace (ns, true); - var te = type_ns.LookupType (module, name, arity, true, Location.Null); - if (te == null || te.Type.Kind != kind) { - return false; - } - - type = te.Type; - return true; + type = Resolve (module, kind, ns, name, arity, false); + return type != null; } public string GetSignatureForError () @@ -544,33 +539,87 @@ namespace Mono.CSharp return ns + "." + name; } - public static TypeSpec Resolve (ModuleContainer module, MemberKind kind, string ns, string name, int arity, Location loc) + public static TypeSpec Resolve (ModuleContainer module, MemberKind kind, string ns, string name, int arity) + { + return Resolve (module, kind, ns, name, arity, true); + } + + public static TypeSpec Resolve (ModuleContainer module, MemberKind kind, string ns, string name, int arity, bool reportErrors) { Namespace type_ns = module.GlobalRootNamespace.GetNamespace (ns, true); - var te = type_ns.LookupType (module, name, arity, false, Location.Null); - if (te == null) { - module.Compiler.Report.Error (518, loc, "The predefined type `{0}.{1}' is not defined or imported", ns, name); + var found = type_ns.GetAllTypes (name); + if (found == null) { + if (reportErrors) + module.Compiler.Report.Error (518, "The predefined type `{0}.{1}' is not defined or imported", ns, name); + return null; } - var type = te.Type; - if (type.Kind != kind) { - if (type.Kind == MemberKind.Struct && kind == MemberKind.Void && type.MemberDefinition is TypeContainer) { - // Void is declared as struct but we keep it internally as - // special kind, the swap will be done by caller + TypeSpec best_match = null; + foreach (var candidate in found) { + if (candidate.Kind != kind) { + if (candidate.Kind == MemberKind.Struct && kind == MemberKind.Void && candidate.MemberDefinition is TypeContainer) { + // Void is declared as struct but we keep it internally as + // special kind, the swap will be done by caller + } else { + continue; + } + } + + if (candidate.Arity != arity) + continue; + + if ((candidate.Modifiers & Modifiers.INTERNAL) != 0 && !candidate.MemberDefinition.IsInternalAsPublic (module.DeclaringAssembly)) + continue; + + if (best_match == null) { + best_match = candidate; + continue; + } + + var other_match = best_match; + if (!best_match.MemberDefinition.IsImported && + module.Compiler.BuiltinTypes.Object.MemberDefinition.DeclaringAssembly == candidate.MemberDefinition.DeclaringAssembly) { + best_match = candidate; + } + + string location; + if (best_match.MemberDefinition is MemberCore) { + location = ((MemberCore) best_match.MemberDefinition).Location.Name; + } else { + var assembly = (ImportedAssemblyDefinition) best_match.MemberDefinition.DeclaringAssembly; + location = Path.GetFileName (assembly.Location); + } + + module.Compiler.Report.SymbolRelatedToPreviousError (other_match); + module.Compiler.Report.SymbolRelatedToPreviousError (candidate); + + module.Compiler.Report.Warning (1685, 1, + "The predefined type `{0}.{1}' is defined multiple times. Using definition from `{2}'", + ns, name, location); + + break; + } + + if (best_match == null && reportErrors) { + Location loc; + if (found[0].MemberDefinition is MemberCore) { + loc = ((MemberCore) found[0].MemberDefinition).Location; } else { - module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name); - return null; + loc = Location.Null; + module.Compiler.Report.SymbolRelatedToPreviousError (found[0]); } + + module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name); } - return type; + return best_match; } - public TypeSpec Resolve (Location loc) + public TypeSpec Resolve () { if (type == null) - type = Resolve (module, kind, ns, name, arity, loc); + type = Resolve (module, kind, ns, name, arity); return type; } @@ -662,7 +711,7 @@ namespace Mono.CSharp return member; if (declaring_type == null) { - if (declaring_type_predefined.Resolve (loc) == null) + if (declaring_type_predefined.Resolve () == null) return null; } @@ -670,7 +719,7 @@ namespace Mono.CSharp TypeSpec[] types = new TypeSpec[parameters_predefined.Length]; for (int i = 0; i < types.Length; ++i) { var p = parameters_predefined[i]; - types[i] = p.Resolve (loc); + types[i] = p.Resolve (); if (types[i] == null) return null; } diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/typespec.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/typespec.cs index 3bcc3b43a..bf0816ec9 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/typespec.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/typespec.cs @@ -109,11 +109,11 @@ namespace Mono.CSharp var type = this; do { - if (type.IsGeneric) - return false; - if (type.BuiltinType == BuiltinTypeSpec.Type.Attribute) return true; + + if (type.IsGeneric) + return false; type = type.base_type; } while (type != null); @@ -358,6 +358,65 @@ namespace Mono.CSharp return this; } + public override string GetSignatureForDocumentation () + { + StringBuilder sb = new StringBuilder (); + if (IsNested) { + sb.Append (DeclaringType.GetSignatureForDocumentation ()); + } else { + sb.Append (MemberDefinition.Namespace); + } + + if (sb.Length != 0) + sb.Append ("."); + + sb.Append (Name); + if (Arity > 0) { + if (this is InflatedTypeSpec) { + sb.Append ("{"); + for (int i = 0; i < Arity; ++i) { + if (i > 0) + sb.Append (","); + + sb.Append (TypeArguments[i].GetSignatureForDocumentation ()); + } + sb.Append ("}"); + } else { + sb.Append ("`"); + sb.Append (Arity.ToString ()); + } + } + + return sb.ToString (); + } + + public string GetExplicitNameSignatureForDocumentation () + { + StringBuilder sb = new StringBuilder (); + if (IsNested) { + sb.Append (DeclaringType.GetExplicitNameSignatureForDocumentation ()); + } else if (MemberDefinition.Namespace != null) { + sb.Append (MemberDefinition.Namespace.Replace ('.', '#')); + } + + if (sb.Length != 0) + sb.Append ("#"); + + sb.Append (Name); + if (Arity > 0) { + sb.Append ("{"); + for (int i = 0; i < Arity; ++i) { + if (i > 0) + sb.Append (","); + + sb.Append (TypeArguments[i].GetExplicitNameSignatureForDocumentation ()); + } + sb.Append ("}"); + } + + return sb.ToString (); + } + public override string GetSignatureForError () { string s; @@ -1133,6 +1192,7 @@ namespace Mono.CSharp public static readonly InternalType MethodGroup = new InternalType ("method group"); public static readonly InternalType NullLiteral = new InternalType ("null"); public static readonly InternalType FakeInternalType = new InternalType (""); + public static readonly InternalType Namespace = new InternalType (""); readonly string name; @@ -1303,6 +1363,11 @@ namespace Mono.CSharp return null; } + public override string GetSignatureForDocumentation () + { + return Element.GetSignatureForDocumentation () + GetPostfixSignature (); + } + public override string GetSignatureForError () { return Element.GetSignatureForError () + GetPostfixSignature (); @@ -1533,6 +1598,33 @@ namespace Mono.CSharp return sb.ToString (); } + public override string GetSignatureForDocumentation () + { + var e = Element; + List ranks = new List (2); + ranks.Add (rank); + + while (e is ArrayContainer) { + var ac = (ArrayContainer) e; + ranks.Add (ac.rank); + e = ac.Element; + } + + StringBuilder sb = new StringBuilder (e.GetSignatureForDocumentation ()); + for (int r = 0; r < ranks.Count; ++r) { + sb.Append ("["); + for (int i = 1; i < ranks[r]; i++) { + if (i == 1) + sb.Append ("0:"); + + sb.Append (",0:"); + } + sb.Append ("]"); + } + + return sb.ToString (); + } + public static ArrayContainer MakeType (ModuleContainer module, TypeSpec element) { return MakeType (module, element, 1); diff --git a/ICSharpCode.NRefactory/CSharp/Parser/mcs/visit.cs b/ICSharpCode.NRefactory/CSharp/Parser/mcs/visit.cs index 9ec4d2580..0ac678300 100644 --- a/ICSharpCode.NRefactory/CSharp/Parser/mcs/visit.cs +++ b/ICSharpCode.NRefactory/CSharp/Parser/mcs/visit.cs @@ -344,6 +344,11 @@ namespace Mono.CSharp return null; } + public virtual object Visit (QualifiedAliasMember qualifiedAliasMember) + { + return null; + } + public virtual object Visit (LocalVariableReference localVariableReference) { return null; @@ -441,6 +446,11 @@ namespace Mono.CSharp return null; } + public virtual object Visit (NewAnonymousType newAnonymousType) + { + return null; + } + public virtual object Visit (NewInitialize newInitializeExpression) { return null; @@ -541,6 +551,11 @@ namespace Mono.CSharp return null; } + public virtual object Visit (Linq.QueryStartClause queryExpression) + { + return null; + } + public virtual object Visit (Linq.SelectMany selectMany) { return null; @@ -590,10 +605,26 @@ namespace Mono.CSharp { return null; } - + public virtual object Visit (Linq.ThenByDescending thenByDescending) { return null; } + + // undocumented expressions + public virtual object Visit (RefValueExpr refValueExpr) + { + return null; + } + + public virtual object Visit (RefTypeExpr refTypeExpr) + { + return null; + } + + public virtual object Visit (MakeRefExpr makeRefExpr) + { + return null; + } } } \ No newline at end of file diff --git a/ICSharpCode.NRefactory/CSharp/Resolver/ResolveVisitor.cs b/ICSharpCode.NRefactory/CSharp/Resolver/ResolveVisitor.cs index 2c4002a41..1403107ad 100644 --- a/ICSharpCode.NRefactory/CSharp/Resolver/ResolveVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/Resolver/ResolveVisitor.cs @@ -497,9 +497,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver throw new NotImplementedException(); } - public override ResolveResult VisitArgListExpression(ArgListExpression argListExpression, object data) + public override ResolveResult VisitUndocumentedExpression(UndocumentedExpression undocumentedExpression, object data) { - ScanChildren(argListExpression); + // TODO: ? + ScanChildren(undocumentedExpression); return new ResolveResult(resolver.Context.GetClass(typeof(RuntimeArgumentHandle)) ?? SharedTypes.UnknownType); } diff --git a/ICSharpCode.NRefactory/CSharp/Resolver/TypeInference.cs b/ICSharpCode.NRefactory/CSharp/Resolver/TypeInference.cs index 488a6c31f..ced1e1f02 100644 --- a/ICSharpCode.NRefactory/CSharp/Resolver/TypeInference.cs +++ b/ICSharpCode.NRefactory/CSharp/Resolver/TypeInference.cs @@ -712,16 +712,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver get { return EmptyList.Instance; } } - IEntity ITypeParameter.Parent { - get { throw new NotSupportedException(); } - } - - IMethod ITypeParameter.ParentMethod { - get { throw new NotSupportedException(); } - } - - ITypeDefinition ITypeParameter.ParentClass { - get { throw new NotSupportedException(); } + EntityType ITypeParameter.OwnerType { + get { return EntityType.Method; } } IList ITypeParameter.Constraints { @@ -759,6 +751,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver void IFreezable.Freeze() { } + + DomRegion ITypeParameter.Region { + get { return DomRegion.Empty; } + } } #endregion diff --git a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj index 0ac90b2d3..87bd59cb8 100644 --- a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj +++ b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj @@ -1,4 +1,4 @@ - + {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} @@ -67,7 +67,6 @@ - @@ -98,16 +97,17 @@ - - - - - - - - - - + + + + + + + + + + + @@ -157,7 +157,6 @@ - @@ -350,6 +349,9 @@ + + + diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/AnyNode.cs b/ICSharpCode.NRefactory/PatternMatching/AnyNode.cs similarity index 67% rename from ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/AnyNode.cs rename to ICSharpCode.NRefactory/PatternMatching/AnyNode.cs index e992da9ce..0f3673680 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/AnyNode.cs +++ b/ICSharpCode.NRefactory/PatternMatching/AnyNode.cs @@ -3,11 +3,12 @@ using System; -namespace ICSharpCode.NRefactory.CSharp.PatternMatching +namespace ICSharpCode.NRefactory.PatternMatching { /// /// Matches any node. /// + /// Does not match null nodes. public class AnyNode : Pattern { readonly string groupName; @@ -21,15 +22,15 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching this.groupName = groupName; } - protected internal override bool DoMatch(AstNode other, Match match) + public override bool DoMatch(INode other, Match match) { match.Add(this.groupName, other); return other != null && !other.IsNull; } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) { - return ((IPatternAstVisitor)visitor).VisitAnyNode(this, data); + return visitor.VisitAnyNode(this, data); } } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Backreference.cs b/ICSharpCode.NRefactory/PatternMatching/Backreference.cs similarity index 63% rename from ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Backreference.cs rename to ICSharpCode.NRefactory/PatternMatching/Backreference.cs index 5d30b072e..61338dde6 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Backreference.cs +++ b/ICSharpCode.NRefactory/PatternMatching/Backreference.cs @@ -4,7 +4,7 @@ using System; using System.Linq; -namespace ICSharpCode.NRefactory.CSharp.PatternMatching +namespace ICSharpCode.NRefactory.PatternMatching { /// /// Matches the last entry in the specified named group. @@ -24,14 +24,14 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching this.referencedGroupName = referencedGroupName; } - protected internal override bool DoMatch(AstNode other, Match match) + public override bool DoMatch(INode other, Match match) { - return match.Get(referencedGroupName).Last().Match(other) != null; + return match.Get(referencedGroupName).Last().IsMatch(other); } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) { - return ((IPatternAstVisitor)visitor).VisitBackreference(this, data); + return visitor.VisitBackreference(this, data); } } @@ -53,18 +53,20 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching this.referencedGroupName = referencedGroupName; } - protected internal override bool DoMatch(AstNode other, Match match) + public override bool DoMatch(INode other, Match match) { - IdentifierExpression ident = other as IdentifierExpression; + CSharp.IdentifierExpression ident = other as CSharp.IdentifierExpression; if (ident == null || ident.TypeArguments.Any()) return false; - AstNode referenced = match.Get(referencedGroupName).Last(); - return ident.Identifier == referenced.GetChildByRole(AstNode.Roles.Identifier).Name; + CSharp.AstNode referenced = (CSharp.AstNode)match.Get(referencedGroupName).Last(); + if (referenced == null) + return false; + return ident.Identifier == referenced.GetChildByRole(CSharp.AstNode.Roles.Identifier).Name; } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) { - return ((IPatternAstVisitor)visitor).VisitIdentifierExpressionBackreference(this, data); + return visitor.VisitIdentifierExpressionBackreference(this, data); } } } diff --git a/ICSharpCode.NRefactory/PatternMatching/BacktrackingInfo.cs b/ICSharpCode.NRefactory/PatternMatching/BacktrackingInfo.cs new file mode 100644 index 000000000..35721c496 --- /dev/null +++ b/ICSharpCode.NRefactory/PatternMatching/BacktrackingInfo.cs @@ -0,0 +1,16 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under MIT X11 license (for details please see \doc\license.txt) + +using System; +using System.Collections.Generic; + +namespace ICSharpCode.NRefactory.PatternMatching +{ + /// + /// Container for the backtracking info. + /// + public class BacktrackingInfo + { + internal Stack backtrackingStack = new Stack(); + } +} diff --git a/ICSharpCode.NRefactory/PatternMatching/Choice.cs b/ICSharpCode.NRefactory/PatternMatching/Choice.cs new file mode 100644 index 000000000..8c19cc645 --- /dev/null +++ b/ICSharpCode.NRefactory/PatternMatching/Choice.cs @@ -0,0 +1,58 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under MIT X11 license (for details please see \doc\license.txt) + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace ICSharpCode.NRefactory.PatternMatching +{ + /// + /// Matches one of several alternatives. + /// + public class Choice : Pattern, IEnumerable + { + readonly List alternatives = new List(); + + public void Add(string name, INode alternative) + { + if (alternative == null) + throw new ArgumentNullException("alternative"); + alternatives.Add(new NamedNode(name, alternative)); + } + + public void Add(INode alternative) + { + if (alternative == null) + throw new ArgumentNullException("alternative"); + alternatives.Add(alternative); + } + + public override bool DoMatch(INode other, Match match) + { + var checkPoint = match.CheckPoint(); + foreach (INode alt in alternatives) { + if (alt.DoMatch(other, match)) + return true; + else + match.RestoreCheckPoint(checkPoint); + } + return false; + } + + IEnumerator IEnumerable.GetEnumerator() + { + return alternatives.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return alternatives.GetEnumerator(); + } + + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) + { + return visitor.VisitChoice(this, data); + } + } +} diff --git a/ICSharpCode.NRefactory/PatternMatching/INode.cs b/ICSharpCode.NRefactory/PatternMatching/INode.cs new file mode 100644 index 000000000..ccd8db499 --- /dev/null +++ b/ICSharpCode.NRefactory/PatternMatching/INode.cs @@ -0,0 +1,54 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under MIT X11 license (for details please see \doc\license.txt) + +using System; + +namespace ICSharpCode.NRefactory.PatternMatching +{ + /// + /// AST node that supports pattern matching. + /// + public interface INode + { + CSharp.Role Role { get; } + INode FirstChild { get; } + INode NextSibling { get; } + bool IsNull { get; } + + bool DoMatch(INode other, Match match); + bool DoMatchCollection(CSharp.Role role, INode pos, Match match, BacktrackingInfo backtrackingInfo); + } + + public static class PatternExtensions + { + /// + /// Performs a pattern matching operation. + /// this is the pattern, is the AST that is being matched. + /// + /// + /// A match object. Check to see whether the match was successful. + /// + /// + /// Patterns are ASTs that contain special pattern nodes (from the PatternMatching namespace). + /// However, it is also possible to match two ASTs without any pattern nodes - + /// doing so will produce a successful match if the two ASTs are structurally identical. + /// + public static Match Match(this INode pattern, INode other) + { + if (pattern == null) + throw new ArgumentNullException("pattern"); + Match match = PatternMatching.Match.CreateNew(); + if (pattern.DoMatch(other, match)) + return match; + else + return default(PatternMatching.Match); + } + + public static bool IsMatch(this INode pattern, INode other) + { + if (pattern == null) + throw new ArgumentNullException("pattern"); + return pattern.DoMatch(other, PatternMatching.Match.CreateNew()); + } + } +} diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/IPatternAstVisitor.cs b/ICSharpCode.NRefactory/PatternMatching/IPatternAstVisitor.cs similarity index 73% rename from ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/IPatternAstVisitor.cs rename to ICSharpCode.NRefactory/PatternMatching/IPatternAstVisitor.cs index 6a08be6e3..e5246cce3 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/IPatternAstVisitor.cs +++ b/ICSharpCode.NRefactory/PatternMatching/IPatternAstVisitor.cs @@ -3,15 +3,13 @@ using System; -namespace ICSharpCode.NRefactory.CSharp.PatternMatching +namespace ICSharpCode.NRefactory.PatternMatching { /// - /// Extended AST visitor that works for patterns. + /// AST visitor that works for patterns. /// - public interface IPatternAstVisitor : IAstVisitor + public interface IPatternAstVisitor { - S VisitPlaceholder(AstNode placeholder, AstNode child, T data); - S VisitAnyNode(AnyNode anyNode, T data); S VisitBackreference(Backreference backreference, T data); S VisitChoice(Choice choice, T data); diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Match.cs b/ICSharpCode.NRefactory/PatternMatching/Match.cs similarity index 59% rename from ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Match.cs rename to ICSharpCode.NRefactory/PatternMatching/Match.cs index 5e76a428c..7fd683039 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Match.cs +++ b/ICSharpCode.NRefactory/PatternMatching/Match.cs @@ -5,16 +5,27 @@ using System; using System.Collections.Generic; using System.Linq; -namespace ICSharpCode.NRefactory.CSharp.PatternMatching +namespace ICSharpCode.NRefactory.PatternMatching { /// /// Represents the result of a pattern matching operation. /// - public sealed class Match + public struct Match { - // TODO: maybe we should add an implicit Match->bool conversion? (operator implicit bool(Match m) { return m != null; }) + // TODO: maybe we should add an implicit Match->bool conversion? (implicit operator bool(Match m) { return m != null; }) - List> results = new List>(); + List> results; + + public bool Success { + get { return results != null; } + } + + internal static Match CreateNew() + { + Match m; + m.results = new List>(); + return m; + } internal int CheckPoint() { @@ -26,16 +37,20 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching results.RemoveRange(checkPoint, results.Count - checkPoint); } - public IEnumerable Get(string groupName) + public IEnumerable Get(string groupName) { + if (results == null) + yield break; foreach (var pair in results) { if (pair.Key == groupName) yield return pair.Value; } } - public IEnumerable Get(string groupName) where T : AstNode + public IEnumerable Get(string groupName) where T : INode { + if (results == null) + yield break; foreach (var pair in results) { if (pair.Key == groupName) yield return (T)pair.Value; @@ -44,6 +59,8 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching public bool Has(string groupName) { + if (results == null) + return false; foreach (var pair in results) { if (pair.Key == groupName) return true; @@ -51,10 +68,10 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching return false; } - public void Add(string groupName, AstNode node) + internal void Add(string groupName, INode node) { if (groupName != null && node != null) { - results.Add(new KeyValuePair(groupName, node)); + results.Add(new KeyValuePair(groupName, node)); } } } diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/NamedNode.cs b/ICSharpCode.NRefactory/PatternMatching/NamedNode.cs similarity index 50% rename from ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/NamedNode.cs rename to ICSharpCode.NRefactory/PatternMatching/NamedNode.cs index baf955684..64802ce57 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/NamedNode.cs +++ b/ICSharpCode.NRefactory/PatternMatching/NamedNode.cs @@ -3,36 +3,41 @@ using System; -namespace ICSharpCode.NRefactory.CSharp.PatternMatching +namespace ICSharpCode.NRefactory.PatternMatching { /// /// Represents a named node within a pattern. /// public class NamedNode : Pattern { - public static readonly Role ElementRole = new Role("Element", AstNode.Null); - readonly string groupName; + readonly INode childNode; public string GroupName { get { return groupName; } } - public NamedNode(string groupName, AstNode childNode) + public INode ChildNode { + get { return childNode; } + } + + public NamedNode(string groupName, INode childNode) { + if (childNode == null) + throw new ArgumentNullException("childNode"); this.groupName = groupName; - AddChild(childNode, ElementRole); + this.childNode = childNode; } - protected internal override bool DoMatch(AstNode other, Match match) + public override bool DoMatch(INode other, Match match) { match.Add(this.groupName, other); - return GetChildByRole(ElementRole).DoMatch(other, match); + return childNode.DoMatch(other, match); } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) { - return ((IPatternAstVisitor)visitor).VisitNamedNode(this, data); + return visitor.VisitNamedNode(this, data); } } } diff --git a/ICSharpCode.NRefactory/PatternMatching/OptionalNode.cs b/ICSharpCode.NRefactory/PatternMatching/OptionalNode.cs new file mode 100644 index 000000000..a135a6a58 --- /dev/null +++ b/ICSharpCode.NRefactory/PatternMatching/OptionalNode.cs @@ -0,0 +1,48 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under MIT X11 license (for details please see \doc\license.txt) + +using System; +using System.Collections.Generic; +using System.Diagnostics; + +namespace ICSharpCode.NRefactory.PatternMatching +{ + public class OptionalNode : Pattern + { + readonly INode childNode; + + public INode ChildNode { + get { return childNode; } + } + + public OptionalNode(INode childNode) + { + if (childNode == null) + throw new ArgumentNullException("childNode"); + this.childNode = childNode; + } + + public OptionalNode(string groupName, INode childNode) : this(new NamedNode(groupName, childNode)) + { + } + + public override bool DoMatchCollection(CSharp.Role role, INode pos, Match match, BacktrackingInfo backtrackingInfo) + { + backtrackingInfo.backtrackingStack.Push(new PossibleMatch(pos, match.CheckPoint())); + return childNode.DoMatch(pos, match); + } + + public override bool DoMatch(INode other, Match match) + { + if (other == null || other.IsNull) + return true; + else + return childNode.DoMatch(other, match); + } + + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) + { + return visitor.VisitOptionalNode(this, data); + } + } +} diff --git a/ICSharpCode.NRefactory/PatternMatching/Pattern.cs b/ICSharpCode.NRefactory/PatternMatching/Pattern.cs new file mode 100644 index 000000000..c1fbc7f66 --- /dev/null +++ b/ICSharpCode.NRefactory/PatternMatching/Pattern.cs @@ -0,0 +1,101 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under MIT X11 license (for details please see \doc\license.txt) + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; + +namespace ICSharpCode.NRefactory.PatternMatching +{ + /// + /// Base class for all patterns. + /// + public abstract class Pattern : INode + { + internal struct PossibleMatch + { + public readonly INode NextOther; // next node after the last matched node + public readonly int Checkpoint; // checkpoint + + public PossibleMatch(INode nextOther, int checkpoint) + { + this.NextOther = nextOther; + this.Checkpoint = checkpoint; + } + } + + bool INode.IsNull { + get { return false; } + } + + CSharp.Role INode.Role { + get { return null; } + } + + INode INode.NextSibling { + get { return null; } + } + + INode INode.FirstChild { + get { return null; } + } + + public abstract bool DoMatch(INode other, Match match); + + public virtual bool DoMatchCollection(CSharp.Role role, INode pos, Match match, BacktrackingInfo backtrackingInfo) + { + return DoMatch (pos, match); + } + + public abstract S AcceptVisitor (IPatternAstVisitor visitor, T data); + + // Make debugging easier by giving Patterns a ToString() implementation + public override string ToString() + { + // TODO: what if this pattern contains a VB-AST? + // either remove ToString() here, or add some magic to figure out the correct output visitor + StringWriter w = new StringWriter(); + AcceptVisitor(new CSharp.OutputVisitor(w, new CSharp.CSharpFormattingOptions()), null); + return w.ToString(); + } + + public static bool DoMatchCollection(CSharp.Role role, INode firstPatternChild, INode firstOtherChild, Match match) + { + BacktrackingInfo backtrackingInfo = new BacktrackingInfo(); + Stack patternStack = new Stack(); + Stack stack = backtrackingInfo.backtrackingStack; + patternStack.Push(firstPatternChild); + stack.Push(new PossibleMatch(firstOtherChild, match.CheckPoint())); + while (stack.Count > 0) { + INode cur1 = patternStack.Pop(); + INode cur2 = stack.Peek().NextOther; + match.RestoreCheckPoint(stack.Pop().Checkpoint); + bool success = true; + while (cur1 != null && success) { + while (cur1 != null && cur1.Role != role) + cur1 = cur1.NextSibling; + while (cur2 != null && cur2.Role != role) + cur2 = cur2.NextSibling; + if (cur1 == null) + break; + + Debug.Assert(stack.Count == patternStack.Count); + success = cur1.DoMatchCollection(role, cur2, match, backtrackingInfo); + Debug.Assert(stack.Count >= patternStack.Count); + while (stack.Count > patternStack.Count) + patternStack.Push(cur1.NextSibling); + + cur1 = cur1.NextSibling; + if (cur2 != null) + cur2 = cur2.NextSibling; + } + while (cur2 != null && cur2.Role != role) + cur2 = cur2.NextSibling; + if (success && cur2 == null) + return true; + } + return false; + } + } +} diff --git a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Repeat.cs b/ICSharpCode.NRefactory/PatternMatching/Repeat.cs similarity index 52% rename from ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Repeat.cs rename to ICSharpCode.NRefactory/PatternMatching/Repeat.cs index c968bce45..b6694c814 100644 --- a/ICSharpCode.NRefactory/CSharp/Ast/PatternMatching/Repeat.cs +++ b/ICSharpCode.NRefactory/PatternMatching/Repeat.cs @@ -5,30 +5,39 @@ using System; using System.Collections.Generic; using System.Diagnostics; -namespace ICSharpCode.NRefactory.CSharp.PatternMatching +namespace ICSharpCode.NRefactory.PatternMatching { /// /// Represents an optional node. /// public class Repeat : Pattern { - public static readonly Role ElementRole = new Role("Element", AstNode.Null); - public int MinCount; - public int MaxCount = int.MaxValue; + readonly INode childNode; - public Repeat(AstNode childNode) + public int MinCount { get; set; } + public int MaxCount { get; set; } + + public INode ChildNode { + get { return childNode; } + } + + public Repeat(INode childNode) { - AddChild(childNode, ElementRole); + if (childNode == null) + throw new ArgumentNullException("childNode"); + this.childNode = childNode; + this.MinCount = 0; + this.MaxCount = int.MaxValue; } - internal override bool DoMatchCollection(Role role, AstNode pos, Match match, Stack backtrackingStack) + public override bool DoMatchCollection(CSharp.Role role, INode pos, Match match, BacktrackingInfo backtrackingInfo) { + var backtrackingStack = backtrackingInfo.backtrackingStack; Debug.Assert(pos == null || pos.Role == role); int matchCount = 0; if (this.MinCount <= 0) backtrackingStack.Push(new PossibleMatch(pos, match.CheckPoint())); - AstNode element = GetChildByRole(ElementRole); - while (matchCount < this.MaxCount && pos != null && element.DoMatch(pos, match)) { + while (matchCount < this.MaxCount && pos != null && childNode.DoMatch(pos, match)) { matchCount++; do { pos = pos.NextSibling; @@ -39,17 +48,17 @@ namespace ICSharpCode.NRefactory.CSharp.PatternMatching return false; // never do a normal (single-element) match; always make the caller look at the results on the back-tracking stack. } - protected internal override bool DoMatch(AstNode other, Match match) + public override bool DoMatch(INode other, Match match) { if (other == null || other.IsNull) return this.MinCount <= 0; else - return this.MaxCount >= 1 && GetChildByRole(ElementRole).DoMatch(other, match); + return this.MaxCount >= 1 && childNode.DoMatch(other, match); } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IPatternAstVisitor visitor, T data) { - return ((IPatternAstVisitor)visitor).VisitRepeat(this, data); + return visitor.VisitRepeat(this, data); } } } diff --git a/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs b/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs index 26d79e4a9..80a522706 100644 --- a/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs +++ b/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs @@ -676,7 +676,8 @@ namespace ICSharpCode.NRefactory.TypeSystem for (int i = 0; i < typeDefinition.GenericParameters.Count; i++) { if (typeDefinition.GenericParameters[i].Position != i) throw new InvalidOperationException("g.Position != i"); - this.TypeParameters.Add(new DefaultTypeParameter(this, i, typeDefinition.GenericParameters[i].Name)); + this.TypeParameters.Add(new DefaultTypeParameter( + EntityType.TypeDefinition, i, typeDefinition.GenericParameters[i].Name)); } } @@ -686,7 +687,7 @@ namespace ICSharpCode.NRefactory.TypeSystem if (typeDefinition.HasGenericParameters) { for (int i = 0; i < typeDefinition.GenericParameters.Count; i++) { - loader.AddConstraints((DefaultTypeParameter)this.TypeParameters[i], typeDefinition.GenericParameters[i]); + loader.AddConstraints(this, (DefaultTypeParameter)this.TypeParameters[i], typeDefinition.GenericParameters[i]); } } @@ -879,10 +880,11 @@ namespace ICSharpCode.NRefactory.TypeSystem for (int i = 0; i < method.GenericParameters.Count; i++) { if (method.GenericParameters[i].Position != i) throw new InvalidOperationException("g.Position != i"); - m.TypeParameters.Add(new DefaultTypeParameter(m, i, method.GenericParameters[i].Name)); + m.TypeParameters.Add(new DefaultTypeParameter( + EntityType.Method, i, method.GenericParameters[i].Name)); } for (int i = 0; i < method.GenericParameters.Count; i++) { - AddConstraints((DefaultTypeParameter)m.TypeParameters[i], method.GenericParameters[i]); + AddConstraints(m, (DefaultTypeParameter)m.TypeParameters[i], method.GenericParameters[i]); } } @@ -1064,7 +1066,7 @@ namespace ICSharpCode.NRefactory.TypeSystem #endregion #region Type Parameter Constraints - void AddConstraints(DefaultTypeParameter tp, GenericParameter g) + void AddConstraints(IEntity parentEntity, DefaultTypeParameter tp, GenericParameter g) { switch (g.Attributes & GenericParameterAttributes.VarianceMask) { case GenericParameterAttributes.Contravariant: @@ -1081,7 +1083,7 @@ namespace ICSharpCode.NRefactory.TypeSystem if (g.HasConstraints) { foreach (TypeReference constraint in g.Constraints) { - tp.Constraints.Add(ReadTypeReference(constraint, entity: tp.Parent)); + tp.Constraints.Add(ReadTypeReference(constraint, entity: parentEntity)); } } } diff --git a/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs b/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs index 75d6d4cb4..222c06ff1 100644 --- a/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs +++ b/ICSharpCode.NRefactory/TypeSystem/ITypeParameter.cs @@ -16,6 +16,12 @@ namespace ICSharpCode.NRefactory.TypeSystem #endif public interface ITypeParameter : IType, IFreezable { + /// + /// Get the type of this type parameter's owner. + /// + /// EntityType.TypeDefinition or EntityType.Method + EntityType OwnerType { get; } + /// /// Gets the index of the type parameter in the type parameter list of the owning method/class. /// @@ -26,24 +32,6 @@ namespace ICSharpCode.NRefactory.TypeSystem /// IList Attributes { get; } - /// - /// Gets the class or method for which this type parameter is defined. - /// This property never returns null. - /// - IEntity Parent { get; } - - /// - /// The method this type parameter is defined for. - /// This property returns null if the type parameter belongs to a class. - /// - IMethod ParentMethod { get; } - - /// - /// The class this type parameter is defined for. - /// This property returns null if the type parameter belongs to a method. - /// - ITypeDefinition ParentClass { get; } - /// /// Gets the contraints of this type parameter. /// @@ -80,6 +68,11 @@ namespace ICSharpCode.NRefactory.TypeSystem /// If this type parameter was bound, returns the unbound version of it. /// ITypeParameter UnboundTypeParameter { get; } + + /// + /// Gets the region where the type parameter is defined. + /// + DomRegion Region { get; } } /// @@ -119,25 +112,6 @@ namespace ICSharpCode.NRefactory.TypeSystem } } - IEntity ITypeParameter.Parent { - get { - Contract.Ensures(Contract.Result() != null); - return null; - } - } - - IMethod ITypeParameter.ParentMethod { - get { - return null; - } - } - - ITypeDefinition ITypeParameter.ParentClass { - get { - return null; - } - } - IList ITypeParameter.Constraints { get { Contract.Ensures(Contract.Result>() != null); diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs index cd9338213..f1ddcc5c0 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs @@ -14,13 +14,16 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation /// public class DefaultTypeParameter : AbstractFreezable, ITypeParameter, ISupportsInterning { - IEntity parent; - string name; int index; IList constraints; IList attributes; + + DomRegion region; + + // Small fields: byte+byte+short VarianceModifier variance; + EntityType ownerType; BitVector16 flags; const ushort FlagReferenceTypeConstraint = 0x0001; @@ -34,28 +37,15 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation base.FreezeInternal(); } - public DefaultTypeParameter(IMethod parentMethod, int index, string name) + public DefaultTypeParameter(EntityType ownerType, int index, string name) { - if (parentMethod == null) - throw new ArgumentNullException("parentMethod"); + if (!(ownerType == EntityType.TypeDefinition || ownerType == EntityType.Method)) + throw new ArgumentException("owner must be a type or a method", "ownerType"); if (index < 0) throw new ArgumentOutOfRangeException("index", index, "Value must not be negative"); if (name == null) throw new ArgumentNullException("name"); - this.parent = parentMethod; - this.index = index; - this.name = name; - } - - public DefaultTypeParameter(ITypeDefinition parentClass, int index, string name) - { - if (parentClass == null) - throw new ArgumentNullException("parentClass"); - if (index < 0) - throw new ArgumentOutOfRangeException("index", index, "Value must not be negative"); - if (name == null) - throw new ArgumentNullException("name"); - this.parent = parentClass; + this.ownerType = ownerType; this.index = index; this.name = name; } @@ -74,7 +64,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation public string ReflectionName { get { - if (parent is IMethod) + if (ownerType == EntityType.Method) return "``" + index.ToString(); else return "`" + index.ToString(); @@ -114,11 +104,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation public override int GetHashCode() { - int hashCode = parent.GetHashCode(); unchecked { - hashCode += 1000000033 * index.GetHashCode(); + return (int)ownerType * 178256151 + index; } - return hashCode; } public override bool Equals(object obj) @@ -131,8 +119,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation DefaultTypeParameter p = other as DefaultTypeParameter; if (p == null) return false; - return parent.Equals(p.parent) - && index == p.index; + return ownerType == p.ownerType && index == p.index; + } + + public EntityType OwnerType { + get { + return ownerType; + } } public int Index { @@ -147,18 +140,6 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation } } - public IEntity Parent { - get { return parent; } - } - - public IMethod ParentMethod { - get { return parent as IMethod; } - } - - public ITypeDefinition ParentClass { - get { return parent as ITypeDefinition; } - } - public IList Constraints { get { if (constraints == null) @@ -199,6 +180,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation } } + public DomRegion Region { + get { return region; } + set { + CheckBeforeMutation(); + region = value; + } + } + public virtual IType BoundTo { get { return null; } } @@ -217,10 +206,12 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation return this; } + static readonly SimpleProjectContent dummyProjectContent = new SimpleProjectContent(); + DefaultTypeDefinition GetDummyClassForTypeParameter() { - DefaultTypeDefinition c = new DefaultTypeDefinition(ParentClass ?? ParentMethod.DeclaringTypeDefinition, this.Name); - c.Region = new DomRegion(parent.Region.FileName, parent.Region.BeginLine, parent.Region.BeginColumn); + DefaultTypeDefinition c = new DefaultTypeDefinition(dummyProjectContent, string.Empty, this.Name); + c.Region = this.Region; if (HasValueTypeConstraint) { c.ClassType = ClassType.Struct; } else if (HasDefaultConstructorConstraint) { @@ -294,12 +285,29 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation int ISupportsInterning.GetHashCodeForInterning() { - return GetHashCode(); + unchecked { + int hashCode = GetHashCode(); + if (name != null) + hashCode += name.GetHashCode(); + if (attributes != null) + hashCode += attributes.GetHashCode(); + if (constraints != null) + hashCode += constraints.GetHashCode(); + hashCode += 771 * flags.Data + 900103 * (int)variance; + return hashCode; + } } bool ISupportsInterning.EqualsForInterning(ISupportsInterning other) { - return this == other; + DefaultTypeParameter o = other as DefaultTypeParameter; + return o != null + && this.attributes == o.attributes + && this.constraints == o.constraints + && this.flags == o.flags + && this.ownerType == o.ownerType + && this.index == o.index + && this.variance == o.variance; } public override string ToString() diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/MethodTypeParameterSubstitution.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/MethodTypeParameterSubstitution.cs index aa386ebe6..1a5d048f0 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/MethodTypeParameterSubstitution.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/MethodTypeParameterSubstitution.cs @@ -21,7 +21,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation public override IType VisitTypeParameter(ITypeParameter type) { int index = type.Index; - if (type.ParentMethod != null) { + if (type.OwnerType == EntityType.Method) { if (index >= 0 && index < typeArguments.Count) return typeArguments[index]; else diff --git a/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs b/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs index 0d0bb77f4..f51fb1ea8 100644 --- a/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs +++ b/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs @@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.TypeSystem public override IType VisitTypeParameter(ITypeParameter type) { int index = type.Index; - if (type.ParentClass != null) { + if (type.OwnerType == EntityType.TypeDefinition) { if (index >= 0 && index < typeArguments.Length) return typeArguments[index]; else diff --git a/NRefactory.sln b/NRefactory.sln index 15d03f493..34139cd5d 100644 --- a/NRefactory.sln +++ b/NRefactory.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.1.0.7372-alpha +# SharpDevelop 4.0.1.7129 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DC98210E-1646-483B-819A-2BB8272461E4}" ProjectSection(SolutionItems) = postProject README = README