From ee384a20f0e5bf8850d38c9b5e7471ea149827e9 Mon Sep 17 00:00:00 2001 From: Pent Ploompuu Date: Thu, 30 Jun 2011 02:25:19 +0300 Subject: [PATCH 01/92] PDB files for release mode. File alignments and base addresses improved. --- ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj index 6583c3d4c2..ff16a317be 100644 --- a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj +++ b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj @@ -22,8 +22,7 @@ AnyCPU False Auto - 4194304 - 4096 + 465371136 bin\Debug\ @@ -35,7 +34,8 @@ bin\Release\ - None + true + PdbOnly True TRACE;FULL_AST False From a8544216691d9449a32b68161b567e199497feb9 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 17 Jul 2011 18:56:43 +0200 Subject: [PATCH 02/92] corrected spelling of Overrides-modifier; convert virtual to Overridable and override to Overrides --- ICSharpCode.NRefactory.VB/Ast/Enums.cs | 2 +- ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs | 6 +++--- .../Visitors/CSharpToVBConverterVisitor.cs | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.VB/Ast/Enums.cs b/ICSharpCode.NRefactory.VB/Ast/Enums.cs index a3fa8d6184..e030125433 100644 --- a/ICSharpCode.NRefactory.VB/Ast/Enums.cs +++ b/ICSharpCode.NRefactory.VB/Ast/Enums.cs @@ -25,7 +25,7 @@ namespace ICSharpCode.NRefactory.VB.Ast Const = 0x0200, Shared = 0x0400, Static = 0x0800, - Override = 0x1000, + Overrides = 0x1000, ReadOnly = 0x2000, Shadows = 0x4000, Partial = 0x8000, diff --git a/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs b/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs index 2039901e47..4b5a57ce3c 100644 --- a/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs +++ b/ICSharpCode.NRefactory.VB/Ast/VBModifierToken.cs @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.VB.Ast new KeyValuePair(Modifiers.Const, "Const".Length), new KeyValuePair(Modifiers.Shared, "Shared".Length), new KeyValuePair(Modifiers.Static, "Static".Length), - new KeyValuePair(Modifiers.Override, "Override".Length), + new KeyValuePair(Modifiers.Overrides, "Overrides".Length), new KeyValuePair(Modifiers.ReadOnly, "ReadOnly".Length), new KeyValuePair(Modifiers.WriteOnly, "WriteOnly".Length), new KeyValuePair(Modifiers.Shadows, "Shadows".Length), @@ -109,8 +109,8 @@ namespace ICSharpCode.NRefactory.VB.Ast return "Shared"; case Modifiers.Static: return "Static"; - case Modifiers.Override: - return "Override"; + case Modifiers.Overrides: + return "Overrides"; case Modifiers.ReadOnly: return "ReadOnly"; case Modifiers.Shadows: diff --git a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs index 89ada8a5cc..10d142671b 100644 --- a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs +++ b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs @@ -2112,6 +2112,10 @@ namespace ICSharpCode.NRefactory.VB.Visitors if (readable && !writeable) mod |= Modifiers.ReadOnly; + if ((modifier & CSharp.Modifiers.Override) == CSharp.Modifiers.Override) + mod |= Modifiers.Overrides; + if ((modifier & CSharp.Modifiers.Virtual) == CSharp.Modifiers.Virtual) + mod |= Modifiers.Overridable; return mod; } From 1398d8a39daddd53353907c308a622771805e404 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 18 Jul 2011 07:28:45 +0200 Subject: [PATCH 03/92] add missing space after Case keyword --- ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs b/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs index ac58945a37..d359cb8973 100644 --- a/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs +++ b/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs @@ -2145,8 +2145,10 @@ namespace ICSharpCode.NRefactory.VB WriteKeyword("Case"); if (caseStatement.Clauses.Count == 1 && caseStatement.Clauses.First().Expression.IsNull) WriteKeyword("Else"); - else + else { + Space(); WriteCommaSeparatedList(caseStatement.Clauses); + } NewLine(); Indent(); caseStatement.Body.AcceptVisitor(this, data); From 7a9bb563abe8ca8e2f459c8f0662f5b83e3d2ef1 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 27 Jul 2011 02:13:43 +0200 Subject: [PATCH 04/92] InsertParenthesesVisitor: insert parenthesis in "(new int[1])[0]" --- .../CSharp/InsertParenthesesVisitorTests.cs | 33 +++++++++++++++++++ .../OutputVisitor/InsertParenthesesVisitor.cs | 5 +++ 2 files changed, 38 insertions(+) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs index b7f6328f3e..c1cca008eb 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs @@ -345,5 +345,38 @@ namespace ICSharpCode.NRefactory.CSharp Assert.AreEqual("a && (b || c)", InsertRequired(expr)); Assert.AreEqual("a && (b || c)", InsertReadable(expr)); } + + [Test] + public void ArrayCreationInIndexer() + { + Expression expr = new IndexerExpression { + Target = new ArrayCreateExpression { + Type = new PrimitiveType("int"), + Arguments = { new PrimitiveExpression(1) } + }, + Arguments = { new PrimitiveExpression(0) } + }; + + Assert.AreEqual("(new int[1]) [0]", InsertRequired(expr)); + Assert.AreEqual("(new int[1]) [0]", InsertReadable(expr)); + } + + [Test] + public void ArrayCreationWithInitializerInIndexer() + { + Expression expr = new IndexerExpression { + Target = new ArrayCreateExpression { + Type = new PrimitiveType("int"), + Arguments = { new PrimitiveExpression(1) }, + Initializer = new ArrayInitializerExpression { + Elements = { new PrimitiveExpression(42) } + } + }, + Arguments = { new PrimitiveExpression(0) } + }; + + Assert.AreEqual("new int[1] { 42 } [0]", InsertRequired(expr)); + Assert.AreEqual("(new int[1] { 42 }) [0]", InsertReadable(expr)); + } } } diff --git a/ICSharpCode.NRefactory/CSharp/OutputVisitor/InsertParenthesesVisitor.cs b/ICSharpCode.NRefactory/CSharp/OutputVisitor/InsertParenthesesVisitor.cs index 8e2e5981b3..dab89495b9 100644 --- a/ICSharpCode.NRefactory/CSharp/OutputVisitor/InsertParenthesesVisitor.cs +++ b/ICSharpCode.NRefactory/CSharp/OutputVisitor/InsertParenthesesVisitor.cs @@ -132,6 +132,11 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitIndexerExpression(IndexerExpression indexerExpression, object data) { ParenthesizeIfRequired(indexerExpression.Target, Primary); + ArrayCreateExpression ace = indexerExpression.Target as ArrayCreateExpression; + if (ace != null && (InsertParenthesesForReadability || ace.Initializer.IsNull)) { + // require parentheses for "(new int[1])[0]" + Parenthesize(indexerExpression.Target); + } return base.VisitIndexerExpression(indexerExpression, data); } From 3e37fb24a93f51ce6c1b9002e15e55d6033e5009 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 21 Jul 2011 23:04:51 +0200 Subject: [PATCH 05/92] fix output of object initializers --- ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs b/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs index d359cb8973..b94dbdbbed 100644 --- a/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs +++ b/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs @@ -1705,6 +1705,11 @@ namespace ICSharpCode.NRefactory.VB WriteCommaSeparatedListInParenthesis(objectCreationExpression.Arguments, false); if (!objectCreationExpression.Initializer.IsNull) { Space(); + if (objectCreationExpression.Initializer.Elements.Any(x => x is FieldInitializerExpression)) + WriteKeyword("With"); + else + WriteKeyword("From"); + Space(); objectCreationExpression.Initializer.AcceptVisitor(this, data); } @@ -1870,7 +1875,7 @@ namespace ICSharpCode.NRefactory.VB { StartNode(fieldInitializerExpression); - if (fieldInitializerExpression.IsKey) { + if (fieldInitializerExpression.IsKey && fieldInitializerExpression.Parent is AnonymousObjectCreationExpression) { WriteKeyword("Key"); Space(); } From 588557e8927f65c22c12600adc4850d52ecd16cb Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 22 Jul 2011 22:16:00 +0200 Subject: [PATCH 06/92] fix case sensitivity in IsKeyword check --- ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs b/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs index b94dbdbbed..d27615fd4b 100644 --- a/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs +++ b/ICSharpCode.NRefactory.VB/OutputVisitor/OutputVisitor.cs @@ -115,7 +115,7 @@ namespace ICSharpCode.NRefactory.VB StartNode(parameterDeclaration); WriteAttributes(parameterDeclaration.Attributes); WriteModifiers(parameterDeclaration.ModifierTokens); - WriteIdentifier(parameterDeclaration.Name.Name); + parameterDeclaration.Name.AcceptVisitor(this, data); if (!parameterDeclaration.Type.IsNull) { WriteKeyword("As"); parameterDeclaration.Type.AcceptVisitor(this, data); @@ -1053,7 +1053,7 @@ namespace ICSharpCode.NRefactory.VB #endregion #region IsKeyword Test - static readonly HashSet unconditionalKeywords = new HashSet { + static readonly HashSet unconditionalKeywords = new HashSet(StringComparer.OrdinalIgnoreCase) { "AddHandler", "AddressOf", "Alias", "And", "AndAlso", "As", "Boolean", "ByRef", "Byte", "ByVal", "Call", "Case", "Catch", "CBool", "CByte", "CChar", "CInt", "Class", "CLng", "CObj", "Const", "Continue", "CSByte", "CShort", "CSng", "CStr", "CType", "CUInt", From 472daa99197522e7ae4244903248e51e1a7cc0bb Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 24 Jul 2011 18:18:51 +0200 Subject: [PATCH 07/92] remove old files --- .../AstBuilder/ExpressionBuilder.cs | 92 - .../AstBuilder/StatementBuilder.cs | 55 - .../ICSharpCode.NRefactory.VB.csproj | 6 - .../Visitors/AbstractAstTransformer.cs | 2078 ----------------- .../Visitors/AbstractAstVisitor.cs | 1156 --------- .../Visitors/NodeTrackingAstVisitor.cs | 1266 ---------- 6 files changed, 4653 deletions(-) delete mode 100644 ICSharpCode.NRefactory.VB/AstBuilder/ExpressionBuilder.cs delete mode 100644 ICSharpCode.NRefactory.VB/AstBuilder/StatementBuilder.cs delete mode 100644 ICSharpCode.NRefactory.VB/Visitors/AbstractAstTransformer.cs delete mode 100644 ICSharpCode.NRefactory.VB/Visitors/AbstractAstVisitor.cs delete mode 100644 ICSharpCode.NRefactory.VB/Visitors/NodeTrackingAstVisitor.cs diff --git a/ICSharpCode.NRefactory.VB/AstBuilder/ExpressionBuilder.cs b/ICSharpCode.NRefactory.VB/AstBuilder/ExpressionBuilder.cs deleted file mode 100644 index 7ac2ef32ce..0000000000 --- a/ICSharpCode.NRefactory.VB/AstBuilder/ExpressionBuilder.cs +++ /dev/null @@ -1,92 +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 ICSharpCode.NRefactory.VB.Ast; - -namespace ICSharpCode.NRefactory.VB.AstBuilder -{ - /// - /// Extension methods for NRefactory.Dom.Expression. - /// - public static class ExpressionBuilder - {/* - public static SimpleNameExpression Identifier(string identifier) - { - return new SimpleNameExpression(identifier); - } - - public static MemberReferenceExpression Member(this Expression targetObject, string memberName) - { - if (targetObject == null) - throw new ArgumentNullException("targetObject"); - return new MemberReferenceExpression(targetObject, memberName); - } - - public static InvocationExpression Call(this Expression callTarget, string methodName, params Expression[] arguments) - { - if (callTarget == null) - throw new ArgumentNullException("callTarget"); - return Call(Member(callTarget, methodName), arguments); - } - - public static InvocationExpression Call(this Expression callTarget, params Expression[] arguments) - { - if (callTarget == null) - throw new ArgumentNullException("callTarget"); - if (arguments == null) - throw new ArgumentNullException("arguments"); - return new InvocationExpression(callTarget, new List(arguments)); - } - - public static ObjectCreateExpression New(this TypeReference createType, params Expression[] arguments) - { - if (createType == null) - throw new ArgumentNullException("createType"); - if (arguments == null) - throw new ArgumentNullException("arguments"); - return new ObjectCreateExpression(createType, new List(arguments)); - } - - public static Expression CreateDefaultValueForType(TypeReference type) - { - if (type != null && !type.IsArrayType) { - switch (type.Type) { - case "System.SByte": - case "System.Byte": - case "System.Int16": - case "System.UInt16": - case "System.Int32": - case "System.UInt32": - case "System.Int64": - case "System.UInt64": - case "System.Single": - case "System.Double": - return new PrimitiveExpression(0, "0"); - case "System.Char": - return new PrimitiveExpression('\0', "'\\0'"); - case "System.Object": - case "System.String": - return new PrimitiveExpression(null, "null"); - case "System.Boolean": - return new PrimitiveExpression(false, "false"); - default: - return new DefaultValueExpression(type); - } - } else { - return new PrimitiveExpression(null, "null"); - } - } - - /// - /// Just calls the BinaryOperatorExpression constructor, - /// but being an extension method; this allows for a nicer - /// infix syntax in some cases. - /// - public static BinaryOperatorExpression Operator(this Expression left, BinaryOperatorType op, Expression right) - { - return new BinaryOperatorExpression(left, op, right); - }*/ - } -} diff --git a/ICSharpCode.NRefactory.VB/AstBuilder/StatementBuilder.cs b/ICSharpCode.NRefactory.VB/AstBuilder/StatementBuilder.cs deleted file mode 100644 index eb227171f9..0000000000 --- a/ICSharpCode.NRefactory.VB/AstBuilder/StatementBuilder.cs +++ /dev/null @@ -1,55 +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 ICSharpCode.NRefactory.VB.Ast; - -namespace ICSharpCode.NRefactory.VB.AstBuilder -{ - /// - /// Extension methods for NRefactory.Dom.Expression. - /// -// public static class StatementBuilder -// { -// public static void AddStatement(this BlockStatement block, Statement statement) -// { -// if (block == null) -// throw new ArgumentNullException("block"); -// if (statement == null) -// throw new ArgumentNullException("statement"); -// block.AddChild(statement); -// statement.Parent = block; -// } -// -// public static void AddStatement(this BlockStatement block, Expression expressionStatement) -// { -// if (expressionStatement == null) -// throw new ArgumentNullException("expressionStatement"); -// AddStatement(block, new ExpressionStatement(expressionStatement)); -// } -// -// public static void Throw(this BlockStatement block, Expression expression) -// { -// if (expression == null) -// throw new ArgumentNullException("expression"); -// AddStatement(block, new ThrowStatement(expression)); -// } -// -// public static void Return(this BlockStatement block, Expression expression) -// { -// if (expression == null) -// throw new ArgumentNullException("expression"); -// AddStatement(block, new ReturnStatement(expression)); -// } -// -// public static void Assign(this BlockStatement block, Expression left, Expression right) -// { -// if (left == null) -// throw new ArgumentNullException("left"); -// if (right == null) -// throw new ArgumentNullException("right"); -// AddStatement(block, new AssignmentExpression(left, AssignmentOperatorType.Assign, right)); -// } -// } -} diff --git a/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj b/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj index c100ed7176..c36731804f 100644 --- a/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj +++ b/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj @@ -45,8 +45,6 @@ - - @@ -180,14 +178,10 @@ - - - - diff --git a/ICSharpCode.NRefactory.VB/Visitors/AbstractAstTransformer.cs b/ICSharpCode.NRefactory.VB/Visitors/AbstractAstTransformer.cs deleted file mode 100644 index 5441575067..0000000000 --- a/ICSharpCode.NRefactory.VB/Visitors/AbstractAstTransformer.cs +++ /dev/null @@ -1,2078 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ICSharpCode.NRefactory.VB.Visitors { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using ICSharpCode.NRefactory.VB.Ast; - - - /// - /// The AbstractAstTransformer will iterate through the whole Ast, - /// just like the AbstractAstVisitor. However, the AbstractAstTransformer allows - /// you to modify the Ast at the same time: It does not use 'foreach' internally, - /// so you can add members to collections of parents of the current node (but - /// you cannot insert or delete items as that will make the index used invalid). - /// You can use the methods ReplaceCurrentNode and RemoveCurrentNode to replace - /// or remove the current node, totally independent from the type of the parent node. - /// -// public abstract class AbstractAstTransformer : IAstVisitor { -// -// private Stack nodeStack = new Stack(); -// -// public void ReplaceCurrentNode(INode newNode) { -// nodeStack.Pop(); -// nodeStack.Push(newNode); -// } -// -// public void RemoveCurrentNode() { -// nodeStack.Pop(); -// nodeStack.Push(null); -// } -// -// public virtual object VisitAddHandlerStatement(AddHandlerStatement addHandlerStatement, object data) { -// Debug.Assert((addHandlerStatement != null)); -// Debug.Assert((addHandlerStatement.EventExpression != null)); -// Debug.Assert((addHandlerStatement.HandlerExpression != null)); -// nodeStack.Push(addHandlerStatement.EventExpression); -// addHandlerStatement.EventExpression.AcceptVisitor(this, data); -// addHandlerStatement.EventExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(addHandlerStatement.HandlerExpression); -// addHandlerStatement.HandlerExpression.AcceptVisitor(this, data); -// addHandlerStatement.HandlerExpression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitAddressOfExpression(AddressOfExpression addressOfExpression, object data) { -// Debug.Assert((addressOfExpression != null)); -// Debug.Assert((addressOfExpression.Expression != null)); -// nodeStack.Push(addressOfExpression.Expression); -// addressOfExpression.Expression.AcceptVisitor(this, data); -// addressOfExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) { -// Debug.Assert((arrayCreateExpression != null)); -// Debug.Assert((arrayCreateExpression.CreateType != null)); -// Debug.Assert((arrayCreateExpression.Arguments != null)); -// Debug.Assert((arrayCreateExpression.ArrayInitializer != null)); -// nodeStack.Push(arrayCreateExpression.CreateType); -// arrayCreateExpression.CreateType.AcceptVisitor(this, data); -// arrayCreateExpression.CreateType = ((TypeReference)(nodeStack.Pop())); -// for (int i = 0; i < arrayCreateExpression.Arguments.Count; i++) { -// Expression o = arrayCreateExpression.Arguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// arrayCreateExpression.Arguments.RemoveAt(i--); -// else -// arrayCreateExpression.Arguments[i] = o; -// } -// nodeStack.Push(arrayCreateExpression.ArrayInitializer); -// arrayCreateExpression.ArrayInitializer.AcceptVisitor(this, data); -// arrayCreateExpression.ArrayInitializer = ((CollectionInitializerExpression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitAssignmentExpression(AssignmentExpression assignmentExpression, object data) { -// Debug.Assert((assignmentExpression != null)); -// Debug.Assert((assignmentExpression.Left != null)); -// Debug.Assert((assignmentExpression.Right != null)); -// nodeStack.Push(assignmentExpression.Left); -// assignmentExpression.Left.AcceptVisitor(this, data); -// assignmentExpression.Left = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(assignmentExpression.Right); -// assignmentExpression.Right.AcceptVisitor(this, data); -// assignmentExpression.Right = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitAttribute(ICSharpCode.NRefactory.VB.Ast.Attribute attribute, object data) { -// Debug.Assert((attribute != null)); -// Debug.Assert((attribute.PositionalArguments != null)); -// Debug.Assert((attribute.NamedArguments != null)); -// for (int i = 0; i < attribute.PositionalArguments.Count; i++) { -// Expression o = attribute.PositionalArguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// attribute.PositionalArguments.RemoveAt(i--); -// else -// attribute.PositionalArguments[i] = o; -// } -// for (int i = 0; i < attribute.NamedArguments.Count; i++) { -// NamedArgumentExpression o = attribute.NamedArguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (NamedArgumentExpression)nodeStack.Pop(); -// if (o == null) -// attribute.NamedArguments.RemoveAt(i--); -// else -// attribute.NamedArguments[i] = o; -// } -// return null; -// } -// -// public virtual object VisitAttributeSection(AttributeSection attributeSection, object data) { -// Debug.Assert((attributeSection != null)); -// Debug.Assert((attributeSection.Attributes != null)); -// for (int i = 0; i < attributeSection.Attributes.Count; i++) { -// ICSharpCode.NRefactory.VB.Ast.Attribute o = attributeSection.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ICSharpCode.NRefactory.VB.Ast.Attribute)nodeStack.Pop(); -// if (o == null) -// attributeSection.Attributes.RemoveAt(i--); -// else -// attributeSection.Attributes[i] = o; -// } -// return null; -// } -// -// public virtual object VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression, object data) { -// Debug.Assert((baseReferenceExpression != null)); -// return null; -// } -// -// public virtual object VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression, object data) { -// Debug.Assert((binaryOperatorExpression != null)); -// Debug.Assert((binaryOperatorExpression.Left != null)); -// Debug.Assert((binaryOperatorExpression.Right != null)); -// nodeStack.Push(binaryOperatorExpression.Left); -// binaryOperatorExpression.Left.AcceptVisitor(this, data); -// binaryOperatorExpression.Left = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(binaryOperatorExpression.Right); -// binaryOperatorExpression.Right.AcceptVisitor(this, data); -// binaryOperatorExpression.Right = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitBlockStatement(BlockStatement blockStatement, object data) { -// Debug.Assert((blockStatement != null)); -// for (int i = 0; i < blockStatement.Children.Count; i++) { -// INode o = blockStatement.Children[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = nodeStack.Pop(); -// if (o == null) -// blockStatement.Children.RemoveAt(i--); -// else -// blockStatement.Children[i] = o; -// } -// return null; -// } -// -// public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) { -// Debug.Assert((caseLabel != null)); -// Debug.Assert((caseLabel.Label != null)); -// Debug.Assert((caseLabel.ToExpression != null)); -// nodeStack.Push(caseLabel.Label); -// caseLabel.Label.AcceptVisitor(this, data); -// caseLabel.Label = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(caseLabel.ToExpression); -// caseLabel.ToExpression.AcceptVisitor(this, data); -// caseLabel.ToExpression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitCastExpression(CastExpression castExpression, object data) { -// Debug.Assert((castExpression != null)); -// Debug.Assert((castExpression.CastTo != null)); -// Debug.Assert((castExpression.Expression != null)); -// nodeStack.Push(castExpression.CastTo); -// castExpression.CastTo.AcceptVisitor(this, data); -// castExpression.CastTo = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(castExpression.Expression); -// castExpression.Expression.AcceptVisitor(this, data); -// castExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitCatchClause(CatchClause catchClause, object data) { -// Debug.Assert((catchClause != null)); -// Debug.Assert((catchClause.TypeReference != null)); -// Debug.Assert((catchClause.StatementBlock != null)); -// Debug.Assert((catchClause.Condition != null)); -// nodeStack.Push(catchClause.TypeReference); -// catchClause.TypeReference.AcceptVisitor(this, data); -// catchClause.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(catchClause.StatementBlock); -// catchClause.StatementBlock.AcceptVisitor(this, data); -// catchClause.StatementBlock = ((Statement)(nodeStack.Pop())); -// nodeStack.Push(catchClause.Condition); -// catchClause.Condition.AcceptVisitor(this, data); -// catchClause.Condition = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitClassReferenceExpression(ClassReferenceExpression classReferenceExpression, object data) { -// Debug.Assert((classReferenceExpression != null)); -// return null; -// } -// -// public virtual object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) { -// Debug.Assert((collectionInitializerExpression != null)); -// Debug.Assert((collectionInitializerExpression.CreateExpressions != null)); -// for (int i = 0; i < collectionInitializerExpression.CreateExpressions.Count; i++) { -// Expression o = collectionInitializerExpression.CreateExpressions[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// collectionInitializerExpression.CreateExpressions.RemoveAt(i--); -// else -// collectionInitializerExpression.CreateExpressions[i] = o; -// } -// return null; -// } -// -// public virtual object VisitCollectionRangeVariable(CollectionRangeVariable collectionRangeVariable, object data) { -// Debug.Assert((collectionRangeVariable != null)); -// Debug.Assert((collectionRangeVariable.Expression != null)); -// Debug.Assert((collectionRangeVariable.Type != null)); -// nodeStack.Push(collectionRangeVariable.Expression); -// collectionRangeVariable.Expression.AcceptVisitor(this, data); -// collectionRangeVariable.Expression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(collectionRangeVariable.Type); -// collectionRangeVariable.Type.AcceptVisitor(this, data); -// collectionRangeVariable.Type = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitCompilationUnit(CompilationUnit compilationUnit, object data) { -// Debug.Assert((compilationUnit != null)); -// for (int i = 0; i < compilationUnit.Children.Count; i++) { -// INode o = compilationUnit.Children[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = nodeStack.Pop(); -// if (o == null) -// compilationUnit.Children.RemoveAt(i--); -// else -// compilationUnit.Children[i] = o; -// } -// return null; -// } -// -// public virtual object VisitConditionalExpression(ConditionalExpression conditionalExpression, object data) { -// Debug.Assert((conditionalExpression != null)); -// Debug.Assert((conditionalExpression.Condition != null)); -// Debug.Assert((conditionalExpression.TrueExpression != null)); -// Debug.Assert((conditionalExpression.FalseExpression != null)); -// nodeStack.Push(conditionalExpression.Condition); -// conditionalExpression.Condition.AcceptVisitor(this, data); -// conditionalExpression.Condition = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(conditionalExpression.TrueExpression); -// conditionalExpression.TrueExpression.AcceptVisitor(this, data); -// conditionalExpression.TrueExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(conditionalExpression.FalseExpression); -// conditionalExpression.FalseExpression.AcceptVisitor(this, data); -// conditionalExpression.FalseExpression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, object data) { -// Debug.Assert((constructorDeclaration != null)); -// Debug.Assert((constructorDeclaration.Attributes != null)); -// Debug.Assert((constructorDeclaration.Parameters != null)); -// Debug.Assert((constructorDeclaration.ConstructorInitializer != null)); -// Debug.Assert((constructorDeclaration.Body != null)); -// for (int i = 0; i < constructorDeclaration.Attributes.Count; i++) { -// AttributeSection o = constructorDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// constructorDeclaration.Attributes.RemoveAt(i--); -// else -// constructorDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < constructorDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = constructorDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// constructorDeclaration.Parameters.RemoveAt(i--); -// else -// constructorDeclaration.Parameters[i] = o; -// } -// nodeStack.Push(constructorDeclaration.ConstructorInitializer); -// constructorDeclaration.ConstructorInitializer.AcceptVisitor(this, data); -// constructorDeclaration.ConstructorInitializer = ((ConstructorInitializer)(nodeStack.Pop())); -// nodeStack.Push(constructorDeclaration.Body); -// constructorDeclaration.Body.AcceptVisitor(this, data); -// constructorDeclaration.Body = ((BlockStatement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitConstructorInitializer(ConstructorInitializer constructorInitializer, object data) { -// Debug.Assert((constructorInitializer != null)); -// Debug.Assert((constructorInitializer.Arguments != null)); -// for (int i = 0; i < constructorInitializer.Arguments.Count; i++) { -// Expression o = constructorInitializer.Arguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// constructorInitializer.Arguments.RemoveAt(i--); -// else -// constructorInitializer.Arguments[i] = o; -// } -// return null; -// } -// -// public virtual object VisitContinueStatement(ContinueStatement continueStatement, object data) { -// Debug.Assert((continueStatement != null)); -// return null; -// } -// -// public virtual object VisitDeclareDeclaration(DeclareDeclaration declareDeclaration, object data) { -// Debug.Assert((declareDeclaration != null)); -// Debug.Assert((declareDeclaration.Attributes != null)); -// Debug.Assert((declareDeclaration.Parameters != null)); -// Debug.Assert((declareDeclaration.TypeReference != null)); -// for (int i = 0; i < declareDeclaration.Attributes.Count; i++) { -// AttributeSection o = declareDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// declareDeclaration.Attributes.RemoveAt(i--); -// else -// declareDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < declareDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = declareDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// declareDeclaration.Parameters.RemoveAt(i--); -// else -// declareDeclaration.Parameters[i] = o; -// } -// nodeStack.Push(declareDeclaration.TypeReference); -// declareDeclaration.TypeReference.AcceptVisitor(this, data); -// declareDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression, object data) { -// Debug.Assert((defaultValueExpression != null)); -// Debug.Assert((defaultValueExpression.TypeReference != null)); -// nodeStack.Push(defaultValueExpression.TypeReference); -// defaultValueExpression.TypeReference.AcceptVisitor(this, data); -// defaultValueExpression.TypeReference = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data) { -// Debug.Assert((delegateDeclaration != null)); -// Debug.Assert((delegateDeclaration.Attributes != null)); -// Debug.Assert((delegateDeclaration.ReturnType != null)); -// Debug.Assert((delegateDeclaration.Parameters != null)); -// Debug.Assert((delegateDeclaration.Templates != null)); -// for (int i = 0; i < delegateDeclaration.Attributes.Count; i++) { -// AttributeSection o = delegateDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// delegateDeclaration.Attributes.RemoveAt(i--); -// else -// delegateDeclaration.Attributes[i] = o; -// } -// nodeStack.Push(delegateDeclaration.ReturnType); -// delegateDeclaration.ReturnType.AcceptVisitor(this, data); -// delegateDeclaration.ReturnType = ((TypeReference)(nodeStack.Pop())); -// for (int i = 0; i < delegateDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = delegateDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// delegateDeclaration.Parameters.RemoveAt(i--); -// else -// delegateDeclaration.Parameters[i] = o; -// } -// for (int i = 0; i < delegateDeclaration.Templates.Count; i++) { -// TemplateDefinition o = delegateDeclaration.Templates[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TemplateDefinition)nodeStack.Pop(); -// if (o == null) -// delegateDeclaration.Templates.RemoveAt(i--); -// else -// delegateDeclaration.Templates[i] = o; -// } -// return null; -// } -// -// public virtual object VisitDirectionExpression(DirectionExpression directionExpression, object data) { -// Debug.Assert((directionExpression != null)); -// Debug.Assert((directionExpression.Expression != null)); -// nodeStack.Push(directionExpression.Expression); -// directionExpression.Expression.AcceptVisitor(this, data); -// directionExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitDoLoopStatement(DoLoopStatement doLoopStatement, object data) { -// Debug.Assert((doLoopStatement != null)); -// Debug.Assert((doLoopStatement.Condition != null)); -// Debug.Assert((doLoopStatement.EmbeddedStatement != null)); -// nodeStack.Push(doLoopStatement.Condition); -// doLoopStatement.Condition.AcceptVisitor(this, data); -// doLoopStatement.Condition = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(doLoopStatement.EmbeddedStatement); -// doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data); -// doLoopStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitElseIfSection(ElseIfSection elseIfSection, object data) { -// Debug.Assert((elseIfSection != null)); -// Debug.Assert((elseIfSection.Condition != null)); -// Debug.Assert((elseIfSection.EmbeddedStatement != null)); -// nodeStack.Push(elseIfSection.Condition); -// elseIfSection.Condition.AcceptVisitor(this, data); -// elseIfSection.Condition = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(elseIfSection.EmbeddedStatement); -// elseIfSection.EmbeddedStatement.AcceptVisitor(this, data); -// elseIfSection.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitEndStatement(EndStatement endStatement, object data) { -// Debug.Assert((endStatement != null)); -// return null; -// } -// -// public virtual object VisitEraseStatement(EraseStatement eraseStatement, object data) { -// Debug.Assert((eraseStatement != null)); -// Debug.Assert((eraseStatement.Expressions != null)); -// for (int i = 0; i < eraseStatement.Expressions.Count; i++) { -// Expression o = eraseStatement.Expressions[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// eraseStatement.Expressions.RemoveAt(i--); -// else -// eraseStatement.Expressions[i] = o; -// } -// return null; -// } -// -// public virtual object VisitErrorStatement(ErrorStatement errorStatement, object data) { -// Debug.Assert((errorStatement != null)); -// Debug.Assert((errorStatement.Expression != null)); -// nodeStack.Push(errorStatement.Expression); -// errorStatement.Expression.AcceptVisitor(this, data); -// errorStatement.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) { -// Debug.Assert((eventAddRegion != null)); -// Debug.Assert((eventAddRegion.Attributes != null)); -// Debug.Assert((eventAddRegion.Block != null)); -// Debug.Assert((eventAddRegion.Parameters != null)); -// for (int i = 0; i < eventAddRegion.Attributes.Count; i++) { -// AttributeSection o = eventAddRegion.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// eventAddRegion.Attributes.RemoveAt(i--); -// else -// eventAddRegion.Attributes[i] = o; -// } -// nodeStack.Push(eventAddRegion.Block); -// eventAddRegion.Block.AcceptVisitor(this, data); -// eventAddRegion.Block = ((BlockStatement)(nodeStack.Pop())); -// for (int i = 0; i < eventAddRegion.Parameters.Count; i++) { -// ParameterDeclarationExpression o = eventAddRegion.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// eventAddRegion.Parameters.RemoveAt(i--); -// else -// eventAddRegion.Parameters[i] = o; -// } -// return null; -// } -// -// public virtual object VisitEventDeclaration(EventDeclaration eventDeclaration, object data) { -// Debug.Assert((eventDeclaration != null)); -// Debug.Assert((eventDeclaration.Attributes != null)); -// Debug.Assert((eventDeclaration.Parameters != null)); -// Debug.Assert((eventDeclaration.InterfaceImplementations != null)); -// Debug.Assert((eventDeclaration.TypeReference != null)); -// Debug.Assert((eventDeclaration.AddRegion != null)); -// Debug.Assert((eventDeclaration.RemoveRegion != null)); -// Debug.Assert((eventDeclaration.RaiseRegion != null)); -// Debug.Assert((eventDeclaration.Initializer != null)); -// for (int i = 0; i < eventDeclaration.Attributes.Count; i++) { -// AttributeSection o = eventDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// eventDeclaration.Attributes.RemoveAt(i--); -// else -// eventDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < eventDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = eventDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// eventDeclaration.Parameters.RemoveAt(i--); -// else -// eventDeclaration.Parameters[i] = o; -// } -// for (int i = 0; i < eventDeclaration.InterfaceImplementations.Count; i++) { -// InterfaceImplementation o = eventDeclaration.InterfaceImplementations[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (InterfaceImplementation)nodeStack.Pop(); -// if (o == null) -// eventDeclaration.InterfaceImplementations.RemoveAt(i--); -// else -// eventDeclaration.InterfaceImplementations[i] = o; -// } -// nodeStack.Push(eventDeclaration.TypeReference); -// eventDeclaration.TypeReference.AcceptVisitor(this, data); -// eventDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(eventDeclaration.AddRegion); -// eventDeclaration.AddRegion.AcceptVisitor(this, data); -// eventDeclaration.AddRegion = ((EventAddRegion)(nodeStack.Pop())); -// nodeStack.Push(eventDeclaration.RemoveRegion); -// eventDeclaration.RemoveRegion.AcceptVisitor(this, data); -// eventDeclaration.RemoveRegion = ((EventRemoveRegion)(nodeStack.Pop())); -// nodeStack.Push(eventDeclaration.RaiseRegion); -// eventDeclaration.RaiseRegion.AcceptVisitor(this, data); -// eventDeclaration.RaiseRegion = ((EventRaiseRegion)(nodeStack.Pop())); -// nodeStack.Push(eventDeclaration.Initializer); -// eventDeclaration.Initializer.AcceptVisitor(this, data); -// eventDeclaration.Initializer = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) { -// Debug.Assert((eventRaiseRegion != null)); -// Debug.Assert((eventRaiseRegion.Attributes != null)); -// Debug.Assert((eventRaiseRegion.Block != null)); -// Debug.Assert((eventRaiseRegion.Parameters != null)); -// for (int i = 0; i < eventRaiseRegion.Attributes.Count; i++) { -// AttributeSection o = eventRaiseRegion.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// eventRaiseRegion.Attributes.RemoveAt(i--); -// else -// eventRaiseRegion.Attributes[i] = o; -// } -// nodeStack.Push(eventRaiseRegion.Block); -// eventRaiseRegion.Block.AcceptVisitor(this, data); -// eventRaiseRegion.Block = ((BlockStatement)(nodeStack.Pop())); -// for (int i = 0; i < eventRaiseRegion.Parameters.Count; i++) { -// ParameterDeclarationExpression o = eventRaiseRegion.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// eventRaiseRegion.Parameters.RemoveAt(i--); -// else -// eventRaiseRegion.Parameters[i] = o; -// } -// return null; -// } -// -// public virtual object VisitEventRemoveRegion(EventRemoveRegion eventRemoveRegion, object data) { -// Debug.Assert((eventRemoveRegion != null)); -// Debug.Assert((eventRemoveRegion.Attributes != null)); -// Debug.Assert((eventRemoveRegion.Block != null)); -// Debug.Assert((eventRemoveRegion.Parameters != null)); -// for (int i = 0; i < eventRemoveRegion.Attributes.Count; i++) { -// AttributeSection o = eventRemoveRegion.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// eventRemoveRegion.Attributes.RemoveAt(i--); -// else -// eventRemoveRegion.Attributes[i] = o; -// } -// nodeStack.Push(eventRemoveRegion.Block); -// eventRemoveRegion.Block.AcceptVisitor(this, data); -// eventRemoveRegion.Block = ((BlockStatement)(nodeStack.Pop())); -// for (int i = 0; i < eventRemoveRegion.Parameters.Count; i++) { -// ParameterDeclarationExpression o = eventRemoveRegion.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// eventRemoveRegion.Parameters.RemoveAt(i--); -// else -// eventRemoveRegion.Parameters[i] = o; -// } -// return null; -// } -// -// public virtual object VisitExitStatement(ExitStatement exitStatement, object data) { -// Debug.Assert((exitStatement != null)); -// return null; -// } -// -// public virtual object VisitExpressionRangeVariable(ExpressionRangeVariable expressionRangeVariable, object data) { -// Debug.Assert((expressionRangeVariable != null)); -// Debug.Assert((expressionRangeVariable.Expression != null)); -// Debug.Assert((expressionRangeVariable.Type != null)); -// nodeStack.Push(expressionRangeVariable.Expression); -// expressionRangeVariable.Expression.AcceptVisitor(this, data); -// expressionRangeVariable.Expression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(expressionRangeVariable.Type); -// expressionRangeVariable.Type.AcceptVisitor(this, data); -// expressionRangeVariable.Type = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitExpressionStatement(ExpressionStatement expressionStatement, object data) { -// Debug.Assert((expressionStatement != null)); -// Debug.Assert((expressionStatement.Expression != null)); -// nodeStack.Push(expressionStatement.Expression); -// expressionStatement.Expression.AcceptVisitor(this, data); -// expressionStatement.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitExternAliasDirective(ExternAliasDirective externAliasDirective, object data) { -// Debug.Assert((externAliasDirective != null)); -// return null; -// } -// -// public virtual object VisitFieldDeclaration(FieldDeclaration fieldDeclaration, object data) { -// Debug.Assert((fieldDeclaration != null)); -// Debug.Assert((fieldDeclaration.Attributes != null)); -// Debug.Assert((fieldDeclaration.TypeReference != null)); -// Debug.Assert((fieldDeclaration.Fields != null)); -// for (int i = 0; i < fieldDeclaration.Attributes.Count; i++) { -// AttributeSection o = fieldDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// fieldDeclaration.Attributes.RemoveAt(i--); -// else -// fieldDeclaration.Attributes[i] = o; -// } -// nodeStack.Push(fieldDeclaration.TypeReference); -// fieldDeclaration.TypeReference.AcceptVisitor(this, data); -// fieldDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// for (int i = 0; i < fieldDeclaration.Fields.Count; i++) { -// VariableDeclaration o = fieldDeclaration.Fields[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (VariableDeclaration)nodeStack.Pop(); -// if (o == null) -// fieldDeclaration.Fields.RemoveAt(i--); -// else -// fieldDeclaration.Fields[i] = o; -// } -// return null; -// } -// -// public virtual object VisitForeachStatement(ForeachStatement foreachStatement, object data) { -// Debug.Assert((foreachStatement != null)); -// Debug.Assert((foreachStatement.TypeReference != null)); -// Debug.Assert((foreachStatement.Expression != null)); -// Debug.Assert((foreachStatement.NextExpression != null)); -// Debug.Assert((foreachStatement.EmbeddedStatement != null)); -// nodeStack.Push(foreachStatement.TypeReference); -// foreachStatement.TypeReference.AcceptVisitor(this, data); -// foreachStatement.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(foreachStatement.Expression); -// foreachStatement.Expression.AcceptVisitor(this, data); -// foreachStatement.Expression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(foreachStatement.NextExpression); -// foreachStatement.NextExpression.AcceptVisitor(this, data); -// foreachStatement.NextExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(foreachStatement.EmbeddedStatement); -// foreachStatement.EmbeddedStatement.AcceptVisitor(this, data); -// foreachStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitForNextStatement(ForNextStatement forNextStatement, object data) { -// Debug.Assert((forNextStatement != null)); -// Debug.Assert((forNextStatement.Start != null)); -// Debug.Assert((forNextStatement.End != null)); -// Debug.Assert((forNextStatement.Step != null)); -// Debug.Assert((forNextStatement.NextExpressions != null)); -// Debug.Assert((forNextStatement.TypeReference != null)); -// Debug.Assert((forNextStatement.LoopVariableExpression != null)); -// Debug.Assert((forNextStatement.EmbeddedStatement != null)); -// nodeStack.Push(forNextStatement.Start); -// forNextStatement.Start.AcceptVisitor(this, data); -// forNextStatement.Start = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(forNextStatement.End); -// forNextStatement.End.AcceptVisitor(this, data); -// forNextStatement.End = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(forNextStatement.Step); -// forNextStatement.Step.AcceptVisitor(this, data); -// forNextStatement.Step = ((Expression)(nodeStack.Pop())); -// for (int i = 0; i < forNextStatement.NextExpressions.Count; i++) { -// Expression o = forNextStatement.NextExpressions[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// forNextStatement.NextExpressions.RemoveAt(i--); -// else -// forNextStatement.NextExpressions[i] = o; -// } -// nodeStack.Push(forNextStatement.TypeReference); -// forNextStatement.TypeReference.AcceptVisitor(this, data); -// forNextStatement.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(forNextStatement.LoopVariableExpression); -// forNextStatement.LoopVariableExpression.AcceptVisitor(this, data); -// forNextStatement.LoopVariableExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(forNextStatement.EmbeddedStatement); -// forNextStatement.EmbeddedStatement.AcceptVisitor(this, data); -// forNextStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitGotoStatement(GotoStatement gotoStatement, object data) { -// Debug.Assert((gotoStatement != null)); -// return null; -// } -// -// public virtual object VisitIdentifierExpression(SimpleNameExpression identifierExpression, object data) { -// Debug.Assert((identifierExpression != null)); -// Debug.Assert((identifierExpression.TypeArguments != null)); -// for (int i = 0; i < identifierExpression.TypeArguments.Count; i++) { -// TypeReference o = identifierExpression.TypeArguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TypeReference)nodeStack.Pop(); -// if (o == null) -// identifierExpression.TypeArguments.RemoveAt(i--); -// else -// identifierExpression.TypeArguments[i] = o; -// } -// return null; -// } -// -// public virtual object VisitIfElseStatement(IfElseStatement ifElseStatement, object data) { -// Debug.Assert((ifElseStatement != null)); -// Debug.Assert((ifElseStatement.Condition != null)); -// Debug.Assert((ifElseStatement.TrueStatement != null)); -// Debug.Assert((ifElseStatement.FalseStatement != null)); -// Debug.Assert((ifElseStatement.ElseIfSections != null)); -// nodeStack.Push(ifElseStatement.Condition); -// ifElseStatement.Condition.AcceptVisitor(this, data); -// ifElseStatement.Condition = ((Expression)(nodeStack.Pop())); -// for (int i = 0; i < ifElseStatement.TrueStatement.Count; i++) { -// Statement o = ifElseStatement.TrueStatement[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Statement)nodeStack.Pop(); -// if (o == null) -// ifElseStatement.TrueStatement.RemoveAt(i--); -// else -// ifElseStatement.TrueStatement[i] = o; -// } -// for (int i = 0; i < ifElseStatement.FalseStatement.Count; i++) { -// Statement o = ifElseStatement.FalseStatement[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Statement)nodeStack.Pop(); -// if (o == null) -// ifElseStatement.FalseStatement.RemoveAt(i--); -// else -// ifElseStatement.FalseStatement[i] = o; -// } -// for (int i = 0; i < ifElseStatement.ElseIfSections.Count; i++) { -// ElseIfSection o = ifElseStatement.ElseIfSections[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ElseIfSection)nodeStack.Pop(); -// if (o == null) -// ifElseStatement.ElseIfSections.RemoveAt(i--); -// else -// ifElseStatement.ElseIfSections[i] = o; -// } -// return null; -// } -// -// public virtual object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) { -// Debug.Assert((innerClassTypeReference != null)); -// Debug.Assert((innerClassTypeReference.GenericTypes != null)); -// Debug.Assert((innerClassTypeReference.BaseType != null)); -// for (int i = 0; i < innerClassTypeReference.GenericTypes.Count; i++) { -// TypeReference o = innerClassTypeReference.GenericTypes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TypeReference)nodeStack.Pop(); -// if (o == null) -// innerClassTypeReference.GenericTypes.RemoveAt(i--); -// else -// innerClassTypeReference.GenericTypes[i] = o; -// } -// nodeStack.Push(innerClassTypeReference.BaseType); -// innerClassTypeReference.BaseType.AcceptVisitor(this, data); -// innerClassTypeReference.BaseType = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitInterfaceImplementation(InterfaceImplementation interfaceImplementation, object data) { -// Debug.Assert((interfaceImplementation != null)); -// Debug.Assert((interfaceImplementation.InterfaceType != null)); -// nodeStack.Push(interfaceImplementation.InterfaceType); -// interfaceImplementation.InterfaceType.AcceptVisitor(this, data); -// interfaceImplementation.InterfaceType = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitInvocationExpression(InvocationExpression invocationExpression, object data) { -// Debug.Assert((invocationExpression != null)); -// Debug.Assert((invocationExpression.TargetObject != null)); -// Debug.Assert((invocationExpression.Arguments != null)); -// nodeStack.Push(invocationExpression.TargetObject); -// invocationExpression.TargetObject.AcceptVisitor(this, data); -// invocationExpression.TargetObject = ((Expression)(nodeStack.Pop())); -// for (int i = 0; i < invocationExpression.Arguments.Count; i++) { -// Expression o = invocationExpression.Arguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// invocationExpression.Arguments.RemoveAt(i--); -// else -// invocationExpression.Arguments[i] = o; -// } -// return null; -// } -// -// public virtual object VisitLabelStatement(LabelStatement labelStatement, object data) { -// Debug.Assert((labelStatement != null)); -// return null; -// } -// -// public virtual object VisitLambdaExpression(LambdaExpression lambdaExpression, object data) { -// Debug.Assert((lambdaExpression != null)); -// Debug.Assert((lambdaExpression.Parameters != null)); -// Debug.Assert((lambdaExpression.StatementBody != null)); -// Debug.Assert((lambdaExpression.ExpressionBody != null)); -// Debug.Assert((lambdaExpression.ReturnType != null)); -// for (int i = 0; i < lambdaExpression.Parameters.Count; i++) { -// ParameterDeclarationExpression o = lambdaExpression.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// lambdaExpression.Parameters.RemoveAt(i--); -// else -// lambdaExpression.Parameters[i] = o; -// } -// nodeStack.Push(lambdaExpression.StatementBody); -// lambdaExpression.StatementBody.AcceptVisitor(this, data); -// lambdaExpression.StatementBody = ((Statement)(nodeStack.Pop())); -// nodeStack.Push(lambdaExpression.ExpressionBody); -// lambdaExpression.ExpressionBody.AcceptVisitor(this, data); -// lambdaExpression.ExpressionBody = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(lambdaExpression.ReturnType); -// lambdaExpression.ReturnType.AcceptVisitor(this, data); -// lambdaExpression.ReturnType = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) { -// Debug.Assert((localVariableDeclaration != null)); -// Debug.Assert((localVariableDeclaration.TypeReference != null)); -// Debug.Assert((localVariableDeclaration.Variables != null)); -// nodeStack.Push(localVariableDeclaration.TypeReference); -// localVariableDeclaration.TypeReference.AcceptVisitor(this, data); -// localVariableDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// for (int i = 0; i < localVariableDeclaration.Variables.Count; i++) { -// VariableDeclaration o = localVariableDeclaration.Variables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (VariableDeclaration)nodeStack.Pop(); -// if (o == null) -// localVariableDeclaration.Variables.RemoveAt(i--); -// else -// localVariableDeclaration.Variables[i] = o; -// } -// return null; -// } -// -// public virtual object VisitLockStatement(LockStatement lockStatement, object data) { -// Debug.Assert((lockStatement != null)); -// Debug.Assert((lockStatement.LockExpression != null)); -// Debug.Assert((lockStatement.EmbeddedStatement != null)); -// nodeStack.Push(lockStatement.LockExpression); -// lockStatement.LockExpression.AcceptVisitor(this, data); -// lockStatement.LockExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(lockStatement.EmbeddedStatement); -// lockStatement.EmbeddedStatement.AcceptVisitor(this, data); -// lockStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) { -// Debug.Assert((memberInitializerExpression != null)); -// Debug.Assert((memberInitializerExpression.Expression != null)); -// nodeStack.Push(memberInitializerExpression.Expression); -// memberInitializerExpression.Expression.AcceptVisitor(this, data); -// memberInitializerExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression, object data) { -// Debug.Assert((memberReferenceExpression != null)); -// Debug.Assert((memberReferenceExpression.TargetObject != null)); -// Debug.Assert((memberReferenceExpression.TypeArguments != null)); -// nodeStack.Push(memberReferenceExpression.TargetObject); -// memberReferenceExpression.TargetObject.AcceptVisitor(this, data); -// memberReferenceExpression.TargetObject = ((Expression)(nodeStack.Pop())); -// for (int i = 0; i < memberReferenceExpression.TypeArguments.Count; i++) { -// TypeReference o = memberReferenceExpression.TypeArguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TypeReference)nodeStack.Pop(); -// if (o == null) -// memberReferenceExpression.TypeArguments.RemoveAt(i--); -// else -// memberReferenceExpression.TypeArguments[i] = o; -// } -// return null; -// } -// -// public virtual object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) { -// Debug.Assert((methodDeclaration != null)); -// Debug.Assert((methodDeclaration.Attributes != null)); -// Debug.Assert((methodDeclaration.Parameters != null)); -// Debug.Assert((methodDeclaration.InterfaceImplementations != null)); -// Debug.Assert((methodDeclaration.TypeReference != null)); -// Debug.Assert((methodDeclaration.Body != null)); -// Debug.Assert((methodDeclaration.Templates != null)); -// for (int i = 0; i < methodDeclaration.Attributes.Count; i++) { -// AttributeSection o = methodDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// methodDeclaration.Attributes.RemoveAt(i--); -// else -// methodDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < methodDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = methodDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// methodDeclaration.Parameters.RemoveAt(i--); -// else -// methodDeclaration.Parameters[i] = o; -// } -// for (int i = 0; i < methodDeclaration.InterfaceImplementations.Count; i++) { -// InterfaceImplementation o = methodDeclaration.InterfaceImplementations[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (InterfaceImplementation)nodeStack.Pop(); -// if (o == null) -// methodDeclaration.InterfaceImplementations.RemoveAt(i--); -// else -// methodDeclaration.InterfaceImplementations[i] = o; -// } -// nodeStack.Push(methodDeclaration.TypeReference); -// methodDeclaration.TypeReference.AcceptVisitor(this, data); -// methodDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(methodDeclaration.Body); -// methodDeclaration.Body.AcceptVisitor(this, data); -// methodDeclaration.Body = ((BlockStatement)(nodeStack.Pop())); -// for (int i = 0; i < methodDeclaration.Templates.Count; i++) { -// TemplateDefinition o = methodDeclaration.Templates[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TemplateDefinition)nodeStack.Pop(); -// if (o == null) -// methodDeclaration.Templates.RemoveAt(i--); -// else -// methodDeclaration.Templates[i] = o; -// } -// return null; -// } -// -// public virtual object VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data) { -// Debug.Assert((namedArgumentExpression != null)); -// Debug.Assert((namedArgumentExpression.Expression != null)); -// nodeStack.Push(namedArgumentExpression.Expression); -// namedArgumentExpression.Expression.AcceptVisitor(this, data); -// namedArgumentExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data) { -// Debug.Assert((namespaceDeclaration != null)); -// for (int i = 0; i < namespaceDeclaration.Children.Count; i++) { -// INode o = namespaceDeclaration.Children[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = nodeStack.Pop(); -// if (o == null) -// namespaceDeclaration.Children.RemoveAt(i--); -// else -// namespaceDeclaration.Children[i] = o; -// } -// return null; -// } -// -// public virtual object VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, object data) { -// Debug.Assert((objectCreateExpression != null)); -// Debug.Assert((objectCreateExpression.CreateType != null)); -// Debug.Assert((objectCreateExpression.Parameters != null)); -// Debug.Assert((objectCreateExpression.ObjectInitializer != null)); -// nodeStack.Push(objectCreateExpression.CreateType); -// objectCreateExpression.CreateType.AcceptVisitor(this, data); -// objectCreateExpression.CreateType = ((TypeReference)(nodeStack.Pop())); -// for (int i = 0; i < objectCreateExpression.Parameters.Count; i++) { -// Expression o = objectCreateExpression.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// objectCreateExpression.Parameters.RemoveAt(i--); -// else -// objectCreateExpression.Parameters[i] = o; -// } -// nodeStack.Push(objectCreateExpression.ObjectInitializer); -// objectCreateExpression.ObjectInitializer.AcceptVisitor(this, data); -// objectCreateExpression.ObjectInitializer = ((CollectionInitializerExpression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) { -// Debug.Assert((onErrorStatement != null)); -// Debug.Assert((onErrorStatement.EmbeddedStatement != null)); -// nodeStack.Push(onErrorStatement.EmbeddedStatement); -// onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data); -// onErrorStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration, object data) { -// Debug.Assert((operatorDeclaration != null)); -// Debug.Assert((operatorDeclaration.Attributes != null)); -// Debug.Assert((operatorDeclaration.Parameters != null)); -// Debug.Assert((operatorDeclaration.InterfaceImplementations != null)); -// Debug.Assert((operatorDeclaration.TypeReference != null)); -// Debug.Assert((operatorDeclaration.Body != null)); -// Debug.Assert((operatorDeclaration.Templates != null)); -// for (int i = 0; i < operatorDeclaration.Attributes.Count; i++) { -// AttributeSection o = operatorDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// operatorDeclaration.Attributes.RemoveAt(i--); -// else -// operatorDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < operatorDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = operatorDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// operatorDeclaration.Parameters.RemoveAt(i--); -// else -// operatorDeclaration.Parameters[i] = o; -// } -// for (int i = 0; i < operatorDeclaration.InterfaceImplementations.Count; i++) { -// InterfaceImplementation o = operatorDeclaration.InterfaceImplementations[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (InterfaceImplementation)nodeStack.Pop(); -// if (o == null) -// operatorDeclaration.InterfaceImplementations.RemoveAt(i--); -// else -// operatorDeclaration.InterfaceImplementations[i] = o; -// } -// nodeStack.Push(operatorDeclaration.TypeReference); -// operatorDeclaration.TypeReference.AcceptVisitor(this, data); -// operatorDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(operatorDeclaration.Body); -// operatorDeclaration.Body.AcceptVisitor(this, data); -// operatorDeclaration.Body = ((BlockStatement)(nodeStack.Pop())); -// for (int i = 0; i < operatorDeclaration.Templates.Count; i++) { -// TemplateDefinition o = operatorDeclaration.Templates[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TemplateDefinition)nodeStack.Pop(); -// if (o == null) -// operatorDeclaration.Templates.RemoveAt(i--); -// else -// operatorDeclaration.Templates[i] = o; -// } -// return null; -// } -// -// public virtual object VisitOptionDeclaration(OptionDeclaration optionDeclaration, object data) { -// Debug.Assert((optionDeclaration != null)); -// return null; -// } -// -// public virtual object VisitParameterDeclarationExpression(ParameterDeclarationExpression parameterDeclarationExpression, object data) { -// Debug.Assert((parameterDeclarationExpression != null)); -// Debug.Assert((parameterDeclarationExpression.Attributes != null)); -// Debug.Assert((parameterDeclarationExpression.TypeReference != null)); -// Debug.Assert((parameterDeclarationExpression.DefaultValue != null)); -// for (int i = 0; i < parameterDeclarationExpression.Attributes.Count; i++) { -// AttributeSection o = parameterDeclarationExpression.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// parameterDeclarationExpression.Attributes.RemoveAt(i--); -// else -// parameterDeclarationExpression.Attributes[i] = o; -// } -// nodeStack.Push(parameterDeclarationExpression.TypeReference); -// parameterDeclarationExpression.TypeReference.AcceptVisitor(this, data); -// parameterDeclarationExpression.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(parameterDeclarationExpression.DefaultValue); -// parameterDeclarationExpression.DefaultValue.AcceptVisitor(this, data); -// parameterDeclarationExpression.DefaultValue = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) { -// Debug.Assert((parenthesizedExpression != null)); -// Debug.Assert((parenthesizedExpression.Expression != null)); -// nodeStack.Push(parenthesizedExpression.Expression); -// parenthesizedExpression.Expression.AcceptVisitor(this, data); -// parenthesizedExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, object data) { -// Debug.Assert((primitiveExpression != null)); -// return null; -// } -// -// public virtual object VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data) { -// Debug.Assert((propertyDeclaration != null)); -// Debug.Assert((propertyDeclaration.Attributes != null)); -// Debug.Assert((propertyDeclaration.Parameters != null)); -// Debug.Assert((propertyDeclaration.InterfaceImplementations != null)); -// Debug.Assert((propertyDeclaration.TypeReference != null)); -// Debug.Assert((propertyDeclaration.GetRegion != null)); -// Debug.Assert((propertyDeclaration.SetRegion != null)); -// Debug.Assert((propertyDeclaration.Initializer != null)); -// for (int i = 0; i < propertyDeclaration.Attributes.Count; i++) { -// AttributeSection o = propertyDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// propertyDeclaration.Attributes.RemoveAt(i--); -// else -// propertyDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < propertyDeclaration.Parameters.Count; i++) { -// ParameterDeclarationExpression o = propertyDeclaration.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// propertyDeclaration.Parameters.RemoveAt(i--); -// else -// propertyDeclaration.Parameters[i] = o; -// } -// for (int i = 0; i < propertyDeclaration.InterfaceImplementations.Count; i++) { -// InterfaceImplementation o = propertyDeclaration.InterfaceImplementations[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (InterfaceImplementation)nodeStack.Pop(); -// if (o == null) -// propertyDeclaration.InterfaceImplementations.RemoveAt(i--); -// else -// propertyDeclaration.InterfaceImplementations[i] = o; -// } -// nodeStack.Push(propertyDeclaration.TypeReference); -// propertyDeclaration.TypeReference.AcceptVisitor(this, data); -// propertyDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(propertyDeclaration.GetRegion); -// propertyDeclaration.GetRegion.AcceptVisitor(this, data); -// propertyDeclaration.GetRegion = ((PropertyGetRegion)(nodeStack.Pop())); -// nodeStack.Push(propertyDeclaration.SetRegion); -// propertyDeclaration.SetRegion.AcceptVisitor(this, data); -// propertyDeclaration.SetRegion = ((PropertySetRegion)(nodeStack.Pop())); -// nodeStack.Push(propertyDeclaration.Initializer); -// propertyDeclaration.Initializer.AcceptVisitor(this, data); -// propertyDeclaration.Initializer = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitPropertyGetRegion(PropertyGetRegion propertyGetRegion, object data) { -// Debug.Assert((propertyGetRegion != null)); -// Debug.Assert((propertyGetRegion.Attributes != null)); -// Debug.Assert((propertyGetRegion.Block != null)); -// for (int i = 0; i < propertyGetRegion.Attributes.Count; i++) { -// AttributeSection o = propertyGetRegion.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// propertyGetRegion.Attributes.RemoveAt(i--); -// else -// propertyGetRegion.Attributes[i] = o; -// } -// nodeStack.Push(propertyGetRegion.Block); -// propertyGetRegion.Block.AcceptVisitor(this, data); -// propertyGetRegion.Block = ((BlockStatement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) { -// Debug.Assert((propertySetRegion != null)); -// Debug.Assert((propertySetRegion.Attributes != null)); -// Debug.Assert((propertySetRegion.Block != null)); -// Debug.Assert((propertySetRegion.Parameters != null)); -// for (int i = 0; i < propertySetRegion.Attributes.Count; i++) { -// AttributeSection o = propertySetRegion.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// propertySetRegion.Attributes.RemoveAt(i--); -// else -// propertySetRegion.Attributes[i] = o; -// } -// nodeStack.Push(propertySetRegion.Block); -// propertySetRegion.Block.AcceptVisitor(this, data); -// propertySetRegion.Block = ((BlockStatement)(nodeStack.Pop())); -// for (int i = 0; i < propertySetRegion.Parameters.Count; i++) { -// ParameterDeclarationExpression o = propertySetRegion.Parameters[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ParameterDeclarationExpression)nodeStack.Pop(); -// if (o == null) -// propertySetRegion.Parameters.RemoveAt(i--); -// else -// propertySetRegion.Parameters[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpression(QueryExpression queryExpression, object data) { -// Debug.Assert((queryExpression != null)); -// Debug.Assert((queryExpression.Clauses != null)); -// for (int i = 0; i < queryExpression.Clauses.Count; i++) { -// QueryExpressionClause o = queryExpression.Clauses[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (QueryExpressionClause)nodeStack.Pop(); -// if (o == null) -// queryExpression.Clauses.RemoveAt(i--); -// else -// queryExpression.Clauses[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionAggregateClause(QueryExpressionAggregateClause queryExpressionAggregateClause, object data) { -// Debug.Assert((queryExpressionAggregateClause != null)); -// Debug.Assert((queryExpressionAggregateClause.Source != null)); -// Debug.Assert((queryExpressionAggregateClause.MiddleClauses != null)); -// Debug.Assert((queryExpressionAggregateClause.IntoVariables != null)); -// nodeStack.Push(queryExpressionAggregateClause.Source); -// queryExpressionAggregateClause.Source.AcceptVisitor(this, data); -// queryExpressionAggregateClause.Source = ((CollectionRangeVariable)(nodeStack.Pop())); -// for (int i = 0; i < queryExpressionAggregateClause.MiddleClauses.Count; i++) { -// QueryExpressionClause o = queryExpressionAggregateClause.MiddleClauses[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (QueryExpressionClause)nodeStack.Pop(); -// if (o == null) -// queryExpressionAggregateClause.MiddleClauses.RemoveAt(i--); -// else -// queryExpressionAggregateClause.MiddleClauses[i] = o; -// } -// for (int i = 0; i < queryExpressionAggregateClause.IntoVariables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionAggregateClause.IntoVariables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionAggregateClause.IntoVariables.RemoveAt(i--); -// else -// queryExpressionAggregateClause.IntoVariables[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionDistinctClause(QueryExpressionDistinctClause queryExpressionDistinctClause, object data) { -// Debug.Assert((queryExpressionDistinctClause != null)); -// return null; -// } -// -// public virtual object VisitQueryExpressionFromClause(QueryExpressionFromClause queryExpressionFromClause, object data) { -// Debug.Assert((queryExpressionFromClause != null)); -// Debug.Assert((queryExpressionFromClause.Sources != null)); -// for (int i = 0; i < queryExpressionFromClause.Sources.Count; i++) { -// CollectionRangeVariable o = queryExpressionFromClause.Sources[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (CollectionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionFromClause.Sources.RemoveAt(i--); -// else -// queryExpressionFromClause.Sources[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionGroupClause(QueryExpressionGroupClause queryExpressionGroupClause, object data) { -// Debug.Assert((queryExpressionGroupClause != null)); -// Debug.Assert((queryExpressionGroupClause.Projection != null)); -// Debug.Assert((queryExpressionGroupClause.GroupBy != null)); -// nodeStack.Push(queryExpressionGroupClause.Projection); -// queryExpressionGroupClause.Projection.AcceptVisitor(this, data); -// queryExpressionGroupClause.Projection = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(queryExpressionGroupClause.GroupBy); -// queryExpressionGroupClause.GroupBy.AcceptVisitor(this, data); -// queryExpressionGroupClause.GroupBy = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitQueryExpressionGroupJoinVBClause(QueryExpressionGroupJoinVBClause queryExpressionGroupJoinVBClause, object data) { -// Debug.Assert((queryExpressionGroupJoinVBClause != null)); -// Debug.Assert((queryExpressionGroupJoinVBClause.JoinClause != null)); -// Debug.Assert((queryExpressionGroupJoinVBClause.IntoVariables != null)); -// nodeStack.Push(queryExpressionGroupJoinVBClause.JoinClause); -// queryExpressionGroupJoinVBClause.JoinClause.AcceptVisitor(this, data); -// queryExpressionGroupJoinVBClause.JoinClause = ((QueryExpressionJoinVBClause)(nodeStack.Pop())); -// for (int i = 0; i < queryExpressionGroupJoinVBClause.IntoVariables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionGroupJoinVBClause.IntoVariables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionGroupJoinVBClause.IntoVariables.RemoveAt(i--); -// else -// queryExpressionGroupJoinVBClause.IntoVariables[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionGroupVBClause(QueryExpressionGroupVBClause queryExpressionGroupVBClause, object data) { -// Debug.Assert((queryExpressionGroupVBClause != null)); -// Debug.Assert((queryExpressionGroupVBClause.GroupVariables != null)); -// Debug.Assert((queryExpressionGroupVBClause.ByVariables != null)); -// Debug.Assert((queryExpressionGroupVBClause.IntoVariables != null)); -// for (int i = 0; i < queryExpressionGroupVBClause.GroupVariables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionGroupVBClause.GroupVariables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionGroupVBClause.GroupVariables.RemoveAt(i--); -// else -// queryExpressionGroupVBClause.GroupVariables[i] = o; -// } -// for (int i = 0; i < queryExpressionGroupVBClause.ByVariables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionGroupVBClause.ByVariables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionGroupVBClause.ByVariables.RemoveAt(i--); -// else -// queryExpressionGroupVBClause.ByVariables[i] = o; -// } -// for (int i = 0; i < queryExpressionGroupVBClause.IntoVariables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionGroupVBClause.IntoVariables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionGroupVBClause.IntoVariables.RemoveAt(i--); -// else -// queryExpressionGroupVBClause.IntoVariables[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionJoinClause(QueryExpressionJoinClause queryExpressionJoinClause, object data) { -// Debug.Assert((queryExpressionJoinClause != null)); -// Debug.Assert((queryExpressionJoinClause.OnExpression != null)); -// Debug.Assert((queryExpressionJoinClause.EqualsExpression != null)); -// Debug.Assert((queryExpressionJoinClause.Source != null)); -// nodeStack.Push(queryExpressionJoinClause.OnExpression); -// queryExpressionJoinClause.OnExpression.AcceptVisitor(this, data); -// queryExpressionJoinClause.OnExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(queryExpressionJoinClause.EqualsExpression); -// queryExpressionJoinClause.EqualsExpression.AcceptVisitor(this, data); -// queryExpressionJoinClause.EqualsExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(queryExpressionJoinClause.Source); -// queryExpressionJoinClause.Source.AcceptVisitor(this, data); -// queryExpressionJoinClause.Source = ((CollectionRangeVariable)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitQueryExpressionJoinConditionVB(QueryExpressionJoinConditionVB queryExpressionJoinConditionVB, object data) { -// Debug.Assert((queryExpressionJoinConditionVB != null)); -// Debug.Assert((queryExpressionJoinConditionVB.LeftSide != null)); -// Debug.Assert((queryExpressionJoinConditionVB.RightSide != null)); -// nodeStack.Push(queryExpressionJoinConditionVB.LeftSide); -// queryExpressionJoinConditionVB.LeftSide.AcceptVisitor(this, data); -// queryExpressionJoinConditionVB.LeftSide = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(queryExpressionJoinConditionVB.RightSide); -// queryExpressionJoinConditionVB.RightSide.AcceptVisitor(this, data); -// queryExpressionJoinConditionVB.RightSide = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitQueryExpressionJoinVBClause(QueryExpressionJoinVBClause queryExpressionJoinVBClause, object data) { -// Debug.Assert((queryExpressionJoinVBClause != null)); -// Debug.Assert((queryExpressionJoinVBClause.JoinVariable != null)); -// Debug.Assert((queryExpressionJoinVBClause.SubJoin != null)); -// Debug.Assert((queryExpressionJoinVBClause.Conditions != null)); -// nodeStack.Push(queryExpressionJoinVBClause.JoinVariable); -// queryExpressionJoinVBClause.JoinVariable.AcceptVisitor(this, data); -// queryExpressionJoinVBClause.JoinVariable = ((CollectionRangeVariable)(nodeStack.Pop())); -// nodeStack.Push(queryExpressionJoinVBClause.SubJoin); -// queryExpressionJoinVBClause.SubJoin.AcceptVisitor(this, data); -// queryExpressionJoinVBClause.SubJoin = ((QueryExpressionJoinVBClause)(nodeStack.Pop())); -// for (int i = 0; i < queryExpressionJoinVBClause.Conditions.Count; i++) { -// QueryExpressionJoinConditionVB o = queryExpressionJoinVBClause.Conditions[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (QueryExpressionJoinConditionVB)nodeStack.Pop(); -// if (o == null) -// queryExpressionJoinVBClause.Conditions.RemoveAt(i--); -// else -// queryExpressionJoinVBClause.Conditions[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionLetClause(QueryExpressionLetClause queryExpressionLetVBClause, object data) { -// Debug.Assert((queryExpressionLetVBClause != null)); -// Debug.Assert((queryExpressionLetVBClause.Variables != null)); -// for (int i = 0; i < queryExpressionLetVBClause.Variables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionLetVBClause.Variables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionLetVBClause.Variables.RemoveAt(i--); -// else -// queryExpressionLetVBClause.Variables[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionOrderClause(QueryExpressionOrderClause queryExpressionOrderClause, object data) { -// Debug.Assert((queryExpressionOrderClause != null)); -// Debug.Assert((queryExpressionOrderClause.Orderings != null)); -// for (int i = 0; i < queryExpressionOrderClause.Orderings.Count; i++) { -// QueryExpressionOrdering o = queryExpressionOrderClause.Orderings[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (QueryExpressionOrdering)nodeStack.Pop(); -// if (o == null) -// queryExpressionOrderClause.Orderings.RemoveAt(i--); -// else -// queryExpressionOrderClause.Orderings[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionOrdering(QueryExpressionOrdering queryExpressionOrdering, object data) { -// Debug.Assert((queryExpressionOrdering != null)); -// Debug.Assert((queryExpressionOrdering.Criteria != null)); -// nodeStack.Push(queryExpressionOrdering.Criteria); -// queryExpressionOrdering.Criteria.AcceptVisitor(this, data); -// queryExpressionOrdering.Criteria = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitQueryExpressionPartitionVBClause(QueryExpressionPartitionVBClause queryExpressionPartitionVBClause, object data) { -// Debug.Assert((queryExpressionPartitionVBClause != null)); -// Debug.Assert((queryExpressionPartitionVBClause.Expression != null)); -// nodeStack.Push(queryExpressionPartitionVBClause.Expression); -// queryExpressionPartitionVBClause.Expression.AcceptVisitor(this, data); -// queryExpressionPartitionVBClause.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitQueryExpressionSelectClause(QueryExpressionSelectClause queryExpressionSelectClause, object data) { -// Debug.Assert((queryExpressionSelectClause != null)); -// Debug.Assert((queryExpressionSelectClause.Projection != null)); -// nodeStack.Push(queryExpressionSelectClause.Projection); -// queryExpressionSelectClause.Projection.AcceptVisitor(this, data); -// queryExpressionSelectClause.Projection = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitQueryExpressionSelectVBClause(QueryExpressionSelectVBClause queryExpressionSelectVBClause, object data) { -// Debug.Assert((queryExpressionSelectVBClause != null)); -// Debug.Assert((queryExpressionSelectVBClause.Variables != null)); -// for (int i = 0; i < queryExpressionSelectVBClause.Variables.Count; i++) { -// ExpressionRangeVariable o = queryExpressionSelectVBClause.Variables[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ExpressionRangeVariable)nodeStack.Pop(); -// if (o == null) -// queryExpressionSelectVBClause.Variables.RemoveAt(i--); -// else -// queryExpressionSelectVBClause.Variables[i] = o; -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionWhereClause(QueryExpressionWhereClause queryExpressionWhereClause, object data) { -// Debug.Assert((queryExpressionWhereClause != null)); -// Debug.Assert((queryExpressionWhereClause.Condition != null)); -// nodeStack.Push(queryExpressionWhereClause.Condition); -// queryExpressionWhereClause.Condition.AcceptVisitor(this, data); -// queryExpressionWhereClause.Condition = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitRaiseEventStatement(RaiseEventStatement raiseEventStatement, object data) { -// Debug.Assert((raiseEventStatement != null)); -// Debug.Assert((raiseEventStatement.Arguments != null)); -// for (int i = 0; i < raiseEventStatement.Arguments.Count; i++) { -// Expression o = raiseEventStatement.Arguments[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (Expression)nodeStack.Pop(); -// if (o == null) -// raiseEventStatement.Arguments.RemoveAt(i--); -// else -// raiseEventStatement.Arguments[i] = o; -// } -// return null; -// } -// -// public virtual object VisitReDimStatement(ReDimStatement reDimStatement, object data) { -// Debug.Assert((reDimStatement != null)); -// Debug.Assert((reDimStatement.ReDimClauses != null)); -// for (int i = 0; i < reDimStatement.ReDimClauses.Count; i++) { -// InvocationExpression o = reDimStatement.ReDimClauses[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (InvocationExpression)nodeStack.Pop(); -// if (o == null) -// reDimStatement.ReDimClauses.RemoveAt(i--); -// else -// reDimStatement.ReDimClauses[i] = o; -// } -// return null; -// } -// -// public virtual object VisitRemoveHandlerStatement(RemoveHandlerStatement removeHandlerStatement, object data) { -// Debug.Assert((removeHandlerStatement != null)); -// Debug.Assert((removeHandlerStatement.EventExpression != null)); -// Debug.Assert((removeHandlerStatement.HandlerExpression != null)); -// nodeStack.Push(removeHandlerStatement.EventExpression); -// removeHandlerStatement.EventExpression.AcceptVisitor(this, data); -// removeHandlerStatement.EventExpression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(removeHandlerStatement.HandlerExpression); -// removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data); -// removeHandlerStatement.HandlerExpression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitResumeStatement(ResumeStatement resumeStatement, object data) { -// Debug.Assert((resumeStatement != null)); -// return null; -// } -// -// public virtual object VisitReturnStatement(ReturnStatement returnStatement, object data) { -// Debug.Assert((returnStatement != null)); -// Debug.Assert((returnStatement.Expression != null)); -// nodeStack.Push(returnStatement.Expression); -// returnStatement.Expression.AcceptVisitor(this, data); -// returnStatement.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitStopStatement(StopStatement stopStatement, object data) { -// Debug.Assert((stopStatement != null)); -// return null; -// } -// -// public virtual object VisitSwitchSection(SwitchSection switchSection, object data) { -// Debug.Assert((switchSection != null)); -// Debug.Assert((switchSection.SwitchLabels != null)); -// for (int i = 0; i < switchSection.SwitchLabels.Count; i++) { -// CaseLabel o = switchSection.SwitchLabels[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (CaseLabel)nodeStack.Pop(); -// if (o == null) -// switchSection.SwitchLabels.RemoveAt(i--); -// else -// switchSection.SwitchLabels[i] = o; -// } -// for (int i = 0; i < switchSection.Children.Count; i++) { -// INode o = switchSection.Children[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = nodeStack.Pop(); -// if (o == null) -// switchSection.Children.RemoveAt(i--); -// else -// switchSection.Children[i] = o; -// } -// return null; -// } -// -// public virtual object VisitSwitchStatement(SwitchStatement switchStatement, object data) { -// Debug.Assert((switchStatement != null)); -// Debug.Assert((switchStatement.SwitchExpression != null)); -// Debug.Assert((switchStatement.SwitchSections != null)); -// nodeStack.Push(switchStatement.SwitchExpression); -// switchStatement.SwitchExpression.AcceptVisitor(this, data); -// switchStatement.SwitchExpression = ((Expression)(nodeStack.Pop())); -// for (int i = 0; i < switchStatement.SwitchSections.Count; i++) { -// SwitchSection o = switchStatement.SwitchSections[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (SwitchSection)nodeStack.Pop(); -// if (o == null) -// switchStatement.SwitchSections.RemoveAt(i--); -// else -// switchStatement.SwitchSections[i] = o; -// } -// return null; -// } -// -// public virtual object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) { -// Debug.Assert((templateDefinition != null)); -// Debug.Assert((templateDefinition.Attributes != null)); -// Debug.Assert((templateDefinition.Bases != null)); -// for (int i = 0; i < templateDefinition.Attributes.Count; i++) { -// AttributeSection o = templateDefinition.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// templateDefinition.Attributes.RemoveAt(i--); -// else -// templateDefinition.Attributes[i] = o; -// } -// for (int i = 0; i < templateDefinition.Bases.Count; i++) { -// TypeReference o = templateDefinition.Bases[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TypeReference)nodeStack.Pop(); -// if (o == null) -// templateDefinition.Bases.RemoveAt(i--); -// else -// templateDefinition.Bases[i] = o; -// } -// return null; -// } -// -// public virtual object VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) { -// Debug.Assert((thisReferenceExpression != null)); -// return null; -// } -// -// public virtual object VisitThrowStatement(ThrowStatement throwStatement, object data) { -// Debug.Assert((throwStatement != null)); -// Debug.Assert((throwStatement.Expression != null)); -// nodeStack.Push(throwStatement.Expression); -// throwStatement.Expression.AcceptVisitor(this, data); -// throwStatement.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitTryCatchStatement(TryCatchStatement tryCatchStatement, object data) { -// Debug.Assert((tryCatchStatement != null)); -// Debug.Assert((tryCatchStatement.StatementBlock != null)); -// Debug.Assert((tryCatchStatement.CatchClauses != null)); -// Debug.Assert((tryCatchStatement.FinallyBlock != null)); -// nodeStack.Push(tryCatchStatement.StatementBlock); -// tryCatchStatement.StatementBlock.AcceptVisitor(this, data); -// tryCatchStatement.StatementBlock = ((Statement)(nodeStack.Pop())); -// for (int i = 0; i < tryCatchStatement.CatchClauses.Count; i++) { -// CatchClause o = tryCatchStatement.CatchClauses[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (CatchClause)nodeStack.Pop(); -// if (o == null) -// tryCatchStatement.CatchClauses.RemoveAt(i--); -// else -// tryCatchStatement.CatchClauses[i] = o; -// } -// nodeStack.Push(tryCatchStatement.FinallyBlock); -// tryCatchStatement.FinallyBlock.AcceptVisitor(this, data); -// tryCatchStatement.FinallyBlock = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) { -// Debug.Assert((typeDeclaration != null)); -// Debug.Assert((typeDeclaration.Attributes != null)); -// Debug.Assert((typeDeclaration.BaseTypes != null)); -// Debug.Assert((typeDeclaration.Templates != null)); -// for (int i = 0; i < typeDeclaration.Attributes.Count; i++) { -// AttributeSection o = typeDeclaration.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (AttributeSection)nodeStack.Pop(); -// if (o == null) -// typeDeclaration.Attributes.RemoveAt(i--); -// else -// typeDeclaration.Attributes[i] = o; -// } -// for (int i = 0; i < typeDeclaration.BaseTypes.Count; i++) { -// TypeReference o = typeDeclaration.BaseTypes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TypeReference)nodeStack.Pop(); -// if (o == null) -// typeDeclaration.BaseTypes.RemoveAt(i--); -// else -// typeDeclaration.BaseTypes[i] = o; -// } -// for (int i = 0; i < typeDeclaration.Templates.Count; i++) { -// TemplateDefinition o = typeDeclaration.Templates[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TemplateDefinition)nodeStack.Pop(); -// if (o == null) -// typeDeclaration.Templates.RemoveAt(i--); -// else -// typeDeclaration.Templates[i] = o; -// } -// for (int i = 0; i < typeDeclaration.Children.Count; i++) { -// INode o = typeDeclaration.Children[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = nodeStack.Pop(); -// if (o == null) -// typeDeclaration.Children.RemoveAt(i--); -// else -// typeDeclaration.Children[i] = o; -// } -// return null; -// } -// -// public virtual object VisitTypeOfExpression(TypeOfExpression typeOfExpression, object data) { -// Debug.Assert((typeOfExpression != null)); -// Debug.Assert((typeOfExpression.TypeReference != null)); -// nodeStack.Push(typeOfExpression.TypeReference); -// typeOfExpression.TypeReference.AcceptVisitor(this, data); -// typeOfExpression.TypeReference = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitTypeOfIsExpression(TypeOfIsExpression typeOfIsExpression, object data) { -// Debug.Assert((typeOfIsExpression != null)); -// Debug.Assert((typeOfIsExpression.Expression != null)); -// Debug.Assert((typeOfIsExpression.TypeReference != null)); -// nodeStack.Push(typeOfIsExpression.Expression); -// typeOfIsExpression.Expression.AcceptVisitor(this, data); -// typeOfIsExpression.Expression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(typeOfIsExpression.TypeReference); -// typeOfIsExpression.TypeReference.AcceptVisitor(this, data); -// typeOfIsExpression.TypeReference = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitTypeReference(TypeReference typeReference, object data) { -// Debug.Assert((typeReference != null)); -// Debug.Assert((typeReference.GenericTypes != null)); -// for (int i = 0; i < typeReference.GenericTypes.Count; i++) { -// TypeReference o = typeReference.GenericTypes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (TypeReference)nodeStack.Pop(); -// if (o == null) -// typeReference.GenericTypes.RemoveAt(i--); -// else -// typeReference.GenericTypes[i] = o; -// } -// return null; -// } -// -// public virtual object VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, object data) { -// Debug.Assert((typeReferenceExpression != null)); -// Debug.Assert((typeReferenceExpression.TypeReference != null)); -// nodeStack.Push(typeReferenceExpression.TypeReference); -// typeReferenceExpression.TypeReference.AcceptVisitor(this, data); -// typeReferenceExpression.TypeReference = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, object data) { -// Debug.Assert((unaryOperatorExpression != null)); -// Debug.Assert((unaryOperatorExpression.Expression != null)); -// nodeStack.Push(unaryOperatorExpression.Expression); -// unaryOperatorExpression.Expression.AcceptVisitor(this, data); -// unaryOperatorExpression.Expression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitUsing(ImportsClause @using, object data) { -// Debug.Assert((@using != null)); -// Debug.Assert((@using.Alias != null)); -// nodeStack.Push(@using.Alias); -// @using.Alias.AcceptVisitor(this, data); -// @using.Alias = ((TypeReference)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitUsingDeclaration(ImportsStatement usingDeclaration, object data) { -// Debug.Assert((usingDeclaration != null)); -// Debug.Assert((usingDeclaration.ImportsClauses != null)); -// for (int i = 0; i < usingDeclaration.ImportsClauses.Count; i++) { -// ImportsClause o = usingDeclaration.ImportsClauses[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (ImportsClause)nodeStack.Pop(); -// if (o == null) -// usingDeclaration.ImportsClauses.RemoveAt(i--); -// else -// usingDeclaration.ImportsClauses[i] = o; -// } -// return null; -// } -// -// public virtual object VisitUsingStatement(UsingStatement usingStatement, object data) { -// Debug.Assert((usingStatement != null)); -// Debug.Assert((usingStatement.ResourceAcquisition != null)); -// Debug.Assert((usingStatement.EmbeddedStatement != null)); -// nodeStack.Push(usingStatement.ResourceAcquisition); -// usingStatement.ResourceAcquisition.AcceptVisitor(this, data); -// usingStatement.ResourceAcquisition = ((Statement)(nodeStack.Pop())); -// nodeStack.Push(usingStatement.EmbeddedStatement); -// usingStatement.EmbeddedStatement.AcceptVisitor(this, data); -// usingStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitVariableDeclaration(VariableDeclaration variableDeclaration, object data) { -// Debug.Assert((variableDeclaration != null)); -// Debug.Assert((variableDeclaration.Initializer != null)); -// Debug.Assert((variableDeclaration.TypeReference != null)); -// Debug.Assert((variableDeclaration.FixedArrayInitialization != null)); -// nodeStack.Push(variableDeclaration.Initializer); -// variableDeclaration.Initializer.AcceptVisitor(this, data); -// variableDeclaration.Initializer = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(variableDeclaration.TypeReference); -// variableDeclaration.TypeReference.AcceptVisitor(this, data); -// variableDeclaration.TypeReference = ((TypeReference)(nodeStack.Pop())); -// nodeStack.Push(variableDeclaration.FixedArrayInitialization); -// variableDeclaration.FixedArrayInitialization.AcceptVisitor(this, data); -// variableDeclaration.FixedArrayInitialization = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitWithStatement(WithStatement withStatement, object data) { -// Debug.Assert((withStatement != null)); -// Debug.Assert((withStatement.Expression != null)); -// Debug.Assert((withStatement.Body != null)); -// nodeStack.Push(withStatement.Expression); -// withStatement.Expression.AcceptVisitor(this, data); -// withStatement.Expression = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(withStatement.Body); -// withStatement.Body.AcceptVisitor(this, data); -// withStatement.Body = ((BlockStatement)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitXmlAttributeExpression(XmlAttributeExpression xmlAttributeExpression, object data) { -// Debug.Assert((xmlAttributeExpression != null)); -// Debug.Assert((xmlAttributeExpression.ExpressionValue != null)); -// nodeStack.Push(xmlAttributeExpression.ExpressionValue); -// xmlAttributeExpression.ExpressionValue.AcceptVisitor(this, data); -// xmlAttributeExpression.ExpressionValue = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitXmlContentExpression(XmlContentExpression xmlContentExpression, object data) { -// Debug.Assert((xmlContentExpression != null)); -// return null; -// } -// -// public virtual object VisitXmlDocumentExpression(XmlDocumentExpression xmlDocumentExpression, object data) { -// Debug.Assert((xmlDocumentExpression != null)); -// Debug.Assert((xmlDocumentExpression.Expressions != null)); -// for (int i = 0; i < xmlDocumentExpression.Expressions.Count; i++) { -// XmlExpression o = xmlDocumentExpression.Expressions[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (XmlExpression)nodeStack.Pop(); -// if (o == null) -// xmlDocumentExpression.Expressions.RemoveAt(i--); -// else -// xmlDocumentExpression.Expressions[i] = o; -// } -// return null; -// } -// -// public virtual object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) { -// Debug.Assert((xmlElementExpression != null)); -// Debug.Assert((xmlElementExpression.Content != null)); -// Debug.Assert((xmlElementExpression.NameExpression != null)); -// Debug.Assert((xmlElementExpression.Attributes != null)); -// nodeStack.Push(xmlElementExpression.Content); -// xmlElementExpression.Content.AcceptVisitor(this, data); -// xmlElementExpression.Content = ((Expression)(nodeStack.Pop())); -// nodeStack.Push(xmlElementExpression.NameExpression); -// xmlElementExpression.NameExpression.AcceptVisitor(this, data); -// xmlElementExpression.NameExpression = ((Expression)(nodeStack.Pop())); -// for (int i = 0; i < xmlElementExpression.Attributes.Count; i++) { -// XmlExpression o = xmlElementExpression.Attributes[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = (XmlExpression)nodeStack.Pop(); -// if (o == null) -// xmlElementExpression.Attributes.RemoveAt(i--); -// else -// xmlElementExpression.Attributes[i] = o; -// } -// for (int i = 0; i < xmlElementExpression.Children.Count; i++) { -// INode o = xmlElementExpression.Children[i]; -// Debug.Assert(o != null); -// nodeStack.Push(o); -// o.AcceptVisitor(this, data); -// o = nodeStack.Pop(); -// if (o == null) -// xmlElementExpression.Children.RemoveAt(i--); -// else -// xmlElementExpression.Children[i] = o; -// } -// return null; -// } -// -// public virtual object VisitXmlEmbeddedExpression(XmlEmbeddedExpression xmlEmbeddedExpression, object data) { -// Debug.Assert((xmlEmbeddedExpression != null)); -// Debug.Assert((xmlEmbeddedExpression.InlineVBExpression != null)); -// nodeStack.Push(xmlEmbeddedExpression.InlineVBExpression); -// xmlEmbeddedExpression.InlineVBExpression.AcceptVisitor(this, data); -// xmlEmbeddedExpression.InlineVBExpression = ((Expression)(nodeStack.Pop())); -// return null; -// } -// -// public virtual object VisitXmlMemberAccessExpression(XmlMemberAccessExpression xmlMemberAccessExpression, object data) { -// Debug.Assert((xmlMemberAccessExpression != null)); -// Debug.Assert((xmlMemberAccessExpression.TargetObject != null)); -// nodeStack.Push(xmlMemberAccessExpression.TargetObject); -// xmlMemberAccessExpression.TargetObject.AcceptVisitor(this, data); -// xmlMemberAccessExpression.TargetObject = ((Expression)(nodeStack.Pop())); -// return null; -// } -// } -} diff --git a/ICSharpCode.NRefactory.VB/Visitors/AbstractAstVisitor.cs b/ICSharpCode.NRefactory.VB/Visitors/AbstractAstVisitor.cs deleted file mode 100644 index 6f44974418..0000000000 --- a/ICSharpCode.NRefactory.VB/Visitors/AbstractAstVisitor.cs +++ /dev/null @@ -1,1156 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ICSharpCode.NRefactory.VB.Visitors { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using ICSharpCode.NRefactory.VB.Ast; - - -// public abstract class AbstractAstVisitor : IAstVisitor { -// -// public virtual object VisitAddHandlerStatement(AddHandlerStatement addHandlerStatement, object data) { -// Debug.Assert((addHandlerStatement != null)); -// Debug.Assert((addHandlerStatement.EventExpression != null)); -// Debug.Assert((addHandlerStatement.HandlerExpression != null)); -// addHandlerStatement.EventExpression.AcceptVisitor(this, data); -// return addHandlerStatement.HandlerExpression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitAddressOfExpression(AddressOfExpression addressOfExpression, object data) { -// Debug.Assert((addressOfExpression != null)); -// Debug.Assert((addressOfExpression.Expression != null)); -// return addressOfExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) { -// Debug.Assert((arrayCreateExpression != null)); -// Debug.Assert((arrayCreateExpression.CreateType != null)); -// Debug.Assert((arrayCreateExpression.Arguments != null)); -// Debug.Assert((arrayCreateExpression.ArrayInitializer != null)); -// arrayCreateExpression.CreateType.AcceptVisitor(this, data); -// foreach (Expression o in arrayCreateExpression.Arguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return arrayCreateExpression.ArrayInitializer.AcceptVisitor(this, data); -// } -// -// public virtual object VisitAssignmentExpression(AssignmentExpression assignmentExpression, object data) { -// Debug.Assert((assignmentExpression != null)); -// Debug.Assert((assignmentExpression.Left != null)); -// Debug.Assert((assignmentExpression.Right != null)); -// assignmentExpression.Left.AcceptVisitor(this, data); -// return assignmentExpression.Right.AcceptVisitor(this, data); -// } -// -// public virtual object VisitAttribute(ICSharpCode.NRefactory.VB.Ast.Attribute attribute, object data) { -// Debug.Assert((attribute != null)); -// Debug.Assert((attribute.PositionalArguments != null)); -// Debug.Assert((attribute.NamedArguments != null)); -// foreach (Expression o in attribute.PositionalArguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (NamedArgumentExpression o in attribute.NamedArguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitAttributeSection(AttributeSection attributeSection, object data) { -// Debug.Assert((attributeSection != null)); -// Debug.Assert((attributeSection.Attributes != null)); -// foreach (ICSharpCode.NRefactory.VB.Ast.Attribute o in attributeSection.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression, object data) { -// Debug.Assert((baseReferenceExpression != null)); -// return null; -// } -// -// public virtual object VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression, object data) { -// Debug.Assert((binaryOperatorExpression != null)); -// Debug.Assert((binaryOperatorExpression.Left != null)); -// Debug.Assert((binaryOperatorExpression.Right != null)); -// binaryOperatorExpression.Left.AcceptVisitor(this, data); -// return binaryOperatorExpression.Right.AcceptVisitor(this, data); -// } -// -// public virtual object VisitBlockStatement(BlockStatement blockStatement, object data) { -// Debug.Assert((blockStatement != null)); -// return blockStatement.AcceptChildren(this, data); -// } -// -// public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) { -// Debug.Assert((caseLabel != null)); -// Debug.Assert((caseLabel.Label != null)); -// Debug.Assert((caseLabel.ToExpression != null)); -// caseLabel.Label.AcceptVisitor(this, data); -// return caseLabel.ToExpression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitCastExpression(CastExpression castExpression, object data) { -// Debug.Assert((castExpression != null)); -// Debug.Assert((castExpression.CastTo != null)); -// Debug.Assert((castExpression.Expression != null)); -// castExpression.CastTo.AcceptVisitor(this, data); -// return castExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitCatchClause(CatchClause catchClause, object data) { -// Debug.Assert((catchClause != null)); -// Debug.Assert((catchClause.TypeReference != null)); -// Debug.Assert((catchClause.StatementBlock != null)); -// Debug.Assert((catchClause.Condition != null)); -// catchClause.TypeReference.AcceptVisitor(this, data); -// catchClause.StatementBlock.AcceptVisitor(this, data); -// return catchClause.Condition.AcceptVisitor(this, data); -// } -// -// public virtual object VisitClassReferenceExpression(ClassReferenceExpression classReferenceExpression, object data) { -// Debug.Assert((classReferenceExpression != null)); -// return null; -// } -// -// public virtual object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) { -// Debug.Assert((collectionInitializerExpression != null)); -// Debug.Assert((collectionInitializerExpression.CreateExpressions != null)); -// foreach (Expression o in collectionInitializerExpression.CreateExpressions) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitCollectionRangeVariable(CollectionRangeVariable collectionRangeVariable, object data) { -// Debug.Assert((collectionRangeVariable != null)); -// Debug.Assert((collectionRangeVariable.Expression != null)); -// Debug.Assert((collectionRangeVariable.Type != null)); -// collectionRangeVariable.Expression.AcceptVisitor(this, data); -// return collectionRangeVariable.Type.AcceptVisitor(this, data); -// } -// -// public virtual object VisitCompilationUnit(CompilationUnit compilationUnit, object data) { -// Debug.Assert((compilationUnit != null)); -// return compilationUnit.AcceptChildren(this, data); -// } -// -// public virtual object VisitConditionalExpression(ConditionalExpression conditionalExpression, object data) { -// Debug.Assert((conditionalExpression != null)); -// Debug.Assert((conditionalExpression.Condition != null)); -// Debug.Assert((conditionalExpression.TrueExpression != null)); -// Debug.Assert((conditionalExpression.FalseExpression != null)); -// conditionalExpression.Condition.AcceptVisitor(this, data); -// conditionalExpression.TrueExpression.AcceptVisitor(this, data); -// return conditionalExpression.FalseExpression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, object data) { -// Debug.Assert((constructorDeclaration != null)); -// Debug.Assert((constructorDeclaration.Attributes != null)); -// Debug.Assert((constructorDeclaration.Parameters != null)); -// Debug.Assert((constructorDeclaration.ConstructorInitializer != null)); -// Debug.Assert((constructorDeclaration.Body != null)); -// foreach (AttributeSection o in constructorDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ParameterDeclarationExpression o in constructorDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// constructorDeclaration.ConstructorInitializer.AcceptVisitor(this, data); -// return constructorDeclaration.Body.AcceptVisitor(this, data); -// } -// -// public virtual object VisitConstructorInitializer(ConstructorInitializer constructorInitializer, object data) { -// Debug.Assert((constructorInitializer != null)); -// Debug.Assert((constructorInitializer.Arguments != null)); -// foreach (Expression o in constructorInitializer.Arguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitContinueStatement(ContinueStatement continueStatement, object data) { -// Debug.Assert((continueStatement != null)); -// return null; -// } -// -// public virtual object VisitDeclareDeclaration(DeclareDeclaration declareDeclaration, object data) { -// Debug.Assert((declareDeclaration != null)); -// Debug.Assert((declareDeclaration.Attributes != null)); -// Debug.Assert((declareDeclaration.Parameters != null)); -// Debug.Assert((declareDeclaration.TypeReference != null)); -// foreach (AttributeSection o in declareDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ParameterDeclarationExpression o in declareDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return declareDeclaration.TypeReference.AcceptVisitor(this, data); -// } -// -// public virtual object VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression, object data) { -// Debug.Assert((defaultValueExpression != null)); -// Debug.Assert((defaultValueExpression.TypeReference != null)); -// return defaultValueExpression.TypeReference.AcceptVisitor(this, data); -// } -// -// public virtual object VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data) { -// Debug.Assert((delegateDeclaration != null)); -// Debug.Assert((delegateDeclaration.Attributes != null)); -// Debug.Assert((delegateDeclaration.ReturnType != null)); -// Debug.Assert((delegateDeclaration.Parameters != null)); -// Debug.Assert((delegateDeclaration.Templates != null)); -// foreach (AttributeSection o in delegateDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// delegateDeclaration.ReturnType.AcceptVisitor(this, data); -// foreach (ParameterDeclarationExpression o in delegateDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (TemplateDefinition o in delegateDeclaration.Templates) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitDirectionExpression(DirectionExpression directionExpression, object data) { -// Debug.Assert((directionExpression != null)); -// Debug.Assert((directionExpression.Expression != null)); -// return directionExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitDoLoopStatement(DoLoopStatement doLoopStatement, object data) { -// Debug.Assert((doLoopStatement != null)); -// Debug.Assert((doLoopStatement.Condition != null)); -// Debug.Assert((doLoopStatement.EmbeddedStatement != null)); -// doLoopStatement.Condition.AcceptVisitor(this, data); -// return doLoopStatement.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitElseIfSection(ElseIfSection elseIfSection, object data) { -// Debug.Assert((elseIfSection != null)); -// Debug.Assert((elseIfSection.Condition != null)); -// Debug.Assert((elseIfSection.EmbeddedStatement != null)); -// elseIfSection.Condition.AcceptVisitor(this, data); -// return elseIfSection.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitEndStatement(EndStatement endStatement, object data) { -// Debug.Assert((endStatement != null)); -// return null; -// } -// -// public virtual object VisitEraseStatement(EraseStatement eraseStatement, object data) { -// Debug.Assert((eraseStatement != null)); -// Debug.Assert((eraseStatement.Expressions != null)); -// foreach (Expression o in eraseStatement.Expressions) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitErrorStatement(ErrorStatement errorStatement, object data) { -// Debug.Assert((errorStatement != null)); -// Debug.Assert((errorStatement.Expression != null)); -// return errorStatement.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) { -// Debug.Assert((eventAddRegion != null)); -// Debug.Assert((eventAddRegion.Attributes != null)); -// Debug.Assert((eventAddRegion.Block != null)); -// Debug.Assert((eventAddRegion.Parameters != null)); -// foreach (AttributeSection o in eventAddRegion.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// eventAddRegion.Block.AcceptVisitor(this, data); -// foreach (ParameterDeclarationExpression o in eventAddRegion.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitEventDeclaration(EventDeclaration eventDeclaration, object data) { -// Debug.Assert((eventDeclaration != null)); -// Debug.Assert((eventDeclaration.Attributes != null)); -// Debug.Assert((eventDeclaration.Parameters != null)); -// Debug.Assert((eventDeclaration.InterfaceImplementations != null)); -// Debug.Assert((eventDeclaration.TypeReference != null)); -// Debug.Assert((eventDeclaration.AddRegion != null)); -// Debug.Assert((eventDeclaration.RemoveRegion != null)); -// Debug.Assert((eventDeclaration.RaiseRegion != null)); -// Debug.Assert((eventDeclaration.Initializer != null)); -// foreach (AttributeSection o in eventDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ParameterDeclarationExpression o in eventDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (InterfaceImplementation o in eventDeclaration.InterfaceImplementations) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// eventDeclaration.TypeReference.AcceptVisitor(this, data); -// eventDeclaration.AddRegion.AcceptVisitor(this, data); -// eventDeclaration.RemoveRegion.AcceptVisitor(this, data); -// eventDeclaration.RaiseRegion.AcceptVisitor(this, data); -// return eventDeclaration.Initializer.AcceptVisitor(this, data); -// } -// -// public virtual object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) { -// Debug.Assert((eventRaiseRegion != null)); -// Debug.Assert((eventRaiseRegion.Attributes != null)); -// Debug.Assert((eventRaiseRegion.Block != null)); -// Debug.Assert((eventRaiseRegion.Parameters != null)); -// foreach (AttributeSection o in eventRaiseRegion.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// eventRaiseRegion.Block.AcceptVisitor(this, data); -// foreach (ParameterDeclarationExpression o in eventRaiseRegion.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitEventRemoveRegion(EventRemoveRegion eventRemoveRegion, object data) { -// Debug.Assert((eventRemoveRegion != null)); -// Debug.Assert((eventRemoveRegion.Attributes != null)); -// Debug.Assert((eventRemoveRegion.Block != null)); -// Debug.Assert((eventRemoveRegion.Parameters != null)); -// foreach (AttributeSection o in eventRemoveRegion.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// eventRemoveRegion.Block.AcceptVisitor(this, data); -// foreach (ParameterDeclarationExpression o in eventRemoveRegion.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitExitStatement(ExitStatement exitStatement, object data) { -// Debug.Assert((exitStatement != null)); -// return null; -// } -// -// public virtual object VisitExpressionRangeVariable(ExpressionRangeVariable expressionRangeVariable, object data) { -// Debug.Assert((expressionRangeVariable != null)); -// Debug.Assert((expressionRangeVariable.Expression != null)); -// Debug.Assert((expressionRangeVariable.Type != null)); -// expressionRangeVariable.Expression.AcceptVisitor(this, data); -// return expressionRangeVariable.Type.AcceptVisitor(this, data); -// } -// -// public virtual object VisitExpressionStatement(ExpressionStatement expressionStatement, object data) { -// Debug.Assert((expressionStatement != null)); -// Debug.Assert((expressionStatement.Expression != null)); -// return expressionStatement.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitExternAliasDirective(ExternAliasDirective externAliasDirective, object data) { -// Debug.Assert((externAliasDirective != null)); -// return null; -// } -// -// public virtual object VisitFieldDeclaration(FieldDeclaration fieldDeclaration, object data) { -// Debug.Assert((fieldDeclaration != null)); -// Debug.Assert((fieldDeclaration.Attributes != null)); -// Debug.Assert((fieldDeclaration.TypeReference != null)); -// Debug.Assert((fieldDeclaration.Fields != null)); -// foreach (AttributeSection o in fieldDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// fieldDeclaration.TypeReference.AcceptVisitor(this, data); -// foreach (VariableDeclaration o in fieldDeclaration.Fields) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitForeachStatement(ForeachStatement foreachStatement, object data) { -// Debug.Assert((foreachStatement != null)); -// Debug.Assert((foreachStatement.TypeReference != null)); -// Debug.Assert((foreachStatement.Expression != null)); -// Debug.Assert((foreachStatement.NextExpression != null)); -// Debug.Assert((foreachStatement.EmbeddedStatement != null)); -// foreachStatement.TypeReference.AcceptVisitor(this, data); -// foreachStatement.Expression.AcceptVisitor(this, data); -// foreachStatement.NextExpression.AcceptVisitor(this, data); -// return foreachStatement.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitForNextStatement(ForNextStatement forNextStatement, object data) { -// Debug.Assert((forNextStatement != null)); -// Debug.Assert((forNextStatement.Start != null)); -// Debug.Assert((forNextStatement.End != null)); -// Debug.Assert((forNextStatement.Step != null)); -// Debug.Assert((forNextStatement.NextExpressions != null)); -// Debug.Assert((forNextStatement.TypeReference != null)); -// Debug.Assert((forNextStatement.LoopVariableExpression != null)); -// Debug.Assert((forNextStatement.EmbeddedStatement != null)); -// forNextStatement.Start.AcceptVisitor(this, data); -// forNextStatement.End.AcceptVisitor(this, data); -// forNextStatement.Step.AcceptVisitor(this, data); -// foreach (Expression o in forNextStatement.NextExpressions) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// forNextStatement.TypeReference.AcceptVisitor(this, data); -// forNextStatement.LoopVariableExpression.AcceptVisitor(this, data); -// return forNextStatement.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitGotoStatement(GotoStatement gotoStatement, object data) { -// Debug.Assert((gotoStatement != null)); -// return null; -// } -// -// public virtual object VisitIdentifierExpression(SimpleNameExpression identifierExpression, object data) { -// Debug.Assert((identifierExpression != null)); -// Debug.Assert((identifierExpression.TypeArguments != null)); -// foreach (TypeReference o in identifierExpression.TypeArguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitIfElseStatement(IfElseStatement ifElseStatement, object data) { -// Debug.Assert((ifElseStatement != null)); -// Debug.Assert((ifElseStatement.Condition != null)); -// Debug.Assert((ifElseStatement.TrueStatement != null)); -// Debug.Assert((ifElseStatement.FalseStatement != null)); -// Debug.Assert((ifElseStatement.ElseIfSections != null)); -// ifElseStatement.Condition.AcceptVisitor(this, data); -// foreach (Statement o in ifElseStatement.TrueStatement) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (Statement o in ifElseStatement.FalseStatement) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ElseIfSection o in ifElseStatement.ElseIfSections) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) { -// Debug.Assert((innerClassTypeReference != null)); -// Debug.Assert((innerClassTypeReference.GenericTypes != null)); -// Debug.Assert((innerClassTypeReference.BaseType != null)); -// foreach (TypeReference o in innerClassTypeReference.GenericTypes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return innerClassTypeReference.BaseType.AcceptVisitor(this, data); -// } -// -// public virtual object VisitInterfaceImplementation(InterfaceImplementation interfaceImplementation, object data) { -// Debug.Assert((interfaceImplementation != null)); -// Debug.Assert((interfaceImplementation.InterfaceType != null)); -// return interfaceImplementation.InterfaceType.AcceptVisitor(this, data); -// } -// -// public virtual object VisitInvocationExpression(InvocationExpression invocationExpression, object data) { -// Debug.Assert((invocationExpression != null)); -// Debug.Assert((invocationExpression.TargetObject != null)); -// Debug.Assert((invocationExpression.Arguments != null)); -// invocationExpression.TargetObject.AcceptVisitor(this, data); -// foreach (Expression o in invocationExpression.Arguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitLabelStatement(LabelStatement labelStatement, object data) { -// Debug.Assert((labelStatement != null)); -// return null; -// } -// -// public virtual object VisitLambdaExpression(LambdaExpression lambdaExpression, object data) { -// Debug.Assert((lambdaExpression != null)); -// Debug.Assert((lambdaExpression.Parameters != null)); -// Debug.Assert((lambdaExpression.StatementBody != null)); -// Debug.Assert((lambdaExpression.ExpressionBody != null)); -// Debug.Assert((lambdaExpression.ReturnType != null)); -// foreach (ParameterDeclarationExpression o in lambdaExpression.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// lambdaExpression.StatementBody.AcceptVisitor(this, data); -// lambdaExpression.ExpressionBody.AcceptVisitor(this, data); -// return lambdaExpression.ReturnType.AcceptVisitor(this, data); -// } -// -// public virtual object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) { -// Debug.Assert((localVariableDeclaration != null)); -// Debug.Assert((localVariableDeclaration.TypeReference != null)); -// Debug.Assert((localVariableDeclaration.Variables != null)); -// localVariableDeclaration.TypeReference.AcceptVisitor(this, data); -// foreach (VariableDeclaration o in localVariableDeclaration.Variables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitLockStatement(LockStatement lockStatement, object data) { -// Debug.Assert((lockStatement != null)); -// Debug.Assert((lockStatement.LockExpression != null)); -// Debug.Assert((lockStatement.EmbeddedStatement != null)); -// lockStatement.LockExpression.AcceptVisitor(this, data); -// return lockStatement.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) { -// Debug.Assert((memberInitializerExpression != null)); -// Debug.Assert((memberInitializerExpression.Expression != null)); -// return memberInitializerExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression, object data) { -// Debug.Assert((memberReferenceExpression != null)); -// Debug.Assert((memberReferenceExpression.TargetObject != null)); -// Debug.Assert((memberReferenceExpression.TypeArguments != null)); -// memberReferenceExpression.TargetObject.AcceptVisitor(this, data); -// foreach (TypeReference o in memberReferenceExpression.TypeArguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) { -// Debug.Assert((methodDeclaration != null)); -// Debug.Assert((methodDeclaration.Attributes != null)); -// Debug.Assert((methodDeclaration.Parameters != null)); -// Debug.Assert((methodDeclaration.InterfaceImplementations != null)); -// Debug.Assert((methodDeclaration.TypeReference != null)); -// Debug.Assert((methodDeclaration.Body != null)); -// Debug.Assert((methodDeclaration.Templates != null)); -// foreach (AttributeSection o in methodDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ParameterDeclarationExpression o in methodDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (InterfaceImplementation o in methodDeclaration.InterfaceImplementations) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// methodDeclaration.TypeReference.AcceptVisitor(this, data); -// methodDeclaration.Body.AcceptVisitor(this, data); -// foreach (TemplateDefinition o in methodDeclaration.Templates) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data) { -// Debug.Assert((namedArgumentExpression != null)); -// Debug.Assert((namedArgumentExpression.Expression != null)); -// return namedArgumentExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data) { -// Debug.Assert((namespaceDeclaration != null)); -// return namespaceDeclaration.AcceptChildren(this, data); -// } -// -// public virtual object VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, object data) { -// Debug.Assert((objectCreateExpression != null)); -// Debug.Assert((objectCreateExpression.CreateType != null)); -// Debug.Assert((objectCreateExpression.Parameters != null)); -// Debug.Assert((objectCreateExpression.ObjectInitializer != null)); -// objectCreateExpression.CreateType.AcceptVisitor(this, data); -// foreach (Expression o in objectCreateExpression.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return objectCreateExpression.ObjectInitializer.AcceptVisitor(this, data); -// } -// -// public virtual object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) { -// Debug.Assert((onErrorStatement != null)); -// Debug.Assert((onErrorStatement.EmbeddedStatement != null)); -// return onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration, object data) { -// Debug.Assert((operatorDeclaration != null)); -// Debug.Assert((operatorDeclaration.Attributes != null)); -// Debug.Assert((operatorDeclaration.Parameters != null)); -// Debug.Assert((operatorDeclaration.InterfaceImplementations != null)); -// Debug.Assert((operatorDeclaration.TypeReference != null)); -// Debug.Assert((operatorDeclaration.Body != null)); -// Debug.Assert((operatorDeclaration.Templates != null)); -// foreach (AttributeSection o in operatorDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ParameterDeclarationExpression o in operatorDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (InterfaceImplementation o in operatorDeclaration.InterfaceImplementations) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// operatorDeclaration.TypeReference.AcceptVisitor(this, data); -// operatorDeclaration.Body.AcceptVisitor(this, data); -// foreach (TemplateDefinition o in operatorDeclaration.Templates) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitOptionDeclaration(OptionDeclaration optionDeclaration, object data) { -// Debug.Assert((optionDeclaration != null)); -// return null; -// } -// -// public virtual object VisitParameterDeclarationExpression(ParameterDeclarationExpression parameterDeclarationExpression, object data) { -// Debug.Assert((parameterDeclarationExpression != null)); -// Debug.Assert((parameterDeclarationExpression.Attributes != null)); -// Debug.Assert((parameterDeclarationExpression.TypeReference != null)); -// Debug.Assert((parameterDeclarationExpression.DefaultValue != null)); -// foreach (AttributeSection o in parameterDeclarationExpression.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// parameterDeclarationExpression.TypeReference.AcceptVisitor(this, data); -// return parameterDeclarationExpression.DefaultValue.AcceptVisitor(this, data); -// } -// -// public virtual object VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) { -// Debug.Assert((parenthesizedExpression != null)); -// Debug.Assert((parenthesizedExpression.Expression != null)); -// return parenthesizedExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, object data) { -// Debug.Assert((primitiveExpression != null)); -// return null; -// } -// -// public virtual object VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data) { -// Debug.Assert((propertyDeclaration != null)); -// Debug.Assert((propertyDeclaration.Attributes != null)); -// Debug.Assert((propertyDeclaration.Parameters != null)); -// Debug.Assert((propertyDeclaration.InterfaceImplementations != null)); -// Debug.Assert((propertyDeclaration.TypeReference != null)); -// Debug.Assert((propertyDeclaration.GetRegion != null)); -// Debug.Assert((propertyDeclaration.SetRegion != null)); -// Debug.Assert((propertyDeclaration.Initializer != null)); -// foreach (AttributeSection o in propertyDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ParameterDeclarationExpression o in propertyDeclaration.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (InterfaceImplementation o in propertyDeclaration.InterfaceImplementations) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// propertyDeclaration.TypeReference.AcceptVisitor(this, data); -// propertyDeclaration.GetRegion.AcceptVisitor(this, data); -// propertyDeclaration.SetRegion.AcceptVisitor(this, data); -// return propertyDeclaration.Initializer.AcceptVisitor(this, data); -// } -// -// public virtual object VisitPropertyGetRegion(PropertyGetRegion propertyGetRegion, object data) { -// Debug.Assert((propertyGetRegion != null)); -// Debug.Assert((propertyGetRegion.Attributes != null)); -// Debug.Assert((propertyGetRegion.Block != null)); -// foreach (AttributeSection o in propertyGetRegion.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return propertyGetRegion.Block.AcceptVisitor(this, data); -// } -// -// public virtual object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) { -// Debug.Assert((propertySetRegion != null)); -// Debug.Assert((propertySetRegion.Attributes != null)); -// Debug.Assert((propertySetRegion.Block != null)); -// Debug.Assert((propertySetRegion.Parameters != null)); -// foreach (AttributeSection o in propertySetRegion.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// propertySetRegion.Block.AcceptVisitor(this, data); -// foreach (ParameterDeclarationExpression o in propertySetRegion.Parameters) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpression(QueryExpression queryExpression, object data) { -// Debug.Assert((queryExpression != null)); -// Debug.Assert((queryExpression.Clauses != null)); -// foreach (QueryExpressionClause o in queryExpression.Clauses) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionAggregateClause(QueryExpressionAggregateClause queryExpressionAggregateClause, object data) { -// Debug.Assert((queryExpressionAggregateClause != null)); -// Debug.Assert((queryExpressionAggregateClause.Source != null)); -// Debug.Assert((queryExpressionAggregateClause.MiddleClauses != null)); -// Debug.Assert((queryExpressionAggregateClause.IntoVariables != null)); -// queryExpressionAggregateClause.Source.AcceptVisitor(this, data); -// foreach (QueryExpressionClause o in queryExpressionAggregateClause.MiddleClauses) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ExpressionRangeVariable o in queryExpressionAggregateClause.IntoVariables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionDistinctClause(QueryExpressionDistinctClause queryExpressionDistinctClause, object data) { -// Debug.Assert((queryExpressionDistinctClause != null)); -// return null; -// } -// -// public virtual object VisitQueryExpressionFromClause(QueryExpressionFromClause queryExpressionFromClause, object data) { -// Debug.Assert((queryExpressionFromClause != null)); -// Debug.Assert((queryExpressionFromClause.Sources != null)); -// foreach (CollectionRangeVariable o in queryExpressionFromClause.Sources) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionGroupClause(QueryExpressionGroupClause queryExpressionGroupClause, object data) { -// Debug.Assert((queryExpressionGroupClause != null)); -// Debug.Assert((queryExpressionGroupClause.Projection != null)); -// Debug.Assert((queryExpressionGroupClause.GroupBy != null)); -// queryExpressionGroupClause.Projection.AcceptVisitor(this, data); -// return queryExpressionGroupClause.GroupBy.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionGroupJoinVBClause(QueryExpressionGroupJoinVBClause queryExpressionGroupJoinVBClause, object data) { -// Debug.Assert((queryExpressionGroupJoinVBClause != null)); -// Debug.Assert((queryExpressionGroupJoinVBClause.JoinClause != null)); -// Debug.Assert((queryExpressionGroupJoinVBClause.IntoVariables != null)); -// queryExpressionGroupJoinVBClause.JoinClause.AcceptVisitor(this, data); -// foreach (ExpressionRangeVariable o in queryExpressionGroupJoinVBClause.IntoVariables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionGroupVBClause(QueryExpressionGroupVBClause queryExpressionGroupVBClause, object data) { -// Debug.Assert((queryExpressionGroupVBClause != null)); -// Debug.Assert((queryExpressionGroupVBClause.GroupVariables != null)); -// Debug.Assert((queryExpressionGroupVBClause.ByVariables != null)); -// Debug.Assert((queryExpressionGroupVBClause.IntoVariables != null)); -// foreach (ExpressionRangeVariable o in queryExpressionGroupVBClause.GroupVariables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ExpressionRangeVariable o in queryExpressionGroupVBClause.ByVariables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (ExpressionRangeVariable o in queryExpressionGroupVBClause.IntoVariables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionJoinClause(QueryExpressionJoinClause queryExpressionJoinClause, object data) { -// Debug.Assert((queryExpressionJoinClause != null)); -// Debug.Assert((queryExpressionJoinClause.OnExpression != null)); -// Debug.Assert((queryExpressionJoinClause.EqualsExpression != null)); -// Debug.Assert((queryExpressionJoinClause.Source != null)); -// queryExpressionJoinClause.OnExpression.AcceptVisitor(this, data); -// queryExpressionJoinClause.EqualsExpression.AcceptVisitor(this, data); -// return queryExpressionJoinClause.Source.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionJoinConditionVB(QueryExpressionJoinConditionVB queryExpressionJoinConditionVB, object data) { -// Debug.Assert((queryExpressionJoinConditionVB != null)); -// Debug.Assert((queryExpressionJoinConditionVB.LeftSide != null)); -// Debug.Assert((queryExpressionJoinConditionVB.RightSide != null)); -// queryExpressionJoinConditionVB.LeftSide.AcceptVisitor(this, data); -// return queryExpressionJoinConditionVB.RightSide.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionJoinVBClause(QueryExpressionJoinVBClause queryExpressionJoinVBClause, object data) { -// Debug.Assert((queryExpressionJoinVBClause != null)); -// Debug.Assert((queryExpressionJoinVBClause.JoinVariable != null)); -// Debug.Assert((queryExpressionJoinVBClause.SubJoin != null)); -// Debug.Assert((queryExpressionJoinVBClause.Conditions != null)); -// queryExpressionJoinVBClause.JoinVariable.AcceptVisitor(this, data); -// queryExpressionJoinVBClause.SubJoin.AcceptVisitor(this, data); -// foreach (QueryExpressionJoinConditionVB o in queryExpressionJoinVBClause.Conditions) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionLetClause(QueryExpressionLetClause queryExpressionLetClause, object data) { -// Debug.Assert((queryExpressionLetClause != null)); -// Debug.Assert((queryExpressionLetClause.Expression != null)); -// return queryExpressionLetClause.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionLetVBClause(QueryExpressionLetClause queryExpressionLetVBClause, object data) { -// Debug.Assert((queryExpressionLetVBClause != null)); -// Debug.Assert((queryExpressionLetVBClause.Variables != null)); -// foreach (ExpressionRangeVariable o in queryExpressionLetVBClause.Variables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionOrderClause(QueryExpressionOrderClause queryExpressionOrderClause, object data) { -// Debug.Assert((queryExpressionOrderClause != null)); -// Debug.Assert((queryExpressionOrderClause.Orderings != null)); -// foreach (QueryExpressionOrdering o in queryExpressionOrderClause.Orderings) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionOrdering(QueryExpressionOrdering queryExpressionOrdering, object data) { -// Debug.Assert((queryExpressionOrdering != null)); -// Debug.Assert((queryExpressionOrdering.Criteria != null)); -// return queryExpressionOrdering.Criteria.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionPartitionVBClause(QueryExpressionPartitionVBClause queryExpressionPartitionVBClause, object data) { -// Debug.Assert((queryExpressionPartitionVBClause != null)); -// Debug.Assert((queryExpressionPartitionVBClause.Expression != null)); -// return queryExpressionPartitionVBClause.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionSelectClause(QueryExpressionSelectClause queryExpressionSelectClause, object data) { -// Debug.Assert((queryExpressionSelectClause != null)); -// Debug.Assert((queryExpressionSelectClause.Projection != null)); -// return queryExpressionSelectClause.Projection.AcceptVisitor(this, data); -// } -// -// public virtual object VisitQueryExpressionSelectVBClause(QueryExpressionSelectVBClause queryExpressionSelectVBClause, object data) { -// Debug.Assert((queryExpressionSelectVBClause != null)); -// Debug.Assert((queryExpressionSelectVBClause.Variables != null)); -// foreach (ExpressionRangeVariable o in queryExpressionSelectVBClause.Variables) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitQueryExpressionWhereClause(QueryExpressionWhereClause queryExpressionWhereClause, object data) { -// Debug.Assert((queryExpressionWhereClause != null)); -// Debug.Assert((queryExpressionWhereClause.Condition != null)); -// return queryExpressionWhereClause.Condition.AcceptVisitor(this, data); -// } -// -// public virtual object VisitRaiseEventStatement(RaiseEventStatement raiseEventStatement, object data) { -// Debug.Assert((raiseEventStatement != null)); -// Debug.Assert((raiseEventStatement.Arguments != null)); -// foreach (Expression o in raiseEventStatement.Arguments) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitReDimStatement(ReDimStatement reDimStatement, object data) { -// Debug.Assert((reDimStatement != null)); -// Debug.Assert((reDimStatement.ReDimClauses != null)); -// foreach (InvocationExpression o in reDimStatement.ReDimClauses) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitRemoveHandlerStatement(RemoveHandlerStatement removeHandlerStatement, object data) { -// Debug.Assert((removeHandlerStatement != null)); -// Debug.Assert((removeHandlerStatement.EventExpression != null)); -// Debug.Assert((removeHandlerStatement.HandlerExpression != null)); -// removeHandlerStatement.EventExpression.AcceptVisitor(this, data); -// return removeHandlerStatement.HandlerExpression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitResumeStatement(ResumeStatement resumeStatement, object data) { -// Debug.Assert((resumeStatement != null)); -// return null; -// } -// -// public virtual object VisitReturnStatement(ReturnStatement returnStatement, object data) { -// Debug.Assert((returnStatement != null)); -// Debug.Assert((returnStatement.Expression != null)); -// return returnStatement.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitStopStatement(StopStatement stopStatement, object data) { -// Debug.Assert((stopStatement != null)); -// return null; -// } -// -// public virtual object VisitSwitchSection(SwitchSection switchSection, object data) { -// Debug.Assert((switchSection != null)); -// Debug.Assert((switchSection.SwitchLabels != null)); -// foreach (CaseLabel o in switchSection.SwitchLabels) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return switchSection.AcceptChildren(this, data); -// } -// -// public virtual object VisitSwitchStatement(SwitchStatement switchStatement, object data) { -// Debug.Assert((switchStatement != null)); -// Debug.Assert((switchStatement.SwitchExpression != null)); -// Debug.Assert((switchStatement.SwitchSections != null)); -// switchStatement.SwitchExpression.AcceptVisitor(this, data); -// foreach (SwitchSection o in switchStatement.SwitchSections) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) { -// Debug.Assert((templateDefinition != null)); -// Debug.Assert((templateDefinition.Attributes != null)); -// Debug.Assert((templateDefinition.Bases != null)); -// foreach (AttributeSection o in templateDefinition.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (TypeReference o in templateDefinition.Bases) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) { -// Debug.Assert((thisReferenceExpression != null)); -// return null; -// } -// -// public virtual object VisitThrowStatement(ThrowStatement throwStatement, object data) { -// Debug.Assert((throwStatement != null)); -// Debug.Assert((throwStatement.Expression != null)); -// return throwStatement.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitTryCatchStatement(TryCatchStatement tryCatchStatement, object data) { -// Debug.Assert((tryCatchStatement != null)); -// Debug.Assert((tryCatchStatement.StatementBlock != null)); -// Debug.Assert((tryCatchStatement.CatchClauses != null)); -// Debug.Assert((tryCatchStatement.FinallyBlock != null)); -// tryCatchStatement.StatementBlock.AcceptVisitor(this, data); -// foreach (CatchClause o in tryCatchStatement.CatchClauses) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return tryCatchStatement.FinallyBlock.AcceptVisitor(this, data); -// } -// -// public virtual object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) { -// Debug.Assert((typeDeclaration != null)); -// Debug.Assert((typeDeclaration.Attributes != null)); -// Debug.Assert((typeDeclaration.BaseTypes != null)); -// Debug.Assert((typeDeclaration.Templates != null)); -// foreach (AttributeSection o in typeDeclaration.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (TypeReference o in typeDeclaration.BaseTypes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// foreach (TemplateDefinition o in typeDeclaration.Templates) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return typeDeclaration.AcceptChildren(this, data); -// } -// -// public virtual object VisitTypeOfExpression(TypeOfExpression typeOfExpression, object data) { -// Debug.Assert((typeOfExpression != null)); -// Debug.Assert((typeOfExpression.TypeReference != null)); -// return typeOfExpression.TypeReference.AcceptVisitor(this, data); -// } -// -// public virtual object VisitTypeOfIsExpression(TypeOfIsExpression typeOfIsExpression, object data) { -// Debug.Assert((typeOfIsExpression != null)); -// Debug.Assert((typeOfIsExpression.Expression != null)); -// Debug.Assert((typeOfIsExpression.TypeReference != null)); -// typeOfIsExpression.Expression.AcceptVisitor(this, data); -// return typeOfIsExpression.TypeReference.AcceptVisitor(this, data); -// } -// -// public virtual object VisitTypeReference(TypeReference typeReference, object data) { -// Debug.Assert((typeReference != null)); -// Debug.Assert((typeReference.GenericTypes != null)); -// foreach (TypeReference o in typeReference.GenericTypes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, object data) { -// Debug.Assert((typeReferenceExpression != null)); -// Debug.Assert((typeReferenceExpression.TypeReference != null)); -// return typeReferenceExpression.TypeReference.AcceptVisitor(this, data); -// } -// -// public virtual object VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, object data) { -// Debug.Assert((unaryOperatorExpression != null)); -// Debug.Assert((unaryOperatorExpression.Expression != null)); -// return unaryOperatorExpression.Expression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitUsing(ImportsClause @using, object data) { -// Debug.Assert((@using != null)); -// Debug.Assert((@using.Alias != null)); -// return @using.Alias.AcceptVisitor(this, data); -// } -// -// public virtual object VisitUsingDeclaration(ImportsStatement usingDeclaration, object data) { -// Debug.Assert((usingDeclaration != null)); -// Debug.Assert((usingDeclaration.ImportsClauses != null)); -// foreach (ImportsClause o in usingDeclaration.ImportsClauses) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitUsingStatement(UsingStatement usingStatement, object data) { -// Debug.Assert((usingStatement != null)); -// Debug.Assert((usingStatement.ResourceAcquisition != null)); -// Debug.Assert((usingStatement.EmbeddedStatement != null)); -// usingStatement.ResourceAcquisition.AcceptVisitor(this, data); -// return usingStatement.EmbeddedStatement.AcceptVisitor(this, data); -// } -// -// public virtual object VisitVariableDeclaration(VariableDeclaration variableDeclaration, object data) { -// Debug.Assert((variableDeclaration != null)); -// Debug.Assert((variableDeclaration.Initializer != null)); -// Debug.Assert((variableDeclaration.TypeReference != null)); -// Debug.Assert((variableDeclaration.FixedArrayInitialization != null)); -// variableDeclaration.Initializer.AcceptVisitor(this, data); -// variableDeclaration.TypeReference.AcceptVisitor(this, data); -// return variableDeclaration.FixedArrayInitialization.AcceptVisitor(this, data); -// } -// -// public virtual object VisitWithStatement(WithStatement withStatement, object data) { -// Debug.Assert((withStatement != null)); -// Debug.Assert((withStatement.Expression != null)); -// Debug.Assert((withStatement.Body != null)); -// withStatement.Expression.AcceptVisitor(this, data); -// return withStatement.Body.AcceptVisitor(this, data); -// } -// -// public virtual object VisitXmlAttributeExpression(XmlAttributeExpression xmlAttributeExpression, object data) { -// Debug.Assert((xmlAttributeExpression != null)); -// Debug.Assert((xmlAttributeExpression.ExpressionValue != null)); -// return xmlAttributeExpression.ExpressionValue.AcceptVisitor(this, data); -// } -// -// public virtual object VisitXmlContentExpression(XmlContentExpression xmlContentExpression, object data) { -// Debug.Assert((xmlContentExpression != null)); -// return null; -// } -// -// public virtual object VisitXmlDocumentExpression(XmlDocumentExpression xmlDocumentExpression, object data) { -// Debug.Assert((xmlDocumentExpression != null)); -// Debug.Assert((xmlDocumentExpression.Expressions != null)); -// foreach (XmlExpression o in xmlDocumentExpression.Expressions) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return null; -// } -// -// public virtual object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) { -// Debug.Assert((xmlElementExpression != null)); -// Debug.Assert((xmlElementExpression.Content != null)); -// Debug.Assert((xmlElementExpression.NameExpression != null)); -// Debug.Assert((xmlElementExpression.Attributes != null)); -// xmlElementExpression.Content.AcceptVisitor(this, data); -// xmlElementExpression.NameExpression.AcceptVisitor(this, data); -// foreach (XmlExpression o in xmlElementExpression.Attributes) { -// Debug.Assert(o != null); -// o.AcceptVisitor(this, data); -// } -// return xmlElementExpression.AcceptChildren(this, data); -// } -// -// public virtual object VisitXmlEmbeddedExpression(XmlEmbeddedExpression xmlEmbeddedExpression, object data) { -// Debug.Assert((xmlEmbeddedExpression != null)); -// Debug.Assert((xmlEmbeddedExpression.InlineVBExpression != null)); -// return xmlEmbeddedExpression.InlineVBExpression.AcceptVisitor(this, data); -// } -// -// public virtual object VisitXmlMemberAccessExpression(XmlMemberAccessExpression xmlMemberAccessExpression, object data) { -// Debug.Assert((xmlMemberAccessExpression != null)); -// Debug.Assert((xmlMemberAccessExpression.TargetObject != null)); -// return xmlMemberAccessExpression.TargetObject.AcceptVisitor(this, data); -// } -// } -} diff --git a/ICSharpCode.NRefactory.VB/Visitors/NodeTrackingAstVisitor.cs b/ICSharpCode.NRefactory.VB/Visitors/NodeTrackingAstVisitor.cs deleted file mode 100644 index a94cb0333e..0000000000 --- a/ICSharpCode.NRefactory.VB/Visitors/NodeTrackingAstVisitor.cs +++ /dev/null @@ -1,1266 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ICSharpCode.NRefactory.VB.Visitors { - using System; - using ICSharpCode.NRefactory.VB.Ast; - - - /// - /// The NodeTrackingAstVisitor will iterate through the whole Ast, - /// just like the AbstractAstVisitor, and calls the virtual methods - /// BeginVisit and EndVisit for each node being visited. - /// - /// - /// base.Visit(node, data) calls this.TrackedVisit(node, data), so if - /// you want to visit child nodes using the default visiting behaviour, - /// use base.TrackedVisit(parentNode, data). - /// -// public abstract class NodeTrackingAstVisitor : AbstractAstVisitor { -// -// protected virtual void BeginVisit(INode node) { -// } -// -// protected virtual void EndVisit(INode node) { -// } -// -// public sealed override object VisitAddHandlerStatement(AddHandlerStatement addHandlerStatement, object data) { -// this.BeginVisit(addHandlerStatement); -// object result = this.TrackedVisitAddHandlerStatement(addHandlerStatement, data); -// this.EndVisit(addHandlerStatement); -// return result; -// } -// -// public sealed override object VisitAddressOfExpression(AddressOfExpression addressOfExpression, object data) { -// this.BeginVisit(addressOfExpression); -// object result = this.TrackedVisitAddressOfExpression(addressOfExpression, data); -// this.EndVisit(addressOfExpression); -// return result; -// } -// -// public sealed override object VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) { -// this.BeginVisit(arrayCreateExpression); -// object result = this.TrackedVisitArrayCreateExpression(arrayCreateExpression, data); -// this.EndVisit(arrayCreateExpression); -// return result; -// } -// -// public sealed override object VisitAssignmentExpression(AssignmentExpression assignmentExpression, object data) { -// this.BeginVisit(assignmentExpression); -// object result = this.TrackedVisitAssignmentExpression(assignmentExpression, data); -// this.EndVisit(assignmentExpression); -// return result; -// } -// -// public sealed override object VisitAttribute(ICSharpCode.NRefactory.VB.Ast.Attribute attribute, object data) { -// this.BeginVisit(attribute); -// object result = this.TrackedVisitAttribute(attribute, data); -// this.EndVisit(attribute); -// return result; -// } -// -// public sealed override object VisitAttributeSection(AttributeSection attributeSection, object data) { -// this.BeginVisit(attributeSection); -// object result = this.TrackedVisitAttributeSection(attributeSection, data); -// this.EndVisit(attributeSection); -// return result; -// } -// -// public sealed override object VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression, object data) { -// this.BeginVisit(baseReferenceExpression); -// object result = this.TrackedVisitBaseReferenceExpression(baseReferenceExpression, data); -// this.EndVisit(baseReferenceExpression); -// return result; -// } -// -// public sealed override object VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression, object data) { -// this.BeginVisit(binaryOperatorExpression); -// object result = this.TrackedVisitBinaryOperatorExpression(binaryOperatorExpression, data); -// this.EndVisit(binaryOperatorExpression); -// return result; -// } -// -// public sealed override object VisitBlockStatement(BlockStatement blockStatement, object data) { -// this.BeginVisit(blockStatement); -// object result = this.TrackedVisitBlockStatement(blockStatement, data); -// this.EndVisit(blockStatement); -// return result; -// } -// -// public sealed override object VisitCaseLabel(CaseLabel caseLabel, object data) { -// this.BeginVisit(caseLabel); -// object result = this.TrackedVisitCaseLabel(caseLabel, data); -// this.EndVisit(caseLabel); -// return result; -// } -// -// public sealed override object VisitCastExpression(CastExpression castExpression, object data) { -// this.BeginVisit(castExpression); -// object result = this.TrackedVisitCastExpression(castExpression, data); -// this.EndVisit(castExpression); -// return result; -// } -// -// public sealed override object VisitCatchClause(CatchClause catchClause, object data) { -// this.BeginVisit(catchClause); -// object result = this.TrackedVisitCatchClause(catchClause, data); -// this.EndVisit(catchClause); -// return result; -// } -// -// public sealed override object VisitClassReferenceExpression(ClassReferenceExpression classReferenceExpression, object data) { -// this.BeginVisit(classReferenceExpression); -// object result = this.TrackedVisitClassReferenceExpression(classReferenceExpression, data); -// this.EndVisit(classReferenceExpression); -// return result; -// } -// -// public sealed override object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) { -// this.BeginVisit(collectionInitializerExpression); -// object result = this.TrackedVisitCollectionInitializerExpression(collectionInitializerExpression, data); -// this.EndVisit(collectionInitializerExpression); -// return result; -// } -// -// public sealed override object VisitCollectionRangeVariable(CollectionRangeVariable collectionRangeVariable, object data) { -// this.BeginVisit(collectionRangeVariable); -// object result = this.TrackedVisitCollectionRangeVariable(collectionRangeVariable, data); -// this.EndVisit(collectionRangeVariable); -// return result; -// } -// -// public sealed override object VisitCompilationUnit(CompilationUnit compilationUnit, object data) { -// this.BeginVisit(compilationUnit); -// object result = this.TrackedVisitCompilationUnit(compilationUnit, data); -// this.EndVisit(compilationUnit); -// return result; -// } -// -// public sealed override object VisitConditionalExpression(ConditionalExpression conditionalExpression, object data) { -// this.BeginVisit(conditionalExpression); -// object result = this.TrackedVisitConditionalExpression(conditionalExpression, data); -// this.EndVisit(conditionalExpression); -// return result; -// } -// -// public sealed override object VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, object data) { -// this.BeginVisit(constructorDeclaration); -// object result = this.TrackedVisitConstructorDeclaration(constructorDeclaration, data); -// this.EndVisit(constructorDeclaration); -// return result; -// } -// -// public sealed override object VisitConstructorInitializer(ConstructorInitializer constructorInitializer, object data) { -// this.BeginVisit(constructorInitializer); -// object result = this.TrackedVisitConstructorInitializer(constructorInitializer, data); -// this.EndVisit(constructorInitializer); -// return result; -// } -// -// public sealed override object VisitContinueStatement(ContinueStatement continueStatement, object data) { -// this.BeginVisit(continueStatement); -// object result = this.TrackedVisitContinueStatement(continueStatement, data); -// this.EndVisit(continueStatement); -// return result; -// } -// -// public sealed override object VisitDeclareDeclaration(DeclareDeclaration declareDeclaration, object data) { -// this.BeginVisit(declareDeclaration); -// object result = this.TrackedVisitDeclareDeclaration(declareDeclaration, data); -// this.EndVisit(declareDeclaration); -// return result; -// } -// -// public sealed override object VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression, object data) { -// this.BeginVisit(defaultValueExpression); -// object result = this.TrackedVisitDefaultValueExpression(defaultValueExpression, data); -// this.EndVisit(defaultValueExpression); -// return result; -// } -// -// public sealed override object VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data) { -// this.BeginVisit(delegateDeclaration); -// object result = this.TrackedVisitDelegateDeclaration(delegateDeclaration, data); -// this.EndVisit(delegateDeclaration); -// return result; -// } -// -// public sealed override object VisitDirectionExpression(DirectionExpression directionExpression, object data) { -// this.BeginVisit(directionExpression); -// object result = this.TrackedVisitDirectionExpression(directionExpression, data); -// this.EndVisit(directionExpression); -// return result; -// } -// -// public sealed override object VisitDoLoopStatement(DoLoopStatement doLoopStatement, object data) { -// this.BeginVisit(doLoopStatement); -// object result = this.TrackedVisitDoLoopStatement(doLoopStatement, data); -// this.EndVisit(doLoopStatement); -// return result; -// } -// -// public sealed override object VisitElseIfSection(ElseIfSection elseIfSection, object data) { -// this.BeginVisit(elseIfSection); -// object result = this.TrackedVisitElseIfSection(elseIfSection, data); -// this.EndVisit(elseIfSection); -// return result; -// } -// -// public sealed override object VisitEndStatement(EndStatement endStatement, object data) { -// this.BeginVisit(endStatement); -// object result = this.TrackedVisitEndStatement(endStatement, data); -// this.EndVisit(endStatement); -// return result; -// } -// -// public sealed override object VisitEraseStatement(EraseStatement eraseStatement, object data) { -// this.BeginVisit(eraseStatement); -// object result = this.TrackedVisitEraseStatement(eraseStatement, data); -// this.EndVisit(eraseStatement); -// return result; -// } -// -// public sealed override object VisitErrorStatement(ErrorStatement errorStatement, object data) { -// this.BeginVisit(errorStatement); -// object result = this.TrackedVisitErrorStatement(errorStatement, data); -// this.EndVisit(errorStatement); -// return result; -// } -// -// public sealed override object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) { -// this.BeginVisit(eventAddRegion); -// object result = this.TrackedVisitEventAddRegion(eventAddRegion, data); -// this.EndVisit(eventAddRegion); -// return result; -// } -// -// public sealed override object VisitEventDeclaration(EventDeclaration eventDeclaration, object data) { -// this.BeginVisit(eventDeclaration); -// object result = this.TrackedVisitEventDeclaration(eventDeclaration, data); -// this.EndVisit(eventDeclaration); -// return result; -// } -// -// public sealed override object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) { -// this.BeginVisit(eventRaiseRegion); -// object result = this.TrackedVisitEventRaiseRegion(eventRaiseRegion, data); -// this.EndVisit(eventRaiseRegion); -// return result; -// } -// -// public sealed override object VisitEventRemoveRegion(EventRemoveRegion eventRemoveRegion, object data) { -// this.BeginVisit(eventRemoveRegion); -// object result = this.TrackedVisitEventRemoveRegion(eventRemoveRegion, data); -// this.EndVisit(eventRemoveRegion); -// return result; -// } -// -// public sealed override object VisitExitStatement(ExitStatement exitStatement, object data) { -// this.BeginVisit(exitStatement); -// object result = this.TrackedVisitExitStatement(exitStatement, data); -// this.EndVisit(exitStatement); -// return result; -// } -// -// public sealed override object VisitExpressionRangeVariable(ExpressionRangeVariable expressionRangeVariable, object data) { -// this.BeginVisit(expressionRangeVariable); -// object result = this.TrackedVisitExpressionRangeVariable(expressionRangeVariable, data); -// this.EndVisit(expressionRangeVariable); -// return result; -// } -// -// public sealed override object VisitExpressionStatement(ExpressionStatement expressionStatement, object data) { -// this.BeginVisit(expressionStatement); -// object result = this.TrackedVisitExpressionStatement(expressionStatement, data); -// this.EndVisit(expressionStatement); -// return result; -// } -// -// public sealed override object VisitExternAliasDirective(ExternAliasDirective externAliasDirective, object data) { -// this.BeginVisit(externAliasDirective); -// object result = this.TrackedVisitExternAliasDirective(externAliasDirective, data); -// this.EndVisit(externAliasDirective); -// return result; -// } -// -// public sealed override object VisitFieldDeclaration(FieldDeclaration fieldDeclaration, object data) { -// this.BeginVisit(fieldDeclaration); -// object result = this.TrackedVisitFieldDeclaration(fieldDeclaration, data); -// this.EndVisit(fieldDeclaration); -// return result; -// } -// -// public sealed override object VisitForeachStatement(ForeachStatement foreachStatement, object data) { -// this.BeginVisit(foreachStatement); -// object result = this.TrackedVisitForeachStatement(foreachStatement, data); -// this.EndVisit(foreachStatement); -// return result; -// } -// -// public sealed override object VisitForNextStatement(ForNextStatement forNextStatement, object data) { -// this.BeginVisit(forNextStatement); -// object result = this.TrackedVisitForNextStatement(forNextStatement, data); -// this.EndVisit(forNextStatement); -// return result; -// } -// -// public sealed override object VisitGotoStatement(GotoStatement gotoStatement, object data) { -// this.BeginVisit(gotoStatement); -// object result = this.TrackedVisitGotoStatement(gotoStatement, data); -// this.EndVisit(gotoStatement); -// return result; -// } -// -// public sealed override object VisitIdentifierExpression(SimpleNameExpression identifierExpression, object data) { -// this.BeginVisit(identifierExpression); -// object result = this.TrackedVisitIdentifierExpression(identifierExpression, data); -// this.EndVisit(identifierExpression); -// return result; -// } -// -// public sealed override object VisitIfElseStatement(IfElseStatement ifElseStatement, object data) { -// this.BeginVisit(ifElseStatement); -// object result = this.TrackedVisitIfElseStatement(ifElseStatement, data); -// this.EndVisit(ifElseStatement); -// return result; -// } -// -// public sealed override object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) { -// this.BeginVisit(innerClassTypeReference); -// object result = this.TrackedVisitInnerClassTypeReference(innerClassTypeReference, data); -// this.EndVisit(innerClassTypeReference); -// return result; -// } -// -// public sealed override object VisitInterfaceImplementation(InterfaceImplementation interfaceImplementation, object data) { -// this.BeginVisit(interfaceImplementation); -// object result = this.TrackedVisitInterfaceImplementation(interfaceImplementation, data); -// this.EndVisit(interfaceImplementation); -// return result; -// } -// -// public sealed override object VisitInvocationExpression(InvocationExpression invocationExpression, object data) { -// this.BeginVisit(invocationExpression); -// object result = this.TrackedVisitInvocationExpression(invocationExpression, data); -// this.EndVisit(invocationExpression); -// return result; -// } -// -// public sealed override object VisitLabelStatement(LabelStatement labelStatement, object data) { -// this.BeginVisit(labelStatement); -// object result = this.TrackedVisitLabelStatement(labelStatement, data); -// this.EndVisit(labelStatement); -// return result; -// } -// -// public sealed override object VisitLambdaExpression(LambdaExpression lambdaExpression, object data) { -// this.BeginVisit(lambdaExpression); -// object result = this.TrackedVisitLambdaExpression(lambdaExpression, data); -// this.EndVisit(lambdaExpression); -// return result; -// } -// -// public sealed override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) { -// this.BeginVisit(localVariableDeclaration); -// object result = this.TrackedVisitLocalVariableDeclaration(localVariableDeclaration, data); -// this.EndVisit(localVariableDeclaration); -// return result; -// } -// -// public sealed override object VisitLockStatement(LockStatement lockStatement, object data) { -// this.BeginVisit(lockStatement); -// object result = this.TrackedVisitLockStatement(lockStatement, data); -// this.EndVisit(lockStatement); -// return result; -// } -// -// public sealed override object VisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) { -// this.BeginVisit(memberInitializerExpression); -// object result = this.TrackedVisitMemberInitializerExpression(memberInitializerExpression, data); -// this.EndVisit(memberInitializerExpression); -// return result; -// } -// -// public sealed override object VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression, object data) { -// this.BeginVisit(memberReferenceExpression); -// object result = this.TrackedVisitMemberReferenceExpression(memberReferenceExpression, data); -// this.EndVisit(memberReferenceExpression); -// return result; -// } -// -// public sealed override object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) { -// this.BeginVisit(methodDeclaration); -// object result = this.TrackedVisitMethodDeclaration(methodDeclaration, data); -// this.EndVisit(methodDeclaration); -// return result; -// } -// -// public sealed override object VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data) { -// this.BeginVisit(namedArgumentExpression); -// object result = this.TrackedVisitNamedArgumentExpression(namedArgumentExpression, data); -// this.EndVisit(namedArgumentExpression); -// return result; -// } -// -// public sealed override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data) { -// this.BeginVisit(namespaceDeclaration); -// object result = this.TrackedVisitNamespaceDeclaration(namespaceDeclaration, data); -// this.EndVisit(namespaceDeclaration); -// return result; -// } -// -// public sealed override object VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, object data) { -// this.BeginVisit(objectCreateExpression); -// object result = this.TrackedVisitObjectCreateExpression(objectCreateExpression, data); -// this.EndVisit(objectCreateExpression); -// return result; -// } -// -// public sealed override object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) { -// this.BeginVisit(onErrorStatement); -// object result = this.TrackedVisitOnErrorStatement(onErrorStatement, data); -// this.EndVisit(onErrorStatement); -// return result; -// } -// -// public sealed override object VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration, object data) { -// this.BeginVisit(operatorDeclaration); -// object result = this.TrackedVisitOperatorDeclaration(operatorDeclaration, data); -// this.EndVisit(operatorDeclaration); -// return result; -// } -// -// public sealed override object VisitOptionDeclaration(OptionDeclaration optionDeclaration, object data) { -// this.BeginVisit(optionDeclaration); -// object result = this.TrackedVisitOptionDeclaration(optionDeclaration, data); -// this.EndVisit(optionDeclaration); -// return result; -// } -// -// public sealed override object VisitParameterDeclarationExpression(ParameterDeclarationExpression parameterDeclarationExpression, object data) { -// this.BeginVisit(parameterDeclarationExpression); -// object result = this.TrackedVisitParameterDeclarationExpression(parameterDeclarationExpression, data); -// this.EndVisit(parameterDeclarationExpression); -// return result; -// } -// -// public sealed override object VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) { -// this.BeginVisit(parenthesizedExpression); -// object result = this.TrackedVisitParenthesizedExpression(parenthesizedExpression, data); -// this.EndVisit(parenthesizedExpression); -// return result; -// } -// -// public sealed override object VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, object data) { -// this.BeginVisit(primitiveExpression); -// object result = this.TrackedVisitPrimitiveExpression(primitiveExpression, data); -// this.EndVisit(primitiveExpression); -// return result; -// } -// -// public sealed override object VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data) { -// this.BeginVisit(propertyDeclaration); -// object result = this.TrackedVisitPropertyDeclaration(propertyDeclaration, data); -// this.EndVisit(propertyDeclaration); -// return result; -// } -// -// public sealed override object VisitPropertyGetRegion(PropertyGetRegion propertyGetRegion, object data) { -// this.BeginVisit(propertyGetRegion); -// object result = this.TrackedVisitPropertyGetRegion(propertyGetRegion, data); -// this.EndVisit(propertyGetRegion); -// return result; -// } -// -// public sealed override object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) { -// this.BeginVisit(propertySetRegion); -// object result = this.TrackedVisitPropertySetRegion(propertySetRegion, data); -// this.EndVisit(propertySetRegion); -// return result; -// } -// -// public sealed override object VisitQueryExpression(QueryExpression queryExpression, object data) { -// this.BeginVisit(queryExpression); -// object result = this.TrackedVisitQueryExpression(queryExpression, data); -// this.EndVisit(queryExpression); -// return result; -// } -// -// public sealed override object VisitQueryExpressionAggregateClause(QueryExpressionAggregateClause queryExpressionAggregateClause, object data) { -// this.BeginVisit(queryExpressionAggregateClause); -// object result = this.TrackedVisitQueryExpressionAggregateClause(queryExpressionAggregateClause, data); -// this.EndVisit(queryExpressionAggregateClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionDistinctClause(QueryExpressionDistinctClause queryExpressionDistinctClause, object data) { -// this.BeginVisit(queryExpressionDistinctClause); -// object result = this.TrackedVisitQueryExpressionDistinctClause(queryExpressionDistinctClause, data); -// this.EndVisit(queryExpressionDistinctClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionFromClause(QueryExpressionFromClause queryExpressionFromClause, object data) { -// this.BeginVisit(queryExpressionFromClause); -// object result = this.TrackedVisitQueryExpressionFromClause(queryExpressionFromClause, data); -// this.EndVisit(queryExpressionFromClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionGroupClause(QueryExpressionGroupClause queryExpressionGroupClause, object data) { -// this.BeginVisit(queryExpressionGroupClause); -// object result = this.TrackedVisitQueryExpressionGroupClause(queryExpressionGroupClause, data); -// this.EndVisit(queryExpressionGroupClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionGroupJoinVBClause(QueryExpressionGroupJoinVBClause queryExpressionGroupJoinVBClause, object data) { -// this.BeginVisit(queryExpressionGroupJoinVBClause); -// object result = this.TrackedVisitQueryExpressionGroupJoinVBClause(queryExpressionGroupJoinVBClause, data); -// this.EndVisit(queryExpressionGroupJoinVBClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionGroupVBClause(QueryExpressionGroupVBClause queryExpressionGroupVBClause, object data) { -// this.BeginVisit(queryExpressionGroupVBClause); -// object result = this.TrackedVisitQueryExpressionGroupVBClause(queryExpressionGroupVBClause, data); -// this.EndVisit(queryExpressionGroupVBClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionJoinClause(QueryExpressionJoinClause queryExpressionJoinClause, object data) { -// this.BeginVisit(queryExpressionJoinClause); -// object result = this.TrackedVisitQueryExpressionJoinClause(queryExpressionJoinClause, data); -// this.EndVisit(queryExpressionJoinClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionJoinConditionVB(QueryExpressionJoinConditionVB queryExpressionJoinConditionVB, object data) { -// this.BeginVisit(queryExpressionJoinConditionVB); -// object result = this.TrackedVisitQueryExpressionJoinConditionVB(queryExpressionJoinConditionVB, data); -// this.EndVisit(queryExpressionJoinConditionVB); -// return result; -// } -// -// public sealed override object VisitQueryExpressionJoinVBClause(QueryExpressionJoinVBClause queryExpressionJoinVBClause, object data) { -// this.BeginVisit(queryExpressionJoinVBClause); -// object result = this.TrackedVisitQueryExpressionJoinVBClause(queryExpressionJoinVBClause, data); -// this.EndVisit(queryExpressionJoinVBClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionLetClause(QueryExpressionLetClause queryExpressionLetClause, object data) { -// this.BeginVisit(queryExpressionLetClause); -// object result = this.TrackedVisitQueryExpressionLetClause(queryExpressionLetClause, data); -// this.EndVisit(queryExpressionLetClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionLetVBClause(QueryExpressionLetClause queryExpressionLetVBClause, object data) { -// this.BeginVisit(queryExpressionLetVBClause); -// object result = this.TrackedVisitQueryExpressionLetVBClause(queryExpressionLetVBClause, data); -// this.EndVisit(queryExpressionLetVBClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionOrderClause(QueryExpressionOrderClause queryExpressionOrderClause, object data) { -// this.BeginVisit(queryExpressionOrderClause); -// object result = this.TrackedVisitQueryExpressionOrderClause(queryExpressionOrderClause, data); -// this.EndVisit(queryExpressionOrderClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionOrdering(QueryExpressionOrdering queryExpressionOrdering, object data) { -// this.BeginVisit(queryExpressionOrdering); -// object result = this.TrackedVisitQueryExpressionOrdering(queryExpressionOrdering, data); -// this.EndVisit(queryExpressionOrdering); -// return result; -// } -// -// public sealed override object VisitQueryExpressionPartitionVBClause(QueryExpressionPartitionVBClause queryExpressionPartitionVBClause, object data) { -// this.BeginVisit(queryExpressionPartitionVBClause); -// object result = this.TrackedVisitQueryExpressionPartitionVBClause(queryExpressionPartitionVBClause, data); -// this.EndVisit(queryExpressionPartitionVBClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionSelectClause(QueryExpressionSelectClause queryExpressionSelectClause, object data) { -// this.BeginVisit(queryExpressionSelectClause); -// object result = this.TrackedVisitQueryExpressionSelectClause(queryExpressionSelectClause, data); -// this.EndVisit(queryExpressionSelectClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionSelectVBClause(QueryExpressionSelectVBClause queryExpressionSelectVBClause, object data) { -// this.BeginVisit(queryExpressionSelectVBClause); -// object result = this.TrackedVisitQueryExpressionSelectVBClause(queryExpressionSelectVBClause, data); -// this.EndVisit(queryExpressionSelectVBClause); -// return result; -// } -// -// public sealed override object VisitQueryExpressionWhereClause(QueryExpressionWhereClause queryExpressionWhereClause, object data) { -// this.BeginVisit(queryExpressionWhereClause); -// object result = this.TrackedVisitQueryExpressionWhereClause(queryExpressionWhereClause, data); -// this.EndVisit(queryExpressionWhereClause); -// return result; -// } -// -// public sealed override object VisitRaiseEventStatement(RaiseEventStatement raiseEventStatement, object data) { -// this.BeginVisit(raiseEventStatement); -// object result = this.TrackedVisitRaiseEventStatement(raiseEventStatement, data); -// this.EndVisit(raiseEventStatement); -// return result; -// } -// -// public sealed override object VisitReDimStatement(ReDimStatement reDimStatement, object data) { -// this.BeginVisit(reDimStatement); -// object result = this.TrackedVisitReDimStatement(reDimStatement, data); -// this.EndVisit(reDimStatement); -// return result; -// } -// -// public sealed override object VisitRemoveHandlerStatement(RemoveHandlerStatement removeHandlerStatement, object data) { -// this.BeginVisit(removeHandlerStatement); -// object result = this.TrackedVisitRemoveHandlerStatement(removeHandlerStatement, data); -// this.EndVisit(removeHandlerStatement); -// return result; -// } -// -// public sealed override object VisitResumeStatement(ResumeStatement resumeStatement, object data) { -// this.BeginVisit(resumeStatement); -// object result = this.TrackedVisitResumeStatement(resumeStatement, data); -// this.EndVisit(resumeStatement); -// return result; -// } -// -// public sealed override object VisitReturnStatement(ReturnStatement returnStatement, object data) { -// this.BeginVisit(returnStatement); -// object result = this.TrackedVisitReturnStatement(returnStatement, data); -// this.EndVisit(returnStatement); -// return result; -// } -// -// public sealed override object VisitStopStatement(StopStatement stopStatement, object data) { -// this.BeginVisit(stopStatement); -// object result = this.TrackedVisitStopStatement(stopStatement, data); -// this.EndVisit(stopStatement); -// return result; -// } -// -// public sealed override object VisitSwitchSection(SwitchSection switchSection, object data) { -// this.BeginVisit(switchSection); -// object result = this.TrackedVisitSwitchSection(switchSection, data); -// this.EndVisit(switchSection); -// return result; -// } -// -// public sealed override object VisitSwitchStatement(SwitchStatement switchStatement, object data) { -// this.BeginVisit(switchStatement); -// object result = this.TrackedVisitSwitchStatement(switchStatement, data); -// this.EndVisit(switchStatement); -// return result; -// } -// -// public sealed override object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) { -// this.BeginVisit(templateDefinition); -// object result = this.TrackedVisitTemplateDefinition(templateDefinition, data); -// this.EndVisit(templateDefinition); -// return result; -// } -// -// public sealed override object VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) { -// this.BeginVisit(thisReferenceExpression); -// object result = this.TrackedVisitThisReferenceExpression(thisReferenceExpression, data); -// this.EndVisit(thisReferenceExpression); -// return result; -// } -// -// public sealed override object VisitThrowStatement(ThrowStatement throwStatement, object data) { -// this.BeginVisit(throwStatement); -// object result = this.TrackedVisitThrowStatement(throwStatement, data); -// this.EndVisit(throwStatement); -// return result; -// } -// -// public sealed override object VisitTryCatchStatement(TryCatchStatement tryCatchStatement, object data) { -// this.BeginVisit(tryCatchStatement); -// object result = this.TrackedVisitTryCatchStatement(tryCatchStatement, data); -// this.EndVisit(tryCatchStatement); -// return result; -// } -// -// public sealed override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) { -// this.BeginVisit(typeDeclaration); -// object result = this.TrackedVisitTypeDeclaration(typeDeclaration, data); -// this.EndVisit(typeDeclaration); -// return result; -// } -// -// public sealed override object VisitTypeOfExpression(TypeOfExpression typeOfExpression, object data) { -// this.BeginVisit(typeOfExpression); -// object result = this.TrackedVisitTypeOfExpression(typeOfExpression, data); -// this.EndVisit(typeOfExpression); -// return result; -// } -// -// public sealed override object VisitTypeOfIsExpression(TypeOfIsExpression typeOfIsExpression, object data) { -// this.BeginVisit(typeOfIsExpression); -// object result = this.TrackedVisitTypeOfIsExpression(typeOfIsExpression, data); -// this.EndVisit(typeOfIsExpression); -// return result; -// } -// -// public sealed override object VisitTypeReference(TypeReference typeReference, object data) { -// this.BeginVisit(typeReference); -// object result = this.TrackedVisitTypeReference(typeReference, data); -// this.EndVisit(typeReference); -// return result; -// } -// -// public sealed override object VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, object data) { -// this.BeginVisit(typeReferenceExpression); -// object result = this.TrackedVisitTypeReferenceExpression(typeReferenceExpression, data); -// this.EndVisit(typeReferenceExpression); -// return result; -// } -// -// public sealed override object VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, object data) { -// this.BeginVisit(unaryOperatorExpression); -// object result = this.TrackedVisitUnaryOperatorExpression(unaryOperatorExpression, data); -// this.EndVisit(unaryOperatorExpression); -// return result; -// } -// -// public sealed override object VisitUsing(ImportsClause @using, object data) { -// this.BeginVisit(@using); -// object result = this.TrackedVisitUsing(@using, data); -// this.EndVisit(@using); -// return result; -// } -// -// public sealed override object VisitUsingDeclaration(ImportsStatement usingDeclaration, object data) { -// this.BeginVisit(usingDeclaration); -// object result = this.TrackedVisitUsingDeclaration(usingDeclaration, data); -// this.EndVisit(usingDeclaration); -// return result; -// } -// -// public sealed override object VisitUsingStatement(UsingStatement usingStatement, object data) { -// this.BeginVisit(usingStatement); -// object result = this.TrackedVisitUsingStatement(usingStatement, data); -// this.EndVisit(usingStatement); -// return result; -// } -// -// public sealed override object VisitVariableDeclaration(VariableDeclaration variableDeclaration, object data) { -// this.BeginVisit(variableDeclaration); -// object result = this.TrackedVisitVariableDeclaration(variableDeclaration, data); -// this.EndVisit(variableDeclaration); -// return result; -// } -// -// public sealed override object VisitWithStatement(WithStatement withStatement, object data) { -// this.BeginVisit(withStatement); -// object result = this.TrackedVisitWithStatement(withStatement, data); -// this.EndVisit(withStatement); -// return result; -// } -// -// public sealed override object VisitXmlAttributeExpression(XmlAttributeExpression xmlAttributeExpression, object data) { -// this.BeginVisit(xmlAttributeExpression); -// object result = this.TrackedVisitXmlAttributeExpression(xmlAttributeExpression, data); -// this.EndVisit(xmlAttributeExpression); -// return result; -// } -// -// public sealed override object VisitXmlContentExpression(XmlContentExpression xmlContentExpression, object data) { -// this.BeginVisit(xmlContentExpression); -// object result = this.TrackedVisitXmlContentExpression(xmlContentExpression, data); -// this.EndVisit(xmlContentExpression); -// return result; -// } -// -// public sealed override object VisitXmlDocumentExpression(XmlDocumentExpression xmlDocumentExpression, object data) { -// this.BeginVisit(xmlDocumentExpression); -// object result = this.TrackedVisitXmlDocumentExpression(xmlDocumentExpression, data); -// this.EndVisit(xmlDocumentExpression); -// return result; -// } -// -// public sealed override object VisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) { -// this.BeginVisit(xmlElementExpression); -// object result = this.TrackedVisitXmlElementExpression(xmlElementExpression, data); -// this.EndVisit(xmlElementExpression); -// return result; -// } -// -// public sealed override object VisitXmlEmbeddedExpression(XmlEmbeddedExpression xmlEmbeddedExpression, object data) { -// this.BeginVisit(xmlEmbeddedExpression); -// object result = this.TrackedVisitXmlEmbeddedExpression(xmlEmbeddedExpression, data); -// this.EndVisit(xmlEmbeddedExpression); -// return result; -// } -// -// public sealed override object VisitXmlMemberAccessExpression(XmlMemberAccessExpression xmlMemberAccessExpression, object data) { -// this.BeginVisit(xmlMemberAccessExpression); -// object result = this.TrackedVisitXmlMemberAccessExpression(xmlMemberAccessExpression, data); -// this.EndVisit(xmlMemberAccessExpression); -// return result; -// } -// -// public virtual object TrackedVisitAddHandlerStatement(AddHandlerStatement addHandlerStatement, object data) { -// return base.VisitAddHandlerStatement(addHandlerStatement, data); -// } -// -// public virtual object TrackedVisitAddressOfExpression(AddressOfExpression addressOfExpression, object data) { -// return base.VisitAddressOfExpression(addressOfExpression, data); -// } -// -// public virtual object TrackedVisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) { -// return base.VisitArrayCreateExpression(arrayCreateExpression, data); -// } -// -// public virtual object TrackedVisitAssignmentExpression(AssignmentExpression assignmentExpression, object data) { -// return base.VisitAssignmentExpression(assignmentExpression, data); -// } -// -// public virtual object TrackedVisitAttribute(ICSharpCode.NRefactory.VB.Ast.Attribute attribute, object data) { -// return base.VisitAttribute(attribute, data); -// } -// -// public virtual object TrackedVisitAttributeSection(AttributeSection attributeSection, object data) { -// return base.VisitAttributeSection(attributeSection, data); -// } -// -// public virtual object TrackedVisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression, object data) { -// return base.VisitBaseReferenceExpression(baseReferenceExpression, data); -// } -// -// public virtual object TrackedVisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression, object data) { -// return base.VisitBinaryOperatorExpression(binaryOperatorExpression, data); -// } -// -// public virtual object TrackedVisitBlockStatement(BlockStatement blockStatement, object data) { -// return base.VisitBlockStatement(blockStatement, data); -// } -// -// public virtual object TrackedVisitCaseLabel(CaseLabel caseLabel, object data) { -// return base.VisitCaseLabel(caseLabel, data); -// } -// -// public virtual object TrackedVisitCastExpression(CastExpression castExpression, object data) { -// return base.VisitCastExpression(castExpression, data); -// } -// -// public virtual object TrackedVisitCatchClause(CatchClause catchClause, object data) { -// return base.VisitCatchClause(catchClause, data); -// } -// -// public virtual object TrackedVisitClassReferenceExpression(ClassReferenceExpression classReferenceExpression, object data) { -// return base.VisitClassReferenceExpression(classReferenceExpression, data); -// } -// -// public virtual object TrackedVisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) { -// return base.VisitCollectionInitializerExpression(collectionInitializerExpression, data); -// } -// -// public virtual object TrackedVisitCollectionRangeVariable(CollectionRangeVariable collectionRangeVariable, object data) { -// return base.VisitCollectionRangeVariable(collectionRangeVariable, data); -// } -// -// public virtual object TrackedVisitCompilationUnit(CompilationUnit compilationUnit, object data) { -// return base.VisitCompilationUnit(compilationUnit, data); -// } -// -// public virtual object TrackedVisitConditionalExpression(ConditionalExpression conditionalExpression, object data) { -// return base.VisitConditionalExpression(conditionalExpression, data); -// } -// -// public virtual object TrackedVisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, object data) { -// return base.VisitConstructorDeclaration(constructorDeclaration, data); -// } -// -// public virtual object TrackedVisitConstructorInitializer(ConstructorInitializer constructorInitializer, object data) { -// return base.VisitConstructorInitializer(constructorInitializer, data); -// } -// -// public virtual object TrackedVisitContinueStatement(ContinueStatement continueStatement, object data) { -// return base.VisitContinueStatement(continueStatement, data); -// } -// -// public virtual object TrackedVisitDeclareDeclaration(DeclareDeclaration declareDeclaration, object data) { -// return base.VisitDeclareDeclaration(declareDeclaration, data); -// } -// -// public virtual object TrackedVisitDefaultValueExpression(DefaultValueExpression defaultValueExpression, object data) { -// return base.VisitDefaultValueExpression(defaultValueExpression, data); -// } -// -// public virtual object TrackedVisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data) { -// return base.VisitDelegateDeclaration(delegateDeclaration, data); -// } -// -// public virtual object TrackedVisitDirectionExpression(DirectionExpression directionExpression, object data) { -// return base.VisitDirectionExpression(directionExpression, data); -// } -// -// public virtual object TrackedVisitDoLoopStatement(DoLoopStatement doLoopStatement, object data) { -// return base.VisitDoLoopStatement(doLoopStatement, data); -// } -// -// public virtual object TrackedVisitElseIfSection(ElseIfSection elseIfSection, object data) { -// return base.VisitElseIfSection(elseIfSection, data); -// } -// -// public virtual object TrackedVisitEndStatement(EndStatement endStatement, object data) { -// return base.VisitEndStatement(endStatement, data); -// } -// -// public virtual object TrackedVisitEraseStatement(EraseStatement eraseStatement, object data) { -// return base.VisitEraseStatement(eraseStatement, data); -// } -// -// public virtual object TrackedVisitErrorStatement(ErrorStatement errorStatement, object data) { -// return base.VisitErrorStatement(errorStatement, data); -// } -// -// public virtual object TrackedVisitEventAddRegion(EventAddRegion eventAddRegion, object data) { -// return base.VisitEventAddRegion(eventAddRegion, data); -// } -// -// public virtual object TrackedVisitEventDeclaration(EventDeclaration eventDeclaration, object data) { -// return base.VisitEventDeclaration(eventDeclaration, data); -// } -// -// public virtual object TrackedVisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) { -// return base.VisitEventRaiseRegion(eventRaiseRegion, data); -// } -// -// public virtual object TrackedVisitEventRemoveRegion(EventRemoveRegion eventRemoveRegion, object data) { -// return base.VisitEventRemoveRegion(eventRemoveRegion, data); -// } -// -// public virtual object TrackedVisitExitStatement(ExitStatement exitStatement, object data) { -// return base.VisitExitStatement(exitStatement, data); -// } -// -// public virtual object TrackedVisitExpressionRangeVariable(ExpressionRangeVariable expressionRangeVariable, object data) { -// return base.VisitExpressionRangeVariable(expressionRangeVariable, data); -// } -// -// public virtual object TrackedVisitExpressionStatement(ExpressionStatement expressionStatement, object data) { -// return base.VisitExpressionStatement(expressionStatement, data); -// } -// -// public virtual object TrackedVisitExternAliasDirective(ExternAliasDirective externAliasDirective, object data) { -// return base.VisitExternAliasDirective(externAliasDirective, data); -// } -// -// public virtual object TrackedVisitFieldDeclaration(FieldDeclaration fieldDeclaration, object data) { -// return base.VisitFieldDeclaration(fieldDeclaration, data); -// } -// -// public virtual object TrackedVisitForeachStatement(ForeachStatement foreachStatement, object data) { -// return base.VisitForeachStatement(foreachStatement, data); -// } -// -// public virtual object TrackedVisitForNextStatement(ForNextStatement forNextStatement, object data) { -// return base.VisitForNextStatement(forNextStatement, data); -// } -// -// public virtual object TrackedVisitGotoStatement(GotoStatement gotoStatement, object data) { -// return base.VisitGotoStatement(gotoStatement, data); -// } -// -// public virtual object TrackedVisitIdentifierExpression(SimpleNameExpression identifierExpression, object data) { -// return base.VisitIdentifierExpression(identifierExpression, data); -// } -// -// public virtual object TrackedVisitIfElseStatement(IfElseStatement ifElseStatement, object data) { -// return base.VisitIfElseStatement(ifElseStatement, data); -// } -// -// public virtual object TrackedVisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) { -// return base.VisitInnerClassTypeReference(innerClassTypeReference, data); -// } -// -// public virtual object TrackedVisitInterfaceImplementation(InterfaceImplementation interfaceImplementation, object data) { -// return base.VisitInterfaceImplementation(interfaceImplementation, data); -// } -// -// public virtual object TrackedVisitInvocationExpression(InvocationExpression invocationExpression, object data) { -// return base.VisitInvocationExpression(invocationExpression, data); -// } -// -// public virtual object TrackedVisitLabelStatement(LabelStatement labelStatement, object data) { -// return base.VisitLabelStatement(labelStatement, data); -// } -// -// public virtual object TrackedVisitLambdaExpression(LambdaExpression lambdaExpression, object data) { -// return base.VisitLambdaExpression(lambdaExpression, data); -// } -// -// public virtual object TrackedVisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) { -// return base.VisitLocalVariableDeclaration(localVariableDeclaration, data); -// } -// -// public virtual object TrackedVisitLockStatement(LockStatement lockStatement, object data) { -// return base.VisitLockStatement(lockStatement, data); -// } -// -// public virtual object TrackedVisitMemberInitializerExpression(MemberInitializerExpression memberInitializerExpression, object data) { -// return base.VisitMemberInitializerExpression(memberInitializerExpression, data); -// } -// -// public virtual object TrackedVisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression, object data) { -// return base.VisitMemberReferenceExpression(memberReferenceExpression, data); -// } -// -// public virtual object TrackedVisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) { -// return base.VisitMethodDeclaration(methodDeclaration, data); -// } -// -// public virtual object TrackedVisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data) { -// return base.VisitNamedArgumentExpression(namedArgumentExpression, data); -// } -// -// public virtual object TrackedVisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data) { -// return base.VisitNamespaceDeclaration(namespaceDeclaration, data); -// } -// -// public virtual object TrackedVisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, object data) { -// return base.VisitObjectCreateExpression(objectCreateExpression, data); -// } -// -// public virtual object TrackedVisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) { -// return base.VisitOnErrorStatement(onErrorStatement, data); -// } -// -// public virtual object TrackedVisitOperatorDeclaration(OperatorDeclaration operatorDeclaration, object data) { -// return base.VisitOperatorDeclaration(operatorDeclaration, data); -// } -// -// public virtual object TrackedVisitOptionDeclaration(OptionDeclaration optionDeclaration, object data) { -// return base.VisitOptionDeclaration(optionDeclaration, data); -// } -// -// public virtual object TrackedVisitParameterDeclarationExpression(ParameterDeclarationExpression parameterDeclarationExpression, object data) { -// return base.VisitParameterDeclarationExpression(parameterDeclarationExpression, data); -// } -// -// public virtual object TrackedVisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) { -// return base.VisitParenthesizedExpression(parenthesizedExpression, data); -// } -// -// public virtual object TrackedVisitPrimitiveExpression(PrimitiveExpression primitiveExpression, object data) { -// return base.VisitPrimitiveExpression(primitiveExpression, data); -// } -// -// public virtual object TrackedVisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data) { -// return base.VisitPropertyDeclaration(propertyDeclaration, data); -// } -// -// public virtual object TrackedVisitPropertyGetRegion(PropertyGetRegion propertyGetRegion, object data) { -// return base.VisitPropertyGetRegion(propertyGetRegion, data); -// } -// -// public virtual object TrackedVisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) { -// return base.VisitPropertySetRegion(propertySetRegion, data); -// } -// -// public virtual object TrackedVisitQueryExpression(QueryExpression queryExpression, object data) { -// return base.VisitQueryExpression(queryExpression, data); -// } -// -// public virtual object TrackedVisitQueryExpressionAggregateClause(QueryExpressionAggregateClause queryExpressionAggregateClause, object data) { -// return base.VisitQueryExpressionAggregateClause(queryExpressionAggregateClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionDistinctClause(QueryExpressionDistinctClause queryExpressionDistinctClause, object data) { -// return base.VisitQueryExpressionDistinctClause(queryExpressionDistinctClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionFromClause(QueryExpressionFromClause queryExpressionFromClause, object data) { -// return base.VisitQueryExpressionFromClause(queryExpressionFromClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionGroupClause(QueryExpressionGroupClause queryExpressionGroupClause, object data) { -// return base.VisitQueryExpressionGroupClause(queryExpressionGroupClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionGroupJoinVBClause(QueryExpressionGroupJoinVBClause queryExpressionGroupJoinVBClause, object data) { -// return base.VisitQueryExpressionGroupJoinVBClause(queryExpressionGroupJoinVBClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionGroupVBClause(QueryExpressionGroupVBClause queryExpressionGroupVBClause, object data) { -// return base.VisitQueryExpressionGroupVBClause(queryExpressionGroupVBClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionJoinClause(QueryExpressionJoinClause queryExpressionJoinClause, object data) { -// return base.VisitQueryExpressionJoinClause(queryExpressionJoinClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionJoinConditionVB(QueryExpressionJoinConditionVB queryExpressionJoinConditionVB, object data) { -// return base.VisitQueryExpressionJoinConditionVB(queryExpressionJoinConditionVB, data); -// } -// -// public virtual object TrackedVisitQueryExpressionJoinVBClause(QueryExpressionJoinVBClause queryExpressionJoinVBClause, object data) { -// return base.VisitQueryExpressionJoinVBClause(queryExpressionJoinVBClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionLetClause(QueryExpressionLetClause queryExpressionLetClause, object data) { -// return base.VisitQueryExpressionLetClause(queryExpressionLetClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionLetVBClause(QueryExpressionLetClause queryExpressionLetVBClause, object data) { -// return base.VisitQueryExpressionLetVBClause(queryExpressionLetVBClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionOrderClause(QueryExpressionOrderClause queryExpressionOrderClause, object data) { -// return base.VisitQueryExpressionOrderClause(queryExpressionOrderClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionOrdering(QueryExpressionOrdering queryExpressionOrdering, object data) { -// return base.VisitQueryExpressionOrdering(queryExpressionOrdering, data); -// } -// -// public virtual object TrackedVisitQueryExpressionPartitionVBClause(QueryExpressionPartitionVBClause queryExpressionPartitionVBClause, object data) { -// return base.VisitQueryExpressionPartitionVBClause(queryExpressionPartitionVBClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionSelectClause(QueryExpressionSelectClause queryExpressionSelectClause, object data) { -// return base.VisitQueryExpressionSelectClause(queryExpressionSelectClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionSelectVBClause(QueryExpressionSelectVBClause queryExpressionSelectVBClause, object data) { -// return base.VisitQueryExpressionSelectVBClause(queryExpressionSelectVBClause, data); -// } -// -// public virtual object TrackedVisitQueryExpressionWhereClause(QueryExpressionWhereClause queryExpressionWhereClause, object data) { -// return base.VisitQueryExpressionWhereClause(queryExpressionWhereClause, data); -// } -// -// public virtual object TrackedVisitRaiseEventStatement(RaiseEventStatement raiseEventStatement, object data) { -// return base.VisitRaiseEventStatement(raiseEventStatement, data); -// } -// -// public virtual object TrackedVisitReDimStatement(ReDimStatement reDimStatement, object data) { -// return base.VisitReDimStatement(reDimStatement, data); -// } -// -// public virtual object TrackedVisitRemoveHandlerStatement(RemoveHandlerStatement removeHandlerStatement, object data) { -// return base.VisitRemoveHandlerStatement(removeHandlerStatement, data); -// } -// -// public virtual object TrackedVisitResumeStatement(ResumeStatement resumeStatement, object data) { -// return base.VisitResumeStatement(resumeStatement, data); -// } -// -// public virtual object TrackedVisitReturnStatement(ReturnStatement returnStatement, object data) { -// return base.VisitReturnStatement(returnStatement, data); -// } -// -// public virtual object TrackedVisitStopStatement(StopStatement stopStatement, object data) { -// return base.VisitStopStatement(stopStatement, data); -// } -// -// public virtual object TrackedVisitSwitchSection(SwitchSection switchSection, object data) { -// return base.VisitSwitchSection(switchSection, data); -// } -// -// public virtual object TrackedVisitSwitchStatement(SwitchStatement switchStatement, object data) { -// return base.VisitSwitchStatement(switchStatement, data); -// } -// -// public virtual object TrackedVisitTemplateDefinition(TemplateDefinition templateDefinition, object data) { -// return base.VisitTemplateDefinition(templateDefinition, data); -// } -// -// public virtual object TrackedVisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) { -// return base.VisitThisReferenceExpression(thisReferenceExpression, data); -// } -// -// public virtual object TrackedVisitThrowStatement(ThrowStatement throwStatement, object data) { -// return base.VisitThrowStatement(throwStatement, data); -// } -// -// public virtual object TrackedVisitTryCatchStatement(TryCatchStatement tryCatchStatement, object data) { -// return base.VisitTryCatchStatement(tryCatchStatement, data); -// } -// -// public virtual object TrackedVisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) { -// return base.VisitTypeDeclaration(typeDeclaration, data); -// } -// -// public virtual object TrackedVisitTypeOfExpression(TypeOfExpression typeOfExpression, object data) { -// return base.VisitTypeOfExpression(typeOfExpression, data); -// } -// -// public virtual object TrackedVisitTypeOfIsExpression(TypeOfIsExpression typeOfIsExpression, object data) { -// return base.VisitTypeOfIsExpression(typeOfIsExpression, data); -// } -// -// public virtual object TrackedVisitTypeReference(TypeReference typeReference, object data) { -// return base.VisitTypeReference(typeReference, data); -// } -// -// public virtual object TrackedVisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, object data) { -// return base.VisitTypeReferenceExpression(typeReferenceExpression, data); -// } -// -// public virtual object TrackedVisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, object data) { -// return base.VisitUnaryOperatorExpression(unaryOperatorExpression, data); -// } -// -// public virtual object TrackedVisitUsing(ImportsClause @using, object data) { -// return base.VisitUsing(@using, data); -// } -// -// public virtual object TrackedVisitUsingDeclaration(ImportsStatement usingDeclaration, object data) { -// return base.VisitUsingDeclaration(usingDeclaration, data); -// } -// -// public virtual object TrackedVisitUsingStatement(UsingStatement usingStatement, object data) { -// return base.VisitUsingStatement(usingStatement, data); -// } -// -// public virtual object TrackedVisitVariableDeclaration(VariableDeclaration variableDeclaration, object data) { -// return base.VisitVariableDeclaration(variableDeclaration, data); -// } -// -// public virtual object TrackedVisitWithStatement(WithStatement withStatement, object data) { -// return base.VisitWithStatement(withStatement, data); -// } -// -// public virtual object TrackedVisitXmlAttributeExpression(XmlAttributeExpression xmlAttributeExpression, object data) { -// return base.VisitXmlAttributeExpression(xmlAttributeExpression, data); -// } -// -// public virtual object TrackedVisitXmlContentExpression(XmlContentExpression xmlContentExpression, object data) { -// return base.VisitXmlContentExpression(xmlContentExpression, data); -// } -// -// public virtual object TrackedVisitXmlDocumentExpression(XmlDocumentExpression xmlDocumentExpression, object data) { -// return base.VisitXmlDocumentExpression(xmlDocumentExpression, data); -// } -// -// public virtual object TrackedVisitXmlElementExpression(XmlElementExpression xmlElementExpression, object data) { -// return base.VisitXmlElementExpression(xmlElementExpression, data); -// } -// -// public virtual object TrackedVisitXmlEmbeddedExpression(XmlEmbeddedExpression xmlEmbeddedExpression, object data) { -// return base.VisitXmlEmbeddedExpression(xmlEmbeddedExpression, data); -// } -// -// public virtual object TrackedVisitXmlMemberAccessExpression(XmlMemberAccessExpression xmlMemberAccessExpression, object data) { -// return base.VisitXmlMemberAccessExpression(xmlMemberAccessExpression, data); -// } -// } -} From f302311c5ae3002bb05a51455e0f1aee50828b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 13:55:27 +0200 Subject: [PATCH 08/92] Fixed positioning error. --- .../Parser/CSharpParser.cs | 27 +- .../Parser/mcs/cs-parser.cs | 1084 +++++++++-------- .../Parser/mcs/cs-parser.jay | 12 +- 3 files changed, 573 insertions(+), 550 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 22bf05f09b..be2e5ac23b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -909,8 +909,9 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) newProperty.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MethodDeclaration.Roles.LBrace); + Accessor getAccessor = null; if (p.Get != null) { - Accessor getAccessor = new Accessor (); + getAccessor = new Accessor (); AddAttributeSection (getAccessor, p.Get); var getLocation = LocationsBag.GetMemberLocation (p.Get); AddModifiers (getAccessor, getLocation); @@ -920,13 +921,13 @@ namespace ICSharpCode.NRefactory.CSharp getAccessor.AddChild ((BlockStatement)p.Get.Block.Accept (this), MethodDeclaration.Roles.Body); } else { if (getLocation != null && getLocation.Count > 0) - newProperty.AddChild (new CSharpTokenNode (Convert (getLocation[0]), 1), MethodDeclaration.Roles.Semicolon); + getAccessor.AddChild (new CSharpTokenNode (Convert (getLocation[0]), 1), MethodDeclaration.Roles.Semicolon); } - newProperty.AddChild (getAccessor, PropertyDeclaration.GetterRole); } + Accessor setAccessor = null; if (p.Set != null) { - Accessor setAccessor = new Accessor (); + setAccessor = new Accessor (); AddAttributeSection (setAccessor, p.Set); var setLocation = LocationsBag.GetMemberLocation (p.Set); AddModifiers (setAccessor, setLocation); @@ -936,10 +937,24 @@ namespace ICSharpCode.NRefactory.CSharp setAccessor.AddChild ((BlockStatement)p.Set.Block.Accept (this), MethodDeclaration.Roles.Body); } else { if (setLocation != null && setLocation.Count > 0) - newProperty.AddChild (new CSharpTokenNode (Convert (setLocation[0]), 1), MethodDeclaration.Roles.Semicolon); + setAccessor.AddChild (new CSharpTokenNode (Convert (setLocation[0]), 1), MethodDeclaration.Roles.Semicolon); } - newProperty.AddChild (setAccessor, PropertyDeclaration.SetterRole); } + if (getAccessor != null && setAccessor != null) { + if (getAccessor.StartLocation < setAccessor.StartLocation) { + newProperty.AddChild (getAccessor, PropertyDeclaration.GetterRole); + newProperty.AddChild (setAccessor, PropertyDeclaration.SetterRole); + } else { + newProperty.AddChild (setAccessor, PropertyDeclaration.SetterRole); + newProperty.AddChild (getAccessor, PropertyDeclaration.GetterRole); + } + } else { + if (getAccessor != null) + newProperty.AddChild (getAccessor, PropertyDeclaration.GetterRole); + if (setAccessor != null) + newProperty.AddChild (setAccessor, PropertyDeclaration.SetterRole); + } + if (location != null && location.Count > 1) { newProperty.AddChild (new CSharpTokenNode (Convert (location[1]), 1), MethodDeclaration.Roles.RBrace); } else { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index f77ba27ac9..b07029d292 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1936,7 +1936,7 @@ case 220: case_220(); break; case 221: -#line 1933 "cs-parser.jay" +#line 1937 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1954,43 +1954,43 @@ case 225: case_225(); break; case 226: -#line 1966 "cs-parser.jay" +#line 1970 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 231: -#line 1983 "cs-parser.jay" +#line 1987 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 232: -#line 1987 "cs-parser.jay" +#line 1991 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 237: -#line 1995 "cs-parser.jay" +#line 1999 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 238: -#line 1999 "cs-parser.jay" +#line 2003 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 239: -#line 2003 "cs-parser.jay" +#line 2007 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 240: -#line 2009 "cs-parser.jay" +#line 2013 "cs-parser.jay" { } break; @@ -1998,14 +1998,14 @@ case 241: case_241(); break; case 243: -#line 2039 "cs-parser.jay" +#line 2043 "cs-parser.jay" { yyVal = null; } break; case 245: case_245(); break; case 246: -#line 2055 "cs-parser.jay" +#line 2059 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2014,95 +2014,95 @@ case 247: case_247(); break; case 249: -#line 2101 "cs-parser.jay" +#line 2105 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; case 250: -#line 2102 "cs-parser.jay" +#line 2106 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; case 251: -#line 2103 "cs-parser.jay" +#line 2107 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; case 252: -#line 2104 "cs-parser.jay" +#line 2108 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; case 253: -#line 2105 "cs-parser.jay" +#line 2109 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; case 254: -#line 2106 "cs-parser.jay" +#line 2110 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; case 255: -#line 2108 "cs-parser.jay" +#line 2112 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; case 256: -#line 2109 "cs-parser.jay" +#line 2113 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; case 257: -#line 2111 "cs-parser.jay" +#line 2115 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; case 258: -#line 2112 "cs-parser.jay" +#line 2116 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; case 259: -#line 2113 "cs-parser.jay" +#line 2117 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; case 260: -#line 2114 "cs-parser.jay" +#line 2118 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; case 261: -#line 2115 "cs-parser.jay" +#line 2119 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; case 262: -#line 2116 "cs-parser.jay" +#line 2120 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; case 263: -#line 2117 "cs-parser.jay" +#line 2121 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; case 264: -#line 2118 "cs-parser.jay" +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; case 265: -#line 2119 "cs-parser.jay" +#line 2123 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; case 266: -#line 2120 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; case 267: -#line 2121 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; case 268: -#line 2122 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; case 269: -#line 2123 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; case 270: -#line 2124 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; case 271: -#line 2131 "cs-parser.jay" +#line 2135 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2111,7 +2111,7 @@ case 272: case_272(); break; case 273: -#line 2150 "cs-parser.jay" +#line 2154 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2138,11 +2138,11 @@ case 280: case_280(); break; case 282: -#line 2253 "cs-parser.jay" +#line 2257 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 285: -#line 2265 "cs-parser.jay" +#line 2269 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2151,7 +2151,7 @@ case 286: case_286(); break; case 287: -#line 2275 "cs-parser.jay" +#line 2279 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2184,7 +2184,7 @@ case 296: case_296(); break; case 298: -#line 2384 "cs-parser.jay" +#line 2388 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2193,13 +2193,13 @@ case 299: case_299(); break; case 302: -#line 2401 "cs-parser.jay" +#line 2405 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 303: -#line 2405 "cs-parser.jay" +#line 2409 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2208,7 +2208,7 @@ case 304: case_304(); break; case 305: -#line 2418 "cs-parser.jay" +#line 2422 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2220,7 +2220,7 @@ case 307: case_307(); break; case 308: -#line 2443 "cs-parser.jay" +#line 2447 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2268,7 +2268,7 @@ case 326: case_326(); break; case 329: -#line 2598 "cs-parser.jay" +#line 2602 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2286,7 +2286,7 @@ case 334: case_334(); break; case 335: -#line 2656 "cs-parser.jay" +#line 2660 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2295,7 +2295,7 @@ case 336: case_336(); break; case 337: -#line 2678 "cs-parser.jay" +#line 2682 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2328,7 +2328,7 @@ case 350: case_350(); break; case 351: -#line 2782 "cs-parser.jay" +#line 2786 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2373,13 +2373,13 @@ case 366: case_366(); break; case 368: -#line 2900 "cs-parser.jay" +#line 2904 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2907 "cs-parser.jay" +#line 2911 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2394,7 +2394,7 @@ case 375: case_375(); break; case 377: -#line 2945 "cs-parser.jay" +#line 2949 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2403,7 +2403,7 @@ case 378: case_378(); break; case 379: -#line 2965 "cs-parser.jay" +#line 2969 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2412,13 +2412,13 @@ case 380: case_380(); break; case 381: -#line 2974 "cs-parser.jay" +#line 2978 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 2978 "cs-parser.jay" +#line 2982 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2436,63 +2436,63 @@ case 386: case_386(); break; case 387: -#line 3017 "cs-parser.jay" +#line 3021 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3018 "cs-parser.jay" +#line 3022 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3019 "cs-parser.jay" +#line 3023 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3020 "cs-parser.jay" +#line 3024 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3021 "cs-parser.jay" +#line 3025 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3022 "cs-parser.jay" +#line 3026 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3027 "cs-parser.jay" +#line 3031 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3028 "cs-parser.jay" +#line 3032 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3029 "cs-parser.jay" +#line 3033 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3030 "cs-parser.jay" +#line 3034 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3031 "cs-parser.jay" +#line 3035 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3032 "cs-parser.jay" +#line 3036 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3033 "cs-parser.jay" +#line 3037 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3034 "cs-parser.jay" +#line 3038 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3035 "cs-parser.jay" +#line 3039 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2502,22 +2502,22 @@ case 424: case_424(); break; case 428: -#line 3082 "cs-parser.jay" +#line 3086 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3086 "cs-parser.jay" +#line 3090 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3087 "cs-parser.jay" +#line 3091 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3120 "cs-parser.jay" +#line 3124 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2535,7 +2535,7 @@ case 440: case_440(); break; case 441: -#line 3152 "cs-parser.jay" +#line 3156 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2544,7 +2544,7 @@ case 442: case_442(); break; case 443: -#line 3160 "cs-parser.jay" +#line 3164 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2556,7 +2556,7 @@ case 445: case_445(); break; case 446: -#line 3176 "cs-parser.jay" +#line 3180 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2566,11 +2566,11 @@ case 449: case_449(); break; case 450: -#line 3199 "cs-parser.jay" +#line 3203 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3203 "cs-parser.jay" +#line 3207 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2588,7 +2588,7 @@ case 455: case_455(); break; case 456: -#line 3236 "cs-parser.jay" +#line 3240 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2603,7 +2603,7 @@ case 459: case_459(); break; case 462: -#line 3264 "cs-parser.jay" +#line 3268 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2622,7 +2622,7 @@ case 468: case_468(); break; case 469: -#line 3316 "cs-parser.jay" +#line 3320 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2658,13 +2658,13 @@ case 483: case_483(); break; case 484: -#line 3403 "cs-parser.jay" +#line 3407 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3411 "cs-parser.jay" +#line 3415 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2676,13 +2676,13 @@ case 488: case_488(); break; case 489: -#line 3431 "cs-parser.jay" +#line 3435 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3438 "cs-parser.jay" +#line 3442 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2709,7 +2709,7 @@ case 497: case_497(); break; case 498: -#line 3504 "cs-parser.jay" +#line 3508 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2721,7 +2721,7 @@ case 500: case_500(); break; case 503: -#line 3531 "cs-parser.jay" +#line 3535 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2752,25 +2752,25 @@ case 516: case_516(); break; case 517: -#line 3609 "cs-parser.jay" +#line 3613 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3613 "cs-parser.jay" +#line 3617 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3620 "cs-parser.jay" +#line 3624 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3624 "cs-parser.jay" +#line 3628 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2788,7 +2788,7 @@ case 524: case_524(); break; case 525: -#line 3668 "cs-parser.jay" +#line 3672 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2833,7 +2833,7 @@ case 540: case_540(); break; case 541: -#line 3782 "cs-parser.jay" +#line 3786 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2842,25 +2842,25 @@ case 542: case_542(); break; case 543: -#line 3795 "cs-parser.jay" +#line 3799 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3799 "cs-parser.jay" +#line 3803 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3806 "cs-parser.jay" +#line 3810 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3814 "cs-parser.jay" +#line 3818 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2872,13 +2872,13 @@ case 549: case_549(); break; case 551: -#line 3840 "cs-parser.jay" +#line 3844 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3844 "cs-parser.jay" +#line 3848 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2890,37 +2890,37 @@ case 556: case_556(); break; case 558: -#line 3874 "cs-parser.jay" +#line 3878 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3878 "cs-parser.jay" +#line 3882 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3882 "cs-parser.jay" +#line 3886 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3886 "cs-parser.jay" +#line 3890 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3890 "cs-parser.jay" +#line 3894 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3894 "cs-parser.jay" +#line 3898 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2938,7 +2938,7 @@ case 569: case_569(); break; case 570: -#line 3926 "cs-parser.jay" +#line 3930 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2947,13 +2947,13 @@ case 571: case_571(); break; case 572: -#line 3935 "cs-parser.jay" +#line 3939 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3939 "cs-parser.jay" +#line 3943 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3004,7 +3004,7 @@ case 598: case_598(); break; case 599: -#line 4063 "cs-parser.jay" +#line 4067 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3055,14 +3055,14 @@ case 614: case_614(); break; case 615: -#line 4160 "cs-parser.jay" +#line 4164 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4175 "cs-parser.jay" +#line 4179 "cs-parser.jay" { start_block (lexer.Location); } @@ -3086,7 +3086,7 @@ case 626: case_626(); break; case 627: -#line 4220 "cs-parser.jay" +#line 4224 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3098,7 +3098,7 @@ case 629: case_629(); break; case 630: -#line 4234 "cs-parser.jay" +#line 4238 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3110,7 +3110,7 @@ case 632: case_632(); break; case 638: -#line 4259 "cs-parser.jay" +#line 4263 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3125,13 +3125,13 @@ case 641: case_641(); break; case 643: -#line 4288 "cs-parser.jay" +#line 4292 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4301 "cs-parser.jay" +#line 4305 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3149,11 +3149,11 @@ case 648: case_648(); break; case 649: -#line 4340 "cs-parser.jay" +#line 4344 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4342 "cs-parser.jay" +#line 4346 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3208,13 +3208,13 @@ case 669: case_669(); break; case 671: -#line 4462 "cs-parser.jay" +#line 4466 "cs-parser.jay" { current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } break; case 673: -#line 4470 "cs-parser.jay" +#line 4474 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3244,19 +3244,19 @@ case 681: case_681(); break; case 682: -#line 4559 "cs-parser.jay" +#line 4563 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4563 "cs-parser.jay" +#line 4567 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4570 "cs-parser.jay" +#line 4574 "cs-parser.jay" { yyVal = Variance.None; } @@ -3265,13 +3265,13 @@ case 685: case_685(); break; case 686: -#line 4584 "cs-parser.jay" +#line 4588 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4588 "cs-parser.jay" +#line 4592 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3280,7 +3280,7 @@ case 688: case_688(); break; case 689: -#line 4613 "cs-parser.jay" +#line 4617 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3298,13 +3298,13 @@ case 693: case_693(); break; case 698: -#line 4657 "cs-parser.jay" +#line 4661 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4661 "cs-parser.jay" +#line 4665 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3313,13 +3313,13 @@ case 701: case_701(); break; case 704: -#line 4685 "cs-parser.jay" +#line 4689 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4689 "cs-parser.jay" +#line 4693 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3352,13 +3352,13 @@ case 744: case_744(); break; case 745: -#line 4833 "cs-parser.jay" +#line 4837 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4837 "cs-parser.jay" +#line 4841 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3370,7 +3370,7 @@ case 749: case_749(); break; case 750: -#line 4858 "cs-parser.jay" +#line 4862 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3400,7 +3400,7 @@ case 763: case_763(); break; case 764: -#line 4947 "cs-parser.jay" +#line 4951 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3421,15 +3421,15 @@ case 774: case_774(); break; case 775: -#line 4997 "cs-parser.jay" +#line 5001 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5001 "cs-parser.jay" +#line 5005 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5002 "cs-parser.jay" +#line 5006 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3448,7 +3448,7 @@ case 784: case_784(); break; case 785: -#line 5070 "cs-parser.jay" +#line 5074 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3469,13 +3469,13 @@ case 791: case_791(); break; case 792: -#line 5114 "cs-parser.jay" +#line 5118 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5118 "cs-parser.jay" +#line 5122 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3490,7 +3490,7 @@ case 796: case_796(); break; case 797: -#line 5147 "cs-parser.jay" +#line 5151 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3505,7 +3505,7 @@ case 804: case_804(); break; case 805: -#line 5186 "cs-parser.jay" +#line 5190 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3517,7 +3517,7 @@ case 807: case_807(); break; case 808: -#line 5214 "cs-parser.jay" +#line 5218 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3527,11 +3527,11 @@ case 811: case_811(); break; case 813: -#line 5235 "cs-parser.jay" +#line 5239 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5240 "cs-parser.jay" +#line 5244 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3574,7 +3574,7 @@ case 837: case_837(); break; case 840: -#line 5395 "cs-parser.jay" +#line 5399 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3595,7 +3595,7 @@ case 845: case_845(); break; case 848: -#line 5448 "cs-parser.jay" +#line 5452 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3604,7 +3604,7 @@ case 849: case_849(); break; case 850: -#line 5467 "cs-parser.jay" +#line 5471 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3613,13 +3613,13 @@ case 851: case_851(); break; case 852: -#line 5485 "cs-parser.jay" +#line 5489 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5492 "cs-parser.jay" +#line 5496 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3628,7 +3628,7 @@ case 854: case_854(); break; case 855: -#line 5502 "cs-parser.jay" +#line 5506 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3658,7 +3658,7 @@ case 863: case_863(); break; case 864: -#line 5585 "cs-parser.jay" +#line 5589 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3691,7 +3691,7 @@ case 873: case_873(); break; case 874: -#line 5685 "cs-parser.jay" +#line 5689 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3700,7 +3700,7 @@ case 875: case_875(); break; case 876: -#line 5700 "cs-parser.jay" +#line 5704 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3715,7 +3715,7 @@ case 880: case_880(); break; case 881: -#line 5745 "cs-parser.jay" +#line 5749 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3736,7 +3736,7 @@ case 889: case_889(); break; case 895: -#line 5804 "cs-parser.jay" +#line 5808 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3745,7 +3745,7 @@ case 896: case_896(); break; case 897: -#line 5823 "cs-parser.jay" +#line 5827 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3778,13 +3778,13 @@ case 906: case_906(); break; case 908: -#line 5967 "cs-parser.jay" +#line 5971 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 5974 "cs-parser.jay" +#line 5978 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3805,7 +3805,7 @@ case 916: case_916(); break; case 917: -#line 6020 "cs-parser.jay" +#line 6024 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3817,7 +3817,7 @@ case 919: case_919(); break; case 920: -#line 6037 "cs-parser.jay" +#line 6041 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3841,13 +3841,13 @@ case 929: case_929(); break; case 937: -#line 6161 "cs-parser.jay" +#line 6165 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6168 "cs-parser.jay" +#line 6172 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3859,13 +3859,13 @@ case 940: case_940(); break; case 941: -#line 6185 "cs-parser.jay" +#line 6189 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6189 "cs-parser.jay" +#line 6193 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3883,25 +3883,25 @@ case 946: case_946(); break; case 948: -#line 6225 "cs-parser.jay" +#line 6229 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6233 "cs-parser.jay" +#line 6237 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6237 "cs-parser.jay" +#line 6241 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6244 "cs-parser.jay" +#line 6248 "cs-parser.jay" { yyVal = new List (0); } @@ -5084,12 +5084,11 @@ void case_214() } current_local_parameters = current_property.Get.ParameterInfo; - lbag.AddMember (current_property.Get, GetModifierLocations ()); lexer.PropertyParsing = false; } void case_215() -#line 1845 "cs-parser.jay" +#line 1844 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5097,7 +5096,10 @@ void case_215() if (current_container.Kind == MemberKind.Interface) { report.Error (531, current_property.Get.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Get.GetSignatureForError ()); - } + } + lbag.AddMember (current_property.Get, GetModifierLocations ()); + } else { + lbag.AddMember (current_property.Get, GetModifierLocations (), savedLocation); } current_local_parameters = null; @@ -5109,7 +5111,7 @@ void case_215() } void case_216() -#line 1866 "cs-parser.jay" +#line 1868 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5133,12 +5135,11 @@ void case_216() } current_local_parameters = current_property.Set.ParameterInfo; - lbag.AddMember (current_property.Set, GetModifierLocations ()); lexer.PropertyParsing = false; } void case_217() -#line 1893 "cs-parser.jay" +#line 1894 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5147,6 +5148,9 @@ void case_217() report.Error (531, current_property.Set.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Set.GetSignatureForError ()); } + lbag.AddMember (current_property.Set, GetModifierLocations ()); + } else { + lbag.AddMember (current_property.Set, GetModifierLocations (), savedLocation); } current_local_parameters = null; @@ -5158,21 +5162,21 @@ void case_217() } void case_219() -#line 1915 "cs-parser.jay" +#line 1919 "cs-parser.jay" { - lbag.AppendToMember (lbag.LastMember, GetLocation (yyVals[0+yyTop])); + savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1920 "cs-parser.jay" +#line 1924 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1935 "cs-parser.jay" +#line 1939 "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]); @@ -5180,7 +5184,7 @@ void case_222() } void case_223() -#line 1942 "cs-parser.jay" +#line 1946 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5193,7 +5197,7 @@ void case_223() } void case_224() -#line 1953 "cs-parser.jay" +#line 1957 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5201,14 +5205,14 @@ void case_224() } void case_225() -#line 1959 "cs-parser.jay" +#line 1963 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); yyVal = pop_current_class (); } void case_241() -#line 2011 "cs-parser.jay" +#line 2015 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5235,14 +5239,14 @@ void case_241() } void case_245() -#line 2045 "cs-parser.jay" +#line 2049 "cs-parser.jay" { 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_247() -#line 2057 "cs-parser.jay" +#line 2061 "cs-parser.jay" { valid_param_mod = 0; @@ -5284,7 +5288,7 @@ void case_247() } void case_272() -#line 2133 "cs-parser.jay" +#line 2137 "cs-parser.jay" { valid_param_mod = 0; @@ -5301,7 +5305,7 @@ void case_272() } void case_274() -#line 2152 "cs-parser.jay" +#line 2156 "cs-parser.jay" { valid_param_mod = 0; @@ -5318,7 +5322,7 @@ void case_274() } void case_275() -#line 2167 "cs-parser.jay" +#line 2171 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5326,7 +5330,7 @@ void case_275() } void case_276() -#line 2173 "cs-parser.jay" +#line 2177 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5334,7 +5338,7 @@ void case_276() } void case_277() -#line 2183 "cs-parser.jay" +#line 2187 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5350,7 +5354,7 @@ void case_277() } void case_278() -#line 2202 "cs-parser.jay" +#line 2206 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5361,7 +5365,7 @@ void case_278() } void case_279() -#line 2211 "cs-parser.jay" +#line 2215 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5374,7 +5378,7 @@ void case_279() } void case_280() -#line 2222 "cs-parser.jay" +#line 2226 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5404,7 +5408,7 @@ void case_280() } void case_286() -#line 2267 "cs-parser.jay" +#line 2271 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5412,7 +5416,7 @@ void case_286() } void case_288() -#line 2277 "cs-parser.jay" +#line 2281 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5420,14 +5424,14 @@ void case_288() } void case_289() -#line 2283 "cs-parser.jay" +#line 2287 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_290() -#line 2291 "cs-parser.jay" +#line 2295 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5438,7 +5442,7 @@ void case_290() } void case_291() -#line 2300 "cs-parser.jay" +#line 2304 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5460,7 +5464,7 @@ void case_291() } void case_292() -#line 2325 "cs-parser.jay" +#line 2329 "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); @@ -5474,7 +5478,7 @@ void case_292() } void case_293() -#line 2339 "cs-parser.jay" +#line 2343 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5486,7 +5490,7 @@ void case_293() } void case_294() -#line 2352 "cs-parser.jay" +#line 2356 "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); @@ -5496,7 +5500,7 @@ void case_294() } void case_295() -#line 2360 "cs-parser.jay" +#line 2364 "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"); @@ -5505,7 +5509,7 @@ void case_295() } void case_296() -#line 2367 "cs-parser.jay" +#line 2371 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5518,14 +5522,14 @@ void case_296() } void case_299() -#line 2386 "cs-parser.jay" +#line 2390 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_304() -#line 2410 "cs-parser.jay" +#line 2414 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5533,7 +5537,7 @@ void case_304() } void case_306() -#line 2420 "cs-parser.jay" +#line 2424 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5542,7 +5546,7 @@ void case_306() } void case_307() -#line 2429 "cs-parser.jay" +#line 2433 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5556,28 +5560,28 @@ void case_307() } void case_311() -#line 2450 "cs-parser.jay" +#line 2454 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_312() -#line 2455 "cs-parser.jay" +#line 2459 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_313() -#line 2460 "cs-parser.jay" +#line 2464 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_314() -#line 2468 "cs-parser.jay" +#line 2472 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5591,7 +5595,7 @@ void case_314() } void case_315() -#line 2480 "cs-parser.jay" +#line 2484 "cs-parser.jay" { lexer.EventParsing = true; @@ -5606,7 +5610,7 @@ void case_315() } void case_316() -#line 2496 "cs-parser.jay" +#line 2500 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5620,7 +5624,7 @@ void case_316() } void case_317() -#line 2508 "cs-parser.jay" +#line 2512 "cs-parser.jay" { lexer.EventParsing = true; @@ -5635,21 +5639,21 @@ void case_317() } void case_318() -#line 2524 "cs-parser.jay" +#line 2528 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_320() -#line 2536 "cs-parser.jay" +#line 2540 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2541 "cs-parser.jay" +#line 2545 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5663,7 +5667,7 @@ void case_321() } void case_322() -#line 2553 "cs-parser.jay" +#line 2557 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5671,7 +5675,7 @@ void case_322() } void case_323() -#line 2559 "cs-parser.jay" +#line 2563 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5686,7 +5690,7 @@ void case_323() } void case_325() -#line 2576 "cs-parser.jay" +#line 2580 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5698,21 +5702,21 @@ void case_325() } void case_326() -#line 2586 "cs-parser.jay" +#line 2590 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2604 "cs-parser.jay" +#line 2608 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2612 "cs-parser.jay" +#line 2616 "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]); @@ -5727,7 +5731,7 @@ void case_332() } void case_333() -#line 2625 "cs-parser.jay" +#line 2629 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5737,7 +5741,7 @@ void case_333() } void case_334() -#line 2633 "cs-parser.jay" +#line 2637 "cs-parser.jay" { --lexer.parsing_block; @@ -5753,7 +5757,7 @@ void case_334() } void case_336() -#line 2658 "cs-parser.jay" +#line 2662 "cs-parser.jay" { valid_param_mod = 0; @@ -5773,7 +5777,7 @@ void case_336() } void case_338() -#line 2680 "cs-parser.jay" +#line 2684 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5789,7 +5793,7 @@ void case_338() } void case_340() -#line 2698 "cs-parser.jay" +#line 2702 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5798,7 +5802,7 @@ void case_340() } void case_342() -#line 2709 "cs-parser.jay" +#line 2713 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5807,7 +5811,7 @@ void case_342() } void case_344() -#line 2720 "cs-parser.jay" +#line 2724 "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); @@ -5815,14 +5819,14 @@ void case_344() } void case_345() -#line 2729 "cs-parser.jay" +#line 2733 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2741 "cs-parser.jay" +#line 2745 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5835,14 +5839,14 @@ void case_347() } void case_348() -#line 2752 "cs-parser.jay" +#line 2756 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2760 "cs-parser.jay" +#line 2764 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5851,7 +5855,7 @@ void case_349() } void case_350() -#line 2767 "cs-parser.jay" +#line 2771 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5860,7 +5864,7 @@ void case_350() } void case_352() -#line 2784 "cs-parser.jay" +#line 2788 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5868,7 +5872,7 @@ void case_352() } void case_353() -#line 2793 "cs-parser.jay" +#line 2797 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5877,7 +5881,7 @@ void case_353() } void case_355() -#line 2804 "cs-parser.jay" +#line 2808 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5885,21 +5889,21 @@ void case_355() } void case_356() -#line 2813 "cs-parser.jay" +#line 2817 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2818 "cs-parser.jay" +#line 2822 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2826 "cs-parser.jay" +#line 2830 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5907,7 +5911,7 @@ void case_358() } void case_359() -#line 2832 "cs-parser.jay" +#line 2836 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5917,7 +5921,7 @@ void case_359() } void case_360() -#line 2840 "cs-parser.jay" +#line 2844 "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); @@ -5925,7 +5929,7 @@ void case_360() } void case_362() -#line 2850 "cs-parser.jay" +#line 2854 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5935,7 +5939,7 @@ void case_362() } void case_363() -#line 2861 "cs-parser.jay" +#line 2865 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5943,7 +5947,7 @@ void case_363() } void case_364() -#line 2867 "cs-parser.jay" +#line 2871 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5952,14 +5956,14 @@ void case_364() } void case_365() -#line 2877 "cs-parser.jay" +#line 2881 "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_366() -#line 2882 "cs-parser.jay" +#line 2886 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -5970,28 +5974,28 @@ void case_366() } void case_371() -#line 2916 "cs-parser.jay" +#line 2920 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2925 "cs-parser.jay" +#line 2929 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2934 "cs-parser.jay" +#line 2938 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2950 "cs-parser.jay" +#line 2954 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6006,14 +6010,14 @@ void case_378() } void case_380() -#line 2967 "cs-parser.jay" +#line 2971 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 2983 "cs-parser.jay" +#line 2987 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6021,7 +6025,7 @@ void case_383() } void case_384() -#line 2989 "cs-parser.jay" +#line 2993 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6030,7 +6034,7 @@ void case_384() } void case_385() -#line 2999 "cs-parser.jay" +#line 3003 "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 ()); @@ -6039,35 +6043,35 @@ void case_385() } void case_386() -#line 3006 "cs-parser.jay" +#line 3010 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3068 "cs-parser.jay" +#line 3072 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3072 "cs-parser.jay" +#line 3076 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3113 "cs-parser.jay" +#line 3117 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3125 "cs-parser.jay" +#line 3129 "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); @@ -6075,7 +6079,7 @@ void case_437() } void case_438() -#line 3131 "cs-parser.jay" +#line 3135 "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); @@ -6083,7 +6087,7 @@ void case_438() } void case_439() -#line 3137 "cs-parser.jay" +#line 3141 "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); @@ -6091,7 +6095,7 @@ void case_439() } void case_440() -#line 3143 "cs-parser.jay" +#line 3147 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6101,28 +6105,28 @@ void case_440() } void case_442() -#line 3153 "cs-parser.jay" +#line 3157 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3161 "cs-parser.jay" +#line 3165 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3169 "cs-parser.jay" +#line 3173 "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_448() -#line 3182 "cs-parser.jay" +#line 3186 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6134,14 +6138,14 @@ void case_448() } void case_449() -#line 3192 "cs-parser.jay" +#line 3196 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3208 "cs-parser.jay" +#line 3212 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6149,7 +6153,7 @@ void case_452() } void case_453() -#line 3214 "cs-parser.jay" +#line 3218 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6158,14 +6162,14 @@ void case_453() } void case_454() -#line 3220 "cs-parser.jay" +#line 3224 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3228 "cs-parser.jay" +#line 3232 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6173,7 +6177,7 @@ void case_455() } void case_457() -#line 3237 "cs-parser.jay" +#line 3241 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6183,7 +6187,7 @@ void case_457() } void case_458() -#line 3245 "cs-parser.jay" +#line 3249 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6192,14 +6196,14 @@ void case_458() } void case_459() -#line 3252 "cs-parser.jay" +#line 3256 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3270 "cs-parser.jay" +#line 3274 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6207,7 +6211,7 @@ void case_464() } void case_465() -#line 3276 "cs-parser.jay" +#line 3280 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6219,7 +6223,7 @@ void case_465() } void case_466() -#line 3286 "cs-parser.jay" +#line 3290 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6236,56 +6240,56 @@ void case_466() } void case_467() -#line 3301 "cs-parser.jay" +#line 3305 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3306 "cs-parser.jay" +#line 3310 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3327 "cs-parser.jay" +#line 3331 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3332 "cs-parser.jay" +#line 3336 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3337 "cs-parser.jay" +#line 3341 "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_476() -#line 3342 "cs-parser.jay" +#line 3346 "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_478() -#line 3354 "cs-parser.jay" +#line 3358 "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_479() -#line 3362 "cs-parser.jay" +#line 3366 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6293,7 +6297,7 @@ void case_479() } void case_480() -#line 3368 "cs-parser.jay" +#line 3372 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6302,14 +6306,14 @@ void case_480() } void case_481() -#line 3374 "cs-parser.jay" +#line 3378 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3382 "cs-parser.jay" +#line 3386 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6317,7 +6321,7 @@ void case_482() } void case_483() -#line 3388 "cs-parser.jay" +#line 3392 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6329,21 +6333,21 @@ void case_483() } void case_487() -#line 3416 "cs-parser.jay" +#line 3420 "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_488() -#line 3421 "cs-parser.jay" +#line 3425 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3443 "cs-parser.jay" +#line 3447 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6358,7 +6362,7 @@ void case_491() } void case_492() -#line 3456 "cs-parser.jay" +#line 3460 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6367,7 +6371,7 @@ void case_492() } void case_493() -#line 3468 "cs-parser.jay" +#line 3472 "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])) { @@ -6377,7 +6381,7 @@ void case_493() } void case_494() -#line 3476 "cs-parser.jay" +#line 3480 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6386,7 +6390,7 @@ void case_494() } void case_495() -#line 3483 "cs-parser.jay" +#line 3487 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6395,28 +6399,28 @@ void case_495() } void case_496() -#line 3490 "cs-parser.jay" +#line 3494 "cs-parser.jay" { 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_497() -#line 3495 "cs-parser.jay" +#line 3499 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3506 "cs-parser.jay" +#line 3510 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3514 "cs-parser.jay" +#line 3518 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6428,7 +6432,7 @@ void case_500() } void case_505() -#line 3537 "cs-parser.jay" +#line 3541 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6436,7 +6440,7 @@ void case_505() } void case_506() -#line 3543 "cs-parser.jay" +#line 3547 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6446,7 +6450,7 @@ void case_506() } void case_507() -#line 3554 "cs-parser.jay" +#line 3558 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6454,7 +6458,7 @@ void case_507() } void case_508() -#line 3560 "cs-parser.jay" +#line 3564 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6462,14 +6466,14 @@ void case_508() } void case_509() -#line 3566 "cs-parser.jay" +#line 3570 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3571 "cs-parser.jay" +#line 3575 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6477,28 +6481,28 @@ void case_510() } void case_514() -#line 3586 "cs-parser.jay" +#line 3590 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3594 "cs-parser.jay" +#line 3598 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3599 "cs-parser.jay" +#line 3603 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3629 "cs-parser.jay" +#line 3633 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6507,7 +6511,7 @@ void case_521() } void case_522() -#line 3636 "cs-parser.jay" +#line 3640 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6520,7 +6524,7 @@ void case_522() } void case_523() -#line 3650 "cs-parser.jay" +#line 3654 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6528,7 +6532,7 @@ void case_523() } void case_524() -#line 3656 "cs-parser.jay" +#line 3660 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6537,7 +6541,7 @@ void case_524() } void case_526() -#line 3670 "cs-parser.jay" +#line 3674 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6545,14 +6549,14 @@ void case_526() } void case_529() -#line 3681 "cs-parser.jay" +#line 3685 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3689 "cs-parser.jay" +#line 3693 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6560,7 +6564,7 @@ void case_530() } void case_531() -#line 3695 "cs-parser.jay" +#line 3699 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6570,7 +6574,7 @@ void case_531() } void case_532() -#line 3703 "cs-parser.jay" +#line 3707 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6578,7 +6582,7 @@ void case_532() } void case_533() -#line 3709 "cs-parser.jay" +#line 3713 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6586,7 +6590,7 @@ void case_533() } void case_534() -#line 3715 "cs-parser.jay" +#line 3719 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6597,7 +6601,7 @@ void case_534() } void case_535() -#line 3727 "cs-parser.jay" +#line 3731 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6606,7 +6610,7 @@ void case_535() } void case_536() -#line 3737 "cs-parser.jay" +#line 3741 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6616,35 +6620,35 @@ void case_536() } void case_537() -#line 3748 "cs-parser.jay" +#line 3752 "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_538() -#line 3756 "cs-parser.jay" +#line 3760 "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_539() -#line 3764 "cs-parser.jay" +#line 3768 "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_540() -#line 3772 "cs-parser.jay" +#line 3776 "cs-parser.jay" { 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_542() -#line 3784 "cs-parser.jay" +#line 3788 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6655,7 +6659,7 @@ void case_542() } void case_548() -#line 3816 "cs-parser.jay" +#line 3820 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6664,7 +6668,7 @@ void case_548() } void case_549() -#line 3826 "cs-parser.jay" +#line 3830 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6674,147 +6678,147 @@ void case_549() } void case_555() -#line 3851 "cs-parser.jay" +#line 3855 "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_556() -#line 3859 "cs-parser.jay" +#line 3863 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3900 "cs-parser.jay" +#line 3904 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3905 "cs-parser.jay" +#line 3909 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3910 "cs-parser.jay" +#line 3914 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3919 "cs-parser.jay" +#line 3923 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3928 "cs-parser.jay" +#line 3932 "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_575() -#line 3945 "cs-parser.jay" +#line 3949 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3950 "cs-parser.jay" +#line 3954 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3959 "cs-parser.jay" +#line 3963 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 3964 "cs-parser.jay" +#line 3968 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 3969 "cs-parser.jay" +#line 3973 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 3974 "cs-parser.jay" +#line 3978 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 3983 "cs-parser.jay" +#line 3987 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 3988 "cs-parser.jay" +#line 3992 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 3997 "cs-parser.jay" +#line 4001 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4006 "cs-parser.jay" +#line 4010 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4015 "cs-parser.jay" +#line 4019 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4024 "cs-parser.jay" +#line 4028 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4033 "cs-parser.jay" +#line 4037 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4042 "cs-parser.jay" +#line 4046 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6823,84 +6827,84 @@ void case_596() } void case_598() -#line 4053 "cs-parser.jay" +#line 4057 "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_600() -#line 4065 "cs-parser.jay" +#line 4069 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4070 "cs-parser.jay" +#line 4074 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4075 "cs-parser.jay" +#line 4079 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4080 "cs-parser.jay" +#line 4084 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4085 "cs-parser.jay" +#line 4089 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4090 "cs-parser.jay" +#line 4094 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4095 "cs-parser.jay" +#line 4099 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4100 "cs-parser.jay" +#line 4104 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4105 "cs-parser.jay" +#line 4109 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4110 "cs-parser.jay" +#line 4114 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4118 "cs-parser.jay" +#line 4122 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6909,7 +6913,7 @@ void case_610() } void case_611() -#line 4125 "cs-parser.jay" +#line 4129 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6924,7 +6928,7 @@ void case_611() } void case_612() -#line 4141 "cs-parser.jay" +#line 4145 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6932,7 +6936,7 @@ void case_612() } void case_613() -#line 4147 "cs-parser.jay" +#line 4151 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6940,21 +6944,21 @@ void case_613() } void case_614() -#line 4153 "cs-parser.jay" +#line 4157 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4161 "cs-parser.jay" +#line 4165 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4177 "cs-parser.jay" +#line 4181 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6963,14 +6967,14 @@ void case_620() } void case_622() -#line 4188 "cs-parser.jay" +#line 4192 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4196 "cs-parser.jay" +#line 4200 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -6978,14 +6982,14 @@ void case_623() } void case_624() -#line 4202 "cs-parser.jay" +#line 4206 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4207 "cs-parser.jay" +#line 4211 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -6993,63 +6997,63 @@ void case_625() } void case_626() -#line 4213 "cs-parser.jay" +#line 4217 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4222 "cs-parser.jay" +#line 4226 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4227 "cs-parser.jay" +#line 4231 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4236 "cs-parser.jay" +#line 4240 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4241 "cs-parser.jay" +#line 4245 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4264 "cs-parser.jay" +#line 4268 "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_640() -#line 4269 "cs-parser.jay" +#line 4273 "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_641() -#line 4274 "cs-parser.jay" +#line 4278 "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_645() -#line 4303 "cs-parser.jay" +#line 4307 "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]); @@ -7061,7 +7065,7 @@ void case_645() } void case_646() -#line 4314 "cs-parser.jay" +#line 4318 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7075,7 +7079,7 @@ void case_646() } void case_647() -#line 4326 "cs-parser.jay" +#line 4330 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7083,21 +7087,21 @@ void case_647() } void case_648() -#line 4332 "cs-parser.jay" +#line 4336 "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_651() -#line 4347 "cs-parser.jay" +#line 4351 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4357 "cs-parser.jay" +#line 4361 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7115,7 +7119,7 @@ void case_654() } void case_655() -#line 4376 "cs-parser.jay" +#line 4380 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7125,91 +7129,91 @@ void case_655() } void case_656() -#line 4384 "cs-parser.jay" +#line 4388 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4389 "cs-parser.jay" +#line 4393 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4394 "cs-parser.jay" +#line 4398 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4399 "cs-parser.jay" +#line 4403 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4404 "cs-parser.jay" +#line 4408 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4409 "cs-parser.jay" +#line 4413 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4414 "cs-parser.jay" +#line 4418 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4419 "cs-parser.jay" +#line 4423 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4424 "cs-parser.jay" +#line 4428 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4429 "cs-parser.jay" +#line 4433 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4434 "cs-parser.jay" +#line 4438 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4439 "cs-parser.jay" +#line 4443 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4444 "cs-parser.jay" +#line 4448 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7218,21 +7222,21 @@ void case_668() } void case_669() -#line 4451 "cs-parser.jay" +#line 4455 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_674() -#line 4472 "cs-parser.jay" +#line 4476 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4480 "cs-parser.jay" +#line 4484 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7240,7 +7244,7 @@ void case_675() } void case_676() -#line 4486 "cs-parser.jay" +#line 4490 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7258,14 +7262,14 @@ void case_676() } void case_677() -#line 4505 "cs-parser.jay" +#line 4509 "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_678() -#line 4513 "cs-parser.jay" +#line 4517 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7273,7 +7277,7 @@ void case_678() } void case_679() -#line 4519 "cs-parser.jay" +#line 4523 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7298,7 +7302,7 @@ void case_679() } void case_680() -#line 4545 "cs-parser.jay" +#line 4549 "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 ()); @@ -7307,14 +7311,14 @@ void case_680() } void case_681() -#line 4552 "cs-parser.jay" +#line 4556 "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_685() -#line 4572 "cs-parser.jay" +#line 4576 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7323,77 +7327,77 @@ void case_685() } void case_688() -#line 4606 "cs-parser.jay" +#line 4610 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4618 "cs-parser.jay" +#line 4622 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4623 "cs-parser.jay" +#line 4627 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4632 "cs-parser.jay" +#line 4636 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4637 "cs-parser.jay" +#line 4641 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4664 "cs-parser.jay" +#line 4668 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4728 "cs-parser.jay" +#line 4732 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4733 "cs-parser.jay" +#line 4737 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4738 "cs-parser.jay" +#line 4742 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4746 "cs-parser.jay" +#line 4750 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4754 "cs-parser.jay" +#line 4758 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7403,7 +7407,7 @@ void case_738() } void case_741() -#line 4767 "cs-parser.jay" +#line 4771 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7412,7 +7416,7 @@ void case_741() } void case_742() -#line 4783 "cs-parser.jay" +#line 4787 "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*/ @@ -7444,7 +7448,7 @@ void case_742() } void case_743() -#line 4813 "cs-parser.jay" +#line 4817 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7457,7 +7461,7 @@ void case_743() } void case_744() -#line 4824 "cs-parser.jay" +#line 4828 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7466,21 +7470,21 @@ void case_744() } void case_747() -#line 4839 "cs-parser.jay" +#line 4843 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4848 "cs-parser.jay" +#line 4852 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4863 "cs-parser.jay" +#line 4867 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7489,7 +7493,7 @@ void case_751() } void case_752() -#line 4870 "cs-parser.jay" +#line 4874 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7497,7 +7501,7 @@ void case_752() } void case_753() -#line 4876 "cs-parser.jay" +#line 4880 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7506,7 +7510,7 @@ void case_753() } void case_754() -#line 4883 "cs-parser.jay" +#line 4887 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7518,14 +7522,14 @@ void case_754() } void case_756() -#line 4897 "cs-parser.jay" +#line 4901 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4902 "cs-parser.jay" +#line 4906 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7536,7 +7540,7 @@ void case_757() } void case_762() -#line 4924 "cs-parser.jay" +#line 4928 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7547,7 +7551,7 @@ void case_762() } void case_763() -#line 4933 "cs-parser.jay" +#line 4937 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7558,14 +7562,14 @@ void case_763() } void case_765() -#line 4949 "cs-parser.jay" +#line 4953 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 4967 "cs-parser.jay" +#line 4971 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7576,28 +7580,28 @@ void case_770() } void case_772() -#line 4980 "cs-parser.jay" +#line 4984 "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_773() -#line 4985 "cs-parser.jay" +#line 4989 "cs-parser.jay" { 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_774() -#line 4993 "cs-parser.jay" +#line 4997 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5011 "cs-parser.jay" +#line 5015 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7609,7 +7613,7 @@ void case_778() } void case_779() -#line 5024 "cs-parser.jay" +#line 5028 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7619,14 +7623,14 @@ void case_779() } void case_780() -#line 5032 "cs-parser.jay" +#line 5036 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5046 "cs-parser.jay" +#line 5050 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7636,7 +7640,7 @@ void case_783() } void case_784() -#line 5055 "cs-parser.jay" +#line 5059 "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])); @@ -7648,7 +7652,7 @@ void case_784() } void case_786() -#line 5072 "cs-parser.jay" +#line 5076 "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])); @@ -7656,14 +7660,14 @@ void case_786() } void case_787() -#line 5081 "cs-parser.jay" +#line 5085 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5090 "cs-parser.jay" +#line 5094 "cs-parser.jay" { var sections = new List (4); @@ -7672,7 +7676,7 @@ void case_789() } void case_790() -#line 5097 "cs-parser.jay" +#line 5101 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7681,14 +7685,14 @@ void case_790() } void case_791() -#line 5104 "cs-parser.jay" +#line 5108 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5123 "cs-parser.jay" +#line 5127 "cs-parser.jay" { var labels = new List (2); @@ -7697,7 +7701,7 @@ void case_794() } void case_795() -#line 5130 "cs-parser.jay" +#line 5134 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7706,14 +7710,14 @@ void case_795() } void case_796() -#line 5140 "cs-parser.jay" +#line 5144 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5159 "cs-parser.jay" +#line 5163 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7723,21 +7727,21 @@ void case_802() } void case_803() -#line 5171 "cs-parser.jay" +#line 5175 "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_804() -#line 5179 "cs-parser.jay" +#line 5183 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5195 "cs-parser.jay" +#line 5199 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7751,14 +7755,14 @@ void case_806() } void case_807() -#line 5207 "cs-parser.jay" +#line 5211 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5220 "cs-parser.jay" +#line 5224 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7767,14 +7771,14 @@ void case_810() } void case_811() -#line 5227 "cs-parser.jay" +#line 5231 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5251 "cs-parser.jay" +#line 5255 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7789,14 +7793,14 @@ void case_819() } void case_820() -#line 5267 "cs-parser.jay" +#line 5271 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5272 "cs-parser.jay" +#line 5276 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7807,7 +7811,7 @@ void case_821() } void case_822() -#line 5281 "cs-parser.jay" +#line 5285 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7820,21 +7824,21 @@ void case_822() } void case_829() -#line 5304 "cs-parser.jay" +#line 5308 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5312 "cs-parser.jay" +#line 5316 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5320 "cs-parser.jay" +#line 5324 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7842,35 +7846,35 @@ void case_831() } void case_832() -#line 5326 "cs-parser.jay" +#line 5330 "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_833() -#line 5331 "cs-parser.jay" +#line 5335 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5339 "cs-parser.jay" +#line 5343 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5347 "cs-parser.jay" +#line 5351 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5355 "cs-parser.jay" +#line 5359 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7888,7 +7892,7 @@ void case_836() } void case_837() -#line 5371 "cs-parser.jay" +#line 5375 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7904,28 +7908,28 @@ void case_837() } void case_841() -#line 5397 "cs-parser.jay" +#line 5401 "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_842() -#line 5402 "cs-parser.jay" +#line 5406 "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_843() -#line 5407 "cs-parser.jay" +#line 5411 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5415 "cs-parser.jay" +#line 5419 "cs-parser.jay" { var l = new List (2); @@ -7934,7 +7938,7 @@ void case_844() } void case_845() -#line 5422 "cs-parser.jay" +#line 5426 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7952,7 +7956,7 @@ void case_845() } void case_849() -#line 5450 "cs-parser.jay" +#line 5454 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -7969,7 +7973,7 @@ void case_849() } void case_851() -#line 5469 "cs-parser.jay" +#line 5473 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -7982,14 +7986,14 @@ void case_851() } void case_854() -#line 5497 "cs-parser.jay" +#line 5501 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5507 "cs-parser.jay" +#line 5511 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7999,7 +8003,7 @@ void case_856() } void case_857() -#line 5518 "cs-parser.jay" +#line 5522 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8011,14 +8015,14 @@ void case_857() } void case_858() -#line 5528 "cs-parser.jay" +#line 5532 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5533 "cs-parser.jay" +#line 5537 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8030,7 +8034,7 @@ void case_859() } void case_860() -#line 5546 "cs-parser.jay" +#line 5550 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8042,14 +8046,14 @@ void case_860() } void case_861() -#line 5556 "cs-parser.jay" +#line 5560 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5561 "cs-parser.jay" +#line 5565 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8061,7 +8065,7 @@ void case_862() } void case_863() -#line 5571 "cs-parser.jay" +#line 5575 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8072,14 +8076,14 @@ void case_863() } void case_865() -#line 5587 "cs-parser.jay" +#line 5591 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5598 "cs-parser.jay" +#line 5602 "cs-parser.jay" { lexer.query_parsing = false; @@ -8093,7 +8097,7 @@ void case_866() } void case_867() -#line 5610 "cs-parser.jay" +#line 5614 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8105,7 +8109,7 @@ void case_867() } void case_868() -#line 5621 "cs-parser.jay" +#line 5625 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8115,7 +8119,7 @@ void case_868() } void case_869() -#line 5628 "cs-parser.jay" +#line 5632 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8123,7 +8127,7 @@ void case_869() } void case_870() -#line 5637 "cs-parser.jay" +#line 5641 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8133,7 +8137,7 @@ void case_870() } void case_871() -#line 5645 "cs-parser.jay" +#line 5649 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8147,7 +8151,7 @@ void case_871() } void case_872() -#line 5660 "cs-parser.jay" +#line 5664 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8157,7 +8161,7 @@ void case_872() } void case_873() -#line 5668 "cs-parser.jay" +#line 5672 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8171,7 +8175,7 @@ void case_873() } void case_875() -#line 5687 "cs-parser.jay" +#line 5691 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8184,7 +8188,7 @@ void case_875() } void case_877() -#line 5702 "cs-parser.jay" +#line 5706 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8200,7 +8204,7 @@ void case_877() } void case_878() -#line 5719 "cs-parser.jay" +#line 5723 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8217,14 +8221,14 @@ void case_878() } void case_880() -#line 5735 "cs-parser.jay" +#line 5739 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5747 "cs-parser.jay" +#line 5751 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8233,7 +8237,7 @@ void case_882() } void case_883() -#line 5754 "cs-parser.jay" +#line 5758 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8243,7 +8247,7 @@ void case_883() } void case_884() -#line 5762 "cs-parser.jay" +#line 5766 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8252,7 +8256,7 @@ void case_884() } void case_885() -#line 5769 "cs-parser.jay" +#line 5773 "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])); @@ -8262,14 +8266,14 @@ void case_885() } void case_889() -#line 5786 "cs-parser.jay" +#line 5790 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5806 "cs-parser.jay" +#line 5810 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8283,7 +8287,7 @@ void case_896() } void case_898() -#line 5825 "cs-parser.jay" +#line 5829 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8292,7 +8296,7 @@ void case_898() } void case_899() -#line 5835 "cs-parser.jay" +#line 5839 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8302,7 +8306,7 @@ void case_899() } void case_900() -#line 5843 "cs-parser.jay" +#line 5847 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8312,7 +8316,7 @@ void case_900() } void case_901() -#line 5851 "cs-parser.jay" +#line 5855 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8322,7 +8326,7 @@ void case_901() } void case_902() -#line 5859 "cs-parser.jay" +#line 5863 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8362,7 +8366,7 @@ void case_902() } void case_903() -#line 5897 "cs-parser.jay" +#line 5901 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8372,7 +8376,7 @@ void case_903() } void case_904() -#line 5905 "cs-parser.jay" +#line 5909 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8382,7 +8386,7 @@ void case_904() } void case_905() -#line 5913 "cs-parser.jay" +#line 5917 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8392,7 +8396,7 @@ void case_905() } void case_906() -#line 5921 "cs-parser.jay" +#line 5925 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8434,7 +8438,7 @@ void case_906() } void case_910() -#line 5976 "cs-parser.jay" +#line 5980 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8443,7 +8447,7 @@ void case_910() } void case_912() -#line 5987 "cs-parser.jay" +#line 5991 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8452,14 +8456,14 @@ void case_912() } void case_913() -#line 5994 "cs-parser.jay" +#line 5998 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6003 "cs-parser.jay" +#line 6007 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8468,42 +8472,42 @@ void case_915() } void case_916() -#line 6010 "cs-parser.jay" +#line 6014 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6022 "cs-parser.jay" +#line 6026 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6027 "cs-parser.jay" +#line 6031 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6039 "cs-parser.jay" +#line 6043 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6044 "cs-parser.jay" +#line 6048 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6054 "cs-parser.jay" +#line 6058 "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*/ @@ -8521,7 +8525,7 @@ void case_924() } void case_925() -#line 6070 "cs-parser.jay" +#line 6074 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8532,7 +8536,7 @@ void case_925() } void case_928() -#line 6097 "cs-parser.jay" +#line 6101 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8564,7 +8568,7 @@ void case_928() } void case_929() -#line 6127 "cs-parser.jay" +#line 6131 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8576,7 +8580,7 @@ void case_929() } void case_939() -#line 6170 "cs-parser.jay" +#line 6174 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8584,7 +8588,7 @@ void case_939() } void case_940() -#line 6176 "cs-parser.jay" +#line 6180 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8593,14 +8597,14 @@ void case_940() } void case_943() -#line 6191 "cs-parser.jay" +#line 6195 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6196 "cs-parser.jay" +#line 6200 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8610,7 +8614,7 @@ void case_944() } void case_945() -#line 6204 "cs-parser.jay" +#line 6208 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8620,7 +8624,7 @@ void case_945() } void case_946() -#line 6212 "cs-parser.jay" +#line 6216 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8629,7 +8633,7 @@ void case_946() } void case_954() -#line 6250 "cs-parser.jay" +#line 6254 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8637,7 +8641,7 @@ void case_954() } void case_955() -#line 6256 "cs-parser.jay" +#line 6260 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8645,7 +8649,7 @@ void case_955() } void case_956() -#line 6265 "cs-parser.jay" +#line 6269 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -11981,7 +11985,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6274 "cs-parser.jay" +#line 6278 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 48471ff2a8..5fa45a38ed 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -1838,7 +1838,6 @@ get_accessor_declaration } current_local_parameters = current_property.Get.ParameterInfo; - lbag.AddMember (current_property.Get, GetModifierLocations ()); lexer.PropertyParsing = false; } accessor_body @@ -1849,7 +1848,10 @@ get_accessor_declaration if (current_container.Kind == MemberKind.Interface) { report.Error (531, current_property.Get.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Get.GetSignatureForError ()); - } + } + lbag.AddMember (current_property.Get, GetModifierLocations ()); + } else { + lbag.AddMember (current_property.Get, GetModifierLocations (), savedLocation); } current_local_parameters = null; @@ -1886,7 +1888,6 @@ set_accessor_declaration } current_local_parameters = current_property.Set.ParameterInfo; - lbag.AddMember (current_property.Set, GetModifierLocations ()); lexer.PropertyParsing = false; } accessor_body @@ -1898,6 +1899,9 @@ set_accessor_declaration report.Error (531, current_property.Set.Block.StartLocation, "`{0}': interface members cannot have a definition", current_property.Set.GetSignatureForError ()); } + lbag.AddMember (current_property.Set, GetModifierLocations ()); + } else { + lbag.AddMember (current_property.Set, GetModifierLocations (), savedLocation); } current_local_parameters = null; @@ -1913,7 +1917,7 @@ accessor_body : block | SEMICOLON { - lbag.AppendToMember (lbag.LastMember, GetLocation ($1)); + savedLocation = GetLocation ($1); $$ = null; } | error From bd01cadd933ac5b5fe1aa458184b00ee6bace8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 14:30:16 +0200 Subject: [PATCH 09/92] Fixed parameter comma locations. --- .../Parser/CSharpParser.cs | 5 +- .../Parser/mcs/cs-parser.cs | 1372 +++++++++-------- .../Parser/mcs/cs-parser.jay | 24 +- 3 files changed, 715 insertions(+), 686 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index be2e5ac23b..25bfd1c87f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -836,7 +836,7 @@ namespace ICSharpCode.NRefactory.CSharp // } else { newMethod.AddChild (bodyBlock, MethodDeclaration.Roles.Body); // } - } else if (location != null && location.Count < 3) { + } else if (location != null && location.Count < 3 && typeStack.Peek ().ClassType != ClassType.Interface) { // parser error, set end node to max value. newMethod.AddChild (new ErrorNode (), AstNode.Roles.Error); } @@ -2136,8 +2136,9 @@ namespace ICSharpCode.NRefactory.CSharp var paramLocation = LocationsBag.GetLocations (parameters); for (int i = 0; i < parameters.Count; i++) { - if (paramLocation != null && i > 0 && i - 1 < paramLocation.Count) + if (paramLocation != null && i > 0 && i - 1 < paramLocation.Count) { parent.AddChild (new CSharpTokenNode (Convert (paramLocation [i - 1]), 1), ParameterDeclaration.Roles.Comma); + } var p = (Parameter)parameters.FixedParameters [i]; var location = LocationsBag.GetLocations (p); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index b07029d292..c257a13461 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -148,6 +148,7 @@ namespace Mono.CSharp Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); + List parameterListCommas = new List (); object lastYYVal; @@ -1399,20 +1400,20 @@ namespace Mono.CSharp yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: -#line 396 "cs-parser.jay" +#line 397 "cs-parser.jay" { Lexer.check_incorrect_doc_comment (); } break; case 2: -#line 397 "cs-parser.jay" +#line 398 "cs-parser.jay" { Lexer.CompleteOnEOF = false; } break; case 6: case_6(); break; case 7: -#line 414 "cs-parser.jay" +#line 415 "cs-parser.jay" { module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace); } @@ -1424,7 +1425,7 @@ case 13: case_13(); break; case 14: -#line 452 "cs-parser.jay" +#line 453 "cs-parser.jay" { syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected"); /* TODO: better*/ } @@ -1469,7 +1470,7 @@ case 41: case_41(); break; case 42: -#line 641 "cs-parser.jay" +#line 642 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1499,18 +1500,18 @@ case 57: case_57(); break; case 58: -#line 737 "cs-parser.jay" +#line 738 "cs-parser.jay" { yyVal = "event"; } break; case 59: -#line 738 "cs-parser.jay" +#line 739 "cs-parser.jay" { yyVal = "return"; } break; case 60: case_60(); break; case 61: -#line 755 "cs-parser.jay" +#line 756 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1519,7 +1520,7 @@ case 62: case_62(); break; case 63: -#line 770 "cs-parser.jay" +#line 771 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1528,14 +1529,14 @@ case 64: case_64(); break; case 66: -#line 794 "cs-parser.jay" +#line 795 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 805 "cs-parser.jay" +#line 806 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1551,13 +1552,13 @@ case 72: case_72(); break; case 73: -#line 849 "cs-parser.jay" +#line 850 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 857 "cs-parser.jay" +#line 858 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1569,17 +1570,17 @@ case 77: case_77(); break; case 78: -#line 882 "cs-parser.jay" +#line 883 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 886 "cs-parser.jay" +#line 887 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 890 "cs-parser.jay" +#line 891 "cs-parser.jay" { yyVal = Argument.AType.Out; } @@ -1588,7 +1589,7 @@ case 95: case_95(); break; case 96: -#line 931 "cs-parser.jay" +#line 932 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1606,7 +1607,7 @@ case 100: case_100(); break; case 101: -#line 963 "cs-parser.jay" +#line 964 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1615,7 +1616,7 @@ case 102: case_102(); break; case 103: -#line 975 "cs-parser.jay" +#line 976 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } @@ -1627,13 +1628,13 @@ case 119: case_119(); break; case 122: -#line 1044 "cs-parser.jay" +#line 1045 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 123: -#line 1048 "cs-parser.jay" +#line 1049 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1642,7 +1643,7 @@ case 124: case_124(); break; case 125: -#line 1064 "cs-parser.jay" +#line 1065 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1666,7 +1667,7 @@ case 133: case_133(); break; case 134: -#line 1143 "cs-parser.jay" +#line 1144 "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"); } @@ -1678,13 +1679,13 @@ case 137: case_137(); break; case 140: -#line 1173 "cs-parser.jay" +#line 1174 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 141: -#line 1177 "cs-parser.jay" +#line 1178 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1693,7 +1694,7 @@ case 142: case_142(); break; case 143: -#line 1190 "cs-parser.jay" +#line 1191 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1702,13 +1703,13 @@ case 144: case_144(); break; case 147: -#line 1209 "cs-parser.jay" +#line 1210 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 148: -#line 1213 "cs-parser.jay" +#line 1214 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1717,7 +1718,7 @@ case 149: case_149(); break; case 150: -#line 1229 "cs-parser.jay" +#line 1230 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1738,13 +1739,13 @@ case 157: case_157(); break; case 158: -#line 1296 "cs-parser.jay" +#line 1297 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 159: -#line 1300 "cs-parser.jay" +#line 1301 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1753,7 +1754,7 @@ case 160: case_160(); break; case 161: -#line 1340 "cs-parser.jay" +#line 1341 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1762,7 +1763,7 @@ case 162: case_162(); break; case 163: -#line 1350 "cs-parser.jay" +#line 1351 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1774,11 +1775,11 @@ case 165: case_165(); break; case 167: -#line 1424 "cs-parser.jay" +#line 1425 "cs-parser.jay" { yyVal = null; } break; case 168: -#line 1428 "cs-parser.jay" +#line 1429 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 170: @@ -1803,13 +1804,13 @@ case 176: case_176(); break; case 177: -#line 1487 "cs-parser.jay" +#line 1501 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 178: -#line 1491 "cs-parser.jay" +#line 1505 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1833,7 +1834,7 @@ case 184: case_184(); break; case 185: -#line 1566 "cs-parser.jay" +#line 1580 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1842,7 +1843,7 @@ case 186: case_186(); break; case 187: -#line 1607 "cs-parser.jay" +#line 1621 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 189: @@ -1876,7 +1877,7 @@ case 198: case_198(); break; case 199: -#line 1705 "cs-parser.jay" +#line 1719 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1897,7 +1898,7 @@ case 204: case_204(); break; case 205: -#line 1759 "cs-parser.jay" +#line 1773 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1906,7 +1907,7 @@ case 206: case_206(); break; case 207: -#line 1788 "cs-parser.jay" +#line 1802 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1936,7 +1937,7 @@ case 220: case_220(); break; case 221: -#line 1937 "cs-parser.jay" +#line 1951 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1954,43 +1955,43 @@ case 225: case_225(); break; case 226: -#line 1970 "cs-parser.jay" +#line 1984 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 231: -#line 1987 "cs-parser.jay" +#line 2001 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 232: -#line 1991 "cs-parser.jay" +#line 2005 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 237: -#line 1999 "cs-parser.jay" +#line 2013 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 238: -#line 2003 "cs-parser.jay" +#line 2017 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 239: -#line 2007 "cs-parser.jay" +#line 2021 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 240: -#line 2013 "cs-parser.jay" +#line 2027 "cs-parser.jay" { } break; @@ -1998,14 +1999,14 @@ case 241: case_241(); break; case 243: -#line 2043 "cs-parser.jay" +#line 2057 "cs-parser.jay" { yyVal = null; } break; case 245: case_245(); break; case 246: -#line 2059 "cs-parser.jay" +#line 2073 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2014,95 +2015,95 @@ case 247: case_247(); break; case 249: -#line 2105 "cs-parser.jay" +#line 2119 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; case 250: -#line 2106 "cs-parser.jay" +#line 2120 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; case 251: -#line 2107 "cs-parser.jay" +#line 2121 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; case 252: -#line 2108 "cs-parser.jay" +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; case 253: -#line 2109 "cs-parser.jay" +#line 2123 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; case 254: -#line 2110 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; case 255: -#line 2112 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; case 256: -#line 2113 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; case 257: -#line 2115 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; case 258: -#line 2116 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; case 259: -#line 2117 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; case 260: -#line 2118 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; case 261: -#line 2119 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; case 262: -#line 2120 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; case 263: -#line 2121 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; case 264: -#line 2122 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; case 265: -#line 2123 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; case 266: -#line 2124 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; case 267: -#line 2125 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; case 268: -#line 2126 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; case 269: -#line 2127 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; case 270: -#line 2128 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; case 271: -#line 2135 "cs-parser.jay" +#line 2149 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2111,7 +2112,7 @@ case 272: case_272(); break; case 273: -#line 2154 "cs-parser.jay" +#line 2168 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2138,11 +2139,11 @@ case 280: case_280(); break; case 282: -#line 2257 "cs-parser.jay" +#line 2271 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 285: -#line 2269 "cs-parser.jay" +#line 2283 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2151,7 +2152,7 @@ case 286: case_286(); break; case 287: -#line 2279 "cs-parser.jay" +#line 2293 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2184,7 +2185,7 @@ case 296: case_296(); break; case 298: -#line 2388 "cs-parser.jay" +#line 2402 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2193,13 +2194,13 @@ case 299: case_299(); break; case 302: -#line 2405 "cs-parser.jay" +#line 2419 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 303: -#line 2409 "cs-parser.jay" +#line 2423 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2208,7 +2209,7 @@ case 304: case_304(); break; case 305: -#line 2422 "cs-parser.jay" +#line 2436 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2220,7 +2221,7 @@ case 307: case_307(); break; case 308: -#line 2447 "cs-parser.jay" +#line 2461 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2268,7 +2269,7 @@ case 326: case_326(); break; case 329: -#line 2602 "cs-parser.jay" +#line 2616 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2286,7 +2287,7 @@ case 334: case_334(); break; case 335: -#line 2660 "cs-parser.jay" +#line 2674 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2295,7 +2296,7 @@ case 336: case_336(); break; case 337: -#line 2682 "cs-parser.jay" +#line 2696 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2328,7 +2329,7 @@ case 350: case_350(); break; case 351: -#line 2786 "cs-parser.jay" +#line 2800 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2373,13 +2374,13 @@ case 366: case_366(); break; case 368: -#line 2904 "cs-parser.jay" +#line 2918 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2911 "cs-parser.jay" +#line 2925 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2394,7 +2395,7 @@ case 375: case_375(); break; case 377: -#line 2949 "cs-parser.jay" +#line 2963 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2403,7 +2404,7 @@ case 378: case_378(); break; case 379: -#line 2969 "cs-parser.jay" +#line 2983 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2412,13 +2413,13 @@ case 380: case_380(); break; case 381: -#line 2978 "cs-parser.jay" +#line 2992 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 2982 "cs-parser.jay" +#line 2996 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2436,63 +2437,63 @@ case 386: case_386(); break; case 387: -#line 3021 "cs-parser.jay" +#line 3035 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3022 "cs-parser.jay" +#line 3036 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3023 "cs-parser.jay" +#line 3037 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3024 "cs-parser.jay" +#line 3038 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3025 "cs-parser.jay" +#line 3039 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3026 "cs-parser.jay" +#line 3040 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3031 "cs-parser.jay" +#line 3045 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3032 "cs-parser.jay" +#line 3046 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3033 "cs-parser.jay" +#line 3047 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3034 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3035 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3036 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3037 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3038 "cs-parser.jay" +#line 3052 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3039 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2502,22 +2503,22 @@ case 424: case_424(); break; case 428: -#line 3086 "cs-parser.jay" +#line 3100 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3090 "cs-parser.jay" +#line 3104 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3091 "cs-parser.jay" +#line 3105 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3124 "cs-parser.jay" +#line 3138 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2535,7 +2536,7 @@ case 440: case_440(); break; case 441: -#line 3156 "cs-parser.jay" +#line 3170 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2544,7 +2545,7 @@ case 442: case_442(); break; case 443: -#line 3164 "cs-parser.jay" +#line 3178 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2556,7 +2557,7 @@ case 445: case_445(); break; case 446: -#line 3180 "cs-parser.jay" +#line 3194 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2566,11 +2567,11 @@ case 449: case_449(); break; case 450: -#line 3203 "cs-parser.jay" +#line 3217 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3207 "cs-parser.jay" +#line 3221 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2588,7 +2589,7 @@ case 455: case_455(); break; case 456: -#line 3240 "cs-parser.jay" +#line 3254 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2603,7 +2604,7 @@ case 459: case_459(); break; case 462: -#line 3268 "cs-parser.jay" +#line 3282 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2622,7 +2623,7 @@ case 468: case_468(); break; case 469: -#line 3320 "cs-parser.jay" +#line 3334 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2658,13 +2659,13 @@ case 483: case_483(); break; case 484: -#line 3407 "cs-parser.jay" +#line 3421 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3415 "cs-parser.jay" +#line 3429 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2676,13 +2677,13 @@ case 488: case_488(); break; case 489: -#line 3435 "cs-parser.jay" +#line 3449 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3442 "cs-parser.jay" +#line 3456 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2709,7 +2710,7 @@ case 497: case_497(); break; case 498: -#line 3508 "cs-parser.jay" +#line 3522 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2721,7 +2722,7 @@ case 500: case_500(); break; case 503: -#line 3535 "cs-parser.jay" +#line 3549 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2752,25 +2753,25 @@ case 516: case_516(); break; case 517: -#line 3613 "cs-parser.jay" +#line 3627 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3617 "cs-parser.jay" +#line 3631 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3624 "cs-parser.jay" +#line 3638 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3628 "cs-parser.jay" +#line 3642 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2788,7 +2789,7 @@ case 524: case_524(); break; case 525: -#line 3672 "cs-parser.jay" +#line 3686 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2833,7 +2834,7 @@ case 540: case_540(); break; case 541: -#line 3786 "cs-parser.jay" +#line 3800 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2842,25 +2843,25 @@ case 542: case_542(); break; case 543: -#line 3799 "cs-parser.jay" +#line 3813 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3803 "cs-parser.jay" +#line 3817 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3810 "cs-parser.jay" +#line 3824 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3818 "cs-parser.jay" +#line 3832 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2872,13 +2873,13 @@ case 549: case_549(); break; case 551: -#line 3844 "cs-parser.jay" +#line 3858 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3848 "cs-parser.jay" +#line 3862 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2890,37 +2891,37 @@ case 556: case_556(); break; case 558: -#line 3878 "cs-parser.jay" +#line 3892 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3882 "cs-parser.jay" +#line 3896 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3886 "cs-parser.jay" +#line 3900 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3890 "cs-parser.jay" +#line 3904 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3894 "cs-parser.jay" +#line 3908 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3898 "cs-parser.jay" +#line 3912 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2938,7 +2939,7 @@ case 569: case_569(); break; case 570: -#line 3930 "cs-parser.jay" +#line 3944 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2947,13 +2948,13 @@ case 571: case_571(); break; case 572: -#line 3939 "cs-parser.jay" +#line 3953 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3943 "cs-parser.jay" +#line 3957 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3004,7 +3005,7 @@ case 598: case_598(); break; case 599: -#line 4067 "cs-parser.jay" +#line 4081 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3055,14 +3056,14 @@ case 614: case_614(); break; case 615: -#line 4164 "cs-parser.jay" +#line 4178 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4179 "cs-parser.jay" +#line 4193 "cs-parser.jay" { start_block (lexer.Location); } @@ -3086,7 +3087,7 @@ case 626: case_626(); break; case 627: -#line 4224 "cs-parser.jay" +#line 4238 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3098,7 +3099,7 @@ case 629: case_629(); break; case 630: -#line 4238 "cs-parser.jay" +#line 4252 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3110,7 +3111,7 @@ case 632: case_632(); break; case 638: -#line 4263 "cs-parser.jay" +#line 4277 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3125,13 +3126,13 @@ case 641: case_641(); break; case 643: -#line 4292 "cs-parser.jay" +#line 4306 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4305 "cs-parser.jay" +#line 4319 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3149,11 +3150,11 @@ case 648: case_648(); break; case 649: -#line 4344 "cs-parser.jay" +#line 4358 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4346 "cs-parser.jay" +#line 4360 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3208,13 +3209,13 @@ case 669: case_669(); break; case 671: -#line 4466 "cs-parser.jay" +#line 4480 "cs-parser.jay" { current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } break; case 673: -#line 4474 "cs-parser.jay" +#line 4488 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3244,19 +3245,19 @@ case 681: case_681(); break; case 682: -#line 4563 "cs-parser.jay" +#line 4577 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4567 "cs-parser.jay" +#line 4581 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4574 "cs-parser.jay" +#line 4588 "cs-parser.jay" { yyVal = Variance.None; } @@ -3265,13 +3266,13 @@ case 685: case_685(); break; case 686: -#line 4588 "cs-parser.jay" +#line 4602 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4592 "cs-parser.jay" +#line 4606 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3280,7 +3281,7 @@ case 688: case_688(); break; case 689: -#line 4617 "cs-parser.jay" +#line 4631 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3298,13 +3299,13 @@ case 693: case_693(); break; case 698: -#line 4661 "cs-parser.jay" +#line 4675 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4665 "cs-parser.jay" +#line 4679 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3313,13 +3314,13 @@ case 701: case_701(); break; case 704: -#line 4689 "cs-parser.jay" +#line 4703 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4693 "cs-parser.jay" +#line 4707 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3352,13 +3353,13 @@ case 744: case_744(); break; case 745: -#line 4837 "cs-parser.jay" +#line 4851 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4841 "cs-parser.jay" +#line 4855 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3370,7 +3371,7 @@ case 749: case_749(); break; case 750: -#line 4862 "cs-parser.jay" +#line 4876 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3400,7 +3401,7 @@ case 763: case_763(); break; case 764: -#line 4951 "cs-parser.jay" +#line 4965 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3421,15 +3422,15 @@ case 774: case_774(); break; case 775: -#line 5001 "cs-parser.jay" +#line 5015 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5005 "cs-parser.jay" +#line 5019 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5006 "cs-parser.jay" +#line 5020 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3448,7 +3449,7 @@ case 784: case_784(); break; case 785: -#line 5074 "cs-parser.jay" +#line 5088 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3469,13 +3470,13 @@ case 791: case_791(); break; case 792: -#line 5118 "cs-parser.jay" +#line 5132 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5122 "cs-parser.jay" +#line 5136 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3490,7 +3491,7 @@ case 796: case_796(); break; case 797: -#line 5151 "cs-parser.jay" +#line 5165 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3505,7 +3506,7 @@ case 804: case_804(); break; case 805: -#line 5190 "cs-parser.jay" +#line 5204 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3517,7 +3518,7 @@ case 807: case_807(); break; case 808: -#line 5218 "cs-parser.jay" +#line 5232 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3527,11 +3528,11 @@ case 811: case_811(); break; case 813: -#line 5239 "cs-parser.jay" +#line 5253 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5244 "cs-parser.jay" +#line 5258 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3574,7 +3575,7 @@ case 837: case_837(); break; case 840: -#line 5399 "cs-parser.jay" +#line 5413 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3595,7 +3596,7 @@ case 845: case_845(); break; case 848: -#line 5452 "cs-parser.jay" +#line 5466 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3604,7 +3605,7 @@ case 849: case_849(); break; case 850: -#line 5471 "cs-parser.jay" +#line 5485 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3613,13 +3614,13 @@ case 851: case_851(); break; case 852: -#line 5489 "cs-parser.jay" +#line 5503 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5496 "cs-parser.jay" +#line 5510 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3628,7 +3629,7 @@ case 854: case_854(); break; case 855: -#line 5506 "cs-parser.jay" +#line 5520 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3658,7 +3659,7 @@ case 863: case_863(); break; case 864: -#line 5589 "cs-parser.jay" +#line 5603 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3691,7 +3692,7 @@ case 873: case_873(); break; case 874: -#line 5689 "cs-parser.jay" +#line 5703 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3700,7 +3701,7 @@ case 875: case_875(); break; case 876: -#line 5704 "cs-parser.jay" +#line 5718 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3715,7 +3716,7 @@ case 880: case_880(); break; case 881: -#line 5749 "cs-parser.jay" +#line 5763 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3736,7 +3737,7 @@ case 889: case_889(); break; case 895: -#line 5808 "cs-parser.jay" +#line 5822 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3745,7 +3746,7 @@ case 896: case_896(); break; case 897: -#line 5827 "cs-parser.jay" +#line 5841 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3778,13 +3779,13 @@ case 906: case_906(); break; case 908: -#line 5971 "cs-parser.jay" +#line 5985 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 5978 "cs-parser.jay" +#line 5992 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3805,7 +3806,7 @@ case 916: case_916(); break; case 917: -#line 6024 "cs-parser.jay" +#line 6038 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3817,7 +3818,7 @@ case 919: case_919(); break; case 920: -#line 6041 "cs-parser.jay" +#line 6055 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3841,13 +3842,13 @@ case 929: case_929(); break; case 937: -#line 6165 "cs-parser.jay" +#line 6179 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6172 "cs-parser.jay" +#line 6186 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3859,13 +3860,13 @@ case 940: case_940(); break; case 941: -#line 6189 "cs-parser.jay" +#line 6203 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6193 "cs-parser.jay" +#line 6207 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3883,25 +3884,25 @@ case 946: case_946(); break; case 948: -#line 6229 "cs-parser.jay" +#line 6243 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6237 "cs-parser.jay" +#line 6251 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6241 "cs-parser.jay" +#line 6255 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6248 "cs-parser.jay" +#line 6262 "cs-parser.jay" { yyVal = new List (0); } @@ -3951,7 +3952,7 @@ case 956: All more than 3 lines long rules are wrapped into a method */ void case_6() -#line 404 "cs-parser.jay" +#line 405 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { Attributes attrs = (Attributes) yyVals[0+yyTop]; @@ -3961,7 +3962,7 @@ void case_6() } void case_8() -#line 416 "cs-parser.jay" +#line 417 "cs-parser.jay" { if (yyToken == Token.EXTERN_ALIAS) report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); @@ -3970,7 +3971,7 @@ void case_8() } void case_13() -#line 436 "cs-parser.jay" +#line 437 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -3986,21 +3987,21 @@ void case_13() } void case_17() -#line 462 "cs-parser.jay" +#line 463 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_18() -#line 467 "cs-parser.jay" +#line 468 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_19() -#line 475 "cs-parser.jay" +#line 476 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") { @@ -4013,21 +4014,21 @@ void case_19() } void case_20() -#line 486 "cs-parser.jay" +#line 487 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_21() -#line 494 "cs-parser.jay" +#line 495 "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_22() -#line 507 "cs-parser.jay" +#line 508 "cs-parser.jay" { Attributes attrs = (Attributes) yyVals[-2+yyTop]; MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4060,7 +4061,7 @@ void case_22() } void case_23() -#line 538 "cs-parser.jay" +#line 539 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -4068,7 +4069,7 @@ void case_23() } void case_24() -#line 544 "cs-parser.jay" +#line 545 "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])); @@ -4083,28 +4084,28 @@ void case_24() } void case_25() -#line 560 "cs-parser.jay" +#line 561 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName (lt.Value, lt.Location); } void case_26() -#line 565 "cs-parser.jay" +#line 566 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); } void case_27() -#line 570 "cs-parser.jay" +#line 571 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 588 "cs-parser.jay" +#line 589 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4115,7 +4116,7 @@ void case_32() } void case_41() -#line 620 "cs-parser.jay" +#line 621 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4136,7 +4137,7 @@ void case_41() } void case_50() -#line 670 "cs-parser.jay" +#line 671 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4148,7 +4149,7 @@ void case_50() } void case_51() -#line 680 "cs-parser.jay" +#line 681 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4160,21 +4161,21 @@ void case_51() } void case_52() -#line 693 "cs-parser.jay" +#line 694 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 698 "cs-parser.jay" +#line 699 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 706 "cs-parser.jay" +#line 707 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4183,7 +4184,7 @@ void case_54() } void case_55() -#line 713 "cs-parser.jay" +#line 714 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4197,21 +4198,21 @@ void case_55() } void case_56() -#line 725 "cs-parser.jay" +#line 726 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_57() -#line 733 "cs-parser.jay" +#line 734 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } void case_60() -#line 740 "cs-parser.jay" +#line 741 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4223,7 +4224,7 @@ void case_60() } void case_62() -#line 757 "cs-parser.jay" +#line 758 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4233,7 +4234,7 @@ void case_62() } void case_64() -#line 772 "cs-parser.jay" +#line 773 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4251,7 +4252,7 @@ void case_64() } void case_67() -#line 796 "cs-parser.jay" +#line 797 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4259,7 +4260,7 @@ void case_67() } void case_69() -#line 807 "cs-parser.jay" +#line 808 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4267,7 +4268,7 @@ void case_69() } void case_70() -#line 813 "cs-parser.jay" +#line 814 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4275,7 +4276,7 @@ void case_70() } void case_71() -#line 819 "cs-parser.jay" +#line 820 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4292,7 +4293,7 @@ void case_71() } void case_72() -#line 834 "cs-parser.jay" +#line 835 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4304,7 +4305,7 @@ void case_72() } void case_76() -#line 859 "cs-parser.jay" +#line 860 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4313,7 +4314,7 @@ void case_76() } void case_77() -#line 869 "cs-parser.jay" +#line 870 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4326,7 +4327,7 @@ void case_77() } void case_95() -#line 916 "cs-parser.jay" +#line 917 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4335,14 +4336,14 @@ void case_95() } void case_97() -#line 933 "cs-parser.jay" +#line 934 "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_98() -#line 939 "cs-parser.jay" +#line 940 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4355,7 +4356,7 @@ void case_98() } void case_99() -#line 950 "cs-parser.jay" +#line 951 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -4363,21 +4364,21 @@ void case_99() } void case_100() -#line 956 "cs-parser.jay" +#line 957 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[0+yyTop])); yyVal = pop_current_class (); } void case_102() -#line 968 "cs-parser.jay" +#line 969 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_118() -#line 1010 "cs-parser.jay" +#line 1011 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4392,7 +4393,7 @@ void case_118() } void case_119() -#line 1023 "cs-parser.jay" +#line 1024 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4405,7 +4406,7 @@ void case_119() } void case_124() -#line 1053 "cs-parser.jay" +#line 1054 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4413,7 +4414,7 @@ void case_124() } void case_126() -#line 1066 "cs-parser.jay" +#line 1067 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4421,14 +4422,14 @@ void case_126() } void case_127() -#line 1072 "cs-parser.jay" +#line 1073 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_130() -#line 1087 "cs-parser.jay" +#line 1088 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4443,7 +4444,7 @@ void case_130() } void case_131() -#line 1102 "cs-parser.jay" +#line 1103 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4456,7 +4457,7 @@ void case_131() } void case_132() -#line 1115 "cs-parser.jay" +#line 1116 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4469,7 +4470,7 @@ void case_132() } void case_133() -#line 1126 "cs-parser.jay" +#line 1127 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4483,7 +4484,7 @@ void case_133() } void case_136() -#line 1149 "cs-parser.jay" +#line 1150 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4491,7 +4492,7 @@ void case_136() } void case_137() -#line 1155 "cs-parser.jay" +#line 1156 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4501,7 +4502,7 @@ void case_137() } void case_142() -#line 1182 "cs-parser.jay" +#line 1183 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4509,7 +4510,7 @@ void case_142() } void case_144() -#line 1192 "cs-parser.jay" +#line 1193 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4518,7 +4519,7 @@ void case_144() } void case_149() -#line 1218 "cs-parser.jay" +#line 1219 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4526,7 +4527,7 @@ void case_149() } void case_151() -#line 1231 "cs-parser.jay" +#line 1232 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4534,14 +4535,14 @@ void case_151() } void case_152() -#line 1237 "cs-parser.jay" +#line 1238 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_155() -#line 1247 "cs-parser.jay" +#line 1248 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4549,7 +4550,7 @@ void case_155() } void case_156() -#line 1256 "cs-parser.jay" +#line 1257 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4559,7 +4560,7 @@ void case_156() } void case_157() -#line 1264 "cs-parser.jay" +#line 1265 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4585,7 +4586,7 @@ void case_157() } void case_160() -#line 1302 "cs-parser.jay" +#line 1303 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4620,14 +4621,14 @@ void case_160() } void case_162() -#line 1343 "cs-parser.jay" +#line 1344 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_164() -#line 1352 "cs-parser.jay" +#line 1353 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4679,7 +4680,7 @@ void case_164() } void case_165() -#line 1405 "cs-parser.jay" +#line 1406 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4697,90 +4698,103 @@ void case_165() } void case_170() -#line 1434 "cs-parser.jay" +#line 1435 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); - lbag.AddLocation (yyVal, lbag.GetLocations (pars_list)); + lbag.AddLocation (yyVal, parameterListCommas); } void case_171() -#line 1440 "cs-parser.jay" +#line 1441 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); - + parameterListCommas.Add (GetLocation (yyVals[-1+yyTop])); + yyVal = new ParametersCompiled (pars_list.ToArray ()); + lbag.AddLocation (yyVal, parameterListCommas); } void case_172() -#line 1447 "cs-parser.jay" +#line 1450 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); + parameterListCommas.Add (GetLocation (yyVals[-1+yyTop])); + yyVal = new ParametersCompiled (pars_list.ToArray (), true); + lbag.AddLocation (yyVal, parameterListCommas); } void case_173() -#line 1453 "cs-parser.jay" +#line 1459 "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"); yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[-2+yyTop] } ); + lbag.AddLocation (yyVal, parameterListCommas); } void case_174() -#line 1460 "cs-parser.jay" +#line 1467 "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"); var pars_list = (List) yyVals[-4+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[-2+yyTop]))); - + parameterListCommas.Add (GetLocation (yyVals[-3+yyTop])); + parameterListCommas.Add (GetLocation (yyVals[-1+yyTop])); + yyVal = new ParametersCompiled (pars_list.ToArray (), true); + lbag.AddLocation (yyVal, parameterListCommas); } void case_175() -#line 1470 "cs-parser.jay" +#line 1480 "cs-parser.jay" { 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); + lbag.AddLocation (yyVal, parameterListCommas); } void case_176() -#line 1476 "cs-parser.jay" +#line 1487 "cs-parser.jay" { 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]))); + parameterListCommas.Add (GetLocation (yyVals[-3+yyTop])); + parameterListCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = new ParametersCompiled (pars_list.ToArray (), true); + lbag.AddLocation (yyVal, parameterListCommas); } void case_179() -#line 1493 "cs-parser.jay" +#line 1507 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_180() -#line 1501 "cs-parser.jay" +#line 1515 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; parameters_bucket.Add (p); - + parameterListCommas.Clear (); default_parameter_used = p.HasDefaultValue; yyVal = parameters_bucket; } void case_181() -#line 1510 "cs-parser.jay" +#line 1524 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4793,14 +4807,14 @@ void case_181() default_parameter_used |= p.HasDefaultValue; pars.Add (p); - lbag.AppendTo (pars, GetLocation (yyVals[-1+yyTop])); + parameterListCommas.Add (GetLocation (yyVals[-1+yyTop])); } yyVal = yyVals[-2+yyTop]; } void case_182() -#line 1534 "cs-parser.jay" +#line 1548 "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); @@ -4808,7 +4822,7 @@ void case_182() } void case_183() -#line 1543 "cs-parser.jay" +#line 1557 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4817,7 +4831,7 @@ void case_183() } void case_184() -#line 1553 "cs-parser.jay" +#line 1567 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4826,7 +4840,7 @@ void case_184() } void case_186() -#line 1568 "cs-parser.jay" +#line 1582 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4865,14 +4879,14 @@ void case_186() } void case_189() -#line 1613 "cs-parser.jay" +#line 1627 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; parameterModifierLocation = GetLocation (yyVals[0+yyTop]); } void case_190() -#line 1618 "cs-parser.jay" +#line 1632 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4895,7 +4909,7 @@ void case_190() } void case_191() -#line 1642 "cs-parser.jay" +#line 1656 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4904,7 +4918,7 @@ void case_191() } void case_192() -#line 1649 "cs-parser.jay" +#line 1663 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4913,7 +4927,7 @@ void case_192() } void case_193() -#line 1656 "cs-parser.jay" +#line 1670 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4925,14 +4939,14 @@ void case_193() } void case_194() -#line 1669 "cs-parser.jay" +#line 1683 "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_195() -#line 1674 "cs-parser.jay" +#line 1688 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4941,21 +4955,21 @@ void case_195() } void case_196() -#line 1681 "cs-parser.jay" +#line 1695 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_197() -#line 1689 "cs-parser.jay" +#line 1703 "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"); } void case_198() -#line 1694 "cs-parser.jay" +#line 1708 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4966,21 +4980,21 @@ void case_198() } void case_200() -#line 1710 "cs-parser.jay" +#line 1724 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_201() -#line 1721 "cs-parser.jay" +#line 1735 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_202() -#line 1726 "cs-parser.jay" +#line 1740 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -4996,7 +5010,7 @@ void case_202() } void case_203() -#line 1740 "cs-parser.jay" +#line 1754 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5005,14 +5019,14 @@ void case_203() } void case_204() -#line 1747 "cs-parser.jay" +#line 1761 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_206() -#line 1761 "cs-parser.jay" +#line 1775 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5039,7 +5053,7 @@ void case_206() } void case_208() -#line 1790 "cs-parser.jay" +#line 1804 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5052,7 +5066,7 @@ void case_208() } void case_213() -#line 1809 "cs-parser.jay" +#line 1823 "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 ()); @@ -5065,7 +5079,7 @@ void case_213() } void case_214() -#line 1823 "cs-parser.jay" +#line 1837 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5088,7 +5102,7 @@ void case_214() } void case_215() -#line 1844 "cs-parser.jay" +#line 1858 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5111,7 +5125,7 @@ void case_215() } void case_216() -#line 1868 "cs-parser.jay" +#line 1882 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5139,7 +5153,7 @@ void case_216() } void case_217() -#line 1894 "cs-parser.jay" +#line 1908 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5162,21 +5176,21 @@ void case_217() } void case_219() -#line 1919 "cs-parser.jay" +#line 1933 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1924 "cs-parser.jay" +#line 1938 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1939 "cs-parser.jay" +#line 1953 "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]); @@ -5184,7 +5198,7 @@ void case_222() } void case_223() -#line 1946 "cs-parser.jay" +#line 1960 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5197,7 +5211,7 @@ void case_223() } void case_224() -#line 1957 "cs-parser.jay" +#line 1971 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5205,14 +5219,14 @@ void case_224() } void case_225() -#line 1963 "cs-parser.jay" +#line 1977 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); yyVal = pop_current_class (); } void case_241() -#line 2015 "cs-parser.jay" +#line 2029 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5239,14 +5253,14 @@ void case_241() } void case_245() -#line 2049 "cs-parser.jay" +#line 2063 "cs-parser.jay" { 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_247() -#line 2061 "cs-parser.jay" +#line 2075 "cs-parser.jay" { valid_param_mod = 0; @@ -5288,7 +5302,7 @@ void case_247() } void case_272() -#line 2137 "cs-parser.jay" +#line 2151 "cs-parser.jay" { valid_param_mod = 0; @@ -5305,7 +5319,7 @@ void case_272() } void case_274() -#line 2156 "cs-parser.jay" +#line 2170 "cs-parser.jay" { valid_param_mod = 0; @@ -5322,7 +5336,7 @@ void case_274() } void case_275() -#line 2171 "cs-parser.jay" +#line 2185 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5330,7 +5344,7 @@ void case_275() } void case_276() -#line 2177 "cs-parser.jay" +#line 2191 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5338,7 +5352,7 @@ void case_276() } void case_277() -#line 2187 "cs-parser.jay" +#line 2201 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5354,7 +5368,7 @@ void case_277() } void case_278() -#line 2206 "cs-parser.jay" +#line 2220 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5365,7 +5379,7 @@ void case_278() } void case_279() -#line 2215 "cs-parser.jay" +#line 2229 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5378,7 +5392,7 @@ void case_279() } void case_280() -#line 2226 "cs-parser.jay" +#line 2240 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5408,7 +5422,7 @@ void case_280() } void case_286() -#line 2271 "cs-parser.jay" +#line 2285 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5416,7 +5430,7 @@ void case_286() } void case_288() -#line 2281 "cs-parser.jay" +#line 2295 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5424,14 +5438,14 @@ void case_288() } void case_289() -#line 2287 "cs-parser.jay" +#line 2301 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_290() -#line 2295 "cs-parser.jay" +#line 2309 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5442,7 +5456,7 @@ void case_290() } void case_291() -#line 2304 "cs-parser.jay" +#line 2318 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5464,7 +5478,7 @@ void case_291() } void case_292() -#line 2329 "cs-parser.jay" +#line 2343 "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); @@ -5478,7 +5492,7 @@ void case_292() } void case_293() -#line 2343 "cs-parser.jay" +#line 2357 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5490,7 +5504,7 @@ void case_293() } void case_294() -#line 2356 "cs-parser.jay" +#line 2370 "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); @@ -5500,7 +5514,7 @@ void case_294() } void case_295() -#line 2364 "cs-parser.jay" +#line 2378 "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"); @@ -5509,7 +5523,7 @@ void case_295() } void case_296() -#line 2371 "cs-parser.jay" +#line 2385 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5522,14 +5536,14 @@ void case_296() } void case_299() -#line 2390 "cs-parser.jay" +#line 2404 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_304() -#line 2414 "cs-parser.jay" +#line 2428 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5537,7 +5551,7 @@ void case_304() } void case_306() -#line 2424 "cs-parser.jay" +#line 2438 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5546,7 +5560,7 @@ void case_306() } void case_307() -#line 2433 "cs-parser.jay" +#line 2447 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5560,28 +5574,28 @@ void case_307() } void case_311() -#line 2454 "cs-parser.jay" +#line 2468 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_312() -#line 2459 "cs-parser.jay" +#line 2473 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_313() -#line 2464 "cs-parser.jay" +#line 2478 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_314() -#line 2472 "cs-parser.jay" +#line 2486 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5595,7 +5609,7 @@ void case_314() } void case_315() -#line 2484 "cs-parser.jay" +#line 2498 "cs-parser.jay" { lexer.EventParsing = true; @@ -5610,7 +5624,7 @@ void case_315() } void case_316() -#line 2500 "cs-parser.jay" +#line 2514 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5624,7 +5638,7 @@ void case_316() } void case_317() -#line 2512 "cs-parser.jay" +#line 2526 "cs-parser.jay" { lexer.EventParsing = true; @@ -5639,21 +5653,21 @@ void case_317() } void case_318() -#line 2528 "cs-parser.jay" +#line 2542 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_320() -#line 2540 "cs-parser.jay" +#line 2554 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2545 "cs-parser.jay" +#line 2559 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5667,7 +5681,7 @@ void case_321() } void case_322() -#line 2557 "cs-parser.jay" +#line 2571 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5675,7 +5689,7 @@ void case_322() } void case_323() -#line 2563 "cs-parser.jay" +#line 2577 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5690,7 +5704,7 @@ void case_323() } void case_325() -#line 2580 "cs-parser.jay" +#line 2594 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5702,21 +5716,21 @@ void case_325() } void case_326() -#line 2590 "cs-parser.jay" +#line 2604 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2608 "cs-parser.jay" +#line 2622 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2616 "cs-parser.jay" +#line 2630 "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]); @@ -5731,7 +5745,7 @@ void case_332() } void case_333() -#line 2629 "cs-parser.jay" +#line 2643 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5741,7 +5755,7 @@ void case_333() } void case_334() -#line 2637 "cs-parser.jay" +#line 2651 "cs-parser.jay" { --lexer.parsing_block; @@ -5757,7 +5771,7 @@ void case_334() } void case_336() -#line 2662 "cs-parser.jay" +#line 2676 "cs-parser.jay" { valid_param_mod = 0; @@ -5777,7 +5791,7 @@ void case_336() } void case_338() -#line 2684 "cs-parser.jay" +#line 2698 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5793,7 +5807,7 @@ void case_338() } void case_340() -#line 2702 "cs-parser.jay" +#line 2716 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5802,7 +5816,7 @@ void case_340() } void case_342() -#line 2713 "cs-parser.jay" +#line 2727 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5811,7 +5825,7 @@ void case_342() } void case_344() -#line 2724 "cs-parser.jay" +#line 2738 "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); @@ -5819,14 +5833,14 @@ void case_344() } void case_345() -#line 2733 "cs-parser.jay" +#line 2747 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2745 "cs-parser.jay" +#line 2759 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5839,14 +5853,14 @@ void case_347() } void case_348() -#line 2756 "cs-parser.jay" +#line 2770 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2764 "cs-parser.jay" +#line 2778 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5855,7 +5869,7 @@ void case_349() } void case_350() -#line 2771 "cs-parser.jay" +#line 2785 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5864,7 +5878,7 @@ void case_350() } void case_352() -#line 2788 "cs-parser.jay" +#line 2802 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5872,7 +5886,7 @@ void case_352() } void case_353() -#line 2797 "cs-parser.jay" +#line 2811 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5881,7 +5895,7 @@ void case_353() } void case_355() -#line 2808 "cs-parser.jay" +#line 2822 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5889,21 +5903,21 @@ void case_355() } void case_356() -#line 2817 "cs-parser.jay" +#line 2831 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2822 "cs-parser.jay" +#line 2836 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2830 "cs-parser.jay" +#line 2844 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5911,7 +5925,7 @@ void case_358() } void case_359() -#line 2836 "cs-parser.jay" +#line 2850 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5921,7 +5935,7 @@ void case_359() } void case_360() -#line 2844 "cs-parser.jay" +#line 2858 "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); @@ -5929,7 +5943,7 @@ void case_360() } void case_362() -#line 2854 "cs-parser.jay" +#line 2868 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5939,7 +5953,7 @@ void case_362() } void case_363() -#line 2865 "cs-parser.jay" +#line 2879 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5947,7 +5961,7 @@ void case_363() } void case_364() -#line 2871 "cs-parser.jay" +#line 2885 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5956,14 +5970,14 @@ void case_364() } void case_365() -#line 2881 "cs-parser.jay" +#line 2895 "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_366() -#line 2886 "cs-parser.jay" +#line 2900 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -5974,28 +5988,28 @@ void case_366() } void case_371() -#line 2920 "cs-parser.jay" +#line 2934 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2929 "cs-parser.jay" +#line 2943 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2938 "cs-parser.jay" +#line 2952 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2954 "cs-parser.jay" +#line 2968 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6010,14 +6024,14 @@ void case_378() } void case_380() -#line 2971 "cs-parser.jay" +#line 2985 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 2987 "cs-parser.jay" +#line 3001 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6025,7 +6039,7 @@ void case_383() } void case_384() -#line 2993 "cs-parser.jay" +#line 3007 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6034,7 +6048,7 @@ void case_384() } void case_385() -#line 3003 "cs-parser.jay" +#line 3017 "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 ()); @@ -6043,35 +6057,35 @@ void case_385() } void case_386() -#line 3010 "cs-parser.jay" +#line 3024 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3072 "cs-parser.jay" +#line 3086 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3076 "cs-parser.jay" +#line 3090 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3117 "cs-parser.jay" +#line 3131 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3129 "cs-parser.jay" +#line 3143 "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); @@ -6079,7 +6093,7 @@ void case_437() } void case_438() -#line 3135 "cs-parser.jay" +#line 3149 "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); @@ -6087,7 +6101,7 @@ void case_438() } void case_439() -#line 3141 "cs-parser.jay" +#line 3155 "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); @@ -6095,7 +6109,7 @@ void case_439() } void case_440() -#line 3147 "cs-parser.jay" +#line 3161 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6105,28 +6119,28 @@ void case_440() } void case_442() -#line 3157 "cs-parser.jay" +#line 3171 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3165 "cs-parser.jay" +#line 3179 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3173 "cs-parser.jay" +#line 3187 "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_448() -#line 3186 "cs-parser.jay" +#line 3200 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6138,14 +6152,14 @@ void case_448() } void case_449() -#line 3196 "cs-parser.jay" +#line 3210 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3212 "cs-parser.jay" +#line 3226 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6153,7 +6167,7 @@ void case_452() } void case_453() -#line 3218 "cs-parser.jay" +#line 3232 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6162,14 +6176,14 @@ void case_453() } void case_454() -#line 3224 "cs-parser.jay" +#line 3238 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3232 "cs-parser.jay" +#line 3246 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6177,7 +6191,7 @@ void case_455() } void case_457() -#line 3241 "cs-parser.jay" +#line 3255 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6187,7 +6201,7 @@ void case_457() } void case_458() -#line 3249 "cs-parser.jay" +#line 3263 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6196,14 +6210,14 @@ void case_458() } void case_459() -#line 3256 "cs-parser.jay" +#line 3270 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3274 "cs-parser.jay" +#line 3288 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6211,7 +6225,7 @@ void case_464() } void case_465() -#line 3280 "cs-parser.jay" +#line 3294 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6223,7 +6237,7 @@ void case_465() } void case_466() -#line 3290 "cs-parser.jay" +#line 3304 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6240,56 +6254,56 @@ void case_466() } void case_467() -#line 3305 "cs-parser.jay" +#line 3319 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3310 "cs-parser.jay" +#line 3324 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3331 "cs-parser.jay" +#line 3345 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3336 "cs-parser.jay" +#line 3350 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3341 "cs-parser.jay" +#line 3355 "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_476() -#line 3346 "cs-parser.jay" +#line 3360 "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_478() -#line 3358 "cs-parser.jay" +#line 3372 "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_479() -#line 3366 "cs-parser.jay" +#line 3380 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6297,7 +6311,7 @@ void case_479() } void case_480() -#line 3372 "cs-parser.jay" +#line 3386 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6306,14 +6320,14 @@ void case_480() } void case_481() -#line 3378 "cs-parser.jay" +#line 3392 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3386 "cs-parser.jay" +#line 3400 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6321,7 +6335,7 @@ void case_482() } void case_483() -#line 3392 "cs-parser.jay" +#line 3406 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6333,21 +6347,21 @@ void case_483() } void case_487() -#line 3420 "cs-parser.jay" +#line 3434 "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_488() -#line 3425 "cs-parser.jay" +#line 3439 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3447 "cs-parser.jay" +#line 3461 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6362,7 +6376,7 @@ void case_491() } void case_492() -#line 3460 "cs-parser.jay" +#line 3474 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6371,7 +6385,7 @@ void case_492() } void case_493() -#line 3472 "cs-parser.jay" +#line 3486 "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])) { @@ -6381,7 +6395,7 @@ void case_493() } void case_494() -#line 3480 "cs-parser.jay" +#line 3494 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6390,7 +6404,7 @@ void case_494() } void case_495() -#line 3487 "cs-parser.jay" +#line 3501 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6399,28 +6413,28 @@ void case_495() } void case_496() -#line 3494 "cs-parser.jay" +#line 3508 "cs-parser.jay" { 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_497() -#line 3499 "cs-parser.jay" +#line 3513 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3510 "cs-parser.jay" +#line 3524 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3518 "cs-parser.jay" +#line 3532 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6432,7 +6446,7 @@ void case_500() } void case_505() -#line 3541 "cs-parser.jay" +#line 3555 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6440,7 +6454,7 @@ void case_505() } void case_506() -#line 3547 "cs-parser.jay" +#line 3561 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6450,7 +6464,7 @@ void case_506() } void case_507() -#line 3558 "cs-parser.jay" +#line 3572 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6458,7 +6472,7 @@ void case_507() } void case_508() -#line 3564 "cs-parser.jay" +#line 3578 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6466,14 +6480,14 @@ void case_508() } void case_509() -#line 3570 "cs-parser.jay" +#line 3584 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3575 "cs-parser.jay" +#line 3589 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6481,28 +6495,28 @@ void case_510() } void case_514() -#line 3590 "cs-parser.jay" +#line 3604 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3598 "cs-parser.jay" +#line 3612 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3603 "cs-parser.jay" +#line 3617 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3633 "cs-parser.jay" +#line 3647 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6511,7 +6525,7 @@ void case_521() } void case_522() -#line 3640 "cs-parser.jay" +#line 3654 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6524,7 +6538,7 @@ void case_522() } void case_523() -#line 3654 "cs-parser.jay" +#line 3668 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6532,7 +6546,7 @@ void case_523() } void case_524() -#line 3660 "cs-parser.jay" +#line 3674 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6541,7 +6555,7 @@ void case_524() } void case_526() -#line 3674 "cs-parser.jay" +#line 3688 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6549,14 +6563,14 @@ void case_526() } void case_529() -#line 3685 "cs-parser.jay" +#line 3699 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3693 "cs-parser.jay" +#line 3707 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6564,7 +6578,7 @@ void case_530() } void case_531() -#line 3699 "cs-parser.jay" +#line 3713 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6574,7 +6588,7 @@ void case_531() } void case_532() -#line 3707 "cs-parser.jay" +#line 3721 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6582,7 +6596,7 @@ void case_532() } void case_533() -#line 3713 "cs-parser.jay" +#line 3727 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6590,7 +6604,7 @@ void case_533() } void case_534() -#line 3719 "cs-parser.jay" +#line 3733 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6601,7 +6615,7 @@ void case_534() } void case_535() -#line 3731 "cs-parser.jay" +#line 3745 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6610,7 +6624,7 @@ void case_535() } void case_536() -#line 3741 "cs-parser.jay" +#line 3755 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6620,35 +6634,35 @@ void case_536() } void case_537() -#line 3752 "cs-parser.jay" +#line 3766 "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_538() -#line 3760 "cs-parser.jay" +#line 3774 "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_539() -#line 3768 "cs-parser.jay" +#line 3782 "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_540() -#line 3776 "cs-parser.jay" +#line 3790 "cs-parser.jay" { 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_542() -#line 3788 "cs-parser.jay" +#line 3802 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6659,7 +6673,7 @@ void case_542() } void case_548() -#line 3820 "cs-parser.jay" +#line 3834 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6668,7 +6682,7 @@ void case_548() } void case_549() -#line 3830 "cs-parser.jay" +#line 3844 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6678,147 +6692,147 @@ void case_549() } void case_555() -#line 3855 "cs-parser.jay" +#line 3869 "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_556() -#line 3863 "cs-parser.jay" +#line 3877 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3904 "cs-parser.jay" +#line 3918 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3909 "cs-parser.jay" +#line 3923 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3914 "cs-parser.jay" +#line 3928 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3923 "cs-parser.jay" +#line 3937 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3932 "cs-parser.jay" +#line 3946 "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_575() -#line 3949 "cs-parser.jay" +#line 3963 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3954 "cs-parser.jay" +#line 3968 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3963 "cs-parser.jay" +#line 3977 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 3968 "cs-parser.jay" +#line 3982 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 3973 "cs-parser.jay" +#line 3987 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 3978 "cs-parser.jay" +#line 3992 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 3987 "cs-parser.jay" +#line 4001 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 3992 "cs-parser.jay" +#line 4006 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4001 "cs-parser.jay" +#line 4015 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4010 "cs-parser.jay" +#line 4024 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4019 "cs-parser.jay" +#line 4033 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4028 "cs-parser.jay" +#line 4042 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4037 "cs-parser.jay" +#line 4051 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4046 "cs-parser.jay" +#line 4060 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6827,84 +6841,84 @@ void case_596() } void case_598() -#line 4057 "cs-parser.jay" +#line 4071 "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_600() -#line 4069 "cs-parser.jay" +#line 4083 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4074 "cs-parser.jay" +#line 4088 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4079 "cs-parser.jay" +#line 4093 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4084 "cs-parser.jay" +#line 4098 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4089 "cs-parser.jay" +#line 4103 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4094 "cs-parser.jay" +#line 4108 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4099 "cs-parser.jay" +#line 4113 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4104 "cs-parser.jay" +#line 4118 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4109 "cs-parser.jay" +#line 4123 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4114 "cs-parser.jay" +#line 4128 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4122 "cs-parser.jay" +#line 4136 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6913,7 +6927,7 @@ void case_610() } void case_611() -#line 4129 "cs-parser.jay" +#line 4143 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6928,7 +6942,7 @@ void case_611() } void case_612() -#line 4145 "cs-parser.jay" +#line 4159 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6936,7 +6950,7 @@ void case_612() } void case_613() -#line 4151 "cs-parser.jay" +#line 4165 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6944,21 +6958,21 @@ void case_613() } void case_614() -#line 4157 "cs-parser.jay" +#line 4171 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4165 "cs-parser.jay" +#line 4179 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4181 "cs-parser.jay" +#line 4195 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6967,14 +6981,14 @@ void case_620() } void case_622() -#line 4192 "cs-parser.jay" +#line 4206 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4200 "cs-parser.jay" +#line 4214 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -6982,14 +6996,14 @@ void case_623() } void case_624() -#line 4206 "cs-parser.jay" +#line 4220 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4211 "cs-parser.jay" +#line 4225 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -6997,63 +7011,63 @@ void case_625() } void case_626() -#line 4217 "cs-parser.jay" +#line 4231 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4226 "cs-parser.jay" +#line 4240 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4231 "cs-parser.jay" +#line 4245 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4240 "cs-parser.jay" +#line 4254 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4245 "cs-parser.jay" +#line 4259 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4268 "cs-parser.jay" +#line 4282 "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_640() -#line 4273 "cs-parser.jay" +#line 4287 "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_641() -#line 4278 "cs-parser.jay" +#line 4292 "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_645() -#line 4307 "cs-parser.jay" +#line 4321 "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]); @@ -7065,7 +7079,7 @@ void case_645() } void case_646() -#line 4318 "cs-parser.jay" +#line 4332 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7079,7 +7093,7 @@ void case_646() } void case_647() -#line 4330 "cs-parser.jay" +#line 4344 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7087,21 +7101,21 @@ void case_647() } void case_648() -#line 4336 "cs-parser.jay" +#line 4350 "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_651() -#line 4351 "cs-parser.jay" +#line 4365 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4361 "cs-parser.jay" +#line 4375 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7119,7 +7133,7 @@ void case_654() } void case_655() -#line 4380 "cs-parser.jay" +#line 4394 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7129,91 +7143,91 @@ void case_655() } void case_656() -#line 4388 "cs-parser.jay" +#line 4402 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4393 "cs-parser.jay" +#line 4407 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4398 "cs-parser.jay" +#line 4412 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4403 "cs-parser.jay" +#line 4417 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4408 "cs-parser.jay" +#line 4422 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4413 "cs-parser.jay" +#line 4427 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4418 "cs-parser.jay" +#line 4432 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4423 "cs-parser.jay" +#line 4437 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4428 "cs-parser.jay" +#line 4442 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4433 "cs-parser.jay" +#line 4447 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4438 "cs-parser.jay" +#line 4452 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4443 "cs-parser.jay" +#line 4457 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4448 "cs-parser.jay" +#line 4462 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7222,21 +7236,21 @@ void case_668() } void case_669() -#line 4455 "cs-parser.jay" +#line 4469 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_674() -#line 4476 "cs-parser.jay" +#line 4490 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4484 "cs-parser.jay" +#line 4498 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7244,7 +7258,7 @@ void case_675() } void case_676() -#line 4490 "cs-parser.jay" +#line 4504 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7262,14 +7276,14 @@ void case_676() } void case_677() -#line 4509 "cs-parser.jay" +#line 4523 "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_678() -#line 4517 "cs-parser.jay" +#line 4531 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7277,7 +7291,7 @@ void case_678() } void case_679() -#line 4523 "cs-parser.jay" +#line 4537 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7302,7 +7316,7 @@ void case_679() } void case_680() -#line 4549 "cs-parser.jay" +#line 4563 "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 ()); @@ -7311,14 +7325,14 @@ void case_680() } void case_681() -#line 4556 "cs-parser.jay" +#line 4570 "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_685() -#line 4576 "cs-parser.jay" +#line 4590 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7327,77 +7341,77 @@ void case_685() } void case_688() -#line 4610 "cs-parser.jay" +#line 4624 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4622 "cs-parser.jay" +#line 4636 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4627 "cs-parser.jay" +#line 4641 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4636 "cs-parser.jay" +#line 4650 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4641 "cs-parser.jay" +#line 4655 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4668 "cs-parser.jay" +#line 4682 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4732 "cs-parser.jay" +#line 4746 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4737 "cs-parser.jay" +#line 4751 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4742 "cs-parser.jay" +#line 4756 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4750 "cs-parser.jay" +#line 4764 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4758 "cs-parser.jay" +#line 4772 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7407,7 +7421,7 @@ void case_738() } void case_741() -#line 4771 "cs-parser.jay" +#line 4785 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7416,7 +7430,7 @@ void case_741() } void case_742() -#line 4787 "cs-parser.jay" +#line 4801 "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*/ @@ -7448,7 +7462,7 @@ void case_742() } void case_743() -#line 4817 "cs-parser.jay" +#line 4831 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7461,7 +7475,7 @@ void case_743() } void case_744() -#line 4828 "cs-parser.jay" +#line 4842 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7470,21 +7484,21 @@ void case_744() } void case_747() -#line 4843 "cs-parser.jay" +#line 4857 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4852 "cs-parser.jay" +#line 4866 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4867 "cs-parser.jay" +#line 4881 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7493,7 +7507,7 @@ void case_751() } void case_752() -#line 4874 "cs-parser.jay" +#line 4888 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7501,7 +7515,7 @@ void case_752() } void case_753() -#line 4880 "cs-parser.jay" +#line 4894 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7510,7 +7524,7 @@ void case_753() } void case_754() -#line 4887 "cs-parser.jay" +#line 4901 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7522,14 +7536,14 @@ void case_754() } void case_756() -#line 4901 "cs-parser.jay" +#line 4915 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4906 "cs-parser.jay" +#line 4920 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7540,7 +7554,7 @@ void case_757() } void case_762() -#line 4928 "cs-parser.jay" +#line 4942 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7551,7 +7565,7 @@ void case_762() } void case_763() -#line 4937 "cs-parser.jay" +#line 4951 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7562,14 +7576,14 @@ void case_763() } void case_765() -#line 4953 "cs-parser.jay" +#line 4967 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 4971 "cs-parser.jay" +#line 4985 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7580,28 +7594,28 @@ void case_770() } void case_772() -#line 4984 "cs-parser.jay" +#line 4998 "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_773() -#line 4989 "cs-parser.jay" +#line 5003 "cs-parser.jay" { 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_774() -#line 4997 "cs-parser.jay" +#line 5011 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5015 "cs-parser.jay" +#line 5029 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7613,7 +7627,7 @@ void case_778() } void case_779() -#line 5028 "cs-parser.jay" +#line 5042 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7623,14 +7637,14 @@ void case_779() } void case_780() -#line 5036 "cs-parser.jay" +#line 5050 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5050 "cs-parser.jay" +#line 5064 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7640,7 +7654,7 @@ void case_783() } void case_784() -#line 5059 "cs-parser.jay" +#line 5073 "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])); @@ -7652,7 +7666,7 @@ void case_784() } void case_786() -#line 5076 "cs-parser.jay" +#line 5090 "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])); @@ -7660,14 +7674,14 @@ void case_786() } void case_787() -#line 5085 "cs-parser.jay" +#line 5099 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5094 "cs-parser.jay" +#line 5108 "cs-parser.jay" { var sections = new List (4); @@ -7676,7 +7690,7 @@ void case_789() } void case_790() -#line 5101 "cs-parser.jay" +#line 5115 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7685,14 +7699,14 @@ void case_790() } void case_791() -#line 5108 "cs-parser.jay" +#line 5122 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5127 "cs-parser.jay" +#line 5141 "cs-parser.jay" { var labels = new List (2); @@ -7701,7 +7715,7 @@ void case_794() } void case_795() -#line 5134 "cs-parser.jay" +#line 5148 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7710,14 +7724,14 @@ void case_795() } void case_796() -#line 5144 "cs-parser.jay" +#line 5158 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5163 "cs-parser.jay" +#line 5177 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7727,21 +7741,21 @@ void case_802() } void case_803() -#line 5175 "cs-parser.jay" +#line 5189 "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_804() -#line 5183 "cs-parser.jay" +#line 5197 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5199 "cs-parser.jay" +#line 5213 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7755,14 +7769,14 @@ void case_806() } void case_807() -#line 5211 "cs-parser.jay" +#line 5225 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5224 "cs-parser.jay" +#line 5238 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7771,14 +7785,14 @@ void case_810() } void case_811() -#line 5231 "cs-parser.jay" +#line 5245 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5255 "cs-parser.jay" +#line 5269 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7793,14 +7807,14 @@ void case_819() } void case_820() -#line 5271 "cs-parser.jay" +#line 5285 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5276 "cs-parser.jay" +#line 5290 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7811,7 +7825,7 @@ void case_821() } void case_822() -#line 5285 "cs-parser.jay" +#line 5299 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7824,21 +7838,21 @@ void case_822() } void case_829() -#line 5308 "cs-parser.jay" +#line 5322 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5316 "cs-parser.jay" +#line 5330 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5324 "cs-parser.jay" +#line 5338 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7846,35 +7860,35 @@ void case_831() } void case_832() -#line 5330 "cs-parser.jay" +#line 5344 "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_833() -#line 5335 "cs-parser.jay" +#line 5349 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5343 "cs-parser.jay" +#line 5357 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5351 "cs-parser.jay" +#line 5365 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5359 "cs-parser.jay" +#line 5373 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7892,7 +7906,7 @@ void case_836() } void case_837() -#line 5375 "cs-parser.jay" +#line 5389 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7908,28 +7922,28 @@ void case_837() } void case_841() -#line 5401 "cs-parser.jay" +#line 5415 "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_842() -#line 5406 "cs-parser.jay" +#line 5420 "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_843() -#line 5411 "cs-parser.jay" +#line 5425 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5419 "cs-parser.jay" +#line 5433 "cs-parser.jay" { var l = new List (2); @@ -7938,7 +7952,7 @@ void case_844() } void case_845() -#line 5426 "cs-parser.jay" +#line 5440 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7956,7 +7970,7 @@ void case_845() } void case_849() -#line 5454 "cs-parser.jay" +#line 5468 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -7973,7 +7987,7 @@ void case_849() } void case_851() -#line 5473 "cs-parser.jay" +#line 5487 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -7986,14 +8000,14 @@ void case_851() } void case_854() -#line 5501 "cs-parser.jay" +#line 5515 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5511 "cs-parser.jay" +#line 5525 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8003,7 +8017,7 @@ void case_856() } void case_857() -#line 5522 "cs-parser.jay" +#line 5536 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8015,14 +8029,14 @@ void case_857() } void case_858() -#line 5532 "cs-parser.jay" +#line 5546 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5537 "cs-parser.jay" +#line 5551 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8034,7 +8048,7 @@ void case_859() } void case_860() -#line 5550 "cs-parser.jay" +#line 5564 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8046,14 +8060,14 @@ void case_860() } void case_861() -#line 5560 "cs-parser.jay" +#line 5574 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5565 "cs-parser.jay" +#line 5579 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8065,7 +8079,7 @@ void case_862() } void case_863() -#line 5575 "cs-parser.jay" +#line 5589 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8076,14 +8090,14 @@ void case_863() } void case_865() -#line 5591 "cs-parser.jay" +#line 5605 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5602 "cs-parser.jay" +#line 5616 "cs-parser.jay" { lexer.query_parsing = false; @@ -8097,7 +8111,7 @@ void case_866() } void case_867() -#line 5614 "cs-parser.jay" +#line 5628 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8109,7 +8123,7 @@ void case_867() } void case_868() -#line 5625 "cs-parser.jay" +#line 5639 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8119,7 +8133,7 @@ void case_868() } void case_869() -#line 5632 "cs-parser.jay" +#line 5646 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8127,7 +8141,7 @@ void case_869() } void case_870() -#line 5641 "cs-parser.jay" +#line 5655 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8137,7 +8151,7 @@ void case_870() } void case_871() -#line 5649 "cs-parser.jay" +#line 5663 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8151,7 +8165,7 @@ void case_871() } void case_872() -#line 5664 "cs-parser.jay" +#line 5678 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8161,7 +8175,7 @@ void case_872() } void case_873() -#line 5672 "cs-parser.jay" +#line 5686 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8175,7 +8189,7 @@ void case_873() } void case_875() -#line 5691 "cs-parser.jay" +#line 5705 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8188,7 +8202,7 @@ void case_875() } void case_877() -#line 5706 "cs-parser.jay" +#line 5720 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8204,7 +8218,7 @@ void case_877() } void case_878() -#line 5723 "cs-parser.jay" +#line 5737 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8221,14 +8235,14 @@ void case_878() } void case_880() -#line 5739 "cs-parser.jay" +#line 5753 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5751 "cs-parser.jay" +#line 5765 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8237,7 +8251,7 @@ void case_882() } void case_883() -#line 5758 "cs-parser.jay" +#line 5772 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8247,7 +8261,7 @@ void case_883() } void case_884() -#line 5766 "cs-parser.jay" +#line 5780 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8256,7 +8270,7 @@ void case_884() } void case_885() -#line 5773 "cs-parser.jay" +#line 5787 "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])); @@ -8266,14 +8280,14 @@ void case_885() } void case_889() -#line 5790 "cs-parser.jay" +#line 5804 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5810 "cs-parser.jay" +#line 5824 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8287,7 +8301,7 @@ void case_896() } void case_898() -#line 5829 "cs-parser.jay" +#line 5843 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8296,7 +8310,7 @@ void case_898() } void case_899() -#line 5839 "cs-parser.jay" +#line 5853 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8306,7 +8320,7 @@ void case_899() } void case_900() -#line 5847 "cs-parser.jay" +#line 5861 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8316,7 +8330,7 @@ void case_900() } void case_901() -#line 5855 "cs-parser.jay" +#line 5869 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8326,7 +8340,7 @@ void case_901() } void case_902() -#line 5863 "cs-parser.jay" +#line 5877 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8366,7 +8380,7 @@ void case_902() } void case_903() -#line 5901 "cs-parser.jay" +#line 5915 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8376,7 +8390,7 @@ void case_903() } void case_904() -#line 5909 "cs-parser.jay" +#line 5923 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8386,7 +8400,7 @@ void case_904() } void case_905() -#line 5917 "cs-parser.jay" +#line 5931 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8396,7 +8410,7 @@ void case_905() } void case_906() -#line 5925 "cs-parser.jay" +#line 5939 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8438,7 +8452,7 @@ void case_906() } void case_910() -#line 5980 "cs-parser.jay" +#line 5994 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8447,7 +8461,7 @@ void case_910() } void case_912() -#line 5991 "cs-parser.jay" +#line 6005 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8456,14 +8470,14 @@ void case_912() } void case_913() -#line 5998 "cs-parser.jay" +#line 6012 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6007 "cs-parser.jay" +#line 6021 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8472,42 +8486,42 @@ void case_915() } void case_916() -#line 6014 "cs-parser.jay" +#line 6028 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6026 "cs-parser.jay" +#line 6040 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6031 "cs-parser.jay" +#line 6045 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6043 "cs-parser.jay" +#line 6057 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6048 "cs-parser.jay" +#line 6062 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6058 "cs-parser.jay" +#line 6072 "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*/ @@ -8525,7 +8539,7 @@ void case_924() } void case_925() -#line 6074 "cs-parser.jay" +#line 6088 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8536,7 +8550,7 @@ void case_925() } void case_928() -#line 6101 "cs-parser.jay" +#line 6115 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8568,7 +8582,7 @@ void case_928() } void case_929() -#line 6131 "cs-parser.jay" +#line 6145 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8580,7 +8594,7 @@ void case_929() } void case_939() -#line 6174 "cs-parser.jay" +#line 6188 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8588,7 +8602,7 @@ void case_939() } void case_940() -#line 6180 "cs-parser.jay" +#line 6194 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8597,14 +8611,14 @@ void case_940() } void case_943() -#line 6195 "cs-parser.jay" +#line 6209 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6200 "cs-parser.jay" +#line 6214 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8614,7 +8628,7 @@ void case_944() } void case_945() -#line 6208 "cs-parser.jay" +#line 6222 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8624,7 +8638,7 @@ void case_945() } void case_946() -#line 6216 "cs-parser.jay" +#line 6230 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8633,7 +8647,7 @@ void case_946() } void case_954() -#line 6254 "cs-parser.jay" +#line 6268 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8641,7 +8655,7 @@ void case_954() } void case_955() -#line 6260 "cs-parser.jay" +#line 6274 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8649,7 +8663,7 @@ void case_955() } void case_956() -#line 6269 "cs-parser.jay" +#line 6283 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -11985,7 +11999,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6278 "cs-parser.jay" +#line 6292 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 5fa45a38ed..4c0d6436a6 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -146,6 +146,7 @@ namespace Mono.CSharp Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); + List parameterListCommas = new List (); object lastYYVal; @@ -1434,20 +1435,25 @@ formal_parameter_list { var pars_list = (List) $1; $$ = new ParametersCompiled (pars_list.ToArray ()); - lbag.AddLocation ($$, lbag.GetLocations (pars_list)); + lbag.AddLocation ($$, parameterListCommas); } | fixed_parameters COMMA parameter_array { var pars_list = (List) $1; pars_list.Add ((Parameter) $3); - + parameterListCommas.Add (GetLocation ($2)); + $$ = new ParametersCompiled (pars_list.ToArray ()); + lbag.AddLocation ($$, parameterListCommas); } | fixed_parameters COMMA arglist_modifier { var pars_list = (List) $1; pars_list.Add (new ArglistParameter (GetLocation ($3))); + parameterListCommas.Add (GetLocation ($2)); + $$ = new ParametersCompiled (pars_list.ToArray (), true); + lbag.AddLocation ($$, parameterListCommas); } | parameter_array COMMA error { @@ -1455,6 +1461,7 @@ 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 } ); + lbag.AddLocation ($$, parameterListCommas); } | fixed_parameters COMMA parameter_array COMMA error { @@ -1463,14 +1470,18 @@ formal_parameter_list var pars_list = (List) $1; pars_list.Add (new ArglistParameter (GetLocation ($3))); - + parameterListCommas.Add (GetLocation ($2)); + parameterListCommas.Add (GetLocation ($4)); + $$ = new ParametersCompiled (pars_list.ToArray (), true); + lbag.AddLocation ($$, parameterListCommas); } | arglist_modifier COMMA error { 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); + lbag.AddLocation ($$, parameterListCommas); } | fixed_parameters COMMA ARGLIST COMMA error { @@ -1478,8 +1489,11 @@ formal_parameter_list var pars_list = (List) $1; pars_list.Add (new ArglistParameter (GetLocation ($3))); + parameterListCommas.Add (GetLocation ($2)); + parameterListCommas.Add (GetLocation ($4)); $$ = new ParametersCompiled (pars_list.ToArray (), true); + lbag.AddLocation ($$, parameterListCommas); } | parameter_array { @@ -1502,7 +1516,7 @@ fixed_parameters parameters_bucket.Clear (); Parameter p = (Parameter) $1; parameters_bucket.Add (p); - + parameterListCommas.Clear (); default_parameter_used = p.HasDefaultValue; $$ = parameters_bucket; } @@ -1519,7 +1533,7 @@ fixed_parameters default_parameter_used |= p.HasDefaultValue; pars.Add (p); - lbag.AppendTo (pars, GetLocation ($2)); + parameterListCommas.Add (GetLocation ($2)); } $$ = $1; From 0ee81980ec815a2d8f37f01be3ca4dd748b408e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 14:56:05 +0200 Subject: [PATCH 10/92] * Log.cs: * ICSharpCode.NRefactory.csproj: * CSharpParser.cs: * location.cs: * cs-parser.cs: * cs-parser.jay: Fixed optional semicolon location. --- .../Parser/CSharpParser.cs | 10 +- .../Parser/mcs/cs-parser.cs | 1328 ++++++++--------- .../Parser/mcs/cs-parser.jay | 10 +- .../Parser/mcs/location.cs | 6 + ICSharpCode.NRefactory.CSharp/Resolver/Log.cs | 10 +- .../ICSharpCode.NRefactory.csproj | 4 +- 6 files changed, 688 insertions(+), 680 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 25bfd1c87f..e50cd43249 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -3100,7 +3100,15 @@ namespace ICSharpCode.NRefactory.CSharp while (true) { var nextLeaf = NextLeaf(leaf); - // instert comment at the end + // insert comment at begin + if (domComment.StartLocation < leaf.StartLocation) { + var node = leaf.Parent ?? conversionVisitor.Unit; + node.InsertChildBefore (leaf, domComment, AstNode.Roles.Comment); + leaf = domComment; + break; + } + + // insert comment at the end if (nextLeaf == null) { var node = leaf.Parent ?? conversionVisitor.Unit; node.AddChild(domComment, AstNode.Roles.Comment); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index c257a13461..b146a8d6d0 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1470,7 +1470,7 @@ case 41: case_41(); break; case 42: -#line 642 "cs-parser.jay" +#line 640 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1500,18 +1500,18 @@ case 57: case_57(); break; case 58: -#line 738 "cs-parser.jay" +#line 736 "cs-parser.jay" { yyVal = "event"; } break; case 59: -#line 739 "cs-parser.jay" +#line 737 "cs-parser.jay" { yyVal = "return"; } break; case 60: case_60(); break; case 61: -#line 756 "cs-parser.jay" +#line 754 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1520,7 +1520,7 @@ case 62: case_62(); break; case 63: -#line 771 "cs-parser.jay" +#line 769 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1529,14 +1529,14 @@ case 64: case_64(); break; case 66: -#line 795 "cs-parser.jay" +#line 793 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 806 "cs-parser.jay" +#line 804 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1552,13 +1552,13 @@ case 72: case_72(); break; case 73: -#line 850 "cs-parser.jay" +#line 848 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 858 "cs-parser.jay" +#line 856 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1570,17 +1570,17 @@ case 77: case_77(); break; case 78: -#line 883 "cs-parser.jay" +#line 881 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 887 "cs-parser.jay" +#line 885 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 891 "cs-parser.jay" +#line 889 "cs-parser.jay" { yyVal = Argument.AType.Out; } @@ -1589,7 +1589,7 @@ case 95: case_95(); break; case 96: -#line 932 "cs-parser.jay" +#line 930 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1607,7 +1607,7 @@ case 100: case_100(); break; case 101: -#line 964 "cs-parser.jay" +#line 962 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1616,7 +1616,7 @@ case 102: case_102(); break; case 103: -#line 976 "cs-parser.jay" +#line 974 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } @@ -1628,13 +1628,13 @@ case 119: case_119(); break; case 122: -#line 1045 "cs-parser.jay" +#line 1043 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 123: -#line 1049 "cs-parser.jay" +#line 1047 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1643,7 +1643,7 @@ case 124: case_124(); break; case 125: -#line 1065 "cs-parser.jay" +#line 1063 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1667,7 +1667,7 @@ case 133: case_133(); break; case 134: -#line 1144 "cs-parser.jay" +#line 1142 "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"); } @@ -1679,13 +1679,13 @@ case 137: case_137(); break; case 140: -#line 1174 "cs-parser.jay" +#line 1172 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 141: -#line 1178 "cs-parser.jay" +#line 1176 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1694,7 +1694,7 @@ case 142: case_142(); break; case 143: -#line 1191 "cs-parser.jay" +#line 1189 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1703,13 +1703,13 @@ case 144: case_144(); break; case 147: -#line 1210 "cs-parser.jay" +#line 1208 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 148: -#line 1214 "cs-parser.jay" +#line 1212 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1718,7 +1718,7 @@ case 149: case_149(); break; case 150: -#line 1230 "cs-parser.jay" +#line 1228 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1739,13 +1739,13 @@ case 157: case_157(); break; case 158: -#line 1297 "cs-parser.jay" +#line 1295 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 159: -#line 1301 "cs-parser.jay" +#line 1299 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1754,7 +1754,7 @@ case 160: case_160(); break; case 161: -#line 1341 "cs-parser.jay" +#line 1339 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1763,7 +1763,7 @@ case 162: case_162(); break; case 163: -#line 1351 "cs-parser.jay" +#line 1349 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1775,11 +1775,11 @@ case 165: case_165(); break; case 167: -#line 1425 "cs-parser.jay" +#line 1423 "cs-parser.jay" { yyVal = null; } break; case 168: -#line 1429 "cs-parser.jay" +#line 1427 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 170: @@ -1804,13 +1804,13 @@ case 176: case_176(); break; case 177: -#line 1501 "cs-parser.jay" +#line 1499 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 178: -#line 1505 "cs-parser.jay" +#line 1503 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1834,7 +1834,7 @@ case 184: case_184(); break; case 185: -#line 1580 "cs-parser.jay" +#line 1578 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1843,7 +1843,7 @@ case 186: case_186(); break; case 187: -#line 1621 "cs-parser.jay" +#line 1619 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 189: @@ -1877,7 +1877,7 @@ case 198: case_198(); break; case 199: -#line 1719 "cs-parser.jay" +#line 1717 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1898,7 +1898,7 @@ case 204: case_204(); break; case 205: -#line 1773 "cs-parser.jay" +#line 1771 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1907,7 +1907,7 @@ case 206: case_206(); break; case 207: -#line 1802 "cs-parser.jay" +#line 1800 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1937,7 +1937,7 @@ case 220: case_220(); break; case 221: -#line 1951 "cs-parser.jay" +#line 1949 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1955,43 +1955,43 @@ case 225: case_225(); break; case 226: -#line 1984 "cs-parser.jay" +#line 1982 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 231: -#line 2001 "cs-parser.jay" +#line 1999 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 232: -#line 2005 "cs-parser.jay" +#line 2003 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 237: -#line 2013 "cs-parser.jay" +#line 2011 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 238: -#line 2017 "cs-parser.jay" +#line 2015 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 239: -#line 2021 "cs-parser.jay" +#line 2019 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 240: -#line 2027 "cs-parser.jay" +#line 2025 "cs-parser.jay" { } break; @@ -1999,14 +1999,14 @@ case 241: case_241(); break; case 243: -#line 2057 "cs-parser.jay" +#line 2055 "cs-parser.jay" { yyVal = null; } break; case 245: case_245(); break; case 246: -#line 2073 "cs-parser.jay" +#line 2071 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2015,95 +2015,95 @@ case 247: case_247(); break; case 249: -#line 2119 "cs-parser.jay" +#line 2117 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; case 250: -#line 2120 "cs-parser.jay" +#line 2118 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; case 251: -#line 2121 "cs-parser.jay" +#line 2119 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; case 252: -#line 2122 "cs-parser.jay" +#line 2120 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; case 253: -#line 2123 "cs-parser.jay" +#line 2121 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; case 254: -#line 2124 "cs-parser.jay" +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; case 255: -#line 2126 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; case 256: -#line 2127 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; case 257: -#line 2129 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; case 258: -#line 2130 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; case 259: -#line 2131 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; case 260: -#line 2132 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; case 261: -#line 2133 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; case 262: -#line 2134 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; case 263: -#line 2135 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; case 264: -#line 2136 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; case 265: -#line 2137 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; case 266: -#line 2138 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; case 267: -#line 2139 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; case 268: -#line 2140 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; case 269: -#line 2141 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; case 270: -#line 2142 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; case 271: -#line 2149 "cs-parser.jay" +#line 2147 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2112,7 +2112,7 @@ case 272: case_272(); break; case 273: -#line 2168 "cs-parser.jay" +#line 2166 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2139,11 +2139,11 @@ case 280: case_280(); break; case 282: -#line 2271 "cs-parser.jay" +#line 2269 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 285: -#line 2283 "cs-parser.jay" +#line 2281 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2152,7 +2152,7 @@ case 286: case_286(); break; case 287: -#line 2293 "cs-parser.jay" +#line 2291 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2185,7 +2185,7 @@ case 296: case_296(); break; case 298: -#line 2402 "cs-parser.jay" +#line 2400 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2194,13 +2194,13 @@ case 299: case_299(); break; case 302: -#line 2419 "cs-parser.jay" +#line 2417 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 303: -#line 2423 "cs-parser.jay" +#line 2421 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2209,7 +2209,7 @@ case 304: case_304(); break; case 305: -#line 2436 "cs-parser.jay" +#line 2434 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2221,7 +2221,7 @@ case 307: case_307(); break; case 308: -#line 2461 "cs-parser.jay" +#line 2459 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2269,7 +2269,7 @@ case 326: case_326(); break; case 329: -#line 2616 "cs-parser.jay" +#line 2614 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2287,7 +2287,7 @@ case 334: case_334(); break; case 335: -#line 2674 "cs-parser.jay" +#line 2672 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2296,7 +2296,7 @@ case 336: case_336(); break; case 337: -#line 2696 "cs-parser.jay" +#line 2694 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2329,7 +2329,7 @@ case 350: case_350(); break; case 351: -#line 2800 "cs-parser.jay" +#line 2798 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2374,13 +2374,13 @@ case 366: case_366(); break; case 368: -#line 2918 "cs-parser.jay" +#line 2916 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2925 "cs-parser.jay" +#line 2923 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2395,7 +2395,7 @@ case 375: case_375(); break; case 377: -#line 2963 "cs-parser.jay" +#line 2961 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2404,7 +2404,7 @@ case 378: case_378(); break; case 379: -#line 2983 "cs-parser.jay" +#line 2981 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2413,13 +2413,13 @@ case 380: case_380(); break; case 381: -#line 2992 "cs-parser.jay" +#line 2990 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 2996 "cs-parser.jay" +#line 2994 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2437,63 +2437,63 @@ case 386: case_386(); break; case 387: -#line 3035 "cs-parser.jay" +#line 3033 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3036 "cs-parser.jay" +#line 3034 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3037 "cs-parser.jay" +#line 3035 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3038 "cs-parser.jay" +#line 3036 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3039 "cs-parser.jay" +#line 3037 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3040 "cs-parser.jay" +#line 3038 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3045 "cs-parser.jay" +#line 3043 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3046 "cs-parser.jay" +#line 3044 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3047 "cs-parser.jay" +#line 3045 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3048 "cs-parser.jay" +#line 3046 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3049 "cs-parser.jay" +#line 3047 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3050 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3051 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3052 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3053 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2503,22 +2503,22 @@ case 424: case_424(); break; case 428: -#line 3100 "cs-parser.jay" +#line 3098 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3104 "cs-parser.jay" +#line 3102 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3105 "cs-parser.jay" +#line 3103 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3138 "cs-parser.jay" +#line 3136 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2536,7 +2536,7 @@ case 440: case_440(); break; case 441: -#line 3170 "cs-parser.jay" +#line 3168 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2545,7 +2545,7 @@ case 442: case_442(); break; case 443: -#line 3178 "cs-parser.jay" +#line 3176 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2557,7 +2557,7 @@ case 445: case_445(); break; case 446: -#line 3194 "cs-parser.jay" +#line 3192 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2567,11 +2567,11 @@ case 449: case_449(); break; case 450: -#line 3217 "cs-parser.jay" +#line 3215 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3221 "cs-parser.jay" +#line 3219 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2589,7 +2589,7 @@ case 455: case_455(); break; case 456: -#line 3254 "cs-parser.jay" +#line 3252 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2604,7 +2604,7 @@ case 459: case_459(); break; case 462: -#line 3282 "cs-parser.jay" +#line 3280 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2623,7 +2623,7 @@ case 468: case_468(); break; case 469: -#line 3334 "cs-parser.jay" +#line 3332 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2659,13 +2659,13 @@ case 483: case_483(); break; case 484: -#line 3421 "cs-parser.jay" +#line 3419 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3429 "cs-parser.jay" +#line 3427 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2677,13 +2677,13 @@ case 488: case_488(); break; case 489: -#line 3449 "cs-parser.jay" +#line 3447 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3456 "cs-parser.jay" +#line 3454 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2710,7 +2710,7 @@ case 497: case_497(); break; case 498: -#line 3522 "cs-parser.jay" +#line 3520 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2722,7 +2722,7 @@ case 500: case_500(); break; case 503: -#line 3549 "cs-parser.jay" +#line 3547 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2753,25 +2753,25 @@ case 516: case_516(); break; case 517: -#line 3627 "cs-parser.jay" +#line 3625 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3631 "cs-parser.jay" +#line 3629 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3638 "cs-parser.jay" +#line 3636 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3642 "cs-parser.jay" +#line 3640 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2789,7 +2789,7 @@ case 524: case_524(); break; case 525: -#line 3686 "cs-parser.jay" +#line 3684 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2834,7 +2834,7 @@ case 540: case_540(); break; case 541: -#line 3800 "cs-parser.jay" +#line 3798 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2843,25 +2843,25 @@ case 542: case_542(); break; case 543: -#line 3813 "cs-parser.jay" +#line 3811 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3817 "cs-parser.jay" +#line 3815 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3824 "cs-parser.jay" +#line 3822 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3832 "cs-parser.jay" +#line 3830 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2873,13 +2873,13 @@ case 549: case_549(); break; case 551: -#line 3858 "cs-parser.jay" +#line 3856 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3862 "cs-parser.jay" +#line 3860 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2891,37 +2891,37 @@ case 556: case_556(); break; case 558: -#line 3892 "cs-parser.jay" +#line 3890 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3896 "cs-parser.jay" +#line 3894 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3900 "cs-parser.jay" +#line 3898 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3904 "cs-parser.jay" +#line 3902 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3908 "cs-parser.jay" +#line 3906 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3912 "cs-parser.jay" +#line 3910 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2939,7 +2939,7 @@ case 569: case_569(); break; case 570: -#line 3944 "cs-parser.jay" +#line 3942 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2948,13 +2948,13 @@ case 571: case_571(); break; case 572: -#line 3953 "cs-parser.jay" +#line 3951 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3957 "cs-parser.jay" +#line 3955 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3005,7 +3005,7 @@ case 598: case_598(); break; case 599: -#line 4081 "cs-parser.jay" +#line 4079 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3056,14 +3056,14 @@ case 614: case_614(); break; case 615: -#line 4178 "cs-parser.jay" +#line 4176 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4193 "cs-parser.jay" +#line 4191 "cs-parser.jay" { start_block (lexer.Location); } @@ -3087,7 +3087,7 @@ case 626: case_626(); break; case 627: -#line 4238 "cs-parser.jay" +#line 4236 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3099,7 +3099,7 @@ case 629: case_629(); break; case 630: -#line 4252 "cs-parser.jay" +#line 4250 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3111,7 +3111,7 @@ case 632: case_632(); break; case 638: -#line 4277 "cs-parser.jay" +#line 4275 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3126,13 +3126,13 @@ case 641: case_641(); break; case 643: -#line 4306 "cs-parser.jay" +#line 4304 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4319 "cs-parser.jay" +#line 4317 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3150,11 +3150,11 @@ case 648: case_648(); break; case 649: -#line 4358 "cs-parser.jay" +#line 4356 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4360 "cs-parser.jay" +#line 4358 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3209,13 +3209,13 @@ case 669: case_669(); break; case 671: -#line 4480 "cs-parser.jay" +#line 4478 "cs-parser.jay" { current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } break; case 673: -#line 4488 "cs-parser.jay" +#line 4486 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3245,19 +3245,19 @@ case 681: case_681(); break; case 682: -#line 4577 "cs-parser.jay" +#line 4575 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4581 "cs-parser.jay" +#line 4579 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4588 "cs-parser.jay" +#line 4586 "cs-parser.jay" { yyVal = Variance.None; } @@ -3266,13 +3266,13 @@ case 685: case_685(); break; case 686: -#line 4602 "cs-parser.jay" +#line 4600 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4606 "cs-parser.jay" +#line 4604 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3281,7 +3281,7 @@ case 688: case_688(); break; case 689: -#line 4631 "cs-parser.jay" +#line 4629 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3299,13 +3299,13 @@ case 693: case_693(); break; case 698: -#line 4675 "cs-parser.jay" +#line 4673 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4679 "cs-parser.jay" +#line 4677 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3314,13 +3314,13 @@ case 701: case_701(); break; case 704: -#line 4703 "cs-parser.jay" +#line 4701 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4707 "cs-parser.jay" +#line 4705 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3353,13 +3353,13 @@ case 744: case_744(); break; case 745: -#line 4851 "cs-parser.jay" +#line 4849 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4855 "cs-parser.jay" +#line 4853 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3371,7 +3371,7 @@ case 749: case_749(); break; case 750: -#line 4876 "cs-parser.jay" +#line 4874 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3401,7 +3401,7 @@ case 763: case_763(); break; case 764: -#line 4965 "cs-parser.jay" +#line 4963 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3422,15 +3422,15 @@ case 774: case_774(); break; case 775: -#line 5015 "cs-parser.jay" +#line 5013 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5019 "cs-parser.jay" +#line 5017 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5020 "cs-parser.jay" +#line 5018 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3449,7 +3449,7 @@ case 784: case_784(); break; case 785: -#line 5088 "cs-parser.jay" +#line 5086 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3470,13 +3470,13 @@ case 791: case_791(); break; case 792: -#line 5132 "cs-parser.jay" +#line 5130 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5136 "cs-parser.jay" +#line 5134 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3491,7 +3491,7 @@ case 796: case_796(); break; case 797: -#line 5165 "cs-parser.jay" +#line 5163 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3506,7 +3506,7 @@ case 804: case_804(); break; case 805: -#line 5204 "cs-parser.jay" +#line 5202 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3518,7 +3518,7 @@ case 807: case_807(); break; case 808: -#line 5232 "cs-parser.jay" +#line 5230 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3528,11 +3528,11 @@ case 811: case_811(); break; case 813: -#line 5253 "cs-parser.jay" +#line 5251 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5258 "cs-parser.jay" +#line 5256 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3575,7 +3575,7 @@ case 837: case_837(); break; case 840: -#line 5413 "cs-parser.jay" +#line 5411 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3596,7 +3596,7 @@ case 845: case_845(); break; case 848: -#line 5466 "cs-parser.jay" +#line 5464 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3605,7 +3605,7 @@ case 849: case_849(); break; case 850: -#line 5485 "cs-parser.jay" +#line 5483 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3614,13 +3614,13 @@ case 851: case_851(); break; case 852: -#line 5503 "cs-parser.jay" +#line 5501 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5510 "cs-parser.jay" +#line 5508 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3629,7 +3629,7 @@ case 854: case_854(); break; case 855: -#line 5520 "cs-parser.jay" +#line 5518 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3659,7 +3659,7 @@ case 863: case_863(); break; case 864: -#line 5603 "cs-parser.jay" +#line 5601 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3692,7 +3692,7 @@ case 873: case_873(); break; case 874: -#line 5703 "cs-parser.jay" +#line 5701 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3701,7 +3701,7 @@ case 875: case_875(); break; case 876: -#line 5718 "cs-parser.jay" +#line 5716 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3716,7 +3716,7 @@ case 880: case_880(); break; case 881: -#line 5763 "cs-parser.jay" +#line 5761 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3737,7 +3737,7 @@ case 889: case_889(); break; case 895: -#line 5822 "cs-parser.jay" +#line 5820 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3746,7 +3746,7 @@ case 896: case_896(); break; case 897: -#line 5841 "cs-parser.jay" +#line 5839 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3779,13 +3779,13 @@ case 906: case_906(); break; case 908: -#line 5985 "cs-parser.jay" +#line 5983 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 5992 "cs-parser.jay" +#line 5990 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3806,7 +3806,7 @@ case 916: case_916(); break; case 917: -#line 6038 "cs-parser.jay" +#line 6036 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3818,7 +3818,7 @@ case 919: case_919(); break; case 920: -#line 6055 "cs-parser.jay" +#line 6053 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3842,13 +3842,13 @@ case 929: case_929(); break; case 937: -#line 6179 "cs-parser.jay" +#line 6177 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6186 "cs-parser.jay" +#line 6184 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3860,13 +3860,13 @@ case 940: case_940(); break; case 941: -#line 6203 "cs-parser.jay" +#line 6201 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6207 "cs-parser.jay" +#line 6205 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3884,25 +3884,25 @@ case 946: case_946(); break; case 948: -#line 6243 "cs-parser.jay" +#line 6241 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6251 "cs-parser.jay" +#line 6249 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6255 "cs-parser.jay" +#line 6253 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6262 "cs-parser.jay" +#line 6260 "cs-parser.jay" { yyVal = new List (0); } @@ -4071,41 +4071,39 @@ void case_23() void case_24() #line 545 "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])); - else - lbag.AddLocation (current_namespace, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-1+yyTop])); - current_namespace = current_namespace.Parent; current_class = current_namespace.SlaveDeclSpace; current_container = current_class.PartialContainer; ubag.CloseNamespace (GetLocation (yyVals[-1+yyTop])); - ubag.EndNamespace (GetLocation (yyVals[-1+yyTop])); + if (yyVals[0+yyTop] != null) + ubag.EndNamespace (GetLocation (yyVals[0+yyTop])); + else + ubag.EndNamespace (); } void case_25() -#line 561 "cs-parser.jay" +#line 559 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName (lt.Value, lt.Location); } void case_26() -#line 566 "cs-parser.jay" +#line 564 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); } void case_27() -#line 571 "cs-parser.jay" +#line 569 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 589 "cs-parser.jay" +#line 587 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4116,7 +4114,7 @@ void case_32() } void case_41() -#line 621 "cs-parser.jay" +#line 619 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4137,7 +4135,7 @@ void case_41() } void case_50() -#line 671 "cs-parser.jay" +#line 669 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4149,7 +4147,7 @@ void case_50() } void case_51() -#line 681 "cs-parser.jay" +#line 679 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4161,21 +4159,21 @@ void case_51() } void case_52() -#line 694 "cs-parser.jay" +#line 692 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 699 "cs-parser.jay" +#line 697 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 707 "cs-parser.jay" +#line 705 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4184,7 +4182,7 @@ void case_54() } void case_55() -#line 714 "cs-parser.jay" +#line 712 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4198,21 +4196,21 @@ void case_55() } void case_56() -#line 726 "cs-parser.jay" +#line 724 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_57() -#line 734 "cs-parser.jay" +#line 732 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } void case_60() -#line 741 "cs-parser.jay" +#line 739 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4224,7 +4222,7 @@ void case_60() } void case_62() -#line 758 "cs-parser.jay" +#line 756 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4234,7 +4232,7 @@ void case_62() } void case_64() -#line 773 "cs-parser.jay" +#line 771 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4252,7 +4250,7 @@ void case_64() } void case_67() -#line 797 "cs-parser.jay" +#line 795 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4260,7 +4258,7 @@ void case_67() } void case_69() -#line 808 "cs-parser.jay" +#line 806 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4268,7 +4266,7 @@ void case_69() } void case_70() -#line 814 "cs-parser.jay" +#line 812 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4276,7 +4274,7 @@ void case_70() } void case_71() -#line 820 "cs-parser.jay" +#line 818 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4293,7 +4291,7 @@ void case_71() } void case_72() -#line 835 "cs-parser.jay" +#line 833 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4305,7 +4303,7 @@ void case_72() } void case_76() -#line 860 "cs-parser.jay" +#line 858 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4314,7 +4312,7 @@ void case_76() } void case_77() -#line 870 "cs-parser.jay" +#line 868 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4327,7 +4325,7 @@ void case_77() } void case_95() -#line 917 "cs-parser.jay" +#line 915 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4336,14 +4334,14 @@ void case_95() } void case_97() -#line 934 "cs-parser.jay" +#line 932 "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_98() -#line 940 "cs-parser.jay" +#line 938 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4356,7 +4354,7 @@ void case_98() } void case_99() -#line 951 "cs-parser.jay" +#line 949 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -4364,21 +4362,21 @@ void case_99() } void case_100() -#line 957 "cs-parser.jay" +#line 955 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[0+yyTop])); yyVal = pop_current_class (); } void case_102() -#line 969 "cs-parser.jay" +#line 967 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_118() -#line 1011 "cs-parser.jay" +#line 1009 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4393,7 +4391,7 @@ void case_118() } void case_119() -#line 1024 "cs-parser.jay" +#line 1022 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4406,7 +4404,7 @@ void case_119() } void case_124() -#line 1054 "cs-parser.jay" +#line 1052 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4414,7 +4412,7 @@ void case_124() } void case_126() -#line 1067 "cs-parser.jay" +#line 1065 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4422,14 +4420,14 @@ void case_126() } void case_127() -#line 1073 "cs-parser.jay" +#line 1071 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_130() -#line 1088 "cs-parser.jay" +#line 1086 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4444,7 +4442,7 @@ void case_130() } void case_131() -#line 1103 "cs-parser.jay" +#line 1101 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4457,7 +4455,7 @@ void case_131() } void case_132() -#line 1116 "cs-parser.jay" +#line 1114 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4470,7 +4468,7 @@ void case_132() } void case_133() -#line 1127 "cs-parser.jay" +#line 1125 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4484,7 +4482,7 @@ void case_133() } void case_136() -#line 1150 "cs-parser.jay" +#line 1148 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4492,7 +4490,7 @@ void case_136() } void case_137() -#line 1156 "cs-parser.jay" +#line 1154 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4502,7 +4500,7 @@ void case_137() } void case_142() -#line 1183 "cs-parser.jay" +#line 1181 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4510,7 +4508,7 @@ void case_142() } void case_144() -#line 1193 "cs-parser.jay" +#line 1191 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4519,7 +4517,7 @@ void case_144() } void case_149() -#line 1219 "cs-parser.jay" +#line 1217 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4527,7 +4525,7 @@ void case_149() } void case_151() -#line 1232 "cs-parser.jay" +#line 1230 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4535,14 +4533,14 @@ void case_151() } void case_152() -#line 1238 "cs-parser.jay" +#line 1236 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_155() -#line 1248 "cs-parser.jay" +#line 1246 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4550,7 +4548,7 @@ void case_155() } void case_156() -#line 1257 "cs-parser.jay" +#line 1255 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4560,7 +4558,7 @@ void case_156() } void case_157() -#line 1265 "cs-parser.jay" +#line 1263 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4586,7 +4584,7 @@ void case_157() } void case_160() -#line 1303 "cs-parser.jay" +#line 1301 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4621,14 +4619,14 @@ void case_160() } void case_162() -#line 1344 "cs-parser.jay" +#line 1342 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_164() -#line 1353 "cs-parser.jay" +#line 1351 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4680,7 +4678,7 @@ void case_164() } void case_165() -#line 1406 "cs-parser.jay" +#line 1404 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4698,7 +4696,7 @@ void case_165() } void case_170() -#line 1435 "cs-parser.jay" +#line 1433 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4706,7 +4704,7 @@ void case_170() } void case_171() -#line 1441 "cs-parser.jay" +#line 1439 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4717,7 +4715,7 @@ void case_171() } void case_172() -#line 1450 "cs-parser.jay" +#line 1448 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4728,7 +4726,7 @@ void case_172() } void case_173() -#line 1459 "cs-parser.jay" +#line 1457 "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"); @@ -4738,7 +4736,7 @@ void case_173() } void case_174() -#line 1467 "cs-parser.jay" +#line 1465 "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"); @@ -4753,7 +4751,7 @@ void case_174() } void case_175() -#line 1480 "cs-parser.jay" +#line 1478 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4762,7 +4760,7 @@ void case_175() } void case_176() -#line 1487 "cs-parser.jay" +#line 1485 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4776,14 +4774,14 @@ void case_176() } void case_179() -#line 1507 "cs-parser.jay" +#line 1505 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_180() -#line 1515 "cs-parser.jay" +#line 1513 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4794,7 +4792,7 @@ void case_180() } void case_181() -#line 1524 "cs-parser.jay" +#line 1522 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4814,7 +4812,7 @@ void case_181() } void case_182() -#line 1548 "cs-parser.jay" +#line 1546 "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); @@ -4822,7 +4820,7 @@ void case_182() } void case_183() -#line 1557 "cs-parser.jay" +#line 1555 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4831,7 +4829,7 @@ void case_183() } void case_184() -#line 1567 "cs-parser.jay" +#line 1565 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4840,7 +4838,7 @@ void case_184() } void case_186() -#line 1582 "cs-parser.jay" +#line 1580 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4879,14 +4877,14 @@ void case_186() } void case_189() -#line 1627 "cs-parser.jay" +#line 1625 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; parameterModifierLocation = GetLocation (yyVals[0+yyTop]); } void case_190() -#line 1632 "cs-parser.jay" +#line 1630 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4909,7 +4907,7 @@ void case_190() } void case_191() -#line 1656 "cs-parser.jay" +#line 1654 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4918,7 +4916,7 @@ void case_191() } void case_192() -#line 1663 "cs-parser.jay" +#line 1661 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4927,7 +4925,7 @@ void case_192() } void case_193() -#line 1670 "cs-parser.jay" +#line 1668 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4939,14 +4937,14 @@ void case_193() } void case_194() -#line 1683 "cs-parser.jay" +#line 1681 "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_195() -#line 1688 "cs-parser.jay" +#line 1686 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4955,21 +4953,21 @@ void case_195() } void case_196() -#line 1695 "cs-parser.jay" +#line 1693 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_197() -#line 1703 "cs-parser.jay" +#line 1701 "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"); } void case_198() -#line 1708 "cs-parser.jay" +#line 1706 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4980,21 +4978,21 @@ void case_198() } void case_200() -#line 1724 "cs-parser.jay" +#line 1722 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_201() -#line 1735 "cs-parser.jay" +#line 1733 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_202() -#line 1740 "cs-parser.jay" +#line 1738 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5010,7 +5008,7 @@ void case_202() } void case_203() -#line 1754 "cs-parser.jay" +#line 1752 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5019,14 +5017,14 @@ void case_203() } void case_204() -#line 1761 "cs-parser.jay" +#line 1759 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_206() -#line 1775 "cs-parser.jay" +#line 1773 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5053,7 +5051,7 @@ void case_206() } void case_208() -#line 1804 "cs-parser.jay" +#line 1802 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5066,7 +5064,7 @@ void case_208() } void case_213() -#line 1823 "cs-parser.jay" +#line 1821 "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 ()); @@ -5079,7 +5077,7 @@ void case_213() } void case_214() -#line 1837 "cs-parser.jay" +#line 1835 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5102,7 +5100,7 @@ void case_214() } void case_215() -#line 1858 "cs-parser.jay" +#line 1856 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5125,7 +5123,7 @@ void case_215() } void case_216() -#line 1882 "cs-parser.jay" +#line 1880 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5153,7 +5151,7 @@ void case_216() } void case_217() -#line 1908 "cs-parser.jay" +#line 1906 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5176,21 +5174,21 @@ void case_217() } void case_219() -#line 1933 "cs-parser.jay" +#line 1931 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1938 "cs-parser.jay" +#line 1936 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1953 "cs-parser.jay" +#line 1951 "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]); @@ -5198,7 +5196,7 @@ void case_222() } void case_223() -#line 1960 "cs-parser.jay" +#line 1958 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5211,7 +5209,7 @@ void case_223() } void case_224() -#line 1971 "cs-parser.jay" +#line 1969 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5219,14 +5217,14 @@ void case_224() } void case_225() -#line 1977 "cs-parser.jay" +#line 1975 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); yyVal = pop_current_class (); } void case_241() -#line 2029 "cs-parser.jay" +#line 2027 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5253,14 +5251,14 @@ void case_241() } void case_245() -#line 2063 "cs-parser.jay" +#line 2061 "cs-parser.jay" { 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_247() -#line 2075 "cs-parser.jay" +#line 2073 "cs-parser.jay" { valid_param_mod = 0; @@ -5302,7 +5300,7 @@ void case_247() } void case_272() -#line 2151 "cs-parser.jay" +#line 2149 "cs-parser.jay" { valid_param_mod = 0; @@ -5319,7 +5317,7 @@ void case_272() } void case_274() -#line 2170 "cs-parser.jay" +#line 2168 "cs-parser.jay" { valid_param_mod = 0; @@ -5336,7 +5334,7 @@ void case_274() } void case_275() -#line 2185 "cs-parser.jay" +#line 2183 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5344,7 +5342,7 @@ void case_275() } void case_276() -#line 2191 "cs-parser.jay" +#line 2189 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5352,7 +5350,7 @@ void case_276() } void case_277() -#line 2201 "cs-parser.jay" +#line 2199 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5368,7 +5366,7 @@ void case_277() } void case_278() -#line 2220 "cs-parser.jay" +#line 2218 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5379,7 +5377,7 @@ void case_278() } void case_279() -#line 2229 "cs-parser.jay" +#line 2227 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5392,7 +5390,7 @@ void case_279() } void case_280() -#line 2240 "cs-parser.jay" +#line 2238 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5422,7 +5420,7 @@ void case_280() } void case_286() -#line 2285 "cs-parser.jay" +#line 2283 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5430,7 +5428,7 @@ void case_286() } void case_288() -#line 2295 "cs-parser.jay" +#line 2293 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5438,14 +5436,14 @@ void case_288() } void case_289() -#line 2301 "cs-parser.jay" +#line 2299 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_290() -#line 2309 "cs-parser.jay" +#line 2307 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5456,7 +5454,7 @@ void case_290() } void case_291() -#line 2318 "cs-parser.jay" +#line 2316 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5478,7 +5476,7 @@ void case_291() } void case_292() -#line 2343 "cs-parser.jay" +#line 2341 "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); @@ -5492,7 +5490,7 @@ void case_292() } void case_293() -#line 2357 "cs-parser.jay" +#line 2355 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5504,7 +5502,7 @@ void case_293() } void case_294() -#line 2370 "cs-parser.jay" +#line 2368 "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); @@ -5514,7 +5512,7 @@ void case_294() } void case_295() -#line 2378 "cs-parser.jay" +#line 2376 "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"); @@ -5523,7 +5521,7 @@ void case_295() } void case_296() -#line 2385 "cs-parser.jay" +#line 2383 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5536,14 +5534,14 @@ void case_296() } void case_299() -#line 2404 "cs-parser.jay" +#line 2402 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_304() -#line 2428 "cs-parser.jay" +#line 2426 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5551,7 +5549,7 @@ void case_304() } void case_306() -#line 2438 "cs-parser.jay" +#line 2436 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5560,7 +5558,7 @@ void case_306() } void case_307() -#line 2447 "cs-parser.jay" +#line 2445 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5574,28 +5572,28 @@ void case_307() } void case_311() -#line 2468 "cs-parser.jay" +#line 2466 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_312() -#line 2473 "cs-parser.jay" +#line 2471 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_313() -#line 2478 "cs-parser.jay" +#line 2476 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_314() -#line 2486 "cs-parser.jay" +#line 2484 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5609,7 +5607,7 @@ void case_314() } void case_315() -#line 2498 "cs-parser.jay" +#line 2496 "cs-parser.jay" { lexer.EventParsing = true; @@ -5624,7 +5622,7 @@ void case_315() } void case_316() -#line 2514 "cs-parser.jay" +#line 2512 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5638,7 +5636,7 @@ void case_316() } void case_317() -#line 2526 "cs-parser.jay" +#line 2524 "cs-parser.jay" { lexer.EventParsing = true; @@ -5653,21 +5651,21 @@ void case_317() } void case_318() -#line 2542 "cs-parser.jay" +#line 2540 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_320() -#line 2554 "cs-parser.jay" +#line 2552 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2559 "cs-parser.jay" +#line 2557 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5681,7 +5679,7 @@ void case_321() } void case_322() -#line 2571 "cs-parser.jay" +#line 2569 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5689,7 +5687,7 @@ void case_322() } void case_323() -#line 2577 "cs-parser.jay" +#line 2575 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5704,7 +5702,7 @@ void case_323() } void case_325() -#line 2594 "cs-parser.jay" +#line 2592 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5716,21 +5714,21 @@ void case_325() } void case_326() -#line 2604 "cs-parser.jay" +#line 2602 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2622 "cs-parser.jay" +#line 2620 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2630 "cs-parser.jay" +#line 2628 "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]); @@ -5745,7 +5743,7 @@ void case_332() } void case_333() -#line 2643 "cs-parser.jay" +#line 2641 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5755,7 +5753,7 @@ void case_333() } void case_334() -#line 2651 "cs-parser.jay" +#line 2649 "cs-parser.jay" { --lexer.parsing_block; @@ -5771,7 +5769,7 @@ void case_334() } void case_336() -#line 2676 "cs-parser.jay" +#line 2674 "cs-parser.jay" { valid_param_mod = 0; @@ -5791,7 +5789,7 @@ void case_336() } void case_338() -#line 2698 "cs-parser.jay" +#line 2696 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5807,7 +5805,7 @@ void case_338() } void case_340() -#line 2716 "cs-parser.jay" +#line 2714 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5816,7 +5814,7 @@ void case_340() } void case_342() -#line 2727 "cs-parser.jay" +#line 2725 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5825,7 +5823,7 @@ void case_342() } void case_344() -#line 2738 "cs-parser.jay" +#line 2736 "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); @@ -5833,14 +5831,14 @@ void case_344() } void case_345() -#line 2747 "cs-parser.jay" +#line 2745 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2759 "cs-parser.jay" +#line 2757 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5853,14 +5851,14 @@ void case_347() } void case_348() -#line 2770 "cs-parser.jay" +#line 2768 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2778 "cs-parser.jay" +#line 2776 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5869,7 +5867,7 @@ void case_349() } void case_350() -#line 2785 "cs-parser.jay" +#line 2783 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5878,7 +5876,7 @@ void case_350() } void case_352() -#line 2802 "cs-parser.jay" +#line 2800 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5886,7 +5884,7 @@ void case_352() } void case_353() -#line 2811 "cs-parser.jay" +#line 2809 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5895,7 +5893,7 @@ void case_353() } void case_355() -#line 2822 "cs-parser.jay" +#line 2820 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5903,21 +5901,21 @@ void case_355() } void case_356() -#line 2831 "cs-parser.jay" +#line 2829 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2836 "cs-parser.jay" +#line 2834 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2844 "cs-parser.jay" +#line 2842 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5925,7 +5923,7 @@ void case_358() } void case_359() -#line 2850 "cs-parser.jay" +#line 2848 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5935,7 +5933,7 @@ void case_359() } void case_360() -#line 2858 "cs-parser.jay" +#line 2856 "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); @@ -5943,7 +5941,7 @@ void case_360() } void case_362() -#line 2868 "cs-parser.jay" +#line 2866 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5953,7 +5951,7 @@ void case_362() } void case_363() -#line 2879 "cs-parser.jay" +#line 2877 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5961,7 +5959,7 @@ void case_363() } void case_364() -#line 2885 "cs-parser.jay" +#line 2883 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5970,14 +5968,14 @@ void case_364() } void case_365() -#line 2895 "cs-parser.jay" +#line 2893 "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_366() -#line 2900 "cs-parser.jay" +#line 2898 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -5988,28 +5986,28 @@ void case_366() } void case_371() -#line 2934 "cs-parser.jay" +#line 2932 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2943 "cs-parser.jay" +#line 2941 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2952 "cs-parser.jay" +#line 2950 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2968 "cs-parser.jay" +#line 2966 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6024,14 +6022,14 @@ void case_378() } void case_380() -#line 2985 "cs-parser.jay" +#line 2983 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 3001 "cs-parser.jay" +#line 2999 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6039,7 +6037,7 @@ void case_383() } void case_384() -#line 3007 "cs-parser.jay" +#line 3005 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6048,7 +6046,7 @@ void case_384() } void case_385() -#line 3017 "cs-parser.jay" +#line 3015 "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 ()); @@ -6057,35 +6055,35 @@ void case_385() } void case_386() -#line 3024 "cs-parser.jay" +#line 3022 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3086 "cs-parser.jay" +#line 3084 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3090 "cs-parser.jay" +#line 3088 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3131 "cs-parser.jay" +#line 3129 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3143 "cs-parser.jay" +#line 3141 "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); @@ -6093,7 +6091,7 @@ void case_437() } void case_438() -#line 3149 "cs-parser.jay" +#line 3147 "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); @@ -6101,7 +6099,7 @@ void case_438() } void case_439() -#line 3155 "cs-parser.jay" +#line 3153 "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); @@ -6109,7 +6107,7 @@ void case_439() } void case_440() -#line 3161 "cs-parser.jay" +#line 3159 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6119,28 +6117,28 @@ void case_440() } void case_442() -#line 3171 "cs-parser.jay" +#line 3169 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3179 "cs-parser.jay" +#line 3177 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3187 "cs-parser.jay" +#line 3185 "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_448() -#line 3200 "cs-parser.jay" +#line 3198 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6152,14 +6150,14 @@ void case_448() } void case_449() -#line 3210 "cs-parser.jay" +#line 3208 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3226 "cs-parser.jay" +#line 3224 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6167,7 +6165,7 @@ void case_452() } void case_453() -#line 3232 "cs-parser.jay" +#line 3230 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6176,14 +6174,14 @@ void case_453() } void case_454() -#line 3238 "cs-parser.jay" +#line 3236 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3246 "cs-parser.jay" +#line 3244 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6191,7 +6189,7 @@ void case_455() } void case_457() -#line 3255 "cs-parser.jay" +#line 3253 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6201,7 +6199,7 @@ void case_457() } void case_458() -#line 3263 "cs-parser.jay" +#line 3261 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6210,14 +6208,14 @@ void case_458() } void case_459() -#line 3270 "cs-parser.jay" +#line 3268 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3288 "cs-parser.jay" +#line 3286 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6225,7 +6223,7 @@ void case_464() } void case_465() -#line 3294 "cs-parser.jay" +#line 3292 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6237,7 +6235,7 @@ void case_465() } void case_466() -#line 3304 "cs-parser.jay" +#line 3302 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6254,56 +6252,56 @@ void case_466() } void case_467() -#line 3319 "cs-parser.jay" +#line 3317 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3324 "cs-parser.jay" +#line 3322 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3345 "cs-parser.jay" +#line 3343 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3350 "cs-parser.jay" +#line 3348 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3355 "cs-parser.jay" +#line 3353 "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_476() -#line 3360 "cs-parser.jay" +#line 3358 "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_478() -#line 3372 "cs-parser.jay" +#line 3370 "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_479() -#line 3380 "cs-parser.jay" +#line 3378 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6311,7 +6309,7 @@ void case_479() } void case_480() -#line 3386 "cs-parser.jay" +#line 3384 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6320,14 +6318,14 @@ void case_480() } void case_481() -#line 3392 "cs-parser.jay" +#line 3390 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3400 "cs-parser.jay" +#line 3398 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6335,7 +6333,7 @@ void case_482() } void case_483() -#line 3406 "cs-parser.jay" +#line 3404 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6347,21 +6345,21 @@ void case_483() } void case_487() -#line 3434 "cs-parser.jay" +#line 3432 "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_488() -#line 3439 "cs-parser.jay" +#line 3437 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3461 "cs-parser.jay" +#line 3459 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6376,7 +6374,7 @@ void case_491() } void case_492() -#line 3474 "cs-parser.jay" +#line 3472 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6385,7 +6383,7 @@ void case_492() } void case_493() -#line 3486 "cs-parser.jay" +#line 3484 "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])) { @@ -6395,7 +6393,7 @@ void case_493() } void case_494() -#line 3494 "cs-parser.jay" +#line 3492 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6404,7 +6402,7 @@ void case_494() } void case_495() -#line 3501 "cs-parser.jay" +#line 3499 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6413,28 +6411,28 @@ void case_495() } void case_496() -#line 3508 "cs-parser.jay" +#line 3506 "cs-parser.jay" { 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_497() -#line 3513 "cs-parser.jay" +#line 3511 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3524 "cs-parser.jay" +#line 3522 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3532 "cs-parser.jay" +#line 3530 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6446,7 +6444,7 @@ void case_500() } void case_505() -#line 3555 "cs-parser.jay" +#line 3553 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6454,7 +6452,7 @@ void case_505() } void case_506() -#line 3561 "cs-parser.jay" +#line 3559 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6464,7 +6462,7 @@ void case_506() } void case_507() -#line 3572 "cs-parser.jay" +#line 3570 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6472,7 +6470,7 @@ void case_507() } void case_508() -#line 3578 "cs-parser.jay" +#line 3576 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6480,14 +6478,14 @@ void case_508() } void case_509() -#line 3584 "cs-parser.jay" +#line 3582 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3589 "cs-parser.jay" +#line 3587 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6495,28 +6493,28 @@ void case_510() } void case_514() -#line 3604 "cs-parser.jay" +#line 3602 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3612 "cs-parser.jay" +#line 3610 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3617 "cs-parser.jay" +#line 3615 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3647 "cs-parser.jay" +#line 3645 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6525,7 +6523,7 @@ void case_521() } void case_522() -#line 3654 "cs-parser.jay" +#line 3652 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6538,7 +6536,7 @@ void case_522() } void case_523() -#line 3668 "cs-parser.jay" +#line 3666 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6546,7 +6544,7 @@ void case_523() } void case_524() -#line 3674 "cs-parser.jay" +#line 3672 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6555,7 +6553,7 @@ void case_524() } void case_526() -#line 3688 "cs-parser.jay" +#line 3686 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6563,14 +6561,14 @@ void case_526() } void case_529() -#line 3699 "cs-parser.jay" +#line 3697 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3707 "cs-parser.jay" +#line 3705 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6578,7 +6576,7 @@ void case_530() } void case_531() -#line 3713 "cs-parser.jay" +#line 3711 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6588,7 +6586,7 @@ void case_531() } void case_532() -#line 3721 "cs-parser.jay" +#line 3719 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6596,7 +6594,7 @@ void case_532() } void case_533() -#line 3727 "cs-parser.jay" +#line 3725 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6604,7 +6602,7 @@ void case_533() } void case_534() -#line 3733 "cs-parser.jay" +#line 3731 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6615,7 +6613,7 @@ void case_534() } void case_535() -#line 3745 "cs-parser.jay" +#line 3743 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6624,7 +6622,7 @@ void case_535() } void case_536() -#line 3755 "cs-parser.jay" +#line 3753 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6634,35 +6632,35 @@ void case_536() } void case_537() -#line 3766 "cs-parser.jay" +#line 3764 "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_538() -#line 3774 "cs-parser.jay" +#line 3772 "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_539() -#line 3782 "cs-parser.jay" +#line 3780 "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_540() -#line 3790 "cs-parser.jay" +#line 3788 "cs-parser.jay" { 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_542() -#line 3802 "cs-parser.jay" +#line 3800 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6673,7 +6671,7 @@ void case_542() } void case_548() -#line 3834 "cs-parser.jay" +#line 3832 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6682,7 +6680,7 @@ void case_548() } void case_549() -#line 3844 "cs-parser.jay" +#line 3842 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6692,147 +6690,147 @@ void case_549() } void case_555() -#line 3869 "cs-parser.jay" +#line 3867 "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_556() -#line 3877 "cs-parser.jay" +#line 3875 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3918 "cs-parser.jay" +#line 3916 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3923 "cs-parser.jay" +#line 3921 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3928 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3937 "cs-parser.jay" +#line 3935 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3946 "cs-parser.jay" +#line 3944 "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_575() -#line 3963 "cs-parser.jay" +#line 3961 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3968 "cs-parser.jay" +#line 3966 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3977 "cs-parser.jay" +#line 3975 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 3982 "cs-parser.jay" +#line 3980 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 3987 "cs-parser.jay" +#line 3985 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 3992 "cs-parser.jay" +#line 3990 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 4001 "cs-parser.jay" +#line 3999 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 4006 "cs-parser.jay" +#line 4004 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4015 "cs-parser.jay" +#line 4013 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4024 "cs-parser.jay" +#line 4022 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4033 "cs-parser.jay" +#line 4031 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4042 "cs-parser.jay" +#line 4040 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4051 "cs-parser.jay" +#line 4049 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4060 "cs-parser.jay" +#line 4058 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6841,84 +6839,84 @@ void case_596() } void case_598() -#line 4071 "cs-parser.jay" +#line 4069 "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_600() -#line 4083 "cs-parser.jay" +#line 4081 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4088 "cs-parser.jay" +#line 4086 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4093 "cs-parser.jay" +#line 4091 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4098 "cs-parser.jay" +#line 4096 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4103 "cs-parser.jay" +#line 4101 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4108 "cs-parser.jay" +#line 4106 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4113 "cs-parser.jay" +#line 4111 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4118 "cs-parser.jay" +#line 4116 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4123 "cs-parser.jay" +#line 4121 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4128 "cs-parser.jay" +#line 4126 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4136 "cs-parser.jay" +#line 4134 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6927,7 +6925,7 @@ void case_610() } void case_611() -#line 4143 "cs-parser.jay" +#line 4141 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6942,7 +6940,7 @@ void case_611() } void case_612() -#line 4159 "cs-parser.jay" +#line 4157 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6950,7 +6948,7 @@ void case_612() } void case_613() -#line 4165 "cs-parser.jay" +#line 4163 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6958,21 +6956,21 @@ void case_613() } void case_614() -#line 4171 "cs-parser.jay" +#line 4169 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4179 "cs-parser.jay" +#line 4177 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4195 "cs-parser.jay" +#line 4193 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6981,14 +6979,14 @@ void case_620() } void case_622() -#line 4206 "cs-parser.jay" +#line 4204 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4214 "cs-parser.jay" +#line 4212 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -6996,14 +6994,14 @@ void case_623() } void case_624() -#line 4220 "cs-parser.jay" +#line 4218 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4225 "cs-parser.jay" +#line 4223 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7011,63 +7009,63 @@ void case_625() } void case_626() -#line 4231 "cs-parser.jay" +#line 4229 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4240 "cs-parser.jay" +#line 4238 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4245 "cs-parser.jay" +#line 4243 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4254 "cs-parser.jay" +#line 4252 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4259 "cs-parser.jay" +#line 4257 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4282 "cs-parser.jay" +#line 4280 "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_640() -#line 4287 "cs-parser.jay" +#line 4285 "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_641() -#line 4292 "cs-parser.jay" +#line 4290 "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_645() -#line 4321 "cs-parser.jay" +#line 4319 "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]); @@ -7079,7 +7077,7 @@ void case_645() } void case_646() -#line 4332 "cs-parser.jay" +#line 4330 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7093,7 +7091,7 @@ void case_646() } void case_647() -#line 4344 "cs-parser.jay" +#line 4342 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7101,21 +7099,21 @@ void case_647() } void case_648() -#line 4350 "cs-parser.jay" +#line 4348 "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_651() -#line 4365 "cs-parser.jay" +#line 4363 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4375 "cs-parser.jay" +#line 4373 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7133,7 +7131,7 @@ void case_654() } void case_655() -#line 4394 "cs-parser.jay" +#line 4392 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7143,91 +7141,91 @@ void case_655() } void case_656() -#line 4402 "cs-parser.jay" +#line 4400 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4407 "cs-parser.jay" +#line 4405 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4412 "cs-parser.jay" +#line 4410 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4417 "cs-parser.jay" +#line 4415 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4422 "cs-parser.jay" +#line 4420 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4427 "cs-parser.jay" +#line 4425 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4432 "cs-parser.jay" +#line 4430 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4437 "cs-parser.jay" +#line 4435 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4442 "cs-parser.jay" +#line 4440 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4447 "cs-parser.jay" +#line 4445 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4452 "cs-parser.jay" +#line 4450 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4457 "cs-parser.jay" +#line 4455 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4462 "cs-parser.jay" +#line 4460 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7236,21 +7234,21 @@ void case_668() } void case_669() -#line 4469 "cs-parser.jay" +#line 4467 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_674() -#line 4490 "cs-parser.jay" +#line 4488 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4498 "cs-parser.jay" +#line 4496 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7258,7 +7256,7 @@ void case_675() } void case_676() -#line 4504 "cs-parser.jay" +#line 4502 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7276,14 +7274,14 @@ void case_676() } void case_677() -#line 4523 "cs-parser.jay" +#line 4521 "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_678() -#line 4531 "cs-parser.jay" +#line 4529 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7291,7 +7289,7 @@ void case_678() } void case_679() -#line 4537 "cs-parser.jay" +#line 4535 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7316,7 +7314,7 @@ void case_679() } void case_680() -#line 4563 "cs-parser.jay" +#line 4561 "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 ()); @@ -7325,14 +7323,14 @@ void case_680() } void case_681() -#line 4570 "cs-parser.jay" +#line 4568 "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_685() -#line 4590 "cs-parser.jay" +#line 4588 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7341,77 +7339,77 @@ void case_685() } void case_688() -#line 4624 "cs-parser.jay" +#line 4622 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4636 "cs-parser.jay" +#line 4634 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4641 "cs-parser.jay" +#line 4639 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4650 "cs-parser.jay" +#line 4648 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4655 "cs-parser.jay" +#line 4653 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4682 "cs-parser.jay" +#line 4680 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4746 "cs-parser.jay" +#line 4744 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4751 "cs-parser.jay" +#line 4749 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4756 "cs-parser.jay" +#line 4754 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4764 "cs-parser.jay" +#line 4762 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4772 "cs-parser.jay" +#line 4770 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7421,7 +7419,7 @@ void case_738() } void case_741() -#line 4785 "cs-parser.jay" +#line 4783 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7430,7 +7428,7 @@ void case_741() } void case_742() -#line 4801 "cs-parser.jay" +#line 4799 "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*/ @@ -7462,7 +7460,7 @@ void case_742() } void case_743() -#line 4831 "cs-parser.jay" +#line 4829 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7475,7 +7473,7 @@ void case_743() } void case_744() -#line 4842 "cs-parser.jay" +#line 4840 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7484,21 +7482,21 @@ void case_744() } void case_747() -#line 4857 "cs-parser.jay" +#line 4855 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4866 "cs-parser.jay" +#line 4864 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4881 "cs-parser.jay" +#line 4879 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7507,7 +7505,7 @@ void case_751() } void case_752() -#line 4888 "cs-parser.jay" +#line 4886 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7515,7 +7513,7 @@ void case_752() } void case_753() -#line 4894 "cs-parser.jay" +#line 4892 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7524,7 +7522,7 @@ void case_753() } void case_754() -#line 4901 "cs-parser.jay" +#line 4899 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7536,14 +7534,14 @@ void case_754() } void case_756() -#line 4915 "cs-parser.jay" +#line 4913 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4920 "cs-parser.jay" +#line 4918 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7554,7 +7552,7 @@ void case_757() } void case_762() -#line 4942 "cs-parser.jay" +#line 4940 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7565,7 +7563,7 @@ void case_762() } void case_763() -#line 4951 "cs-parser.jay" +#line 4949 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7576,14 +7574,14 @@ void case_763() } void case_765() -#line 4967 "cs-parser.jay" +#line 4965 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 4985 "cs-parser.jay" +#line 4983 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7594,28 +7592,28 @@ void case_770() } void case_772() -#line 4998 "cs-parser.jay" +#line 4996 "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_773() -#line 5003 "cs-parser.jay" +#line 5001 "cs-parser.jay" { 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_774() -#line 5011 "cs-parser.jay" +#line 5009 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5029 "cs-parser.jay" +#line 5027 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7627,7 +7625,7 @@ void case_778() } void case_779() -#line 5042 "cs-parser.jay" +#line 5040 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7637,14 +7635,14 @@ void case_779() } void case_780() -#line 5050 "cs-parser.jay" +#line 5048 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5064 "cs-parser.jay" +#line 5062 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7654,7 +7652,7 @@ void case_783() } void case_784() -#line 5073 "cs-parser.jay" +#line 5071 "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])); @@ -7666,7 +7664,7 @@ void case_784() } void case_786() -#line 5090 "cs-parser.jay" +#line 5088 "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])); @@ -7674,14 +7672,14 @@ void case_786() } void case_787() -#line 5099 "cs-parser.jay" +#line 5097 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5108 "cs-parser.jay" +#line 5106 "cs-parser.jay" { var sections = new List (4); @@ -7690,7 +7688,7 @@ void case_789() } void case_790() -#line 5115 "cs-parser.jay" +#line 5113 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7699,14 +7697,14 @@ void case_790() } void case_791() -#line 5122 "cs-parser.jay" +#line 5120 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5141 "cs-parser.jay" +#line 5139 "cs-parser.jay" { var labels = new List (2); @@ -7715,7 +7713,7 @@ void case_794() } void case_795() -#line 5148 "cs-parser.jay" +#line 5146 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7724,14 +7722,14 @@ void case_795() } void case_796() -#line 5158 "cs-parser.jay" +#line 5156 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5177 "cs-parser.jay" +#line 5175 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7741,21 +7739,21 @@ void case_802() } void case_803() -#line 5189 "cs-parser.jay" +#line 5187 "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_804() -#line 5197 "cs-parser.jay" +#line 5195 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5213 "cs-parser.jay" +#line 5211 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7769,14 +7767,14 @@ void case_806() } void case_807() -#line 5225 "cs-parser.jay" +#line 5223 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5238 "cs-parser.jay" +#line 5236 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7785,14 +7783,14 @@ void case_810() } void case_811() -#line 5245 "cs-parser.jay" +#line 5243 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5269 "cs-parser.jay" +#line 5267 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7807,14 +7805,14 @@ void case_819() } void case_820() -#line 5285 "cs-parser.jay" +#line 5283 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5290 "cs-parser.jay" +#line 5288 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7825,7 +7823,7 @@ void case_821() } void case_822() -#line 5299 "cs-parser.jay" +#line 5297 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7838,21 +7836,21 @@ void case_822() } void case_829() -#line 5322 "cs-parser.jay" +#line 5320 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5330 "cs-parser.jay" +#line 5328 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5338 "cs-parser.jay" +#line 5336 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7860,35 +7858,35 @@ void case_831() } void case_832() -#line 5344 "cs-parser.jay" +#line 5342 "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_833() -#line 5349 "cs-parser.jay" +#line 5347 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5357 "cs-parser.jay" +#line 5355 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5365 "cs-parser.jay" +#line 5363 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5373 "cs-parser.jay" +#line 5371 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7906,7 +7904,7 @@ void case_836() } void case_837() -#line 5389 "cs-parser.jay" +#line 5387 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7922,28 +7920,28 @@ void case_837() } void case_841() -#line 5415 "cs-parser.jay" +#line 5413 "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_842() -#line 5420 "cs-parser.jay" +#line 5418 "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_843() -#line 5425 "cs-parser.jay" +#line 5423 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5433 "cs-parser.jay" +#line 5431 "cs-parser.jay" { var l = new List (2); @@ -7952,7 +7950,7 @@ void case_844() } void case_845() -#line 5440 "cs-parser.jay" +#line 5438 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7970,7 +7968,7 @@ void case_845() } void case_849() -#line 5468 "cs-parser.jay" +#line 5466 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -7987,7 +7985,7 @@ void case_849() } void case_851() -#line 5487 "cs-parser.jay" +#line 5485 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8000,14 +7998,14 @@ void case_851() } void case_854() -#line 5515 "cs-parser.jay" +#line 5513 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5525 "cs-parser.jay" +#line 5523 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8017,7 +8015,7 @@ void case_856() } void case_857() -#line 5536 "cs-parser.jay" +#line 5534 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8029,14 +8027,14 @@ void case_857() } void case_858() -#line 5546 "cs-parser.jay" +#line 5544 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5551 "cs-parser.jay" +#line 5549 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8048,7 +8046,7 @@ void case_859() } void case_860() -#line 5564 "cs-parser.jay" +#line 5562 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8060,14 +8058,14 @@ void case_860() } void case_861() -#line 5574 "cs-parser.jay" +#line 5572 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5579 "cs-parser.jay" +#line 5577 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8079,7 +8077,7 @@ void case_862() } void case_863() -#line 5589 "cs-parser.jay" +#line 5587 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8090,14 +8088,14 @@ void case_863() } void case_865() -#line 5605 "cs-parser.jay" +#line 5603 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5616 "cs-parser.jay" +#line 5614 "cs-parser.jay" { lexer.query_parsing = false; @@ -8111,7 +8109,7 @@ void case_866() } void case_867() -#line 5628 "cs-parser.jay" +#line 5626 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8123,7 +8121,7 @@ void case_867() } void case_868() -#line 5639 "cs-parser.jay" +#line 5637 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8133,7 +8131,7 @@ void case_868() } void case_869() -#line 5646 "cs-parser.jay" +#line 5644 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8141,7 +8139,7 @@ void case_869() } void case_870() -#line 5655 "cs-parser.jay" +#line 5653 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8151,7 +8149,7 @@ void case_870() } void case_871() -#line 5663 "cs-parser.jay" +#line 5661 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8165,7 +8163,7 @@ void case_871() } void case_872() -#line 5678 "cs-parser.jay" +#line 5676 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8175,7 +8173,7 @@ void case_872() } void case_873() -#line 5686 "cs-parser.jay" +#line 5684 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8189,7 +8187,7 @@ void case_873() } void case_875() -#line 5705 "cs-parser.jay" +#line 5703 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8202,7 +8200,7 @@ void case_875() } void case_877() -#line 5720 "cs-parser.jay" +#line 5718 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8218,7 +8216,7 @@ void case_877() } void case_878() -#line 5737 "cs-parser.jay" +#line 5735 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8235,14 +8233,14 @@ void case_878() } void case_880() -#line 5753 "cs-parser.jay" +#line 5751 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5765 "cs-parser.jay" +#line 5763 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8251,7 +8249,7 @@ void case_882() } void case_883() -#line 5772 "cs-parser.jay" +#line 5770 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8261,7 +8259,7 @@ void case_883() } void case_884() -#line 5780 "cs-parser.jay" +#line 5778 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8270,7 +8268,7 @@ void case_884() } void case_885() -#line 5787 "cs-parser.jay" +#line 5785 "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])); @@ -8280,14 +8278,14 @@ void case_885() } void case_889() -#line 5804 "cs-parser.jay" +#line 5802 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5824 "cs-parser.jay" +#line 5822 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8301,7 +8299,7 @@ void case_896() } void case_898() -#line 5843 "cs-parser.jay" +#line 5841 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8310,7 +8308,7 @@ void case_898() } void case_899() -#line 5853 "cs-parser.jay" +#line 5851 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8320,7 +8318,7 @@ void case_899() } void case_900() -#line 5861 "cs-parser.jay" +#line 5859 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8330,7 +8328,7 @@ void case_900() } void case_901() -#line 5869 "cs-parser.jay" +#line 5867 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8340,7 +8338,7 @@ void case_901() } void case_902() -#line 5877 "cs-parser.jay" +#line 5875 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8380,7 +8378,7 @@ void case_902() } void case_903() -#line 5915 "cs-parser.jay" +#line 5913 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8390,7 +8388,7 @@ void case_903() } void case_904() -#line 5923 "cs-parser.jay" +#line 5921 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8400,7 +8398,7 @@ void case_904() } void case_905() -#line 5931 "cs-parser.jay" +#line 5929 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8410,7 +8408,7 @@ void case_905() } void case_906() -#line 5939 "cs-parser.jay" +#line 5937 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8452,7 +8450,7 @@ void case_906() } void case_910() -#line 5994 "cs-parser.jay" +#line 5992 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8461,7 +8459,7 @@ void case_910() } void case_912() -#line 6005 "cs-parser.jay" +#line 6003 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8470,14 +8468,14 @@ void case_912() } void case_913() -#line 6012 "cs-parser.jay" +#line 6010 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6021 "cs-parser.jay" +#line 6019 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8486,42 +8484,42 @@ void case_915() } void case_916() -#line 6028 "cs-parser.jay" +#line 6026 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6040 "cs-parser.jay" +#line 6038 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6045 "cs-parser.jay" +#line 6043 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6057 "cs-parser.jay" +#line 6055 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6062 "cs-parser.jay" +#line 6060 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6072 "cs-parser.jay" +#line 6070 "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*/ @@ -8539,7 +8537,7 @@ void case_924() } void case_925() -#line 6088 "cs-parser.jay" +#line 6086 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8550,7 +8548,7 @@ void case_925() } void case_928() -#line 6115 "cs-parser.jay" +#line 6113 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8582,7 +8580,7 @@ void case_928() } void case_929() -#line 6145 "cs-parser.jay" +#line 6143 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8594,7 +8592,7 @@ void case_929() } void case_939() -#line 6188 "cs-parser.jay" +#line 6186 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8602,7 +8600,7 @@ void case_939() } void case_940() -#line 6194 "cs-parser.jay" +#line 6192 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8611,14 +8609,14 @@ void case_940() } void case_943() -#line 6209 "cs-parser.jay" +#line 6207 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6214 "cs-parser.jay" +#line 6212 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8628,7 +8626,7 @@ void case_944() } void case_945() -#line 6222 "cs-parser.jay" +#line 6220 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8638,7 +8636,7 @@ void case_945() } void case_946() -#line 6230 "cs-parser.jay" +#line 6228 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8647,7 +8645,7 @@ void case_946() } void case_954() -#line 6268 "cs-parser.jay" +#line 6266 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8655,7 +8653,7 @@ void case_954() } void case_955() -#line 6274 "cs-parser.jay" +#line 6272 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8663,7 +8661,7 @@ void case_955() } void case_956() -#line 6283 "cs-parser.jay" +#line 6281 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -11999,7 +11997,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6292 "cs-parser.jay" +#line 6290 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 4c0d6436a6..f186be4ee6 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -543,16 +543,14 @@ namespace_declaration } opt_extern_alias_directives opt_using_directives opt_namespace_or_type_declarations CLOSE_BRACE opt_semicolon { - if ($11 != null) - lbag.AddLocation (current_namespace, GetLocation ($2), GetLocation ($5), GetLocation ($10), GetLocation ($11)); - else - lbag.AddLocation (current_namespace, GetLocation ($2), GetLocation ($5), GetLocation ($10)); - current_namespace = current_namespace.Parent; current_class = current_namespace.SlaveDeclSpace; current_container = current_class.PartialContainer; ubag.CloseNamespace (GetLocation ($10)); - ubag.EndNamespace (GetLocation ($10)); + if ($11 != null) + ubag.EndNamespace (GetLocation ($11)); + else + ubag.EndNamespace (); } ; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs index fd3fe3aaa3..8cbe7bc750 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs @@ -897,6 +897,12 @@ if (checkpoints.Length <= CheckpointIndex) throw new Exception (String.Format (" curNamespace.Pop (); } + [Conditional ("FULL_AST")] + public void EndNamespace () + { + curNamespace.Pop (); + } + [Conditional ("FULL_AST")] public void OpenNamespace (Location bracketLocation) { diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/Log.cs b/ICSharpCode.NRefactory.CSharp/Resolver/Log.cs index c3d43c2f4d..d0cf0a8688 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/Log.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/Log.cs @@ -37,19 +37,19 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver { const bool logEnabled = false; - [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] +// [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] internal static void WriteLine(string text) { Debug.WriteLine(text); } - [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] +// [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] internal static void WriteLine(string format, params object[] args) { Debug.WriteLine(format, args); } - [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] +// [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] internal static void WriteCollection(string text, IEnumerable lines) { #if DEBUG @@ -65,13 +65,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver #endif } - [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] +// [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] public static void Indent() { Debug.Indent(); } - [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] +// [Conditional(logEnabled ? "DEBUG" : "LOG_DISABLED")] public static void Unindent() { Debug.Unindent(); diff --git a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj index bcd9a9b4d7..5d03a53e34 100644 --- a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj +++ b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj @@ -1,4 +1,4 @@ - + {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} @@ -20,8 +20,6 @@ ..\ICSharpCode.NRefactory.snk False File - Client - v4.0 AnyCPU From 96195ac0ef9482af230fca95bacb61d02dd06805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 15:29:28 +0200 Subject: [PATCH 11/92] fixed +-1 issue. --- ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs b/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs index cde58d8af7..17c6d28936 100644 --- a/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs +++ b/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs @@ -151,10 +151,10 @@ namespace ICSharpCode.NRefactory.Editor if (line < 1 || line > lines.Length) throw new ArgumentOutOfRangeException("line", line, "Value must be between 1 and " + lines.Length); int lineStart = GetStartOffset(line); - if (column <= 0) + if (column <= 1) return lineStart; int lineEnd = GetEndOffset(line); - if (column >= lineEnd - lineStart) + if (column - 1 >= lineEnd - lineStart) return lineEnd; return lineStart + column - 1; } From 9b28b2821dbc1f50d35cee7886281384fb2eb197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 15:59:03 +0200 Subject: [PATCH 12/92] Fixed colon / optional commas in type delcarations. --- .../Parser/CSharpParser.cs | 76 +- .../Parser/mcs/cs-parser.cs | 1361 +++++++++-------- .../Parser/mcs/cs-parser.jay | 38 +- 3 files changed, 781 insertions(+), 694 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index e50cd43249..b54c8ac3f3 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -281,6 +281,15 @@ namespace ICSharpCode.NRefactory.CSharp Identifier newIdent = Identifier.Create (memberName.Name, Convert (memberName.Location)); namespaceDecl.InsertChildBefore (insertPos, newIdent, NamespaceDeclaration.Roles.Identifier); insertPos = newIdent; + + var location = LocationsBag.GetLocations (memberName); + + if (location != null) { + var dotToken = new CSharpTokenNode (Convert (location[0]), 1); + namespaceDecl.InsertChildBefore (insertPos, dotToken, NamespaceDeclaration.Roles.Dot); + insertPos = dotToken; + } + memberName = memberName.Left; } } @@ -349,8 +358,10 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (c); AddModifiers (newType, location); + int curLoc = 0; if (location != null) - newType.AddChild (new CSharpTokenNode (Convert (location[0]), "class".Length), TypeDeclaration.Roles.Keyword); + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), "class".Length), TypeDeclaration.Roles.Keyword); + newType.AddChild (Identifier.Create (c.MemberName.Name, Convert (c.MemberName.Location)), AstNode.Roles.Identifier); if (c.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (c.MemberName); @@ -362,16 +373,23 @@ namespace ICSharpCode.NRefactory.CSharp AddConstraints (newType, c); } if (c.TypeBaseExpressions != null) { + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); 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); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); base.Visit (c); - if (location != null && location.Count > 2) { - newType.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AstNode.Roles.RBrace); + if (location != null && curLoc < location.Count) { + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); + + // optional semicolon + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); + } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); @@ -387,8 +405,9 @@ namespace ICSharpCode.NRefactory.CSharp AddAttributeSection (newType, s); var location = LocationsBag.GetMemberLocation (s); AddModifiers (newType, location); + int curLoc = 0; if (location != null) - newType.AddChild (new CSharpTokenNode (Convert (location[0]), "struct".Length), TypeDeclaration.Roles.Keyword); + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), "struct".Length), TypeDeclaration.Roles.Keyword); newType.AddChild (Identifier.Create (s.MemberName.Name, Convert (s.MemberName.Location)), AstNode.Roles.Identifier); if (s.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (s.MemberName); @@ -401,17 +420,23 @@ namespace ICSharpCode.NRefactory.CSharp } if (s.TypeBaseExpressions != null) { + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); 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); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); base.Visit (s); if (location != null && location.Count > 2) { - newType.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AstNode.Roles.RBrace); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); + // optional semicolon + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); @@ -427,8 +452,9 @@ namespace ICSharpCode.NRefactory.CSharp AddAttributeSection (newType, i); var location = LocationsBag.GetMemberLocation (i); AddModifiers (newType, location); + int curLoc = 0; if (location != null) - newType.AddChild (new CSharpTokenNode (Convert (location[0]), "interface".Length), TypeDeclaration.Roles.Keyword); + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), "interface".Length), TypeDeclaration.Roles.Keyword); newType.AddChild (Identifier.Create (i.MemberName.Name, Convert (i.MemberName.Location)), AstNode.Roles.Identifier); if (i.MemberName.TypeArguments != null) { var typeArgLocation = LocationsBag.GetLocations (i.MemberName); @@ -440,16 +466,22 @@ namespace ICSharpCode.NRefactory.CSharp AddConstraints (newType, i); } if (i.TypeBaseExpressions != null) { + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); 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); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); base.Visit (i); if (location != null && location.Count > 2) { - newType.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AstNode.Roles.RBrace); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); + // optional semicolon + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); @@ -514,19 +546,27 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (e); AddModifiers (newType, location); + int curLoc = 0; if (location != null) - newType.AddChild (new CSharpTokenNode (Convert (location [0]), "enum".Length), TypeDeclaration.Roles.Keyword); + newType.AddChild (new CSharpTokenNode (Convert (location [curLoc++]), "enum".Length), TypeDeclaration.Roles.Keyword); newType.AddChild (Identifier.Create (e.MemberName.Name, Convert (e.MemberName.Location)), AstNode.Roles.Identifier); - if (e.BaseTypeExpression != null) + if (e.BaseTypeExpression != null) { + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); newType.AddChild (ConvertToType (e.BaseTypeExpression), TypeDeclaration.BaseTypeRole); + } - if (location != null && location.Count > 1) - newType.AddChild (new CSharpTokenNode (Convert (location[1]), 1), AstNode.Roles.LBrace); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); base.Visit (e); if (location != null && location.Count > 2) { - newType.AddChild (new CSharpTokenNode (Convert (location[2]), 1), AstNode.Roles.RBrace); + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); + // optional semicolon + if (location != null && curLoc < location.Count) + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index b146a8d6d0..90bbf3efa9 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -144,7 +144,7 @@ namespace Mono.CSharp LocationsBag lbag; UsingsBag ubag; List> mod_locations; - Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; + Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation, savedEnumBaseTypeColonLocation; Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); @@ -1470,7 +1470,7 @@ case 41: case_41(); break; case 42: -#line 640 "cs-parser.jay" +#line 641 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1500,18 +1500,18 @@ case 57: case_57(); break; case 58: -#line 736 "cs-parser.jay" +#line 737 "cs-parser.jay" { yyVal = "event"; } break; case 59: -#line 737 "cs-parser.jay" +#line 738 "cs-parser.jay" { yyVal = "return"; } break; case 60: case_60(); break; case 61: -#line 754 "cs-parser.jay" +#line 755 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1520,7 +1520,7 @@ case 62: case_62(); break; case 63: -#line 769 "cs-parser.jay" +#line 770 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1529,14 +1529,14 @@ case 64: case_64(); break; case 66: -#line 793 "cs-parser.jay" +#line 794 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 804 "cs-parser.jay" +#line 805 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1552,13 +1552,13 @@ case 72: case_72(); break; case 73: -#line 848 "cs-parser.jay" +#line 849 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 856 "cs-parser.jay" +#line 857 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1570,17 +1570,17 @@ case 77: case_77(); break; case 78: -#line 881 "cs-parser.jay" +#line 882 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 885 "cs-parser.jay" +#line 886 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 889 "cs-parser.jay" +#line 890 "cs-parser.jay" { yyVal = Argument.AType.Out; } @@ -1589,7 +1589,7 @@ case 95: case_95(); break; case 96: -#line 930 "cs-parser.jay" +#line 931 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1607,7 +1607,7 @@ case 100: case_100(); break; case 101: -#line 962 "cs-parser.jay" +#line 963 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1616,7 +1616,7 @@ case 102: case_102(); break; case 103: -#line 974 "cs-parser.jay" +#line 975 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } @@ -1628,13 +1628,13 @@ case 119: case_119(); break; case 122: -#line 1043 "cs-parser.jay" +#line 1044 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 123: -#line 1047 "cs-parser.jay" +#line 1048 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1643,7 +1643,7 @@ case 124: case_124(); break; case 125: -#line 1063 "cs-parser.jay" +#line 1064 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1667,7 +1667,7 @@ case 133: case_133(); break; case 134: -#line 1142 "cs-parser.jay" +#line 1143 "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"); } @@ -1679,13 +1679,13 @@ case 137: case_137(); break; case 140: -#line 1172 "cs-parser.jay" +#line 1173 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 141: -#line 1176 "cs-parser.jay" +#line 1177 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1694,7 +1694,7 @@ case 142: case_142(); break; case 143: -#line 1189 "cs-parser.jay" +#line 1190 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1703,13 +1703,13 @@ case 144: case_144(); break; case 147: -#line 1208 "cs-parser.jay" +#line 1209 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 148: -#line 1212 "cs-parser.jay" +#line 1213 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1718,7 +1718,7 @@ case 149: case_149(); break; case 150: -#line 1228 "cs-parser.jay" +#line 1229 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1739,13 +1739,13 @@ case 157: case_157(); break; case 158: -#line 1295 "cs-parser.jay" +#line 1296 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 159: -#line 1299 "cs-parser.jay" +#line 1300 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1754,7 +1754,7 @@ case 160: case_160(); break; case 161: -#line 1339 "cs-parser.jay" +#line 1340 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1763,7 +1763,7 @@ case 162: case_162(); break; case 163: -#line 1349 "cs-parser.jay" +#line 1350 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1775,11 +1775,11 @@ case 165: case_165(); break; case 167: -#line 1423 "cs-parser.jay" +#line 1424 "cs-parser.jay" { yyVal = null; } break; case 168: -#line 1427 "cs-parser.jay" +#line 1428 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 170: @@ -1804,13 +1804,13 @@ case 176: case_176(); break; case 177: -#line 1499 "cs-parser.jay" +#line 1500 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 178: -#line 1503 "cs-parser.jay" +#line 1504 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1834,7 +1834,7 @@ case 184: case_184(); break; case 185: -#line 1578 "cs-parser.jay" +#line 1579 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1843,7 +1843,7 @@ case 186: case_186(); break; case 187: -#line 1619 "cs-parser.jay" +#line 1620 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 189: @@ -1877,7 +1877,7 @@ case 198: case_198(); break; case 199: -#line 1717 "cs-parser.jay" +#line 1718 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1898,7 +1898,7 @@ case 204: case_204(); break; case 205: -#line 1771 "cs-parser.jay" +#line 1772 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1907,7 +1907,7 @@ case 206: case_206(); break; case 207: -#line 1800 "cs-parser.jay" +#line 1801 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1937,7 +1937,7 @@ case 220: case_220(); break; case 221: -#line 1949 "cs-parser.jay" +#line 1950 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1955,43 +1955,43 @@ case 225: case_225(); break; case 226: -#line 1982 "cs-parser.jay" +#line 1987 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 231: -#line 1999 "cs-parser.jay" +#line 2004 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 232: -#line 2003 "cs-parser.jay" +#line 2008 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 237: -#line 2011 "cs-parser.jay" +#line 2016 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 238: -#line 2015 "cs-parser.jay" +#line 2020 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 239: -#line 2019 "cs-parser.jay" +#line 2024 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 240: -#line 2025 "cs-parser.jay" +#line 2030 "cs-parser.jay" { } break; @@ -1999,14 +1999,14 @@ case 241: case_241(); break; case 243: -#line 2055 "cs-parser.jay" +#line 2060 "cs-parser.jay" { yyVal = null; } break; case 245: case_245(); break; case 246: -#line 2071 "cs-parser.jay" +#line 2076 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2015,95 +2015,95 @@ case 247: case_247(); break; case 249: -#line 2117 "cs-parser.jay" +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; case 250: -#line 2118 "cs-parser.jay" +#line 2123 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; case 251: -#line 2119 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; case 252: -#line 2120 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; case 253: -#line 2121 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; case 254: -#line 2122 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; case 255: -#line 2124 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; case 256: -#line 2125 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; case 257: -#line 2127 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; case 258: -#line 2128 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; case 259: -#line 2129 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; case 260: -#line 2130 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; case 261: -#line 2131 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; case 262: -#line 2132 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; case 263: -#line 2133 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; case 264: -#line 2134 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; case 265: -#line 2135 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; case 266: -#line 2136 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; case 267: -#line 2137 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; case 268: -#line 2138 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; case 269: -#line 2139 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; case 270: -#line 2140 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; case 271: -#line 2147 "cs-parser.jay" +#line 2152 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2112,7 +2112,7 @@ case 272: case_272(); break; case 273: -#line 2166 "cs-parser.jay" +#line 2171 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2139,11 +2139,11 @@ case 280: case_280(); break; case 282: -#line 2269 "cs-parser.jay" +#line 2274 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 285: -#line 2281 "cs-parser.jay" +#line 2286 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2152,7 +2152,7 @@ case 286: case_286(); break; case 287: -#line 2291 "cs-parser.jay" +#line 2296 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2185,7 +2185,7 @@ case 296: case_296(); break; case 298: -#line 2400 "cs-parser.jay" +#line 2405 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2194,13 +2194,13 @@ case 299: case_299(); break; case 302: -#line 2417 "cs-parser.jay" +#line 2422 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 303: -#line 2421 "cs-parser.jay" +#line 2426 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2209,7 +2209,7 @@ case 304: case_304(); break; case 305: -#line 2434 "cs-parser.jay" +#line 2439 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2221,7 +2221,7 @@ case 307: case_307(); break; case 308: -#line 2459 "cs-parser.jay" +#line 2464 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2269,7 +2269,7 @@ case 326: case_326(); break; case 329: -#line 2614 "cs-parser.jay" +#line 2631 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2287,7 +2287,7 @@ case 334: case_334(); break; case 335: -#line 2672 "cs-parser.jay" +#line 2689 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2296,7 +2296,7 @@ case 336: case_336(); break; case 337: -#line 2694 "cs-parser.jay" +#line 2711 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2329,7 +2329,7 @@ case 350: case_350(); break; case 351: -#line 2798 "cs-parser.jay" +#line 2815 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2374,13 +2374,13 @@ case 366: case_366(); break; case 368: -#line 2916 "cs-parser.jay" +#line 2933 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2923 "cs-parser.jay" +#line 2940 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2395,7 +2395,7 @@ case 375: case_375(); break; case 377: -#line 2961 "cs-parser.jay" +#line 2978 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2404,7 +2404,7 @@ case 378: case_378(); break; case 379: -#line 2981 "cs-parser.jay" +#line 2998 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2413,13 +2413,13 @@ case 380: case_380(); break; case 381: -#line 2990 "cs-parser.jay" +#line 3007 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 2994 "cs-parser.jay" +#line 3011 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2437,63 +2437,63 @@ case 386: case_386(); break; case 387: -#line 3033 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3034 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3035 "cs-parser.jay" +#line 3052 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3036 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3037 "cs-parser.jay" +#line 3054 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3038 "cs-parser.jay" +#line 3055 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3043 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3044 "cs-parser.jay" +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3045 "cs-parser.jay" +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3046 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3047 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3048 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3049 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3050 "cs-parser.jay" +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3051 "cs-parser.jay" +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2503,22 +2503,22 @@ case 424: case_424(); break; case 428: -#line 3098 "cs-parser.jay" +#line 3115 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3102 "cs-parser.jay" +#line 3119 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3103 "cs-parser.jay" +#line 3120 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3136 "cs-parser.jay" +#line 3153 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2536,7 +2536,7 @@ case 440: case_440(); break; case 441: -#line 3168 "cs-parser.jay" +#line 3185 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2545,7 +2545,7 @@ case 442: case_442(); break; case 443: -#line 3176 "cs-parser.jay" +#line 3193 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2557,7 +2557,7 @@ case 445: case_445(); break; case 446: -#line 3192 "cs-parser.jay" +#line 3209 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2567,11 +2567,11 @@ case 449: case_449(); break; case 450: -#line 3215 "cs-parser.jay" +#line 3232 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3219 "cs-parser.jay" +#line 3236 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2589,7 +2589,7 @@ case 455: case_455(); break; case 456: -#line 3252 "cs-parser.jay" +#line 3269 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2604,7 +2604,7 @@ case 459: case_459(); break; case 462: -#line 3280 "cs-parser.jay" +#line 3297 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2623,7 +2623,7 @@ case 468: case_468(); break; case 469: -#line 3332 "cs-parser.jay" +#line 3349 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2659,13 +2659,13 @@ case 483: case_483(); break; case 484: -#line 3419 "cs-parser.jay" +#line 3436 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3427 "cs-parser.jay" +#line 3444 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2677,13 +2677,13 @@ case 488: case_488(); break; case 489: -#line 3447 "cs-parser.jay" +#line 3464 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3454 "cs-parser.jay" +#line 3471 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2710,7 +2710,7 @@ case 497: case_497(); break; case 498: -#line 3520 "cs-parser.jay" +#line 3537 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2722,7 +2722,7 @@ case 500: case_500(); break; case 503: -#line 3547 "cs-parser.jay" +#line 3564 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2753,25 +2753,25 @@ case 516: case_516(); break; case 517: -#line 3625 "cs-parser.jay" +#line 3642 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3629 "cs-parser.jay" +#line 3646 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3636 "cs-parser.jay" +#line 3653 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3640 "cs-parser.jay" +#line 3657 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2789,7 +2789,7 @@ case 524: case_524(); break; case 525: -#line 3684 "cs-parser.jay" +#line 3701 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2834,7 +2834,7 @@ case 540: case_540(); break; case 541: -#line 3798 "cs-parser.jay" +#line 3815 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2843,25 +2843,25 @@ case 542: case_542(); break; case 543: -#line 3811 "cs-parser.jay" +#line 3828 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3815 "cs-parser.jay" +#line 3832 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3822 "cs-parser.jay" +#line 3839 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3830 "cs-parser.jay" +#line 3847 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2873,13 +2873,13 @@ case 549: case_549(); break; case 551: -#line 3856 "cs-parser.jay" +#line 3873 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3860 "cs-parser.jay" +#line 3877 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2891,37 +2891,37 @@ case 556: case_556(); break; case 558: -#line 3890 "cs-parser.jay" +#line 3907 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3894 "cs-parser.jay" +#line 3911 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3898 "cs-parser.jay" +#line 3915 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3902 "cs-parser.jay" +#line 3919 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3906 "cs-parser.jay" +#line 3923 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3910 "cs-parser.jay" +#line 3927 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2939,7 +2939,7 @@ case 569: case_569(); break; case 570: -#line 3942 "cs-parser.jay" +#line 3959 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2948,13 +2948,13 @@ case 571: case_571(); break; case 572: -#line 3951 "cs-parser.jay" +#line 3968 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3955 "cs-parser.jay" +#line 3972 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3005,7 +3005,7 @@ case 598: case_598(); break; case 599: -#line 4079 "cs-parser.jay" +#line 4096 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3056,14 +3056,14 @@ case 614: case_614(); break; case 615: -#line 4176 "cs-parser.jay" +#line 4193 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4191 "cs-parser.jay" +#line 4208 "cs-parser.jay" { start_block (lexer.Location); } @@ -3087,7 +3087,7 @@ case 626: case_626(); break; case 627: -#line 4236 "cs-parser.jay" +#line 4253 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3099,7 +3099,7 @@ case 629: case_629(); break; case 630: -#line 4250 "cs-parser.jay" +#line 4267 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3111,7 +3111,7 @@ case 632: case_632(); break; case 638: -#line 4275 "cs-parser.jay" +#line 4292 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3126,13 +3126,13 @@ case 641: case_641(); break; case 643: -#line 4304 "cs-parser.jay" +#line 4321 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4317 "cs-parser.jay" +#line 4334 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3150,11 +3150,11 @@ case 648: case_648(); break; case 649: -#line 4356 "cs-parser.jay" +#line 4377 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4358 "cs-parser.jay" +#line 4379 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3209,13 +3209,10 @@ case 669: case_669(); break; case 671: -#line 4478 "cs-parser.jay" - { - current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); - } + case_671(); break; case 673: -#line 4486 "cs-parser.jay" +#line 4508 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3245,19 +3242,19 @@ case 681: case_681(); break; case 682: -#line 4575 "cs-parser.jay" +#line 4597 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4579 "cs-parser.jay" +#line 4601 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4586 "cs-parser.jay" +#line 4608 "cs-parser.jay" { yyVal = Variance.None; } @@ -3266,13 +3263,13 @@ case 685: case_685(); break; case 686: -#line 4600 "cs-parser.jay" +#line 4622 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4604 "cs-parser.jay" +#line 4626 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3281,7 +3278,7 @@ case 688: case_688(); break; case 689: -#line 4629 "cs-parser.jay" +#line 4651 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3299,13 +3296,13 @@ case 693: case_693(); break; case 698: -#line 4673 "cs-parser.jay" +#line 4695 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4677 "cs-parser.jay" +#line 4699 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3314,13 +3311,13 @@ case 701: case_701(); break; case 704: -#line 4701 "cs-parser.jay" +#line 4723 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4705 "cs-parser.jay" +#line 4727 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3353,13 +3350,13 @@ case 744: case_744(); break; case 745: -#line 4849 "cs-parser.jay" +#line 4871 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4853 "cs-parser.jay" +#line 4875 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3371,7 +3368,7 @@ case 749: case_749(); break; case 750: -#line 4874 "cs-parser.jay" +#line 4896 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3401,7 +3398,7 @@ case 763: case_763(); break; case 764: -#line 4963 "cs-parser.jay" +#line 4985 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3422,15 +3419,15 @@ case 774: case_774(); break; case 775: -#line 5013 "cs-parser.jay" +#line 5035 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5017 "cs-parser.jay" +#line 5039 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5018 "cs-parser.jay" +#line 5040 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3449,7 +3446,7 @@ case 784: case_784(); break; case 785: -#line 5086 "cs-parser.jay" +#line 5108 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3470,13 +3467,13 @@ case 791: case_791(); break; case 792: -#line 5130 "cs-parser.jay" +#line 5152 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5134 "cs-parser.jay" +#line 5156 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3491,7 +3488,7 @@ case 796: case_796(); break; case 797: -#line 5163 "cs-parser.jay" +#line 5185 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3506,7 +3503,7 @@ case 804: case_804(); break; case 805: -#line 5202 "cs-parser.jay" +#line 5224 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3518,7 +3515,7 @@ case 807: case_807(); break; case 808: -#line 5230 "cs-parser.jay" +#line 5252 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3528,11 +3525,11 @@ case 811: case_811(); break; case 813: -#line 5251 "cs-parser.jay" +#line 5273 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5256 "cs-parser.jay" +#line 5278 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3575,7 +3572,7 @@ case 837: case_837(); break; case 840: -#line 5411 "cs-parser.jay" +#line 5433 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3596,7 +3593,7 @@ case 845: case_845(); break; case 848: -#line 5464 "cs-parser.jay" +#line 5486 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3605,7 +3602,7 @@ case 849: case_849(); break; case 850: -#line 5483 "cs-parser.jay" +#line 5505 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3614,13 +3611,13 @@ case 851: case_851(); break; case 852: -#line 5501 "cs-parser.jay" +#line 5523 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5508 "cs-parser.jay" +#line 5530 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3629,7 +3626,7 @@ case 854: case_854(); break; case 855: -#line 5518 "cs-parser.jay" +#line 5540 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3659,7 +3656,7 @@ case 863: case_863(); break; case 864: -#line 5601 "cs-parser.jay" +#line 5623 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3692,7 +3689,7 @@ case 873: case_873(); break; case 874: -#line 5701 "cs-parser.jay" +#line 5723 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3701,7 +3698,7 @@ case 875: case_875(); break; case 876: -#line 5716 "cs-parser.jay" +#line 5738 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3716,7 +3713,7 @@ case 880: case_880(); break; case 881: -#line 5761 "cs-parser.jay" +#line 5783 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3737,7 +3734,7 @@ case 889: case_889(); break; case 895: -#line 5820 "cs-parser.jay" +#line 5842 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3746,7 +3743,7 @@ case 896: case_896(); break; case 897: -#line 5839 "cs-parser.jay" +#line 5861 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3779,13 +3776,13 @@ case 906: case_906(); break; case 908: -#line 5983 "cs-parser.jay" +#line 6005 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 5990 "cs-parser.jay" +#line 6012 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3806,7 +3803,7 @@ case 916: case_916(); break; case 917: -#line 6036 "cs-parser.jay" +#line 6058 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3818,7 +3815,7 @@ case 919: case_919(); break; case 920: -#line 6053 "cs-parser.jay" +#line 6075 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3842,13 +3839,13 @@ case 929: case_929(); break; case 937: -#line 6177 "cs-parser.jay" +#line 6199 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6184 "cs-parser.jay" +#line 6206 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3860,13 +3857,13 @@ case 940: case_940(); break; case 941: -#line 6201 "cs-parser.jay" +#line 6223 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6205 "cs-parser.jay" +#line 6227 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3884,25 +3881,25 @@ case 946: case_946(); break; case 948: -#line 6241 "cs-parser.jay" +#line 6263 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6249 "cs-parser.jay" +#line 6271 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6253 "cs-parser.jay" +#line 6275 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6260 "cs-parser.jay" +#line 6282 "cs-parser.jay" { yyVal = new List (0); } @@ -4093,17 +4090,18 @@ void case_26() { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); + lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_27() -#line 569 "cs-parser.jay" +#line 570 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 587 "cs-parser.jay" +#line 588 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4114,7 +4112,7 @@ void case_32() } void case_41() -#line 619 "cs-parser.jay" +#line 620 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4135,7 +4133,7 @@ void case_41() } void case_50() -#line 669 "cs-parser.jay" +#line 670 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4147,7 +4145,7 @@ void case_50() } void case_51() -#line 679 "cs-parser.jay" +#line 680 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4159,21 +4157,21 @@ void case_51() } void case_52() -#line 692 "cs-parser.jay" +#line 693 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 697 "cs-parser.jay" +#line 698 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 705 "cs-parser.jay" +#line 706 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4182,7 +4180,7 @@ void case_54() } void case_55() -#line 712 "cs-parser.jay" +#line 713 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4196,21 +4194,21 @@ void case_55() } void case_56() -#line 724 "cs-parser.jay" +#line 725 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_57() -#line 732 "cs-parser.jay" +#line 733 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } void case_60() -#line 739 "cs-parser.jay" +#line 740 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4222,7 +4220,7 @@ void case_60() } void case_62() -#line 756 "cs-parser.jay" +#line 757 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4232,7 +4230,7 @@ void case_62() } void case_64() -#line 771 "cs-parser.jay" +#line 772 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4250,7 +4248,7 @@ void case_64() } void case_67() -#line 795 "cs-parser.jay" +#line 796 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4258,7 +4256,7 @@ void case_67() } void case_69() -#line 806 "cs-parser.jay" +#line 807 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4266,7 +4264,7 @@ void case_69() } void case_70() -#line 812 "cs-parser.jay" +#line 813 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4274,7 +4272,7 @@ void case_70() } void case_71() -#line 818 "cs-parser.jay" +#line 819 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4291,7 +4289,7 @@ void case_71() } void case_72() -#line 833 "cs-parser.jay" +#line 834 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4303,7 +4301,7 @@ void case_72() } void case_76() -#line 858 "cs-parser.jay" +#line 859 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4312,7 +4310,7 @@ void case_76() } void case_77() -#line 868 "cs-parser.jay" +#line 869 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4325,7 +4323,7 @@ void case_77() } void case_95() -#line 915 "cs-parser.jay" +#line 916 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4334,14 +4332,15 @@ void case_95() } void case_97() -#line 932 "cs-parser.jay" +#line 933 "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]); + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); } void case_98() -#line 938 "cs-parser.jay" +#line 940 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4350,11 +4349,10 @@ void case_98() if (doc_support) current_container.DocComment = Lexer.consume_doc_comment (); - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-5+yyTop])); } void case_99() -#line 949 "cs-parser.jay" +#line 950 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -4362,21 +4360,21 @@ void case_99() } void case_100() -#line 955 "cs-parser.jay" +#line 956 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[0+yyTop])); yyVal = pop_current_class (); } void case_102() -#line 967 "cs-parser.jay" +#line 968 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_118() -#line 1009 "cs-parser.jay" +#line 1010 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4391,7 +4389,7 @@ void case_118() } void case_119() -#line 1022 "cs-parser.jay" +#line 1023 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4404,7 +4402,7 @@ void case_119() } void case_124() -#line 1052 "cs-parser.jay" +#line 1053 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4412,7 +4410,7 @@ void case_124() } void case_126() -#line 1065 "cs-parser.jay" +#line 1066 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4420,14 +4418,14 @@ void case_126() } void case_127() -#line 1071 "cs-parser.jay" +#line 1072 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_130() -#line 1086 "cs-parser.jay" +#line 1087 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4442,7 +4440,7 @@ void case_130() } void case_131() -#line 1101 "cs-parser.jay" +#line 1102 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4455,7 +4453,7 @@ void case_131() } void case_132() -#line 1114 "cs-parser.jay" +#line 1115 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4468,7 +4466,7 @@ void case_132() } void case_133() -#line 1125 "cs-parser.jay" +#line 1126 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4482,7 +4480,7 @@ void case_133() } void case_136() -#line 1148 "cs-parser.jay" +#line 1149 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4490,7 +4488,7 @@ void case_136() } void case_137() -#line 1154 "cs-parser.jay" +#line 1155 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4500,7 +4498,7 @@ void case_137() } void case_142() -#line 1181 "cs-parser.jay" +#line 1182 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4508,7 +4506,7 @@ void case_142() } void case_144() -#line 1191 "cs-parser.jay" +#line 1192 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4517,7 +4515,7 @@ void case_144() } void case_149() -#line 1217 "cs-parser.jay" +#line 1218 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4525,7 +4523,7 @@ void case_149() } void case_151() -#line 1230 "cs-parser.jay" +#line 1231 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4533,14 +4531,14 @@ void case_151() } void case_152() -#line 1236 "cs-parser.jay" +#line 1237 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_155() -#line 1246 "cs-parser.jay" +#line 1247 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4548,7 +4546,7 @@ void case_155() } void case_156() -#line 1255 "cs-parser.jay" +#line 1256 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4558,7 +4556,7 @@ void case_156() } void case_157() -#line 1263 "cs-parser.jay" +#line 1264 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4584,7 +4582,7 @@ void case_157() } void case_160() -#line 1301 "cs-parser.jay" +#line 1302 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4619,14 +4617,14 @@ void case_160() } void case_162() -#line 1342 "cs-parser.jay" +#line 1343 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_164() -#line 1351 "cs-parser.jay" +#line 1352 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4678,7 +4676,7 @@ void case_164() } void case_165() -#line 1404 "cs-parser.jay" +#line 1405 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4696,7 +4694,7 @@ void case_165() } void case_170() -#line 1433 "cs-parser.jay" +#line 1434 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4704,7 +4702,7 @@ void case_170() } void case_171() -#line 1439 "cs-parser.jay" +#line 1440 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4715,7 +4713,7 @@ void case_171() } void case_172() -#line 1448 "cs-parser.jay" +#line 1449 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4726,7 +4724,7 @@ void case_172() } void case_173() -#line 1457 "cs-parser.jay" +#line 1458 "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"); @@ -4736,7 +4734,7 @@ void case_173() } void case_174() -#line 1465 "cs-parser.jay" +#line 1466 "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"); @@ -4751,7 +4749,7 @@ void case_174() } void case_175() -#line 1478 "cs-parser.jay" +#line 1479 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4760,7 +4758,7 @@ void case_175() } void case_176() -#line 1485 "cs-parser.jay" +#line 1486 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4774,14 +4772,14 @@ void case_176() } void case_179() -#line 1505 "cs-parser.jay" +#line 1506 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_180() -#line 1513 "cs-parser.jay" +#line 1514 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4792,7 +4790,7 @@ void case_180() } void case_181() -#line 1522 "cs-parser.jay" +#line 1523 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4812,7 +4810,7 @@ void case_181() } void case_182() -#line 1546 "cs-parser.jay" +#line 1547 "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); @@ -4820,7 +4818,7 @@ void case_182() } void case_183() -#line 1555 "cs-parser.jay" +#line 1556 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4829,7 +4827,7 @@ void case_183() } void case_184() -#line 1565 "cs-parser.jay" +#line 1566 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4838,7 +4836,7 @@ void case_184() } void case_186() -#line 1580 "cs-parser.jay" +#line 1581 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4877,14 +4875,14 @@ void case_186() } void case_189() -#line 1625 "cs-parser.jay" +#line 1626 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; parameterModifierLocation = GetLocation (yyVals[0+yyTop]); } void case_190() -#line 1630 "cs-parser.jay" +#line 1631 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4907,7 +4905,7 @@ void case_190() } void case_191() -#line 1654 "cs-parser.jay" +#line 1655 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4916,7 +4914,7 @@ void case_191() } void case_192() -#line 1661 "cs-parser.jay" +#line 1662 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4925,7 +4923,7 @@ void case_192() } void case_193() -#line 1668 "cs-parser.jay" +#line 1669 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4937,14 +4935,14 @@ void case_193() } void case_194() -#line 1681 "cs-parser.jay" +#line 1682 "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_195() -#line 1686 "cs-parser.jay" +#line 1687 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4953,21 +4951,21 @@ void case_195() } void case_196() -#line 1693 "cs-parser.jay" +#line 1694 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_197() -#line 1701 "cs-parser.jay" +#line 1702 "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"); } void case_198() -#line 1706 "cs-parser.jay" +#line 1707 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4978,21 +4976,21 @@ void case_198() } void case_200() -#line 1722 "cs-parser.jay" +#line 1723 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_201() -#line 1733 "cs-parser.jay" +#line 1734 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_202() -#line 1738 "cs-parser.jay" +#line 1739 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5008,7 +5006,7 @@ void case_202() } void case_203() -#line 1752 "cs-parser.jay" +#line 1753 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5017,14 +5015,14 @@ void case_203() } void case_204() -#line 1759 "cs-parser.jay" +#line 1760 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_206() -#line 1773 "cs-parser.jay" +#line 1774 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5051,7 +5049,7 @@ void case_206() } void case_208() -#line 1802 "cs-parser.jay" +#line 1803 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5064,7 +5062,7 @@ void case_208() } void case_213() -#line 1821 "cs-parser.jay" +#line 1822 "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 ()); @@ -5077,7 +5075,7 @@ void case_213() } void case_214() -#line 1835 "cs-parser.jay" +#line 1836 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5100,7 +5098,7 @@ void case_214() } void case_215() -#line 1856 "cs-parser.jay" +#line 1857 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5123,7 +5121,7 @@ void case_215() } void case_216() -#line 1880 "cs-parser.jay" +#line 1881 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5151,7 +5149,7 @@ void case_216() } void case_217() -#line 1906 "cs-parser.jay" +#line 1907 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5174,21 +5172,21 @@ void case_217() } void case_219() -#line 1931 "cs-parser.jay" +#line 1932 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1936 "cs-parser.jay" +#line 1937 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1951 "cs-parser.jay" +#line 1952 "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]); @@ -5196,7 +5194,7 @@ void case_222() } void case_223() -#line 1958 "cs-parser.jay" +#line 1959 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5209,7 +5207,7 @@ void case_223() } void case_224() -#line 1969 "cs-parser.jay" +#line 1970 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5217,14 +5215,18 @@ void case_224() } void case_225() -#line 1975 "cs-parser.jay" +#line 1976 "cs-parser.jay" { - lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); + if (yyVals[0+yyTop] != null) { + lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); + } else { + lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); + } yyVal = pop_current_class (); } void case_241() -#line 2027 "cs-parser.jay" +#line 2032 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5251,14 +5253,14 @@ void case_241() } void case_245() -#line 2061 "cs-parser.jay" +#line 2066 "cs-parser.jay" { 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_247() -#line 2073 "cs-parser.jay" +#line 2078 "cs-parser.jay" { valid_param_mod = 0; @@ -5300,7 +5302,7 @@ void case_247() } void case_272() -#line 2149 "cs-parser.jay" +#line 2154 "cs-parser.jay" { valid_param_mod = 0; @@ -5317,7 +5319,7 @@ void case_272() } void case_274() -#line 2168 "cs-parser.jay" +#line 2173 "cs-parser.jay" { valid_param_mod = 0; @@ -5334,7 +5336,7 @@ void case_274() } void case_275() -#line 2183 "cs-parser.jay" +#line 2188 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5342,7 +5344,7 @@ void case_275() } void case_276() -#line 2189 "cs-parser.jay" +#line 2194 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5350,7 +5352,7 @@ void case_276() } void case_277() -#line 2199 "cs-parser.jay" +#line 2204 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5366,7 +5368,7 @@ void case_277() } void case_278() -#line 2218 "cs-parser.jay" +#line 2223 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5377,7 +5379,7 @@ void case_278() } void case_279() -#line 2227 "cs-parser.jay" +#line 2232 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5390,7 +5392,7 @@ void case_279() } void case_280() -#line 2238 "cs-parser.jay" +#line 2243 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5420,7 +5422,7 @@ void case_280() } void case_286() -#line 2283 "cs-parser.jay" +#line 2288 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5428,7 +5430,7 @@ void case_286() } void case_288() -#line 2293 "cs-parser.jay" +#line 2298 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5436,14 +5438,14 @@ void case_288() } void case_289() -#line 2299 "cs-parser.jay" +#line 2304 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_290() -#line 2307 "cs-parser.jay" +#line 2312 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5454,7 +5456,7 @@ void case_290() } void case_291() -#line 2316 "cs-parser.jay" +#line 2321 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5476,7 +5478,7 @@ void case_291() } void case_292() -#line 2341 "cs-parser.jay" +#line 2346 "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); @@ -5490,7 +5492,7 @@ void case_292() } void case_293() -#line 2355 "cs-parser.jay" +#line 2360 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5502,7 +5504,7 @@ void case_293() } void case_294() -#line 2368 "cs-parser.jay" +#line 2373 "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); @@ -5512,7 +5514,7 @@ void case_294() } void case_295() -#line 2376 "cs-parser.jay" +#line 2381 "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"); @@ -5521,7 +5523,7 @@ void case_295() } void case_296() -#line 2383 "cs-parser.jay" +#line 2388 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5534,14 +5536,14 @@ void case_296() } void case_299() -#line 2402 "cs-parser.jay" +#line 2407 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_304() -#line 2426 "cs-parser.jay" +#line 2431 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5549,7 +5551,7 @@ void case_304() } void case_306() -#line 2436 "cs-parser.jay" +#line 2441 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5558,7 +5560,7 @@ void case_306() } void case_307() -#line 2445 "cs-parser.jay" +#line 2450 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5572,28 +5574,28 @@ void case_307() } void case_311() -#line 2466 "cs-parser.jay" +#line 2471 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_312() -#line 2471 "cs-parser.jay" +#line 2476 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_313() -#line 2476 "cs-parser.jay" +#line 2481 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_314() -#line 2484 "cs-parser.jay" +#line 2489 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5607,7 +5609,7 @@ void case_314() } void case_315() -#line 2496 "cs-parser.jay" +#line 2501 "cs-parser.jay" { lexer.EventParsing = true; @@ -5622,7 +5624,7 @@ void case_315() } void case_316() -#line 2512 "cs-parser.jay" +#line 2517 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5636,7 +5638,7 @@ void case_316() } void case_317() -#line 2524 "cs-parser.jay" +#line 2529 "cs-parser.jay" { lexer.EventParsing = true; @@ -5651,21 +5653,21 @@ void case_317() } void case_318() -#line 2540 "cs-parser.jay" +#line 2545 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_320() -#line 2552 "cs-parser.jay" +#line 2557 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2557 "cs-parser.jay" +#line 2562 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5679,7 +5681,7 @@ void case_321() } void case_322() -#line 2569 "cs-parser.jay" +#line 2574 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5687,7 +5689,7 @@ void case_322() } void case_323() -#line 2575 "cs-parser.jay" +#line 2580 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5696,39 +5698,51 @@ void case_323() /* if (doc_support)*/ /* em.DocComment = ev.DocComment;*/ - - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop])); + if (yyVals[-7+yyTop] != null) { + if (yyVals[0+yyTop] != null) { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), savedEnumBaseTypeColonLocation, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); + } else { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), savedEnumBaseTypeColonLocation, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop])); + } + } else { + if (yyVals[0+yyTop] != null) { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); + } else { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop])); + } + } yyVal = pop_current_class (); } void case_325() -#line 2592 "cs-parser.jay" +#line 2608 "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); yyVal = null; } else { + savedEnumBaseTypeColonLocation = GetLocation (yyVals[-1+yyTop]); yyVal = yyVals[0+yyTop]; } } void case_326() -#line 2602 "cs-parser.jay" +#line 2619 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2620 "cs-parser.jay" +#line 2637 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2628 "cs-parser.jay" +#line 2645 "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]); @@ -5743,7 +5757,7 @@ void case_332() } void case_333() -#line 2641 "cs-parser.jay" +#line 2658 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5753,7 +5767,7 @@ void case_333() } void case_334() -#line 2649 "cs-parser.jay" +#line 2666 "cs-parser.jay" { --lexer.parsing_block; @@ -5769,7 +5783,7 @@ void case_334() } void case_336() -#line 2674 "cs-parser.jay" +#line 2691 "cs-parser.jay" { valid_param_mod = 0; @@ -5789,7 +5803,7 @@ void case_336() } void case_338() -#line 2696 "cs-parser.jay" +#line 2713 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5805,7 +5819,7 @@ void case_338() } void case_340() -#line 2714 "cs-parser.jay" +#line 2731 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5814,7 +5828,7 @@ void case_340() } void case_342() -#line 2725 "cs-parser.jay" +#line 2742 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5823,7 +5837,7 @@ void case_342() } void case_344() -#line 2736 "cs-parser.jay" +#line 2753 "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); @@ -5831,14 +5845,14 @@ void case_344() } void case_345() -#line 2745 "cs-parser.jay" +#line 2762 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2757 "cs-parser.jay" +#line 2774 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5851,14 +5865,14 @@ void case_347() } void case_348() -#line 2768 "cs-parser.jay" +#line 2785 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2776 "cs-parser.jay" +#line 2793 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5867,7 +5881,7 @@ void case_349() } void case_350() -#line 2783 "cs-parser.jay" +#line 2800 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5876,7 +5890,7 @@ void case_350() } void case_352() -#line 2800 "cs-parser.jay" +#line 2817 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5884,7 +5898,7 @@ void case_352() } void case_353() -#line 2809 "cs-parser.jay" +#line 2826 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5893,7 +5907,7 @@ void case_353() } void case_355() -#line 2820 "cs-parser.jay" +#line 2837 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5901,21 +5915,21 @@ void case_355() } void case_356() -#line 2829 "cs-parser.jay" +#line 2846 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2834 "cs-parser.jay" +#line 2851 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2842 "cs-parser.jay" +#line 2859 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5923,7 +5937,7 @@ void case_358() } void case_359() -#line 2848 "cs-parser.jay" +#line 2865 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5933,7 +5947,7 @@ void case_359() } void case_360() -#line 2856 "cs-parser.jay" +#line 2873 "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); @@ -5941,7 +5955,7 @@ void case_360() } void case_362() -#line 2866 "cs-parser.jay" +#line 2883 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5951,7 +5965,7 @@ void case_362() } void case_363() -#line 2877 "cs-parser.jay" +#line 2894 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5959,7 +5973,7 @@ void case_363() } void case_364() -#line 2883 "cs-parser.jay" +#line 2900 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5968,14 +5982,14 @@ void case_364() } void case_365() -#line 2893 "cs-parser.jay" +#line 2910 "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_366() -#line 2898 "cs-parser.jay" +#line 2915 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -5986,28 +6000,28 @@ void case_366() } void case_371() -#line 2932 "cs-parser.jay" +#line 2949 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2941 "cs-parser.jay" +#line 2958 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2950 "cs-parser.jay" +#line 2967 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2966 "cs-parser.jay" +#line 2983 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6022,14 +6036,14 @@ void case_378() } void case_380() -#line 2983 "cs-parser.jay" +#line 3000 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 2999 "cs-parser.jay" +#line 3016 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6037,7 +6051,7 @@ void case_383() } void case_384() -#line 3005 "cs-parser.jay" +#line 3022 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6046,7 +6060,7 @@ void case_384() } void case_385() -#line 3015 "cs-parser.jay" +#line 3032 "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 ()); @@ -6055,35 +6069,35 @@ void case_385() } void case_386() -#line 3022 "cs-parser.jay" +#line 3039 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3084 "cs-parser.jay" +#line 3101 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3088 "cs-parser.jay" +#line 3105 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3129 "cs-parser.jay" +#line 3146 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3141 "cs-parser.jay" +#line 3158 "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); @@ -6091,7 +6105,7 @@ void case_437() } void case_438() -#line 3147 "cs-parser.jay" +#line 3164 "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); @@ -6099,7 +6113,7 @@ void case_438() } void case_439() -#line 3153 "cs-parser.jay" +#line 3170 "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); @@ -6107,7 +6121,7 @@ void case_439() } void case_440() -#line 3159 "cs-parser.jay" +#line 3176 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6117,28 +6131,28 @@ void case_440() } void case_442() -#line 3169 "cs-parser.jay" +#line 3186 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3177 "cs-parser.jay" +#line 3194 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3185 "cs-parser.jay" +#line 3202 "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_448() -#line 3198 "cs-parser.jay" +#line 3215 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6150,14 +6164,14 @@ void case_448() } void case_449() -#line 3208 "cs-parser.jay" +#line 3225 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3224 "cs-parser.jay" +#line 3241 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6165,7 +6179,7 @@ void case_452() } void case_453() -#line 3230 "cs-parser.jay" +#line 3247 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6174,14 +6188,14 @@ void case_453() } void case_454() -#line 3236 "cs-parser.jay" +#line 3253 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3244 "cs-parser.jay" +#line 3261 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6189,7 +6203,7 @@ void case_455() } void case_457() -#line 3253 "cs-parser.jay" +#line 3270 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6199,7 +6213,7 @@ void case_457() } void case_458() -#line 3261 "cs-parser.jay" +#line 3278 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6208,14 +6222,14 @@ void case_458() } void case_459() -#line 3268 "cs-parser.jay" +#line 3285 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3286 "cs-parser.jay" +#line 3303 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6223,7 +6237,7 @@ void case_464() } void case_465() -#line 3292 "cs-parser.jay" +#line 3309 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6235,7 +6249,7 @@ void case_465() } void case_466() -#line 3302 "cs-parser.jay" +#line 3319 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6252,56 +6266,56 @@ void case_466() } void case_467() -#line 3317 "cs-parser.jay" +#line 3334 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3322 "cs-parser.jay" +#line 3339 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3343 "cs-parser.jay" +#line 3360 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3348 "cs-parser.jay" +#line 3365 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3353 "cs-parser.jay" +#line 3370 "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_476() -#line 3358 "cs-parser.jay" +#line 3375 "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_478() -#line 3370 "cs-parser.jay" +#line 3387 "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_479() -#line 3378 "cs-parser.jay" +#line 3395 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6309,7 +6323,7 @@ void case_479() } void case_480() -#line 3384 "cs-parser.jay" +#line 3401 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6318,14 +6332,14 @@ void case_480() } void case_481() -#line 3390 "cs-parser.jay" +#line 3407 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3398 "cs-parser.jay" +#line 3415 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6333,7 +6347,7 @@ void case_482() } void case_483() -#line 3404 "cs-parser.jay" +#line 3421 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6345,21 +6359,21 @@ void case_483() } void case_487() -#line 3432 "cs-parser.jay" +#line 3449 "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_488() -#line 3437 "cs-parser.jay" +#line 3454 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3459 "cs-parser.jay" +#line 3476 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6374,7 +6388,7 @@ void case_491() } void case_492() -#line 3472 "cs-parser.jay" +#line 3489 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6383,7 +6397,7 @@ void case_492() } void case_493() -#line 3484 "cs-parser.jay" +#line 3501 "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])) { @@ -6393,7 +6407,7 @@ void case_493() } void case_494() -#line 3492 "cs-parser.jay" +#line 3509 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6402,7 +6416,7 @@ void case_494() } void case_495() -#line 3499 "cs-parser.jay" +#line 3516 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6411,28 +6425,28 @@ void case_495() } void case_496() -#line 3506 "cs-parser.jay" +#line 3523 "cs-parser.jay" { 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_497() -#line 3511 "cs-parser.jay" +#line 3528 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3522 "cs-parser.jay" +#line 3539 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3530 "cs-parser.jay" +#line 3547 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6444,7 +6458,7 @@ void case_500() } void case_505() -#line 3553 "cs-parser.jay" +#line 3570 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6452,7 +6466,7 @@ void case_505() } void case_506() -#line 3559 "cs-parser.jay" +#line 3576 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6462,7 +6476,7 @@ void case_506() } void case_507() -#line 3570 "cs-parser.jay" +#line 3587 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6470,7 +6484,7 @@ void case_507() } void case_508() -#line 3576 "cs-parser.jay" +#line 3593 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6478,14 +6492,14 @@ void case_508() } void case_509() -#line 3582 "cs-parser.jay" +#line 3599 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3587 "cs-parser.jay" +#line 3604 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6493,28 +6507,28 @@ void case_510() } void case_514() -#line 3602 "cs-parser.jay" +#line 3619 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3610 "cs-parser.jay" +#line 3627 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3615 "cs-parser.jay" +#line 3632 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3645 "cs-parser.jay" +#line 3662 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6523,7 +6537,7 @@ void case_521() } void case_522() -#line 3652 "cs-parser.jay" +#line 3669 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6536,7 +6550,7 @@ void case_522() } void case_523() -#line 3666 "cs-parser.jay" +#line 3683 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6544,7 +6558,7 @@ void case_523() } void case_524() -#line 3672 "cs-parser.jay" +#line 3689 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6553,7 +6567,7 @@ void case_524() } void case_526() -#line 3686 "cs-parser.jay" +#line 3703 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6561,14 +6575,14 @@ void case_526() } void case_529() -#line 3697 "cs-parser.jay" +#line 3714 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3705 "cs-parser.jay" +#line 3722 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6576,7 +6590,7 @@ void case_530() } void case_531() -#line 3711 "cs-parser.jay" +#line 3728 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6586,7 +6600,7 @@ void case_531() } void case_532() -#line 3719 "cs-parser.jay" +#line 3736 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6594,7 +6608,7 @@ void case_532() } void case_533() -#line 3725 "cs-parser.jay" +#line 3742 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6602,7 +6616,7 @@ void case_533() } void case_534() -#line 3731 "cs-parser.jay" +#line 3748 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6613,7 +6627,7 @@ void case_534() } void case_535() -#line 3743 "cs-parser.jay" +#line 3760 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6622,7 +6636,7 @@ void case_535() } void case_536() -#line 3753 "cs-parser.jay" +#line 3770 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6632,35 +6646,35 @@ void case_536() } void case_537() -#line 3764 "cs-parser.jay" +#line 3781 "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_538() -#line 3772 "cs-parser.jay" +#line 3789 "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_539() -#line 3780 "cs-parser.jay" +#line 3797 "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_540() -#line 3788 "cs-parser.jay" +#line 3805 "cs-parser.jay" { 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_542() -#line 3800 "cs-parser.jay" +#line 3817 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6671,7 +6685,7 @@ void case_542() } void case_548() -#line 3832 "cs-parser.jay" +#line 3849 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6680,7 +6694,7 @@ void case_548() } void case_549() -#line 3842 "cs-parser.jay" +#line 3859 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6690,147 +6704,147 @@ void case_549() } void case_555() -#line 3867 "cs-parser.jay" +#line 3884 "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_556() -#line 3875 "cs-parser.jay" +#line 3892 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3916 "cs-parser.jay" +#line 3933 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3921 "cs-parser.jay" +#line 3938 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3926 "cs-parser.jay" +#line 3943 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3935 "cs-parser.jay" +#line 3952 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3944 "cs-parser.jay" +#line 3961 "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_575() -#line 3961 "cs-parser.jay" +#line 3978 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3966 "cs-parser.jay" +#line 3983 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3975 "cs-parser.jay" +#line 3992 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 3980 "cs-parser.jay" +#line 3997 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 3985 "cs-parser.jay" +#line 4002 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 3990 "cs-parser.jay" +#line 4007 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 3999 "cs-parser.jay" +#line 4016 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 4004 "cs-parser.jay" +#line 4021 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4013 "cs-parser.jay" +#line 4030 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4022 "cs-parser.jay" +#line 4039 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4031 "cs-parser.jay" +#line 4048 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4040 "cs-parser.jay" +#line 4057 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4049 "cs-parser.jay" +#line 4066 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4058 "cs-parser.jay" +#line 4075 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6839,84 +6853,84 @@ void case_596() } void case_598() -#line 4069 "cs-parser.jay" +#line 4086 "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_600() -#line 4081 "cs-parser.jay" +#line 4098 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4086 "cs-parser.jay" +#line 4103 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4091 "cs-parser.jay" +#line 4108 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4096 "cs-parser.jay" +#line 4113 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4101 "cs-parser.jay" +#line 4118 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4106 "cs-parser.jay" +#line 4123 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4111 "cs-parser.jay" +#line 4128 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4116 "cs-parser.jay" +#line 4133 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4121 "cs-parser.jay" +#line 4138 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4126 "cs-parser.jay" +#line 4143 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4134 "cs-parser.jay" +#line 4151 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6925,7 +6939,7 @@ void case_610() } void case_611() -#line 4141 "cs-parser.jay" +#line 4158 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6940,7 +6954,7 @@ void case_611() } void case_612() -#line 4157 "cs-parser.jay" +#line 4174 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6948,7 +6962,7 @@ void case_612() } void case_613() -#line 4163 "cs-parser.jay" +#line 4180 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6956,21 +6970,21 @@ void case_613() } void case_614() -#line 4169 "cs-parser.jay" +#line 4186 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4177 "cs-parser.jay" +#line 4194 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4193 "cs-parser.jay" +#line 4210 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6979,14 +6993,14 @@ void case_620() } void case_622() -#line 4204 "cs-parser.jay" +#line 4221 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4212 "cs-parser.jay" +#line 4229 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -6994,14 +7008,14 @@ void case_623() } void case_624() -#line 4218 "cs-parser.jay" +#line 4235 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4223 "cs-parser.jay" +#line 4240 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7009,80 +7023,80 @@ void case_625() } void case_626() -#line 4229 "cs-parser.jay" +#line 4246 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4238 "cs-parser.jay" +#line 4255 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4243 "cs-parser.jay" +#line 4260 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4252 "cs-parser.jay" +#line 4269 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4257 "cs-parser.jay" +#line 4274 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4280 "cs-parser.jay" +#line 4297 "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_640() -#line 4285 "cs-parser.jay" +#line 4302 "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_641() -#line 4290 "cs-parser.jay" +#line 4307 "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_645() -#line 4319 "cs-parser.jay" +#line 4336 "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]); if (((c.ModFlags & Modifiers.STATIC) != 0) && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (c.Location, "static classes"); } - + + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); push_current_class (c, yyVals[-3+yyTop]); } void case_646() -#line 4330 "cs-parser.jay" +#line 4348 "cs-parser.jay" { lexer.ConstraintsParsing = false; current_class.SetParameterInfo ((List) yyVals[0+yyTop]); - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-5+yyTop])); if (doc_support) { current_container.DocComment = Lexer.consume_doc_comment (); @@ -7091,7 +7105,7 @@ void case_646() } void case_647() -#line 4342 "cs-parser.jay" +#line 4359 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7099,21 +7113,25 @@ void case_647() } void case_648() -#line 4348 "cs-parser.jay" +#line 4365 "cs-parser.jay" { - lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); + if (yyVals[0+yyTop] != null) { + lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); + } else { + lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); + } yyVal = pop_current_class (); } void case_651() -#line 4363 "cs-parser.jay" +#line 4384 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4373 "cs-parser.jay" +#line 4394 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7131,7 +7149,7 @@ void case_654() } void case_655() -#line 4392 "cs-parser.jay" +#line 4413 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7141,91 +7159,91 @@ void case_655() } void case_656() -#line 4400 "cs-parser.jay" +#line 4421 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4405 "cs-parser.jay" +#line 4426 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4410 "cs-parser.jay" +#line 4431 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4415 "cs-parser.jay" +#line 4436 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4420 "cs-parser.jay" +#line 4441 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4425 "cs-parser.jay" +#line 4446 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4430 "cs-parser.jay" +#line 4451 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4435 "cs-parser.jay" +#line 4456 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4440 "cs-parser.jay" +#line 4461 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4445 "cs-parser.jay" +#line 4466 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4450 "cs-parser.jay" +#line 4471 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4455 "cs-parser.jay" +#line 4476 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4460 "cs-parser.jay" +#line 4481 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7234,21 +7252,28 @@ void case_668() } void case_669() -#line 4467 "cs-parser.jay" +#line 4488 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } +void case_671() +#line 4497 "cs-parser.jay" +{ + lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); + current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); + } + void case_674() -#line 4488 "cs-parser.jay" +#line 4510 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4496 "cs-parser.jay" +#line 4518 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7256,7 +7281,7 @@ void case_675() } void case_676() -#line 4502 "cs-parser.jay" +#line 4524 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7274,14 +7299,14 @@ void case_676() } void case_677() -#line 4521 "cs-parser.jay" +#line 4543 "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_678() -#line 4529 "cs-parser.jay" +#line 4551 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7289,7 +7314,7 @@ void case_678() } void case_679() -#line 4535 "cs-parser.jay" +#line 4557 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7314,7 +7339,7 @@ void case_679() } void case_680() -#line 4561 "cs-parser.jay" +#line 4583 "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 ()); @@ -7323,14 +7348,14 @@ void case_680() } void case_681() -#line 4568 "cs-parser.jay" +#line 4590 "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_685() -#line 4588 "cs-parser.jay" +#line 4610 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7339,77 +7364,77 @@ void case_685() } void case_688() -#line 4622 "cs-parser.jay" +#line 4644 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4634 "cs-parser.jay" +#line 4656 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4639 "cs-parser.jay" +#line 4661 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4648 "cs-parser.jay" +#line 4670 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4653 "cs-parser.jay" +#line 4675 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4680 "cs-parser.jay" +#line 4702 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4744 "cs-parser.jay" +#line 4766 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4749 "cs-parser.jay" +#line 4771 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4754 "cs-parser.jay" +#line 4776 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4762 "cs-parser.jay" +#line 4784 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4770 "cs-parser.jay" +#line 4792 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7419,7 +7444,7 @@ void case_738() } void case_741() -#line 4783 "cs-parser.jay" +#line 4805 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7428,7 +7453,7 @@ void case_741() } void case_742() -#line 4799 "cs-parser.jay" +#line 4821 "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*/ @@ -7460,7 +7485,7 @@ void case_742() } void case_743() -#line 4829 "cs-parser.jay" +#line 4851 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7473,7 +7498,7 @@ void case_743() } void case_744() -#line 4840 "cs-parser.jay" +#line 4862 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7482,21 +7507,21 @@ void case_744() } void case_747() -#line 4855 "cs-parser.jay" +#line 4877 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4864 "cs-parser.jay" +#line 4886 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4879 "cs-parser.jay" +#line 4901 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7505,7 +7530,7 @@ void case_751() } void case_752() -#line 4886 "cs-parser.jay" +#line 4908 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7513,7 +7538,7 @@ void case_752() } void case_753() -#line 4892 "cs-parser.jay" +#line 4914 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7522,7 +7547,7 @@ void case_753() } void case_754() -#line 4899 "cs-parser.jay" +#line 4921 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7534,14 +7559,14 @@ void case_754() } void case_756() -#line 4913 "cs-parser.jay" +#line 4935 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4918 "cs-parser.jay" +#line 4940 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7552,7 +7577,7 @@ void case_757() } void case_762() -#line 4940 "cs-parser.jay" +#line 4962 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7563,7 +7588,7 @@ void case_762() } void case_763() -#line 4949 "cs-parser.jay" +#line 4971 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7574,14 +7599,14 @@ void case_763() } void case_765() -#line 4965 "cs-parser.jay" +#line 4987 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 4983 "cs-parser.jay" +#line 5005 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7592,28 +7617,28 @@ void case_770() } void case_772() -#line 4996 "cs-parser.jay" +#line 5018 "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_773() -#line 5001 "cs-parser.jay" +#line 5023 "cs-parser.jay" { 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_774() -#line 5009 "cs-parser.jay" +#line 5031 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5027 "cs-parser.jay" +#line 5049 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7625,7 +7650,7 @@ void case_778() } void case_779() -#line 5040 "cs-parser.jay" +#line 5062 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7635,14 +7660,14 @@ void case_779() } void case_780() -#line 5048 "cs-parser.jay" +#line 5070 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5062 "cs-parser.jay" +#line 5084 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7652,7 +7677,7 @@ void case_783() } void case_784() -#line 5071 "cs-parser.jay" +#line 5093 "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])); @@ -7664,7 +7689,7 @@ void case_784() } void case_786() -#line 5088 "cs-parser.jay" +#line 5110 "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])); @@ -7672,14 +7697,14 @@ void case_786() } void case_787() -#line 5097 "cs-parser.jay" +#line 5119 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5106 "cs-parser.jay" +#line 5128 "cs-parser.jay" { var sections = new List (4); @@ -7688,7 +7713,7 @@ void case_789() } void case_790() -#line 5113 "cs-parser.jay" +#line 5135 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7697,14 +7722,14 @@ void case_790() } void case_791() -#line 5120 "cs-parser.jay" +#line 5142 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5139 "cs-parser.jay" +#line 5161 "cs-parser.jay" { var labels = new List (2); @@ -7713,7 +7738,7 @@ void case_794() } void case_795() -#line 5146 "cs-parser.jay" +#line 5168 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7722,14 +7747,14 @@ void case_795() } void case_796() -#line 5156 "cs-parser.jay" +#line 5178 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5175 "cs-parser.jay" +#line 5197 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7739,21 +7764,21 @@ void case_802() } void case_803() -#line 5187 "cs-parser.jay" +#line 5209 "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_804() -#line 5195 "cs-parser.jay" +#line 5217 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5211 "cs-parser.jay" +#line 5233 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7767,14 +7792,14 @@ void case_806() } void case_807() -#line 5223 "cs-parser.jay" +#line 5245 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5236 "cs-parser.jay" +#line 5258 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7783,14 +7808,14 @@ void case_810() } void case_811() -#line 5243 "cs-parser.jay" +#line 5265 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5267 "cs-parser.jay" +#line 5289 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7805,14 +7830,14 @@ void case_819() } void case_820() -#line 5283 "cs-parser.jay" +#line 5305 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5288 "cs-parser.jay" +#line 5310 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7823,7 +7848,7 @@ void case_821() } void case_822() -#line 5297 "cs-parser.jay" +#line 5319 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7836,21 +7861,21 @@ void case_822() } void case_829() -#line 5320 "cs-parser.jay" +#line 5342 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5328 "cs-parser.jay" +#line 5350 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5336 "cs-parser.jay" +#line 5358 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7858,35 +7883,35 @@ void case_831() } void case_832() -#line 5342 "cs-parser.jay" +#line 5364 "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_833() -#line 5347 "cs-parser.jay" +#line 5369 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5355 "cs-parser.jay" +#line 5377 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5363 "cs-parser.jay" +#line 5385 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5371 "cs-parser.jay" +#line 5393 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7904,7 +7929,7 @@ void case_836() } void case_837() -#line 5387 "cs-parser.jay" +#line 5409 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7920,28 +7945,28 @@ void case_837() } void case_841() -#line 5413 "cs-parser.jay" +#line 5435 "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_842() -#line 5418 "cs-parser.jay" +#line 5440 "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_843() -#line 5423 "cs-parser.jay" +#line 5445 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5431 "cs-parser.jay" +#line 5453 "cs-parser.jay" { var l = new List (2); @@ -7950,7 +7975,7 @@ void case_844() } void case_845() -#line 5438 "cs-parser.jay" +#line 5460 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7968,7 +7993,7 @@ void case_845() } void case_849() -#line 5466 "cs-parser.jay" +#line 5488 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -7985,7 +8010,7 @@ void case_849() } void case_851() -#line 5485 "cs-parser.jay" +#line 5507 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -7998,14 +8023,14 @@ void case_851() } void case_854() -#line 5513 "cs-parser.jay" +#line 5535 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5523 "cs-parser.jay" +#line 5545 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8015,7 +8040,7 @@ void case_856() } void case_857() -#line 5534 "cs-parser.jay" +#line 5556 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8027,14 +8052,14 @@ void case_857() } void case_858() -#line 5544 "cs-parser.jay" +#line 5566 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5549 "cs-parser.jay" +#line 5571 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8046,7 +8071,7 @@ void case_859() } void case_860() -#line 5562 "cs-parser.jay" +#line 5584 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8058,14 +8083,14 @@ void case_860() } void case_861() -#line 5572 "cs-parser.jay" +#line 5594 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5577 "cs-parser.jay" +#line 5599 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8077,7 +8102,7 @@ void case_862() } void case_863() -#line 5587 "cs-parser.jay" +#line 5609 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8088,14 +8113,14 @@ void case_863() } void case_865() -#line 5603 "cs-parser.jay" +#line 5625 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5614 "cs-parser.jay" +#line 5636 "cs-parser.jay" { lexer.query_parsing = false; @@ -8109,7 +8134,7 @@ void case_866() } void case_867() -#line 5626 "cs-parser.jay" +#line 5648 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8121,7 +8146,7 @@ void case_867() } void case_868() -#line 5637 "cs-parser.jay" +#line 5659 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8131,7 +8156,7 @@ void case_868() } void case_869() -#line 5644 "cs-parser.jay" +#line 5666 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8139,7 +8164,7 @@ void case_869() } void case_870() -#line 5653 "cs-parser.jay" +#line 5675 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8149,7 +8174,7 @@ void case_870() } void case_871() -#line 5661 "cs-parser.jay" +#line 5683 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8163,7 +8188,7 @@ void case_871() } void case_872() -#line 5676 "cs-parser.jay" +#line 5698 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8173,7 +8198,7 @@ void case_872() } void case_873() -#line 5684 "cs-parser.jay" +#line 5706 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8187,7 +8212,7 @@ void case_873() } void case_875() -#line 5703 "cs-parser.jay" +#line 5725 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8200,7 +8225,7 @@ void case_875() } void case_877() -#line 5718 "cs-parser.jay" +#line 5740 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8216,7 +8241,7 @@ void case_877() } void case_878() -#line 5735 "cs-parser.jay" +#line 5757 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8233,14 +8258,14 @@ void case_878() } void case_880() -#line 5751 "cs-parser.jay" +#line 5773 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5763 "cs-parser.jay" +#line 5785 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8249,7 +8274,7 @@ void case_882() } void case_883() -#line 5770 "cs-parser.jay" +#line 5792 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8259,7 +8284,7 @@ void case_883() } void case_884() -#line 5778 "cs-parser.jay" +#line 5800 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8268,7 +8293,7 @@ void case_884() } void case_885() -#line 5785 "cs-parser.jay" +#line 5807 "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])); @@ -8278,14 +8303,14 @@ void case_885() } void case_889() -#line 5802 "cs-parser.jay" +#line 5824 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5822 "cs-parser.jay" +#line 5844 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8299,7 +8324,7 @@ void case_896() } void case_898() -#line 5841 "cs-parser.jay" +#line 5863 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8308,7 +8333,7 @@ void case_898() } void case_899() -#line 5851 "cs-parser.jay" +#line 5873 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8318,7 +8343,7 @@ void case_899() } void case_900() -#line 5859 "cs-parser.jay" +#line 5881 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8328,7 +8353,7 @@ void case_900() } void case_901() -#line 5867 "cs-parser.jay" +#line 5889 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8338,7 +8363,7 @@ void case_901() } void case_902() -#line 5875 "cs-parser.jay" +#line 5897 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8378,7 +8403,7 @@ void case_902() } void case_903() -#line 5913 "cs-parser.jay" +#line 5935 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8388,7 +8413,7 @@ void case_903() } void case_904() -#line 5921 "cs-parser.jay" +#line 5943 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8398,7 +8423,7 @@ void case_904() } void case_905() -#line 5929 "cs-parser.jay" +#line 5951 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8408,7 +8433,7 @@ void case_905() } void case_906() -#line 5937 "cs-parser.jay" +#line 5959 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8450,7 +8475,7 @@ void case_906() } void case_910() -#line 5992 "cs-parser.jay" +#line 6014 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8459,7 +8484,7 @@ void case_910() } void case_912() -#line 6003 "cs-parser.jay" +#line 6025 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8468,14 +8493,14 @@ void case_912() } void case_913() -#line 6010 "cs-parser.jay" +#line 6032 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6019 "cs-parser.jay" +#line 6041 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8484,42 +8509,42 @@ void case_915() } void case_916() -#line 6026 "cs-parser.jay" +#line 6048 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6038 "cs-parser.jay" +#line 6060 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6043 "cs-parser.jay" +#line 6065 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6055 "cs-parser.jay" +#line 6077 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6060 "cs-parser.jay" +#line 6082 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6070 "cs-parser.jay" +#line 6092 "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*/ @@ -8537,7 +8562,7 @@ void case_924() } void case_925() -#line 6086 "cs-parser.jay" +#line 6108 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8548,7 +8573,7 @@ void case_925() } void case_928() -#line 6113 "cs-parser.jay" +#line 6135 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8580,7 +8605,7 @@ void case_928() } void case_929() -#line 6143 "cs-parser.jay" +#line 6165 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8592,7 +8617,7 @@ void case_929() } void case_939() -#line 6186 "cs-parser.jay" +#line 6208 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8600,7 +8625,7 @@ void case_939() } void case_940() -#line 6192 "cs-parser.jay" +#line 6214 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8609,14 +8634,14 @@ void case_940() } void case_943() -#line 6207 "cs-parser.jay" +#line 6229 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6212 "cs-parser.jay" +#line 6234 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8626,7 +8651,7 @@ void case_944() } void case_945() -#line 6220 "cs-parser.jay" +#line 6242 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8636,7 +8661,7 @@ void case_945() } void case_946() -#line 6228 "cs-parser.jay" +#line 6250 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8645,7 +8670,7 @@ void case_946() } void case_954() -#line 6266 "cs-parser.jay" +#line 6288 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8653,7 +8678,7 @@ void case_954() } void case_955() -#line 6272 "cs-parser.jay" +#line 6294 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8661,7 +8686,7 @@ void case_955() } void case_956() -#line 6281 "cs-parser.jay" +#line 6303 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -11997,7 +12022,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6290 "cs-parser.jay" +#line 6312 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index f186be4ee6..cc3e49ac52 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -142,7 +142,7 @@ namespace Mono.CSharp LocationsBag lbag; UsingsBag ubag; List> mod_locations; - Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; + Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation, savedEnumBaseTypeColonLocation; Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); @@ -564,6 +564,7 @@ qualified_identifier { var lt = (Tokenizer.LocatedToken) $3; $$ = new MemberName ((MemberName) $1, lt.Value, lt.Location); + lbag.AddLocation ($$, GetLocation ($2)); } | error { @@ -932,6 +933,7 @@ struct_declaration { MemberName name = MakeName ((MemberName) $6); push_current_class (new Struct (current_namespace, current_class, name, (Modifiers) $2, (Attributes) $1), $3); + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($4)); } opt_class_base opt_type_parameter_constraints_clauses @@ -943,7 +945,6 @@ struct_declaration if (doc_support) current_container.DocComment = Lexer.consume_doc_comment (); - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($4)); } struct_body { @@ -1973,7 +1974,11 @@ interface_declaration } opt_semicolon { - lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); + if ($15 != null) { + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13), GetLocation ($15)); + } else { + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); + } $$ = pop_current_class (); } | opt_attributes opt_modifiers opt_partial INTERFACE error @@ -2580,8 +2585,19 @@ enum_declaration // if (doc_support) // em.DocComment = ev.DocComment; - - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), GetLocation ($7), GetLocation ($11)); + if ($5 != null) { + if ($12 != null) { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), savedEnumBaseTypeColonLocation, GetLocation ($7), GetLocation ($11), GetLocation ($12)); + } else { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), savedEnumBaseTypeColonLocation, GetLocation ($7), GetLocation ($11)); + } + } else { + if ($12 != null) { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), GetLocation ($7), GetLocation ($11), GetLocation ($12)); + } else { + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), GetLocation ($7), GetLocation ($11)); + } + } $$ = pop_current_class (); } ; @@ -2595,6 +2611,7 @@ opt_enum_base Enum.Error_1008 (GetLocation ($2), report); $$ = null; } else { + savedEnumBaseTypeColonLocation = GetLocation ($1); $$ = $2; } } @@ -4322,7 +4339,8 @@ class_declaration if (((c.ModFlags & Modifiers.STATIC) != 0) && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (c.Location, "static classes"); } - + + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($4)); push_current_class (c, $3); } opt_class_base @@ -4331,7 +4349,6 @@ class_declaration lexer.ConstraintsParsing = false; current_class.SetParameterInfo ((List) $9); - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($4)); if (doc_support) { current_container.DocComment = Lexer.consume_doc_comment (); @@ -4346,7 +4363,11 @@ class_declaration } opt_semicolon { - lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13), GetLocation ($15)); + if ($15 != null) { + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13), GetLocation ($15)); + } else { + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); + } $$ = pop_current_class (); } ; @@ -4474,6 +4495,7 @@ opt_class_base : /* empty */ | COLON type_list { + lbag.AppendToMember (current_class, GetLocation ($1)); current_container.AddBasesForPart (current_class, (List) $2); } ; From ab28842b04aa6ed2b8008dd6da1542b3e543697f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 16:13:04 +0200 Subject: [PATCH 13/92] Added base type comma tokens. --- .../Parser/CSharpParser.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index b54c8ac3f3..8c921df864 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -375,8 +375,15 @@ namespace ICSharpCode.NRefactory.CSharp if (c.TypeBaseExpressions != null) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); + + var commaLocations = LocationsBag.GetLocations (c.TypeBaseExpressions); + int i = 0; foreach (var baseTypes in c.TypeBaseExpressions) { newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + if (commaLocations != null && i < commaLocations.Count) { + newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i - 1]), 1), TypeDeclaration.Roles.Comma); + i++; + } } } if (location != null && curLoc < location.Count) @@ -422,8 +429,14 @@ namespace ICSharpCode.NRefactory.CSharp if (s.TypeBaseExpressions != null) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); + var commaLocations = LocationsBag.GetLocations (s.TypeBaseExpressions); + int i = 0; foreach (var baseTypes in s.TypeBaseExpressions) { newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + if (commaLocations != null && i < commaLocations.Count) { + newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i - 1]), 1), TypeDeclaration.Roles.Comma); + i++; + } } } @@ -468,8 +481,14 @@ namespace ICSharpCode.NRefactory.CSharp if (i.TypeBaseExpressions != null) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); + var commaLocations = LocationsBag.GetLocations (i.TypeBaseExpressions); + int j = 0; foreach (var baseTypes in i.TypeBaseExpressions) { newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); + if (commaLocations != null && j < commaLocations.Count) { + newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - j - 1]), 1), TypeDeclaration.Roles.Comma); + j++; + } } } if (location != null && curLoc < location.Count) From ea6e15c28de18dc8774ed7404a22ddef11809486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 16:24:41 +0200 Subject: [PATCH 14/92] Fixed method/operator semicolons. --- .../Parser/CSharpParser.cs | 17 +- .../Parser/mcs/cs-parser.cs | 1180 +++++++++-------- .../Parser/mcs/cs-parser.jay | 8 +- 3 files changed, 610 insertions(+), 595 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 8c921df864..debb826618 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -776,9 +776,12 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) newOperator.AddChild (new CSharpTokenNode (Convert (location[3]), 1), OperatorDeclaration.Roles.RPar); - if (o.Block != null) + if (o.Block != null) { newOperator.AddChild ((BlockStatement)o.Block.Accept (this), OperatorDeclaration.Roles.Body); - + } else { + if (location != null && location.Count >= 5) + newOperator.AddChild (new CSharpTokenNode (Convert (location[4]), 1), MethodDeclaration.Roles.Semicolon); + } typeStack.Peek ().AddChild (newOperator, TypeDeclaration.MemberRole); } @@ -895,9 +898,13 @@ namespace ICSharpCode.NRefactory.CSharp // } else { newMethod.AddChild (bodyBlock, MethodDeclaration.Roles.Body); // } - } else if (location != null && location.Count < 3 && typeStack.Peek ().ClassType != ClassType.Interface) { - // parser error, set end node to max value. - newMethod.AddChild (new ErrorNode (), AstNode.Roles.Error); + } else if (location != null) { + if (location.Count < 3) { + // parser error, set end node to max value. + newMethod.AddChild (new ErrorNode (), AstNode.Roles.Error); + } else { + newMethod.AddChild (new CSharpTokenNode (Convert (location[2]), 1), MethodDeclaration.Roles.Semicolon); + } } typeStack.Peek ().AddChild (newMethod, TypeDeclaration.MemberRole); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 90bbf3efa9..c4ee494b23 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1739,13 +1739,13 @@ case 157: case_157(); break; case 158: -#line 1296 "cs-parser.jay" +#line 1297 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 159: -#line 1300 "cs-parser.jay" +#line 1301 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1754,7 +1754,7 @@ case 160: case_160(); break; case 161: -#line 1340 "cs-parser.jay" +#line 1341 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1763,7 +1763,7 @@ case 162: case_162(); break; case 163: -#line 1350 "cs-parser.jay" +#line 1351 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1775,11 +1775,11 @@ case 165: case_165(); break; case 167: -#line 1424 "cs-parser.jay" - { yyVal = null; } +#line 1425 "cs-parser.jay" + { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 168: -#line 1428 "cs-parser.jay" +#line 1429 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 170: @@ -1804,13 +1804,13 @@ case 176: case_176(); break; case 177: -#line 1500 "cs-parser.jay" +#line 1501 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 178: -#line 1504 "cs-parser.jay" +#line 1505 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1834,7 +1834,7 @@ case 184: case_184(); break; case 185: -#line 1579 "cs-parser.jay" +#line 1580 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1843,7 +1843,7 @@ case 186: case_186(); break; case 187: -#line 1620 "cs-parser.jay" +#line 1621 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 189: @@ -1877,7 +1877,7 @@ case 198: case_198(); break; case 199: -#line 1718 "cs-parser.jay" +#line 1719 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1898,7 +1898,7 @@ case 204: case_204(); break; case 205: -#line 1772 "cs-parser.jay" +#line 1773 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1907,7 +1907,7 @@ case 206: case_206(); break; case 207: -#line 1801 "cs-parser.jay" +#line 1802 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1937,7 +1937,7 @@ case 220: case_220(); break; case 221: -#line 1950 "cs-parser.jay" +#line 1951 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1955,43 +1955,43 @@ case 225: case_225(); break; case 226: -#line 1987 "cs-parser.jay" +#line 1988 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 231: -#line 2004 "cs-parser.jay" +#line 2005 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 232: -#line 2008 "cs-parser.jay" +#line 2009 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 237: -#line 2016 "cs-parser.jay" +#line 2017 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 238: -#line 2020 "cs-parser.jay" +#line 2021 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 239: -#line 2024 "cs-parser.jay" +#line 2025 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 240: -#line 2030 "cs-parser.jay" +#line 2031 "cs-parser.jay" { } break; @@ -1999,14 +1999,14 @@ case 241: case_241(); break; case 243: -#line 2060 "cs-parser.jay" - { yyVal = null; } +#line 2064 "cs-parser.jay" + { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 245: case_245(); break; case 246: -#line 2076 "cs-parser.jay" +#line 2080 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2015,95 +2015,95 @@ case 247: case_247(); break; case 249: -#line 2122 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; case 250: -#line 2123 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; case 251: -#line 2124 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; case 252: -#line 2125 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; case 253: -#line 2126 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; case 254: -#line 2127 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; case 255: -#line 2129 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; case 256: -#line 2130 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; case 257: -#line 2132 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; case 258: -#line 2133 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; case 259: -#line 2134 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; case 260: -#line 2135 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; case 261: -#line 2136 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; case 262: -#line 2137 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; case 263: -#line 2138 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; case 264: -#line 2139 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; case 265: -#line 2140 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; case 266: -#line 2141 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; case 267: -#line 2142 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; case 268: -#line 2143 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; case 269: -#line 2144 "cs-parser.jay" +#line 2148 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; case 270: -#line 2145 "cs-parser.jay" +#line 2149 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; case 271: -#line 2152 "cs-parser.jay" +#line 2156 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2112,7 +2112,7 @@ case 272: case_272(); break; case 273: -#line 2171 "cs-parser.jay" +#line 2175 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2139,11 +2139,11 @@ case 280: case_280(); break; case 282: -#line 2274 "cs-parser.jay" +#line 2278 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 285: -#line 2286 "cs-parser.jay" +#line 2290 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2152,7 +2152,7 @@ case 286: case_286(); break; case 287: -#line 2296 "cs-parser.jay" +#line 2300 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2185,7 +2185,7 @@ case 296: case_296(); break; case 298: -#line 2405 "cs-parser.jay" +#line 2409 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2194,13 +2194,13 @@ case 299: case_299(); break; case 302: -#line 2422 "cs-parser.jay" +#line 2426 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 303: -#line 2426 "cs-parser.jay" +#line 2430 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2209,7 +2209,7 @@ case 304: case_304(); break; case 305: -#line 2439 "cs-parser.jay" +#line 2443 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2221,7 +2221,7 @@ case 307: case_307(); break; case 308: -#line 2464 "cs-parser.jay" +#line 2468 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2269,7 +2269,7 @@ case 326: case_326(); break; case 329: -#line 2631 "cs-parser.jay" +#line 2635 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2287,7 +2287,7 @@ case 334: case_334(); break; case 335: -#line 2689 "cs-parser.jay" +#line 2693 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2296,7 +2296,7 @@ case 336: case_336(); break; case 337: -#line 2711 "cs-parser.jay" +#line 2715 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2329,7 +2329,7 @@ case 350: case_350(); break; case 351: -#line 2815 "cs-parser.jay" +#line 2819 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2374,13 +2374,13 @@ case 366: case_366(); break; case 368: -#line 2933 "cs-parser.jay" +#line 2937 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2940 "cs-parser.jay" +#line 2944 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2395,7 +2395,7 @@ case 375: case_375(); break; case 377: -#line 2978 "cs-parser.jay" +#line 2982 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2404,7 +2404,7 @@ case 378: case_378(); break; case 379: -#line 2998 "cs-parser.jay" +#line 3002 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2413,13 +2413,13 @@ case 380: case_380(); break; case 381: -#line 3007 "cs-parser.jay" +#line 3011 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 3011 "cs-parser.jay" +#line 3015 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2437,63 +2437,63 @@ case 386: case_386(); break; case 387: -#line 3050 "cs-parser.jay" +#line 3054 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3051 "cs-parser.jay" +#line 3055 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3052 "cs-parser.jay" +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3053 "cs-parser.jay" +#line 3057 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3054 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3055 "cs-parser.jay" +#line 3059 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3060 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3061 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3062 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3063 "cs-parser.jay" +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3064 "cs-parser.jay" +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3065 "cs-parser.jay" +#line 3069 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3066 "cs-parser.jay" +#line 3070 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3067 "cs-parser.jay" +#line 3071 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3068 "cs-parser.jay" +#line 3072 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2503,22 +2503,22 @@ case 424: case_424(); break; case 428: -#line 3115 "cs-parser.jay" +#line 3119 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3119 "cs-parser.jay" +#line 3123 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3120 "cs-parser.jay" +#line 3124 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3153 "cs-parser.jay" +#line 3157 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2536,7 +2536,7 @@ case 440: case_440(); break; case 441: -#line 3185 "cs-parser.jay" +#line 3189 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2545,7 +2545,7 @@ case 442: case_442(); break; case 443: -#line 3193 "cs-parser.jay" +#line 3197 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2557,7 +2557,7 @@ case 445: case_445(); break; case 446: -#line 3209 "cs-parser.jay" +#line 3213 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2567,11 +2567,11 @@ case 449: case_449(); break; case 450: -#line 3232 "cs-parser.jay" +#line 3236 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3236 "cs-parser.jay" +#line 3240 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2589,7 +2589,7 @@ case 455: case_455(); break; case 456: -#line 3269 "cs-parser.jay" +#line 3273 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2604,7 +2604,7 @@ case 459: case_459(); break; case 462: -#line 3297 "cs-parser.jay" +#line 3301 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2623,7 +2623,7 @@ case 468: case_468(); break; case 469: -#line 3349 "cs-parser.jay" +#line 3353 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2659,13 +2659,13 @@ case 483: case_483(); break; case 484: -#line 3436 "cs-parser.jay" +#line 3440 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3444 "cs-parser.jay" +#line 3448 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2677,13 +2677,13 @@ case 488: case_488(); break; case 489: -#line 3464 "cs-parser.jay" +#line 3468 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3471 "cs-parser.jay" +#line 3475 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2710,7 +2710,7 @@ case 497: case_497(); break; case 498: -#line 3537 "cs-parser.jay" +#line 3541 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2722,7 +2722,7 @@ case 500: case_500(); break; case 503: -#line 3564 "cs-parser.jay" +#line 3568 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2753,25 +2753,25 @@ case 516: case_516(); break; case 517: -#line 3642 "cs-parser.jay" +#line 3646 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3646 "cs-parser.jay" +#line 3650 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3653 "cs-parser.jay" +#line 3657 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3657 "cs-parser.jay" +#line 3661 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2789,7 +2789,7 @@ case 524: case_524(); break; case 525: -#line 3701 "cs-parser.jay" +#line 3705 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2834,7 +2834,7 @@ case 540: case_540(); break; case 541: -#line 3815 "cs-parser.jay" +#line 3819 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2843,25 +2843,25 @@ case 542: case_542(); break; case 543: -#line 3828 "cs-parser.jay" +#line 3832 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3832 "cs-parser.jay" +#line 3836 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3839 "cs-parser.jay" +#line 3843 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3847 "cs-parser.jay" +#line 3851 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2873,13 +2873,13 @@ case 549: case_549(); break; case 551: -#line 3873 "cs-parser.jay" +#line 3877 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3877 "cs-parser.jay" +#line 3881 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2891,37 +2891,37 @@ case 556: case_556(); break; case 558: -#line 3907 "cs-parser.jay" +#line 3911 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3911 "cs-parser.jay" +#line 3915 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3915 "cs-parser.jay" +#line 3919 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3919 "cs-parser.jay" +#line 3923 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3923 "cs-parser.jay" +#line 3927 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3927 "cs-parser.jay" +#line 3931 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2939,7 +2939,7 @@ case 569: case_569(); break; case 570: -#line 3959 "cs-parser.jay" +#line 3963 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2948,13 +2948,13 @@ case 571: case_571(); break; case 572: -#line 3968 "cs-parser.jay" +#line 3972 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3972 "cs-parser.jay" +#line 3976 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3005,7 +3005,7 @@ case 598: case_598(); break; case 599: -#line 4096 "cs-parser.jay" +#line 4100 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3056,14 +3056,14 @@ case 614: case_614(); break; case 615: -#line 4193 "cs-parser.jay" +#line 4197 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4208 "cs-parser.jay" +#line 4212 "cs-parser.jay" { start_block (lexer.Location); } @@ -3087,7 +3087,7 @@ case 626: case_626(); break; case 627: -#line 4253 "cs-parser.jay" +#line 4257 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3099,7 +3099,7 @@ case 629: case_629(); break; case 630: -#line 4267 "cs-parser.jay" +#line 4271 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3111,7 +3111,7 @@ case 632: case_632(); break; case 638: -#line 4292 "cs-parser.jay" +#line 4296 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3126,13 +3126,13 @@ case 641: case_641(); break; case 643: -#line 4321 "cs-parser.jay" +#line 4325 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4334 "cs-parser.jay" +#line 4338 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3150,11 +3150,11 @@ case 648: case_648(); break; case 649: -#line 4377 "cs-parser.jay" +#line 4381 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4379 "cs-parser.jay" +#line 4383 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3212,7 +3212,7 @@ case 671: case_671(); break; case 673: -#line 4508 "cs-parser.jay" +#line 4512 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3242,19 +3242,19 @@ case 681: case_681(); break; case 682: -#line 4597 "cs-parser.jay" +#line 4601 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4601 "cs-parser.jay" +#line 4605 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4608 "cs-parser.jay" +#line 4612 "cs-parser.jay" { yyVal = Variance.None; } @@ -3263,13 +3263,13 @@ case 685: case_685(); break; case 686: -#line 4622 "cs-parser.jay" +#line 4626 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4626 "cs-parser.jay" +#line 4630 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3278,7 +3278,7 @@ case 688: case_688(); break; case 689: -#line 4651 "cs-parser.jay" +#line 4655 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3296,13 +3296,13 @@ case 693: case_693(); break; case 698: -#line 4695 "cs-parser.jay" +#line 4699 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4699 "cs-parser.jay" +#line 4703 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3311,13 +3311,13 @@ case 701: case_701(); break; case 704: -#line 4723 "cs-parser.jay" +#line 4727 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4727 "cs-parser.jay" +#line 4731 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3350,13 +3350,13 @@ case 744: case_744(); break; case 745: -#line 4871 "cs-parser.jay" +#line 4875 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4875 "cs-parser.jay" +#line 4879 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3368,7 +3368,7 @@ case 749: case_749(); break; case 750: -#line 4896 "cs-parser.jay" +#line 4900 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3398,7 +3398,7 @@ case 763: case_763(); break; case 764: -#line 4985 "cs-parser.jay" +#line 4989 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3419,15 +3419,15 @@ case 774: case_774(); break; case 775: -#line 5035 "cs-parser.jay" +#line 5039 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5039 "cs-parser.jay" +#line 5043 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5040 "cs-parser.jay" +#line 5044 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3446,7 +3446,7 @@ case 784: case_784(); break; case 785: -#line 5108 "cs-parser.jay" +#line 5112 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3467,13 +3467,13 @@ case 791: case_791(); break; case 792: -#line 5152 "cs-parser.jay" +#line 5156 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5156 "cs-parser.jay" +#line 5160 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3488,7 +3488,7 @@ case 796: case_796(); break; case 797: -#line 5185 "cs-parser.jay" +#line 5189 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3503,7 +3503,7 @@ case 804: case_804(); break; case 805: -#line 5224 "cs-parser.jay" +#line 5228 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3515,7 +3515,7 @@ case 807: case_807(); break; case 808: -#line 5252 "cs-parser.jay" +#line 5256 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3525,11 +3525,11 @@ case 811: case_811(); break; case 813: -#line 5273 "cs-parser.jay" +#line 5277 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5278 "cs-parser.jay" +#line 5282 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3572,7 +3572,7 @@ case 837: case_837(); break; case 840: -#line 5433 "cs-parser.jay" +#line 5437 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3593,7 +3593,7 @@ case 845: case_845(); break; case 848: -#line 5486 "cs-parser.jay" +#line 5490 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3602,7 +3602,7 @@ case 849: case_849(); break; case 850: -#line 5505 "cs-parser.jay" +#line 5509 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3611,13 +3611,13 @@ case 851: case_851(); break; case 852: -#line 5523 "cs-parser.jay" +#line 5527 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5530 "cs-parser.jay" +#line 5534 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3626,7 +3626,7 @@ case 854: case_854(); break; case 855: -#line 5540 "cs-parser.jay" +#line 5544 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3656,7 +3656,7 @@ case 863: case_863(); break; case 864: -#line 5623 "cs-parser.jay" +#line 5627 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3689,7 +3689,7 @@ case 873: case_873(); break; case 874: -#line 5723 "cs-parser.jay" +#line 5727 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3698,7 +3698,7 @@ case 875: case_875(); break; case 876: -#line 5738 "cs-parser.jay" +#line 5742 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3713,7 +3713,7 @@ case 880: case_880(); break; case 881: -#line 5783 "cs-parser.jay" +#line 5787 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3734,7 +3734,7 @@ case 889: case_889(); break; case 895: -#line 5842 "cs-parser.jay" +#line 5846 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3743,7 +3743,7 @@ case 896: case_896(); break; case 897: -#line 5861 "cs-parser.jay" +#line 5865 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3776,13 +3776,13 @@ case 906: case_906(); break; case 908: -#line 6005 "cs-parser.jay" +#line 6009 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 6012 "cs-parser.jay" +#line 6016 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3803,7 +3803,7 @@ case 916: case_916(); break; case 917: -#line 6058 "cs-parser.jay" +#line 6062 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3815,7 +3815,7 @@ case 919: case_919(); break; case 920: -#line 6075 "cs-parser.jay" +#line 6079 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3839,13 +3839,13 @@ case 929: case_929(); break; case 937: -#line 6199 "cs-parser.jay" +#line 6203 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6206 "cs-parser.jay" +#line 6210 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3857,13 +3857,13 @@ case 940: case_940(); break; case 941: -#line 6223 "cs-parser.jay" +#line 6227 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6227 "cs-parser.jay" +#line 6231 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3881,25 +3881,25 @@ case 946: case_946(); break; case 948: -#line 6263 "cs-parser.jay" +#line 6267 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6271 "cs-parser.jay" +#line 6275 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6275 "cs-parser.jay" +#line 6279 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6282 "cs-parser.jay" +#line 6286 "cs-parser.jay" { yyVal = new List (0); } @@ -4562,6 +4562,7 @@ void case_157() method.Block = (ToplevelBlock) yyVals[0+yyTop]; if (method.Block == null) { + lbag.AppendToMember (method, savedLocation); /* semicolon*/ method.ParameterInfo.CheckParameters (method); if ((method.ModFlags & Modifiers.ASYNC) != 0) { @@ -4582,7 +4583,7 @@ void case_157() } void case_160() -#line 1302 "cs-parser.jay" +#line 1303 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4617,14 +4618,14 @@ void case_160() } void case_162() -#line 1343 "cs-parser.jay" +#line 1344 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_164() -#line 1352 "cs-parser.jay" +#line 1353 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4676,7 +4677,7 @@ void case_164() } void case_165() -#line 1405 "cs-parser.jay" +#line 1406 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4694,7 +4695,7 @@ void case_165() } void case_170() -#line 1434 "cs-parser.jay" +#line 1435 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4702,7 +4703,7 @@ void case_170() } void case_171() -#line 1440 "cs-parser.jay" +#line 1441 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4713,7 +4714,7 @@ void case_171() } void case_172() -#line 1449 "cs-parser.jay" +#line 1450 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4724,7 +4725,7 @@ void case_172() } void case_173() -#line 1458 "cs-parser.jay" +#line 1459 "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"); @@ -4734,7 +4735,7 @@ void case_173() } void case_174() -#line 1466 "cs-parser.jay" +#line 1467 "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"); @@ -4749,7 +4750,7 @@ void case_174() } void case_175() -#line 1479 "cs-parser.jay" +#line 1480 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4758,7 +4759,7 @@ void case_175() } void case_176() -#line 1486 "cs-parser.jay" +#line 1487 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4772,14 +4773,14 @@ void case_176() } void case_179() -#line 1506 "cs-parser.jay" +#line 1507 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_180() -#line 1514 "cs-parser.jay" +#line 1515 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4790,7 +4791,7 @@ void case_180() } void case_181() -#line 1523 "cs-parser.jay" +#line 1524 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4810,7 +4811,7 @@ void case_181() } void case_182() -#line 1547 "cs-parser.jay" +#line 1548 "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); @@ -4818,7 +4819,7 @@ void case_182() } void case_183() -#line 1556 "cs-parser.jay" +#line 1557 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4827,7 +4828,7 @@ void case_183() } void case_184() -#line 1566 "cs-parser.jay" +#line 1567 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4836,7 +4837,7 @@ void case_184() } void case_186() -#line 1581 "cs-parser.jay" +#line 1582 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4875,14 +4876,14 @@ void case_186() } void case_189() -#line 1626 "cs-parser.jay" +#line 1627 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; parameterModifierLocation = GetLocation (yyVals[0+yyTop]); } void case_190() -#line 1631 "cs-parser.jay" +#line 1632 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4905,7 +4906,7 @@ void case_190() } void case_191() -#line 1655 "cs-parser.jay" +#line 1656 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4914,7 +4915,7 @@ void case_191() } void case_192() -#line 1662 "cs-parser.jay" +#line 1663 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4923,7 +4924,7 @@ void case_192() } void case_193() -#line 1669 "cs-parser.jay" +#line 1670 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4935,14 +4936,14 @@ void case_193() } void case_194() -#line 1682 "cs-parser.jay" +#line 1683 "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_195() -#line 1687 "cs-parser.jay" +#line 1688 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4951,21 +4952,21 @@ void case_195() } void case_196() -#line 1694 "cs-parser.jay" +#line 1695 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_197() -#line 1702 "cs-parser.jay" +#line 1703 "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"); } void case_198() -#line 1707 "cs-parser.jay" +#line 1708 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4976,21 +4977,21 @@ void case_198() } void case_200() -#line 1723 "cs-parser.jay" +#line 1724 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_201() -#line 1734 "cs-parser.jay" +#line 1735 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_202() -#line 1739 "cs-parser.jay" +#line 1740 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5006,7 +5007,7 @@ void case_202() } void case_203() -#line 1753 "cs-parser.jay" +#line 1754 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5015,14 +5016,14 @@ void case_203() } void case_204() -#line 1760 "cs-parser.jay" +#line 1761 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_206() -#line 1774 "cs-parser.jay" +#line 1775 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5049,7 +5050,7 @@ void case_206() } void case_208() -#line 1803 "cs-parser.jay" +#line 1804 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5062,7 +5063,7 @@ void case_208() } void case_213() -#line 1822 "cs-parser.jay" +#line 1823 "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 ()); @@ -5075,7 +5076,7 @@ void case_213() } void case_214() -#line 1836 "cs-parser.jay" +#line 1837 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5098,7 +5099,7 @@ void case_214() } void case_215() -#line 1857 "cs-parser.jay" +#line 1858 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5121,7 +5122,7 @@ void case_215() } void case_216() -#line 1881 "cs-parser.jay" +#line 1882 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5149,7 +5150,7 @@ void case_216() } void case_217() -#line 1907 "cs-parser.jay" +#line 1908 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5172,21 +5173,21 @@ void case_217() } void case_219() -#line 1932 "cs-parser.jay" +#line 1933 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1937 "cs-parser.jay" +#line 1938 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1952 "cs-parser.jay" +#line 1953 "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]); @@ -5194,7 +5195,7 @@ void case_222() } void case_223() -#line 1959 "cs-parser.jay" +#line 1960 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5207,7 +5208,7 @@ void case_223() } void case_224() -#line 1970 "cs-parser.jay" +#line 1971 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5215,7 +5216,7 @@ void case_224() } void case_225() -#line 1976 "cs-parser.jay" +#line 1977 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); @@ -5226,7 +5227,7 @@ void case_225() } void case_241() -#line 2032 "cs-parser.jay" +#line 2033 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5247,20 +5248,23 @@ void case_241() current_container.AddOperator (op); lbag.AddMember (op, GetModifierLocations (), lbag.GetLocations (decl)); + if (yyVals[0+yyTop] == null) { /* Semicolon*/ + lbag.AppendTo (op, savedLocation); + } } current_local_parameters = null; } void case_245() -#line 2066 "cs-parser.jay" +#line 2070 "cs-parser.jay" { 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_247() -#line 2078 "cs-parser.jay" +#line 2082 "cs-parser.jay" { valid_param_mod = 0; @@ -5302,7 +5306,7 @@ void case_247() } void case_272() -#line 2154 "cs-parser.jay" +#line 2158 "cs-parser.jay" { valid_param_mod = 0; @@ -5319,7 +5323,7 @@ void case_272() } void case_274() -#line 2173 "cs-parser.jay" +#line 2177 "cs-parser.jay" { valid_param_mod = 0; @@ -5336,7 +5340,7 @@ void case_274() } void case_275() -#line 2188 "cs-parser.jay" +#line 2192 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5344,7 +5348,7 @@ void case_275() } void case_276() -#line 2194 "cs-parser.jay" +#line 2198 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5352,7 +5356,7 @@ void case_276() } void case_277() -#line 2204 "cs-parser.jay" +#line 2208 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5368,7 +5372,7 @@ void case_277() } void case_278() -#line 2223 "cs-parser.jay" +#line 2227 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5379,7 +5383,7 @@ void case_278() } void case_279() -#line 2232 "cs-parser.jay" +#line 2236 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5392,7 +5396,7 @@ void case_279() } void case_280() -#line 2243 "cs-parser.jay" +#line 2247 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5422,7 +5426,7 @@ void case_280() } void case_286() -#line 2288 "cs-parser.jay" +#line 2292 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5430,7 +5434,7 @@ void case_286() } void case_288() -#line 2298 "cs-parser.jay" +#line 2302 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5438,14 +5442,14 @@ void case_288() } void case_289() -#line 2304 "cs-parser.jay" +#line 2308 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_290() -#line 2312 "cs-parser.jay" +#line 2316 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5456,7 +5460,7 @@ void case_290() } void case_291() -#line 2321 "cs-parser.jay" +#line 2325 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5478,7 +5482,7 @@ void case_291() } void case_292() -#line 2346 "cs-parser.jay" +#line 2350 "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); @@ -5492,7 +5496,7 @@ void case_292() } void case_293() -#line 2360 "cs-parser.jay" +#line 2364 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5504,7 +5508,7 @@ void case_293() } void case_294() -#line 2373 "cs-parser.jay" +#line 2377 "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); @@ -5514,7 +5518,7 @@ void case_294() } void case_295() -#line 2381 "cs-parser.jay" +#line 2385 "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"); @@ -5523,7 +5527,7 @@ void case_295() } void case_296() -#line 2388 "cs-parser.jay" +#line 2392 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5536,14 +5540,14 @@ void case_296() } void case_299() -#line 2407 "cs-parser.jay" +#line 2411 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_304() -#line 2431 "cs-parser.jay" +#line 2435 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5551,7 +5555,7 @@ void case_304() } void case_306() -#line 2441 "cs-parser.jay" +#line 2445 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5560,7 +5564,7 @@ void case_306() } void case_307() -#line 2450 "cs-parser.jay" +#line 2454 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5574,28 +5578,28 @@ void case_307() } void case_311() -#line 2471 "cs-parser.jay" +#line 2475 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_312() -#line 2476 "cs-parser.jay" +#line 2480 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_313() -#line 2481 "cs-parser.jay" +#line 2485 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_314() -#line 2489 "cs-parser.jay" +#line 2493 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5609,7 +5613,7 @@ void case_314() } void case_315() -#line 2501 "cs-parser.jay" +#line 2505 "cs-parser.jay" { lexer.EventParsing = true; @@ -5624,7 +5628,7 @@ void case_315() } void case_316() -#line 2517 "cs-parser.jay" +#line 2521 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5638,7 +5642,7 @@ void case_316() } void case_317() -#line 2529 "cs-parser.jay" +#line 2533 "cs-parser.jay" { lexer.EventParsing = true; @@ -5653,21 +5657,21 @@ void case_317() } void case_318() -#line 2545 "cs-parser.jay" +#line 2549 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_320() -#line 2557 "cs-parser.jay" +#line 2561 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2562 "cs-parser.jay" +#line 2566 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5681,7 +5685,7 @@ void case_321() } void case_322() -#line 2574 "cs-parser.jay" +#line 2578 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5689,7 +5693,7 @@ void case_322() } void case_323() -#line 2580 "cs-parser.jay" +#line 2584 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5715,7 +5719,7 @@ void case_323() } void case_325() -#line 2608 "cs-parser.jay" +#line 2612 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5728,21 +5732,21 @@ void case_325() } void case_326() -#line 2619 "cs-parser.jay" +#line 2623 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2637 "cs-parser.jay" +#line 2641 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2645 "cs-parser.jay" +#line 2649 "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]); @@ -5757,7 +5761,7 @@ void case_332() } void case_333() -#line 2658 "cs-parser.jay" +#line 2662 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5767,7 +5771,7 @@ void case_333() } void case_334() -#line 2666 "cs-parser.jay" +#line 2670 "cs-parser.jay" { --lexer.parsing_block; @@ -5783,7 +5787,7 @@ void case_334() } void case_336() -#line 2691 "cs-parser.jay" +#line 2695 "cs-parser.jay" { valid_param_mod = 0; @@ -5803,7 +5807,7 @@ void case_336() } void case_338() -#line 2713 "cs-parser.jay" +#line 2717 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5819,7 +5823,7 @@ void case_338() } void case_340() -#line 2731 "cs-parser.jay" +#line 2735 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5828,7 +5832,7 @@ void case_340() } void case_342() -#line 2742 "cs-parser.jay" +#line 2746 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5837,7 +5841,7 @@ void case_342() } void case_344() -#line 2753 "cs-parser.jay" +#line 2757 "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); @@ -5845,14 +5849,14 @@ void case_344() } void case_345() -#line 2762 "cs-parser.jay" +#line 2766 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2774 "cs-parser.jay" +#line 2778 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5865,14 +5869,14 @@ void case_347() } void case_348() -#line 2785 "cs-parser.jay" +#line 2789 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2793 "cs-parser.jay" +#line 2797 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5881,7 +5885,7 @@ void case_349() } void case_350() -#line 2800 "cs-parser.jay" +#line 2804 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5890,7 +5894,7 @@ void case_350() } void case_352() -#line 2817 "cs-parser.jay" +#line 2821 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5898,7 +5902,7 @@ void case_352() } void case_353() -#line 2826 "cs-parser.jay" +#line 2830 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5907,7 +5911,7 @@ void case_353() } void case_355() -#line 2837 "cs-parser.jay" +#line 2841 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5915,21 +5919,21 @@ void case_355() } void case_356() -#line 2846 "cs-parser.jay" +#line 2850 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2851 "cs-parser.jay" +#line 2855 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2859 "cs-parser.jay" +#line 2863 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5937,7 +5941,7 @@ void case_358() } void case_359() -#line 2865 "cs-parser.jay" +#line 2869 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5947,7 +5951,7 @@ void case_359() } void case_360() -#line 2873 "cs-parser.jay" +#line 2877 "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); @@ -5955,7 +5959,7 @@ void case_360() } void case_362() -#line 2883 "cs-parser.jay" +#line 2887 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5965,7 +5969,7 @@ void case_362() } void case_363() -#line 2894 "cs-parser.jay" +#line 2898 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5973,7 +5977,7 @@ void case_363() } void case_364() -#line 2900 "cs-parser.jay" +#line 2904 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5982,14 +5986,14 @@ void case_364() } void case_365() -#line 2910 "cs-parser.jay" +#line 2914 "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_366() -#line 2915 "cs-parser.jay" +#line 2919 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6000,28 +6004,28 @@ void case_366() } void case_371() -#line 2949 "cs-parser.jay" +#line 2953 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2958 "cs-parser.jay" +#line 2962 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2967 "cs-parser.jay" +#line 2971 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2983 "cs-parser.jay" +#line 2987 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6036,14 +6040,14 @@ void case_378() } void case_380() -#line 3000 "cs-parser.jay" +#line 3004 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 3016 "cs-parser.jay" +#line 3020 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6051,7 +6055,7 @@ void case_383() } void case_384() -#line 3022 "cs-parser.jay" +#line 3026 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6060,7 +6064,7 @@ void case_384() } void case_385() -#line 3032 "cs-parser.jay" +#line 3036 "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 ()); @@ -6069,35 +6073,35 @@ void case_385() } void case_386() -#line 3039 "cs-parser.jay" +#line 3043 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3101 "cs-parser.jay" +#line 3105 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3105 "cs-parser.jay" +#line 3109 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3146 "cs-parser.jay" +#line 3150 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3158 "cs-parser.jay" +#line 3162 "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); @@ -6105,7 +6109,7 @@ void case_437() } void case_438() -#line 3164 "cs-parser.jay" +#line 3168 "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); @@ -6113,7 +6117,7 @@ void case_438() } void case_439() -#line 3170 "cs-parser.jay" +#line 3174 "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); @@ -6121,7 +6125,7 @@ void case_439() } void case_440() -#line 3176 "cs-parser.jay" +#line 3180 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6131,28 +6135,28 @@ void case_440() } void case_442() -#line 3186 "cs-parser.jay" +#line 3190 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3194 "cs-parser.jay" +#line 3198 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3202 "cs-parser.jay" +#line 3206 "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_448() -#line 3215 "cs-parser.jay" +#line 3219 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6164,14 +6168,14 @@ void case_448() } void case_449() -#line 3225 "cs-parser.jay" +#line 3229 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3241 "cs-parser.jay" +#line 3245 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6179,7 +6183,7 @@ void case_452() } void case_453() -#line 3247 "cs-parser.jay" +#line 3251 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6188,14 +6192,14 @@ void case_453() } void case_454() -#line 3253 "cs-parser.jay" +#line 3257 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3261 "cs-parser.jay" +#line 3265 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6203,7 +6207,7 @@ void case_455() } void case_457() -#line 3270 "cs-parser.jay" +#line 3274 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6213,7 +6217,7 @@ void case_457() } void case_458() -#line 3278 "cs-parser.jay" +#line 3282 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6222,14 +6226,14 @@ void case_458() } void case_459() -#line 3285 "cs-parser.jay" +#line 3289 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3303 "cs-parser.jay" +#line 3307 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6237,7 +6241,7 @@ void case_464() } void case_465() -#line 3309 "cs-parser.jay" +#line 3313 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6249,7 +6253,7 @@ void case_465() } void case_466() -#line 3319 "cs-parser.jay" +#line 3323 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6266,56 +6270,56 @@ void case_466() } void case_467() -#line 3334 "cs-parser.jay" +#line 3338 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3339 "cs-parser.jay" +#line 3343 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3360 "cs-parser.jay" +#line 3364 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3365 "cs-parser.jay" +#line 3369 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3370 "cs-parser.jay" +#line 3374 "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_476() -#line 3375 "cs-parser.jay" +#line 3379 "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_478() -#line 3387 "cs-parser.jay" +#line 3391 "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_479() -#line 3395 "cs-parser.jay" +#line 3399 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6323,7 +6327,7 @@ void case_479() } void case_480() -#line 3401 "cs-parser.jay" +#line 3405 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6332,14 +6336,14 @@ void case_480() } void case_481() -#line 3407 "cs-parser.jay" +#line 3411 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3415 "cs-parser.jay" +#line 3419 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6347,7 +6351,7 @@ void case_482() } void case_483() -#line 3421 "cs-parser.jay" +#line 3425 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6359,21 +6363,21 @@ void case_483() } void case_487() -#line 3449 "cs-parser.jay" +#line 3453 "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_488() -#line 3454 "cs-parser.jay" +#line 3458 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3476 "cs-parser.jay" +#line 3480 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6388,7 +6392,7 @@ void case_491() } void case_492() -#line 3489 "cs-parser.jay" +#line 3493 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6397,7 +6401,7 @@ void case_492() } void case_493() -#line 3501 "cs-parser.jay" +#line 3505 "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])) { @@ -6407,7 +6411,7 @@ void case_493() } void case_494() -#line 3509 "cs-parser.jay" +#line 3513 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6416,7 +6420,7 @@ void case_494() } void case_495() -#line 3516 "cs-parser.jay" +#line 3520 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6425,28 +6429,28 @@ void case_495() } void case_496() -#line 3523 "cs-parser.jay" +#line 3527 "cs-parser.jay" { 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_497() -#line 3528 "cs-parser.jay" +#line 3532 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3539 "cs-parser.jay" +#line 3543 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3547 "cs-parser.jay" +#line 3551 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6458,7 +6462,7 @@ void case_500() } void case_505() -#line 3570 "cs-parser.jay" +#line 3574 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6466,7 +6470,7 @@ void case_505() } void case_506() -#line 3576 "cs-parser.jay" +#line 3580 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6476,7 +6480,7 @@ void case_506() } void case_507() -#line 3587 "cs-parser.jay" +#line 3591 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6484,7 +6488,7 @@ void case_507() } void case_508() -#line 3593 "cs-parser.jay" +#line 3597 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6492,14 +6496,14 @@ void case_508() } void case_509() -#line 3599 "cs-parser.jay" +#line 3603 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3604 "cs-parser.jay" +#line 3608 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6507,28 +6511,28 @@ void case_510() } void case_514() -#line 3619 "cs-parser.jay" +#line 3623 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3627 "cs-parser.jay" +#line 3631 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3632 "cs-parser.jay" +#line 3636 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3662 "cs-parser.jay" +#line 3666 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6537,7 +6541,7 @@ void case_521() } void case_522() -#line 3669 "cs-parser.jay" +#line 3673 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6550,7 +6554,7 @@ void case_522() } void case_523() -#line 3683 "cs-parser.jay" +#line 3687 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6558,7 +6562,7 @@ void case_523() } void case_524() -#line 3689 "cs-parser.jay" +#line 3693 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6567,7 +6571,7 @@ void case_524() } void case_526() -#line 3703 "cs-parser.jay" +#line 3707 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6575,14 +6579,14 @@ void case_526() } void case_529() -#line 3714 "cs-parser.jay" +#line 3718 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3722 "cs-parser.jay" +#line 3726 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6590,7 +6594,7 @@ void case_530() } void case_531() -#line 3728 "cs-parser.jay" +#line 3732 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6600,7 +6604,7 @@ void case_531() } void case_532() -#line 3736 "cs-parser.jay" +#line 3740 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6608,7 +6612,7 @@ void case_532() } void case_533() -#line 3742 "cs-parser.jay" +#line 3746 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6616,7 +6620,7 @@ void case_533() } void case_534() -#line 3748 "cs-parser.jay" +#line 3752 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6627,7 +6631,7 @@ void case_534() } void case_535() -#line 3760 "cs-parser.jay" +#line 3764 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6636,7 +6640,7 @@ void case_535() } void case_536() -#line 3770 "cs-parser.jay" +#line 3774 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6646,35 +6650,35 @@ void case_536() } void case_537() -#line 3781 "cs-parser.jay" +#line 3785 "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_538() -#line 3789 "cs-parser.jay" +#line 3793 "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_539() -#line 3797 "cs-parser.jay" +#line 3801 "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_540() -#line 3805 "cs-parser.jay" +#line 3809 "cs-parser.jay" { 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_542() -#line 3817 "cs-parser.jay" +#line 3821 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6685,7 +6689,7 @@ void case_542() } void case_548() -#line 3849 "cs-parser.jay" +#line 3853 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6694,7 +6698,7 @@ void case_548() } void case_549() -#line 3859 "cs-parser.jay" +#line 3863 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6704,147 +6708,147 @@ void case_549() } void case_555() -#line 3884 "cs-parser.jay" +#line 3888 "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_556() -#line 3892 "cs-parser.jay" +#line 3896 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3933 "cs-parser.jay" +#line 3937 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3938 "cs-parser.jay" +#line 3942 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3943 "cs-parser.jay" +#line 3947 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3952 "cs-parser.jay" +#line 3956 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3961 "cs-parser.jay" +#line 3965 "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_575() -#line 3978 "cs-parser.jay" +#line 3982 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3983 "cs-parser.jay" +#line 3987 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3992 "cs-parser.jay" +#line 3996 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 3997 "cs-parser.jay" +#line 4001 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4002 "cs-parser.jay" +#line 4006 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4007 "cs-parser.jay" +#line 4011 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 4016 "cs-parser.jay" +#line 4020 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 4021 "cs-parser.jay" +#line 4025 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4030 "cs-parser.jay" +#line 4034 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4039 "cs-parser.jay" +#line 4043 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4048 "cs-parser.jay" +#line 4052 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4057 "cs-parser.jay" +#line 4061 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4066 "cs-parser.jay" +#line 4070 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4075 "cs-parser.jay" +#line 4079 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6853,84 +6857,84 @@ void case_596() } void case_598() -#line 4086 "cs-parser.jay" +#line 4090 "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_600() -#line 4098 "cs-parser.jay" +#line 4102 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4103 "cs-parser.jay" +#line 4107 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4108 "cs-parser.jay" +#line 4112 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4113 "cs-parser.jay" +#line 4117 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4118 "cs-parser.jay" +#line 4122 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4123 "cs-parser.jay" +#line 4127 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4128 "cs-parser.jay" +#line 4132 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4133 "cs-parser.jay" +#line 4137 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4138 "cs-parser.jay" +#line 4142 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4143 "cs-parser.jay" +#line 4147 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4151 "cs-parser.jay" +#line 4155 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6939,7 +6943,7 @@ void case_610() } void case_611() -#line 4158 "cs-parser.jay" +#line 4162 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6954,7 +6958,7 @@ void case_611() } void case_612() -#line 4174 "cs-parser.jay" +#line 4178 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6962,7 +6966,7 @@ void case_612() } void case_613() -#line 4180 "cs-parser.jay" +#line 4184 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6970,21 +6974,21 @@ void case_613() } void case_614() -#line 4186 "cs-parser.jay" +#line 4190 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4194 "cs-parser.jay" +#line 4198 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4210 "cs-parser.jay" +#line 4214 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6993,14 +6997,14 @@ void case_620() } void case_622() -#line 4221 "cs-parser.jay" +#line 4225 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4229 "cs-parser.jay" +#line 4233 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7008,14 +7012,14 @@ void case_623() } void case_624() -#line 4235 "cs-parser.jay" +#line 4239 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4240 "cs-parser.jay" +#line 4244 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7023,63 +7027,63 @@ void case_625() } void case_626() -#line 4246 "cs-parser.jay" +#line 4250 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4255 "cs-parser.jay" +#line 4259 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4260 "cs-parser.jay" +#line 4264 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4269 "cs-parser.jay" +#line 4273 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4274 "cs-parser.jay" +#line 4278 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4297 "cs-parser.jay" +#line 4301 "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_640() -#line 4302 "cs-parser.jay" +#line 4306 "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_641() -#line 4307 "cs-parser.jay" +#line 4311 "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_645() -#line 4336 "cs-parser.jay" +#line 4340 "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]); @@ -7092,7 +7096,7 @@ void case_645() } void case_646() -#line 4348 "cs-parser.jay" +#line 4352 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7105,7 +7109,7 @@ void case_646() } void case_647() -#line 4359 "cs-parser.jay" +#line 4363 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7113,7 +7117,7 @@ void case_647() } void case_648() -#line 4365 "cs-parser.jay" +#line 4369 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); @@ -7124,14 +7128,14 @@ void case_648() } void case_651() -#line 4384 "cs-parser.jay" +#line 4388 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4394 "cs-parser.jay" +#line 4398 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7149,7 +7153,7 @@ void case_654() } void case_655() -#line 4413 "cs-parser.jay" +#line 4417 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7159,91 +7163,91 @@ void case_655() } void case_656() -#line 4421 "cs-parser.jay" +#line 4425 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4426 "cs-parser.jay" +#line 4430 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4431 "cs-parser.jay" +#line 4435 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4436 "cs-parser.jay" +#line 4440 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4441 "cs-parser.jay" +#line 4445 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4446 "cs-parser.jay" +#line 4450 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4451 "cs-parser.jay" +#line 4455 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4456 "cs-parser.jay" +#line 4460 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4461 "cs-parser.jay" +#line 4465 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4466 "cs-parser.jay" +#line 4470 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4471 "cs-parser.jay" +#line 4475 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4476 "cs-parser.jay" +#line 4480 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4481 "cs-parser.jay" +#line 4485 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7252,28 +7256,28 @@ void case_668() } void case_669() -#line 4488 "cs-parser.jay" +#line 4492 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_671() -#line 4497 "cs-parser.jay" +#line 4501 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_674() -#line 4510 "cs-parser.jay" +#line 4514 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4518 "cs-parser.jay" +#line 4522 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7281,7 +7285,7 @@ void case_675() } void case_676() -#line 4524 "cs-parser.jay" +#line 4528 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7299,14 +7303,14 @@ void case_676() } void case_677() -#line 4543 "cs-parser.jay" +#line 4547 "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_678() -#line 4551 "cs-parser.jay" +#line 4555 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7314,7 +7318,7 @@ void case_678() } void case_679() -#line 4557 "cs-parser.jay" +#line 4561 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7339,7 +7343,7 @@ void case_679() } void case_680() -#line 4583 "cs-parser.jay" +#line 4587 "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 ()); @@ -7348,14 +7352,14 @@ void case_680() } void case_681() -#line 4590 "cs-parser.jay" +#line 4594 "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_685() -#line 4610 "cs-parser.jay" +#line 4614 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7364,77 +7368,77 @@ void case_685() } void case_688() -#line 4644 "cs-parser.jay" +#line 4648 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4656 "cs-parser.jay" +#line 4660 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4661 "cs-parser.jay" +#line 4665 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4670 "cs-parser.jay" +#line 4674 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4675 "cs-parser.jay" +#line 4679 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4702 "cs-parser.jay" +#line 4706 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4766 "cs-parser.jay" +#line 4770 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4771 "cs-parser.jay" +#line 4775 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4776 "cs-parser.jay" +#line 4780 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4784 "cs-parser.jay" +#line 4788 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4792 "cs-parser.jay" +#line 4796 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7444,7 +7448,7 @@ void case_738() } void case_741() -#line 4805 "cs-parser.jay" +#line 4809 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7453,7 +7457,7 @@ void case_741() } void case_742() -#line 4821 "cs-parser.jay" +#line 4825 "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*/ @@ -7485,7 +7489,7 @@ void case_742() } void case_743() -#line 4851 "cs-parser.jay" +#line 4855 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7498,7 +7502,7 @@ void case_743() } void case_744() -#line 4862 "cs-parser.jay" +#line 4866 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7507,21 +7511,21 @@ void case_744() } void case_747() -#line 4877 "cs-parser.jay" +#line 4881 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4886 "cs-parser.jay" +#line 4890 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4901 "cs-parser.jay" +#line 4905 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7530,7 +7534,7 @@ void case_751() } void case_752() -#line 4908 "cs-parser.jay" +#line 4912 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7538,7 +7542,7 @@ void case_752() } void case_753() -#line 4914 "cs-parser.jay" +#line 4918 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7547,7 +7551,7 @@ void case_753() } void case_754() -#line 4921 "cs-parser.jay" +#line 4925 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7559,14 +7563,14 @@ void case_754() } void case_756() -#line 4935 "cs-parser.jay" +#line 4939 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4940 "cs-parser.jay" +#line 4944 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7577,7 +7581,7 @@ void case_757() } void case_762() -#line 4962 "cs-parser.jay" +#line 4966 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7588,7 +7592,7 @@ void case_762() } void case_763() -#line 4971 "cs-parser.jay" +#line 4975 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7599,14 +7603,14 @@ void case_763() } void case_765() -#line 4987 "cs-parser.jay" +#line 4991 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 5005 "cs-parser.jay" +#line 5009 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7617,28 +7621,28 @@ void case_770() } void case_772() -#line 5018 "cs-parser.jay" +#line 5022 "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_773() -#line 5023 "cs-parser.jay" +#line 5027 "cs-parser.jay" { 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_774() -#line 5031 "cs-parser.jay" +#line 5035 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5049 "cs-parser.jay" +#line 5053 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7650,7 +7654,7 @@ void case_778() } void case_779() -#line 5062 "cs-parser.jay" +#line 5066 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7660,14 +7664,14 @@ void case_779() } void case_780() -#line 5070 "cs-parser.jay" +#line 5074 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5084 "cs-parser.jay" +#line 5088 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7677,7 +7681,7 @@ void case_783() } void case_784() -#line 5093 "cs-parser.jay" +#line 5097 "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])); @@ -7689,7 +7693,7 @@ void case_784() } void case_786() -#line 5110 "cs-parser.jay" +#line 5114 "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])); @@ -7697,14 +7701,14 @@ void case_786() } void case_787() -#line 5119 "cs-parser.jay" +#line 5123 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5128 "cs-parser.jay" +#line 5132 "cs-parser.jay" { var sections = new List (4); @@ -7713,7 +7717,7 @@ void case_789() } void case_790() -#line 5135 "cs-parser.jay" +#line 5139 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7722,14 +7726,14 @@ void case_790() } void case_791() -#line 5142 "cs-parser.jay" +#line 5146 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5161 "cs-parser.jay" +#line 5165 "cs-parser.jay" { var labels = new List (2); @@ -7738,7 +7742,7 @@ void case_794() } void case_795() -#line 5168 "cs-parser.jay" +#line 5172 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7747,14 +7751,14 @@ void case_795() } void case_796() -#line 5178 "cs-parser.jay" +#line 5182 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5197 "cs-parser.jay" +#line 5201 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7764,21 +7768,21 @@ void case_802() } void case_803() -#line 5209 "cs-parser.jay" +#line 5213 "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_804() -#line 5217 "cs-parser.jay" +#line 5221 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5233 "cs-parser.jay" +#line 5237 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7792,14 +7796,14 @@ void case_806() } void case_807() -#line 5245 "cs-parser.jay" +#line 5249 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5258 "cs-parser.jay" +#line 5262 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7808,14 +7812,14 @@ void case_810() } void case_811() -#line 5265 "cs-parser.jay" +#line 5269 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5289 "cs-parser.jay" +#line 5293 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7830,14 +7834,14 @@ void case_819() } void case_820() -#line 5305 "cs-parser.jay" +#line 5309 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5310 "cs-parser.jay" +#line 5314 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7848,7 +7852,7 @@ void case_821() } void case_822() -#line 5319 "cs-parser.jay" +#line 5323 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7861,21 +7865,21 @@ void case_822() } void case_829() -#line 5342 "cs-parser.jay" +#line 5346 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5350 "cs-parser.jay" +#line 5354 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5358 "cs-parser.jay" +#line 5362 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7883,35 +7887,35 @@ void case_831() } void case_832() -#line 5364 "cs-parser.jay" +#line 5368 "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_833() -#line 5369 "cs-parser.jay" +#line 5373 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5377 "cs-parser.jay" +#line 5381 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5385 "cs-parser.jay" +#line 5389 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5393 "cs-parser.jay" +#line 5397 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7929,7 +7933,7 @@ void case_836() } void case_837() -#line 5409 "cs-parser.jay" +#line 5413 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7945,28 +7949,28 @@ void case_837() } void case_841() -#line 5435 "cs-parser.jay" +#line 5439 "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_842() -#line 5440 "cs-parser.jay" +#line 5444 "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_843() -#line 5445 "cs-parser.jay" +#line 5449 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5453 "cs-parser.jay" +#line 5457 "cs-parser.jay" { var l = new List (2); @@ -7975,7 +7979,7 @@ void case_844() } void case_845() -#line 5460 "cs-parser.jay" +#line 5464 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7993,7 +7997,7 @@ void case_845() } void case_849() -#line 5488 "cs-parser.jay" +#line 5492 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8010,7 +8014,7 @@ void case_849() } void case_851() -#line 5507 "cs-parser.jay" +#line 5511 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8023,14 +8027,14 @@ void case_851() } void case_854() -#line 5535 "cs-parser.jay" +#line 5539 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5545 "cs-parser.jay" +#line 5549 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8040,7 +8044,7 @@ void case_856() } void case_857() -#line 5556 "cs-parser.jay" +#line 5560 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8052,14 +8056,14 @@ void case_857() } void case_858() -#line 5566 "cs-parser.jay" +#line 5570 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5571 "cs-parser.jay" +#line 5575 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8071,7 +8075,7 @@ void case_859() } void case_860() -#line 5584 "cs-parser.jay" +#line 5588 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8083,14 +8087,14 @@ void case_860() } void case_861() -#line 5594 "cs-parser.jay" +#line 5598 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5599 "cs-parser.jay" +#line 5603 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8102,7 +8106,7 @@ void case_862() } void case_863() -#line 5609 "cs-parser.jay" +#line 5613 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8113,14 +8117,14 @@ void case_863() } void case_865() -#line 5625 "cs-parser.jay" +#line 5629 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5636 "cs-parser.jay" +#line 5640 "cs-parser.jay" { lexer.query_parsing = false; @@ -8134,7 +8138,7 @@ void case_866() } void case_867() -#line 5648 "cs-parser.jay" +#line 5652 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8146,7 +8150,7 @@ void case_867() } void case_868() -#line 5659 "cs-parser.jay" +#line 5663 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8156,7 +8160,7 @@ void case_868() } void case_869() -#line 5666 "cs-parser.jay" +#line 5670 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8164,7 +8168,7 @@ void case_869() } void case_870() -#line 5675 "cs-parser.jay" +#line 5679 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8174,7 +8178,7 @@ void case_870() } void case_871() -#line 5683 "cs-parser.jay" +#line 5687 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8188,7 +8192,7 @@ void case_871() } void case_872() -#line 5698 "cs-parser.jay" +#line 5702 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8198,7 +8202,7 @@ void case_872() } void case_873() -#line 5706 "cs-parser.jay" +#line 5710 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8212,7 +8216,7 @@ void case_873() } void case_875() -#line 5725 "cs-parser.jay" +#line 5729 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8225,7 +8229,7 @@ void case_875() } void case_877() -#line 5740 "cs-parser.jay" +#line 5744 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8241,7 +8245,7 @@ void case_877() } void case_878() -#line 5757 "cs-parser.jay" +#line 5761 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8258,14 +8262,14 @@ void case_878() } void case_880() -#line 5773 "cs-parser.jay" +#line 5777 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5785 "cs-parser.jay" +#line 5789 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8274,7 +8278,7 @@ void case_882() } void case_883() -#line 5792 "cs-parser.jay" +#line 5796 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8284,7 +8288,7 @@ void case_883() } void case_884() -#line 5800 "cs-parser.jay" +#line 5804 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8293,7 +8297,7 @@ void case_884() } void case_885() -#line 5807 "cs-parser.jay" +#line 5811 "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])); @@ -8303,14 +8307,14 @@ void case_885() } void case_889() -#line 5824 "cs-parser.jay" +#line 5828 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5844 "cs-parser.jay" +#line 5848 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8324,7 +8328,7 @@ void case_896() } void case_898() -#line 5863 "cs-parser.jay" +#line 5867 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8333,7 +8337,7 @@ void case_898() } void case_899() -#line 5873 "cs-parser.jay" +#line 5877 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8343,7 +8347,7 @@ void case_899() } void case_900() -#line 5881 "cs-parser.jay" +#line 5885 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8353,7 +8357,7 @@ void case_900() } void case_901() -#line 5889 "cs-parser.jay" +#line 5893 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8363,7 +8367,7 @@ void case_901() } void case_902() -#line 5897 "cs-parser.jay" +#line 5901 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8403,7 +8407,7 @@ void case_902() } void case_903() -#line 5935 "cs-parser.jay" +#line 5939 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8413,7 +8417,7 @@ void case_903() } void case_904() -#line 5943 "cs-parser.jay" +#line 5947 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8423,7 +8427,7 @@ void case_904() } void case_905() -#line 5951 "cs-parser.jay" +#line 5955 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8433,7 +8437,7 @@ void case_905() } void case_906() -#line 5959 "cs-parser.jay" +#line 5963 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8475,7 +8479,7 @@ void case_906() } void case_910() -#line 6014 "cs-parser.jay" +#line 6018 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8484,7 +8488,7 @@ void case_910() } void case_912() -#line 6025 "cs-parser.jay" +#line 6029 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8493,14 +8497,14 @@ void case_912() } void case_913() -#line 6032 "cs-parser.jay" +#line 6036 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6041 "cs-parser.jay" +#line 6045 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8509,42 +8513,42 @@ void case_915() } void case_916() -#line 6048 "cs-parser.jay" +#line 6052 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6060 "cs-parser.jay" +#line 6064 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6065 "cs-parser.jay" +#line 6069 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6077 "cs-parser.jay" +#line 6081 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6082 "cs-parser.jay" +#line 6086 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6092 "cs-parser.jay" +#line 6096 "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*/ @@ -8562,7 +8566,7 @@ void case_924() } void case_925() -#line 6108 "cs-parser.jay" +#line 6112 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8573,7 +8577,7 @@ void case_925() } void case_928() -#line 6135 "cs-parser.jay" +#line 6139 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8605,7 +8609,7 @@ void case_928() } void case_929() -#line 6165 "cs-parser.jay" +#line 6169 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8617,7 +8621,7 @@ void case_929() } void case_939() -#line 6208 "cs-parser.jay" +#line 6212 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8625,7 +8629,7 @@ void case_939() } void case_940() -#line 6214 "cs-parser.jay" +#line 6218 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8634,14 +8638,14 @@ void case_940() } void case_943() -#line 6229 "cs-parser.jay" +#line 6233 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6234 "cs-parser.jay" +#line 6238 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8651,7 +8655,7 @@ void case_944() } void case_945() -#line 6242 "cs-parser.jay" +#line 6246 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8661,7 +8665,7 @@ void case_945() } void case_946() -#line 6250 "cs-parser.jay" +#line 6254 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8670,7 +8674,7 @@ void case_946() } void case_954() -#line 6288 "cs-parser.jay" +#line 6292 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8678,7 +8682,7 @@ void case_954() } void case_955() -#line 6294 "cs-parser.jay" +#line 6298 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8686,7 +8690,7 @@ void case_955() } void case_956() -#line 6303 "cs-parser.jay" +#line 6307 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12022,7 +12026,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6312 "cs-parser.jay" +#line 6316 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index cc3e49ac52..475f0509f6 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -1266,6 +1266,7 @@ method_declaration method.Block = (ToplevelBlock) $3; if (method.Block == null) { + lbag.AppendToMember (method, savedLocation); // semicolon method.ParameterInfo.CheckParameters (method); if ((method.ModFlags & Modifiers.ASYNC) != 0) { @@ -1421,7 +1422,7 @@ method_header method_body : block - | SEMICOLON { $$ = null; } + | SEMICOLON { savedLocation = GetLocation ($1); $$ = null; } ; opt_formal_parameter_list @@ -2049,6 +2050,9 @@ operator_declaration current_container.AddOperator (op); lbag.AddMember (op, GetModifierLocations (), lbag.GetLocations (decl)); + if ($5 == null) { // Semicolon + lbag.AppendTo (op, savedLocation); + } } current_local_parameters = null; @@ -2057,7 +2061,7 @@ operator_declaration operator_body : block - | SEMICOLON { $$ = null; } + | SEMICOLON { savedLocation = GetLocation ($1); $$ = null; } ; operator_type From b1fa379e6b45e10fb7c94646b5f76f63f1290420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 17:12:32 +0200 Subject: [PATCH 15/92] Fixed location bug. --- .../Parser/CSharpParser.cs | 9 +- .../Parser/mcs/cs-parser.cs | 1138 ++++++++--------- .../Parser/mcs/cs-parser.jay | 13 +- 3 files changed, 577 insertions(+), 583 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index debb826618..582a22558c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -91,10 +91,10 @@ namespace ICSharpCode.NRefactory.CSharp { AstType result; if (memberName.Left != null) { - result = new MemberType () { MemberName = memberName.Name }; + result = new MemberType () { MemberNameToken = Identifier.Create (memberName.Name, Convert (memberName.Location)) }; result.AddChild (ConvertToType (memberName.Left), MemberType.TargetRole); } else { - result = new SimpleType () { Identifier = memberName.Name }; + result = new SimpleType () { IdentifierToken = Identifier.Create (memberName.Name, Convert (memberName.Location)) }; } if (memberName.TypeArguments != null && !memberName.TypeArguments.IsEmpty) { foreach (var arg in memberName.TypeArguments.Args) { @@ -210,7 +210,6 @@ namespace ICSharpCode.NRefactory.CSharp result.AddChild ((Expression)arg.Expr.Accept (this), Attribute.Roles.Argument); } } - Console.WriteLine ("---"); if (attr.NamedArguments != null) { foreach (NamedArgument na in attr.NamedArguments) { var newArg = new NamedExpression (); @@ -2207,7 +2206,6 @@ namespace ICSharpCode.NRefactory.CSharp } var p = (Parameter)parameters.FixedParameters [i]; var location = LocationsBag.GetLocations (p); - ParameterDeclaration parameterDeclarationExpression = new ParameterDeclaration (); AddAttributeSection (parameterDeclarationExpression, p); switch (p.ModFlags) { @@ -2229,8 +2227,9 @@ namespace ICSharpCode.NRefactory.CSharp default: if (p.HasExtensionMethodModifier) { parameterDeclarationExpression.ParameterModifier = ParameterModifier.This; - if (location != null) + if (location != null) { parameterDeclarationExpression.AddChild (new CSharpTokenNode (Convert (location [0]), "this".Length), ParameterDeclaration.Roles.Keyword); + } } break; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index c4ee494b23..fef9d4c0f6 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1847,7 +1847,10 @@ case 187: { yyVal = Parameter.Modifier.NONE; } break; case 189: - case_189(); +#line 1629 "cs-parser.jay" + { + yyVal = yyVals[0+yyTop]; + } break; case 190: case_190(); @@ -1877,7 +1880,7 @@ case 198: case_198(); break; case 199: -#line 1719 "cs-parser.jay" +#line 1718 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1898,7 +1901,7 @@ case 204: case_204(); break; case 205: -#line 1773 "cs-parser.jay" +#line 1772 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1907,7 +1910,7 @@ case 206: case_206(); break; case 207: -#line 1802 "cs-parser.jay" +#line 1801 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1937,7 +1940,7 @@ case 220: case_220(); break; case 221: -#line 1951 "cs-parser.jay" +#line 1950 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1955,43 +1958,43 @@ case 225: case_225(); break; case 226: -#line 1988 "cs-parser.jay" +#line 1987 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 231: -#line 2005 "cs-parser.jay" +#line 2004 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 232: -#line 2009 "cs-parser.jay" +#line 2008 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 237: -#line 2017 "cs-parser.jay" +#line 2016 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 238: -#line 2021 "cs-parser.jay" +#line 2020 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 239: -#line 2025 "cs-parser.jay" +#line 2024 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 240: -#line 2031 "cs-parser.jay" +#line 2030 "cs-parser.jay" { } break; @@ -1999,14 +2002,14 @@ case 241: case_241(); break; case 243: -#line 2064 "cs-parser.jay" +#line 2063 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 245: case_245(); break; case 246: -#line 2080 "cs-parser.jay" +#line 2079 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2015,95 +2018,95 @@ case 247: case_247(); break; case 249: -#line 2126 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; } break; case 250: -#line 2127 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; } break; case 251: -#line 2128 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.Increment; } break; case 252: -#line 2129 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; } break; case 253: -#line 2130 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.True; } break; case 254: -#line 2131 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.False; } break; case 255: -#line 2133 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.Addition; } break; case 256: -#line 2134 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; } break; case 257: -#line 2136 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; } break; case 258: -#line 2137 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Division; } break; case 259: -#line 2138 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; } break; case 260: -#line 2139 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; } break; case 261: -#line 2140 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; } break; case 262: -#line 2141 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; } break; case 263: -#line 2142 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; } break; case 264: -#line 2143 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; } break; case 265: -#line 2144 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.Equality; } break; case 266: -#line 2145 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; } break; case 267: -#line 2146 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; } break; case 268: -#line 2147 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; } break; case 269: -#line 2148 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; } break; case 270: -#line 2149 "cs-parser.jay" +#line 2148 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; } break; case 271: -#line 2156 "cs-parser.jay" +#line 2155 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2112,7 +2115,7 @@ case 272: case_272(); break; case 273: -#line 2175 "cs-parser.jay" +#line 2174 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2139,11 +2142,11 @@ case 280: case_280(); break; case 282: -#line 2278 "cs-parser.jay" +#line 2277 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 285: -#line 2290 "cs-parser.jay" +#line 2289 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2152,7 +2155,7 @@ case 286: case_286(); break; case 287: -#line 2300 "cs-parser.jay" +#line 2299 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2185,7 +2188,7 @@ case 296: case_296(); break; case 298: -#line 2409 "cs-parser.jay" +#line 2408 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2194,13 +2197,13 @@ case 299: case_299(); break; case 302: -#line 2426 "cs-parser.jay" +#line 2425 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 303: -#line 2430 "cs-parser.jay" +#line 2429 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2209,7 +2212,7 @@ case 304: case_304(); break; case 305: -#line 2443 "cs-parser.jay" +#line 2442 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2221,7 +2224,7 @@ case 307: case_307(); break; case 308: -#line 2468 "cs-parser.jay" +#line 2467 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2269,7 +2272,7 @@ case 326: case_326(); break; case 329: -#line 2635 "cs-parser.jay" +#line 2634 "cs-parser.jay" { lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2287,7 +2290,7 @@ case 334: case_334(); break; case 335: -#line 2693 "cs-parser.jay" +#line 2692 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2296,7 +2299,7 @@ case 336: case_336(); break; case 337: -#line 2715 "cs-parser.jay" +#line 2714 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2329,7 +2332,7 @@ case 350: case_350(); break; case 351: -#line 2819 "cs-parser.jay" +#line 2818 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2374,13 +2377,13 @@ case 366: case_366(); break; case 368: -#line 2937 "cs-parser.jay" +#line 2936 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2944 "cs-parser.jay" +#line 2943 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2395,7 +2398,7 @@ case 375: case_375(); break; case 377: -#line 2982 "cs-parser.jay" +#line 2981 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2404,7 +2407,7 @@ case 378: case_378(); break; case 379: -#line 3002 "cs-parser.jay" +#line 3001 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2413,13 +2416,13 @@ case 380: case_380(); break; case 381: -#line 3011 "cs-parser.jay" +#line 3010 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 3015 "cs-parser.jay" +#line 3014 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2437,63 +2440,63 @@ case 386: case_386(); break; case 387: -#line 3054 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3055 "cs-parser.jay" +#line 3054 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3056 "cs-parser.jay" +#line 3055 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3057 "cs-parser.jay" +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3058 "cs-parser.jay" +#line 3057 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3059 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3064 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3065 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3066 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3067 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3068 "cs-parser.jay" +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3069 "cs-parser.jay" +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3070 "cs-parser.jay" +#line 3069 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3071 "cs-parser.jay" +#line 3070 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3072 "cs-parser.jay" +#line 3071 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2503,22 +2506,22 @@ case 424: case_424(); break; case 428: -#line 3119 "cs-parser.jay" +#line 3118 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3123 "cs-parser.jay" +#line 3122 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3124 "cs-parser.jay" +#line 3123 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3157 "cs-parser.jay" +#line 3156 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2536,7 +2539,7 @@ case 440: case_440(); break; case 441: -#line 3189 "cs-parser.jay" +#line 3188 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2545,7 +2548,7 @@ case 442: case_442(); break; case 443: -#line 3197 "cs-parser.jay" +#line 3196 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2557,7 +2560,7 @@ case 445: case_445(); break; case 446: -#line 3213 "cs-parser.jay" +#line 3212 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2567,11 +2570,11 @@ case 449: case_449(); break; case 450: -#line 3236 "cs-parser.jay" +#line 3235 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3240 "cs-parser.jay" +#line 3239 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2589,7 +2592,7 @@ case 455: case_455(); break; case 456: -#line 3273 "cs-parser.jay" +#line 3272 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2604,7 +2607,7 @@ case 459: case_459(); break; case 462: -#line 3301 "cs-parser.jay" +#line 3300 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2623,7 +2626,7 @@ case 468: case_468(); break; case 469: -#line 3353 "cs-parser.jay" +#line 3352 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2659,13 +2662,13 @@ case 483: case_483(); break; case 484: -#line 3440 "cs-parser.jay" +#line 3439 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3448 "cs-parser.jay" +#line 3447 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2677,13 +2680,13 @@ case 488: case_488(); break; case 489: -#line 3468 "cs-parser.jay" +#line 3467 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3475 "cs-parser.jay" +#line 3474 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2710,7 +2713,7 @@ case 497: case_497(); break; case 498: -#line 3541 "cs-parser.jay" +#line 3540 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2722,7 +2725,7 @@ case 500: case_500(); break; case 503: -#line 3568 "cs-parser.jay" +#line 3567 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2753,25 +2756,25 @@ case 516: case_516(); break; case 517: -#line 3646 "cs-parser.jay" +#line 3645 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3650 "cs-parser.jay" +#line 3649 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3657 "cs-parser.jay" +#line 3656 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3661 "cs-parser.jay" +#line 3660 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2789,7 +2792,7 @@ case 524: case_524(); break; case 525: -#line 3705 "cs-parser.jay" +#line 3704 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2834,7 +2837,7 @@ case 540: case_540(); break; case 541: -#line 3819 "cs-parser.jay" +#line 3818 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2843,25 +2846,25 @@ case 542: case_542(); break; case 543: -#line 3832 "cs-parser.jay" +#line 3831 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3836 "cs-parser.jay" +#line 3835 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3843 "cs-parser.jay" +#line 3842 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3851 "cs-parser.jay" +#line 3850 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2873,13 +2876,13 @@ case 549: case_549(); break; case 551: -#line 3877 "cs-parser.jay" +#line 3876 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3881 "cs-parser.jay" +#line 3880 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2891,37 +2894,37 @@ case 556: case_556(); break; case 558: -#line 3911 "cs-parser.jay" +#line 3910 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3915 "cs-parser.jay" +#line 3914 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3919 "cs-parser.jay" +#line 3918 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3923 "cs-parser.jay" +#line 3922 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3927 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3931 "cs-parser.jay" +#line 3930 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2939,7 +2942,7 @@ case 569: case_569(); break; case 570: -#line 3963 "cs-parser.jay" +#line 3962 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2948,13 +2951,13 @@ case 571: case_571(); break; case 572: -#line 3972 "cs-parser.jay" +#line 3971 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3976 "cs-parser.jay" +#line 3975 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3005,7 +3008,7 @@ case 598: case_598(); break; case 599: -#line 4100 "cs-parser.jay" +#line 4099 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3056,14 +3059,14 @@ case 614: case_614(); break; case 615: -#line 4197 "cs-parser.jay" +#line 4196 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4212 "cs-parser.jay" +#line 4211 "cs-parser.jay" { start_block (lexer.Location); } @@ -3087,7 +3090,7 @@ case 626: case_626(); break; case 627: -#line 4257 "cs-parser.jay" +#line 4256 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3099,7 +3102,7 @@ case 629: case_629(); break; case 630: -#line 4271 "cs-parser.jay" +#line 4270 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3111,7 +3114,7 @@ case 632: case_632(); break; case 638: -#line 4296 "cs-parser.jay" +#line 4295 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3126,13 +3129,13 @@ case 641: case_641(); break; case 643: -#line 4325 "cs-parser.jay" +#line 4324 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4338 "cs-parser.jay" +#line 4337 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3150,11 +3153,11 @@ case 648: case_648(); break; case 649: -#line 4381 "cs-parser.jay" +#line 4380 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4383 "cs-parser.jay" +#line 4382 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3212,7 +3215,7 @@ case 671: case_671(); break; case 673: -#line 4512 "cs-parser.jay" +#line 4511 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3242,19 +3245,19 @@ case 681: case_681(); break; case 682: -#line 4601 "cs-parser.jay" +#line 4600 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4605 "cs-parser.jay" +#line 4604 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4612 "cs-parser.jay" +#line 4611 "cs-parser.jay" { yyVal = Variance.None; } @@ -3263,13 +3266,13 @@ case 685: case_685(); break; case 686: -#line 4626 "cs-parser.jay" +#line 4625 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4630 "cs-parser.jay" +#line 4629 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3278,7 +3281,7 @@ case 688: case_688(); break; case 689: -#line 4655 "cs-parser.jay" +#line 4654 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3296,13 +3299,13 @@ case 693: case_693(); break; case 698: -#line 4699 "cs-parser.jay" +#line 4698 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4703 "cs-parser.jay" +#line 4702 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3311,13 +3314,13 @@ case 701: case_701(); break; case 704: -#line 4727 "cs-parser.jay" +#line 4726 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4731 "cs-parser.jay" +#line 4730 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3350,13 +3353,13 @@ case 744: case_744(); break; case 745: -#line 4875 "cs-parser.jay" +#line 4874 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4879 "cs-parser.jay" +#line 4878 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3368,7 +3371,7 @@ case 749: case_749(); break; case 750: -#line 4900 "cs-parser.jay" +#line 4899 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3398,7 +3401,7 @@ case 763: case_763(); break; case 764: -#line 4989 "cs-parser.jay" +#line 4988 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3419,15 +3422,15 @@ case 774: case_774(); break; case 775: -#line 5039 "cs-parser.jay" +#line 5038 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5043 "cs-parser.jay" +#line 5042 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5044 "cs-parser.jay" +#line 5043 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3446,7 +3449,7 @@ case 784: case_784(); break; case 785: -#line 5112 "cs-parser.jay" +#line 5111 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3467,13 +3470,13 @@ case 791: case_791(); break; case 792: -#line 5156 "cs-parser.jay" +#line 5155 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5160 "cs-parser.jay" +#line 5159 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3488,7 +3491,7 @@ case 796: case_796(); break; case 797: -#line 5189 "cs-parser.jay" +#line 5188 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3503,7 +3506,7 @@ case 804: case_804(); break; case 805: -#line 5228 "cs-parser.jay" +#line 5227 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3515,7 +3518,7 @@ case 807: case_807(); break; case 808: -#line 5256 "cs-parser.jay" +#line 5255 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3525,11 +3528,11 @@ case 811: case_811(); break; case 813: -#line 5277 "cs-parser.jay" +#line 5276 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5282 "cs-parser.jay" +#line 5281 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3572,7 +3575,7 @@ case 837: case_837(); break; case 840: -#line 5437 "cs-parser.jay" +#line 5436 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3593,7 +3596,7 @@ case 845: case_845(); break; case 848: -#line 5490 "cs-parser.jay" +#line 5489 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3602,7 +3605,7 @@ case 849: case_849(); break; case 850: -#line 5509 "cs-parser.jay" +#line 5508 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3611,13 +3614,13 @@ case 851: case_851(); break; case 852: -#line 5527 "cs-parser.jay" +#line 5526 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5534 "cs-parser.jay" +#line 5533 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3626,7 +3629,7 @@ case 854: case_854(); break; case 855: -#line 5544 "cs-parser.jay" +#line 5543 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3656,7 +3659,7 @@ case 863: case_863(); break; case 864: -#line 5627 "cs-parser.jay" +#line 5626 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3689,7 +3692,7 @@ case 873: case_873(); break; case 874: -#line 5727 "cs-parser.jay" +#line 5726 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3698,7 +3701,7 @@ case 875: case_875(); break; case 876: -#line 5742 "cs-parser.jay" +#line 5741 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3713,7 +3716,7 @@ case 880: case_880(); break; case 881: -#line 5787 "cs-parser.jay" +#line 5786 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3734,7 +3737,7 @@ case 889: case_889(); break; case 895: -#line 5846 "cs-parser.jay" +#line 5845 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3743,7 +3746,7 @@ case 896: case_896(); break; case 897: -#line 5865 "cs-parser.jay" +#line 5864 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3776,13 +3779,13 @@ case 906: case_906(); break; case 908: -#line 6009 "cs-parser.jay" +#line 6008 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 6016 "cs-parser.jay" +#line 6015 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3803,7 +3806,7 @@ case 916: case_916(); break; case 917: -#line 6062 "cs-parser.jay" +#line 6061 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3815,7 +3818,7 @@ case 919: case_919(); break; case 920: -#line 6079 "cs-parser.jay" +#line 6078 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3839,13 +3842,13 @@ case 929: case_929(); break; case 937: -#line 6203 "cs-parser.jay" +#line 6202 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6210 "cs-parser.jay" +#line 6209 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3857,13 +3860,13 @@ case 940: case_940(); break; case 941: -#line 6227 "cs-parser.jay" +#line 6226 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6231 "cs-parser.jay" +#line 6230 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3881,25 +3884,25 @@ case 946: case_946(); break; case 948: -#line 6267 "cs-parser.jay" +#line 6266 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6275 "cs-parser.jay" +#line 6274 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6279 "cs-parser.jay" +#line 6278 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6286 "cs-parser.jay" +#line 6285 "cs-parser.jay" { yyVal = new List (0); } @@ -4875,15 +4878,8 @@ void case_186() ((Parameter) yyVal).DefaultValue = new DefaultParameterValueExpression ((Expression) yyVals[0+yyTop]); } -void case_189() -#line 1627 "cs-parser.jay" -{ - yyVal = yyVals[0+yyTop]; - parameterModifierLocation = GetLocation (yyVals[0+yyTop]); - } - void case_190() -#line 1632 "cs-parser.jay" +#line 1631 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4906,44 +4902,44 @@ void case_190() } void case_191() -#line 1656 "cs-parser.jay" +#line 1655 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); - + parameterModifierLocation = GetLocation (yyVals[0+yyTop]); yyVal = Parameter.Modifier.REF; } void case_192() -#line 1663 "cs-parser.jay" +#line 1662 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); - + parameterModifierLocation = GetLocation (yyVals[0+yyTop]); yyVal = Parameter.Modifier.OUT; } void case_193() -#line 1670 "cs-parser.jay" +#line 1669 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "extension methods"); - + parameterModifierLocation = GetLocation (yyVals[0+yyTop]); yyVal = Parameter.Modifier.This; } void case_194() -#line 1683 "cs-parser.jay" +#line 1682 "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_195() -#line 1688 "cs-parser.jay" +#line 1687 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4952,21 +4948,21 @@ void case_195() } void case_196() -#line 1695 "cs-parser.jay" +#line 1694 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_197() -#line 1703 "cs-parser.jay" +#line 1702 "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"); } void case_198() -#line 1708 "cs-parser.jay" +#line 1707 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4977,21 +4973,21 @@ void case_198() } void case_200() -#line 1724 "cs-parser.jay" +#line 1723 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_201() -#line 1735 "cs-parser.jay" +#line 1734 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_202() -#line 1740 "cs-parser.jay" +#line 1739 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5007,7 +5003,7 @@ void case_202() } void case_203() -#line 1754 "cs-parser.jay" +#line 1753 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5016,14 +5012,14 @@ void case_203() } void case_204() -#line 1761 "cs-parser.jay" +#line 1760 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_206() -#line 1775 "cs-parser.jay" +#line 1774 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5050,7 +5046,7 @@ void case_206() } void case_208() -#line 1804 "cs-parser.jay" +#line 1803 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5063,7 +5059,7 @@ void case_208() } void case_213() -#line 1823 "cs-parser.jay" +#line 1822 "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 ()); @@ -5076,7 +5072,7 @@ void case_213() } void case_214() -#line 1837 "cs-parser.jay" +#line 1836 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5099,7 +5095,7 @@ void case_214() } void case_215() -#line 1858 "cs-parser.jay" +#line 1857 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5122,7 +5118,7 @@ void case_215() } void case_216() -#line 1882 "cs-parser.jay" +#line 1881 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5150,7 +5146,7 @@ void case_216() } void case_217() -#line 1908 "cs-parser.jay" +#line 1907 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5173,21 +5169,21 @@ void case_217() } void case_219() -#line 1933 "cs-parser.jay" +#line 1932 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1938 "cs-parser.jay" +#line 1937 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1953 "cs-parser.jay" +#line 1952 "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]); @@ -5195,7 +5191,7 @@ void case_222() } void case_223() -#line 1960 "cs-parser.jay" +#line 1959 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5208,7 +5204,7 @@ void case_223() } void case_224() -#line 1971 "cs-parser.jay" +#line 1970 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5216,7 +5212,7 @@ void case_224() } void case_225() -#line 1977 "cs-parser.jay" +#line 1976 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); @@ -5227,7 +5223,7 @@ void case_225() } void case_241() -#line 2033 "cs-parser.jay" +#line 2032 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5257,14 +5253,14 @@ void case_241() } void case_245() -#line 2070 "cs-parser.jay" +#line 2069 "cs-parser.jay" { 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_247() -#line 2082 "cs-parser.jay" +#line 2081 "cs-parser.jay" { valid_param_mod = 0; @@ -5306,7 +5302,7 @@ void case_247() } void case_272() -#line 2158 "cs-parser.jay" +#line 2157 "cs-parser.jay" { valid_param_mod = 0; @@ -5323,7 +5319,7 @@ void case_272() } void case_274() -#line 2177 "cs-parser.jay" +#line 2176 "cs-parser.jay" { valid_param_mod = 0; @@ -5340,7 +5336,7 @@ void case_274() } void case_275() -#line 2192 "cs-parser.jay" +#line 2191 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5348,7 +5344,7 @@ void case_275() } void case_276() -#line 2198 "cs-parser.jay" +#line 2197 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5356,7 +5352,7 @@ void case_276() } void case_277() -#line 2208 "cs-parser.jay" +#line 2207 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5372,7 +5368,7 @@ void case_277() } void case_278() -#line 2227 "cs-parser.jay" +#line 2226 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5383,7 +5379,7 @@ void case_278() } void case_279() -#line 2236 "cs-parser.jay" +#line 2235 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5396,7 +5392,7 @@ void case_279() } void case_280() -#line 2247 "cs-parser.jay" +#line 2246 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5426,7 +5422,7 @@ void case_280() } void case_286() -#line 2292 "cs-parser.jay" +#line 2291 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5434,7 +5430,7 @@ void case_286() } void case_288() -#line 2302 "cs-parser.jay" +#line 2301 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5442,14 +5438,14 @@ void case_288() } void case_289() -#line 2308 "cs-parser.jay" +#line 2307 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_290() -#line 2316 "cs-parser.jay" +#line 2315 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5460,7 +5456,7 @@ void case_290() } void case_291() -#line 2325 "cs-parser.jay" +#line 2324 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5482,7 +5478,7 @@ void case_291() } void case_292() -#line 2350 "cs-parser.jay" +#line 2349 "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); @@ -5496,7 +5492,7 @@ void case_292() } void case_293() -#line 2364 "cs-parser.jay" +#line 2363 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5508,7 +5504,7 @@ void case_293() } void case_294() -#line 2377 "cs-parser.jay" +#line 2376 "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); @@ -5518,7 +5514,7 @@ void case_294() } void case_295() -#line 2385 "cs-parser.jay" +#line 2384 "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"); @@ -5527,7 +5523,7 @@ void case_295() } void case_296() -#line 2392 "cs-parser.jay" +#line 2391 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5540,14 +5536,14 @@ void case_296() } void case_299() -#line 2411 "cs-parser.jay" +#line 2410 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_304() -#line 2435 "cs-parser.jay" +#line 2434 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5555,7 +5551,7 @@ void case_304() } void case_306() -#line 2445 "cs-parser.jay" +#line 2444 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5564,7 +5560,7 @@ void case_306() } void case_307() -#line 2454 "cs-parser.jay" +#line 2453 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5578,28 +5574,28 @@ void case_307() } void case_311() -#line 2475 "cs-parser.jay" +#line 2474 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_312() -#line 2480 "cs-parser.jay" +#line 2479 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_313() -#line 2485 "cs-parser.jay" +#line 2484 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_314() -#line 2493 "cs-parser.jay" +#line 2492 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5613,7 +5609,7 @@ void case_314() } void case_315() -#line 2505 "cs-parser.jay" +#line 2504 "cs-parser.jay" { lexer.EventParsing = true; @@ -5628,7 +5624,7 @@ void case_315() } void case_316() -#line 2521 "cs-parser.jay" +#line 2520 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5642,7 +5638,7 @@ void case_316() } void case_317() -#line 2533 "cs-parser.jay" +#line 2532 "cs-parser.jay" { lexer.EventParsing = true; @@ -5657,21 +5653,21 @@ void case_317() } void case_318() -#line 2549 "cs-parser.jay" +#line 2548 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_320() -#line 2561 "cs-parser.jay" +#line 2560 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2566 "cs-parser.jay" +#line 2565 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5685,7 +5681,7 @@ void case_321() } void case_322() -#line 2578 "cs-parser.jay" +#line 2577 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5693,7 +5689,7 @@ void case_322() } void case_323() -#line 2584 "cs-parser.jay" +#line 2583 "cs-parser.jay" { if (doc_support) current_class.DocComment = enumTypeComment; @@ -5719,7 +5715,7 @@ void case_323() } void case_325() -#line 2612 "cs-parser.jay" +#line 2611 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5732,21 +5728,21 @@ void case_325() } void case_326() -#line 2623 "cs-parser.jay" +#line 2622 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2641 "cs-parser.jay" +#line 2640 "cs-parser.jay" { lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2649 "cs-parser.jay" +#line 2648 "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]); @@ -5761,7 +5757,7 @@ void case_332() } void case_333() -#line 2662 "cs-parser.jay" +#line 2661 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5771,7 +5767,7 @@ void case_333() } void case_334() -#line 2670 "cs-parser.jay" +#line 2669 "cs-parser.jay" { --lexer.parsing_block; @@ -5787,7 +5783,7 @@ void case_334() } void case_336() -#line 2695 "cs-parser.jay" +#line 2694 "cs-parser.jay" { valid_param_mod = 0; @@ -5807,7 +5803,7 @@ void case_336() } void case_338() -#line 2717 "cs-parser.jay" +#line 2716 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5823,7 +5819,7 @@ void case_338() } void case_340() -#line 2735 "cs-parser.jay" +#line 2734 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5832,7 +5828,7 @@ void case_340() } void case_342() -#line 2746 "cs-parser.jay" +#line 2745 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5841,7 +5837,7 @@ void case_342() } void case_344() -#line 2757 "cs-parser.jay" +#line 2756 "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); @@ -5849,14 +5845,14 @@ void case_344() } void case_345() -#line 2766 "cs-parser.jay" +#line 2765 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2778 "cs-parser.jay" +#line 2777 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5869,14 +5865,14 @@ void case_347() } void case_348() -#line 2789 "cs-parser.jay" +#line 2788 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2797 "cs-parser.jay" +#line 2796 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5885,7 +5881,7 @@ void case_349() } void case_350() -#line 2804 "cs-parser.jay" +#line 2803 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5894,7 +5890,7 @@ void case_350() } void case_352() -#line 2821 "cs-parser.jay" +#line 2820 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5902,7 +5898,7 @@ void case_352() } void case_353() -#line 2830 "cs-parser.jay" +#line 2829 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5911,7 +5907,7 @@ void case_353() } void case_355() -#line 2841 "cs-parser.jay" +#line 2840 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5919,21 +5915,21 @@ void case_355() } void case_356() -#line 2850 "cs-parser.jay" +#line 2849 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2855 "cs-parser.jay" +#line 2854 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2863 "cs-parser.jay" +#line 2862 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5941,7 +5937,7 @@ void case_358() } void case_359() -#line 2869 "cs-parser.jay" +#line 2868 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5951,7 +5947,7 @@ void case_359() } void case_360() -#line 2877 "cs-parser.jay" +#line 2876 "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); @@ -5959,7 +5955,7 @@ void case_360() } void case_362() -#line 2887 "cs-parser.jay" +#line 2886 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5969,7 +5965,7 @@ void case_362() } void case_363() -#line 2898 "cs-parser.jay" +#line 2897 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5977,7 +5973,7 @@ void case_363() } void case_364() -#line 2904 "cs-parser.jay" +#line 2903 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5986,14 +5982,14 @@ void case_364() } void case_365() -#line 2914 "cs-parser.jay" +#line 2913 "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_366() -#line 2919 "cs-parser.jay" +#line 2918 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6004,28 +6000,28 @@ void case_366() } void case_371() -#line 2953 "cs-parser.jay" +#line 2952 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2962 "cs-parser.jay" +#line 2961 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2971 "cs-parser.jay" +#line 2970 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2987 "cs-parser.jay" +#line 2986 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6040,14 +6036,14 @@ void case_378() } void case_380() -#line 3004 "cs-parser.jay" +#line 3003 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 3020 "cs-parser.jay" +#line 3019 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6055,7 +6051,7 @@ void case_383() } void case_384() -#line 3026 "cs-parser.jay" +#line 3025 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6064,7 +6060,7 @@ void case_384() } void case_385() -#line 3036 "cs-parser.jay" +#line 3035 "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 ()); @@ -6073,35 +6069,35 @@ void case_385() } void case_386() -#line 3043 "cs-parser.jay" +#line 3042 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3105 "cs-parser.jay" +#line 3104 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3109 "cs-parser.jay" +#line 3108 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3150 "cs-parser.jay" +#line 3149 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3162 "cs-parser.jay" +#line 3161 "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); @@ -6109,7 +6105,7 @@ void case_437() } void case_438() -#line 3168 "cs-parser.jay" +#line 3167 "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); @@ -6117,7 +6113,7 @@ void case_438() } void case_439() -#line 3174 "cs-parser.jay" +#line 3173 "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); @@ -6125,7 +6121,7 @@ void case_439() } void case_440() -#line 3180 "cs-parser.jay" +#line 3179 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6135,28 +6131,28 @@ void case_440() } void case_442() -#line 3190 "cs-parser.jay" +#line 3189 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3198 "cs-parser.jay" +#line 3197 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3206 "cs-parser.jay" +#line 3205 "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_448() -#line 3219 "cs-parser.jay" +#line 3218 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6168,14 +6164,14 @@ void case_448() } void case_449() -#line 3229 "cs-parser.jay" +#line 3228 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3245 "cs-parser.jay" +#line 3244 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6183,7 +6179,7 @@ void case_452() } void case_453() -#line 3251 "cs-parser.jay" +#line 3250 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6192,14 +6188,14 @@ void case_453() } void case_454() -#line 3257 "cs-parser.jay" +#line 3256 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3265 "cs-parser.jay" +#line 3264 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6207,7 +6203,7 @@ void case_455() } void case_457() -#line 3274 "cs-parser.jay" +#line 3273 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6217,7 +6213,7 @@ void case_457() } void case_458() -#line 3282 "cs-parser.jay" +#line 3281 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6226,14 +6222,14 @@ void case_458() } void case_459() -#line 3289 "cs-parser.jay" +#line 3288 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3307 "cs-parser.jay" +#line 3306 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6241,7 +6237,7 @@ void case_464() } void case_465() -#line 3313 "cs-parser.jay" +#line 3312 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6253,7 +6249,7 @@ void case_465() } void case_466() -#line 3323 "cs-parser.jay" +#line 3322 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6270,56 +6266,56 @@ void case_466() } void case_467() -#line 3338 "cs-parser.jay" +#line 3337 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3343 "cs-parser.jay" +#line 3342 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3364 "cs-parser.jay" +#line 3363 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3369 "cs-parser.jay" +#line 3368 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3374 "cs-parser.jay" +#line 3373 "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_476() -#line 3379 "cs-parser.jay" +#line 3378 "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_478() -#line 3391 "cs-parser.jay" +#line 3390 "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_479() -#line 3399 "cs-parser.jay" +#line 3398 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6327,7 +6323,7 @@ void case_479() } void case_480() -#line 3405 "cs-parser.jay" +#line 3404 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6336,14 +6332,14 @@ void case_480() } void case_481() -#line 3411 "cs-parser.jay" +#line 3410 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3419 "cs-parser.jay" +#line 3418 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6351,7 +6347,7 @@ void case_482() } void case_483() -#line 3425 "cs-parser.jay" +#line 3424 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6363,21 +6359,21 @@ void case_483() } void case_487() -#line 3453 "cs-parser.jay" +#line 3452 "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_488() -#line 3458 "cs-parser.jay" +#line 3457 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3480 "cs-parser.jay" +#line 3479 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6392,7 +6388,7 @@ void case_491() } void case_492() -#line 3493 "cs-parser.jay" +#line 3492 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6401,7 +6397,7 @@ void case_492() } void case_493() -#line 3505 "cs-parser.jay" +#line 3504 "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])) { @@ -6411,7 +6407,7 @@ void case_493() } void case_494() -#line 3513 "cs-parser.jay" +#line 3512 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6420,7 +6416,7 @@ void case_494() } void case_495() -#line 3520 "cs-parser.jay" +#line 3519 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6429,28 +6425,28 @@ void case_495() } void case_496() -#line 3527 "cs-parser.jay" +#line 3526 "cs-parser.jay" { 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_497() -#line 3532 "cs-parser.jay" +#line 3531 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3543 "cs-parser.jay" +#line 3542 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3551 "cs-parser.jay" +#line 3550 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6462,7 +6458,7 @@ void case_500() } void case_505() -#line 3574 "cs-parser.jay" +#line 3573 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6470,7 +6466,7 @@ void case_505() } void case_506() -#line 3580 "cs-parser.jay" +#line 3579 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6480,7 +6476,7 @@ void case_506() } void case_507() -#line 3591 "cs-parser.jay" +#line 3590 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6488,7 +6484,7 @@ void case_507() } void case_508() -#line 3597 "cs-parser.jay" +#line 3596 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6496,14 +6492,14 @@ void case_508() } void case_509() -#line 3603 "cs-parser.jay" +#line 3602 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3608 "cs-parser.jay" +#line 3607 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6511,28 +6507,28 @@ void case_510() } void case_514() -#line 3623 "cs-parser.jay" +#line 3622 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3631 "cs-parser.jay" +#line 3630 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3636 "cs-parser.jay" +#line 3635 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3666 "cs-parser.jay" +#line 3665 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6541,7 +6537,7 @@ void case_521() } void case_522() -#line 3673 "cs-parser.jay" +#line 3672 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6554,7 +6550,7 @@ void case_522() } void case_523() -#line 3687 "cs-parser.jay" +#line 3686 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6562,7 +6558,7 @@ void case_523() } void case_524() -#line 3693 "cs-parser.jay" +#line 3692 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6571,7 +6567,7 @@ void case_524() } void case_526() -#line 3707 "cs-parser.jay" +#line 3706 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6579,14 +6575,14 @@ void case_526() } void case_529() -#line 3718 "cs-parser.jay" +#line 3717 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3726 "cs-parser.jay" +#line 3725 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6594,7 +6590,7 @@ void case_530() } void case_531() -#line 3732 "cs-parser.jay" +#line 3731 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6604,7 +6600,7 @@ void case_531() } void case_532() -#line 3740 "cs-parser.jay" +#line 3739 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6612,7 +6608,7 @@ void case_532() } void case_533() -#line 3746 "cs-parser.jay" +#line 3745 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6620,7 +6616,7 @@ void case_533() } void case_534() -#line 3752 "cs-parser.jay" +#line 3751 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6631,7 +6627,7 @@ void case_534() } void case_535() -#line 3764 "cs-parser.jay" +#line 3763 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6640,7 +6636,7 @@ void case_535() } void case_536() -#line 3774 "cs-parser.jay" +#line 3773 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6650,35 +6646,35 @@ void case_536() } void case_537() -#line 3785 "cs-parser.jay" +#line 3784 "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_538() -#line 3793 "cs-parser.jay" +#line 3792 "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_539() -#line 3801 "cs-parser.jay" +#line 3800 "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_540() -#line 3809 "cs-parser.jay" +#line 3808 "cs-parser.jay" { 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_542() -#line 3821 "cs-parser.jay" +#line 3820 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6689,7 +6685,7 @@ void case_542() } void case_548() -#line 3853 "cs-parser.jay" +#line 3852 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6698,7 +6694,7 @@ void case_548() } void case_549() -#line 3863 "cs-parser.jay" +#line 3862 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6708,147 +6704,147 @@ void case_549() } void case_555() -#line 3888 "cs-parser.jay" +#line 3887 "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_556() -#line 3896 "cs-parser.jay" +#line 3895 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3937 "cs-parser.jay" +#line 3936 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3942 "cs-parser.jay" +#line 3941 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3947 "cs-parser.jay" +#line 3946 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3956 "cs-parser.jay" +#line 3955 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3965 "cs-parser.jay" +#line 3964 "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_575() -#line 3982 "cs-parser.jay" +#line 3981 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3987 "cs-parser.jay" +#line 3986 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3996 "cs-parser.jay" +#line 3995 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 4001 "cs-parser.jay" +#line 4000 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4006 "cs-parser.jay" +#line 4005 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4011 "cs-parser.jay" +#line 4010 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 4020 "cs-parser.jay" +#line 4019 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 4025 "cs-parser.jay" +#line 4024 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4034 "cs-parser.jay" +#line 4033 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4043 "cs-parser.jay" +#line 4042 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4052 "cs-parser.jay" +#line 4051 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4061 "cs-parser.jay" +#line 4060 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4070 "cs-parser.jay" +#line 4069 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4079 "cs-parser.jay" +#line 4078 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6857,84 +6853,84 @@ void case_596() } void case_598() -#line 4090 "cs-parser.jay" +#line 4089 "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_600() -#line 4102 "cs-parser.jay" +#line 4101 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4107 "cs-parser.jay" +#line 4106 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4112 "cs-parser.jay" +#line 4111 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4117 "cs-parser.jay" +#line 4116 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4122 "cs-parser.jay" +#line 4121 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4127 "cs-parser.jay" +#line 4126 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4132 "cs-parser.jay" +#line 4131 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4137 "cs-parser.jay" +#line 4136 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4142 "cs-parser.jay" +#line 4141 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4147 "cs-parser.jay" +#line 4146 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4155 "cs-parser.jay" +#line 4154 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6943,7 +6939,7 @@ void case_610() } void case_611() -#line 4162 "cs-parser.jay" +#line 4161 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6958,7 +6954,7 @@ void case_611() } void case_612() -#line 4178 "cs-parser.jay" +#line 4177 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6966,7 +6962,7 @@ void case_612() } void case_613() -#line 4184 "cs-parser.jay" +#line 4183 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6974,21 +6970,21 @@ void case_613() } void case_614() -#line 4190 "cs-parser.jay" +#line 4189 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4198 "cs-parser.jay" +#line 4197 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4214 "cs-parser.jay" +#line 4213 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6997,14 +6993,14 @@ void case_620() } void case_622() -#line 4225 "cs-parser.jay" +#line 4224 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4233 "cs-parser.jay" +#line 4232 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7012,14 +7008,14 @@ void case_623() } void case_624() -#line 4239 "cs-parser.jay" +#line 4238 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4244 "cs-parser.jay" +#line 4243 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7027,63 +7023,63 @@ void case_625() } void case_626() -#line 4250 "cs-parser.jay" +#line 4249 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4259 "cs-parser.jay" +#line 4258 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4264 "cs-parser.jay" +#line 4263 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4273 "cs-parser.jay" +#line 4272 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4278 "cs-parser.jay" +#line 4277 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4301 "cs-parser.jay" +#line 4300 "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_640() -#line 4306 "cs-parser.jay" +#line 4305 "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_641() -#line 4311 "cs-parser.jay" +#line 4310 "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_645() -#line 4340 "cs-parser.jay" +#line 4339 "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]); @@ -7091,12 +7087,12 @@ void case_645() FeatureIsNotAvailable (c.Location, "static classes"); } - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); + lbag.AddMember (current_class, GetModifierLocations ()); push_current_class (c, yyVals[-3+yyTop]); } void case_646() -#line 4352 "cs-parser.jay" +#line 4351 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7109,7 +7105,7 @@ void case_646() } void case_647() -#line 4363 "cs-parser.jay" +#line 4362 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7117,25 +7113,25 @@ void case_647() } void case_648() -#line 4369 "cs-parser.jay" +#line 4368 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { - lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); + lbag.AppendToMember (current_class, GetLocation (yyVals[-11+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } else { - lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); + lbag.AppendToMember (current_class, GetLocation (yyVals[-11+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } yyVal = pop_current_class (); } void case_651() -#line 4388 "cs-parser.jay" +#line 4387 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4398 "cs-parser.jay" +#line 4397 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7153,7 +7149,7 @@ void case_654() } void case_655() -#line 4417 "cs-parser.jay" +#line 4416 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7163,91 +7159,91 @@ void case_655() } void case_656() -#line 4425 "cs-parser.jay" +#line 4424 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4430 "cs-parser.jay" +#line 4429 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4435 "cs-parser.jay" +#line 4434 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4440 "cs-parser.jay" +#line 4439 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4445 "cs-parser.jay" +#line 4444 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4450 "cs-parser.jay" +#line 4449 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4455 "cs-parser.jay" +#line 4454 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4460 "cs-parser.jay" +#line 4459 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4465 "cs-parser.jay" +#line 4464 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4470 "cs-parser.jay" +#line 4469 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4475 "cs-parser.jay" +#line 4474 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4480 "cs-parser.jay" +#line 4479 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4485 "cs-parser.jay" +#line 4484 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7256,28 +7252,28 @@ void case_668() } void case_669() -#line 4492 "cs-parser.jay" +#line 4491 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_671() -#line 4501 "cs-parser.jay" +#line 4500 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_674() -#line 4514 "cs-parser.jay" +#line 4513 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4522 "cs-parser.jay" +#line 4521 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7285,7 +7281,7 @@ void case_675() } void case_676() -#line 4528 "cs-parser.jay" +#line 4527 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7303,14 +7299,14 @@ void case_676() } void case_677() -#line 4547 "cs-parser.jay" +#line 4546 "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_678() -#line 4555 "cs-parser.jay" +#line 4554 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7318,7 +7314,7 @@ void case_678() } void case_679() -#line 4561 "cs-parser.jay" +#line 4560 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7343,7 +7339,7 @@ void case_679() } void case_680() -#line 4587 "cs-parser.jay" +#line 4586 "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 ()); @@ -7352,14 +7348,14 @@ void case_680() } void case_681() -#line 4594 "cs-parser.jay" +#line 4593 "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_685() -#line 4614 "cs-parser.jay" +#line 4613 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7368,77 +7364,77 @@ void case_685() } void case_688() -#line 4648 "cs-parser.jay" +#line 4647 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4660 "cs-parser.jay" +#line 4659 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4665 "cs-parser.jay" +#line 4664 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4674 "cs-parser.jay" +#line 4673 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4679 "cs-parser.jay" +#line 4678 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4706 "cs-parser.jay" +#line 4705 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4770 "cs-parser.jay" +#line 4769 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4775 "cs-parser.jay" +#line 4774 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4780 "cs-parser.jay" +#line 4779 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4788 "cs-parser.jay" +#line 4787 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4796 "cs-parser.jay" +#line 4795 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7448,7 +7444,7 @@ void case_738() } void case_741() -#line 4809 "cs-parser.jay" +#line 4808 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7457,7 +7453,7 @@ void case_741() } void case_742() -#line 4825 "cs-parser.jay" +#line 4824 "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*/ @@ -7489,7 +7485,7 @@ void case_742() } void case_743() -#line 4855 "cs-parser.jay" +#line 4854 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7502,7 +7498,7 @@ void case_743() } void case_744() -#line 4866 "cs-parser.jay" +#line 4865 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7511,21 +7507,21 @@ void case_744() } void case_747() -#line 4881 "cs-parser.jay" +#line 4880 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4890 "cs-parser.jay" +#line 4889 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4905 "cs-parser.jay" +#line 4904 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7534,7 +7530,7 @@ void case_751() } void case_752() -#line 4912 "cs-parser.jay" +#line 4911 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7542,7 +7538,7 @@ void case_752() } void case_753() -#line 4918 "cs-parser.jay" +#line 4917 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7551,7 +7547,7 @@ void case_753() } void case_754() -#line 4925 "cs-parser.jay" +#line 4924 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7563,14 +7559,14 @@ void case_754() } void case_756() -#line 4939 "cs-parser.jay" +#line 4938 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4944 "cs-parser.jay" +#line 4943 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7581,7 +7577,7 @@ void case_757() } void case_762() -#line 4966 "cs-parser.jay" +#line 4965 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7592,7 +7588,7 @@ void case_762() } void case_763() -#line 4975 "cs-parser.jay" +#line 4974 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7603,14 +7599,14 @@ void case_763() } void case_765() -#line 4991 "cs-parser.jay" +#line 4990 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 5009 "cs-parser.jay" +#line 5008 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7621,28 +7617,28 @@ void case_770() } void case_772() -#line 5022 "cs-parser.jay" +#line 5021 "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_773() -#line 5027 "cs-parser.jay" +#line 5026 "cs-parser.jay" { 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_774() -#line 5035 "cs-parser.jay" +#line 5034 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5053 "cs-parser.jay" +#line 5052 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7654,7 +7650,7 @@ void case_778() } void case_779() -#line 5066 "cs-parser.jay" +#line 5065 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7664,14 +7660,14 @@ void case_779() } void case_780() -#line 5074 "cs-parser.jay" +#line 5073 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5088 "cs-parser.jay" +#line 5087 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7681,7 +7677,7 @@ void case_783() } void case_784() -#line 5097 "cs-parser.jay" +#line 5096 "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])); @@ -7693,7 +7689,7 @@ void case_784() } void case_786() -#line 5114 "cs-parser.jay" +#line 5113 "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])); @@ -7701,14 +7697,14 @@ void case_786() } void case_787() -#line 5123 "cs-parser.jay" +#line 5122 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5132 "cs-parser.jay" +#line 5131 "cs-parser.jay" { var sections = new List (4); @@ -7717,7 +7713,7 @@ void case_789() } void case_790() -#line 5139 "cs-parser.jay" +#line 5138 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7726,14 +7722,14 @@ void case_790() } void case_791() -#line 5146 "cs-parser.jay" +#line 5145 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5165 "cs-parser.jay" +#line 5164 "cs-parser.jay" { var labels = new List (2); @@ -7742,7 +7738,7 @@ void case_794() } void case_795() -#line 5172 "cs-parser.jay" +#line 5171 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7751,14 +7747,14 @@ void case_795() } void case_796() -#line 5182 "cs-parser.jay" +#line 5181 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5201 "cs-parser.jay" +#line 5200 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7768,21 +7764,21 @@ void case_802() } void case_803() -#line 5213 "cs-parser.jay" +#line 5212 "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_804() -#line 5221 "cs-parser.jay" +#line 5220 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5237 "cs-parser.jay" +#line 5236 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7796,14 +7792,14 @@ void case_806() } void case_807() -#line 5249 "cs-parser.jay" +#line 5248 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5262 "cs-parser.jay" +#line 5261 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7812,14 +7808,14 @@ void case_810() } void case_811() -#line 5269 "cs-parser.jay" +#line 5268 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5293 "cs-parser.jay" +#line 5292 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7834,14 +7830,14 @@ void case_819() } void case_820() -#line 5309 "cs-parser.jay" +#line 5308 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5314 "cs-parser.jay" +#line 5313 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7852,7 +7848,7 @@ void case_821() } void case_822() -#line 5323 "cs-parser.jay" +#line 5322 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7865,21 +7861,21 @@ void case_822() } void case_829() -#line 5346 "cs-parser.jay" +#line 5345 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5354 "cs-parser.jay" +#line 5353 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5362 "cs-parser.jay" +#line 5361 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7887,35 +7883,35 @@ void case_831() } void case_832() -#line 5368 "cs-parser.jay" +#line 5367 "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_833() -#line 5373 "cs-parser.jay" +#line 5372 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5381 "cs-parser.jay" +#line 5380 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5389 "cs-parser.jay" +#line 5388 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5397 "cs-parser.jay" +#line 5396 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7933,7 +7929,7 @@ void case_836() } void case_837() -#line 5413 "cs-parser.jay" +#line 5412 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7949,28 +7945,28 @@ void case_837() } void case_841() -#line 5439 "cs-parser.jay" +#line 5438 "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_842() -#line 5444 "cs-parser.jay" +#line 5443 "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_843() -#line 5449 "cs-parser.jay" +#line 5448 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5457 "cs-parser.jay" +#line 5456 "cs-parser.jay" { var l = new List (2); @@ -7979,7 +7975,7 @@ void case_844() } void case_845() -#line 5464 "cs-parser.jay" +#line 5463 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7997,7 +7993,7 @@ void case_845() } void case_849() -#line 5492 "cs-parser.jay" +#line 5491 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8014,7 +8010,7 @@ void case_849() } void case_851() -#line 5511 "cs-parser.jay" +#line 5510 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8027,14 +8023,14 @@ void case_851() } void case_854() -#line 5539 "cs-parser.jay" +#line 5538 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5549 "cs-parser.jay" +#line 5548 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8044,7 +8040,7 @@ void case_856() } void case_857() -#line 5560 "cs-parser.jay" +#line 5559 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8056,14 +8052,14 @@ void case_857() } void case_858() -#line 5570 "cs-parser.jay" +#line 5569 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5575 "cs-parser.jay" +#line 5574 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8075,7 +8071,7 @@ void case_859() } void case_860() -#line 5588 "cs-parser.jay" +#line 5587 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8087,14 +8083,14 @@ void case_860() } void case_861() -#line 5598 "cs-parser.jay" +#line 5597 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5603 "cs-parser.jay" +#line 5602 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8106,7 +8102,7 @@ void case_862() } void case_863() -#line 5613 "cs-parser.jay" +#line 5612 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8117,14 +8113,14 @@ void case_863() } void case_865() -#line 5629 "cs-parser.jay" +#line 5628 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5640 "cs-parser.jay" +#line 5639 "cs-parser.jay" { lexer.query_parsing = false; @@ -8138,7 +8134,7 @@ void case_866() } void case_867() -#line 5652 "cs-parser.jay" +#line 5651 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8150,7 +8146,7 @@ void case_867() } void case_868() -#line 5663 "cs-parser.jay" +#line 5662 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8160,7 +8156,7 @@ void case_868() } void case_869() -#line 5670 "cs-parser.jay" +#line 5669 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8168,7 +8164,7 @@ void case_869() } void case_870() -#line 5679 "cs-parser.jay" +#line 5678 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8178,7 +8174,7 @@ void case_870() } void case_871() -#line 5687 "cs-parser.jay" +#line 5686 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8192,7 +8188,7 @@ void case_871() } void case_872() -#line 5702 "cs-parser.jay" +#line 5701 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8202,7 +8198,7 @@ void case_872() } void case_873() -#line 5710 "cs-parser.jay" +#line 5709 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8216,7 +8212,7 @@ void case_873() } void case_875() -#line 5729 "cs-parser.jay" +#line 5728 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8229,7 +8225,7 @@ void case_875() } void case_877() -#line 5744 "cs-parser.jay" +#line 5743 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8245,7 +8241,7 @@ void case_877() } void case_878() -#line 5761 "cs-parser.jay" +#line 5760 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8262,14 +8258,14 @@ void case_878() } void case_880() -#line 5777 "cs-parser.jay" +#line 5776 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5789 "cs-parser.jay" +#line 5788 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8278,7 +8274,7 @@ void case_882() } void case_883() -#line 5796 "cs-parser.jay" +#line 5795 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8288,7 +8284,7 @@ void case_883() } void case_884() -#line 5804 "cs-parser.jay" +#line 5803 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8297,7 +8293,7 @@ void case_884() } void case_885() -#line 5811 "cs-parser.jay" +#line 5810 "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])); @@ -8307,14 +8303,14 @@ void case_885() } void case_889() -#line 5828 "cs-parser.jay" +#line 5827 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5848 "cs-parser.jay" +#line 5847 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8328,7 +8324,7 @@ void case_896() } void case_898() -#line 5867 "cs-parser.jay" +#line 5866 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8337,7 +8333,7 @@ void case_898() } void case_899() -#line 5877 "cs-parser.jay" +#line 5876 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8347,7 +8343,7 @@ void case_899() } void case_900() -#line 5885 "cs-parser.jay" +#line 5884 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8357,7 +8353,7 @@ void case_900() } void case_901() -#line 5893 "cs-parser.jay" +#line 5892 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8367,7 +8363,7 @@ void case_901() } void case_902() -#line 5901 "cs-parser.jay" +#line 5900 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8407,7 +8403,7 @@ void case_902() } void case_903() -#line 5939 "cs-parser.jay" +#line 5938 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8417,7 +8413,7 @@ void case_903() } void case_904() -#line 5947 "cs-parser.jay" +#line 5946 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8427,7 +8423,7 @@ void case_904() } void case_905() -#line 5955 "cs-parser.jay" +#line 5954 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8437,7 +8433,7 @@ void case_905() } void case_906() -#line 5963 "cs-parser.jay" +#line 5962 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8479,7 +8475,7 @@ void case_906() } void case_910() -#line 6018 "cs-parser.jay" +#line 6017 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8488,7 +8484,7 @@ void case_910() } void case_912() -#line 6029 "cs-parser.jay" +#line 6028 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8497,14 +8493,14 @@ void case_912() } void case_913() -#line 6036 "cs-parser.jay" +#line 6035 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6045 "cs-parser.jay" +#line 6044 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8513,42 +8509,42 @@ void case_915() } void case_916() -#line 6052 "cs-parser.jay" +#line 6051 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6064 "cs-parser.jay" +#line 6063 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6069 "cs-parser.jay" +#line 6068 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6081 "cs-parser.jay" +#line 6080 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6086 "cs-parser.jay" +#line 6085 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6096 "cs-parser.jay" +#line 6095 "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*/ @@ -8566,7 +8562,7 @@ void case_924() } void case_925() -#line 6112 "cs-parser.jay" +#line 6111 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8577,7 +8573,7 @@ void case_925() } void case_928() -#line 6139 "cs-parser.jay" +#line 6138 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8609,7 +8605,7 @@ void case_928() } void case_929() -#line 6169 "cs-parser.jay" +#line 6168 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8621,7 +8617,7 @@ void case_929() } void case_939() -#line 6212 "cs-parser.jay" +#line 6211 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8629,7 +8625,7 @@ void case_939() } void case_940() -#line 6218 "cs-parser.jay" +#line 6217 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8638,14 +8634,14 @@ void case_940() } void case_943() -#line 6233 "cs-parser.jay" +#line 6232 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6238 "cs-parser.jay" +#line 6237 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8655,7 +8651,7 @@ void case_944() } void case_945() -#line 6246 "cs-parser.jay" +#line 6245 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8665,7 +8661,7 @@ void case_945() } void case_946() -#line 6254 "cs-parser.jay" +#line 6253 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8674,7 +8670,7 @@ void case_946() } void case_954() -#line 6292 "cs-parser.jay" +#line 6291 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8682,7 +8678,7 @@ void case_954() } void case_955() -#line 6298 "cs-parser.jay" +#line 6297 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8690,7 +8686,7 @@ void case_955() } void case_956() -#line 6307 "cs-parser.jay" +#line 6306 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12026,7 +12022,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6316 "cs-parser.jay" +#line 6315 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 475f0509f6..42b7bfd358 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -1626,7 +1626,6 @@ parameter_modifiers : parameter_modifier { $$ = $1; - parameterModifierLocation = GetLocation ($1); } | parameter_modifiers parameter_modifier { @@ -1656,14 +1655,14 @@ parameter_modifier { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation ($1)); - + parameterModifierLocation = GetLocation ($1); $$ = Parameter.Modifier.REF; } | OUT { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation ($1)); - + parameterModifierLocation = GetLocation ($1); $$ = Parameter.Modifier.OUT; } | THIS @@ -1673,7 +1672,7 @@ parameter_modifier if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation ($1), "extension methods"); - + parameterModifierLocation = GetLocation ($1); $$ = Parameter.Modifier.This; } ; @@ -4344,7 +4343,7 @@ class_declaration FeatureIsNotAvailable (c.Location, "static classes"); } - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($4)); + lbag.AddMember (current_class, GetModifierLocations ()); push_current_class (c, $3); } opt_class_base @@ -4368,9 +4367,9 @@ class_declaration opt_semicolon { if ($15 != null) { - lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13), GetLocation ($15)); + lbag.AppendToMember (current_class, GetLocation ($4), GetLocation ($11), GetLocation ($13), GetLocation ($15)); } else { - lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); + lbag.AppendToMember (current_class, GetLocation ($4), GetLocation ($11), GetLocation ($13)); } $$ = pop_current_class (); } From eddd01598747a07d00f3a84bf467315d6268805d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 17:46:43 +0200 Subject: [PATCH 16/92] Fixed enum member commas. --- .../Parser/CSharpParser.cs | 46 +- .../Parser/mcs/cs-parser.cs | 1250 ++++++++--------- .../Parser/mcs/cs-parser.jay | 52 +- .../Parser/mcs/decl.cs | 15 + 4 files changed, 682 insertions(+), 681 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 582a22558c..c1bac7ccfe 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -392,9 +392,8 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null && curLoc < location.Count) { newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); - // optional semicolon - if (location != null && curLoc < location.Count) - newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); + if (c.HasOptionalSemicolon) + newType.AddChild (new CSharpTokenNode (Convert (c.OptionalSemicolon), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. @@ -446,9 +445,8 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null && location.Count > 2) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); - // optional semicolon - if (location != null && curLoc < location.Count) - newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); + if (s.HasOptionalSemicolon) + newType.AddChild (new CSharpTokenNode (Convert (s.OptionalSemicolon), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); @@ -497,9 +495,8 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null && location.Count > 2) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); - // optional semicolon - if (location != null && curLoc < location.Count) - newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); + if (i.HasOptionalSemicolon) + newType.AddChild (new CSharpTokenNode (Convert (i.OptionalSemicolon), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); @@ -578,13 +575,19 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); - base.Visit (e); + + foreach (EnumMember member in e.OrderedAllMembers) { + Visit (member); + if (location != null && curLoc < location.Count - 1) //last one is closing brace + newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Comma); + } + if (location != null && location.Count > 2) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.RBrace); - // optional semicolon - if (location != null && curLoc < location.Count) - newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Semicolon); + + if (e.HasOptionalSemicolon) + newType.AddChild (new CSharpTokenNode (Convert (e.OptionalSemicolon), 1), AstNode.Roles.Semicolon); } else { // parser error, set end node to max value. newType.AddChild (new ErrorNode (), AstNode.Roles.Error); @@ -1884,16 +1887,19 @@ namespace ICSharpCode.NRefactory.CSharp result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression); } } - + var location = LocationsBag.GetLocations (memberAccess); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberReferenceExpression.Roles.Dot); + result.AddChild (Identifier.Create (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier); if (memberAccess.TypeArguments != null) { - var location = LocationsBag.GetLocations (memberAccess); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberReferenceExpression.Roles.LChevron); - AddTypeArguments (result, location, memberAccess.TypeArguments); - if (location != null && location.Count > 1) - result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), MemberReferenceExpression.Roles.RChevron); + var locationTypeArgs = LocationsBag.GetLocations (memberAccess.TypeArguments); + if (locationTypeArgs != null) + result.AddChild (new CSharpTokenNode (Convert (locationTypeArgs[0]), 1), MemberReferenceExpression.Roles.LChevron); + AddTypeArguments (result, locationTypeArgs, memberAccess.TypeArguments); + if (locationTypeArgs != null && locationTypeArgs.Count > 1) + result.AddChild (new CSharpTokenNode (Convert (locationTypeArgs[1]), 1), MemberReferenceExpression.Roles.RChevron); } return result; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index fef9d4c0f6..172d9d419b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -144,11 +144,12 @@ namespace Mono.CSharp LocationsBag lbag; UsingsBag ubag; List> mod_locations; - Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation, savedEnumBaseTypeColonLocation; + Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); List parameterListCommas = new List (); + List enumCommas = new List (); object lastYYVal; @@ -1400,20 +1401,20 @@ namespace Mono.CSharp yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: -#line 397 "cs-parser.jay" +#line 398 "cs-parser.jay" { Lexer.check_incorrect_doc_comment (); } break; case 2: -#line 398 "cs-parser.jay" +#line 399 "cs-parser.jay" { Lexer.CompleteOnEOF = false; } break; case 6: case_6(); break; case 7: -#line 415 "cs-parser.jay" +#line 416 "cs-parser.jay" { module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace); } @@ -1425,7 +1426,7 @@ case 13: case_13(); break; case 14: -#line 453 "cs-parser.jay" +#line 454 "cs-parser.jay" { syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected"); /* TODO: better*/ } @@ -1470,7 +1471,7 @@ case 41: case_41(); break; case 42: -#line 641 "cs-parser.jay" +#line 642 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1500,18 +1501,18 @@ case 57: case_57(); break; case 58: -#line 737 "cs-parser.jay" +#line 738 "cs-parser.jay" { yyVal = "event"; } break; case 59: -#line 738 "cs-parser.jay" +#line 739 "cs-parser.jay" { yyVal = "return"; } break; case 60: case_60(); break; case 61: -#line 755 "cs-parser.jay" +#line 756 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1520,7 +1521,7 @@ case 62: case_62(); break; case 63: -#line 770 "cs-parser.jay" +#line 771 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1529,14 +1530,14 @@ case 64: case_64(); break; case 66: -#line 794 "cs-parser.jay" +#line 795 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 805 "cs-parser.jay" +#line 806 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1552,13 +1553,13 @@ case 72: case_72(); break; case 73: -#line 849 "cs-parser.jay" +#line 850 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 857 "cs-parser.jay" +#line 858 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1570,17 +1571,17 @@ case 77: case_77(); break; case 78: -#line 882 "cs-parser.jay" +#line 883 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 886 "cs-parser.jay" +#line 887 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 890 "cs-parser.jay" +#line 891 "cs-parser.jay" { yyVal = Argument.AType.Out; } @@ -1589,7 +1590,7 @@ case 95: case_95(); break; case 96: -#line 931 "cs-parser.jay" +#line 932 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1607,7 +1608,7 @@ case 100: case_100(); break; case 101: -#line 963 "cs-parser.jay" +#line 965 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1616,7 +1617,7 @@ case 102: case_102(); break; case 103: -#line 975 "cs-parser.jay" +#line 977 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } @@ -1628,13 +1629,13 @@ case 119: case_119(); break; case 122: -#line 1044 "cs-parser.jay" +#line 1046 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 123: -#line 1048 "cs-parser.jay" +#line 1050 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1643,7 +1644,7 @@ case 124: case_124(); break; case 125: -#line 1064 "cs-parser.jay" +#line 1066 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1667,7 +1668,7 @@ case 133: case_133(); break; case 134: -#line 1143 "cs-parser.jay" +#line 1145 "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"); } @@ -1679,13 +1680,13 @@ case 137: case_137(); break; case 140: -#line 1173 "cs-parser.jay" +#line 1175 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 141: -#line 1177 "cs-parser.jay" +#line 1179 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1694,7 +1695,7 @@ case 142: case_142(); break; case 143: -#line 1190 "cs-parser.jay" +#line 1192 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1703,13 +1704,13 @@ case 144: case_144(); break; case 147: -#line 1209 "cs-parser.jay" +#line 1211 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 148: -#line 1213 "cs-parser.jay" +#line 1215 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1718,7 +1719,7 @@ case 149: case_149(); break; case 150: -#line 1229 "cs-parser.jay" +#line 1231 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1739,13 +1740,13 @@ case 157: case_157(); break; case 158: -#line 1297 "cs-parser.jay" +#line 1299 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 159: -#line 1301 "cs-parser.jay" +#line 1303 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1754,7 +1755,7 @@ case 160: case_160(); break; case 161: -#line 1341 "cs-parser.jay" +#line 1343 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1763,7 +1764,7 @@ case 162: case_162(); break; case 163: -#line 1351 "cs-parser.jay" +#line 1353 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1775,11 +1776,11 @@ case 165: case_165(); break; case 167: -#line 1425 "cs-parser.jay" +#line 1427 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 168: -#line 1429 "cs-parser.jay" +#line 1431 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 170: @@ -1804,13 +1805,13 @@ case 176: case_176(); break; case 177: -#line 1501 "cs-parser.jay" +#line 1503 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 178: -#line 1505 "cs-parser.jay" +#line 1507 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1834,7 +1835,7 @@ case 184: case_184(); break; case 185: -#line 1580 "cs-parser.jay" +#line 1582 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1843,11 +1844,11 @@ case 186: case_186(); break; case 187: -#line 1621 "cs-parser.jay" +#line 1623 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 189: -#line 1629 "cs-parser.jay" +#line 1631 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1880,7 +1881,7 @@ case 198: case_198(); break; case 199: -#line 1718 "cs-parser.jay" +#line 1720 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1901,7 +1902,7 @@ case 204: case_204(); break; case 205: -#line 1772 "cs-parser.jay" +#line 1774 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1910,7 +1911,7 @@ case 206: case_206(); break; case 207: -#line 1801 "cs-parser.jay" +#line 1803 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1940,7 +1941,7 @@ case 220: case_220(); break; case 221: -#line 1950 "cs-parser.jay" +#line 1952 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -2272,9 +2273,9 @@ case 326: case_326(); break; case 329: -#line 2634 "cs-parser.jay" +#line 2626 "cs-parser.jay" { - lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); + enumCommas.Add (GetLocation (yyVals[0+yyTop])); } break; case 331: @@ -2290,7 +2291,7 @@ case 334: case_334(); break; case 335: -#line 2692 "cs-parser.jay" +#line 2684 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2299,7 +2300,7 @@ case 336: case_336(); break; case 337: -#line 2714 "cs-parser.jay" +#line 2706 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2332,7 +2333,7 @@ case 350: case_350(); break; case 351: -#line 2818 "cs-parser.jay" +#line 2810 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2377,13 +2378,13 @@ case 366: case_366(); break; case 368: -#line 2936 "cs-parser.jay" +#line 2928 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2943 "cs-parser.jay" +#line 2935 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2398,7 +2399,7 @@ case 375: case_375(); break; case 377: -#line 2981 "cs-parser.jay" +#line 2973 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2407,7 +2408,7 @@ case 378: case_378(); break; case 379: -#line 3001 "cs-parser.jay" +#line 2993 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2416,13 +2417,13 @@ case 380: case_380(); break; case 381: -#line 3010 "cs-parser.jay" +#line 3002 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 3014 "cs-parser.jay" +#line 3006 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2440,63 +2441,63 @@ case 386: case_386(); break; case 387: -#line 3053 "cs-parser.jay" +#line 3045 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3054 "cs-parser.jay" +#line 3046 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3055 "cs-parser.jay" +#line 3047 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3056 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3057 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3058 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3063 "cs-parser.jay" +#line 3055 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3064 "cs-parser.jay" +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3065 "cs-parser.jay" +#line 3057 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3066 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3067 "cs-parser.jay" +#line 3059 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3068 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3069 "cs-parser.jay" +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3070 "cs-parser.jay" +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3071 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2506,22 +2507,22 @@ case 424: case_424(); break; case 428: -#line 3118 "cs-parser.jay" +#line 3110 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3122 "cs-parser.jay" +#line 3114 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3123 "cs-parser.jay" +#line 3115 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3156 "cs-parser.jay" +#line 3148 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2539,7 +2540,7 @@ case 440: case_440(); break; case 441: -#line 3188 "cs-parser.jay" +#line 3180 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2548,7 +2549,7 @@ case 442: case_442(); break; case 443: -#line 3196 "cs-parser.jay" +#line 3188 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2560,7 +2561,7 @@ case 445: case_445(); break; case 446: -#line 3212 "cs-parser.jay" +#line 3204 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2570,11 +2571,11 @@ case 449: case_449(); break; case 450: -#line 3235 "cs-parser.jay" +#line 3227 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3239 "cs-parser.jay" +#line 3231 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2592,7 +2593,7 @@ case 455: case_455(); break; case 456: -#line 3272 "cs-parser.jay" +#line 3264 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2607,7 +2608,7 @@ case 459: case_459(); break; case 462: -#line 3300 "cs-parser.jay" +#line 3292 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2626,7 +2627,7 @@ case 468: case_468(); break; case 469: -#line 3352 "cs-parser.jay" +#line 3344 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2662,13 +2663,13 @@ case 483: case_483(); break; case 484: -#line 3439 "cs-parser.jay" +#line 3431 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3447 "cs-parser.jay" +#line 3439 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2680,13 +2681,13 @@ case 488: case_488(); break; case 489: -#line 3467 "cs-parser.jay" +#line 3459 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3474 "cs-parser.jay" +#line 3466 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2713,7 +2714,7 @@ case 497: case_497(); break; case 498: -#line 3540 "cs-parser.jay" +#line 3532 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2725,7 +2726,7 @@ case 500: case_500(); break; case 503: -#line 3567 "cs-parser.jay" +#line 3559 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2756,25 +2757,25 @@ case 516: case_516(); break; case 517: -#line 3645 "cs-parser.jay" +#line 3637 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3649 "cs-parser.jay" +#line 3641 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3656 "cs-parser.jay" +#line 3648 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3660 "cs-parser.jay" +#line 3652 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2792,7 +2793,7 @@ case 524: case_524(); break; case 525: -#line 3704 "cs-parser.jay" +#line 3696 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2837,7 +2838,7 @@ case 540: case_540(); break; case 541: -#line 3818 "cs-parser.jay" +#line 3810 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2846,25 +2847,25 @@ case 542: case_542(); break; case 543: -#line 3831 "cs-parser.jay" +#line 3823 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3835 "cs-parser.jay" +#line 3827 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3842 "cs-parser.jay" +#line 3834 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3850 "cs-parser.jay" +#line 3842 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2876,13 +2877,13 @@ case 549: case_549(); break; case 551: -#line 3876 "cs-parser.jay" +#line 3868 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3880 "cs-parser.jay" +#line 3872 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2894,37 +2895,37 @@ case 556: case_556(); break; case 558: -#line 3910 "cs-parser.jay" +#line 3902 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3914 "cs-parser.jay" +#line 3906 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3918 "cs-parser.jay" +#line 3910 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3922 "cs-parser.jay" +#line 3914 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3926 "cs-parser.jay" +#line 3918 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3930 "cs-parser.jay" +#line 3922 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2942,7 +2943,7 @@ case 569: case_569(); break; case 570: -#line 3962 "cs-parser.jay" +#line 3954 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2951,13 +2952,13 @@ case 571: case_571(); break; case 572: -#line 3971 "cs-parser.jay" +#line 3963 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3975 "cs-parser.jay" +#line 3967 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3008,7 +3009,7 @@ case 598: case_598(); break; case 599: -#line 4099 "cs-parser.jay" +#line 4091 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3059,14 +3060,14 @@ case 614: case_614(); break; case 615: -#line 4196 "cs-parser.jay" +#line 4188 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4211 "cs-parser.jay" +#line 4203 "cs-parser.jay" { start_block (lexer.Location); } @@ -3090,7 +3091,7 @@ case 626: case_626(); break; case 627: -#line 4256 "cs-parser.jay" +#line 4248 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3102,7 +3103,7 @@ case 629: case_629(); break; case 630: -#line 4270 "cs-parser.jay" +#line 4262 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3114,7 +3115,7 @@ case 632: case_632(); break; case 638: -#line 4295 "cs-parser.jay" +#line 4287 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3129,13 +3130,13 @@ case 641: case_641(); break; case 643: -#line 4324 "cs-parser.jay" +#line 4316 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4337 "cs-parser.jay" +#line 4329 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3153,11 +3154,11 @@ case 648: case_648(); break; case 649: -#line 4380 "cs-parser.jay" +#line 4370 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4382 "cs-parser.jay" +#line 4372 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3215,7 +3216,7 @@ case 671: case_671(); break; case 673: -#line 4511 "cs-parser.jay" +#line 4501 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3245,19 +3246,19 @@ case 681: case_681(); break; case 682: -#line 4600 "cs-parser.jay" +#line 4590 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4604 "cs-parser.jay" +#line 4594 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4611 "cs-parser.jay" +#line 4601 "cs-parser.jay" { yyVal = Variance.None; } @@ -3266,13 +3267,13 @@ case 685: case_685(); break; case 686: -#line 4625 "cs-parser.jay" +#line 4615 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4629 "cs-parser.jay" +#line 4619 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3281,7 +3282,7 @@ case 688: case_688(); break; case 689: -#line 4654 "cs-parser.jay" +#line 4644 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3299,13 +3300,13 @@ case 693: case_693(); break; case 698: -#line 4698 "cs-parser.jay" +#line 4688 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4702 "cs-parser.jay" +#line 4692 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3314,13 +3315,13 @@ case 701: case_701(); break; case 704: -#line 4726 "cs-parser.jay" +#line 4716 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4730 "cs-parser.jay" +#line 4720 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3353,13 +3354,13 @@ case 744: case_744(); break; case 745: -#line 4874 "cs-parser.jay" +#line 4864 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4878 "cs-parser.jay" +#line 4868 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3371,7 +3372,7 @@ case 749: case_749(); break; case 750: -#line 4899 "cs-parser.jay" +#line 4889 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3401,7 +3402,7 @@ case 763: case_763(); break; case 764: -#line 4988 "cs-parser.jay" +#line 4978 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3422,15 +3423,15 @@ case 774: case_774(); break; case 775: -#line 5038 "cs-parser.jay" +#line 5028 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5042 "cs-parser.jay" +#line 5032 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5043 "cs-parser.jay" +#line 5033 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3449,7 +3450,7 @@ case 784: case_784(); break; case 785: -#line 5111 "cs-parser.jay" +#line 5101 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3470,13 +3471,13 @@ case 791: case_791(); break; case 792: -#line 5155 "cs-parser.jay" +#line 5145 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5159 "cs-parser.jay" +#line 5149 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3491,7 +3492,7 @@ case 796: case_796(); break; case 797: -#line 5188 "cs-parser.jay" +#line 5178 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3506,7 +3507,7 @@ case 804: case_804(); break; case 805: -#line 5227 "cs-parser.jay" +#line 5217 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3518,7 +3519,7 @@ case 807: case_807(); break; case 808: -#line 5255 "cs-parser.jay" +#line 5245 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3528,11 +3529,11 @@ case 811: case_811(); break; case 813: -#line 5276 "cs-parser.jay" +#line 5266 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5281 "cs-parser.jay" +#line 5271 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3575,7 +3576,7 @@ case 837: case_837(); break; case 840: -#line 5436 "cs-parser.jay" +#line 5426 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3596,7 +3597,7 @@ case 845: case_845(); break; case 848: -#line 5489 "cs-parser.jay" +#line 5479 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3605,7 +3606,7 @@ case 849: case_849(); break; case 850: -#line 5508 "cs-parser.jay" +#line 5498 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3614,13 +3615,13 @@ case 851: case_851(); break; case 852: -#line 5526 "cs-parser.jay" +#line 5516 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5533 "cs-parser.jay" +#line 5523 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3629,7 +3630,7 @@ case 854: case_854(); break; case 855: -#line 5543 "cs-parser.jay" +#line 5533 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3659,7 +3660,7 @@ case 863: case_863(); break; case 864: -#line 5626 "cs-parser.jay" +#line 5616 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3692,7 +3693,7 @@ case 873: case_873(); break; case 874: -#line 5726 "cs-parser.jay" +#line 5716 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3701,7 +3702,7 @@ case 875: case_875(); break; case 876: -#line 5741 "cs-parser.jay" +#line 5731 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3716,7 +3717,7 @@ case 880: case_880(); break; case 881: -#line 5786 "cs-parser.jay" +#line 5776 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3737,7 +3738,7 @@ case 889: case_889(); break; case 895: -#line 5845 "cs-parser.jay" +#line 5835 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3746,7 +3747,7 @@ case 896: case_896(); break; case 897: -#line 5864 "cs-parser.jay" +#line 5854 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3779,13 +3780,13 @@ case 906: case_906(); break; case 908: -#line 6008 "cs-parser.jay" +#line 5998 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 6015 "cs-parser.jay" +#line 6005 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3806,7 +3807,7 @@ case 916: case_916(); break; case 917: -#line 6061 "cs-parser.jay" +#line 6051 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3818,7 +3819,7 @@ case 919: case_919(); break; case 920: -#line 6078 "cs-parser.jay" +#line 6068 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3842,13 +3843,13 @@ case 929: case_929(); break; case 937: -#line 6202 "cs-parser.jay" +#line 6192 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6209 "cs-parser.jay" +#line 6199 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3860,13 +3861,13 @@ case 940: case_940(); break; case 941: -#line 6226 "cs-parser.jay" +#line 6216 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6230 "cs-parser.jay" +#line 6220 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3884,25 +3885,25 @@ case 946: case_946(); break; case 948: -#line 6266 "cs-parser.jay" +#line 6256 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6274 "cs-parser.jay" +#line 6264 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6278 "cs-parser.jay" +#line 6268 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6285 "cs-parser.jay" +#line 6275 "cs-parser.jay" { yyVal = new List (0); } @@ -3952,7 +3953,7 @@ case 956: All more than 3 lines long rules are wrapped into a method */ void case_6() -#line 405 "cs-parser.jay" +#line 406 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { Attributes attrs = (Attributes) yyVals[0+yyTop]; @@ -3962,7 +3963,7 @@ void case_6() } void case_8() -#line 417 "cs-parser.jay" +#line 418 "cs-parser.jay" { if (yyToken == Token.EXTERN_ALIAS) report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); @@ -3971,7 +3972,7 @@ void case_8() } void case_13() -#line 437 "cs-parser.jay" +#line 438 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -3987,21 +3988,21 @@ void case_13() } void case_17() -#line 463 "cs-parser.jay" +#line 464 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_18() -#line 468 "cs-parser.jay" +#line 469 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_19() -#line 476 "cs-parser.jay" +#line 477 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") { @@ -4014,21 +4015,21 @@ void case_19() } void case_20() -#line 487 "cs-parser.jay" +#line 488 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_21() -#line 495 "cs-parser.jay" +#line 496 "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_22() -#line 508 "cs-parser.jay" +#line 509 "cs-parser.jay" { Attributes attrs = (Attributes) yyVals[-2+yyTop]; MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4061,7 +4062,7 @@ void case_22() } void case_23() -#line 539 "cs-parser.jay" +#line 540 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -4069,7 +4070,7 @@ void case_23() } void case_24() -#line 545 "cs-parser.jay" +#line 546 "cs-parser.jay" { current_namespace = current_namespace.Parent; current_class = current_namespace.SlaveDeclSpace; @@ -4082,14 +4083,14 @@ void case_24() } void case_25() -#line 559 "cs-parser.jay" +#line 560 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName (lt.Value, lt.Location); } void case_26() -#line 564 "cs-parser.jay" +#line 565 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); @@ -4097,14 +4098,14 @@ void case_26() } void case_27() -#line 570 "cs-parser.jay" +#line 571 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 588 "cs-parser.jay" +#line 589 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4115,7 +4116,7 @@ void case_32() } void case_41() -#line 620 "cs-parser.jay" +#line 621 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4136,7 +4137,7 @@ void case_41() } void case_50() -#line 670 "cs-parser.jay" +#line 671 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4148,7 +4149,7 @@ void case_50() } void case_51() -#line 680 "cs-parser.jay" +#line 681 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4160,21 +4161,21 @@ void case_51() } void case_52() -#line 693 "cs-parser.jay" +#line 694 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 698 "cs-parser.jay" +#line 699 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 706 "cs-parser.jay" +#line 707 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4183,7 +4184,7 @@ void case_54() } void case_55() -#line 713 "cs-parser.jay" +#line 714 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4197,21 +4198,21 @@ void case_55() } void case_56() -#line 725 "cs-parser.jay" +#line 726 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_57() -#line 733 "cs-parser.jay" +#line 734 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } void case_60() -#line 740 "cs-parser.jay" +#line 741 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4223,7 +4224,7 @@ void case_60() } void case_62() -#line 757 "cs-parser.jay" +#line 758 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4233,7 +4234,7 @@ void case_62() } void case_64() -#line 772 "cs-parser.jay" +#line 773 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4251,7 +4252,7 @@ void case_64() } void case_67() -#line 796 "cs-parser.jay" +#line 797 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4259,7 +4260,7 @@ void case_67() } void case_69() -#line 807 "cs-parser.jay" +#line 808 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4267,7 +4268,7 @@ void case_69() } void case_70() -#line 813 "cs-parser.jay" +#line 814 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4275,7 +4276,7 @@ void case_70() } void case_71() -#line 819 "cs-parser.jay" +#line 820 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4292,7 +4293,7 @@ void case_71() } void case_72() -#line 834 "cs-parser.jay" +#line 835 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4304,7 +4305,7 @@ void case_72() } void case_76() -#line 859 "cs-parser.jay" +#line 860 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4313,7 +4314,7 @@ void case_76() } void case_77() -#line 869 "cs-parser.jay" +#line 870 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4326,7 +4327,7 @@ void case_77() } void case_95() -#line 916 "cs-parser.jay" +#line 917 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4335,7 +4336,7 @@ void case_95() } void case_97() -#line 933 "cs-parser.jay" +#line 934 "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]); @@ -4343,7 +4344,7 @@ void case_97() } void case_98() -#line 940 "cs-parser.jay" +#line 941 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4355,7 +4356,7 @@ void case_98() } void case_99() -#line 950 "cs-parser.jay" +#line 951 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -4363,21 +4364,22 @@ void case_99() } void case_100() -#line 956 "cs-parser.jay" +#line 957 "cs-parser.jay" { - lbag.AppendToMember (current_class, GetLocation (yyVals[0+yyTop])); + if (yyVals[0+yyTop] != null) + current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); yyVal = pop_current_class (); } void case_102() -#line 968 "cs-parser.jay" +#line 970 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_118() -#line 1010 "cs-parser.jay" +#line 1012 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4392,7 +4394,7 @@ void case_118() } void case_119() -#line 1023 "cs-parser.jay" +#line 1025 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4405,7 +4407,7 @@ void case_119() } void case_124() -#line 1053 "cs-parser.jay" +#line 1055 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4413,7 +4415,7 @@ void case_124() } void case_126() -#line 1066 "cs-parser.jay" +#line 1068 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4421,14 +4423,14 @@ void case_126() } void case_127() -#line 1072 "cs-parser.jay" +#line 1074 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_130() -#line 1087 "cs-parser.jay" +#line 1089 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4443,7 +4445,7 @@ void case_130() } void case_131() -#line 1102 "cs-parser.jay" +#line 1104 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4456,7 +4458,7 @@ void case_131() } void case_132() -#line 1115 "cs-parser.jay" +#line 1117 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4469,7 +4471,7 @@ void case_132() } void case_133() -#line 1126 "cs-parser.jay" +#line 1128 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4483,7 +4485,7 @@ void case_133() } void case_136() -#line 1149 "cs-parser.jay" +#line 1151 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4491,7 +4493,7 @@ void case_136() } void case_137() -#line 1155 "cs-parser.jay" +#line 1157 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4501,7 +4503,7 @@ void case_137() } void case_142() -#line 1182 "cs-parser.jay" +#line 1184 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4509,7 +4511,7 @@ void case_142() } void case_144() -#line 1192 "cs-parser.jay" +#line 1194 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4518,7 +4520,7 @@ void case_144() } void case_149() -#line 1218 "cs-parser.jay" +#line 1220 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4526,7 +4528,7 @@ void case_149() } void case_151() -#line 1231 "cs-parser.jay" +#line 1233 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4534,14 +4536,14 @@ void case_151() } void case_152() -#line 1237 "cs-parser.jay" +#line 1239 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_155() -#line 1247 "cs-parser.jay" +#line 1249 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4549,7 +4551,7 @@ void case_155() } void case_156() -#line 1256 "cs-parser.jay" +#line 1258 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4559,7 +4561,7 @@ void case_156() } void case_157() -#line 1264 "cs-parser.jay" +#line 1266 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4586,7 +4588,7 @@ void case_157() } void case_160() -#line 1303 "cs-parser.jay" +#line 1305 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4621,14 +4623,14 @@ void case_160() } void case_162() -#line 1344 "cs-parser.jay" +#line 1346 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_164() -#line 1353 "cs-parser.jay" +#line 1355 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4680,7 +4682,7 @@ void case_164() } void case_165() -#line 1406 "cs-parser.jay" +#line 1408 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4698,7 +4700,7 @@ void case_165() } void case_170() -#line 1435 "cs-parser.jay" +#line 1437 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4706,7 +4708,7 @@ void case_170() } void case_171() -#line 1441 "cs-parser.jay" +#line 1443 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4717,7 +4719,7 @@ void case_171() } void case_172() -#line 1450 "cs-parser.jay" +#line 1452 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4728,7 +4730,7 @@ void case_172() } void case_173() -#line 1459 "cs-parser.jay" +#line 1461 "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"); @@ -4738,7 +4740,7 @@ void case_173() } void case_174() -#line 1467 "cs-parser.jay" +#line 1469 "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"); @@ -4753,7 +4755,7 @@ void case_174() } void case_175() -#line 1480 "cs-parser.jay" +#line 1482 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4762,7 +4764,7 @@ void case_175() } void case_176() -#line 1487 "cs-parser.jay" +#line 1489 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4776,14 +4778,14 @@ void case_176() } void case_179() -#line 1507 "cs-parser.jay" +#line 1509 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_180() -#line 1515 "cs-parser.jay" +#line 1517 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4794,7 +4796,7 @@ void case_180() } void case_181() -#line 1524 "cs-parser.jay" +#line 1526 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4814,7 +4816,7 @@ void case_181() } void case_182() -#line 1548 "cs-parser.jay" +#line 1550 "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); @@ -4822,7 +4824,7 @@ void case_182() } void case_183() -#line 1557 "cs-parser.jay" +#line 1559 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4831,7 +4833,7 @@ void case_183() } void case_184() -#line 1567 "cs-parser.jay" +#line 1569 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4840,7 +4842,7 @@ void case_184() } void case_186() -#line 1582 "cs-parser.jay" +#line 1584 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4879,7 +4881,7 @@ void case_186() } void case_190() -#line 1631 "cs-parser.jay" +#line 1633 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4902,7 +4904,7 @@ void case_190() } void case_191() -#line 1655 "cs-parser.jay" +#line 1657 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4911,7 +4913,7 @@ void case_191() } void case_192() -#line 1662 "cs-parser.jay" +#line 1664 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4920,7 +4922,7 @@ void case_192() } void case_193() -#line 1669 "cs-parser.jay" +#line 1671 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4932,14 +4934,14 @@ void case_193() } void case_194() -#line 1682 "cs-parser.jay" +#line 1684 "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_195() -#line 1687 "cs-parser.jay" +#line 1689 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4948,21 +4950,21 @@ void case_195() } void case_196() -#line 1694 "cs-parser.jay" +#line 1696 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_197() -#line 1702 "cs-parser.jay" +#line 1704 "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"); } void case_198() -#line 1707 "cs-parser.jay" +#line 1709 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4973,21 +4975,21 @@ void case_198() } void case_200() -#line 1723 "cs-parser.jay" +#line 1725 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_201() -#line 1734 "cs-parser.jay" +#line 1736 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_202() -#line 1739 "cs-parser.jay" +#line 1741 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5003,7 +5005,7 @@ void case_202() } void case_203() -#line 1753 "cs-parser.jay" +#line 1755 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5012,14 +5014,14 @@ void case_203() } void case_204() -#line 1760 "cs-parser.jay" +#line 1762 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_206() -#line 1774 "cs-parser.jay" +#line 1776 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5046,7 +5048,7 @@ void case_206() } void case_208() -#line 1803 "cs-parser.jay" +#line 1805 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5059,7 +5061,7 @@ void case_208() } void case_213() -#line 1822 "cs-parser.jay" +#line 1824 "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 ()); @@ -5072,7 +5074,7 @@ void case_213() } void case_214() -#line 1836 "cs-parser.jay" +#line 1838 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5095,7 +5097,7 @@ void case_214() } void case_215() -#line 1857 "cs-parser.jay" +#line 1859 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5118,7 +5120,7 @@ void case_215() } void case_216() -#line 1881 "cs-parser.jay" +#line 1883 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5146,7 +5148,7 @@ void case_216() } void case_217() -#line 1907 "cs-parser.jay" +#line 1909 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5169,21 +5171,21 @@ void case_217() } void case_219() -#line 1932 "cs-parser.jay" +#line 1934 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_220() -#line 1937 "cs-parser.jay" +#line 1939 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_222() -#line 1952 "cs-parser.jay" +#line 1954 "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]); @@ -5191,7 +5193,7 @@ void case_222() } void case_223() -#line 1959 "cs-parser.jay" +#line 1961 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5204,7 +5206,7 @@ void case_223() } void case_224() -#line 1970 "cs-parser.jay" +#line 1972 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5212,13 +5214,11 @@ void case_224() } void case_225() -#line 1976 "cs-parser.jay" +#line 1978 "cs-parser.jay" { - if (yyVals[0+yyTop] != null) { - lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); - } else { - lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); - } + if (yyVals[0+yyTop] != null) + current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); + lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); yyVal = pop_current_class (); } @@ -5662,15 +5662,17 @@ void case_318() void case_320() #line 2560 "cs-parser.jay" { + enumCommas.Add (GetLocation (yyVals[-2+yyTop])); if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_321() -#line 2565 "cs-parser.jay" +#line 2566 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; + enumCommas.Add (GetLocation (yyVals[0+yyTop])); MemberName name = (MemberName) yyVals[-3+yyTop]; if (name.IsGeneric) { @@ -5681,7 +5683,7 @@ void case_321() } void case_322() -#line 2577 "cs-parser.jay" +#line 2579 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5689,60 +5691,50 @@ void case_322() } void case_323() -#line 2583 "cs-parser.jay" +#line 2585 "cs-parser.jay" { + enumCommas.Add (GetLocation (yyVals[-1+yyTop])); + if (yyVals[0+yyTop] != null) + current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); if (doc_support) current_class.DocComment = enumTypeComment; --lexer.parsing_declaration; -/* if (doc_support)*/ -/* em.DocComment = ev.DocComment;*/ - if (yyVals[-7+yyTop] != null) { - if (yyVals[0+yyTop] != null) { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), savedEnumBaseTypeColonLocation, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); - } else { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), savedEnumBaseTypeColonLocation, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop])); - } - } else { - if (yyVals[0+yyTop] != null) { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); - } else { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop])); - } - } + lbag.AddMember (current_class, GetModifierLocations (), enumCommas); + enumCommas.Clear (); yyVal = pop_current_class (); } void case_325() -#line 2611 "cs-parser.jay" +#line 2603 "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); yyVal = null; } else { - savedEnumBaseTypeColonLocation = GetLocation (yyVals[-1+yyTop]); + enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } } void case_326() -#line 2622 "cs-parser.jay" +#line 2614 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_331() -#line 2640 "cs-parser.jay" +#line 2632 "cs-parser.jay" { - lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop])); + enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_332() -#line 2648 "cs-parser.jay" +#line 2640 "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]); @@ -5757,7 +5749,7 @@ void case_332() } void case_333() -#line 2661 "cs-parser.jay" +#line 2653 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5767,7 +5759,7 @@ void case_333() } void case_334() -#line 2669 "cs-parser.jay" +#line 2661 "cs-parser.jay" { --lexer.parsing_block; @@ -5783,7 +5775,7 @@ void case_334() } void case_336() -#line 2694 "cs-parser.jay" +#line 2686 "cs-parser.jay" { valid_param_mod = 0; @@ -5803,7 +5795,7 @@ void case_336() } void case_338() -#line 2716 "cs-parser.jay" +#line 2708 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5819,7 +5811,7 @@ void case_338() } void case_340() -#line 2734 "cs-parser.jay" +#line 2726 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5828,7 +5820,7 @@ void case_340() } void case_342() -#line 2745 "cs-parser.jay" +#line 2737 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5837,7 +5829,7 @@ void case_342() } void case_344() -#line 2756 "cs-parser.jay" +#line 2748 "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); @@ -5845,14 +5837,14 @@ void case_344() } void case_345() -#line 2765 "cs-parser.jay" +#line 2757 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_347() -#line 2777 "cs-parser.jay" +#line 2769 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5865,14 +5857,14 @@ void case_347() } void case_348() -#line 2788 "cs-parser.jay" +#line 2780 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_349() -#line 2796 "cs-parser.jay" +#line 2788 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5881,7 +5873,7 @@ void case_349() } void case_350() -#line 2803 "cs-parser.jay" +#line 2795 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5890,7 +5882,7 @@ void case_350() } void case_352() -#line 2820 "cs-parser.jay" +#line 2812 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5898,7 +5890,7 @@ void case_352() } void case_353() -#line 2829 "cs-parser.jay" +#line 2821 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5907,7 +5899,7 @@ void case_353() } void case_355() -#line 2840 "cs-parser.jay" +#line 2832 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5915,21 +5907,21 @@ void case_355() } void case_356() -#line 2849 "cs-parser.jay" +#line 2841 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_357() -#line 2854 "cs-parser.jay" +#line 2846 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_358() -#line 2862 "cs-parser.jay" +#line 2854 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5937,7 +5929,7 @@ void case_358() } void case_359() -#line 2868 "cs-parser.jay" +#line 2860 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5947,7 +5939,7 @@ void case_359() } void case_360() -#line 2876 "cs-parser.jay" +#line 2868 "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); @@ -5955,7 +5947,7 @@ void case_360() } void case_362() -#line 2886 "cs-parser.jay" +#line 2878 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5965,7 +5957,7 @@ void case_362() } void case_363() -#line 2897 "cs-parser.jay" +#line 2889 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5973,7 +5965,7 @@ void case_363() } void case_364() -#line 2903 "cs-parser.jay" +#line 2895 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5982,14 +5974,14 @@ void case_364() } void case_365() -#line 2913 "cs-parser.jay" +#line 2905 "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_366() -#line 2918 "cs-parser.jay" +#line 2910 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6000,28 +5992,28 @@ void case_366() } void case_371() -#line 2952 "cs-parser.jay" +#line 2944 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2961 "cs-parser.jay" +#line 2953 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2970 "cs-parser.jay" +#line 2962 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2986 "cs-parser.jay" +#line 2978 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6036,14 +6028,14 @@ void case_378() } void case_380() -#line 3003 "cs-parser.jay" +#line 2995 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 3019 "cs-parser.jay" +#line 3011 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6051,7 +6043,7 @@ void case_383() } void case_384() -#line 3025 "cs-parser.jay" +#line 3017 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6060,7 +6052,7 @@ void case_384() } void case_385() -#line 3035 "cs-parser.jay" +#line 3027 "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 ()); @@ -6069,35 +6061,35 @@ void case_385() } void case_386() -#line 3042 "cs-parser.jay" +#line 3034 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3104 "cs-parser.jay" +#line 3096 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3108 "cs-parser.jay" +#line 3100 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3149 "cs-parser.jay" +#line 3141 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3161 "cs-parser.jay" +#line 3153 "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); @@ -6105,7 +6097,7 @@ void case_437() } void case_438() -#line 3167 "cs-parser.jay" +#line 3159 "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); @@ -6113,7 +6105,7 @@ void case_438() } void case_439() -#line 3173 "cs-parser.jay" +#line 3165 "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); @@ -6121,7 +6113,7 @@ void case_439() } void case_440() -#line 3179 "cs-parser.jay" +#line 3171 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6131,28 +6123,28 @@ void case_440() } void case_442() -#line 3189 "cs-parser.jay" +#line 3181 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3197 "cs-parser.jay" +#line 3189 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3205 "cs-parser.jay" +#line 3197 "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_448() -#line 3218 "cs-parser.jay" +#line 3210 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6164,14 +6156,14 @@ void case_448() } void case_449() -#line 3228 "cs-parser.jay" +#line 3220 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3244 "cs-parser.jay" +#line 3236 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6179,7 +6171,7 @@ void case_452() } void case_453() -#line 3250 "cs-parser.jay" +#line 3242 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6188,14 +6180,14 @@ void case_453() } void case_454() -#line 3256 "cs-parser.jay" +#line 3248 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3264 "cs-parser.jay" +#line 3256 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6203,7 +6195,7 @@ void case_455() } void case_457() -#line 3273 "cs-parser.jay" +#line 3265 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6213,7 +6205,7 @@ void case_457() } void case_458() -#line 3281 "cs-parser.jay" +#line 3273 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6222,14 +6214,14 @@ void case_458() } void case_459() -#line 3288 "cs-parser.jay" +#line 3280 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3306 "cs-parser.jay" +#line 3298 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6237,7 +6229,7 @@ void case_464() } void case_465() -#line 3312 "cs-parser.jay" +#line 3304 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6249,7 +6241,7 @@ void case_465() } void case_466() -#line 3322 "cs-parser.jay" +#line 3314 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6266,56 +6258,56 @@ void case_466() } void case_467() -#line 3337 "cs-parser.jay" +#line 3329 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3342 "cs-parser.jay" +#line 3334 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3363 "cs-parser.jay" +#line 3355 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3368 "cs-parser.jay" +#line 3360 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3373 "cs-parser.jay" +#line 3365 "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_476() -#line 3378 "cs-parser.jay" +#line 3370 "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_478() -#line 3390 "cs-parser.jay" +#line 3382 "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_479() -#line 3398 "cs-parser.jay" +#line 3390 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6323,7 +6315,7 @@ void case_479() } void case_480() -#line 3404 "cs-parser.jay" +#line 3396 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6332,14 +6324,14 @@ void case_480() } void case_481() -#line 3410 "cs-parser.jay" +#line 3402 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3418 "cs-parser.jay" +#line 3410 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6347,7 +6339,7 @@ void case_482() } void case_483() -#line 3424 "cs-parser.jay" +#line 3416 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6359,21 +6351,21 @@ void case_483() } void case_487() -#line 3452 "cs-parser.jay" +#line 3444 "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_488() -#line 3457 "cs-parser.jay" +#line 3449 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3479 "cs-parser.jay" +#line 3471 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6388,7 +6380,7 @@ void case_491() } void case_492() -#line 3492 "cs-parser.jay" +#line 3484 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6397,7 +6389,7 @@ void case_492() } void case_493() -#line 3504 "cs-parser.jay" +#line 3496 "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])) { @@ -6407,7 +6399,7 @@ void case_493() } void case_494() -#line 3512 "cs-parser.jay" +#line 3504 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6416,7 +6408,7 @@ void case_494() } void case_495() -#line 3519 "cs-parser.jay" +#line 3511 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6425,28 +6417,28 @@ void case_495() } void case_496() -#line 3526 "cs-parser.jay" +#line 3518 "cs-parser.jay" { 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_497() -#line 3531 "cs-parser.jay" +#line 3523 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3542 "cs-parser.jay" +#line 3534 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3550 "cs-parser.jay" +#line 3542 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6458,7 +6450,7 @@ void case_500() } void case_505() -#line 3573 "cs-parser.jay" +#line 3565 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6466,7 +6458,7 @@ void case_505() } void case_506() -#line 3579 "cs-parser.jay" +#line 3571 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6476,7 +6468,7 @@ void case_506() } void case_507() -#line 3590 "cs-parser.jay" +#line 3582 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6484,7 +6476,7 @@ void case_507() } void case_508() -#line 3596 "cs-parser.jay" +#line 3588 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6492,14 +6484,14 @@ void case_508() } void case_509() -#line 3602 "cs-parser.jay" +#line 3594 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3607 "cs-parser.jay" +#line 3599 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6507,28 +6499,28 @@ void case_510() } void case_514() -#line 3622 "cs-parser.jay" +#line 3614 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3630 "cs-parser.jay" +#line 3622 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3635 "cs-parser.jay" +#line 3627 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3665 "cs-parser.jay" +#line 3657 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6537,7 +6529,7 @@ void case_521() } void case_522() -#line 3672 "cs-parser.jay" +#line 3664 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6550,7 +6542,7 @@ void case_522() } void case_523() -#line 3686 "cs-parser.jay" +#line 3678 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6558,7 +6550,7 @@ void case_523() } void case_524() -#line 3692 "cs-parser.jay" +#line 3684 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6567,7 +6559,7 @@ void case_524() } void case_526() -#line 3706 "cs-parser.jay" +#line 3698 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6575,14 +6567,14 @@ void case_526() } void case_529() -#line 3717 "cs-parser.jay" +#line 3709 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3725 "cs-parser.jay" +#line 3717 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6590,7 +6582,7 @@ void case_530() } void case_531() -#line 3731 "cs-parser.jay" +#line 3723 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6600,7 +6592,7 @@ void case_531() } void case_532() -#line 3739 "cs-parser.jay" +#line 3731 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6608,7 +6600,7 @@ void case_532() } void case_533() -#line 3745 "cs-parser.jay" +#line 3737 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6616,7 +6608,7 @@ void case_533() } void case_534() -#line 3751 "cs-parser.jay" +#line 3743 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6627,7 +6619,7 @@ void case_534() } void case_535() -#line 3763 "cs-parser.jay" +#line 3755 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6636,7 +6628,7 @@ void case_535() } void case_536() -#line 3773 "cs-parser.jay" +#line 3765 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6646,35 +6638,35 @@ void case_536() } void case_537() -#line 3784 "cs-parser.jay" +#line 3776 "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_538() -#line 3792 "cs-parser.jay" +#line 3784 "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_539() -#line 3800 "cs-parser.jay" +#line 3792 "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_540() -#line 3808 "cs-parser.jay" +#line 3800 "cs-parser.jay" { 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_542() -#line 3820 "cs-parser.jay" +#line 3812 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6685,7 +6677,7 @@ void case_542() } void case_548() -#line 3852 "cs-parser.jay" +#line 3844 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6694,7 +6686,7 @@ void case_548() } void case_549() -#line 3862 "cs-parser.jay" +#line 3854 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6704,147 +6696,147 @@ void case_549() } void case_555() -#line 3887 "cs-parser.jay" +#line 3879 "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_556() -#line 3895 "cs-parser.jay" +#line 3887 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3936 "cs-parser.jay" +#line 3928 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3941 "cs-parser.jay" +#line 3933 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3946 "cs-parser.jay" +#line 3938 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3955 "cs-parser.jay" +#line 3947 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3964 "cs-parser.jay" +#line 3956 "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_575() -#line 3981 "cs-parser.jay" +#line 3973 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3986 "cs-parser.jay" +#line 3978 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3995 "cs-parser.jay" +#line 3987 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 4000 "cs-parser.jay" +#line 3992 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4005 "cs-parser.jay" +#line 3997 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4010 "cs-parser.jay" +#line 4002 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 4019 "cs-parser.jay" +#line 4011 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 4024 "cs-parser.jay" +#line 4016 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4033 "cs-parser.jay" +#line 4025 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4042 "cs-parser.jay" +#line 4034 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4051 "cs-parser.jay" +#line 4043 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4060 "cs-parser.jay" +#line 4052 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4069 "cs-parser.jay" +#line 4061 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4078 "cs-parser.jay" +#line 4070 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6853,84 +6845,84 @@ void case_596() } void case_598() -#line 4089 "cs-parser.jay" +#line 4081 "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_600() -#line 4101 "cs-parser.jay" +#line 4093 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4106 "cs-parser.jay" +#line 4098 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4111 "cs-parser.jay" +#line 4103 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4116 "cs-parser.jay" +#line 4108 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4121 "cs-parser.jay" +#line 4113 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4126 "cs-parser.jay" +#line 4118 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4131 "cs-parser.jay" +#line 4123 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4136 "cs-parser.jay" +#line 4128 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4141 "cs-parser.jay" +#line 4133 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4146 "cs-parser.jay" +#line 4138 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4154 "cs-parser.jay" +#line 4146 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6939,7 +6931,7 @@ void case_610() } void case_611() -#line 4161 "cs-parser.jay" +#line 4153 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6954,7 +6946,7 @@ void case_611() } void case_612() -#line 4177 "cs-parser.jay" +#line 4169 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6962,7 +6954,7 @@ void case_612() } void case_613() -#line 4183 "cs-parser.jay" +#line 4175 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6970,21 +6962,21 @@ void case_613() } void case_614() -#line 4189 "cs-parser.jay" +#line 4181 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4197 "cs-parser.jay" +#line 4189 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4213 "cs-parser.jay" +#line 4205 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6993,14 +6985,14 @@ void case_620() } void case_622() -#line 4224 "cs-parser.jay" +#line 4216 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4232 "cs-parser.jay" +#line 4224 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7008,14 +7000,14 @@ void case_623() } void case_624() -#line 4238 "cs-parser.jay" +#line 4230 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4243 "cs-parser.jay" +#line 4235 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7023,63 +7015,63 @@ void case_625() } void case_626() -#line 4249 "cs-parser.jay" +#line 4241 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4258 "cs-parser.jay" +#line 4250 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4263 "cs-parser.jay" +#line 4255 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4272 "cs-parser.jay" +#line 4264 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4277 "cs-parser.jay" +#line 4269 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4300 "cs-parser.jay" +#line 4292 "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_640() -#line 4305 "cs-parser.jay" +#line 4297 "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_641() -#line 4310 "cs-parser.jay" +#line 4302 "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_645() -#line 4339 "cs-parser.jay" +#line 4331 "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]); @@ -7087,12 +7079,12 @@ void case_645() FeatureIsNotAvailable (c.Location, "static classes"); } - lbag.AddMember (current_class, GetModifierLocations ()); push_current_class (c, yyVals[-3+yyTop]); + lbag.AddMember (current_class, GetModifierLocations ()); } void case_646() -#line 4351 "cs-parser.jay" +#line 4343 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7105,7 +7097,7 @@ void case_646() } void case_647() -#line 4362 "cs-parser.jay" +#line 4354 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7113,25 +7105,23 @@ void case_647() } void case_648() -#line 4368 "cs-parser.jay" +#line 4360 "cs-parser.jay" { - if (yyVals[0+yyTop] != null) { - lbag.AppendToMember (current_class, GetLocation (yyVals[-11+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); - } else { - lbag.AppendToMember (current_class, GetLocation (yyVals[-11+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); - } + lbag.AppendToMember (current_class, GetLocation (yyVals[-11+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); + if (yyVals[0+yyTop] != null) + current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); yyVal = pop_current_class (); } void case_651() -#line 4387 "cs-parser.jay" +#line 4377 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4397 "cs-parser.jay" +#line 4387 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7149,7 +7139,7 @@ void case_654() } void case_655() -#line 4416 "cs-parser.jay" +#line 4406 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7159,91 +7149,91 @@ void case_655() } void case_656() -#line 4424 "cs-parser.jay" +#line 4414 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4429 "cs-parser.jay" +#line 4419 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4434 "cs-parser.jay" +#line 4424 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4439 "cs-parser.jay" +#line 4429 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4444 "cs-parser.jay" +#line 4434 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4449 "cs-parser.jay" +#line 4439 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4454 "cs-parser.jay" +#line 4444 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4459 "cs-parser.jay" +#line 4449 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4464 "cs-parser.jay" +#line 4454 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4469 "cs-parser.jay" +#line 4459 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4474 "cs-parser.jay" +#line 4464 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4479 "cs-parser.jay" +#line 4469 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4484 "cs-parser.jay" +#line 4474 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7252,28 +7242,28 @@ void case_668() } void case_669() -#line 4491 "cs-parser.jay" +#line 4481 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_671() -#line 4500 "cs-parser.jay" +#line 4490 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_674() -#line 4513 "cs-parser.jay" +#line 4503 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4521 "cs-parser.jay" +#line 4511 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7281,7 +7271,7 @@ void case_675() } void case_676() -#line 4527 "cs-parser.jay" +#line 4517 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7299,14 +7289,14 @@ void case_676() } void case_677() -#line 4546 "cs-parser.jay" +#line 4536 "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_678() -#line 4554 "cs-parser.jay" +#line 4544 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7314,7 +7304,7 @@ void case_678() } void case_679() -#line 4560 "cs-parser.jay" +#line 4550 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7339,7 +7329,7 @@ void case_679() } void case_680() -#line 4586 "cs-parser.jay" +#line 4576 "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 ()); @@ -7348,14 +7338,14 @@ void case_680() } void case_681() -#line 4593 "cs-parser.jay" +#line 4583 "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_685() -#line 4613 "cs-parser.jay" +#line 4603 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7364,77 +7354,77 @@ void case_685() } void case_688() -#line 4647 "cs-parser.jay" +#line 4637 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4659 "cs-parser.jay" +#line 4649 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4664 "cs-parser.jay" +#line 4654 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4673 "cs-parser.jay" +#line 4663 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4678 "cs-parser.jay" +#line 4668 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4705 "cs-parser.jay" +#line 4695 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4769 "cs-parser.jay" +#line 4759 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4774 "cs-parser.jay" +#line 4764 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4779 "cs-parser.jay" +#line 4769 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4787 "cs-parser.jay" +#line 4777 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4795 "cs-parser.jay" +#line 4785 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7444,7 +7434,7 @@ void case_738() } void case_741() -#line 4808 "cs-parser.jay" +#line 4798 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7453,7 +7443,7 @@ void case_741() } void case_742() -#line 4824 "cs-parser.jay" +#line 4814 "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*/ @@ -7485,7 +7475,7 @@ void case_742() } void case_743() -#line 4854 "cs-parser.jay" +#line 4844 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7498,7 +7488,7 @@ void case_743() } void case_744() -#line 4865 "cs-parser.jay" +#line 4855 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7507,21 +7497,21 @@ void case_744() } void case_747() -#line 4880 "cs-parser.jay" +#line 4870 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4889 "cs-parser.jay" +#line 4879 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4904 "cs-parser.jay" +#line 4894 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7530,7 +7520,7 @@ void case_751() } void case_752() -#line 4911 "cs-parser.jay" +#line 4901 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7538,7 +7528,7 @@ void case_752() } void case_753() -#line 4917 "cs-parser.jay" +#line 4907 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7547,7 +7537,7 @@ void case_753() } void case_754() -#line 4924 "cs-parser.jay" +#line 4914 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7559,14 +7549,14 @@ void case_754() } void case_756() -#line 4938 "cs-parser.jay" +#line 4928 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4943 "cs-parser.jay" +#line 4933 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7577,7 +7567,7 @@ void case_757() } void case_762() -#line 4965 "cs-parser.jay" +#line 4955 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7588,7 +7578,7 @@ void case_762() } void case_763() -#line 4974 "cs-parser.jay" +#line 4964 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7599,14 +7589,14 @@ void case_763() } void case_765() -#line 4990 "cs-parser.jay" +#line 4980 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 5008 "cs-parser.jay" +#line 4998 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7617,28 +7607,28 @@ void case_770() } void case_772() -#line 5021 "cs-parser.jay" +#line 5011 "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_773() -#line 5026 "cs-parser.jay" +#line 5016 "cs-parser.jay" { 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_774() -#line 5034 "cs-parser.jay" +#line 5024 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5052 "cs-parser.jay" +#line 5042 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7650,7 +7640,7 @@ void case_778() } void case_779() -#line 5065 "cs-parser.jay" +#line 5055 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7660,14 +7650,14 @@ void case_779() } void case_780() -#line 5073 "cs-parser.jay" +#line 5063 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5087 "cs-parser.jay" +#line 5077 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7677,7 +7667,7 @@ void case_783() } void case_784() -#line 5096 "cs-parser.jay" +#line 5086 "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])); @@ -7689,7 +7679,7 @@ void case_784() } void case_786() -#line 5113 "cs-parser.jay" +#line 5103 "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])); @@ -7697,14 +7687,14 @@ void case_786() } void case_787() -#line 5122 "cs-parser.jay" +#line 5112 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5131 "cs-parser.jay" +#line 5121 "cs-parser.jay" { var sections = new List (4); @@ -7713,7 +7703,7 @@ void case_789() } void case_790() -#line 5138 "cs-parser.jay" +#line 5128 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7722,14 +7712,14 @@ void case_790() } void case_791() -#line 5145 "cs-parser.jay" +#line 5135 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5164 "cs-parser.jay" +#line 5154 "cs-parser.jay" { var labels = new List (2); @@ -7738,7 +7728,7 @@ void case_794() } void case_795() -#line 5171 "cs-parser.jay" +#line 5161 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7747,14 +7737,14 @@ void case_795() } void case_796() -#line 5181 "cs-parser.jay" +#line 5171 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5200 "cs-parser.jay" +#line 5190 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7764,21 +7754,21 @@ void case_802() } void case_803() -#line 5212 "cs-parser.jay" +#line 5202 "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_804() -#line 5220 "cs-parser.jay" +#line 5210 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5236 "cs-parser.jay" +#line 5226 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7792,14 +7782,14 @@ void case_806() } void case_807() -#line 5248 "cs-parser.jay" +#line 5238 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5261 "cs-parser.jay" +#line 5251 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7808,14 +7798,14 @@ void case_810() } void case_811() -#line 5268 "cs-parser.jay" +#line 5258 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5292 "cs-parser.jay" +#line 5282 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7830,14 +7820,14 @@ void case_819() } void case_820() -#line 5308 "cs-parser.jay" +#line 5298 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5313 "cs-parser.jay" +#line 5303 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7848,7 +7838,7 @@ void case_821() } void case_822() -#line 5322 "cs-parser.jay" +#line 5312 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7861,21 +7851,21 @@ void case_822() } void case_829() -#line 5345 "cs-parser.jay" +#line 5335 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5353 "cs-parser.jay" +#line 5343 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5361 "cs-parser.jay" +#line 5351 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7883,35 +7873,35 @@ void case_831() } void case_832() -#line 5367 "cs-parser.jay" +#line 5357 "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_833() -#line 5372 "cs-parser.jay" +#line 5362 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5380 "cs-parser.jay" +#line 5370 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5388 "cs-parser.jay" +#line 5378 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5396 "cs-parser.jay" +#line 5386 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7929,7 +7919,7 @@ void case_836() } void case_837() -#line 5412 "cs-parser.jay" +#line 5402 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7945,28 +7935,28 @@ void case_837() } void case_841() -#line 5438 "cs-parser.jay" +#line 5428 "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_842() -#line 5443 "cs-parser.jay" +#line 5433 "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_843() -#line 5448 "cs-parser.jay" +#line 5438 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5456 "cs-parser.jay" +#line 5446 "cs-parser.jay" { var l = new List (2); @@ -7975,7 +7965,7 @@ void case_844() } void case_845() -#line 5463 "cs-parser.jay" +#line 5453 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7993,7 +7983,7 @@ void case_845() } void case_849() -#line 5491 "cs-parser.jay" +#line 5481 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8010,7 +8000,7 @@ void case_849() } void case_851() -#line 5510 "cs-parser.jay" +#line 5500 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8023,14 +8013,14 @@ void case_851() } void case_854() -#line 5538 "cs-parser.jay" +#line 5528 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5548 "cs-parser.jay" +#line 5538 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8040,7 +8030,7 @@ void case_856() } void case_857() -#line 5559 "cs-parser.jay" +#line 5549 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8052,14 +8042,14 @@ void case_857() } void case_858() -#line 5569 "cs-parser.jay" +#line 5559 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5574 "cs-parser.jay" +#line 5564 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8071,7 +8061,7 @@ void case_859() } void case_860() -#line 5587 "cs-parser.jay" +#line 5577 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8083,14 +8073,14 @@ void case_860() } void case_861() -#line 5597 "cs-parser.jay" +#line 5587 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5602 "cs-parser.jay" +#line 5592 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8102,7 +8092,7 @@ void case_862() } void case_863() -#line 5612 "cs-parser.jay" +#line 5602 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8113,14 +8103,14 @@ void case_863() } void case_865() -#line 5628 "cs-parser.jay" +#line 5618 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5639 "cs-parser.jay" +#line 5629 "cs-parser.jay" { lexer.query_parsing = false; @@ -8134,7 +8124,7 @@ void case_866() } void case_867() -#line 5651 "cs-parser.jay" +#line 5641 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8146,7 +8136,7 @@ void case_867() } void case_868() -#line 5662 "cs-parser.jay" +#line 5652 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8156,7 +8146,7 @@ void case_868() } void case_869() -#line 5669 "cs-parser.jay" +#line 5659 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8164,7 +8154,7 @@ void case_869() } void case_870() -#line 5678 "cs-parser.jay" +#line 5668 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8174,7 +8164,7 @@ void case_870() } void case_871() -#line 5686 "cs-parser.jay" +#line 5676 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8188,7 +8178,7 @@ void case_871() } void case_872() -#line 5701 "cs-parser.jay" +#line 5691 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8198,7 +8188,7 @@ void case_872() } void case_873() -#line 5709 "cs-parser.jay" +#line 5699 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8212,7 +8202,7 @@ void case_873() } void case_875() -#line 5728 "cs-parser.jay" +#line 5718 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8225,7 +8215,7 @@ void case_875() } void case_877() -#line 5743 "cs-parser.jay" +#line 5733 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8241,7 +8231,7 @@ void case_877() } void case_878() -#line 5760 "cs-parser.jay" +#line 5750 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8258,14 +8248,14 @@ void case_878() } void case_880() -#line 5776 "cs-parser.jay" +#line 5766 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5788 "cs-parser.jay" +#line 5778 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8274,7 +8264,7 @@ void case_882() } void case_883() -#line 5795 "cs-parser.jay" +#line 5785 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8284,7 +8274,7 @@ void case_883() } void case_884() -#line 5803 "cs-parser.jay" +#line 5793 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8293,7 +8283,7 @@ void case_884() } void case_885() -#line 5810 "cs-parser.jay" +#line 5800 "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])); @@ -8303,14 +8293,14 @@ void case_885() } void case_889() -#line 5827 "cs-parser.jay" +#line 5817 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5847 "cs-parser.jay" +#line 5837 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8324,7 +8314,7 @@ void case_896() } void case_898() -#line 5866 "cs-parser.jay" +#line 5856 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8333,7 +8323,7 @@ void case_898() } void case_899() -#line 5876 "cs-parser.jay" +#line 5866 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8343,7 +8333,7 @@ void case_899() } void case_900() -#line 5884 "cs-parser.jay" +#line 5874 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8353,7 +8343,7 @@ void case_900() } void case_901() -#line 5892 "cs-parser.jay" +#line 5882 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8363,7 +8353,7 @@ void case_901() } void case_902() -#line 5900 "cs-parser.jay" +#line 5890 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8403,7 +8393,7 @@ void case_902() } void case_903() -#line 5938 "cs-parser.jay" +#line 5928 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8413,7 +8403,7 @@ void case_903() } void case_904() -#line 5946 "cs-parser.jay" +#line 5936 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8423,7 +8413,7 @@ void case_904() } void case_905() -#line 5954 "cs-parser.jay" +#line 5944 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8433,7 +8423,7 @@ void case_905() } void case_906() -#line 5962 "cs-parser.jay" +#line 5952 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8475,7 +8465,7 @@ void case_906() } void case_910() -#line 6017 "cs-parser.jay" +#line 6007 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8484,7 +8474,7 @@ void case_910() } void case_912() -#line 6028 "cs-parser.jay" +#line 6018 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8493,14 +8483,14 @@ void case_912() } void case_913() -#line 6035 "cs-parser.jay" +#line 6025 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6044 "cs-parser.jay" +#line 6034 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8509,42 +8499,42 @@ void case_915() } void case_916() -#line 6051 "cs-parser.jay" +#line 6041 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6063 "cs-parser.jay" +#line 6053 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6068 "cs-parser.jay" +#line 6058 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6080 "cs-parser.jay" +#line 6070 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6085 "cs-parser.jay" +#line 6075 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6095 "cs-parser.jay" +#line 6085 "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*/ @@ -8562,7 +8552,7 @@ void case_924() } void case_925() -#line 6111 "cs-parser.jay" +#line 6101 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8573,7 +8563,7 @@ void case_925() } void case_928() -#line 6138 "cs-parser.jay" +#line 6128 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8605,7 +8595,7 @@ void case_928() } void case_929() -#line 6168 "cs-parser.jay" +#line 6158 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8617,7 +8607,7 @@ void case_929() } void case_939() -#line 6211 "cs-parser.jay" +#line 6201 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8625,7 +8615,7 @@ void case_939() } void case_940() -#line 6217 "cs-parser.jay" +#line 6207 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8634,14 +8624,14 @@ void case_940() } void case_943() -#line 6232 "cs-parser.jay" +#line 6222 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6237 "cs-parser.jay" +#line 6227 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8651,7 +8641,7 @@ void case_944() } void case_945() -#line 6245 "cs-parser.jay" +#line 6235 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8661,7 +8651,7 @@ void case_945() } void case_946() -#line 6253 "cs-parser.jay" +#line 6243 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8670,7 +8660,7 @@ void case_946() } void case_954() -#line 6291 "cs-parser.jay" +#line 6281 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8678,7 +8668,7 @@ void case_954() } void case_955() -#line 6297 "cs-parser.jay" +#line 6287 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8686,7 +8676,7 @@ void case_955() } void case_956() -#line 6306 "cs-parser.jay" +#line 6296 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12022,7 +12012,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6315 "cs-parser.jay" +#line 6305 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 42b7bfd358..348844d52a 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -142,11 +142,12 @@ namespace Mono.CSharp LocationsBag lbag; UsingsBag ubag; List> mod_locations; - Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation, savedEnumBaseTypeColonLocation; + Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); List parameterListCommas = new List (); + List enumCommas = new List (); object lastYYVal; @@ -954,7 +955,8 @@ struct_declaration } opt_semicolon { - lbag.AppendToMember (current_class, GetLocation ($13)); + if ($13 != null) + current_class.OptionalSemicolon = GetLocation ($13); $$ = pop_current_class (); } | opt_attributes opt_modifiers opt_partial STRUCT error @@ -1974,11 +1976,9 @@ interface_declaration } opt_semicolon { - if ($15 != null) { - lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13), GetLocation ($15)); - } else { - lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); - } + if ($15 != null) + current_class.OptionalSemicolon = GetLocation ($15); + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); $$ = pop_current_class (); } | opt_attributes opt_modifiers opt_partial INTERFACE error @@ -2558,6 +2558,7 @@ enum_declaration ENUM type_declaration_name opt_enum_base { + enumCommas.Add (GetLocation ($3)); if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } @@ -2565,6 +2566,7 @@ enum_declaration { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; + enumCommas.Add (GetLocation ($7)); MemberName name = (MemberName) $4; if (name.IsGeneric) { @@ -2581,26 +2583,16 @@ enum_declaration } CLOSE_BRACE opt_semicolon { + enumCommas.Add (GetLocation ($11)); + if ($12 != null) + current_class.OptionalSemicolon = GetLocation ($12); if (doc_support) current_class.DocComment = enumTypeComment; --lexer.parsing_declaration; -// if (doc_support) -// em.DocComment = ev.DocComment; - if ($5 != null) { - if ($12 != null) { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), savedEnumBaseTypeColonLocation, GetLocation ($7), GetLocation ($11), GetLocation ($12)); - } else { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), savedEnumBaseTypeColonLocation, GetLocation ($7), GetLocation ($11)); - } - } else { - if ($12 != null) { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), GetLocation ($7), GetLocation ($11), GetLocation ($12)); - } else { - lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($3), GetLocation ($7), GetLocation ($11)); - } - } + lbag.AddMember (current_class, GetModifierLocations (), enumCommas); + enumCommas.Clear (); $$ = pop_current_class (); } ; @@ -2614,7 +2606,7 @@ opt_enum_base Enum.Error_1008 (GetLocation ($2), report); $$ = null; } else { - savedEnumBaseTypeColonLocation = GetLocation ($1); + enumCommas.Add (GetLocation ($1)); $$ = $2; } } @@ -2630,7 +2622,7 @@ opt_enum_member_declarations | enum_member_declarations | enum_member_declarations COMMA { - lbag.AddLocation ($1, GetLocation ($2)); + enumCommas.Add (GetLocation ($2)); } ; @@ -2638,7 +2630,7 @@ enum_member_declarations : enum_member_declaration | enum_member_declarations COMMA enum_member_declaration { - lbag.AddLocation ($1, GetLocation ($2)); + enumCommas.Add (GetLocation ($2)); $$ = $3; } ; @@ -4343,8 +4335,8 @@ class_declaration FeatureIsNotAvailable (c.Location, "static classes"); } - lbag.AddMember (current_class, GetModifierLocations ()); push_current_class (c, $3); + lbag.AddMember (current_class, GetModifierLocations ()); } opt_class_base opt_type_parameter_constraints_clauses @@ -4366,11 +4358,9 @@ class_declaration } opt_semicolon { - if ($15 != null) { - lbag.AppendToMember (current_class, GetLocation ($4), GetLocation ($11), GetLocation ($13), GetLocation ($15)); - } else { - lbag.AppendToMember (current_class, GetLocation ($4), GetLocation ($11), GetLocation ($13)); - } + lbag.AppendToMember (current_class, GetLocation ($4), GetLocation ($11), GetLocation ($13)); + if ($15 != null) + current_class.OptionalSemicolon = GetLocation ($15); $$ = pop_current_class (); } ; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs index 0ad375d282..684057008a 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs @@ -1440,6 +1440,21 @@ namespace Mono.CSharp { get; private set; } + + public bool HasOptionalSemicolon { + get; + private set; + } + Location optionalSemicolon; + public Location OptionalSemicolon { + get { + return optionalSemicolon; + } + set { + optionalSemicolon = value; + HasOptionalSemicolon = true; + } + } #endif public List Constraints { From 65d87739bd4c5550fe2172c9037e5d75733857b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:09:43 +0200 Subject: [PATCH 17/92] added dots in using declaration. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index c1bac7ccfe..b5c42633be 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -330,6 +330,11 @@ namespace ICSharpCode.NRefactory.CSharp var t = new MemberType(); t.IsDoubleColon = memberName.IsDoubleColon; t.AddChild (ConvertImport (memberName.Left), MemberType.TargetRole); + + var location = LocationsBag.GetLocations (memberName); + if (location != null) + t.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberType.Roles.Dot); + t.AddChild (Identifier.Create (memberName.Name, Convert(memberName.Location)), MemberType.Roles.Identifier); AddTypeArguments (t, (List)null, memberName.TypeArguments); return t; From 5e8e124ec5485752e2a95f299c74a2518ae0a0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:25:52 +0200 Subject: [PATCH 18/92] Removed client target framework profile. --- .../ICSharpCode.NRefactory.CSharp.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj index 9fd0af8d3e..735f28069f 100644 --- a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj +++ b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj @@ -8,7 +8,6 @@ ICSharpCode.NRefactory.CSharp ICSharpCode.NRefactory.CSharp v4.0 - Client Properties False False From 2fc0c7c8b32cf4e1a2540f08bebd8c40e54bbfb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:26:10 +0200 Subject: [PATCH 19/92] Fixed bug with class keyword. --- ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs | 4 ++-- ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay | 4 ++-- ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 172d9d419b..d54d2e3950 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -7080,7 +7080,7 @@ void case_645() } push_current_class (c, yyVals[-3+yyTop]); - lbag.AddMember (current_class, GetModifierLocations ()); + lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); } void case_646() @@ -7107,7 +7107,7 @@ void case_647() void case_648() #line 4360 "cs-parser.jay" { - lbag.AppendToMember (current_class, GetLocation (yyVals[-11+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); + lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); yyVal = pop_current_class (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 348844d52a..882b3e0e37 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -4336,7 +4336,7 @@ class_declaration } push_current_class (c, $3); - lbag.AddMember (current_class, GetModifierLocations ()); + lbag.AddMember (current_class, GetModifierLocations (), GetLocation ($4)); } opt_class_base opt_type_parameter_constraints_clauses @@ -4358,7 +4358,7 @@ class_declaration } opt_semicolon { - lbag.AppendToMember (current_class, GetLocation ($4), GetLocation ($11), GetLocation ($13)); + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); if ($15 != null) current_class.OptionalSemicolon = GetLocation ($15); $$ = pop_current_class (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs index 684057008a..8dce5a59ab 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs @@ -27,6 +27,7 @@ using IKVM.Reflection.Emit; #else using System.Reflection; using System.Reflection.Emit; +//using Mono.Collections.Generic; #endif namespace Mono.CSharp { From 3303c99160da88b054453be6594e3ba4dac2676e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:35:04 +0200 Subject: [PATCH 20/92] Corrected constraint locations. --- .../Parser/CSharpParser.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index b5c42633be..2ff894de4b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -374,8 +374,8 @@ namespace ICSharpCode.NRefactory.CSharp AddTypeParameters (newType, typeArgLocation, c.MemberName.TypeArguments); if (typeArgLocation != null) newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); - AddConstraints (newType, c); } + if (c.TypeBaseExpressions != null) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); @@ -390,6 +390,8 @@ namespace ICSharpCode.NRefactory.CSharp } } } + + AddConstraints (newType, c); if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -426,7 +428,6 @@ namespace ICSharpCode.NRefactory.CSharp AddTypeParameters (newType, typeArgLocation, s.MemberName.TypeArguments); if (typeArgLocation != null) newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); - AddConstraints (newType, s); } if (s.TypeBaseExpressions != null) { @@ -443,6 +444,7 @@ namespace ICSharpCode.NRefactory.CSharp } } + AddConstraints (newType, s); if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -478,8 +480,8 @@ namespace ICSharpCode.NRefactory.CSharp AddTypeParameters (newType, typeArgLocation, i.MemberName.TypeArguments); if (typeArgLocation != null) newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), MemberReferenceExpression.Roles.RChevron); - AddConstraints (newType, i); } + if (i.TypeBaseExpressions != null) { if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.Colon); @@ -493,6 +495,8 @@ namespace ICSharpCode.NRefactory.CSharp } } } + + AddConstraints (newType, i); if (location != null && curLoc < location.Count) newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), 1), AstNode.Roles.LBrace); typeStack.Push (newType); @@ -527,7 +531,7 @@ namespace ICSharpCode.NRefactory.CSharp AddTypeParameters (newDelegate, typeArgLocation, d.MemberName.TypeArguments); if (typeArgLocation != null) newDelegate.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); - AddConstraints (newDelegate, d); + } if (location != null) newDelegate.AddChild (new CSharpTokenNode (Convert (location[1]), 1), DelegateDeclaration.Roles.LPar); @@ -535,6 +539,9 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) { newDelegate.AddChild (new CSharpTokenNode (Convert (location[2]), 1), DelegateDeclaration.Roles.RPar); + } + AddConstraints (newDelegate, d); + if (location != null) { newDelegate.AddChild (new CSharpTokenNode (Convert (location[3]), 1), DelegateDeclaration.Roles.Semicolon); } AddType (newDelegate); @@ -889,7 +896,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); } if (location != null) @@ -898,6 +904,9 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) newMethod.AddChild (new CSharpTokenNode (Convert (location[1]), 1), MethodDeclaration.Roles.RPar); + + AddConstraints (newMethod, m.GenericMethod); + if (m.Block != null) { var bodyBlock = (BlockStatement)m.Block.Accept (this); // if (m.Block is ToplevelBlock) { From 20ba8992a4b4a425b36032420c83ae47b94ffa49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:36:00 +0200 Subject: [PATCH 21/92] Improved error message. --- ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs index 863a939529..a9c792b30e 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs @@ -81,10 +81,12 @@ namespace ICSharpCode.NRefactory.CSharp.Parser string comment = "(" + node.GetType().Name + " at " + node.StartLocation + " in " + currentFileName + ")"; Assert.IsTrue(node.StartLocation <= node.EndLocation, "StartLocation must be before EndLocation " + comment); var prevNodeEnd = node.StartLocation; + var prevNode = node; for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) { - Assert.IsTrue(child.StartLocation >= prevNodeEnd, "Child must start after previous sibling " + comment); + Assert.IsTrue(child.StartLocation >= prevNodeEnd, currentFileName + ": Child " + child.GetType () +" (" + child.StartLocation + ")" +" must start after previous sibling " + prevNode.GetType () + "(" + prevNode.StartLocation + ")"); CheckPositionConsistency(child); prevNodeEnd = child.EndLocation; + prevNode = child; } Assert.IsTrue(prevNodeEnd <= node.EndLocation, "Last child must end before parent node ends " + comment); } From 64b7dff80cd6fb5bc164e9ee8baecc217ee9f705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:37:34 +0200 Subject: [PATCH 22/92] Removed more target framework profiles. --- ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj | 1 - ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj | 1 - ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj | 1 - 3 files changed, 3 deletions(-) diff --git a/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj b/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj index d98289e5d4..8b91449b79 100644 --- a/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj +++ b/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj @@ -8,7 +8,6 @@ ICSharpCode.NRefactory.Demo ICSharpCode.NRefactory.Demo v4.0 - Client Properties diff --git a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj index 9e86061bc0..7060cbbfd6 100644 --- a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj +++ b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj @@ -11,7 +11,6 @@ Properties 10.0.0 2.0 - Client True False 4 diff --git a/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj b/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj index 81fc417937..f6de8470b7 100644 --- a/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj +++ b/ICSharpCode.NRefactory.VB/ICSharpCode.NRefactory.VB.csproj @@ -9,7 +9,6 @@ ICSharpCode.NRefactory.VB v4.0 Properties - Client False False 4 From 74bc8b27637829d1c7ff593e81c648b436d7991d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 18:58:01 +0200 Subject: [PATCH 23/92] Fixed chevron & constraints locations. --- .../Parser/CSharpParser.cs | 72 ++-- .../Parser/mcs/cs-parser.cs | 369 +++++++++--------- .../Parser/mcs/cs-parser.jay | 1 + 3 files changed, 220 insertions(+), 222 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 2ff894de4b..f4c97a8e6a 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -97,9 +97,15 @@ namespace ICSharpCode.NRefactory.CSharp result = new SimpleType () { IdentifierToken = Identifier.Create (memberName.Name, Convert (memberName.Location)) }; } if (memberName.TypeArguments != null && !memberName.TypeArguments.IsEmpty) { + var chevronLocs = LocationsBag.GetLocations (memberName.TypeArguments); + if (chevronLocs != null) + result.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); + foreach (var arg in memberName.TypeArguments.Args) { result.AddChild (ConvertToType (arg), AstType.Roles.TypeArgument); } + if (chevronLocs != null) + result.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 1]), 1), InvocationExpression.Roles.RChevron); } return result; } @@ -368,12 +374,7 @@ namespace ICSharpCode.NRefactory.CSharp newType.AddChild (Identifier.Create (c.MemberName.Name, Convert (c.MemberName.Location)), AstNode.Roles.Identifier); if (c.MemberName.TypeArguments != null) { - var typeArgLocation = LocationsBag.GetLocations (c.MemberName); - if (typeArgLocation != null) - newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[0]), 1), TypeDeclaration.Roles.LChevron); - AddTypeParameters (newType, typeArgLocation, c.MemberName.TypeArguments); - if (typeArgLocation != null) - newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); + AddTypeParameters (newType, c.MemberName.TypeArguments); } if (c.TypeBaseExpressions != null) { @@ -422,12 +423,7 @@ namespace ICSharpCode.NRefactory.CSharp newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), "struct".Length), TypeDeclaration.Roles.Keyword); newType.AddChild (Identifier.Create (s.MemberName.Name, Convert (s.MemberName.Location)), AstNode.Roles.Identifier); if (s.MemberName.TypeArguments != null) { - var typeArgLocation = LocationsBag.GetLocations (s.MemberName); - if (typeArgLocation != null) - newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[0]), 1), TypeDeclaration.Roles.LChevron); - AddTypeParameters (newType, typeArgLocation, s.MemberName.TypeArguments); - if (typeArgLocation != null) - newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); + AddTypeParameters (newType, s.MemberName.TypeArguments); } if (s.TypeBaseExpressions != null) { @@ -474,12 +470,7 @@ namespace ICSharpCode.NRefactory.CSharp newType.AddChild (new CSharpTokenNode (Convert (location[curLoc++]), "interface".Length), TypeDeclaration.Roles.Keyword); newType.AddChild (Identifier.Create (i.MemberName.Name, Convert (i.MemberName.Location)), AstNode.Roles.Identifier); if (i.MemberName.TypeArguments != null) { - var typeArgLocation = LocationsBag.GetLocations (i.MemberName); - if (typeArgLocation != null) - newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[0]), 1), MemberReferenceExpression.Roles.LChevron); - AddTypeParameters (newType, typeArgLocation, i.MemberName.TypeArguments); - if (typeArgLocation != null) - newType.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), MemberReferenceExpression.Roles.RChevron); + AddTypeParameters (newType, i.MemberName.TypeArguments); } if (i.TypeBaseExpressions != null) { @@ -525,13 +516,7 @@ namespace ICSharpCode.NRefactory.CSharp newDelegate.AddChild (ConvertToType (d.ReturnType), AstNode.Roles.Type); newDelegate.AddChild (Identifier.Create (d.MemberName.Name, Convert (d.MemberName.Location)), AstNode.Roles.Identifier); if (d.MemberName.TypeArguments != null) { - var typeArgLocation = LocationsBag.GetLocations (d.MemberName); - if (typeArgLocation != null) - newDelegate.AddChild (new CSharpTokenNode (Convert (typeArgLocation[0]), 1), TypeDeclaration.Roles.LChevron); - AddTypeParameters (newDelegate, typeArgLocation, d.MemberName.TypeArguments); - if (typeArgLocation != null) - newDelegate.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), TypeDeclaration.Roles.RChevron); - + AddTypeParameters (newDelegate, d.MemberName.TypeArguments); } if (location != null) newDelegate.AddChild (new CSharpTokenNode (Convert (location[1]), 1), DelegateDeclaration.Roles.LPar); @@ -890,12 +875,7 @@ namespace ICSharpCode.NRefactory.CSharp newMethod.AddChild (Identifier.Create (m.MethodName.Name, Convert (m.Location)), AstNode.Roles.Identifier); if (m.MemberName.TypeArguments != null) { - var typeArgLocation = LocationsBag.GetLocations (m.MemberName); - if (typeArgLocation != null) - newMethod.AddChild (new CSharpTokenNode (Convert (typeArgLocation[0]), 1), MemberReferenceExpression.Roles.LChevron); - AddTypeParameters (newMethod, typeArgLocation, m.MemberName.TypeArguments); - if (typeArgLocation != null) - newMethod.AddChild (new CSharpTokenNode (Convert (typeArgLocation[1]), 1), MemberReferenceExpression.Roles.RChevron); + AddTypeParameters (newMethod, m.MemberName.TypeArguments); } if (location != null) @@ -2266,13 +2246,16 @@ namespace ICSharpCode.NRefactory.CSharp } } - void AddTypeParameters (AstNode parent, List location, Mono.CSharp.TypeArguments typeArguments) + void AddTypeParameters (AstNode parent, Mono.CSharp.TypeArguments typeArguments) { if (typeArguments == null || typeArguments.IsEmpty) return; + var chevronLocs = LocationsBag.GetLocations (typeArguments); + if (chevronLocs != null) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); for (int i = 0; i < typeArguments.Count; i++) { - if (location != null && i > 0 && i - 1 < location.Count) - parent.AddChild (new CSharpTokenNode (Convert (location[i - 1]), 1), InvocationExpression.Roles.Comma); + if (chevronLocs != null && i > 0 && i - 1 < chevronLocs.Count) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[i - 1]), 1), InvocationExpression.Roles.Comma); var arg = (TypeParameterName)typeArguments.Args[i]; if (arg == null) continue; @@ -2291,12 +2274,18 @@ namespace ICSharpCode.NRefactory.CSharp tp.AddChild (Identifier.Create (arg.Name, Convert (arg.Location)), InvocationExpression.Roles.Identifier); parent.AddChild (tp, InvocationExpression.Roles.TypeParameter); } + if (chevronLocs != null) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 1]), 1), InvocationExpression.Roles.RChevron); } void AddTypeArguments (AstNode parent, LocationsBag.MemberLocations location, Mono.CSharp.TypeArguments typeArguments) { if (typeArguments == null || typeArguments.IsEmpty) return; + var chevronLocs = LocationsBag.GetLocations (typeArguments); + if (chevronLocs != null) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); + for (int i = 0; i < typeArguments.Count; i++) { if (location != null && i > 0 && i - 1 < location.Count) parent.AddChild (new CSharpTokenNode (Convert (location[i - 1]), 1), InvocationExpression.Roles.Comma); @@ -2305,12 +2294,18 @@ namespace ICSharpCode.NRefactory.CSharp continue; parent.AddChild (ConvertToType (arg), InvocationExpression.Roles.TypeArgument); } + + if (chevronLocs != null) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 1]), 1), InvocationExpression.Roles.RChevron); } void AddTypeArguments (AstNode parent, List location, Mono.CSharp.TypeArguments typeArguments) { if (typeArguments == null || typeArguments.IsEmpty) return; + var chevronLocs = LocationsBag.GetLocations (typeArguments); + if (chevronLocs != null) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[0]), 1), InvocationExpression.Roles.LChevron); for (int i = 0; i < typeArguments.Count; i++) { if (location != null && i > 0 && i - 1 < location.Count) parent.AddChild (new CSharpTokenNode (Convert (location[i - 1]), 1), InvocationExpression.Roles.Comma); @@ -2319,6 +2314,8 @@ namespace ICSharpCode.NRefactory.CSharp continue; parent.AddChild (ConvertToType (arg), InvocationExpression.Roles.TypeArgument); } + if (chevronLocs != null) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[1]), 1), InvocationExpression.Roles.RChevron); } void AddConstraints (AstNode parent, DeclSpace d) @@ -2329,11 +2326,10 @@ namespace ICSharpCode.NRefactory.CSharp Constraints c = d.PlainConstraints [i]; var location = LocationsBag.GetLocations (c); var constraint = new Constraint (); - if (location != null) - constraint.AddChild (new CSharpTokenNode (Convert (location [0]), "where".Length), InvocationExpression.Roles.Keyword); + constraint.AddChild (new CSharpTokenNode (Convert (c.Location), "where".Length), InvocationExpression.Roles.Keyword); constraint.AddChild (Identifier.Create (c.TypeParameter.Value, Convert (c.TypeParameter.Location)), InvocationExpression.Roles.Identifier); - if (location != null && location.Count > 1) - constraint.AddChild (new CSharpTokenNode (Convert (location [1]), 1), Constraint.ColonRole); + if (location != null) + constraint.AddChild (new CSharpTokenNode (Convert (location [0]), 1), Constraint.ColonRole); foreach (var expr in c.ConstraintExpressions) constraint.AddChild (ConvertToType (expr), Constraint.BaseTypeRole); parent.AddChild (constraint, AstNode.Roles.Constraint); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index d54d2e3950..f87c16c9cc 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -3246,19 +3246,19 @@ case 681: case_681(); break; case 682: -#line 4590 "cs-parser.jay" +#line 4591 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4594 "cs-parser.jay" +#line 4595 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4601 "cs-parser.jay" +#line 4602 "cs-parser.jay" { yyVal = Variance.None; } @@ -3267,13 +3267,13 @@ case 685: case_685(); break; case 686: -#line 4615 "cs-parser.jay" +#line 4616 "cs-parser.jay" { yyVal = Variance.Covariant; } break; case 687: -#line 4619 "cs-parser.jay" +#line 4620 "cs-parser.jay" { yyVal = Variance.Contravariant; } @@ -3282,7 +3282,7 @@ case 688: case_688(); break; case 689: -#line 4644 "cs-parser.jay" +#line 4645 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3300,13 +3300,13 @@ case 693: case_693(); break; case 698: -#line 4688 "cs-parser.jay" +#line 4689 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4692 "cs-parser.jay" +#line 4693 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3315,13 +3315,13 @@ case 701: case_701(); break; case 704: -#line 4716 "cs-parser.jay" +#line 4717 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4720 "cs-parser.jay" +#line 4721 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3354,13 +3354,13 @@ case 744: case_744(); break; case 745: -#line 4864 "cs-parser.jay" +#line 4865 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4868 "cs-parser.jay" +#line 4869 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3372,7 +3372,7 @@ case 749: case_749(); break; case 750: -#line 4889 "cs-parser.jay" +#line 4890 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3402,7 +3402,7 @@ case 763: case_763(); break; case 764: -#line 4978 "cs-parser.jay" +#line 4979 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3423,15 +3423,15 @@ case 774: case_774(); break; case 775: -#line 5028 "cs-parser.jay" +#line 5029 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5032 "cs-parser.jay" +#line 5033 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5033 "cs-parser.jay" +#line 5034 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3450,7 +3450,7 @@ case 784: case_784(); break; case 785: -#line 5101 "cs-parser.jay" +#line 5102 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3471,13 +3471,13 @@ case 791: case_791(); break; case 792: -#line 5145 "cs-parser.jay" +#line 5146 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5149 "cs-parser.jay" +#line 5150 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3492,7 +3492,7 @@ case 796: case_796(); break; case 797: -#line 5178 "cs-parser.jay" +#line 5179 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3507,7 +3507,7 @@ case 804: case_804(); break; case 805: -#line 5217 "cs-parser.jay" +#line 5218 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3519,7 +3519,7 @@ case 807: case_807(); break; case 808: -#line 5245 "cs-parser.jay" +#line 5246 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3529,11 +3529,11 @@ case 811: case_811(); break; case 813: -#line 5266 "cs-parser.jay" +#line 5267 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5271 "cs-parser.jay" +#line 5272 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3576,7 +3576,7 @@ case 837: case_837(); break; case 840: -#line 5426 "cs-parser.jay" +#line 5427 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3597,7 +3597,7 @@ case 845: case_845(); break; case 848: -#line 5479 "cs-parser.jay" +#line 5480 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3606,7 +3606,7 @@ case 849: case_849(); break; case 850: -#line 5498 "cs-parser.jay" +#line 5499 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3615,13 +3615,13 @@ case 851: case_851(); break; case 852: -#line 5516 "cs-parser.jay" +#line 5517 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5523 "cs-parser.jay" +#line 5524 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3630,7 +3630,7 @@ case 854: case_854(); break; case 855: -#line 5533 "cs-parser.jay" +#line 5534 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3660,7 +3660,7 @@ case 863: case_863(); break; case 864: -#line 5616 "cs-parser.jay" +#line 5617 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3693,7 +3693,7 @@ case 873: case_873(); break; case 874: -#line 5716 "cs-parser.jay" +#line 5717 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3702,7 +3702,7 @@ case 875: case_875(); break; case 876: -#line 5731 "cs-parser.jay" +#line 5732 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3717,7 +3717,7 @@ case 880: case_880(); break; case 881: -#line 5776 "cs-parser.jay" +#line 5777 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3738,7 +3738,7 @@ case 889: case_889(); break; case 895: -#line 5835 "cs-parser.jay" +#line 5836 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3747,7 +3747,7 @@ case 896: case_896(); break; case 897: -#line 5854 "cs-parser.jay" +#line 5855 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3780,13 +3780,13 @@ case 906: case_906(); break; case 908: -#line 5998 "cs-parser.jay" +#line 5999 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 6005 "cs-parser.jay" +#line 6006 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3807,7 +3807,7 @@ case 916: case_916(); break; case 917: -#line 6051 "cs-parser.jay" +#line 6052 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3819,7 +3819,7 @@ case 919: case_919(); break; case 920: -#line 6068 "cs-parser.jay" +#line 6069 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3843,13 +3843,13 @@ case 929: case_929(); break; case 937: -#line 6192 "cs-parser.jay" +#line 6193 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6199 "cs-parser.jay" +#line 6200 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3861,13 +3861,13 @@ case 940: case_940(); break; case 941: -#line 6216 "cs-parser.jay" +#line 6217 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6220 "cs-parser.jay" +#line 6221 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3885,25 +3885,25 @@ case 946: case_946(); break; case 948: -#line 6256 "cs-parser.jay" +#line 6257 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6264 "cs-parser.jay" +#line 6265 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6268 "cs-parser.jay" +#line 6269 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6275 "cs-parser.jay" +#line 6276 "cs-parser.jay" { yyVal = new List (0); } @@ -7293,10 +7293,11 @@ void case_677() { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); + lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_678() -#line 4544 "cs-parser.jay" +#line 4545 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7304,7 +7305,7 @@ void case_678() } void case_679() -#line 4550 "cs-parser.jay" +#line 4551 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7329,7 +7330,7 @@ void case_679() } void case_680() -#line 4576 "cs-parser.jay" +#line 4577 "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 ()); @@ -7338,14 +7339,14 @@ void case_680() } void case_681() -#line 4583 "cs-parser.jay" +#line 4584 "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_685() -#line 4603 "cs-parser.jay" +#line 4604 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7354,77 +7355,77 @@ void case_685() } void case_688() -#line 4637 "cs-parser.jay" +#line 4638 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4649 "cs-parser.jay" +#line 4650 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4654 "cs-parser.jay" +#line 4655 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4663 "cs-parser.jay" +#line 4664 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4668 "cs-parser.jay" +#line 4669 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4695 "cs-parser.jay" +#line 4696 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4759 "cs-parser.jay" +#line 4760 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4764 "cs-parser.jay" +#line 4765 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4769 "cs-parser.jay" +#line 4770 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4777 "cs-parser.jay" +#line 4778 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4785 "cs-parser.jay" +#line 4786 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7434,7 +7435,7 @@ void case_738() } void case_741() -#line 4798 "cs-parser.jay" +#line 4799 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7443,7 +7444,7 @@ void case_741() } void case_742() -#line 4814 "cs-parser.jay" +#line 4815 "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*/ @@ -7475,7 +7476,7 @@ void case_742() } void case_743() -#line 4844 "cs-parser.jay" +#line 4845 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7488,7 +7489,7 @@ void case_743() } void case_744() -#line 4855 "cs-parser.jay" +#line 4856 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7497,21 +7498,21 @@ void case_744() } void case_747() -#line 4870 "cs-parser.jay" +#line 4871 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4879 "cs-parser.jay" +#line 4880 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4894 "cs-parser.jay" +#line 4895 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7520,7 +7521,7 @@ void case_751() } void case_752() -#line 4901 "cs-parser.jay" +#line 4902 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7528,7 +7529,7 @@ void case_752() } void case_753() -#line 4907 "cs-parser.jay" +#line 4908 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7537,7 +7538,7 @@ void case_753() } void case_754() -#line 4914 "cs-parser.jay" +#line 4915 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7549,14 +7550,14 @@ void case_754() } void case_756() -#line 4928 "cs-parser.jay" +#line 4929 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4933 "cs-parser.jay" +#line 4934 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7567,7 +7568,7 @@ void case_757() } void case_762() -#line 4955 "cs-parser.jay" +#line 4956 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7578,7 +7579,7 @@ void case_762() } void case_763() -#line 4964 "cs-parser.jay" +#line 4965 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7589,14 +7590,14 @@ void case_763() } void case_765() -#line 4980 "cs-parser.jay" +#line 4981 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 4998 "cs-parser.jay" +#line 4999 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7607,28 +7608,28 @@ void case_770() } void case_772() -#line 5011 "cs-parser.jay" +#line 5012 "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_773() -#line 5016 "cs-parser.jay" +#line 5017 "cs-parser.jay" { 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_774() -#line 5024 "cs-parser.jay" +#line 5025 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5042 "cs-parser.jay" +#line 5043 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7640,7 +7641,7 @@ void case_778() } void case_779() -#line 5055 "cs-parser.jay" +#line 5056 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7650,14 +7651,14 @@ void case_779() } void case_780() -#line 5063 "cs-parser.jay" +#line 5064 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5077 "cs-parser.jay" +#line 5078 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7667,7 +7668,7 @@ void case_783() } void case_784() -#line 5086 "cs-parser.jay" +#line 5087 "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])); @@ -7679,7 +7680,7 @@ void case_784() } void case_786() -#line 5103 "cs-parser.jay" +#line 5104 "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])); @@ -7687,14 +7688,14 @@ void case_786() } void case_787() -#line 5112 "cs-parser.jay" +#line 5113 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5121 "cs-parser.jay" +#line 5122 "cs-parser.jay" { var sections = new List (4); @@ -7703,7 +7704,7 @@ void case_789() } void case_790() -#line 5128 "cs-parser.jay" +#line 5129 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7712,14 +7713,14 @@ void case_790() } void case_791() -#line 5135 "cs-parser.jay" +#line 5136 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5154 "cs-parser.jay" +#line 5155 "cs-parser.jay" { var labels = new List (2); @@ -7728,7 +7729,7 @@ void case_794() } void case_795() -#line 5161 "cs-parser.jay" +#line 5162 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7737,14 +7738,14 @@ void case_795() } void case_796() -#line 5171 "cs-parser.jay" +#line 5172 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5190 "cs-parser.jay" +#line 5191 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7754,21 +7755,21 @@ void case_802() } void case_803() -#line 5202 "cs-parser.jay" +#line 5203 "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_804() -#line 5210 "cs-parser.jay" +#line 5211 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5226 "cs-parser.jay" +#line 5227 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7782,14 +7783,14 @@ void case_806() } void case_807() -#line 5238 "cs-parser.jay" +#line 5239 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5251 "cs-parser.jay" +#line 5252 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7798,14 +7799,14 @@ void case_810() } void case_811() -#line 5258 "cs-parser.jay" +#line 5259 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5282 "cs-parser.jay" +#line 5283 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7820,14 +7821,14 @@ void case_819() } void case_820() -#line 5298 "cs-parser.jay" +#line 5299 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5303 "cs-parser.jay" +#line 5304 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7838,7 +7839,7 @@ void case_821() } void case_822() -#line 5312 "cs-parser.jay" +#line 5313 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7851,21 +7852,21 @@ void case_822() } void case_829() -#line 5335 "cs-parser.jay" +#line 5336 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5343 "cs-parser.jay" +#line 5344 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5351 "cs-parser.jay" +#line 5352 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7873,35 +7874,35 @@ void case_831() } void case_832() -#line 5357 "cs-parser.jay" +#line 5358 "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_833() -#line 5362 "cs-parser.jay" +#line 5363 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5370 "cs-parser.jay" +#line 5371 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5378 "cs-parser.jay" +#line 5379 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5386 "cs-parser.jay" +#line 5387 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7919,7 +7920,7 @@ void case_836() } void case_837() -#line 5402 "cs-parser.jay" +#line 5403 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7935,28 +7936,28 @@ void case_837() } void case_841() -#line 5428 "cs-parser.jay" +#line 5429 "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_842() -#line 5433 "cs-parser.jay" +#line 5434 "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_843() -#line 5438 "cs-parser.jay" +#line 5439 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5446 "cs-parser.jay" +#line 5447 "cs-parser.jay" { var l = new List (2); @@ -7965,7 +7966,7 @@ void case_844() } void case_845() -#line 5453 "cs-parser.jay" +#line 5454 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7983,7 +7984,7 @@ void case_845() } void case_849() -#line 5481 "cs-parser.jay" +#line 5482 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8000,7 +8001,7 @@ void case_849() } void case_851() -#line 5500 "cs-parser.jay" +#line 5501 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8013,14 +8014,14 @@ void case_851() } void case_854() -#line 5528 "cs-parser.jay" +#line 5529 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5538 "cs-parser.jay" +#line 5539 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8030,7 +8031,7 @@ void case_856() } void case_857() -#line 5549 "cs-parser.jay" +#line 5550 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8042,14 +8043,14 @@ void case_857() } void case_858() -#line 5559 "cs-parser.jay" +#line 5560 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5564 "cs-parser.jay" +#line 5565 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8061,7 +8062,7 @@ void case_859() } void case_860() -#line 5577 "cs-parser.jay" +#line 5578 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8073,14 +8074,14 @@ void case_860() } void case_861() -#line 5587 "cs-parser.jay" +#line 5588 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5592 "cs-parser.jay" +#line 5593 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8092,7 +8093,7 @@ void case_862() } void case_863() -#line 5602 "cs-parser.jay" +#line 5603 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8103,14 +8104,14 @@ void case_863() } void case_865() -#line 5618 "cs-parser.jay" +#line 5619 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5629 "cs-parser.jay" +#line 5630 "cs-parser.jay" { lexer.query_parsing = false; @@ -8124,7 +8125,7 @@ void case_866() } void case_867() -#line 5641 "cs-parser.jay" +#line 5642 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8136,7 +8137,7 @@ void case_867() } void case_868() -#line 5652 "cs-parser.jay" +#line 5653 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8146,7 +8147,7 @@ void case_868() } void case_869() -#line 5659 "cs-parser.jay" +#line 5660 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8154,7 +8155,7 @@ void case_869() } void case_870() -#line 5668 "cs-parser.jay" +#line 5669 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8164,7 +8165,7 @@ void case_870() } void case_871() -#line 5676 "cs-parser.jay" +#line 5677 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8178,7 +8179,7 @@ void case_871() } void case_872() -#line 5691 "cs-parser.jay" +#line 5692 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8188,7 +8189,7 @@ void case_872() } void case_873() -#line 5699 "cs-parser.jay" +#line 5700 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8202,7 +8203,7 @@ void case_873() } void case_875() -#line 5718 "cs-parser.jay" +#line 5719 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8215,7 +8216,7 @@ void case_875() } void case_877() -#line 5733 "cs-parser.jay" +#line 5734 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8231,7 +8232,7 @@ void case_877() } void case_878() -#line 5750 "cs-parser.jay" +#line 5751 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8248,14 +8249,14 @@ void case_878() } void case_880() -#line 5766 "cs-parser.jay" +#line 5767 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5778 "cs-parser.jay" +#line 5779 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8264,7 +8265,7 @@ void case_882() } void case_883() -#line 5785 "cs-parser.jay" +#line 5786 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8274,7 +8275,7 @@ void case_883() } void case_884() -#line 5793 "cs-parser.jay" +#line 5794 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8283,7 +8284,7 @@ void case_884() } void case_885() -#line 5800 "cs-parser.jay" +#line 5801 "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])); @@ -8293,14 +8294,14 @@ void case_885() } void case_889() -#line 5817 "cs-parser.jay" +#line 5818 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5837 "cs-parser.jay" +#line 5838 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8314,7 +8315,7 @@ void case_896() } void case_898() -#line 5856 "cs-parser.jay" +#line 5857 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8323,7 +8324,7 @@ void case_898() } void case_899() -#line 5866 "cs-parser.jay" +#line 5867 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8333,7 +8334,7 @@ void case_899() } void case_900() -#line 5874 "cs-parser.jay" +#line 5875 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8343,7 +8344,7 @@ void case_900() } void case_901() -#line 5882 "cs-parser.jay" +#line 5883 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8353,7 +8354,7 @@ void case_901() } void case_902() -#line 5890 "cs-parser.jay" +#line 5891 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8393,7 +8394,7 @@ void case_902() } void case_903() -#line 5928 "cs-parser.jay" +#line 5929 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8403,7 +8404,7 @@ void case_903() } void case_904() -#line 5936 "cs-parser.jay" +#line 5937 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8413,7 +8414,7 @@ void case_904() } void case_905() -#line 5944 "cs-parser.jay" +#line 5945 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8423,7 +8424,7 @@ void case_905() } void case_906() -#line 5952 "cs-parser.jay" +#line 5953 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8465,7 +8466,7 @@ void case_906() } void case_910() -#line 6007 "cs-parser.jay" +#line 6008 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8474,7 +8475,7 @@ void case_910() } void case_912() -#line 6018 "cs-parser.jay" +#line 6019 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8483,14 +8484,14 @@ void case_912() } void case_913() -#line 6025 "cs-parser.jay" +#line 6026 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6034 "cs-parser.jay" +#line 6035 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8499,42 +8500,42 @@ void case_915() } void case_916() -#line 6041 "cs-parser.jay" +#line 6042 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6053 "cs-parser.jay" +#line 6054 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6058 "cs-parser.jay" +#line 6059 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6070 "cs-parser.jay" +#line 6071 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6075 "cs-parser.jay" +#line 6076 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6085 "cs-parser.jay" +#line 6086 "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*/ @@ -8552,7 +8553,7 @@ void case_924() } void case_925() -#line 6101 "cs-parser.jay" +#line 6102 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8563,7 +8564,7 @@ void case_925() } void case_928() -#line 6128 "cs-parser.jay" +#line 6129 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8595,7 +8596,7 @@ void case_928() } void case_929() -#line 6158 "cs-parser.jay" +#line 6159 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8607,7 +8608,7 @@ void case_929() } void case_939() -#line 6201 "cs-parser.jay" +#line 6202 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8615,7 +8616,7 @@ void case_939() } void case_940() -#line 6207 "cs-parser.jay" +#line 6208 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8624,14 +8625,14 @@ void case_940() } void case_943() -#line 6222 "cs-parser.jay" +#line 6223 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6227 "cs-parser.jay" +#line 6228 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8641,7 +8642,7 @@ void case_944() } void case_945() -#line 6235 "cs-parser.jay" +#line 6236 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8651,7 +8652,7 @@ void case_945() } void case_946() -#line 6243 "cs-parser.jay" +#line 6244 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8660,7 +8661,7 @@ void case_946() } void case_954() -#line 6281 "cs-parser.jay" +#line 6282 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8668,7 +8669,7 @@ void case_954() } void case_955() -#line 6287 "cs-parser.jay" +#line 6288 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8676,7 +8677,7 @@ void case_955() } void case_956() -#line 6296 "cs-parser.jay" +#line 6297 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12012,7 +12013,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6305 "cs-parser.jay" +#line 6306 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 882b3e0e37..c96f2b3402 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -4536,6 +4536,7 @@ type_parameter_constraints_clause { var lt = (Tokenizer.LocatedToken) $2; $$ = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List) $4, GetLocation ($1)); + lbag.AddLocation ($$, GetLocation ($3)); } ; From 42aa01a5274541865257598d1fa623b59e9fafa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 3 Sep 2011 19:04:23 +0200 Subject: [PATCH 24/92] Improved error message. --- .../CSharp/Parser/ParseSelfTests.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs index a9c792b30e..e7fd84b270 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs @@ -97,23 +97,25 @@ namespace ICSharpCode.NRefactory.CSharp.Parser Assert.IsNull(node.FirstChild, "Token nodes should not have children"); } else { var prevNodeEnd = node.StartLocation; + var prevNode = node; for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) { - CheckWhitespace(prevNodeEnd, child.StartLocation); + CheckWhitespace(prevNode, prevNodeEnd, child, child.StartLocation); CheckMissingTokens(child); + prevNode = child; prevNodeEnd = child.EndLocation; } - CheckWhitespace(prevNodeEnd, node.EndLocation); + CheckWhitespace(prevNode, prevNodeEnd, node, node.EndLocation); } } - void CheckWhitespace(TextLocation whitespaceStart, TextLocation whitespaceEnd) + void CheckWhitespace(AstNode startNode, TextLocation whitespaceStart, AstNode endNode, TextLocation whitespaceEnd) { if (whitespaceStart == whitespaceEnd) return; int start = currentDocument.GetOffset(whitespaceStart.Line, whitespaceStart.Column); int end = currentDocument.GetOffset(whitespaceEnd.Line, whitespaceEnd.Column); string text = currentDocument.GetText(start, end - start); - Assert.IsTrue(string.IsNullOrWhiteSpace(text), "Expected whitespace between " + whitespaceStart + " and " + whitespaceEnd + Assert.IsTrue(string.IsNullOrWhiteSpace(text), "Expected whitespace between " + startNode.GetType () +":" + whitespaceStart + " and " + endNode.GetType () + ":" + whitespaceEnd + ", but got '" + text + "' (in " + currentFileName + ")"); } #endregion From c82538ebe4b8ef6dba996537dd509f72247479b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 10:02:39 +0200 Subject: [PATCH 25/92] Added basic code completion interfaces. --- .../Completion/DisplayFlags.cs | 38 ++++++++++++++ .../Completion/ICompletionData.cs | 47 ++++++++++++++++++ .../Completion/ICompletionDataFactory.cs | 49 +++++++++++++++++++ .../Completion/IEntityCompletionData.cs | 37 ++++++++++++++ .../ICSharpCode.NRefactory.csproj | 7 ++- 5 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 ICSharpCode.NRefactory/Completion/DisplayFlags.cs create mode 100644 ICSharpCode.NRefactory/Completion/ICompletionData.cs create mode 100644 ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs create mode 100644 ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs diff --git a/ICSharpCode.NRefactory/Completion/DisplayFlags.cs b/ICSharpCode.NRefactory/Completion/DisplayFlags.cs new file mode 100644 index 0000000000..93b38407d3 --- /dev/null +++ b/ICSharpCode.NRefactory/Completion/DisplayFlags.cs @@ -0,0 +1,38 @@ +// +// DisplayFlags.cs +// +// Author: +// Mike Krüger +// +// Copyright (c) 2011 Xamarin Inc. (http://xamarin.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; + +namespace ICSharpCode.NRefactory +{ + [Flags] + public enum DisplayFlags + { + None = 0, + Hidden = 1, + Obsolete = 2 + } +} + diff --git a/ICSharpCode.NRefactory/Completion/ICompletionData.cs b/ICSharpCode.NRefactory/Completion/ICompletionData.cs new file mode 100644 index 0000000000..d3bfeae603 --- /dev/null +++ b/ICSharpCode.NRefactory/Completion/ICompletionData.cs @@ -0,0 +1,47 @@ +// +// ICompletionData.cs +// +// Author: +// Mike Krüger +// +// Copyright (c) 2011 Xamarin Inc. (http://xamarin.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 +{ + public interface ICompletionData + { + string DisplayText { get; set; } + string Description { get; set; } + + DisplayFlags DisplayFlags { get; set; } + + bool HasOverloads { + get; + } + + IEnumerable OverloadedData { + get; + } + } +} diff --git a/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs b/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs new file mode 100644 index 0000000000..52ea7010b1 --- /dev/null +++ b/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs @@ -0,0 +1,49 @@ +// +// ICompletionDataFactory.cs +// +// Author: +// Mike Krüger +// +// Copyright (c) 2011 Xamarin Inc. (http://xamarin.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 ICSharpCode.NRefactory.TypeSystem; + +namespace ICSharpCode.NRefactory +{ + public interface ICompletionDataFactory + { + ICompletionData CreateEntityCompletionData (IEntity entity); + + /// + /// Creates a generic completion data. + /// + /// + /// The title of the completion data + /// + /// + /// The description of the literal. + /// + /// + /// The insert text. If null, title is taken. + /// + ICompletionData CreateLiteralCompletionData (string title, string description, string insertText = null); + } +} diff --git a/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs b/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs new file mode 100644 index 0000000000..b078212c05 --- /dev/null +++ b/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs @@ -0,0 +1,37 @@ +// +// IEntityCompletionData.cs +// +// Author: +// Mike Krüger +// +// Copyright (c) 2011 Xamarin Inc. (http://xamarin.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 ICSharpCode.NRefactory.TypeSystem; + +namespace ICSharpCode.NRefactory +{ + public interface IEntityCompletionData : ICompletionData + { + IEntity Entity { + get; + } + } +} diff --git a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj index 5d03a53e34..88c69f54aa 100644 --- a/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj +++ b/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj @@ -185,10 +185,13 @@ + + + + - - + From eb6c399d8c41886d25f6fc5509e5d421b24ceeb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 10:06:32 +0200 Subject: [PATCH 26/92] Moved to completion namespace. --- ICSharpCode.NRefactory/Completion/DisplayFlags.cs | 2 +- ICSharpCode.NRefactory/Completion/ICompletionData.cs | 2 +- ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs | 2 +- ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory/Completion/DisplayFlags.cs b/ICSharpCode.NRefactory/Completion/DisplayFlags.cs index 93b38407d3..ae4e1fe5f5 100644 --- a/ICSharpCode.NRefactory/Completion/DisplayFlags.cs +++ b/ICSharpCode.NRefactory/Completion/DisplayFlags.cs @@ -25,7 +25,7 @@ // THE SOFTWARE. using System; -namespace ICSharpCode.NRefactory +namespace ICSharpCode.NRefactory.Completion { [Flags] public enum DisplayFlags diff --git a/ICSharpCode.NRefactory/Completion/ICompletionData.cs b/ICSharpCode.NRefactory/Completion/ICompletionData.cs index d3bfeae603..8320755137 100644 --- a/ICSharpCode.NRefactory/Completion/ICompletionData.cs +++ b/ICSharpCode.NRefactory/Completion/ICompletionData.cs @@ -27,7 +27,7 @@ using System; using System.Collections.Generic; -namespace ICSharpCode.NRefactory +namespace ICSharpCode.NRefactory.Completion { public interface ICompletionData { diff --git a/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs b/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs index 52ea7010b1..41000503b1 100644 --- a/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs +++ b/ICSharpCode.NRefactory/Completion/ICompletionDataFactory.cs @@ -26,7 +26,7 @@ using System; using ICSharpCode.NRefactory.TypeSystem; -namespace ICSharpCode.NRefactory +namespace ICSharpCode.NRefactory.Completion { public interface ICompletionDataFactory { diff --git a/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs b/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs index b078212c05..0744f47230 100644 --- a/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs +++ b/ICSharpCode.NRefactory/Completion/IEntityCompletionData.cs @@ -26,7 +26,7 @@ using System; using ICSharpCode.NRefactory.TypeSystem; -namespace ICSharpCode.NRefactory +namespace ICSharpCode.NRefactory.Completion { public interface IEntityCompletionData : ICompletionData { From 0413ce92f99fab7687cd985174a1fecd3c22be6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 10:08:11 +0200 Subject: [PATCH 27/92] Added completion engine stub. --- .../Completion/CSharpCompletionEngine.cs | 51 +++++++++++++++++++ .../ICSharpCode.NRefactory.CSharp.csproj | 21 ++------ 2 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs diff --git a/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs b/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs new file mode 100644 index 0000000000..45a2ec2dd0 --- /dev/null +++ b/ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs @@ -0,0 +1,51 @@ +// +// CSharpCompletionEngine.cs +// +// Author: +// Mike Krüger +// +// Copyright (c) 2011 Xamarin Inc. (http://xamarin.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; +using ICSharpCode.NRefactory.Completion; +using ICSharpCode.NRefactory.Editor; + +namespace ICSharpCode.NRefactory.CSharp.Completion +{ + public class CSharpCompletionEngine + { + IDocument document; + ICompletionDataFactory factory; + + public CSharpCompletionEngine (IDocument document, ICompletionDataFactory factory) + { + this.document = document; + this.factory = factory; + } + + public IEnumerable GetCompletionData (int offset) + { + // BIG TODO !!!! + yield break; + } + } +} + diff --git a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj index 735f28069f..b5b2450cb3 100644 --- a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj +++ b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj @@ -1,4 +1,4 @@ - + {53DCA265-3C3C-42F9-B647-F72BA678122B} @@ -7,12 +7,13 @@ Library ICSharpCode.NRefactory.CSharp ICSharpCode.NRefactory.CSharp - v4.0 Properties False False 4 false + 10.0.0 + 2.0 AnyCPU @@ -296,21 +297,7 @@ - - - - - - - - - - - - - - - + From 5a2b4d207221ce8aace4b1e603e8629ff9c7fed4 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 4 Sep 2011 11:03:09 +0200 Subject: [PATCH 28/92] fix out parameter output in CSharpToVBConverterVisitor --- .../Visitors/CSharpToVBConverterVisitor.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs index 10d142671b..ef49061a86 100644 --- a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs +++ b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs @@ -1809,11 +1809,9 @@ namespace ICSharpCode.NRefactory.VB.Visitors ConvertNodes(parameterDeclaration.Attributes, param.Attributes); param.Modifiers = ConvertParamModifiers(parameterDeclaration.ParameterModifier); - if ((param.Modifiers & Modifiers.None) == Modifiers.None) - param.Modifiers = Modifiers.ByVal; if ((parameterDeclaration.ParameterModifier & ICSharpCode.NRefactory.CSharp.ParameterModifier.Out) == ICSharpCode.NRefactory.CSharp.ParameterModifier.Out) { AttributeBlock block = new AttributeBlock(); - block.Attributes.Add(new Ast.Attribute() { Type = new SimpleType("System.Runtime.InteropServices.OutAttribute") }); + block.Attributes.Add(new Ast.Attribute() { Type = new SimpleType("Out") }); param.Attributes.Add(block); } param.Name = new Identifier(parameterDeclaration.Name, AstLocation.Empty); @@ -1832,7 +1830,6 @@ namespace ICSharpCode.NRefactory.VB.Visitors case ICSharpCode.NRefactory.CSharp.ParameterModifier.This: return Modifiers.None; case ICSharpCode.NRefactory.CSharp.ParameterModifier.Ref: - return Modifiers.ByRef; case ICSharpCode.NRefactory.CSharp.ParameterModifier.Out: return Modifiers.ByRef; case ICSharpCode.NRefactory.CSharp.ParameterModifier.Params: From a1a649e84e0ebfd6a12d6ddb6be1fd3e13dcf15d Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 4 Sep 2011 12:02:04 +0200 Subject: [PATCH 29/92] Remove ITextEditorAdapter and use IDocument instead. --- .../Formatter/AstFormattingVisitor.cs | 197 +++++++------ .../Formatter/ITextEditorAdapter.cs | 83 ------ .../ICSharpCode.NRefactory.CSharp.csproj | 1 - .../Refactoring/NodeOutputAction.cs | 27 +- .../FormattingTests/TestFormattingBugs.cs | 8 +- .../FormattingTests/TestSpacingVisitor.cs | 160 +++++------ .../FormattingTests/TextEditorTestAdapter.cs | 262 ++---------------- .../Editor/IDocumentLine.cs | 10 + ICSharpCode.NRefactory/Editor/ISegment.cs | 2 +- .../Editor/ReadOnlyDocument.cs | 18 ++ 10 files changed, 256 insertions(+), 512 deletions(-) delete mode 100644 ICSharpCode.NRefactory.CSharp/Formatter/ITextEditorAdapter.cs diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index 99b8f67a3e..e69cbe4abf 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -27,6 +27,7 @@ using System; using System.Text; using System.Collections.Generic; using System.Linq; +using ICSharpCode.NRefactory.Editor; using ICSharpCode.NRefactory.TypeSystem; using ICSharpCode.NRefactory.CSharp.Refactoring; @@ -35,7 +36,7 @@ namespace ICSharpCode.NRefactory.CSharp public class AstFormattingVisitor : DepthFirstAstVisitor { CSharpFormattingOptions policy; - ITextEditorAdapter data; + IDocument document; IActionFactory factory; List changes = new List (); Indent curIndent = new Indent (); @@ -67,16 +68,20 @@ namespace ICSharpCode.NRefactory.CSharp get; set; } + + public string EolMarker { get; set; } - public AstFormattingVisitor (CSharpFormattingOptions policy, ITextEditorAdapter data, IActionFactory factory) + public AstFormattingVisitor (CSharpFormattingOptions policy, IDocument document, IActionFactory factory, + bool tabsToSpaces = false, int indentationSize = 4) { if (factory == null) throw new ArgumentNullException ("factory"); this.policy = policy; - this.data = data; - this.curIndent.TabsToSpaces = this.data.TabsToSpaces; - this.curIndent.TabSize = this.data.TabSize; + this.document = document; + this.curIndent.TabsToSpaces = tabsToSpaces; + this.curIndent.TabSize = indentationSize; this.factory = factory; + this.EolMarker = Environment.NewLine; CorrectBlankLines = true; } @@ -94,21 +99,23 @@ namespace ICSharpCode.NRefactory.CSharp int line = loc.Line; do { line++; - } while (line < data.LineCount && data.GetEditableLength (line) == data.GetIndentation (line).Length); - var start = data.LocationToOffset (node.EndLocation.Line, node.EndLocation.Column); + } while (line < document.LineCount && IsSpacing(document.GetLineByNumber(line))); + var start = document.GetOffset (node.EndLocation); int foundBlankLines = line - loc.Line - 1; StringBuilder sb = new StringBuilder (); for (int i = 0; i < blankLines - foundBlankLines; i++) - sb.Append (data.EolMarker); + sb.Append (this.EolMarker); int ws = start; - while (ws < data.Length && IsSpacing (data.GetCharAt (ws))) + while (ws < document.TextLength && IsSpacing (document.GetCharAt (ws))) ws++; int removedChars = ws - start; - if (foundBlankLines > blankLines) - removedChars += data.GetLineEndOffset (loc.Line + foundBlankLines - blankLines) - data.GetLineEndOffset (loc.Line); + if (foundBlankLines > blankLines) { + removedChars += document.GetLineByNumber (loc.Line + foundBlankLines - blankLines).EndOffset + - document.GetLineByNumber (loc.Line).EndOffset; + } AddChange (start, removedChars, sb.ToString ()); } @@ -120,12 +127,12 @@ namespace ICSharpCode.NRefactory.CSharp int line = loc.Line; do { line--; - } while (line > 0 && data.GetEditableLength (line) == data.GetIndentation (line).Length); - int end = data.GetLineOffset (loc.Line); - int start = line >= 1 ? data.GetLineEndOffset (line) : 0; + } while (line > 0 && IsSpacing(document.GetLineByNumber(line))); + int end = document.GetOffset (loc.Line, 1); + int start = document.GetOffset (line + 1, 1); StringBuilder sb = new StringBuilder (); for (int i = 0; i < blankLines; i++) - sb.Append (data.EolMarker); + sb.Append (this.EolMarker); AddChange (start, end - start, sb.ToString ()); } @@ -216,6 +223,16 @@ namespace ICSharpCode.NRefactory.CSharp { return ch == ' ' || ch == '\t'; } + + bool IsSpacing (ISegment segment) + { + int endOffset = segment.EndOffset; + for (int i = segment.Offset; i < endOffset; i++) { + if (!IsSpacing(document.GetCharAt(i))) + return false; + } + return true; + } int SearchLastNonWsChar (int startOffset, int endOffset) { @@ -226,18 +243,18 @@ namespace ICSharpCode.NRefactory.CSharp int result = -1; bool inComment = false; - for (int i = startOffset; i < endOffset && i < data.Length; i++) { - char ch = data.GetCharAt (i); + for (int i = startOffset; i < endOffset && i < document.TextLength; i++) { + char ch = document.GetCharAt (i); if (IsSpacing (ch)) continue; - if (ch == '/' && i + 1 < data.Length && data.GetCharAt (i + 1) == '/') + if (ch == '/' && i + 1 < document.TextLength && document.GetCharAt (i + 1) == '/') return result; - if (ch == '/' && i + 1 < data.Length && data.GetCharAt (i + 1) == '*') { + if (ch == '/' && i + 1 < document.TextLength && document.GetCharAt (i + 1) == '*') { inComment = true; i++; continue; } - if (inComment && ch == '*' && i + 1 < data.Length && data.GetCharAt (i + 1) == '/') { + if (inComment && ch == '*' && i + 1 < document.TextLength && document.GetCharAt (i + 1) == '/') { inComment = false; i++; continue; @@ -271,11 +288,11 @@ namespace ICSharpCode.NRefactory.CSharp if (n == null) return; TextLocation location = n.EndLocation; - int offset = data.LocationToOffset (location.Line, location.Column); - if (location.Column > data.GetEditableLength (location.Line)) + int offset = document.GetOffset (location); + if (location.Column > document.GetLineByNumber (location.Line).Length) return; int i = offset; - while (i < data.Length && IsSpacing (data.GetCharAt (i))) { + while (i < document.TextLength && IsSpacing (document.GetCharAt (i))) { i++; } ForceSpace (offset - 1, i, forceSpaces); @@ -303,12 +320,12 @@ namespace ICSharpCode.NRefactory.CSharp return 0; TextLocation location = n.StartLocation; // respect manual line breaks. - if (location.Column <= 1 || data.GetIndentation (location.Line).Length == location.Column - 1) + if (location.Column <= 1 || GetIndentation (location.Line).Length == location.Column - 1) return 0; - int offset = data.LocationToOffset (location.Line, location.Column); + int offset = document.GetOffset (location); int i = offset - 1; - while (i >= 0 && IsSpacing (data.GetCharAt (i))) { + while (i >= 0 && IsSpacing (document.GetCharAt (i))) { i--; } ForceSpace (i, offset, forceSpaces); @@ -337,14 +354,14 @@ namespace ICSharpCode.NRefactory.CSharp case PropertyFormatting.ForceOneLine: isSimple = IsSimpleAccessor (propertyDeclaration.Getter) && IsSimpleAccessor (propertyDeclaration.Setter); if (isSimple) { - int offset = this.data.LocationToOffset (propertyDeclaration.LBraceToken.StartLocation.Line, propertyDeclaration.LBraceToken.StartLocation.Column); + int offset = this.document.GetOffset (propertyDeclaration.LBraceToken.StartLocation); int start = SearchWhitespaceStart (offset); int end = SearchWhitespaceEnd (offset); AddChange (start, offset - start, " "); AddChange (offset + 1, end - offset - 2, " "); - offset = this.data.LocationToOffset (propertyDeclaration.RBraceToken.StartLocation.Line, propertyDeclaration.RBraceToken.StartLocation.Column); + offset = this.document.GetOffset (propertyDeclaration.RBraceToken.StartLocation); start = SearchWhitespaceStart (offset); AddChange (start, offset - start, " "); oneLine = true; @@ -360,15 +377,15 @@ namespace ICSharpCode.NRefactory.CSharp if (!propertyDeclaration.Getter.IsNull) { if (!oneLine) { if (!IsLineIsEmptyUpToEol (propertyDeclaration.Getter.StartLocation)) { - int offset = this.data.LocationToOffset (propertyDeclaration.Getter.StartLocation.Line, propertyDeclaration.Getter.StartLocation.Column); + int offset = this.document.GetOffset (propertyDeclaration.Getter.StartLocation); int start = SearchWhitespaceStart (offset); string indentString = this.curIndent.IndentString; - AddChange (start, offset - start, this.data.EolMarker + indentString); + AddChange (start, offset - start, this.EolMarker + indentString); } else { FixIndentation (propertyDeclaration.Getter.StartLocation); } } else { - int offset = this.data.LocationToOffset (propertyDeclaration.Getter.StartLocation.Line, propertyDeclaration.Getter.StartLocation.Column); + int offset = this.document.GetOffset (propertyDeclaration.Getter.StartLocation); int start = SearchWhitespaceStart (offset); AddChange (start, offset - start, " "); @@ -388,15 +405,15 @@ namespace ICSharpCode.NRefactory.CSharp if (!propertyDeclaration.Setter.IsNull) { if (!oneLine) { if (!IsLineIsEmptyUpToEol (propertyDeclaration.Setter.StartLocation)) { - int offset = this.data.LocationToOffset (propertyDeclaration.Setter.StartLocation.Line, propertyDeclaration.Setter.StartLocation.Column); + int offset = this.document.GetOffset (propertyDeclaration.Setter.StartLocation); int start = SearchWhitespaceStart (offset); string indentString = this.curIndent.IndentString; - AddChange (start, offset - start, this.data.EolMarker + indentString); + AddChange (start, offset - start, this.EolMarker + indentString); } else { FixIndentation (propertyDeclaration.Setter.StartLocation); } } else { - int offset = this.data.LocationToOffset (propertyDeclaration.Setter.StartLocation.Line, propertyDeclaration.Setter.StartLocation.Column); + int offset = this.document.GetOffset (propertyDeclaration.Setter.StartLocation); int start = SearchWhitespaceStart (offset); AddChange (start, offset - start, " "); @@ -677,7 +694,7 @@ namespace ICSharpCode.NRefactory.CSharp FixIndentationForceNewLine (destructorDeclaration.StartLocation); CSharpTokenNode lParen = destructorDeclaration.LParToken; - int offset = this.data.LocationToOffset (lParen.StartLocation.Line, lParen.StartLocation.Column); + int offset = this.document.GetOffset (lParen.StartLocation); ForceSpaceBefore (offset, policy.SpaceBeforeConstructorDeclarationParentheses); object result = null; @@ -786,9 +803,9 @@ namespace ICSharpCode.NRefactory.CSharp case BraceForcement.AddBraces: if (!isBlock) { AstNode n = node.Parent.GetCSharpNodeBefore (node); - int start = data.LocationToOffset (n.EndLocation.Line, n.EndLocation.Column); + int start = document.GetOffset (n.EndLocation); var next = n.GetNextNode (); - int offset = data.LocationToOffset (next.StartLocation.Line, next.StartLocation.Column); + int offset = document.GetOffset (next.StartLocation); string startBrace = ""; switch (braceStyle) { case BraceStyle.EndOfLineWithoutSpace: @@ -798,15 +815,15 @@ namespace ICSharpCode.NRefactory.CSharp startBrace = " {"; break; case BraceStyle.NextLine: - startBrace = data.EolMarker + curIndent.IndentString + "{"; + startBrace = this.EolMarker + curIndent.IndentString + "{"; break; case BraceStyle.NextLineShifted2: case BraceStyle.NextLineShifted: - startBrace = data.EolMarker + curIndent.IndentString + curIndent.SingleIndent + "{"; + startBrace = this.EolMarker + curIndent.IndentString + curIndent.SingleIndent + "{"; break; } - if (IsLineIsEmptyUpToEol (data.LocationToOffset (node.StartLocation.Line, node.StartLocation.Column))) - startBrace += data.EolMarker + data.GetIndentation (node.StartLocation.Line); + if (IsLineIsEmptyUpToEol (document.GetOffset (node.StartLocation))) + startBrace += this.EolMarker + GetIndentation (node.StartLocation.Line); AddChange (start, offset - start, startBrace); } break; @@ -814,10 +831,10 @@ namespace ICSharpCode.NRefactory.CSharp if (isBlock) { BlockStatement block = node as BlockStatement; if (block.Statements.Count () == 1) { - int offset1 = data.LocationToOffset (node.StartLocation.Line, node.StartLocation.Column); + int offset1 = document.GetOffset (node.StartLocation); int start = SearchWhitespaceStart (offset1); - int offset2 = data.LocationToOffset (node.EndLocation.Line, node.EndLocation.Column); + int offset2 = document.GetOffset (node.EndLocation); int end = SearchWhitespaceStart (offset2 - 1); AddChange (start, offset1 - start + 1, null); @@ -853,8 +870,8 @@ namespace ICSharpCode.NRefactory.CSharp break; case BraceForcement.AddBraces: if (!isBlock) { - int offset = data.LocationToOffset (node.EndLocation.Line, node.EndLocation.Column); - if (!char.IsWhiteSpace (data.GetCharAt (offset))) + int offset = document.GetOffset (node.EndLocation); + if (!char.IsWhiteSpace (document.GetCharAt (offset))) offset++; string startBrace = ""; switch (braceStyle) { @@ -862,17 +879,17 @@ namespace ICSharpCode.NRefactory.CSharp startBrace = null; break; case BraceStyle.EndOfLineWithoutSpace: - startBrace = data.EolMarker + curIndent.IndentString + "}"; + startBrace = this.EolMarker + curIndent.IndentString + "}"; break; case BraceStyle.EndOfLine: - startBrace = data.EolMarker + curIndent.IndentString + "}"; + startBrace = this.EolMarker + curIndent.IndentString + "}"; break; case BraceStyle.NextLine: - startBrace = data.EolMarker + curIndent.IndentString + "}"; + startBrace = this.EolMarker + curIndent.IndentString + "}"; break; case BraceStyle.NextLineShifted2: case BraceStyle.NextLineShifted: - startBrace = data.EolMarker + curIndent.IndentString + curIndent.SingleIndent + "}"; + startBrace = this.EolMarker + curIndent.IndentString + curIndent.SingleIndent + "}"; break; } if (startBrace != null) @@ -889,10 +906,10 @@ namespace ICSharpCode.NRefactory.CSharp return; // LineSegment lbraceLineSegment = data.Document.GetLine (lbrace.StartLocation.Line); - int lbraceOffset = data.LocationToOffset (lbrace.StartLocation.Line, lbrace.StartLocation.Column); + int lbraceOffset = document.GetOffset (lbrace.StartLocation); // LineSegment rbraceLineSegment = data.Document.GetLine (rbrace.StartLocation.Line); - int rbraceOffset = data.LocationToOffset (rbrace.StartLocation.Line, rbrace.StartLocation.Column); + int rbraceOffset = document.GetOffset (rbrace.StartLocation); int whitespaceStart = SearchWhitespaceStart (lbraceOffset); int whitespaceEnd = SearchWhitespaceLineStart (rbraceOffset); string startIndent = ""; @@ -903,7 +920,7 @@ namespace ICSharpCode.NRefactory.CSharp break; case BraceStyle.EndOfLineWithoutSpace: startIndent = ""; - endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString : data.EolMarker + curIndent.IndentString; + endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString : this.EolMarker + curIndent.IndentString; break; case BraceStyle.EndOfLine: var prevNode = lbrace.GetPrevNode (); @@ -914,22 +931,22 @@ namespace ICSharpCode.NRefactory.CSharp while (prevNode is Comment) { prevNode = prevNode.GetPrevNode (); } - whitespaceStart = data.LocationToOffset (prevNode.EndLocation.Line, prevNode.EndLocation.Column); + whitespaceStart = document.GetOffset (prevNode.EndLocation); lbraceOffset = whitespaceStart; startIndent = " {"; } else { startIndent = " "; } - endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString : data.EolMarker + curIndent.IndentString; + endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString : this.EolMarker + curIndent.IndentString; break; case BraceStyle.NextLine: - startIndent = data.EolMarker + curIndent.IndentString; - endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString : data.EolMarker + curIndent.IndentString; + startIndent = this.EolMarker + curIndent.IndentString; + endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString : this.EolMarker + curIndent.IndentString; break; case BraceStyle.NextLineShifted2: case BraceStyle.NextLineShifted: - startIndent = data.EolMarker + curIndent.IndentString + curIndent.SingleIndent; - endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString + curIndent.SingleIndent : data.EolMarker + curIndent.IndentString + curIndent.SingleIndent; + startIndent = this.EolMarker + curIndent.IndentString + curIndent.SingleIndent; + endIndent = IsLineIsEmptyUpToEol (rbraceOffset) ? curIndent.IndentString + curIndent.SingleIndent : this.EolMarker + curIndent.IndentString + curIndent.SingleIndent; break; } @@ -944,7 +961,7 @@ namespace ICSharpCode.NRefactory.CSharp if (changes.Any (c => c.Offset == offset && c.RemovedChars == removedChars && c.InsertedText == insertedText)) return; - string currentText = data.GetTextAt (offset, removedChars); + string currentText = document.GetText (offset, removedChars); if (currentText == insertedText) return; if (currentText.Any (c => !(char.IsWhiteSpace (c) || c == '\r' || c == '\t' || c == '{' || c == '}'))) @@ -973,13 +990,13 @@ namespace ICSharpCode.NRefactory.CSharp public bool IsLineIsEmptyUpToEol (TextLocation startLocation) { - return IsLineIsEmptyUpToEol (data.LocationToOffset (startLocation.Line, startLocation.Column) - 1); + return IsLineIsEmptyUpToEol (document.GetOffset (startLocation) - 1); } bool IsLineIsEmptyUpToEol (int startOffset) { for (int offset = startOffset - 1; offset >= 0; offset--) { - char ch = data.GetCharAt (offset); + char ch = document.GetCharAt (offset); if (ch != ' ' && ch != '\t') return ch == '\n' || ch == '\r'; } @@ -991,7 +1008,7 @@ namespace ICSharpCode.NRefactory.CSharp if (startOffset < 0) throw new ArgumentOutOfRangeException ("startoffset", "value : " + startOffset); for (int offset = startOffset - 1; offset >= 0; offset--) { - char ch = data.GetCharAt (offset); + char ch = document.GetCharAt (offset); if (!Char.IsWhiteSpace (ch)) { return offset + 1; } @@ -1001,15 +1018,15 @@ namespace ICSharpCode.NRefactory.CSharp int SearchWhitespaceEnd (int startOffset) { - if (startOffset > data.Length) + if (startOffset > document.TextLength) throw new ArgumentOutOfRangeException ("startoffset", "value : " + startOffset); - for (int offset = startOffset + 1; offset < data.Length; offset++) { - char ch = data.GetCharAt (offset); + for (int offset = startOffset + 1; offset < document.TextLength; offset++) { + char ch = document.GetCharAt (offset); if (!Char.IsWhiteSpace (ch)) { return offset + 1; } } - return data.Length - 1; + return document.TextLength - 1; } int SearchWhitespaceLineStart (int startOffset) @@ -1017,7 +1034,7 @@ namespace ICSharpCode.NRefactory.CSharp if (startOffset < 0) throw new ArgumentOutOfRangeException ("startoffset", "value : " + startOffset); for (int offset = startOffset - 1; offset >= 0; offset--) { - char ch = data.GetCharAt (offset); + char ch = document.GetCharAt (offset); if (ch != ' ' && ch != '\t') { return offset + 1; } @@ -1466,7 +1483,7 @@ namespace ICSharpCode.NRefactory.CSharp { bool insertedSpace = false; do { - char ch = data.GetCharAt (offset); + char ch = document.GetCharAt (offset); //Console.WriteLine (ch); if (!IsSpacing (ch) && (insertedSpace || !forceSpace)) break; @@ -1524,9 +1541,9 @@ namespace ICSharpCode.NRefactory.CSharp { if (semicolon.IsNull) return; - int endOffset = data.LocationToOffset (semicolon.StartLocation.Line, semicolon.StartLocation.Column); + int endOffset = document.GetOffset (semicolon.StartLocation); int offset = endOffset; - while (offset - 1 > 0 && char.IsWhiteSpace (data.GetCharAt (offset - 1))) { + while (offset - 1 > 0 && char.IsWhiteSpace (document.GetCharAt (offset - 1))) { offset--; } if (offset < endOffset) { @@ -1538,10 +1555,10 @@ namespace ICSharpCode.NRefactory.CSharp { if (keywordNode == null) return; - int offset = data.LocationToOffset (keywordNode.StartLocation.Line, keywordNode.StartLocation.Column); + int offset = document.GetOffset (keywordNode.StartLocation); int whitespaceStart = SearchWhitespaceStart (offset); - string indentString = newLine ? data.EolMarker + this.curIndent.IndentString : " "; + string indentString = newLine ? this.EolMarker + this.curIndent.IndentString : " "; AddChange (whitespaceStart, offset - whitespaceStart, indentString); } @@ -1549,7 +1566,7 @@ namespace ICSharpCode.NRefactory.CSharp void FixStatementIndentation (TextLocation location) { - int offset = data.LocationToOffset (location.Line, location.Column); + int offset = document.GetOffset (location); if (offset <= 0) { Console.WriteLine ("possible wrong offset"); Console.WriteLine (Environment.StackTrace); @@ -1557,7 +1574,7 @@ namespace ICSharpCode.NRefactory.CSharp } bool isEmpty = IsLineIsEmptyUpToEol (offset); int lineStart = SearchWhitespaceLineStart (offset); - string indentString = nextStatementIndent == null ? (isEmpty ? "" : data.EolMarker) + this.curIndent.IndentString : nextStatementIndent; + string indentString = nextStatementIndent == null ? (isEmpty ? "" : this.EolMarker) + this.curIndent.IndentString : nextStatementIndent; nextStatementIndent = null; AddChange (lineStart, offset - lineStart, indentString); } @@ -1569,40 +1586,54 @@ namespace ICSharpCode.NRefactory.CSharp void FixIndentation (TextLocation location, int relOffset) { - if (location.Line < 1 || location.Line > data.LineCount) { + if (location.Line < 1 || location.Line > document.LineCount) { Console.WriteLine ("Invalid location " + location); Console.WriteLine (Environment.StackTrace); return; } - string lineIndent = data.GetIndentation (location.Line); + string lineIndent = GetIndentation (location.Line); string indentString = this.curIndent.IndentString; if (indentString != lineIndent && location.Column - 1 + relOffset == lineIndent.Length) { - AddChange (data.GetLineOffset (location.Line), lineIndent.Length, indentString); + AddChange (document.GetOffset (location.Line, 1), lineIndent.Length, indentString); } } void FixIndentationForceNewLine (TextLocation location) { - string lineIndent = data.GetIndentation (location.Line); + string lineIndent = GetIndentation (location.Line); string indentString = this.curIndent.IndentString; if (location.Column - 1 == lineIndent.Length) { - AddChange (data.GetLineOffset (location.Line), lineIndent.Length, indentString); + AddChange (document.GetOffset (location.Line, 1), lineIndent.Length, indentString); } else { - int offset = data.LocationToOffset (location.Line, location.Column); + int offset = document.GetOffset (location); int start = SearchWhitespaceLineStart (offset); if (start > 0) { - char ch = data.GetCharAt (start - 1); + char ch = document.GetCharAt (start - 1); if (ch == '\n') { start--; - if (start > 1 && data.GetCharAt (start - 1) == '\r') + if (start > 1 && document.GetCharAt (start - 1) == '\r') start--; } else if (ch == '\r') { start--; } - AddChange (start, offset - start, data.EolMarker + indentString); + AddChange (start, offset - start, this.EolMarker + indentString); } } } + + string GetIndentation(int lineNumber) + { + IDocumentLine line = document.GetLineByNumber(lineNumber); + StringBuilder b = new StringBuilder(); + int endOffset = line.EndOffset; + for (int i = line.Offset; i < endOffset; i++) { + char c = document.GetCharAt(i); + if (!IsSpacing(c)) + break; + b.Append(c); + } + return b.ToString(); + } } } diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/ITextEditorAdapter.cs b/ICSharpCode.NRefactory.CSharp/Formatter/ITextEditorAdapter.cs deleted file mode 100644 index 4568f8736e..0000000000 --- a/ICSharpCode.NRefactory.CSharp/Formatter/ITextEditorAdapter.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// ITextEditorAdapter.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 -{ - public interface ITextEditorAdapter - { - bool TabsToSpaces { get; } - - int TabSize { get; } - - string EolMarker { get; } - - string Text { get; } - - int Length { get; } - - int LocationToOffset (int line, int col); - char GetCharAt (int offset); - string GetTextAt (int offset, int length); - - int LineCount { get; } - - int GetEditableLength (int lineNumber); - string GetIndentation (int lineNumber); - int GetLineOffset (int lineNumber); - int GetLineLength (int lineNumber); - int GetLineEndOffset (int lineNumber); - - void Replace (int offset, int count, string text); - } - - /* - public static class ITextEditorAdapterHelperMethods - { - public static void AcceptChanges (this ITextEditorAdapter adapter, List changes) - { - for (int i = 0; i < changes.Count; i++) { - changes [i].PerformChange (adapter); - var replaceChange = changes [i]; - for (int j = i + 1; j < changes.Count; j++) { - var change = changes [j]; - if (replaceChange.Offset >= 0 && change.Offset >= 0) { - if (replaceChange.Offset < change.Offset) { - change.Offset -= replaceChange.RemovedChars; - if (!string.IsNullOrEmpty (replaceChange.InsertedText)) - change.Offset += replaceChange.InsertedText.Length; - } else if (replaceChange.Offset < change.Offset + change.RemovedChars) { - change.RemovedChars -= replaceChange.RemovedChars; - change.Offset = replaceChange.Offset + (!string.IsNullOrEmpty (replaceChange.InsertedText) ? replaceChange.InsertedText.Length : 0); - } - } - } - } - } - }*/ -} - diff --git a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj index b5b2450cb3..7be6865e41 100644 --- a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj +++ b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj @@ -164,7 +164,6 @@ - diff --git a/ICSharpCode.NRefactory.CSharp/Refactoring/NodeOutputAction.cs b/ICSharpCode.NRefactory.CSharp/Refactoring/NodeOutputAction.cs index 47d5e7ba70..fd0e81a4fc 100644 --- a/ICSharpCode.NRefactory.CSharp/Refactoring/NodeOutputAction.cs +++ b/ICSharpCode.NRefactory.CSharp/Refactoring/NodeOutputAction.cs @@ -1,4 +1,4 @@ -// +// // NodeOutputChange.cs // // Author: @@ -26,6 +26,7 @@ using System; using System.Collections.Generic; +using ICSharpCode.NRefactory.Editor; namespace ICSharpCode.NRefactory.CSharp.Refactoring { @@ -109,28 +110,4 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring this.NodeOutput = output; } } - - - /// - /// An (Offset,Length)-pair. - /// - public interface ISegment - { - /// - /// Gets the start offset of the segment. - /// - int Offset { get; } - - /// - /// Gets the length of the segment. - /// - /// Must not be negative. - int Length { get; } - - /// - /// Gets the end offset of the segment. - /// - /// EndOffset = Offset + Length; - int EndOffset { get; } - } } diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs index 8e667542e7..0b2184ccfc 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs @@ -1,4 +1,4 @@ -// +// // TestFormattingBugs.cs // // Author: @@ -131,9 +131,9 @@ using (IDisposable b = null) { " + input + @" } }"); - int start = result.GetLineOffset (5); - int end = result.GetLineOffset (result.LineCount - 1); - string text = result.GetTextAt (start, end - start).Trim (); + int start = result.GetOffset (5, 1); + int end = result.GetOffset (result.LineCount - 1, 1); + string text = result.GetText (start, end - start).Trim (); expectedOutput = expectedOutput.Replace ("\n", "\n\t\t"); Assert.AreEqual (expectedOutput, text); } diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs index 87d61ee511..3f0c236024 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestSpacingVisitor.cs @@ -1,4 +1,4 @@ -// +// // TestFormattingVisitor.cs // // Author: @@ -142,7 +142,7 @@ namespace ICSharpCode.NRefactory.FormattingTests int i2 = result.Text.IndexOf ("right") + "right".Length; if (i1 < 0 || i2 < 0) Assert.Fail ("text invalid:" + result.Text); - Assert.AreEqual ("left " + op + " right", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual ("left " + op + " right", result.GetText (i1, i2 - i1)); } [Test()] @@ -234,7 +234,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("condition"); int i2 = result.Text.IndexOf ("falseexpr") + "falseexpr".Length; - Assert.AreEqual (@"condition ? trueexpr : falseexpr", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"condition ? trueexpr : falseexpr", result.GetText (i1, i2 - i1)); policy.SpaceBeforeConditionalOperatorCondition = false; @@ -250,7 +250,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); i1 = result.Text.IndexOf ("true"); i2 = result.Text.IndexOf ("falseexpr") + "falseexpr".Length; - Assert.AreEqual (@"true?trueexpr:falseexpr", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"true?trueexpr:falseexpr", result.GetText (i1, i2 - i1)); } [Test()] @@ -268,7 +268,7 @@ namespace ICSharpCode.NRefactory.FormattingTests int i1 = result.Text.IndexOf ("MethodCall"); int i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"MethodCall ();", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"MethodCall ();", result.GetText (i1, i2 - i1)); result = GetResult (policy, @"class Test { @@ -282,7 +282,7 @@ namespace ICSharpCode.NRefactory.FormattingTests result = GetResult (policy, result.Text); i1 = result.Text.IndexOf ("MethodCall"); i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"MethodCall();", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"MethodCall();", result.GetText (i1, i2 - i1)); } [Test()] @@ -299,7 +299,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( true )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( true )", result.GetText (i1, i2 - i1)); policy.SpaceWithinMethodCallParentheses = false; @@ -312,7 +312,7 @@ namespace ICSharpCode.NRefactory.FormattingTests i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(true)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(true)", result.GetText (i1, i2 - i1)); } [Test()] @@ -329,7 +329,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("if"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"if (true)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"if (true)", result.GetText (i1, i2 - i1)); } [Test()] @@ -346,7 +346,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( true )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( true )", result.GetText (i1, i2 - i1)); } [Test()] @@ -363,7 +363,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("while"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"while (true)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"while (true)", result.GetText (i1, i2 - i1)); } [Test()] @@ -381,7 +381,7 @@ namespace ICSharpCode.NRefactory.FormattingTests int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( true )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( true )", result.GetText (i1, i2 - i1)); } [Test()] @@ -398,7 +398,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("for"); int i2 = result.Text.LastIndexOf ("(") + "(".Length; - Assert.AreEqual (@"for (", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"for (", result.GetText (i1, i2 - i1)); } [Test()] @@ -415,7 +415,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( ;; )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( ;; )", result.GetText (i1, i2 - i1)); } [Test()] @@ -432,7 +432,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("foreach"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"foreach (var o in list)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"foreach (var o in list)", result.GetText (i1, i2 - i1)); } [Test()] @@ -449,7 +449,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( var o in list )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( var o in list )", result.GetText (i1, i2 - i1)); } [Test()] @@ -466,7 +466,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("catch"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"catch (Exception)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"catch (Exception)", result.GetText (i1, i2 - i1)); } [Test()] @@ -483,7 +483,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( Exception )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( Exception )", result.GetText (i1, i2 - i1)); } [Test()] @@ -500,7 +500,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.IndexOf ("lock"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"lock (this)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"lock (this)", result.GetText (i1, i2 - i1)); } [Test()] @@ -517,7 +517,7 @@ namespace ICSharpCode.NRefactory.FormattingTests }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( this )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( this )", result.GetText (i1, i2 - i1)); } [Test()] @@ -535,7 +535,7 @@ namespace ICSharpCode.NRefactory.FormattingTests int i1 = result.Text.LastIndexOf ("for"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"for (int i; true; i++)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"for (int i; true; i++)", result.GetText (i1, i2 - i1)); } [Test()] @@ -554,7 +554,7 @@ namespace ICSharpCode.NRefactory.FormattingTests int i1 = result.Text.LastIndexOf ("for"); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"for (int i ;true ;i++)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"for (int i ;true ;i++)", result.GetText (i1, i2 - i1)); } [Test()] @@ -572,7 +572,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("return"); int i2 = result.Text.LastIndexOf ("null") + "null".Length; - Assert.AreEqual (@"return (Test) null", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"return (Test) null", result.GetText (i1, i2 - i1)); } [Test()] @@ -589,7 +589,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("using"); int i2 = result.Text.LastIndexOf ("(") + "(".Length; - Assert.AreEqual (@"using (", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"using (", result.GetText (i1, i2 - i1)); } [Test()] @@ -606,7 +606,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( a )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( a )", result.GetText (i1, i2 - i1)); } static void TestAssignmentOperator (CSharpFormattingOptions policy, string op) @@ -617,7 +617,7 @@ return (Test)null; int i2 = result.Text.IndexOf ("right") + "right".Length; if (i1 < 0 || i2 < 0) Assert.Fail ("text invalid:" + result.Text); - Assert.AreEqual ("left " + op + " right", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual ("left " + op + " right", result.GetText (i1, i2 - i1)); } [Test()] @@ -653,7 +653,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("left"); int i2 = result.Text.LastIndexOf ("right") + "right".Length; - Assert.AreEqual (@"left = right", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"left = right", result.GetText (i1, i2 - i1)); } [Test()] @@ -670,7 +670,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("switch"); int i2 = result.Text.LastIndexOf ("(") + "(".Length; - Assert.AreEqual (@"switch (", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"switch (", result.GetText (i1, i2 - i1)); } [Test()] @@ -687,7 +687,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( test )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( test )", result.GetText (i1, i2 - i1)); } [Test()] @@ -704,7 +704,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( test )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( test )", result.GetText (i1, i2 - i1)); } [Test()] @@ -720,7 +720,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( int a )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( int a )", result.GetText (i1, i2 - i1)); } [Test()] @@ -737,7 +737,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( int )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( int )", result.GetText (i1, i2 - i1)); } [Test()] @@ -754,7 +754,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( int )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( int )", result.GetText (i1, i2 - i1)); } [Test()] @@ -771,7 +771,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("sizeof"); int i2 = result.Text.LastIndexOf ("(") + "(".Length; - Assert.AreEqual (@"sizeof (", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"sizeof (", result.GetText (i1, i2 - i1)); } [Test()] @@ -788,7 +788,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( int )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( int )", result.GetText (i1, i2 - i1)); } [Test()] @@ -806,7 +806,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("typeof"); int i2 = result.Text.LastIndexOf ("(") + "(".Length; - Assert.AreEqual (@"typeof (", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"typeof (", result.GetText (i1, i2 - i1)); } [Test()] @@ -823,7 +823,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( a + b )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( a + b )", result.GetText (i1, i2 - i1)); result = GetResult (policy, @"class Test { void TestMe () @@ -835,7 +835,7 @@ return (Test)null; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( a + b )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( a + b )", result.GetText (i1, i2 - i1)); } [Test()] @@ -852,7 +852,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("new"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"new Test ();", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"new Test ();", result.GetText (i1, i2 - i1)); } [Test()] @@ -869,7 +869,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("new"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"new Test ( 1 );", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"new Test ( 1 );", result.GetText (i1, i2 - i1)); } [Test()] @@ -886,7 +886,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("new"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"new Test ( );", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"new Test ( );", result.GetText (i1, i2 - i1)); } [Test()] @@ -904,7 +904,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("new"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"new Test (1 ,2);", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"new Test (1 ,2);", result.GetText (i1, i2 - i1)); } [Test()] @@ -921,7 +921,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("new"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"new Test (1, 2);", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"new Test (1, 2);", result.GetText (i1, i2 - i1)); } [Test()] @@ -936,20 +936,20 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("int"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"int a, b, c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a, b, c;", result.GetText (i1, i2 - i1)); policy.SpaceBeforeFieldDeclarationComma = true; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("int"); i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"int a , b , c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a , b , c;", result.GetText (i1, i2 - i1)); policy.SpaceBeforeFieldDeclarationComma = false; policy.SpaceAfterFieldDeclarationComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("int"); i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"int a,b,c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a,b,c;", result.GetText (i1, i2 - i1)); } [Test()] @@ -964,13 +964,13 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a ,int b ,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a ,int b ,int c)", result.GetText (i1, i2 - i1)); policy.SpaceBeforeMethodDeclarationParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a,int b,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a,int b,int c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -985,13 +985,13 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a, int b, int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a, int b, int c)", result.GetText (i1, i2 - i1)); policy.SpaceAfterMethodDeclarationParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a,int b,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a,int b,int c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1008,7 +1008,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("x"); int i2 = result.Text.LastIndexOf ("null") + "null".Length; - Assert.AreEqual (@"x => x != null", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"x => x != null", result.GetText (i1, i2 - i1)); } [Test()] @@ -1026,7 +1026,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("int"); int i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"int a ,b ,c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a ,b ,c;", result.GetText (i1, i2 - i1)); result = GetResult (policy, result.Text); @@ -1035,7 +1035,7 @@ return (Test)null; result = GetResult (policy, result.Text); i1 = result.Text.IndexOf ("int"); i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"int a,b,c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a,b,c;", result.GetText (i1, i2 - i1)); } [Test()] @@ -1053,7 +1053,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("int"); int i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"int a = 5 , b = 6 , c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a = 5 , b = 6 , c;", result.GetText (i1, i2 - i1)); result = GetResult (policy, result.Text); @@ -1063,7 +1063,7 @@ return (Test)null; result = GetResult (policy, result.Text); i1 = result.Text.IndexOf ("int"); i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"int a = 5,b = 6,c;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"int a = 5,b = 6,c;", result.GetText (i1, i2 - i1)); } [Test()] @@ -1081,7 +1081,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("List"); int i2 = result.Text.IndexOf (";") + ";".Length; - Assert.AreEqual (@"List a;", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"List a;", result.GetText (i1, i2 - i1)); } @@ -1121,14 +1121,14 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a ,int b ,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a ,int b ,int c)", result.GetText (i1, i2 - i1)); policy.SpaceBeforeConstructorDeclarationParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a,int b,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a,int b,int c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1143,13 +1143,13 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a, int b, int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a, int b, int c)", result.GetText (i1, i2 - i1)); policy.SpaceAfterConstructorDeclarationParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a,int b,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a,int b,int c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1165,7 +1165,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( int a )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( int a )", result.GetText (i1, i2 - i1)); } [Test()] @@ -1181,7 +1181,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( )", result.GetText (i1, i2 - i1)); } #endregion @@ -1220,13 +1220,13 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a ,int b ,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a ,int b ,int c)", result.GetText (i1, i2 - i1)); policy.SpaceBeforeDelegateDeclarationParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a,int b,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a,int b,int c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1240,13 +1240,13 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a, int b, int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a, int b, int c)", result.GetText (i1, i2 - i1)); policy.SpaceAfterDelegateDeclarationParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(int a,int b,int c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(int a,int b,int c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1258,7 +1258,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( int a )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( int a )", result.GetText (i1, i2 - i1)); } [Test()] @@ -1270,7 +1270,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( )", result.GetText (i1, i2 - i1)); } #endregion @@ -1315,13 +1315,13 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(a ,b ,c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(a ,b ,c)", result.GetText (i1, i2 - i1)); policy.SpaceBeforeMethodCallParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(a,b,c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(a,b,c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1340,13 +1340,13 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(a, b, c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(a, b, c)", result.GetText (i1, i2 - i1)); policy.SpaceAfterMethodCallParameterComma = false; result = GetResult (policy, result.Text); i1 = result.Text.LastIndexOf ("("); i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"(a,b,c)", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"(a,b,c)", result.GetText (i1, i2 - i1)); } [Test()] @@ -1364,7 +1364,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( a )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( a )", result.GetText (i1, i2 - i1)); } [Test()] @@ -1382,7 +1382,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("("); int i2 = result.Text.LastIndexOf (")") + ")".Length; - Assert.AreEqual (@"( )", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"( )", result.GetText (i1, i2 - i1)); } #endregion @@ -1430,7 +1430,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("["); int i2 = result.Text.LastIndexOf ("]") + "]".Length; - Assert.AreEqual (@"[int a ,int b]", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"[int a ,int b]", result.GetText (i1, i2 - i1)); } @@ -1450,7 +1450,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("["); int i2 = result.Text.LastIndexOf ("]") + "]".Length; - Assert.AreEqual (@"[int a, int b]", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"[int a, int b]", result.GetText (i1, i2 - i1)); } [Test()] @@ -1469,7 +1469,7 @@ return (Test)null; }"); int i1 = result.Text.LastIndexOf ("["); int i2 = result.Text.LastIndexOf ("]") + "]".Length; - Assert.AreEqual (@"[ int a, int b ]", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"[ int a, int b ]", result.GetText (i1, i2 - i1)); } #endregion @@ -1540,7 +1540,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("["); int i2 = result.Text.LastIndexOf ("]") + "]".Length; - Assert.AreEqual (@"[1 ,2 ,3]", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"[1 ,2 ,3]", result.GetText (i1, i2 - i1)); } [Test()] @@ -1558,7 +1558,7 @@ return (Test)null; int i1 = result.Text.LastIndexOf ("["); int i2 = result.Text.LastIndexOf ("]") + "]".Length; - Assert.AreEqual (@"[1, 2, 3]", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"[1, 2, 3]", result.GetText (i1, i2 - i1)); } #endregion @@ -1595,7 +1595,7 @@ return (Test)null; }"); int i1 = result.Text.IndexOf ("Foo"); int i2 = result.Text.LastIndexOf (";") + ";".Length; - Assert.AreEqual (@"Foo ();", result.GetTextAt (i1, i2 - i1)); + Assert.AreEqual (@"Foo ();", result.GetText (i1, i2 - i1)); } } diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs index a9cef844fb..b127d10529 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TextEditorTestAdapter.cs @@ -1,218 +1,14 @@ using System; using System.Collections.Generic; +using System.Text; using ICSharpCode.NRefactory.CSharp; using System.IO; +using ICSharpCode.NRefactory.Editor; using NUnit.Framework; using ICSharpCode.NRefactory.CSharp.Refactoring; namespace ICSharpCode.NRefactory.FormattingTests { - /// - /// Text editor test adapter. Only implemented for testing purposes. Don't use in production code. - /// - class TextEditorTestAdapter : ITextEditorAdapter - { - string text; - - public string Text { - get { - return this.text; - } - } - - List delimiters; - - struct Delimiter - { - public readonly int Offset; - public readonly int Length; - - public int EndOffset { - get { return Offset + Length; } - } - - public Delimiter (int offset, int length) - { - Offset = offset; - Length = length; - } - - public override string ToString () - { - return string.Format ("[Delimiter: Offset={0}, Length={1}]", Offset, Length); - } - } - public void Replace (int offset, int count, string value) - { - this.text = this.text.Substring (0, offset) + value + this.text.Substring (offset + count); - } - static IEnumerable FindDelimiter (string text) - { - for (int i = 0; i < text.Length; i++) { - switch (text [i]) { - case '\r': - if (i + 1 < text.Length && text [i + 1] == '\n') { - yield return new Delimiter (i, 2); - i++; - } else { - yield return new Delimiter (i, 1); - } - break; - case '\n': - yield return new Delimiter (i, 1); - break; - } - } - } - - public TextEditorTestAdapter (string text) - { - this.text = text; - delimiters = new List (FindDelimiter (text)); - } - - class Segment - { - public readonly int Offset; - public readonly int Length; - public readonly int DelimiterLength; - - public Segment (int offset, int length, int delimiterLength) - { - this.Offset = offset; - this.Length = length; - this.DelimiterLength = delimiterLength; - } - - public override string ToString () - { - return string.Format ("[Segment: Offset={0}, Length={1}, DelimiterLength={2}]", Offset, Length, DelimiterLength); - } - } - - Segment Get (int number) - { - number--; - if (number < 0 || number - 1 >= delimiters.Count) - return null; - int startOffset = number > 0 ? delimiters [number - 1].EndOffset : 0; - int endOffset; - int delimiterLength; - if (number < delimiters.Count) { - endOffset = delimiters [number].EndOffset; - delimiterLength = delimiters [number].Length; - } else { - endOffset = text.Length; - delimiterLength = 0; - } - return new Segment (startOffset, endOffset - startOffset, delimiterLength); - } - - #region ITextEditorAdapter implementation - public int LocationToOffset (int line, int col) - { - Segment seg = Get (line); - if (seg == null) - return 0; - return seg.Offset + col - 1; - } - - public char GetCharAt (int offset) - { - if (offset < 0 || offset >= text.Length) - return '\0'; - return text [offset]; - } - - public string GetTextAt (int offset, int length) - { - if (offset < 0 || offset + length >= text.Length) - return ""; - if (length <= 0) - return ""; - - return text.Substring (offset, length); - } - - public int GetEditableLength (int lineNumber) - { - var seg = Get (lineNumber); - if (seg == null) - return 0; - return seg.Length - seg.DelimiterLength; - } - - public string GetIndentation (int lineNumber) - { - var seg = Get (lineNumber); - if (seg == null) - return ""; - int start = seg.Offset; - int end = seg.Offset; - int endOffset = seg.Offset + seg.Length - seg.DelimiterLength; - - while (end < endOffset && (text[end] == ' ' || text[end] == '\t')) - end++; - - return start < end ? text.Substring (start, end - start) : ""; - } - - public int GetLineOffset (int lineNumber) - { - var seg = Get (lineNumber); - if (seg == null) - return 0; - return seg.Offset; - } - - public int GetLineLength (int lineNumber) - { - var seg = Get (lineNumber); - if (seg == null) - return 0; - return seg.Length; - } - - public int GetLineEndOffset (int lineNumber) - { - var seg = Get (lineNumber); - if (seg == null) - return 0; - return seg.Offset + seg.Length; - } - - public bool TabsToSpaces { - get { - return false; - } - } - - public int TabSize { - get { - return 4; - } - } - - public string EolMarker { - get { - return Environment.NewLine; - } - } - - public int Length { - get { - return text.Length; - } - } - - public int LineCount { - get { - return delimiters.Count + 1; - } - } - #endregion - } - public abstract class TestBase { static IActionFactory factory = new TestFactory (); @@ -236,59 +32,55 @@ namespace ICSharpCode.NRefactory.FormattingTests } } - static void ApplyChanges (TextEditorTestAdapter adapter, List changes) + static string ApplyChanges (string text, List changes) { changes.Sort ((x, y) => y.Offset.CompareTo (x.Offset)); + StringBuilder b = new StringBuilder(text); foreach (var change in changes) { // Console.WriteLine ("---- apply:" + change); // Console.WriteLine (adapter.Text); - if (change.Offset > adapter.Length) + if (change.Offset > b.Length) continue; - adapter.Replace (change.Offset, change.RemovedChars, change.InsertedText); + b.Remove(change.Offset, change.RemovedChars); + b.Insert(change.Offset, change.InsertedText); } // Console.WriteLine ("---result:"); // Console.WriteLine (adapter.Text); + return b.ToString(); } - protected static ITextEditorAdapter GetResult (CSharpFormattingOptions policy, string input) + protected static IDocument GetResult (CSharpFormattingOptions policy, string input) { - var adapter = new TextEditorTestAdapter (input); - var visitior = new AstFormattingVisitor (policy, adapter, factory); + var adapter = new ReadOnlyDocument (input); + var visitor = new AstFormattingVisitor (policy, adapter, factory); - var compilationUnit = new CSharpParser ().Parse (new StringReader (adapter.Text)); - compilationUnit.AcceptVisitor (visitior, null); + var compilationUnit = new CSharpParser ().Parse (new StringReader (input)); + compilationUnit.AcceptVisitor (visitor, null); - ApplyChanges (adapter, visitior.Changes); - - return adapter; + return new ReadOnlyDocument(ApplyChanges (input, visitor.Changes)); } - protected static ITextEditorAdapter Test (CSharpFormattingOptions policy, string input, string expectedOutput) + protected static IDocument Test (CSharpFormattingOptions policy, string input, string expectedOutput) { - var adapter = new TextEditorTestAdapter (input); - var visitior = new AstFormattingVisitor (policy, adapter, factory); - - var compilationUnit = new CSharpParser ().Parse (new StringReader (adapter.Text)); - compilationUnit.AcceptVisitor (visitior, null); - ApplyChanges (adapter, visitior.Changes); - if (expectedOutput != adapter.Text) { - Console.WriteLine (adapter.Text); + IDocument doc = GetResult(policy, input); + if (expectedOutput != doc.Text) { + Console.WriteLine (doc.Text); } - Assert.AreEqual (expectedOutput, adapter.Text); - return adapter; + Assert.AreEqual (expectedOutput, doc.Text); + return doc; } - protected static void Continue (CSharpFormattingOptions policy, ITextEditorAdapter adapter, string expectedOutput) + protected static void Continue (CSharpFormattingOptions policy, IDocument document, string expectedOutput) { - var visitior = new AstFormattingVisitor (policy, adapter, factory); + var visitior = new AstFormattingVisitor (policy, document, factory); - var compilationUnit = new CSharpParser ().Parse (new StringReader (adapter.Text)); + var compilationUnit = new CSharpParser ().Parse (new StringReader (document.Text)); compilationUnit.AcceptVisitor (visitior, null); - ApplyChanges (((TextEditorTestAdapter)adapter), visitior.Changes); - if (expectedOutput != adapter.Text) { - Console.WriteLine (adapter.Text); + string newText = ApplyChanges (document.Text, visitior.Changes); + if (expectedOutput != newText) { + Console.WriteLine (newText); } - Assert.AreEqual (expectedOutput, adapter.Text); + Assert.AreEqual (expectedOutput, newText); } diff --git a/ICSharpCode.NRefactory/Editor/IDocumentLine.cs b/ICSharpCode.NRefactory/Editor/IDocumentLine.cs index 193f761149..0471509fdd 100644 --- a/ICSharpCode.NRefactory/Editor/IDocumentLine.cs +++ b/ICSharpCode.NRefactory/Editor/IDocumentLine.cs @@ -41,5 +41,15 @@ namespace ICSharpCode.NRefactory.Editor /// The first line has the number 1. /// int LineNumber { get; } + + /// + /// Gets the previous line. Returns null if this is the first line in the document. + /// + IDocumentLine PreviousLine { get; } + + /// + /// Gets the next line. Returns null if this is the last line in the document. + /// + IDocumentLine NextLine { get; } } } diff --git a/ICSharpCode.NRefactory/Editor/ISegment.cs b/ICSharpCode.NRefactory/Editor/ISegment.cs index 8bf9c5172d..f0e430ec0b 100644 --- a/ICSharpCode.NRefactory/Editor/ISegment.cs +++ b/ICSharpCode.NRefactory/Editor/ISegment.cs @@ -33,7 +33,7 @@ namespace ICSharpCode.NRefactory.Editor /// /// Gets the length of the segment. /// - /// Must not be negative. + /// For line segments (IDocumentLine), the length does not include the line delimeter. int Length { get; } /// diff --git a/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs b/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs index 17c6d28936..0d5e810065 100644 --- a/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs +++ b/ICSharpCode.NRefactory/Editor/ReadOnlyDocument.cs @@ -111,6 +111,24 @@ namespace ICSharpCode.NRefactory.Editor public int LineNumber { get { return lineNumber; } } + + public IDocumentLine PreviousLine { + get { + if (lineNumber == 1) + return null; + else + return new ReadOnlyDocumentLine(doc, lineNumber - 1); + } + } + + public IDocumentLine NextLine { + get { + if (lineNumber == doc.LineCount) + return null; + else + return new ReadOnlyDocumentLine(doc, lineNumber + 1); + } + } } int GetStartOffset(int lineNumber) From 2e6b746035d55ab0b3b6840f237839835172053a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 11:20:34 +0200 Subject: [PATCH 30/92] Improved error messages a bit. --- .../CSharp/Parser/ParseSelfTests.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs index e7fd84b270..43ce334348 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs @@ -83,7 +83,15 @@ namespace ICSharpCode.NRefactory.CSharp.Parser var prevNodeEnd = node.StartLocation; var prevNode = node; for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) { - Assert.IsTrue(child.StartLocation >= prevNodeEnd, currentFileName + ": Child " + child.GetType () +" (" + child.StartLocation + ")" +" must start after previous sibling " + prevNode.GetType () + "(" + prevNode.StartLocation + ")"); + bool assertion = child.StartLocation >= prevNodeEnd; + if (!assertion) { + Console.WriteLine ("Parent:" + node.GetType ()); + Console.WriteLine ("Children:"); + foreach (var c in node.Children) + Console.WriteLine (c.GetType () +" at:"+ c.StartLocation + " Role: "+ c.Role); + Console.WriteLine ("----"); + } + Assert.IsTrue(assertion, currentFileName + ": Child " + child.GetType () +" (" + child.StartLocation + ")" +" must start after previous sibling " + prevNode.GetType () + "(" + prevNode.StartLocation + ")"); CheckPositionConsistency(child); prevNodeEnd = child.EndLocation; prevNode = child; @@ -110,13 +118,14 @@ namespace ICSharpCode.NRefactory.CSharp.Parser void CheckWhitespace(AstNode startNode, TextLocation whitespaceStart, AstNode endNode, TextLocation whitespaceEnd) { - if (whitespaceStart == whitespaceEnd) + if (whitespaceStart == whitespaceEnd || startNode == endNode) return; int start = currentDocument.GetOffset(whitespaceStart.Line, whitespaceStart.Column); int end = currentDocument.GetOffset(whitespaceEnd.Line, whitespaceEnd.Column); string text = currentDocument.GetText(start, end - start); + Assert.IsTrue(string.IsNullOrWhiteSpace(text), "Expected whitespace between " + startNode.GetType () +":" + whitespaceStart + " and " + endNode.GetType () + ":" + whitespaceEnd - + ", but got '" + text + "' (in " + currentFileName + ")"); + + ", but got '" + text + "' (in " + currentFileName + " parent:" + startNode.Parent.GetType () +")"); } #endregion } From 15b30e9335b17b903862cd78aeb7150be9b0ba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 11:20:57 +0200 Subject: [PATCH 31/92] Corrected comma locations. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index f4c97a8e6a..e51923c21a 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2382,14 +2382,12 @@ namespace ICSharpCode.NRefactory.CSharp 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) - parent.AddChild (new CSharpTokenNode (Convert (commaLocations[idx]), 1), InvocationExpression.Roles.Comma); + if (commaLocations != null && i < commaLocations.Count) { + parent.AddChild (new CSharpTokenNode (Convert (commaLocations[i]), 1), InvocationExpression.Roles.Comma); } } if (commaLocations != null && commaLocations.Count > args.Count) - parent.AddChild (new CSharpTokenNode (Convert (commaLocations[0]), 1), InvocationExpression.Roles.Comma); + parent.AddChild (new CSharpTokenNode (Convert (commaLocations[args.Count]), 1), InvocationExpression.Roles.Comma); } public override object Visit (Invocation invocationExpression) From 42e49ce6ef9d585aafa1fb9e347175e2d197557e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 11:38:37 +0200 Subject: [PATCH 32/92] Fixed operator declaration operator location. --- .../Parser/mcs/cs-parser.cs | 48 +++++++++---------- .../Parser/mcs/cs-parser.jay | 48 +++++++++---------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index f87c16c9cc..7e0b431833 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -145,7 +145,7 @@ namespace Mono.CSharp UsingsBag ubag; List> mod_locations; Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; - Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; + Location savedAttrParenOpenLocation, savedAttrParenCloseLocation, savedOperatorLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); List parameterListCommas = new List (); @@ -2020,91 +2020,91 @@ case 247: break; case 249: #line 2125 "cs-parser.jay" - { yyVal = Operator.OpType.LogicalNot; } + { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: #line 2126 "cs-parser.jay" - { yyVal = Operator.OpType.OnesComplement; } + { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: #line 2127 "cs-parser.jay" - { yyVal = Operator.OpType.Increment; } + { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: #line 2128 "cs-parser.jay" - { yyVal = Operator.OpType.Decrement; } + { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: #line 2129 "cs-parser.jay" - { yyVal = Operator.OpType.True; } + { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: #line 2130 "cs-parser.jay" - { yyVal = Operator.OpType.False; } + { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: #line 2132 "cs-parser.jay" - { yyVal = Operator.OpType.Addition; } + { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: #line 2133 "cs-parser.jay" - { yyVal = Operator.OpType.Subtraction; } + { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 257: #line 2135 "cs-parser.jay" - { yyVal = Operator.OpType.Multiply; } + { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 258: #line 2136 "cs-parser.jay" - { yyVal = Operator.OpType.Division; } + { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 259: #line 2137 "cs-parser.jay" - { yyVal = Operator.OpType.Modulus; } + { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 260: #line 2138 "cs-parser.jay" - { yyVal = Operator.OpType.BitwiseAnd; } + { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 261: #line 2139 "cs-parser.jay" - { yyVal = Operator.OpType.BitwiseOr; } + { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 262: #line 2140 "cs-parser.jay" - { yyVal = Operator.OpType.ExclusiveOr; } + { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 263: #line 2141 "cs-parser.jay" - { yyVal = Operator.OpType.LeftShift; } + { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 264: #line 2142 "cs-parser.jay" - { yyVal = Operator.OpType.RightShift; } + { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 265: #line 2143 "cs-parser.jay" - { yyVal = Operator.OpType.Equality; } + { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 266: #line 2144 "cs-parser.jay" - { yyVal = Operator.OpType.Inequality; } + { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 267: #line 2145 "cs-parser.jay" - { yyVal = Operator.OpType.GreaterThan; } + { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 268: #line 2146 "cs-parser.jay" - { yyVal = Operator.OpType.LessThan; } + { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 269: #line 2147 "cs-parser.jay" - { yyVal = Operator.OpType.GreaterThanOrEqual; } + { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 270: #line 2148 "cs-parser.jay" - { yyVal = Operator.OpType.LessThanOrEqual; } + { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 271: #line 2155 "cs-parser.jay" @@ -5298,7 +5298,7 @@ void case_247() } yyVal = new OperatorDeclaration (op, (FullNamedExpression) yyVals[-6+yyTop], loc); - lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); + lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), savedOperatorLocation, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_272() diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index c96f2b3402..5191cab54d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -143,7 +143,7 @@ namespace Mono.CSharp UsingsBag ubag; List> mod_locations; Location parameterModifierLocation, savedLocation, savedOpenLocation, savedCloseLocation; - Location savedAttrParenOpenLocation, savedAttrParenCloseLocation; + Location savedAttrParenOpenLocation, savedAttrParenCloseLocation, savedOperatorLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); List parameterListCommas = new List (); @@ -2115,37 +2115,37 @@ operator_declarator } $$ = new OperatorDeclaration (op, (FullNamedExpression) $1, loc); - lbag.AddLocation ($$, GetLocation ($2), GetLocation ($3), GetLocation ($4), GetLocation ($7)); + lbag.AddLocation ($$, GetLocation ($2), savedOperatorLocation, GetLocation ($4), GetLocation ($7)); } | conversion_operator_declarator ; overloadable_operator // Unary operators: - : BANG { $$ = Operator.OpType.LogicalNot; } - | TILDE { $$ = Operator.OpType.OnesComplement; } - | OP_INC { $$ = Operator.OpType.Increment; } - | OP_DEC { $$ = Operator.OpType.Decrement; } - | TRUE { $$ = Operator.OpType.True; } - | FALSE { $$ = Operator.OpType.False; } + : BANG { $$ = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation ($1); } + | TILDE { $$ = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation ($1); } + | OP_INC { $$ = Operator.OpType.Increment; savedOperatorLocation = GetLocation ($1); } + | OP_DEC { $$ = Operator.OpType.Decrement; savedOperatorLocation = GetLocation ($1); } + | TRUE { $$ = Operator.OpType.True; savedOperatorLocation = GetLocation ($1); } + | FALSE { $$ = Operator.OpType.False; savedOperatorLocation = GetLocation ($1); } // Unary and binary: - | PLUS { $$ = Operator.OpType.Addition; } - | MINUS { $$ = Operator.OpType.Subtraction; } + | PLUS { $$ = Operator.OpType.Addition; savedOperatorLocation = GetLocation ($1); } + | MINUS { $$ = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation ($1); } // Binary: - | STAR { $$ = Operator.OpType.Multiply; } - | DIV { $$ = Operator.OpType.Division; } - | PERCENT { $$ = Operator.OpType.Modulus; } - | BITWISE_AND { $$ = Operator.OpType.BitwiseAnd; } - | BITWISE_OR { $$ = Operator.OpType.BitwiseOr; } - | CARRET { $$ = Operator.OpType.ExclusiveOr; } - | OP_SHIFT_LEFT { $$ = Operator.OpType.LeftShift; } - | OP_SHIFT_RIGHT { $$ = Operator.OpType.RightShift; } - | OP_EQ { $$ = Operator.OpType.Equality; } - | OP_NE { $$ = Operator.OpType.Inequality; } - | OP_GT { $$ = Operator.OpType.GreaterThan; } - | OP_LT { $$ = Operator.OpType.LessThan; } - | OP_GE { $$ = Operator.OpType.GreaterThanOrEqual; } - | OP_LE { $$ = Operator.OpType.LessThanOrEqual; } + | STAR { $$ = Operator.OpType.Multiply; savedOperatorLocation = GetLocation ($1); } + | DIV { $$ = Operator.OpType.Division; savedOperatorLocation = GetLocation ($1); } + | PERCENT { $$ = Operator.OpType.Modulus; savedOperatorLocation = GetLocation ($1); } + | BITWISE_AND { $$ = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation ($1); } + | BITWISE_OR { $$ = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation ($1); } + | CARRET { $$ = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation ($1); } + | OP_SHIFT_LEFT { $$ = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation ($1); } + | OP_SHIFT_RIGHT { $$ = Operator.OpType.RightShift; savedOperatorLocation = GetLocation ($1); } + | OP_EQ { $$ = Operator.OpType.Equality; savedOperatorLocation = GetLocation ($1); } + | OP_NE { $$ = Operator.OpType.Inequality; savedOperatorLocation = GetLocation ($1); } + | OP_GT { $$ = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation ($1); } + | OP_LT { $$ = Operator.OpType.LessThan; savedOperatorLocation = GetLocation ($1); } + | OP_GE { $$ = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation ($1); } + | OP_LE { $$ = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation ($1); } ; conversion_operator_declarator From 99b1a32e03bbbc176338e1ed4212c466e063d013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 11:45:46 +0200 Subject: [PATCH 33/92] Added debug message. --- .../CSharp/Parser/ParseSelfTests.cs | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs index 43ce334348..54b8fc8288 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs @@ -75,6 +75,15 @@ namespace ICSharpCode.NRefactory.CSharp.Parser CheckMissingTokens(cu); } } + + void PrintNode (AstNode node) + { + Console.WriteLine ("Parent:" + node.GetType ()); + Console.WriteLine ("Children:"); + foreach (var c in node.Children) + Console.WriteLine (c.GetType () +" at:"+ c.StartLocation + " Role: "+ c.Role); + Console.WriteLine ("----"); + } void CheckPositionConsistency(AstNode node) { @@ -84,13 +93,8 @@ namespace ICSharpCode.NRefactory.CSharp.Parser var prevNode = node; for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) { bool assertion = child.StartLocation >= prevNodeEnd; - if (!assertion) { - Console.WriteLine ("Parent:" + node.GetType ()); - Console.WriteLine ("Children:"); - foreach (var c in node.Children) - Console.WriteLine (c.GetType () +" at:"+ c.StartLocation + " Role: "+ c.Role); - Console.WriteLine ("----"); - } + if (!assertion) + PrintNode (node); Assert.IsTrue(assertion, currentFileName + ": Child " + child.GetType () +" (" + child.StartLocation + ")" +" must start after previous sibling " + prevNode.GetType () + "(" + prevNode.StartLocation + ")"); CheckPositionConsistency(child); prevNodeEnd = child.EndLocation; @@ -123,8 +127,12 @@ namespace ICSharpCode.NRefactory.CSharp.Parser int start = currentDocument.GetOffset(whitespaceStart.Line, whitespaceStart.Column); int end = currentDocument.GetOffset(whitespaceEnd.Line, whitespaceEnd.Column); string text = currentDocument.GetText(start, end - start); - - Assert.IsTrue(string.IsNullOrWhiteSpace(text), "Expected whitespace between " + startNode.GetType () +":" + whitespaceStart + " and " + endNode.GetType () + ":" + whitespaceEnd + bool assertion = string.IsNullOrWhiteSpace(text); + if (!assertion) { + if (startNode.Parent == endNode.Parent) + PrintNode (startNode.Parent); + } + Assert.IsTrue(assertion, "Expected whitespace between " + startNode.GetType () +":" + whitespaceStart + " and " + endNode.GetType () + ":" + whitespaceEnd + ", but got '" + text + "' (in " + currentFileName + " parent:" + startNode.Parent.GetType () +")"); } #endregion From 1b216819c9e087d9138b16d2c70c5076f28dd2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 11:46:15 +0200 Subject: [PATCH 34/92] Fixed literal values of bools. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index e51923c21a..d84eaf2747 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1918,7 +1918,10 @@ namespace ICSharpCode.NRefactory.CSharp } else { literalValue = constant.GetValueAsLiteral (); } - var result = new PrimitiveExpression (constant.GetValue (), Convert (constant.Location), literalValue); + object val = constant.GetValue (); + if (val is bool) + literalValue = (bool)val ? "true" : "false"; + var result = new PrimitiveExpression (val, Convert (constant.Location), literalValue); return result; } From c671230693619ee7607ace5a40e4c44ca0a9590b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 12:02:47 +0200 Subject: [PATCH 35/92] Fixed type argument commas. --- .../Parser/CSharpParser.cs | 46 ++++--------------- .../Parser/mcs/cs-parser.cs | 4 +- .../Parser/mcs/cs-parser.jay | 4 +- 3 files changed, 14 insertions(+), 40 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index d84eaf2747..226b9d039e 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -342,12 +342,12 @@ namespace ICSharpCode.NRefactory.CSharp t.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberType.Roles.Dot); t.AddChild (Identifier.Create (memberName.Name, Convert(memberName.Location)), MemberType.Roles.Identifier); - AddTypeArguments (t, (List)null, memberName.TypeArguments); + AddTypeArguments (t, memberName.TypeArguments); return t; } else { SimpleType t = new SimpleType(); t.AddChild (Identifier.Create (memberName.Name, Convert(memberName.Location)), SimpleType.Roles.Identifier); - AddTypeArguments (t, (List)null, memberName.TypeArguments); + AddTypeArguments (t, memberName.TypeArguments); return t; } } @@ -1888,12 +1888,7 @@ namespace ICSharpCode.NRefactory.CSharp result.AddChild (Identifier.Create (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier); if (memberAccess.TypeArguments != null) { - var locationTypeArgs = LocationsBag.GetLocations (memberAccess.TypeArguments); - if (locationTypeArgs != null) - result.AddChild (new CSharpTokenNode (Convert (locationTypeArgs[0]), 1), MemberReferenceExpression.Roles.LChevron); - AddTypeArguments (result, locationTypeArgs, memberAccess.TypeArguments); - if (locationTypeArgs != null && locationTypeArgs.Count > 1) - result.AddChild (new CSharpTokenNode (Convert (locationTypeArgs[1]), 1), MemberReferenceExpression.Roles.RChevron); + AddTypeArguments (result, memberAccess.TypeArguments); } return result; } @@ -1930,12 +1925,7 @@ namespace ICSharpCode.NRefactory.CSharp var result = new IdentifierExpression (); result.AddChild (Identifier.Create (simpleName.Name, Convert (simpleName.Location)), IdentifierExpression.Roles.Identifier); if (simpleName.TypeArguments != null) { - var location = LocationsBag.GetLocations (simpleName); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), IdentifierExpression.Roles.LChevron); - AddTypeArguments (result, location, simpleName.TypeArguments); - if (location != null && location.Count > 1) - result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), IdentifierExpression.Roles.RChevron); + AddTypeArguments (result, simpleName.TypeArguments); } return result; } @@ -2254,6 +2244,9 @@ namespace ICSharpCode.NRefactory.CSharp if (typeArguments == null || typeArguments.IsEmpty) return; var chevronLocs = LocationsBag.GetLocations (typeArguments); + if (chevronLocs != null) + foreach (var loc in chevronLocs) + Console.WriteLine (loc); if (chevronLocs != null) parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); for (int i = 0; i < typeArguments.Count; i++) { @@ -2281,7 +2274,7 @@ namespace ICSharpCode.NRefactory.CSharp parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 1]), 1), InvocationExpression.Roles.RChevron); } - void AddTypeArguments (AstNode parent, LocationsBag.MemberLocations location, Mono.CSharp.TypeArguments typeArguments) + void AddTypeArguments (AstNode parent, Mono.CSharp.TypeArguments typeArguments) { if (typeArguments == null || typeArguments.IsEmpty) return; @@ -2290,37 +2283,18 @@ namespace ICSharpCode.NRefactory.CSharp parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); for (int i = 0; i < typeArguments.Count; i++) { - if (location != null && i > 0 && i - 1 < location.Count) - parent.AddChild (new CSharpTokenNode (Convert (location[i - 1]), 1), InvocationExpression.Roles.Comma); var arg = typeArguments.Args[i]; if (arg == null) continue; parent.AddChild (ConvertToType (arg), InvocationExpression.Roles.TypeArgument); + if (chevronLocs != null && i < chevronLocs.Count - 2) + parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[i]), 1), InvocationExpression.Roles.Comma); } if (chevronLocs != null) parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 1]), 1), InvocationExpression.Roles.RChevron); } - void AddTypeArguments (AstNode parent, List location, Mono.CSharp.TypeArguments typeArguments) - { - if (typeArguments == null || typeArguments.IsEmpty) - return; - var chevronLocs = LocationsBag.GetLocations (typeArguments); - if (chevronLocs != null) - parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[0]), 1), InvocationExpression.Roles.LChevron); - for (int i = 0; i < typeArguments.Count; i++) { - if (location != null && i > 0 && i - 1 < location.Count) - parent.AddChild (new CSharpTokenNode (Convert (location[i - 1]), 1), InvocationExpression.Roles.Comma); - var arg = typeArguments.Args[i]; - if (arg == null) - continue; - parent.AddChild (ConvertToType (arg), InvocationExpression.Roles.TypeArgument); - } - if (chevronLocs != null) - parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[1]), 1), InvocationExpression.Roles.RChevron); - } - void AddConstraints (AstNode parent, DeclSpace d) { if (d == null || d.Constraints == null) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 7e0b431833..96e10d370c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -5953,7 +5953,7 @@ void case_362() FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); yyVal = yyVals[-1+yyTop]; - lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); + lbag.AppendTo (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_363() @@ -5970,7 +5970,7 @@ void case_364() TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); yyVal = type_args; - lbag.AddLocation (yyVals[0+yyTop], GetLocation (yyVals[0+yyTop])); + lbag.AppendTo (type_args, GetLocation (yyVals[-1+yyTop])); } void case_365() diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 5191cab54d..7ddebcb629 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -2880,7 +2880,7 @@ opt_type_parameter_list FeatureIsNotAvailable (GetLocation ($1), "generics"); $$ = $2; - lbag.AddLocation ($$, GetLocation ($1), GetLocation ($3)); + lbag.AppendTo ($$, GetLocation ($1), GetLocation ($3)); } ; @@ -2896,7 +2896,7 @@ type_parameters TypeArguments type_args = (TypeArguments) $1; type_args.Add ((FullNamedExpression)$3); $$ = type_args; - lbag.AddLocation ($3, GetLocation ($3)); + lbag.AppendTo (type_args, GetLocation ($2)); } ; From babe656eb266e7f742cd93cb28574112dae6a756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 12:59:17 +0200 Subject: [PATCH 36/92] Fixed some dot locations inside member type names. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 12 +++++++++--- .../Parser/mcs/cs-parser.cs | 10 +++++----- .../Parser/mcs/cs-parser.jay | 10 +++++----- ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs | 7 +++++-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 226b9d039e..040b02ce1e 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -134,6 +134,12 @@ namespace ICSharpCode.NRefactory.CSharp var memberType = new MemberType (); memberType.AddChild (ConvertToType (ma.LeftExpression), MemberType.TargetRole); + + var location = LocationsBag.GetLocations (ma); + cw + if (location != null) + memberType.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberType.Roles.Dot); + memberType.MemberNameToken = Identifier.Create (ma.Name, Convert (ma.Location)); AddTypeArguments (ma, memberType); @@ -1880,10 +1886,10 @@ namespace ICSharpCode.NRefactory.CSharp var leftExpr = memberAccess.LeftExpression.Accept (this); result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression); } + var location = LocationsBag.GetLocations (memberAccess); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberReferenceExpression.Roles.Dot); } - var location = LocationsBag.GetLocations (memberAccess); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberReferenceExpression.Roles.Dot); result.AddChild (Identifier.Create (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 96e10d370c..e9fc099fa2 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -2410,7 +2410,7 @@ case 378: case 379: #line 2993 "cs-parser.jay" { - yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); + yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 380: @@ -4244,7 +4244,7 @@ void case_64() } Arguments [] arguments = (Arguments []) yyVals[0+yyTop]; - ATypeNameExpression expr = mname.GetTypeExpression (); + ATypeNameExpression expr = mname.GetTypeExpression (lbag); yyVal = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); if (arguments != null) { lbag.AddLocation (yyVal, savedAttrParenOpenLocation, savedAttrParenCloseLocation); @@ -6018,12 +6018,12 @@ void case_378() MemberName name = (MemberName) yyVals[-1+yyTop]; if (yyVals[0+yyTop] != null) { - yyVal = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); + yyVal = new ComposedCast (name.GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); } else { if (name.Left == null && name.Name == "var") yyVal = new VarExpr (name.Location); else - yyVal = name.GetTypeExpression (); + yyVal = name.GetTypeExpression (lbag); } } @@ -6610,7 +6610,7 @@ void case_533() void case_534() #line 3743 "cs-parser.jay" { - var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); + var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (lbag); if (te.HasTypeArguments) Error_TypeExpected (GetLocation (yyVals[0+yyTop])); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 7ddebcb629..df82d27754 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -779,7 +779,7 @@ attribute } Arguments [] arguments = (Arguments []) $3; - ATypeNameExpression expr = mname.GetTypeExpression (); + ATypeNameExpression expr = mname.GetTypeExpression (lbag); $$ = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); if (arguments != null) { lbag.AddLocation ($$, savedAttrParenOpenLocation, savedAttrParenCloseLocation); @@ -2979,17 +2979,17 @@ type_expression MemberName name = (MemberName) $1; if ($2 != null) { - $$ = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) $2); + $$ = new ComposedCast (name.GetTypeExpression (lbag), (ComposedTypeSpecifier) $2); } else { if (name.Left == null && name.Name == "var") $$ = new VarExpr (name.Location); else - $$ = name.GetTypeExpression (); + $$ = name.GetTypeExpression (lbag); } } | namespace_or_type_name pointer_stars { - $$ = new ComposedCast (((MemberName) $1).GetTypeExpression (), (ComposedTypeSpecifier) $2); + $$ = new ComposedCast (((MemberName) $1).GetTypeExpression (lbag), (ComposedTypeSpecifier) $2); } | builtin_types opt_nullable { @@ -3741,7 +3741,7 @@ unbound_type_name } | namespace_or_type_name DOT IDENTIFIER generic_dimension { - var te = ((MemberName) $1).GetTypeExpression (); + var te = ((MemberName) $1).GetTypeExpression (lbag); if (te.HasTypeArguments) Error_TypeExpected (GetLocation ($4)); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs index 8dce5a59ab..ada7fc38c2 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs @@ -138,7 +138,7 @@ namespace Mono.CSharp { return name; } - public ATypeNameExpression GetTypeExpression () + public ATypeNameExpression GetTypeExpression (LocationsBag locations = null) { if (Left == null) { if (TypeArguments != null) @@ -154,7 +154,10 @@ namespace Mono.CSharp { } Expression lexpr = Left.GetTypeExpression (); - return new MemberAccess (lexpr, Name, TypeArguments, Location); + var result = new MemberAccess (lexpr, Name, TypeArguments, Location); + if (locations != null) + locations.AddLocation (result, locations.GetLocations (this)); + return result; } public MemberName Clone () From 76249ecc667d6d0231b0fb30aaf3d4fe97e6dc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 13:12:13 +0200 Subject: [PATCH 37/92] Added explicit interface dot. --- .../Parser/CSharpParser.cs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 040b02ce1e..695652ab46 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -136,7 +136,6 @@ namespace ICSharpCode.NRefactory.CSharp memberType.AddChild (ConvertToType (ma.LeftExpression), MemberType.TargetRole); var location = LocationsBag.GetLocations (ma); - cw if (location != null) memberType.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberType.Roles.Dot); @@ -813,8 +812,12 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (indexer); AddModifiers (newIndexer, location); - if (indexer.MemberName.Left != null) + if (indexer.MemberName.Left != null) { newIndexer.AddChild (ConvertToType (indexer.MemberName.Left), IndexerDeclaration.PrivateImplementationTypeRole); + var privateImplTypeLoc = LocationsBag.GetLocations (indexer.MemberName.Left); + if (privateImplTypeLoc != null) + newIndexer.AddChild (new CSharpTokenNode (Convert (privateImplTypeLoc[0]), 1), MethodDeclaration.Roles.Dot); + } newIndexer.AddChild (ConvertToType (indexer.TypeName), IndexerDeclaration.Roles.Type); if (location != null) @@ -875,9 +878,12 @@ namespace ICSharpCode.NRefactory.CSharp AddModifiers (newMethod, location); newMethod.AddChild (ConvertToType (m.TypeName), AstNode.Roles.Type); - if (m.MethodName.Left != null) + if (m.MethodName.Left != null) { newMethod.AddChild (ConvertToType (m.MethodName.Left), MethodDeclaration.PrivateImplementationTypeRole); - + var privateImplTypeLoc = LocationsBag.GetLocations (m.MethodName.Left); + if (privateImplTypeLoc != null) + newMethod.AddChild (new CSharpTokenNode (Convert (privateImplTypeLoc[0]), 1), MethodDeclaration.Roles.Dot); + } newMethod.AddChild (Identifier.Create (m.MethodName.Name, Convert (m.Location)), AstNode.Roles.Identifier); if (m.MemberName.TypeArguments != null) { @@ -969,8 +975,12 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetMemberLocation (p); AddModifiers (newProperty, location); newProperty.AddChild (ConvertToType (p.TypeName), AstNode.Roles.Type); - if (p.MemberName.Left != null) + if (p.MemberName.Left != null) { newProperty.AddChild (ConvertToType (p.MemberName.Left), PropertyDeclaration.PrivateImplementationTypeRole); + var privateImplTypeLoc = LocationsBag.GetLocations (p.MemberName.Left); + if (privateImplTypeLoc != null) + newProperty.AddChild (new CSharpTokenNode (Convert (privateImplTypeLoc[0]), 1), MethodDeclaration.Roles.Dot); + } newProperty.AddChild (Identifier.Create (p.MemberName.Name, Convert (p.Location)), PropertyDeclaration.Roles.Identifier); @@ -1142,8 +1152,12 @@ namespace ICSharpCode.NRefactory.CSharp if (location != null) newEvent.AddChild (new CSharpTokenNode (Convert (location[0]), "event".Length), CustomEventDeclaration.Roles.Keyword); newEvent.AddChild (ConvertToType (ep.TypeName), CustomEventDeclaration.Roles.Type); - if (ep.MemberName.Left != null) + if (ep.MemberName.Left != null) { newEvent.AddChild (ConvertToType (ep.MemberName.Left), CustomEventDeclaration.PrivateImplementationTypeRole); + var privateImplTypeLoc = LocationsBag.GetLocations (ep.MemberName.Left); + if (privateImplTypeLoc != null) + newEvent.AddChild (new CSharpTokenNode (Convert (privateImplTypeLoc[0]), 1), MethodDeclaration.Roles.Dot); + } newEvent.AddChild (Identifier.Create (ep.MemberName.Name, Convert (ep.Location)), CustomEventDeclaration.Roles.Identifier); From 0d6d9ac4d99dee5c41df598406cf727fc4f5623f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 13:23:40 +0200 Subject: [PATCH 38/92] Added type parameter variances & tokens. --- .../Parser/CSharpParser.cs | 20 + .../Parser/mcs/cs-parser.cs | 857 +++++++++--------- .../Parser/mcs/cs-parser.jay | 7 +- 3 files changed, 460 insertions(+), 424 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 695652ab46..0064325e8d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2277,6 +2277,26 @@ namespace ICSharpCode.NRefactory.CSharp continue; TypeParameterDeclaration tp = new TypeParameterDeclaration(); + List varianceLocation; + switch (arg.Variance) { + case Variance.Contravariant: + tp.Variance = VarianceModifier.Contravariant; + varianceLocation = LocationsBag.GetLocations (arg); + if (varianceLocation != null) + tp.AddChild (new CSharpTokenNode (Convert (varianceLocation[0]), "out".Length), TypeParameterDeclaration.VarianceRole); + break; + case Variance.Covariant: + tp.Variance = VarianceModifier.Covariant; + varianceLocation = LocationsBag.GetLocations (arg); + if (varianceLocation != null) + tp.AddChild (new CSharpTokenNode (Convert (varianceLocation[0]), "out".Length), TypeParameterDeclaration.VarianceRole); + break; + default: + tp.Variance = VarianceModifier.Invariant; + break; + + } + AddAttributeSection (tp, arg.OptAttributes); switch (arg.Variance) { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index e9fc099fa2..adca942291 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -2378,13 +2378,13 @@ case 366: case_366(); break; case 368: -#line 2928 "cs-parser.jay" +#line 2931 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 369: -#line 2935 "cs-parser.jay" +#line 2938 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2399,7 +2399,7 @@ case 375: case_375(); break; case 377: -#line 2973 "cs-parser.jay" +#line 2976 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2408,7 +2408,7 @@ case 378: case_378(); break; case 379: -#line 2993 "cs-parser.jay" +#line 2996 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2417,13 +2417,13 @@ case 380: case_380(); break; case 381: -#line 3002 "cs-parser.jay" +#line 3005 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 382: -#line 3006 "cs-parser.jay" +#line 3009 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2441,63 +2441,63 @@ case 386: case_386(); break; case 387: -#line 3045 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3046 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 389: -#line 3047 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 390: -#line 3048 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 391: -#line 3049 "cs-parser.jay" +#line 3052 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 392: -#line 3050 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 394: -#line 3055 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 395: -#line 3056 "cs-parser.jay" +#line 3059 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 396: -#line 3057 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 397: -#line 3058 "cs-parser.jay" +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 398: -#line 3059 "cs-parser.jay" +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 399: -#line 3060 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 400: -#line 3061 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 401: -#line 3062 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 402: -#line 3063 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 423: @@ -2507,22 +2507,22 @@ case 424: case_424(); break; case 428: -#line 3110 "cs-parser.jay" +#line 3113 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 429: -#line 3114 "cs-parser.jay" +#line 3117 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 430: -#line 3115 "cs-parser.jay" +#line 3118 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 435: case_435(); break; case 436: -#line 3148 "cs-parser.jay" +#line 3151 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2540,7 +2540,7 @@ case 440: case_440(); break; case 441: -#line 3180 "cs-parser.jay" +#line 3183 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2549,7 +2549,7 @@ case 442: case_442(); break; case 443: -#line 3188 "cs-parser.jay" +#line 3191 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2561,7 +2561,7 @@ case 445: case_445(); break; case 446: -#line 3204 "cs-parser.jay" +#line 3207 "cs-parser.jay" { yyVal = null; } break; case 448: @@ -2571,11 +2571,11 @@ case 449: case_449(); break; case 450: -#line 3227 "cs-parser.jay" +#line 3230 "cs-parser.jay" { yyVal = null; } break; case 451: -#line 3231 "cs-parser.jay" +#line 3234 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2593,7 +2593,7 @@ case 455: case_455(); break; case 456: -#line 3264 "cs-parser.jay" +#line 3267 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2608,7 +2608,7 @@ case 459: case_459(); break; case 462: -#line 3292 "cs-parser.jay" +#line 3295 "cs-parser.jay" { yyVal = null; } break; case 464: @@ -2627,7 +2627,7 @@ case 468: case_468(); break; case 469: -#line 3344 "cs-parser.jay" +#line 3347 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2663,13 +2663,13 @@ case 483: case_483(); break; case 484: -#line 3431 "cs-parser.jay" +#line 3434 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 486: -#line 3439 "cs-parser.jay" +#line 3442 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2681,13 +2681,13 @@ case 488: case_488(); break; case 489: -#line 3459 "cs-parser.jay" +#line 3462 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 490: -#line 3466 "cs-parser.jay" +#line 3469 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2714,7 +2714,7 @@ case 497: case_497(); break; case 498: -#line 3532 "cs-parser.jay" +#line 3535 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2726,7 +2726,7 @@ case 500: case_500(); break; case 503: -#line 3559 "cs-parser.jay" +#line 3562 "cs-parser.jay" { yyVal = null; } break; case 505: @@ -2757,25 +2757,25 @@ case 516: case_516(); break; case 517: -#line 3637 "cs-parser.jay" +#line 3640 "cs-parser.jay" { yyVal = 2; } break; case 518: -#line 3641 "cs-parser.jay" +#line 3644 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 519: -#line 3648 "cs-parser.jay" +#line 3651 "cs-parser.jay" { yyVal = null; } break; case 520: -#line 3652 "cs-parser.jay" +#line 3655 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2793,7 +2793,7 @@ case 524: case_524(); break; case 525: -#line 3696 "cs-parser.jay" +#line 3699 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2838,7 +2838,7 @@ case 540: case_540(); break; case 541: -#line 3810 "cs-parser.jay" +#line 3813 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2847,25 +2847,25 @@ case 542: case_542(); break; case 543: -#line 3823 "cs-parser.jay" +#line 3826 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 544: -#line 3827 "cs-parser.jay" +#line 3830 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 545: -#line 3834 "cs-parser.jay" +#line 3837 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 547: -#line 3842 "cs-parser.jay" +#line 3845 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2877,13 +2877,13 @@ case 549: case_549(); break; case 551: -#line 3868 "cs-parser.jay" +#line 3871 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 552: -#line 3872 "cs-parser.jay" +#line 3875 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2895,37 +2895,37 @@ case 556: case_556(); break; case 558: -#line 3902 "cs-parser.jay" +#line 3905 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3906 "cs-parser.jay" +#line 3909 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 560: -#line 3910 "cs-parser.jay" +#line 3913 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 561: -#line 3914 "cs-parser.jay" +#line 3917 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 562: -#line 3918 "cs-parser.jay" +#line 3921 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 563: -#line 3922 "cs-parser.jay" +#line 3925 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2943,7 +2943,7 @@ case 569: case_569(); break; case 570: -#line 3954 "cs-parser.jay" +#line 3957 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2952,13 +2952,13 @@ case 571: case_571(); break; case 572: -#line 3963 "cs-parser.jay" +#line 3966 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 573: -#line 3967 "cs-parser.jay" +#line 3970 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3009,7 +3009,7 @@ case 598: case_598(); break; case 599: -#line 4091 "cs-parser.jay" +#line 4094 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3060,14 +3060,14 @@ case 614: case_614(); break; case 615: -#line 4188 "cs-parser.jay" +#line 4191 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 616: case_616(); break; case 619: -#line 4203 "cs-parser.jay" +#line 4206 "cs-parser.jay" { start_block (lexer.Location); } @@ -3091,7 +3091,7 @@ case 626: case_626(); break; case 627: -#line 4248 "cs-parser.jay" +#line 4251 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3103,7 +3103,7 @@ case 629: case_629(); break; case 630: -#line 4262 "cs-parser.jay" +#line 4265 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3115,7 +3115,7 @@ case 632: case_632(); break; case 638: -#line 4287 "cs-parser.jay" +#line 4290 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3130,13 +3130,13 @@ case 641: case_641(); break; case 643: -#line 4316 "cs-parser.jay" +#line 4319 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 644: -#line 4329 "cs-parser.jay" +#line 4332 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3154,11 +3154,11 @@ case 648: case_648(); break; case 649: -#line 4370 "cs-parser.jay" +#line 4373 "cs-parser.jay" { yyVal = null; } break; case 650: -#line 4372 "cs-parser.jay" +#line 4375 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 651: @@ -3216,7 +3216,7 @@ case 671: case_671(); break; case 673: -#line 4501 "cs-parser.jay" +#line 4504 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3246,19 +3246,19 @@ case 681: case_681(); break; case 682: -#line 4591 "cs-parser.jay" +#line 4594 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 683: -#line 4595 "cs-parser.jay" +#line 4598 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 684: -#line 4602 "cs-parser.jay" +#line 4605 "cs-parser.jay" { yyVal = Variance.None; } @@ -3267,22 +3267,16 @@ case 685: case_685(); break; case 686: -#line 4616 "cs-parser.jay" - { - yyVal = Variance.Covariant; - } + case_686(); break; case 687: -#line 4620 "cs-parser.jay" - { - yyVal = Variance.Contravariant; - } + case_687(); break; case 688: case_688(); break; case 689: -#line 4645 "cs-parser.jay" +#line 4650 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3300,13 +3294,13 @@ case 693: case_693(); break; case 698: -#line 4689 "cs-parser.jay" +#line 4694 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 699: -#line 4693 "cs-parser.jay" +#line 4698 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3315,13 +3309,13 @@ case 701: case_701(); break; case 704: -#line 4717 "cs-parser.jay" +#line 4722 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 705: -#line 4721 "cs-parser.jay" +#line 4726 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3354,13 +3348,13 @@ case 744: case_744(); break; case 745: -#line 4865 "cs-parser.jay" +#line 4870 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 746: -#line 4869 "cs-parser.jay" +#line 4874 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3372,7 +3366,7 @@ case 749: case_749(); break; case 750: -#line 4890 "cs-parser.jay" +#line 4895 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3402,7 +3396,7 @@ case 763: case_763(); break; case 764: -#line 4979 "cs-parser.jay" +#line 4984 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3423,15 +3417,15 @@ case 774: case_774(); break; case 775: -#line 5029 "cs-parser.jay" +#line 5034 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 776: -#line 5033 "cs-parser.jay" +#line 5038 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 777: -#line 5034 "cs-parser.jay" +#line 5039 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 778: @@ -3450,7 +3444,7 @@ case 784: case_784(); break; case 785: -#line 5102 "cs-parser.jay" +#line 5107 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3471,13 +3465,13 @@ case 791: case_791(); break; case 792: -#line 5146 "cs-parser.jay" +#line 5151 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 793: -#line 5150 "cs-parser.jay" +#line 5155 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3492,7 +3486,7 @@ case 796: case_796(); break; case 797: -#line 5179 "cs-parser.jay" +#line 5184 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3507,7 +3501,7 @@ case 804: case_804(); break; case 805: -#line 5218 "cs-parser.jay" +#line 5223 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3519,7 +3513,7 @@ case 807: case_807(); break; case 808: -#line 5246 "cs-parser.jay" +#line 5251 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 810: @@ -3529,11 +3523,11 @@ case 811: case_811(); break; case 813: -#line 5267 "cs-parser.jay" +#line 5272 "cs-parser.jay" { yyVal = null; } break; case 815: -#line 5272 "cs-parser.jay" +#line 5277 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 819: @@ -3576,7 +3570,7 @@ case 837: case_837(); break; case 840: -#line 5427 "cs-parser.jay" +#line 5432 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3597,7 +3591,7 @@ case 845: case_845(); break; case 848: -#line 5480 "cs-parser.jay" +#line 5485 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3606,7 +3600,7 @@ case 849: case_849(); break; case 850: -#line 5499 "cs-parser.jay" +#line 5504 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3615,13 +3609,13 @@ case 851: case_851(); break; case 852: -#line 5517 "cs-parser.jay" +#line 5522 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 853: -#line 5524 "cs-parser.jay" +#line 5529 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3630,7 +3624,7 @@ case 854: case_854(); break; case 855: -#line 5534 "cs-parser.jay" +#line 5539 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3660,7 +3654,7 @@ case 863: case_863(); break; case 864: -#line 5617 "cs-parser.jay" +#line 5622 "cs-parser.jay" { report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); } @@ -3693,7 +3687,7 @@ case 873: case_873(); break; case 874: -#line 5717 "cs-parser.jay" +#line 5722 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3702,7 +3696,7 @@ case 875: case_875(); break; case 876: -#line 5732 "cs-parser.jay" +#line 5737 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3717,7 +3711,7 @@ case 880: case_880(); break; case 881: -#line 5777 "cs-parser.jay" +#line 5782 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3738,7 +3732,7 @@ case 889: case_889(); break; case 895: -#line 5836 "cs-parser.jay" +#line 5841 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3747,7 +3741,7 @@ case 896: case_896(); break; case 897: -#line 5855 "cs-parser.jay" +#line 5860 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3780,13 +3774,13 @@ case 906: case_906(); break; case 908: -#line 5999 "cs-parser.jay" +#line 6004 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 909: -#line 6006 "cs-parser.jay" +#line 6011 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3807,7 +3801,7 @@ case 916: case_916(); break; case 917: -#line 6052 "cs-parser.jay" +#line 6057 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3819,7 +3813,7 @@ case 919: case_919(); break; case 920: -#line 6069 "cs-parser.jay" +#line 6074 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3843,13 +3837,13 @@ case 929: case_929(); break; case 937: -#line 6193 "cs-parser.jay" +#line 6198 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 938: -#line 6200 "cs-parser.jay" +#line 6205 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3861,13 +3855,13 @@ case 940: case_940(); break; case 941: -#line 6217 "cs-parser.jay" +#line 6222 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 942: -#line 6221 "cs-parser.jay" +#line 6226 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3885,25 +3879,25 @@ case 946: case_946(); break; case 948: -#line 6257 "cs-parser.jay" +#line 6262 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 950: -#line 6265 "cs-parser.jay" +#line 6270 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 951: -#line 6269 "cs-parser.jay" +#line 6274 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 952: -#line 6276 "cs-parser.jay" +#line 6281 "cs-parser.jay" { yyVal = new List (0); } @@ -5977,11 +5971,14 @@ void case_365() #line 2905 "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); + var variance = (Variance) yyVals[-1+yyTop]; + yyVal = new TypeParameterName (lt.Value, (Attributes)yyVals[-2+yyTop], variance, lt.Location); + if (variance != Variance.None) + lbag.AddLocation (yyVal, savedLocation); } void case_366() -#line 2910 "cs-parser.jay" +#line 2913 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -5992,28 +5989,28 @@ void case_366() } void case_371() -#line 2944 "cs-parser.jay" +#line 2947 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_373() -#line 2953 "cs-parser.jay" +#line 2956 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_375() -#line 2962 "cs-parser.jay" +#line 2965 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_378() -#line 2978 "cs-parser.jay" +#line 2981 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6028,14 +6025,14 @@ void case_378() } void case_380() -#line 2995 "cs-parser.jay" +#line 2998 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_383() -#line 3011 "cs-parser.jay" +#line 3014 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6043,7 +6040,7 @@ void case_383() } void case_384() -#line 3017 "cs-parser.jay" +#line 3020 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6052,7 +6049,7 @@ void case_384() } void case_385() -#line 3027 "cs-parser.jay" +#line 3030 "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 ()); @@ -6061,35 +6058,35 @@ void case_385() } void case_386() -#line 3034 "cs-parser.jay" +#line 3037 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_423() -#line 3096 "cs-parser.jay" +#line 3099 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_424() -#line 3100 "cs-parser.jay" +#line 3103 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_435() -#line 3141 "cs-parser.jay" +#line 3144 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3153 "cs-parser.jay" +#line 3156 "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); @@ -6097,7 +6094,7 @@ void case_437() } void case_438() -#line 3159 "cs-parser.jay" +#line 3162 "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); @@ -6105,7 +6102,7 @@ void case_438() } void case_439() -#line 3165 "cs-parser.jay" +#line 3168 "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); @@ -6113,7 +6110,7 @@ void case_439() } void case_440() -#line 3171 "cs-parser.jay" +#line 3174 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6123,28 +6120,28 @@ void case_440() } void case_442() -#line 3181 "cs-parser.jay" +#line 3184 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_444() -#line 3189 "cs-parser.jay" +#line 3192 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_445() -#line 3197 "cs-parser.jay" +#line 3200 "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_448() -#line 3210 "cs-parser.jay" +#line 3213 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6156,14 +6153,14 @@ void case_448() } void case_449() -#line 3220 "cs-parser.jay" +#line 3223 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_452() -#line 3236 "cs-parser.jay" +#line 3239 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6171,7 +6168,7 @@ void case_452() } void case_453() -#line 3242 "cs-parser.jay" +#line 3245 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6180,14 +6177,14 @@ void case_453() } void case_454() -#line 3248 "cs-parser.jay" +#line 3251 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_455() -#line 3256 "cs-parser.jay" +#line 3259 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6195,7 +6192,7 @@ void case_455() } void case_457() -#line 3265 "cs-parser.jay" +#line 3268 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6205,7 +6202,7 @@ void case_457() } void case_458() -#line 3273 "cs-parser.jay" +#line 3276 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6214,14 +6211,14 @@ void case_458() } void case_459() -#line 3280 "cs-parser.jay" +#line 3283 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_464() -#line 3298 "cs-parser.jay" +#line 3301 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6229,7 +6226,7 @@ void case_464() } void case_465() -#line 3304 "cs-parser.jay" +#line 3307 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6241,7 +6238,7 @@ void case_465() } void case_466() -#line 3314 "cs-parser.jay" +#line 3317 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6258,56 +6255,56 @@ void case_466() } void case_467() -#line 3329 "cs-parser.jay" +#line 3332 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3334 "cs-parser.jay" +#line 3337 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_473() -#line 3355 "cs-parser.jay" +#line 3358 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_474() -#line 3360 "cs-parser.jay" +#line 3363 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_475() -#line 3365 "cs-parser.jay" +#line 3368 "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_476() -#line 3370 "cs-parser.jay" +#line 3373 "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_478() -#line 3382 "cs-parser.jay" +#line 3385 "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_479() -#line 3390 "cs-parser.jay" +#line 3393 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6315,7 +6312,7 @@ void case_479() } void case_480() -#line 3396 "cs-parser.jay" +#line 3399 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6324,14 +6321,14 @@ void case_480() } void case_481() -#line 3402 "cs-parser.jay" +#line 3405 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_482() -#line 3410 "cs-parser.jay" +#line 3413 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6339,7 +6336,7 @@ void case_482() } void case_483() -#line 3416 "cs-parser.jay" +#line 3419 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6351,21 +6348,21 @@ void case_483() } void case_487() -#line 3444 "cs-parser.jay" +#line 3447 "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_488() -#line 3449 "cs-parser.jay" +#line 3452 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_491() -#line 3471 "cs-parser.jay" +#line 3474 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6380,7 +6377,7 @@ void case_491() } void case_492() -#line 3484 "cs-parser.jay" +#line 3487 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6389,7 +6386,7 @@ void case_492() } void case_493() -#line 3496 "cs-parser.jay" +#line 3499 "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])) { @@ -6399,7 +6396,7 @@ void case_493() } void case_494() -#line 3504 "cs-parser.jay" +#line 3507 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6408,7 +6405,7 @@ void case_494() } void case_495() -#line 3511 "cs-parser.jay" +#line 3514 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6417,28 +6414,28 @@ void case_495() } void case_496() -#line 3518 "cs-parser.jay" +#line 3521 "cs-parser.jay" { 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_497() -#line 3523 "cs-parser.jay" +#line 3526 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_499() -#line 3534 "cs-parser.jay" +#line 3537 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_500() -#line 3542 "cs-parser.jay" +#line 3545 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6450,7 +6447,7 @@ void case_500() } void case_505() -#line 3565 "cs-parser.jay" +#line 3568 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6458,7 +6455,7 @@ void case_505() } void case_506() -#line 3571 "cs-parser.jay" +#line 3574 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6468,7 +6465,7 @@ void case_506() } void case_507() -#line 3582 "cs-parser.jay" +#line 3585 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6476,7 +6473,7 @@ void case_507() } void case_508() -#line 3588 "cs-parser.jay" +#line 3591 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6484,14 +6481,14 @@ void case_508() } void case_509() -#line 3594 "cs-parser.jay" +#line 3597 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_510() -#line 3599 "cs-parser.jay" +#line 3602 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6499,28 +6496,28 @@ void case_510() } void case_514() -#line 3614 "cs-parser.jay" +#line 3617 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_515() -#line 3622 "cs-parser.jay" +#line 3625 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_516() -#line 3627 "cs-parser.jay" +#line 3630 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_521() -#line 3657 "cs-parser.jay" +#line 3660 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6529,7 +6526,7 @@ void case_521() } void case_522() -#line 3664 "cs-parser.jay" +#line 3667 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6542,7 +6539,7 @@ void case_522() } void case_523() -#line 3678 "cs-parser.jay" +#line 3681 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6550,7 +6547,7 @@ void case_523() } void case_524() -#line 3684 "cs-parser.jay" +#line 3687 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6559,7 +6556,7 @@ void case_524() } void case_526() -#line 3698 "cs-parser.jay" +#line 3701 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6567,14 +6564,14 @@ void case_526() } void case_529() -#line 3709 "cs-parser.jay" +#line 3712 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_530() -#line 3717 "cs-parser.jay" +#line 3720 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6582,7 +6579,7 @@ void case_530() } void case_531() -#line 3723 "cs-parser.jay" +#line 3726 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6592,7 +6589,7 @@ void case_531() } void case_532() -#line 3731 "cs-parser.jay" +#line 3734 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6600,7 +6597,7 @@ void case_532() } void case_533() -#line 3737 "cs-parser.jay" +#line 3740 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6608,7 +6605,7 @@ void case_533() } void case_534() -#line 3743 "cs-parser.jay" +#line 3746 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (lbag); if (te.HasTypeArguments) @@ -6619,7 +6616,7 @@ void case_534() } void case_535() -#line 3755 "cs-parser.jay" +#line 3758 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6628,7 +6625,7 @@ void case_535() } void case_536() -#line 3765 "cs-parser.jay" +#line 3768 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6638,35 +6635,35 @@ void case_536() } void case_537() -#line 3776 "cs-parser.jay" +#line 3779 "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_538() -#line 3784 "cs-parser.jay" +#line 3787 "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_539() -#line 3792 "cs-parser.jay" +#line 3795 "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_540() -#line 3800 "cs-parser.jay" +#line 3803 "cs-parser.jay" { 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_542() -#line 3812 "cs-parser.jay" +#line 3815 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6677,7 +6674,7 @@ void case_542() } void case_548() -#line 3844 "cs-parser.jay" +#line 3847 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6686,7 +6683,7 @@ void case_548() } void case_549() -#line 3854 "cs-parser.jay" +#line 3857 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6696,147 +6693,147 @@ void case_549() } void case_555() -#line 3879 "cs-parser.jay" +#line 3882 "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_556() -#line 3887 "cs-parser.jay" +#line 3890 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3928 "cs-parser.jay" +#line 3931 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3933 "cs-parser.jay" +#line 3936 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 3938 "cs-parser.jay" +#line 3941 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 3947 "cs-parser.jay" +#line 3950 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 3956 "cs-parser.jay" +#line 3959 "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_575() -#line 3973 "cs-parser.jay" +#line 3976 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 3978 "cs-parser.jay" +#line 3981 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 3987 "cs-parser.jay" +#line 3990 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 3992 "cs-parser.jay" +#line 3995 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 3997 "cs-parser.jay" +#line 4000 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4002 "cs-parser.jay" +#line 4005 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_583() -#line 4011 "cs-parser.jay" +#line 4014 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_584() -#line 4016 "cs-parser.jay" +#line 4019 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4025 "cs-parser.jay" +#line 4028 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4034 "cs-parser.jay" +#line 4037 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4043 "cs-parser.jay" +#line 4046 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4052 "cs-parser.jay" +#line 4055 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4061 "cs-parser.jay" +#line 4064 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4070 "cs-parser.jay" +#line 4073 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6845,84 +6842,84 @@ void case_596() } void case_598() -#line 4081 "cs-parser.jay" +#line 4084 "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_600() -#line 4093 "cs-parser.jay" +#line 4096 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_601() -#line 4098 "cs-parser.jay" +#line 4101 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_602() -#line 4103 "cs-parser.jay" +#line 4106 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_603() -#line 4108 "cs-parser.jay" +#line 4111 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_604() -#line 4113 "cs-parser.jay" +#line 4116 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_605() -#line 4118 "cs-parser.jay" +#line 4121 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_606() -#line 4123 "cs-parser.jay" +#line 4126 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_607() -#line 4128 "cs-parser.jay" +#line 4131 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_608() -#line 4133 "cs-parser.jay" +#line 4136 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_609() -#line 4138 "cs-parser.jay" +#line 4141 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_610() -#line 4146 "cs-parser.jay" +#line 4149 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6931,7 +6928,7 @@ void case_610() } void case_611() -#line 4153 "cs-parser.jay" +#line 4156 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6946,7 +6943,7 @@ void case_611() } void case_612() -#line 4169 "cs-parser.jay" +#line 4172 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6954,7 +6951,7 @@ void case_612() } void case_613() -#line 4175 "cs-parser.jay" +#line 4178 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6962,21 +6959,21 @@ void case_613() } void case_614() -#line 4181 "cs-parser.jay" +#line 4184 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_616() -#line 4189 "cs-parser.jay" +#line 4192 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_620() -#line 4205 "cs-parser.jay" +#line 4208 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6985,14 +6982,14 @@ void case_620() } void case_622() -#line 4216 "cs-parser.jay" +#line 4219 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_623() -#line 4224 "cs-parser.jay" +#line 4227 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7000,14 +6997,14 @@ void case_623() } void case_624() -#line 4230 "cs-parser.jay" +#line 4233 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4235 "cs-parser.jay" +#line 4238 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7015,63 +7012,63 @@ void case_625() } void case_626() -#line 4241 "cs-parser.jay" +#line 4244 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_628() -#line 4250 "cs-parser.jay" +#line 4253 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_629() -#line 4255 "cs-parser.jay" +#line 4258 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_631() -#line 4264 "cs-parser.jay" +#line 4267 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_632() -#line 4269 "cs-parser.jay" +#line 4272 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_639() -#line 4292 "cs-parser.jay" +#line 4295 "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_640() -#line 4297 "cs-parser.jay" +#line 4300 "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_641() -#line 4302 "cs-parser.jay" +#line 4305 "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_645() -#line 4331 "cs-parser.jay" +#line 4334 "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]); @@ -7084,7 +7081,7 @@ void case_645() } void case_646() -#line 4343 "cs-parser.jay" +#line 4346 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7097,7 +7094,7 @@ void case_646() } void case_647() -#line 4354 "cs-parser.jay" +#line 4357 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7105,7 +7102,7 @@ void case_647() } void case_648() -#line 4360 "cs-parser.jay" +#line 4363 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7114,14 +7111,14 @@ void case_648() } void case_651() -#line 4377 "cs-parser.jay" +#line 4380 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; } void case_654() -#line 4387 "cs-parser.jay" +#line 4390 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7139,7 +7136,7 @@ void case_654() } void case_655() -#line 4406 "cs-parser.jay" +#line 4409 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7149,91 +7146,91 @@ void case_655() } void case_656() -#line 4414 "cs-parser.jay" +#line 4417 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4419 "cs-parser.jay" +#line 4422 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_658() -#line 4424 "cs-parser.jay" +#line 4427 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_659() -#line 4429 "cs-parser.jay" +#line 4432 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_660() -#line 4434 "cs-parser.jay" +#line 4437 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_661() -#line 4439 "cs-parser.jay" +#line 4442 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_662() -#line 4444 "cs-parser.jay" +#line 4447 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_663() -#line 4449 "cs-parser.jay" +#line 4452 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_664() -#line 4454 "cs-parser.jay" +#line 4457 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_665() -#line 4459 "cs-parser.jay" +#line 4462 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_666() -#line 4464 "cs-parser.jay" +#line 4467 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_667() -#line 4469 "cs-parser.jay" +#line 4472 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_668() -#line 4474 "cs-parser.jay" +#line 4477 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7242,28 +7239,28 @@ void case_668() } void case_669() -#line 4481 "cs-parser.jay" +#line 4484 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_671() -#line 4490 "cs-parser.jay" +#line 4493 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_674() -#line 4503 "cs-parser.jay" +#line 4506 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_675() -#line 4511 "cs-parser.jay" +#line 4514 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7271,7 +7268,7 @@ void case_675() } void case_676() -#line 4517 "cs-parser.jay" +#line 4520 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7289,7 +7286,7 @@ void case_676() } void case_677() -#line 4536 "cs-parser.jay" +#line 4539 "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])); @@ -7297,7 +7294,7 @@ void case_677() } void case_678() -#line 4545 "cs-parser.jay" +#line 4548 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7305,7 +7302,7 @@ void case_678() } void case_679() -#line 4551 "cs-parser.jay" +#line 4554 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7330,7 +7327,7 @@ void case_679() } void case_680() -#line 4577 "cs-parser.jay" +#line 4580 "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 ()); @@ -7339,14 +7336,14 @@ void case_680() } void case_681() -#line 4584 "cs-parser.jay" +#line 4587 "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_685() -#line 4604 "cs-parser.jay" +#line 4607 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7354,78 +7351,92 @@ void case_685() yyVal = yyVals[0+yyTop]; } +void case_686() +#line 4617 "cs-parser.jay" +{ + yyVal = Variance.Covariant; + savedLocation = GetLocation (yyVals[0+yyTop]); + } + +void case_687() +#line 4622 "cs-parser.jay" +{ + yyVal = Variance.Contravariant; + savedLocation = GetLocation (yyVals[0+yyTop]); + } + void case_688() -#line 4638 "cs-parser.jay" +#line 4643 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_690() -#line 4650 "cs-parser.jay" +#line 4655 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_691() -#line 4655 "cs-parser.jay" +#line 4660 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_692() -#line 4664 "cs-parser.jay" +#line 4669 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_693() -#line 4669 "cs-parser.jay" +#line 4674 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_701() -#line 4696 "cs-parser.jay" +#line 4701 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_734() -#line 4760 "cs-parser.jay" +#line 4765 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_735() -#line 4765 "cs-parser.jay" +#line 4770 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_736() -#line 4770 "cs-parser.jay" +#line 4775 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_737() -#line 4778 "cs-parser.jay" +#line 4783 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_738() -#line 4786 "cs-parser.jay" +#line 4791 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7435,7 +7446,7 @@ void case_738() } void case_741() -#line 4799 "cs-parser.jay" +#line 4804 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7444,7 +7455,7 @@ void case_741() } void case_742() -#line 4815 "cs-parser.jay" +#line 4820 "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*/ @@ -7476,7 +7487,7 @@ void case_742() } void case_743() -#line 4845 "cs-parser.jay" +#line 4850 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7489,7 +7500,7 @@ void case_743() } void case_744() -#line 4856 "cs-parser.jay" +#line 4861 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7498,21 +7509,21 @@ void case_744() } void case_747() -#line 4871 "cs-parser.jay" +#line 4876 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_749() -#line 4880 "cs-parser.jay" +#line 4885 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_751() -#line 4895 "cs-parser.jay" +#line 4900 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7521,7 +7532,7 @@ void case_751() } void case_752() -#line 4902 "cs-parser.jay" +#line 4907 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7529,7 +7540,7 @@ void case_752() } void case_753() -#line 4908 "cs-parser.jay" +#line 4913 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7538,7 +7549,7 @@ void case_753() } void case_754() -#line 4915 "cs-parser.jay" +#line 4920 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7550,14 +7561,14 @@ void case_754() } void case_756() -#line 4929 "cs-parser.jay" +#line 4934 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_757() -#line 4934 "cs-parser.jay" +#line 4939 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7568,7 +7579,7 @@ void case_757() } void case_762() -#line 4956 "cs-parser.jay" +#line 4961 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7579,7 +7590,7 @@ void case_762() } void case_763() -#line 4965 "cs-parser.jay" +#line 4970 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7590,14 +7601,14 @@ void case_763() } void case_765() -#line 4981 "cs-parser.jay" +#line 4986 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_770() -#line 4999 "cs-parser.jay" +#line 5004 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7608,28 +7619,28 @@ void case_770() } void case_772() -#line 5012 "cs-parser.jay" +#line 5017 "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_773() -#line 5017 "cs-parser.jay" +#line 5022 "cs-parser.jay" { 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_774() -#line 5025 "cs-parser.jay" +#line 5030 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_778() -#line 5043 "cs-parser.jay" +#line 5048 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7641,7 +7652,7 @@ void case_778() } void case_779() -#line 5056 "cs-parser.jay" +#line 5061 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7651,14 +7662,14 @@ void case_779() } void case_780() -#line 5064 "cs-parser.jay" +#line 5069 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_783() -#line 5078 "cs-parser.jay" +#line 5083 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7668,7 +7679,7 @@ void case_783() } void case_784() -#line 5087 "cs-parser.jay" +#line 5092 "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])); @@ -7680,7 +7691,7 @@ void case_784() } void case_786() -#line 5104 "cs-parser.jay" +#line 5109 "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])); @@ -7688,14 +7699,14 @@ void case_786() } void case_787() -#line 5113 "cs-parser.jay" +#line 5118 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_789() -#line 5122 "cs-parser.jay" +#line 5127 "cs-parser.jay" { var sections = new List (4); @@ -7704,7 +7715,7 @@ void case_789() } void case_790() -#line 5129 "cs-parser.jay" +#line 5134 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7713,14 +7724,14 @@ void case_790() } void case_791() -#line 5136 "cs-parser.jay" +#line 5141 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_794() -#line 5155 "cs-parser.jay" +#line 5160 "cs-parser.jay" { var labels = new List (2); @@ -7729,7 +7740,7 @@ void case_794() } void case_795() -#line 5162 "cs-parser.jay" +#line 5167 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7738,14 +7749,14 @@ void case_795() } void case_796() -#line 5172 "cs-parser.jay" +#line 5177 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_802() -#line 5191 "cs-parser.jay" +#line 5196 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7755,21 +7766,21 @@ void case_802() } void case_803() -#line 5203 "cs-parser.jay" +#line 5208 "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_804() -#line 5211 "cs-parser.jay" +#line 5216 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_806() -#line 5227 "cs-parser.jay" +#line 5232 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7783,14 +7794,14 @@ void case_806() } void case_807() -#line 5239 "cs-parser.jay" +#line 5244 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_810() -#line 5252 "cs-parser.jay" +#line 5257 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7799,14 +7810,14 @@ void case_810() } void case_811() -#line 5259 "cs-parser.jay" +#line 5264 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_819() -#line 5283 "cs-parser.jay" +#line 5288 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7821,14 +7832,14 @@ void case_819() } void case_820() -#line 5299 "cs-parser.jay" +#line 5304 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_821() -#line 5304 "cs-parser.jay" +#line 5309 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7839,7 +7850,7 @@ void case_821() } void case_822() -#line 5313 "cs-parser.jay" +#line 5318 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7852,21 +7863,21 @@ void case_822() } void case_829() -#line 5336 "cs-parser.jay" +#line 5341 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_830() -#line 5344 "cs-parser.jay" +#line 5349 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_831() -#line 5352 "cs-parser.jay" +#line 5357 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7874,35 +7885,35 @@ void case_831() } void case_832() -#line 5358 "cs-parser.jay" +#line 5363 "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_833() -#line 5363 "cs-parser.jay" +#line 5368 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_834() -#line 5371 "cs-parser.jay" +#line 5376 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_835() -#line 5379 "cs-parser.jay" +#line 5384 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_836() -#line 5387 "cs-parser.jay" +#line 5392 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7920,7 +7931,7 @@ void case_836() } void case_837() -#line 5403 "cs-parser.jay" +#line 5408 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7936,28 +7947,28 @@ void case_837() } void case_841() -#line 5429 "cs-parser.jay" +#line 5434 "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_842() -#line 5434 "cs-parser.jay" +#line 5439 "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_843() -#line 5439 "cs-parser.jay" +#line 5444 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_844() -#line 5447 "cs-parser.jay" +#line 5452 "cs-parser.jay" { var l = new List (2); @@ -7966,7 +7977,7 @@ void case_844() } void case_845() -#line 5454 "cs-parser.jay" +#line 5459 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7984,7 +7995,7 @@ void case_845() } void case_849() -#line 5482 "cs-parser.jay" +#line 5487 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8001,7 +8012,7 @@ void case_849() } void case_851() -#line 5501 "cs-parser.jay" +#line 5506 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8014,14 +8025,14 @@ void case_851() } void case_854() -#line 5529 "cs-parser.jay" +#line 5534 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_856() -#line 5539 "cs-parser.jay" +#line 5544 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8031,7 +8042,7 @@ void case_856() } void case_857() -#line 5550 "cs-parser.jay" +#line 5555 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8043,14 +8054,14 @@ void case_857() } void case_858() -#line 5560 "cs-parser.jay" +#line 5565 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_859() -#line 5565 "cs-parser.jay" +#line 5570 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8062,7 +8073,7 @@ void case_859() } void case_860() -#line 5578 "cs-parser.jay" +#line 5583 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8074,14 +8085,14 @@ void case_860() } void case_861() -#line 5588 "cs-parser.jay" +#line 5593 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_862() -#line 5593 "cs-parser.jay" +#line 5598 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8093,7 +8104,7 @@ void case_862() } void case_863() -#line 5603 "cs-parser.jay" +#line 5608 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8104,14 +8115,14 @@ void case_863() } void case_865() -#line 5619 "cs-parser.jay" +#line 5624 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_866() -#line 5630 "cs-parser.jay" +#line 5635 "cs-parser.jay" { lexer.query_parsing = false; @@ -8125,7 +8136,7 @@ void case_866() } void case_867() -#line 5642 "cs-parser.jay" +#line 5647 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8137,7 +8148,7 @@ void case_867() } void case_868() -#line 5653 "cs-parser.jay" +#line 5658 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8147,7 +8158,7 @@ void case_868() } void case_869() -#line 5660 "cs-parser.jay" +#line 5665 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8155,7 +8166,7 @@ void case_869() } void case_870() -#line 5669 "cs-parser.jay" +#line 5674 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8165,7 +8176,7 @@ void case_870() } void case_871() -#line 5677 "cs-parser.jay" +#line 5682 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8179,7 +8190,7 @@ void case_871() } void case_872() -#line 5692 "cs-parser.jay" +#line 5697 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8189,7 +8200,7 @@ void case_872() } void case_873() -#line 5700 "cs-parser.jay" +#line 5705 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8203,7 +8214,7 @@ void case_873() } void case_875() -#line 5719 "cs-parser.jay" +#line 5724 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8216,7 +8227,7 @@ void case_875() } void case_877() -#line 5734 "cs-parser.jay" +#line 5739 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8232,7 +8243,7 @@ void case_877() } void case_878() -#line 5751 "cs-parser.jay" +#line 5756 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8249,14 +8260,14 @@ void case_878() } void case_880() -#line 5767 "cs-parser.jay" +#line 5772 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_882() -#line 5779 "cs-parser.jay" +#line 5784 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8265,7 +8276,7 @@ void case_882() } void case_883() -#line 5786 "cs-parser.jay" +#line 5791 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8275,7 +8286,7 @@ void case_883() } void case_884() -#line 5794 "cs-parser.jay" +#line 5799 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8284,7 +8295,7 @@ void case_884() } void case_885() -#line 5801 "cs-parser.jay" +#line 5806 "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])); @@ -8294,14 +8305,14 @@ void case_885() } void case_889() -#line 5818 "cs-parser.jay" +#line 5823 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_896() -#line 5838 "cs-parser.jay" +#line 5843 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8315,7 +8326,7 @@ void case_896() } void case_898() -#line 5857 "cs-parser.jay" +#line 5862 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8324,7 +8335,7 @@ void case_898() } void case_899() -#line 5867 "cs-parser.jay" +#line 5872 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8334,7 +8345,7 @@ void case_899() } void case_900() -#line 5875 "cs-parser.jay" +#line 5880 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8344,7 +8355,7 @@ void case_900() } void case_901() -#line 5883 "cs-parser.jay" +#line 5888 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8354,7 +8365,7 @@ void case_901() } void case_902() -#line 5891 "cs-parser.jay" +#line 5896 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8394,7 +8405,7 @@ void case_902() } void case_903() -#line 5929 "cs-parser.jay" +#line 5934 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8404,7 +8415,7 @@ void case_903() } void case_904() -#line 5937 "cs-parser.jay" +#line 5942 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8414,7 +8425,7 @@ void case_904() } void case_905() -#line 5945 "cs-parser.jay" +#line 5950 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8424,7 +8435,7 @@ void case_905() } void case_906() -#line 5953 "cs-parser.jay" +#line 5958 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8466,7 +8477,7 @@ void case_906() } void case_910() -#line 6008 "cs-parser.jay" +#line 6013 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8475,7 +8486,7 @@ void case_910() } void case_912() -#line 6019 "cs-parser.jay" +#line 6024 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8484,14 +8495,14 @@ void case_912() } void case_913() -#line 6026 "cs-parser.jay" +#line 6031 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_915() -#line 6035 "cs-parser.jay" +#line 6040 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8500,42 +8511,42 @@ void case_915() } void case_916() -#line 6042 "cs-parser.jay" +#line 6047 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_918() -#line 6054 "cs-parser.jay" +#line 6059 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_919() -#line 6059 "cs-parser.jay" +#line 6064 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_921() -#line 6071 "cs-parser.jay" +#line 6076 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_922() -#line 6076 "cs-parser.jay" +#line 6081 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_924() -#line 6086 "cs-parser.jay" +#line 6091 "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*/ @@ -8553,7 +8564,7 @@ void case_924() } void case_925() -#line 6102 "cs-parser.jay" +#line 6107 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8564,7 +8575,7 @@ void case_925() } void case_928() -#line 6129 "cs-parser.jay" +#line 6134 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8596,7 +8607,7 @@ void case_928() } void case_929() -#line 6159 "cs-parser.jay" +#line 6164 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8608,7 +8619,7 @@ void case_929() } void case_939() -#line 6202 "cs-parser.jay" +#line 6207 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8616,7 +8627,7 @@ void case_939() } void case_940() -#line 6208 "cs-parser.jay" +#line 6213 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8625,14 +8636,14 @@ void case_940() } void case_943() -#line 6223 "cs-parser.jay" +#line 6228 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_944() -#line 6228 "cs-parser.jay" +#line 6233 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8642,7 +8653,7 @@ void case_944() } void case_945() -#line 6236 "cs-parser.jay" +#line 6241 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8652,7 +8663,7 @@ void case_945() } void case_946() -#line 6244 "cs-parser.jay" +#line 6249 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8661,7 +8672,7 @@ void case_946() } void case_954() -#line 6282 "cs-parser.jay" +#line 6287 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8669,7 +8680,7 @@ void case_954() } void case_955() -#line 6288 "cs-parser.jay" +#line 6293 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8677,7 +8688,7 @@ void case_955() } void case_956() -#line 6297 "cs-parser.jay" +#line 6302 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12013,7 +12024,7 @@ void case_956() -1, -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6306 "cs-parser.jay" +#line 6311 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index df82d27754..1357783e1f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -2904,7 +2904,10 @@ type_parameter : opt_attributes opt_type_parameter_variance IDENTIFIER { var lt = (Tokenizer.LocatedToken)$3; - $$ = new TypeParameterName (lt.Value, (Attributes)$1, (Variance) $2, lt.Location); + var variance = (Variance) $2; + $$ = new TypeParameterName (lt.Value, (Attributes)$1, variance, lt.Location); + if (variance != Variance.None) + lbag.AddLocation ($$, savedLocation); } | error { @@ -4613,10 +4616,12 @@ type_parameter_variance : OUT { $$ = Variance.Covariant; + savedLocation = GetLocation ($1); } | IN { $$ = Variance.Contravariant; + savedLocation = GetLocation ($1); } ; From 03babc636969684c604fcc93da3f0b7f9849e5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 13:33:44 +0200 Subject: [PATCH 39/92] Corrected constructor locations. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 0064325e8d..944f5e414d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1063,12 +1063,14 @@ namespace ICSharpCode.NRefactory.CSharp var initializerLocation = LocationsBag.GetLocations (c.Initializer); if (initializerLocation != null) - newConstructor.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ConstructorDeclaration.Roles.Colon); + newConstructor.AddChild (new CSharpTokenNode (Convert (initializerLocation[0]), 1), ConstructorDeclaration.Roles.Colon); + // this and base has the same length + initializer.AddChild (new CSharpTokenNode (Convert (c.Initializer.Location), "this".Length), ConstructorDeclaration.Roles.Keyword); if (initializerLocation != null) - initializer.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ConstructorDeclaration.Roles.LPar); + initializer.AddChild (new CSharpTokenNode (Convert (initializerLocation[1]), 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); + initializer.AddChild (new CSharpTokenNode (Convert (initializerLocation[2]), 1), ConstructorDeclaration.Roles.RPar); newConstructor.AddChild (initializer, ConstructorDeclaration.InitializerRole); } From 14d06380bb7f1feaf3a34a8cf6f351821ba313ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 13:36:18 +0200 Subject: [PATCH 40/92] Fixed implicit/explicit operator locations. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 944f5e414d..9b54148268 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -754,19 +754,22 @@ namespace ICSharpCode.NRefactory.CSharp AddAttributeSection (newOperator, o); AddModifiers (newOperator, location); - newOperator.AddChild (ConvertToType (o.TypeName), AstNode.Roles.Type); if (o.OperatorType == Operator.OpType.Implicit) { if (location != null) { newOperator.AddChild (new CSharpTokenNode (Convert (location[0]), "implicit".Length), OperatorDeclaration.OperatorTypeRole); newOperator.AddChild (new CSharpTokenNode (Convert (location[1]), "operator".Length), OperatorDeclaration.OperatorKeywordRole); } + newOperator.AddChild (ConvertToType (o.TypeName), AstNode.Roles.Type); } else if (o.OperatorType == Operator.OpType.Explicit) { if (location != null) { newOperator.AddChild (new CSharpTokenNode (Convert (location[0]), "explicit".Length), OperatorDeclaration.OperatorTypeRole); newOperator.AddChild (new CSharpTokenNode (Convert (location[1]), "operator".Length), OperatorDeclaration.OperatorKeywordRole); } + newOperator.AddChild (ConvertToType (o.TypeName), AstNode.Roles.Type); } else { + newOperator.AddChild (ConvertToType (o.TypeName), AstNode.Roles.Type); + if (location != null) newOperator.AddChild (new CSharpTokenNode (Convert (location[0]), "operator".Length), OperatorDeclaration.OperatorKeywordRole); From 382f695506cd98dc66c22e4284abc5596519d361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 13:46:37 +0200 Subject: [PATCH 41/92] Fixed some locations in array create expression. --- .../Parser/CSharpParser.cs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 9b54148268..b6836a53b9 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2569,34 +2569,36 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetLocations (arrayCreationExpression); if (arrayCreationExpression.NewType != null) result.AddChild (ConvertToType (arrayCreationExpression.NewType), ArrayCreateExpression.Roles.Type); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ArrayCreateExpression.Roles.LBracket); var next = arrayCreationExpression.Rank; if (arrayCreationExpression.Arguments != null) { // skip first array rank. next = next.Next; + + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), ArrayCreateExpression.Roles.LBracket); + var commaLocations = LocationsBag.GetLocations (arrayCreationExpression.Arguments); for (int i = 0 ;i < arrayCreationExpression.Arguments.Count; i++) { result.AddChild ((Expression)arrayCreationExpression.Arguments[i].Accept (this), ArrayCreateExpression.Roles.Argument); - if (commaLocations != null && i > 0) - result.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i]), 1), ArrayCreateExpression.Roles.Comma); + if (commaLocations != null && i < commaLocations.Count) + result.AddChild (new CSharpTokenNode (Convert (commaLocations [i]), 1), ArrayCreateExpression.Roles.Comma); } + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location[1]), 1), ArrayCreateExpression.Roles.RBracket); + } 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); + result.AddChild (spec, ArrayCreateExpression.AdditionalArraySpecifierRole); 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) { var initLocation = LocationsBag.GetLocations (arrayCreationExpression.Initializers); ArrayInitializerExpression initializer = new ArrayInitializerExpression(); @@ -2605,8 +2607,8 @@ namespace ICSharpCode.NRefactory.CSharp var commaLocations = LocationsBag.GetLocations (arrayCreationExpression.Initializers.Elements); for (int i = 0; i < arrayCreationExpression.Initializers.Count; i++) { initializer.AddChild ((Expression)arrayCreationExpression.Initializers[i].Accept (this), ArrayInitializerExpression.Roles.Expression); - if (commaLocations != null && i > 0) { - initializer.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i]), 1), IndexerExpression.Roles.Comma); + if (commaLocations != null && i < commaLocations.Count) { + initializer.AddChild (new CSharpTokenNode (Convert (commaLocations [i]), 1), IndexerExpression.Roles.Comma); } } From d1db72ba83faa40dcc53448d3f4f3bfda4edbeab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 13:52:02 +0200 Subject: [PATCH 42/92] Added missing "new" keyword. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index b6836a53b9..19ee45aaf7 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2567,9 +2567,10 @@ 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); - + var next = arrayCreationExpression.Rank; if (arrayCreationExpression.Arguments != null) { // skip first array rank. From 50f95d31aba74c07587c818b7daecd9cd1849e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 14:45:02 +0200 Subject: [PATCH 43/92] Updated mcs. --- .../Parser/mcs/anonymous.cs | 109 +- .../Parser/mcs/argument.cs | 125 +- .../Parser/mcs/assign.cs | 51 +- .../Parser/mcs/async.cs | 304 +- .../Parser/mcs/attribute.cs | 39 +- .../Parser/mcs/class.cs | 22 +- .../Parser/mcs/codegen.cs | 486 +- .../Parser/mcs/complete.cs | 15 +- .../Parser/mcs/constant.cs | 32 +- .../Parser/mcs/context.cs | 72 +- .../Parser/mcs/convert.cs | 3 +- .../Parser/mcs/cs-parser.cs | 9891 +++++++++-------- .../Parser/mcs/cs-parser.jay | 117 +- .../Parser/mcs/cs-tokenizer.cs | 47 +- .../Parser/mcs/decl.cs | 4 +- .../Parser/mcs/delegate.cs | 16 +- .../Parser/mcs/dynamic.cs | 19 +- .../Parser/mcs/ecore.cs | 499 +- .../Parser/mcs/enum.cs | 5 + .../Parser/mcs/eval.cs | 7 + .../Parser/mcs/expression.cs | 1059 +- .../Parser/mcs/flowanalysis.cs | 108 +- .../Parser/mcs/generic.cs | 34 +- .../Parser/mcs/import.cs | 27 +- .../Parser/mcs/iterators.cs | 253 +- .../Parser/mcs/lambda.cs | 6 +- .../Parser/mcs/method.cs | 20 +- .../Parser/mcs/namespace.cs | 50 +- .../Parser/mcs/nullable.cs | 194 +- .../Parser/mcs/parameter.cs | 32 +- .../Parser/mcs/pending.cs | 79 +- .../Parser/mcs/report.cs | 8 +- .../Parser/mcs/roottypes.cs | 2 +- .../Parser/mcs/statement.cs | 297 +- .../Parser/mcs/support.cs | 2 +- .../Parser/mcs/typemanager.cs | 10 + .../Parser/mcs/typespec.cs | 16 +- 37 files changed, 7778 insertions(+), 6282 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs index 5576bcc5f6..d52dc82d3e 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/anonymous.cs @@ -193,7 +193,7 @@ namespace Mono.CSharp { protected HoistedThis hoisted_this; // Local variable which holds this storey instance - public LocalTemporary Instance; + public Expression Instance; public AnonymousMethodStorey (Block block, TypeContainer parent, MemberBase host, TypeParameter[] tparams, string name) : base (parent, MakeMemberName (host, name, unique_id, tparams, block.StartLocation), @@ -236,7 +236,12 @@ namespace Mono.CSharp { protected Field AddCompilerGeneratedField (string name, FullNamedExpression type) { - const Modifiers mod = Modifiers.INTERNAL | Modifiers.COMPILER_GENERATED; + return AddCompilerGeneratedField (name, type, false); + } + + protected Field AddCompilerGeneratedField (string name, FullNamedExpression type, bool privateAccess) + { + Modifiers mod = Modifiers.COMPILER_GENERATED | (privateAccess ? Modifiers.PRIVATE : Modifiers.INTERNAL); Field f = new Field (this, type, mod, new MemberName (name, Location), null); AddField (f); return f; @@ -391,21 +396,47 @@ namespace Mono.CSharp { SymbolWriter.OpenCompilerGeneratedBlock (ec); // - // Create an instance of a storey + // Create an instance of this storey // - var storey_type_expr = CreateStoreyTypeExpression (ec); - ResolveContext rc = new ResolveContext (ec.MemberContext); rc.CurrentBlock = block; - Expression e = new New (storey_type_expr, null, Location).Resolve (rc); - e.Emit (ec); - Instance = new LocalTemporary (storey_type_expr.Type); - Instance.Store (ec); + var storey_type_expr = CreateStoreyTypeExpression (ec); + var source = new New (storey_type_expr, null, Location).Resolve (rc); + + // + // When the current context is async (or iterator) lift local storey + // instantiation to the currect storey + // + if (ec.CurrentAnonymousMethod is StateMachineInitializer) { + // + // Unfortunately, normal capture mechanism could not be used because we are + // too late in the pipeline and standart assign cannot be used either due to + // recursive nature of GetStoreyInstanceExpression + // + var field = ec.CurrentAnonymousMethod.Storey.AddCompilerGeneratedField ( + LocalVariable.GetCompilerGeneratedName (block), storey_type_expr, true); + + field.Define (); + field.Emit (); + + var fexpr = new FieldExpr (field, Location); + fexpr.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, Location); + fexpr.EmitAssign (ec, source, false, false); + + Instance = fexpr; + } else { + var local = TemporaryVariableReference.Create (source.Type, block, Location); + local.EmitAssign (ec, source); + + Instance = local; + } EmitHoistedFieldsInitialization (rc, ec); - SymbolWriter.DefineScopeVariable (ID, Instance.Builder); + // TODO: Implement properly + //SymbolWriter.DefineScopeVariable (ID, Instance.Builder); + SymbolWriter.CloseCompilerGeneratedBlock (ec); } @@ -526,10 +557,11 @@ namespace Mono.CSharp { if (f == null) { if (am.Storey == this) { // - // Access inside of same storey (S -> S) + // Access from inside of same storey (S -> S) // return new CompilerGeneratedThis (CurrentType, Location); } + // // External field access // @@ -583,6 +615,11 @@ namespace Mono.CSharp { this.hv = hv; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { return hv.CreateExpressionTree (); @@ -637,6 +674,11 @@ namespace Mono.CSharp { GetFieldExpression (ec).Emit (ec); } + public Expression EmitToField (EmitContext ec) + { + return GetFieldExpression (ec); + } + // // Creates field access expression for hoisted variable // @@ -692,7 +734,7 @@ namespace Mono.CSharp { GetFieldExpression (ec).Emit (ec, leave_copy); } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { GetFieldExpression (ec).EmitAssign (ec, source, leave_copy, false); } @@ -760,12 +802,20 @@ namespace Mono.CSharp { { readonly string name; - public HoistedLocalVariable (AnonymousMethodStorey scope, LocalVariable local, string name) - : base (scope, name, local.Type) + public HoistedLocalVariable (AnonymousMethodStorey storey, LocalVariable local, string name) + : base (storey, name, local.Type) { this.name = local.Name; } + // + // For compiler generated local variables + // + public HoistedLocalVariable (AnonymousMethodStorey storey, Field field) + : base (storey, field) + { + } + public override void EmitSymbolInfo () { SymbolWriter.DefineCapturedLocal (storey.ID, name, field.Name); @@ -1021,7 +1071,7 @@ namespace Mono.CSharp { var body = CompatibleMethodBody (ec, tic, InternalType.Arglist, delegate_type); if (body != null) { if (is_async) { - AsyncInitializer.Create (body.Block, body.Parameters, ec.CurrentMemberDefinition.Parent, null, loc); + AsyncInitializer.Create (ec, body.Block, body.Parameters, ec.CurrentMemberDefinition.Parent, null, loc); } am = body.Compatible (ec, body, is_async); @@ -1037,6 +1087,11 @@ namespace Mono.CSharp { return am.ReturnType; } + public override bool ContainsEmitWithAwait () + { + return false; + } + // // Returns AnonymousMethod container if this anonymous method // expression can be implicitly converted to the delegate type `delegate_type' @@ -1102,7 +1157,7 @@ namespace Mono.CSharp { } } else { if (is_async) { - AsyncInitializer.Create (body.Block, body.Parameters, ec.CurrentMemberDefinition.Parent, body.ReturnType, loc); + AsyncInitializer.Create (ec, body.Block, body.Parameters, ec.CurrentMemberDefinition.Parent, body.ReturnType, loc); } am = body.Compatible (ec); @@ -1190,12 +1245,13 @@ namespace Mono.CSharp { if (!DoResolveParameters (ec)) return null; +#if !STATIC // FIXME: The emitted code isn't very careful about reachability // so, ensure we have a 'ret' at the end BlockContext bc = ec as BlockContext; if (bc != null && bc.CurrentBranching != null && bc.CurrentBranching.CurrentUsageVector.IsUnreachable) bc.NeedReturnLabel (); - +#endif return this; } @@ -1280,11 +1336,6 @@ namespace Mono.CSharp { { EmitContext ec = new EmitContext (this, ig, ReturnType); ec.CurrentAnonymousMethod = AnonymousMethod; - if (AnonymousMethod.return_label != null) { - ec.HasReturnLabel = true; - ec.ReturnLabel = (Label) AnonymousMethod.return_label; - } - return ec; } @@ -1330,8 +1381,6 @@ namespace Mono.CSharp { public TypeSpec ReturnType; - object return_label; - protected AnonymousExpression (ParametersBlock block, TypeSpec return_type, Location loc) { this.ReturnType = return_type; @@ -1380,9 +1429,6 @@ namespace Mono.CSharp { bool res = Block.Resolve (ec.CurrentBranching, aec, null); - if (aec.HasReturnLabel) - return_label = aec.ReturnLabel; - if (am != null && am.ReturnTypeInference != null) { am.ReturnTypeInference.FixAllTypes (ec); ReturnType = am.ReturnTypeInference.InferredTypeArguments [0]; @@ -1403,6 +1449,11 @@ namespace Mono.CSharp { return res ? this : null; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public void SetHasThisAccess () { ExplicitBlock b = block; @@ -1629,13 +1680,13 @@ namespace Mono.CSharp { // if (is_static) { - ec.Emit (OpCodes.Ldnull); + ec.EmitNull (); } else if (storey != null) { Expression e = storey.GetStoreyInstanceExpression (ec).Resolve (new ResolveContext (ec.MemberContext)); if (e != null) e.Emit (ec); } else { - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); } var delegate_method = method.Spec; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs index a246066896..2192b9c9e6 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/argument.cs @@ -103,6 +103,28 @@ namespace Mono.CSharp return Expr.CreateExpressionTree (ec); } + + public virtual void Emit (EmitContext ec) + { + if (!IsByRef) { + Expr.Emit (ec); + return; + } + + AddressOp mode = AddressOp.Store; + if (ArgType == AType.Ref) + mode |= AddressOp.Load; + + IMemoryLocation ml = (IMemoryLocation) Expr; + ml.AddressOf (ec, mode); + } + + public Argument EmitToField (EmitContext ec) + { + var res = Expr.EmitToField (ec); + return res == Expr ? this : new Argument (res, ArgType); + } + public string GetSignatureForError () { if (Expr.eclass == ExprClass.MethodGroup) @@ -141,21 +163,6 @@ namespace Mono.CSharp Expr = ErrorExpression.Instance; // } } - - public virtual void Emit (EmitContext ec) - { - if (!IsByRef) { - Expr.Emit (ec); - return; - } - - AddressOp mode = AddressOp.Store; - if (ArgType == AType.Ref) - mode |= AddressOp.Load; - - IMemoryLocation ml = (IMemoryLocation) Expr; - ml.AddressOf (ec, mode); - } } public class MovableArgument : Argument @@ -182,12 +189,12 @@ namespace Mono.CSharp variable.Release (ec); } - public void EmitAssign (EmitContext ec) + public void EmitToVariable (EmitContext ec) { var type = Expr.Type; if (IsByRef) { var ml = (IMemoryLocation) Expr; - ml.AddressOf (ec, AddressOp.Load); + ml.AddressOf (ec, AddressOp.LoadStore); type = ReferenceContainer.MakeType (ec.Module, type); } else { Expr.Emit (ec); @@ -246,13 +253,16 @@ namespace Mono.CSharp ordered.Add (arg); } - public override Expression[] Emit (EmitContext ec, bool dup_args) + public override Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait) { foreach (var a in ordered) { - a.EmitAssign (ec); + if (prepareAwait) + a.EmitToField (ec); + else + a.EmitToVariable (ec); } - return base.Emit (ec, dup_args); + return base.Emit (ec, dup_args, prepareAwait); } } @@ -264,6 +274,11 @@ namespace Mono.CSharp args = new List (capacity); } + private Arguments (List args) + { + this.args = args; + } + public void Add (Argument arg) { args.Add (arg); @@ -274,6 +289,16 @@ namespace Mono.CSharp this.args.AddRange (args.args); } + public bool ContainsEmitWithAwait () + { + foreach (var arg in args) { + if (arg.Expr.ContainsEmitWithAwait ()) + return true; + } + + return false; + } + public ArrayInitializer CreateDynamicBinderArguments (ResolveContext rc) { Location loc = Location.Null; @@ -395,46 +420,58 @@ namespace Mono.CSharp // public void Emit (EmitContext ec) { - Emit (ec, false); + Emit (ec, false, false); } // - // if `dup_args' is true, a copy of the arguments will be left - // on the stack and return value will contain an array of access - // expressions - // NOTE: It's caller responsibility is to release temporary variables + // if `dup_args' is true or any of arguments contains await. + // A copy of all arguments will be returned to the caller // - public virtual Expression[] Emit (EmitContext ec, bool dup_args) + public virtual Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait) { - Expression[] temps; + List dups; - if (dup_args && Count != 0) - temps = new Expression [Count]; + if ((dup_args && Count != 0) || prepareAwait) + dups = new List (Count); else - temps = null; + dups = null; - int i = 0; LocalTemporary lt; foreach (Argument a in args) { + if (prepareAwait) { + dups.Add (a.EmitToField (ec)); + continue; + } + a.Emit (ec); - if (!dup_args) + + if (!dup_args) { continue; + } - if (a.Expr is Constant || a.Expr is This) { + if (a.Expr.IsSideEffectFree) { // - // No need to create a temporary variable for constants + // No need to create a temporary variable for side effect free expressions. I assume + // all side-effect free expressions are cheap, this has to be tweaked when we become + // more aggressive on detection // - temps[i] = a.Expr; + dups.Add (a); } else { ec.Emit (OpCodes.Dup); - temps[i] = lt = new LocalTemporary (a.Type); + + // TODO: Release local temporary on next Emit + // Need to add a flag to argument to indicate this + lt = new LocalTemporary (a.Type); lt.Store (ec); - } - ++i; + dups.Add (new Argument (lt, a.ArgType)); + } } - return temps; + if (dups != null) + return new Arguments (dups); + + return null; } public List.Enumerator GetEnumerator () @@ -497,9 +534,9 @@ namespace Mono.CSharp public Arguments MarkOrderedArgument (NamedArgument a) { // - // Constant expression have no effect on left-to-right execution + // An expression has no effect on left-to-right execution // - if (a.Expr is Constant) + if (a.Expr.IsSideEffectFree) return this; ArgumentsOrdered ra = this as ArgumentsOrdered; @@ -511,6 +548,12 @@ namespace Mono.CSharp if (la == a) break; + // + // When the argument is filled later by default expression + // + if (la == null) + continue; + var ma = la as MovableArgument; if (ma == null) { ma = new MovableArgument (la); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs index 6fd2a7a03a..2a82f240be 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/assign.cs @@ -51,7 +51,7 @@ namespace Mono.CSharp { // be data on the stack that it can use to compuatate its value. This is // for expressions like a [f ()] ++, where you can't call `f ()' twice. // - void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load); + void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound); /* For simple assignments, this interface is very simple, EmitAssign is called with source @@ -201,6 +201,11 @@ namespace Mono.CSharp { builder = null; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (1); @@ -236,9 +241,9 @@ namespace Mono.CSharp { Emit (ec); } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { - if (prepare_for_load) + if (isCompound) throw new NotImplementedException (); source.Emit (ec); @@ -294,12 +299,6 @@ namespace Mono.CSharp { this.loc = loc; } - public override Expression CreateExpressionTree (ResolveContext ec) - { - ec.Report.Error (832, loc, "An expression tree cannot contain an assignment operator"); - return null; - } - public Expression Target { get { return target; } } @@ -310,6 +309,17 @@ namespace Mono.CSharp { } } + public override bool ContainsEmitWithAwait () + { + return target.ContainsEmitWithAwait () || source.ContainsEmitWithAwait (); + } + + public override Expression CreateExpressionTree (ResolveContext ec) + { + ec.Report.Error (832, loc, "An expression tree cannot contain an assignment operator"); + return null; + } + protected override Expression DoResolve (ResolveContext ec) { bool ok = true; @@ -546,10 +556,6 @@ namespace Mono.CSharp { base.EmitStatement (ec); } - public bool IsComplexInitializer { - get { return !(source is Constant); } - } - public bool IsDefaultInitializer { get { Constant c = source as Constant; @@ -560,6 +566,12 @@ namespace Mono.CSharp { return c.IsDefaultInitializer (fe.Type); } } + + public override bool IsSideEffectFree { + get { + return source.IsSideEffectFree; + } + } } // @@ -570,13 +582,19 @@ namespace Mono.CSharp { // This is just a hack implemented for arrays only public sealed class TargetExpression : Expression { - Expression child; + readonly Expression child; + public TargetExpression (Expression child) { this.child = child; this.loc = child.Location; } + public override bool ContainsEmitWithAwait () + { + return child.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -593,6 +611,11 @@ namespace Mono.CSharp { { child.Emit (ec); } + + public override Expression EmitToField (EmitContext ec) + { + return child.EmitToField (ec); + } } // Used for underlying binary operator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs index 1a1345013f..24c138ece1 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/async.cs @@ -1,4 +1,4 @@ -// +// // async.cs: Asynchronous functions // // Author: @@ -7,11 +7,14 @@ // Dual licensed under the terms of the MIT X11 or GNU GPL // // Copyright 2011 Novell, Inc. +// Copyright 2011 Xamarin Inc. // using System; using System.Collections.Generic; using System.Linq; +using System.Collections; + #if STATIC using IKVM.Reflection.Emit; #else @@ -43,18 +46,13 @@ namespace Mono.CSharp throw new NotImplementedException ("ET"); } - protected override Expression DoResolve (ResolveContext rc) + public override bool ContainsEmitWithAwait () { - if (rc.HasSet (ResolveContext.Options.FinallyScope)) { - rc.Report.Error (1984, loc, - "The `await' operator cannot be used in the body of a finally clause"); - } - - if (rc.HasSet (ResolveContext.Options.CatchScope)) { - rc.Report.Error (1985, loc, - "The `await' operator cannot be used in the body of a catch clause"); - } + return true; + } + protected override Expression DoResolve (ResolveContext rc) + { if (rc.HasSet (ResolveContext.Options.LockScope)) { rc.Report.Error (1996, loc, "The `await' operator cannot be used in the body of a lock statement"); @@ -92,7 +90,13 @@ namespace Mono.CSharp stmt.EmitPrologue (ec); stmt.Emit (ec); } - + + public override Expression EmitToField (EmitContext ec) + { + stmt.EmitPrologue (ec); + return stmt.GetResultExpression (ec); + } + public void EmitAssign (EmitContext ec, FieldExpr field) { stmt.EmitPrologue (ec); @@ -126,11 +130,27 @@ namespace Mono.CSharp } } + sealed class GetResultInvocation : Invocation + { + public GetResultInvocation (MethodGroupExpr mge, Arguments arguments) + : base (null, arguments) + { + mg = mge; + type = mg.BestCandidateReturnType; + } + + public override Expression EmitToField (EmitContext ec) + { + return this; + } + } + Field awaiter; - PropertyExpr is_completed; + PropertySpec is_completed; MethodSpec on_completed; MethodSpec get_result; TypeSpec type; + TypeSpec result_type; public AwaitStatement (Expression expr, Location loc) : base (expr, loc) @@ -139,6 +159,12 @@ namespace Mono.CSharp #region Properties + bool IsDynamic { + get { + return is_completed == null; + } + } + public TypeSpec Type { get { return type; @@ -147,13 +173,18 @@ namespace Mono.CSharp public TypeSpec ResultType { get { - return get_result.ReturnType; + return result_type; } } #endregion protected override void DoEmit (EmitContext ec) + { + GetResultExpression (ec).Emit (ec); + } + + public Expression GetResultExpression (EmitContext ec) { var fe_awaiter = new FieldExpr (awaiter, loc); fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc); @@ -161,10 +192,15 @@ namespace Mono.CSharp // // result = awaiter.GetResult (); // - var mg_result = MethodGroupExpr.CreatePredefined (get_result, fe_awaiter.Type, loc); - mg_result.InstanceExpression = fe_awaiter; + if (IsDynamic) { + var rc = new ResolveContext (ec.MemberContext); + return new Invocation (new MemberAccess (fe_awaiter, "GetResult"), new Arguments (0)).Resolve (rc); + } else { + var mg_result = MethodGroupExpr.CreatePredefined (get_result, fe_awaiter.Type, loc); + mg_result.InstanceExpression = fe_awaiter; - mg_result.EmitCall (ec, new Arguments (0)); + return new GetResultInvocation (mg_result, new Arguments (0)); + } } public void EmitPrologue (EmitContext ec) @@ -177,11 +213,35 @@ namespace Mono.CSharp // fe_awaiter.EmitAssign (ec, expr, false, false); - is_completed.InstanceExpression = fe_awaiter; - is_completed.EmitBranchable (ec, resume_point, true); + Label skip_continuation = ec.DefineLabel (); - var mg_completed = MethodGroupExpr.CreatePredefined (on_completed, fe_awaiter.Type, loc); - mg_completed.InstanceExpression = fe_awaiter; + Expression completed_expr; + if (IsDynamic) { + var rc = new ResolveContext (ec.MemberContext); + + Arguments dargs = new Arguments (1); + dargs.Add (new Argument (fe_awaiter)); + completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc); + } else { + var pe = PropertyExpr.CreatePredefined (is_completed, loc); + pe.InstanceExpression = fe_awaiter; + completed_expr = pe; + } + + completed_expr.EmitBranchable (ec, skip_continuation, true); + + base.DoEmit (ec); + + // + // The stack has to be empty before calling await continuation. We handle this + // by lifting values which would be left on stack into class fields. The process + // is quite complicated and quite hard to test because any expression can possibly + // leave a value on the stack. + // + // Following assert fails when some of expression called before is missing EmitToField + // or parent expression fails to find await in children expressions + // + ec.AssertEmptyStack (); var args = new Arguments (1); var storey = (AsyncTaskStorey) machine_initializer.Storey; @@ -190,12 +250,27 @@ namespace Mono.CSharp args.Add (new Argument (fe_cont)); - // - // awaiter.OnCompleted (continuation); - // - mg_completed.EmitCall (ec, args); + if (IsDynamic) { + var rc = new ResolveContext (ec.MemberContext); + var mg_expr = new Invocation (new MemberAccess (fe_awaiter, "OnCompleted"), args).Resolve (rc); - base.DoEmit (ec); + ExpressionStatement es = (ExpressionStatement) mg_expr; + es.EmitStatement (ec); + } else { + var mg_completed = MethodGroupExpr.CreatePredefined (on_completed, fe_awaiter.Type, loc); + mg_completed.InstanceExpression = fe_awaiter; + + // + // awaiter.OnCompleted (continuation); + // + mg_completed.EmitCall (ec, args); + } + + // Return ok + machine_initializer.EmitLeave (ec, unwind_protect); + + ec.MarkLabel (resume_point); + ec.MarkLabel (skip_continuation); } public void EmitStatement (EmitContext ec) @@ -231,13 +306,21 @@ namespace Mono.CSharp if (!base.Resolve (bc)) return false; + Arguments args = new Arguments (0); + type = expr.Type; // - // The task result is of dynamic type + // The await expression is of dynamic type // - if (expr.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) - throw new NotImplementedException ("dynamic await"); + if (type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { + result_type = type; + + awaiter = ((AsyncTaskStorey) machine_initializer.Storey).AddAwaiter (type, loc); + + expr = new Invocation (new MemberAccess (expr, "GetAwaiter"), args).Resolve (bc); + return true; + } // // Check whether the expression is awaitable @@ -246,40 +329,28 @@ namespace Mono.CSharp if (ama == null) return false; - Arguments args = new Arguments (0); - var errors_printer = new SessionReportPrinter (); var old = bc.Report.SetPrinter (errors_printer); ama = new Invocation (ama, args).Resolve (bc); + bc.Report.SetPrinter (old); if (errors_printer.ErrorsCount > 0 || !MemberAccess.IsValidDotExpression (ama.Type)) { - bc.Report.SetPrinter (old); - Error_WrongGetAwaiter (bc, loc, expr.Type); + Error_WrongGetAwaiter (bc, expr.Location, expr.Type); return false; } var awaiter_type = ama.Type; awaiter = ((AsyncTaskStorey) machine_initializer.Storey).AddAwaiter (awaiter_type, loc); + expr = ama; // // Predefined: bool IsCompleted { get; } // - var is_completed_ma = new MemberAccess (expr, "IsCompleted").Resolve (bc); - if (is_completed_ma != null) { - is_completed = is_completed_ma as PropertyExpr; - if (is_completed != null && is_completed.Type.BuiltinType == BuiltinTypeSpec.Type.Bool && is_completed.IsInstance && is_completed.Getter != null) { - // valid - } else { - bc.Report.SetPrinter (old); - Error_WrongAwaiterPattern (bc, awaiter_type); - return false; - } - } - - bc.Report.SetPrinter (old); + is_completed = MemberCache.FindMember (awaiter_type, MemberFilter.Property ("IsCompleted", bc.Module.Compiler.BuiltinTypes.Bool), + BindingRestriction.InstanceOnly) as PropertySpec; - if (errors_printer.ErrorsCount > 0) { + if (is_completed == null || !is_completed.HasGet) { Error_WrongAwaiterPattern (bc, awaiter_type); return false; } @@ -312,6 +383,8 @@ namespace Mono.CSharp return false; } + result_type = get_result.ReturnType; + return true; } } @@ -353,7 +426,7 @@ namespace Mono.CSharp #endregion - public static void Create (ParametersBlock block, ParametersCompiled parameters, TypeContainer host, TypeSpec returnType, Location loc) + public static void Create (IMemberContext context, ParametersBlock block, ParametersCompiled parameters, TypeContainer host, TypeSpec returnType, Location loc) { if (returnType != null && returnType.Kind != MemberKind.Void && returnType != host.Module.PredefinedTypes.Task.TypeSpec && @@ -385,11 +458,12 @@ namespace Mono.CSharp } } - // TODO: Warning - //if (!block.HasAwait) { - //} + if (!block.IsAsync) { + host.Compiler.Report.Warning (1998, 1, loc, + "Async block lacks `await' operator and will run synchronously"); + } - block.WrapIntoAsyncTask (host, returnType); + block.WrapIntoAsyncTask (context, host, returnType); } protected override BlockContext CreateBlockContext (ResolveContext rc) @@ -399,6 +473,7 @@ namespace Mono.CSharp if (lambda != null) return_inference = lambda.ReturnTypeInference; + ctx.StartFlowBranching (this, rc.CurrentBranching); return ctx; } @@ -422,17 +497,31 @@ namespace Mono.CSharp { var storey = (AsyncTaskStorey) Storey; storey.Instance.Emit (ec); - ec.Emit (OpCodes.Call, storey.StateMachineMethod.Spec); + var move_next_entry = storey.StateMachineMethod.Spec; + if (storey.MemberName.Arity > 0) { + move_next_entry = MemberCache.GetMember (storey.Instance.Type, move_next_entry); + } + + ec.Emit (OpCodes.Call, move_next_entry); + + // + // Emits return .$builder.Task; + // if (storey.Task != null) { - // - // async.$builder.Task; - // + var builder_field = storey.Builder.Spec; + var task_get = storey.Task.Get; + + if (storey.MemberName.Arity > 0) { + builder_field = MemberCache.GetMember (storey.Instance.Type, builder_field); + task_get = MemberCache.GetMember (builder_field.MemberType, task_get); + } + var pe_task = new PropertyExpr (storey.Task, loc) { - InstanceExpression = new FieldExpr (storey.Builder, loc) { + InstanceExpression = new FieldExpr (builder_field, loc) { InstanceExpression = storey.Instance }, - Getter = storey.Task.Get + Getter = task_get }; pe_task.Emit (ec); @@ -440,33 +529,60 @@ namespace Mono.CSharp ec.Emit (OpCodes.Ret); } - - public override void InjectYield (EmitContext ec, Expression expr, int resume_pc, bool unwind_protect, Label resume_point) - { - base.InjectYield (ec, expr, resume_pc, unwind_protect, resume_point); - } } class AsyncTaskStorey : StateMachine { + sealed class ParametersLoadStatement : Statement + { + readonly FieldSpec[] fields; + readonly TypeSpec[] parametersTypes; + readonly int thisParameterIndex; + + public ParametersLoadStatement (FieldSpec[] fields, TypeSpec[] parametersTypes, int thisParameterIndex) + { + this.fields = fields; + this.parametersTypes = parametersTypes; + this.thisParameterIndex = thisParameterIndex; + } + + protected override void CloneTo (CloneContext clonectx, Statement target) + { + throw new NotImplementedException (); + } + + protected override void DoEmit (EmitContext ec) + { + for (int i = 0; i < fields.Length; ++i) { + var field = fields[i]; + if (field == null) + continue; + + ec.EmitArgumentLoad (thisParameterIndex); + ec.EmitArgumentLoad (i); + if (parametersTypes[i] is ReferenceContainer) + ec.EmitLoadFromPtr (field.MemberType); + + ec.Emit (OpCodes.Stfld, field); + } + } + } + int awaiters; Field builder, continuation; readonly TypeSpec return_type; MethodSpec set_result; + MethodSpec set_exception; PropertySpec task; LocalVariable hoisted_return; + int locals_captured; - public AsyncTaskStorey (AsyncInitializer initializer, TypeSpec type) - : base (initializer.OriginalBlock, initializer.Host, null, null, "async") + public AsyncTaskStorey (IMemberContext context, AsyncInitializer initializer, TypeSpec type) + : base (initializer.OriginalBlock, initializer.Host,context.CurrentMemberDefinition as MemberBase, context.CurrentTypeParameters, "async") { return_type = type; } - public Field AddAwaiter (TypeSpec type, Location loc) - { - return AddCompilerGeneratedField ("$awaiter" + awaiters++.ToString ("X"), new TypeExpression (type, loc)); - } - #region Properties public Field Builder { @@ -501,17 +617,34 @@ namespace Mono.CSharp #endregion + public Field AddAwaiter (TypeSpec type, Location loc) + { + return AddCompilerGeneratedField ("$awaiter" + awaiters++.ToString ("X"), new TypeExpression (type, loc), true); + } + + public Field AddCapturedLocalVariable (TypeSpec type) + { + if (mutator != null) + type = mutator.Mutate (type); + + var field = AddCompilerGeneratedField ("$" + locals_captured++.ToString ("X"), new TypeExpression (type, Location), true); + field.Define (); + + return field; + } + protected override bool DoDefineMembers () { var action = Module.PredefinedTypes.Action.Resolve (); if (action != null) { - continuation = AddCompilerGeneratedField ("$continuation", new TypeExpression (action, Location)); + continuation = AddCompilerGeneratedField ("$continuation", new TypeExpression (action, Location), true); continuation.ModFlags |= Modifiers.READONLY; } PredefinedType builder_type; PredefinedMember bf; PredefinedMember sr; + PredefinedMember se; bool has_task_return_type = false; var pred_members = Module.PredefinedMembers; @@ -519,32 +652,41 @@ namespace Mono.CSharp builder_type = Module.PredefinedTypes.AsyncVoidMethodBuilder; bf = pred_members.AsyncVoidMethodBuilderCreate; sr = pred_members.AsyncVoidMethodBuilderSetResult; + se = pred_members.AsyncVoidMethodBuilderSetException; } else if (return_type == Module.PredefinedTypes.Task.TypeSpec) { builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilder; bf = pred_members.AsyncTaskMethodBuilderCreate; sr = pred_members.AsyncTaskMethodBuilderSetResult; + se = pred_members.AsyncTaskMethodBuilderSetException; task = pred_members.AsyncTaskMethodBuilderTask.Resolve (Location); } else { builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilderGeneric; bf = pred_members.AsyncTaskMethodBuilderGenericCreate; sr = pred_members.AsyncTaskMethodBuilderGenericSetResult; + se = pred_members.AsyncTaskMethodBuilderGenericSetException; task = pred_members.AsyncTaskMethodBuilderGenericTask.Resolve (Location); has_task_return_type = true; } set_result = sr.Resolve (Location); + set_exception = se.Resolve (Location); var builder_factory = bf.Resolve (Location); var bt = builder_type.Resolve (); - if (bt == null || set_result == null || builder_factory == null) + if (bt == null || set_result == null || builder_factory == null || set_exception == null) return false; // // Inflate generic Task types // if (has_task_return_type) { - bt = bt.MakeGenericType (Module, return_type.TypeArguments); + var task_return_type = return_type.TypeArguments; + if (mutator != null) + task_return_type = mutator.Mutate (task_return_type); + + bt = bt.MakeGenericType (Module, task_return_type); builder_factory = MemberCache.GetMember (bt, builder_factory); set_result = MemberCache.GetMember (bt, set_result); + set_exception = MemberCache.GetMember (bt, set_exception); if (task != null) task = MemberCache.GetMember (bt, task); @@ -589,6 +731,22 @@ namespace Mono.CSharp return true; } + public void EmitSetException (EmitContext ec, LocalVariableReference exceptionVariable) + { + // + // $builder.SetException (Exception) + // + var mg = MethodGroupExpr.CreatePredefined (set_exception, set_exception.DeclaringType, Location); + mg.InstanceExpression = new FieldExpr (Builder, Location) { + InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, Location) + }; + + Arguments args = new Arguments (1); + args.Add (new Argument (exceptionVariable)); + + mg.EmitCall (ec, args); + } + public void EmitSetResult (EmitContext ec) { // diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs index b58a81351f..71c3b06631 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs @@ -82,7 +82,7 @@ namespace Mono.CSharp { public abstract string[] ValidAttributeTargets { get; } }; - public class Attribute : Expression + public class Attribute { public readonly string ExplicitTarget; public AttributeTargets Target; @@ -94,6 +94,8 @@ namespace Mono.CSharp { bool resolve_error; bool arg_resolved; readonly bool nameEscaped; + readonly Location loc; + public TypeSpec Type; // // An attribute can be attached to multiple targets (e.g. multiple fields) @@ -123,6 +125,12 @@ namespace Mono.CSharp { this.nameEscaped = nameEscaped; } + public Location Location { + get { + return loc; + } + } + void AddModuleCharSet (ResolveContext rc) { const string dll_import_char_set = "CharSet"; @@ -326,7 +334,7 @@ namespace Mono.CSharp { return Type; } - public override string GetSignatureForError () + public string GetSignatureForError () { if (Type != null) return TypeManager.CSharpName (Type); @@ -337,7 +345,7 @@ namespace Mono.CSharp { public bool HasSecurityAttribute { get { PredefinedAttribute pa = context.Module.PredefinedAttributes.Security; - return pa.IsDefined && TypeSpec.IsBaseClass (type, pa.TypeSpec, false); + return pa.IsDefined && TypeSpec.IsBaseClass (Type, pa.TypeSpec, false); } } @@ -468,7 +476,7 @@ namespace Mono.CSharp { } } - return ConstructorLookup (ec, Type, ref PosArguments, loc); + return Expression.ConstructorLookup (ec, Type, ref PosArguments, loc); } bool ResolveNamedArguments (ResolveContext ec) @@ -489,10 +497,10 @@ namespace Mono.CSharp { a.Resolve (ec); - Expression member = Expression.MemberLookup (ec, false, Type, name, 0, MemberLookupRestrictions.ExactArity, loc); + Expression member = Expression.MemberLookup (ec, false, Type, name, 0, Expression.MemberLookupRestrictions.ExactArity, loc); if (member == null) { - member = Expression.MemberLookup (ec, true, Type, name, 0, MemberLookupRestrictions.ExactArity, loc); + member = Expression.MemberLookup (ec, true, Type, name, 0, Expression.MemberLookupRestrictions.ExactArity, loc); if (member != null) { // TODO: ec.Report.SymbolRelatedToPreviousError (member); @@ -680,7 +688,7 @@ namespace Mono.CSharp { { if (!arg_resolved) { // corlib only case when obsolete is used before is resolved - var c = type.MemberDefinition as Class; + var c = Type.MemberDefinition as Class; if (c != null && !c.HasMembersDefined) c.Define (); @@ -919,7 +927,7 @@ namespace Mono.CSharp { public override int GetHashCode () { - return type.GetHashCode () ^ Target.GetHashCode (); + return Type.GetHashCode () ^ Target.GetHashCode (); } /// @@ -1087,21 +1095,6 @@ namespace Mono.CSharp { return null; return e.TypeArgument; } - - public override Expression CreateExpressionTree (ResolveContext ec) - { - throw new NotSupportedException ("ET"); - } - - protected override Expression DoResolve (ResolveContext ec) - { - throw new NotImplementedException (); - } - - public override void Emit (EmitContext ec) - { - throw new NotImplementedException (); - } } public class Attributes diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs index 83fbea0b38..de0d0f5bb4 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs @@ -99,7 +99,7 @@ namespace Mono.CSharp return tc.GetSignatureForError (); } - public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) + public ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) { return null; } @@ -756,7 +756,7 @@ namespace Mono.CSharp ExpressionStatement s = fi.ResolveStatement (ec); if (s == null) { s = EmptyExpressionStatement.Instance; - } else if (fi.IsComplexInitializer) { + } else if (!fi.IsSideEffectFree) { has_complex_initializer |= true; } @@ -2455,18 +2455,19 @@ namespace Mono.CSharp } } - public override IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) + public override ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) { DeclSpace top_level = Parent; if (top_level != null) { - var candidates = NamespaceEntry.NS.LookupExtensionMethod (this, extensionType, name, arity); - if (candidates != null) { - scope = NamespaceEntry; - return candidates; + var methods = NamespaceEntry.NS.LookupExtensionMethod (this, extensionType, name, arity); + if (methods != null) { + return new ExtensionMethodCandidates (methods, NamespaceEntry, NamespaceEntry.NS) { + HasUninspectedMembers = true + }; } } - return NamespaceEntry.LookupExtensionMethod (extensionType, name, arity, ref scope); + return NamespaceEntry.LookupExtensionMethod (extensionType, name, arity); } protected override TypeAttributes TypeAttr { @@ -2805,7 +2806,10 @@ namespace Mono.CSharp } } - if ((field.IsStatic && (!ftype.IsGeneric || ftype == CurrentType))) + // + // Static fields of exactly same type are allowed + // + if (field.IsStatic && ftype == s.CurrentType) continue; if (!CheckFieldTypeCycle (ftype)) { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs index abd114d2f9..8764c79fe9 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/codegen.cs @@ -51,16 +51,6 @@ namespace Mono.CSharp /// public LocalBuilder return_value; - /// - /// The location where return has to jump to return the - /// value - /// - public Label ReturnLabel; - - /// - /// If we already defined the ReturnLabel - /// - public bool HasReturnLabel; /// /// Current loop begin and end labels. @@ -87,13 +77,17 @@ namespace Mono.CSharp DynamicSiteClass dynamic_site_container; + Label? return_label; + public EmitContext (IMemberContext rc, ILGenerator ig, TypeSpec return_type) { this.member_context = rc; this.ig = ig; - this.return_type = return_type; + if (rc.Module.Compiler.Settings.Checked) + flags |= Options.CheckedScope; + #if STATIC ig.__CleverExceptionBlockAssistance (); #endif @@ -101,6 +95,12 @@ namespace Mono.CSharp #region Properties + internal AsyncTaskStorey AsyncTaskStorey { + get { + return CurrentAnonymousMethod.Storey as AsyncTaskStorey; + } + } + public BuiltinTypes BuiltinTypes { get { return MemberContext.Module.Compiler.BuiltinTypes; @@ -119,6 +119,12 @@ namespace Mono.CSharp get { return member_context.CurrentMemberDefinition; } } + public bool HasReturnLabel { + get { + return return_label.HasValue; + } + } + public bool IsStatic { get { return member_context.IsStatic; } } @@ -156,8 +162,27 @@ namespace Mono.CSharp return return_type; } } + + // + // The label where we have to jump before leaving the context + // + public Label ReturnLabel { + get { + return return_label.Value; + } + } + #endregion + public void AssertEmptyStack () + { +#if STATIC + if (ig.__StackHeight != 0) + throw new InternalErrorException ("Await yields with non-empty stack in `{0}", + member_context.GetSignatureForError ()); +#endif + } + /// /// This is called immediately before emitting an IL opcode to tell the symbol /// writer to which source line this opcode belongs. @@ -228,6 +253,14 @@ namespace Mono.CSharp return dynamic_site_container; } + public Label CreateReturnLabel () + { + if (!return_label.HasValue) + return_label = DefineLabel (); + + return return_label.Value; + } + public LocalBuilder DeclareLocal (TypeSpec type, bool pinned) { if (IsAnonymousStoreyMutateRequired) @@ -241,6 +274,17 @@ namespace Mono.CSharp return ig.DefineLabel (); } + // + // Creates temporary field in current async storey + // + public FieldExpr GetTemporaryField (TypeSpec type) + { + var f = AsyncTaskStorey.AddCapturedLocalVariable (type); + var fexpr = new FieldExpr (f, Location.Null); + fexpr.InstanceExpression = new CompilerGeneratedThis (CurrentType, Location.Null); + return fexpr; + } + public void MarkLabel (Label label) { ig.MarkLabel (label); @@ -271,16 +315,6 @@ namespace Mono.CSharp ig.Emit (opcode, arg); } - public void Emit (OpCode opcode, int arg) - { - ig.Emit (opcode, arg); - } - - public void Emit (OpCode opcode, byte arg) - { - ig.Emit (opcode, arg); - } - public void Emit (OpCode opcode, Label label) { ig.Emit (opcode, label); @@ -333,7 +367,11 @@ namespace Mono.CSharp public void EmitArrayNew (ArrayContainer ac) { if (ac.Rank == 1) { - Emit (OpCodes.Newarr, ac.Element); + var type = IsAnonymousStoreyMutateRequired ? + CurrentAnonymousMethod.Storey.Mutator.Mutate (ac.Element) : + ac.Element; + + ig.Emit (OpCodes.Newarr, type.GetMetaInfo ()); } else { if (IsAnonymousStoreyMutateRequired) ac = (ArrayContainer) ac.Mutate (CurrentAnonymousMethod.Storey.Mutator); @@ -350,7 +388,11 @@ namespace Mono.CSharp ig.Emit (OpCodes.Call, ac.GetAddressMethod ()); } else { - Emit (OpCodes.Ldelema, ac.Element); + var type = IsAnonymousStoreyMutateRequired ? + CurrentAnonymousMethod.Storey.Mutator.Mutate (ac.Element) : + ac.Element; + + ig.Emit (OpCodes.Ldelema, type.GetMetaInfo ()); } } @@ -367,6 +409,7 @@ namespace Mono.CSharp return; } + var type = ac.Element; if (type.Kind == MemberKind.Enum) type = EnumSpec.GetUnderlyingType (type); @@ -374,52 +417,59 @@ namespace Mono.CSharp switch (type.BuiltinType) { case BuiltinTypeSpec.Type.Byte: case BuiltinTypeSpec.Type.Bool: - Emit (OpCodes.Ldelem_U1); - return; + ig.Emit (OpCodes.Ldelem_U1); + break; case BuiltinTypeSpec.Type.SByte: - Emit (OpCodes.Ldelem_I1); - return; + ig.Emit (OpCodes.Ldelem_I1); + break; case BuiltinTypeSpec.Type.Short: - Emit (OpCodes.Ldelem_I2); - return; + ig.Emit (OpCodes.Ldelem_I2); + break; case BuiltinTypeSpec.Type.UShort: case BuiltinTypeSpec.Type.Char: - Emit (OpCodes.Ldelem_U2); - return; + ig.Emit (OpCodes.Ldelem_U2); + break; case BuiltinTypeSpec.Type.Int: - Emit (OpCodes.Ldelem_I4); - return; + ig.Emit (OpCodes.Ldelem_I4); + break; case BuiltinTypeSpec.Type.UInt: - Emit (OpCodes.Ldelem_U4); - return; + ig.Emit (OpCodes.Ldelem_U4); + break; case BuiltinTypeSpec.Type.ULong: case BuiltinTypeSpec.Type.Long: - Emit (OpCodes.Ldelem_I8); - return; + ig.Emit (OpCodes.Ldelem_I8); + break; case BuiltinTypeSpec.Type.Float: - Emit (OpCodes.Ldelem_R4); - return; - case BuiltinTypeSpec.Type.Double: - Emit (OpCodes.Ldelem_R8); - return; - case BuiltinTypeSpec.Type.IntPtr: - Emit (OpCodes.Ldelem_I); - return; - } - - switch (type.Kind) { - case MemberKind.Struct: - Emit (OpCodes.Ldelema, type); - Emit (OpCodes.Ldobj, type); + ig.Emit (OpCodes.Ldelem_R4); break; - case MemberKind.TypeParameter: - Emit (OpCodes.Ldelem, type); + case BuiltinTypeSpec.Type.Double: + ig.Emit (OpCodes.Ldelem_R8); break; - case MemberKind.PointerType: - Emit (OpCodes.Ldelem_I); + case BuiltinTypeSpec.Type.IntPtr: + ig.Emit (OpCodes.Ldelem_I); break; default: - Emit (OpCodes.Ldelem_Ref); + switch (type.Kind) { + case MemberKind.Struct: + if (IsAnonymousStoreyMutateRequired) + type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type); + + ig.Emit (OpCodes.Ldelema, type.GetMetaInfo ()); + ig.Emit (OpCodes.Ldobj, type.GetMetaInfo ()); + break; + case MemberKind.TypeParameter: + if (IsAnonymousStoreyMutateRequired) + type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type); + + ig.Emit (OpCodes.Ldelem, type.GetMetaInfo ()); + break; + case MemberKind.PointerType: + ig.Emit (OpCodes.Ldelem_I); + break; + default: + ig.Emit (OpCodes.Ldelem_Ref); + break; + } break; } } @@ -486,6 +536,11 @@ namespace Mono.CSharp } public void EmitInt (int i) + { + EmitIntConstant (i); + } + + void EmitIntConstant (int i) { switch (i) { case -1: @@ -540,18 +595,14 @@ namespace Mono.CSharp public void EmitLong (long l) { if (l >= int.MinValue && l <= int.MaxValue) { - EmitInt (unchecked ((int) l)); + EmitIntConstant (unchecked ((int) l)); ig.Emit (OpCodes.Conv_I8); - return; - } - - if (l >= 0 && l <= uint.MaxValue) { - EmitInt (unchecked ((int) l)); + } else if (l >= 0 && l <= uint.MaxValue) { + EmitIntConstant (unchecked ((int) l)); ig.Emit (OpCodes.Conv_U8); - return; + } else { + ig.Emit (OpCodes.Ldc_I8, l); } - - ig.Emit (OpCodes.Ldc_I8, l); } // @@ -565,53 +616,103 @@ namespace Mono.CSharp switch (type.BuiltinType) { case BuiltinTypeSpec.Type.Int: ig.Emit (OpCodes.Ldind_I4); - return; + break; case BuiltinTypeSpec.Type.UInt: ig.Emit (OpCodes.Ldind_U4); - return; + break; case BuiltinTypeSpec.Type.Short: ig.Emit (OpCodes.Ldind_I2); - return; + break; case BuiltinTypeSpec.Type.UShort: case BuiltinTypeSpec.Type.Char: ig.Emit (OpCodes.Ldind_U2); - return; + break; case BuiltinTypeSpec.Type.Byte: ig.Emit (OpCodes.Ldind_U1); - return; + break; case BuiltinTypeSpec.Type.SByte: case BuiltinTypeSpec.Type.Bool: ig.Emit (OpCodes.Ldind_I1); - return; + break; case BuiltinTypeSpec.Type.ULong: case BuiltinTypeSpec.Type.Long: ig.Emit (OpCodes.Ldind_I8); - return; + break; case BuiltinTypeSpec.Type.Float: ig.Emit (OpCodes.Ldind_R4); - return; + break; case BuiltinTypeSpec.Type.Double: ig.Emit (OpCodes.Ldind_R8); - return; + break; case BuiltinTypeSpec.Type.IntPtr: ig.Emit (OpCodes.Ldind_I); - return; - } - - switch (type.Kind) { - case MemberKind.Struct: - case MemberKind.TypeParameter: - Emit (OpCodes.Ldobj, type); break; - case MemberKind.PointerType: - ig.Emit (OpCodes.Ldind_I); + default: + switch (type.Kind) { + case MemberKind.Struct: + case MemberKind.TypeParameter: + if (IsAnonymousStoreyMutateRequired) + type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type); + + ig.Emit (OpCodes.Ldobj, type.GetMetaInfo ()); + break; + case MemberKind.PointerType: + ig.Emit (OpCodes.Ldind_I); + break; + default: + ig.Emit (OpCodes.Ldind_Ref); + break; + } break; + } + } + + public void EmitNull () + { + ig.Emit (OpCodes.Ldnull); + } + + public void EmitArgumentAddress (int pos) + { + if (!IsStatic) + ++pos; + + if (pos > byte.MaxValue) + ig.Emit (OpCodes.Ldarga, pos); + else + ig.Emit (OpCodes.Ldarga_S, (byte) pos); + } + + public void EmitArgumentLoad (int pos) + { + if (!IsStatic) + ++pos; + + switch (pos) { + case 0: ig.Emit (OpCodes.Ldarg_0); break; + case 1: ig.Emit (OpCodes.Ldarg_1); break; + case 2: ig.Emit (OpCodes.Ldarg_2); break; + case 3: ig.Emit (OpCodes.Ldarg_3); break; default: - ig.Emit (OpCodes.Ldind_Ref); + if (pos > byte.MaxValue) + ig.Emit (OpCodes.Ldarg, pos); + else + ig.Emit (OpCodes.Ldarg_S, (byte) pos); break; } } + public void EmitArgumentStore (int pos) + { + if (!IsStatic) + ++pos; + + if (pos > byte.MaxValue) + ig.Emit (OpCodes.Starg, pos); + else + ig.Emit (OpCodes.Starg_S, (byte) pos); + } + // // The stack contains the pointer and the value of type `type' // @@ -650,10 +751,23 @@ namespace Mono.CSharp return; } - if (type.IsStruct || TypeManager.IsGenericParameter (type)) - Emit (OpCodes.Stobj, type); - else + switch (type.Kind) { + case MemberKind.Struct: + case MemberKind.TypeParameter: + if (IsAnonymousStoreyMutateRequired) + type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type); + + ig.Emit (OpCodes.Stobj, type.GetMetaInfo ()); + break; + default: ig.Emit (OpCodes.Stind_Ref); + break; + } + } + + public void EmitThis () + { + ig.Emit (OpCodes.Ldarg_0); } /// @@ -716,13 +830,203 @@ namespace Mono.CSharp { if (return_value == null){ return_value = DeclareLocal (return_type, false); - if (!HasReturnLabel){ - ReturnLabel = DefineLabel (); - HasReturnLabel = true; - } } return return_value; } } + + struct CallEmitter + { + public Expression InstanceExpression; + + // + // When set leaves an extra copy of all arguments on the stack + // + public bool DuplicateArguments; + + // + // Does not emit InstanceExpression load when InstanceExpressionOnStack + // is set. Used by compound assignments. + // + public bool InstanceExpressionOnStack; + + // + // Any of arguments contains await expression + // + public bool HasAwaitArguments; + + // + // When dealing with await arguments the original arguments are converted + // into a new set with hoisted stack results + // + public Arguments EmittedArguments; + + public void Emit (EmitContext ec, MethodSpec method, Arguments Arguments, Location loc) + { + // Speed up the check by not doing it on not allowed targets + if (method.ReturnType.Kind == MemberKind.Void && method.IsConditionallyExcluded (ec.Module.Compiler, loc)) + return; + + EmitPredefined (ec, method, Arguments); + } + + public void EmitPredefined (EmitContext ec, MethodSpec method, Arguments Arguments) + { + Expression instance_copy = null; + + if (!HasAwaitArguments && ec.HasSet (BuilderContext.Options.AsyncBody)) { + HasAwaitArguments = Arguments != null && Arguments.ContainsEmitWithAwait (); + if (HasAwaitArguments && InstanceExpressionOnStack) { + throw new NotSupportedException (); + } + } + + OpCode call_op; + LocalTemporary lt = null; + + if (method.IsStatic) { + call_op = OpCodes.Call; + } else { + if (IsVirtualCallRequired (InstanceExpression, method)) { + call_op = OpCodes.Callvirt; + } else { + call_op = OpCodes.Call; + } + + if (HasAwaitArguments) { + instance_copy = InstanceExpression.EmitToField (ec); + if (Arguments == null) + EmitCallInstance (ec, instance_copy, method.DeclaringType, call_op); + } else if (!InstanceExpressionOnStack) { + var instance_on_stack_type = EmitCallInstance (ec, InstanceExpression, method.DeclaringType, call_op); + + if (DuplicateArguments) { + ec.Emit (OpCodes.Dup); + if (Arguments != null && Arguments.Count != 0) { + lt = new LocalTemporary (instance_on_stack_type); + lt.Store (ec); + instance_copy = lt; + } + } + } + } + + if (Arguments != null && !InstanceExpressionOnStack) { + EmittedArguments = Arguments.Emit (ec, DuplicateArguments, HasAwaitArguments); + if (EmittedArguments != null) { + if (instance_copy != null) { + EmitCallInstance (ec, instance_copy, method.DeclaringType, call_op); + + if (lt != null) + lt.Release (ec); + } + + EmittedArguments.Emit (ec); + } + } + + if (call_op == OpCodes.Callvirt && (InstanceExpression.Type.IsGenericParameter || InstanceExpression.Type.IsStruct)) { + ec.Emit (OpCodes.Constrained, InstanceExpression.Type); + } + + // + // Set instance expression to actual result expression. When it contains await it can be + // picked up by caller + // + InstanceExpression = instance_copy; + + if (method.Parameters.HasArglist) { + var varargs_types = GetVarargsTypes (method, Arguments); + ec.Emit (call_op, method, varargs_types); + return; + } + + // + // If you have: + // this.DoFoo (); + // and DoFoo is not virtual, you can omit the callvirt, + // because you don't need the null checking behavior. + // + ec.Emit (call_op, method); + } + + static TypeSpec EmitCallInstance (EmitContext ec, Expression instance, TypeSpec declaringType, OpCode callOpcode) + { + var instance_type = instance.Type; + + // + // Push the instance expression + // + if ((instance_type.IsStruct && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType == instance_type))) || + instance_type.IsGenericParameter || declaringType.IsNullableType) { + // + // If the expression implements IMemoryLocation, then + // we can optimize and use AddressOf on the + // return. + // + // If not we have to use some temporary storage for + // it. + var iml = instance as IMemoryLocation; + if (iml != null) { + iml.AddressOf (ec, AddressOp.Load); + } else { + LocalTemporary temp = new LocalTemporary (instance_type); + instance.Emit (ec); + temp.Store (ec); + temp.AddressOf (ec, AddressOp.Load); + temp.Release (ec); + } + + return ReferenceContainer.MakeType (ec.Module, instance_type); + } + + if (instance_type.IsEnum || instance_type.IsStruct) { + instance.Emit (ec); + ec.Emit (OpCodes.Box, instance_type); + return ec.BuiltinTypes.Object; + } + + instance.Emit (ec); + return instance_type; + } + + static MetaType[] GetVarargsTypes (MethodSpec method, Arguments arguments) + { + AParametersCollection pd = method.Parameters; + + Argument a = arguments[pd.Count - 1]; + Arglist list = (Arglist) a.Expr; + + return list.ArgumentTypes; + } + + // + // Used to decide whether call or callvirt is needed + // + static bool IsVirtualCallRequired (Expression instance, MethodSpec method) + { + // + // There are 2 scenarious where we emit callvirt + // + // Case 1: A method is virtual and it's not used to call base + // Case 2: A method instance expression can be null. In this casen callvirt ensures + // correct NRE exception when the method is called + // + var decl_type = method.DeclaringType; + if (decl_type.IsStruct || decl_type.IsEnum) + return false; + + if (instance is BaseThis) + return false; + + // + // It's non-virtual and will never be null + // + if (!method.IsVirtual && (instance is This || instance is New || instance is ArrayCreation || instance is DelegateCreation)) + return false; + + return true; + } + } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs index 965416e79b..a8641784e1 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/complete.cs @@ -43,19 +43,24 @@ namespace Mono.CSharp { } } - public override void EmitStatement (EmitContext ec) + public override bool ContainsEmitWithAwait () { - // Do nothing + return false; } - public override void Emit (EmitContext ec) + public override Expression CreateExpressionTree (ResolveContext ec) + { + return null; + } + + public override void EmitStatement (EmitContext ec) { // Do nothing } - public override Expression CreateExpressionTree (ResolveContext ec) + public override void Emit (EmitContext ec) { - return null; + // Do nothing } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs index 2848e46a7e..b00fee56cd 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/constant.cs @@ -78,6 +78,11 @@ namespace Mono.CSharp { return c; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public virtual Constant ConvertImplicitly (TypeSpec type) { if (this.type == type) @@ -309,7 +314,13 @@ namespace Mono.CSharp { public virtual bool IsOneInteger { get { return false; } - } + } + + public override bool IsSideEffectFree { + get { + return true; + } + } // // Returns true iff 1) the stack type of this is one of Object, @@ -427,9 +438,9 @@ namespace Mono.CSharp { public override void Emit (EmitContext ec) { if (Value) - ec.Emit (OpCodes.Ldc_I4_1); + ec.EmitInt (1); else - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); } public override bool IsDefaultValue { @@ -1945,7 +1956,7 @@ namespace Mono.CSharp { public override void Emit (EmitContext ec) { if (Value == null) { - ec.Emit (OpCodes.Ldnull); + ec.EmitNull (); return; } @@ -2050,7 +2061,7 @@ namespace Mono.CSharp { public override void Emit (EmitContext ec) { - ec.Emit (OpCodes.Ldnull); + ec.EmitNull (); // Only to make verifier happy if (type.IsGenericParameter) @@ -2152,7 +2163,7 @@ namespace Mono.CSharp { // // Emits null pointer // - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Conv_U); } } @@ -2162,7 +2173,8 @@ namespace Mono.CSharp { /// used by BitwiseAnd to ensure that the second expression is invoked /// regardless of the value of the left side. /// - public class SideEffectConstant : Constant { + public class SideEffectConstant : Constant + { public readonly Constant value; Expression side_effect; @@ -2178,6 +2190,12 @@ namespace Mono.CSharp { this.side_effect = side_effect; } + public override bool IsSideEffectFree { + get { + return false; + } + } + public override object GetValue () { return value.GetValue (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs index 316968454e..06c64500de 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/context.cs @@ -7,18 +7,13 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc. // Copyright 2004-2009 Novell, Inc. +// Copyright 2011 Xamarin Inc. // using System; using System.Collections.Generic; using System.IO; -#if STATIC -using IKVM.Reflection.Emit; -#else -using System.Reflection.Emit; -#endif - namespace Mono.CSharp { public enum LookupMode @@ -58,7 +53,7 @@ namespace Mono.CSharp string GetSignatureForError (); - IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope); + ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity); FullNamedExpression LookupNamespaceOrType (string name, int arity, LookupMode mode, Location loc); FullNamedExpression LookupNamespaceAlias (string name); } @@ -75,18 +70,7 @@ namespace Mono.CSharp { FlowBranching current_flow_branching; - TypeSpec return_type; - - /// - /// The location where return has to jump to return the - /// value - /// - public Label ReturnLabel; // TODO: It's emit dependant - - /// - /// If we already defined the ReturnLabel - /// - public bool HasReturnLabel; + readonly TypeSpec return_type; public int FlowOffset; @@ -116,6 +100,10 @@ namespace Mono.CSharp get { return current_flow_branching; } } + public TypeSpec ReturnType { + get { return return_type; } + } + // // Starts a new code branching. This inherits the state of all local // variables and parameters from the current branching. @@ -145,9 +133,9 @@ namespace Mono.CSharp return branching; } - public FlowBranchingException StartFlowBranching (ExceptionStatement stmt) + public FlowBranchingTryFinally StartFlowBranching (TryFinallyBlock stmt) { - FlowBranchingException branching = new FlowBranchingException (CurrentBranching, stmt); + FlowBranchingTryFinally branching = new FlowBranchingTryFinally (CurrentBranching, stmt); current_flow_branching = branching; return branching; } @@ -159,13 +147,20 @@ namespace Mono.CSharp return branching; } - public FlowBranchingIterator StartFlowBranching (StateMachineInitializer iterator, FlowBranching parent) + public FlowBranchingIterator StartFlowBranching (Iterator iterator, FlowBranching parent) { FlowBranchingIterator branching = new FlowBranchingIterator (parent, iterator); current_flow_branching = branching; return branching; } + public FlowBranchingAsync StartFlowBranching (AsyncInitializer asyncBody, FlowBranching parent) + { + var branching = new FlowBranchingAsync (parent, asyncBody); + current_flow_branching = branching; + return branching; + } + public FlowBranchingToplevel StartFlowBranching (ParametersBlock stmt, FlowBranching parent) { FlowBranchingToplevel branching = new FlowBranchingToplevel (parent, stmt); @@ -196,19 +191,11 @@ namespace Mono.CSharp current_flow_branching = current_flow_branching.Parent; } - // - // This method is used during the Resolution phase to flag the - // need to define the ReturnLabel - // +#if !STATIC public void NeedReturnLabel () { - if (!HasReturnLabel) - HasReturnLabel = true; - } - - public TypeSpec ReturnType { - get { return return_type; } } +#endif } // @@ -484,7 +471,7 @@ namespace Mono.CSharp // FIXME: IsIterator is too aggressive, we should capture only if child // block contains yield - if (CurrentAnonymousMethod.IsIterator) + if (CurrentAnonymousMethod.IsIterator || CurrentAnonymousMethod is AsyncInitializer) return true; return local.Block.ParametersBlock != CurrentBlock.ParametersBlock.Original; @@ -519,9 +506,9 @@ namespace Mono.CSharp return MemberContext.GetSignatureForError (); } - public IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) + public ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) { - return MemberContext.LookupExtensionMethod (extensionType, name, arity, ref scope); + return MemberContext.LookupExtensionMethod (extensionType, name, arity); } public FullNamedExpression LookupNamespaceOrType (string name, int arity, LookupMode mode, Location loc) @@ -685,18 +672,11 @@ namespace Mono.CSharp /// CheckedScope = 1 << 0, - /// - /// The constant check state is always set to `true' and cant be changed - /// from the command line. The source code can change this setting with - /// the `checked' and `unchecked' statements and expressions. - /// - ConstantCheckState = 1 << 1, - - AllCheckStateFlags = CheckedScope | ConstantCheckState, - OmitDebugInfo = 1 << 2, - ConstructorScope = 1 << 3 + ConstructorScope = 1 << 3, + + AsyncBody = 1 << 4 } // utility helper for CheckExpr, UnCheckExpr, Checked and Unchecked statements @@ -725,7 +705,7 @@ namespace Mono.CSharp } } - Options flags; + protected Options flags; public bool HasSet (Options options) { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs index 020c842755..73361860f4 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/convert.cs @@ -8,6 +8,7 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc. // Copyright 2003-2008 Novell, Inc. +// Copyright 2011 Xamarin, Inc (http://www.xamarin.com) // using System; @@ -198,7 +199,7 @@ namespace Mono.CSharp { return ImplicitReferenceConversionExists (expr_type, target_type, true); } - static bool ImplicitReferenceConversionExists (TypeSpec expr_type, TypeSpec target_type, bool refOnlyTypeParameter) + public static bool ImplicitReferenceConversionExists (TypeSpec expr_type, TypeSpec target_type, bool refOnlyTypeParameter) { // It's here only to speed things up if (target_type.IsStruct) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index adca942291..2d2bb1ddab 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -4,14 +4,15 @@ // // cs-parser.jay: The Parser for the C# compiler // -// Authors: Miguel de Icaza (miguel@gnu.org) +// Authors: Miguel de Icaza (miguel@gnome.org) // Ravi Pratap (ravi@ximian.com) -// Marek Safar (marek.safar@gmail.com) +// Marek Safar (marek.safar@gmail.com) // // Dual Licensed under the terms of the GNU GPL and the MIT X11 license // // (C) 2001 Ximian, Inc (http://www.ximian.com) -// (C) 2004 Novell, Inc +// (C) 2004-2011 Novell, Inc +// Copyright 2011 Xamarin Inc. // // TODO: // (1) Figure out why error productions dont work. `type-declaration' is a @@ -305,24 +306,9 @@ namespace Mono.CSharp //t "$$9 :", //t "$$10 :", //t "$$11 :", -//t "struct_declaration : opt_attributes opt_modifiers opt_partial STRUCT $$8 type_declaration_name $$9 opt_class_base opt_type_parameter_constraints_clauses $$10 struct_body $$11 opt_semicolon", -//t "struct_declaration : opt_attributes opt_modifiers opt_partial STRUCT error", //t "$$12 :", -//t "struct_body : OPEN_BRACE $$12 opt_struct_member_declarations CLOSE_BRACE", -//t "opt_struct_member_declarations :", -//t "opt_struct_member_declarations : struct_member_declarations", -//t "struct_member_declarations : struct_member_declaration", -//t "struct_member_declarations : struct_member_declarations struct_member_declaration", -//t "struct_member_declaration : constant_declaration", -//t "struct_member_declaration : field_declaration", -//t "struct_member_declaration : method_declaration", -//t "struct_member_declaration : property_declaration", -//t "struct_member_declaration : event_declaration", -//t "struct_member_declaration : indexer_declaration", -//t "struct_member_declaration : operator_declaration", -//t "struct_member_declaration : constructor_declaration", -//t "struct_member_declaration : type_declaration", -//t "struct_member_declaration : destructor_declaration", +//t "struct_declaration : opt_attributes opt_modifiers opt_partial STRUCT $$8 type_declaration_name $$9 opt_class_base opt_type_parameter_constraints_clauses $$10 OPEN_BRACE $$11 opt_class_member_declarations CLOSE_BRACE $$12 opt_semicolon", +//t "struct_declaration : opt_attributes opt_modifiers opt_partial STRUCT error", //t "$$13 :", //t "constant_declaration : opt_attributes opt_modifiers CONST type IDENTIFIER $$13 constant_initializer opt_constant_declarators SEMICOLON", //t "opt_constant_declarators :", @@ -965,6 +951,8 @@ namespace Mono.CSharp //t "opt_local_variable_initializer : error", //t "opt_variable_declarators :", //t "opt_variable_declarators : variable_declarators", +//t "opt_using_or_fixed_variable_declarators :", +//t "opt_using_or_fixed_variable_declarators : variable_declarators", //t "variable_declarators : variable_declarator", //t "variable_declarators : variable_declarators variable_declarator", //t "variable_declarator : COMMA IDENTIFIER", @@ -1064,10 +1052,10 @@ namespace Mono.CSharp //t "lock_statement : LOCK open_parens_any expression CLOSE_PARENS embedded_statement", //t "$$92 :", //t "$$93 :", -//t "fixed_statement : FIXED open_parens_any variable_type IDENTIFIER $$92 using_or_fixed_variable_initializer opt_variable_declarators CLOSE_PARENS $$93 embedded_statement", +//t "fixed_statement : FIXED open_parens_any variable_type IDENTIFIER $$92 using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS $$93 embedded_statement", //t "$$94 :", //t "$$95 :", -//t "using_statement : USING open_parens_any variable_type IDENTIFIER $$94 using_or_fixed_variable_initializer opt_variable_declarators CLOSE_PARENS $$95 embedded_statement", +//t "using_statement : USING open_parens_any variable_type IDENTIFIER $$94 using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS $$95 embedded_statement", //t "using_statement : USING open_parens_any expression CLOSE_PARENS embedded_statement", //t "using_or_fixed_variable_initializer :", //t "using_or_fixed_variable_initializer : ASSIGN variable_initializer", @@ -1401,20 +1389,20 @@ namespace Mono.CSharp yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: -#line 398 "cs-parser.jay" +#line 399 "cs-parser.jay" { Lexer.check_incorrect_doc_comment (); } break; case 2: -#line 399 "cs-parser.jay" +#line 400 "cs-parser.jay" { Lexer.CompleteOnEOF = false; } break; case 6: case_6(); break; case 7: -#line 416 "cs-parser.jay" +#line 417 "cs-parser.jay" { module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace); } @@ -1426,7 +1414,7 @@ case 13: case_13(); break; case 14: -#line 454 "cs-parser.jay" +#line 455 "cs-parser.jay" { syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected"); /* TODO: better*/ } @@ -1471,7 +1459,7 @@ case 41: case_41(); break; case 42: -#line 642 "cs-parser.jay" +#line 643 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1501,18 +1489,18 @@ case 57: case_57(); break; case 58: -#line 738 "cs-parser.jay" +#line 739 "cs-parser.jay" { yyVal = "event"; } break; case 59: -#line 739 "cs-parser.jay" +#line 740 "cs-parser.jay" { yyVal = "return"; } break; case 60: case_60(); break; case 61: -#line 756 "cs-parser.jay" +#line 757 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1521,7 +1509,7 @@ case 62: case_62(); break; case 63: -#line 771 "cs-parser.jay" +#line 772 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1530,14 +1518,14 @@ case 64: case_64(); break; case 66: -#line 795 "cs-parser.jay" +#line 796 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 806 "cs-parser.jay" +#line 807 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1553,13 +1541,13 @@ case 72: case_72(); break; case 73: -#line 850 "cs-parser.jay" +#line 851 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 858 "cs-parser.jay" +#line 859 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1571,26 +1559,38 @@ case 77: case_77(); break; case 78: -#line 883 "cs-parser.jay" +#line 884 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 887 "cs-parser.jay" +#line 888 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 891 "cs-parser.jay" +#line 892 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; +case 83: +#line 904 "cs-parser.jay" + { + lexer.parsing_modifiers = true; + } + break; +case 84: +#line 908 "cs-parser.jay" + { + lexer.parsing_modifiers = true; + } + break; case 95: case_95(); break; case 96: -#line 932 "cs-parser.jay" +#line 938 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1608,69 +1608,114 @@ case 100: case_100(); break; case 101: -#line 965 "cs-parser.jay" + case_101(); + break; +case 102: +#line 978 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; -case 102: - case_102(); - break; case 103: -#line 977 "cs-parser.jay" + case_103(); + break; +case 104: + case_104(); + break; +case 107: +#line 1019 "cs-parser.jay" { - lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; -case 118: - case_118(); +case 108: +#line 1023 "cs-parser.jay" + { + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; -case 119: - case_119(); +case 109: + case_109(); break; -case 122: -#line 1046 "cs-parser.jay" +case 110: +#line 1039 "cs-parser.jay" { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + ++lexer.parsing_block; } break; -case 123: -#line 1050 "cs-parser.jay" +case 111: + case_111(); + break; +case 112: + case_112(); + break; +case 115: + case_115(); + break; +case 116: + case_116(); + break; +case 117: + case_117(); + break; +case 118: + case_118(); + break; +case 119: +#line 1118 "cs-parser.jay" { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name"); } break; -case 124: - case_124(); +case 121: + case_121(); + break; +case 122: + case_122(); break; case 125: -#line 1066 "cs-parser.jay" +#line 1148 "cs-parser.jay" { - ++lexer.parsing_block; + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: - case_126(); +#line 1152 "cs-parser.jay" + { + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; case 127: case_127(); break; -case 130: - case_130(); +case 128: +#line 1165 "cs-parser.jay" + { + ++lexer.parsing_block; + } break; -case 131: - case_131(); +case 129: + case_129(); break; case 132: - case_132(); +#line 1184 "cs-parser.jay" + { + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; case 133: - case_133(); +#line 1188 "cs-parser.jay" + { + current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; case 134: -#line 1145 "cs-parser.jay" + case_134(); + break; +case 135: +#line 1204 "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"); + ++lexer.parsing_block; } break; case 136: @@ -1680,55 +1725,57 @@ case 137: case_137(); break; case 140: -#line 1175 "cs-parser.jay" - { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); - } + case_140(); break; case 141: -#line 1179 "cs-parser.jay" - { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); - } + case_141(); break; case 142: case_142(); break; case 143: -#line 1192 "cs-parser.jay" +#line 1275 "cs-parser.jay" { - ++lexer.parsing_block; + valid_param_mod = ParameterModifierType.All; } break; case 144: - case_144(); +#line 1279 "cs-parser.jay" + { + lexer.ConstraintsParsing = true; + } break; -case 147: -#line 1211 "cs-parser.jay" +case 145: + case_145(); + break; +case 146: +#line 1319 "cs-parser.jay" { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + lexer.parsing_generic_declaration = true; } break; +case 147: + case_147(); + break; case 148: -#line 1215 "cs-parser.jay" +#line 1329 "cs-parser.jay" { - current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + lexer.ConstraintsParsing = true; } break; case 149: case_149(); break; case 150: -#line 1231 "cs-parser.jay" - { - ++lexer.parsing_block; - } - break; -case 151: - case_151(); + case_150(); break; case 152: - case_152(); +#line 1403 "cs-parser.jay" + { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } + break; +case 153: +#line 1407 "cs-parser.jay" + { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: case_155(); @@ -1740,33 +1787,27 @@ case 157: case_157(); break; case 158: -#line 1299 "cs-parser.jay" - { - valid_param_mod = ParameterModifierType.All; - } + case_158(); break; case 159: -#line 1303 "cs-parser.jay" - { - lexer.ConstraintsParsing = true; - } + case_159(); break; case 160: case_160(); break; case 161: -#line 1343 "cs-parser.jay" - { - lexer.parsing_generic_declaration = true; - } + case_161(); break; case 162: - case_162(); +#line 1479 "cs-parser.jay" + { + yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); + } break; case 163: -#line 1353 "cs-parser.jay" +#line 1483 "cs-parser.jay" { - lexer.ConstraintsParsing = true; + yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } break; case 164: @@ -1775,28 +1816,36 @@ case 164: case 165: case_165(); break; +case 166: + case_166(); + break; case 167: -#line 1427 "cs-parser.jay" - { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } + case_167(); break; case 168: -#line 1431 "cs-parser.jay" - { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } + case_168(); + break; +case 169: + case_169(); break; case 170: - case_170(); +#line 1558 "cs-parser.jay" + { + ++lexer.parsing_block; + } break; case 171: case_171(); break; case 172: - case_172(); - break; -case 173: - case_173(); +#line 1599 "cs-parser.jay" + { yyVal = Parameter.Modifier.NONE; } break; case 174: - case_174(); +#line 1607 "cs-parser.jay" + { + yyVal = yyVals[0+yyTop]; + } break; case 175: case_175(); @@ -1805,16 +1854,10 @@ case 176: case_176(); break; case 177: -#line 1503 "cs-parser.jay" - { - yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); - } + case_177(); break; case 178: -#line 1507 "cs-parser.jay" - { - yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); - } + case_178(); break; case 179: case_179(); @@ -1832,59 +1875,49 @@ case 183: case_183(); break; case 184: - case_184(); - break; -case 185: -#line 1582 "cs-parser.jay" +#line 1696 "cs-parser.jay" { - ++lexer.parsing_block; + Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } break; +case 185: + case_185(); + break; case 186: case_186(); break; case 187: -#line 1623 "cs-parser.jay" - { yyVal = Parameter.Modifier.NONE; } + case_187(); + break; +case 188: + case_188(); break; case 189: -#line 1631 "cs-parser.jay" - { - yyVal = yyVals[0+yyTop]; - } + case_189(); break; case 190: - case_190(); +#line 1750 "cs-parser.jay" + { + valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; + } break; case 191: case_191(); break; case 192: - case_192(); +#line 1779 "cs-parser.jay" + { + lexer.PropertyParsing = false; + } break; case 193: case_193(); break; -case 194: - case_194(); - break; -case 195: - case_195(); - break; -case 196: - case_196(); - break; -case 197: - case_197(); - break; case 198: case_198(); break; case 199: -#line 1720 "cs-parser.jay" - { - Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); - } + case_199(); break; case 200: case_200(); @@ -1895,232 +1928,248 @@ case 201: case 202: case_202(); break; -case 203: - case_203(); - break; case 204: case_204(); break; case 205: -#line 1774 "cs-parser.jay" - { - valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; - } + case_205(); break; case 206: - case_206(); - break; -case 207: -#line 1803 "cs-parser.jay" +#line 1928 "cs-parser.jay" { - lexer.PropertyParsing = false; + lexer.ConstraintsParsing = true; } break; +case 207: + case_207(); + break; case 208: case_208(); break; -case 213: - case_213(); - break; -case 214: - case_214(); - break; -case 215: - case_215(); - break; -case 216: - case_216(); - break; -case 217: - case_217(); - break; -case 219: - case_219(); +case 209: + case_209(); break; -case 220: - case_220(); +case 210: + case_210(); break; -case 221: -#line 1952 "cs-parser.jay" +case 211: +#line 1965 "cs-parser.jay" { - lexer.ConstraintsParsing = true; + Error_SyntaxError (yyToken); } break; -case 222: - case_222(); - break; -case 223: - case_223(); - break; -case 224: - case_224(); - break; -case 225: - case_225(); +case 214: +#line 1977 "cs-parser.jay" + { + lexer.parsing_modifiers = true; + } break; -case 226: -#line 1987 "cs-parser.jay" +case 215: +#line 1981 "cs-parser.jay" { - Error_SyntaxError (yyToken); + lexer.parsing_modifiers = true; } break; -case 231: -#line 2004 "cs-parser.jay" +case 216: +#line 1988 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; -case 232: -#line 2008 "cs-parser.jay" +case 217: +#line 1992 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; -case 237: -#line 2016 "cs-parser.jay" +case 222: +#line 2000 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; -case 238: -#line 2020 "cs-parser.jay" +case 223: +#line 2004 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; -case 239: -#line 2024 "cs-parser.jay" +case 224: +#line 2008 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; -case 240: -#line 2030 "cs-parser.jay" +case 225: +#line 2014 "cs-parser.jay" { } break; -case 241: - case_241(); +case 226: + case_226(); break; -case 243: -#line 2063 "cs-parser.jay" +case 228: +#line 2047 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; -case 245: - case_245(); +case 230: + case_230(); break; -case 246: -#line 2079 "cs-parser.jay" +case 231: +#line 2063 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } break; -case 247: - case_247(); +case 232: + case_232(); break; -case 249: -#line 2125 "cs-parser.jay" +case 234: +#line 2109 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 250: -#line 2126 "cs-parser.jay" +case 235: +#line 2110 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 251: -#line 2127 "cs-parser.jay" +case 236: +#line 2111 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 252: -#line 2128 "cs-parser.jay" +case 237: +#line 2112 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 253: -#line 2129 "cs-parser.jay" +case 238: +#line 2113 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 254: -#line 2130 "cs-parser.jay" +case 239: +#line 2114 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 255: -#line 2132 "cs-parser.jay" +case 240: +#line 2116 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 256: -#line 2133 "cs-parser.jay" +case 241: +#line 2117 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 257: -#line 2135 "cs-parser.jay" +case 242: +#line 2119 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 258: -#line 2136 "cs-parser.jay" +case 243: +#line 2120 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 259: -#line 2137 "cs-parser.jay" +case 244: +#line 2121 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 260: -#line 2138 "cs-parser.jay" +case 245: +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 261: -#line 2139 "cs-parser.jay" +case 246: +#line 2123 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 262: -#line 2140 "cs-parser.jay" +case 247: +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 263: -#line 2141 "cs-parser.jay" +case 248: +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 264: -#line 2142 "cs-parser.jay" +case 249: +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 265: -#line 2143 "cs-parser.jay" +case 250: +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 266: -#line 2144 "cs-parser.jay" +case 251: +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 267: -#line 2145 "cs-parser.jay" +case 252: +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 268: -#line 2146 "cs-parser.jay" +case 253: +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 269: -#line 2147 "cs-parser.jay" +case 254: +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 270: -#line 2148 "cs-parser.jay" +case 255: +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; -case 271: -#line 2155 "cs-parser.jay" +case 256: +#line 2139 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } break; -case 272: - case_272(); +case 257: + case_257(); break; -case 273: -#line 2174 "cs-parser.jay" +case 258: +#line 2158 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } break; +case 259: + case_259(); + break; +case 260: + case_260(); + break; +case 261: + case_261(); + break; +case 262: + case_262(); + break; +case 263: + case_263(); + break; +case 264: + case_264(); + break; +case 265: + case_265(); + break; +case 267: +#line 2261 "cs-parser.jay" + { current_block = null; yyVal = null; } + break; +case 270: +#line 2273 "cs-parser.jay" + { + ++lexer.parsing_block; + } + break; +case 271: + case_271(); + break; +case 272: +#line 2283 "cs-parser.jay" + { + ++lexer.parsing_block; + } + break; +case 273: + case_273(); + break; case 274: case_274(); break; @@ -2142,33 +2191,38 @@ case 279: case 280: case_280(); break; -case 282: -#line 2277 "cs-parser.jay" - { current_block = null; yyVal = null; } +case 281: + case_281(); break; -case 285: -#line 2289 "cs-parser.jay" +case 283: +#line 2392 "cs-parser.jay" { - ++lexer.parsing_block; + ++lexer.parsing_block; } break; -case 286: - case_286(); +case 284: + case_284(); break; case 287: -#line 2299 "cs-parser.jay" +#line 2409 "cs-parser.jay" { - ++lexer.parsing_block; + current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: - case_288(); +#line 2413 "cs-parser.jay" + { + current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); + } break; case 289: case_289(); break; case 290: - case_290(); +#line 2426 "cs-parser.jay" + { + ++lexer.parsing_block; + } break; case 291: case_291(); @@ -2177,46 +2231,37 @@ case 292: case_292(); break; case 293: - case_293(); - break; -case 294: - case_294(); - break; -case 295: - case_295(); +#line 2451 "cs-parser.jay" + { + yyVal = yyVals[0+yyTop]; + } break; case 296: case_296(); break; +case 297: + case_297(); + break; case 298: -#line 2408 "cs-parser.jay" - { - ++lexer.parsing_block; - } + case_298(); break; case 299: case_299(); break; +case 300: + case_300(); + break; +case 301: + case_301(); + break; case 302: -#line 2425 "cs-parser.jay" - { - current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); - } + case_302(); break; case 303: -#line 2429 "cs-parser.jay" - { - current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); - } - break; -case 304: - case_304(); + case_303(); break; case 305: -#line 2442 "cs-parser.jay" - { - ++lexer.parsing_block; - } + case_305(); break; case 306: case_306(); @@ -2225,25 +2270,19 @@ case 307: case_307(); break; case 308: -#line 2467 "cs-parser.jay" - { - yyVal = yyVals[0+yyTop]; - } + case_308(); + break; +case 310: + case_310(); break; case 311: case_311(); break; -case 312: - case_312(); - break; -case 313: - case_313(); - break; case 314: - case_314(); - break; -case 315: - case_315(); +#line 2610 "cs-parser.jay" + { + enumCommas.Add (GetLocation (yyVals[0+yyTop])); + } break; case 316: case_316(); @@ -2254,14 +2293,23 @@ case 317: case 318: case_318(); break; +case 319: + case_319(); + break; case 320: - case_320(); +#line 2668 "cs-parser.jay" + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; + } break; case 321: case_321(); break; case 322: - case_322(); +#line 2690 "cs-parser.jay" + { + lexer.ConstraintsParsing = false; + } break; case 323: case_323(); @@ -2269,17 +2317,14 @@ case 323: case 325: case_325(); break; -case 326: - case_326(); +case 327: + case_327(); break; case 329: -#line 2626 "cs-parser.jay" - { - enumCommas.Add (GetLocation (yyVals[0+yyTop])); - } + case_329(); break; -case 331: - case_331(); +case 330: + case_330(); break; case 332: case_332(); @@ -2291,29 +2336,32 @@ case 334: case_334(); break; case 335: -#line 2684 "cs-parser.jay" - { - valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; - } + case_335(); break; case 336: - case_336(); - break; -case 337: -#line 2706 "cs-parser.jay" +#line 2794 "cs-parser.jay" { - lexer.ConstraintsParsing = false; + lexer.parsing_generic_declaration = true; } break; +case 337: + case_337(); + break; case 338: case_338(); break; case 340: case_340(); break; +case 341: + case_341(); + break; case 342: case_342(); break; +case 343: + case_343(); + break; case 344: case_344(); break; @@ -2333,199 +2381,210 @@ case 350: case_350(); break; case 351: -#line 2810 "cs-parser.jay" - { - lexer.parsing_generic_declaration = true; - } - break; -case 352: - case_352(); + case_351(); break; case 353: - case_353(); +#line 2915 "cs-parser.jay" + { + yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); + } break; -case 355: - case_355(); +case 354: +#line 2922 "cs-parser.jay" + { + lexer.parsing_generic_declaration = true; + } break; case 356: case_356(); break; -case 357: - case_357(); - break; case 358: case_358(); break; -case 359: - case_359(); - break; case 360: case_360(); break; case 362: - case_362(); - break; -case 363: - case_363(); - break; -case 364: - case_364(); - break; -case 365: - case_365(); - break; -case 366: - case_366(); - break; -case 368: -#line 2931 "cs-parser.jay" - { - yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); - } - break; -case 369: -#line 2938 "cs-parser.jay" - { - lexer.parsing_generic_declaration = true; - } - break; -case 371: - case_371(); - break; -case 373: - case_373(); - break; -case 375: - case_375(); - break; -case 377: -#line 2976 "cs-parser.jay" +#line 2960 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 378: - case_378(); +case 363: + case_363(); break; -case 379: -#line 2996 "cs-parser.jay" +case 364: +#line 2980 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 380: - case_380(); +case 365: + case_365(); break; -case 381: -#line 3005 "cs-parser.jay" +case 366: +#line 2989 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 382: -#line 3009 "cs-parser.jay" +case 367: +#line 2993 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 383: - case_383(); +case 368: + case_368(); break; -case 384: - case_384(); +case 369: + case_369(); break; -case 385: - case_385(); +case 370: + case_370(); break; -case 386: - case_386(); +case 371: + case_371(); break; -case 387: -#line 3048 "cs-parser.jay" +case 372: +#line 3032 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; -case 388: -#line 3049 "cs-parser.jay" +case 373: +#line 3033 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; -case 389: -#line 3050 "cs-parser.jay" +case 374: +#line 3034 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; -case 390: -#line 3051 "cs-parser.jay" +case 375: +#line 3035 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; -case 391: -#line 3052 "cs-parser.jay" +case 376: +#line 3036 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; -case 392: -#line 3053 "cs-parser.jay" +case 377: +#line 3037 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; -case 394: -#line 3058 "cs-parser.jay" +case 379: +#line 3042 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; -case 395: -#line 3059 "cs-parser.jay" +case 380: +#line 3043 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; -case 396: -#line 3060 "cs-parser.jay" +case 381: +#line 3044 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; -case 397: -#line 3061 "cs-parser.jay" +case 382: +#line 3045 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; -case 398: -#line 3062 "cs-parser.jay" +case 383: +#line 3046 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; -case 399: -#line 3063 "cs-parser.jay" +case 384: +#line 3047 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; -case 400: -#line 3064 "cs-parser.jay" +case 385: +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; -case 401: -#line 3065 "cs-parser.jay" +case 386: +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; -case 402: -#line 3066 "cs-parser.jay" +case 387: +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; +case 408: + case_408(); + break; +case 409: + case_409(); + break; +case 413: +#line 3097 "cs-parser.jay" + { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } + break; +case 414: +#line 3101 "cs-parser.jay" + { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } + break; +case 415: +#line 3102 "cs-parser.jay" + { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } + break; +case 420: + case_420(); + break; +case 421: +#line 3135 "cs-parser.jay" + { + yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); + } + break; +case 422: + case_422(); + break; case 423: case_423(); break; case 424: case_424(); break; +case 425: + case_425(); + break; +case 426: +#line 3167 "cs-parser.jay" + { + yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); + } + break; +case 427: + case_427(); + break; case 428: -#line 3113 "cs-parser.jay" - { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } +#line 3175 "cs-parser.jay" + { + yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); + } break; case 429: -#line 3117 "cs-parser.jay" - { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } + case_429(); break; case 430: -#line 3118 "cs-parser.jay" - { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } + case_430(); + break; +case 431: +#line 3191 "cs-parser.jay" + { yyVal = null; } + break; +case 433: + case_433(); + break; +case 434: + case_434(); break; case 435: - case_435(); +#line 3214 "cs-parser.jay" + { yyVal = null; } break; case 436: -#line 3151 "cs-parser.jay" +#line 3218 "cs-parser.jay" { - yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); - } + yyVal = yyVals[0+yyTop]; + } break; case 437: case_437(); @@ -2540,45 +2599,32 @@ case 440: case_440(); break; case 441: -#line 3183 "cs-parser.jay" +#line 3251 "cs-parser.jay" { - yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); + yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } break; case 442: case_442(); break; case 443: -#line 3191 "cs-parser.jay" - { - yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); - } + case_443(); break; case 444: case_444(); break; -case 445: - case_445(); - break; -case 446: -#line 3207 "cs-parser.jay" +case 447: +#line 3279 "cs-parser.jay" { yyVal = null; } break; -case 448: - case_448(); - break; case 449: case_449(); break; case 450: -#line 3230 "cs-parser.jay" - { yyVal = null; } + case_450(); break; case 451: -#line 3234 "cs-parser.jay" - { - yyVal = yyVals[0+yyTop]; - } + case_451(); break; case 452: case_452(); @@ -2587,29 +2633,25 @@ case 453: case_453(); break; case 454: - case_454(); - break; -case 455: - case_455(); - break; -case 456: -#line 3267 "cs-parser.jay" +#line 3331 "cs-parser.jay" { - yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); + yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; -case 457: - case_457(); - break; case 458: case_458(); break; case 459: case_459(); break; -case 462: -#line 3295 "cs-parser.jay" - { yyVal = null; } +case 460: + case_460(); + break; +case 461: + case_461(); + break; +case 463: + case_463(); break; case 464: case_464(); @@ -2627,23 +2669,41 @@ case 468: case_468(); break; case 469: -#line 3347 "cs-parser.jay" +#line 3418 "cs-parser.jay" { - yyVal = new Argument ((Expression) yyVals[0+yyTop]); + yyVal = new Argument ((Expression) yyVals[0+yyTop]); + } + break; +case 471: +#line 3426 "cs-parser.jay" + { + yyVal = new This (GetLocation (yyVals[0+yyTop])); } break; +case 472: + case_472(); + break; case 473: case_473(); break; case 474: - case_474(); +#line 3446 "cs-parser.jay" + { + yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); + } break; case 475: - case_475(); +#line 3453 "cs-parser.jay" + { + yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); + } break; case 476: case_476(); break; +case 477: + case_477(); + break; case 478: case_478(); break; @@ -2660,37 +2720,23 @@ case 482: case_482(); break; case 483: - case_483(); - break; -case 484: -#line 3434 "cs-parser.jay" +#line 3519 "cs-parser.jay" { - yyVal = new Argument ((Expression) yyVals[0+yyTop]); + ++lexer.parsing_type; } break; -case 486: -#line 3442 "cs-parser.jay" - { - yyVal = new This (GetLocation (yyVals[0+yyTop])); - } +case 484: + case_484(); break; -case 487: - case_487(); +case 485: + case_485(); break; case 488: - case_488(); - break; -case 489: -#line 3462 "cs-parser.jay" - { - yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); - } +#line 3546 "cs-parser.jay" + { yyVal = null; } break; case 490: -#line 3469 "cs-parser.jay" - { - yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); - } + case_490(); break; case 491: case_491(); @@ -2707,30 +2753,38 @@ case 494: case 495: case_495(); break; -case 496: - case_496(); - break; -case 497: - case_497(); - break; -case 498: -#line 3535 "cs-parser.jay" - { - ++lexer.parsing_type; - } - break; case 499: case_499(); break; case 500: case_500(); break; +case 501: + case_501(); + break; +case 502: +#line 3624 "cs-parser.jay" + { + yyVal = 2; + } + break; case 503: -#line 3562 "cs-parser.jay" - { yyVal = null; } +#line 3628 "cs-parser.jay" + { + yyVal = ((int) yyVals[-1+yyTop]) + 1; + } + break; +case 504: +#line 3635 "cs-parser.jay" + { + yyVal = null; + } break; case 505: - case_505(); +#line 3639 "cs-parser.jay" + { + yyVal = yyVals[0+yyTop]; + } break; case 506: case_506(); @@ -2745,7 +2799,13 @@ case 509: case_509(); break; case 510: - case_510(); +#line 3683 "cs-parser.jay" + { + lexer.TypeOfParsing = true; + } + break; +case 511: + case_511(); break; case 514: case_514(); @@ -2757,28 +2817,16 @@ case 516: case_516(); break; case 517: -#line 3640 "cs-parser.jay" - { - yyVal = 2; - } + case_517(); break; case 518: -#line 3644 "cs-parser.jay" - { - yyVal = ((int) yyVals[-1+yyTop]) + 1; - } + case_518(); break; case 519: -#line 3651 "cs-parser.jay" - { - yyVal = null; - } + case_519(); break; case 520: -#line 3655 "cs-parser.jay" - { - yyVal = yyVals[0+yyTop]; - } + case_520(); break; case 521: case_521(); @@ -2793,191 +2841,173 @@ case 524: case_524(); break; case 525: -#line 3699 "cs-parser.jay" - { - lexer.TypeOfParsing = true; - } + case_525(); break; case 526: - case_526(); - break; -case 529: - case_529(); - break; -case 530: - case_530(); - break; -case 531: - case_531(); - break; -case 532: - case_532(); - break; -case 533: - case_533(); - break; -case 534: - case_534(); - break; -case 535: - case_535(); - break; -case 536: - case_536(); - break; -case 537: - case_537(); - break; -case 538: - case_538(); - break; -case 539: - case_539(); - break; -case 540: - case_540(); - break; -case 541: -#line 3813 "cs-parser.jay" +#line 3797 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } break; -case 542: - case_542(); +case 527: + case_527(); break; -case 543: -#line 3826 "cs-parser.jay" +case 528: +#line 3810 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; -case 544: -#line 3830 "cs-parser.jay" +case 529: +#line 3814 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; -case 545: -#line 3837 "cs-parser.jay" +case 530: +#line 3821 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; -case 547: -#line 3845 "cs-parser.jay" +case 532: +#line 3829 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 548: - case_548(); +case 533: + case_533(); break; -case 549: - case_549(); +case 534: + case_534(); break; -case 551: -#line 3871 "cs-parser.jay" +case 536: +#line 3855 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 552: -#line 3875 "cs-parser.jay" +case 537: +#line 3859 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 555: - case_555(); +case 540: + case_540(); break; -case 556: - case_556(); +case 541: + case_541(); break; -case 558: -#line 3905 "cs-parser.jay" +case 543: +#line 3889 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 559: -#line 3909 "cs-parser.jay" +case 544: +#line 3893 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 560: -#line 3913 "cs-parser.jay" +case 545: +#line 3897 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 561: -#line 3917 "cs-parser.jay" +case 546: +#line 3901 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 562: -#line 3921 "cs-parser.jay" +case 547: +#line 3905 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 563: -#line 3925 "cs-parser.jay" +case 548: +#line 3909 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 565: - case_565(); +case 550: + case_550(); break; -case 566: - case_566(); +case 551: + case_551(); break; -case 567: - case_567(); +case 552: + case_552(); break; -case 569: - case_569(); +case 554: + case_554(); break; -case 570: -#line 3957 "cs-parser.jay" +case 555: +#line 3941 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 571: - case_571(); +case 556: + case_556(); break; -case 572: -#line 3966 "cs-parser.jay" +case 557: +#line 3950 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 573: -#line 3970 "cs-parser.jay" +case 558: +#line 3954 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; +case 560: + case_560(); + break; +case 561: + case_561(); + break; +case 563: + case_563(); + break; +case 564: + case_564(); + break; +case 565: + case_565(); + break; +case 566: + case_566(); + break; +case 568: + case_568(); + break; +case 569: + case_569(); + break; +case 571: + case_571(); + break; +case 573: + case_573(); + break; case 575: case_575(); break; -case 576: - case_576(); - break; -case 578: - case_578(); +case 577: + case_577(); break; case 579: case_579(); break; -case 580: - case_580(); - break; case 581: case_581(); break; @@ -2985,56 +3015,72 @@ case 583: case_583(); break; case 584: - case_584(); +#line 4078 "cs-parser.jay" + { + yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); + } + break; +case 585: + case_585(); break; case 586: case_586(); break; +case 587: + case_587(); + break; case 588: case_588(); break; +case 589: + case_589(); + break; case 590: case_590(); break; +case 591: + case_591(); + break; case 592: case_592(); break; +case 593: + case_593(); + break; case 594: case_594(); break; +case 595: + case_595(); + break; case 596: case_596(); break; +case 597: + case_597(); + break; case 598: case_598(); break; case 599: -#line 4094 "cs-parser.jay" - { - yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); - } + case_599(); break; case 600: - case_600(); +#line 4175 "cs-parser.jay" + { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 601: case_601(); break; -case 602: - case_602(); - break; -case 603: - case_603(); - break; case 604: - case_604(); +#line 4190 "cs-parser.jay" + { + start_block (lexer.Location); + } break; case 605: case_605(); break; -case 606: - case_606(); - break; case 607: case_607(); break; @@ -3051,7 +3097,10 @@ case 611: case_611(); break; case 612: - case_612(); +#line 4235 "cs-parser.jay" + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + } break; case 613: case_613(); @@ -3060,26 +3109,22 @@ case 614: case_614(); break; case 615: -#line 4191 "cs-parser.jay" - { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } - break; -case 616: - case_616(); - break; -case 619: -#line 4206 "cs-parser.jay" +#line 4249 "cs-parser.jay" { - start_block (lexer.Location); + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 620: - case_620(); +case 616: + case_616(); break; -case 622: - case_622(); +case 617: + case_617(); break; case 623: - case_623(); +#line 4274 "cs-parser.jay" + { + yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); + } break; case 624: case_624(); @@ -3090,34 +3135,45 @@ case 625: case 626: case_626(); break; -case 627: -#line 4251 "cs-parser.jay" +case 628: +#line 4303 "cs-parser.jay" { - valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; -case 628: - case_628(); - break; case 629: - case_629(); - break; -case 630: -#line 4265 "cs-parser.jay" +#line 4316 "cs-parser.jay" { - valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + lexer.ConstraintsParsing = true; } break; +case 630: + case_630(); + break; case 631: case_631(); break; case 632: case_632(); break; -case 638: -#line 4290 "cs-parser.jay" +case 633: + case_633(); + break; +case 634: +#line 4359 "cs-parser.jay" + { yyVal = null; } + break; +case 635: +#line 4361 "cs-parser.jay" + { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } + break; +case 636: + case_636(); + break; +case 637: +#line 4374 "cs-parser.jay" { - yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); + lexer.parsing_modifiers = false; } break; case 639: @@ -3129,17 +3185,14 @@ case 640: case 641: case_641(); break; +case 642: + case_642(); + break; case 643: -#line 4319 "cs-parser.jay" - { - yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); - } + case_643(); break; case 644: -#line 4332 "cs-parser.jay" - { - lexer.ConstraintsParsing = true; - } + case_644(); break; case 645: case_645(); @@ -3154,30 +3207,31 @@ case 648: case_648(); break; case 649: -#line 4373 "cs-parser.jay" - { yyVal = null; } + case_649(); break; case 650: -#line 4375 "cs-parser.jay" - { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } + case_650(); break; case 651: case_651(); break; +case 652: + case_652(); + break; +case 653: + case_653(); + break; case 654: case_654(); break; -case 655: - case_655(); - break; case 656: case_656(); break; -case 657: - case_657(); - break; case 658: - case_658(); +#line 4494 "cs-parser.jay" + { + yyVal = yyVals[0+yyTop]; + } break; case 659: case_659(); @@ -3204,26 +3258,41 @@ case 666: case_666(); break; case 667: - case_667(); +#line 4584 "cs-parser.jay" + { + yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); + } break; case 668: - case_668(); +#line 4588 "cs-parser.jay" + { + yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); + } break; case 669: - case_669(); +#line 4595 "cs-parser.jay" + { + yyVal = Variance.None; + } + break; +case 670: + case_670(); break; case 671: case_671(); break; +case 672: + case_672(); + break; case 673: -#line 4504 "cs-parser.jay" + case_673(); + break; +case 674: +#line 4640 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 674: - case_674(); - break; case 675: case_675(); break; @@ -3236,95 +3305,83 @@ case 677: case 678: case_678(); break; -case 679: - case_679(); - break; -case 680: - case_680(); - break; -case 681: - case_681(); - break; -case 682: -#line 4594 "cs-parser.jay" - { - yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); - } - break; case 683: -#line 4598 "cs-parser.jay" +#line 4684 "cs-parser.jay" { - yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); + current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 684: -#line 4605 "cs-parser.jay" +#line 4688 "cs-parser.jay" { - yyVal = Variance.None; + current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 685: - case_685(); - break; case 686: case_686(); break; -case 687: - case_687(); - break; -case 688: - case_688(); - break; case 689: -#line 4650 "cs-parser.jay" +#line 4712 "cs-parser.jay" { - yyVal = yyVals[0+yyTop]; + current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 690: - case_690(); +#line 4716 "cs-parser.jay" + { + current_block.AddStatement ((Statement) yyVals[0+yyTop]); + } break; -case 691: - case_691(); +case 719: + case_719(); break; -case 692: - case_692(); +case 720: + case_720(); break; -case 693: - case_693(); +case 721: + case_721(); break; -case 698: -#line 4694 "cs-parser.jay" - { - current_block.AddStatement ((Statement) yyVals[0+yyTop]); - } +case 722: + case_722(); break; -case 699: -#line 4698 "cs-parser.jay" - { - current_block.AddStatement ((Statement) yyVals[0+yyTop]); - } +case 723: + case_723(); break; -case 701: - case_701(); +case 726: + case_726(); break; -case 704: -#line 4722 "cs-parser.jay" +case 727: + case_727(); + break; +case 728: + case_728(); + break; +case 729: + case_729(); + break; +case 730: +#line 4860 "cs-parser.jay" { - current_block.AddStatement ((Statement) yyVals[0+yyTop]); + yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 705: -#line 4726 "cs-parser.jay" +case 731: +#line 4864 "cs-parser.jay" { - current_block.AddStatement ((Statement) yyVals[0+yyTop]); + yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; +case 732: + case_732(); + break; case 734: case_734(); break; case 735: - case_735(); +#line 4885 "cs-parser.jay" + { + yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); + } break; case 736: case_736(); @@ -3335,80 +3392,77 @@ case 737: case 738: case_738(); break; +case 739: + case_739(); + break; case 741: case_741(); break; case 742: case_742(); break; -case 743: - case_743(); - break; -case 744: - case_744(); - break; -case 745: -#line 4870 "cs-parser.jay" - { - yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); - } - break; case 746: -#line 4874 "cs-parser.jay" - { - yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); - } - break; -case 747: - case_747(); + case_746(); break; case 749: case_749(); break; case 750: -#line 4895 "cs-parser.jay" - { - yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); - } + case_750(); break; case 751: - case_751(); +#line 4985 "cs-parser.jay" + { + report.Error (145, lexer.Location, "A const field requires a value to be provided"); + } break; case 752: case_752(); break; -case 753: - case_753(); +case 757: + case_757(); break; -case 754: - case_754(); +case 759: + case_759(); break; -case 756: - case_756(); +case 760: + case_760(); break; -case 757: - case_757(); +case 761: + case_761(); break; case 762: - case_762(); +#line 5035 "cs-parser.jay" + { yyVal = yyVals[-1+yyTop]; } break; case 763: - case_763(); +#line 5039 "cs-parser.jay" + { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 4984 "cs-parser.jay" - { - report.Error (145, lexer.Location, "A const field requires a value to be provided"); - } +#line 5040 "cs-parser.jay" + { yyVal = yyVals[-1+yyTop]; } break; case 765: case_765(); break; +case 766: + case_766(); + break; +case 767: + case_767(); + break; case 770: case_770(); break; +case 771: + case_771(); + break; case 772: - case_772(); +#line 5108 "cs-parser.jay" + { + start_block (GetLocation (yyVals[0+yyTop])); + } break; case 773: case_773(); @@ -3416,45 +3470,42 @@ case 773: case 774: case_774(); break; -case 775: -#line 5034 "cs-parser.jay" - { yyVal = yyVals[-1+yyTop]; } - break; case 776: -#line 5038 "cs-parser.jay" - { yyVal = yyVals[-1+yyTop]; } + case_776(); break; case 777: -#line 5039 "cs-parser.jay" - { yyVal = yyVals[-1+yyTop]; } + case_777(); break; case 778: case_778(); break; case 779: - case_779(); +#line 5152 "cs-parser.jay" + { + current_block = current_block.CreateSwitchBlock (lexer.Location); + } break; case 780: - case_780(); +#line 5156 "cs-parser.jay" + { + yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); + } + break; +case 781: + case_781(); + break; +case 782: + case_782(); break; case 783: case_783(); break; case 784: - case_784(); - break; -case 785: -#line 5107 "cs-parser.jay" +#line 5185 "cs-parser.jay" { - start_block (GetLocation (yyVals[0+yyTop])); + yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } break; -case 786: - case_786(); - break; -case 787: - case_787(); - break; case 789: case_789(); break; @@ -3465,46 +3516,34 @@ case 791: case_791(); break; case 792: -#line 5151 "cs-parser.jay" +#line 5224 "cs-parser.jay" { - current_block = current_block.CreateSwitchBlock (lexer.Location); + yyVal = yyVals[0+yyTop]; } break; case 793: -#line 5155 "cs-parser.jay" - { - yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); - } + case_793(); break; case 794: case_794(); break; case 795: - case_795(); - break; -case 796: - case_796(); +#line 5252 "cs-parser.jay" + { yyVal = new EmptyStatement (lexer.Location); } break; case 797: -#line 5184 "cs-parser.jay" - { - yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); - } - break; -case 802: - case_802(); + case_797(); break; -case 803: - case_803(); +case 798: + case_798(); break; -case 804: - case_804(); +case 800: +#line 5273 "cs-parser.jay" + { yyVal = null; } break; -case 805: -#line 5223 "cs-parser.jay" - { - yyVal = yyVals[0+yyTop]; - } +case 802: +#line 5278 "cs-parser.jay" + { yyVal = new EmptyStatement (lexer.Location); } break; case 806: case_806(); @@ -3513,22 +3552,19 @@ case 807: case_807(); break; case 808: -#line 5251 "cs-parser.jay" - { yyVal = new EmptyStatement (lexer.Location); } + case_808(); break; -case 810: - case_810(); +case 809: + case_809(); break; -case 811: - case_811(); +case 816: + case_816(); break; -case 813: -#line 5272 "cs-parser.jay" - { yyVal = null; } +case 817: + case_817(); break; -case 815: -#line 5277 "cs-parser.jay" - { yyVal = new EmptyStatement (lexer.Location); } +case 818: + case_818(); break; case 819: case_819(); @@ -3542,6 +3578,21 @@ case 821: case 822: case_822(); break; +case 823: + case_823(); + break; +case 824: + case_824(); + break; +case 827: +#line 5433 "cs-parser.jay" + { + yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); + } + break; +case 828: + case_828(); + break; case 829: case_829(); break; @@ -3554,32 +3605,44 @@ case 831: case 832: case_832(); break; -case 833: - case_833(); - break; -case 834: - case_834(); - break; case 835: - case_835(); +#line 5486 "cs-parser.jay" + { + yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); + } break; case 836: case_836(); break; case 837: - case_837(); +#line 5505 "cs-parser.jay" + { + yyVal = yyVals[-1+yyTop]; + } + break; +case 838: + case_838(); + break; +case 839: +#line 5523 "cs-parser.jay" + { + yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); + } break; case 840: -#line 5432 "cs-parser.jay" +#line 5530 "cs-parser.jay" { - yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); + yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 841: case_841(); break; case 842: - case_842(); +#line 5540 "cs-parser.jay" + { + yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); + } break; case 843: case_843(); @@ -3590,44 +3653,38 @@ case 844: case 845: case_845(); break; +case 846: + case_846(); + break; +case 847: + case_847(); + break; case 848: -#line 5485 "cs-parser.jay" - { - yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); - } + case_848(); break; case 849: case_849(); break; case 850: -#line 5504 "cs-parser.jay" - { - yyVal = yyVals[-1+yyTop]; - } + case_850(); break; case 851: - case_851(); - break; -case 852: -#line 5522 "cs-parser.jay" +#line 5623 "cs-parser.jay" { - yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); + Error_MissingInitializer (lexer.Location); } break; +case 852: + case_852(); + break; case 853: -#line 5529 "cs-parser.jay" - { - yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); - } + case_853(); break; case 854: case_854(); break; case 855: -#line 5539 "cs-parser.jay" - { - yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); - } + case_855(); break; case 856: case_856(); @@ -3645,31 +3702,34 @@ case 860: case_860(); break; case 861: - case_861(); +#line 5723 "cs-parser.jay" + { + current_block = new Linq.QueryBlock (current_block, lexer.Location); + } break; case 862: case_862(); break; case 863: - case_863(); - break; -case 864: -#line 5622 "cs-parser.jay" +#line 5738 "cs-parser.jay" { - report.Error (210, lexer.Location, "You must provide an initializer in a fixed or using statement declaration"); + current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; +case 864: + case_864(); + break; case 865: case_865(); break; -case 866: - case_866(); - break; case 867: case_867(); break; case 868: - case_868(); +#line 5783 "cs-parser.jay" + { + current_block = new Linq.QueryBlock (current_block, lexer.Location); + } break; case 869: case_869(); @@ -3683,71 +3743,65 @@ case 871: case 872: case_872(); break; -case 873: - case_873(); - break; -case 874: -#line 5722 "cs-parser.jay" - { - current_block = new Linq.QueryBlock (current_block, lexer.Location); - } - break; -case 875: - case_875(); - break; case 876: -#line 5737 "cs-parser.jay" - { - current_block = new Linq.QueryBlock (current_block, lexer.Location); - } - break; -case 877: - case_877(); - break; -case 878: - case_878(); + case_876(); break; -case 880: - case_880(); - break; -case 881: -#line 5782 "cs-parser.jay" +case 882: +#line 5842 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 882: - case_882(); - break; case 883: case_883(); break; case 884: - case_884(); +#line 5861 "cs-parser.jay" + { + current_block = new Linq.QueryBlock (current_block, lexer.Location); + } break; case 885: case_885(); break; +case 886: + case_886(); + break; +case 887: + case_887(); + break; +case 888: + case_888(); + break; case 889: case_889(); break; +case 890: + case_890(); + break; +case 891: + case_891(); + break; +case 892: + case_892(); + break; +case 893: + case_893(); + break; case 895: -#line 5841 "cs-parser.jay" +#line 6005 "cs-parser.jay" { - current_block = new Linq.QueryBlock (current_block, lexer.Location); + yyVal = yyVals[0+yyTop]; } break; case 896: - case_896(); - break; -case 897: -#line 5860 "cs-parser.jay" +#line 6012 "cs-parser.jay" { - current_block = new Linq.QueryBlock (current_block, lexer.Location); + current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 898: - case_898(); +case 897: + case_897(); break; case 899: case_899(); @@ -3755,9 +3809,6 @@ case 899: case 900: case_900(); break; -case 901: - case_901(); - break; case 902: case_902(); break; @@ -3765,7 +3816,10 @@ case 903: case_903(); break; case 904: - case_904(); +#line 6058 "cs-parser.jay" + { + yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); + } break; case 905: case_905(); @@ -3773,143 +3827,104 @@ case 905: case 906: case_906(); break; -case 908: -#line 6004 "cs-parser.jay" +case 907: +#line 6075 "cs-parser.jay" { - yyVal = yyVals[0+yyTop]; + yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } break; +case 908: + case_908(); + break; case 909: -#line 6011 "cs-parser.jay" - { - current_block = new Linq.QueryBlock (current_block, lexer.Location); - } + case_909(); break; -case 910: - case_910(); +case 911: + case_911(); break; case 912: case_912(); break; -case 913: - case_913(); - break; case 915: case_915(); break; case 916: case_916(); break; -case 917: -#line 6057 "cs-parser.jay" - { - yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); - } - break; -case 918: - case_918(); - break; -case 919: - case_919(); - break; -case 920: -#line 6074 "cs-parser.jay" - { - yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); - } - break; -case 921: - case_921(); - break; -case 922: - case_922(); - break; case 924: - case_924(); - break; -case 925: - case_925(); - break; -case 928: - case_928(); - break; -case 929: - case_929(); - break; -case 937: -#line 6198 "cs-parser.jay" +#line 6199 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; -case 938: -#line 6205 "cs-parser.jay" +case 925: +#line 6206 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } break; -case 939: - case_939(); +case 926: + case_926(); break; -case 940: - case_940(); +case 927: + case_927(); break; -case 941: -#line 6222 "cs-parser.jay" +case 928: +#line 6223 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; -case 942: -#line 6226 "cs-parser.jay" +case 929: +#line 6227 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 943: - case_943(); +case 930: + case_930(); break; -case 944: - case_944(); +case 931: + case_931(); break; -case 945: - case_945(); +case 932: + case_932(); break; -case 946: - case_946(); +case 933: + case_933(); break; -case 948: -#line 6262 "cs-parser.jay" +case 935: +#line 6263 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; -case 950: -#line 6270 "cs-parser.jay" +case 937: +#line 6271 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 951: -#line 6274 "cs-parser.jay" +case 938: +#line 6275 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; -case 952: -#line 6281 "cs-parser.jay" +case 939: +#line 6282 "cs-parser.jay" { yyVal = new List (0); } break; -case 954: - case_954(); +case 941: + case_941(); break; -case 955: - case_955(); +case 942: + case_942(); break; -case 956: - case_956(); +case 943: + case_943(); break; #line default } @@ -3947,7 +3962,7 @@ case 956: All more than 3 lines long rules are wrapped into a method */ void case_6() -#line 406 "cs-parser.jay" +#line 407 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { Attributes attrs = (Attributes) yyVals[0+yyTop]; @@ -3957,7 +3972,7 @@ void case_6() } void case_8() -#line 418 "cs-parser.jay" +#line 419 "cs-parser.jay" { if (yyToken == Token.EXTERN_ALIAS) report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); @@ -3966,7 +3981,7 @@ void case_8() } void case_13() -#line 438 "cs-parser.jay" +#line 439 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -3982,21 +3997,21 @@ void case_13() } void case_17() -#line 464 "cs-parser.jay" +#line 465 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_18() -#line 469 "cs-parser.jay" +#line 470 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_19() -#line 477 "cs-parser.jay" +#line 478 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") { @@ -4009,21 +4024,21 @@ void case_19() } void case_20() -#line 488 "cs-parser.jay" +#line 489 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_21() -#line 496 "cs-parser.jay" +#line 497 "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_22() -#line 509 "cs-parser.jay" +#line 510 "cs-parser.jay" { Attributes attrs = (Attributes) yyVals[-2+yyTop]; MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4056,7 +4071,7 @@ void case_22() } void case_23() -#line 540 "cs-parser.jay" +#line 541 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -4064,7 +4079,7 @@ void case_23() } void case_24() -#line 546 "cs-parser.jay" +#line 547 "cs-parser.jay" { current_namespace = current_namespace.Parent; current_class = current_namespace.SlaveDeclSpace; @@ -4077,14 +4092,14 @@ void case_24() } void case_25() -#line 560 "cs-parser.jay" +#line 561 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName (lt.Value, lt.Location); } void case_26() -#line 565 "cs-parser.jay" +#line 566 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); @@ -4092,14 +4107,14 @@ void case_26() } void case_27() -#line 571 "cs-parser.jay" +#line 572 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 589 "cs-parser.jay" +#line 590 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4110,7 +4125,7 @@ void case_32() } void case_41() -#line 621 "cs-parser.jay" +#line 622 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4131,7 +4146,7 @@ void case_41() } void case_50() -#line 671 "cs-parser.jay" +#line 672 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4143,7 +4158,7 @@ void case_50() } void case_51() -#line 681 "cs-parser.jay" +#line 682 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4155,21 +4170,21 @@ void case_51() } void case_52() -#line 694 "cs-parser.jay" +#line 695 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 699 "cs-parser.jay" +#line 700 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 707 "cs-parser.jay" +#line 708 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4178,7 +4193,7 @@ void case_54() } void case_55() -#line 714 "cs-parser.jay" +#line 715 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4192,21 +4207,21 @@ void case_55() } void case_56() -#line 726 "cs-parser.jay" +#line 727 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_57() -#line 734 "cs-parser.jay" +#line 735 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } void case_60() -#line 741 "cs-parser.jay" +#line 742 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4218,7 +4233,7 @@ void case_60() } void case_62() -#line 758 "cs-parser.jay" +#line 759 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4228,7 +4243,7 @@ void case_62() } void case_64() -#line 773 "cs-parser.jay" +#line 774 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4246,7 +4261,7 @@ void case_64() } void case_67() -#line 797 "cs-parser.jay" +#line 798 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4254,7 +4269,7 @@ void case_67() } void case_69() -#line 808 "cs-parser.jay" +#line 809 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4262,7 +4277,7 @@ void case_69() } void case_70() -#line 814 "cs-parser.jay" +#line 815 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4270,7 +4285,7 @@ void case_70() } void case_71() -#line 820 "cs-parser.jay" +#line 821 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4287,7 +4302,7 @@ void case_71() } void case_72() -#line 835 "cs-parser.jay" +#line 836 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4299,7 +4314,7 @@ void case_72() } void case_76() -#line 860 "cs-parser.jay" +#line 861 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4308,7 +4323,7 @@ void case_76() } void case_77() -#line 870 "cs-parser.jay" +#line 871 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4321,7 +4336,7 @@ void case_77() } void case_95() -#line 917 "cs-parser.jay" +#line 923 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4330,7 +4345,7 @@ void case_95() } void case_97() -#line 934 "cs-parser.jay" +#line 940 "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]); @@ -4338,7 +4353,7 @@ void case_97() } void case_98() -#line 941 "cs-parser.jay" +#line 947 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4347,33 +4362,35 @@ void case_98() if (doc_support) current_container.DocComment = Lexer.consume_doc_comment (); + + lexer.parsing_modifiers = true; } void case_99() -#line 951 "cs-parser.jay" +#line 959 "cs-parser.jay" { - --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_100() -#line 957 "cs-parser.jay" +#line 964 "cs-parser.jay" { - if (yyVals[0+yyTop] != null) - current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); - yyVal = pop_current_class (); + --lexer.parsing_declaration; + if (doc_support) + Lexer.doc_state = XmlCommentState.Allowed; } -void case_102() +void case_101() #line 970 "cs-parser.jay" { - if (doc_support) - Lexer.doc_state = XmlCommentState.Allowed; + if (yyVals[-3+yyTop] != null) + current_class.OptionalSemicolon = GetLocation (yyVals[-3+yyTop]); + yyVal = pop_current_class (); } -void case_118() -#line 1012 "cs-parser.jay" +void case_103() +#line 985 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4387,8 +4404,8 @@ void case_118() yyVal = current_field; } -void case_119() -#line 1025 "cs-parser.jay" +void case_104() +#line 998 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4400,31 +4417,31 @@ void case_119() current_field = null; } -void case_124() -#line 1055 "cs-parser.jay" +void case_109() +#line 1028 "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_126() -#line 1068 "cs-parser.jay" +void case_111() +#line 1041 "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_127() -#line 1074 "cs-parser.jay" +void case_112() +#line 1047 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } -void case_130() -#line 1089 "cs-parser.jay" +void case_115() +#line 1062 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4438,8 +4455,8 @@ void case_130() yyVal = current_field; } -void case_131() -#line 1104 "cs-parser.jay" +void case_116() +#line 1077 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4451,8 +4468,8 @@ void case_131() current_field = null; } -void case_132() -#line 1117 "cs-parser.jay" +void case_117() +#line 1090 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4464,8 +4481,8 @@ void case_132() current_container.AddField (current_field); } -void case_133() -#line 1128 "cs-parser.jay" +void case_118() +#line 1101 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4478,16 +4495,16 @@ void case_133() current_field = null; } -void case_136() -#line 1151 "cs-parser.jay" +void case_121() +#line 1124 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; start_block (GetLocation (yyVals[0+yyTop])); } -void case_137() -#line 1157 "cs-parser.jay" +void case_122() +#line 1130 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4496,16 +4513,16 @@ void case_137() current_local_parameters = null; } -void case_142() -#line 1184 "cs-parser.jay" +void case_127() +#line 1157 "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_144() -#line 1194 "cs-parser.jay" +void case_129() +#line 1167 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4513,52 +4530,55 @@ void case_144() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_149() -#line 1220 "cs-parser.jay" +void case_134() +#line 1193 "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_151() -#line 1233 "cs-parser.jay" +void case_136() +#line 1206 "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_152() -#line 1239 "cs-parser.jay" +void case_137() +#line 1212 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } -void case_155() -#line 1249 "cs-parser.jay" +void case_140() +#line 1222 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); yyVal = null; } -void case_156() -#line 1258 "cs-parser.jay" +void case_141() +#line 1231 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; - /* Add it early in the case of body being eof for full aot*/ - current_container.AddMethod ((Method) yyVals[0+yyTop]); + /* Add it early in the case of body being eof for full ast*/ + Method m = (Method) yyVals[0+yyTop]; + lexer.async_block = (m.ModFlags & Modifiers.ASYNC) != 0; + current_container.AddMethod (m); } -void case_157() -#line 1266 "cs-parser.jay" +void case_142() +#line 1241 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; + lexer.async_block = false; if (method.Block == null) { lbag.AppendToMember (method, savedLocation); /* semicolon*/ @@ -4581,8 +4601,8 @@ void case_157() Lexer.doc_state = XmlCommentState.Allowed; } -void case_160() -#line 1305 "cs-parser.jay" +void case_145() +#line 1281 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4616,15 +4636,15 @@ void case_160() yyVal = method; } -void case_162() -#line 1346 "cs-parser.jay" +void case_147() +#line 1322 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } -void case_164() -#line 1355 "cs-parser.jay" +void case_149() +#line 1331 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4675,8 +4695,8 @@ void case_164() yyVal = method; } -void case_165() -#line 1408 "cs-parser.jay" +void case_150() +#line 1384 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4693,16 +4713,16 @@ void case_165() yyVal = method; } -void case_170() -#line 1437 "cs-parser.jay" +void case_155() +#line 1413 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); lbag.AddLocation (yyVal, parameterListCommas); } -void case_171() -#line 1443 "cs-parser.jay" +void case_156() +#line 1419 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4712,8 +4732,8 @@ void case_171() lbag.AddLocation (yyVal, parameterListCommas); } -void case_172() -#line 1452 "cs-parser.jay" +void case_157() +#line 1428 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4723,8 +4743,8 @@ void case_172() lbag.AddLocation (yyVal, parameterListCommas); } -void case_173() -#line 1461 "cs-parser.jay" +void case_158() +#line 1437 "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"); @@ -4733,8 +4753,8 @@ void case_173() lbag.AddLocation (yyVal, parameterListCommas); } -void case_174() -#line 1469 "cs-parser.jay" +void case_159() +#line 1445 "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"); @@ -4748,8 +4768,8 @@ void case_174() lbag.AddLocation (yyVal, parameterListCommas); } -void case_175() -#line 1482 "cs-parser.jay" +void case_160() +#line 1458 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4757,8 +4777,8 @@ void case_175() lbag.AddLocation (yyVal, parameterListCommas); } -void case_176() -#line 1489 "cs-parser.jay" +void case_161() +#line 1465 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4771,15 +4791,15 @@ void case_176() lbag.AddLocation (yyVal, parameterListCommas); } -void case_179() -#line 1509 "cs-parser.jay" +void case_164() +#line 1485 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } -void case_180() -#line 1517 "cs-parser.jay" +void case_165() +#line 1493 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4789,8 +4809,8 @@ void case_180() yyVal = parameters_bucket; } -void case_181() -#line 1526 "cs-parser.jay" +void case_166() +#line 1502 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4809,16 +4829,16 @@ void case_181() yyVal = yyVals[-2+yyTop]; } -void case_182() -#line 1550 "cs-parser.jay" +void case_167() +#line 1526 "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_183() -#line 1559 "cs-parser.jay" +void case_168() +#line 1535 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4826,8 +4846,8 @@ void case_183() lbag.AddLocation (yyVal, parameterModifierLocation); } -void case_184() -#line 1569 "cs-parser.jay" +void case_169() +#line 1545 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4835,8 +4855,8 @@ void case_184() lbag.AddLocation (yyVal, parameterModifierLocation); } -void case_186() -#line 1584 "cs-parser.jay" +void case_171() +#line 1560 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4874,8 +4894,8 @@ void case_186() ((Parameter) yyVal).DefaultValue = new DefaultParameterValueExpression ((Expression) yyVals[0+yyTop]); } -void case_190() -#line 1633 "cs-parser.jay" +void case_175() +#line 1609 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4897,8 +4917,8 @@ void case_190() yyVal = mod; } -void case_191() -#line 1657 "cs-parser.jay" +void case_176() +#line 1633 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4906,8 +4926,8 @@ void case_191() yyVal = Parameter.Modifier.REF; } -void case_192() -#line 1664 "cs-parser.jay" +void case_177() +#line 1640 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4915,8 +4935,8 @@ void case_192() yyVal = Parameter.Modifier.OUT; } -void case_193() -#line 1671 "cs-parser.jay" +void case_178() +#line 1647 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4927,15 +4947,15 @@ void case_193() yyVal = Parameter.Modifier.This; } -void case_194() -#line 1684 "cs-parser.jay" +void case_179() +#line 1660 "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_195() -#line 1689 "cs-parser.jay" +void case_180() +#line 1665 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4943,22 +4963,22 @@ void case_195() yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Attributes) yyVals[-5+yyTop], lt.Location); } -void case_196() -#line 1696 "cs-parser.jay" +void case_181() +#line 1672 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_197() -#line 1704 "cs-parser.jay" +void case_182() +#line 1680 "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"); } -void case_198() -#line 1709 "cs-parser.jay" +void case_183() +#line 1685 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4968,22 +4988,22 @@ void case_198() } } -void case_200() -#line 1725 "cs-parser.jay" +void case_185() +#line 1701 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } -void case_201() -#line 1736 "cs-parser.jay" +void case_186() +#line 1712 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } -void case_202() -#line 1741 "cs-parser.jay" +void case_187() +#line 1717 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -4998,8 +5018,8 @@ void case_202() lexer.PropertyParsing = true; } -void case_203() -#line 1755 "cs-parser.jay" +void case_188() +#line 1731 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5007,15 +5027,15 @@ void case_203() current_property.DocComment = ConsumeStoredComment (); } -void case_204() -#line 1762 "cs-parser.jay" +void case_189() +#line 1738 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } -void case_206() -#line 1776 "cs-parser.jay" +void case_191() +#line 1752 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5041,8 +5061,8 @@ void case_206() lexer.PropertyParsing = true; } -void case_208() -#line 1805 "cs-parser.jay" +void case_193() +#line 1781 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5054,8 +5074,8 @@ void case_208() current_property = null; } -void case_213() -#line 1824 "cs-parser.jay" +void case_198() +#line 1800 "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 ()); @@ -5067,8 +5087,8 @@ void case_213() } } -void case_214() -#line 1838 "cs-parser.jay" +void case_199() +#line 1814 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5090,8 +5110,8 @@ void case_214() lexer.PropertyParsing = false; } -void case_215() -#line 1859 "cs-parser.jay" +void case_200() +#line 1835 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5113,8 +5133,8 @@ void case_215() Lexer.doc_state = XmlCommentState.NotAllowed; } -void case_216() -#line 1883 "cs-parser.jay" +void case_201() +#line 1859 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5141,8 +5161,8 @@ void case_216() lexer.PropertyParsing = false; } -void case_217() -#line 1909 "cs-parser.jay" +void case_202() +#line 1885 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5164,30 +5184,30 @@ void case_217() Lexer.doc_state = XmlCommentState.NotAllowed; } -void case_219() -#line 1934 "cs-parser.jay" +void case_204() +#line 1910 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } -void case_220() -#line 1939 "cs-parser.jay" +void case_205() +#line 1915 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } -void case_222() -#line 1954 "cs-parser.jay" +void case_207() +#line 1930 "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_223() -#line 1961 "cs-parser.jay" +void case_208() +#line 1937 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5197,18 +5217,20 @@ void case_223() current_container.DocComment = Lexer.consume_doc_comment (); Lexer.doc_state = XmlCommentState.Allowed; } + + lexer.parsing_modifiers = true; } -void case_224() -#line 1972 "cs-parser.jay" +void case_209() +#line 1950 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_225() -#line 1978 "cs-parser.jay" +void case_210() +#line 1956 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5216,8 +5238,8 @@ void case_225() yyVal = pop_current_class (); } -void case_241() -#line 2032 "cs-parser.jay" +void case_226() +#line 2016 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5246,15 +5268,15 @@ void case_241() current_local_parameters = null; } -void case_245() -#line 2069 "cs-parser.jay" +void case_230() +#line 2053 "cs-parser.jay" { 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_247() -#line 2081 "cs-parser.jay" +void case_232() +#line 2065 "cs-parser.jay" { valid_param_mod = 0; @@ -5295,8 +5317,8 @@ void case_247() lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), savedOperatorLocation, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_272() -#line 2157 "cs-parser.jay" +void case_257() +#line 2141 "cs-parser.jay" { valid_param_mod = 0; @@ -5312,8 +5334,8 @@ void case_272() lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_274() -#line 2176 "cs-parser.jay" +void case_259() +#line 2160 "cs-parser.jay" { valid_param_mod = 0; @@ -5329,24 +5351,24 @@ void case_274() lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_275() -#line 2191 "cs-parser.jay" +void case_260() +#line 2175 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; yyVal = new OperatorDeclaration (Operator.OpType.Implicit, null, GetLocation (yyVals[-1+yyTop])); } -void case_276() -#line 2197 "cs-parser.jay" +void case_261() +#line 2181 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; yyVal = new OperatorDeclaration (Operator.OpType.Explicit, null, GetLocation (yyVals[-1+yyTop])); } -void case_277() -#line 2207 "cs-parser.jay" +void case_262() +#line 2191 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5361,8 +5383,8 @@ void case_277() Lexer.doc_state = XmlCommentState.Allowed; } -void case_278() -#line 2226 "cs-parser.jay" +void case_263() +#line 2210 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5372,8 +5394,8 @@ void case_278() valid_param_mod = ParameterModifierType.All; } -void case_279() -#line 2235 "cs-parser.jay" +void case_264() +#line 2219 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5385,8 +5407,8 @@ void case_279() start_block (lexer.Location); } -void case_280() -#line 2246 "cs-parser.jay" +void case_265() +#line 2230 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5415,31 +5437,31 @@ void case_280() yyVal = c; } -void case_286() -#line 2291 "cs-parser.jay" +void case_271() +#line 2275 "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_288() -#line 2301 "cs-parser.jay" +void case_273() +#line 2285 "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_289() -#line 2307 "cs-parser.jay" +void case_274() +#line 2291 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_290() -#line 2315 "cs-parser.jay" +void case_275() +#line 2299 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5449,8 +5471,8 @@ void case_290() current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; } -void case_291() -#line 2324 "cs-parser.jay" +void case_276() +#line 2308 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5471,8 +5493,8 @@ void case_291() current_local_parameters = null; } -void case_292() -#line 2349 "cs-parser.jay" +void case_277() +#line 2333 "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); @@ -5485,8 +5507,8 @@ void case_292() yyVal = current_event_field; } -void case_293() -#line 2363 "cs-parser.jay" +void case_278() +#line 2347 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5497,8 +5519,8 @@ void case_293() current_event_field = null; } -void case_294() -#line 2376 "cs-parser.jay" +void case_279() +#line 2360 "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); @@ -5507,8 +5529,8 @@ void case_294() lexer.EventParsing = true; } -void case_295() -#line 2384 "cs-parser.jay" +void case_280() +#line 2368 "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"); @@ -5516,8 +5538,8 @@ void case_295() lexer.EventParsing = false; } -void case_296() -#line 2391 "cs-parser.jay" +void case_281() +#line 2375 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5529,23 +5551,23 @@ void case_296() current_local_parameters = null; } -void case_299() -#line 2410 "cs-parser.jay" +void case_284() +#line 2394 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } -void case_304() -#line 2434 "cs-parser.jay" +void case_289() +#line 2418 "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_306() -#line 2444 "cs-parser.jay" +void case_291() +#line 2428 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5553,8 +5575,8 @@ void case_306() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_307() -#line 2453 "cs-parser.jay" +void case_292() +#line 2437 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5567,29 +5589,29 @@ void case_307() } } -void case_311() -#line 2474 "cs-parser.jay" +void case_296() +#line 2458 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } -void case_312() -#line 2479 "cs-parser.jay" +void case_297() +#line 2463 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } -void case_313() -#line 2484 "cs-parser.jay" +void case_298() +#line 2468 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } -void case_314() -#line 2492 "cs-parser.jay" +void case_299() +#line 2476 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5602,8 +5624,8 @@ void case_314() lexer.EventParsing = false; } -void case_315() -#line 2504 "cs-parser.jay" +void case_300() +#line 2488 "cs-parser.jay" { lexer.EventParsing = true; @@ -5617,8 +5639,8 @@ void case_315() current_local_parameters = null; } -void case_316() -#line 2520 "cs-parser.jay" +void case_301() +#line 2504 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5631,8 +5653,8 @@ void case_316() lexer.EventParsing = false; } -void case_317() -#line 2532 "cs-parser.jay" +void case_302() +#line 2516 "cs-parser.jay" { lexer.EventParsing = true; @@ -5646,23 +5668,23 @@ void case_317() current_local_parameters = null; } -void case_318() -#line 2548 "cs-parser.jay" +void case_303() +#line 2532 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } -void case_320() -#line 2560 "cs-parser.jay" +void case_305() +#line 2544 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-2+yyTop])); if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } -void case_321() -#line 2566 "cs-parser.jay" +void case_306() +#line 2550 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5676,16 +5698,16 @@ void case_321() 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_322() -#line 2579 "cs-parser.jay" +void case_307() +#line 2563 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_323() -#line 2585 "cs-parser.jay" +void case_308() +#line 2569 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5700,8 +5722,8 @@ void case_323() yyVal = pop_current_class (); } -void case_325() -#line 2603 "cs-parser.jay" +void case_310() +#line 2587 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5713,22 +5735,22 @@ void case_325() } } -void case_326() -#line 2614 "cs-parser.jay" +void case_311() +#line 2598 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } -void case_331() -#line 2632 "cs-parser.jay" +void case_316() +#line 2616 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } -void case_332() -#line 2640 "cs-parser.jay" +void case_317() +#line 2624 "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]); @@ -5742,8 +5764,8 @@ void case_332() yyVal = em; } -void case_333() -#line 2653 "cs-parser.jay" +void case_318() +#line 2637 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5752,8 +5774,8 @@ void case_333() } } -void case_334() -#line 2661 "cs-parser.jay" +void case_319() +#line 2645 "cs-parser.jay" { --lexer.parsing_block; @@ -5768,8 +5790,8 @@ void case_334() yyVal = em; } -void case_336() -#line 2686 "cs-parser.jay" +void case_321() +#line 2670 "cs-parser.jay" { valid_param_mod = 0; @@ -5788,8 +5810,8 @@ void case_336() lexer.ConstraintsParsing = true; } -void case_338() -#line 2708 "cs-parser.jay" +void case_323() +#line 2692 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5804,8 +5826,8 @@ void case_338() current_delegate = null; } -void case_340() -#line 2726 "cs-parser.jay" +void case_325() +#line 2710 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5813,8 +5835,8 @@ void case_340() yyVal = ComposedTypeSpecifier.CreateNullable (GetLocation (yyVals[0+yyTop])); } -void case_342() -#line 2737 "cs-parser.jay" +void case_327() +#line 2721 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5822,23 +5844,23 @@ void case_342() yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location); } -void case_344() -#line 2748 "cs-parser.jay" +void case_329() +#line 2732 "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_345() -#line 2757 "cs-parser.jay" +void case_330() +#line 2741 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_347() -#line 2769 "cs-parser.jay" +void case_332() +#line 2753 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5850,15 +5872,15 @@ void case_347() yyVal = yyVals[-1+yyTop];; } -void case_348() -#line 2780 "cs-parser.jay" +void case_333() +#line 2764 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } -void case_349() -#line 2788 "cs-parser.jay" +void case_334() +#line 2772 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5866,8 +5888,8 @@ void case_349() locationListStack.Push (new List ()); } -void case_350() -#line 2795 "cs-parser.jay" +void case_335() +#line 2779 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5875,16 +5897,16 @@ void case_350() locationListStack.Peek ().Add (GetLocation (yyVals[-1+yyTop])); } -void case_352() -#line 2812 "cs-parser.jay" +void case_337() +#line 2796 "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_353() -#line 2821 "cs-parser.jay" +void case_338() +#line 2805 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5892,38 +5914,38 @@ void case_353() mn.GetSignatureForError ())); } -void case_355() -#line 2832 "cs-parser.jay" +void case_340() +#line 2816 "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_356() -#line 2841 "cs-parser.jay" +void case_341() +#line 2825 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } -void case_357() -#line 2846 "cs-parser.jay" +void case_342() +#line 2830 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } -void case_358() -#line 2854 "cs-parser.jay" +void case_343() +#line 2838 "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_359() -#line 2860 "cs-parser.jay" +void case_344() +#line 2844 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5932,16 +5954,16 @@ void case_359() lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_360() -#line 2868 "cs-parser.jay" +void case_345() +#line 2852 "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_362() -#line 2878 "cs-parser.jay" +void case_347() +#line 2862 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5950,16 +5972,16 @@ void case_362() lbag.AppendTo (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_363() -#line 2889 "cs-parser.jay" +void case_348() +#line 2873 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); yyVal = type_args; } -void case_364() -#line 2895 "cs-parser.jay" +void case_349() +#line 2879 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5967,8 +5989,8 @@ void case_364() lbag.AppendTo (type_args, GetLocation (yyVals[-1+yyTop])); } -void case_365() -#line 2905 "cs-parser.jay" +void case_350() +#line 2889 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -5977,8 +5999,8 @@ void case_365() lbag.AddLocation (yyVal, savedLocation); } -void case_366() -#line 2913 "cs-parser.jay" +void case_351() +#line 2897 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -5988,29 +6010,29 @@ void case_366() yyVal = new TypeParameterName ("", null, lexer.Location); } -void case_371() -#line 2947 "cs-parser.jay" +void case_356() +#line 2931 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_373() -#line 2956 "cs-parser.jay" +void case_358() +#line 2940 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_375() -#line 2965 "cs-parser.jay" +void case_360() +#line 2949 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_378() -#line 2981 "cs-parser.jay" +void case_363() +#line 2965 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6024,23 +6046,23 @@ void case_378() } } -void case_380() -#line 2998 "cs-parser.jay" +void case_365() +#line 2982 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_383() -#line 3014 "cs-parser.jay" +void case_368() +#line 2998 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = types; } -void case_384() -#line 3020 "cs-parser.jay" +void case_369() +#line 3004 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6048,8 +6070,8 @@ void case_384() yyVal = types; } -void case_385() -#line 3030 "cs-parser.jay" +void case_370() +#line 3014 "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 ()); @@ -6057,60 +6079,60 @@ void case_385() yyVal = yyVals[0+yyTop]; } -void case_386() -#line 3037 "cs-parser.jay" +void case_371() +#line 3021 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } -void case_423() -#line 3099 "cs-parser.jay" +void case_408() +#line 3083 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_424() -#line 3103 "cs-parser.jay" +void case_409() +#line 3087 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } -void case_435() -#line 3144 "cs-parser.jay" +void case_420() +#line 3128 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_437() -#line 3156 "cs-parser.jay" +void case_422() +#line 3140 "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_438() -#line 3162 "cs-parser.jay" +void case_423() +#line 3146 "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_439() -#line 3168 "cs-parser.jay" +void case_424() +#line 3152 "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_440() -#line 3174 "cs-parser.jay" +void case_425() +#line 3158 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6119,29 +6141,29 @@ void case_440() lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_442() -#line 3184 "cs-parser.jay" +void case_427() +#line 3168 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } -void case_444() -#line 3192 "cs-parser.jay" +void case_429() +#line 3176 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } -void case_445() -#line 3200 "cs-parser.jay" +void case_430() +#line 3184 "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_448() -#line 3213 "cs-parser.jay" +void case_433() +#line 3197 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6152,23 +6174,23 @@ void case_448() } } -void case_449() -#line 3223 "cs-parser.jay" +void case_434() +#line 3207 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_452() -#line 3239 "cs-parser.jay" +void case_437() +#line 3223 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); yyVal = a; } -void case_453() -#line 3245 "cs-parser.jay" +void case_438() +#line 3229 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6176,23 +6198,23 @@ void case_453() yyVal = a; } -void case_454() -#line 3251 "cs-parser.jay" +void case_439() +#line 3235 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } -void case_455() -#line 3259 "cs-parser.jay" +void case_440() +#line 3243 "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_457() -#line 3268 "cs-parser.jay" +void case_442() +#line 3252 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6201,8 +6223,8 @@ void case_457() yyVal = new CompletionElementInitializer (csn.Prefix, csn.Location); } -void case_458() -#line 3276 "cs-parser.jay" +void case_443() +#line 3260 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6210,23 +6232,23 @@ void case_458() yyVal = new CollectionElementInitializer ((List)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_459() -#line 3283 "cs-parser.jay" +void case_444() +#line 3267 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } -void case_464() -#line 3301 "cs-parser.jay" +void case_449() +#line 3285 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); yyVal = list; } -void case_465() -#line 3307 "cs-parser.jay" +void case_450() +#line 3291 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6237,8 +6259,8 @@ void case_465() yyVal = list; } -void case_466() -#line 3317 "cs-parser.jay" +void case_451() +#line 3301 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6254,65 +6276,65 @@ void case_466() yyVal = list; } -void case_467() -#line 3332 "cs-parser.jay" +void case_452() +#line 3316 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } -void case_468() -#line 3337 "cs-parser.jay" +void case_453() +#line 3321 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } -void case_473() -#line 3358 "cs-parser.jay" +void case_458() +#line 3342 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_474() -#line 3363 "cs-parser.jay" +void case_459() +#line 3347 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_475() -#line 3368 "cs-parser.jay" +void case_460() +#line 3352 "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_476() -#line 3373 "cs-parser.jay" +void case_461() +#line 3357 "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_478() -#line 3385 "cs-parser.jay" +void case_463() +#line 3369 "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_479() -#line 3393 "cs-parser.jay" +void case_464() +#line 3377 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); yyVal = list; } -void case_480() -#line 3399 "cs-parser.jay" +void case_465() +#line 3383 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6320,23 +6342,23 @@ void case_480() yyVal = list; } -void case_481() -#line 3405 "cs-parser.jay" +void case_466() +#line 3389 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } -void case_482() -#line 3413 "cs-parser.jay" +void case_467() +#line 3397 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); yyVal = args; } -void case_483() -#line 3419 "cs-parser.jay" +void case_468() +#line 3403 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6347,22 +6369,22 @@ void case_483() yyVal = args; } -void case_487() -#line 3447 "cs-parser.jay" +void case_472() +#line 3431 "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_488() -#line 3452 "cs-parser.jay" +void case_473() +#line 3436 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } -void case_491() -#line 3474 "cs-parser.jay" +void case_476() +#line 3458 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6376,8 +6398,8 @@ void case_491() lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_492() -#line 3487 "cs-parser.jay" +void case_477() +#line 3471 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6385,8 +6407,8 @@ void case_492() yyVal = new NewInitialize ((FullNamedExpression) yyVals[-1+yyTop], null, (CollectionOrObjectInitializers) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_493() -#line 3499 "cs-parser.jay" +void case_478() +#line 3483 "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])) { @@ -6395,8 +6417,8 @@ void case_493() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_494() -#line 3507 "cs-parser.jay" +void case_479() +#line 3491 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6404,8 +6426,8 @@ void case_494() yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-2+yyTop], (ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); } -void case_495() -#line 3514 "cs-parser.jay" +void case_480() +#line 3498 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6413,29 +6435,29 @@ void case_495() yyVal = new ImplicitlyTypedArrayCreation ((ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_496() -#line 3521 "cs-parser.jay" +void case_481() +#line 3505 "cs-parser.jay" { 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_497() -#line 3526 "cs-parser.jay" +void case_482() +#line 3510 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } -void case_499() -#line 3537 "cs-parser.jay" +void case_484() +#line 3521 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } -void case_500() -#line 3545 "cs-parser.jay" +void case_485() +#line 3529 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6446,16 +6468,16 @@ void case_500() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_505() -#line 3568 "cs-parser.jay" +void case_490() +#line 3552 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); yyVal = a; } -void case_506() -#line 3574 "cs-parser.jay" +void case_491() +#line 3558 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6464,60 +6486,60 @@ void case_506() yyVal = a; } -void case_507() -#line 3585 "cs-parser.jay" +void case_492() +#line 3569 "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_508() -#line 3591 "cs-parser.jay" +void case_493() +#line 3575 "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_509() -#line 3597 "cs-parser.jay" +void case_494() +#line 3581 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } -void case_510() -#line 3602 "cs-parser.jay" +void case_495() +#line 3586 "cs-parser.jay" { 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_514() -#line 3617 "cs-parser.jay" +void case_499() +#line 3601 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_515() -#line 3625 "cs-parser.jay" +void case_500() +#line 3609 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_516() -#line 3630 "cs-parser.jay" +void case_501() +#line 3614 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_521() -#line 3660 "cs-parser.jay" +void case_506() +#line 3644 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6525,8 +6547,8 @@ void case_521() yyVal = ai; } -void case_522() -#line 3667 "cs-parser.jay" +void case_507() +#line 3651 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6538,16 +6560,16 @@ void case_522() yyVal = ai; } -void case_523() -#line 3681 "cs-parser.jay" +void case_508() +#line 3665 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); yyVal = list; } -void case_524() -#line 3687 "cs-parser.jay" +void case_509() +#line 3671 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6555,31 +6577,31 @@ void case_524() yyVal = list; } -void case_526() -#line 3701 "cs-parser.jay" +void case_511() +#line 3685 "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_529() -#line 3712 "cs-parser.jay" +void case_514() +#line 3696 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } -void case_530() -#line 3720 "cs-parser.jay" +void case_515() +#line 3704 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (int) yyVals[0+yyTop], lt.Location); } -void case_531() -#line 3726 "cs-parser.jay" +void case_516() +#line 3710 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6588,24 +6610,24 @@ void case_531() lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_532() -#line 3734 "cs-parser.jay" +void case_517() +#line 3718 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location); } -void case_533() -#line 3740 "cs-parser.jay" +void case_518() +#line 3724 "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_534() -#line 3746 "cs-parser.jay" +void case_519() +#line 3730 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (lbag); if (te.HasTypeArguments) @@ -6615,8 +6637,8 @@ void case_534() yyVal = new MemberAccess (te, lt.Value, (int) yyVals[0+yyTop], lt.Location); } -void case_535() -#line 3758 "cs-parser.jay" +void case_520() +#line 3742 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6624,8 +6646,8 @@ void case_535() yyVal = yyVals[0+yyTop]; } -void case_536() -#line 3768 "cs-parser.jay" +void case_521() +#line 3752 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6634,36 +6656,36 @@ void case_536() yyVal = lt; } -void case_537() -#line 3779 "cs-parser.jay" +void case_522() +#line 3763 "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_538() -#line 3787 "cs-parser.jay" +void case_523() +#line 3771 "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_539() -#line 3795 "cs-parser.jay" +void case_524() +#line 3779 "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_540() -#line 3803 "cs-parser.jay" +void case_525() +#line 3787 "cs-parser.jay" { 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_542() -#line 3815 "cs-parser.jay" +void case_527() +#line 3799 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6673,8 +6695,8 @@ void case_542() } } -void case_548() -#line 3847 "cs-parser.jay" +void case_533() +#line 3831 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6682,8 +6704,8 @@ void case_548() savedCloseLocation = GetLocation (yyVals[-2+yyTop]); } -void case_549() -#line 3857 "cs-parser.jay" +void case_534() +#line 3841 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6692,148 +6714,148 @@ void case_549() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_555() -#line 3882 "cs-parser.jay" +void case_540() +#line 3866 "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_556() -#line 3890 "cs-parser.jay" +void case_541() +#line 3874 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); - } + } -void case_565() -#line 3931 "cs-parser.jay" +void case_550() +#line 3915 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_566() -#line 3936 "cs-parser.jay" +void case_551() +#line 3920 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_567() -#line 3941 "cs-parser.jay" +void case_552() +#line 3925 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_569() -#line 3950 "cs-parser.jay" +void case_554() +#line 3934 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_571() -#line 3959 "cs-parser.jay" +void case_556() +#line 3943 "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_575() -#line 3976 "cs-parser.jay" +void case_560() +#line 3960 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_576() -#line 3981 "cs-parser.jay" +void case_561() +#line 3965 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_578() -#line 3990 "cs-parser.jay" +void case_563() +#line 3974 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_579() -#line 3995 "cs-parser.jay" +void case_564() +#line 3979 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_580() -#line 4000 "cs-parser.jay" +void case_565() +#line 3984 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_581() -#line 4005 "cs-parser.jay" +void case_566() +#line 3989 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_583() -#line 4014 "cs-parser.jay" +void case_568() +#line 3998 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_584() -#line 4019 "cs-parser.jay" +void case_569() +#line 4003 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_586() -#line 4028 "cs-parser.jay" +void case_571() +#line 4012 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_588() -#line 4037 "cs-parser.jay" +void case_573() +#line 4021 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_590() -#line 4046 "cs-parser.jay" +void case_575() +#line 4030 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_592() -#line 4055 "cs-parser.jay" +void case_577() +#line 4039 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_594() -#line 4064 "cs-parser.jay" +void case_579() +#line 4048 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_596() -#line 4073 "cs-parser.jay" +void case_581() +#line 4057 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6841,85 +6863,85 @@ void case_596() yyVal = new Nullable.NullCoalescingOperator ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_598() -#line 4084 "cs-parser.jay" +void case_583() +#line 4068 "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_600() -#line 4096 "cs-parser.jay" +void case_585() +#line 4080 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_601() -#line 4101 "cs-parser.jay" +void case_586() +#line 4085 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_602() -#line 4106 "cs-parser.jay" +void case_587() +#line 4090 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_603() -#line 4111 "cs-parser.jay" +void case_588() +#line 4095 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_604() -#line 4116 "cs-parser.jay" +void case_589() +#line 4100 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_605() -#line 4121 "cs-parser.jay" +void case_590() +#line 4105 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_606() -#line 4126 "cs-parser.jay" +void case_591() +#line 4110 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_607() -#line 4131 "cs-parser.jay" +void case_592() +#line 4115 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_608() -#line 4136 "cs-parser.jay" +void case_593() +#line 4120 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_609() -#line 4141 "cs-parser.jay" +void case_594() +#line 4125 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_610() -#line 4149 "cs-parser.jay" +void case_595() +#line 4133 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6927,8 +6949,8 @@ void case_610() yyVal = pars; } -void case_611() -#line 4156 "cs-parser.jay" +void case_596() +#line 4140 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6942,38 +6964,38 @@ void case_611() yyVal = pars; } -void case_612() -#line 4172 "cs-parser.jay" +void case_597() +#line 4156 "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_613() -#line 4178 "cs-parser.jay" +void case_598() +#line 4162 "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_614() -#line 4184 "cs-parser.jay" +void case_599() +#line 4168 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } -void case_616() -#line 4192 "cs-parser.jay" +void case_601() +#line 4176 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } -void case_620() -#line 4208 "cs-parser.jay" +void case_605() +#line 4192 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -6981,94 +7003,94 @@ void case_620() yyVal = b; } -void case_622() -#line 4219 "cs-parser.jay" +void case_607() +#line 4203 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } -void case_623() -#line 4227 "cs-parser.jay" +void case_608() +#line 4211 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); start_anonymous (true, new ParametersCompiled (p), false, lt.Location); } -void case_624() -#line 4233 "cs-parser.jay" +void case_609() +#line 4217 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_625() -#line 4238 "cs-parser.jay" +void case_610() +#line 4222 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); start_anonymous (true, new ParametersCompiled (p), true, lt.Location); } -void case_626() -#line 4244 "cs-parser.jay" +void case_611() +#line 4228 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_628() -#line 4253 "cs-parser.jay" +void case_613() +#line 4237 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } -void case_629() -#line 4258 "cs-parser.jay" +void case_614() +#line 4242 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_631() -#line 4267 "cs-parser.jay" +void case_616() +#line 4251 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } -void case_632() -#line 4272 "cs-parser.jay" +void case_617() +#line 4256 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_639() -#line 4295 "cs-parser.jay" +void case_624() +#line 4279 "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_640() -#line 4300 "cs-parser.jay" +void case_625() +#line 4284 "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_641() -#line 4305 "cs-parser.jay" +void case_626() +#line 4289 "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_645() -#line 4334 "cs-parser.jay" +void case_630() +#line 4318 "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]); @@ -7080,8 +7102,8 @@ void case_645() lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); } -void case_646() -#line 4346 "cs-parser.jay" +void case_631() +#line 4330 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7091,18 +7113,20 @@ void case_646() current_container.DocComment = Lexer.consume_doc_comment (); Lexer.doc_state = XmlCommentState.Allowed; } + + lexer.parsing_modifiers = true; } -void case_647() -#line 4357 "cs-parser.jay" +void case_632() +#line 4343 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_648() -#line 4363 "cs-parser.jay" +void case_633() +#line 4349 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7110,15 +7134,16 @@ void case_648() yyVal = pop_current_class (); } -void case_651() -#line 4380 "cs-parser.jay" +void case_636() +#line 4366 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; + lexer.parsing_modifiers = false; } -void case_654() -#line 4390 "cs-parser.jay" +void case_639() +#line 4380 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7135,8 +7160,8 @@ void case_654() yyVal = m1 | m2; } -void case_655() -#line 4409 "cs-parser.jay" +void case_640() +#line 4399 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7145,92 +7170,92 @@ void case_655() report.Error (1530, GetLocation (yyVals[0+yyTop]), "Keyword `new' is not allowed on namespace elements"); } -void case_656() -#line 4417 "cs-parser.jay" +void case_641() +#line 4407 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_657() -#line 4422 "cs-parser.jay" +void case_642() +#line 4412 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_658() -#line 4427 "cs-parser.jay" +void case_643() +#line 4417 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_659() -#line 4432 "cs-parser.jay" +void case_644() +#line 4422 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_660() -#line 4437 "cs-parser.jay" +void case_645() +#line 4427 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_661() -#line 4442 "cs-parser.jay" +void case_646() +#line 4432 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_662() -#line 4447 "cs-parser.jay" +void case_647() +#line 4437 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_663() -#line 4452 "cs-parser.jay" +void case_648() +#line 4442 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_664() -#line 4457 "cs-parser.jay" +void case_649() +#line 4447 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_665() -#line 4462 "cs-parser.jay" +void case_650() +#line 4452 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_666() -#line 4467 "cs-parser.jay" +void case_651() +#line 4457 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_667() -#line 4472 "cs-parser.jay" +void case_652() +#line 4462 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_668() -#line 4477 "cs-parser.jay" +void case_653() +#line 4467 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7238,37 +7263,37 @@ void case_668() Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } -void case_669() -#line 4484 "cs-parser.jay" +void case_654() +#line 4474 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_671() -#line 4493 "cs-parser.jay" +void case_656() +#line 4483 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } -void case_674() -#line 4506 "cs-parser.jay" +void case_659() +#line 4496 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_675() -#line 4514 "cs-parser.jay" +void case_660() +#line 4504 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); yyVal = constraints; } -void case_676() -#line 4520 "cs-parser.jay" +void case_661() +#line 4510 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7285,24 +7310,24 @@ void case_676() yyVal = constraints; } -void case_677() -#line 4539 "cs-parser.jay" +void case_662() +#line 4529 "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])); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_678() -#line 4548 "cs-parser.jay" +void case_663() +#line 4538 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = constraints; } -void case_679() -#line 4554 "cs-parser.jay" +void case_664() +#line 4544 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7326,8 +7351,8 @@ void case_679() yyVal = constraints; } -void case_680() -#line 4580 "cs-parser.jay" +void case_665() +#line 4570 "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 ()); @@ -7335,15 +7360,15 @@ void case_680() yyVal = yyVals[0+yyTop]; } -void case_681() -#line 4587 "cs-parser.jay" +void case_666() +#line 4577 "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_685() -#line 4607 "cs-parser.jay" +void case_670() +#line 4597 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7351,92 +7376,92 @@ void case_685() yyVal = yyVals[0+yyTop]; } -void case_686() -#line 4617 "cs-parser.jay" +void case_671() +#line 4607 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } -void case_687() -#line 4622 "cs-parser.jay" +void case_672() +#line 4612 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } -void case_688() -#line 4643 "cs-parser.jay" +void case_673() +#line 4633 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } -void case_690() -#line 4655 "cs-parser.jay" +void case_675() +#line 4645 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } -void case_691() -#line 4660 "cs-parser.jay" +void case_676() +#line 4650 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } -void case_692() -#line 4669 "cs-parser.jay" +void case_677() +#line 4659 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } -void case_693() -#line 4674 "cs-parser.jay" +void case_678() +#line 4664 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } -void case_701() -#line 4701 "cs-parser.jay" +void case_686() +#line 4691 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_734() -#line 4765 "cs-parser.jay" +void case_719() +#line 4755 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } -void case_735() -#line 4770 "cs-parser.jay" +void case_720() +#line 4760 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } -void case_736() -#line 4775 "cs-parser.jay" +void case_721() +#line 4765 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_737() -#line 4783 "cs-parser.jay" +void case_722() +#line 4773 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } -void case_738() -#line 4791 "cs-parser.jay" +void case_723() +#line 4781 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7445,8 +7470,8 @@ void case_738() current_block.AddStatement (labeled); } -void case_741() -#line 4804 "cs-parser.jay" +void case_726() +#line 4794 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7454,8 +7479,8 @@ void case_741() yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_742() -#line 4820 "cs-parser.jay" +void case_727() +#line 4810 "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*/ @@ -7486,8 +7511,8 @@ void case_742() } } -void case_743() -#line 4850 "cs-parser.jay" +void case_728() +#line 4840 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7499,8 +7524,8 @@ void case_743() } } -void case_744() -#line 4861 "cs-parser.jay" +void case_729() +#line 4851 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7508,22 +7533,22 @@ void case_744() yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_747() -#line 4876 "cs-parser.jay" +void case_732() +#line 4866 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_749() -#line 4885 "cs-parser.jay" +void case_734() +#line 4875 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_751() -#line 4900 "cs-parser.jay" +void case_736() +#line 4890 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7531,16 +7556,16 @@ void case_751() current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_752() -#line 4907 "cs-parser.jay" +void case_737() +#line 4897 "cs-parser.jay" { yyVal = current_variable; current_variable = null; lbag.AppendTo (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_753() -#line 4913 "cs-parser.jay" +void case_738() +#line 4903 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7548,8 +7573,8 @@ void case_753() current_variable = new BlockConstantDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_754() -#line 4920 "cs-parser.jay" +void case_739() +#line 4910 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7560,15 +7585,15 @@ void case_754() current_variable = null; } -void case_756() -#line 4934 "cs-parser.jay" +void case_741() +#line 4924 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } -void case_757() -#line 4939 "cs-parser.jay" +void case_742() +#line 4929 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7578,8 +7603,17 @@ void case_757() } } -void case_762() -#line 4961 "cs-parser.jay" +void case_746() +#line 4947 "cs-parser.jay" +{ + foreach (var d in current_variable.Declarators) { + if (d.Initializer == null) + Error_MissingInitializer (d.Variable.Location); + } + } + +void case_749() +#line 4962 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7589,8 +7623,8 @@ void case_762() lbag.AddLocation (d, GetLocation (yyVals[-1+yyTop])); } -void case_763() -#line 4970 "cs-parser.jay" +void case_750() +#line 4971 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7600,15 +7634,15 @@ void case_763() lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_765() -#line 4986 "cs-parser.jay" +void case_752() +#line 4987 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } -void case_770() -#line 5004 "cs-parser.jay" +void case_757() +#line 5005 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7618,29 +7652,29 @@ void case_770() lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_772() -#line 5017 "cs-parser.jay" +void case_759() +#line 5018 "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_773() -#line 5022 "cs-parser.jay" +void case_760() +#line 5023 "cs-parser.jay" { 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_774() -#line 5030 "cs-parser.jay" +void case_761() +#line 5031 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_778() -#line 5048 "cs-parser.jay" +void case_765() +#line 5049 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7651,8 +7685,8 @@ void case_778() } } -void case_779() -#line 5061 "cs-parser.jay" +void case_766() +#line 5062 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7661,15 +7695,15 @@ void case_779() yyVal = new StatementExpression (s); } -void case_780() -#line 5069 "cs-parser.jay" +void case_767() +#line 5070 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_783() -#line 5083 "cs-parser.jay" +void case_770() +#line 5084 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7678,8 +7712,8 @@ void case_783() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_784() -#line 5092 "cs-parser.jay" +void case_771() +#line 5093 "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])); @@ -7690,23 +7724,23 @@ void case_784() Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_786() -#line 5109 "cs-parser.jay" +void case_773() +#line 5110 "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_787() -#line 5118 "cs-parser.jay" +void case_774() +#line 5119 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } -void case_789() -#line 5127 "cs-parser.jay" +void case_776() +#line 5128 "cs-parser.jay" { var sections = new List (4); @@ -7714,8 +7748,8 @@ void case_789() yyVal = sections; } -void case_790() -#line 5134 "cs-parser.jay" +void case_777() +#line 5135 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7723,15 +7757,15 @@ void case_790() yyVal = sections; } -void case_791() -#line 5141 "cs-parser.jay" +void case_778() +#line 5142 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } -void case_794() -#line 5160 "cs-parser.jay" +void case_781() +#line 5161 "cs-parser.jay" { var labels = new List (2); @@ -7739,8 +7773,8 @@ void case_794() yyVal = labels; } -void case_795() -#line 5167 "cs-parser.jay" +void case_782() +#line 5168 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7748,15 +7782,15 @@ void case_795() yyVal = labels; } -void case_796() -#line 5177 "cs-parser.jay" +void case_783() +#line 5178 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_802() -#line 5196 "cs-parser.jay" +void case_789() +#line 5197 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7765,22 +7799,22 @@ void case_802() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_803() -#line 5208 "cs-parser.jay" +void case_790() +#line 5209 "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_804() -#line 5216 "cs-parser.jay" +void case_791() +#line 5217 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } -void case_806() -#line 5232 "cs-parser.jay" +void case_793() +#line 5233 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7793,15 +7827,15 @@ void case_806() yyVal = end_block (GetLocation (yyVals[-5+yyTop])); } -void case_807() -#line 5244 "cs-parser.jay" +void case_794() +#line 5245 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } -void case_810() -#line 5257 "cs-parser.jay" +void case_797() +#line 5258 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7809,15 +7843,15 @@ void case_810() current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_811() -#line 5264 "cs-parser.jay" +void case_798() +#line 5265 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_819() -#line 5288 "cs-parser.jay" +void case_806() +#line 5289 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7831,15 +7865,15 @@ void case_819() yyVal = sl; } -void case_820() -#line 5304 "cs-parser.jay" +void case_807() +#line 5305 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } -void case_821() -#line 5309 "cs-parser.jay" +void case_808() +#line 5310 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7849,8 +7883,8 @@ void case_821() yyVal = li; } -void case_822() -#line 5318 "cs-parser.jay" +void case_809() +#line 5319 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7862,58 +7896,58 @@ void case_822() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_829() -#line 5341 "cs-parser.jay" +void case_816() +#line 5342 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_830() -#line 5349 "cs-parser.jay" +void case_817() +#line 5350 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_831() -#line 5357 "cs-parser.jay" +void case_818() +#line 5358 "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_832() -#line 5363 "cs-parser.jay" +void case_819() +#line 5364 "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_833() -#line 5368 "cs-parser.jay" +void case_820() +#line 5369 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_834() -#line 5376 "cs-parser.jay" +void case_821() +#line 5377 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_835() -#line 5384 "cs-parser.jay" +void case_822() +#line 5385 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_836() -#line 5392 "cs-parser.jay" +void case_823() +#line 5393 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7930,8 +7964,8 @@ void case_836() lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_837() -#line 5408 "cs-parser.jay" +void case_824() +#line 5409 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7946,29 +7980,29 @@ void case_837() lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_841() -#line 5434 "cs-parser.jay" +void case_828() +#line 5435 "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_842() -#line 5439 "cs-parser.jay" +void case_829() +#line 5440 "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_843() -#line 5444 "cs-parser.jay" +void case_830() +#line 5445 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } -void case_844() -#line 5452 "cs-parser.jay" +void case_831() +#line 5453 "cs-parser.jay" { var l = new List (2); @@ -7976,8 +8010,8 @@ void case_844() yyVal = l; } -void case_845() -#line 5459 "cs-parser.jay" +void case_832() +#line 5460 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -7994,8 +8028,8 @@ void case_845() yyVal = l; } -void case_849() -#line 5487 "cs-parser.jay" +void case_836() +#line 5488 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8011,8 +8045,8 @@ void case_849() yyVal = c; } -void case_851() -#line 5506 "cs-parser.jay" +void case_838() +#line 5507 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8024,15 +8058,15 @@ void case_851() yyVal = new Catch (null, GetLocation (yyVals[-2+yyTop])); } -void case_854() -#line 5534 "cs-parser.jay" +void case_841() +#line 5535 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } -void case_856() -#line 5544 "cs-parser.jay" +void case_843() +#line 5545 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8041,8 +8075,8 @@ void case_856() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_857() -#line 5555 "cs-parser.jay" +void case_844() +#line 5556 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8053,15 +8087,15 @@ void case_857() current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_858() -#line 5565 "cs-parser.jay" +void case_845() +#line 5566 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_859() -#line 5570 "cs-parser.jay" +void case_846() +#line 5571 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8072,8 +8106,8 @@ void case_859() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_860() -#line 5583 "cs-parser.jay" +void case_847() +#line 5584 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8084,15 +8118,15 @@ void case_860() current_variable = new Using.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_861() -#line 5593 "cs-parser.jay" +void case_848() +#line 5594 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_862() -#line 5598 "cs-parser.jay" +void case_849() +#line 5599 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8103,8 +8137,8 @@ void case_862() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_863() -#line 5608 "cs-parser.jay" +void case_850() +#line 5609 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8114,15 +8148,15 @@ void case_863() yyVal = u; } -void case_865() -#line 5624 "cs-parser.jay" +void case_852() +#line 5625 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } -void case_866() -#line 5635 "cs-parser.jay" +void case_853() +#line 5636 "cs-parser.jay" { lexer.query_parsing = false; @@ -8135,8 +8169,8 @@ void case_866() current_block = current_block.Parent; } -void case_867() -#line 5647 "cs-parser.jay" +void case_854() +#line 5648 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8147,8 +8181,8 @@ void case_867() current_block = current_block.Parent; } -void case_868() -#line 5658 "cs-parser.jay" +void case_855() +#line 5659 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8157,16 +8191,16 @@ void case_868() current_block = current_block.Parent; } -void case_869() -#line 5665 "cs-parser.jay" +void case_856() +#line 5666 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; } -void case_870() -#line 5674 "cs-parser.jay" +void case_857() +#line 5675 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8175,8 +8209,8 @@ void case_870() yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]))); } -void case_871() -#line 5682 "cs-parser.jay" +void case_858() +#line 5683 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8189,8 +8223,8 @@ void case_871() ); } -void case_872() -#line 5697 "cs-parser.jay" +void case_859() +#line 5698 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8199,8 +8233,8 @@ void case_872() yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]))); } -void case_873() -#line 5705 "cs-parser.jay" +void case_860() +#line 5706 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8213,8 +8247,8 @@ void case_873() ); } -void case_875() -#line 5724 "cs-parser.jay" +void case_862() +#line 5725 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8226,8 +8260,8 @@ void case_875() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_877() -#line 5739 "cs-parser.jay" +void case_864() +#line 5740 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8242,8 +8276,8 @@ void case_877() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_878() -#line 5756 "cs-parser.jay" +void case_865() +#line 5757 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8259,15 +8293,15 @@ void case_878() yyVal = head; } -void case_880() -#line 5772 "cs-parser.jay" +void case_867() +#line 5773 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_882() -#line 5784 "cs-parser.jay" +void case_869() +#line 5785 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8275,8 +8309,8 @@ void case_882() current_block = current_block.Parent; } -void case_883() -#line 5791 "cs-parser.jay" +void case_870() +#line 5792 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8285,8 +8319,8 @@ void case_883() linq_clause_blocks.Push ((Linq.QueryBlock)current_block); } -void case_884() -#line 5799 "cs-parser.jay" +void case_871() +#line 5800 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8294,8 +8328,8 @@ void case_884() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_885() -#line 5806 "cs-parser.jay" +void case_872() +#line 5807 "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])); @@ -8304,15 +8338,15 @@ void case_885() current_block = current_block.Parent; } -void case_889() -#line 5823 "cs-parser.jay" +void case_876() +#line 5824 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_896() -#line 5843 "cs-parser.jay" +void case_883() +#line 5844 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8325,8 +8359,8 @@ void case_896() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_898() -#line 5862 "cs-parser.jay" +void case_885() +#line 5863 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8334,8 +8368,8 @@ void case_898() current_block = current_block.Parent; } -void case_899() -#line 5872 "cs-parser.jay" +void case_886() +#line 5873 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8344,8 +8378,8 @@ void case_899() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_900() -#line 5880 "cs-parser.jay" +void case_887() +#line 5881 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8354,8 +8388,8 @@ void case_900() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_901() -#line 5888 "cs-parser.jay" +void case_888() +#line 5889 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8364,8 +8398,8 @@ void case_901() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_902() -#line 5896 "cs-parser.jay" +void case_889() +#line 5897 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8404,8 +8438,8 @@ void case_902() ((Linq.QueryBlock)current_block).AddRangeVariable (into); } -void case_903() -#line 5934 "cs-parser.jay" +void case_890() +#line 5935 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8414,8 +8448,8 @@ void case_903() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_904() -#line 5942 "cs-parser.jay" +void case_891() +#line 5943 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8424,8 +8458,8 @@ void case_904() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_905() -#line 5950 "cs-parser.jay" +void case_892() +#line 5951 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8434,8 +8468,8 @@ void case_905() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_906() -#line 5958 "cs-parser.jay" +void case_893() +#line 5959 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8476,8 +8510,8 @@ void case_906() ((Linq.QueryBlock)current_block).AddRangeVariable (into); } -void case_910() -#line 6013 "cs-parser.jay" +void case_897() +#line 6014 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8485,8 +8519,8 @@ void case_910() yyVal = yyVals[0+yyTop]; } -void case_912() -#line 6024 "cs-parser.jay" +void case_899() +#line 6025 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8494,15 +8528,15 @@ void case_912() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_913() -#line 6031 "cs-parser.jay" +void case_900() +#line 6032 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } -void case_915() -#line 6040 "cs-parser.jay" +void case_902() +#line 6041 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8510,43 +8544,43 @@ void case_915() current_block = new Linq.QueryBlock ((Linq.QueryBlock) current_block, lexer.Location); } -void case_916() -#line 6047 "cs-parser.jay" +void case_903() +#line 6048 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } -void case_918() -#line 6059 "cs-parser.jay" +void case_905() +#line 6060 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_919() -#line 6064 "cs-parser.jay" +void case_906() +#line 6065 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_921() -#line 6076 "cs-parser.jay" +void case_908() +#line 6077 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_922() -#line 6081 "cs-parser.jay" +void case_909() +#line 6082 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_924() -#line 6091 "cs-parser.jay" +void case_911() +#line 6092 "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*/ @@ -8563,8 +8597,8 @@ void case_924() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_925() -#line 6107 "cs-parser.jay" +void case_912() +#line 6108 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8574,8 +8608,8 @@ void case_925() }; } -void case_928() -#line 6134 "cs-parser.jay" +void case_915() +#line 6135 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8606,8 +8640,8 @@ void case_928() start_block (lexer.Location); } -void case_929() -#line 6164 "cs-parser.jay" +void case_916() +#line 6165 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8618,16 +8652,16 @@ void case_929() current_local_parameters = null; } -void case_939() -#line 6207 "cs-parser.jay" +void case_926() +#line 6208 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; yyVal = null; } -void case_940() -#line 6213 "cs-parser.jay" +void case_927() +#line 6214 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8635,15 +8669,15 @@ void case_940() yyVal = new MemberName (lt.Value); } -void case_943() -#line 6228 "cs-parser.jay" +void case_930() +#line 6229 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } -void case_944() -#line 6233 "cs-parser.jay" +void case_931() +#line 6234 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8652,8 +8686,8 @@ void case_944() yyVal = null; } -void case_945() -#line 6241 "cs-parser.jay" +void case_932() +#line 6242 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8662,8 +8696,8 @@ void case_945() yyVal = null; } -void case_946() -#line 6249 "cs-parser.jay" +void case_933() +#line 6250 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8671,24 +8705,24 @@ void case_946() yyVal = null; } -void case_954() -#line 6287 "cs-parser.jay" +void case_941() +#line 6288 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); yyVal = parameters; } -void case_955() -#line 6293 "cs-parser.jay" +void case_942() +#line 6294 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); yyVal = parameters; } -void case_956() -#line 6302 "cs-parser.jay" +void case_943() +#line 6303 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -8707,93 +8741,92 @@ void case_956() 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, 111, 102, 102, 103, 103, 106, 106, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, - 115, 118, 118, 118, 121, 118, 119, 119, 122, 122, - 123, 123, 123, 116, 116, 116, 124, 124, 124, 117, - 126, 128, 129, 56, 131, 132, 133, 58, 127, 127, - 127, 127, 127, 137, 134, 138, 135, 136, 136, 136, - 139, 140, 141, 143, 30, 30, 142, 142, 144, 144, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 148, - 59, 147, 147, 149, 149, 152, 146, 146, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 154, 153, 155, 153, 153, 153, 60, 158, 160, 156, - 157, 157, 159, 159, 164, 162, 165, 162, 162, 166, - 61, 168, 57, 171, 172, 57, 167, 174, 167, 169, - 169, 175, 175, 176, 177, 176, 178, 173, 170, 170, - 170, 170, 170, 182, 179, 183, 180, 181, 181, 185, - 187, 188, 31, 184, 184, 184, 186, 186, 186, 189, - 189, 190, 191, 190, 192, 193, 194, 32, 195, 195, - 17, 17, 196, 196, 199, 198, 198, 198, 200, 200, - 202, 64, 125, 105, 105, 130, 130, 203, 203, 203, - 201, 201, 204, 204, 205, 205, 207, 207, 86, 76, - 76, 90, 90, 120, 120, 150, 150, 208, 208, 208, - 208, 208, 212, 212, 213, 213, 211, 211, 211, 211, - 211, 211, 211, 214, 214, 214, 214, 214, 214, 214, - 214, 214, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 216, 216, 216, 217, 217, 217, 237, 237, - 238, 238, 239, 239, 219, 219, 236, 236, 236, 236, - 236, 236, 236, 236, 221, 240, 240, 241, 241, 242, - 242, 244, 244, 244, 245, 245, 245, 245, 245, 246, - 246, 163, 163, 250, 250, 250, 250, 250, 252, 252, - 251, 251, 253, 253, 253, 253, 254, 222, 249, 249, - 249, 255, 255, 256, 256, 223, 224, 224, 225, 226, - 227, 227, 218, 218, 218, 218, 218, 261, 257, 228, - 262, 262, 263, 263, 264, 264, 265, 265, 265, 265, - 258, 258, 209, 209, 260, 260, 266, 266, 259, 259, - 85, 85, 267, 267, 268, 229, 269, 269, 269, 270, - 270, 270, 270, 270, 271, 197, 230, 231, 232, 233, - 273, 234, 274, 234, 272, 272, 276, 275, 220, 277, - 277, 277, 277, 277, 279, 280, 278, 278, 278, 278, - 278, 278, 278, 281, 281, 281, 281, 282, 282, 282, - 282, 282, 282, 283, 283, 283, 284, 284, 284, 284, - 284, 285, 285, 285, 286, 286, 287, 287, 288, 288, - 289, 289, 290, 290, 291, 291, 292, 292, 293, 293, - 293, 293, 293, 293, 293, 293, 293, 293, 293, 294, - 294, 295, 295, 295, 296, 296, 297, 297, 300, 298, - 299, 299, 302, 301, 303, 301, 304, 305, 301, 306, - 307, 301, 46, 46, 247, 247, 247, 247, 235, 235, - 235, 84, 309, 310, 311, 312, 313, 28, 63, 63, - 62, 62, 112, 112, 314, 314, 314, 314, 314, 314, - 314, 314, 314, 314, 314, 314, 314, 314, 314, 66, - 66, 68, 68, 68, 315, 315, 316, 317, 317, 318, - 318, 318, 318, 206, 206, 319, 319, 321, 113, 322, - 322, 323, 161, 320, 320, 324, 324, 325, 325, 325, - 325, 329, 329, 330, 330, 330, 327, 327, 327, 327, - 327, 327, 327, 327, 327, 327, 327, 327, 327, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 345, 345, 345, 345, 332, 346, 328, 347, - 347, 348, 348, 348, 348, 348, 348, 210, 210, 349, - 351, 326, 354, 326, 350, 350, 350, 352, 352, 357, - 357, 358, 358, 353, 353, 355, 355, 359, 359, 360, - 356, 356, 356, 333, 333, 344, 344, 361, 362, 362, - 334, 334, 363, 363, 366, 364, 365, 365, 367, 367, - 367, 370, 368, 369, 369, 371, 371, 335, 335, 335, - 335, 372, 373, 377, 374, 376, 376, 378, 378, 382, - 381, 381, 379, 379, 380, 380, 384, 383, 383, 375, - 385, 375, 336, 336, 336, 336, 336, 336, 386, 387, - 388, 388, 388, 389, 390, 391, 391, 392, 392, 337, - 337, 337, 337, 393, 393, 395, 395, 394, 396, 394, - 394, 338, 339, 397, 342, 340, 399, 400, 343, 401, - 402, 341, 341, 398, 398, 308, 308, 308, 308, 403, - 403, 405, 405, 407, 406, 408, 406, 404, 404, 404, - 412, 410, 413, 414, 410, 409, 409, 415, 415, 416, - 416, 416, 416, 416, 421, 417, 422, 418, 423, 424, - 425, 419, 427, 428, 429, 419, 426, 426, 431, 420, - 430, 434, 430, 433, 436, 433, 432, 432, 432, 435, - 435, 435, 411, 437, 411, 3, 3, 438, 3, 3, - 439, 439, 248, 248, 243, 243, 5, 440, 440, 440, - 440, 444, 440, 440, 440, 440, 441, 441, 442, 445, - 442, 443, 443, 446, 446, 447, + 52, 52, 52, 52, 52, 65, 67, 69, 70, 71, + 29, 29, 74, 53, 75, 75, 76, 76, 77, 79, + 73, 73, 78, 78, 84, 54, 88, 54, 54, 83, + 91, 83, 85, 85, 92, 92, 93, 94, 93, 89, + 89, 95, 95, 96, 97, 87, 87, 90, 90, 90, + 100, 55, 103, 104, 98, 105, 106, 107, 98, 98, + 99, 99, 102, 102, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 111, 111, 114, 114, 114, 117, + 114, 115, 115, 118, 118, 119, 119, 119, 112, 112, + 112, 120, 120, 120, 113, 122, 124, 125, 56, 127, + 128, 129, 58, 123, 123, 123, 123, 123, 133, 130, + 134, 131, 132, 132, 132, 135, 136, 137, 139, 30, + 30, 138, 138, 140, 140, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 144, 59, 143, 143, 145, 145, + 148, 142, 142, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 150, 149, 151, 149, 149, + 149, 60, 154, 156, 152, 153, 153, 155, 155, 160, + 158, 161, 158, 158, 162, 61, 164, 57, 167, 168, + 57, 163, 170, 163, 165, 165, 171, 171, 172, 173, + 172, 174, 169, 166, 166, 166, 166, 166, 178, 175, + 179, 176, 177, 177, 181, 183, 184, 31, 180, 180, + 180, 182, 182, 182, 185, 185, 186, 187, 186, 188, + 189, 190, 32, 191, 191, 17, 17, 192, 192, 195, + 194, 194, 194, 196, 196, 198, 64, 121, 101, 101, + 126, 126, 199, 199, 199, 197, 197, 200, 200, 201, + 201, 203, 203, 82, 72, 72, 86, 86, 116, 116, + 146, 146, 204, 204, 204, 204, 204, 208, 208, 209, + 209, 207, 207, 207, 207, 207, 207, 207, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 212, 212, 212, + 213, 213, 213, 233, 233, 234, 234, 235, 235, 215, + 215, 232, 232, 232, 232, 232, 232, 232, 232, 217, + 236, 236, 237, 237, 238, 238, 240, 240, 240, 241, + 241, 241, 241, 241, 242, 242, 159, 159, 246, 246, + 246, 246, 246, 248, 248, 247, 247, 249, 249, 249, + 249, 250, 218, 245, 245, 245, 251, 251, 252, 252, + 219, 220, 220, 221, 222, 223, 223, 214, 214, 214, + 214, 214, 257, 253, 224, 258, 258, 259, 259, 260, + 260, 261, 261, 261, 261, 254, 254, 205, 205, 256, + 256, 262, 262, 255, 255, 81, 81, 263, 263, 264, + 225, 265, 265, 265, 266, 266, 266, 266, 266, 267, + 193, 226, 227, 228, 229, 269, 230, 270, 230, 268, + 268, 272, 271, 216, 273, 273, 273, 273, 273, 275, + 276, 274, 274, 274, 274, 274, 274, 274, 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, + 297, 300, 301, 297, 302, 303, 297, 46, 46, 243, + 243, 243, 243, 231, 231, 231, 80, 305, 306, 307, + 308, 309, 28, 63, 63, 62, 62, 108, 108, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 66, 66, 68, 68, 68, 311, + 311, 312, 313, 313, 314, 314, 314, 314, 202, 202, + 315, 315, 317, 109, 318, 318, 319, 157, 316, 316, + 320, 320, 321, 321, 321, 321, 325, 325, 326, 326, + 326, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 323, 323, 327, 327, 327, 327, 327, 327, + 327, 327, 327, 327, 327, 327, 327, 341, 341, 341, + 341, 328, 342, 324, 343, 343, 344, 344, 344, 344, + 344, 344, 206, 206, 345, 347, 322, 350, 322, 346, + 346, 346, 348, 348, 354, 354, 353, 353, 355, 355, + 349, 349, 351, 351, 356, 356, 357, 352, 352, 352, + 329, 329, 340, 340, 358, 359, 359, 330, 330, 360, + 360, 363, 361, 362, 362, 364, 364, 364, 367, 365, + 366, 366, 368, 368, 331, 331, 331, 331, 369, 370, + 374, 371, 373, 373, 375, 375, 379, 378, 378, 376, + 376, 377, 377, 381, 380, 380, 372, 382, 372, 332, + 332, 332, 332, 332, 332, 383, 384, 385, 385, 385, + 386, 387, 388, 388, 389, 389, 333, 333, 333, 333, + 390, 390, 392, 392, 391, 393, 391, 391, 334, 335, + 394, 338, 336, 396, 397, 339, 398, 399, 337, 337, + 395, 395, 304, 304, 304, 304, 400, 400, 402, 402, + 404, 403, 405, 403, 401, 401, 401, 409, 407, 410, + 411, 407, 406, 406, 412, 412, 413, 413, 413, 413, + 413, 418, 414, 419, 415, 420, 421, 422, 416, 424, + 425, 426, 416, 423, 423, 428, 417, 427, 431, 427, + 430, 433, 430, 429, 429, 429, 432, 432, 432, 408, + 434, 408, 3, 3, 435, 3, 3, 436, 436, 244, + 244, 239, 239, 5, 437, 437, 437, 437, 441, 437, + 437, 437, 437, 438, 438, 439, 442, 439, 440, 440, + 443, 443, 444, }; static readonly short [] yyLen = { 2, 2, 0, 3, 1, 2, 4, 3, 1, 0, 1, @@ -8805,1557 +8838,1554 @@ void case_956() 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, 0, 12, 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, 0, 0, 0, 0, 0, + 16, 5, 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, 0, 12, 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, 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, - 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, 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, 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, 5, 0, 1, 0, 4, 4, 1, - 2, 2, 1, 1, 4, 2, 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, 5, 0, 0, 7, 0, - 0, 8, 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, 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, 5, 0, + 1, 0, 4, 4, 1, 2, 2, 1, 1, 4, + 2, 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, + 5, 0, 0, 7, 0, 0, 8, 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, 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, + 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, 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, 8, 0, 0, 0, 0, 0, 0, 0, 2, 4, - 0, 0, 11, 14, 0, 926, 0, 0, 930, 0, - 0, 15, 17, 18, 389, 395, 402, 390, 392, 0, - 391, 0, 398, 400, 387, 0, 394, 396, 388, 399, - 401, 397, 351, 947, 0, 393, 937, 0, 10, 1, - 0, 0, 0, 12, 0, 780, 0, 0, 0, 0, - 0, 0, 0, 0, 430, 0, 0, 0, 0, 0, - 0, 0, 428, 0, 0, 0, 486, 0, 429, 0, - 525, 0, 854, 0, 0, 0, 638, 0, 0, 0, - 0, 0, 0, 0, 688, 0, 737, 0, 0, 0, - 0, 0, 0, 0, 0, 427, 0, 627, 0, 779, - 720, 0, 0, 0, 0, 404, 405, 0, 407, 408, - 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, - 419, 420, 421, 422, 425, 426, 634, 557, 0, 553, - 554, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 635, 633, 636, 637, 704, 706, 0, 702, - 705, 721, 723, 724, 725, 726, 727, 728, 729, 730, - 731, 732, 722, 0, 0, 0, 781, 782, 798, 799, - 800, 801, 823, 824, 825, 826, 827, 828, 0, 0, - 0, 20, 0, 0, 0, 341, 0, 343, 934, 16, - 927, 0, 0, 254, 253, 250, 255, 256, 249, 268, - 267, 260, 261, 257, 259, 258, 262, 251, 252, 263, - 264, 270, 269, 265, 266, 0, 0, 950, 0, 939, - 0, 938, 3, 52, 0, 0, 0, 42, 39, 41, + 0, 0, 11, 14, 0, 913, 0, 0, 917, 0, + 0, 15, 17, 18, 374, 380, 387, 375, 377, 0, + 376, 0, 383, 385, 372, 0, 379, 381, 373, 384, + 386, 382, 336, 934, 0, 378, 924, 0, 10, 1, + 0, 0, 0, 12, 0, 767, 0, 0, 0, 0, + 0, 0, 0, 0, 415, 0, 0, 0, 0, 0, + 0, 0, 413, 0, 0, 0, 471, 0, 414, 0, + 510, 0, 841, 0, 0, 0, 623, 0, 0, 0, + 0, 0, 0, 0, 673, 0, 722, 0, 0, 0, + 0, 0, 0, 0, 0, 412, 0, 612, 0, 766, + 705, 0, 0, 0, 0, 389, 390, 0, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + 404, 405, 406, 407, 410, 411, 619, 542, 0, 538, + 539, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 620, 618, 621, 622, 689, 691, 0, 687, + 690, 706, 708, 709, 710, 711, 712, 713, 714, 715, + 716, 717, 707, 0, 0, 0, 768, 769, 785, 786, + 787, 788, 810, 811, 812, 813, 814, 815, 0, 0, + 0, 20, 0, 0, 0, 326, 0, 328, 921, 16, + 914, 0, 0, 239, 238, 235, 240, 241, 234, 253, + 252, 245, 246, 242, 244, 243, 247, 236, 237, 248, + 249, 255, 254, 250, 251, 0, 0, 937, 0, 926, + 0, 925, 3, 52, 0, 0, 0, 42, 39, 41, 43, 44, 45, 46, 47, 50, 13, 0, 0, 0, - 829, 431, 432, 852, 0, 0, 0, 0, 0, 0, - 406, 0, 830, 0, 547, 541, 546, 736, 778, 707, - 734, 733, 735, 708, 709, 710, 711, 712, 713, 714, - 715, 716, 717, 718, 719, 0, 0, 0, 804, 0, + 816, 416, 417, 839, 0, 0, 0, 0, 0, 0, + 391, 0, 817, 0, 532, 526, 531, 721, 765, 692, + 719, 718, 720, 693, 694, 695, 696, 697, 698, 699, + 700, 701, 702, 703, 704, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 839, 0, 403, 0, 0, 0, 0, 0, 0, - 853, 0, 0, 0, 750, 746, 0, 0, 0, 0, - 0, 0, 370, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 630, 556, 0, 0, 552, 558, 559, 551, - 563, 562, 560, 561, 0, 0, 623, 738, 536, 0, - 424, 423, 0, 0, 0, 0, 340, 0, 744, 745, - 0, 489, 490, 0, 0, 0, 742, 743, 0, 0, + 0, 826, 0, 388, 0, 0, 0, 0, 0, 0, + 840, 0, 0, 0, 735, 731, 0, 0, 0, 0, + 0, 0, 355, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 615, 541, 0, 0, 537, 543, 544, 536, + 548, 547, 545, 546, 0, 0, 608, 723, 521, 0, + 409, 408, 0, 0, 0, 0, 325, 0, 729, 730, + 0, 474, 475, 0, 0, 0, 727, 728, 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, 0, 929, 703, 751, 741, 0, 776, 777, 880, - 897, 0, 0, 0, 909, 868, 866, 890, 0, 0, - 888, 891, 892, 893, 894, 869, 867, 0, 0, 0, - 345, 0, 21, 0, 0, 0, 946, 0, 352, 0, - 0, 0, 948, 0, 0, 40, 660, 666, 658, 0, - 655, 665, 659, 657, 656, 663, 661, 662, 668, 664, - 667, 669, 0, 0, 653, 51, 488, 0, 0, 484, - 485, 0, 482, 0, 753, 0, 0, 0, 0, 774, - 775, 0, 0, 0, 642, 0, 833, 831, 643, 0, - 0, 510, 0, 0, 0, 501, 0, 505, 515, 517, - 0, 497, 0, 0, 0, 0, 0, 492, 0, 495, - 0, 499, 372, 834, 0, 0, 835, 843, 0, 0, - 0, 844, 0, 0, 855, 0, 0, 749, 0, 382, - 0, 378, 379, 0, 377, 380, 381, 0, 0, 0, - 564, 0, 0, 543, 625, 0, 701, 0, 0, 696, - 698, 699, 700, 435, 436, 837, 0, 0, 0, 348, - 349, 0, 192, 191, 193, 0, 0, 0, 0, 374, - 0, 610, 0, 0, 440, 0, 443, 0, 441, 0, - 0, 0, 0, 0, 0, 469, 472, 0, 0, 464, - 471, 470, 0, 599, 600, 601, 602, 603, 604, 605, - 606, 607, 609, 608, 565, 567, 566, 572, 573, 0, + 0, 0, 916, 688, 736, 726, 0, 763, 764, 867, + 884, 0, 0, 0, 896, 855, 853, 877, 0, 0, + 875, 878, 879, 880, 881, 856, 854, 0, 0, 0, + 330, 0, 21, 0, 0, 0, 933, 0, 337, 0, + 0, 0, 935, 0, 0, 40, 645, 651, 643, 0, + 640, 650, 644, 642, 641, 648, 646, 647, 653, 649, + 652, 654, 0, 0, 638, 51, 473, 0, 0, 469, + 470, 0, 467, 0, 738, 0, 0, 0, 0, 761, + 762, 0, 0, 0, 627, 0, 820, 818, 628, 0, + 0, 495, 0, 0, 0, 486, 0, 490, 500, 502, + 0, 482, 0, 0, 0, 0, 0, 477, 0, 480, + 0, 484, 357, 821, 0, 0, 822, 830, 0, 0, + 0, 831, 0, 0, 842, 0, 0, 734, 0, 367, + 0, 363, 364, 0, 362, 365, 366, 0, 0, 0, + 549, 0, 0, 528, 610, 0, 686, 0, 0, 681, + 683, 684, 685, 420, 421, 824, 0, 0, 0, 333, + 334, 0, 177, 176, 178, 0, 0, 0, 0, 359, + 0, 595, 0, 0, 425, 0, 428, 0, 426, 0, + 0, 0, 0, 0, 0, 454, 457, 0, 0, 449, + 456, 455, 0, 584, 585, 586, 587, 588, 589, 590, + 591, 592, 594, 593, 550, 552, 551, 557, 558, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 596, 0, 0, 514, 0, 0, - 0, 0, 0, 0, 0, 881, 883, 879, 0, 889, - 0, 0, 342, 944, 945, 366, 0, 0, 363, 0, - 0, 189, 0, 0, 954, 940, 942, 60, 58, 59, + 0, 0, 0, 0, 581, 0, 0, 499, 0, 0, + 0, 0, 0, 0, 0, 868, 870, 866, 0, 876, + 0, 0, 327, 931, 932, 351, 0, 0, 348, 0, + 0, 174, 0, 0, 941, 927, 929, 60, 58, 59, 0, 0, 53, 0, 0, 61, 63, 27, 25, 0, - 0, 0, 650, 0, 654, 439, 0, 487, 0, 538, - 0, 549, 179, 200, 0, 0, 169, 0, 0, 0, - 180, 542, 0, 857, 807, 0, 818, 805, 0, 809, - 0, 0, 0, 832, 0, 0, 0, 500, 0, 516, - 518, 0, 0, 456, 0, 0, 452, 0, 0, 479, - 0, 520, 494, 0, 155, 521, 153, 154, 523, 0, - 537, 0, 848, 0, 841, 0, 845, 529, 0, 0, - 0, 367, 0, 527, 0, 0, 539, 0, 860, 0, - 872, 0, 870, 0, 0, 640, 641, 0, 0, 0, - 690, 691, 689, 697, 836, 618, 624, 617, 0, 739, - 0, 347, 613, 0, 0, 0, 555, 444, 438, 442, - 437, 540, 478, 477, 474, 473, 0, 468, 433, 434, - 445, 0, 0, 757, 0, 0, 898, 874, 0, 899, - 0, 895, 0, 910, 0, 0, 0, 0, 878, 19, - 344, 687, 686, 0, 685, 0, 362, 956, 190, 951, - 0, 0, 54, 0, 0, 0, 0, 0, 0, 369, - 0, 644, 0, 0, 80, 79, 0, 483, 0, 0, - 0, 0, 0, 548, 0, 0, 0, 0, 0, 810, - 0, 0, 0, 0, 0, 856, 507, 506, 459, 0, - 0, 935, 936, 448, 454, 0, 457, 0, 481, 0, - 0, 0, 0, 0, 785, 851, 0, 842, 535, 530, - 0, 0, 526, 0, 863, 0, 802, 873, 871, 0, - 544, 626, 0, 622, 621, 620, 350, 612, 611, 628, - 476, 0, 466, 465, 598, 0, 771, 756, 0, 0, - 0, 760, 0, 876, 0, 903, 0, 918, 919, 912, - 882, 884, 924, 365, 364, 955, 0, 0, 62, 56, - 0, 64, 26, 23, 0, 0, 320, 0, 226, 0, - 101, 0, 77, 765, 128, 129, 0, 0, 0, 768, - 198, 199, 0, 0, 0, 0, 172, 181, 173, 175, - 0, 0, 0, 0, 814, 0, 819, 820, 0, 0, - 458, 460, 461, 455, 449, 453, 0, 512, 0, 480, - 491, 447, 524, 522, 0, 847, 0, 0, 531, 0, - 0, 639, 631, 0, 475, 0, 0, 752, 761, 875, - 0, 0, 0, 896, 0, 0, 0, 943, 0, 0, - 0, 69, 70, 73, 74, 0, 335, 326, 325, 0, - 645, 222, 97, 0, 754, 769, 184, 0, 196, 0, - 0, 0, 803, 865, 0, 0, 0, 821, 784, 496, - 493, 791, 0, 797, 0, 0, 789, 0, 794, 849, - 534, 533, 0, 0, 629, 0, 0, 877, 900, 0, - 0, 0, 914, 0, 925, 0, 75, 67, 0, 0, - 0, 321, 0, 0, 0, 0, 0, 185, 0, 176, - 174, 858, 811, 0, 0, 816, 0, 0, 786, 790, - 0, 795, 0, 861, 632, 0, 763, 0, 904, 921, - 922, 915, 885, 55, 0, 71, 72, 0, 0, 0, - 0, 0, 0, 0, 770, 183, 0, 195, 0, 0, - 822, 796, 0, 692, 850, 0, 772, 0, 0, 0, - 76, 0, 0, 336, 0, 322, 0, 330, 386, 385, - 0, 383, 674, 0, 646, 0, 675, 223, 98, 186, - 859, 806, 0, 862, 901, 0, 916, 0, 0, 0, - 0, 0, 0, 0, 0, 676, 0, 0, 0, 0, - 905, 29, 24, 337, 0, 0, 331, 384, 0, 0, - 0, 102, 99, 693, 0, 0, 0, 0, 323, 682, - 0, 683, 680, 0, 678, 95, 0, 94, 0, 0, + 0, 0, 635, 0, 639, 424, 0, 472, 0, 523, + 0, 534, 164, 185, 0, 0, 154, 0, 0, 0, + 165, 527, 0, 844, 794, 0, 805, 792, 0, 796, + 0, 0, 0, 819, 0, 0, 0, 485, 0, 501, + 503, 0, 0, 441, 0, 0, 437, 0, 0, 464, + 0, 505, 479, 0, 140, 506, 138, 139, 508, 0, + 522, 0, 835, 0, 828, 0, 832, 514, 0, 0, + 0, 352, 0, 512, 0, 0, 524, 0, 847, 0, + 859, 0, 857, 0, 0, 625, 626, 0, 0, 0, + 675, 676, 674, 682, 823, 603, 609, 602, 0, 724, + 0, 332, 598, 0, 0, 0, 540, 429, 423, 427, + 422, 525, 463, 462, 459, 458, 0, 453, 418, 419, + 430, 0, 0, 742, 0, 0, 885, 861, 0, 886, + 0, 882, 0, 897, 0, 0, 0, 0, 865, 19, + 329, 672, 671, 0, 670, 0, 347, 943, 175, 938, + 0, 0, 54, 0, 0, 0, 0, 0, 0, 354, + 0, 629, 0, 0, 80, 79, 0, 468, 0, 0, + 0, 0, 0, 533, 0, 0, 0, 0, 0, 797, + 0, 0, 0, 0, 0, 843, 492, 491, 444, 0, + 0, 922, 923, 433, 439, 0, 442, 0, 466, 0, + 0, 0, 0, 0, 772, 838, 0, 829, 520, 515, + 0, 0, 511, 0, 850, 0, 789, 860, 858, 0, + 529, 611, 0, 607, 606, 605, 335, 597, 596, 613, + 461, 0, 451, 450, 583, 0, 758, 741, 0, 0, + 0, 747, 0, 863, 0, 890, 0, 905, 906, 899, + 869, 871, 911, 350, 349, 942, 0, 0, 62, 56, + 0, 64, 26, 23, 0, 0, 305, 0, 211, 0, + 102, 0, 77, 752, 113, 114, 0, 0, 0, 755, + 183, 184, 0, 0, 0, 0, 157, 166, 158, 160, + 0, 0, 0, 0, 801, 0, 806, 807, 0, 0, + 443, 445, 446, 440, 434, 438, 0, 497, 0, 465, + 476, 432, 509, 507, 0, 834, 0, 0, 516, 0, + 0, 624, 616, 0, 460, 0, 0, 737, 748, 862, + 0, 0, 0, 883, 0, 0, 0, 930, 0, 0, + 0, 69, 70, 73, 74, 0, 320, 311, 310, 0, + 630, 207, 97, 0, 739, 756, 169, 0, 181, 0, + 0, 0, 790, 852, 0, 0, 0, 0, 808, 771, + 481, 478, 778, 0, 784, 0, 0, 776, 0, 781, + 836, 519, 518, 0, 0, 614, 0, 0, 864, 887, + 0, 0, 0, 901, 0, 912, 0, 75, 67, 0, + 0, 0, 306, 0, 0, 0, 0, 0, 170, 0, + 161, 159, 845, 798, 0, 0, 803, 0, 0, 773, + 777, 0, 782, 0, 848, 617, 0, 750, 0, 891, + 908, 909, 902, 872, 55, 0, 71, 72, 0, 0, + 0, 0, 0, 0, 0, 757, 168, 0, 180, 0, + 0, 809, 783, 0, 677, 837, 0, 759, 0, 0, + 0, 76, 0, 0, 321, 0, 307, 0, 315, 371, + 370, 0, 368, 659, 0, 631, 0, 660, 208, 98, + 171, 846, 793, 0, 849, 888, 0, 903, 0, 0, + 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, + 0, 892, 29, 24, 322, 0, 0, 316, 369, 0, + 0, 0, 99, 678, 0, 0, 0, 0, 308, 667, + 0, 668, 665, 0, 663, 95, 0, 94, 0, 0, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 156, 0, 0, 239, 231, 232, 233, 234, 235, 236, - 237, 238, 0, 0, 229, 0, 0, 0, 902, 0, - 338, 334, 0, 0, 0, 647, 84, 0, 282, 277, - 281, 0, 224, 230, 116, 108, 109, 110, 111, 112, - 113, 114, 115, 117, 0, 0, 106, 100, 908, 906, - 681, 679, 0, 0, 0, 0, 0, 0, 0, 290, - 0, 0, 240, 0, 0, 248, 0, 167, 157, 166, - 0, 103, 107, 0, 0, 276, 0, 0, 275, 0, - 161, 0, 0, 356, 0, 354, 0, 0, 201, 0, - 0, 0, 0, 0, 648, 225, 118, 0, 353, 0, - 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, - 158, 0, 0, 205, 0, 357, 0, 243, 242, 241, - 0, 0, 294, 0, 273, 134, 0, 271, 0, 0, - 0, 136, 0, 358, 0, 0, 202, 0, 0, 0, - 355, 246, 127, 125, 0, 0, 298, 0, 0, 0, - 0, 0, 162, 0, 279, 0, 0, 0, 0, 140, - 0, 0, 0, 0, 359, 360, 0, 0, 0, 0, - 0, 122, 313, 0, 295, 0, 0, 307, 0, 0, - 0, 302, 0, 152, 0, 0, 0, 0, 147, 0, - 0, 291, 0, 137, 0, 131, 141, 159, 165, 213, - 0, 203, 0, 0, 0, 0, 126, 0, 119, 123, - 0, 0, 0, 309, 0, 310, 299, 0, 0, 293, - 303, 274, 0, 0, 133, 148, 272, 0, 289, 0, - 280, 284, 143, 0, 0, 0, 210, 212, 206, 247, - 124, 314, 316, 296, 0, 0, 308, 305, 151, 149, - 163, 0, 0, 0, 160, 214, 216, 204, 0, 0, - 0, 307, 0, 285, 287, 144, 0, 0, 207, 318, - 319, 315, 317, 306, 164, 0, 0, 220, 219, 218, - 215, 217, 0, 0, 0, 208, 286, 288, + 141, 0, 0, 224, 216, 217, 218, 219, 220, 221, + 222, 223, 0, 0, 214, 0, 0, 889, 0, 323, + 319, 0, 0, 0, 632, 84, 0, 267, 262, 266, + 0, 209, 215, 0, 895, 893, 666, 664, 0, 0, + 0, 0, 0, 0, 0, 275, 0, 0, 225, 0, + 0, 233, 0, 152, 142, 151, 0, 100, 0, 0, + 261, 0, 0, 260, 0, 146, 0, 0, 341, 0, + 339, 0, 0, 186, 0, 0, 0, 0, 0, 633, + 210, 0, 103, 0, 338, 0, 0, 0, 0, 117, + 0, 0, 0, 0, 0, 0, 143, 0, 0, 190, + 0, 342, 0, 228, 227, 226, 0, 101, 0, 279, + 0, 258, 119, 0, 256, 0, 0, 0, 121, 0, + 343, 0, 0, 187, 0, 0, 0, 340, 231, 112, + 110, 0, 0, 283, 0, 0, 0, 0, 0, 147, + 0, 264, 0, 0, 0, 0, 125, 0, 0, 0, + 0, 344, 345, 0, 0, 0, 0, 0, 107, 298, + 0, 280, 0, 0, 292, 0, 0, 0, 287, 0, + 137, 0, 0, 0, 0, 132, 0, 0, 276, 0, + 122, 0, 116, 126, 144, 150, 198, 0, 188, 0, + 0, 0, 0, 111, 0, 104, 108, 0, 0, 0, + 294, 0, 295, 284, 0, 0, 278, 288, 259, 0, + 0, 118, 133, 257, 0, 274, 0, 265, 269, 128, + 0, 0, 0, 195, 197, 191, 232, 109, 299, 301, + 281, 0, 0, 293, 290, 136, 134, 148, 0, 0, + 0, 145, 199, 201, 189, 0, 0, 0, 292, 0, + 270, 272, 129, 0, 0, 192, 303, 304, 300, 302, + 291, 149, 0, 0, 205, 204, 203, 200, 202, 0, + 0, 0, 193, 271, 273, }; protected static readonly short [] yyDgoto = { 7, 8, 50, 9, 51, 10, 11, 52, 235, 685, 429, 12, 13, 53, 22, 23, 24, 321, 195, 238, 670, - 828, 1016, 1133, 1480, 825, 239, 240, 241, 242, 243, + 828, 1016, 1134, 1467, 825, 239, 240, 241, 242, 243, 244, 245, 246, 663, 444, 664, 665, 928, 666, 667, - 932, 826, 1011, 1012, 1013, 269, 587, 1105, 837, 1199, + 932, 826, 1011, 1012, 1013, 269, 587, 1106, 837, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, - 1210, 463, 674, 1296, 942, 1112, 1075, 1145, 1183, 1168, - 1227, 1255, 1226, 1256, 1257, 1140, 1355, 1332, 1380, 1381, - 1382, 944, 1378, 945, 728, 1272, 1343, 1319, 1368, 512, - 1361, 1337, 1397, 907, 1366, 1369, 1370, 1464, 1398, 1399, - 1395, 1211, 1279, 1238, 1297, 686, 1345, 1444, 1316, 1401, - 1473, 464, 270, 687, 688, 689, 690, 691, 650, 568, - 1117, 651, 652, 843, 1299, 1323, 1412, 1373, 1446, 1300, - 1348, 1469, 1493, 1413, 1414, 1491, 1477, 1478, 940, 1074, - 1167, 1223, 1281, 1224, 1225, 1273, 1330, 1303, 1274, 323, - 226, 1377, 1276, 1362, 1359, 1212, 1240, 1293, 1441, 1403, - 1125, 1442, 588, 1486, 1487, 1292, 1358, 1334, 1390, 1385, - 1356, 1422, 1427, 1388, 1391, 1392, 1472, 1428, 1386, 1387, - 1482, 1470, 1471, 937, 1020, 1136, 1110, 1161, 1137, 1138, - 1175, 1071, 1159, 1187, 532, 196, 112, 431, 198, 562, - 439, 227, 1311, 648, 649, 814, 830, 324, 406, 530, - 303, 1141, 1142, 46, 114, 304, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 255, 791, 981, - 508, 715, 864, 716, 717, 974, 137, 201, 721, 589, - 590, 591, 592, 785, 472, 473, 298, 979, 723, 407, - 300, 495, 496, 497, 498, 501, 730, 310, 745, 746, - 880, 266, 478, 758, 267, 477, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 571, 572, 573, 767, 768, 896, 769, - 155, 558, 759, 353, 994, 546, 1054, 156, 490, 938, - 1073, 1165, 1277, 465, 1146, 1147, 1194, 1195, 815, 548, - 335, 763, 1153, 549, 550, 271, 272, 273, 159, 160, - 161, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 173, 286, 559, 174, 175, 317, 796, - 627, 910, 840, 681, 948, 908, 911, 912, 949, 950, - 287, 176, 177, 178, 1045, 985, 1046, 1047, 1048, 1091, - 1049, 179, 180, 181, 182, 698, 483, 699, 966, 1084, - 700, 964, 701, 1086, 1087, 183, 184, 185, 186, 187, - 188, 305, 521, 522, 987, 1093, 313, 963, 849, 1119, - 886, 1126, 189, 417, 190, 418, 913, 1001, 419, 639, - 809, 806, 807, 1006, 420, 421, 422, 423, 424, 425, - 917, 629, 915, 1098, 1170, 1229, 1003, 1129, 1186, 804, - 635, 805, 1062, 1005, 1063, 1130, 1007, 17, 19, 47, - 48, 230, 653, 822, 440, 654, 655, + 1210, 463, 674, 1281, 942, 1113, 1076, 1146, 1169, 1226, + 1292, 1141, 1342, 1319, 1367, 1368, 1369, 944, 1365, 945, + 728, 1258, 1330, 1305, 1355, 512, 1348, 1324, 1384, 907, + 1353, 1356, 1357, 1451, 1385, 1386, 1382, 1211, 1265, 1237, + 1282, 686, 1332, 1431, 1302, 1388, 1460, 464, 270, 687, + 688, 689, 690, 691, 650, 568, 1118, 651, 652, 843, + 1284, 1309, 1399, 1360, 1433, 1285, 1335, 1456, 1480, 1400, + 1401, 1478, 1464, 1465, 940, 1075, 1168, 1223, 1267, 1224, + 1225, 1259, 1316, 1288, 1260, 323, 226, 1364, 1262, 1349, + 1346, 1212, 1239, 1278, 1428, 1390, 1126, 1429, 588, 1473, + 1474, 1277, 1345, 1321, 1377, 1372, 1343, 1409, 1414, 1375, + 1378, 1379, 1459, 1415, 1373, 1374, 1469, 1457, 1458, 937, + 1020, 1137, 1111, 1162, 1138, 1139, 1176, 1072, 1160, 1187, + 532, 196, 112, 431, 198, 562, 439, 227, 1297, 648, + 649, 814, 830, 324, 406, 530, 303, 1142, 1143, 46, + 114, 304, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 255, 791, 981, 508, 715, 864, 716, + 717, 974, 137, 201, 721, 589, 590, 591, 592, 785, + 472, 473, 298, 979, 723, 407, 300, 495, 496, 497, + 498, 501, 730, 310, 745, 746, 880, 266, 478, 758, + 267, 477, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 571, + 572, 573, 767, 768, 896, 769, 155, 558, 759, 353, + 994, 546, 1055, 156, 490, 938, 1074, 1166, 1263, 465, + 1147, 1148, 1194, 1195, 815, 548, 335, 763, 1154, 549, + 550, 271, 272, 273, 159, 160, 161, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 173, + 286, 559, 174, 175, 317, 796, 627, 910, 840, 681, + 948, 908, 911, 1036, 912, 949, 950, 287, 176, 177, + 178, 1046, 985, 1047, 1048, 1049, 1092, 1050, 179, 180, + 181, 182, 698, 483, 699, 966, 1085, 700, 964, 701, + 1087, 1088, 183, 184, 185, 186, 187, 188, 305, 521, + 522, 987, 1094, 313, 963, 849, 1120, 886, 1127, 189, + 417, 190, 418, 913, 1001, 419, 639, 809, 806, 807, + 1006, 420, 421, 422, 423, 424, 425, 917, 629, 915, + 1099, 1171, 1228, 1003, 1130, 1186, 804, 635, 805, 1063, + 1005, 1064, 1131, 1007, 17, 19, 47, 48, 230, 653, + 822, 440, 654, 655, }; - protected static readonly short [] yySindex = { -157, - 0, -201, -137, -18, 44,11653, 0, 248, 0, 0, - 44, -18, 0, 0, 104, 0, 6498, 44, 0, -196, - -237, 0, 0, 0, 0, 0, 0, 0, 0, 99, - 0, 223, 0, 0, 0, 1006, 0, 0, 0, 0, - 0, 0, 0, 0, 93, 0, 0, 544, 0, 0, - 248, 259, 44, 0, 258, 0, 87, 294, 353,11153, - 318, -29, 328, 6655, 0, -29, -29, -29, -175, -29, - -29, 587, 0,10172, -29, -29, 0,10172, 0, 388, - 0, 353, 0, -29, 330, -29, 0, 8204,11672, 390, - -29, -29, -162,10976, 0,10172, 0,10852,10852,10852, -10852,10852,10852,10852,10852, 0, -103, 0,11726, 0, - 0, 363, -260, 795, 302, 0, 0, 447, 0, 0, + protected static readonly short [] yySindex = { -213, + 0, -208, -132, -211, -24,11730, 0, 74, 0, 0, + -24, -211, 0, 0, -82, 0, 6706, -24, 0, -203, + -261, 0, 0, 0, 0, 0, 0, 0, 0, 145, + 0, 163, 0, 0, 0, 492, 0, 0, 0, 0, + 0, 0, 0, 0, 371, 0, 0, 484, 0, 0, + 74, 117, -24, 0, 158, 0, 21, 197, -253,11230, + 221, 170, 256, 6863, 0, 170, 170, 170, -184, 170, + 170, 526, 0,10249, 170, 170, 0,10249, 0, 236, + 0, -253, 0, 170, 249, 170, 0, 8412,11309, 392, + 170, 170, -189,11053, 0,10249, 0,10929,10929,10929, +10929,10929,10929,10929,10929, 0, -125, 0,11749, 0, + 0, 190, 281, 338, 223, 0, 0, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1069, 0, - 0, 685, 66, 498, 616, 597, 456, 462, 480, 505, - 137, 548, 0, 0, 0, 0, 0, 0, 3318, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 688, 0, + 0, 657, 73, 473, 411, 615, 418, 442, 467, 512, + -286, 538, 0, 0, 0, 0, 0, 0, 3369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 571, 600, -285, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -105, 95, - 259, 0, 401, 606, 627, 0, 615, 0, 0, 0, - 0,11726,11726, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 505, 569, -55, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -188, -153, + 117, 0, 400, 570, 592, 0, 557, 0, 0, 0, + 0,11749,11749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 674, 633, 0, 646, 0, - -249, 0, 0, 0, 259,12475, 259, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 830, 688,10308, - 0, 0, 0, 0,10172, -29, -29, 834, 512, 795, - 0, 698, 0,11726, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 635, 602, 0, 619, 0, + -226, 0, 0, 0, 117, 3043, 117, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 764, 634,10385, + 0, 0, 0, 0,10249, 170, 170, 790, 345, 338, + 0, 637, 0,11749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 801, 74,11153, 0,11726, -10172, 757, 776,10172,10172, 4520, 326, 109, 779,11743, - 264, 0, 782, 0, 822,11726,10172, 840, 516, -29, - 0,10172, 388, 9628, 0, 0, 330,10172, 330, -205, - 547, 803, 0, 600, 302, -1, 810,10172,10172,10172, - 328, 892, 0, 0, 6812, -56, 0, 0, 0, 0, - 0, 0, 0, 0, 870,10172, 0, 0, 0, 1324, - 0, 0,11582, -289, 860, 839, 0, -84, 0, 0, - 263, 0, 0, 842,10308, 9356, 0, 0,10852,10172, -10172,10172,10172,10172,10172,10172,10172,10172,10172,10172, -10852,10852,10852,11726,11726,10852,10852,10852,10852,10852, -10852,10852,10852,10852,10852,10852,10852,10852,10852,10852, -10852,10172, 0, 0, 0, 0, 600, 0, 0, 0, - 0,11797,11821, 849, 0, 0, 0, 0, 33, 856, - 0, 0, 0, 0, 0, 0, 0, 259, 259, 853, - 0, 867, 0, 839, 674, 674, 0, -86, 0, -206, - 674, 909, 0, -198,12475, 0, 0, 0, 0, -192, + 0, 0, 0, 0, 0, 733, -49,11230, 0,11749, +10249, 705, 708,10249,10249, 4571, 435, -83, 736,11803, + 71, 0, 727, 0, 734,11749,10249, 741, 83, 170, + 0,10249, 236, 9705, 0, 0, 249,10249, 249, -230, + 562, 707, 0, 569, 223, 12, 718,10249,10249,10249, + 256, 763, 0, 0, 7020, -244, 0, 0, 0, 0, + 0, 0, 0, 0, 765,10249, 0, 0, 0, 940, + 0, 0,11659, -279, 771, 747, 0, -84, 0, 0, + 270, 0, 0, 729,10385, 9433, 0, 0,10929,10249, +10249,10249,10249,10249,10249,10249,10249,10249,10249,10249, +10929,10929,10929,11749,11749,10929,10929,10929,10929,10929, +10929,10929,10929,10929,10929,10929,10929,10929,10929,10929, +10929,10249, 0, 0, 0, 0, 569, 0, 0, 0, + 0,11820,11874, 748, 0, 0, 0, 0, 82, 686, + 0, 0, 0, 0, 0, 0, 0, 117, 117, 750, + 0, 754, 0, 747, 635, 635, 0, -161, 0, 591, + 635, 786, 0, -191, 3043, 0, 0, 0, 0, -186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 235,12518, 0, 0, 0, 839, 419, 0, - 0, 561, 0, 886, 0, 920, 67, 388, -29, 0, - 0, 881, 7735, -147, 0, 940, 0, 0, 0, 945, - 946, 0, 417, 0, 951, 0, 947, 0, 0, 0, - 680, 0, 7871, 681,10172, 779, 9356, 0, 7283, 0, - 330, 0, 0, 0, 948, 950, 0, 0, 353, 388, - 267, 0, 4201, 952, 0, 953, 908, 0, 956, 0, -10172, 0, 0, 1035, 0, 0, 0,10172, 1036, 972, - 0, 975, 976, 0, 0,11582, 0, -288, 6812, 0, - 0, 0, 0, 0, 0, 0, 974, 388, 6812, 0, - 0, -286, 0, 0, 0, 330, -289, 935,11871, 0, - 980, 0, 987,10852, 0, 275, 0, 349, 0, 839, - 793,10172,10172, 994, 1110, 0, 0, -36, 993, 0, - 0, 0, 685, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 685, - 685, 66, 66, 498, 498, 498, 498, 616, 616, 597, - 456, 462, 480, 505, 0, 995, -186, 0,10172, 80, - 955, 113, 957, 996,10172, 0, 0, 0, 1012, 0, - 200, 839, 0, 0, 0, 0, 517, 242, 0,11871, - -206, 0, 997, 1000, 0, 0, 0, 0, 0, 0, - -289, 606, 0, 1001, 1005, 0, 0, 0, 0, 1007, -11895, 963, 0, 361, 0, 0, 542, 0,10308, 0, - 1016, 0, 0, 0, 711, 1010, 0, 1041, 1042, 1044, - 0, 0,10172, 0, 0, 1002, 0, 0, 1043, 0, - 1049,10172, 1130, 0, 6655, 6655, 8030, 0, 4520, 0, - 0, 9764, 236, 0, -281, 58, 0, 999, 1003, 0, - -185, 0, 0, 1053, 0, 0, 0, 0, 0, 1055, - 0, 1063, 0, 4360, 0, 388, 0, 0, 330, 428, - 573, 0, 1013, 0, 1060, 1061, 0, 6655, 0, 6655, - 0,10172, 0,10172,11726, 0, 0, 388, 388, 1066, - 0, 0, 0, 0, 0, 0, 0, 0, 8187, 0, -11726, 0, 0, 1015,11582, 1092, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9220, 0, 0, 0, - 0, 9492,10172, 0, 7440, 1065, 0, 0, 1146, 0, - 1147, 0, 667, 0, 1068,10172,10172, 1025, 0, 0, - 0, 0, 0, 1028, 0, -86, 0, 0, 0, 0, - -206, -206, 0, 853, 1075, 1078, 1033, 1085, 963, 0, - 1079, 0, 1197, 1199, 0, 0,10172, 0, 9900, 1082, - 711,11871,11726, 0, 128, 1203, 1205, 1090, 1086, 0, -10172,10172, 1094,10172, 1188, 0, 0, 0, 0, 31, -10036, 0, 0, 0, 0, 7576, 0, 1225, 0, 600, -10172, 1115, 8030, 1116, 0, 0, 1067, 0, 0, 0, - 1072, 556, 0, 1073, 0, 1086, 0, 0, 0, 1111, - 0, 0, 1143, 0, 0, 0, 0, 0, 0, 0, - 0, 637, 0, 0, 0,11743, 0, 0, 1074, 1117, - 1065, 0,10172, 0,10172, 0,10172, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1125, 853, 0, 0, -10444, 0, 0, 0, 1136, 7300, 0, 963, 0, 963, - 0, 963, 0, 0, 0, 0, 1091, 1132, 1082, 0, - 0, 0, -188, -181, 1113, 1137, 0, 0, 0, 0, - 1134, 8030, 1065, -186, 0, 1138, 0, 0, 1140, 6655, - 0, 0, 0, 0, 0, 0, 1145, 0, 779, 0, - 0, 0, 0, 0, -203, 0, 1141, 556, 0, 1095, - 1065, 0, 0, 388, 0, 1096, 1142, 0, 0, 0, -10172, 1180,10172, 0,10172, 1179, 461, 0, 1005, 238, - 762, 0, 0, 0, 0, -18, 0, 0, 0, 1164, - 0, 0, 0, 1155, 0, 0, 0, 481, 0, 1156, - 1285, 1287, 0, 0, 1181, 1065,10172, 0, 0, 0, - 0, 0,10172, 0, 1184, -191, 0, -191, 0, 0, - 0, 0, 1182, 388, 0,10172, 7440, 0, 0, 1208, - 702, 1183, 0,10172, 0, 1186, 0, 0,10444, 44, - 67, 0, 1185, 1185, 1185, 9900, 1189, 0,10172, 0, - 0, 0, 0, 1192, 1049, 0, 6655, 1190, 0, 0, - 6812, 0, 1191, 0, 0, 1202, 0,10172, 0, 0, - 0, 0, 0, 0,10172, 0, 0, 259, 1195, 259, - 7457, 71, 71, 71, 0, 0,10172, 0, 6655, 6655, - 0, 0, 6812, 0, 0, 6655, 0, 1213,10172,10172, - 0, 259, 1201, 0, 1157, 0, 1204, 0, 0, 0, - 1207, 0, 0, 1158, 0, 1234, 0, 0, 0, 0, - 0, 0, 6812, 0, 0, 1235, 0, 1206, 71, 0, - 1216, 259, 7457, 1210, 1219, 0, 1220, 1221, 1224,10172, - 0, 0, 0, 0, 1212, 1206, 0, 0,11232, -65, - 259, 0, 0, 0, 1239,10172, 1222,10172, 0, 0, - 1226, 0, 0, 1228, 0, 0,12518, 0, 1232, -65, + 0, 0, 47,12527, 0, 0, 0, 747, 172, 0, + 0, 475, 0, 806, 0, 828, 131, 236, 170, 0, + 0, 758, 7943, -221, 0, 794, 0, 0, 0, 829, + 830, 0, 343, 0, 836, 0, 832, 0, 0, 0, + 572, 0, 8079, 684,10249, 736, 9433, 0, 7491, 0, + 249, 0, 0, 0, 837, 839, 0, 0, -253, 236, + -103, 0, 4252, 840, 0, 842, 799, 0, 844, 0, +10249, 0, 0, 914, 0, 0, 0,10249, 924, 846, + 0, 849, 851, 0, 0,11659, 0, -59, 7020, 0, + 0, 0, 0, 0, 0, 0, 853, 236, 7020, 0, + 0, 195, 0, 0, 0, 249, -279, 807,11898, 0, + 856, 0, 859,10929, 0, 273, 0, 289, 0, 747, + 691,10249,10249, 862, 981, 0, 0, -31, 864, 0, + 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 657, + 657, 73, 73, 473, 473, 473, 473, 411, 411, 615, + 418, 442, 467, 512, 0, 866, -209, 0,10249, 22, + 821, 26, 831, 865,10249, 0, 0, 0, 891, 0, + 349, 747, 0, 0, 0, 0, 364, 233, 0,11898, + 591, 0, 876, 878, 0, 0, 0, 0, 0, 0, + -279, 570, 0, 879, 883, 0, 0, 0, 0, 886, +11948, 843, 0, -175, 0, 0, 347, 0,10385, 0, + 888, 0, 0, 0, 441, 892, 0, 898, 899, 904, + 0, 0,10249, 0, 0, 861, 0, 0, 884, 0, + 906,10249, 987, 0, 6863, 6863, 8238, 0, 4571, 0, + 0, 9841, 187, 0, -30, -87, 0, 854, 863, 0, + 48, 0, 0, 910, 0, 0, 0, 0, 0, 911, + 0, 920, 0, 4411, 0, 236, 0, 0, 249, 452, + 568, 0, 870, 0, 918, 926, 0, 6863, 0, 6863, + 0,10249, 0,10249,11749, 0, 0, 236, 236, 919, + 0, 0, 0, 0, 0, 0, 0, 0, 8395, 0, +11749, 0, 0, 875,11659, 954, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9297, 0, 0, 0, + 0, 9569,10249, 0, 7648, 927, 0, 0, 1006, 0, + 1008, 0, 778, 0, 929,10249,10249, 887, 0, 0, + 0, 0, 0, 890, 0, -161, 0, 0, 0, 0, + 591, 591, 0, 750, 934, 935, 893, 942, 843, 0, + 937, 0, 1054, 1058, 0, 0,10249, 0, 9977, 943, + 441,11898,11749, 0, -19, 1060, 1062, 947, 941, 0, +10249,10249, 949,10249, 1043, 0, 0, 0, 0, -101, +10113, 0, 0, 0, 0, 7784, 0, 1068, 0, 569, +10249, 961, 8238, 963, 0, 0, 921, 0, 0, 0, + 923, 383, 0, 925, 0, 941, 0, 0, 0, 957, + 0, 0, 994, 0, 0, 0, 0, 0, 0, 0, + 0, 533, 0, 0, 0,11803, 0, 0, 928, 966, + 927, 0,10249, 0,10249, 0,10249, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 975, 750, 0, 0, +10521, 0, 0, 0, 976, 7508, 0, 843, 0, 843, + 0, 843, 0, 0, 0, 0, 933, 979, 943, 0, + 0, 0, -179, -176, 978, 983, 0, 0, 0, 0, + 984, 8238, 927, -209, 0, 986, 0, 0, 991, 6863, + 0, 0, 0, 0, 0, 0, 996, 0, 736, 0, + 0, 0, 0, 0, -196, 0, 992, 383, 0, 950, + 927, 0, 0, 236, 0, 945, 989, 0, 0, 0, +10249, 1026,10249, 0,10249, 1024, 185, 0, 883, 144, + 543, 0, 0, 0, 0, -211, 0, 0, 0, 1009, + 0, 0, 0, 998, 0, 0, 0, 374, 0, 999, + 1126, 1127, 0, 0, 927, 1012, 927,10249, 0, 0, + 0, 0, 0,10249, 0, 1018, -178, 0, -178, 0, + 0, 0, 0, 1015, 236, 0,10249, 7648, 0, 0, + 1041, 797, 1017, 0,10249, 0, 1019, 0, 0,10521, + -24, 131, 0, 1020, 1020, 1020, 9977, 1030, 0,10249, + 0, 0, 0, 0, 1021, 906, 0, 6863, 1028, 0, + 0, 7020, 0, 1029, 0, 0, 1031, 0,10249, 0, + 0, 0, 0, 0, 0,10249, 0, 0, 117, 1033, + 117, 7665, -180, -180, -180, 0, 0,10249, 0, 6863, + 6863, 0, 0, 7020, 0, 0, 6863, 0, 1059,10249, +10249, 0, 117, 1040, 0, 993, 0, 1036, 0, 0, + 0, 1039, 0, 0, 1003, 0, 1075, 0, 0, 0, + 0, 0, 0, 7020, 0, 0, 1069, 0, 1046, -180, + 0, 1048, 117, 7665, 1051, 1056, 0, 1061, 1063, 1067, +10249, 0, 0, 0, 0, 1050, 1046, 0, 0, 1102, + -147, 117, 0, 0, 1071,10249, 1053,10249, 0, 0, + 1066, 0, 0, 1064, 0, 0,12527, 0, 1072, -147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -262,12518, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1238, 259, 0, 259, 1206, 1178, 0, 1239, - 0, 0, 1236,11232,11398, 0, 0, -255, 0, 0, - 0,11430, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1242, 259, 0, 0, 0, 0, - 0, 0,11726,11726, 225,11743, 316, 330, 1270, 0, - -289, 640, 0, 1306, 0, 0, 1206, 0, 0, 0, - 1206, 0, 0, 1198, 1200, 0,11726, -164, 0,11726, - 0, 1209, 1244, 0, -289, 0, 1246, 9112, 0, 1251, - 1211, -46, 351, 1006, 0, 0, 0, -289, 0, 1254, - 1214, 1252, 1237, 0, 1255, 1200, 1260, 67, 1241, 1261, - 0, 1262, 1258, 0, 839, 0, 678, 0, 0, 0, - 1264, -184, 0, 1266, 0, 0, 1267, 0, 1268, 1271, - 1273, 0, 1274, 0, 67, 67, 0, 67, 1276, 1277, - 0, 0, 0, 0, 1278, 62, 0, 1282, 67, 1401, - 1286, 67, 0, -255, 0, 8030, 1245, 1283, 1274, 0, - 1290, 1292, 77, 1295, 0, 0, 67, 9900, 1248, 1291, - 1278, 0, 0,12518, 0, 259, 259, 0, 1250, 1293, - 1282, 0, 1298, 0,10172, 1257, 1296, 1286, 0, 1301, - 67, 0, -77, 0, 1299, 0, 0, 0, 0, 0, -12518, 0, 77, 77, 1309, 1305, 0, -184, 0, 0, - 219, 1311,12518, 0,12518, 0, 0, 8030, 1300, 0, - 0, 0, 1312, 1267, 0, 0, 0, 1316, 0, 20, - 0, 0, 0, 71, 848, 1321, 0, 0, 0, 0, - 0, 0, 0, 0, 1375, 1428, 0, 0, 0, 0, - 0, 1323, 1325, 8030, 0, 0, 0, 0, 77, 412, - 412, 0, 71, 0, 0, 0, 110, 110, 0, 0, - 0, 0, 0, 0, 0, 9356, 9356, 0, 0, 0, - 0, 0, 1327, 1326, 1331, 0, 0, 0, + 0, 237,12527, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1074, 117, 0, -147, 1025, 0, 1071, 0, + 0, 1076, 1102,11475, 0, 0, 257, 0, 0, 0, +11507, 0, 0, 1078, 0, 0, 0, 0,11749,11749, + 290,11803, 301, 249, 1110, 0, -279, 9222, 0, 1144, + 0, 0, 1046, 0, 0, 0, 1046, 0, 1032, 1037, + 0,11749, -171, 0,11749, 0, 1042, 1083, 0, -279, + 0, 1087, 1023, 0, 1090, 1044, -76, 389, 492, 0, + 0, 1046, 0, -279, 0, 1094, 1070, 1093, 1092, 0, + 1098, 1037, 1119, 131, 1111, 1118, 0, 1123, 1128, 0, + 747, 0, 745, 0, 0, 0, 1125, 0, -194, 0, + 1116, 0, 0, 1129, 0, 1130, 1131, 1133, 0, 1132, + 0, 131, 131, 0, 131, 1134, 1135, 0, 0, 0, + 0, 1136, -99, 0, 1137, 131, 1243, 1138, 131, 0, + 257, 0, 8238, 1082, 1139, 1132, 0, 1142, 1145, -51, + 1148, 0, 0, 131, 9977, 1101, 1146, 1136, 0, 0, +12527, 0, 117, 117, 0, 1103, 1147, 1137, 0, 1152, + 0,10249, 1107, 1150, 1138, 0, 1155, 131, 0, -185, + 0, 1121, 0, 0, 0, 0, 0,12527, 0, -51, + -51, 1163, 1159, 0, -194, 0, 0, 176, 1164,12527, + 0,12527, 0, 0, 8238, 1154, 0, 0, 0, 1166, + 1129, 0, 0, 0, 1165, 0, -163, 0, 0, 0, + -180, 798, 1170, 0, 0, 0, 0, 0, 0, 0, + 0, 1225, 1282, 0, 0, 0, 0, 0, 1175, 1176, + 8238, 0, 0, 0, 0, -51, 483, 483, 0, -180, + 0, 0, 0, -173, -173, 0, 0, 0, 0, 0, + 0, 0, 9433, 9433, 0, 0, 0, 0, 0, 1180, + 1179, 1184, 0, 0, 0, }; - protected static readonly short [] yyRindex = { 2851, - 0, 0, 6969, 2851, 0, 0, 0, 1704, 0, 0, - 3004, 2782, 0, 0, 0, 0, 0, 3004, 0, 0, - 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, + protected static readonly short [] yyRindex = { 1232, + 0, 0, 7177, 1232, 0, 0, 0, 1552, 0, 0, + 2999, 2824, 0, 0, 0, 0, 0, 2999, 0, 0, + 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1708, 0, 0, 1708, 0, 0, - 1704, 3047, 2898, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1342, 0, 0, 0, 0, 0, 0, 0, - 0,11949, 0, 1334, 0, 0, 0, 1334, 0, 0, - 0, 0, 0, 0, 206, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1557, 0, 0, 1557, 0, 0, + 1552, 3086, 2893, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1191, 0, 0, 0, 0, 0, 0, 0, + 0,11972, 0, 1185, 0, 0, 0, 1185, 0, 0, + 0, 0, 0, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3630, 0, 0, 0, - 0, 0, 313, 4518, 3789, 0, 0, 4359, 0, 0, + 0, 0, 0, 0, 0, 0, 6546, 0, 0, 0, + 0, 0, 230, 4569, 3840, 0, 0, 4410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4674, 0, - 0, 4742, 5086, 5290, 5630, 358, 5902, 6038, 6174, 6310, - -194, 293, 0, 0, 0, 0, 0, 0, 42, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4725, 0, + 0, 4793, 5137, 5341, 5681, 5885, 6021, 6157, 6293, 6429, + 4656, 2446, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1294, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 939, 939, - 3090, 0, 595, 1337, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1151, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 815, 815, + 3149, 0, 409, 1186, 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, 1708, 228, 0, 0, 0, - 0, 0, 0, 0, 3133, 402, 3176, 0, 0, 0, + 0, 0, 0, 0, 0, 1557, 108, 0, 0, 0, + 0, 0, 0, 0, 3196, 333, 3243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3405, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3456, 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, 0, 0, 0, 1350, 0, 0, 0, 0, - 3405, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2039, 0, 1150, 692, - 2169, 0, 0, 2316, 2169, 692, 0, 0, 0, 0, - 1342, 0, 0, 0, 145, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1334, 0, 0, 0, 0, - 0, 0, 1349, 2441, 0, 3405, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -35, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1195, 0, 0, 0, 0, + 3456, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2082, 0, 2484, 320, + 2212, 0, 0, 2359, 2212, 320, 0, 0, 0, 0, + 1191, 0, 0, 0, -21, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, + 0, 0, 1192, 1463, 0, 3456, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 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, 0, - 0, 0, 0, 0, 0, 0, 1422, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, - 0, 0, 0, 0, 0, 0, 0, 3239, 2606, 0, - 0, 0, 0, 1886, 1708, 1708, 0, -122, 0, 7752, - 1708, 1722, 0, 0, 45, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1298, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, + 0, 0, 0, 0, 0, 0, 0, 3290, 2642, 0, + 0, 0, 0, 1929, 1557, 1557, 0, -170, 0, 7960, + 1557, 1566, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 364,11085, 0, 0, 0, 3405, 3948, 0, - 0, 0, 0, 0, 0, 0,11474, 0, 0, 0, - 0, 0, 1354, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 731, 818, 0, 0, 1357, 0, 0, 0, - 0, 0, 191, 0, 0, 3882, 1363, 0, 0, 0, - 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1590, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 232,11162, 0, 0, 0, 3456, 3999, 0, + 0, 0, 0, 0, 0, 0,11551, 0, 0, 0, + 0, 0, 1196, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 490, 598, 0, 0, 1203, 0, 0, 0, + 0, 0, 16, 0, 0, 3933, 1201, 0, 0, 0, + 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1349, 0, 0, 201, 0, - 0, 0, 0, 0, 0, 0, 0, 8344, 0, 0, - 0, 0, 0, 0, 0, -197, 537, 0, 0, 0, - 1365, 0, 0, 0, 0, 3405, 0, 3405, 0, 4041, - 0, 0, 0, 127, 0, 0, 0, 0, -20, 0, - 0, 0, 4846, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4914, - 5018, 5154, 5222, 5358, 5426, 5494, 5562, 5698, 5766, 5834, - 5970, 6106, 6242, 6366, 0, 0, 786, 0, 0, 692, - 0, 692, 0, 0, 0, 0, 0, 0, 988, 0, - 0, 1886, 0, 0, 0, 0, 1322, 0, 0, 0, -11966, 0, 0, 800, 0, 0, 0, 0, 0, 0, - 744, 664, 0, 0, 1374, 0, 0, 0, 0, 1378, - 0, 0, 0, 0, 0, 0,10580, 0, 0, 0, - 807, 0, 0, 0,12020, 0, 0, 808, 824, 833, + 0, 0, 0, 0, 0, 1192, 0, 0, 44, 0, + 0, 0, 0, 0, 0, 0, 0, 8552, 0, 0, + 0, 0, 0, 0, 0, -149, 202, 0, 0, 0, + 1204, 0, 0, 0, 0, 3456, 0, 3456, 0, 4092, + 0, 0, 0, -276, 0, 0, 0, 0, 154, 0, + 0, 0, 4897, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4965, + 5069, 5205, 5273, 5409, 5477, 5545, 5613, 5749, 5817, 5953, + 6089, 6225, 6361, 6485, 0, 0, 609, 0, 0, 320, + 0, 320, 0, 0, 0, 0, 0, 0, 3736, 0, + 0, 1929, 0, 0, 0, 0, 1157, 0, 0, 0, +12026, 0, 0, 595, 0, 0, 0, 0, 0, 0, + 676, 413, 0, 0, 1207, 0, 0, 0, 0, 1211, + 0, 0, 0, 0, 0, 0,10657, 0, 0, 0, + 625, 0, 0, 0,12043, 0, 0, 654, 732, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1370, 0, 0, 0, 0, 0, 0, 0, 1380, 0, - 0, 0, 3471, 0, 0, 202, 0, 49, 3564, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1381, - 0, 0, 0, 0, 0, 0, 0, 0, 254, 804, - 658, 0, 0, 0, 0, 1379, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8344, 0, + 1205, 0, 0, 0, 0, 0, 0, 0, 1215, 0, + 0, 0, 3522, 0, 0, 51, 0, 59, 3615, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1216, + 0, 0, 0, 0, 0, 0, 0, 0, 138, 650, + 456, 0, 0, 0, 0, 1213, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8552, 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, 251, 0, 0, 0, 1377, 0, 0, 0, 0, - 0, 0, 641, 0, 614, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -122, 0, 0, 0, 0, -12020, 8047, 0, 1384, 0, 805, 0, 0, 0, 0, - 1383, 0, 1338, 1341, 0, 0, 0, 0, 0, 1386, -12044, 0, 0, 0,11550, 0, 0, 0, 857, 0, - 1387, 0, 0, 0, 1757, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3723, - 0, 4200, 1396, 0, 0, 0, 1393, 0, 0, 0, - 0, 804, 0, 0, 0, 857, 0, 0, 0, 0, + 0, -255, 0, 0, 0, 1210, 0, 0, 0, 0, + 0, 0, 366, 0, 587, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -170, 0, 0, 0, 0, +12043, 8255, 0, 1209, 0, 696, 0, 0, 0, 0, + 1221, 0, 1171, 1172, 0, 0, 0, 0, 0, 1217, +12097, 0, 0, 0,11627, 0, 0, 0, 752, 0, + 1222, 0, 0, 0, 1800, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3774, + 0, 4251, 1223, 0, 0, 0, 1227, 0, 0, 0, + 0, 650, 0, 0, 0, 752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 821, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 871, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1391, 0, - 0, 0, 0, 0, 880, 884, 0, 0, 0, 0, - 0, 0, 1407, 786, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3882, 0, - 0, 0, 0, 0, 1412, 0, 0, 804, 0, 932, - 1407, 0, 0, 8344, 0, 632, 670, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 176, 0, 1374, 8394, - 0, 0, 0, 0, 0,12092, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 770, 0, 775, - 0, 0, 0, 0, 0, 1377, 1409, 0, 0, 0, - 0, 0, 0, 0, 0, 1414, 0, 7126, 0, 0, - 0, 0, 0, 8344, 0, 0, 0, 0, 0, 0, - 679, 730, 0, 0, 0, 0, 0, 0, 0,12135, -11474, 0, 170, 170, 170, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1411, 0, 0, 0, 0, 0, + 756, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1228, 0, + 0, 0, 0, 0, 759, 767, 0, 0, 0, 0, + 0, 0, 1234, 609, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3933, 0, + 0, 0, 0, 0, 1229, 0, 0, 650, 0, 802, + 1234, 0, 0, 8552, 0, 583, 604, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 203, 0, 1207, 8602, + 0, 0, 0, 0, 0,12139, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 630, 0, 661, + 0, 0, 0, 0, 1239, 0, 1210, 1240, 0, 0, + 0, 0, 0, 0, 0, 0, 1245, 0, 7334, 0, + 0, 0, 0, 0, 8552, 0, 0, 0, 0, 0, + 0, 477, 643, 0, 0, 0, 0, 0, 0, 0, +12215,11551, 0, 89, 89, 89, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,12246, 0, -290, - 0, 1418, 1418, 1418, 0, 0, 0, 0, 0, 0, - 0, 0, -178, 0, 0, 0, 0, 0, 0, 0, - 0,12289, 0, 0, 0, 0, 1419, 0, 0, 0, - 216, 0, 0, 0, 0, 445, 0, 0, 0, 0, - 0, 0, 1420, 0, 0, 0, 0, 2961, 1410, -257, - 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2719, 0, 0, 0, 8548, - 8944, 0, 0, 0, 745, 0, 0, 0, 0, 0, - 0, 0, 0, -244, 0, 0,11256, 0, 0, 8647, + 0, 0, 0, 0, 0, 0, 0, 0,12258, 0, + 52, 0, 1250, 1250, 1250, 0, 0, 0, 0, 0, + 0, 0, 0, -205, 0, 0, 0, 0, 0, 0, + 0, 0,12301, 0, 0, 0, 0, 1252, 0, 0, + 0, 110, 0, 0, 0, 0, 525, 0, 0, 0, + 0, 0, 0, 1253, 0, 0, 0, 0, 2956, 1242, + 596, 0, 164, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2761, 0, 0, 0, + 8756, 8954, 0, 0, 659, 0, 0, 0, 0, 0, + 0, 0, 0, 353, 0, 0,11333, 0, 0, 8855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,11324, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9038, 0, 8746, 2719, 0, 0, 745, - 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, - 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8845, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4648, 457, 0, - 9080, 0, 0, 0, 9150, 0, 2719, 0, 0, 0, - 2719, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 866, 0, 1424, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 888, 0, 551, - 0, 0, 0, 0, 0, 0, 0,11474, 889, 0, - 0, 0, 0, 0, 1426, 0, 906, 0, 0, 0, - 0, 0, 0, 900, 0, 0, 0, 0, 0, 0, - 0, 0, 1437, 0,11474,11474, 0,11506, 0, 0, - 0, 0, 0, 0, 1460, 1390, 0, 1461,11474,10716, - 1463,11474, 0, 0, 0, 0, 0, 0, 1465, 0, - 0, 0,12445, 0, 0, 0,11474, 0, 0, 0, - 1467, 0, 0, 285, 0,11007,12407, 0, 0, 0, - 1468, 0, 0, 0, 0, 0, 0, 1472, 0, 0, -11474, 0, 490, 0, 910, 0, 0, 0, 0, 0, - 942, 0,12331,12369, 0, 0, 0, 0, 0, 0, - 0, 0, 1487, 0, 1586, 0, 0, 0, 926, 0, + 0, 0,11401, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9048, 0, 8756, 0, 0, 659, 0, + 0, 0, 0, 232, 0, 0, 0, 0, 0, 0, + 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9160, 264, 0, 9090, 0, 0, 0, + 9190, 0, 2761, 0, 0, 0, 2761, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, + 0, 1255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2761, 0, 425, 0, 386, 0, 0, 0, 0, + 0, 0, 0,11551, 766, 0, 0, 0, 0, 0, + 1251, 0, 704, 0, 0, 0, 0, 0, 0, 0, + 770, 0, 0, 0, 0, 0, 0, 0, 0, 1249, + 0,11551,11551, 0,11583, 0, 0, 0, 0, 0, + 0, 1254,12487, 0, 1256,11551,10793, 1259,11551, 0, + 0, 0, 0, 0, 0, 1262, 0, 0, 0,12457, + 0, 0, 0,11551, 0, 0, 0, 1263, 0, 0, + 198, 0,11084,12419, 0, 0, 0, 1264, 0, 0, + 0, 0, 0, 0, 1265, 0, 0,11551, 0, 527, + 0, 774, 0, 0, 0, 0, 0, 816, 0,12343, +12381, 0, 0, 0, 0, 0, 0, 0, 0, 1311, + 0, 1364, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 492, 0, 0, 0, 0, 0, 0, + 544, 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,12445,10888, -12203, 0, 492, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1363, 1363, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,12457, 9122,10965, 0, 544, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1201, 1201, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, }; protected static readonly short [] yyGindex = { 0, - 0, 1799, 0, 0, 0, -2, -10, -179, -42, 1800, - 0, 1841, 1854, 83, 0, 0, -6, 0, 0, 0, - 0, 0, 0, -826, -694, -224, -431, 0, 0, 0, - 0, 0, -193, 0, 0, 0, 934, 0, 1047, 0, - 0, 0, 0, 814, 815, -17, -230, 0, 0, 0, - 0, 672,-1118, -618, -488, -460, -427, -357, -308, -219, --1116,-1131, 0, 1, 0, 234, 0,-1073, 0, 0, - 0, 0, 0, 0, 617, 173, 458, 0, 0, 0, - 493,-1039, 0, -276, -293, 1217, 0, 0, 0, -863, - 453, 0, 0, -492, 0, 0, 522, 0, 0, 497, - 0, 0, 532, 0,-1189, -934, 0, 0, 0, 0, - 0, 625, -13, 0, 0, 1054, 1056, 1057, 1215, -521, - 0, 0, -321, 1062, 613, 0, -995, 0, 0, 0, - 0, 0, 0, 0, 0, 427, 0, 0, 0, 0, - 0, 0, 0, 0, 683, 0, 0, 0, 0, -340, - 607, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 701, 0, -504, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 438, 0, 0, 535, 0, 0, 541, 543, - 465, 0, 0, 0, 0, 0, 0, 0, 0, 771, - 0, 0, 0, 0, -59, 0, -15, -91, 0, 0, - 605, 0, 665, 0, 1122, 0, 1416, -291, -274, -66, - 451, 0, 777, 0, -38, 518, 0, 0, 1027, 0, + 0, 1577, 0, 0, 0, -1, -12, -182, -47, 1591, + 0, 1617, 1650, 79, 0, 0, -6, 0, 0, 0, + 0, 0, 0, -867, -692, -224, -498, 0, 0, 0, + 0, 0, -192, 0, 0, 0, 728, 0, 833, 0, + 0, 0, 0, 589, 593, -17, -231, 0, 0, 436, + 0, 461, -605, -546, -538, -530, -525, -511, -510, -503, + 0,-1147, 0, 9, 0, 119, 0,-1056, 0, 0, + 0, 17, 259, 0, 0, 0, 299,-1040, 0, -270, + -297, 1004, 0, 0, 0, -873, 268, 0, 0, -491, + 0, 0, 322, 0, 0, 327, 0, 0, 362, 0, + -470, -837, 0, 0, 0, 0, 0, 457, -13, 0, + 0, 872, 877, 881, 1035, -528, 0, 0, -318, 882, + 454, 0,-1307, 0, 0, 0, 0, 0, 0, 0, + 0, 263, 0, 0, 0, 0, 0, 0, 0, 0, + 506, 0, 0, 0, 0, -278, 440, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 519, 0, -500, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 274, 0, + 0, 356, 0, 0, 361, 365, 279, 0, 0, 0, + 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, + -71, 0, -7, -58, 0, 0, 427, 0, 485, 0, + 930, 0, 1218, -290, -268, -61, 644, 0, 578, 0, + -35, -9, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -269, 0, 132, 0, 0, - -320, 0, 0, 0, 1076, 0, -298, -134, 1229, 1159, - 0, 1151, 0, 1361, 1580, 1269, 0, 0, 968, 1882, - 0, 0, 0, 0, 1247, 0, 0, 0, 0, 0, - -515, 1624, 0, 0, 0, 0, 1865, 489, 0, 0, - 474, 922, 905, 918, 1564, 1565, 1566, 1572, 1563, 0, - 1571, 0, 0, 0, 1218, 1427, -708, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -287, 0, - 0, 0, 0, -446, 0, 819, 0, 741, 0, 825, - 0, 0, 0, 890, -526, -16, -307, 12, 0, 1818, - 0, 68, 0, 86, 101, 105, 114, 117, 122, 147, - 148, 149, 150, 0, -667, 0, -25, 0, 0, 1020, - 0, -575, 0, 0, 0, 923, 0, 1077, 0, 1030, - -457, 0, 0, 0, 0, 0, 0, 941, 0, 0, - 937, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 949, 0, 0, 0, 0, 0, 0, 0, - 0, -26, 0, 1469, 0, 0, 0, 1103, 0, 0, - 0, 0, 0, -169, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1574, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 761, 0, 0, 0, 0, - 0, 0, 0, 0, 862, 0, 0, 0, 0, 0, - 0, -14, 1173, 0, 0, 0, 1175, + 0, -267, 0, 555, 0, 0, -406, 0, 0, 0, + 885, 0, -296, -139, 1038, 958, 0, 952, 0, 1169, + 1382, 1079, 0, 0, 769, 1677, 0, 0, 0, 0, + 1045, 0, 0, 0, 0, 0, -485, 1422, 0, 0, + 0, 0, 1661, 1084, 0, 0, 107, 803, 730, 804, + 1363, 1365, 1362, 1367, 1369, 0, 1366, 0, 0, 0, + 988, 1224, -723, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -284, 0, 0, 0, 0, -441, + 0, 626, 0, 539, 0, 620, 0, 0, 0, 683, + -532, -16, -313, -5, 0, 1618, 0, 72, 0, 93, + 96, 99, 103, 113, 116, 121, 123, 135, 143, 0, + -619, 0, -29, 0, 0, 812, 0, 742, 0, 0, + 0, 720, -793, 789, -833, 0, 834, -457, 0, 0, + 0, 0, 0, 0, 735, 0, 0, 738, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 743, + 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, + 1267, 0, 0, 0, 900, 0, 0, 0, 0, 0, + -174, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1370, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 556, 0, 0, 0, 0, 0, 0, 0, + 0, 653, 0, 0, 0, 0, 0, 0, -20, 967, + 0, 0, 0, 970, }; protected static readonly short [] yyTable = { 110, - 157, 18, 724, 111, 197, 510, 44, 191, 513, 236, - 446, 428, 570, 194, 486, 352, 729, 675, 316, 471, - 427, 260, 764, 506, 403, 697, 494, 552, 158, 540, - 529, 569, 770, 232, 262, 874, 1115, 855, 856, 1148, - 1149, 933, 996, 466, 6, 254, 360, 774, 368, 535, - 892, 308, 1042, 359, 14, 367, 302, 658, 375, 192, - 302, 595, 1215, 668, 1043, 1235, 309, 1027, 311, 794, - 869, 1353, 197, 197, 1029, 442, 1043, 327, 336, 761, - 885, 1242, 887, 659, 162, 1174, 862, 771, 531, 793, - 408, 1313, 291, 197, 677, 1309, 357, 20, 1, 563, - 292, 349, 163, 200, 1124, 1215, 564, 1246, 1322, 1254, - 332, 95, 358, 1239, 331, 660, 332, 164, 565, 16, - 1278, 165, 677, 333, 350, 315, 1339, 48, 818, 772, - 166, 677, 628, 167, 471, 200, 1109, 1246, 168, 1254, - 762, 110, 157, 409, 595, 111, 702, 863, 236, 595, - 410, 595, 595, 595, 595, 595, 595, 595, 595, 595, - 595, 595, 345, 169, 170, 171, 172, 352, 43, 646, - 158, 48, 375, 595, 375, 595, 375, 595, 1439, 595, - 595, 595, 742, 48, 870, 349, 197, 197, 871, 793, - 1196, 199, 445, 264, 795, 595, 1354, 288, 289, 290, - 2, 294, 295, 446, 718, 570, 306, 307, 350, 352, - 346, 437, 722, 312, 857, 314, 15, 318, 1044, 661, - 375, 193, 329, 330, 569, 669, 162, 361, 570, 1028, - 1044, 443, 470, 411, 595, 466, 1030, 474, 412, 347, - 413, 552, 293, 793, 163, 366, 414, 415, 197, 260, - 528, 552, 1421, 1314, 533, 332, 333, 260, 537, 164, - 322, 327, 482, 165, 575, 536, 3, 4, 5, 6, - 703, 348, 166, 485, 197, 167, 489, 491, 1326, 1445, - 168, 355, 234, 1462, 197, 1055, 869, 349, 527, 516, - 197, 1455, 538, 1456, 524, 48, 526, 1440, 933, 525, - 489, 6, 1039, 234, 933, 169, 170, 171, 172, 570, - 350, 542, 543, 865, 1066, 554, 651, 1383, 551, 557, - 953, 651, 683, 416, 351, 651, 1143, 384, 302, 819, - 742, 1173, 1410, 576, 197, 789, 462, 197, 1417, 2, - 651, 252, 643, 577, 1463, 1095, 553, 470, 586, 1189, - 410, 463, 594, 595, 596, 597, 598, 599, 600, 601, - 602, 603, 604, 385, 502, 1488, 989, 651, 197, 197, - 1465, 1327, 555, 798, 435, 436, 676, 352, 20, 373, - 983, 636, 637, 1341, 626, 236, 651, 1035, 312, 349, - 253, 366, 790, 462, 967, 647, 197, 197, 971, 1485, - 1258, 352, 1288, 202, 871, 848, 800, 684, 463, 1144, - 1371, 1372, 350, 1374, 197, 1053, 933, 1447, 1448, 1121, - 644, 645, 933, 641, 1393, 670, 656, 1400, 197, 507, - 234, 866, 329, 411, 570, 234, 476, 662, 412, 494, - 413, 523, 1416, 386, 387, 234, 414, 415, 471, 480, - 1305, 1151, 1152, 569, 1306, 248, 45, 696, 1154, 249, - 1083, 638, 484, 228, 692, 229, 1438, 113, 955, 1034, - 349, 671, 1051, 1479, 1052, 503, 95, 504, 515, 252, - 1286, 1452, 48, 361, 779, 1489, 781, 720, 782, 586, - 373, 727, 373, 350, 373, 373, 234, 373, 638, 373, - 638, 570, 481, 349, 49, 733, 735, 743, 670, 250, - 113, 671, 694, 751, 113, 672, 741, 887, 887, 951, - 753, 55, 561, 426, 886, 886, 350, 203, 253, 1287, - 197, 505, 551, 1453, 115, 519, 670, 400, 325, 325, - 973, 373, 551, 373, 766, 946, 373, 651, 597, 401, - 811, 982, 736, 197, 671, 638, 608, 609, 450, 325, - 553, 903, 1216, 965, 784, 784, 361, 718, 695, 451, - 553, 1289, 432, 694, 747, 810, 673, 115, 347, 697, - 347, 115, 671, 867, 631, 633, 337, 338, 339, 340, - 341, 342, 343, 344, 361, 978, 764, 887, 361, 651, - 361, 361, 361, 361, 886, 1216, 347, 1247, 361, 113, - 693, 797, 677, 585, 513, 816, 861, 803, 1067, 450, - 1290, 352, 467, 747, 467, 368, 349, 234, 349, 695, - 451, 597, 832, 247, 197, 649, 597, 1247, 597, 597, - 597, 597, 597, 597, 597, 597, 597, 597, 597, 350, - 734, 350, 325, 325, 349, 197, 833, 817, 357, 649, - 597, 470, 597, 351, 597, 351, 597, 597, 597, 251, - 260, 368, 831, 651, 533, 489, 115, 350, 651, 467, - 578, 339, 651, 834, 853, 722, 649, 315, 350, 727, - 579, 351, 1217, 263, 720, 499, 585, 651, 265, 500, - 1015, 585, 778, 585, 585, 585, 585, 585, 585, 585, - 585, 585, 585, 585, 325, 315, 410, 95, 197, 95, - 1218, 597, 878, 252, 651, 585, 1328, 585, 650, 585, - 339, 585, 585, 585, 888, 1217, 889, 1248, 113, 197, - 325, 585, 585, 651, 891, 766, 585, 585, 1198, 1214, - 325, 895, 650, 1219, 95, 197, 325, 585, 585, 197, - 328, 347, 350, 1218, 113, 1249, 1088, 1248, 1198, 586, - 585, 518, 253, 647, 586, 905, 780, 727, 95, 650, - 356, 430, 946, 552, 519, 113, 585, 1172, 921, 922, - 643, 349, 1214, 677, 1245, 1249, 1219, 707, 1250, 411, - 325, 520, 1118, 325, 412, 115, 413, 349, 197, 349, - 812, 673, 414, 415, 350, 552, 541, 662, 349, 943, - 673, 485, 813, 1220, 1245, 369, 197, 197, 1250, 935, - 350, 115, 350, 489, 325, 325, 969, 1065, 1015, 396, - 1150, 350, 593, 972, 351, 552, 351, 835, 879, 1077, - 397, 675, 115, 980, 836, 727, 283, 541, 672, 610, - 611, 1078, 325, 325, 398, 283, 1220, 672, 1251, 605, - 606, 607, 1221, 1404, 541, 541, 541, 541, 541, 541, + 157, 510, 18, 111, 236, 191, 724, 115, 428, 513, + 446, 158, 197, 194, 44, 427, 764, 729, 471, 403, + 486, 552, 675, 316, 260, 697, 770, 232, 494, 506, + 262, 540, 996, 529, 569, 892, 1116, 874, 920, 308, + 774, 359, 1, 367, 466, 254, 794, 14, 352, 1234, + 115, 360, 192, 368, 115, 535, 302, 1149, 1150, 1043, + 302, 1340, 780, 531, 658, 1241, 309, 410, 311, 668, + 1426, 1044, 702, 20, 570, 1144, 1027, 999, 336, 1029, + 197, 197, 1475, 291, 1299, 855, 856, 331, 162, 1044, + 659, 292, 1434, 1435, 646, 623, 832, 623, 442, 200, + 1449, 197, 410, 1175, 322, 327, 360, 346, 1196, 163, + 6, 349, 164, 95, 400, 165, 452, 252, 452, 166, + 833, 818, 660, 48, 16, 355, 401, 554, 885, 167, + 887, 200, 168, 471, 350, 48, 261, 169, 628, 170, + 345, 110, 157, 236, 2, 111, 2, 834, 1466, 115, + 411, 171, 623, 158, 869, 412, 1370, 413, 1145, 172, + 349, 1450, 780, 414, 415, 519, 253, 199, 865, 1035, + 261, 795, 502, 452, 261, 261, 261, 261, 261, 261, + 261, 261, 736, 350, 555, 411, 1341, 445, 346, 1427, + 412, 43, 413, 95, 197, 197, 703, 1035, 414, 415, + 352, 999, 1476, 446, 1397, 437, 718, 234, 722, 15, + 3, 4, 5, 6, 193, 857, 780, 347, 435, 436, + 360, 234, 360, 1408, 360, 1045, 661, 569, 332, 333, + 162, 669, 470, 293, 1110, 552, 466, 474, 1028, 443, + 416, 1030, 352, 1045, 742, 552, 1300, 48, 1312, 348, + 1432, 163, 260, 536, 164, 528, 197, 165, 482, 533, + 260, 166, 1442, 537, 1443, 349, 971, 570, 360, 234, + 1056, 167, 871, 485, 168, 426, 489, 491, 115, 169, + 476, 170, 197, 503, 527, 504, 866, 252, 350, 516, + 570, 1174, 197, 171, 524, 920, 526, 575, 197, 525, + 489, 172, 351, 869, 115, 538, 484, 557, 761, 1189, + 20, 542, 543, 953, 920, 798, 1067, 234, 551, 800, + 408, 955, 515, 671, 1404, 115, 480, 672, 302, 553, + 49, 1096, 819, 576, 384, 55, 253, 862, 518, 505, + 789, 1313, 197, 577, 655, 197, 679, 470, 586, 234, + 1040, 519, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 346, 261, 656, 561, 6, 520, 762, + 385, 570, 261, 409, 1452, 643, 197, 197, 1273, 481, + 236, 983, 636, 435, 626, 447, 683, 636, 673, 248, + 647, 636, 742, 249, 967, 1290, 989, 790, 863, 1291, + 608, 609, 349, 1472, 197, 197, 636, 679, 848, 676, + 352, 680, 349, 347, 644, 645, 349, 870, 436, 312, + 656, 871, 197, 641, 1318, 350, 920, 655, 631, 633, + 636, 637, 920, 636, 352, 350, 197, 662, 1439, 350, + 410, 494, 447, 250, 435, 261, 346, 471, 656, 202, + 386, 387, 636, 696, 973, 655, 569, 261, 261, 261, + 636, 349, 261, 261, 692, 982, 1328, 203, 1122, 48, + 1034, 684, 680, 115, 346, 593, 656, 358, 346, 436, + 346, 346, 346, 346, 350, 234, 347, 720, 346, 586, + 1440, 727, 610, 611, 1358, 1359, 570, 1361, 351, 234, + 1152, 1153, 1052, 634, 1053, 733, 735, 1155, 1380, 353, + 638, 1387, 636, 751, 347, 743, 741, 779, 677, 781, + 753, 782, 951, 411, 1068, 448, 1403, 634, 412, 347, + 413, 314, 551, 247, 349, 635, 414, 415, 197, 115, + 252, 946, 551, 553, 766, 1271, 677, 874, 874, 115, + 1425, 873, 873, 553, 634, 353, 1274, 350, 331, 635, + 903, 197, 349, 570, 784, 784, 965, 861, 771, 718, + 331, 351, 251, 599, 331, 599, 1215, 349, 867, 357, + 697, 48, 448, 811, 732, 350, 635, 331, 358, 253, + 358, 764, 358, 358, 1272, 358, 263, 358, 324, 351, + 350, 978, 95, 1125, 636, 1275, 816, 356, 315, 636, + 772, 797, 1238, 636, 351, 513, 264, 803, 1215, 331, + 288, 289, 290, 95, 294, 295, 265, 874, 636, 306, + 307, 873, 1264, 732, 315, 1216, 312, 357, 314, 358, + 318, 358, 197, 1217, 358, 329, 330, 324, 817, 45, + 261, 1218, 835, 358, 352, 636, 1219, 812, 336, 836, + 113, 470, 336, 197, 331, 115, 315, 115, 366, 813, + 1220, 1221, 115, 260, 636, 489, 331, 1216, 1222, 533, + 831, 722, 1198, 1214, 853, 1217, 350, 578, 331, 727, + 369, 662, 331, 1218, 720, 115, 115, 579, 1219, 1015, + 778, 1198, 350, 113, 904, 331, 336, 113, 252, 904, + 361, 904, 1220, 1221, 904, 904, 780, 904, 904, 662, + 1222, 432, 878, 707, 810, 1214, 197, 1198, 662, 362, + 363, 325, 325, 349, 888, 349, 889, 331, 115, 904, + 115, 228, 1078, 229, 891, 766, 563, 197, 841, 364, + 877, 895, 325, 564, 1079, 95, 350, 253, 350, 277, + 365, 277, 328, 197, 1314, 565, 277, 197, 647, 586, + 351, 890, 351, 1089, 586, 905, 204, 727, 552, 946, + 430, 331, 65, 65, 331, 261, 65, 897, 921, 922, + 349, 336, 390, 391, 904, 336, 350, 331, 336, 1295, + 336, 396, 113, 879, 499, 336, 392, 393, 500, 1119, + 552, 312, 1308, 350, 366, 907, 197, 662, 205, 943, + 907, 485, 907, 643, 324, 907, 907, 324, 907, 907, + 397, 1326, 1066, 489, 197, 197, 969, 935, 1015, 336, + 552, 675, 349, 972, 678, 325, 325, 1151, 679, 95, + 907, 398, 507, 980, 228, 727, 231, 493, 1173, 954, + 331, 1391, 331, 493, 523, 350, 388, 389, 206, 207, + 208, 209, 879, 210, 211, 212, 213, 214, 215, 216, + 217, 331, 331, 218, 219, 220, 221, 222, 223, 224, + 225, 658, 296, 268, 297, 1000, 563, 1002, 197, 1004, + 658, 331, 268, 564, 995, 907, 792, 325, 446, 331, + 657, 399, 331, 1014, 1069, 565, 1070, 1231, 357, 657, + 197, 662, 405, 1444, 357, 898, 1133, 402, 197, 811, + 898, 113, 898, 325, 432, 898, 898, 297, 898, 898, + 881, 710, 432, 325, 727, 711, 1021, 315, 1022, 325, + 1023, 352, 1019, 315, 760, 1261, 760, 113, 760, 1463, + 115, 513, 1261, 317, 940, 494, 940, 433, 410, 317, + 410, 494, 1481, 1482, 434, 749, 318, 749, 113, 749, + 766, 900, 740, 1059, 740, 1061, 900, 1062, 900, 410, + 410, 900, 900, 325, 900, 900, 325, 894, 751, 167, + 751, 167, 894, 167, 894, 228, 331, 894, 894, 410, + 894, 894, 394, 395, 1071, 898, 438, 410, 331, 467, + 410, 331, 331, 155, 411, 155, 485, 325, 325, 412, + 179, 413, 179, 693, 179, 331, 441, 414, 415, 1097, + 727, 766, 381, 382, 383, 331, 331, 1104, 331, 331, + 57, 468, 1014, 719, 475, 325, 325, 500, 1109, 485, + 783, 236, 485, 1136, 679, 66, 331, 946, 370, 66, + 346, 900, 479, 734, 346, 551, 331, 346, 115, 346, + 487, 1129, 115, 488, 346, 236, 553, 894, 1132, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 358, + 485, 162, 509, 162, 197, 545, 163, 551, 163, 514, + 115, 115, 1157, 1062, 115, 1136, 517, 115, 553, 614, + 615, 616, 617, 851, 534, 851, 113, 68, 185, 68, + 185, 918, 919, 1197, 1213, 539, 156, 551, 156, 120, + 556, 120, 574, 282, 115, 282, 580, 127, 553, 127, + 1101, 1102, 1197, 1185, 657, 289, 197, 289, 350, 438, + 350, 1453, 1454, 873, 873, 634, 325, 354, 1229, 704, + 485, 642, 197, 517, 517, 694, 1213, 680, 1197, 636, + 636, 337, 338, 339, 340, 341, 342, 343, 344, 325, + 612, 613, 113, 1114, 1115, 560, 1193, 618, 619, 682, + 705, 706, 113, 708, 25, 709, 26, 752, 731, 27, + 732, 747, 325, 748, 28, 750, 749, 754, 29, 755, + 756, 1306, 757, 1266, 773, 197, 197, 31, 765, 775, + 776, 35, 787, 197, 33, 1306, 788, 792, 799, 34, + 793, 197, 197, 35, 197, 802, 808, 820, 801, 1193, + 1286, 821, 1336, 823, 1337, 37, 824, 38, 827, 851, + 43, 39, 1286, 844, 197, 1269, 1270, 197, 839, 40, + 41, 845, 846, 42, 1315, 1286, 319, 847, 850, 852, + 854, 872, 199, 447, 873, 868, 875, 882, 1298, 883, + 893, 1301, 898, 325, 1286, 1371, 900, 498, 884, 914, + 909, 916, 920, 930, 923, 931, 448, 924, 934, 939, + 933, 936, 1398, 941, 325, 959, 947, 960, 961, 449, + 968, 962, 970, 977, 451, 1410, 1412, 503, 992, 452, + 984, 453, 454, 455, 456, 727, 993, 1266, 986, 457, + 988, 998, 990, 458, 1008, 997, 1017, 485, 113, 113, + 1024, 1031, 1398, 1398, 1025, 459, 1032, 354, 460, 1033, + 461, 1038, 1039, 1051, 1420, 1041, 25, 1057, 26, 1058, + 879, 27, 1060, 1190, 1065, 1073, 28, 325, 1077, 1080, + 29, 1081, 1082, 1083, 462, 1090, 1095, 1100, 1105, 31, + 1103, 113, 1121, 113, 1112, 1125, 33, 727, 325, 1117, + 1128, 34, 1123, 1191, 1135, 35, 1156, 1159, 1398, 1163, + 1161, 541, 1164, 1145, 325, 1177, 1172, 37, 325, 38, + 1165, 1173, 1181, 39, 1192, 1180, 1227, 1182, 1230, 1183, + 1188, 40, 41, 727, 1184, 42, 1232, 1233, 319, 1235, + 1294, 1242, 1245, 1468, 1468, 1268, 1276, 1247, 1289, 1293, + 1477, 1477, 541, 1304, 1294, 586, 586, 1307, 1310, 1303, + 1320, 1311, 331, 1322, 605, 606, 607, 1323, 1325, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, - 197, 388, 389, 346, 1275, 1000, 811, 1002, 1251, 1004, - 447, 1275, 349, 357, 399, 346, 877, 446, 614, 346, - 614, 1232, 197, 1014, 228, 1221, 231, 1252, 352, 432, - 197, 662, 346, 448, 292, 350, 292, 890, 1132, 357, - 678, 292, 315, 113, 679, 1457, 449, 402, 1021, 351, - 1022, 451, 1023, 897, 727, 881, 452, 1252, 453, 454, - 455, 456, 911, 296, 346, 297, 457, 911, 315, 911, - 458, 1222, 911, 911, 1294, 911, 911, 346, 297, 350, - 346, 1476, 459, 325, 513, 460, 879, 461, 432, 917, - 766, 1494, 1495, 1058, 917, 1060, 917, 1061, 405, 917, - 917, 541, 917, 917, 394, 395, 325, 390, 391, 113, - 115, 462, 433, 773, 1222, 773, 1253, 773, 995, 113, - 792, 392, 393, 1070, 917, 954, 563, 920, 841, 325, - 918, 919, 920, 564, 920, 485, 339, 920, 920, 339, - 920, 920, 434, 65, 65, 565, 1253, 65, 1096, 727, - 766, 762, 911, 762, 228, 762, 1103, 438, 346, 710, - 719, 1014, 920, 711, 500, 1100, 1101, 1295, 485, 1108, - 346, 485, 777, 441, 346, 236, 115, 1135, 913, 917, - 381, 382, 383, 913, 551, 913, 115, 346, 913, 913, - 1128, 913, 913, 907, 946, 467, 261, 1131, 907, 236, - 907, 350, 438, 907, 907, 197, 907, 907, 508, 485, - 325, 346, 553, 346, 508, 468, 551, 920, 1019, 346, - 331, 1156, 1061, 346, 346, 475, 346, 346, 57, 1135, - 261, 325, 346, 346, 261, 261, 261, 261, 261, 261, - 261, 261, 487, 1068, 553, 1069, 551, 1197, 1213, 182, - 479, 182, 346, 182, 194, 509, 194, 197, 194, 371, - 346, 488, 1185, 346, 358, 113, 113, 1197, 913, 755, - 346, 755, 783, 197, 553, 252, 679, 361, 1230, 953, - 485, 953, 346, 907, 66, 346, 346, 170, 66, 170, - 764, 1213, 764, 1197, 325, 509, 362, 363, 425, 346, - 425, 509, 759, 177, 411, 177, 759, 514, 113, 412, - 113, 413, 178, 1320, 178, 325, 364, 414, 415, 425, - 425, 1466, 1467, 1197, 253, 517, 1320, 365, 197, 197, - 534, 325, 115, 115, 1280, 325, 197, 539, 864, 425, - 864, 574, 351, 1349, 545, 1350, 351, 425, 346, 130, - 425, 130, 68, 923, 68, 556, 130, 197, 197, 200, - 197, 200, 350, 171, 351, 171, 1301, 680, 351, 580, - 346, 351, 135, 351, 135, 115, 634, 115, 351, 1301, - 354, 197, 361, 297, 197, 297, 361, 657, 346, 361, - 351, 361, 1301, 142, 642, 142, 361, 886, 886, 1329, - 204, 682, 325, 325, 614, 615, 616, 617, 694, 304, - 1301, 304, 351, 532, 532, 651, 651, 1113, 1114, 612, - 613, 618, 619, 1384, 261, 704, 705, 706, 708, 731, - 709, 732, 261, 747, 748, 749, 923, 750, 752, 754, - 1411, 923, 205, 923, 923, 923, 923, 923, 923, 923, - 923, 923, 923, 1423, 1425, 755, 756, 757, 727, 765, - 1280, 1193, 773, 775, 541, 923, 325, 923, 776, 923, - 485, 923, 923, 923, 787, 788, 792, 808, 820, 793, - 1411, 1411, 799, 821, 801, 823, 802, 1433, 824, 827, - 43, 844, 206, 207, 208, 209, 325, 210, 211, 212, - 213, 214, 215, 216, 217, 261, 839, 218, 219, 220, - 221, 222, 223, 224, 225, 371, 1193, 261, 261, 261, - 727, 371, 261, 261, 845, 846, 923, 847, 851, 850, - 113, 513, 852, 854, 872, 868, 1411, 199, 873, 875, - 882, 883, 898, 884, 900, 1284, 1285, 893, 909, 914, - 916, 920, 923, 371, 930, 924, 727, 371, 931, 370, - 933, 934, 939, 936, 941, 947, 1481, 1481, 959, 1312, - 960, 961, 1315, 1490, 1490, 968, 962, 970, 586, 586, - 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, - 977, 503, 992, 984, 986, 993, 1031, 115, 371, 988, - 990, 997, 998, 371, 1008, 371, 371, 371, 371, 371, - 371, 371, 371, 371, 371, 371, 1017, 1025, 1024, 1033, - 1032, 1038, 1050, 1037, 1040, 879, 371, 371, 1056, 371, - 371, 371, 1057, 371, 371, 371, 1059, 371, 371, 1064, - 1072, 371, 371, 371, 371, 1076, 1079, 113, 371, 371, - 1080, 113, 1081, 371, 371, 371, 371, 371, 371, 371, - 371, 1089, 1082, 1094, 1099, 1104, 1102, 1124, 1116, 1111, - 1155, 325, 371, 1120, 1122, 371, 1134, 371, 1158, 113, - 113, 1127, 1144, 113, 1160, 1164, 113, 1162, 371, 560, - 1163, 1172, 1171, 1176, 1179, 1180, 1181, 1182, 25, 840, - 26, 1184, 1188, 27, 1228, 1259, 1233, 1231, 28, 1236, - 261, 1234, 29, 113, 115, 1243, 1291, 1261, 115, 1282, - 1304, 31, 1336, 325, 1318, 1307, 1321, 1308, 33, 1324, - 1333, 1342, 1335, 34, 1347, 1338, 1317, 35, 1325, 325, - 1340, 1327, 1346, 1344, 1352, 1360, 115, 115, 1363, 37, - 115, 38, 1364, 115, 1365, 39, 1357, 1367, 1375, 1376, - 48, 1379, 48, 40, 41, 1389, 1394, 42, 1406, 1396, - 319, 1408, 1405, 1409, 1415, 1418, 1419, 1429, 1430, 1432, - 115, 1435, 1437, 48, 1434, 1449, 1450, 513, 1454, 1443, - 1458, 1459, 513, 513, 325, 325, 48, 1461, 1468, 1453, - 1452, 48, 325, 1474, 1496, 1475, 48, 1497, 48, 48, - 48, 48, 1498, 9, 48, 513, 48, 949, 545, 838, - 48, 740, 32, 325, 325, 513, 325, 503, 513, 513, - 615, 941, 48, 513, 504, 48, 513, 48, 513, 808, - 513, 513, 513, 513, 462, 261, 616, 325, 513, 684, - 325, 354, 513, 30, 22, 812, 513, 502, 30, 324, - 528, 48, 758, 31, 513, 221, 783, 513, 96, 513, - 513, 766, 813, 31, 846, 513, 767, 513, 513, 513, - 513, 513, 513, 513, 513, 513, 513, 513, 758, 787, - 815, 788, 817, 513, 672, 672, 328, 694, 513, 513, - 353, 513, 513, 513, 513, 513, 513, 513, 346, 513, - 513, 651, 513, 513, 513, 513, 513, 513, 513, 513, - 513, 513, 138, 513, 513, 513, 513, 513, 513, 513, - 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, - 513, 513, 513, 513, 513, 120, 300, 513, 145, 513, - 139, 513, 121, 301, 513, 840, 840, 146, 651, 233, - 513, 237, 54, 840, 840, 840, 840, 840, 21, 840, - 840, 1009, 840, 840, 840, 840, 840, 840, 840, 840, - 929, 1237, 1283, 1420, 840, 1451, 840, 840, 840, 840, - 840, 840, 1106, 1107, 840, 346, 1460, 829, 840, 840, - 1407, 840, 840, 840, 1436, 1402, 1298, 1310, 956, 842, - 957, 958, 952, 840, 1492, 840, 1244, 840, 840, 1484, - 1331, 840, 1241, 840, 840, 840, 840, 840, 840, 840, - 840, 840, 840, 840, 840, 1431, 840, 1426, 1424, 840, - 840, 1351, 1177, 840, 840, 1483, 1302, 925, 744, 1178, - 860, 976, 904, 786, 581, 902, 1041, 838, 840, 840, - 840, 840, 840, 299, 544, 858, 840, 840, 334, 620, - 840, 621, 624, 622, 1166, 840, 840, 840, 840, 840, - 623, 625, 760, 840, 1262, 840, 404, 1169, 1026, 1097, - 1123, 840, 840, 1036, 1092, 1085, 1090, 999, 991, 737, - 1260, 1157, 899, 640, 927, 926, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 840, 840, 840, 840, - 0, 840, 783, 783, 0, 0, 0, 0, 840, 0, - 783, 783, 783, 783, 783, 0, 783, 783, 0, 783, - 783, 783, 783, 783, 783, 783, 0, 0, 748, 0, - 0, 783, 0, 783, 783, 783, 783, 783, 783, 0, - 0, 783, 0, 0, 0, 783, 783, 0, 783, 783, - 783, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 783, 0, 783, 0, 783, 783, 0, 0, 783, 0, - 783, 783, 783, 783, 783, 783, 783, 783, 783, 783, - 783, 783, 0, 783, 0, 0, 783, 783, 0, 0, - 783, 783, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 783, 783, 783, 783, 783, - 0, 0, 0, 783, 783, 0, 0, 783, 0, 0, - 0, 0, 783, 783, 783, 783, 783, 0, 0, 0, - 783, 346, 783, 0, 0, 0, 346, 346, 783, 783, + 541, 541, 541, 541, 541, 325, 325, 1313, 35, 1327, + 1331, 1329, 35, 1333, 1334, 1339, 1344, 1347, 1381, 1392, + 1350, 1430, 1351, 35, 1352, 1354, 1362, 1363, 35, 1366, + 1376, 1383, 35, 1395, 1393, 35, 1396, 1402, 1405, 354, + 1416, 1406, 1417, 1419, 1421, 1422, 1424, 35, 35, 1436, + 1437, 1441, 35, 35, 1445, 1446, 1448, 1455, 35, 1440, + 35, 35, 35, 35, 1439, 1461, 1462, 1483, 35, 325, + 1484, 9, 35, 498, 35, 1485, 936, 530, 498, 498, + 825, 32, 488, 600, 35, 928, 35, 35, 725, 35, + 489, 795, 447, 35, 669, 601, 30, 22, 31, 325, + 799, 498, 487, 30, 513, 743, 541, 309, 206, 96, + 31, 498, 753, 35, 498, 498, 774, 800, 833, 498, + 35, 744, 498, 754, 498, 745, 498, 498, 498, 498, + 746, 802, 775, 113, 498, 804, 657, 657, 498, 313, + 679, 338, 498, 331, 123, 636, 636, 233, 54, 105, + 498, 285, 827, 498, 130, 498, 498, 124, 106, 286, + 131, 498, 237, 498, 498, 498, 498, 498, 498, 498, + 498, 498, 498, 498, 21, 1009, 929, 777, 1107, 498, + 1236, 1244, 1108, 1438, 498, 498, 1407, 498, 498, 498, + 498, 498, 498, 498, 829, 498, 498, 1394, 498, 498, + 498, 498, 498, 498, 498, 498, 498, 498, 1447, 498, + 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, + 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, + 498, 1423, 1389, 498, 1283, 498, 956, 498, 331, 842, + 498, 957, 952, 1296, 331, 958, 498, 1479, 1317, 1243, + 1240, 113, 1471, 1418, 1413, 113, 1470, 1411, 1178, 1338, + 744, 1179, 1287, 904, 902, 925, 581, 1042, 299, 860, + 976, 786, 544, 858, 334, 325, 331, 838, 620, 622, + 331, 621, 899, 113, 113, 623, 625, 113, 624, 760, + 113, 1248, 1167, 1170, 1124, 1037, 404, 1098, 1084, 1054, + 1086, 1091, 1026, 1158, 1246, 991, 1093, 737, 927, 640, + 926, 0, 0, 0, 0, 0, 0, 113, 0, 770, + 0, 331, 0, 0, 0, 0, 331, 325, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 0, 0, 0, 325, 0, 0, 0, 0, 0, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 0, + 331, 331, 0, 0, 331, 331, 331, 331, 331, 0, + 0, 331, 331, 0, 0, 0, 331, 331, 331, 331, + 331, 331, 331, 331, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 331, 325, 325, 331, 0, + 331, 0, 331, 0, 325, 331, 0, 0, 827, 827, + 0, 331, 325, 325, 0, 325, 827, 827, 827, 827, + 827, 0, 827, 827, 0, 827, 827, 827, 827, 827, + 827, 827, 827, 0, 0, 325, 0, 827, 325, 827, + 827, 827, 827, 827, 827, 0, 0, 827, 331, 0, + 0, 827, 827, 0, 827, 827, 827, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 827, 0, 827, 541, + 827, 827, 0, 0, 827, 0, 827, 827, 827, 827, + 827, 827, 827, 827, 827, 827, 827, 827, 0, 827, + 0, 0, 827, 827, 0, 0, 827, 827, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 339, 346, - 0, 0, 0, 783, 783, 783, 783, 0, 783, 346, - 0, 0, 346, 346, 0, 783, 0, 346, 0, 0, - 346, 0, 346, 0, 346, 346, 346, 346, 0, 0, - 0, 0, 346, 0, 0, 0, 346, 0, 0, 0, - 346, 0, 0, 0, 0, 0, 0, 0, 346, 0, - 0, 346, 0, 346, 346, 0, 0, 0, 0, 346, - 0, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 0, 0, 0, 0, 346, 0, 0, - 0, 0, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 0, 346, 346, 0, 0, 346, 346, 346, - 346, 346, 0, 0, 346, 346, 0, 0, 0, 346, - 346, 346, 346, 346, 346, 346, 346, 0, 0, 0, - 0, 0, 0, 0, 748, 0, 0, 0, 346, 748, - 748, 346, 0, 346, 0, 346, 0, 0, 346, 0, - 0, 0, 0, 0, 346, 376, 0, 0, 0, 0, - 0, 0, 748, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 748, 0, 0, 748, 748, 0, 0, 0, - 748, 0, 0, 748, 0, 748, 0, 748, 748, 748, - 748, 0, 0, 0, 0, 748, 0, 0, 0, 748, - 0, 0, 0, 748, 0, 0, 0, 0, 0, 0, - 0, 748, 0, 0, 748, 0, 748, 748, 0, 0, - 0, 0, 748, 0, 748, 748, 748, 748, 748, 748, - 748, 748, 748, 748, 748, 0, 0, 0, 0, 0, - 748, 0, 0, 0, 0, 748, 748, 748, 748, 748, - 748, 0, 748, 748, 748, 0, 748, 748, 0, 0, - 748, 748, 748, 748, 339, 0, 0, 748, 748, 339, - 339, 0, 748, 748, 748, 748, 748, 748, 748, 748, - 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 748, 339, 0, 748, 0, 748, 0, 748, 0, - 0, 748, 339, 0, 0, 339, 339, 748, 0, 0, - 339, 0, 0, 339, 0, 339, 0, 339, 339, 339, - 339, 0, 0, 0, 0, 339, 0, 0, 0, 339, - 0, 0, 0, 339, 0, 0, 0, 0, 0, 0, - 0, 339, 0, 0, 339, 0, 339, 339, 0, 0, - 0, 0, 339, 0, 339, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 0, 0, 0, 0, 0, - 339, 0, 0, 0, 0, 339, 339, 339, 339, 339, - 339, 0, 339, 339, 339, 0, 339, 339, 0, 0, - 339, 339, 339, 339, 0, 0, 0, 339, 339, 0, - 0, 0, 339, 339, 339, 339, 339, 339, 339, 339, - 0, 376, 0, 0, 0, 0, 376, 376, 0, 0, - 0, 339, 0, 0, 339, 0, 339, 0, 339, 0, - 0, 339, 0, 0, 0, 0, 0, 339, 0, 376, - 0, 0, 0, 0, 0, 49, 0, 0, 0, 376, - 0, 0, 376, 376, 0, 0, 0, 376, 0, 0, - 376, 0, 376, 0, 376, 376, 376, 376, 0, 0, - 0, 0, 376, 0, 0, 0, 376, 0, 0, 0, - 376, 0, 0, 0, 0, 0, 0, 0, 376, 0, - 0, 376, 0, 376, 376, 0, 0, 0, 0, 376, - 0, 376, 376, 376, 376, 376, 376, 376, 376, 376, - 376, 376, 0, 0, 0, 0, 0, 376, 0, 0, - 0, 0, 376, 376, 0, 376, 376, 376, 0, 376, - 376, 376, 0, 376, 376, 0, 346, 376, 376, 376, - 376, 0, 346, 0, 376, 376, 0, 0, 0, 376, - 376, 376, 376, 376, 376, 376, 376, 0, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 376, 0, - 0, 376, 0, 376, 346, 0, 0, 0, 346, 0, - 0, 0, 0, 0, 376, 0, 0, 0, 0, 0, + 0, 827, 827, 827, 827, 827, 0, 0, 0, 827, + 827, 0, 0, 827, 0, 0, 0, 0, 827, 827, + 827, 827, 827, 0, 0, 0, 827, 0, 827, 0, + 0, 0, 0, 0, 827, 827, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 827, + 827, 827, 827, 0, 827, 770, 770, 0, 0, 0, + 0, 827, 0, 770, 770, 770, 770, 770, 0, 770, + 770, 0, 770, 770, 770, 770, 770, 770, 770, 0, + 0, 733, 0, 0, 770, 0, 770, 770, 770, 770, + 770, 770, 0, 0, 770, 0, 0, 0, 770, 770, + 0, 770, 770, 770, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 770, 0, 770, 0, 770, 770, 0, + 0, 770, 0, 770, 770, 770, 770, 770, 770, 770, + 770, 770, 770, 770, 770, 0, 770, 0, 0, 770, + 770, 0, 0, 770, 770, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 770, 770, + 770, 770, 770, 0, 0, 0, 770, 770, 0, 0, + 770, 0, 0, 0, 0, 770, 770, 770, 770, 770, + 0, 0, 0, 770, 331, 770, 0, 0, 0, 331, + 331, 770, 770, 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, 346, - 0, 36, 0, 0, 346, 0, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 0, 346, 346, - 0, 0, 346, 346, 346, 346, 346, 0, 0, 346, - 346, 0, 0, 0, 346, 346, 346, 346, 346, 346, - 346, 346, 0, 0, 0, 0, 0, 0, 0, 0, - 35, 0, 0, 346, 0, 0, 346, 0, 346, 0, - 346, 0, 49, 346, 0, 0, 49, 0, 49, 346, - 49, 0, 49, 0, 0, 49, 0, 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, - 0, 49, 49, 49, 0, 0, 0, 49, 0, 0, + 0, 324, 331, 0, 0, 0, 770, 770, 770, 770, + 0, 770, 331, 0, 0, 331, 331, 0, 770, 0, + 331, 0, 0, 331, 0, 331, 0, 331, 331, 331, + 331, 0, 0, 0, 0, 331, 0, 0, 0, 331, + 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, + 0, 331, 0, 0, 331, 0, 331, 331, 0, 0, + 0, 0, 331, 0, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 0, 0, 0, 0, + 331, 0, 0, 0, 0, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 0, 331, 331, 0, 0, + 331, 331, 331, 331, 331, 0, 0, 331, 331, 0, + 0, 0, 331, 331, 331, 331, 331, 331, 331, 331, + 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, + 0, 331, 733, 733, 331, 0, 331, 0, 331, 0, + 0, 331, 0, 0, 0, 0, 0, 331, 361, 0, + 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 733, 0, 0, 733, 733, + 0, 0, 0, 733, 0, 0, 733, 0, 733, 0, + 733, 733, 733, 733, 0, 0, 0, 0, 733, 0, + 0, 0, 733, 0, 0, 0, 733, 0, 0, 0, + 0, 0, 0, 0, 733, 0, 0, 733, 0, 733, + 733, 0, 0, 0, 0, 733, 0, 733, 733, 733, + 733, 733, 733, 733, 733, 733, 733, 733, 0, 0, + 0, 0, 0, 733, 0, 0, 0, 0, 733, 733, + 733, 733, 733, 733, 0, 733, 733, 733, 0, 733, + 733, 0, 0, 733, 733, 733, 733, 324, 0, 0, + 733, 733, 324, 324, 0, 733, 733, 733, 733, 733, + 733, 733, 733, 356, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 733, 324, 0, 733, 0, 733, + 0, 733, 0, 0, 733, 324, 0, 0, 324, 324, + 733, 0, 0, 324, 0, 0, 324, 0, 324, 0, + 324, 324, 324, 324, 0, 0, 0, 0, 324, 0, + 0, 0, 324, 0, 0, 0, 324, 0, 0, 0, + 0, 0, 0, 0, 324, 0, 0, 324, 0, 324, + 324, 0, 0, 0, 0, 324, 0, 324, 324, 324, + 324, 324, 324, 324, 324, 324, 324, 324, 0, 0, + 0, 0, 0, 324, 0, 0, 0, 0, 324, 324, + 324, 324, 324, 324, 0, 324, 324, 324, 0, 324, + 324, 0, 0, 324, 324, 324, 324, 0, 0, 0, + 324, 324, 0, 0, 0, 324, 324, 324, 324, 324, + 324, 324, 324, 0, 361, 0, 0, 0, 0, 361, + 361, 0, 0, 0, 324, 0, 0, 324, 0, 324, + 0, 324, 0, 0, 324, 0, 0, 0, 0, 0, + 324, 49, 361, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 361, 0, 0, 361, 361, 0, 0, 0, + 361, 0, 0, 361, 0, 361, 0, 361, 361, 361, + 361, 0, 0, 0, 0, 361, 0, 0, 0, 361, + 0, 0, 0, 361, 0, 0, 0, 0, 0, 0, + 0, 361, 0, 0, 361, 0, 361, 361, 0, 0, + 0, 582, 361, 0, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 0, 0, 0, 0, 0, + 361, 0, 0, 0, 0, 361, 361, 0, 361, 361, + 361, 0, 361, 361, 361, 0, 361, 361, 0, 356, + 361, 361, 361, 361, 0, 356, 0, 361, 361, 0, + 0, 0, 361, 361, 361, 361, 361, 361, 361, 361, + 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 361, 0, 0, 361, 0, 361, 356, 0, 0, + 0, 356, 0, 0, 582, 0, 0, 361, 0, 582, + 0, 582, 582, 582, 582, 582, 582, 582, 582, 582, + 582, 582, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 582, 0, 582, 0, 582, 0, 582, + 582, 582, 356, 36, 0, 0, 0, 356, 0, 356, + 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 28, 0, 0, 0, 0, 0, 0, 49, 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, 33, 0, 28, 28, 0, 0, 0, - 0, 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, 36, 28, - 28, 28, 36, 0, 0, 0, 5, 0, 28, 28, - 0, 28, 28, 36, 28, 28, 28, 0, 36, 0, - 28, 0, 36, 0, 0, 36, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 36, 36, 0, - 28, 0, 36, 36, 0, 0, 28, 28, 36, 931, - 36, 36, 36, 36, 0, 28, 0, 0, 36, 0, - 0, 0, 36, 0, 36, 0, 0, 35, 0, 0, - 0, 35, 0, 0, 36, 0, 36, 36, 0, 36, - 0, 0, 35, 36, 0, 0, 0, 35, 0, 0, - 0, 35, 48, 0, 35, 0, 28, 0, 0, 0, - 0, 0, 0, 36, 0, 0, 35, 35, 0, 36, - 36, 35, 35, 0, 34, 0, 0, 35, 34, 35, - 35, 35, 35, 0, 0, 0, 0, 35, 0, 34, - 0, 35, 0, 35, 34, 7, 0, 0, 34, 0, - 0, 34, 0, 35, 0, 35, 35, 0, 35, 0, - 0, 0, 35, 34, 34, 0, 0, 0, 34, 34, - 0, 0, 0, 0, 34, 0, 34, 34, 34, 34, - 0, 0, 35, 0, 34, 0, 0, 28, 34, 35, - 34, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 34, 0, 28, 34, 0, 34, 0, 28, 932, 34, - 0, 28, 0, 0, 28, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 28, 28, 0, 34, - 33, 28, 28, 0, 33, 34, 34, 28, 0, 28, - 28, 28, 28, 0, 0, 33, 0, 28, 0, 0, - 33, 28, 0, 28, 33, 0, 0, 33, 0, 0, - 0, 0, 0, 28, 0, 0, 28, 0, 28, 33, - 33, 0, 28, 5, 33, 33, 0, 48, 0, 0, - 33, 0, 33, 33, 33, 33, 0, 0, 48, 0, - 33, 0, 28, 48, 33, 0, 33, 48, 28, 28, - 48, 0, 0, 0, 0, 0, 33, 0, 0, 33, - 0, 33, 48, 48, 0, 33, 931, 48, 48, 0, - 48, 0, 0, 48, 0, 48, 48, 48, 48, 0, - 0, 48, 0, 48, 0, 33, 48, 48, 0, 48, - 48, 0, 33, 48, 0, 0, 0, 0, 0, 48, - 0, 0, 48, 0, 48, 48, 48, 0, 48, 48, - 48, 48, 0, 48, 0, 0, 48, 0, 48, 48, - 48, 48, 0, 0, 48, 0, 48, 0, 48, 48, - 48, 0, 48, 48, 0, 0, 48, 0, 0, 0, - 0, 0, 48, 0, 0, 48, 0, 48, 48, 48, - 0, 48, 7, 48, 48, 0, 49, 0, 0, 48, - 0, 48, 48, 48, 48, 0, 0, 49, 0, 48, - 0, 48, 49, 48, 0, 48, 49, 0, 0, 49, - 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, - 48, 49, 49, 0, 48, 0, 49, 49, 0, 0, - 0, 0, 49, 0, 49, 49, 49, 49, 0, 0, - 0, 0, 49, 0, 48, 932, 49, 0, 49, 48, - 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, - 48, 49, 0, 49, 0, 48, 0, 49, 0, 48, + 356, 356, 0, 356, 356, 356, 0, 356, 356, 356, + 0, 356, 356, 0, 0, 356, 356, 356, 356, 0, + 0, 0, 356, 356, 582, 0, 0, 356, 356, 356, + 356, 356, 356, 356, 356, 0, 0, 0, 0, 0, + 0, 0, 34, 0, 0, 0, 356, 0, 49, 356, + 0, 356, 49, 0, 49, 0, 49, 0, 49, 0, + 0, 49, 356, 49, 49, 0, 49, 0, 49, 0, + 49, 0, 49, 49, 49, 49, 0, 0, 49, 49, + 0, 0, 0, 0, 49, 49, 49, 49, 49, 0, + 0, 49, 49, 49, 0, 49, 0, 49, 49, 49, + 49, 49, 49, 49, 49, 28, 49, 49, 49, 49, + 0, 0, 49, 49, 49, 0, 49, 0, 0, 0, + 0, 49, 49, 0, 49, 49, 0, 49, 49, 49, + 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 0, 49, 0, 49, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 28, 28, 49, 0, + 0, 28, 0, 0, 0, 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, 0, 28, 0, 28, 28, 28, 0, 49, + 28, 28, 28, 0, 28, 0, 0, 28, 0, 28, + 28, 28, 28, 0, 0, 0, 28, 28, 28, 0, + 36, 28, 28, 28, 36, 5, 0, 0, 0, 0, + 28, 28, 0, 28, 28, 36, 28, 28, 28, 0, + 36, 0, 28, 0, 36, 0, 0, 36, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, + 36, 0, 28, 0, 36, 36, 0, 0, 28, 28, + 36, 0, 36, 36, 36, 36, 0, 28, 0, 0, + 36, 0, 0, 0, 36, 0, 36, 0, 918, 34, + 0, 0, 0, 34, 0, 0, 36, 0, 36, 36, + 0, 36, 0, 0, 34, 36, 0, 0, 0, 34, + 0, 0, 0, 34, 0, 0, 34, 0, 28, 0, + 0, 0, 0, 0, 0, 36, 0, 0, 34, 34, + 0, 36, 36, 34, 34, 48, 0, 0, 0, 34, + 0, 34, 34, 34, 34, 0, 0, 0, 0, 34, + 0, 0, 28, 34, 0, 34, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 34, 0, 28, 34, 0, + 34, 0, 28, 0, 34, 0, 28, 0, 0, 28, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, + 0, 28, 28, 0, 34, 33, 28, 28, 0, 33, + 34, 34, 28, 0, 28, 28, 28, 28, 0, 0, + 33, 0, 28, 0, 0, 33, 28, 0, 28, 33, + 0, 0, 33, 0, 0, 0, 0, 0, 28, 919, + 0, 28, 0, 28, 33, 33, 0, 28, 0, 33, + 33, 0, 0, 447, 0, 33, 0, 33, 33, 33, + 33, 0, 0, 0, 0, 33, 0, 28, 0, 33, + 0, 33, 0, 28, 28, 0, 448, 0, 0, 0, + 0, 33, 0, 0, 33, 0, 33, 0, 0, 449, + 33, 0, 5, 450, 451, 0, 48, 0, 0, 452, + 0, 453, 454, 455, 456, 0, 0, 48, 0, 457, + 33, 0, 48, 458, 0, 0, 48, 33, 0, 48, + 0, 0, 0, 0, 0, 459, 0, 0, 460, 0, + 461, 48, 48, 0, 0, 0, 48, 48, 0, 0, + 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, + 0, 0, 48, 0, 462, 918, 48, 0, 48, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, + 48, 48, 0, 48, 0, 48, 0, 48, 0, 48, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 48, 0, 49, 0, 48, - 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, - 48, 0, 0, 0, 0, 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, 0, 0, 0, - 48, 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, - 346, 88, 89, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 90, 91, 92, 93, - 94, 0, 0, 0, 95, 0, 0, 0, 96, 0, - 0, 0, 0, 97, 98, 99, 100, 101, 0, 0, - 0, 102, 346, 103, 0, 0, 0, 0, 0, 104, - 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 346, 0, 106, 107, 108, 109, 0, 0, - 0, 0, 0, 346, 0, 0, 199, 0, 346, 0, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 0, 0, 0, 0, 0, 0, 346, 0, - 0, 0, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 0, 346, 346, 0, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 0, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 0, 515, - 0, 0, 346, 0, 346, 515, 0, 346, 0, 0, - 0, 0, 0, 346, 0, 0, 0, 0, 346, 0, - 0, 346, 0, 346, 346, 0, 0, 0, 346, 346, - 0, 0, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 515, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 346, 346, 0, 0, 0, 0, 0, 0, - 346, 346, 0, 346, 0, 0, 0, 0, 0, 346, - 0, 0, 515, 0, 0, 0, 0, 515, 0, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 0, 515, 515, 0, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 0, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 0, 511, 0, - 0, 0, 0, 515, 511, 0, 346, 0, 0, 0, - 0, 0, 515, 0, 0, 0, 0, 0, 346, 0, - 346, 0, 346, 0, 0, 346, 0, 346, 346, 0, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 511, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 0, 0, 0, 0, 346, 0, 346, - 403, 0, 346, 0, 0, 0, 0, 0, 346, 0, - 0, 511, 0, 0, 0, 0, 511, 0, 511, 511, - 511, 511, 511, 511, 511, 511, 511, 511, 511, 0, - 0, 0, 0, 0, 0, 0, 403, 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, 519, 0, 0, - 0, 0, 511, 519, 0, 511, 0, 0, 0, 0, - 0, 511, 0, 0, 0, 0, 0, 339, 0, 403, - 403, 403, 403, 0, 403, 0, 403, 403, 0, 403, - 403, 403, 403, 403, 0, 403, 403, 403, 403, 519, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, - 403, 403, 0, 0, 0, 0, 339, 0, 403, 346, - 0, 403, 0, 0, 0, 0, 0, 403, 0, 0, - 519, 0, 0, 0, 0, 519, 0, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 0, 0, - 0, 0, 0, 0, 0, 346, 0, 0, 0, 519, - 0, 519, 519, 519, 519, 519, 519, 519, 0, 519, - 519, 0, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 0, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519, 519, 0, 346, 0, 0, 0, - 0, 519, 346, 0, 519, 0, 0, 0, 0, 0, - 519, 0, 0, 0, 0, 0, 0, 346, 346, 346, - 346, 346, 0, 0, 0, 346, 346, 0, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 0, 0, 0, 0, 0, 0, 346, 0, 0, - 346, 0, 0, 0, 0, 0, 346, 0, 0, 346, - 0, 0, 0, 0, 346, 0, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, - 346, 346, 346, 346, 346, 346, 346, 0, 346, 346, - 0, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 0, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 0, 446, 738, 0, 0, 0, - 346, 446, 0, 346, 0, 25, 0, 26, 0, 346, + 0, 0, 0, 0, 48, 48, 0, 48, 0, 48, + 48, 0, 48, 0, 0, 48, 48, 48, 48, 48, + 48, 0, 0, 0, 0, 48, 0, 48, 0, 48, + 0, 48, 48, 0, 0, 0, 48, 0, 0, 48, + 0, 48, 0, 0, 48, 0, 48, 0, 0, 0, + 48, 48, 48, 0, 0, 0, 48, 48, 0, 7, + 0, 0, 48, 49, 48, 48, 48, 48, 0, 0, + 48, 0, 48, 0, 49, 0, 48, 0, 48, 49, + 0, 0, 0, 49, 0, 0, 49, 0, 48, 0, + 0, 48, 0, 48, 0, 0, 0, 48, 49, 49, + 0, 0, 0, 49, 49, 0, 919, 0, 0, 49, + 48, 49, 49, 49, 49, 0, 0, 48, 0, 49, + 0, 48, 0, 49, 0, 49, 48, 0, 0, 0, + 48, 0, 0, 48, 0, 49, 0, 0, 49, 0, + 49, 0, 0, 0, 49, 48, 48, 0, 0, 0, + 48, 48, 0, 0, 0, 0, 48, 0, 48, 48, + 48, 48, 0, 0, 49, 0, 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, 0, 0, + 0, 48, 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, 331, 88, 89, 0, 0, 0, 331, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 90, 91, 92, + 93, 94, 0, 0, 0, 95, 0, 0, 0, 96, + 0, 0, 0, 0, 97, 98, 99, 100, 101, 0, + 0, 0, 102, 331, 103, 0, 0, 0, 0, 0, + 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, + 0, 0, 0, 331, 0, 106, 107, 108, 109, 0, + 0, 0, 0, 0, 331, 0, 0, 199, 0, 331, + 0, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 0, 0, 0, 0, 0, 0, 331, + 0, 0, 0, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 0, 331, 331, 0, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 0, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 0, + 500, 0, 0, 331, 0, 331, 500, 0, 331, 0, + 0, 0, 0, 0, 331, 0, 0, 0, 0, 331, + 0, 0, 331, 0, 331, 331, 0, 0, 0, 331, + 331, 0, 0, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 500, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 331, 331, 0, 0, 0, 0, 0, + 0, 331, 0, 0, 331, 0, 0, 0, 0, 0, + 331, 0, 0, 500, 0, 0, 0, 0, 500, 0, + 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, + 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 500, 500, 500, 500, 500, 500, 500, 500, 500, + 500, 910, 500, 500, 0, 500, 500, 500, 500, 500, + 500, 500, 500, 500, 500, 0, 500, 500, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, + 500, 500, 500, 500, 500, 500, 500, 500, 0, 496, + 0, 0, 0, 0, 500, 496, 0, 0, 0, 0, + 0, 0, 0, 500, 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, 496, 0, 0, 910, 0, 0, 0, 0, 910, + 0, 910, 910, 910, 910, 910, 910, 910, 910, 910, + 910, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 388, 0, 910, 0, 910, 0, 910, 0, 910, + 910, 910, 496, 0, 0, 0, 0, 496, 0, 496, + 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, + 0, 0, 0, 0, 0, 0, 0, 388, 0, 0, + 496, 496, 0, 496, 496, 496, 496, 496, 496, 496, + 0, 496, 496, 0, 496, 496, 496, 496, 496, 496, + 496, 496, 496, 496, 910, 496, 496, 496, 496, 496, + 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, + 496, 496, 496, 496, 496, 496, 496, 0, 504, 0, + 0, 0, 0, 496, 504, 0, 496, 0, 0, 0, + 0, 0, 496, 0, 0, 0, 0, 0, 324, 0, + 388, 388, 388, 388, 0, 388, 0, 388, 388, 0, + 388, 388, 388, 388, 388, 0, 388, 388, 388, 388, + 504, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 0, 0, 0, 0, 324, 0, 388, + 331, 0, 388, 0, 0, 0, 0, 0, 388, 0, + 0, 504, 0, 0, 0, 0, 504, 0, 504, 504, + 504, 504, 504, 504, 504, 504, 504, 504, 504, 0, + 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, + 504, 0, 504, 504, 504, 504, 504, 504, 504, 0, + 504, 504, 0, 504, 504, 504, 504, 504, 504, 504, + 504, 504, 504, 0, 504, 504, 504, 504, 504, 504, + 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, + 504, 504, 504, 504, 504, 504, 0, 331, 0, 0, + 0, 0, 504, 331, 0, 504, 0, 0, 0, 0, + 0, 504, 0, 0, 0, 0, 0, 0, 331, 331, + 331, 331, 331, 0, 0, 0, 331, 331, 0, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 0, 0, 0, 0, 0, 0, 331, 0, + 0, 331, 0, 0, 0, 0, 0, 331, 0, 0, + 331, 0, 0, 0, 0, 331, 0, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, + 0, 331, 331, 331, 331, 331, 331, 331, 0, 331, + 331, 0, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 0, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 0, 431, 738, 0, 0, + 0, 331, 431, 0, 331, 0, 25, 0, 26, 0, + 331, 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, 431, 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, 739, 431, + 0, 0, 0, 0, 431, 0, 431, 431, 431, 431, + 431, 431, 431, 431, 431, 431, 431, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 431, 0, + 431, 431, 431, 431, 431, 431, 431, 0, 431, 431, + 0, 431, 431, 431, 431, 431, 431, 431, 431, 431, + 431, 0, 431, 431, 431, 431, 431, 431, 431, 431, + 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, + 431, 431, 431, 431, 0, 391, 876, 0, 0, 740, + 431, 391, 0, 431, 0, 25, 0, 26, 0, 431, 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, 446, 0, 0, + 0, 0, 0, 0, 0, 33, 0, 391, 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, 739, 446, 0, - 0, 0, 0, 446, 0, 446, 446, 446, 446, 446, - 446, 446, 446, 446, 446, 446, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 446, 0, 446, - 446, 446, 446, 446, 446, 446, 0, 446, 446, 0, - 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, - 0, 446, 446, 446, 446, 446, 446, 446, 446, 446, - 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, - 446, 446, 446, 0, 406, 876, 0, 0, 740, 446, - 406, 0, 446, 0, 25, 0, 26, 0, 446, 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, 406, 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, 319, 406, 0, 0, - 0, 0, 406, 0, 406, 406, 406, 406, 406, 406, - 406, 406, 406, 406, 406, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 406, 0, 406, 406, - 406, 406, 406, 406, 406, 0, 406, 0, 0, 406, - 406, 406, 406, 406, 406, 406, 406, 406, 406, 0, - 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, - 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, - 406, 406, 0, 550, 0, 492, 0, 354, 406, 550, - 0, 406, 0, 57, 25, 0, 26, 406, 0, 27, - 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, - 0, 0, 0, 0, 65, 0, 0, 31, 0, 0, - 0, 0, 0, 0, 33, 550, 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, 257, 0, 42, 0, 0, 550, 0, 0, 0, - 0, 550, 0, 550, 550, 550, 550, 550, 550, 550, - 550, 550, 550, 550, 0, 0, 0, 0, 90, 91, - 92, 258, 0, 0, 0, 550, 0, 550, 0, 550, - 96, 550, 550, 550, 0, 550, 550, 0, 550, 550, - 550, 550, 550, 550, 550, 550, 550, 550, 368, 0, - 0, 550, 550, 550, 550, 550, 550, 550, 550, 550, - 550, 550, 550, 550, 550, 550, 550, 550, 550, 564, - 550, 368, 0, 0, 0, 564, 106, 493, 0, 0, - 0, 0, 0, 0, 368, 0, 550, 0, 0, 368, - 0, 0, 245, 0, 368, 0, 368, 368, 368, 368, - 0, 0, 0, 0, 368, 0, 0, 0, 368, 0, - 0, 564, 368, 0, 0, 0, 0, 0, 0, 0, - 368, 0, 0, 368, 0, 368, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 568, 0, 0, - 0, 0, 0, 568, 0, 0, 0, 0, 0, 368, - 0, 0, 564, 0, 0, 0, 0, 564, 0, 564, - 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 568, - 0, 564, 0, 564, 0, 564, 0, 564, 564, 564, - 0, 564, 564, 0, 0, 564, 564, 564, 564, 564, - 564, 564, 564, 564, 0, 368, 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, 571, 564, 0, 0, 0, 0, 571, 0, 568, - 0, 568, 0, 568, 0, 568, 568, 568, 0, 568, - 568, 0, 0, 568, 568, 568, 568, 0, 0, 0, - 568, 568, 0, 0, 0, 568, 568, 568, 568, 568, - 568, 568, 568, 571, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 568, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 569, - 568, 0, 0, 0, 0, 569, 0, 0, 0, 0, - 0, 0, 0, 0, 571, 0, 0, 0, 0, 571, - 0, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 569, 0, 571, 0, 571, 0, 571, 0, 571, - 571, 571, 0, 571, 571, 0, 0, 571, 571, 571, - 571, 0, 0, 0, 571, 571, 0, 0, 0, 571, - 571, 571, 571, 571, 571, 571, 571, 0, 0, 0, - 0, 0, 569, 0, 0, 0, 0, 569, 571, 569, - 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, - 0, 0, 0, 570, 571, 0, 0, 0, 0, 570, - 0, 569, 0, 569, 0, 569, 0, 569, 569, 569, - 0, 569, 569, 0, 0, 569, 569, 569, 569, 0, - 0, 0, 569, 569, 0, 0, 0, 569, 569, 569, - 569, 569, 569, 569, 569, 570, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 569, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 574, 569, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 570, 0, 0, 0, - 0, 570, 0, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 570, 0, 570, 0, 570, - 0, 570, 570, 570, 0, 570, 570, 0, 0, 570, - 570, 570, 570, 0, 0, 0, 570, 570, 0, 575, - 0, 570, 570, 570, 570, 570, 570, 570, 570, 0, - 0, 0, 0, 0, 574, 0, 0, 0, 0, 574, - 570, 574, 574, 574, 574, 574, 574, 574, 574, 574, - 574, 574, 0, 0, 0, 0, 570, 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, 0, 576, 0, 574, - 574, 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, - 0, 575, 0, 575, 0, 575, 0, 575, 575, 575, - 0, 0, 0, 0, 0, 575, 575, 575, 575, 0, - 0, 0, 575, 575, 0, 577, 0, 575, 575, 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, 0, 576, - 0, 576, 0, 576, 0, 576, 576, 576, 0, 0, - 0, 0, 0, 576, 576, 576, 576, 0, 0, 0, - 576, 576, 0, 578, 0, 576, 576, 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, 0, 577, 0, 577, - 0, 577, 0, 577, 577, 577, 0, 0, 0, 0, - 0, 577, 577, 577, 577, 0, 0, 0, 577, 577, - 0, 579, 0, 0, 0, 577, 577, 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, 0, 578, 0, 578, 0, 578, - 0, 578, 578, 578, 0, 0, 0, 0, 0, 578, - 578, 578, 578, 0, 0, 0, 578, 578, 0, 580, - 0, 0, 0, 578, 578, 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, 0, 579, 0, 579, 0, 579, 0, 579, - 579, 579, 0, 0, 0, 0, 0, 579, 579, 579, - 579, 0, 0, 0, 579, 579, 0, 581, 0, 0, - 0, 579, 579, 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, - 0, 580, 0, 580, 0, 580, 0, 580, 580, 580, - 0, 0, 0, 0, 0, 580, 580, 580, 580, 0, - 0, 0, 580, 580, 0, 582, 0, 0, 0, 580, - 580, 580, 580, 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, 0, 581, - 0, 581, 0, 581, 0, 581, 581, 581, 0, 0, - 0, 0, 0, 581, 581, 581, 581, 0, 0, 0, - 581, 581, 0, 583, 0, 0, 0, 581, 581, 581, - 581, 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, 0, 582, 0, 582, - 0, 582, 0, 582, 582, 582, 0, 0, 0, 0, - 0, 0, 0, 582, 582, 0, 0, 0, 582, 582, - 0, 584, 0, 0, 0, 0, 0, 582, 582, 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, 0, 583, 0, 583, 0, 583, - 0, 583, 583, 583, 0, 0, 0, 0, 0, 0, - 0, 583, 583, 0, 0, 0, 583, 583, 0, 586, - 0, 0, 0, 0, 0, 583, 583, 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, 0, 584, 0, 584, 0, 584, 0, 584, - 584, 584, 0, 0, 0, 0, 0, 0, 0, 584, - 584, 0, 0, 0, 584, 584, 0, 587, 0, 0, - 0, 0, 0, 584, 584, 584, 584, 0, 0, 0, - 0, 0, 586, 0, 0, 0, 0, 586, 584, 586, - 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, - 0, 0, 0, 0, 584, 0, 0, 0, 0, 0, - 0, 586, 0, 586, 0, 586, 0, 586, 586, 586, - 0, 0, 0, 0, 0, 0, 0, 586, 586, 0, - 0, 0, 586, 586, 0, 588, 0, 0, 0, 0, - 0, 0, 0, 586, 586, 0, 0, 0, 0, 0, - 587, 0, 0, 0, 0, 587, 586, 587, 587, 587, - 587, 587, 587, 587, 587, 587, 587, 587, 0, 0, - 0, 0, 586, 0, 0, 0, 0, 0, 0, 587, - 0, 587, 0, 587, 0, 587, 587, 587, 0, 0, - 0, 0, 0, 0, 0, 0, 587, 0, 0, 0, - 587, 587, 0, 589, 0, 0, 0, 0, 0, 0, - 0, 587, 587, 0, 0, 0, 0, 0, 588, 0, - 0, 0, 0, 588, 587, 588, 588, 588, 588, 588, - 588, 588, 588, 588, 588, 588, 0, 0, 0, 0, - 587, 0, 0, 0, 0, 0, 0, 588, 0, 588, - 0, 588, 0, 588, 588, 588, 0, 0, 0, 0, - 0, 0, 0, 0, 588, 0, 0, 0, 588, 588, - 0, 590, 0, 0, 0, 0, 0, 0, 0, 588, - 588, 0, 0, 0, 0, 0, 589, 0, 0, 0, - 0, 589, 588, 589, 589, 589, 589, 589, 589, 589, - 589, 589, 589, 589, 0, 0, 0, 0, 588, 0, - 0, 0, 0, 0, 0, 589, 0, 589, 0, 589, - 0, 589, 589, 589, 0, 0, 0, 0, 0, 0, - 0, 0, 589, 0, 0, 0, 0, 589, 0, 591, - 0, 0, 0, 0, 0, 0, 0, 589, 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, 0, 590, 0, 590, 0, 590, 0, 590, - 590, 590, 0, 0, 0, 0, 0, 0, 0, 0, - 590, 0, 0, 0, 0, 590, 0, 592, 0, 0, - 0, 0, 0, 0, 0, 590, 590, 0, 0, 0, - 0, 0, 591, 0, 0, 0, 0, 591, 590, 591, - 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, - 0, 0, 0, 0, 590, 0, 0, 0, 0, 0, - 0, 591, 0, 591, 0, 591, 0, 591, 591, 591, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 591, 0, 593, 0, 0, 0, 0, - 0, 0, 0, 591, 591, 0, 0, 0, 0, 0, - 592, 0, 0, 0, 0, 592, 591, 592, 592, 592, - 592, 592, 592, 592, 592, 592, 592, 592, 0, 0, - 0, 0, 591, 0, 0, 0, 0, 0, 0, 592, - 0, 592, 0, 592, 0, 592, 592, 592, 0, 0, - 0, 594, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 592, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 592, 592, 0, 0, 0, 0, 0, 593, 0, - 0, 0, 0, 593, 592, 593, 593, 593, 593, 593, - 593, 593, 593, 593, 593, 593, 0, 0, 0, 0, - 592, 0, 0, 0, 0, 0, 0, 593, 0, 593, - 0, 593, 0, 593, 593, 593, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 593, - 0, 0, 0, 0, 594, 0, 0, 0, 0, 594, - 593, 594, 594, 594, 594, 594, 594, 594, 594, 594, - 594, 594, 593, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 594, 0, 594, 0, 594, 593, 594, - 594, 594, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 56, 0, 594, 0, 0, 0, 0, - 0, 57, 25, 58, 26, 0, 594, 27, 59, 0, - 60, 61, 28, 62, 63, 64, 29, 0, 594, 0, - 0, 0, 65, 0, 66, 31, 67, 68, 69, 70, - 0, 0, 33, 0, 594, 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, 90, 91, 92, 93, - 94, 0, 0, 0, 95, 0, 0, 0, 96, 0, - 0, 0, 0, 97, 98, 99, 100, 101, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, - 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 268, 0, 0, 0, 106, 107, 108, 109, 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, 90, 91, 92, 93, 94, 0, 0, - 0, 95, 0, 0, 0, 96, 0, 0, 0, 0, - 97, 98, 99, 100, 101, 0, 0, 0, 102, 0, - 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, + 40, 41, 0, 0, 42, 0, 0, 319, 391, 0, + 0, 0, 0, 391, 0, 391, 391, 391, 391, 391, + 391, 391, 391, 391, 391, 391, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 391, 0, 391, + 391, 391, 391, 391, 391, 391, 0, 391, 0, 0, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 0, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, + 391, 391, 391, 0, 535, 0, 492, 0, 354, 391, + 535, 0, 391, 0, 57, 25, 0, 26, 391, 0, + 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 0, 0, 0, 0, 65, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 33, 535, 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, 257, 0, 42, 0, 0, 535, 0, 0, + 0, 580, 535, 0, 535, 535, 535, 535, 535, 535, + 535, 535, 535, 535, 535, 0, 0, 0, 0, 90, + 91, 92, 258, 0, 0, 0, 535, 0, 535, 0, + 535, 96, 535, 535, 535, 0, 535, 535, 0, 535, + 535, 535, 535, 535, 535, 535, 535, 535, 535, 0, + 0, 0, 535, 535, 535, 535, 535, 535, 535, 535, + 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, + 549, 535, 0, 0, 0, 0, 549, 106, 493, 0, + 0, 0, 0, 0, 580, 0, 0, 535, 0, 580, + 0, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 549, 580, 0, 580, 0, 580, 0, 580, + 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 580, 0, 0, 553, 0, + 0, 0, 0, 0, 553, 0, 0, 0, 0, 0, + 0, 0, 0, 549, 0, 0, 0, 0, 549, 0, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 0, 0, 0, 580, 0, 0, 0, 0, 0, + 553, 0, 549, 0, 549, 0, 549, 0, 549, 549, + 549, 0, 549, 549, 0, 0, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 0, 0, 0, 549, 549, + 549, 549, 549, 549, 549, 549, 0, 0, 0, 0, + 0, 553, 0, 0, 0, 0, 553, 549, 553, 553, + 553, 553, 553, 553, 553, 553, 553, 553, 553, 0, + 0, 0, 556, 549, 0, 0, 0, 0, 556, 0, + 553, 0, 553, 0, 553, 0, 553, 553, 553, 0, + 553, 553, 0, 0, 553, 553, 553, 553, 0, 0, + 0, 553, 553, 0, 0, 0, 553, 553, 553, 553, + 553, 553, 553, 553, 556, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 547, 0, 0, - 0, 106, 107, 108, 109, 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, + 554, 553, 0, 0, 0, 0, 554, 0, 0, 0, + 0, 0, 0, 0, 0, 556, 0, 0, 0, 0, + 556, 0, 556, 556, 556, 556, 556, 556, 556, 556, + 556, 556, 556, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 554, 0, 556, 0, 556, 0, 556, 0, + 556, 556, 556, 0, 556, 556, 0, 0, 556, 556, + 556, 556, 0, 0, 0, 556, 556, 0, 0, 0, + 556, 556, 556, 556, 556, 556, 556, 556, 0, 0, + 0, 0, 0, 554, 0, 0, 0, 0, 554, 556, + 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, + 554, 0, 0, 0, 555, 556, 0, 0, 0, 0, + 555, 0, 554, 0, 554, 0, 554, 0, 554, 554, + 554, 0, 554, 554, 0, 0, 554, 554, 554, 554, + 0, 0, 0, 554, 554, 0, 0, 0, 554, 554, + 554, 554, 554, 554, 554, 554, 555, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 90, 91, 92, 93, 94, 0, 0, 0, 95, 0, - 0, 0, 96, 0, 0, 0, 0, 97, 98, 99, - 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, - 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, + 0, 0, 559, 554, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 555, 0, 0, + 0, 0, 555, 0, 555, 555, 555, 555, 555, 555, + 555, 555, 555, 555, 555, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 555, 0, 555, 0, + 555, 0, 555, 555, 555, 0, 555, 555, 0, 0, + 555, 555, 555, 555, 0, 0, 0, 555, 555, 0, + 560, 0, 555, 555, 555, 555, 555, 555, 555, 555, + 0, 0, 0, 0, 0, 559, 0, 0, 0, 0, + 559, 555, 559, 559, 559, 559, 559, 559, 559, 559, + 559, 559, 559, 0, 0, 0, 0, 555, 0, 0, + 0, 0, 0, 0, 559, 0, 559, 0, 559, 0, + 559, 559, 559, 0, 0, 0, 0, 0, 559, 559, + 559, 559, 0, 0, 0, 559, 559, 0, 561, 0, + 559, 559, 559, 559, 559, 559, 559, 559, 0, 0, + 0, 0, 0, 560, 0, 0, 0, 0, 560, 559, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 0, 0, 0, 0, 559, 0, 0, 0, 0, + 0, 0, 560, 0, 560, 0, 560, 0, 560, 560, + 560, 0, 0, 0, 0, 0, 560, 560, 560, 560, + 0, 0, 0, 560, 560, 0, 562, 0, 560, 560, + 560, 560, 560, 560, 560, 560, 0, 0, 0, 0, + 0, 561, 0, 0, 0, 0, 561, 560, 561, 561, + 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, + 0, 0, 0, 560, 0, 0, 0, 0, 0, 0, + 561, 0, 561, 0, 561, 0, 561, 561, 561, 0, + 0, 0, 0, 0, 561, 561, 561, 561, 0, 0, + 0, 561, 561, 0, 563, 0, 561, 561, 561, 561, + 561, 561, 561, 561, 0, 0, 0, 0, 0, 562, + 0, 0, 0, 0, 562, 561, 562, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 0, 0, 0, + 0, 561, 0, 0, 0, 0, 0, 0, 562, 0, + 562, 0, 562, 0, 562, 562, 562, 0, 0, 0, + 0, 0, 562, 562, 562, 562, 0, 0, 0, 562, + 562, 0, 564, 0, 0, 0, 562, 562, 562, 562, + 562, 562, 0, 0, 0, 0, 0, 563, 0, 0, + 0, 0, 563, 562, 563, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 563, 0, 0, 0, 0, 562, + 0, 0, 0, 0, 0, 0, 563, 0, 563, 0, + 563, 0, 563, 563, 563, 0, 0, 0, 0, 0, + 563, 563, 563, 563, 0, 0, 0, 563, 563, 0, + 565, 0, 0, 0, 563, 563, 563, 563, 563, 563, + 0, 0, 0, 0, 0, 564, 0, 0, 0, 0, + 564, 563, 564, 564, 564, 564, 564, 564, 564, 564, + 564, 564, 564, 0, 0, 0, 0, 563, 0, 0, + 0, 0, 0, 0, 564, 0, 564, 0, 564, 0, + 564, 564, 564, 0, 0, 0, 0, 0, 564, 564, + 564, 564, 0, 0, 0, 564, 564, 0, 566, 0, + 0, 0, 564, 564, 564, 564, 564, 564, 0, 0, + 0, 0, 0, 565, 0, 0, 0, 0, 565, 564, + 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, + 565, 0, 0, 0, 0, 564, 0, 0, 0, 0, + 0, 0, 565, 0, 565, 0, 565, 0, 565, 565, + 565, 0, 0, 0, 0, 0, 565, 565, 565, 565, + 0, 0, 0, 565, 565, 0, 567, 0, 0, 0, + 565, 565, 565, 565, 565, 565, 0, 0, 0, 0, + 0, 566, 0, 0, 0, 0, 566, 565, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 0, + 0, 0, 0, 565, 0, 0, 0, 0, 0, 0, + 566, 0, 566, 0, 566, 0, 566, 566, 566, 0, + 0, 0, 0, 0, 566, 566, 566, 566, 0, 0, + 0, 566, 566, 0, 568, 0, 0, 0, 566, 566, + 566, 566, 566, 566, 0, 0, 0, 0, 0, 567, + 0, 0, 0, 0, 567, 566, 567, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 0, 0, 0, + 0, 566, 0, 0, 0, 0, 0, 0, 567, 0, + 567, 0, 567, 0, 567, 567, 567, 0, 0, 0, + 0, 0, 0, 0, 567, 567, 0, 0, 0, 567, + 567, 0, 569, 0, 0, 0, 0, 0, 567, 567, + 567, 567, 0, 0, 0, 0, 0, 568, 0, 0, + 0, 0, 568, 567, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 0, 0, 0, 0, 567, + 0, 0, 0, 0, 0, 0, 568, 0, 568, 0, + 568, 0, 568, 568, 568, 0, 0, 0, 0, 0, + 0, 0, 568, 568, 0, 0, 0, 568, 568, 0, + 570, 0, 0, 0, 0, 0, 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, 0, 568, 0, 0, + 0, 0, 0, 0, 569, 0, 569, 0, 569, 0, + 569, 569, 569, 0, 0, 0, 0, 0, 0, 0, + 569, 569, 0, 0, 0, 569, 569, 0, 571, 0, + 0, 0, 0, 0, 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, 0, 570, 0, 570, 0, 570, 0, 570, 570, + 570, 0, 0, 0, 0, 0, 0, 0, 570, 570, + 0, 0, 0, 570, 570, 0, 572, 0, 0, 0, + 0, 0, 0, 0, 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, 0, + 571, 0, 571, 0, 571, 0, 571, 571, 571, 0, + 0, 0, 0, 0, 0, 0, 571, 571, 0, 0, + 0, 571, 571, 0, 573, 0, 0, 0, 0, 0, + 0, 0, 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, 0, 572, 0, + 572, 0, 572, 0, 572, 572, 572, 0, 0, 0, + 0, 0, 0, 0, 0, 572, 0, 0, 0, 572, + 572, 0, 574, 0, 0, 0, 0, 0, 0, 0, + 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, 0, 573, 0, 573, 0, + 573, 0, 573, 573, 573, 0, 0, 0, 0, 0, + 0, 0, 0, 573, 0, 0, 0, 573, 573, 0, + 575, 0, 0, 0, 0, 0, 0, 0, 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, 0, 574, 0, 574, 0, 574, 0, + 574, 574, 574, 0, 0, 0, 0, 0, 0, 0, + 0, 574, 0, 0, 0, 0, 574, 0, 576, 0, + 0, 0, 0, 0, 0, 0, 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, 0, 575, 0, 575, 0, 575, 0, 575, 575, + 575, 0, 0, 0, 0, 0, 0, 0, 0, 575, + 0, 0, 0, 0, 575, 0, 577, 0, 0, 0, + 0, 0, 0, 0, 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, 0, + 576, 0, 576, 0, 576, 0, 576, 576, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 928, 0, 0, 0, 106, 107, - 108, 109, 928, 928, 928, 928, 0, 0, 928, 928, - 0, 928, 928, 928, 928, 928, 928, 928, 0, 0, - 0, 0, 0, 928, 0, 928, 928, 928, 928, 928, - 928, 0, 0, 928, 0, 0, 0, 928, 928, 0, - 928, 928, 928, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 928, 0, 928, 0, 928, 928, 0, 0, - 928, 0, 928, 928, 928, 928, 928, 928, 928, 928, - 928, 928, 928, 928, 0, 928, 0, 0, 928, 928, - 0, 0, 928, 928, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 928, 928, 928, - 928, 928, 0, 0, 0, 928, 0, 0, 0, 928, - 0, 0, 0, 0, 928, 928, 928, 928, 928, 0, - 0, 0, 928, 0, 928, 0, 0, 0, 0, 0, - 928, 928, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 576, 0, 578, 0, 0, 0, 0, 0, + 0, 0, 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, 0, 577, 0, + 577, 0, 577, 0, 577, 577, 577, 0, 0, 0, + 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 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, 0, 578, 0, 578, 0, + 578, 0, 578, 578, 578, 0, 0, 331, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, + 0, 0, 0, 579, 0, 0, 0, 0, 579, 578, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 578, 0, 331, 0, 0, 0, 0, 0, 0, + 0, 0, 579, 0, 579, 0, 579, 578, 579, 579, + 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 579, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 579, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 579, 0, 0, + 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 579, 331, 0, 331, 0, 331, 0, + 0, 331, 0, 331, 331, 0, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 0, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 0, + 0, 56, 0, 331, 0, 331, 0, 0, 331, 57, + 25, 58, 26, 0, 331, 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, 90, 91, 92, 93, 94, 0, + 0, 0, 95, 0, 0, 0, 96, 0, 0, 0, + 0, 97, 98, 99, 100, 101, 0, 0, 0, 102, + 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 792, 0, 0, 0, 928, 928, 928, 928, 792, - 792, 792, 792, 0, 0, 792, 792, 0, 792, 792, - 792, 792, 792, 792, 792, 0, 0, 0, 0, 0, - 792, 0, 792, 792, 792, 792, 792, 792, 0, 0, - 792, 0, 0, 0, 792, 792, 0, 792, 792, 792, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 792, - 0, 792, 0, 792, 792, 0, 0, 792, 0, 792, - 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, - 792, 0, 792, 0, 0, 792, 792, 0, 0, 792, - 792, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 792, 792, 792, 792, 792, 0, - 0, 0, 792, 0, 0, 0, 792, 0, 0, 0, - 0, 792, 792, 792, 792, 792, 0, 0, 0, 792, - 0, 792, 0, 0, 0, 0, 0, 792, 792, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, + 0, 0, 106, 107, 108, 109, 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, 0, 0, 0, 0, 0, 0, 725, 0, - 0, 0, 792, 792, 792, 792, 57, 25, 0, 26, - 0, 0, 27, 256, 0, 1018, 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, 257, 37, 42, 38, 0, 0, - 0, 39, 0, 87, 0, 0, 88, 89, 0, 40, - 41, 0, 0, 42, 0, 0, 319, 0, 0, 0, - 0, 90, 91, 92, 93, 94, 0, 0, 0, 509, - 726, 0, 0, 96, 0, 0, 0, 0, 0, 98, + 0, 90, 91, 92, 93, 94, 0, 0, 0, 95, + 0, 0, 0, 96, 0, 0, 0, 0, 97, 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 725, 0, 0, 0, 106, - 301, 108, 109, 57, 25, 0, 26, 0, 0, 27, - 256, 0, 1139, 0, 28, 62, 63, 354, 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, 906, - 35, 39, 0, 0, 77, 0, 79, 0, 81, 40, - 41, 257, 37, 42, 38, 0, 0, 0, 39, 0, - 87, 0, 0, 88, 89, 0, 40, 41, 0, 0, - 42, 0, 0, 319, 0, 0, 0, 0, 90, 91, - 92, 93, 94, 0, 0, 0, 509, 0, 0, 0, - 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, + 0, 0, 0, 0, 0, 547, 0, 0, 0, 106, + 107, 108, 109, 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, 90, 91, + 92, 93, 94, 0, 0, 0, 95, 0, 0, 0, + 96, 0, 0, 0, 0, 97, 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, - 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, - 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, - 28, 62, 63, 0, 29, 0, 106, 301, 108, 109, - 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 354, 34, 0, 72, 73, 35, + 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 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, 257, 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, 90, 91, 92, 93, 94, 0, - 0, 0, 712, 975, 0, 0, 96, 0, 0, 0, - 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, - 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, + 0, 0, 915, 0, 0, 0, 106, 107, 108, 109, + 915, 915, 915, 915, 0, 0, 915, 915, 0, 915, + 915, 915, 915, 915, 915, 915, 0, 0, 0, 0, + 0, 915, 0, 915, 915, 915, 915, 915, 915, 0, + 0, 915, 0, 0, 0, 915, 915, 0, 915, 915, + 915, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 915, 0, 915, 0, 915, 915, 0, 0, 915, 0, + 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, + 915, 915, 0, 915, 0, 0, 915, 915, 0, 0, + 915, 915, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 915, 915, 915, 915, 915, + 0, 0, 0, 915, 0, 0, 0, 915, 0, 0, + 0, 0, 915, 915, 915, 915, 915, 0, 0, 0, + 915, 0, 915, 0, 0, 0, 0, 0, 915, 915, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 779, + 0, 0, 0, 915, 915, 915, 915, 779, 779, 779, + 779, 0, 0, 779, 779, 0, 779, 779, 779, 779, + 779, 779, 779, 0, 0, 0, 0, 0, 779, 0, + 779, 779, 779, 779, 779, 779, 0, 0, 779, 0, + 0, 0, 779, 779, 0, 779, 779, 779, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 779, 0, 779, + 0, 779, 779, 0, 0, 779, 0, 779, 779, 779, + 779, 779, 779, 779, 779, 779, 779, 779, 779, 0, + 779, 0, 0, 779, 779, 0, 0, 779, 779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 695, 0, 106, 713, 108, 109, 0, 0, 57, 25, - 0, 26, 0, 714, 27, 256, 0, 0, 0, 28, - 62, 63, 0, 29, 0, 0, 187, 0, 187, 65, - 0, 187, 31, 0, 0, 0, 187, 0, 0, 33, - 187, 0, 0, 0, 34, 0, 72, 73, 35, 187, - 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, - 37, 187, 38, 75, 0, 187, 39, 0, 0, 77, - 0, 79, 0, 81, 40, 41, 257, 187, 42, 187, - 0, 85, 0, 187, 0, 87, 0, 0, 88, 89, - 0, 187, 187, 0, 0, 187, 0, 0, 187, 0, - 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, - 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, - 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, - 103, 0, 0, 952, 0, 0, 104, 105, 0, 0, - 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, - 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, - 0, 106, 301, 108, 109, 65, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 33, 0, 0, 0, 187, - 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, 257, 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, 90, - 91, 92, 93, 94, 0, 0, 0, 712, 0, 0, + 0, 0, 779, 779, 779, 779, 779, 0, 0, 0, + 779, 0, 0, 0, 779, 0, 0, 0, 0, 779, + 779, 779, 779, 779, 0, 0, 0, 779, 0, 779, + 0, 0, 0, 0, 0, 779, 779, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, + 779, 779, 779, 779, 57, 25, 0, 26, 0, 0, + 27, 256, 0, 1018, 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, 257, 37, 42, 38, 0, 0, 0, 39, + 0, 87, 0, 0, 88, 89, 0, 40, 41, 0, + 0, 42, 0, 0, 319, 0, 0, 0, 0, 90, + 91, 92, 93, 94, 0, 0, 0, 509, 726, 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 725, 0, 106, 713, 108, - 109, 0, 0, 57, 25, 0, 26, 0, 714, 27, - 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, - 0, 187, 0, 187, 65, 0, 187, 31, 0, 0, - 0, 187, 0, 0, 33, 187, 0, 0, 0, 34, - 0, 72, 73, 35, 187, 0, 0, 0, 0, 0, - 0, 187, 0, 0, 0, 37, 187, 38, 75, 0, - 187, 39, 0, 0, 77, 0, 79, 0, 81, 40, - 41, 257, 187, 42, 187, 0, 0, 0, 187, 0, - 87, 0, 0, 88, 89, 0, 187, 187, 0, 0, - 187, 0, 0, 187, 0, 0, 0, 0, 90, 91, - 92, 93, 94, 0, 0, 0, 509, 0, 0, 0, - 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, - 0, 0, 0, 102, 0, 103, 952, 0, 0, 0, - 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 725, 0, 0, 0, 106, 301, 108, + 109, 57, 25, 0, 26, 0, 0, 27, 256, 0, + 1140, 0, 28, 62, 63, 354, 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, 906, 35, 39, + 0, 0, 77, 0, 79, 0, 81, 40, 41, 257, + 37, 42, 38, 0, 0, 0, 39, 0, 87, 0, + 0, 88, 89, 0, 40, 41, 0, 0, 42, 0, + 0, 319, 0, 0, 0, 0, 90, 91, 92, 93, + 94, 0, 0, 0, 509, 0, 0, 0, 96, 0, + 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, + 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, + 105, 0, 0, 0, 0, 0, 0, 57, 25, 0, + 26, 0, 0, 27, 256, 0, 0, 0, 28, 62, + 63, 0, 29, 0, 106, 301, 108, 109, 65, 0, + 0, 31, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 354, 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, 257, 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, 894, 0, 0, 0, 106, 301, 108, 109, - 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, - 0, 28, 62, 63, 187, 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, 257, 37, - 42, 38, 0, 0, 0, 39, 0, 87, 0, 0, - 88, 89, 0, 40, 41, 0, 0, 42, 0, 0, - 319, 0, 0, 0, 0, 90, 91, 92, 93, 94, - 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, - 0, 0, 0, 98, 99, 100, 101, 0, 0, 0, - 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, + 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, + 712, 975, 0, 0, 96, 0, 0, 0, 0, 0, + 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, + 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 695, 0, + 106, 713, 108, 109, 0, 0, 57, 25, 0, 26, + 0, 714, 27, 256, 0, 0, 0, 28, 62, 63, + 0, 29, 0, 0, 172, 0, 172, 65, 0, 172, + 31, 0, 0, 0, 172, 0, 0, 33, 172, 0, + 0, 0, 34, 0, 72, 73, 35, 172, 0, 0, + 0, 0, 0, 0, 172, 0, 0, 0, 37, 172, + 38, 75, 0, 172, 39, 0, 0, 77, 0, 79, + 0, 81, 40, 41, 257, 172, 42, 172, 0, 85, + 0, 172, 0, 87, 0, 0, 88, 89, 0, 172, + 172, 0, 0, 172, 0, 0, 172, 0, 0, 0, + 0, 90, 91, 92, 93, 94, 0, 0, 0, 0, + 0, 0, 0, 96, 0, 0, 0, 0, 0, 98, + 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, + 0, 939, 0, 0, 104, 105, 0, 0, 0, 0, + 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, + 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, + 301, 108, 109, 65, 0, 0, 31, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 172, 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, + 257, 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, 90, 91, 92, + 93, 94, 0, 0, 0, 712, 0, 0, 0, 96, + 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, + 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, + 104, 105, 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, 619, - 0, 0, 0, 106, 301, 108, 109, 619, 619, 0, - 619, 0, 0, 619, 619, 0, 0, 0, 619, 619, - 619, 320, 619, 0, 0, 0, 0, 0, 619, 0, - 0, 619, 0, 0, 0, 0, 0, 0, 619, 0, - 0, 0, 0, 619, 0, 619, 619, 619, 0, 0, - 0, 0, 0, 0, 0, 346, 0, 0, 0, 619, - 0, 619, 619, 0, 0, 619, 0, 0, 619, 0, - 619, 0, 619, 619, 619, 619, 0, 619, 0, 0, - 0, 0, 0, 0, 619, 0, 0, 619, 619, 0, - 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 619, 619, 619, 619, 619, 0, 0, 0, - 0, 0, 0, 0, 619, 0, 0, 0, 0, 0, - 619, 619, 619, 619, 0, 0, 0, 619, 0, 619, - 0, 0, 0, 0, 0, 619, 619, 0, 0, 0, + 0, 0, 0, 725, 0, 106, 713, 108, 109, 0, + 0, 57, 25, 0, 26, 0, 714, 27, 256, 0, + 0, 0, 28, 62, 63, 0, 29, 0, 0, 172, + 0, 172, 65, 0, 172, 31, 0, 0, 0, 172, + 0, 0, 33, 172, 0, 0, 0, 34, 0, 72, + 73, 35, 172, 0, 0, 0, 0, 0, 0, 172, + 0, 0, 0, 37, 172, 38, 75, 0, 172, 39, + 0, 0, 77, 0, 79, 0, 81, 40, 41, 257, + 172, 42, 172, 0, 0, 0, 172, 0, 87, 0, + 0, 88, 89, 0, 172, 172, 0, 0, 172, 0, + 0, 172, 0, 0, 0, 0, 90, 91, 92, 93, + 94, 0, 0, 0, 509, 0, 0, 0, 96, 0, + 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, + 0, 102, 0, 103, 939, 0, 0, 0, 0, 104, + 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 894, 0, 0, 0, 106, 301, 108, 109, 57, 25, + 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, + 62, 63, 172, 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, 257, 37, 42, 38, + 0, 0, 0, 39, 0, 87, 0, 0, 88, 89, + 0, 40, 41, 0, 0, 42, 0, 0, 319, 0, + 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, + 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, + 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, + 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 619, 619, 619, 619, 346, 346, 346, 346, 0, 0, - 0, 346, 346, 0, 0, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 0, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 0, 48, 0, - 0, 0, 48, 346, 48, 0, 346, 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, 604, 0, 0, + 0, 106, 301, 108, 109, 604, 604, 0, 604, 0, + 0, 604, 604, 0, 0, 0, 604, 604, 604, 320, + 604, 0, 0, 0, 0, 0, 604, 0, 0, 604, + 0, 0, 0, 0, 0, 0, 604, 0, 0, 0, + 0, 604, 0, 604, 604, 604, 0, 0, 0, 0, + 0, 0, 0, 331, 0, 0, 0, 604, 0, 604, + 604, 0, 0, 604, 0, 0, 604, 0, 604, 0, + 604, 604, 604, 604, 0, 604, 0, 0, 0, 0, + 0, 0, 604, 0, 0, 604, 604, 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 48, 0, 48, - 0, 48, 0, 48, 0, 81, 48, 0, 48, 48, - 0, 48, 0, 48, 48, 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, 48, 0, 48, 48, 48, - 0, 0, 0, 0, 0, 0, 48, 48, 0, 48, - 48, 0, 48, 48, 48, 0, 0, 0, 48, 0, + 604, 604, 604, 604, 604, 0, 0, 0, 0, 0, + 0, 0, 604, 0, 0, 0, 0, 0, 604, 604, + 604, 604, 0, 0, 0, 604, 0, 604, 0, 0, + 0, 0, 0, 604, 604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 48, 0, 48, 0, - 48, 0, 48, 0, 82, 48, 0, 48, 48, 0, - 48, 0, 48, 48, 48, 0, 48, 48, 48, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 604, 604, + 604, 604, 331, 331, 331, 331, 0, 0, 0, 331, + 331, 0, 0, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 0, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, + 331, 331, 331, 331, 331, 0, 48, 0, 0, 0, + 48, 331, 48, 0, 331, 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, 48, 0, 48, 48, 48, 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, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 48, 0, 48, - 0, 48, 0, 104, 48, 0, 48, 48, 0, 48, + 0, 48, 0, 81, 48, 0, 48, 48, 0, 48, 0, 48, 48, 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, @@ -10365,7 +10395,7 @@ void case_956() 48, 48, 48, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 48, 0, 48, 0, - 48, 0, 105, 48, 0, 48, 48, 0, 48, 0, + 48, 0, 82, 48, 0, 48, 48, 0, 48, 0, 48, 48, 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, @@ -10375,803 +10405,824 @@ void case_956() 48, 48, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 48, 0, 48, 48, 0, 48, 0, 48, - 48, 227, 48, 0, 48, 0, 48, 0, 48, 48, + 48, 212, 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, - 346, 48, 0, 0, 48, 0, 48, 48, 48, 48, + 331, 48, 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 0, 0, 48, 48, - 48, 48, 0, 346, 0, 0, 0, 48, 48, 0, - 48, 48, 447, 48, 48, 48, 346, 0, 0, 48, - 0, 346, 0, 0, 346, 0, 346, 0, 346, 346, - 346, 346, 0, 0, 0, 448, 346, 0, 0, 48, - 346, 0, 0, 0, 346, 228, 0, 0, 449, 0, - 367, 0, 346, 451, 0, 346, 0, 346, 452, 0, + 48, 48, 0, 331, 0, 0, 0, 48, 48, 0, + 48, 48, 28, 48, 48, 48, 331, 0, 0, 48, + 0, 331, 0, 0, 331, 0, 331, 0, 331, 331, + 331, 331, 0, 0, 0, 28, 331, 0, 0, 48, + 331, 0, 0, 0, 331, 213, 0, 0, 28, 0, + 353, 0, 331, 28, 0, 331, 0, 331, 28, 0, + 28, 28, 28, 28, 0, 0, 28, 0, 28, 0, + 0, 0, 28, 353, 0, 0, 331, 0, 0, 0, + 352, 331, 0, 0, 28, 0, 353, 28, 331, 28, + 263, 353, 331, 0, 230, 48, 353, 0, 353, 353, + 353, 353, 0, 352, 0, 331, 353, 0, 0, 0, + 353, 0, 447, 28, 353, 0, 352, 0, 0, 28, + 28, 352, 353, 0, 229, 353, 352, 353, 352, 352, + 352, 352, 0, 0, 0, 448, 352, 331, 0, 0, + 352, 0, 0, 0, 352, 0, 0, 0, 449, 0, + 0, 353, 352, 451, 0, 352, 0, 352, 452, 0, 453, 454, 455, 456, 0, 0, 0, 0, 457, 0, - 0, 0, 458, 367, 0, 0, 346, 0, 0, 0, - 0, 346, 0, 0, 459, 0, 367, 460, 346, 461, - 278, 367, 346, 0, 244, 48, 367, 0, 367, 367, - 367, 367, 0, 0, 0, 346, 367, 0, 0, 0, - 367, 0, 0, 462, 367, 0, 0, 0, 0, 0, - 0, 0, 367, 57, 25, 367, 26, 367, 0, 27, - 256, 0, 0, 0, 28, 62, 63, 346, 29, 0, - 0, 0, 0, 0, 65, 0, 0, 31, 0, 0, - 0, 367, 0, 0, 33, 0, 0, 0, 0, 34, - 0, 72, 73, 35, 0, 582, 0, 0, 0, 1308, - 0, 0, 583, 0, 0, 37, 0, 38, 75, 0, - 0, 39, 0, 0, 77, 0, 79, 0, 81, 40, - 41, 257, 0, 42, 0, 0, 0, 0, 0, 0, - 584, 0, 0, 88, 89, 0, 0, 367, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 90, 91, - 92, 93, 94, 0, 0, 0, 0, 0, 0, 0, - 96, 901, 0, 585, 0, 0, 98, 99, 100, 101, - 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, - 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, - 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, - 28, 62, 63, 0, 29, 0, 106, 469, 108, 109, - 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, - 0, 582, 0, 0, 0, 0, 0, 0, 583, 0, - 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, - 77, 0, 79, 0, 81, 40, 41, 257, 0, 42, - 0, 0, 0, 0, 0, 0, 584, 0, 0, 88, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, - 0, 0, 0, 0, 0, 0, 96, 0, 0, 585, - 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, - 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, - 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, - 0, 27, 256, 0, 0, 0, 28, 62, 63, 0, - 29, 0, 106, 469, 108, 109, 65, 0, 0, 31, - 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, - 0, 34, 0, 72, 73, 35, 0, 582, 0, 0, - 0, 0, 0, 0, 583, 0, 0, 37, 0, 38, - 75, 0, 0, 39, 0, 0, 77, 0, 79, 0, - 81, 40, 41, 257, 0, 42, 0, 0, 0, 0, - 0, 0, 584, 0, 0, 88, 89, 0, 0, 0, + 0, 0, 458, 0, 0, 0, 1279, 0, 0, 0, + 0, 352, 0, 0, 459, 0, 0, 460, 0, 461, + 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, + 0, 28, 62, 63, 0, 29, 0, 353, 0, 0, + 0, 65, 0, 462, 31, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 0, 0, 34, 0, 72, 73, + 35, 0, 582, 0, 0, 0, 0, 352, 0, 583, + 0, 0, 37, 0, 38, 75, 0, 0, 39, 0, + 0, 77, 0, 79, 0, 81, 40, 41, 257, 0, + 42, 0, 0, 0, 0, 0, 0, 584, 0, 1280, + 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 90, 91, 92, 93, 94, + 0, 0, 0, 0, 0, 0, 0, 96, 901, 0, + 585, 0, 0, 98, 99, 100, 101, 0, 0, 0, + 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, + 0, 0, 0, 0, 0, 0, 57, 25, 0, 26, + 0, 0, 27, 256, 0, 0, 0, 28, 62, 63, + 0, 29, 0, 106, 469, 108, 109, 65, 0, 0, + 31, 0, 0, 0, 0, 0, 0, 33, 0, 0, + 0, 0, 34, 0, 72, 73, 35, 0, 582, 0, + 0, 0, 0, 0, 0, 583, 0, 0, 37, 0, + 38, 75, 0, 0, 39, 0, 0, 77, 0, 79, + 0, 81, 40, 41, 257, 0, 42, 0, 0, 0, + 0, 0, 0, 584, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 90, 91, 92, 93, 94, 0, 0, 0, 0, 0, - 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, - 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, - 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, - 0, 57, 25, 0, 26, 0, 0, 27, 256, 0, - 0, 0, 28, 62, 63, 0, 29, 0, 106, 469, - 108, 109, 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, 257, - 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, 90, 91, 92, 93, - 94, 0, 0, 0, 0, 0, 0, 0, 96, 0, - 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, - 105, 0, 0, 0, 0, 0, 0, 57, 25, 0, - 26, 0, 0, 27, 256, 0, 0, 0, 28, 62, - 63, 0, 29, 0, 106, 301, 108, 109, 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, 257, 0, 42, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 88, 89, 0, + 0, 90, 91, 92, 93, 94, 0, 0, 0, 0, + 0, 0, 0, 96, 0, 0, 585, 0, 0, 98, + 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, + 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, + 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, + 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, + 469, 108, 109, 65, 0, 0, 31, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 0, 34, 0, + 72, 73, 35, 0, 582, 0, 0, 0, 0, 0, + 0, 583, 0, 0, 37, 0, 38, 75, 0, 0, + 39, 0, 0, 77, 0, 79, 0, 81, 40, 41, + 257, 0, 42, 0, 0, 0, 0, 0, 0, 584, + 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 90, 91, 92, + 93, 94, 0, 0, 0, 0, 0, 0, 0, 96, + 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, + 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, + 104, 105, 0, 0, 0, 0, 0, 0, 57, 25, + 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, + 62, 63, 0, 29, 0, 106, 469, 108, 109, 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, 90, 91, 92, 93, 94, 0, 0, 0, - 0, 859, 0, 0, 96, 0, 0, 0, 0, 0, - 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, - 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, - 0, 0, 0, 57, 25, 0, 26, 0, 0, 27, - 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, - 106, 301, 108, 109, 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, 257, 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, 90, 91, - 92, 93, 94, 0, 0, 0, 509, 0, 0, 0, - 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, - 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, - 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, - 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, - 28, 62, 63, 0, 29, 0, 106, 301, 108, 109, - 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, + 37, 0, 38, 75, 0, 0, 39, 0, 0, 77, + 0, 79, 0, 81, 40, 41, 257, 0, 42, 0, + 0, 85, 0, 0, 0, 87, 0, 0, 88, 89, 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, 257, 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, 90, 91, 92, 93, 94, 0, - 0, 0, 503, 0, 0, 0, 96, 0, 0, 0, - 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, - 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, - 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, - 0, 27, 256, 0, 0, 0, 28, 62, 63, 0, - 29, 0, 106, 301, 108, 109, 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, 257, 0, 42, 0, 0, 0, 0, - 0, 0, 87, 0, 0, 88, 89, 0, 0, 0, + 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, + 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, + 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, + 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 106, 301, 108, 109, 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, 257, 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, 90, + 91, 92, 93, 94, 0, 0, 0, 0, 859, 0, + 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, + 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, + 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, + 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, + 0, 28, 62, 63, 0, 29, 0, 106, 301, 108, + 109, 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, 257, 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, 90, 91, 92, 93, 94, + 0, 0, 0, 509, 0, 0, 0, 96, 0, 0, + 0, 0, 0, 98, 99, 100, 101, 0, 0, 0, + 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, + 0, 0, 0, 0, 0, 0, 57, 25, 0, 26, + 0, 0, 27, 256, 0, 0, 0, 28, 62, 63, + 0, 29, 0, 106, 301, 108, 109, 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, 257, 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, - 90, 91, 92, 93, 94, 0, 0, 0, 0, 0, - 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, - 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, - 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, - 0, 57, 25, 0, 26, 0, 0, 27, 256, 0, - 0, 0, 28, 62, 63, 0, 29, 0, 106, 301, - 108, 109, 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, 257, - 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, 90, 91, 92, 93, - 94, 0, 0, 0, 0, 0, 0, 0, 96, 0, - 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, - 105, 0, 0, 0, 0, 0, 0, 57, 25, 0, - 26, 0, 0, 27, 256, 0, 0, 0, 28, 62, - 63, 0, 29, 0, 106, 469, 108, 109, 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, 257, 0, 42, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 88, 89, 0, + 0, 90, 91, 92, 93, 94, 0, 0, 0, 503, + 0, 0, 0, 96, 0, 0, 0, 0, 0, 98, + 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, + 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, + 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, + 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, + 301, 108, 109, 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, + 257, 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, 90, 91, 92, + 93, 94, 0, 0, 0, 0, 0, 0, 0, 96, + 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, + 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, + 104, 105, 0, 0, 0, 0, 0, 0, 57, 25, + 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, + 62, 63, 0, 29, 0, 106, 301, 108, 109, 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, 90, 91, 92, 93, 94, 0, 0, 0, - 0, 0, 0, 0, 96, 0, 0, 0, 0, 0, - 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, - 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, - 0, 0, 0, 78, 78, 0, 78, 0, 0, 78, - 78, 0, 0, 0, 78, 78, 78, 0, 78, 0, - 106, 1010, 108, 109, 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, 78, 78, - 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, + 37, 0, 38, 75, 0, 0, 39, 0, 0, 77, + 0, 79, 0, 81, 40, 41, 257, 0, 42, 0, + 0, 0, 0, 0, 0, 87, 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, 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, 150, 150, 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, 256, 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, 28, 0, - 0, 34, 0, 72, 73, 35, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 37, 0, 38, - 75, 28, 0, 39, 0, 0, 77, 0, 79, 0, - 81, 40, 41, 257, 28, 42, 0, 0, 0, 28, - 0, 0, 0, 0, 28, 0, 28, 28, 28, 28, - 0, 0, 28, 0, 28, 0, 0, 0, 28, 0, - 90, 91, 92, 258, 94, 0, 0, 0, 0, 0, - 28, 0, 96, 28, 0, 28, 0, 0, 98, 99, - 100, 101, 0, 0, 0, 102, 0, 103, 0, 57, - 25, 0, 26, 104, 105, 27, 256, 0, 0, 28, - 28, 62, 63, 0, 29, 28, 28, 0, 0, 0, - 65, 0, 0, 31, 0, 0, 0, 48, 106, 259, - 33, 109, 0, 0, 0, 34, 0, 72, 73, 35, + 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, + 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, + 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, + 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, + 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, + 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 106, 469, 108, 109, 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, 257, 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, 90, + 91, 92, 93, 94, 0, 0, 0, 0, 0, 0, + 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, + 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, + 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, + 78, 78, 0, 78, 0, 0, 78, 78, 0, 0, + 0, 78, 78, 78, 0, 78, 0, 106, 1010, 108, + 109, 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, 78, 78, 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, 135, 135, 0, 135, + 0, 0, 135, 135, 0, 0, 0, 135, 135, 135, + 0, 135, 0, 78, 78, 78, 78, 135, 0, 0, + 135, 0, 0, 0, 0, 0, 0, 135, 0, 0, + 0, 0, 135, 0, 135, 135, 135, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 135, 0, + 135, 135, 0, 0, 135, 0, 0, 135, 0, 135, + 0, 135, 135, 135, 135, 0, 135, 0, 0, 0, + 0, 0, 0, 135, 0, 0, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 48, 37, 0, 38, 75, 0, 0, 39, 0, 0, - 77, 0, 79, 48, 81, 40, 41, 257, 48, 42, - 0, 0, 0, 48, 0, 48, 48, 48, 48, 0, - 0, 48, 0, 48, 0, 0, 0, 48, 0, 0, - 0, 0, 0, 0, 90, 91, 92, 258, 94, 48, - 0, 0, 48, 0, 48, 0, 96, 652, 0, 652, - 0, 652, 98, 0, 652, 101, 652, 652, 0, 652, - 0, 652, 0, 652, 0, 652, 652, 652, 48, 0, - 0, 652, 652, 0, 311, 0, 0, 652, 0, 652, - 652, 0, 0, 0, 652, 0, 0, 0, 652, 0, - 0, 0, 106, 259, 0, 109, 0, 0, 0, 652, - 652, 0, 652, 0, 0, 0, 652, 652, 0, 0, - 0, 0, 0, 0, 652, 652, 57, 25, 652, 26, - 0, 652, 27, 256, 0, 0, 652, 28, 62, 63, - 0, 29, 0, 0, 0, 0, 0, 65, 0, 0, - 31, 0, 0, 0, 0, 0, 0, 33, 652, 652, + 0, 135, 135, 135, 135, 135, 0, 0, 0, 0, + 0, 0, 0, 135, 0, 0, 0, 0, 0, 135, + 135, 135, 135, 0, 0, 0, 135, 0, 135, 0, + 0, 0, 0, 0, 135, 135, 0, 0, 0, 0, + 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, + 0, 0, 0, 28, 62, 63, 0, 29, 0, 135, + 135, 135, 135, 65, 0, 0, 31, 0, 0, 0, + 0, 0, 0, 33, 0, 28, 0, 28, 34, 0, + 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 37, 0, 38, 75, 28, 0, + 39, 0, 0, 77, 0, 79, 0, 81, 40, 41, + 257, 28, 42, 0, 0, 0, 28, 0, 0, 0, + 0, 28, 0, 28, 28, 28, 28, 0, 0, 0, + 0, 28, 0, 0, 0, 28, 0, 90, 91, 92, + 258, 94, 0, 0, 0, 0, 0, 28, 0, 96, + 28, 0, 28, 0, 0, 98, 99, 100, 101, 0, + 0, 0, 102, 0, 103, 0, 57, 25, 0, 26, + 104, 105, 27, 256, 0, 0, 28, 28, 62, 63, + 0, 29, 28, 28, 0, 0, 0, 65, 0, 0, + 31, 0, 0, 0, 48, 106, 259, 33, 109, 0, 0, 0, 34, 0, 72, 73, 35, 0, 0, 0, - 0, 652, 0, 0, 0, 0, 0, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 48, 37, 0, 38, 75, 0, 0, 39, 0, 0, 77, 0, 79, - 0, 81, 40, 41, 257, 0, 42, 0, 0, 85, - 0, 0, 0, 0, 0, 0, 25, 0, 26, 0, - 0, 27, 652, 1190, 0, 0, 28, 0, 0, 0, - 29, 90, 91, 92, 258, 0, 0, 0, 0, 31, - 651, 0, 651, 96, 0, 651, 33, 651, 651, 0, - 651, 34, 651, 1191, 651, 35, 651, 651, 651, 0, - 0, 0, 651, 651, 0, 0, 0, 37, 651, 38, - 651, 651, 0, 39, 1192, 651, 0, 0, 0, 651, - 0, 40, 41, 0, 0, 42, 0, 0, 319, 106, - 259, 651, 0, 651, 0, 0, 0, 651, 651, 0, - 0, 0, 0, 0, 0, 651, 651, 0, 651, 651, - 651, 0, 651, 651, 0, 651, 651, 651, 651, 0, - 651, 0, 651, 0, 651, 651, 651, 0, 0, 0, - 651, 651, 0, 0, 0, 0, 651, 0, 651, 651, - 0, 0, 0, 651, 0, 0, 0, 651, 0, 0, - 0, 0, 651, 0, 0, 0, 0, 0, 0, 651, - 0, 651, 0, 0, 0, 651, 651, 0, 0, 354, - 0, 0, 0, 651, 651, 0, 0, 651, 0, 0, - 651, 0, 25, 0, 26, 651, 0, 27, 0, 0, - 1263, 0, 28, 651, 671, 0, 29, 0, 672, 1264, - 1265, 0, 0, 0, 1266, 31, 0, 0, 0, 0, - 1267, 0, 33, 0, 25, 0, 26, 34, 0, 27, - 0, 35, 1263, 0, 28, 0, 671, 0, 29, 0, - 672, 1264, 1265, 37, 0, 38, 1266, 31, 0, 39, - 0, 0, 1267, 0, 33, 0, 0, 40, 41, 34, - 0, 42, 0, 35, 1268, 0, 0, 0, 48, 1269, - 48, 651, 0, 48, 0, 37, 0, 38, 48, 0, - 0, 39, 48, 0, 0, 0, 0, 0, 0, 40, - 41, 48, 0, 42, 0, 0, 1268, 0, 48, 0, - 48, 1269, 48, 48, 1270, 48, 0, 48, 0, 48, - 48, 48, 0, 0, 48, 0, 48, 0, 0, 48, - 0, 48, 0, 48, 0, 48, 0, 0, 48, 0, - 48, 0, 0, 48, 48, 48, 0, 48, 0, 48, - 48, 48, 0, 48, 48, 1271, 48, 0, 48, 48, - 0, 48, 0, 48, 48, 0, 0, 48, 48, 0, - 48, 0, 0, 0, 0, 48, 48, 48, 0, 48, - 0, 0, 48, 0, 48, 168, 25, 1271, 26, 48, - 0, 27, 0, 48, 0, 48, 28, 48, 0, 0, - 29, 0, 48, 0, 0, 48, 0, 48, 0, 31, - 0, 48, 0, 0, 48, 168, 33, 0, 0, 48, - 48, 34, 0, 48, 0, 35, 48, 563, 0, 0, - 0, 48, 0, 0, 564, 0, 0, 37, 0, 38, - 0, 0, 0, 39, 0, 0, 565, 0, 0, 0, - 0, 40, 41, 0, 0, 42, 0, 25, 566, 26, - 0, 0, 27, 48, 0, 0, 0, 28, 0, 0, - 0, 29, 0, 0, 0, 30, 25, 0, 26, 0, - 31, 27, 0, 0, 0, 32, 28, 33, 0, 0, - 29, 0, 34, 0, 0, 0, 35, 36, 0, 31, - 0, 0, 0, 0, 0, 0, 33, 48, 37, 0, - 38, 34, 0, 0, 39, 35, 0, 0, 0, 0, - 0, 0, 40, 41, 0, 0, 42, 37, 0, 38, - 25, 0, 26, 39, 0, 27, 0, 0, 0, 567, - 28, 40, 41, 0, 29, 42, 0, 25, 319, 26, - 0, 0, 27, 31, 0, 0, 0, 28, 0, 0, - 33, 29, 0, 0, 0, 34, 0, 0, 0, 35, - 31, 0, 0, 0, 0, 0, 0, 33, 0, 0, - 0, 37, 34, 38, 0, 0, 35, 39, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 0, 37, 42, - 38, 25, 319, 26, 39, 0, 27, 0, 0, 0, - 43, 28, 40, 41, 0, 29, 42, 0, 0, 511, - 0, 0, 0, 0, 31, 25, 0, 26, 0, 326, - 27, 33, 0, 0, 0, 28, 34, 0, 0, 29, - 35, 0, 0, 0, 0, 0, 0, 0, 31, 0, - 0, 0, 37, 0, 38, 33, 0, 0, 39, 0, - 34, 0, 0, 0, 35, 0, 40, 41, 0, 0, - 42, 0, 0, 319, 0, 25, 37, 26, 38, 0, - 27, 0, 39, 354, 0, 28, 0, 0, 0, 29, - 40, 41, 0, 0, 42, 0, 0, 319, 31, 25, - 354, 26, 0, 0, 27, 33, 0, 0, 0, 28, - 34, 0, 0, 29, 35, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 0, 37, 0, 38, 33, - 0, 0, 39, 0, 34, 0, 0, 0, 35, 0, - 40, 41, 0, 0, 42, 0, 0, 566, 0, 0, - 37, 0, 38, 498, 630, 498, 39, 0, 498, 0, - 0, 0, 0, 498, 40, 41, 0, 498, 42, 0, - 188, 739, 188, 0, 0, 188, 498, 0, 632, 0, - 188, 0, 0, 498, 188, 0, 0, 0, 498, 0, - 0, 0, 498, 188, 0, 0, 0, 0, 0, 0, - 188, 0, 0, 0, 498, 188, 498, 0, 0, 188, - 498, 0, 0, 0, 0, 0, 0, 0, 498, 498, - 0, 188, 498, 188, 187, 498, 187, 188, 354, 187, - 0, 0, 0, 0, 187, 188, 188, 0, 187, 188, - 0, 0, 188, 0, 0, 0, 0, 187, 197, 0, - 197, 0, 354, 197, 187, 0, 0, 0, 197, 187, - 0, 0, 197, 187, 0, 0, 0, 0, 0, 0, - 0, 197, 0, 0, 0, 187, 0, 187, 197, 0, - 0, 187, 0, 197, 0, 0, 0, 197, 0, 187, - 187, 0, 35, 187, 0, 0, 187, 0, 0, 197, - 0, 197, 0, 35, 0, 197, 498, 0, 35, 0, - 0, 0, 35, 197, 197, 35, 0, 197, 0, 0, - 197, 0, 0, 188, 0, 0, 0, 35, 35, 0, - 0, 0, 35, 35, 0, 33, 0, 0, 35, 0, - 35, 35, 35, 35, 0, 0, 33, 0, 35, 0, - 0, 33, 35, 0, 35, 33, 0, 0, 33, 0, - 0, 0, 0, 0, 35, 0, 35, 35, 0, 35, - 33, 33, 0, 35, 0, 33, 33, 187, 0, 0, - 0, 33, 0, 33, 33, 33, 33, 0, 0, 0, - 0, 33, 0, 35, 0, 33, 0, 33, 0, 35, - 35, 197, 0, 28, 0, 28, 0, 33, 0, 0, - 33, 0, 33, 0, 0, 0, 33, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 33, 0, 0, 28, - 0, 0, 33, 33, 28, 0, 48, 0, 0, 28, - 0, 28, 28, 28, 28, 0, 0, 48, 0, 28, - 0, 0, 48, 28, 0, 0, 48, 0, 0, 48, - 0, 0, 0, 0, 0, 28, 0, 0, 28, 0, - 28, 48, 48, 0, 0, 0, 48, 48, 0, 48, - 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, - 48, 0, 48, 0, 28, 48, 48, 0, 48, 48, - 28, 28, 48, 0, 0, 0, 0, 0, 48, 0, - 0, 48, 0, 48, 48, 48, 0, 48, 0, 48, - 48, 48, 0, 0, 0, 48, 0, 48, 48, 48, - 48, 0, 0, 0, 0, 48, 0, 48, 0, 48, - 0, 48, 0, 37, 48, 0, 0, 0, 0, 0, - 0, 48, 0, 0, 48, 0, 48, 48, 0, 48, - 48, 0, 48, 0, 0, 0, 0, 48, 0, 48, + 48, 81, 40, 41, 257, 48, 42, 0, 0, 0, + 48, 0, 48, 48, 48, 48, 0, 0, 48, 0, + 48, 0, 0, 0, 48, 0, 0, 0, 0, 0, + 0, 90, 91, 92, 258, 94, 48, 0, 0, 48, + 0, 48, 0, 96, 637, 0, 637, 0, 637, 98, + 0, 637, 101, 637, 637, 0, 637, 0, 637, 0, + 637, 0, 637, 637, 637, 48, 0, 0, 637, 637, + 0, 296, 0, 0, 637, 0, 637, 637, 0, 0, + 0, 637, 0, 0, 0, 637, 0, 0, 0, 106, + 259, 0, 109, 0, 0, 0, 637, 637, 0, 637, + 0, 0, 0, 637, 637, 0, 0, 0, 0, 0, + 0, 637, 637, 57, 25, 637, 26, 0, 637, 27, + 256, 0, 0, 637, 28, 62, 63, 0, 29, 0, + 0, 0, 0, 0, 65, 0, 0, 31, 0, 0, + 0, 0, 0, 0, 33, 637, 637, 0, 0, 34, + 0, 72, 73, 35, 0, 0, 0, 0, 637, 0, + 0, 0, 0, 0, 0, 37, 0, 38, 75, 0, + 0, 39, 0, 0, 77, 0, 79, 0, 81, 40, + 41, 257, 0, 42, 0, 0, 85, 0, 0, 0, + 0, 0, 0, 25, 0, 26, 0, 0, 27, 637, + 0, 0, 0, 28, 0, 0, 0, 29, 90, 91, + 92, 258, 0, 0, 0, 0, 31, 636, 0, 636, + 96, 0, 636, 33, 636, 636, 0, 636, 34, 636, + 0, 636, 35, 636, 636, 636, 0, 0, 0, 636, + 636, 0, 0, 0, 37, 636, 38, 636, 636, 0, + 39, 0, 636, 0, 0, 0, 636, 0, 40, 41, + 0, 0, 42, 0, 0, 319, 106, 259, 636, 0, + 636, 0, 0, 0, 636, 636, 0, 0, 0, 0, + 0, 0, 636, 636, 0, 636, 636, 636, 0, 636, + 636, 0, 636, 636, 636, 636, 0, 636, 0, 636, + 0, 636, 636, 636, 0, 0, 0, 636, 636, 0, + 0, 0, 0, 636, 0, 636, 636, 0, 0, 0, + 636, 0, 0, 0, 636, 0, 0, 0, 0, 636, + 0, 0, 0, 0, 0, 0, 636, 0, 636, 0, + 0, 0, 636, 636, 0, 0, 326, 0, 0, 0, + 636, 636, 0, 0, 636, 0, 0, 636, 0, 25, + 0, 26, 636, 0, 27, 0, 0, 1249, 0, 28, + 636, 671, 0, 29, 0, 672, 1250, 1251, 0, 0, + 0, 1252, 31, 0, 0, 0, 0, 1253, 0, 33, + 0, 25, 0, 26, 34, 0, 27, 0, 35, 1249, + 0, 28, 0, 671, 0, 29, 0, 672, 1250, 1251, + 37, 0, 38, 1252, 31, 0, 39, 0, 0, 1253, + 0, 33, 0, 0, 40, 41, 34, 0, 42, 0, + 35, 1254, 0, 0, 0, 48, 1255, 48, 636, 0, + 48, 0, 37, 0, 38, 48, 0, 0, 39, 48, + 0, 0, 0, 0, 0, 0, 40, 41, 48, 0, + 42, 0, 0, 1254, 0, 48, 0, 48, 1255, 48, + 48, 1256, 48, 0, 48, 0, 48, 48, 48, 0, + 0, 48, 0, 48, 0, 0, 48, 0, 48, 0, + 48, 0, 48, 0, 0, 48, 0, 48, 0, 0, + 48, 48, 48, 0, 48, 0, 48, 48, 48, 0, + 48, 48, 1257, 48, 0, 48, 48, 0, 48, 0, + 48, 48, 0, 0, 48, 48, 0, 48, 0, 0, + 0, 0, 48, 48, 48, 0, 48, 0, 0, 48, + 0, 48, 153, 25, 1257, 26, 48, 0, 27, 0, + 48, 0, 48, 28, 48, 0, 0, 29, 0, 48, + 0, 0, 48, 0, 48, 0, 31, 0, 48, 0, + 0, 48, 153, 33, 0, 0, 48, 48, 34, 0, + 48, 0, 35, 48, 563, 0, 0, 0, 48, 0, + 0, 564, 0, 0, 37, 0, 38, 0, 0, 0, + 39, 0, 0, 565, 0, 0, 0, 0, 40, 41, + 0, 0, 42, 0, 25, 566, 26, 0, 0, 27, + 48, 0, 0, 0, 28, 0, 0, 0, 29, 0, + 0, 0, 30, 25, 0, 26, 0, 31, 27, 0, + 0, 0, 32, 28, 33, 0, 0, 29, 0, 34, + 0, 0, 0, 35, 36, 0, 31, 0, 0, 0, + 0, 0, 0, 33, 48, 37, 0, 38, 34, 0, + 0, 39, 35, 0, 0, 0, 0, 0, 0, 40, + 41, 0, 0, 42, 37, 0, 38, 25, 0, 26, + 39, 0, 27, 0, 0, 0, 567, 28, 40, 41, + 0, 29, 42, 0, 25, 319, 26, 0, 0, 27, + 31, 0, 0, 0, 28, 0, 0, 33, 29, 0, + 0, 0, 34, 0, 0, 0, 35, 31, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 37, 34, + 38, 0, 0, 35, 39, 0, 0, 0, 0, 0, + 0, 0, 40, 41, 0, 37, 42, 38, 25, 511, + 26, 39, 0, 27, 0, 0, 0, 43, 28, 40, + 41, 0, 29, 42, 0, 0, 319, 0, 0, 0, + 0, 31, 25, 0, 26, 0, 354, 27, 33, 0, + 0, 0, 28, 34, 0, 0, 29, 35, 0, 0, + 0, 0, 0, 0, 0, 31, 0, 0, 0, 37, + 0, 38, 33, 0, 0, 39, 0, 34, 0, 0, + 0, 35, 0, 40, 41, 0, 0, 42, 0, 0, + 319, 0, 25, 37, 26, 38, 0, 27, 0, 39, + 354, 0, 28, 0, 0, 0, 29, 40, 41, 0, + 0, 42, 0, 0, 566, 31, 483, 630, 483, 0, + 0, 483, 33, 0, 0, 0, 483, 34, 0, 0, + 483, 35, 0, 0, 0, 0, 0, 0, 0, 483, + 0, 0, 0, 37, 0, 38, 483, 0, 0, 39, + 0, 483, 0, 0, 0, 483, 0, 40, 41, 0, + 0, 42, 0, 0, 739, 0, 0, 483, 0, 483, + 173, 632, 173, 483, 0, 173, 0, 0, 0, 0, + 173, 483, 483, 0, 173, 483, 0, 172, 483, 172, + 0, 0, 172, 173, 0, 354, 0, 172, 0, 0, + 173, 172, 0, 0, 0, 173, 0, 0, 0, 173, + 172, 0, 0, 0, 0, 0, 0, 172, 0, 0, + 0, 173, 172, 173, 0, 0, 172, 173, 0, 0, + 0, 0, 0, 0, 0, 173, 173, 0, 172, 173, + 172, 182, 173, 182, 172, 354, 182, 0, 0, 0, + 0, 182, 172, 172, 0, 182, 172, 0, 0, 172, + 0, 0, 0, 0, 182, 0, 0, 0, 0, 483, + 0, 182, 0, 0, 0, 0, 182, 0, 0, 35, + 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 35, 0, 182, 0, 182, 35, 0, 0, 182, 35, + 0, 0, 35, 0, 0, 0, 182, 182, 0, 0, + 182, 0, 0, 182, 35, 35, 0, 0, 0, 35, + 35, 0, 0, 173, 0, 35, 0, 35, 35, 35, + 35, 0, 0, 0, 0, 35, 0, 0, 0, 35, + 172, 35, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 35, 0, 35, 35, 33, 35, 0, 0, 0, + 35, 0, 0, 0, 0, 0, 33, 0, 0, 0, + 0, 33, 0, 0, 0, 33, 0, 0, 33, 0, + 35, 0, 0, 0, 0, 0, 35, 35, 0, 0, + 33, 33, 0, 0, 182, 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, 48, 0, 0, 48, 0, 48, 48, 48, 48, + 0, 0, 48, 0, 48, 0, 33, 48, 48, 0, + 48, 48, 33, 33, 48, 0, 0, 0, 0, 0, + 48, 0, 0, 48, 0, 48, 48, 48, 0, 48, + 0, 48, 48, 48, 0, 0, 0, 48, 0, 48, + 48, 48, 48, 0, 0, 0, 0, 48, 0, 48, + 0, 48, 0, 48, 0, 37, 48, 0, 0, 0, + 0, 0, 0, 48, 0, 0, 48, 0, 48, 48, + 0, 48, 48, 0, 48, 0, 0, 0, 0, 48, + 0, 48, 48, 48, 48, 0, 0, 0, 0, 48, + 0, 0, 48, 48, 48, 0, 0, 0, 38, 0, + 0, 0, 0, 0, 0, 48, 0, 48, 48, 48, + 48, 48, 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, 0, 0, 48, 0, 0, - 48, 48, 48, 0, 0, 0, 38, 0, 0, 0, - 0, 0, 0, 48, 0, 48, 48, 48, 48, 48, + 0, 48, 48, 0, 48, 0, 48, 48, 0, 0, + 194, 0, 0, 48, 0, 48, 48, 48, 48, 0, 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, 0, 0, 48, 0, 0, 0, 48, - 48, 0, 48, 0, 48, 48, 0, 0, 209, 0, - 0, 48, 0, 48, 48, 48, 48, 0, 48, 0, + 48, 0, 48, 0, 48, 48, 0, 48, 196, 48, + 0, 48, 0, 48, 48, 0, 48, 0, 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, 48, 0, - 0, 0, 0, 48, 0, 0, 0, 48, 48, 0, - 48, 0, 48, 48, 0, 447, 211, 0, 0, 48, - 0, 48, 48, 0, 48, 0, 48, 0, 0, 0, - 0, 48, 0, 48, 48, 48, 48, 0, 448, 0, - 0, 48, 0, 0, 0, 48, 0, 0, 48, 0, - 0, 449, 0, 0, 312, 450, 451, 48, 447, 0, - 48, 452, 48, 453, 454, 455, 456, 0, 0, 0, - 0, 457, 0, 0, 0, 458, 0, 0, 0, 0, - 0, 448, 0, 0, 0, 0, 48, 459, 48, 48, - 460, 0, 461, 0, 449, 0, 0, 0, 0, 451, - 0, 0, 0, 0, 452, 0, 453, 454, 455, 456, - 0, 0, 0, 0, 457, 0, 462, 0, 458, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 459, 0, 0, 460, 0, 461, 0, 0, 0, 0, + 48, 0, 0, 48, 0, 0, 0, 48, 0, 0, + 48, 0, 0, 48, 0, 0, 297, 447, 48, 48, + 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, + 0, 48, 0, 48, 0, 0, 0, 48, 0, 0, + 448, 0, 0, 0, 0, 0, 0, 0, 48, 48, + 48, 48, 48, 449, 48, 0, 0, 0, 451, 0, + 0, 0, 0, 452, 0, 453, 454, 455, 456, 0, + 0, 0, 0, 457, 0, 0, 0, 458, 48, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 459, + 0, 0, 460, 0, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, + 0, 0, 0, 0, 0, 0, 0, 0, 462, }; protected static readonly short [] yyCheck = { 17, - 17, 4, 507, 17, 20, 299, 6, 18, 300, 52, - 235, 191, 353, 20, 291, 107, 509, 464, 85, 250, - 190, 60, 549, 298, 159, 483, 296, 335, 17, 328, - 318, 353, 559, 48, 60, 730, 1076, 705, 706, 1113, - 1114, 0, 906, 237, 0, 59, 113, 569, 115, 324, - 759, 78, 256, 113, 256, 115, 74, 256, 256, 256, - 78, 256, 1181, 256, 268, 1197, 80, 256, 82, 256, - 256, 256, 88, 89, 256, 325, 268, 368, 96, 368, - 748, 1213, 750, 282, 17, 1159, 368, 374, 294, 268, - 376, 256, 268, 109, 339, 1285, 357, 335, 256, 306, - 276, 391, 17, 21, 367, 1224, 313, 1226, 1298, 1226, - 368, 367, 373, 376, 277, 314, 374, 17, 325, 257, - 376, 17, 367, 381, 414, 386, 1316, 418, 650, 416, - 17, 376, 407, 17, 365, 53, 1071, 1256, 17, 1256, - 429, 159, 159, 429, 339, 159, 294, 429, 191, 344, - 256, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 266, 17, 17, 17, 17, 259, 418, 256, - 159, 294, 370, 368, 372, 370, 374, 372, 256, 374, - 375, 376, 523, 306, 370, 391, 202, 203, 374, 368, - 256, 429, 235, 62, 381, 390, 381, 66, 67, 68, - 358, 70, 71, 428, 503, 546, 75, 76, 414, 301, - 314, 226, 506, 82, 707, 84, 418, 86, 422, 418, - 418, 418, 91, 92, 546, 418, 159, 0, 569, 418, - 422, 231, 250, 339, 429, 429, 418, 255, 344, 343, - 346, 549, 418, 422, 159, 114, 352, 353, 264, 288, - 317, 559, 1384, 418, 321, 418, 419, 296, 325, 159, - 88, 89, 288, 159, 356, 325, 424, 425, 426, 427, - 418, 375, 159, 291, 290, 159, 294, 295, 325, 1411, - 159, 109, 369, 264, 300, 994, 256, 391, 314, 307, - 306, 1423, 294, 1425, 312, 418, 314, 375, 257, 313, - 318, 257, 970, 369, 256, 159, 159, 159, 159, 650, - 414, 329, 330, 256, 1009, 372, 272, 256, 335, 346, - 842, 277, 256, 429, 428, 281, 256, 262, 346, 651, - 671, 1158, 256, 418, 350, 372, 372, 353, 1378, 358, - 296, 371, 434, 428, 325, 1054, 335, 365, 366, 1176, - 256, 372, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 298, 256, 256, 882, 323, 384, 385, - 1444, 418, 429, 294, 202, 203, 468, 469, 335, 256, - 873, 349, 350, 1318, 402, 428, 342, 963, 257, 391, - 420, 260, 429, 429, 852, 438, 412, 413, 368, 1473, - 1227, 493, 1266, 305, 374, 693, 294, 341, 429, 339, - 1345, 1346, 414, 1348, 430, 991, 368, 1413, 1414, 1087, - 435, 436, 374, 430, 1359, 256, 441, 1362, 444, 298, - 369, 374, 368, 339, 775, 369, 264, 444, 344, 709, - 346, 310, 1377, 378, 379, 369, 352, 353, 679, 376, - 1277, 1119, 1120, 775, 1281, 369, 6, 483, 1126, 373, - 1036, 429, 290, 371, 478, 373, 1401, 17, 341, 962, - 391, 256, 988, 1469, 990, 367, 367, 369, 306, 371, - 256, 263, 418, 256, 576, 376, 578, 505, 580, 507, - 367, 509, 369, 414, 371, 372, 369, 374, 372, 376, - 374, 842, 429, 391, 257, 519, 520, 523, 339, 423, - 60, 277, 368, 531, 64, 281, 523, 349, 350, 841, - 538, 418, 350, 429, 349, 350, 414, 305, 420, 305, - 546, 423, 549, 315, 17, 269, 367, 401, 88, 89, - 861, 418, 559, 420, 558, 839, 423, 263, 256, 413, - 642, 872, 286, 569, 339, 429, 384, 385, 368, 109, - 549, 792, 1181, 851, 582, 583, 339, 866, 368, 368, - 559, 256, 373, 429, 369, 376, 342, 60, 343, 1037, - 343, 64, 367, 718, 412, 413, 98, 99, 100, 101, - 102, 103, 104, 105, 367, 870, 1123, 429, 371, 315, - 373, 374, 375, 376, 429, 1224, 343, 1226, 381, 159, - 479, 629, 375, 256, 906, 374, 381, 635, 381, 429, - 305, 713, 372, 418, 374, 372, 391, 369, 391, 429, - 429, 339, 272, 376, 650, 272, 344, 1256, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 414, - 519, 414, 202, 203, 391, 671, 296, 416, 357, 296, - 368, 679, 370, 428, 372, 428, 374, 375, 376, 376, - 709, 418, 672, 272, 741, 693, 159, 414, 277, 429, - 418, 369, 281, 323, 702, 979, 323, 386, 414, 707, - 428, 428, 1181, 376, 712, 370, 339, 296, 371, 374, - 931, 344, 428, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 264, 386, 256, 367, 734, 367, - 1181, 429, 736, 371, 323, 368, 376, 370, 272, 372, - 418, 374, 375, 376, 752, 1224, 754, 1226, 288, 755, - 290, 384, 385, 342, 758, 759, 389, 390, 1180, 1181, - 300, 769, 296, 1181, 367, 771, 306, 400, 401, 775, - 371, 343, 414, 1224, 314, 1226, 1043, 1256, 1200, 787, - 413, 256, 420, 816, 792, 793, 428, 795, 367, 323, - 418, 381, 1076, 1091, 269, 335, 429, 376, 806, 807, - 882, 391, 1224, 375, 1226, 1256, 1224, 381, 1226, 339, - 350, 286, 1079, 353, 344, 288, 346, 391, 824, 391, - 294, 367, 352, 353, 414, 1123, 328, 824, 391, 837, - 376, 839, 306, 1181, 1256, 379, 842, 843, 1256, 829, - 414, 314, 414, 851, 384, 385, 854, 1007, 1069, 384, - 1117, 414, 369, 861, 428, 1153, 428, 306, 421, 369, - 389, 1298, 335, 871, 313, 873, 367, 369, 367, 386, - 387, 381, 412, 413, 385, 376, 1224, 376, 1226, 381, - 382, 383, 1181, 1366, 386, 387, 388, 389, 390, 391, - 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 906, 394, 395, 357, 1235, 913, 988, 915, 1256, 917, - 261, 1242, 391, 357, 400, 369, 734, 1132, 372, 373, - 374, 1188, 928, 931, 371, 1224, 373, 1226, 1010, 373, - 936, 928, 386, 284, 374, 414, 376, 755, 1108, 357, - 370, 381, 386, 483, 374, 1428, 297, 390, 938, 428, - 940, 302, 942, 771, 962, 373, 307, 1256, 309, 310, - 311, 312, 339, 367, 418, 369, 317, 344, 386, 346, - 321, 1181, 349, 350, 325, 352, 353, 373, 369, 414, - 376, 1464, 333, 523, 1266, 336, 421, 338, 373, 339, - 994, 1486, 1487, 1001, 344, 1003, 346, 1005, 418, 349, - 350, 503, 352, 353, 398, 399, 546, 382, 383, 549, - 483, 362, 376, 372, 1224, 374, 1226, 376, 372, 559, - 374, 396, 397, 1016, 374, 843, 306, 339, 308, 569, - 354, 355, 344, 313, 346, 1043, 369, 349, 350, 372, - 352, 353, 418, 370, 371, 325, 1256, 374, 1056, 1057, - 1054, 372, 429, 374, 371, 376, 1064, 415, 357, 370, - 370, 1069, 374, 374, 374, 354, 355, 418, 1076, 1070, - 369, 1079, 574, 418, 373, 1108, 549, 1110, 339, 429, - 386, 387, 388, 344, 1091, 346, 559, 386, 349, 350, - 1098, 352, 353, 339, 1378, 256, 60, 1105, 344, 1132, - 346, 414, 415, 349, 350, 1111, 352, 353, 368, 1117, - 650, 371, 1091, 373, 374, 418, 1123, 429, 936, 418, - 277, 1129, 1130, 370, 371, 418, 373, 374, 375, 1162, - 94, 671, 392, 393, 98, 99, 100, 101, 102, 103, - 104, 105, 376, 372, 1123, 374, 1153, 1180, 1181, 370, - 340, 372, 412, 374, 370, 367, 372, 1163, 374, 0, - 420, 376, 1170, 423, 373, 705, 706, 1200, 429, 374, - 357, 376, 370, 1179, 1153, 371, 374, 373, 1186, 370, - 1188, 372, 369, 429, 370, 372, 373, 370, 374, 372, - 374, 1224, 376, 1226, 734, 368, 392, 393, 371, 386, - 373, 374, 372, 370, 339, 372, 376, 376, 748, 344, - 750, 346, 370, 1295, 372, 755, 412, 352, 353, 392, - 393, 364, 365, 1256, 420, 376, 1308, 423, 1234, 1235, - 418, 771, 705, 706, 1238, 775, 1242, 418, 372, 412, - 374, 372, 367, 1325, 343, 1327, 371, 420, 373, 374, - 423, 376, 372, 256, 374, 376, 381, 1263, 1264, 370, - 1266, 372, 414, 370, 367, 372, 1272, 372, 371, 418, - 373, 374, 374, 376, 376, 748, 418, 750, 381, 1285, - 418, 1287, 367, 374, 1290, 376, 371, 369, 373, 374, - 415, 376, 1298, 374, 418, 376, 381, 349, 350, 1303, - 285, 372, 842, 843, 390, 391, 392, 393, 418, 374, - 1316, 376, 415, 372, 373, 364, 365, 1074, 1075, 388, - 389, 394, 395, 1356, 288, 376, 372, 372, 368, 372, - 374, 372, 296, 372, 372, 418, 339, 372, 294, 294, - 1373, 344, 327, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 1386, 1387, 374, 372, 372, 1366, 376, - 1364, 1179, 418, 374, 866, 368, 906, 370, 372, 372, - 1378, 374, 375, 376, 371, 256, 374, 356, 372, 375, - 1413, 1414, 418, 374, 418, 375, 381, 1395, 374, 373, - 418, 372, 377, 378, 379, 380, 936, 382, 383, 384, - 385, 386, 387, 388, 389, 369, 381, 392, 393, 394, - 395, 396, 397, 398, 399, 256, 1234, 381, 382, 383, - 1428, 262, 386, 387, 374, 374, 429, 374, 376, 418, - 970, 0, 374, 294, 372, 423, 1469, 429, 374, 367, - 418, 372, 418, 373, 343, 1263, 1264, 372, 374, 294, - 294, 374, 418, 294, 370, 418, 1464, 298, 371, 381, - 418, 367, 256, 375, 256, 374, 1470, 1471, 256, 1287, - 256, 372, 1290, 1477, 1478, 372, 381, 280, 1486, 1487, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 256, 367, 372, 368, 418, 343, 374, 970, 339, 418, - 418, 418, 376, 344, 370, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 371, 376, 418, 376, - 374, 372, 372, 376, 370, 421, 367, 368, 423, 370, - 371, 372, 381, 374, 375, 376, 347, 378, 379, 351, - 367, 382, 383, 384, 385, 381, 381, 1087, 389, 390, - 256, 1091, 256, 394, 395, 396, 397, 398, 399, 400, - 401, 368, 372, 372, 347, 370, 374, 367, 370, 375, - 348, 1111, 413, 372, 375, 416, 372, 418, 368, 1119, - 1120, 370, 339, 1123, 418, 418, 1126, 374, 429, 256, - 374, 376, 348, 368, 375, 367, 367, 367, 265, 0, - 267, 368, 381, 270, 356, 418, 371, 376, 275, 368, - 574, 374, 279, 1153, 1087, 368, 337, 372, 1091, 368, - 305, 288, 376, 1163, 371, 418, 371, 418, 295, 369, - 367, 381, 371, 300, 367, 371, 418, 304, 418, 1179, - 371, 418, 371, 373, 371, 369, 1119, 1120, 371, 316, - 1123, 318, 372, 1126, 372, 322, 381, 374, 373, 373, - 261, 374, 263, 330, 331, 374, 256, 334, 376, 374, - 337, 372, 418, 372, 370, 418, 376, 418, 376, 372, - 1153, 376, 372, 284, 418, 367, 372, 256, 368, 381, - 381, 370, 261, 262, 1234, 1235, 297, 372, 368, 315, - 263, 302, 1242, 371, 368, 371, 307, 372, 309, 310, - 311, 312, 372, 0, 315, 284, 317, 0, 367, 376, - 321, 418, 376, 1263, 1264, 294, 1266, 368, 297, 298, - 372, 0, 333, 302, 368, 336, 305, 338, 307, 376, - 309, 310, 311, 312, 372, 709, 372, 1287, 317, 418, - 1290, 418, 321, 370, 367, 376, 325, 368, 368, 367, - 372, 362, 376, 370, 333, 418, 0, 336, 418, 338, - 339, 376, 376, 368, 372, 344, 376, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, 372, 368, - 372, 368, 372, 362, 367, 376, 368, 368, 367, 368, - 367, 370, 371, 372, 373, 374, 375, 376, 373, 378, - 379, 315, 381, 382, 383, 384, 385, 386, 387, 388, - 389, 390, 376, 392, 393, 394, 395, 396, 397, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, 412, 413, 376, 376, 416, 376, 418, - 376, 420, 376, 376, 423, 256, 257, 376, 263, 51, - 429, 52, 12, 264, 265, 266, 267, 268, 5, 270, - 271, 928, 273, 274, 275, 276, 277, 278, 279, 280, - 824, 1200, 1256, 1381, 285, 1418, 287, 288, 289, 290, - 291, 292, 1069, 1069, 295, 0, 1434, 671, 299, 300, - 1369, 302, 303, 304, 1398, 1364, 1272, 1285, 845, 685, - 845, 845, 841, 314, 1478, 316, 1224, 318, 319, 1472, - 1304, 322, 1212, 324, 325, 326, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 1391, 337, 1387, 1386, 340, - 341, 1327, 1162, 344, 345, 1471, 1272, 816, 523, 1163, - 712, 866, 792, 583, 365, 787, 979, 679, 359, 360, - 361, 362, 363, 72, 331, 709, 367, 368, 94, 396, - 371, 397, 400, 398, 1146, 376, 377, 378, 379, 380, - 399, 401, 546, 384, 1234, 386, 159, 1153, 949, 1057, - 1091, 392, 393, 964, 1048, 1037, 1046, 911, 886, 521, - 1230, 1130, 775, 420, 822, 821, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 417, 418, 419, 420, - -1, 422, 256, 257, -1, -1, -1, -1, 429, -1, - 264, 265, 266, 267, 268, -1, 270, 271, -1, 273, - 274, 275, 276, 277, 278, 279, -1, -1, 0, -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, 359, 360, 361, 362, 363, - -1, -1, -1, 367, 368, -1, -1, 371, -1, -1, - -1, -1, 376, 377, 378, 379, 380, -1, -1, -1, - 384, 256, 386, -1, -1, -1, 261, 262, 392, 393, + 17, 299, 4, 17, 52, 18, 507, 17, 191, 300, + 235, 17, 20, 20, 6, 190, 549, 509, 250, 159, + 291, 335, 464, 85, 60, 483, 559, 48, 296, 298, + 60, 328, 906, 318, 353, 759, 1077, 730, 0, 78, + 569, 113, 256, 115, 237, 59, 256, 256, 107, 1197, + 60, 113, 256, 115, 64, 324, 74, 1114, 1115, 256, + 78, 256, 268, 294, 256, 1213, 80, 256, 82, 256, + 256, 268, 294, 335, 353, 256, 256, 911, 96, 256, + 88, 89, 256, 268, 256, 705, 706, 277, 17, 268, + 282, 276, 1400, 1401, 256, 372, 272, 374, 325, 21, + 264, 109, 256, 1160, 88, 89, 256, 0, 256, 17, + 0, 391, 17, 367, 401, 17, 372, 371, 374, 17, + 296, 650, 314, 294, 257, 109, 413, 372, 748, 17, + 750, 53, 17, 365, 414, 306, 60, 17, 407, 17, + 266, 159, 159, 191, 358, 159, 358, 323, 1456, 159, + 339, 17, 429, 159, 256, 344, 256, 346, 339, 17, + 391, 325, 368, 352, 353, 269, 420, 429, 256, 963, + 94, 381, 256, 429, 98, 99, 100, 101, 102, 103, + 104, 105, 286, 414, 429, 339, 381, 235, 314, 375, + 344, 418, 346, 367, 202, 203, 418, 991, 352, 353, + 259, 1035, 376, 428, 256, 226, 503, 369, 506, 418, + 424, 425, 426, 427, 418, 707, 422, 343, 202, 203, + 370, 369, 372, 1371, 374, 422, 418, 546, 418, 419, + 159, 418, 250, 418, 1072, 549, 429, 255, 418, 231, + 429, 418, 301, 422, 523, 559, 418, 418, 325, 375, + 1398, 159, 288, 325, 159, 317, 264, 159, 288, 321, + 296, 159, 1410, 325, 1412, 391, 368, 546, 418, 369, + 994, 159, 374, 291, 159, 429, 294, 295, 288, 159, + 264, 159, 290, 367, 314, 369, 374, 371, 414, 307, + 569, 1159, 300, 159, 312, 257, 314, 356, 306, 313, + 318, 159, 428, 256, 314, 294, 290, 346, 368, 1177, + 335, 329, 330, 842, 256, 294, 1009, 369, 335, 294, + 376, 341, 306, 277, 1365, 335, 376, 281, 346, 335, + 257, 1055, 651, 418, 262, 418, 420, 368, 256, 423, + 372, 418, 350, 428, 256, 353, 368, 365, 366, 369, + 970, 269, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 256, 288, 256, 350, 257, 286, 429, + 298, 650, 296, 429, 1431, 434, 384, 385, 1252, 429, + 428, 873, 272, 368, 402, 372, 256, 277, 342, 369, + 438, 281, 671, 373, 852, 1263, 882, 429, 429, 1267, + 384, 385, 391, 1460, 412, 413, 296, 429, 693, 468, + 469, 368, 391, 343, 435, 436, 391, 370, 368, 368, + 441, 374, 430, 430, 1292, 414, 368, 339, 412, 413, + 349, 350, 374, 323, 493, 414, 444, 444, 263, 414, + 256, 709, 429, 423, 429, 369, 339, 679, 339, 305, + 378, 379, 342, 483, 861, 367, 775, 381, 382, 383, + 263, 391, 386, 387, 478, 872, 1304, 305, 1088, 418, + 962, 341, 429, 483, 367, 369, 367, 256, 371, 429, + 373, 374, 375, 376, 414, 369, 343, 505, 381, 507, + 315, 509, 386, 387, 1332, 1333, 775, 1335, 428, 369, + 1120, 1121, 988, 272, 990, 519, 520, 1127, 1346, 372, + 429, 1349, 315, 531, 343, 523, 523, 576, 375, 578, + 538, 580, 841, 339, 381, 372, 1364, 296, 344, 343, + 346, 368, 549, 376, 391, 272, 352, 353, 546, 549, + 371, 839, 559, 549, 558, 256, 375, 349, 350, 559, + 1388, 349, 350, 559, 323, 418, 256, 414, 357, 296, + 792, 569, 391, 842, 582, 583, 851, 381, 374, 866, + 369, 428, 376, 372, 373, 374, 1182, 391, 718, 357, + 1038, 418, 429, 642, 369, 414, 323, 386, 367, 420, + 369, 1124, 371, 372, 305, 374, 376, 376, 369, 428, + 414, 870, 367, 367, 272, 305, 374, 418, 386, 277, + 416, 629, 376, 281, 428, 906, 62, 635, 1224, 418, + 66, 67, 68, 367, 70, 71, 371, 429, 296, 75, + 76, 429, 376, 418, 386, 1182, 82, 357, 84, 418, + 86, 420, 650, 1182, 423, 91, 92, 418, 416, 6, + 574, 1182, 306, 373, 713, 323, 1182, 294, 367, 313, + 17, 679, 371, 671, 373, 374, 386, 376, 114, 306, + 1182, 1182, 381, 709, 342, 693, 357, 1224, 1182, 741, + 672, 979, 1181, 1182, 702, 1224, 414, 418, 369, 707, + 379, 339, 373, 1224, 712, 705, 706, 428, 1224, 931, + 428, 1200, 414, 60, 339, 386, 415, 64, 371, 344, + 373, 346, 1224, 1224, 349, 350, 428, 352, 353, 367, + 1224, 373, 736, 381, 376, 1224, 734, 1226, 376, 392, + 393, 88, 89, 391, 752, 391, 754, 418, 748, 374, + 750, 371, 369, 373, 758, 759, 306, 755, 308, 412, + 734, 769, 109, 313, 381, 367, 414, 420, 414, 374, + 423, 376, 371, 771, 376, 325, 381, 775, 816, 787, + 428, 755, 428, 1044, 792, 793, 285, 795, 1092, 1077, + 381, 373, 370, 371, 376, 709, 374, 771, 806, 807, + 391, 367, 382, 383, 429, 371, 414, 373, 374, 1270, + 376, 384, 159, 421, 370, 381, 396, 397, 374, 1080, + 1124, 257, 1283, 414, 260, 339, 824, 824, 327, 837, + 344, 839, 346, 882, 369, 349, 350, 372, 352, 353, + 389, 1302, 1007, 851, 842, 843, 854, 829, 1070, 415, + 1154, 1283, 391, 861, 370, 202, 203, 1118, 374, 367, + 374, 385, 298, 871, 371, 873, 373, 368, 376, 843, + 371, 1353, 373, 374, 310, 414, 394, 395, 377, 378, + 379, 380, 421, 382, 383, 384, 385, 386, 387, 388, + 389, 392, 393, 392, 393, 394, 395, 396, 397, 398, + 399, 367, 367, 367, 369, 913, 306, 915, 906, 917, + 376, 412, 376, 313, 372, 429, 374, 264, 1133, 420, + 367, 400, 423, 931, 372, 325, 374, 1188, 357, 376, + 928, 928, 418, 1415, 357, 339, 1109, 390, 936, 988, + 344, 288, 346, 290, 373, 349, 350, 369, 352, 353, + 373, 370, 373, 300, 962, 374, 938, 386, 940, 306, + 942, 1010, 936, 386, 372, 1234, 374, 314, 376, 1451, + 970, 1252, 1241, 368, 370, 368, 372, 376, 371, 374, + 373, 374, 1473, 1474, 418, 372, 381, 374, 335, 376, + 994, 339, 374, 1001, 376, 1003, 344, 1005, 346, 392, + 393, 349, 350, 350, 352, 353, 353, 339, 374, 370, + 376, 372, 344, 374, 346, 371, 357, 349, 350, 412, + 352, 353, 398, 399, 1016, 429, 415, 420, 369, 256, + 423, 372, 373, 370, 339, 372, 1044, 384, 385, 344, + 370, 346, 372, 479, 374, 386, 418, 352, 353, 1057, + 1058, 1055, 386, 387, 388, 370, 371, 1065, 373, 374, + 375, 418, 1070, 370, 418, 412, 413, 374, 1071, 1077, + 370, 1109, 1080, 1111, 374, 370, 277, 1365, 381, 374, + 367, 429, 340, 519, 371, 1092, 373, 374, 1088, 376, + 376, 1099, 1092, 376, 381, 1133, 1092, 429, 1106, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 373, + 1118, 370, 367, 372, 1112, 343, 370, 1124, 372, 376, + 1120, 1121, 1130, 1131, 1124, 1163, 376, 1127, 1124, 390, + 391, 392, 393, 372, 418, 374, 483, 372, 370, 374, + 372, 354, 355, 1181, 1182, 418, 370, 1154, 372, 374, + 376, 376, 372, 374, 1154, 376, 418, 374, 1154, 376, + 354, 355, 1200, 1171, 369, 374, 1164, 376, 414, 415, + 414, 364, 365, 349, 350, 418, 523, 418, 1186, 376, + 1188, 418, 1180, 372, 373, 418, 1224, 372, 1226, 364, + 365, 98, 99, 100, 101, 102, 103, 104, 105, 546, + 388, 389, 549, 1075, 1076, 256, 1180, 394, 395, 372, + 372, 372, 559, 368, 265, 374, 267, 294, 372, 270, + 372, 372, 569, 372, 275, 372, 418, 294, 279, 374, + 372, 1280, 372, 1237, 418, 1233, 1234, 288, 376, 374, + 372, 0, 371, 1241, 295, 1294, 256, 374, 418, 300, + 375, 1249, 1250, 304, 1252, 381, 356, 372, 418, 1233, + 1258, 374, 1311, 375, 1313, 316, 374, 318, 373, 376, + 418, 322, 1270, 372, 1272, 1249, 1250, 1275, 381, 330, + 331, 374, 374, 334, 1288, 1283, 337, 374, 418, 374, + 294, 372, 429, 261, 374, 423, 367, 418, 1272, 372, + 372, 1275, 418, 650, 1302, 1343, 343, 0, 373, 294, + 374, 294, 374, 370, 418, 371, 284, 418, 367, 256, + 418, 375, 1360, 256, 671, 256, 374, 256, 372, 297, + 372, 381, 280, 256, 302, 1373, 1374, 367, 372, 307, + 368, 309, 310, 311, 312, 1353, 343, 1351, 418, 317, + 418, 376, 418, 321, 370, 418, 371, 1365, 705, 706, + 418, 374, 1400, 1401, 376, 333, 374, 418, 336, 376, + 338, 376, 372, 372, 1382, 370, 265, 423, 267, 381, + 421, 270, 347, 272, 351, 367, 275, 734, 381, 381, + 279, 256, 256, 372, 362, 368, 372, 347, 370, 288, + 374, 748, 372, 750, 375, 367, 295, 1415, 755, 370, + 370, 300, 375, 302, 372, 304, 348, 368, 1456, 374, + 418, 328, 374, 339, 771, 368, 348, 316, 775, 318, + 418, 376, 367, 322, 323, 375, 356, 367, 376, 367, + 381, 330, 331, 1451, 368, 334, 371, 374, 337, 368, + 418, 368, 418, 1457, 1458, 368, 337, 372, 305, 418, + 1464, 1465, 369, 371, 418, 1473, 1474, 371, 369, 418, + 367, 418, 0, 371, 381, 382, 383, 376, 371, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, + 397, 398, 399, 400, 401, 842, 843, 418, 257, 371, + 373, 381, 261, 371, 367, 371, 381, 369, 256, 418, + 371, 381, 372, 272, 372, 374, 373, 373, 277, 374, + 374, 374, 281, 372, 376, 284, 372, 370, 418, 418, + 418, 376, 376, 372, 418, 376, 372, 296, 297, 367, + 372, 368, 301, 302, 381, 370, 372, 368, 307, 315, + 309, 310, 311, 312, 263, 371, 371, 368, 317, 906, + 372, 0, 321, 256, 323, 372, 0, 367, 261, 262, + 376, 376, 368, 372, 333, 0, 335, 336, 418, 338, + 368, 376, 372, 342, 418, 372, 370, 367, 370, 936, + 376, 284, 368, 368, 372, 376, 503, 367, 418, 418, + 368, 294, 376, 362, 297, 298, 368, 376, 372, 302, + 369, 376, 305, 376, 307, 372, 309, 310, 311, 312, + 372, 372, 368, 970, 317, 372, 367, 376, 321, 368, + 368, 367, 325, 373, 376, 315, 263, 51, 12, 376, + 333, 376, 0, 336, 376, 338, 339, 376, 376, 376, + 376, 344, 52, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, 5, 928, 824, 574, 1070, 362, + 1200, 1226, 1070, 1405, 367, 368, 1368, 370, 371, 372, + 373, 374, 375, 376, 671, 378, 379, 1356, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 1421, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, + 413, 1385, 1351, 416, 1258, 418, 845, 420, 256, 685, + 423, 845, 841, 1270, 262, 845, 429, 1465, 1289, 1224, + 1212, 1088, 1459, 1378, 1374, 1092, 1458, 1373, 1163, 1313, + 523, 1164, 1258, 792, 787, 816, 365, 979, 72, 712, + 866, 583, 331, 709, 94, 1112, 294, 679, 396, 398, + 298, 397, 775, 1120, 1121, 399, 401, 1124, 400, 546, + 1127, 1233, 1147, 1154, 1092, 964, 159, 1058, 1037, 991, + 1038, 1047, 949, 1131, 1229, 886, 1049, 521, 822, 420, + 821, -1, -1, -1, -1, -1, -1, 1154, -1, 0, + -1, 339, -1, -1, -1, -1, 344, 1164, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + -1, -1, -1, 1180, -1, -1, -1, -1, -1, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, -1, + 378, 379, -1, -1, 382, 383, 384, 385, 386, -1, + -1, 389, 390, -1, -1, -1, 394, 395, 396, 397, + 398, 399, 400, 401, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 413, 1233, 1234, 416, -1, + 418, -1, 420, -1, 1241, 423, -1, -1, 256, 257, + -1, 429, 1249, 1250, -1, 1252, 264, 265, 266, 267, + 268, -1, 270, 271, -1, 273, 274, 275, 276, 277, + 278, 279, 280, -1, -1, 1272, -1, 285, 1275, 287, + 288, 289, 290, 291, 292, -1, -1, 295, 0, -1, + -1, 299, 300, -1, 302, 303, 304, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 314, -1, 316, 866, + 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, -1, 0, 284, - -1, -1, -1, 417, 418, 419, 420, -1, 422, 294, - -1, -1, 297, 298, -1, 429, -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, 357, -1, -1, -1, -1, 362, -1, -1, - -1, -1, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, -1, 378, 379, -1, -1, 382, 383, 384, - 385, 386, -1, -1, 389, 390, -1, -1, -1, 394, - 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, - -1, -1, -1, -1, 256, -1, -1, -1, 413, 261, - 262, 416, -1, 418, -1, 420, -1, -1, 423, -1, - -1, -1, -1, -1, 429, 0, -1, -1, -1, -1, - -1, -1, 284, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 294, -1, -1, 297, 298, -1, -1, -1, + -1, 359, 360, 361, 362, 363, -1, -1, -1, 367, + 368, -1, -1, 371, -1, -1, -1, -1, 376, 377, + 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, + -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 417, + 418, 419, 420, -1, 422, 256, 257, -1, -1, -1, + -1, 429, -1, 264, 265, 266, 267, 268, -1, 270, + 271, -1, 273, 274, 275, 276, 277, 278, 279, -1, + -1, 0, -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, 359, 360, + 361, 362, 363, -1, -1, -1, 367, 368, -1, -1, + 371, -1, -1, -1, -1, 376, 377, 378, 379, 380, + -1, -1, -1, 384, 256, 386, -1, -1, -1, 261, + 262, 392, 393, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 0, 284, -1, -1, -1, 417, 418, 419, 420, + -1, 422, 294, -1, -1, 297, 298, -1, 429, -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, -1, -1, -1, + 352, 353, 354, 355, 356, 357, -1, -1, -1, -1, 362, -1, -1, -1, -1, 367, 368, 369, 370, 371, - 372, -1, 374, 375, 376, -1, 378, 379, -1, -1, - 382, 383, 384, 385, 256, -1, -1, 389, 390, 261, - 262, -1, 394, 395, 396, 397, 398, 399, 400, 401, - 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 413, 284, -1, 416, -1, 418, -1, 420, -1, - -1, 423, 294, -1, -1, 297, 298, 429, -1, -1, + 372, 373, 374, 375, 376, -1, 378, 379, -1, -1, + 382, 383, 384, 385, 386, -1, -1, 389, 390, -1, + -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, + -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, + -1, 413, 261, 262, 416, -1, 418, -1, 420, -1, + -1, 423, -1, -1, -1, -1, -1, 429, 0, -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, + -1, -1, -1, 362, -1, -1, -1, -1, 367, 368, + 369, 370, 371, 372, -1, 374, 375, 376, -1, 378, + 379, -1, -1, 382, 383, 384, 385, 256, -1, -1, + 389, 390, 261, 262, -1, 394, 395, 396, 397, 398, + 399, 400, 401, 0, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 413, 284, -1, 416, -1, 418, + -1, 420, -1, -1, 423, 294, -1, -1, 297, 298, + 429, -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, + -1, -1, -1, 362, -1, -1, -1, -1, 367, 368, + 369, 370, 371, 372, -1, 374, 375, 376, -1, 378, + 379, -1, -1, 382, 383, 384, 385, -1, -1, -1, + 389, 390, -1, -1, -1, 394, 395, 396, 397, 398, + 399, 400, 401, -1, 256, -1, -1, -1, -1, 261, + 262, -1, -1, -1, 413, -1, -1, 416, -1, 418, + -1, 420, -1, -1, 423, -1, -1, -1, -1, -1, + 429, 0, 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, + -1, 256, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, -1, - 362, -1, -1, -1, -1, 367, 368, 369, 370, 371, - 372, -1, 374, 375, 376, -1, 378, 379, -1, -1, - 382, 383, 384, 385, -1, -1, -1, 389, 390, -1, + 362, -1, -1, -1, -1, 367, 368, -1, 370, 371, + 372, -1, 374, 375, 376, -1, 378, 379, -1, 256, + 382, 383, 384, 385, -1, 262, -1, 389, 390, -1, -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, - -1, 256, -1, -1, -1, -1, 261, 262, -1, -1, - -1, 413, -1, -1, 416, -1, 418, -1, 420, -1, - -1, 423, -1, -1, -1, -1, -1, 429, -1, 284, - -1, -1, -1, -1, -1, 0, -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, + 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 413, -1, -1, 416, -1, 418, 294, -1, -1, + -1, 298, -1, -1, 339, -1, -1, 429, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, -1, -1, 362, -1, -1, - -1, -1, 367, 368, -1, 370, 371, 372, -1, 374, - 375, 376, -1, 378, 379, -1, 256, 382, 383, 384, - 385, -1, 262, -1, 389, 390, -1, -1, -1, 394, - 395, 396, 397, 398, 399, 400, 401, -1, 0, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 413, -1, - -1, 416, -1, 418, 294, -1, -1, -1, 298, -1, - -1, -1, -1, -1, 429, -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, 339, - -1, 0, -1, -1, 344, -1, 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, 376, -1, 378, 379, - -1, -1, 382, 383, 384, 385, 386, -1, -1, 389, - 390, -1, -1, -1, 394, 395, 396, 397, 398, 399, - 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, - 0, -1, -1, 413, -1, -1, 416, -1, 418, -1, - 420, -1, 257, 423, -1, -1, 261, -1, 263, 429, - 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, 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, - -1, 336, 337, 338, -1, -1, -1, 342, -1, -1, + 355, 356, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, + 375, 376, 339, 0, -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, - 0, -1, -1, -1, -1, -1, -1, 362, -1, 364, - 365, -1, -1, -1, 256, 257, -1, -1, -1, 261, - -1, -1, 377, 265, -1, 267, -1, -1, 270, -1, - 272, 273, -1, 275, -1, 277, -1, 279, -1, 281, - 282, 283, 284, 0, -1, 287, 288, -1, -1, -1, - -1, 293, -1, 295, 296, 297, -1, -1, 300, 301, - 302, -1, 304, 418, -1, 307, -1, 309, 310, 311, - 312, -1, -1, -1, 316, 317, 318, -1, 257, 321, - 322, 323, 261, -1, -1, -1, 0, -1, 330, 331, - -1, 333, 334, 272, 336, 337, 338, -1, 277, -1, - 342, -1, 281, -1, -1, 284, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 296, 297, -1, - 362, -1, 301, 302, -1, -1, 368, 369, 307, 0, - 309, 310, 311, 312, -1, 377, -1, -1, 317, -1, - -1, -1, 321, -1, 323, -1, -1, 257, -1, -1, - -1, 261, -1, -1, 333, -1, 335, 336, -1, 338, - -1, -1, 272, 342, -1, -1, -1, 277, -1, -1, - -1, 281, 0, -1, 284, -1, 418, -1, -1, -1, - -1, -1, -1, 362, -1, -1, 296, 297, -1, 368, - 369, 301, 302, -1, 257, -1, -1, 307, 261, 309, - 310, 311, 312, -1, -1, -1, -1, 317, -1, 272, - -1, 321, -1, 323, 277, 0, -1, -1, 281, -1, - -1, 284, -1, 333, -1, 335, 336, -1, 338, -1, - -1, -1, 342, 296, 297, -1, -1, -1, 301, 302, - -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, - -1, -1, 362, -1, 317, -1, -1, 257, 321, 369, - 323, 261, -1, -1, -1, -1, -1, -1, -1, -1, - 333, -1, 272, 336, -1, 338, -1, 277, 0, 342, - -1, 281, -1, -1, 284, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 296, 297, -1, 362, - 257, 301, 302, -1, 261, 368, 369, 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, -1, - 317, -1, 362, 277, 321, -1, 323, 281, 368, 369, - 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, -1, 317, -1, 362, 277, 321, -1, 323, - 281, -1, 369, 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, -1, 317, -1, 362, 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, + 367, 368, -1, 370, 371, 372, -1, 374, 375, 376, + -1, 378, 379, -1, -1, 382, 383, 384, 385, -1, + -1, -1, 389, 390, 429, -1, -1, 394, 395, 396, + 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, + -1, -1, 0, -1, -1, -1, 413, -1, 257, 416, + -1, 418, 261, -1, 263, -1, 265, -1, 267, -1, + -1, 270, 429, 272, 273, -1, 275, -1, 277, -1, + 279, -1, 281, 282, 283, 284, -1, -1, 287, 288, + -1, -1, -1, -1, 293, 294, 295, 296, 297, -1, + -1, 300, 301, 302, -1, 304, -1, 306, 307, 308, + 309, 310, 311, 312, 313, 0, 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, -1, -1, 342, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, + -1, -1, -1, 362, -1, 364, 365, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 256, 257, 377, -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, 418, + 300, 301, 302, -1, 304, -1, -1, 307, -1, 309, + 310, 311, 312, -1, -1, -1, 316, 317, 318, -1, + 257, 321, 322, 323, 261, 0, -1, -1, -1, -1, + 330, 331, -1, 333, 334, 272, 336, 337, 338, -1, + 277, -1, 342, -1, 281, -1, -1, 284, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 296, + 297, -1, 362, -1, 301, 302, -1, -1, 368, 369, + 307, -1, 309, 310, 311, 312, -1, 377, -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, -1, 281, -1, -1, 284, -1, 418, -1, + -1, -1, -1, -1, -1, 362, -1, -1, 296, 297, + -1, 368, 369, 301, 302, 0, -1, -1, -1, 307, + -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, + -1, -1, 257, 321, -1, 323, 261, -1, -1, -1, + -1, -1, -1, -1, -1, 333, -1, 272, 336, -1, + 338, -1, 277, -1, 342, -1, 281, -1, -1, 284, + -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, + -1, 296, 297, -1, 362, 257, 301, 302, -1, 261, + 368, 369, 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, 0, + -1, 336, -1, 338, 296, 297, -1, 342, -1, 301, + 302, -1, -1, 261, -1, 307, -1, 309, 310, 311, + 312, -1, -1, -1, -1, 317, -1, 362, -1, 321, + -1, 323, -1, 368, 369, -1, 284, -1, -1, -1, + -1, 333, -1, -1, 336, -1, 338, -1, -1, 297, + 342, -1, 257, 301, 302, -1, 261, -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, 272, -1, 317, - -1, 362, 277, 321, -1, 323, 281, -1, -1, 284, + 362, -1, 277, 321, -1, -1, 281, 369, -1, 284, -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, - 338, 296, 297, -1, 342, -1, 301, 302, -1, -1, + 338, 296, 297, -1, -1, -1, 301, 302, -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, 362, 257, 321, -1, 323, 261, -1, -1, -1, -1, -1, -1, -1, -1, 333, -1, 272, 336, -1, 338, -1, 277, -1, 342, -1, 281, -1, -1, 284, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 296, 297, -1, 362, -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, -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, -1, -1, -1, - 362, -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, - 256, 344, 345, -1, -1, -1, 262, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 359, 360, 361, 362, - 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, - -1, -1, -1, 376, 377, 378, 379, 380, -1, -1, - -1, 384, 298, 386, -1, -1, -1, -1, -1, 392, - 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, - -1, -1, 262, -1, 417, 418, 419, 420, -1, -1, - -1, -1, -1, 339, -1, -1, 429, -1, 344, -1, + 302, -1, 257, -1, -1, 307, 261, 309, 310, 311, + 312, -1, -1, -1, -1, 317, -1, 272, -1, 321, + -1, 323, 277, -1, -1, -1, 281, -1, -1, 284, + -1, 333, -1, -1, 336, -1, 338, -1, -1, -1, + 342, 296, 297, -1, -1, -1, 301, 302, -1, 257, + -1, -1, 307, 261, 309, 310, 311, 312, -1, -1, + 362, -1, 317, -1, 272, -1, 321, -1, 323, 277, + -1, -1, -1, 281, -1, -1, 284, -1, 333, -1, + -1, 336, -1, 338, -1, -1, -1, 342, 296, 297, + -1, -1, -1, 301, 302, -1, 257, -1, -1, 307, + 261, 309, 310, 311, 312, -1, -1, 362, -1, 317, + -1, 272, -1, 321, -1, 323, 277, -1, -1, -1, + 281, -1, -1, 284, -1, 333, -1, -1, 336, -1, + 338, -1, -1, -1, 342, 296, 297, -1, -1, -1, + 301, 302, -1, -1, -1, -1, 307, -1, 309, 310, + 311, 312, -1, -1, 362, -1, 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, -1, -1, + -1, 362, -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, 256, 344, 345, -1, -1, -1, 262, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, + 362, 363, -1, -1, -1, 367, -1, -1, -1, 371, + -1, -1, -1, -1, 376, 377, 378, 379, 380, -1, + -1, -1, 384, 298, 386, -1, -1, -1, -1, -1, + 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, + -1, -1, -1, 262, -1, 417, 418, 419, 420, -1, + -1, -1, -1, -1, 339, -1, -1, 429, -1, 344, + -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, -1, -1, -1, -1, -1, -1, 298, + -1, -1, -1, 368, 369, 370, 371, 372, 373, 374, + 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, + 256, -1, -1, 418, -1, 420, 262, -1, 423, -1, + -1, -1, -1, -1, 429, -1, -1, -1, -1, 368, + -1, -1, 371, -1, 373, 374, -1, -1, -1, 378, + 379, -1, -1, 382, 383, 384, 385, 386, 387, 388, + 389, 390, 298, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, + -1, 420, -1, -1, 423, -1, -1, -1, -1, -1, + 429, -1, -1, 339, -1, -1, -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, -1, -1, -1, -1, -1, -1, 298, -1, - -1, -1, 368, 369, 370, 371, 372, 373, 374, 375, - 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, + 356, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 256, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, 256, - -1, -1, 418, -1, 420, 262, -1, 423, -1, -1, - -1, -1, -1, 429, -1, -1, -1, -1, 368, -1, - -1, 371, -1, 373, 374, -1, -1, -1, 378, 379, - -1, -1, 382, 383, 384, 385, 386, 387, 388, 389, - 390, 298, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 412, 413, -1, -1, -1, -1, -1, -1, - 420, 262, -1, 423, -1, -1, -1, -1, -1, 429, - -1, -1, 339, -1, -1, -1, -1, 344, -1, 346, + -1, -1, -1, -1, 420, 262, -1, -1, -1, -1, + -1, -1, -1, 429, -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, -1, 368, -1, 370, -1, 372, -1, 374, + 375, 376, 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, 368, 369, 370, 371, 372, 373, 374, 375, 376, + 367, 368, -1, 370, 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, - 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, + 387, 388, 389, 390, 429, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, 256, -1, - -1, -1, -1, 420, 262, -1, 357, -1, -1, -1, + -1, -1, -1, 420, 262, -1, 423, -1, -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, 369, -1, - 371, -1, 373, -1, -1, 376, -1, 378, 379, -1, - 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 371, 372, 373, 374, -1, 376, -1, 378, 379, -1, + 381, 382, 383, 384, 385, -1, 387, 388, 389, 390, 298, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, 418, -1, 420, 262, -1, 423, -1, -1, -1, -1, -1, 429, -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, -1, -1, -1, -1, -1, 298, -1, -1, -1, 368, -1, 370, 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, 256, -1, -1, -1, -1, 420, 262, -1, 423, -1, -1, -1, -1, - -1, 429, -1, -1, -1, -1, -1, 369, -1, 371, - 372, 373, 374, -1, 376, -1, 378, 379, -1, 381, - 382, 383, 384, 385, -1, 387, 388, 389, 390, 298, + -1, 429, -1, -1, -1, -1, -1, -1, 370, 371, + 372, 373, 374, -1, -1, -1, 378, 379, -1, 381, + 382, 383, 384, 385, 386, 387, 388, 389, 390, 298, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 412, 413, -1, -1, -1, -1, 418, -1, 420, 262, + 412, 413, -1, -1, -1, -1, -1, -1, 420, -1, -1, 423, -1, -1, -1, -1, -1, 429, -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, -1, 368, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 368, -1, 370, 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, - 409, 410, 411, 412, 413, -1, 256, -1, -1, -1, - -1, 420, 262, -1, 423, -1, -1, -1, -1, -1, - 429, -1, -1, -1, -1, -1, -1, 370, 371, 372, - 373, 374, -1, -1, -1, 378, 379, -1, 381, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 298, 392, - 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, - 413, -1, -1, -1, -1, -1, -1, 420, -1, -1, - 423, -1, -1, -1, -1, -1, 429, -1, -1, 339, + 409, 410, 411, 412, 413, -1, 256, 256, -1, -1, + -1, 420, 262, -1, 423, -1, 265, -1, 267, -1, + 429, 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, -1, 368, -1, @@ -11179,7 +11230,7 @@ void case_956() -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 412, 413, -1, 256, 256, -1, -1, -1, + 410, 411, 412, 413, -1, 256, 256, -1, -1, 418, 420, 262, -1, 423, -1, 265, -1, 267, -1, 429, 270, -1, -1, -1, -1, 275, -1, -1, -1, 279, -1, -1, -1, -1, -1, -1, -1, -1, 288, -1, @@ -11191,289 +11242,226 @@ void case_956() -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, -1, 368, -1, 370, - 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, + 371, 372, 373, 374, 375, 376, -1, 378, -1, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 412, 413, -1, 256, 256, -1, -1, 418, 420, - 262, -1, 423, -1, 265, -1, 267, -1, 429, 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, -1, 368, -1, 370, 371, - 372, 373, 374, 375, 376, -1, 378, -1, -1, 381, + 411, 412, 413, -1, 256, -1, 256, -1, 418, 420, + 262, -1, 423, -1, 264, 265, -1, 267, 429, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, -1, -1, -1, -1, 285, -1, -1, 288, -1, + -1, -1, -1, -1, -1, 295, 298, -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, 339, -1, -1, + -1, 256, 344, -1, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 359, + 360, 361, 362, -1, -1, -1, 368, -1, 370, -1, + 372, 371, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, - 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, + -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 412, 413, -1, 256, -1, 256, -1, 418, 420, 262, - -1, 423, -1, 264, 265, -1, 267, 429, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - -1, -1, -1, -1, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, 298, -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, 339, -1, -1, -1, - -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, -1, -1, -1, -1, 359, 360, - 361, 362, -1, -1, -1, 368, -1, 370, -1, 372, - 371, 374, 375, 376, -1, 378, 379, -1, 381, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 261, -1, - -1, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, 256, - 413, 284, -1, -1, -1, 262, 417, 418, -1, -1, - -1, -1, -1, -1, 297, -1, 429, -1, -1, 302, - -1, -1, 305, -1, 307, -1, 309, 310, 311, 312, - -1, -1, -1, -1, 317, -1, -1, -1, 321, -1, - -1, 298, 325, -1, -1, -1, -1, -1, -1, -1, - 333, -1, -1, 336, -1, 338, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, - -1, -1, -1, 262, -1, -1, -1, -1, -1, 362, - -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, 298, - -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, - -1, 378, 379, -1, -1, 382, 383, 384, 385, 386, - 387, 388, 389, 390, -1, 418, -1, 394, 395, 396, - 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, - 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, 256, 429, -1, -1, -1, -1, 262, -1, 368, - -1, 370, -1, 372, -1, 374, 375, 376, -1, 378, - 379, -1, -1, 382, 383, 384, 385, -1, -1, -1, - 389, 390, -1, -1, -1, 394, 395, 396, 397, 398, - 399, 400, 401, 298, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 413, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, - 429, -1, -1, -1, -1, 262, -1, -1, -1, -1, - -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, + 256, 413, -1, -1, -1, -1, 262, 417, 418, -1, + -1, -1, -1, -1, 339, -1, -1, 429, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 298, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, -1, 378, 379, -1, -1, 382, 383, 384, - 385, -1, -1, -1, 389, 390, -1, -1, -1, 394, - 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, 256, 429, -1, -1, -1, -1, 262, - -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, - -1, 378, 379, -1, -1, 382, 383, 384, 385, -1, - -1, -1, 389, 390, -1, -1, -1, 394, 395, 396, - 397, 398, 399, 400, 401, 298, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 413, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 256, 429, -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, -1, 368, -1, 370, -1, 372, - -1, 374, 375, 376, -1, 378, 379, -1, -1, 382, - 383, 384, 385, -1, -1, -1, 389, 390, -1, 256, - -1, 394, 395, 396, 397, 398, 399, 400, 401, -1, - -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, - 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, - -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, -1, -1, -1, -1, -1, 382, 383, 384, - 385, -1, -1, -1, 389, 390, -1, 256, -1, 394, - 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, - -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, - -1, -1, -1, -1, -1, 382, 383, 384, 385, -1, - -1, -1, 389, 390, -1, 256, -1, 394, 395, 396, - 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, - 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, - -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, - -1, -1, -1, 382, 383, 384, 385, -1, -1, -1, - 389, 390, -1, 256, -1, 394, 395, 396, 397, 398, - 399, 400, 401, -1, -1, -1, -1, -1, 339, -1, - -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, - 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, - -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, - -1, 382, 383, 384, 385, -1, -1, -1, 389, 390, - -1, 256, -1, -1, -1, 396, 397, 398, 399, 400, - 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, - -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, - -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, - -1, 374, 375, 376, -1, -1, -1, -1, -1, 382, - 383, 384, 385, -1, -1, -1, 389, 390, -1, 256, - -1, -1, -1, 396, 397, 398, 399, 400, 401, -1, - -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, - 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, - -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, -1, -1, -1, -1, -1, 382, 383, 384, - 385, -1, -1, -1, 389, 390, -1, 256, -1, -1, - -1, 396, 397, 398, 399, 400, 401, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, - -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, - -1, -1, -1, -1, -1, 382, 383, 384, 385, -1, - -1, -1, 389, 390, -1, 256, -1, -1, -1, 396, - 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, - 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, - -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, - -1, -1, -1, 382, 383, 384, 385, -1, -1, -1, - 389, 390, -1, 256, -1, -1, -1, 396, 397, 398, - 399, 400, 401, -1, -1, -1, -1, -1, 339, -1, - -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, - 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, - -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, - -1, -1, -1, 384, 385, -1, -1, -1, 389, 390, - -1, 256, -1, -1, -1, -1, -1, 398, 399, 400, - 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, - -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, - -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, - -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, - -1, 384, 385, -1, -1, -1, 389, 390, -1, 256, - -1, -1, -1, -1, -1, 398, 399, 400, 401, -1, - -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, - 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, - -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, -1, -1, -1, -1, -1, -1, -1, 384, - 385, -1, -1, -1, 389, 390, -1, 256, -1, -1, - -1, -1, -1, 398, 399, 400, 401, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, - -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, - -1, -1, -1, -1, -1, -1, -1, 384, 385, -1, - -1, -1, 389, 390, -1, 256, -1, -1, -1, -1, - -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, - 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, - -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, - -1, -1, -1, -1, -1, -1, 385, -1, -1, -1, - 389, 390, -1, 256, -1, -1, -1, -1, -1, -1, - -1, 400, 401, -1, -1, -1, -1, -1, 339, -1, - -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, - 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, - -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, - -1, -1, -1, -1, 385, -1, -1, -1, 389, 390, - -1, 256, -1, -1, -1, -1, -1, -1, -1, 400, - 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, - -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, - -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, - -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, - -1, -1, 385, -1, -1, -1, -1, 390, -1, 256, - -1, -1, -1, -1, -1, -1, -1, 400, 401, -1, - -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, - 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, - -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, - 385, -1, -1, -1, -1, 390, -1, 256, -1, -1, - -1, -1, -1, -1, -1, 400, 401, -1, -1, -1, - -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, - -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 390, -1, 256, -1, -1, -1, -1, - -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, - 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, - -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, - -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, - -1, 256, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 390, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 400, 401, -1, -1, -1, -1, -1, 339, -1, - -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, - 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, - -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 390, - -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, - 401, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 413, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 368, -1, 370, -1, 372, 429, 374, + -1, -1, 298, 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 256, -1, 390, -1, -1, -1, -1, - -1, 264, 265, 266, 267, -1, 401, 270, 271, -1, - 273, 274, 275, 276, 277, 278, 279, -1, 413, -1, - -1, -1, 285, -1, 287, 288, 289, 290, 291, 292, - -1, -1, 295, -1, 429, -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, 359, 360, 361, 362, - 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, - -1, -1, -1, 376, 377, 378, 379, 380, -1, -1, - -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, - 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 256, -1, -1, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, - -1, 367, -1, -1, -1, 371, -1, -1, -1, -1, - 376, 377, 378, 379, 380, -1, -1, -1, 384, -1, - 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, - -1, 417, 418, 419, 420, 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, 390, -1, -1, 256, -1, + -1, -1, -1, -1, 262, -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, 429, -1, -1, -1, -1, -1, + 298, -1, 368, -1, 370, -1, 372, -1, 374, 375, + 376, -1, 378, 379, -1, -1, 382, 383, 384, 385, + 386, 387, 388, 389, 390, -1, -1, -1, 394, 395, + 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, + -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, + -1, -1, 256, 429, -1, -1, -1, -1, 262, -1, + 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, + 378, 379, -1, -1, 382, 383, 384, 385, -1, -1, + -1, 389, 390, -1, -1, -1, 394, 395, 396, 397, + 398, 399, 400, 401, 298, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 359, 360, 361, 362, 363, -1, -1, -1, 367, -1, - -1, -1, 371, -1, -1, -1, -1, 376, 377, 378, - 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, - -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, + 256, 429, -1, -1, -1, -1, 262, -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, 298, -1, 368, -1, 370, -1, 372, -1, + 374, 375, 376, -1, 378, 379, -1, -1, 382, 383, + 384, 385, -1, -1, -1, 389, 390, -1, -1, -1, + 394, 395, 396, 397, 398, 399, 400, 401, -1, -1, + -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, -1, -1, -1, 256, 429, -1, -1, -1, -1, + 262, -1, 368, -1, 370, -1, 372, -1, 374, 375, + 376, -1, 378, 379, -1, -1, 382, 383, 384, 385, + -1, -1, -1, 389, 390, -1, -1, -1, 394, 395, + 396, 397, 398, 399, 400, 401, 298, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 256, -1, -1, -1, 417, 418, - 419, 420, 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, 359, 360, 361, - 362, 363, -1, -1, -1, 367, -1, -1, -1, 371, - -1, -1, -1, -1, 376, 377, 378, 379, 380, -1, - -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, - 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 256, 429, -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, -1, 368, -1, 370, -1, + 372, -1, 374, 375, 376, -1, 378, 379, -1, -1, + 382, 383, 384, 385, -1, -1, -1, 389, 390, -1, + 256, -1, 394, 395, 396, 397, 398, 399, 400, 401, + -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, + 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, + -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, + 374, 375, 376, -1, -1, -1, -1, -1, 382, 383, + 384, 385, -1, -1, -1, 389, 390, -1, 256, -1, + 394, 395, 396, 397, 398, 399, 400, 401, -1, -1, + -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, + -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, + 376, -1, -1, -1, -1, -1, 382, 383, 384, 385, + -1, -1, -1, 389, 390, -1, 256, -1, 394, 395, + 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, + -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, + -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, + 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, + -1, -1, -1, -1, 382, 383, 384, 385, -1, -1, + -1, 389, 390, -1, 256, -1, 394, 395, 396, 397, + 398, 399, 400, 401, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, + -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, + 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, + -1, -1, 382, 383, 384, 385, -1, -1, -1, 389, + 390, -1, 256, -1, -1, -1, 396, 397, 398, 399, + 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, + -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, + -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, + 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, + 382, 383, 384, 385, -1, -1, -1, 389, 390, -1, + 256, -1, -1, -1, 396, 397, 398, 399, 400, 401, + -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, + 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, + -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, + 374, 375, 376, -1, -1, -1, -1, -1, 382, 383, + 384, 385, -1, -1, -1, 389, 390, -1, 256, -1, + -1, -1, 396, 397, 398, 399, 400, 401, -1, -1, + -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, + -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, + 376, -1, -1, -1, -1, -1, 382, 383, 384, 385, + -1, -1, -1, 389, 390, -1, 256, -1, -1, -1, + 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, + -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, + -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, + 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, + -1, -1, -1, -1, 382, 383, 384, 385, -1, -1, + -1, 389, 390, -1, 256, -1, -1, -1, 396, 397, + 398, 399, 400, 401, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, + -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, + 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, + -1, -1, -1, -1, 384, 385, -1, -1, -1, 389, + 390, -1, 256, -1, -1, -1, -1, -1, 398, 399, + 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, + -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, + -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, + 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, + -1, -1, 384, 385, -1, -1, -1, 389, 390, -1, + 256, -1, -1, -1, -1, -1, 398, 399, 400, 401, + -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, + 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, + -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, + 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, + 384, 385, -1, -1, -1, 389, 390, -1, 256, -1, + -1, -1, -1, -1, 398, 399, 400, 401, -1, -1, + -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, + -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, + 376, -1, -1, -1, -1, -1, -1, -1, 384, 385, + -1, -1, -1, 389, 390, -1, 256, -1, -1, -1, + -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, + -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, + -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, + 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, + -1, -1, -1, -1, -1, -1, 384, 385, -1, -1, + -1, 389, 390, -1, 256, -1, -1, -1, -1, -1, + -1, -1, 400, 401, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, + -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, + 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, + -1, -1, -1, -1, -1, 385, -1, -1, -1, 389, + 390, -1, 256, -1, -1, -1, -1, -1, -1, -1, + 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, + -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, + -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, + 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, + -1, -1, -1, 385, -1, -1, -1, 389, 390, -1, + 256, -1, -1, -1, -1, -1, -1, -1, 400, 401, + -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, + 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, + 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, + -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, + 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, + -1, 385, -1, -1, -1, -1, 390, -1, 256, -1, + -1, -1, -1, -1, -1, -1, 400, 401, -1, -1, + -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, + -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, + 376, -1, -1, -1, -1, -1, -1, -1, -1, 385, + -1, -1, -1, -1, 390, -1, 256, -1, -1, -1, + -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, + -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, + -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, + 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 256, -1, -1, -1, 417, 418, 419, 420, 264, - 265, 266, 267, -1, -1, 270, 271, -1, 273, 274, + -1, -1, 390, -1, 256, -1, -1, -1, -1, -1, + -1, -1, 400, 401, -1, -1, -1, -1, -1, 339, + -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, + -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, + 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, + 256, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 390, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, + -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, + -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, + 372, -1, 374, 375, 376, -1, -1, 262, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 390, -1, + -1, -1, -1, 339, -1, -1, -1, -1, 344, 401, + 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 356, 413, -1, 298, -1, -1, -1, -1, -1, -1, + -1, -1, 368, -1, 370, -1, 372, 429, 374, 375, + 376, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 390, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 401, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 413, -1, -1, + -1, -1, 357, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 429, 369, -1, 371, -1, 373, -1, + -1, 376, -1, 378, 379, -1, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, + -1, 256, -1, 418, -1, 420, -1, -1, 423, 264, + 265, 266, 267, -1, 429, 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, @@ -11488,159 +11476,202 @@ void case_956() -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, - -1, -1, 417, 418, 419, 420, 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, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, 367, - 368, -1, -1, 371, -1, -1, -1, -1, -1, 377, + -1, -1, -1, 371, -1, -1, -1, -1, 376, 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, 417, - 418, 419, 420, 264, 265, -1, 267, -1, -1, 270, - 271, -1, 256, -1, 275, 276, 277, 418, 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, 359, 360, + 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, 367, -1, -1, -1, - 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, + 371, -1, -1, -1, -1, 376, 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, - -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, - 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, - 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, - 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, - 295, -1, -1, -1, 418, 300, -1, 302, 303, 304, + -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -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, 359, 360, 361, 362, 363, -1, - -1, -1, 367, 368, -1, -1, 371, -1, -1, -1, - -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, - -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, + -1, -1, 256, -1, -1, -1, 417, 418, 419, 420, + 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, 359, 360, 361, 362, 363, + -1, -1, -1, 367, -1, -1, -1, 371, -1, -1, + -1, -1, 376, 377, 378, 379, 380, -1, -1, -1, + 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, + -1, -1, -1, 417, 418, 419, 420, 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, - 256, -1, 417, 418, 419, 420, -1, -1, 264, 265, - -1, 267, -1, 428, 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, 337, -1, 322, -1, 341, -1, -1, 344, 345, - -1, 330, 331, -1, -1, 334, -1, -1, 337, -1, - -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, - -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, - -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, - 386, -1, -1, 372, -1, -1, 392, 393, -1, -1, - -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, - 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, - -1, 417, 418, 419, 420, 285, -1, -1, 288, -1, - -1, -1, -1, -1, -1, 295, -1, -1, -1, 418, - 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, 359, - 360, 361, 362, 363, -1, -1, -1, 367, -1, -1, + -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, + 367, -1, -1, -1, 371, -1, -1, -1, -1, 376, + 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, + -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, + 417, 418, 419, 420, 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, 359, + 360, 361, 362, 363, -1, -1, -1, 367, 368, -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 256, -1, 417, 418, 419, - 420, -1, -1, 264, 265, -1, 267, -1, 428, 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, 359, 360, - 361, 362, 363, -1, -1, -1, 367, -1, -1, -1, - 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, - -1, -1, -1, 384, -1, 386, 370, -1, -1, -1, - -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 256, -1, -1, -1, 417, 418, 419, 420, - 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, - -1, 275, 276, 277, 418, 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, 359, 360, 361, 362, 363, - -1, -1, -1, -1, -1, -1, -1, 371, -1, -1, - -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, - 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, - -1, -1, -1, 417, 418, 419, 420, 264, 265, -1, + -1, -1, -1, 256, -1, -1, -1, 417, 418, 419, + 420, 264, 265, -1, 267, -1, -1, 270, 271, -1, + 256, -1, 275, 276, 277, 418, 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, 359, 360, 361, 362, + 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, + -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, + -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, + 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, - 277, 418, 279, -1, -1, -1, -1, -1, 285, -1, + 277, -1, 279, -1, 417, 418, 419, 420, 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, 262, -1, -1, -1, 316, + -1, -1, 418, 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, 298, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, - -1, -1, -1, -1, 371, -1, -1, -1, -1, -1, + 367, 368, -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, + 417, 418, 419, 420, -1, -1, 264, 265, -1, 267, + -1, 428, 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, 337, + -1, 322, -1, 341, -1, -1, 344, 345, -1, 330, + 331, -1, -1, 334, -1, -1, 337, -1, -1, -1, + -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, + -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, + 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, + -1, 372, -1, -1, 392, 393, -1, -1, -1, -1, + -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, + -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, + 418, 419, 420, 285, -1, -1, 288, -1, -1, -1, + -1, -1, -1, 295, -1, -1, -1, 418, 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, 359, 360, 361, + 362, 363, -1, -1, -1, 367, -1, -1, -1, 371, + -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, + -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, + 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 256, -1, 417, 418, 419, 420, -1, + -1, 264, 265, -1, 267, -1, 428, 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, 359, 360, 361, 362, + 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, + -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, + -1, 384, -1, 386, 370, -1, -1, -1, -1, 392, + 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 417, 418, 419, 420, 371, 372, 373, 374, -1, -1, - -1, 378, 379, -1, -1, 382, 383, 384, 385, 386, - 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 409, 410, 411, 412, 413, -1, 261, -1, - -1, -1, 265, 420, 267, -1, 423, 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, + 256, -1, -1, -1, 417, 418, 419, 420, 264, 265, + -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, + 276, 277, 418, 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, 359, 360, 361, 362, 363, -1, -1, + -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, + -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, + 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, + -1, 417, 418, 419, 420, 264, 265, -1, 267, -1, + -1, 270, 271, -1, -1, -1, 275, 276, 277, 418, + 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, 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, 298, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 261, -1, 362, - -1, 265, -1, 267, -1, 368, 270, -1, 272, 273, - -1, 275, -1, 277, 377, 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, 418, -1, 321, 322, 323, - -1, -1, -1, -1, -1, -1, 330, 331, -1, 333, - 334, -1, 336, 337, 338, -1, -1, -1, 342, -1, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, + 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, + -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 261, -1, 362, -1, - 265, -1, 267, -1, 368, 270, -1, 272, 273, -1, - 275, -1, 277, 377, 279, -1, 281, 282, 283, 284, + -1, -1, -1, -1, -1, -1, -1, -1, 417, 418, + 419, 420, 371, 372, 373, 374, -1, -1, -1, 378, + 379, -1, -1, 382, 383, 384, 385, 386, 387, 388, + 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, 413, -1, 261, -1, -1, -1, + 265, 420, 267, -1, 423, 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, 418, -1, 321, 322, 323, -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, -1, -1, -1, @@ -11676,355 +11707,355 @@ void case_956() 311, 312, -1, -1, -1, 284, 317, -1, -1, 362, 321, -1, -1, -1, 325, 368, -1, -1, 297, -1, 261, -1, 333, 302, -1, 336, -1, 338, 307, -1, - 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, + 309, 310, 311, 312, -1, -1, 315, -1, 317, -1, -1, -1, 321, 284, -1, -1, 357, -1, -1, -1, - -1, 362, -1, -1, 333, -1, 297, 336, 369, 338, + 261, 362, -1, -1, 333, -1, 297, 336, 369, 338, 371, 302, 373, -1, 305, 418, 307, -1, 309, 310, - 311, 312, -1, -1, -1, 386, 317, -1, -1, -1, - 321, -1, -1, 362, 325, -1, -1, -1, -1, -1, - -1, -1, 333, 264, 265, 336, 267, 338, -1, 270, - 271, -1, -1, -1, 275, 276, 277, 418, 279, -1, - -1, -1, -1, -1, 285, -1, -1, 288, -1, -1, - -1, 362, -1, -1, 295, -1, -1, -1, -1, 300, - -1, 302, 303, 304, -1, 306, -1, -1, -1, 418, - -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, 418, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - 371, 372, -1, 374, -1, -1, 377, 378, 379, 380, - -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, - -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, - 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, - 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, - 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, 359, 360, 361, 362, 363, -1, - -1, -1, -1, -1, -1, -1, 371, -1, -1, 374, - -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, - -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, - -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, - -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, - 279, -1, 417, 418, 419, 420, 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, + 311, 312, -1, 284, -1, 386, 317, -1, -1, -1, + 321, -1, 261, 362, 325, -1, 297, -1, -1, 368, + 369, 302, 333, -1, 305, 336, 307, 338, 309, 310, + 311, 312, -1, -1, -1, 284, 317, 418, -1, -1, + 321, -1, -1, -1, 325, -1, -1, -1, 297, -1, + -1, 362, 333, 302, -1, 336, -1, 338, 307, -1, + 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, + -1, -1, 321, -1, -1, -1, 325, -1, -1, -1, + -1, 362, -1, -1, 333, -1, -1, 336, -1, 338, + 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, + -1, 275, 276, 277, -1, 279, -1, 418, -1, -1, + -1, 285, -1, 362, 288, -1, -1, -1, -1, -1, + -1, 295, -1, -1, -1, -1, 300, -1, 302, 303, + 304, -1, 306, -1, -1, -1, -1, 418, -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, 418, + 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 359, 360, 361, 362, 363, + -1, -1, -1, -1, -1, -1, -1, 371, 372, -1, + 374, -1, -1, 377, 378, 379, 380, -1, -1, -1, + 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, + -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, + -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, + -1, 279, -1, 417, 418, 419, 420, 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, - 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, - -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, - 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, - -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, - -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, - -1, -1, 275, 276, 277, -1, 279, -1, 417, 418, - 419, 420, 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, 359, 360, 361, 362, - 363, -1, -1, -1, -1, -1, -1, -1, 371, -1, - -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, - -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, - 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, - 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, - 277, -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, -1, + -1, -1, -1, 371, -1, -1, 374, -1, -1, 377, + 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, + -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, + -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, + -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, + 418, 419, 420, 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, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, 371, + -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, + -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, + 392, 393, -1, -1, -1, -1, -1, -1, 264, 265, + -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, + 276, 277, -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, - -1, 368, -1, -1, 371, -1, -1, -1, -1, -1, - 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, - -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 417, 418, 419, 420, 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, 359, 360, - 361, 362, 363, -1, -1, -1, 367, -1, -1, -1, - 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, - -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, - -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, - 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, - 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, - 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, - 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + 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, 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, 359, 360, 361, 362, 363, -1, - -1, -1, 367, -1, -1, -1, 371, -1, -1, -1, - -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, - -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, - -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, - -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, - 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, + -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, + -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, + 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 417, 418, 419, 420, 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, 359, + 360, 361, 362, 363, -1, -1, -1, -1, 368, -1, + -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, + 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, + -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, + 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, + -1, 275, 276, 277, -1, 279, -1, 417, 418, 419, + 420, 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, 359, 360, 361, 362, 363, + -1, -1, -1, 367, -1, -1, -1, 371, -1, -1, + -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, + 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, + -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, + -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, + -1, 279, -1, 417, 418, 419, 420, 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, - 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, - -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, - 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, - -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, - -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, - -1, -1, 275, 276, 277, -1, 279, -1, 417, 418, - 419, 420, 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, 359, 360, 361, 362, - 363, -1, -1, -1, -1, -1, -1, -1, 371, -1, - -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, - -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, - 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, - 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, - 277, -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, 367, + -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, + 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, + -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, + -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, + -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, + 418, 419, 420, 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, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, -1, -1, 371, + -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, + -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, + 392, 393, -1, -1, -1, -1, -1, -1, 264, 265, + -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, + 276, 277, -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, - -1, -1, -1, -1, 371, -1, -1, -1, -1, -1, - 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, - -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, - -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, - 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, - 417, 418, 419, 420, 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, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, - -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, - -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, - 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, - 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, - 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, - 295, -1, -1, -1, -1, 300, -1, 302, 303, 304, + 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, 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, 359, 360, 361, 362, 363, -1, - -1, -1, -1, -1, -1, -1, 371, -1, -1, -1, - -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, - -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, - -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, - -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, - 279, -1, 417, 418, 419, 420, 285, -1, -1, 288, - -1, -1, -1, -1, -1, -1, 295, -1, 261, -1, - -1, 300, -1, 302, 303, 304, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 316, -1, 318, - 319, 284, -1, 322, -1, -1, 325, -1, 327, -1, - 329, 330, 331, 332, 297, 334, -1, -1, -1, 302, - -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, - -1, -1, 315, -1, 317, -1, -1, -1, 321, -1, - 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, - 333, -1, 371, 336, -1, 338, -1, -1, 377, 378, - 379, 380, -1, -1, -1, 384, -1, 386, -1, 264, - 265, -1, 267, 392, 393, 270, 271, -1, -1, 362, - 275, 276, 277, -1, 279, 368, 369, -1, -1, -1, - 285, -1, -1, 288, -1, -1, -1, 261, 417, 418, - 295, 420, -1, -1, -1, 300, -1, 302, 303, 304, + -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, + -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, + -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, + 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, + -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, + 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, + -1, 417, 418, 419, 420, 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, 359, + 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, + -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, + 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, + -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, + 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, + -1, 275, 276, 277, -1, 279, -1, 417, 418, 419, + 420, 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, 359, 360, 361, 362, 363, + -1, -1, -1, -1, -1, -1, -1, 371, -1, -1, + -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, + 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, + -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, + -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, + -1, 279, -1, 417, 418, 419, 420, 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, - 284, 316, -1, 318, 319, -1, -1, 322, -1, -1, - 325, -1, 327, 297, 329, 330, 331, 332, 302, 334, - -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, - -1, 315, -1, 317, -1, -1, -1, 321, -1, -1, - -1, -1, -1, -1, 359, 360, 361, 362, 363, 333, - -1, -1, 336, -1, 338, -1, 371, 263, -1, 265, - -1, 267, 377, -1, 270, 380, 272, 273, -1, 275, - -1, 277, -1, 279, -1, 281, 282, 283, 362, -1, - -1, 287, 288, -1, 368, -1, -1, 293, -1, 295, - 296, -1, -1, -1, 300, -1, -1, -1, 304, -1, - -1, -1, 417, 418, -1, 420, -1, -1, -1, 315, - 316, -1, 318, -1, -1, -1, 322, 323, -1, -1, - -1, -1, -1, -1, 330, 331, 264, 265, 334, 267, - -1, 337, 270, 271, -1, -1, 342, 275, 276, 277, - -1, 279, -1, -1, -1, -1, -1, 285, -1, -1, - 288, -1, -1, -1, -1, -1, -1, 295, 364, 365, + -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, + -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, + 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, + -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, + -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, + -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, + 418, 419, 420, 285, -1, -1, 288, -1, -1, -1, + -1, -1, -1, 295, -1, 261, -1, 263, 300, -1, + 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 316, -1, 318, 319, 284, -1, + 322, -1, -1, 325, -1, 327, -1, 329, 330, 331, + 332, 297, 334, -1, -1, -1, 302, -1, -1, -1, + -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, + -1, 317, -1, -1, -1, 321, -1, 359, 360, 361, + 362, 363, -1, -1, -1, -1, -1, 333, -1, 371, + 336, -1, 338, -1, -1, 377, 378, 379, 380, -1, + -1, -1, 384, -1, 386, -1, 264, 265, -1, 267, + 392, 393, 270, 271, -1, -1, 362, 275, 276, 277, + -1, 279, 368, 369, -1, -1, -1, 285, -1, -1, + 288, -1, -1, -1, 261, 417, 418, 295, 420, -1, -1, -1, 300, -1, 302, 303, 304, -1, -1, -1, - -1, 377, -1, -1, -1, -1, -1, -1, 316, -1, + -1, -1, -1, -1, -1, -1, -1, 284, 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, -1, -1, -1, 265, -1, 267, -1, - -1, 270, 418, 272, -1, -1, 275, -1, -1, -1, - 279, 359, 360, 361, 362, -1, -1, -1, -1, 288, - 265, -1, 267, 371, -1, 270, 295, 272, 273, -1, - 275, 300, 277, 302, 279, 304, 281, 282, 283, -1, - -1, -1, 287, 288, -1, -1, -1, 316, 293, 318, - 295, 296, -1, 322, 323, 300, -1, -1, -1, 304, - -1, 330, 331, -1, -1, 334, -1, -1, 337, 417, - 418, 316, -1, 318, -1, -1, -1, 322, 323, -1, - -1, -1, -1, -1, -1, 330, 331, -1, 265, 334, - 267, -1, 337, 270, -1, 272, 273, 342, 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, 377, -1, -1, -1, -1, -1, -1, 316, - -1, 318, -1, -1, -1, 322, 323, -1, -1, 418, - -1, -1, -1, 330, 331, -1, -1, 334, -1, -1, - 337, -1, 265, -1, 267, 342, -1, 270, -1, -1, - 273, -1, 275, 418, 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, 273, -1, 275, -1, 277, -1, 279, -1, - 281, 282, 283, 316, -1, 318, 287, 288, -1, 322, - -1, -1, 293, -1, 295, -1, -1, 330, 331, 300, - -1, 334, -1, 304, 337, -1, -1, -1, 265, 342, - 267, 418, -1, 270, -1, 316, -1, 318, 275, -1, - -1, 322, 279, -1, -1, -1, -1, -1, -1, 330, - 331, 288, -1, 334, -1, -1, 337, -1, 295, -1, - 265, 342, 267, 300, 377, 270, -1, 304, -1, 306, - 275, 308, -1, -1, 279, -1, 313, -1, -1, 316, - -1, 318, -1, 288, -1, 322, -1, -1, 325, -1, - 295, -1, -1, 330, 331, 300, -1, 334, -1, 304, - 337, 306, -1, 308, 265, 418, 267, -1, 313, 270, - -1, 316, -1, 318, 275, -1, -1, 322, 279, -1, - 325, -1, -1, -1, -1, 330, 331, 288, -1, 334, - -1, -1, 337, -1, 295, 372, 265, 418, 267, 300, - -1, 270, -1, 304, -1, 306, 275, 308, -1, -1, - 279, -1, 313, -1, -1, 316, -1, 318, -1, 288, - -1, 322, -1, -1, 325, 370, 295, -1, -1, 330, - 331, 300, -1, 334, -1, 304, 337, 306, -1, -1, - -1, 418, -1, -1, 313, -1, -1, 316, -1, 318, - -1, -1, -1, 322, -1, -1, 325, -1, -1, -1, - -1, 330, 331, -1, -1, 334, -1, 265, 337, 267, - -1, -1, 270, 418, -1, -1, -1, 275, -1, -1, - -1, 279, -1, -1, -1, 283, 265, -1, 267, -1, - 288, 270, -1, -1, -1, 293, 275, 295, -1, -1, - 279, -1, 300, -1, -1, -1, 304, 305, -1, 288, - -1, -1, -1, -1, -1, -1, 295, 418, 316, -1, - 318, 300, -1, -1, 322, 304, -1, -1, -1, -1, - -1, -1, 330, 331, -1, -1, 334, 316, -1, 318, - 265, -1, 267, 322, -1, 270, -1, -1, -1, 418, + 297, 329, 330, 331, 332, 302, 334, -1, -1, -1, + 307, -1, 309, 310, 311, 312, -1, -1, 315, -1, + 317, -1, -1, -1, 321, -1, -1, -1, -1, -1, + -1, 359, 360, 361, 362, 363, 333, -1, -1, 336, + -1, 338, -1, 371, 263, -1, 265, -1, 267, 377, + -1, 270, 380, 272, 273, -1, 275, -1, 277, -1, + 279, -1, 281, 282, 283, 362, -1, -1, 287, 288, + -1, 368, -1, -1, 293, -1, 295, 296, -1, -1, + -1, 300, -1, -1, -1, 304, -1, -1, -1, 417, + 418, -1, 420, -1, -1, -1, 315, 316, -1, 318, + -1, -1, -1, 322, 323, -1, -1, -1, -1, -1, + -1, 330, 331, 264, 265, 334, 267, -1, 337, 270, + 271, -1, -1, 342, 275, 276, 277, -1, 279, -1, + -1, -1, -1, -1, 285, -1, -1, 288, -1, -1, + -1, -1, -1, -1, 295, 364, 365, -1, -1, 300, + -1, 302, 303, 304, -1, -1, -1, -1, 377, -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, + -1, -1, -1, 265, -1, 267, -1, -1, 270, 418, + -1, -1, -1, 275, -1, -1, -1, 279, 359, 360, + 361, 362, -1, -1, -1, -1, 288, 265, -1, 267, + 371, -1, 270, 295, 272, 273, -1, 275, 300, 277, + -1, 279, 304, 281, 282, 283, -1, -1, -1, 287, + 288, -1, -1, -1, 316, 293, 318, 295, 296, -1, + 322, -1, 300, -1, -1, -1, 304, -1, 330, 331, + -1, -1, 334, -1, -1, 337, 417, 418, 316, -1, + 318, -1, -1, -1, 322, 323, -1, -1, -1, -1, + -1, -1, 330, 331, -1, 265, 334, 267, -1, 337, + 270, -1, 272, 273, 342, 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, 377, + -1, -1, -1, -1, -1, -1, 316, -1, 318, -1, + -1, -1, 322, 323, -1, -1, 418, -1, -1, -1, + 330, 331, -1, -1, 334, -1, -1, 337, -1, 265, + -1, 267, 342, -1, 270, -1, -1, 273, -1, 275, + 418, 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, 273, + -1, 275, -1, 277, -1, 279, -1, 281, 282, 283, + 316, -1, 318, 287, 288, -1, 322, -1, -1, 293, + -1, 295, -1, -1, 330, 331, 300, -1, 334, -1, + 304, 337, -1, -1, -1, 265, 342, 267, 418, -1, + 270, -1, 316, -1, 318, 275, -1, -1, 322, 279, + -1, -1, -1, -1, -1, -1, 330, 331, 288, -1, + 334, -1, -1, 337, -1, 295, -1, 265, 342, 267, + 300, 377, 270, -1, 304, -1, 306, 275, 308, -1, + -1, 279, -1, 313, -1, -1, 316, -1, 318, -1, + 288, -1, 322, -1, -1, 325, -1, 295, -1, -1, + 330, 331, 300, -1, 334, -1, 304, 337, 306, -1, + 308, 265, 418, 267, -1, 313, 270, -1, 316, -1, + 318, 275, -1, -1, 322, 279, -1, 325, -1, -1, + -1, -1, 330, 331, 288, -1, 334, -1, -1, 337, + -1, 295, 372, 265, 418, 267, 300, -1, 270, -1, + 304, -1, 306, 275, 308, -1, -1, 279, -1, 313, + -1, -1, 316, -1, 318, -1, 288, -1, 322, -1, + -1, 325, 370, 295, -1, -1, 330, 331, 300, -1, + 334, -1, 304, 337, 306, -1, -1, -1, 418, -1, + -1, 313, -1, -1, 316, -1, 318, -1, -1, -1, + 322, -1, -1, 325, -1, -1, -1, -1, 330, 331, + -1, -1, 334, -1, 265, 337, 267, -1, -1, 270, + 418, -1, -1, -1, 275, -1, -1, -1, 279, -1, + -1, -1, 283, 265, -1, 267, -1, 288, 270, -1, + -1, -1, 293, 275, 295, -1, -1, 279, -1, 300, + -1, -1, -1, 304, 305, -1, 288, -1, -1, -1, + -1, -1, -1, 295, 418, 316, -1, 318, 300, -1, + -1, 322, 304, -1, -1, -1, -1, -1, -1, 330, + 331, -1, -1, 334, 316, -1, 318, 265, -1, 267, + 322, -1, 270, -1, -1, -1, 418, 275, 330, 331, + -1, 279, 334, -1, 265, 337, 267, -1, -1, 270, + 288, -1, -1, -1, 275, -1, -1, 295, 279, -1, + -1, -1, 300, -1, -1, -1, 304, 288, -1, -1, + -1, -1, -1, -1, 295, -1, -1, -1, 316, 300, + 318, -1, -1, 304, 322, -1, -1, -1, -1, -1, + -1, -1, 330, 331, -1, 316, 334, 318, 265, 337, + 267, 322, -1, 270, -1, -1, -1, 418, 275, 330, + 331, -1, 279, 334, -1, -1, 337, -1, -1, -1, + -1, 288, 265, -1, 267, -1, 418, 270, 295, -1, + -1, -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, -1, 334, -1, -1, + 337, -1, 265, 316, 267, 318, -1, 270, -1, 322, + 418, -1, 275, -1, -1, -1, 279, 330, 331, -1, + -1, 334, -1, -1, 337, 288, 265, 418, 267, -1, + -1, 270, 295, -1, -1, -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, + -1, 334, -1, -1, 337, -1, -1, 316, -1, 318, + 265, 418, 267, 322, -1, 270, -1, -1, -1, -1, 275, 330, 331, -1, 279, 334, -1, 265, 337, 267, - -1, -1, 270, 288, -1, -1, -1, 275, -1, -1, + -1, -1, 270, 288, -1, 418, -1, 275, -1, -1, 295, 279, -1, -1, -1, 300, -1, -1, -1, 304, 288, -1, -1, -1, -1, -1, -1, 295, -1, -1, -1, 316, 300, 318, -1, -1, 304, 322, -1, -1, -1, -1, -1, -1, -1, 330, 331, -1, 316, 334, - 318, 265, 337, 267, 322, -1, 270, -1, -1, -1, - 418, 275, 330, 331, -1, 279, 334, -1, -1, 337, - -1, -1, -1, -1, 288, 265, -1, 267, -1, 418, - 270, 295, -1, -1, -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, -1, - 334, -1, -1, 337, -1, 265, 316, 267, 318, -1, - 270, -1, 322, 418, -1, 275, -1, -1, -1, 279, - 330, 331, -1, -1, 334, -1, -1, 337, 288, 265, - 418, 267, -1, -1, 270, 295, -1, -1, -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, -1, 334, -1, -1, 337, -1, -1, - 316, -1, 318, 265, 418, 267, 322, -1, 270, -1, - -1, -1, -1, 275, 330, 331, -1, 279, 334, -1, - 265, 337, 267, -1, -1, 270, 288, -1, 418, -1, - 275, -1, -1, 295, 279, -1, -1, -1, 300, -1, - -1, -1, 304, 288, -1, -1, -1, -1, -1, -1, - 295, -1, -1, -1, 316, 300, 318, -1, -1, 304, - 322, -1, -1, -1, -1, -1, -1, -1, 330, 331, - -1, 316, 334, 318, 265, 337, 267, 322, 418, 270, - -1, -1, -1, -1, 275, 330, 331, -1, 279, 334, - -1, -1, 337, -1, -1, -1, -1, 288, 265, -1, - 267, -1, 418, 270, 295, -1, -1, -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, 261, 334, -1, -1, 337, -1, -1, 316, - -1, 318, -1, 272, -1, 322, 418, -1, 277, -1, - -1, -1, 281, 330, 331, 284, -1, 334, -1, -1, - 337, -1, -1, 418, -1, -1, -1, 296, 297, -1, - -1, -1, 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, 335, 336, -1, 338, - 296, 297, -1, 342, -1, 301, 302, 418, -1, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - -1, 317, -1, 362, -1, 321, -1, 323, -1, 368, - 369, 418, -1, 261, -1, 263, -1, 333, -1, -1, - 336, -1, 338, -1, -1, -1, 342, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 284, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 362, -1, -1, 297, - -1, -1, 368, 369, 302, -1, 261, -1, -1, 307, - -1, 309, 310, 311, 312, -1, -1, 272, -1, 317, - -1, -1, 277, 321, -1, -1, 281, -1, -1, 284, - -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, - 338, 296, 297, -1, -1, -1, 301, 302, -1, 261, - -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, - 272, -1, 317, -1, 362, 277, 321, -1, 323, 281, - 368, 369, 284, -1, -1, -1, -1, -1, 333, -1, - -1, 336, -1, 338, 296, 297, -1, 342, -1, 301, - 302, 261, -1, -1, -1, 307, -1, 309, 310, 311, - 312, -1, -1, -1, -1, 317, -1, 362, -1, 321, - -1, 323, -1, 368, 284, -1, -1, -1, -1, -1, - -1, 333, -1, -1, 336, -1, 338, 297, -1, 261, - 342, -1, 302, -1, -1, -1, -1, 307, -1, 309, + 318, 265, 337, 267, 322, 418, 270, -1, -1, -1, + -1, 275, 330, 331, -1, 279, 334, -1, -1, 337, + -1, -1, -1, -1, 288, -1, -1, -1, -1, 418, + -1, 295, -1, -1, -1, -1, 300, -1, -1, 261, + 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 272, -1, 316, -1, 318, 277, -1, -1, 322, 281, + -1, -1, 284, -1, -1, -1, 330, 331, -1, -1, + 334, -1, -1, 337, 296, 297, -1, -1, -1, 301, + 302, -1, -1, 418, -1, 307, -1, 309, 310, 311, + 312, -1, -1, -1, -1, 317, -1, -1, -1, 321, + 418, 323, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 333, -1, 335, 336, 261, 338, -1, -1, -1, + 342, -1, -1, -1, -1, -1, 272, -1, -1, -1, + -1, 277, -1, -1, -1, 281, -1, -1, 284, -1, + 362, -1, -1, -1, -1, -1, 368, 369, -1, -1, + 296, 297, -1, -1, 418, 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, 272, -1, 317, -1, 362, 277, 321, -1, + 323, 281, 368, 369, 284, -1, -1, -1, -1, -1, + 333, -1, -1, 336, -1, 338, 296, 297, -1, 342, + -1, 301, 302, 261, -1, -1, -1, 307, -1, 309, + 310, 311, 312, -1, -1, -1, -1, 317, -1, 362, + -1, 321, -1, 323, -1, 368, 284, -1, -1, -1, + -1, -1, -1, 333, -1, -1, 336, -1, 338, 297, + -1, 261, 342, -1, 302, -1, -1, -1, -1, 307, + -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, + -1, -1, 362, 321, 284, -1, -1, -1, 368, -1, + -1, -1, -1, -1, -1, 333, -1, 297, 336, 261, + 338, 263, 302, -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, - 362, 321, 284, -1, -1, -1, 368, -1, -1, -1, - -1, -1, -1, 333, -1, 297, 336, 261, 338, 263, + -1, 321, 284, -1, 362, -1, 364, 365, -1, -1, + 368, -1, -1, 333, -1, 297, 336, 261, 338, -1, 302, -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, -1, 321, - 284, -1, 362, -1, 364, 365, -1, -1, 368, -1, - -1, 333, -1, 297, 336, 261, 338, -1, 302, -1, + 284, -1, 362, -1, 364, 365, -1, 261, 368, 263, + -1, 333, -1, 297, 336, -1, 338, -1, 302, -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, - -1, -1, -1, 317, -1, -1, -1, 321, 284, -1, - 362, -1, 364, 365, -1, 261, 368, -1, -1, 333, - -1, 297, 336, -1, 338, -1, 302, -1, -1, -1, - -1, 307, -1, 309, 310, 311, 312, -1, 284, -1, - -1, 317, -1, -1, -1, 321, -1, -1, 362, -1, - -1, 297, -1, -1, 368, 301, 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, -1, -1, -1, 362, 333, 364, 365, - 336, -1, 338, -1, 297, -1, -1, -1, -1, 302, - -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, - -1, -1, -1, -1, 317, -1, 362, -1, 321, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 333, -1, -1, 336, -1, 338, -1, -1, -1, -1, + 284, -1, -1, 317, -1, -1, -1, 321, -1, -1, + 362, -1, -1, 297, -1, -1, 368, 261, 302, 333, + -1, -1, 336, 307, 338, 309, 310, 311, 312, -1, + -1, 315, -1, 317, -1, -1, -1, 321, -1, -1, + 284, -1, -1, -1, -1, -1, -1, -1, 362, 333, + 364, 365, 336, 297, 338, -1, -1, -1, 302, -1, + -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, + -1, -1, -1, 317, -1, -1, -1, 321, 362, -1, + -1, -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, 362, + -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6311 "cs-parser.jay" +#line 6312 "cs-parser.jay" // // A class used to hold info about an operator declarator @@ -12083,6 +12114,11 @@ void Error_NamedArgumentExpected (NamedArgument a) report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); } +void Error_MissingInitializer (Location loc) +{ + report.Error (210, loc, "You must provide an initializer in a fixed or using statement declaration"); +} + void push_current_class (TypeContainer tc, object partial_token) { if (module.Evaluator != null && current_container is ModuleContainer){ @@ -12338,6 +12374,7 @@ void start_anonymous (bool isLambda, ParametersCompiled parameters, bool isAsync oob_stack.Push (current_anonymous_method); oob_stack.Push (current_local_parameters); oob_stack.Push (current_variable); + oob_stack.Push (lexer.async_block); current_local_parameters = parameters; if (isLambda) { @@ -12352,6 +12389,7 @@ void start_anonymous (bool isLambda, ParametersCompiled parameters, bool isAsync current_anonymous_method = new AnonymousMethodExpression (isAsync, loc); } + lexer.async_block = isAsync; // Force the next block to be created as a ToplevelBlock parsing_anonymous_method = true; } @@ -12367,6 +12405,7 @@ AnonymousMethodExpression end_anonymous (ParametersBlock anon_block) current_anonymous_method.Block = anon_block; retval = current_anonymous_method; + lexer.async_block = (bool) oob_stack.Pop (); current_variable = (BlockVariableDeclaration) oob_stack.Pop (); current_local_parameters = (ParametersCompiled) oob_stack.Pop (); current_anonymous_method = (AnonymousMethodExpression) oob_stack.Pop (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 1357783e1f..6916cf2ab8 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -2,14 +2,15 @@ // // cs-parser.jay: The Parser for the C# compiler // -// Authors: Miguel de Icaza (miguel@gnu.org) +// Authors: Miguel de Icaza (miguel@gnome.org) // Ravi Pratap (ravi@ximian.com) -// Marek Safar (marek.safar@gmail.com) +// Marek Safar (marek.safar@gmail.com) // // Dual Licensed under the terms of the GNU GPL and the MIT X11 license // // (C) 2001 Ximian, Inc (http://www.ximian.com) -// (C) 2004 Novell, Inc +// (C) 2004-2011 Novell, Inc +// Copyright 2011 Xamarin Inc. // // TODO: // (1) Figure out why error productions dont work. `type-declaration' is a @@ -898,8 +899,13 @@ opt_class_member_declarations class_member_declarations : class_member_declaration - | class_member_declarations - class_member_declaration + { + lexer.parsing_modifiers = true; + } + | class_member_declarations class_member_declaration + { + lexer.parsing_modifiers = true; + } ; class_member_declaration @@ -946,10 +952,17 @@ struct_declaration if (doc_support) current_container.DocComment = Lexer.consume_doc_comment (); + + lexer.parsing_modifiers = true; } - struct_body + OPEN_BRACE { - --lexer.parsing_declaration; + if (doc_support) + Lexer.doc_state = XmlCommentState.Allowed; + } + opt_class_member_declarations CLOSE_BRACE + { + --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } @@ -964,46 +977,6 @@ struct_declaration Error_SyntaxError (yyToken); } ; - -struct_body - : OPEN_BRACE - { - if (doc_support) - Lexer.doc_state = XmlCommentState.Allowed; - } - opt_struct_member_declarations CLOSE_BRACE - { - lbag.AppendToMember (current_class, GetLocation ($1), GetLocation ($4)); - } - ; - -opt_struct_member_declarations - : /* empty */ - | struct_member_declarations - ; - -struct_member_declarations - : struct_member_declaration - | struct_member_declarations struct_member_declaration - ; - -struct_member_declaration - : constant_declaration - | field_declaration - | method_declaration - | property_declaration - | event_declaration - | indexer_declaration - | operator_declaration - | constructor_declaration - | type_declaration - - /* - * This is only included so we can flag error 575: - * destructors only allowed on class types - */ - | destructor_declaration - ; constant_declaration : opt_attributes @@ -1259,13 +1232,16 @@ method_declaration if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; - // Add it early in the case of body being eof for full aot - current_container.AddMethod ((Method) $1); + // Add it early in the case of body being eof for full ast + Method m = (Method) $1; + lexer.async_block = (m.ModFlags & Modifiers.ASYNC) != 0; + current_container.AddMethod (m); } method_body { Method method = (Method) $1; method.Block = (ToplevelBlock) $3; + lexer.async_block = false; if (method.Block == null) { lbag.AppendToMember (method, savedLocation); // semicolon @@ -1967,6 +1943,8 @@ interface_declaration current_container.DocComment = Lexer.consume_doc_comment (); Lexer.doc_state = XmlCommentState.Allowed; } + + lexer.parsing_modifiers = true; } OPEN_BRACE opt_interface_member_declarations CLOSE_BRACE { @@ -1994,7 +1972,13 @@ opt_interface_member_declarations interface_member_declarations : interface_member_declaration + { + lexer.parsing_modifiers = true; + } | interface_member_declarations interface_member_declaration + { + lexer.parsing_modifiers = true; + } ; interface_member_declaration @@ -3887,10 +3871,10 @@ cast_expression await_expression : AWAIT unary_expression - { + { current_block.ParametersBlock.IsAsync = true; $$ = new Await ((Expression) $2, GetLocation ($1)); - } + } ; // @@ -4352,6 +4336,8 @@ class_declaration current_container.DocComment = Lexer.consume_doc_comment (); Lexer.doc_state = XmlCommentState.Allowed; } + + lexer.parsing_modifiers = true; } OPEN_BRACE opt_class_member_declarations CLOSE_BRACE { @@ -4380,8 +4366,12 @@ opt_modifiers { mod_locations = null; $$ = ModifierNone; + lexer.parsing_modifiers = false; } | modifiers + { + lexer.parsing_modifiers = false; + } ; modifiers @@ -4951,6 +4941,17 @@ opt_variable_declarators | variable_declarators ; +opt_using_or_fixed_variable_declarators + : /* empty */ + | variable_declarators + { + foreach (var d in current_variable.Declarators) { + if (d.Initializer == null) + Error_MissingInitializer (d.Variable.Location); + } + } + ; + variable_declarators : variable_declarator | variable_declarators variable_declarator @@ -5561,7 +5562,7 @@ fixed_statement current_block.AddLocalName (li); current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) $3, li); } - using_or_fixed_variable_initializer opt_variable_declarators CLOSE_PARENS + using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS { $$ = current_variable; current_variable = null; @@ -5589,7 +5590,7 @@ using_statement current_block.AddLocalName (li); current_variable = new Using.VariableDeclaration ((FullNamedExpression) $3, li); } - using_or_fixed_variable_initializer opt_variable_declarators CLOSE_PARENS + using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS { $$ = current_variable; current_variable = null; @@ -5618,7 +5619,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"); + Error_MissingInitializer (lexer.Location); } | ASSIGN variable_initializer { @@ -6366,6 +6367,11 @@ void Error_NamedArgumentExpected (NamedArgument a) report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); } +void Error_MissingInitializer (Location loc) +{ + report.Error (210, loc, "You must provide an initializer in a fixed or using statement declaration"); +} + void push_current_class (TypeContainer tc, object partial_token) { if (module.Evaluator != null && current_container is ModuleContainer){ @@ -6621,6 +6627,7 @@ void start_anonymous (bool isLambda, ParametersCompiled parameters, bool isAsync oob_stack.Push (current_anonymous_method); oob_stack.Push (current_local_parameters); oob_stack.Push (current_variable); + oob_stack.Push (lexer.async_block); current_local_parameters = parameters; if (isLambda) { @@ -6635,6 +6642,7 @@ void start_anonymous (bool isLambda, ParametersCompiled parameters, bool isAsync current_anonymous_method = new AnonymousMethodExpression (isAsync, loc); } + lexer.async_block = isAsync; // Force the next block to be created as a ToplevelBlock parsing_anonymous_method = true; } @@ -6650,6 +6658,7 @@ AnonymousMethodExpression end_anonymous (ParametersBlock anon_block) current_anonymous_method.Block = anon_block; retval = current_anonymous_method; + lexer.async_block = (bool) oob_stack.Pop (); current_variable = (BlockVariableDeclaration) oob_stack.Pop (); current_local_parameters = (ParametersCompiled) oob_stack.Pop (); current_anonymous_method = (AnonymousMethodExpression) oob_stack.Pop (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs index 6054c44625..8862e71ae1 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs @@ -3,13 +3,13 @@ // This also implements the preprocessor // // Author: Miguel de Icaza (miguel@gnu.org) -// Marek Safar (marek.safar@seznam.cz) +// Marek Safar (marek.safar@gmail.com) // // Dual licensed under the terms of the MIT X11 or GNU GPL // // Copyright 2001, 2002 Ximian, Inc (http://www.ximian.com) // Copyright 2004-2008 Novell, Inc -// +// Copyright 2011 Xamarin, Inc (http://www.xamarin.com) // using System; using System.Text; @@ -205,6 +205,10 @@ namespace Mono.CSharp public int parsing_declaration; public bool parsing_attribute_section; + public bool parsing_modifiers; + + public bool async_block; + // // The special characters to inject on streams to run the unit parser // in the special expression mode. Using private characters from @@ -787,18 +791,47 @@ namespace Mono.CSharp res = -1; break; - // TODO: async, it's modifiers context only case Token.ASYNC: - if (context.Settings.Version != LanguageVersion.Future) { + if (parsing_modifiers) { + // + // Skip attributes section or constructor called async + // + if (parsing_attribute_section || peek_token () == Token.OPEN_PARENS) { + res = -1; + } else { + // async is keyword + } + } else if (parsing_block > 0) { + switch (peek_token ()) { + case Token.DELEGATE: + case Token.OPEN_PARENS_LAMBDA: + // async is keyword + break; + case Token.IDENTIFIER: + PushPosition (); + xtoken (); + if (xtoken () != Token.ARROW) + res = -1; + + PopPosition (); + break; + default: + res = -1; + break; + } + } else { res = -1; } + + if (res == Token.ASYNC && context.Settings.Version <= LanguageVersion.V_4) { + Report.FeatureIsNotAvailable (context, Location, "asynchronous functions"); + } + break; - // TODO: async, it's async block context only case Token.AWAIT: - if (context.Settings.Version != LanguageVersion.Future) { + if (!async_block) res = -1; - } break; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs index ada7fc38c2..e161907b44 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs @@ -697,9 +697,9 @@ namespace Mono.CSharp { return true; } - public virtual IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) + public virtual ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) { - return Parent.LookupExtensionMethod (extensionType, name, arity, ref scope); + return Parent.LookupExtensionMethod (extensionType, name, arity); } public virtual FullNamedExpression LookupNamespaceAlias (string name) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs index 8752aebc19..cc381846ff 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/delegate.cs @@ -434,6 +434,11 @@ namespace Mono.CSharp { protected MethodSpec constructor_method; protected MethodGroupExpr method_group; + public override bool ContainsEmitWithAwait () + { + return false; + } + public static Arguments CreateDelegateMethodArguments (AParametersCollection pd, TypeSpec[] types, Location loc) { Arguments delegate_arguments = new Arguments (pd.Count); @@ -541,7 +546,7 @@ namespace Mono.CSharp { public override void Emit (EmitContext ec) { if (method_group.InstanceExpression == null) - ec.Emit (OpCodes.Ldnull); + ec.EmitNull (); else method_group.InstanceExpression.Emit (ec); @@ -717,6 +722,11 @@ namespace Mono.CSharp { this.arguments = args; this.loc = loc; } + + public override bool ContainsEmitWithAwait () + { + return InstanceExpr.ContainsEmitWithAwait () || (arguments != null && arguments.ContainsEmitWithAwait ()); + } public override Expression CreateExpressionTree (ResolveContext ec) { @@ -753,7 +763,9 @@ namespace Mono.CSharp { // Invocation on delegates call the virtual Invoke member // so we are always `instance' calls // - Invocation.EmitCall (ec, InstanceExpr, method, arguments, loc); + var call = new CallEmitter (); + call.InstanceExpression = InstanceExpr; + call.EmitPredefined (ec, method, arguments); } public override void EmitStatement (EmitContext ec) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs index c7df9f7c85..76447fad0c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/dynamic.cs @@ -6,6 +6,7 @@ // Dual licensed under the terms of the MIT X11 or GNU GPL // // Copyright 2009 Novell, Inc +// Copyright 2011 Xamarin Inc. // using System; @@ -95,9 +96,14 @@ namespace Mono.CSharp throw new NotImplementedException (); } + public override bool ContainsEmitWithAwait () + { + throw new NotSupportedException (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { - throw new NotImplementedException (); + throw new NotSupportedException (); } protected override Expression DoResolve (ResolveContext ec) @@ -122,7 +128,7 @@ namespace Mono.CSharp throw new NotImplementedException (); } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { throw new NotImplementedException (); } @@ -262,6 +268,11 @@ namespace Mono.CSharp } } + public override bool ContainsEmitWithAwait () + { + return arguments.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { ec.Report.Error (1963, loc, "An expression tree cannot contain a dynamic operation"); @@ -714,7 +725,7 @@ namespace Mono.CSharp class DynamicInvocation : DynamicExpressionStatement, IDynamicBinder { - ATypeNameExpression member; + readonly ATypeNameExpression member; public DynamicInvocation (ATypeNameExpression member, Arguments args, Location loc) : base (null, args, loc) @@ -897,7 +908,7 @@ namespace Mono.CSharp throw new NotImplementedException (); } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { EmitCall (ec, setter, setter_args, !leave_copy); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs index 3be2ce0cda..8ea57ed36d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs @@ -7,6 +7,7 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc. // Copyright 2003-2008 Novell, Inc. +// Copyright 2011 Xamarin Inc. // // @@ -130,16 +131,14 @@ namespace Mono.CSharp { set { type = value; } } - public Location Location { - get { return loc; } + public virtual bool IsSideEffectFree { + get { + return false; + } } - public virtual string GetSignatureForError () - { - if (type == null) - return ""; - TypeSpec typeSpec = type.GetDefinition (); - return typeSpec != null ? typeSpec.GetSignatureForError () : ""; + public Location Location { + get { return loc; } } public virtual bool IsNull { @@ -148,6 +147,15 @@ namespace Mono.CSharp { } } + // + // Returns true when the expression during Emit phase breaks stack + // by using await expression + // + public virtual bool ContainsEmitWithAwait () + { + return false; + } + /// /// Performs semantic analysis on the Expression /// @@ -343,6 +351,11 @@ namespace Mono.CSharp { } } } + + public virtual string GetSignatureForError () + { + return type.GetDefinition ().GetSignatureForError (); + } /// /// Resolves an expression and performs semantic analysis on it. @@ -469,6 +482,107 @@ namespace Mono.CSharp { ec.Emit (OpCodes.Pop); } + // + // Emits the expression into temporary field variable. The method + // should be used for await expressions only + // + public virtual Expression EmitToField (EmitContext ec) + { + // + // This is the await prepare Emit method. When emitting code like + // a + b we emit code like + // + // a.Emit () + // b.Emit () + // Opcodes.Add + // + // For await a + await b we have to interfere the flow to keep the + // stack clean because await yields from the expression. The emit + // then changes to + // + // a = a.EmitToField () // a is changed to temporary field access + // b = b.EmitToField () + // a.Emit () + // b.Emit () + // Opcodes.Add + // + // + // The idea is to emit expression and leave the stack empty with + // result value still available. + // + // Expressions should override this default implementation when + // optimized version can be provided (e.g. FieldExpr) + // + // + // We can optimize for side-effect free expressions, they can be + // emitted out of order + // + if (IsSideEffectFree) + return this; + + bool needs_temporary = ContainsEmitWithAwait (); + if (!needs_temporary) + ec.EmitThis (); + + // Emit original code + EmitToFieldSource (ec); + + // + // Store the result to temporary field when we + // cannot load this directly + // + var field = ec.GetTemporaryField (type); + if (needs_temporary) { + // + // Create temporary local (we cannot load this before Emit) + // + var temp = ec.GetTemporaryLocal (type); + ec.Emit (OpCodes.Stloc, temp); + + ec.EmitThis (); + ec.Emit (OpCodes.Ldloc, temp); + field.EmitAssignFromStack (ec); + + ec.FreeTemporaryLocal (temp, type); + } else { + field.EmitAssignFromStack (ec); + } + + return field; + } + + protected virtual void EmitToFieldSource (EmitContext ec) + { + // + // Default implementation calls Emit method + // + Emit (ec); + } + + protected static void EmitExpressionsList (EmitContext ec, List expressions) + { + if (ec.HasSet (BuilderContext.Options.AsyncBody)) { + bool contains_await = false; + + for (int i = 1; i < expressions.Count; ++i) { + if (expressions[i].ContainsEmitWithAwait ()) { + contains_await = true; + break; + } + } + + if (contains_await) { + for (int i = 0; i < expressions.Count; ++i) { + expressions[i] = expressions[i].EmitToField (ec); + } + } + } + + for (int i = 0; i < expressions.Count; ++i) { + expressions[i].Emit (ec); + } + } + /// /// Protected constructor. Only derivate types should /// be able to be created @@ -498,7 +612,7 @@ namespace Mono.CSharp { return null; } - protected static MethodSpec ConstructorLookup (ResolveContext rc, TypeSpec type, ref Arguments args, Location loc) + public static MethodSpec ConstructorLookup (ResolveContext rc, TypeSpec type, ref Arguments args, Location loc) { var ctors = MemberCache.FindMembers (type, Constructor.ConstructorName, true); if (ctors == null) { @@ -961,6 +1075,11 @@ namespace Mono.CSharp { } } + public override bool ContainsEmitWithAwait () + { + return child.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (2); @@ -1140,6 +1259,12 @@ namespace Mono.CSharp { get { return child.IsOneInteger; } } + public override bool IsSideEffectFree { + get { + return child.IsSideEffectFree; + } + } + public override bool IsZeroInteger { get { return child.IsZeroInteger; } } @@ -1277,6 +1402,12 @@ namespace Mono.CSharp { } } + public override bool IsSideEffectFree { + get { + return Child.IsSideEffectFree; + } + } + public override bool IsZeroInteger { get { return Child.IsZeroInteger; } } @@ -1748,6 +1879,11 @@ namespace Mono.CSharp { this.loc = orig.Location; } + public override bool ContainsEmitWithAwait () + { + return stm.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { return orig_expr.CreateExpressionTree (ec); @@ -1790,6 +1926,11 @@ namespace Mono.CSharp { #endregion + public override bool ContainsEmitWithAwait () + { + return expr.ContainsEmitWithAwait (); + } + // // Creates fully resolved expression switcher // @@ -1873,6 +2014,11 @@ namespace Mono.CSharp { this.loc = expr.Location; } + public override bool ContainsEmitWithAwait () + { + return expr.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext rc) { return expr.CreateExpressionTree (rc); @@ -1930,6 +2076,11 @@ namespace Mono.CSharp { target.expr = expr.Clone (clonectx); } + public override bool ContainsEmitWithAwait () + { + return expr.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -2090,7 +2241,6 @@ namespace Mono.CSharp { } } - // MSAF var retval = ctx.LookupNamespaceOrType (Name, Arity, LookupMode.IgnoreAccessibility, loc); if (retval != null) { ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (retval.Type); @@ -2379,6 +2529,11 @@ namespace Mono.CSharp { // resolved to different type } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -2626,6 +2781,11 @@ namespace Mono.CSharp { } } + public override bool ContainsEmitWithAwait () + { + return InstanceExpression != null && InstanceExpression.ContainsEmitWithAwait (); + } + static bool IsSameOrBaseQualifier (TypeSpec type, TypeSpec qtype) { do { @@ -2814,6 +2974,7 @@ namespace Mono.CSharp { InstanceExpression.Emit (ec); t.Store (ec); t.AddressOf (ec, AddressOp.Store); + t.Release (ec); } } else { InstanceExpression.Emit (ec); @@ -2830,18 +2991,57 @@ namespace Mono.CSharp { public abstract void SetTypeArguments (ResolveContext ec, TypeArguments ta); } + public class ExtensionMethodCandidates + { + NamespaceContainer container; + Namespace ns; + IList methods; + + public ExtensionMethodCandidates (IList methods, NamespaceContainer nsContainer) + : this (methods, nsContainer, null) + { + } + + public ExtensionMethodCandidates (IList methods, NamespaceContainer nsContainer, Namespace ns) + { + this.methods = methods; + this.container = nsContainer; + this.ns = ns; + } + + public NamespaceContainer Container { + get { + return container; + } + } + + public bool HasUninspectedMembers { get; set; } + + public Namespace Namespace { + get { + return ns; + } + } + + public IList Methods { + get { + return methods; + } + } + } + // // Represents a group of extension method candidates for whole namespace // class ExtensionMethodGroupExpr : MethodGroupExpr, OverloadResolver.IErrorHandler { - NamespaceContainer namespace_entry; + ExtensionMethodCandidates candidates; public readonly Expression ExtensionExpression; - public ExtensionMethodGroupExpr (IList list, NamespaceContainer n, Expression extensionExpr, Location l) - : base (list.Cast().ToList (), extensionExpr.Type, l) + public ExtensionMethodGroupExpr (ExtensionMethodCandidates candidates, Expression extensionExpr, Location loc) + : base (candidates.Methods.Cast().ToList (), extensionExpr.Type, loc) { - this.namespace_entry = n; + this.candidates = candidates; this.ExtensionExpression = extensionExpr; } @@ -2849,21 +3049,55 @@ namespace Mono.CSharp { get { return true; } } + // + // For extension methodgroup we are not looking for base members but parent + // namespace extension methods + // public override IList GetBaseMembers (TypeSpec baseType) { - if (namespace_entry == null) + // TODO: candidates are null only when doing error reporting, that's + // incorrect. We have to discover same extension methods in error mode + if (candidates == null) return null; + int arity = type_arguments == null ? 0 : type_arguments.Count; + // - // For extension methodgroup we are not looking for base members but parent - // namespace extension methods + // Here we try to resume the search for extension method at the point + // where the last bunch of candidates was found. It's more tricky than + // it seems as we have to check both namespace containers and namespace + // in correct order. // - int arity = type_arguments == null ? 0 : type_arguments.Count; - var found = namespace_entry.LookupExtensionMethod (DeclaringType, Name, arity, ref namespace_entry); - if (found == null) + // Consider: + // + // namespace A { + // using N1; + // namespace B.C.D { + // ().ToList (); + } + } + + var ns_container = candidates.HasUninspectedMembers ? candidates.Container : candidates.Container.Parent; + if (ns_container == null) return null; - return found.Cast ().ToList (); + candidates = ns_container.LookupExtensionMethod (ExtensionExpression.Type, Name, arity); + if (candidates == null) + return null; + + return candidates.Methods.Cast ().ToList (); } public override MethodGroupExpr LookupExtensionMethod (ResolveContext rc) @@ -3072,7 +3306,9 @@ namespace Mono.CSharp { public void EmitCall (EmitContext ec, Arguments arguments) { - Invocation.EmitCall (ec, InstanceExpression, best_candidate, arguments, loc); + var call = new CallEmitter (); + call.InstanceExpression = InstanceExpression; + call.Emit (ec, best_candidate, arguments, loc); } public override void Error_ValueCannotBeConverted (ResolveContext ec, Location loc, TypeSpec target, bool expl) @@ -3197,12 +3433,11 @@ namespace Mono.CSharp { return null; int arity = type_arguments == null ? 0 : type_arguments.Count; - NamespaceContainer methods_scope = null; - var methods = rc.LookupExtensionMethod (InstanceExpression.Type, Methods[0].Name, arity, ref methods_scope); + var methods = rc.LookupExtensionMethod (InstanceExpression.Type, Methods[0].Name, arity); if (methods == null) return null; - var emg = new ExtensionMethodGroupExpr (methods, methods_scope, InstanceExpression, loc); + var emg = new ExtensionMethodGroupExpr (methods, InstanceExpression, loc); emg.SetTypeArguments (rc, type_arguments); return emg; } @@ -3969,9 +4204,11 @@ namespace Mono.CSharp { // // Indentity, implicit reference or boxing conversion must exist for the extension parameter // + // LAMESPEC: or implicit type parameter conversion + // var at = a.Type; if (at == pt || TypeSpecComparer.IsEqual (at, pt) || - Convert.ImplicitReferenceConversionExists (at, pt) || + Convert.ImplicitReferenceConversionExists (at, pt, false) || Convert.ImplicitBoxingConversion (null, at, pt) != null) { score = 0; continue; @@ -4756,10 +4993,11 @@ namespace Mono.CSharp { } } - /// - /// Fully resolved expression that evaluates to a Field - /// - public class FieldExpr : MemberExpr, IDynamicAssign, IMemoryLocation, IVariableReference { + // + // Fully resolved expression that references a Field + // + public class FieldExpr : MemberExpr, IDynamicAssign, IMemoryLocation, IVariableReference + { protected FieldSpec spec; VariableInfo variable_info; @@ -4929,7 +5167,7 @@ namespace Mono.CSharp { } else if (var != null && var.IsHoisted) { AnonymousMethodExpression.Error_AddressOfCapturedVar (ec, var, loc); } - + return new FixedBufferPtr (this, fb.ElementType, loc).Resolve (ec); } @@ -5108,23 +5346,27 @@ namespace Mono.CSharp { } } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { - var await_expr = source as Await; - if (await_expr != null) { - // - // Await is not ordinary expression (it contains jump), hence the usual flow cannot be used - // to emit instance load before expression - // - await_expr.EmitAssign (ec, this); - } else { - prepared = prepare_for_load && !(source is DynamicExpressionStatement); - if (IsInstance) - EmitInstance (ec, prepared); + bool has_await_source = ec.HasSet (BuilderContext.Options.AsyncBody) && source.ContainsEmitWithAwait (); + if (isCompound && !(source is DynamicExpressionStatement)) { + if (has_await_source) { + if (IsInstance) + InstanceExpression = InstanceExpression.EmitToField (ec); + } else { + prepared = true; + } + } - source.Emit (ec); + if (IsInstance) { + if (has_await_source) + source = source.EmitToField (ec); + + EmitInstance (ec, prepared); } + source.Emit (ec); + if (leave_copy) { ec.Emit (OpCodes.Dup); if (!IsStatic) { @@ -5150,6 +5392,18 @@ namespace Mono.CSharp { } } + // + // Emits store to field with prepared values on stack + // + public void EmitAssignFromStack (EmitContext ec) + { + if (IsStatic) { + ec.Emit (OpCodes.Stsfld, spec); + } else { + ec.Emit (OpCodes.Stfld, spec); + } + } + public override void Emit (EmitContext ec) { Emit (ec, false); @@ -5187,12 +5441,12 @@ namespace Mono.CSharp { } else need_copy = false; - if (need_copy){ - LocalBuilder local; + if (need_copy) { Emit (ec); - local = ec.DeclareLocal (type, false); - ec.Emit (OpCodes.Stloc, local); - ec.Emit (OpCodes.Ldloca, local); + var temp = ec.GetTemporaryLocal (type); + ec.Emit (OpCodes.Stloc, temp); + ec.Emit (OpCodes.Ldloca, temp); + ec.FreeTemporaryLocal (temp, type); return; } @@ -5229,14 +5483,13 @@ namespace Mono.CSharp { } - /// - /// Expression that evaluates to a Property. The Assign class - /// might set the `Value' expression if we are in an assignment. - /// - /// This is not an LValue because we need to re-write the expression, we - /// can not take data from the stack and store it. - /// - class PropertyExpr : PropertyOrIndexerExpr + // + // Expression that evaluates to a Property. + // + // This is not an LValue because we need to re-write the expression. We + // can not take data from the stack and store it. + // + sealed class PropertyExpr : PropertyOrIndexerExpr { public PropertyExpr (PropertySpec spec, Location l) : base (l) @@ -5247,6 +5500,14 @@ namespace Mono.CSharp { #region Properties + protected override Arguments Arguments { + get { + return null; + } + set { + } + } + protected override TypeSpec DeclaringType { get { return best_candidate.DeclaringType; @@ -5279,6 +5540,14 @@ namespace Mono.CSharp { #endregion + public static PropertyExpr CreatePredefined (PropertySpec spec, Location loc) + { + return new PropertyExpr (spec, loc) { + Getter = spec.Get, + Setter = spec.Set + }; + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args; @@ -5347,36 +5616,41 @@ namespace Mono.CSharp { // Special case: length of single dimension array property is turned into ldlen // if (IsSingleDimensionalArrayLength ()) { - if (!prepared) - EmitInstance (ec, false); + EmitInstance (ec, false); ec.Emit (OpCodes.Ldlen); ec.Emit (OpCodes.Conv_I4); return; } - Invocation.EmitCall (ec, InstanceExpression, Getter, null, loc, prepared, false); - - if (leave_copy) { - ec.Emit (OpCodes.Dup); - if (!IsStatic) { - temp = new LocalTemporary (this.Type); - temp.Store (ec); - } - } + base.Emit (ec, leave_copy); } - public override void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public override void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { Arguments args; + LocalTemporary await_source_arg = null; - if (prepare_for_load && !(source is DynamicExpressionStatement)) { - args = new Arguments (0); - prepared = true; + if (isCompound && !(source is DynamicExpressionStatement)) { + emitting_compound_assignment = true; source.Emit (ec); - - if (leave_copy) { - ec.Emit (OpCodes.Dup); - if (!IsStatic) { + + if (has_await_arguments) { + await_source_arg = new LocalTemporary (Type); + await_source_arg.Store (ec); + + args = new Arguments (1); + args.Add (new Argument (await_source_arg)); + + if (leave_copy) { + temp = await_source_arg; + } + + has_await_arguments = false; + } else { + args = null; + + if (leave_copy) { + ec.Emit (OpCodes.Dup); temp = new LocalTemporary (this.Type); temp.Store (ec); } @@ -5394,12 +5668,23 @@ namespace Mono.CSharp { } } - Invocation.EmitCall (ec, InstanceExpression, Setter, args, loc, false, prepared); - + emitting_compound_assignment = false; + + var call = new CallEmitter (); + call.InstanceExpression = InstanceExpression; + if (args == null) + call.InstanceExpressionOnStack = true; + + call.Emit (ec, Setter, args, loc); + if (temp != null) { temp.Emit (ec); temp.Release (ec); } + + if (await_source_arg != null) { + await_source_arg.Release (ec); + } } protected override Expression OverloadResolve (ResolveContext rc, Expression right_side) @@ -5437,7 +5722,8 @@ namespace Mono.CSharp { protected T best_candidate; protected LocalTemporary temp; - protected bool prepared; + protected bool emitting_compound_assignment; + protected bool has_await_arguments; protected PropertyOrIndexerExpr (Location l) { @@ -5446,6 +5732,8 @@ namespace Mono.CSharp { #region Properties + protected abstract Arguments Arguments { get; set; } + public MethodSpec Getter { get { return getter; @@ -5520,14 +5808,43 @@ namespace Mono.CSharp { // // Implements the IAssignMethod interface for assignments // - public abstract void Emit (EmitContext ec, bool leave_copy); - public abstract void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load); + public virtual void Emit (EmitContext ec, bool leave_copy) + { + var call = new CallEmitter (); + call.InstanceExpression = InstanceExpression; + if (has_await_arguments) + call.HasAwaitArguments = true; + else + call.DuplicateArguments = emitting_compound_assignment; + + call.Emit (ec, Getter, Arguments, loc); + + if (call.HasAwaitArguments) { + InstanceExpression = call.InstanceExpression; + Arguments = call.EmittedArguments; + has_await_arguments = true; + } + + if (leave_copy) { + ec.Emit (OpCodes.Dup); + temp = new LocalTemporary (Type); + temp.Store (ec); + } + } + + public abstract void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound); public override void Emit (EmitContext ec) { Emit (ec, false); } + protected override void EmitToFieldSource (EmitContext ec) + { + has_await_arguments = true; + Emit (ec, false); + } + public abstract SLE.Expression MakeAssignExpression (BuilderContext ctx, Expression source); protected abstract Expression OverloadResolve (ResolveContext rc, Expression right_side); @@ -5716,14 +6033,17 @@ namespace Mono.CSharp { throw new NotImplementedException (); } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { - if (leave_copy || !prepare_for_load) + if (leave_copy || !isCompound) throw new NotImplementedException ("EventExpr::EmitAssign"); Arguments args = new Arguments (1); args.Add (new Argument (source)); - Invocation.EmitCall (ec, InstanceExpression, op, args, loc); + + var call = new CallEmitter (); + call.InstanceExpression = InstanceExpression; + call.Emit (ec, op, args, loc); } #endregion @@ -5810,20 +6130,15 @@ namespace Mono.CSharp { return new TemporaryVariableReference (li, loc); } - public override Expression CreateExpressionTree (ResolveContext ec) - { - throw new NotSupportedException ("ET"); - } - protected override Expression DoResolve (ResolveContext ec) { eclass = ExprClass.Variable; // // Don't capture temporary variables except when using - // iterator redirection + // state machine redirection // - if (ec.CurrentAnonymousMethod != null && ec.CurrentAnonymousMethod.IsIterator && ec.IsVariableCapturingRequired) { + if (ec.CurrentAnonymousMethod != null && ec.CurrentAnonymousMethod is StateMachineInitializer && ec.IsVariableCapturingRequired) { AnonymousMethodStorey storey = li.Block.Explicit.CreateAnonymousMethodStorey (ec); storey.CaptureLocalVariable (ec, li); } @@ -5877,7 +6192,7 @@ namespace Mono.CSharp { } public override VariableInfo VariableInfo { - get { throw new NotImplementedException (); } + get { return null; } } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs index ec23b5267a..fef5af717b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs @@ -117,6 +117,11 @@ namespace Mono.CSharp { this.prev = prev; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("Missing Resolve call"); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs index 03097dfd84..fdcff115e3 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/eval.cs @@ -988,6 +988,13 @@ namespace Mono.CSharp } } + /// + /// Same as quit - useful in script scenerios + /// + static public void Quit () { + QuitRequested = true; + } + #if !NET_2_1 /// /// Describes an object or a type. diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs index d27f6f88f2..bd2d50c921 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs @@ -7,6 +7,7 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc. // Copyright 2003-2008 Novell, Inc. +// Copyright 2011 Xamarin Inc. // using System; @@ -46,6 +47,11 @@ namespace Mono.CSharp this.loc = loc; } + public override bool ContainsEmitWithAwait () + { + return arguments.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { if (expr_tree != null) @@ -73,7 +79,8 @@ namespace Mono.CSharp public override void Emit (EmitContext ec) { - Invocation.EmitCall (ec, null, oper, arguments, loc); + var call = new CallEmitter (); + call.EmitPredefined (ec, oper, arguments); } public override SLE.Expression MakeExpression (BuilderContext ctx) @@ -336,6 +343,11 @@ namespace Mono.CSharp return EmptyCast.Create (this, type); } + public override bool ContainsEmitWithAwait () + { + return Expr.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { return CreateExpressionTree (ec, null); @@ -498,7 +510,10 @@ namespace Mono.CSharp case Operator.UnaryNegation: if (ec.HasSet (EmitContext.Options.CheckedScope) && !IsFloat (type)) { - ec.Emit (OpCodes.Ldc_I4_0); + if (ec.HasSet (BuilderContext.Options.AsyncBody) && Expr.ContainsEmitWithAwait ()) + Expr = Expr.EmitToField (ec); + + ec.EmitInt (0); if (type.BuiltinType == BuiltinTypeSpec.Type.Long) ec.Emit (OpCodes.Conv_U8); Expr.Emit (ec); @@ -512,7 +527,7 @@ namespace Mono.CSharp case Operator.LogicalNot: Expr.Emit (ec); - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Ceq); break; @@ -815,17 +830,26 @@ namespace Mono.CSharp loc = l; } - public override Expression CreateExpressionTree (ResolveContext ec) - { - Error_PointerInsideExpressionTree (ec); - return null; + public bool IsFixed { + get { return true; } } - + protected override void CloneTo (CloneContext clonectx, Expression t) { Indirection target = (Indirection) t; target.expr = expr.Clone (clonectx); - } + } + + public override bool ContainsEmitWithAwait () + { + throw new NotImplementedException (); + } + + public override Expression CreateExpressionTree (ResolveContext ec) + { + Error_PointerInsideExpressionTree (ec); + return null; + } public override void Emit (EmitContext ec) { @@ -845,13 +869,13 @@ namespace Mono.CSharp } } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { - prepared = prepare_for_load; + prepared = isCompound; expr.Emit (ec); - if (prepare_for_load) + if (isCompound) ec.Emit (OpCodes.Dup); source.Emit (ec); @@ -906,15 +930,6 @@ namespace Mono.CSharp return this; } - public bool IsFixed { - get { return true; } - } - - public override string ToString () - { - return "*(" + expr + ")"; - } - public override object Accept (StructuralVisitor visitor) { return visitor.Visit (this); @@ -979,7 +994,7 @@ namespace Mono.CSharp // // Emits target assignment using unmodified source value // - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { // // Allocate temporary variable to keep original value before it's modified @@ -988,7 +1003,7 @@ namespace Mono.CSharp expr.Emit (ec); temp.Store (ec); - ((IAssignMethod) expr).EmitAssign (ec, source, false, prepare_for_load); + ((IAssignMethod) expr).EmitAssign (ec, source, false, isCompound); if (leave_copy) Emit (ec); @@ -1014,7 +1029,7 @@ namespace Mono.CSharp Mode mode; bool is_expr, recurse; - Expression expr; + protected Expression expr; // Holds the real operation Expression operation; @@ -1038,6 +1053,11 @@ namespace Mono.CSharp expr = e; } + public override bool ContainsEmitWithAwait () + { + return expr.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { return new SimpleAssign (this, this).CreateExpressionTree (ec); @@ -1088,6 +1108,11 @@ namespace Mono.CSharp if (expr.Type.IsNullableType) return new Nullable.LiftedUnaryMutator (mode, expr, loc).Resolve (ec); + return DoResolveOperation (ec); + } + + protected Expression DoResolveOperation (ResolveContext ec) + { eclass = ExprClass.Value; type = expr.Type; @@ -1228,7 +1253,7 @@ namespace Mono.CSharp if (recurse) { ((IAssignMethod) expr).Emit (ec, is_expr && (mode == Mode.PostIncrement || mode == Mode.PostDecrement)); - operation.Emit (ec); + EmitOperation (ec); recurse = false; return; @@ -1237,6 +1262,11 @@ namespace Mono.CSharp EmitCode (ec, true); } + protected virtual void EmitOperation (EmitContext ec) + { + operation.Emit (ec); + } + public override void EmitStatement (EmitContext ec) { EmitCode (ec, false); @@ -1277,15 +1307,11 @@ namespace Mono.CSharp } - /// - /// Base class for the `Is' and `As' classes. - /// - /// - /// - /// FIXME: Split this in two, and we get to save the `Operator' Oper - /// size. - /// - public abstract class Probe : Expression { + // + // Base class for the `is' and `as' operators + // + public abstract class Probe : Expression + { public Expression ProbeType; protected Expression expr; protected TypeSpec probe_type_expr; @@ -1303,6 +1329,11 @@ namespace Mono.CSharp } } + public override bool ContainsEmitWithAwait () + { + return expr.ContainsEmitWithAwait (); + } + protected override Expression DoResolve (ResolveContext ec) { probe_type_expr = ProbeType.ResolveAsType (ec); @@ -1348,7 +1379,8 @@ namespace Mono.CSharp /// /// Implementation of the `is' operator. /// - public class Is : Probe { + public class Is : Probe + { Nullable.Unwrap expr_unwrap; public Is (Expression expr, Expression probe_type, Location l) @@ -1379,7 +1411,7 @@ namespace Mono.CSharp ec.Emit (OpCodes.Box, expr.Type); ec.Emit (OpCodes.Isinst, probe_type_expr); - ec.Emit (OpCodes.Ldnull); + ec.EmitNull (); ec.Emit (OpCodes.Cgt_Un); } @@ -1489,11 +1521,22 @@ namespace Mono.CSharp return CreateConstantResult (ec, true); } } else { - // if (InflatedTypeSpec.ContainsTypeParameter (d)) - // return this; + if (Convert.ImplicitReferenceConversionExists (d, t)) { + // + // Do not optimize for imported type + // + if (d.MemberDefinition.IsImported && d.BuiltinType != BuiltinTypeSpec.Type.None) + return this; + + // + // Turn is check into simple null check for implicitly convertible reference types + // + return ReducedExpression.Create ( + new Binary (Binary.Operator.Inequality, expr, new NullLiteral (loc), loc).Resolve (ec), + this).Resolve (ec); + } - if (Convert.ImplicitReferenceConversionExists (d, t) || - Convert.ExplicitReferenceConversionExists (d, t)) { + if (Convert.ExplicitReferenceConversionExists (d, t)) { return this; } } @@ -1741,6 +1784,17 @@ namespace Mono.CSharp this.loc = loc; } + public override bool IsSideEffectFree { + get { + return true; + } + } + + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (2); @@ -1780,6 +1834,7 @@ namespace Mono.CSharp temp_storage.AddressOf(ec, AddressOp.LoadStore); ec.Emit(OpCodes.Initobj, type); temp_storage.Emit(ec); + temp_storage.Release (ec); } #if NET_4_0 && !STATIC @@ -2380,6 +2435,11 @@ namespace Mono.CSharp } } + public override bool ContainsEmitWithAwait () + { + return left.ContainsEmitWithAwait () || right.ContainsEmitWithAwait (); + } + public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l) { OpCode opcode; @@ -2453,7 +2513,7 @@ namespace Mono.CSharp case Operator.Inequality: ec.Emit (OpCodes.Ceq); - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); opcode = OpCodes.Ceq; break; @@ -2477,7 +2537,7 @@ namespace Mono.CSharp ec.Emit (OpCodes.Cgt_Un); else ec.Emit (OpCodes.Cgt); - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); opcode = OpCodes.Ceq; break; @@ -2488,7 +2548,7 @@ namespace Mono.CSharp else ec.Emit (OpCodes.Clt); - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); opcode = OpCodes.Ceq; break; @@ -3815,6 +3875,14 @@ namespace Mono.CSharp protected virtual void EmitOperator (EmitContext ec, TypeSpec l) { + if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) { + left = left.EmitToField (ec); + + if ((oper & Operator.LogicalMask) == 0) { + right = right.EmitToField (ec); + } + } + // // Handle short-circuit operators differently // than the rest @@ -3829,7 +3897,7 @@ namespace Mono.CSharp ec.Emit (OpCodes.Br_S, end); ec.MarkLabel (load_result); - ec.Emit (is_or ? OpCodes.Ldc_I4_1 : OpCodes.Ldc_I4_0); + ec.EmitInt (is_or ? 1 : 0); ec.MarkLabel (end); return; } @@ -4018,6 +4086,11 @@ namespace Mono.CSharp arguments = new Arguments (2); } + public override bool ContainsEmitWithAwait () + { + return arguments.ContainsEmitWithAwait (); + } + public static StringConcat Create (ResolveContext rc, Expression left, Expression right, Location loc) { if (left.eclass == ExprClass.Unresolved || right.eclass == ExprClass.Unresolved) @@ -4115,8 +4188,10 @@ namespace Mono.CSharp var members = GetConcatMethodCandidates (); var res = new OverloadResolver (members, OverloadResolver.Restrictions.NoBaseMembers, loc); var method = res.ResolveMember (new ResolveContext (ec.MemberContext), ref arguments); - if (method != null) - Invocation.EmitCall (ec, null, method, arguments, loc); + if (method != null) { + var call = new CallEmitter (); + call.EmitPredefined (ec, method, arguments); + } } public override SLE.Expression MakeExpression (BuilderContext ctx) @@ -4132,7 +4207,8 @@ namespace Mono.CSharp // // User-defined conditional logical operator // - public class ConditionalLogicalOperator : UserOperatorCall { + public class ConditionalLogicalOperator : UserOperatorCall + { readonly bool is_and; Expression oper_expr; @@ -4175,13 +4251,33 @@ namespace Mono.CSharp // // Emit and duplicate left argument // - arguments [0].Expr.Emit (ec); - ec.Emit (OpCodes.Dup); - arguments.RemoveAt (0); + bool right_contains_await = ec.HasSet (BuilderContext.Options.AsyncBody) && arguments[1].Expr.ContainsEmitWithAwait (); + if (right_contains_await) { + arguments[0] = arguments[0].EmitToField (ec); + arguments[0].Expr.Emit (ec); + } else { + arguments[0].Expr.Emit (ec); + ec.Emit (OpCodes.Dup); + arguments.RemoveAt (0); + } oper_expr.EmitBranchable (ec, end_target, true); + base.Emit (ec); - ec.MarkLabel (end_target); + + if (right_contains_await) { + // + // Special handling when right expression contains await and left argument + // could not be left on stack before logical branch + // + Label skip_left_load = ec.DefineLabel (); + ec.Emit (OpCodes.Br_S, skip_left_load); + ec.MarkLabel (end_target); + arguments[0].Expr.Emit (ec); + ec.MarkLabel (skip_left_load); + } else { + ec.MarkLabel (end_target); + } } } @@ -4201,6 +4297,11 @@ namespace Mono.CSharp this.op = op; } + public override bool ContainsEmitWithAwait () + { + throw new NotImplementedException (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Error_PointerInsideExpressionTree (ec); @@ -4423,6 +4524,8 @@ namespace Mono.CSharp this.loc = loc; } + #region Properties + public Expression Expr { get { return expr; @@ -4440,7 +4543,14 @@ namespace Mono.CSharp return false_expr; } } - + + #endregion + + public override bool ContainsEmitWithAwait () + { + return Expr.ContainsEmitWithAwait () || true_expr.ContainsEmitWithAwait () || false_expr.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (3); @@ -4515,13 +4625,6 @@ namespace Mono.CSharp expr.EmitBranchable (ec, false_target, false); true_expr.Emit (ec); - if (type.IsInterface) { - LocalBuilder temp = ec.GetTemporaryLocal (type); - ec.Emit (OpCodes.Stloc, temp); - ec.Emit (OpCodes.Ldloc, temp); - ec.FreeTemporaryLocal (temp, type); - } - ec.Emit (OpCodes.Br, end_target); ec.MarkLabel (false_target); false_expr.Emit (ec); @@ -4543,7 +4646,8 @@ namespace Mono.CSharp } } - public abstract class VariableReference : Expression, IAssignMethod, IMemoryLocation, IVariableReference { + public abstract class VariableReference : Expression, IAssignMethod, IMemoryLocation, IVariableReference + { LocalTemporary temp; #region Abstract @@ -4578,6 +4682,22 @@ namespace Mono.CSharp Variable.EmitAddressOf (ec); } + public override bool ContainsEmitWithAwait () + { + return false; + } + + public override Expression CreateExpressionTree (ResolveContext ec) + { + HoistedVariable hv = GetHoistedVariable (ec); + if (hv != null) + return hv.CreateExpressionTree (); + + Arguments arg = new Arguments (1); + arg.Add (new Argument (this)); + return CreateExpressionFactoryCall (ec, "Constant", arg); + } + public override Expression DoResolveLValue (ResolveContext rc, Expression right_side) { if (IsLockedByStatement) { @@ -4683,6 +4803,15 @@ namespace Mono.CSharp } } + public override Expression EmitToField (EmitContext ec) + { + HoistedVariable hv = GetHoistedVariable (ec); + if (hv != null) { + return hv.EmitToField (ec); + } + + return base.EmitToField (ec); + } public HoistedVariable GetHoistedVariable (ResolveContext rc) { @@ -4767,17 +4896,6 @@ namespace Mono.CSharp local_info.AddressTaken = true; } - public override Expression CreateExpressionTree (ResolveContext ec) - { - HoistedVariable hv = GetHoistedVariable (ec); - if (hv != null) - return hv.CreateExpressionTree (); - - Arguments arg = new Arguments (1); - arg.Add (new Argument (this)); - return CreateExpressionFactoryCall (ec, "Constant", arg); - } - void DoResolveBase (ResolveContext ec) { VerifyAssigned (ec); @@ -5074,22 +5192,6 @@ namespace Mono.CSharp SetAssigned (ec); return base.DoResolveLValue (ec, right_side); } - - static public void EmitLdArg (EmitContext ec, int x) - { - switch (x) { - case 0: ec.Emit (OpCodes.Ldarg_0); break; - case 1: ec.Emit (OpCodes.Ldarg_1); break; - case 2: ec.Emit (OpCodes.Ldarg_2); break; - case 3: ec.Emit (OpCodes.Ldarg_3); break; - default: - if (x > byte.MaxValue) - ec.Emit (OpCodes.Ldarg, x); - else - ec.Emit (OpCodes.Ldarg_S, (byte) x); - break; - } - } } /// @@ -5137,6 +5239,13 @@ namespace Mono.CSharp target.expr = expr.Clone (clonectx); } + public override bool ContainsEmitWithAwait () + { + if (arguments != null && arguments.ContainsEmitWithAwait ()) + return true; + + return mg.ContainsEmitWithAwait (); + } public override Expression CreateExpressionTree (ResolveContext ec) { @@ -5333,168 +5442,6 @@ namespace Mono.CSharp return true; } - // - // Used to decide whether call or callvirt is needed - // - static bool IsVirtualCallRequired (Expression instance, MethodSpec method) - { - // - // There are 2 scenarious where we emit callvirt - // - // Case 1: A method is virtual and it's not used to call base - // Case 2: A method instance expression can be null. In this casen callvirt ensures - // correct NRE exception when the method is called - // - var decl_type = method.DeclaringType; - if (decl_type.IsStruct || decl_type.IsEnum) - return false; - - if (instance is BaseThis) - return false; - - // - // It's non-virtual and will never be null - // - if (!method.IsVirtual && (instance is This || instance is New || instance is ArrayCreation || instance is DelegateCreation)) - return false; - - return true; - } - - /// - /// is_base tells whether we want to force the use of the `call' - /// opcode instead of using callvirt. Call is required to call - /// a specific method, while callvirt will always use the most - /// recent method in the vtable. - /// - /// is_static tells whether this is an invocation on a static method - /// - /// instance_expr is an expression that represents the instance - /// it must be non-null if is_static is false. - /// - /// method is the method to invoke. - /// - /// Arguments is the list of arguments to pass to the method or constructor. - /// - public static void EmitCall (EmitContext ec, Expression instance_expr, - MethodSpec method, Arguments Arguments, Location loc) - { - EmitCall (ec, instance_expr, method, Arguments, loc, false, false); - } - - // `dup_args' leaves an extra copy of the arguments on the stack - // `omit_args' does not leave any arguments at all. - // So, basically, you could make one call with `dup_args' set to true, - // and then another with `omit_args' set to true, and the two calls - // would have the same set of arguments. However, each argument would - // only have been evaluated once. - public static void EmitCall (EmitContext ec, Expression instance_expr, - MethodSpec method, Arguments Arguments, Location loc, - bool dup_args, bool omit_args) - { - LocalTemporary this_arg = null; - - // Speed up the check by not doing it on not allowed targets - if (method.ReturnType.Kind == MemberKind.Void && method.IsConditionallyExcluded (ec.Module.Compiler, loc)) - return; - - OpCode call_op; - TypeSpec iexpr_type; - - if (method.IsStatic) { - iexpr_type = null; - call_op = OpCodes.Call; - } else { - iexpr_type = instance_expr.Type; - - if (IsVirtualCallRequired (instance_expr, method)) { - call_op = OpCodes.Callvirt; - } else { - call_op = OpCodes.Call; - } - - // - // If this is ourselves, push "this" - // - if (!omit_args) { - TypeSpec t = iexpr_type; - - // - // Push the instance expression - // - if ((iexpr_type.IsStruct && (call_op == OpCodes.Callvirt || (call_op == OpCodes.Call && method.DeclaringType == iexpr_type))) || - iexpr_type.IsGenericParameter || method.DeclaringType.IsNullableType) { - // - // If the expression implements IMemoryLocation, then - // we can optimize and use AddressOf on the - // return. - // - // If not we have to use some temporary storage for - // it. - var iml = instance_expr as IMemoryLocation; - if (iml != null) { - iml.AddressOf (ec, AddressOp.Load); - } else { - LocalTemporary temp = new LocalTemporary (iexpr_type); - instance_expr.Emit (ec); - temp.Store (ec); - temp.AddressOf (ec, AddressOp.Load); - } - - // avoid the overhead of doing this all the time. - if (dup_args) - t = ReferenceContainer.MakeType (ec.Module, iexpr_type); - } else if (iexpr_type.IsEnum || iexpr_type.IsStruct) { - instance_expr.Emit (ec); - ec.Emit (OpCodes.Box, iexpr_type); - t = iexpr_type = ec.BuiltinTypes.Object; - } else { - instance_expr.Emit (ec); - } - - if (dup_args) { - ec.Emit (OpCodes.Dup); - if (Arguments != null && Arguments.Count != 0) { - this_arg = new LocalTemporary (t); - this_arg.Store (ec); - } - } - } - } - - if (!omit_args && Arguments != null) { - var dup_arg_exprs = Arguments.Emit (ec, dup_args); - if (dup_args) { - this_arg.Emit (ec); - LocalTemporary lt; - foreach (var dup in dup_arg_exprs) { - dup.Emit (ec); - lt = dup as LocalTemporary; - if (lt != null) - lt.Release (ec); - } - } - } - - if (call_op == OpCodes.Callvirt && (iexpr_type.IsGenericParameter || iexpr_type.IsStruct)) { - ec.Emit (OpCodes.Constrained, iexpr_type); - } - - if (method.Parameters.HasArglist) { - var varargs_types = GetVarargsTypes (method, Arguments); - ec.Emit (call_op, method, varargs_types); - return; - } - - // - // If you have: - // this.DoFoo (); - // and DoFoo is not virtual, you can omit the callvirt, - // because you don't need the null checking behavior. - // - ec.Emit (call_op, method); - } - public override void Emit (EmitContext ec) { mg.EmitCall (ec, arguments); @@ -5621,6 +5568,11 @@ namespace Mono.CSharp return null; } + public override bool ContainsEmitWithAwait () + { + return arguments != null && arguments.ContainsEmitWithAwait (); + } + // // Checks whether the type is an interface that has the // [ComImport, CoClass] attributes and must be treated @@ -5776,6 +5728,7 @@ namespace Mono.CSharp temp.AddressOf (ec, AddressOp.Store); ec.Emit (OpCodes.Initobj, type); temp.Emit (ec); + temp.Release (ec); ec.Emit (OpCodes.Br_S, label_end); ec.MarkLabel (label_activator); @@ -5822,9 +5775,13 @@ namespace Mono.CSharp } else if (vr != null && vr.IsRef) { vr.EmitLoad (ec); } - - if (arguments != null) + + if (arguments != null) { + if (ec.HasSet (BuilderContext.Options.AsyncBody) && (arguments.Count > (this is NewInitialize ? 0 : 1)) && arguments.ContainsEmitWithAwait ()) + arguments = arguments.Emit (ec, false, true); + arguments.Emit (ec); + } if (is_value_type) { if (method == null) { @@ -5985,6 +5942,11 @@ namespace Mono.CSharp elements.Add (expr); } + public override bool ContainsEmitWithAwait () + { + throw new NotSupportedException (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -6119,11 +6081,6 @@ namespace Mono.CSharp { } - protected override void Error_NegativeArrayIndex (ResolveContext ec, Location loc) - { - ec.Report.Error (248, loc, "Cannot create an array with a negative size"); - } - bool CheckIndices (ResolveContext ec, ArrayInitializer probe, int idx, bool specified_dims, int child_bounds) { if (initializers != null && bounds == null) { @@ -6214,6 +6171,16 @@ namespace Mono.CSharp return true; } + public override bool ContainsEmitWithAwait () + { + foreach (var arg in arguments) { + if (arg.ContainsEmitWithAwait ()) + return true; + } + + return InitializersContainAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args; @@ -6262,14 +6229,32 @@ namespace Mono.CSharp } } - protected virtual Expression ResolveArrayElement (ResolveContext ec, Expression element) + protected override void Error_NegativeArrayIndex (ResolveContext ec, Location loc) { - element = element.Resolve (ec); - if (element == null) - return null; + ec.Report.Error (248, loc, "Cannot create an array with a negative size"); + } - if (element is CompoundAssign.TargetExpression) { - if (first_emit != null) + bool InitializersContainAwait () + { + if (array_data == null) + return false; + + foreach (var expr in array_data) { + if (expr.ContainsEmitWithAwait ()) + return true; + } + + return false; + } + + protected virtual Expression ResolveArrayElement (ResolveContext ec, Expression element) + { + element = element.Resolve (ec); + if (element == null) + return null; + + if (element is CompoundAssign.TargetExpression) { + if (first_emit != null) throw new InternalErrorException ("Can only handle one mutator at a time"); first_emit = element; element = first_emit_temp = new LocalTemporary (element.Type); @@ -6508,7 +6493,7 @@ namespace Mono.CSharp // // Emits the initializers for the array // - void EmitStaticInitializers (EmitContext ec) + void EmitStaticInitializers (EmitContext ec, FieldExpr stackArray) { var m = ec.Module.PredefinedMembers.RuntimeHelpersInitializeArray.Resolve (loc); if (m == null) @@ -6520,7 +6505,12 @@ namespace Mono.CSharp byte [] data = MakeByteBlob (); var fb = ec.CurrentTypeDefinition.Module.MakeStaticData (data, loc); - ec.Emit (OpCodes.Dup); + if (stackArray == null) { + ec.Emit (OpCodes.Dup); + } else { + stackArray.Emit (ec); + } + ec.Emit (OpCodes.Ldtoken, fb); ec.Emit (OpCodes.Call, m); } @@ -6532,7 +6522,7 @@ namespace Mono.CSharp // // This always expect the top value on the stack to be the array // - void EmitDynamicInitializers (EmitContext ec, bool emitConstants) + void EmitDynamicInitializers (EmitContext ec, bool emitConstants, FieldExpr stackArray) { int dims = bounds.Count; var current_pos = new int [dims]; @@ -6544,9 +6534,18 @@ namespace Mono.CSharp // Constant can be initialized via StaticInitializer if (c == null || (c != null && emitConstants && !c.IsDefaultInitializer (array_element_type))) { - TypeSpec etype = e.Type; - ec.Emit (OpCodes.Dup); + var etype = e.Type; + + if (stackArray != null) { + if (e.ContainsEmitWithAwait ()) { + e = e.EmitToField (ec); + } + + stackArray.Emit (ec); + } else { + ec.Emit (OpCodes.Dup); + } for (int idx = 0; idx < dims; idx++) ec.EmitInt (current_pos [idx]); @@ -6600,31 +6599,47 @@ namespace Mono.CSharp first_emit_temp.Store (ec); } - foreach (Expression e in arguments) - e.Emit (ec); + FieldExpr await_stack_field; + if (ec.HasSet (BuilderContext.Options.AsyncBody) && InitializersContainAwait ()) { + await_stack_field = ec.GetTemporaryField (type); + ec.EmitThis (); + } else { + await_stack_field = null; + } + + EmitExpressionsList (ec, arguments); ec.EmitArrayNew ((ArrayContainer) type); if (initializers == null) return; + if (await_stack_field != null) + await_stack_field.EmitAssignFromStack (ec); + #if STATIC - // Emit static initializer for arrays which have contain more than 2 items and + // + // Emit static initializer for arrays which contain more than 2 items and // the static initializer will initialize at least 25% of array values or there // is more than 10 items to be initialized + // // NOTE: const_initializers_count does not contain default constant values. + // if (const_initializers_count > 2 && (array_data.Count > 10 || const_initializers_count * 4 > (array_data.Count)) && (BuiltinTypeSpec.IsPrimitiveType (array_element_type) || array_element_type.IsEnum)) { - EmitStaticInitializers (ec); + EmitStaticInitializers (ec, await_stack_field); if (!only_constant_initializers) - EmitDynamicInitializers (ec, false); + EmitDynamicInitializers (ec, false, await_stack_field); } else #endif { - EmitDynamicInitializers (ec, true); + EmitDynamicInitializers (ec, true, await_stack_field); } + if (await_stack_field != null) + await_stack_field.Emit (ec); + if (first_emit_temp != null) first_emit_temp.Release (ec); } @@ -6828,7 +6843,7 @@ namespace Mono.CSharp public void Emit (EmitContext ec) { - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); } public void EmitAssign (EmitContext ec) @@ -6838,7 +6853,7 @@ namespace Mono.CSharp public void EmitAddressOf (EmitContext ec) { - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); } } @@ -6867,6 +6882,12 @@ namespace Mono.CSharp get { return type.IsStruct; } } + public override bool IsSideEffectFree { + get { + return true; + } + } + protected override ILocalVariable Variable { get { return ThisVariable.Instance; } } @@ -6955,16 +6976,6 @@ namespace Mono.CSharp } } - public override Expression CreateExpressionTree (ResolveContext ec) - { - Arguments args = new Arguments (1); - args.Add (new Argument (this)); - - // Use typeless constant for ldarg.0 to save some - // space and avoid problems with anonymous stories - return CreateExpressionFactoryCall (ec, "Constant", args); - } - protected override Expression DoResolve (ResolveContext ec) { ResolveBase (ec); @@ -7035,6 +7046,16 @@ namespace Mono.CSharp this.loc = loc; } + protected override void CloneTo (CloneContext clonectx, Expression target) + { + // nothing. + } + + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -7058,10 +7079,6 @@ namespace Mono.CSharp ec.Emit (OpCodes.Arglist); } - protected override void CloneTo (CloneContext clonectx, Expression target) - { - // nothing. - } public override object Accept (StructuralVisitor visitor) { return visitor.Visit (this); @@ -7098,6 +7115,11 @@ namespace Mono.CSharp return retval; } } + + public override bool ContainsEmitWithAwait () + { + throw new NotImplementedException (); + } public override Expression CreateExpressionTree (ResolveContext ec) { @@ -7151,6 +7173,11 @@ namespace Mono.CSharp this.loc = loc; } + public override bool ContainsEmitWithAwait () + { + return false; + } + protected override Expression DoResolve (ResolveContext rc) { expr = expr.Resolve (rc); @@ -7222,6 +7249,11 @@ namespace Mono.CSharp this.loc = loc; } + public override bool ContainsEmitWithAwait () + { + throw new NotImplementedException (); + } + protected override Expression DoResolve (ResolveContext rc) { expr = expr.ResolveLValue (rc, EmptyExpression.LValueMemberAccess); @@ -7265,6 +7297,13 @@ namespace Mono.CSharp } #region Properties + + public override bool IsSideEffectFree { + get { + return true; + } + } + public TypeSpec TypeArgument { get { return typearg; @@ -7279,6 +7318,19 @@ namespace Mono.CSharp #endregion + + protected override void CloneTo (CloneContext clonectx, Expression t) + { + TypeOf target = (TypeOf) t; + if (QueriedType != null) + target.QueriedType = (FullNamedExpression) QueriedType.Clone (clonectx); + } + + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (2); @@ -7372,14 +7424,7 @@ namespace Mono.CSharp if (m != null) ec.Emit (OpCodes.Call, m); } - - protected override void CloneTo (CloneContext clonectx, Expression t) - { - TypeOf target = (TypeOf) t; - if (QueriedType != null) - target.QueriedType = (FullNamedExpression) QueriedType.Clone (clonectx); - } - + public override object Accept (StructuralVisitor visitor) { return visitor.Visit (this); @@ -7436,6 +7481,17 @@ namespace Mono.CSharp this.loc = loc; } + public override bool IsSideEffectFree { + get { + return true; + } + } + + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (2); @@ -7516,6 +7572,17 @@ namespace Mono.CSharp loc = l; } + public override bool IsSideEffectFree { + get { + return true; + } + } + + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { Error_PointerInsideExpressionTree (ec); @@ -7739,7 +7806,7 @@ namespace Mono.CSharp const MemberKind dot_kinds = MemberKind.Class | MemberKind.Struct | MemberKind.Delegate | MemberKind.Enum | MemberKind.Interface | MemberKind.TypeParameter | MemberKind.ArrayType; - return (type.Kind & dot_kinds) != 0; + return (type.Kind & dot_kinds) != 0 || type.BuiltinType == BuiltinTypeSpec.Type.Dynamic; } public override Expression LookupNameExpression (ResolveContext rc, MemberLookupRestrictions restrictions) @@ -7817,10 +7884,9 @@ namespace Mono.CSharp // Try to look for extension method when member lookup failed // if (MethodGroupExpr.IsExtensionMethodArgument (expr)) { - NamespaceContainer scope = null; - var methods = rc.LookupExtensionMethod (expr_type, Name, lookup_arity, ref scope); + var methods = rc.LookupExtensionMethod (expr_type, Name, lookup_arity); if (methods != null) { - var emg = new ExtensionMethodGroupExpr (methods, scope, expr, loc); + var emg = new ExtensionMethodGroupExpr (methods, expr, loc); if (HasTypeArguments) { if (!targs.Resolve (rc)) return null; @@ -7971,8 +8037,14 @@ namespace Mono.CSharp if (nested.IsAccessible (rc)) break; - // Keep looking after inaccessible candidate - expr_type = nested.DeclaringType.BaseType; + // + // Keep looking after inaccessible candidate but only if + // we are not in same context as the definition itself + // + if (expr_type.MemberDefinition == rc.CurrentMemberDefinition) + break; + + expr_type = expr_type.BaseType; } TypeExpr texpr; @@ -8054,6 +8126,11 @@ namespace Mono.CSharp Expr = e; loc = l; } + + public override bool ContainsEmitWithAwait () + { + return Expr.ContainsEmitWithAwait (); + } public override Expression CreateExpressionTree (ResolveContext ec) { @@ -8079,19 +8156,19 @@ namespace Mono.CSharp public override void Emit (EmitContext ec) { - using (ec.With (EmitContext.Options.AllCheckStateFlags, true)) + using (ec.With (EmitContext.Options.CheckedScope, true)) Expr.Emit (ec); } public override void EmitBranchable (EmitContext ec, Label target, bool on_true) { - using (ec.With (EmitContext.Options.AllCheckStateFlags, true)) + using (ec.With (EmitContext.Options.CheckedScope, true)) Expr.EmitBranchable (ec, target, on_true); } public override SLE.Expression MakeExpression (BuilderContext ctx) { - using (ctx.With (BuilderContext.Options.AllCheckStateFlags, true)) { + using (ctx.With (BuilderContext.Options.CheckedScope, true)) { return Expr.MakeExpression (ctx); } } @@ -8120,6 +8197,11 @@ namespace Mono.CSharp Expr = e; loc = l; } + + public override bool ContainsEmitWithAwait () + { + return Expr.ContainsEmitWithAwait (); + } public override Expression CreateExpressionTree (ResolveContext ec) { @@ -8145,13 +8227,13 @@ namespace Mono.CSharp public override void Emit (EmitContext ec) { - using (ec.With (EmitContext.Options.AllCheckStateFlags, false)) + using (ec.With (EmitContext.Options.CheckedScope, false)) Expr.Emit (ec); } public override void EmitBranchable (EmitContext ec, Label target, bool on_true) { - using (ec.With (EmitContext.Options.AllCheckStateFlags, false)) + using (ec.With (EmitContext.Options.CheckedScope, false)) Expr.EmitBranchable (ec, target, on_true); } @@ -8173,7 +8255,8 @@ namespace Mono.CSharp /// During semantic analysis these are transformed into /// IndexerAccess, ArrayAccess or a PointerArithmetic. /// - public class ElementAccess : Expression { + public class ElementAccess : Expression + { public Arguments Arguments; public Expression Expr; @@ -8184,6 +8267,11 @@ namespace Mono.CSharp this.Arguments = args; } + public override bool ContainsEmitWithAwait () + { + return Expr.ContainsEmitWithAwait () || Arguments.ContainsEmitWithAwait (); + } + // // We perform some simple tests, and then to "split" the emit and store // code we create an instance of a different class, and return that. @@ -8306,9 +8394,9 @@ namespace Mono.CSharp // ElementAccess ea; - LocalTemporary temp, expr_copy; - Expression[] prepared_arguments; + LocalTemporary temp; bool prepared; + bool? has_await_args; public ArrayAccess (ElementAccess ea_data, Location l) { @@ -8316,11 +8404,28 @@ namespace Mono.CSharp loc = l; } + public void AddressOf (EmitContext ec, AddressOp mode) + { + var ac = (ArrayContainer) ea.Expr.Type; + + LoadInstanceAndArguments (ec, false, false); + + if (ac.Element.IsGenericParameter && mode == AddressOp.Load) + ec.Emit (OpCodes.Readonly); + + ec.EmitArrayAddress (ac); + } + public override Expression CreateExpressionTree (ResolveContext ec) { return ea.CreateExpressionTree (ec); } + public override bool ContainsEmitWithAwait () + { + return ea.ContainsEmitWithAwait (); + } + public override Expression DoResolveLValue (ResolveContext ec, Expression right_side) { return DoResolve (ec); @@ -8365,10 +8470,24 @@ namespace Mono.CSharp // // Load the array arguments into the stack. // - void LoadArrayAndArguments (EmitContext ec) + void LoadInstanceAndArguments (EmitContext ec, bool duplicateArguments, bool prepareAwait) { - ea.Expr.Emit (ec); - ea.Arguments.Emit (ec); + if (prepareAwait) { + ea.Expr = ea.Expr.EmitToField (ec); + } else if (duplicateArguments) { + ea.Expr.Emit (ec); + ec.Emit (OpCodes.Dup); + + var copy = new LocalTemporary (ea.Expr.Type); + copy.Store (ec); + ea.Expr = copy; + } else { + ea.Expr.Emit (ec); + } + + var dup_args = ea.Arguments.Emit (ec, duplicateArguments, prepareAwait); + if (dup_args != null) + ea.Arguments = dup_args; } public void Emit (EmitContext ec, bool leave_copy) @@ -8378,19 +8497,11 @@ namespace Mono.CSharp if (prepared) { ec.EmitLoadFromPtr (type); } else { - if (prepared_arguments == null) { - LoadArrayAndArguments (ec); - } else { - expr_copy.Emit (ec); - LocalTemporary lt; - foreach (var expr in prepared_arguments) { - expr.Emit (ec); - lt = expr as LocalTemporary; - if (lt != null) - lt.Release (ec); - } + if (!has_await_args.HasValue && ec.HasSet (BuilderContext.Options.AsyncBody) && ea.Arguments.ContainsEmitWithAwait ()) { + LoadInstanceAndArguments (ec, false, true); } + LoadInstanceAndArguments (ec, false, false); ec.EmitArrayLoad (ac); } @@ -8406,40 +8517,56 @@ namespace Mono.CSharp Emit (ec, false); } - public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) + public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { var ac = (ArrayContainer) ea.Expr.Type; TypeSpec t = source.Type; + has_await_args = ec.HasSet (BuilderContext.Options.AsyncBody) && (ea.Arguments.ContainsEmitWithAwait () || source.ContainsEmitWithAwait ()); + // // When we are dealing with a struct, get the address of it to avoid value copy // Same cannot be done for reference type because array covariance and the // check in ldelema requires to specify the type of array element stored at the index // - if (t.IsStruct && ((prepare_for_load && !(source is DynamicExpressionStatement)) || !BuiltinTypeSpec.IsPrimitiveType (t))) { - LoadArrayAndArguments (ec); + if (t.IsStruct && ((isCompound && !(source is DynamicExpressionStatement)) || !BuiltinTypeSpec.IsPrimitiveType (t))) { + LoadInstanceAndArguments (ec, false, has_await_args.Value); + + if (has_await_args.Value) { + if (source.ContainsEmitWithAwait ()) { + source = source.EmitToField (ec); + isCompound = false; + prepared = true; + } + + LoadInstanceAndArguments (ec, isCompound, false); + } else { + prepared = true; + } + ec.EmitArrayAddress (ac); - if (prepare_for_load) { + if (isCompound) { ec.Emit (OpCodes.Dup); + prepared = true; } + } else { + LoadInstanceAndArguments (ec, isCompound, has_await_args.Value); - prepared = true; - } else if (prepare_for_load) { - ea.Expr.Emit (ec); - ec.Emit (OpCodes.Dup); + if (has_await_args.Value) { + if (source.ContainsEmitWithAwait ()) + source = source.EmitToField (ec); - expr_copy = new LocalTemporary (ea.Expr.Type); - expr_copy.Store (ec); - prepared_arguments = ea.Arguments.Emit (ec, true); - } else { - LoadArrayAndArguments (ec); + LoadInstanceAndArguments (ec, false, false); + } } source.Emit (ec); - if (expr_copy != null) { - expr_copy.Release (ec); + if (isCompound) { + var lt = ea.Expr as LocalTemporary; + if (lt != null) + lt.Release (ec); } if (leave_copy) { @@ -8460,28 +8587,19 @@ namespace Mono.CSharp } } - public void EmitNew (EmitContext ec, New source, bool leave_copy) + public override Expression EmitToField (EmitContext ec) { - if (!source.Emit (ec, this)) { - if (leave_copy) - throw new NotImplementedException (); - - return; - } - - throw new NotImplementedException (); - } - - public void AddressOf (EmitContext ec, AddressOp mode) - { - var ac = (ArrayContainer) ea.Expr.Type; - - LoadArrayAndArguments (ec); - - if (ac.Element.IsGenericParameter && mode == AddressOp.Load) - ec.Emit (OpCodes.Readonly); - - ec.EmitArrayAddress (ac); + // + // Have to be specialized for arrays to get access to + // underlying element. Instead of another result copy we + // need direct access to element + // + // Consider: + // + // CallRef (ref a[await Task.Factory.StartNew (() => 1)]); + // + ea.Expr = ea.Expr.EmitToField (ec); + return this; } public SLE.Expression MakeAssignExpression (BuilderContext ctx, Expression source) @@ -8500,7 +8618,7 @@ namespace Mono.CSharp SLE.Expression[] MakeExpressionArguments (BuilderContext ctx) { - using (ctx.With (BuilderContext.Options.AllCheckStateFlags, true)) { + using (ctx.With (BuilderContext.Options.CheckedScope, true)) { return Arguments.MakeExpression (ea.Arguments, ctx); } } @@ -8509,9 +8627,8 @@ namespace Mono.CSharp // // Indexer access expression // - class IndexerExpr : PropertyOrIndexerExpr, OverloadResolver.IBaseMembersProvider + sealed class IndexerExpr : PropertyOrIndexerExpr, OverloadResolver.IBaseMembersProvider { - LocalTemporary prepared_value; IList indexers; Arguments arguments; TypeSpec queried_type; @@ -8527,6 +8644,15 @@ namespace Mono.CSharp #region Properties + protected override Arguments Arguments { + get { + return arguments; + } + set { + arguments = value; + } + } + protected override TypeSpec DeclaringType { get { return best_candidate.DeclaringType; @@ -8553,6 +8679,11 @@ namespace Mono.CSharp #endregion + public override bool ContainsEmitWithAwait () + { + return base.ContainsEmitWithAwait () || arguments.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = Arguments.CreateForExpressionTree (ec, arguments, @@ -8561,55 +8692,71 @@ namespace Mono.CSharp return CreateExpressionFactoryCall (ec, "Call", args); } - - public override void Emit (EmitContext ec, bool leave_copy) + + public override void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { - if (prepared) { - prepared_value.Emit (ec); - } else { - Invocation.EmitCall (ec, InstanceExpression, Getter, arguments, loc); - } + LocalTemporary await_source_arg = null; - if (leave_copy) { - ec.Emit (OpCodes.Dup); - temp = new LocalTemporary (Type); - temp.Store (ec); - } - } - - public override void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load) - { - prepared = prepare_for_load; - Expression value = source; + if (isCompound) { + emitting_compound_assignment = true; + if (source is DynamicExpressionStatement) { + Emit (ec, false); + } else { + source.Emit (ec); + } + emitting_compound_assignment = false; - if (prepared) { - Invocation.EmitCall (ec, InstanceExpression, Getter, arguments, loc, true, false); + if (has_await_arguments) { + await_source_arg = new LocalTemporary (Type); + await_source_arg.Store (ec); - prepared_value = new LocalTemporary (type); - prepared_value.Store (ec); - source.Emit (ec); - prepared_value.Release (ec); + arguments.Add (new Argument (await_source_arg)); + + if (leave_copy) { + temp = await_source_arg; + } + + has_await_arguments = false; + } else { + arguments = null; + if (leave_copy) { + ec.Emit (OpCodes.Dup); + temp = new LocalTemporary (Type); + temp.Store (ec); + } + } + } else { if (leave_copy) { - ec.Emit (OpCodes.Dup); - temp = new LocalTemporary (Type); - temp.Store (ec); + if (ec.HasSet (BuilderContext.Options.AsyncBody) && (arguments.ContainsEmitWithAwait () || source.ContainsEmitWithAwait ())) { + source = source.EmitToField (ec); + } else { + temp = new LocalTemporary (Type); + source.Emit (ec); + temp.Store (ec); + source = temp; + } } - } else if (leave_copy) { - temp = new LocalTemporary (Type); - source.Emit (ec); - temp.Store (ec); - value = temp; + + arguments.Add (new Argument (source)); } - - if (!prepared) - arguments.Add (new Argument (value)); - Invocation.EmitCall (ec, InstanceExpression, Setter, arguments, loc, false, prepared); - + var call = new CallEmitter (); + call.InstanceExpression = InstanceExpression; + if (arguments == null) + call.InstanceExpressionOnStack = true; + + call.Emit (ec, Setter, arguments, loc); + if (temp != null) { temp.Emit (ec); temp.Release (ec); + } else if (leave_copy) { + source.Emit (ec); + } + + if (await_source_arg != null) { + await_source_arg.Release (ec); } } @@ -8837,6 +8984,11 @@ namespace Mono.CSharp loc = Location.Null; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -8862,6 +9014,19 @@ namespace Mono.CSharp } } + sealed class EmptyAwaitExpression : EmptyExpression + { + public EmptyAwaitExpression (TypeSpec type) + : base (type) + { + } + + public override bool ContainsEmitWithAwait () + { + return true; + } + } + // // Empty statement expression // @@ -8874,6 +9039,11 @@ namespace Mono.CSharp loc = Location.Null; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { return null; @@ -8944,6 +9114,11 @@ namespace Mono.CSharp } } + public override bool ContainsEmitWithAwait () + { + return source.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (3); @@ -9148,6 +9323,11 @@ namespace Mono.CSharp this.loc = l; } + public override bool ContainsEmitWithAwait () + { + throw new NotImplementedException (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Error_PointerInsideExpressionTree (ec); @@ -9251,6 +9431,11 @@ namespace Mono.CSharp loc = l; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -9542,6 +9727,16 @@ namespace Mono.CSharp t.initializers.Add (e.Clone (clonectx)); } + public override bool ContainsEmitWithAwait () + { + foreach (var e in initializers) { + if (e.ContainsEmitWithAwait ()) + return true; + } + + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { var expr_initializers = new ArrayInitializer (initializers.Count, loc); @@ -9652,6 +9847,11 @@ namespace Mono.CSharp this.new_instance = newInstance; } + public override bool ContainsEmitWithAwait () + { + return false; + } + public override Expression CreateExpressionTree (ResolveContext ec) { // Should not be reached @@ -9674,6 +9874,11 @@ namespace Mono.CSharp e.Emit (ec); } + public override Expression EmitToField (EmitContext ec) + { + return (Expression) new_instance.instance; + } + #region IMemoryLocation Members public void AddressOf (EmitContext ec, AddressOp mode) @@ -9699,16 +9904,6 @@ namespace Mono.CSharp this.initializers = initializers; } - protected override IMemoryLocation EmitAddressOf (EmitContext ec, AddressOp Mode) - { - instance = base.EmitAddressOf (ec, Mode); - - if (!initializers.IsEmpty) - initializers.Emit (ec); - - return instance; - } - protected override void CloneTo (CloneContext clonectx, Expression t) { base.CloneTo (clonectx, t); @@ -9717,6 +9912,11 @@ namespace Mono.CSharp target.initializers = (CollectionOrObjectInitializers) initializers.Clone (clonectx); } + public override bool ContainsEmitWithAwait () + { + return base.ContainsEmitWithAwait () || initializers.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { Arguments args = new Arguments (2); @@ -9749,11 +9949,14 @@ namespace Mono.CSharp if (initializers.IsEmpty) return left_on_stack; - LocalTemporary temp = target as LocalTemporary; - if (temp == null) { + LocalTemporary temp = null; + + instance = target as LocalTemporary; + + if (instance == null) { if (!left_on_stack) { VariableReference vr = target as VariableReference; - + // FIXME: This still does not work correctly for pre-set variables if (vr != null && vr.IsRef) target.AddressOf (ec, AddressOp.Load); @@ -9762,23 +9965,41 @@ namespace Mono.CSharp left_on_stack = true; } - temp = new LocalTemporary (type); + if (ec.HasSet (BuilderContext.Options.AsyncBody) && initializers.ContainsEmitWithAwait ()) { + instance = new EmptyAwaitExpression (Type).EmitToField (ec) as IMemoryLocation; + } else { + temp = new LocalTemporary (type); + instance = temp; + } } - instance = temp; - if (left_on_stack) + if (left_on_stack && temp != null) temp.Store (ec); initializers.Emit (ec); if (left_on_stack) { - temp.Emit (ec); - temp.Release (ec); + if (temp != null) { + temp.Emit (ec); + temp.Release (ec); + } else { + ((Expression) instance).Emit (ec); + } } return left_on_stack; } + protected override IMemoryLocation EmitAddressOf (EmitContext ec, AddressOp Mode) + { + instance = base.EmitAddressOf (ec, Mode); + + if (!initializers.IsEmpty) + initializers.Emit (ec); + + return instance; + } + public override object Accept (StructuralVisitor visitor) { return visitor.Visit (this); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs index d864dc875e..1becb532d4 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs @@ -7,6 +7,7 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc. // Copyright 2003-2008 Novell, Inc. +// Copyright 2011 Xamarin, Inc. // using System; @@ -415,9 +416,9 @@ namespace Mono.CSharp return Parent.CheckRethrow (loc); } - public virtual bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) + public virtual bool AddResumePoint (ResumableStatement stmt, out int pc) { - return Parent.AddResumePoint (stmt, loc, out pc); + return Parent.AddResumePoint (stmt, out pc); } // returns true if we crossed an unwind-protected region (try/catch/finally, lock, using, ...) @@ -636,15 +637,15 @@ namespace Mono.CSharp public class FlowBranchingIterator : FlowBranchingBlock { - readonly StateMachineInitializer iterator; + readonly Iterator iterator; - public FlowBranchingIterator (FlowBranching parent, StateMachineInitializer iterator) + public FlowBranchingIterator (FlowBranching parent, Iterator iterator) : base (parent, BranchingType.Iterator, SiblingType.Block, iterator.Block, iterator.Location) { this.iterator = iterator; } - public override bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) + public override bool AddResumePoint (ResumableStatement stmt, out int pc) { pc = iterator.AddResumePoint (stmt); return false; @@ -666,7 +667,7 @@ namespace Mono.CSharp return false; } - public override bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) + public override bool AddResumePoint (ResumableStatement stmt, out int pc) { throw new InternalErrorException ("A yield in a non-iterator block"); } @@ -730,11 +731,12 @@ namespace Mono.CSharp public class FlowBranchingTryCatch : FlowBranchingBlock { - TryCatch stmt; + readonly TryCatch tc; + public FlowBranchingTryCatch (FlowBranching parent, TryCatch stmt) : base (parent, BranchingType.Block, SiblingType.Try, null, stmt.loc) { - this.stmt = stmt; + this.tc = stmt; } public override bool CheckRethrow (Location loc) @@ -742,37 +744,92 @@ namespace Mono.CSharp return CurrentUsageVector.Next != null || Parent.CheckRethrow (loc); } - public override bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) + public override bool AddResumePoint (ResumableStatement stmt, out int pc) { int errors = Report.Errors; - Parent.AddResumePoint (stmt, loc, out pc); + Parent.AddResumePoint (tc.IsTryCatchFinally ? stmt : tc, out pc); if (errors == Report.Errors) { - if (CurrentUsageVector.Next == null) - Report.Error (1626, loc, "Cannot yield a value in the body of a try block with a catch clause"); - else - Report.Error (1631, loc, "Cannot yield a value in the body of a catch clause"); + if (stmt is AwaitStatement) { + if (CurrentUsageVector.Next != null) { + Report.Error (1985, stmt.loc, "The `await' operator cannot be used in the body of a catch clause"); + } else { + this.tc.AddResumePoint (stmt, pc); + } + } else { + if (CurrentUsageVector.Next == null) + Report.Error (1626, stmt.loc, "Cannot yield a value in the body of a try block with a catch clause"); + else + Report.Error (1631, stmt.loc, "Cannot yield a value in the body of a catch clause"); + } } + + return true; + } + + public override bool AddBreakOrigin (UsageVector vector, Location loc) + { + Parent.AddBreakOrigin (vector, loc); + tc.SomeCodeFollows (); + return true; + } + + public override bool AddContinueOrigin (UsageVector vector, Location loc) + { + Parent.AddContinueOrigin (vector, loc); + tc.SomeCodeFollows (); + return true; + } + + public override bool AddReturnOrigin (UsageVector vector, ExitStatement exit_stmt) + { + Parent.AddReturnOrigin (vector, exit_stmt); + tc.SomeCodeFollows (); + return true; + } + + public override bool AddGotoOrigin (UsageVector vector, Goto goto_stmt) + { + Parent.AddGotoOrigin (vector, goto_stmt); + return true; + } + } + + public class FlowBranchingAsync : FlowBranchingBlock + { + readonly AsyncInitializer async_init; + + public FlowBranchingAsync (FlowBranching parent, AsyncInitializer async_init) + : base (parent, BranchingType.Block, SiblingType.Try, null, async_init.Location) + { + this.async_init = async_init; + } +/* + public override bool CheckRethrow (Location loc) + { + return CurrentUsageVector.Next != null || Parent.CheckRethrow (loc); + } +*/ + public override bool AddResumePoint (ResumableStatement stmt, out int pc) + { + pc = async_init.AddResumePoint (stmt); return true; } public override bool AddBreakOrigin (UsageVector vector, Location loc) { Parent.AddBreakOrigin (vector, loc); - stmt.SomeCodeFollows (); return true; } public override bool AddContinueOrigin (UsageVector vector, Location loc) { Parent.AddContinueOrigin (vector, loc); - stmt.SomeCodeFollows (); return true; } public override bool AddReturnOrigin (UsageVector vector, ExitStatement exit_stmt) { Parent.AddReturnOrigin (vector, exit_stmt); - stmt.SomeCodeFollows (); return true; } @@ -783,7 +840,7 @@ namespace Mono.CSharp } } - public class FlowBranchingException : FlowBranching + public class FlowBranchingTryFinally : FlowBranching { ExceptionStatement stmt; UsageVector current_vector; @@ -869,7 +926,7 @@ namespace Mono.CSharp SavedOrigin saved_origins; - public FlowBranchingException (FlowBranching parent, + public FlowBranchingTryFinally (FlowBranching parent, ExceptionStatement stmt) : base (parent, BranchingType.Exception, SiblingType.Try, null, stmt.loc) @@ -906,15 +963,20 @@ namespace Mono.CSharp return false; } - public override bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) + public override bool AddResumePoint (ResumableStatement stmt, out int pc) { int errors = Report.Errors; - Parent.AddResumePoint (this.stmt, loc, out pc); + Parent.AddResumePoint (this.stmt, out pc); if (errors == Report.Errors) { if (finally_vector == null) this.stmt.AddResumePoint (stmt, pc); - else - Report.Error (1625, loc, "Cannot yield in the body of a finally clause"); + else { + if (stmt is AwaitStatement) { + Report.Error (1984, stmt.loc, "The `await' operator cannot be used in the body of a finally clause"); + } else { + Report.Error (1625, stmt.loc, "Cannot yield in the body of a finally clause"); + } + } } return true; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs index 1975704777..d955f868f7 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/generic.cs @@ -9,7 +9,9 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc (http://www.ximian.com) // Copyright 2004-2008 Novell, Inc +// Copyright 2011 Xamarin, Inc (http://www.xamarin.com) // + using System; using System.Collections.Generic; using System.Text; @@ -723,8 +725,8 @@ namespace Mono.CSharp { } } - if (ifaces_defined == null && ifaces != null) - ifaces_defined = ifaces.ToArray (); + if (ifaces_defined == null) + ifaces_defined = ifaces == null ? TypeSpec.EmptyTypes : ifaces.ToArray (); state |= StateFlags.InterfacesExpanded; } @@ -738,13 +740,19 @@ namespace Mono.CSharp { // public TypeSpec[] InterfacesDefined { get { - if (ifaces_defined == null && ifaces != null) + if (ifaces_defined == null) { + if (ifaces == null) + return null; + ifaces_defined = ifaces.ToArray (); + } - return ifaces_defined; + return ifaces_defined.Length == 0 ? null : ifaces_defined; } set { - ifaces = ifaces_defined = value; + ifaces_defined = value; + if (value != null && value.Length != 0) + ifaces = value; } } @@ -974,10 +982,13 @@ namespace Mono.CSharp { // Check interfaces implementation -> definition if (InterfacesDefined != null) { - foreach (var iface in InterfacesDefined) { + // + // Iterate over inflated interfaces + // + foreach (var iface in Interfaces) { found = false; if (other.InterfacesDefined != null) { - foreach (var oiface in other.InterfacesDefined) { + foreach (var oiface in other.Interfaces) { if (TypeSpecComparer.Override.IsEqual (iface, oiface)) { found = true; break; @@ -1007,9 +1018,12 @@ namespace Mono.CSharp { if (InterfacesDefined == null) return false; - foreach (var oiface in other.InterfacesDefined) { + // + // Iterate over inflated interfaces + // + foreach (var oiface in other.Interfaces) { found = false; - foreach (var iface in InterfacesDefined) { + foreach (var iface in Interfaces) { if (TypeSpecComparer.Override.IsEqual (iface, oiface)) { found = true; break; @@ -2789,7 +2803,7 @@ namespace Mono.CSharp { // Some types cannot be used as type arguments // if (bound.Type.Kind == MemberKind.Void || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType || - bound.Type == InternalType.MethodGroup) + bound.Type == InternalType.MethodGroup || bound.Type == InternalType.AnonymousMethod) return; var a = bounds [index]; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs index 137c5ccb38..595a6193e6 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/import.cs @@ -5,7 +5,8 @@ // // Dual licensed under the terms of the MIT X11 or GNU GPL // -// Copyright 2009, 2010 Novell, Inc +// Copyright 2009-2011 Novell, Inc +// Copyright 2011 Xamarin, Inc (http://www.xamarin.com) // using System; @@ -962,6 +963,15 @@ namespace Mono.CSharp if (spec.BaseType != null) { var bifaces = spec.BaseType.Interfaces; if (bifaces != null) { + // + // Before adding base class interfaces close defined interfaces + // on type parameter + // + var tp = spec as TypeParameterSpec; + if (tp != null && tp.InterfacesDefined == null) { + tp.InterfacesDefined = TypeSpec.EmptyTypes; + } + foreach (var iface in bifaces) spec.AddInterface (iface); } @@ -1894,6 +1904,15 @@ namespace Mono.CSharp } } + // + // Load base interfaces first to minic behaviour of compiled members + // + if (declaringType.IsInterface && declaringType.Interfaces != null) { + foreach (var iface in declaringType.Interfaces) { + cache.AddInterface (iface); + } + } + if (!onlyTypes) { // // The logic here requires methods to be returned first which seems to work for both Mono and .NET @@ -2024,12 +2043,6 @@ namespace Mono.CSharp cache.AddMemberImported (imported); } } - - if (declaringType.IsInterface && declaringType.Interfaces != null) { - foreach (var iface in declaringType.Interfaces) { - cache.AddInterface (iface); - } - } } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs index 9a256de68c..04e468db4a 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/iterators.cs @@ -8,6 +8,7 @@ // Dual licensed under the terms of the MIT X11 or GNU GPL // Copyright 2003 Ximian, Inc. // Copyright 2003-2008 Novell, Inc. +// Copyright 2011 Xamarin Inc. // // TODO: @@ -28,7 +29,7 @@ namespace Mono.CSharp public abstract class YieldStatement : ResumableStatement where T : StateMachineInitializer { protected Expression expr; - bool unwind_protect; + protected bool unwind_protect; protected T machine_initializer; int resume_pc; @@ -62,7 +63,7 @@ namespace Mono.CSharp machine_initializer = bc.CurrentAnonymousMethod as T; if (!bc.CurrentBranching.CurrentUsageVector.IsUnreachable) - unwind_protect = bc.CurrentBranching.AddResumePoint (this, loc, out resume_pc); + unwind_protect = bc.CurrentBranching.AddResumePoint (this, out resume_pc); return true; } @@ -156,7 +157,6 @@ namespace Mono.CSharp Start = 0 } - Field disposing_field; Field pc_field; int local_name_idx; StateMachineMethod method; @@ -168,12 +168,6 @@ namespace Mono.CSharp #region Properties - public Field DisposingField { - get { - return disposing_field; - } - } - public StateMachineMethod StateMachineMethod { get { return method; @@ -200,14 +194,13 @@ namespace Mono.CSharp protected override bool DoDefineMembers () { pc_field = AddCompilerGeneratedField ("$PC", new TypeExpression (Compiler.BuiltinTypes.Int, Location)); - disposing_field = AddCompilerGeneratedField ("$disposing", new TypeExpression (Compiler.BuiltinTypes.Bool, Location)); return base.DoDefineMembers (); } protected override string GetVariableMangledName (LocalVariable local_info) { - return "<" + local_info.Name + ">__" + local_name_idx++.ToString (); + return "<" + local_info.Name + ">__" + local_name_idx++.ToString ("X"); } } @@ -280,7 +273,7 @@ namespace Mono.CSharp { Label label_init = ec.DefineLabel (); - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.Emit (OpCodes.Ldflda, host.PC.Spec); ec.EmitInt ((int) State.Start); ec.EmitInt ((int) State.Uninitialized); @@ -292,7 +285,7 @@ namespace Mono.CSharp ec.EmitInt ((int) State.Uninitialized); ec.Emit (OpCodes.Bne_Un_S, label_init); - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.Emit (OpCodes.Ret); ec.MarkLabel (label_init); @@ -396,6 +389,7 @@ namespace Mono.CSharp TypeExpr iterator_type_expr; Field current_field; + Field disposing_field; TypeExpr enumerator_type; TypeExpr enumerable_type; @@ -411,7 +405,15 @@ namespace Mono.CSharp } public Field CurrentField { - get { return current_field; } + get { + return current_field; + } + } + + public Field DisposingField { + get { + return disposing_field; + } } public IList HoistedParameters { @@ -457,6 +459,7 @@ namespace Mono.CSharp protected override bool DoDefineMembers () { current_field = AddCompilerGeneratedField ("$current", iterator_type_expr); + disposing_field = AddCompilerGeneratedField ("$disposing", new TypeExpression (Compiler.BuiltinTypes.Bool, Location)); if (hoisted_params != null) { // @@ -578,6 +581,10 @@ namespace Mono.CSharp { EmitContext ec = new EmitContext (this, ig, MemberType); ec.CurrentAnonymousMethod = expr; + + if (expr is AsyncInitializer) + ec.With (BuilderContext.Options.AsyncBody, true); + return ec; } } @@ -617,9 +624,11 @@ namespace Mono.CSharp // The state as we generate the machine // Label move_next_ok; + Label iterator_body_end; protected Label move_next_error; - protected LocalBuilder skip_finally, current_pc; - List resume_points; + LocalBuilder skip_finally; + protected LocalBuilder current_pc; + protected List resume_points; protected StateMachineInitializer (ParametersBlock block, TypeContainer host, TypeSpec returnType) : base (block, returnType, block.StartLocation) @@ -627,12 +636,35 @@ namespace Mono.CSharp this.Host = host; } + #region Properties + + public Label BodyEnd { + get { + return iterator_body_end; + } + } + + public LocalBuilder CurrentPC + { + get { + return current_pc; + } + } + + public LocalBuilder SkipFinally { + get { + return skip_finally; + } + } + public override AnonymousMethodStorey Storey { get { return storey; } } + #endregion + public int AddResumePoint (ResumableStatement stmt) { if (resume_points == null) @@ -660,7 +692,6 @@ namespace Mono.CSharp var ctx = CreateBlockContext (ec); - ctx.StartFlowBranching (this, ec.CurrentBranching); Block.Resolve (ctx); // @@ -690,70 +721,26 @@ namespace Mono.CSharp storey.Instance.Emit (ec); } - public void EmitDispose (EmitContext ec) - { - Label end = ec.DefineLabel (); - - Label[] labels = null; - int n_resume_points = resume_points == null ? 0 : resume_points.Count; - for (int i = 0; i < n_resume_points; ++i) { - ResumableStatement s = resume_points[i]; - Label ret = s.PrepareForDispose (ec, end); - if (ret.Equals (end) && labels == null) - continue; - if (labels == null) { - labels = new Label[resume_points.Count + 1]; - for (int j = 0; j <= i; ++j) - labels[j] = end; - } - - labels[i + 1] = ret; - } - - if (labels != null) { - current_pc = ec.GetTemporaryLocal (ec.BuiltinTypes.UInt); - ec.Emit (OpCodes.Ldarg_0); - ec.Emit (OpCodes.Ldfld, storey.PC.Spec); - ec.Emit (OpCodes.Stloc, current_pc); - } - - ec.Emit (OpCodes.Ldarg_0); - ec.EmitInt (1); - ec.Emit (OpCodes.Stfld, storey.DisposingField.Spec); - - ec.Emit (OpCodes.Ldarg_0); - ec.EmitInt ((int) IteratorStorey.State.After); - ec.Emit (OpCodes.Stfld, storey.PC.Spec); - - if (labels != null) { - //SymbolWriter.StartIteratorDispatcher (ec.ig); - ec.Emit (OpCodes.Ldloc, current_pc); - ec.Emit (OpCodes.Switch, labels); - //SymbolWriter.EndIteratorDispatcher (ec.ig); - - foreach (ResumableStatement s in resume_points) - s.EmitForDispose (ec, current_pc, end, true); - } - - ec.MarkLabel (end); - } - void EmitMoveNext_NoResumePoints (EmitContext ec, Block original_block) { - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.Emit (OpCodes.Ldfld, storey.PC.Spec); - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.EmitInt ((int) IteratorStorey.State.After); ec.Emit (OpCodes.Stfld, storey.PC.Spec); // We only care if the PC is zero (start executing) or non-zero (don't do anything) ec.Emit (OpCodes.Brtrue, move_next_error); + iterator_body_end = ec.DefineLabel (); + SymbolWriter.StartIteratorBody (ec); original_block.Emit (ec); SymbolWriter.EndIteratorBody (ec); + ec.MarkLabel (iterator_body_end); + EmitMoveNextEpilogue (ec); ec.MarkLabel (move_next_error); @@ -773,14 +760,14 @@ namespace Mono.CSharp EmitMoveNext_NoResumePoints (ec, block); return; } - + current_pc = ec.GetTemporaryLocal (ec.BuiltinTypes.UInt); - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.Emit (OpCodes.Ldfld, storey.PC.Spec); ec.Emit (OpCodes.Stloc, current_pc); // We're actually in state 'running', but this is as good a PC value as any if there's an abnormal exit - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.EmitInt ((int) IteratorStorey.State.After); ec.Emit (OpCodes.Stfld, storey.PC.Spec); @@ -796,33 +783,57 @@ namespace Mono.CSharp if (need_skip_finally) { skip_finally = ec.GetTemporaryLocal (ec.BuiltinTypes.Bool); - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Stloc, skip_finally); } + var async_init = this as AsyncInitializer; + if (async_init != null) + ec.BeginExceptionBlock (); + SymbolWriter.StartIteratorDispatcher (ec); ec.Emit (OpCodes.Ldloc, current_pc); ec.Emit (OpCodes.Switch, labels); - ec.Emit (OpCodes.Br, move_next_error); + ec.Emit (async_init != null ? OpCodes.Leave : OpCodes.Br, move_next_error); SymbolWriter.EndIteratorDispatcher (ec); ec.MarkLabel (labels[0]); + iterator_body_end = ec.DefineLabel (); + SymbolWriter.StartIteratorBody (ec); block.Emit (ec); SymbolWriter.EndIteratorBody (ec); SymbolWriter.StartIteratorDispatcher (ec); - ec.Emit (OpCodes.Ldarg_0); + ec.MarkLabel (iterator_body_end); + + if (async_init != null) { + var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location); + + ec.BeginCatchBlock (catch_value.Type); + catch_value.EmitAssign (ec); + + ec.EmitThis (); + ec.EmitInt ((int) IteratorStorey.State.After); + ec.Emit (OpCodes.Stfld, storey.PC.Spec); + + ((AsyncTaskStorey) async_init.Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location)); + + ec.Emit (OpCodes.Leave, move_next_ok); + ec.EndExceptionBlock (); + } + + ec.EmitThis (); ec.EmitInt ((int) IteratorStorey.State.After); ec.Emit (OpCodes.Stfld, storey.PC.Spec); EmitMoveNextEpilogue (ec); ec.MarkLabel (move_next_error); - + if (ReturnType.Kind != MemberKind.Void) { ec.EmitInt (0); ec.Emit (OpCodes.Ret); @@ -842,6 +853,12 @@ namespace Mono.CSharp { } + public void EmitLeave (EmitContext ec, bool unwind_protect) + { + // Return ok + ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, move_next_ok); + } + // // Called back from YieldStatement // @@ -851,28 +868,29 @@ namespace Mono.CSharp // Guard against being disposed meantime // Label disposed = ec.DefineLabel (); - ec.Emit (OpCodes.Ldarg_0); - ec.Emit (OpCodes.Ldfld, storey.DisposingField.Spec); - ec.Emit (OpCodes.Brtrue_S, disposed); + var iterator = storey as IteratorStorey; + if (iterator != null) { + ec.EmitThis (); + ec.Emit (OpCodes.Ldfld, iterator.DisposingField.Spec); + ec.Emit (OpCodes.Brtrue_S, disposed); + } // // store resume program-counter // - ec.Emit (OpCodes.Ldarg_0); + ec.EmitThis (); ec.EmitInt (resume_pc); ec.Emit (OpCodes.Stfld, storey.PC.Spec); - ec.MarkLabel (disposed); + + if (iterator != null) { + ec.MarkLabel (disposed); + } // mark finally blocks as disabled if (unwind_protect && skip_finally != null) { ec.EmitInt (1); ec.Emit (OpCodes.Stloc, skip_finally); } - - // Return ok - ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, move_next_ok); - - ec.MarkLabel (resume_point); } } @@ -894,14 +912,6 @@ namespace Mono.CSharp this.type = method.ReturnType; } - public LocalBuilder SkipFinally { - get { return skip_finally; } - } - - public LocalBuilder CurrentPC { - get { return current_pc; } - } - public Block Container { get { return OriginalMethod.Block; } } @@ -951,6 +961,54 @@ namespace Mono.CSharp } } + public void EmitDispose (EmitContext ec) + { + Label end = ec.DefineLabel (); + + Label[] labels = null; + int n_resume_points = resume_points == null ? 0 : resume_points.Count; + for (int i = 0; i < n_resume_points; ++i) { + ResumableStatement s = resume_points[i]; + Label ret = s.PrepareForDispose (ec, end); + if (ret.Equals (end) && labels == null) + continue; + if (labels == null) { + labels = new Label[resume_points.Count + 1]; + for (int j = 0; j <= i; ++j) + labels[j] = end; + } + + labels[i + 1] = ret; + } + + if (labels != null) { + current_pc = ec.GetTemporaryLocal (ec.BuiltinTypes.UInt); + ec.EmitThis (); + ec.Emit (OpCodes.Ldfld, storey.PC.Spec); + ec.Emit (OpCodes.Stloc, current_pc); + } + + ec.EmitThis (); + ec.EmitInt (1); + ec.Emit (OpCodes.Stfld, ((IteratorStorey) storey).DisposingField.Spec); + + ec.EmitThis (); + ec.EmitInt ((int) IteratorStorey.State.After); + ec.Emit (OpCodes.Stfld, storey.PC.Spec); + + if (labels != null) { + //SymbolWriter.StartIteratorDispatcher (ec.ig); + ec.Emit (OpCodes.Ldloc, current_pc); + ec.Emit (OpCodes.Switch, labels); + //SymbolWriter.EndIteratorDispatcher (ec.ig); + + foreach (ResumableStatement s in resume_points) + s.EmitForDispose (ec, current_pc, end, true); + } + + ec.MarkLabel (end); + } + public override void EmitStatement (EmitContext ec) { throw new NotImplementedException (); @@ -964,6 +1022,17 @@ namespace Mono.CSharp fe.EmitAssign (ec, expr, false, false); base.InjectYield (ec, expr, resume_pc, unwind_protect, resume_point); + + EmitLeave (ec, unwind_protect); + + ec.MarkLabel (resume_point); + } + + protected override BlockContext CreateBlockContext (ResolveContext rc) + { + var bc = base.CreateBlockContext (rc); + bc.StartFlowBranching (this, rc.CurrentBranching); + return bc; } public static void CreateIterator (IMethodData method, TypeContainer parent, Modifiers modifiers) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/lambda.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/lambda.cs index 3cad50ce49..16f96a33de 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/lambda.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/lambda.cs @@ -199,7 +199,11 @@ namespace Mono.CSharp { { if (statement != null) { statement.EmitStatement (ec); - ec.Emit (OpCodes.Ret); + if (unwind_protect) + ec.Emit (OpCodes.Leave, ec.CreateReturnLabel ()); + else { + ec.Emit (OpCodes.Ret); + } return; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs index 75998515ac..ec453172ff 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs @@ -1151,7 +1151,7 @@ namespace Mono.CSharp { } if ((ModFlags & Modifiers.ASYNC) != 0) { - AsyncInitializer.Create (block, parameters, Parent.PartialContainer, ReturnType, Location); + AsyncInitializer.Create (this, block, parameters, Parent.PartialContainer, ReturnType, Location); } } @@ -1316,6 +1316,11 @@ namespace Mono.CSharp { } } + public override bool ContainsEmitWithAwait () + { + throw new NotSupportedException (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException ("ET"); @@ -1386,7 +1391,9 @@ namespace Mono.CSharp { ec.Mark (loc); - Invocation.EmitCall (ec, new CompilerGeneratedThis (type, loc), base_ctor, argument_list, loc); + var call = new CallEmitter (); + call.InstanceExpression = new CompilerGeneratedThis (type, loc); + call.EmitPredefined (ec, base_ctor, argument_list); } public override void EmitStatement (EmitContext ec) @@ -1633,11 +1640,6 @@ namespace Mono.CSharp { EmitContext ec = new EmitContext (this, ConstructorBuilder.GetILGenerator (), bc.ReturnType); ec.With (EmitContext.Options.ConstructorScope, true); - if (!ec.HasReturnLabel && bc.HasReturnLabel) { - ec.ReturnLabel = bc.ReturnLabel; - ec.HasReturnLabel = true; - } - block.Emit (ec); } } @@ -2036,10 +2038,6 @@ namespace Mono.CSharp { BlockContext bc = new BlockContext (mc, block, method.ReturnType); if (block.Resolve (null, bc, method)) { EmitContext ec = method.CreateEmitContext (MethodBuilder.GetILGenerator ()); - if (!ec.HasReturnLabel && bc.HasReturnLabel) { - ec.ReturnLabel = bc.ReturnLabel; - ec.HasReturnLabel = true; - } block.Emit (ec); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs index fdafbee39f..bd55dce6c2 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/namespace.cs @@ -370,9 +370,9 @@ namespace Mono.CSharp { return res; } - /// - /// Looks for extension method in this namespace - /// + // + // Looks for extension method in this namespace + // public List LookupExtensionMethod (IMemberContext invocationContext, TypeSpec extensionType, string name, int arity) { if (types == null) @@ -402,6 +402,26 @@ namespace Mono.CSharp { return found; } + // + // Extension methods look up for dotted namespace names + // + public IList LookupExtensionMethod (IMemberContext invocationContext, TypeSpec extensionType, string name, int arity, out Namespace scope) + { + // + // Inspect parent namespaces in namespace expression + // + scope = this; + do { + var candidates = scope.LookupExtensionMethod (invocationContext, extensionType, name, arity); + if (candidates != null) + return candidates; + + scope = scope.Parent; + } while (scope != null); + + return null; + } + public void AddType (ModuleContainer module, TypeSpec ts) { if (types == null) { @@ -797,7 +817,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 NamespaceContainer scope) + public ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) { List candidates = null; foreach (Namespace n in GetUsingTable ()) { @@ -811,29 +831,21 @@ namespace Mono.CSharp { candidates.AddRange (a); } - scope = parent; if (candidates != null) - return candidates; + return new ExtensionMethodCandidates (candidates, this); if (parent == null) return null; - // - // Inspect parent namespaces in namespace expression - // - Namespace parent_ns = ns.Parent; - do { - candidates = parent_ns.LookupExtensionMethod (this, extensionType, name, arity); - if (candidates != null) - return candidates; - - parent_ns = parent_ns.Parent; - } while (parent_ns != null); + Namespace ns_scope; + var ns_candidates = ns.Parent.LookupExtensionMethod (this, extensionType, name, arity, out ns_scope); + if (ns_candidates != null) + return new ExtensionMethodCandidates (ns_candidates, this, ns_scope); // - // Continue in parent scope + // Continue in parent container // - return parent.LookupExtensionMethod (extensionType, name, arity, ref scope); + return parent.LookupExtensionMethod (extensionType, name, arity); } public FullNamedExpression LookupNamespaceOrType (string name, int arity, LookupMode mode, Location loc) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs index f6b9abcca9..28cf683e4c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/nullable.cs @@ -79,7 +79,7 @@ namespace Mono.CSharp.Nullable } } - public class Unwrap : Expression, IMemoryLocation, IAssignMethod + public class Unwrap : Expression, IMemoryLocation { Expression expr; @@ -96,6 +96,11 @@ namespace Mono.CSharp.Nullable eclass = expr.eclass; } + public override bool ContainsEmitWithAwait () + { + return expr.ContainsEmitWithAwait (); + } + public static Expression Create (Expression expr) { // @@ -132,16 +137,24 @@ namespace Mono.CSharp.Nullable public override void Emit (EmitContext ec) { Store (ec); + + var call = new CallEmitter (); + call.InstanceExpression = this; + if (useDefaultValue) - Invocation.EmitCall (ec, this, NullableInfo.GetGetValueOrDefault (expr.Type), null, loc); + call.EmitPredefined (ec, NullableInfo.GetGetValueOrDefault (expr.Type), null); else - Invocation.EmitCall (ec, this, NullableInfo.GetValue (expr.Type), null, loc); + call.EmitPredefined (ec, NullableInfo.GetValue (expr.Type), null); } public void EmitCheck (EmitContext ec) { Store (ec); - Invocation.EmitCall (ec, this, NullableInfo.GetHasValue (expr.Type), null, loc); + + var call = new CallEmitter (); + call.InstanceExpression = this; + + call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null); } public override bool Equals (object obj) @@ -169,10 +182,10 @@ namespace Mono.CSharp.Nullable void Store (EmitContext ec) { - if (expr is VariableReference) + if (temp != null) return; - if (temp != null) + if (expr is VariableReference) return; expr.Emit (ec); @@ -211,51 +224,6 @@ namespace Mono.CSharp.Nullable return temp; } } - - public void Emit (EmitContext ec, bool leave_copy) - { - if (leave_copy) - Load (ec); - - Emit (ec); - } - - public void EmitAssign (EmitContext ec, Expression source, - bool leave_copy, bool prepare_for_load) - { - InternalWrap wrap = new InternalWrap (source, expr.Type, loc); - ((IAssignMethod) expr).EmitAssign (ec, wrap, leave_copy, false); - } - - class InternalWrap : Expression - { - public Expression expr; - - public InternalWrap (Expression expr, TypeSpec type, Location loc) - { - this.expr = expr; - this.loc = loc; - this.type = type; - - eclass = ExprClass.Value; - } - - public override Expression CreateExpressionTree (ResolveContext ec) - { - throw new NotSupportedException ("ET"); - } - - protected override Expression DoResolve (ResolveContext ec) - { - return this; - } - - public override void Emit (EmitContext ec) - { - expr.Emit (ec); - ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type)); - } - } } // @@ -280,7 +248,9 @@ namespace Mono.CSharp.Nullable public override void Emit (EmitContext ec) { - Invocation.EmitCall (ec, Child, NullableInfo.GetValue (Child.Type), null, loc); + var call = new CallEmitter (); + call.InstanceExpression = Child; + call.EmitPredefined (ec, NullableInfo.GetValue (Child.Type), null); } } @@ -354,6 +324,7 @@ namespace Mono.CSharp.Nullable value_target.AddressOf (ec, AddressOp.Store); ec.Emit (OpCodes.Initobj, type); value_target.Emit (ec); + value_target.Release (ec); } public void AddressOf (EmitContext ec, AddressOp Mode) @@ -386,6 +357,11 @@ namespace Mono.CSharp.Nullable : this (expr, unwrap as Unwrap, type) { } + + public override bool ContainsEmitWithAwait () + { + return unwrap.ContainsEmitWithAwait (); + } public override Expression CreateExpressionTree (ResolveContext ec) { @@ -677,7 +653,7 @@ namespace Mono.CSharp.Nullable } left_unwrap.Emit (ec); - ec.Emit (OpCodes.Brtrue_S, load_right); + ec.Emit (OpCodes.Brtrue, load_right); // value & null, value | null if (right_unwrap != null) { @@ -733,7 +709,7 @@ namespace Mono.CSharp.Nullable if (left_unwrap != null && (IsRightNullLifted || right.IsNull)) { left_unwrap.EmitCheck (ec); if (Oper == Binary.Operator.Equality) { - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Ceq); } return; @@ -742,7 +718,7 @@ namespace Mono.CSharp.Nullable if (right_unwrap != null && (IsLeftNullLifted || left.IsNull)) { right_unwrap.EmitCheck (ec); if (Oper == Binary.Operator.Equality) { - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Ceq); } return; @@ -755,6 +731,11 @@ namespace Mono.CSharp.Nullable user_operator.Emit (ec); ec.Emit (Oper == Operator.Equality ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, dissimilar_label); } else { + if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) { + left = left.EmitToField (ec); + right = right.EmitToField (ec); + } + left.Emit (ec); right.Emit (ec); @@ -774,7 +755,7 @@ namespace Mono.CSharp.Nullable ec.Emit (OpCodes.Ceq); } else { if (Oper == Operator.Inequality) { - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Ceq); } } @@ -783,9 +764,9 @@ namespace Mono.CSharp.Nullable ec.MarkLabel (dissimilar_label); if (Oper == Operator.Inequality) - ec.Emit (OpCodes.Ldc_I4_1); + ec.EmitInt (1); else - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.MarkLabel (end_label); } @@ -839,7 +820,7 @@ namespace Mono.CSharp.Nullable ec.MarkLabel (is_null_label); if ((Oper & Operator.ComparisonMask) != 0) { - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); } else { LiftedNull.Create (type, loc).Emit (ec); } @@ -854,8 +835,14 @@ namespace Mono.CSharp.Nullable return; } - if (l.IsNullableType) - l = TypeManager.GetTypeArguments (l) [0]; + if (left.Type.IsNullableType) { + l = NullableInfo.GetUnderlyingType (left.Type); + left = EmptyCast.Create (left, l); + } + + if (right.Type.IsNullableType) { + right = EmptyCast.Create (right, NullableInfo.GetUnderlyingType (right.Type)); + } base.EmitOperator (ec, l); } @@ -1149,6 +1136,14 @@ namespace Mono.CSharp.Nullable return this; } + public override bool ContainsEmitWithAwait () + { + if (unwrap != null) + return unwrap.ContainsEmitWithAwait () || right.ContainsEmitWithAwait (); + + return left.ContainsEmitWithAwait () || right.ContainsEmitWithAwait (); + } + protected override Expression DoResolve (ResolveContext ec) { left = left.Resolve (ec); @@ -1217,75 +1212,58 @@ namespace Mono.CSharp.Nullable } } - public class LiftedUnaryMutator : ExpressionStatement + class LiftedUnaryMutator : UnaryMutator { - public readonly UnaryMutator.Mode Mode; - Expression expr; - UnaryMutator underlying; - Unwrap unwrap; - - public LiftedUnaryMutator (UnaryMutator.Mode mode, Expression expr, Location loc) + public LiftedUnaryMutator (Mode mode, Expression expr, Location loc) + : base (mode, expr, loc) { - this.expr = expr; - this.Mode = mode; - this.loc = loc; - } - - public override Expression CreateExpressionTree (ResolveContext ec) - { - return new SimpleAssign (this, this).CreateExpressionTree (ec); } protected override Expression DoResolve (ResolveContext ec) { - expr = expr.Resolve (ec); - if (expr == null) - return null; - - unwrap = Unwrap.Create (expr, false); - if (unwrap == null) - return null; + var orig_expr = expr; - underlying = (UnaryMutator) new UnaryMutator (Mode, unwrap, loc).Resolve (ec); - if (underlying == null) - return null; + expr = Unwrap.Create (expr); + var res = base.DoResolveOperation (ec); - eclass = ExprClass.Value; + expr = orig_expr; type = expr.Type; - return this; + + return res; } - void DoEmit (EmitContext ec, bool is_expr) + protected override void EmitOperation (EmitContext ec) { Label is_null_label = ec.DefineLabel (); Label end_label = ec.DefineLabel (); - unwrap.EmitCheck (ec); + LocalTemporary lt = new LocalTemporary (type); + + // Value is on the stack + lt.Store (ec); + + var call = new CallEmitter (); + call.InstanceExpression = lt; + call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null); + ec.Emit (OpCodes.Brfalse, is_null_label); - if (is_expr) { - underlying.Emit (ec); - ec.Emit (OpCodes.Br_S, end_label); - } else { - underlying.EmitStatement (ec); - } + call = new CallEmitter (); + call.InstanceExpression = lt; + call.EmitPredefined (ec, NullableInfo.GetValue (expr.Type), null); - ec.MarkLabel (is_null_label); - if (is_expr) - LiftedNull.Create (type, loc).Emit (ec); + lt.Release (ec); - ec.MarkLabel (end_label); - } + base.EmitOperation (ec); - public override void Emit (EmitContext ec) - { - DoEmit (ec, true); - } + ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type)); + ec.Emit (OpCodes.Br_S, end_label); - public override void EmitStatement (EmitContext ec) - { - DoEmit (ec, false); + ec.MarkLabel (is_null_label); + LiftedNull.Create (type, loc).Emit (ec); + + ec.MarkLabel (end_label); } } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs index c36699f93c..e9b9042cf2 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/parameter.cs @@ -616,40 +616,20 @@ namespace Mono.CSharp { public void Emit (EmitContext ec) { - int arg_idx = idx; - if (!ec.IsStatic) - arg_idx++; - - ParameterReference.EmitLdArg (ec, arg_idx); + ec.EmitArgumentLoad (idx); } public void EmitAssign (EmitContext ec) { - int arg_idx = idx; - if (!ec.IsStatic) - arg_idx++; - - if (arg_idx <= 255) - ec.Emit (OpCodes.Starg_S, (byte) arg_idx); - else - ec.Emit (OpCodes.Starg, arg_idx); + ec.EmitArgumentStore (idx); } public void EmitAddressOf (EmitContext ec) { - int arg_idx = idx; - - if (!ec.IsStatic) - arg_idx++; - - bool is_ref = (ModFlags & Modifier.ISBYREF) != 0; - if (is_ref) { - ParameterReference.EmitLdArg (ec, arg_idx); + if ((ModFlags & Modifier.ISBYREF) != 0) { + ec.EmitArgumentLoad (idx); } else { - if (arg_idx <= 255) - ec.Emit (OpCodes.Ldarga_S, (byte) arg_idx); - else - ec.Emit (OpCodes.Ldarga, arg_idx); + ec.EmitArgumentAddress (idx); } } @@ -1298,7 +1278,7 @@ namespace Mono.CSharp { type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } - public virtual object Accept (StructuralVisitor visitor) + public override object Accept (StructuralVisitor visitor) { return visitor.Visit (this); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs index 696797aa01..b9f9da18fd 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs @@ -51,6 +51,78 @@ namespace Mono.CSharp { public MethodSpec [] need_proxy; } + struct ProxyMethodContext : IMemberContext + { + readonly TypeContainer container; + + public ProxyMethodContext (TypeContainer container) + { + this.container = container; + } + + public TypeSpec CurrentType { + get { + throw new NotImplementedException (); + } + } + + public TypeParameter[] CurrentTypeParameters { + get { + throw new NotImplementedException (); + } + } + + public MemberCore CurrentMemberDefinition { + get { + throw new NotImplementedException (); + } + } + + public bool IsObsolete { + get { + return false; + } + } + + public bool IsUnsafe { + get { + throw new NotImplementedException (); + } + } + + public bool IsStatic { + get { + return false; + } + } + + public ModuleContainer Module { + get { + return container.Module; + } + } + + public string GetSignatureForError () + { + throw new NotImplementedException (); + } + + public ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) + { + throw new NotImplementedException (); + } + + public FullNamedExpression LookupNamespaceOrType (string name, int arity, LookupMode mode, Location loc) + { + throw new NotImplementedException (); + } + + public FullNamedExpression LookupNamespaceAlias (string name) + { + throw new NotImplementedException (); + } + } + public class PendingImplementation { /// @@ -434,10 +506,11 @@ namespace Mono.CSharp { } int top = param.Count; - var ec = new EmitContext (null, proxy.GetILGenerator (), null); + var ec = new EmitContext (new ProxyMethodContext (container), proxy.GetILGenerator (), null); + ec.EmitThis (); // TODO: GetAllParametersArguments - for (int i = 0; i <= top; i++) - ParameterReference.EmitLdArg (ec, i); + for (int i = 0; i < top; i++) + ec.EmitArgumentLoad (i); ec.Emit (OpCodes.Call, base_method); ec.Emit (OpCodes.Ret); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs index e34e6951f0..d785dad621 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/report.cs @@ -2,9 +2,10 @@ // report.cs: report errors and warnings. // // Author: Miguel de Icaza (miguel@ximian.com) -// Marek Safar (marek.safar@seznam.cz) +// Marek Safar (marek.safar@gmail.com) // // Copyright 2001 Ximian, Inc. (http://www.ximian.com) +// Copyright 2011 Xamarin, Inc (http://www.xamarin.com) // using System; @@ -62,7 +63,7 @@ namespace Mono.CSharp { 1522, 1570, 1571, 1572, 1573, 1574, 1580, 1581, 1584, 1587, 1589, 1590, 1591, 1592, 1607, 1616, 1633, 1634, 1635, 1685, 1690, 1691, 1692, 1695, 1696, 1699, 1700, 1701, 1702, 1709, 1711, 1717, 1718, 1720, 1735, - 1901, 1956, 1981, + 1901, 1956, 1981, 1998, 2002, 2023, 2029, 3000, 3001, 3002, 3003, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, @@ -103,6 +104,9 @@ namespace Mono.CSharp { case LanguageVersion.V_3: version = "3.0"; break; + case LanguageVersion.V_4: + version = "4.0"; + break; default: throw new InternalErrorException ("Invalid feature version", compiler.Settings.Version); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/roottypes.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/roottypes.cs index df7962043c..b998806b8b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/roottypes.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/roottypes.cs @@ -608,7 +608,7 @@ namespace Mono.CSharp return PartialContainer.IsClsComplianceRequired (); } - public override IList LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope) + public override ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity) { return null; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs index db028e02bd..5f0b31aa02 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/statement.cs @@ -8,6 +8,7 @@ // // Copyright 2001, 2002, 2003 Ximian, Inc. // Copyright 2003, 2004 Novell, Inc. +// Copyright 2011 Xamarin Inc. // using System; @@ -732,8 +733,6 @@ namespace Mono.CSharp { return false; unwind_protect = ec.CurrentBranching.AddReturnOrigin (ec.CurrentBranching.CurrentUsageVector, this); - if (unwind_protect) - ec.NeedReturnLabel (); ec.CurrentBranching.CurrentUsageVector.Goto (); return true; } @@ -872,9 +871,12 @@ namespace Mono.CSharp { var async_return = ((AsyncTaskStorey) async_body.Storey).HoistedReturn; // It's null for await without async - if (async_return != null) + if (async_return != null) { async_return.EmitAssign (ec); + ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, async_body.BodyEnd); + } + return; } @@ -883,7 +885,7 @@ namespace Mono.CSharp { } if (unwind_protect) - ec.Emit (OpCodes.Leave, ec.ReturnLabel); + ec.Emit (OpCodes.Leave, ec.CreateReturnLabel ()); else ec.Emit (OpCodes.Ret); } @@ -1413,6 +1415,11 @@ namespace Mono.CSharp { } public override bool Resolve (BlockContext bc) + { + return Resolve (bc, true); + } + + public bool Resolve (BlockContext bc, bool resolveDeclaratorInitializers) { if (li.Type == null) { TypeSpec type = null; @@ -1490,10 +1497,10 @@ namespace Mono.CSharp { d.Variable.PrepareForFlowAnalysis (bc); } - if (d.Initializer != null) { + if (d.Initializer != null && resolveDeclaratorInitializers) { d.Initializer = ResolveInitializer (bc, d.Variable, d.Initializer); // d.Variable.DefinitelyAssigned - } + } } } @@ -1773,7 +1780,7 @@ namespace Mono.CSharp { public static LocalVariable CreateCompilerGenerated (TypeSpec type, Block block, Location loc) { - LocalVariable li = new LocalVariable (block, "<$$>", Flags.CompilerGenerated | Flags.Used, loc); + LocalVariable li = new LocalVariable (block, GetCompilerGeneratedName (block), Flags.CompilerGenerated | Flags.Used, loc); li.Type = type; return li; } @@ -1809,6 +1816,11 @@ namespace Mono.CSharp { ec.Emit (OpCodes.Ldloca, builder); } + public static string GetCompilerGeneratedName (Block block) + { + return "$locvar" + block.ParametersBlock.TemporaryLocalsCount++.ToString ("X"); + } + public string GetReadOnlyContext () { switch (flags & Flags.ReadonlyMask) { @@ -2304,8 +2316,8 @@ namespace Mono.CSharp { // // An iterator has only 1 storey block // - if (ec.CurrentIterator != null) - return ec.CurrentIterator.Storey; + if (ec.CurrentAnonymousMethod.IsIterator) + return ec.CurrentAnonymousMethod.Storey; // // When referencing a variable in iterator storey from children anonymous method @@ -2487,6 +2499,11 @@ namespace Mono.CSharp { this.block = block; } + public override bool ContainsEmitWithAwait () + { + return child.ContainsEmitWithAwait (); + } + public override Expression CreateExpressionTree (ResolveContext ec) { throw new NotSupportedException (); @@ -2607,6 +2624,8 @@ namespace Mono.CSharp { } } + public int TemporaryLocalsCount { get; set; } + #endregion // @@ -2781,7 +2800,7 @@ namespace Mono.CSharp { AddStatement (new Return (iterator, iterator.Location)); } - public void WrapIntoAsyncTask (TypeContainer host, TypeSpec returnType) + public void WrapIntoAsyncTask (IMemberContext context, TypeContainer host, TypeSpec returnType) { ParametersBlock pb = new ParametersBlock (this, ParametersCompiled.EmptyReadOnlyParameters, StartLocation); pb.EndLocation = EndLocation; @@ -2791,7 +2810,7 @@ namespace Mono.CSharp { var initializer = new AsyncInitializer (pb, host, block_type); initializer.Type = block_type; - am_storey = new AsyncTaskStorey (initializer, returnType); + am_storey = new AsyncTaskStorey (context, initializer, returnType); statements = new List (1); AddStatement (new StatementExpression (initializer)); @@ -3119,8 +3138,6 @@ namespace Mono.CSharp { #if PRODUCTION try { #endif - if (ec.HasReturnLabel) - ec.ReturnLabel = ec.DefineLabel (); base.Emit (ec); @@ -4063,21 +4080,16 @@ namespace Mono.CSharp { } } - // Base class for statements that are implemented in terms of try...finally - public abstract class ExceptionStatement : ResumableStatement + public abstract class TryFinallyBlock : ExceptionStatement { - bool code_follows; - Iterator iter; - List resume_points; - int first_resume_pc; protected Statement stmt; Label dispose_try_block; bool prepared_for_dispose, emitted_dispose; - protected ExceptionStatement (Statement stmt, Location loc) + protected TryFinallyBlock (Statement stmt, Location loc) + : base (loc) { this.stmt = stmt; - this.loc = loc; } #region Properties @@ -4090,43 +4102,30 @@ namespace Mono.CSharp { #endregion - protected abstract void EmitPreTryBody (EmitContext ec); protected abstract void EmitTryBody (EmitContext ec); protected abstract void EmitFinallyBody (EmitContext ec); - protected sealed override void DoEmit (EmitContext ec) + public override Label PrepareForDispose (EmitContext ec, Label end) { - EmitPreTryBody (ec); - - if (resume_points != null) { - ec.EmitInt ((int) IteratorStorey.State.Running); - ec.Emit (OpCodes.Stloc, iter.CurrentPC); - } - - ec.BeginExceptionBlock (); - - if (resume_points != null) { - ec.MarkLabel (resume_point); - - // For normal control flow, we want to fall-through the Switch - // So, we use CurrentPC rather than the $PC field, and initialize it to an outside value above - ec.Emit (OpCodes.Ldloc, iter.CurrentPC); - ec.EmitInt (first_resume_pc); - ec.Emit (OpCodes.Sub); - - Label [] labels = new Label [resume_points.Count]; - for (int i = 0; i < resume_points.Count; ++i) - labels [i] = resume_points [i].PrepareForEmit (ec); - ec.Emit (OpCodes.Switch, labels); + if (!prepared_for_dispose) { + prepared_for_dispose = true; + dispose_try_block = ec.DefineLabel (); } + return dispose_try_block; + } + protected sealed override void DoEmit (EmitContext ec) + { + EmitTryBodyPrepare (ec); EmitTryBody (ec); ec.BeginFinallyBlock (); Label start_finally = ec.DefineLabel (); if (resume_points != null) { - ec.Emit (OpCodes.Ldloc, iter.SkipFinally); + var state_machine = (StateMachineInitializer) ec.CurrentAnonymousMethod; + + ec.Emit (OpCodes.Ldloc, state_machine.SkipFinally); ec.Emit (OpCodes.Brfalse_S, start_finally); ec.Emit (OpCodes.Endfinally); } @@ -4137,44 +4136,6 @@ namespace Mono.CSharp { ec.EndExceptionBlock (); } - public void SomeCodeFollows () - { - code_follows = true; - } - - public override bool Resolve (BlockContext ec) - { - // System.Reflection.Emit automatically emits a 'leave' at the end of a try clause - // So, ensure there's some IL code after this statement. - if (!code_follows && resume_points == null && ec.CurrentBranching.CurrentUsageVector.IsUnreachable) - ec.NeedReturnLabel (); - - iter = ec.CurrentIterator; - return true; - } - - public void AddResumePoint (ResumableStatement stmt, int pc) - { - if (resume_points == null) { - resume_points = new List (); - first_resume_pc = pc; - } - - if (pc != first_resume_pc + resume_points.Count) - throw new InternalErrorException ("missed an intervening AddResumePoint?"); - - resume_points.Add (stmt); - } - - public override Label PrepareForDispose (EmitContext ec, Label end) - { - if (!prepared_for_dispose) { - prepared_for_dispose = true; - dispose_try_block = ec.DefineLabel (); - } - return dispose_try_block; - } - public override void EmitForDispose (EmitContext ec, LocalBuilder pc, Label end, bool have_dispatcher) { if (emitted_dispose) @@ -4192,24 +4153,24 @@ namespace Mono.CSharp { ec.MarkLabel (dispose_try_block); - Label [] labels = null; + Label[] labels = null; for (int i = 0; i < resume_points.Count; ++i) { - ResumableStatement s = resume_points [i]; + ResumableStatement s = resume_points[i]; Label ret = s.PrepareForDispose (ec, end_of_try); if (ret.Equals (end_of_try) && labels == null) continue; if (labels == null) { - labels = new Label [resume_points.Count]; + labels = new Label[resume_points.Count]; for (int j = 0; j < i; ++j) - labels [j] = end_of_try; + labels[j] = end_of_try; } - labels [i] = ret; + labels[i] = ret; } if (labels != null) { int j; for (j = 1; j < labels.Length; ++j) - if (!labels [0].Equals (labels [j])) + if (!labels[0].Equals (labels[j])) break; bool emit_dispatcher = j < labels.Length; @@ -4236,7 +4197,84 @@ namespace Mono.CSharp { } } - public class Lock : ExceptionStatement + // + // Base class for blocks using exception handling + // + public abstract class ExceptionStatement : ResumableStatement + { +#if !STATIC + bool code_follows; +#endif + protected List resume_points; + protected int first_resume_pc; + + protected ExceptionStatement (Location loc) + { + this.loc = loc; + } + + protected virtual void EmitTryBodyPrepare (EmitContext ec) + { + StateMachineInitializer state_machine = null; + if (resume_points != null) { + state_machine = (StateMachineInitializer) ec.CurrentAnonymousMethod; + + ec.EmitInt ((int) IteratorStorey.State.Running); + ec.Emit (OpCodes.Stloc, state_machine.CurrentPC); + } + + ec.BeginExceptionBlock (); + + if (resume_points != null) { + ec.MarkLabel (resume_point); + + // For normal control flow, we want to fall-through the Switch + // So, we use CurrentPC rather than the $PC field, and initialize it to an outside value above + ec.Emit (OpCodes.Ldloc, state_machine.CurrentPC); + ec.EmitInt (first_resume_pc); + ec.Emit (OpCodes.Sub); + + Label[] labels = new Label[resume_points.Count]; + for (int i = 0; i < resume_points.Count; ++i) + labels[i] = resume_points[i].PrepareForEmit (ec); + ec.Emit (OpCodes.Switch, labels); + } + } + + public void SomeCodeFollows () + { +#if !STATIC + code_follows = true; +#endif + } + + public override bool Resolve (BlockContext ec) + { +#if !STATIC + // System.Reflection.Emit automatically emits a 'leave' at the end of a try clause + // So, ensure there's some IL code after this statement. + if (!code_follows && resume_points == null && ec.CurrentBranching.CurrentUsageVector.IsUnreachable) + ec.NeedReturnLabel (); +#endif + return true; + } + + public void AddResumePoint (ResumableStatement stmt, int pc) + { + if (resume_points == null) { + resume_points = new List (); + first_resume_pc = pc; + } + + if (pc != first_resume_pc + resume_points.Count) + throw new InternalErrorException ("missed an intervening AddResumePoint?"); + + resume_points.Add (stmt); + } + + } + + public class Lock : TryFinallyBlock { Expression expr; TemporaryVariableReference expr_copy; @@ -4294,21 +4332,21 @@ namespace Mono.CSharp { // Have to keep original lock value around to unlock same location // in the case the original has changed or is null // - expr_copy = TemporaryVariableReference.Create (ec.BuiltinTypes.Object, ec.CurrentBlock.Parent, loc); + expr_copy = TemporaryVariableReference.Create (ec.BuiltinTypes.Object, ec.CurrentBlock, loc); expr_copy.Resolve (ec); // // Ensure Monitor methods are available // if (ResolvePredefinedMethods (ec) > 1) { - lock_taken = TemporaryVariableReference.Create (ec.BuiltinTypes.Bool, ec.CurrentBlock.Parent, loc); + lock_taken = TemporaryVariableReference.Create (ec.BuiltinTypes.Bool, ec.CurrentBlock, loc); lock_taken.Resolve (ec); } return true; } - protected override void EmitPreTryBody (EmitContext ec) + protected override void EmitTryBodyPrepare (EmitContext ec) { expr_copy.EmitAssign (ec, expr); @@ -4324,6 +4362,8 @@ namespace Mono.CSharp { expr_copy.Emit (ec); ec.Emit (OpCodes.Call, ec.Module.PredefinedMembers.MonitorEnter.Get ()); } + + base.EmitTryBodyPrepare (ec); } protected override void EmitTryBody (EmitContext ec) @@ -4409,7 +4449,7 @@ namespace Mono.CSharp { protected override void DoEmit (EmitContext ec) { - using (ec.With (EmitContext.Options.AllCheckStateFlags, false)) + using (ec.With (EmitContext.Options.CheckedScope, false)) Block.Emit (ec); } @@ -4444,7 +4484,7 @@ namespace Mono.CSharp { protected override void DoEmit (EmitContext ec) { - using (ec.With (EmitContext.Options.AllCheckStateFlags, true)) + using (ec.With (EmitContext.Options.CheckedScope, true)) Block.Emit (ec); } @@ -4537,7 +4577,7 @@ namespace Mono.CSharp { public override void EmitExit (EmitContext ec) { - ec.Emit (OpCodes.Ldc_I4_0); + ec.EmitInt (0); ec.Emit (OpCodes.Conv_U); vi.EmitAssign (ec); } @@ -4589,7 +4629,7 @@ namespace Mono.CSharp { public override void EmitExit (EmitContext ec) { - ec.Emit (OpCodes.Ldnull); + ec.EmitNull (); pinned_string.EmitAssign (ec); } } @@ -4910,7 +4950,8 @@ namespace Mono.CSharp { } } - public class TryFinally : ExceptionStatement { + public class TryFinally : TryFinallyBlock + { Block fini; public Statement Stmt { @@ -4950,10 +4991,6 @@ namespace Mono.CSharp { return ok; } - protected override void EmitPreTryBody (EmitContext ec) - { - } - protected override void EmitTryBody (EmitContext ec) { stmt.Emit (ec); @@ -4979,13 +5016,15 @@ namespace Mono.CSharp { } } - public class TryCatch : Statement { + public class TryCatch : ExceptionStatement + { public Block Block; public List Specific; public Catch General; - bool inside_try_finally, code_follows; + readonly bool inside_try_finally; public TryCatch (Block block, List catch_clauses, Location l, bool inside_try_finally) + : base (l) { this.Block = block; this.Specific = catch_clauses; @@ -4996,8 +5035,12 @@ namespace Mono.CSharp { this.General = c; catch_clauses.RemoveAt (0); } + } - loc = l; + public bool IsTryCatchFinally { + get { + return inside_try_finally; + } } public override bool Resolve (BlockContext ec) @@ -5055,23 +5098,13 @@ namespace Mono.CSharp { ec.EndFlowBranching (); - // System.Reflection.Emit automatically emits a 'leave' at the end of a try/catch clause - // So, ensure there's some IL code after this statement - if (!inside_try_finally && !code_follows && ec.CurrentBranching.CurrentUsageVector.IsUnreachable) - ec.NeedReturnLabel (); - - return ok; + return base.Resolve (ec) && ok; } - public void SomeCodeFollows () - { - code_follows = true; - } - - protected override void DoEmit (EmitContext ec) + protected sealed override void DoEmit (EmitContext ec) { if (!inside_try_finally) - ec.BeginExceptionBlock (); + EmitTryBodyPrepare (ec); Block.Emit (ec); @@ -5104,7 +5137,7 @@ namespace Mono.CSharp { } } - public class Using : ExceptionStatement + public class Using : TryFinallyBlock { public class VariableDeclaration : BlockVariableDeclaration { @@ -5144,7 +5177,7 @@ namespace Mono.CSharp { if (IsNested) return true; - return base.Resolve (bc); + return base.Resolve (bc, false); } public Expression ResolveExpression (BlockContext bc) @@ -5230,7 +5263,12 @@ namespace Mono.CSharp { return dispose; } - public Statement RewriteForDeclarators (BlockContext bc, Statement stmt) + public void ResolveDeclaratorInitializer (BlockContext bc) + { + Initializer = base.ResolveInitializer (bc, Variable, Initializer); + } + + public Statement RewriteUsingDeclarators (BlockContext bc, Statement stmt) { for (int i = declarators.Count - 1; i >= 0; --i) { var d = declarators [i]; @@ -5283,9 +5321,10 @@ namespace Mono.CSharp { #endregion - protected override void EmitPreTryBody (EmitContext ec) + protected override void EmitTryBodyPrepare (EmitContext ec) { decl.Emit (ec); + base.EmitTryBodyPrepare (ec); } protected override void EmitTryBody (EmitContext ec) @@ -5311,11 +5350,15 @@ namespace Mono.CSharp { vr.IsLockedByStatement = true; } } else { - if (!decl.Resolve (ec)) - return false; + if (decl.IsNested) { + decl.ResolveDeclaratorInitializer (ec); + } else { + if (!decl.Resolve (ec)) + return false; - if (decl.Declarators != null) { - stmt = decl.RewriteForDeclarators (ec, stmt); + if (decl.Declarators != null) { + stmt = decl.RewriteUsingDeclarators (ec, stmt); + } } vr = null; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs index c10d13f893..4e4b3dbb21 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/support.cs @@ -240,7 +240,7 @@ namespace Mono.CSharp { public char[] ReadChars (int fromPosition, int toPosition) { char[] chars = new char[toPosition - fromPosition]; - if (buffer_start <= fromPosition && toPosition < buffer_start + buffer.Length) { + if (buffer_start <= fromPosition && toPosition <= buffer_start + buffer.Length) { Array.Copy (buffer, fromPosition - buffer_start, chars, 0, chars.Length); } else { throw new NotImplementedException (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs index 2e2d17064d..708cace79d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/typemanager.cs @@ -310,9 +310,11 @@ namespace Mono.CSharp public readonly PredefinedMember ActivatorCreateInstance; public readonly PredefinedMember AsyncTaskMethodBuilderCreate; public readonly PredefinedMember AsyncTaskMethodBuilderSetResult; + public readonly PredefinedMember AsyncTaskMethodBuilderSetException; public readonly PredefinedMember AsyncTaskMethodBuilderTask; public readonly PredefinedMember AsyncTaskMethodBuilderGenericCreate; public readonly PredefinedMember AsyncTaskMethodBuilderGenericSetResult; + public readonly PredefinedMember AsyncTaskMethodBuilderGenericSetException; public readonly PredefinedMember AsyncTaskMethodBuilderGenericTask; public readonly PredefinedMember AsyncVoidMethodBuilderCreate; public readonly PredefinedMember AsyncVoidMethodBuilderSetException; @@ -366,6 +368,10 @@ namespace Mono.CSharp AsyncTaskMethodBuilderSetResult = new PredefinedMember (module, types.AsyncTaskMethodBuilder, MemberFilter.Method ("SetResult", 0, ParametersCompiled.EmptyReadOnlyParameters, btypes.Void)); + AsyncTaskMethodBuilderSetException = new PredefinedMember (module, types.AsyncTaskMethodBuilder, + MemberFilter.Method ("SetException", 0, + ParametersCompiled.CreateFullyResolved (btypes.Exception), btypes.Void)); + AsyncTaskMethodBuilderTask = new PredefinedMember (module, types.AsyncTaskMethodBuilder, MemberFilter.Property ("Task", null)); @@ -382,6 +388,10 @@ namespace Mono.CSharp new TypeParameterSpec (0, null, SpecialConstraint.None, Variance.None, null) }, false), btypes.Void)); + AsyncTaskMethodBuilderGenericSetException = new PredefinedMember (module, types.AsyncTaskMethodBuilderGeneric, + MemberFilter.Method ("SetException", 0, + ParametersCompiled.CreateFullyResolved (btypes.Exception), btypes.Void)); + AsyncTaskMethodBuilderGenericTask = new PredefinedMember (module, types.AsyncTaskMethodBuilderGeneric, MemberFilter.Property ("Task", null)); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs index 8c0a5ddc2f..5c8455224d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/typespec.cs @@ -6,6 +6,7 @@ // Dual licensed under the terms of the MIT X11 or GNU GPL // // Copyright 2010 Novell, Inc +// Copyright 2011 Xamarin, Inc (http://www.xamarin.com) // using System; @@ -464,12 +465,13 @@ namespace Mono.CSharp { var t = this; do { - if (t.Interfaces != null) { - foreach (TypeSpec i in t.Interfaces) { - if (i == iface || TypeSpecComparer.IsEqual (i, iface)) + var ifaces = t.Interfaces; + if (ifaces != null) { + for (int i = 0; i < ifaces.Count; ++i) { + if (TypeSpecComparer.IsEqual (ifaces[i], iface)) return true; - if (variantly && TypeSpecComparer.Variant.IsEqual (i, iface)) + if (variantly && TypeSpecComparer.Variant.IsEqual (ifaces[i], iface)) return true; } } @@ -535,6 +537,7 @@ namespace Mono.CSharp return ((TypeParameterSpec) t).IsReferenceType; case MemberKind.Struct: case MemberKind.Enum: + case MemberKind.Void: return false; case MemberKind.InternalCompilerType: // @@ -1016,10 +1019,11 @@ namespace Mono.CSharp } for (int i = 0; i < targs_definition.Length; ++i) { + if (TypeSpecComparer.IsEqual (t1_targs[i], t2_targs[i])) + continue; + Variance v = targs_definition[i].Variance; if (v == Variance.None) { - if (t1_targs[i] == t2_targs[i]) - continue; return false; } From 2cad4e33d0282898c18963480ed6adcdf45c4dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 15:09:26 +0200 Subject: [PATCH 44/92] fixed location bug. --- .../Parser/mcs/cs-parser.cs | 1247 +++++++++-------- .../Parser/mcs/cs-parser.jay | 7 +- 2 files changed, 628 insertions(+), 626 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 2d2bb1ddab..fe4c798634 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1611,7 +1611,7 @@ case 101: case_101(); break; case 102: -#line 978 "cs-parser.jay" +#line 979 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1623,13 +1623,13 @@ case 104: case_104(); break; case 107: -#line 1019 "cs-parser.jay" +#line 1020 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 108: -#line 1023 "cs-parser.jay" +#line 1024 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1638,7 +1638,7 @@ case 109: case_109(); break; case 110: -#line 1039 "cs-parser.jay" +#line 1040 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1662,7 +1662,7 @@ case 118: case_118(); break; case 119: -#line 1118 "cs-parser.jay" +#line 1119 "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"); } @@ -1674,13 +1674,13 @@ case 122: case_122(); break; case 125: -#line 1148 "cs-parser.jay" +#line 1149 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: -#line 1152 "cs-parser.jay" +#line 1153 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1689,7 +1689,7 @@ case 127: case_127(); break; case 128: -#line 1165 "cs-parser.jay" +#line 1166 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1698,13 +1698,13 @@ case 129: case_129(); break; case 132: -#line 1184 "cs-parser.jay" +#line 1185 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 133: -#line 1188 "cs-parser.jay" +#line 1189 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1713,7 +1713,7 @@ case 134: case_134(); break; case 135: -#line 1204 "cs-parser.jay" +#line 1205 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1734,13 +1734,13 @@ case 142: case_142(); break; case 143: -#line 1275 "cs-parser.jay" +#line 1276 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 144: -#line 1279 "cs-parser.jay" +#line 1280 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1749,7 +1749,7 @@ case 145: case_145(); break; case 146: -#line 1319 "cs-parser.jay" +#line 1320 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1758,7 +1758,7 @@ case 147: case_147(); break; case 148: -#line 1329 "cs-parser.jay" +#line 1330 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1770,11 +1770,11 @@ case 150: case_150(); break; case 152: -#line 1403 "cs-parser.jay" +#line 1404 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 153: -#line 1407 "cs-parser.jay" +#line 1408 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: @@ -1799,13 +1799,13 @@ case 161: case_161(); break; case 162: -#line 1479 "cs-parser.jay" +#line 1480 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 163: -#line 1483 "cs-parser.jay" +#line 1484 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1829,7 +1829,7 @@ case 169: case_169(); break; case 170: -#line 1558 "cs-parser.jay" +#line 1559 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1838,11 +1838,11 @@ case 171: case_171(); break; case 172: -#line 1599 "cs-parser.jay" +#line 1600 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 174: -#line 1607 "cs-parser.jay" +#line 1608 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1875,7 +1875,7 @@ case 183: case_183(); break; case 184: -#line 1696 "cs-parser.jay" +#line 1697 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1896,7 +1896,7 @@ case 189: case_189(); break; case 190: -#line 1750 "cs-parser.jay" +#line 1751 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1905,7 +1905,7 @@ case 191: case_191(); break; case 192: -#line 1779 "cs-parser.jay" +#line 1780 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1935,7 +1935,7 @@ case 205: case_205(); break; case 206: -#line 1928 "cs-parser.jay" +#line 1929 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1953,55 +1953,55 @@ case 210: case_210(); break; case 211: -#line 1965 "cs-parser.jay" +#line 1966 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1977 "cs-parser.jay" +#line 1978 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 1981 "cs-parser.jay" +#line 1982 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 1988 "cs-parser.jay" +#line 1989 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 1992 "cs-parser.jay" +#line 1993 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2000 "cs-parser.jay" +#line 2001 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2004 "cs-parser.jay" +#line 2005 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2008 "cs-parser.jay" +#line 2009 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2014 "cs-parser.jay" +#line 2015 "cs-parser.jay" { } break; @@ -2009,14 +2009,14 @@ case 226: case_226(); break; case 228: -#line 2047 "cs-parser.jay" +#line 2048 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2063 "cs-parser.jay" +#line 2064 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2025,95 +2025,95 @@ case 232: case_232(); break; case 234: -#line 2109 "cs-parser.jay" +#line 2110 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2110 "cs-parser.jay" +#line 2111 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2111 "cs-parser.jay" +#line 2112 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2112 "cs-parser.jay" +#line 2113 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2113 "cs-parser.jay" +#line 2114 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2114 "cs-parser.jay" +#line 2115 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2116 "cs-parser.jay" +#line 2117 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2117 "cs-parser.jay" +#line 2118 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2119 "cs-parser.jay" +#line 2120 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2120 "cs-parser.jay" +#line 2121 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2121 "cs-parser.jay" +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2122 "cs-parser.jay" +#line 2123 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2123 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2124 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2125 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2126 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2127 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2128 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2129 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2130 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2131 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2132 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2139 "cs-parser.jay" +#line 2140 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2122,7 +2122,7 @@ case 257: case_257(); break; case 258: -#line 2158 "cs-parser.jay" +#line 2159 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2149,11 +2149,11 @@ case 265: case_265(); break; case 267: -#line 2261 "cs-parser.jay" +#line 2262 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2273 "cs-parser.jay" +#line 2274 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2162,7 +2162,7 @@ case 271: case_271(); break; case 272: -#line 2283 "cs-parser.jay" +#line 2284 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2195,7 +2195,7 @@ case 281: case_281(); break; case 283: -#line 2392 "cs-parser.jay" +#line 2393 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2204,13 +2204,13 @@ case 284: case_284(); break; case 287: -#line 2409 "cs-parser.jay" +#line 2410 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2413 "cs-parser.jay" +#line 2414 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2219,7 +2219,7 @@ case 289: case_289(); break; case 290: -#line 2426 "cs-parser.jay" +#line 2427 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2231,7 +2231,7 @@ case 292: case_292(); break; case 293: -#line 2451 "cs-parser.jay" +#line 2452 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2279,7 +2279,7 @@ case 311: case_311(); break; case 314: -#line 2610 "cs-parser.jay" +#line 2611 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2297,7 +2297,7 @@ case 319: case_319(); break; case 320: -#line 2668 "cs-parser.jay" +#line 2669 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2306,7 +2306,7 @@ case 321: case_321(); break; case 322: -#line 2690 "cs-parser.jay" +#line 2691 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2339,7 +2339,7 @@ case 335: case_335(); break; case 336: -#line 2794 "cs-parser.jay" +#line 2795 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2384,13 +2384,13 @@ case 351: case_351(); break; case 353: -#line 2915 "cs-parser.jay" +#line 2916 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 354: -#line 2922 "cs-parser.jay" +#line 2923 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2405,7 +2405,7 @@ case 360: case_360(); break; case 362: -#line 2960 "cs-parser.jay" +#line 2961 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2414,7 +2414,7 @@ case 363: case_363(); break; case 364: -#line 2980 "cs-parser.jay" +#line 2981 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2423,13 +2423,13 @@ case 365: case_365(); break; case 366: -#line 2989 "cs-parser.jay" +#line 2990 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 367: -#line 2993 "cs-parser.jay" +#line 2994 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2447,63 +2447,63 @@ case 371: case_371(); break; case 372: -#line 3032 "cs-parser.jay" +#line 3033 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 373: -#line 3033 "cs-parser.jay" +#line 3034 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3034 "cs-parser.jay" +#line 3035 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3035 "cs-parser.jay" +#line 3036 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3036 "cs-parser.jay" +#line 3037 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3037 "cs-parser.jay" +#line 3038 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 379: -#line 3042 "cs-parser.jay" +#line 3043 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3043 "cs-parser.jay" +#line 3044 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3044 "cs-parser.jay" +#line 3045 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3045 "cs-parser.jay" +#line 3046 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3046 "cs-parser.jay" +#line 3047 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3047 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3048 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3049 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3050 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 408: @@ -2513,22 +2513,22 @@ case 409: case_409(); break; case 413: -#line 3097 "cs-parser.jay" +#line 3098 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 414: -#line 3101 "cs-parser.jay" +#line 3102 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3102 "cs-parser.jay" +#line 3103 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 420: case_420(); break; case 421: -#line 3135 "cs-parser.jay" +#line 3136 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2546,7 +2546,7 @@ case 425: case_425(); break; case 426: -#line 3167 "cs-parser.jay" +#line 3168 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2555,7 +2555,7 @@ case 427: case_427(); break; case 428: -#line 3175 "cs-parser.jay" +#line 3176 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2567,7 +2567,7 @@ case 430: case_430(); break; case 431: -#line 3191 "cs-parser.jay" +#line 3192 "cs-parser.jay" { yyVal = null; } break; case 433: @@ -2577,11 +2577,11 @@ case 434: case_434(); break; case 435: -#line 3214 "cs-parser.jay" +#line 3215 "cs-parser.jay" { yyVal = null; } break; case 436: -#line 3218 "cs-parser.jay" +#line 3219 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2599,7 +2599,7 @@ case 440: case_440(); break; case 441: -#line 3251 "cs-parser.jay" +#line 3252 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2614,7 +2614,7 @@ case 444: case_444(); break; case 447: -#line 3279 "cs-parser.jay" +#line 3280 "cs-parser.jay" { yyVal = null; } break; case 449: @@ -2633,7 +2633,7 @@ case 453: case_453(); break; case 454: -#line 3331 "cs-parser.jay" +#line 3332 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2669,13 +2669,13 @@ case 468: case_468(); break; case 469: -#line 3418 "cs-parser.jay" +#line 3419 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 471: -#line 3426 "cs-parser.jay" +#line 3427 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2687,13 +2687,13 @@ case 473: case_473(); break; case 474: -#line 3446 "cs-parser.jay" +#line 3447 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 475: -#line 3453 "cs-parser.jay" +#line 3454 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2720,7 +2720,7 @@ case 482: case_482(); break; case 483: -#line 3519 "cs-parser.jay" +#line 3520 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2732,7 +2732,7 @@ case 485: case_485(); break; case 488: -#line 3546 "cs-parser.jay" +#line 3547 "cs-parser.jay" { yyVal = null; } break; case 490: @@ -2763,25 +2763,25 @@ case 501: case_501(); break; case 502: -#line 3624 "cs-parser.jay" +#line 3625 "cs-parser.jay" { yyVal = 2; } break; case 503: -#line 3628 "cs-parser.jay" +#line 3629 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 504: -#line 3635 "cs-parser.jay" +#line 3636 "cs-parser.jay" { yyVal = null; } break; case 505: -#line 3639 "cs-parser.jay" +#line 3640 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2799,7 +2799,7 @@ case 509: case_509(); break; case 510: -#line 3683 "cs-parser.jay" +#line 3684 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2844,7 +2844,7 @@ case 525: case_525(); break; case 526: -#line 3797 "cs-parser.jay" +#line 3798 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2853,25 +2853,25 @@ case 527: case_527(); break; case 528: -#line 3810 "cs-parser.jay" +#line 3811 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 529: -#line 3814 "cs-parser.jay" +#line 3815 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 530: -#line 3821 "cs-parser.jay" +#line 3822 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 532: -#line 3829 "cs-parser.jay" +#line 3830 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2883,13 +2883,13 @@ case 534: case_534(); break; case 536: -#line 3855 "cs-parser.jay" +#line 3856 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 537: -#line 3859 "cs-parser.jay" +#line 3860 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2901,37 +2901,37 @@ case 541: case_541(); break; case 543: -#line 3889 "cs-parser.jay" +#line 3890 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 544: -#line 3893 "cs-parser.jay" +#line 3894 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3897 "cs-parser.jay" +#line 3898 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3901 "cs-parser.jay" +#line 3902 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3905 "cs-parser.jay" +#line 3906 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3909 "cs-parser.jay" +#line 3910 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2949,7 +2949,7 @@ case 554: case_554(); break; case 555: -#line 3941 "cs-parser.jay" +#line 3942 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2958,13 +2958,13 @@ case 556: case_556(); break; case 557: -#line 3950 "cs-parser.jay" +#line 3951 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 558: -#line 3954 "cs-parser.jay" +#line 3955 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3015,7 +3015,7 @@ case 583: case_583(); break; case 584: -#line 4078 "cs-parser.jay" +#line 4079 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3066,14 +3066,14 @@ case 599: case_599(); break; case 600: -#line 4175 "cs-parser.jay" +#line 4176 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 601: case_601(); break; case 604: -#line 4190 "cs-parser.jay" +#line 4191 "cs-parser.jay" { start_block (lexer.Location); } @@ -3097,7 +3097,7 @@ case 611: case_611(); break; case 612: -#line 4235 "cs-parser.jay" +#line 4236 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3109,7 +3109,7 @@ case 614: case_614(); break; case 615: -#line 4249 "cs-parser.jay" +#line 4250 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3121,7 +3121,7 @@ case 617: case_617(); break; case 623: -#line 4274 "cs-parser.jay" +#line 4275 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3136,13 +3136,13 @@ case 626: case_626(); break; case 628: -#line 4303 "cs-parser.jay" +#line 4304 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 629: -#line 4316 "cs-parser.jay" +#line 4317 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3160,18 +3160,18 @@ case 633: case_633(); break; case 634: -#line 4359 "cs-parser.jay" +#line 4360 "cs-parser.jay" { yyVal = null; } break; case 635: -#line 4361 "cs-parser.jay" +#line 4362 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 636: case_636(); break; case 637: -#line 4374 "cs-parser.jay" +#line 4375 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3228,7 +3228,7 @@ case 656: case_656(); break; case 658: -#line 4494 "cs-parser.jay" +#line 4495 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3258,19 +3258,19 @@ case 666: case_666(); break; case 667: -#line 4584 "cs-parser.jay" +#line 4585 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 668: -#line 4588 "cs-parser.jay" +#line 4589 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4595 "cs-parser.jay" +#line 4596 "cs-parser.jay" { yyVal = Variance.None; } @@ -3288,7 +3288,7 @@ case 673: case_673(); break; case 674: -#line 4640 "cs-parser.jay" +#line 4641 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3306,13 +3306,13 @@ case 678: case_678(); break; case 683: -#line 4684 "cs-parser.jay" +#line 4685 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 684: -#line 4688 "cs-parser.jay" +#line 4689 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3321,13 +3321,13 @@ case 686: case_686(); break; case 689: -#line 4712 "cs-parser.jay" +#line 4713 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 690: -#line 4716 "cs-parser.jay" +#line 4717 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3360,13 +3360,13 @@ case 729: case_729(); break; case 730: -#line 4860 "cs-parser.jay" +#line 4861 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 731: -#line 4864 "cs-parser.jay" +#line 4865 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3378,7 +3378,7 @@ case 734: case_734(); break; case 735: -#line 4885 "cs-parser.jay" +#line 4886 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3411,7 +3411,7 @@ case 750: case_750(); break; case 751: -#line 4985 "cs-parser.jay" +#line 4986 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3432,15 +3432,15 @@ case 761: case_761(); break; case 762: -#line 5035 "cs-parser.jay" +#line 5036 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 763: -#line 5039 "cs-parser.jay" +#line 5040 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5040 "cs-parser.jay" +#line 5041 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: @@ -3459,7 +3459,7 @@ case 771: case_771(); break; case 772: -#line 5108 "cs-parser.jay" +#line 5109 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3480,13 +3480,13 @@ case 778: case_778(); break; case 779: -#line 5152 "cs-parser.jay" +#line 5153 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 780: -#line 5156 "cs-parser.jay" +#line 5157 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3501,7 +3501,7 @@ case 783: case_783(); break; case 784: -#line 5185 "cs-parser.jay" +#line 5186 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3516,7 +3516,7 @@ case 791: case_791(); break; case 792: -#line 5224 "cs-parser.jay" +#line 5225 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3528,7 +3528,7 @@ case 794: case_794(); break; case 795: -#line 5252 "cs-parser.jay" +#line 5253 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 797: @@ -3538,11 +3538,11 @@ case 798: case_798(); break; case 800: -#line 5273 "cs-parser.jay" +#line 5274 "cs-parser.jay" { yyVal = null; } break; case 802: -#line 5278 "cs-parser.jay" +#line 5279 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 806: @@ -3585,7 +3585,7 @@ case 824: case_824(); break; case 827: -#line 5433 "cs-parser.jay" +#line 5434 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3606,7 +3606,7 @@ case 832: case_832(); break; case 835: -#line 5486 "cs-parser.jay" +#line 5487 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3615,7 +3615,7 @@ case 836: case_836(); break; case 837: -#line 5505 "cs-parser.jay" +#line 5506 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3624,13 +3624,13 @@ case 838: case_838(); break; case 839: -#line 5523 "cs-parser.jay" +#line 5524 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 840: -#line 5530 "cs-parser.jay" +#line 5531 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3639,7 +3639,7 @@ case 841: case_841(); break; case 842: -#line 5540 "cs-parser.jay" +#line 5541 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3669,7 +3669,7 @@ case 850: case_850(); break; case 851: -#line 5623 "cs-parser.jay" +#line 5624 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3702,7 +3702,7 @@ case 860: case_860(); break; case 861: -#line 5723 "cs-parser.jay" +#line 5724 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3711,7 +3711,7 @@ case 862: case_862(); break; case 863: -#line 5738 "cs-parser.jay" +#line 5739 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3726,7 +3726,7 @@ case 867: case_867(); break; case 868: -#line 5783 "cs-parser.jay" +#line 5784 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3747,7 +3747,7 @@ case 876: case_876(); break; case 882: -#line 5842 "cs-parser.jay" +#line 5843 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3756,7 +3756,7 @@ case 883: case_883(); break; case 884: -#line 5861 "cs-parser.jay" +#line 5862 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3789,13 +3789,13 @@ case 893: case_893(); break; case 895: -#line 6005 "cs-parser.jay" +#line 6006 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 896: -#line 6012 "cs-parser.jay" +#line 6013 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3816,7 +3816,7 @@ case 903: case_903(); break; case 904: -#line 6058 "cs-parser.jay" +#line 6059 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3828,7 +3828,7 @@ case 906: case_906(); break; case 907: -#line 6075 "cs-parser.jay" +#line 6076 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3852,13 +3852,13 @@ case 916: case_916(); break; case 924: -#line 6199 "cs-parser.jay" +#line 6200 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 925: -#line 6206 "cs-parser.jay" +#line 6207 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3870,13 +3870,13 @@ case 927: case_927(); break; case 928: -#line 6223 "cs-parser.jay" +#line 6224 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 929: -#line 6227 "cs-parser.jay" +#line 6228 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3894,25 +3894,25 @@ case 933: case_933(); break; case 935: -#line 6263 "cs-parser.jay" +#line 6264 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 937: -#line 6271 "cs-parser.jay" +#line 6272 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 938: -#line 6275 "cs-parser.jay" +#line 6276 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 939: -#line 6282 "cs-parser.jay" +#line 6283 "cs-parser.jay" { yyVal = new List (0); } @@ -4376,21 +4376,22 @@ void case_99() void case_100() #line 964 "cs-parser.jay" { + lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_101() -#line 970 "cs-parser.jay" +#line 971 "cs-parser.jay" { - if (yyVals[-3+yyTop] != null) - current_class.OptionalSemicolon = GetLocation (yyVals[-3+yyTop]); + if (yyVals[-1+yyTop] != null) + current_class.OptionalSemicolon = GetLocation (yyVals[-1+yyTop]); yyVal = pop_current_class (); } void case_103() -#line 985 "cs-parser.jay" +#line 986 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4405,7 +4406,7 @@ void case_103() } void case_104() -#line 998 "cs-parser.jay" +#line 999 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4418,7 +4419,7 @@ void case_104() } void case_109() -#line 1028 "cs-parser.jay" +#line 1029 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4426,7 +4427,7 @@ void case_109() } void case_111() -#line 1041 "cs-parser.jay" +#line 1042 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4434,14 +4435,14 @@ void case_111() } void case_112() -#line 1047 "cs-parser.jay" +#line 1048 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_115() -#line 1062 "cs-parser.jay" +#line 1063 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4456,7 +4457,7 @@ void case_115() } void case_116() -#line 1077 "cs-parser.jay" +#line 1078 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4469,7 +4470,7 @@ void case_116() } void case_117() -#line 1090 "cs-parser.jay" +#line 1091 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4482,7 +4483,7 @@ void case_117() } void case_118() -#line 1101 "cs-parser.jay" +#line 1102 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4496,7 +4497,7 @@ void case_118() } void case_121() -#line 1124 "cs-parser.jay" +#line 1125 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4504,7 +4505,7 @@ void case_121() } void case_122() -#line 1130 "cs-parser.jay" +#line 1131 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4514,7 +4515,7 @@ void case_122() } void case_127() -#line 1157 "cs-parser.jay" +#line 1158 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4522,7 +4523,7 @@ void case_127() } void case_129() -#line 1167 "cs-parser.jay" +#line 1168 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4531,7 +4532,7 @@ void case_129() } void case_134() -#line 1193 "cs-parser.jay" +#line 1194 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4539,7 +4540,7 @@ void case_134() } void case_136() -#line 1206 "cs-parser.jay" +#line 1207 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4547,14 +4548,14 @@ void case_136() } void case_137() -#line 1212 "cs-parser.jay" +#line 1213 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_140() -#line 1222 "cs-parser.jay" +#line 1223 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4562,7 +4563,7 @@ void case_140() } void case_141() -#line 1231 "cs-parser.jay" +#line 1232 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4574,7 +4575,7 @@ void case_141() } void case_142() -#line 1241 "cs-parser.jay" +#line 1242 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4602,7 +4603,7 @@ void case_142() } void case_145() -#line 1281 "cs-parser.jay" +#line 1282 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4637,14 +4638,14 @@ void case_145() } void case_147() -#line 1322 "cs-parser.jay" +#line 1323 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_149() -#line 1331 "cs-parser.jay" +#line 1332 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4696,7 +4697,7 @@ void case_149() } void case_150() -#line 1384 "cs-parser.jay" +#line 1385 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4714,7 +4715,7 @@ void case_150() } void case_155() -#line 1413 "cs-parser.jay" +#line 1414 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4722,7 +4723,7 @@ void case_155() } void case_156() -#line 1419 "cs-parser.jay" +#line 1420 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4733,7 +4734,7 @@ void case_156() } void case_157() -#line 1428 "cs-parser.jay" +#line 1429 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4744,7 +4745,7 @@ void case_157() } void case_158() -#line 1437 "cs-parser.jay" +#line 1438 "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"); @@ -4754,7 +4755,7 @@ void case_158() } void case_159() -#line 1445 "cs-parser.jay" +#line 1446 "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"); @@ -4769,7 +4770,7 @@ void case_159() } void case_160() -#line 1458 "cs-parser.jay" +#line 1459 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4778,7 +4779,7 @@ void case_160() } void case_161() -#line 1465 "cs-parser.jay" +#line 1466 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4792,14 +4793,14 @@ void case_161() } void case_164() -#line 1485 "cs-parser.jay" +#line 1486 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_165() -#line 1493 "cs-parser.jay" +#line 1494 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4810,7 +4811,7 @@ void case_165() } void case_166() -#line 1502 "cs-parser.jay" +#line 1503 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4830,7 +4831,7 @@ void case_166() } void case_167() -#line 1526 "cs-parser.jay" +#line 1527 "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); @@ -4838,7 +4839,7 @@ void case_167() } void case_168() -#line 1535 "cs-parser.jay" +#line 1536 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4847,7 +4848,7 @@ void case_168() } void case_169() -#line 1545 "cs-parser.jay" +#line 1546 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4856,7 +4857,7 @@ void case_169() } void case_171() -#line 1560 "cs-parser.jay" +#line 1561 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4895,7 +4896,7 @@ void case_171() } void case_175() -#line 1609 "cs-parser.jay" +#line 1610 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4918,7 +4919,7 @@ void case_175() } void case_176() -#line 1633 "cs-parser.jay" +#line 1634 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4927,7 +4928,7 @@ void case_176() } void case_177() -#line 1640 "cs-parser.jay" +#line 1641 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4936,7 +4937,7 @@ void case_177() } void case_178() -#line 1647 "cs-parser.jay" +#line 1648 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4948,14 +4949,14 @@ void case_178() } void case_179() -#line 1660 "cs-parser.jay" +#line 1661 "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_180() -#line 1665 "cs-parser.jay" +#line 1666 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4964,21 +4965,21 @@ void case_180() } void case_181() -#line 1672 "cs-parser.jay" +#line 1673 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1680 "cs-parser.jay" +#line 1681 "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"); } void case_183() -#line 1685 "cs-parser.jay" +#line 1686 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4989,21 +4990,21 @@ void case_183() } void case_185() -#line 1701 "cs-parser.jay" +#line 1702 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1712 "cs-parser.jay" +#line 1713 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1717 "cs-parser.jay" +#line 1718 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5019,7 +5020,7 @@ void case_187() } void case_188() -#line 1731 "cs-parser.jay" +#line 1732 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5028,14 +5029,14 @@ void case_188() } void case_189() -#line 1738 "cs-parser.jay" +#line 1739 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1752 "cs-parser.jay" +#line 1753 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5062,7 +5063,7 @@ void case_191() } void case_193() -#line 1781 "cs-parser.jay" +#line 1782 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5075,7 +5076,7 @@ void case_193() } void case_198() -#line 1800 "cs-parser.jay" +#line 1801 "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 ()); @@ -5088,7 +5089,7 @@ void case_198() } void case_199() -#line 1814 "cs-parser.jay" +#line 1815 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5111,7 +5112,7 @@ void case_199() } void case_200() -#line 1835 "cs-parser.jay" +#line 1836 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5134,7 +5135,7 @@ void case_200() } void case_201() -#line 1859 "cs-parser.jay" +#line 1860 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5162,7 +5163,7 @@ void case_201() } void case_202() -#line 1885 "cs-parser.jay" +#line 1886 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5185,21 +5186,21 @@ void case_202() } void case_204() -#line 1910 "cs-parser.jay" +#line 1911 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1915 "cs-parser.jay" +#line 1916 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1930 "cs-parser.jay" +#line 1931 "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]); @@ -5207,7 +5208,7 @@ void case_207() } void case_208() -#line 1937 "cs-parser.jay" +#line 1938 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5222,7 +5223,7 @@ void case_208() } void case_209() -#line 1950 "cs-parser.jay" +#line 1951 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5230,7 +5231,7 @@ void case_209() } void case_210() -#line 1956 "cs-parser.jay" +#line 1957 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5239,7 +5240,7 @@ void case_210() } void case_226() -#line 2016 "cs-parser.jay" +#line 2017 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5269,14 +5270,14 @@ void case_226() } void case_230() -#line 2053 "cs-parser.jay" +#line 2054 "cs-parser.jay" { 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_232() -#line 2065 "cs-parser.jay" +#line 2066 "cs-parser.jay" { valid_param_mod = 0; @@ -5318,7 +5319,7 @@ void case_232() } void case_257() -#line 2141 "cs-parser.jay" +#line 2142 "cs-parser.jay" { valid_param_mod = 0; @@ -5335,7 +5336,7 @@ void case_257() } void case_259() -#line 2160 "cs-parser.jay" +#line 2161 "cs-parser.jay" { valid_param_mod = 0; @@ -5352,7 +5353,7 @@ void case_259() } void case_260() -#line 2175 "cs-parser.jay" +#line 2176 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5360,7 +5361,7 @@ void case_260() } void case_261() -#line 2181 "cs-parser.jay" +#line 2182 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5368,7 +5369,7 @@ void case_261() } void case_262() -#line 2191 "cs-parser.jay" +#line 2192 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5384,7 +5385,7 @@ void case_262() } void case_263() -#line 2210 "cs-parser.jay" +#line 2211 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5395,7 +5396,7 @@ void case_263() } void case_264() -#line 2219 "cs-parser.jay" +#line 2220 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5408,7 +5409,7 @@ void case_264() } void case_265() -#line 2230 "cs-parser.jay" +#line 2231 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5438,7 +5439,7 @@ void case_265() } void case_271() -#line 2275 "cs-parser.jay" +#line 2276 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5446,7 +5447,7 @@ void case_271() } void case_273() -#line 2285 "cs-parser.jay" +#line 2286 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5454,14 +5455,14 @@ void case_273() } void case_274() -#line 2291 "cs-parser.jay" +#line 2292 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2299 "cs-parser.jay" +#line 2300 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5472,7 +5473,7 @@ void case_275() } void case_276() -#line 2308 "cs-parser.jay" +#line 2309 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5494,7 +5495,7 @@ void case_276() } void case_277() -#line 2333 "cs-parser.jay" +#line 2334 "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); @@ -5508,7 +5509,7 @@ void case_277() } void case_278() -#line 2347 "cs-parser.jay" +#line 2348 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5520,7 +5521,7 @@ void case_278() } void case_279() -#line 2360 "cs-parser.jay" +#line 2361 "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); @@ -5530,7 +5531,7 @@ void case_279() } void case_280() -#line 2368 "cs-parser.jay" +#line 2369 "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"); @@ -5539,7 +5540,7 @@ void case_280() } void case_281() -#line 2375 "cs-parser.jay" +#line 2376 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5552,14 +5553,14 @@ void case_281() } void case_284() -#line 2394 "cs-parser.jay" +#line 2395 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2418 "cs-parser.jay" +#line 2419 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5567,7 +5568,7 @@ void case_289() } void case_291() -#line 2428 "cs-parser.jay" +#line 2429 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5576,7 +5577,7 @@ void case_291() } void case_292() -#line 2437 "cs-parser.jay" +#line 2438 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5590,28 +5591,28 @@ void case_292() } void case_296() -#line 2458 "cs-parser.jay" +#line 2459 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2463 "cs-parser.jay" +#line 2464 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2468 "cs-parser.jay" +#line 2469 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2476 "cs-parser.jay" +#line 2477 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5625,7 +5626,7 @@ void case_299() } void case_300() -#line 2488 "cs-parser.jay" +#line 2489 "cs-parser.jay" { lexer.EventParsing = true; @@ -5640,7 +5641,7 @@ void case_300() } void case_301() -#line 2504 "cs-parser.jay" +#line 2505 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5654,7 +5655,7 @@ void case_301() } void case_302() -#line 2516 "cs-parser.jay" +#line 2517 "cs-parser.jay" { lexer.EventParsing = true; @@ -5669,14 +5670,14 @@ void case_302() } void case_303() -#line 2532 "cs-parser.jay" +#line 2533 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_305() -#line 2544 "cs-parser.jay" +#line 2545 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-2+yyTop])); if (doc_support) @@ -5684,7 +5685,7 @@ void case_305() } void case_306() -#line 2550 "cs-parser.jay" +#line 2551 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5699,7 +5700,7 @@ void case_306() } void case_307() -#line 2563 "cs-parser.jay" +#line 2564 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5707,7 +5708,7 @@ void case_307() } void case_308() -#line 2569 "cs-parser.jay" +#line 2570 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5723,7 +5724,7 @@ void case_308() } void case_310() -#line 2587 "cs-parser.jay" +#line 2588 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5736,21 +5737,21 @@ void case_310() } void case_311() -#line 2598 "cs-parser.jay" +#line 2599 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_316() -#line 2616 "cs-parser.jay" +#line 2617 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_317() -#line 2624 "cs-parser.jay" +#line 2625 "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]); @@ -5765,7 +5766,7 @@ void case_317() } void case_318() -#line 2637 "cs-parser.jay" +#line 2638 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5775,7 +5776,7 @@ void case_318() } void case_319() -#line 2645 "cs-parser.jay" +#line 2646 "cs-parser.jay" { --lexer.parsing_block; @@ -5791,7 +5792,7 @@ void case_319() } void case_321() -#line 2670 "cs-parser.jay" +#line 2671 "cs-parser.jay" { valid_param_mod = 0; @@ -5811,7 +5812,7 @@ void case_321() } void case_323() -#line 2692 "cs-parser.jay" +#line 2693 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5827,7 +5828,7 @@ void case_323() } void case_325() -#line 2710 "cs-parser.jay" +#line 2711 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5836,7 +5837,7 @@ void case_325() } void case_327() -#line 2721 "cs-parser.jay" +#line 2722 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5845,7 +5846,7 @@ void case_327() } void case_329() -#line 2732 "cs-parser.jay" +#line 2733 "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); @@ -5853,14 +5854,14 @@ void case_329() } void case_330() -#line 2741 "cs-parser.jay" +#line 2742 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_332() -#line 2753 "cs-parser.jay" +#line 2754 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5873,14 +5874,14 @@ void case_332() } void case_333() -#line 2764 "cs-parser.jay" +#line 2765 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_334() -#line 2772 "cs-parser.jay" +#line 2773 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5889,7 +5890,7 @@ void case_334() } void case_335() -#line 2779 "cs-parser.jay" +#line 2780 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5898,7 +5899,7 @@ void case_335() } void case_337() -#line 2796 "cs-parser.jay" +#line 2797 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5906,7 +5907,7 @@ void case_337() } void case_338() -#line 2805 "cs-parser.jay" +#line 2806 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5915,7 +5916,7 @@ void case_338() } void case_340() -#line 2816 "cs-parser.jay" +#line 2817 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5923,21 +5924,21 @@ void case_340() } void case_341() -#line 2825 "cs-parser.jay" +#line 2826 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_342() -#line 2830 "cs-parser.jay" +#line 2831 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_343() -#line 2838 "cs-parser.jay" +#line 2839 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5945,7 +5946,7 @@ void case_343() } void case_344() -#line 2844 "cs-parser.jay" +#line 2845 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5955,7 +5956,7 @@ void case_344() } void case_345() -#line 2852 "cs-parser.jay" +#line 2853 "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); @@ -5963,7 +5964,7 @@ void case_345() } void case_347() -#line 2862 "cs-parser.jay" +#line 2863 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5973,7 +5974,7 @@ void case_347() } void case_348() -#line 2873 "cs-parser.jay" +#line 2874 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5981,7 +5982,7 @@ void case_348() } void case_349() -#line 2879 "cs-parser.jay" +#line 2880 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5990,7 +5991,7 @@ void case_349() } void case_350() -#line 2889 "cs-parser.jay" +#line 2890 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6000,7 +6001,7 @@ void case_350() } void case_351() -#line 2897 "cs-parser.jay" +#line 2898 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6011,28 +6012,28 @@ void case_351() } void case_356() -#line 2931 "cs-parser.jay" +#line 2932 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_358() -#line 2940 "cs-parser.jay" +#line 2941 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_360() -#line 2949 "cs-parser.jay" +#line 2950 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_363() -#line 2965 "cs-parser.jay" +#line 2966 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6047,14 +6048,14 @@ void case_363() } void case_365() -#line 2982 "cs-parser.jay" +#line 2983 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_368() -#line 2998 "cs-parser.jay" +#line 2999 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6062,7 +6063,7 @@ void case_368() } void case_369() -#line 3004 "cs-parser.jay" +#line 3005 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6071,7 +6072,7 @@ void case_369() } void case_370() -#line 3014 "cs-parser.jay" +#line 3015 "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 ()); @@ -6080,35 +6081,35 @@ void case_370() } void case_371() -#line 3021 "cs-parser.jay" +#line 3022 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_408() -#line 3083 "cs-parser.jay" +#line 3084 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_409() -#line 3087 "cs-parser.jay" +#line 3088 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_420() -#line 3128 "cs-parser.jay" +#line 3129 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_422() -#line 3140 "cs-parser.jay" +#line 3141 "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); @@ -6116,7 +6117,7 @@ void case_422() } void case_423() -#line 3146 "cs-parser.jay" +#line 3147 "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); @@ -6124,7 +6125,7 @@ void case_423() } void case_424() -#line 3152 "cs-parser.jay" +#line 3153 "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); @@ -6132,7 +6133,7 @@ void case_424() } void case_425() -#line 3158 "cs-parser.jay" +#line 3159 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6142,28 +6143,28 @@ void case_425() } void case_427() -#line 3168 "cs-parser.jay" +#line 3169 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_429() -#line 3176 "cs-parser.jay" +#line 3177 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3184 "cs-parser.jay" +#line 3185 "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_433() -#line 3197 "cs-parser.jay" +#line 3198 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6175,14 +6176,14 @@ void case_433() } void case_434() -#line 3207 "cs-parser.jay" +#line 3208 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3223 "cs-parser.jay" +#line 3224 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6190,7 +6191,7 @@ void case_437() } void case_438() -#line 3229 "cs-parser.jay" +#line 3230 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6199,14 +6200,14 @@ void case_438() } void case_439() -#line 3235 "cs-parser.jay" +#line 3236 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_440() -#line 3243 "cs-parser.jay" +#line 3244 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6214,7 +6215,7 @@ void case_440() } void case_442() -#line 3252 "cs-parser.jay" +#line 3253 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6224,7 +6225,7 @@ void case_442() } void case_443() -#line 3260 "cs-parser.jay" +#line 3261 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6233,14 +6234,14 @@ void case_443() } void case_444() -#line 3267 "cs-parser.jay" +#line 3268 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_449() -#line 3285 "cs-parser.jay" +#line 3286 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6248,7 +6249,7 @@ void case_449() } void case_450() -#line 3291 "cs-parser.jay" +#line 3292 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6260,7 +6261,7 @@ void case_450() } void case_451() -#line 3301 "cs-parser.jay" +#line 3302 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6277,56 +6278,56 @@ void case_451() } void case_452() -#line 3316 "cs-parser.jay" +#line 3317 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_453() -#line 3321 "cs-parser.jay" +#line 3322 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_458() -#line 3342 "cs-parser.jay" +#line 3343 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_459() -#line 3347 "cs-parser.jay" +#line 3348 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3352 "cs-parser.jay" +#line 3353 "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_461() -#line 3357 "cs-parser.jay" +#line 3358 "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_463() -#line 3369 "cs-parser.jay" +#line 3370 "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_464() -#line 3377 "cs-parser.jay" +#line 3378 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6334,7 +6335,7 @@ void case_464() } void case_465() -#line 3383 "cs-parser.jay" +#line 3384 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6343,14 +6344,14 @@ void case_465() } void case_466() -#line 3389 "cs-parser.jay" +#line 3390 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_467() -#line 3397 "cs-parser.jay" +#line 3398 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6358,7 +6359,7 @@ void case_467() } void case_468() -#line 3403 "cs-parser.jay" +#line 3404 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6370,21 +6371,21 @@ void case_468() } void case_472() -#line 3431 "cs-parser.jay" +#line 3432 "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_473() -#line 3436 "cs-parser.jay" +#line 3437 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_476() -#line 3458 "cs-parser.jay" +#line 3459 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6399,7 +6400,7 @@ void case_476() } void case_477() -#line 3471 "cs-parser.jay" +#line 3472 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6408,7 +6409,7 @@ void case_477() } void case_478() -#line 3483 "cs-parser.jay" +#line 3484 "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])) { @@ -6418,7 +6419,7 @@ void case_478() } void case_479() -#line 3491 "cs-parser.jay" +#line 3492 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6427,7 +6428,7 @@ void case_479() } void case_480() -#line 3498 "cs-parser.jay" +#line 3499 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6436,28 +6437,28 @@ void case_480() } void case_481() -#line 3505 "cs-parser.jay" +#line 3506 "cs-parser.jay" { 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_482() -#line 3510 "cs-parser.jay" +#line 3511 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_484() -#line 3521 "cs-parser.jay" +#line 3522 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_485() -#line 3529 "cs-parser.jay" +#line 3530 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6469,7 +6470,7 @@ void case_485() } void case_490() -#line 3552 "cs-parser.jay" +#line 3553 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6477,7 +6478,7 @@ void case_490() } void case_491() -#line 3558 "cs-parser.jay" +#line 3559 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6487,7 +6488,7 @@ void case_491() } void case_492() -#line 3569 "cs-parser.jay" +#line 3570 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6495,7 +6496,7 @@ void case_492() } void case_493() -#line 3575 "cs-parser.jay" +#line 3576 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6503,14 +6504,14 @@ void case_493() } void case_494() -#line 3581 "cs-parser.jay" +#line 3582 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_495() -#line 3586 "cs-parser.jay" +#line 3587 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6518,28 +6519,28 @@ void case_495() } void case_499() -#line 3601 "cs-parser.jay" +#line 3602 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_500() -#line 3609 "cs-parser.jay" +#line 3610 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_501() -#line 3614 "cs-parser.jay" +#line 3615 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_506() -#line 3644 "cs-parser.jay" +#line 3645 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6548,7 +6549,7 @@ void case_506() } void case_507() -#line 3651 "cs-parser.jay" +#line 3652 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6561,7 +6562,7 @@ void case_507() } void case_508() -#line 3665 "cs-parser.jay" +#line 3666 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6569,7 +6570,7 @@ void case_508() } void case_509() -#line 3671 "cs-parser.jay" +#line 3672 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6578,7 +6579,7 @@ void case_509() } void case_511() -#line 3685 "cs-parser.jay" +#line 3686 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6586,14 +6587,14 @@ void case_511() } void case_514() -#line 3696 "cs-parser.jay" +#line 3697 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_515() -#line 3704 "cs-parser.jay" +#line 3705 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6601,7 +6602,7 @@ void case_515() } void case_516() -#line 3710 "cs-parser.jay" +#line 3711 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6611,7 +6612,7 @@ void case_516() } void case_517() -#line 3718 "cs-parser.jay" +#line 3719 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6619,7 +6620,7 @@ void case_517() } void case_518() -#line 3724 "cs-parser.jay" +#line 3725 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6627,7 +6628,7 @@ void case_518() } void case_519() -#line 3730 "cs-parser.jay" +#line 3731 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (lbag); if (te.HasTypeArguments) @@ -6638,7 +6639,7 @@ void case_519() } void case_520() -#line 3742 "cs-parser.jay" +#line 3743 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6647,7 +6648,7 @@ void case_520() } void case_521() -#line 3752 "cs-parser.jay" +#line 3753 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6657,35 +6658,35 @@ void case_521() } void case_522() -#line 3763 "cs-parser.jay" +#line 3764 "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_523() -#line 3771 "cs-parser.jay" +#line 3772 "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_524() -#line 3779 "cs-parser.jay" +#line 3780 "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_525() -#line 3787 "cs-parser.jay" +#line 3788 "cs-parser.jay" { 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_527() -#line 3799 "cs-parser.jay" +#line 3800 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6696,7 +6697,7 @@ void case_527() } void case_533() -#line 3831 "cs-parser.jay" +#line 3832 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6705,7 +6706,7 @@ void case_533() } void case_534() -#line 3841 "cs-parser.jay" +#line 3842 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6715,147 +6716,147 @@ void case_534() } void case_540() -#line 3866 "cs-parser.jay" +#line 3867 "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_541() -#line 3874 "cs-parser.jay" +#line 3875 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_550() -#line 3915 "cs-parser.jay" +#line 3916 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3920 "cs-parser.jay" +#line 3921 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3925 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_554() -#line 3934 "cs-parser.jay" +#line 3935 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_556() -#line 3943 "cs-parser.jay" +#line 3944 "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_560() -#line 3960 "cs-parser.jay" +#line 3961 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_561() -#line 3965 "cs-parser.jay" +#line 3966 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_563() -#line 3974 "cs-parser.jay" +#line 3975 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 3979 "cs-parser.jay" +#line 3980 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3984 "cs-parser.jay" +#line 3985 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3989 "cs-parser.jay" +#line 3990 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_568() -#line 3998 "cs-parser.jay" +#line 3999 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4003 "cs-parser.jay" +#line 4004 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 4012 "cs-parser.jay" +#line 4013 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_573() -#line 4021 "cs-parser.jay" +#line 4022 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_575() -#line 4030 "cs-parser.jay" +#line 4031 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_577() -#line 4039 "cs-parser.jay" +#line 4040 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 4048 "cs-parser.jay" +#line 4049 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4057 "cs-parser.jay" +#line 4058 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6864,84 +6865,84 @@ void case_581() } void case_583() -#line 4068 "cs-parser.jay" +#line 4069 "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_585() -#line 4080 "cs-parser.jay" +#line 4081 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4085 "cs-parser.jay" +#line 4086 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4090 "cs-parser.jay" +#line 4091 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4095 "cs-parser.jay" +#line 4096 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4100 "cs-parser.jay" +#line 4101 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4105 "cs-parser.jay" +#line 4106 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4110 "cs-parser.jay" +#line 4111 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4115 "cs-parser.jay" +#line 4116 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4120 "cs-parser.jay" +#line 4121 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4125 "cs-parser.jay" +#line 4126 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4133 "cs-parser.jay" +#line 4134 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6950,7 +6951,7 @@ void case_595() } void case_596() -#line 4140 "cs-parser.jay" +#line 4141 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6965,7 +6966,7 @@ void case_596() } void case_597() -#line 4156 "cs-parser.jay" +#line 4157 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6973,7 +6974,7 @@ void case_597() } void case_598() -#line 4162 "cs-parser.jay" +#line 4163 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6981,21 +6982,21 @@ void case_598() } void case_599() -#line 4168 "cs-parser.jay" +#line 4169 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_601() -#line 4176 "cs-parser.jay" +#line 4177 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_605() -#line 4192 "cs-parser.jay" +#line 4193 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7004,14 +7005,14 @@ void case_605() } void case_607() -#line 4203 "cs-parser.jay" +#line 4204 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_608() -#line 4211 "cs-parser.jay" +#line 4212 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7019,14 +7020,14 @@ void case_608() } void case_609() -#line 4217 "cs-parser.jay" +#line 4218 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_610() -#line 4222 "cs-parser.jay" +#line 4223 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7034,63 +7035,63 @@ void case_610() } void case_611() -#line 4228 "cs-parser.jay" +#line 4229 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_613() -#line 4237 "cs-parser.jay" +#line 4238 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_614() -#line 4242 "cs-parser.jay" +#line 4243 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_616() -#line 4251 "cs-parser.jay" +#line 4252 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_617() -#line 4256 "cs-parser.jay" +#line 4257 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_624() -#line 4279 "cs-parser.jay" +#line 4280 "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_625() -#line 4284 "cs-parser.jay" +#line 4285 "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_626() -#line 4289 "cs-parser.jay" +#line 4290 "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_630() -#line 4318 "cs-parser.jay" +#line 4319 "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]); @@ -7103,7 +7104,7 @@ void case_630() } void case_631() -#line 4330 "cs-parser.jay" +#line 4331 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7118,7 +7119,7 @@ void case_631() } void case_632() -#line 4343 "cs-parser.jay" +#line 4344 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7126,7 +7127,7 @@ void case_632() } void case_633() -#line 4349 "cs-parser.jay" +#line 4350 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7135,7 +7136,7 @@ void case_633() } void case_636() -#line 4366 "cs-parser.jay" +#line 4367 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7143,7 +7144,7 @@ void case_636() } void case_639() -#line 4380 "cs-parser.jay" +#line 4381 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7161,7 +7162,7 @@ void case_639() } void case_640() -#line 4399 "cs-parser.jay" +#line 4400 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7171,91 +7172,91 @@ void case_640() } void case_641() -#line 4407 "cs-parser.jay" +#line 4408 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_642() -#line 4412 "cs-parser.jay" +#line 4413 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4417 "cs-parser.jay" +#line 4418 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4422 "cs-parser.jay" +#line 4423 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4427 "cs-parser.jay" +#line 4428 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4432 "cs-parser.jay" +#line 4433 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4437 "cs-parser.jay" +#line 4438 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4442 "cs-parser.jay" +#line 4443 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4447 "cs-parser.jay" +#line 4448 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4452 "cs-parser.jay" +#line 4453 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4457 "cs-parser.jay" +#line 4458 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4462 "cs-parser.jay" +#line 4463 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4467 "cs-parser.jay" +#line 4468 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7264,28 +7265,28 @@ void case_653() } void case_654() -#line 4474 "cs-parser.jay" +#line 4475 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_656() -#line 4483 "cs-parser.jay" +#line 4484 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_659() -#line 4496 "cs-parser.jay" +#line 4497 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_660() -#line 4504 "cs-parser.jay" +#line 4505 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7293,7 +7294,7 @@ void case_660() } void case_661() -#line 4510 "cs-parser.jay" +#line 4511 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7311,7 +7312,7 @@ void case_661() } void case_662() -#line 4529 "cs-parser.jay" +#line 4530 "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])); @@ -7319,7 +7320,7 @@ void case_662() } void case_663() -#line 4538 "cs-parser.jay" +#line 4539 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7327,7 +7328,7 @@ void case_663() } void case_664() -#line 4544 "cs-parser.jay" +#line 4545 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7352,7 +7353,7 @@ void case_664() } void case_665() -#line 4570 "cs-parser.jay" +#line 4571 "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 ()); @@ -7361,14 +7362,14 @@ void case_665() } void case_666() -#line 4577 "cs-parser.jay" +#line 4578 "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_670() -#line 4597 "cs-parser.jay" +#line 4598 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7377,91 +7378,91 @@ void case_670() } void case_671() -#line 4607 "cs-parser.jay" +#line 4608 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_672() -#line 4612 "cs-parser.jay" +#line 4613 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4633 "cs-parser.jay" +#line 4634 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_675() -#line 4645 "cs-parser.jay" +#line 4646 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4650 "cs-parser.jay" +#line 4651 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_677() -#line 4659 "cs-parser.jay" +#line 4660 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_678() -#line 4664 "cs-parser.jay" +#line 4665 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_686() -#line 4691 "cs-parser.jay" +#line 4692 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_719() -#line 4755 "cs-parser.jay" +#line 4756 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_720() -#line 4760 "cs-parser.jay" +#line 4761 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4765 "cs-parser.jay" +#line 4766 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_722() -#line 4773 "cs-parser.jay" +#line 4774 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_723() -#line 4781 "cs-parser.jay" +#line 4782 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7471,7 +7472,7 @@ void case_723() } void case_726() -#line 4794 "cs-parser.jay" +#line 4795 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7480,7 +7481,7 @@ void case_726() } void case_727() -#line 4810 "cs-parser.jay" +#line 4811 "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*/ @@ -7512,7 +7513,7 @@ void case_727() } void case_728() -#line 4840 "cs-parser.jay" +#line 4841 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7525,7 +7526,7 @@ void case_728() } void case_729() -#line 4851 "cs-parser.jay" +#line 4852 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7534,21 +7535,21 @@ void case_729() } void case_732() -#line 4866 "cs-parser.jay" +#line 4867 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_734() -#line 4875 "cs-parser.jay" +#line 4876 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_736() -#line 4890 "cs-parser.jay" +#line 4891 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7557,7 +7558,7 @@ void case_736() } void case_737() -#line 4897 "cs-parser.jay" +#line 4898 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7565,7 +7566,7 @@ void case_737() } void case_738() -#line 4903 "cs-parser.jay" +#line 4904 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7574,7 +7575,7 @@ void case_738() } void case_739() -#line 4910 "cs-parser.jay" +#line 4911 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7586,14 +7587,14 @@ void case_739() } void case_741() -#line 4924 "cs-parser.jay" +#line 4925 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_742() -#line 4929 "cs-parser.jay" +#line 4930 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7604,7 +7605,7 @@ void case_742() } void case_746() -#line 4947 "cs-parser.jay" +#line 4948 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7613,7 +7614,7 @@ void case_746() } void case_749() -#line 4962 "cs-parser.jay" +#line 4963 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7624,7 +7625,7 @@ void case_749() } void case_750() -#line 4971 "cs-parser.jay" +#line 4972 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7635,14 +7636,14 @@ void case_750() } void case_752() -#line 4987 "cs-parser.jay" +#line 4988 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_757() -#line 5005 "cs-parser.jay" +#line 5006 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7653,28 +7654,28 @@ void case_757() } void case_759() -#line 5018 "cs-parser.jay" +#line 5019 "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_760() -#line 5023 "cs-parser.jay" +#line 5024 "cs-parser.jay" { 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_761() -#line 5031 "cs-parser.jay" +#line 5032 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_765() -#line 5049 "cs-parser.jay" +#line 5050 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7686,7 +7687,7 @@ void case_765() } void case_766() -#line 5062 "cs-parser.jay" +#line 5063 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7696,14 +7697,14 @@ void case_766() } void case_767() -#line 5070 "cs-parser.jay" +#line 5071 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_770() -#line 5084 "cs-parser.jay" +#line 5085 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7713,7 +7714,7 @@ void case_770() } void case_771() -#line 5093 "cs-parser.jay" +#line 5094 "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])); @@ -7725,7 +7726,7 @@ void case_771() } void case_773() -#line 5110 "cs-parser.jay" +#line 5111 "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])); @@ -7733,14 +7734,14 @@ void case_773() } void case_774() -#line 5119 "cs-parser.jay" +#line 5120 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_776() -#line 5128 "cs-parser.jay" +#line 5129 "cs-parser.jay" { var sections = new List (4); @@ -7749,7 +7750,7 @@ void case_776() } void case_777() -#line 5135 "cs-parser.jay" +#line 5136 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7758,14 +7759,14 @@ void case_777() } void case_778() -#line 5142 "cs-parser.jay" +#line 5143 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_781() -#line 5161 "cs-parser.jay" +#line 5162 "cs-parser.jay" { var labels = new List (2); @@ -7774,7 +7775,7 @@ void case_781() } void case_782() -#line 5168 "cs-parser.jay" +#line 5169 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7783,14 +7784,14 @@ void case_782() } void case_783() -#line 5178 "cs-parser.jay" +#line 5179 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_789() -#line 5197 "cs-parser.jay" +#line 5198 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7800,21 +7801,21 @@ void case_789() } void case_790() -#line 5209 "cs-parser.jay" +#line 5210 "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_791() -#line 5217 "cs-parser.jay" +#line 5218 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_793() -#line 5233 "cs-parser.jay" +#line 5234 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7828,14 +7829,14 @@ void case_793() } void case_794() -#line 5245 "cs-parser.jay" +#line 5246 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_797() -#line 5258 "cs-parser.jay" +#line 5259 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7844,14 +7845,14 @@ void case_797() } void case_798() -#line 5265 "cs-parser.jay" +#line 5266 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_806() -#line 5289 "cs-parser.jay" +#line 5290 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7866,14 +7867,14 @@ void case_806() } void case_807() -#line 5305 "cs-parser.jay" +#line 5306 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_808() -#line 5310 "cs-parser.jay" +#line 5311 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7884,7 +7885,7 @@ void case_808() } void case_809() -#line 5319 "cs-parser.jay" +#line 5320 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7897,21 +7898,21 @@ void case_809() } void case_816() -#line 5342 "cs-parser.jay" +#line 5343 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_817() -#line 5350 "cs-parser.jay" +#line 5351 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5358 "cs-parser.jay" +#line 5359 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7919,35 +7920,35 @@ void case_818() } void case_819() -#line 5364 "cs-parser.jay" +#line 5365 "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_820() -#line 5369 "cs-parser.jay" +#line 5370 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_821() -#line 5377 "cs-parser.jay" +#line 5378 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5385 "cs-parser.jay" +#line 5386 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5393 "cs-parser.jay" +#line 5394 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7965,7 +7966,7 @@ void case_823() } void case_824() -#line 5409 "cs-parser.jay" +#line 5410 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7981,28 +7982,28 @@ void case_824() } void case_828() -#line 5435 "cs-parser.jay" +#line 5436 "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_829() -#line 5440 "cs-parser.jay" +#line 5441 "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_830() -#line 5445 "cs-parser.jay" +#line 5446 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_831() -#line 5453 "cs-parser.jay" +#line 5454 "cs-parser.jay" { var l = new List (2); @@ -8011,7 +8012,7 @@ void case_831() } void case_832() -#line 5460 "cs-parser.jay" +#line 5461 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8029,7 +8030,7 @@ void case_832() } void case_836() -#line 5488 "cs-parser.jay" +#line 5489 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8046,7 +8047,7 @@ void case_836() } void case_838() -#line 5507 "cs-parser.jay" +#line 5508 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8059,14 +8060,14 @@ void case_838() } void case_841() -#line 5535 "cs-parser.jay" +#line 5536 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_843() -#line 5545 "cs-parser.jay" +#line 5546 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8076,7 +8077,7 @@ void case_843() } void case_844() -#line 5556 "cs-parser.jay" +#line 5557 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8088,14 +8089,14 @@ void case_844() } void case_845() -#line 5566 "cs-parser.jay" +#line 5567 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_846() -#line 5571 "cs-parser.jay" +#line 5572 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8107,7 +8108,7 @@ void case_846() } void case_847() -#line 5584 "cs-parser.jay" +#line 5585 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8119,14 +8120,14 @@ void case_847() } void case_848() -#line 5594 "cs-parser.jay" +#line 5595 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_849() -#line 5599 "cs-parser.jay" +#line 5600 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8138,7 +8139,7 @@ void case_849() } void case_850() -#line 5609 "cs-parser.jay" +#line 5610 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8149,14 +8150,14 @@ void case_850() } void case_852() -#line 5625 "cs-parser.jay" +#line 5626 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; yyVal = current_variable; } void case_853() -#line 5636 "cs-parser.jay" +#line 5637 "cs-parser.jay" { lexer.query_parsing = false; @@ -8170,7 +8171,7 @@ void case_853() } void case_854() -#line 5648 "cs-parser.jay" +#line 5649 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8182,7 +8183,7 @@ void case_854() } void case_855() -#line 5659 "cs-parser.jay" +#line 5660 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8192,7 +8193,7 @@ void case_855() } void case_856() -#line 5666 "cs-parser.jay" +#line 5667 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8200,7 +8201,7 @@ void case_856() } void case_857() -#line 5675 "cs-parser.jay" +#line 5676 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8210,7 +8211,7 @@ void case_857() } void case_858() -#line 5683 "cs-parser.jay" +#line 5684 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8224,7 +8225,7 @@ void case_858() } void case_859() -#line 5698 "cs-parser.jay" +#line 5699 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8234,7 +8235,7 @@ void case_859() } void case_860() -#line 5706 "cs-parser.jay" +#line 5707 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8248,7 +8249,7 @@ void case_860() } void case_862() -#line 5725 "cs-parser.jay" +#line 5726 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8261,7 +8262,7 @@ void case_862() } void case_864() -#line 5740 "cs-parser.jay" +#line 5741 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8277,7 +8278,7 @@ void case_864() } void case_865() -#line 5757 "cs-parser.jay" +#line 5758 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8294,14 +8295,14 @@ void case_865() } void case_867() -#line 5773 "cs-parser.jay" +#line 5774 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_869() -#line 5785 "cs-parser.jay" +#line 5786 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8310,7 +8311,7 @@ void case_869() } void case_870() -#line 5792 "cs-parser.jay" +#line 5793 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8320,7 +8321,7 @@ void case_870() } void case_871() -#line 5800 "cs-parser.jay" +#line 5801 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8329,7 +8330,7 @@ void case_871() } void case_872() -#line 5807 "cs-parser.jay" +#line 5808 "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])); @@ -8339,14 +8340,14 @@ void case_872() } void case_876() -#line 5824 "cs-parser.jay" +#line 5825 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_883() -#line 5844 "cs-parser.jay" +#line 5845 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8360,7 +8361,7 @@ void case_883() } void case_885() -#line 5863 "cs-parser.jay" +#line 5864 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8369,7 +8370,7 @@ void case_885() } void case_886() -#line 5873 "cs-parser.jay" +#line 5874 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8379,7 +8380,7 @@ void case_886() } void case_887() -#line 5881 "cs-parser.jay" +#line 5882 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8389,7 +8390,7 @@ void case_887() } void case_888() -#line 5889 "cs-parser.jay" +#line 5890 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8399,7 +8400,7 @@ void case_888() } void case_889() -#line 5897 "cs-parser.jay" +#line 5898 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8439,7 +8440,7 @@ void case_889() } void case_890() -#line 5935 "cs-parser.jay" +#line 5936 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8449,7 +8450,7 @@ void case_890() } void case_891() -#line 5943 "cs-parser.jay" +#line 5944 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8459,7 +8460,7 @@ void case_891() } void case_892() -#line 5951 "cs-parser.jay" +#line 5952 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8469,7 +8470,7 @@ void case_892() } void case_893() -#line 5959 "cs-parser.jay" +#line 5960 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8511,7 +8512,7 @@ void case_893() } void case_897() -#line 6014 "cs-parser.jay" +#line 6015 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8520,7 +8521,7 @@ void case_897() } void case_899() -#line 6025 "cs-parser.jay" +#line 6026 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8529,14 +8530,14 @@ void case_899() } void case_900() -#line 6032 "cs-parser.jay" +#line 6033 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_902() -#line 6041 "cs-parser.jay" +#line 6042 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8545,42 +8546,42 @@ void case_902() } void case_903() -#line 6048 "cs-parser.jay" +#line 6049 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_905() -#line 6060 "cs-parser.jay" +#line 6061 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_906() -#line 6065 "cs-parser.jay" +#line 6066 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_908() -#line 6077 "cs-parser.jay" +#line 6078 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6082 "cs-parser.jay" +#line 6083 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_911() -#line 6092 "cs-parser.jay" +#line 6093 "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*/ @@ -8598,7 +8599,7 @@ void case_911() } void case_912() -#line 6108 "cs-parser.jay" +#line 6109 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8609,7 +8610,7 @@ void case_912() } void case_915() -#line 6135 "cs-parser.jay" +#line 6136 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8641,7 +8642,7 @@ void case_915() } void case_916() -#line 6165 "cs-parser.jay" +#line 6166 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8653,7 +8654,7 @@ void case_916() } void case_926() -#line 6208 "cs-parser.jay" +#line 6209 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8661,7 +8662,7 @@ void case_926() } void case_927() -#line 6214 "cs-parser.jay" +#line 6215 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8670,14 +8671,14 @@ void case_927() } void case_930() -#line 6229 "cs-parser.jay" +#line 6230 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_931() -#line 6234 "cs-parser.jay" +#line 6235 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8687,7 +8688,7 @@ void case_931() } void case_932() -#line 6242 "cs-parser.jay" +#line 6243 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8697,7 +8698,7 @@ void case_932() } void case_933() -#line 6250 "cs-parser.jay" +#line 6251 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8706,7 +8707,7 @@ void case_933() } void case_941() -#line 6288 "cs-parser.jay" +#line 6289 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8714,7 +8715,7 @@ void case_941() } void case_942() -#line 6294 "cs-parser.jay" +#line 6295 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8722,7 +8723,7 @@ void case_942() } void case_943() -#line 6303 "cs-parser.jay" +#line 6304 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12055,7 +12056,7 @@ void case_943() -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6312 "cs-parser.jay" +#line 6313 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 6916cf2ab8..e5b7b33c8b 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -960,16 +960,17 @@ struct_declaration if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } - opt_class_member_declarations CLOSE_BRACE + opt_class_member_declarations CLOSE_BRACE { + lbag.AppendToMember (current_class, GetLocation ($11), GetLocation ($13)); --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } opt_semicolon { - if ($13 != null) - current_class.OptionalSemicolon = GetLocation ($13); + if ($15 != null) + current_class.OptionalSemicolon = GetLocation ($15); $$ = pop_current_class (); } | opt_attributes opt_modifiers opt_partial STRUCT error From 71f47a687abeec703735bbad77880ea0640f9217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 15:10:06 +0200 Subject: [PATCH 45/92] Added more debug output. --- .../CSharp/Parser/ParseSelfTests.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs index 54b8fc8288..c469a73b76 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs @@ -70,6 +70,8 @@ namespace ICSharpCode.NRefactory.CSharp.Parser foreach (string fileName in fileNames) { this.currentDocument = new ReadOnlyDocument(File.ReadAllText(fileName)); CompilationUnit cu = parser.Parse(currentDocument.CreateReader()); + if (parser.HasErrors) + continue; this.currentFileName = fileName; CheckPositionConsistency(cu); CheckMissingTokens(cu); @@ -81,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser Console.WriteLine ("Parent:" + node.GetType ()); Console.WriteLine ("Children:"); foreach (var c in node.Children) - Console.WriteLine (c.GetType () +" at:"+ c.StartLocation + " Role: "+ c.Role); + Console.WriteLine (c.GetType () +" at:"+ c.StartLocation +"-"+ c.EndLocation + " Role: "+ c.Role); Console.WriteLine ("----"); } @@ -93,9 +95,12 @@ namespace ICSharpCode.NRefactory.CSharp.Parser var prevNode = node; for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) { bool assertion = child.StartLocation >= prevNodeEnd; - if (!assertion) + if (!assertion) { + PrintNode (prevNode); PrintNode (node); - Assert.IsTrue(assertion, currentFileName + ": Child " + child.GetType () +" (" + child.StartLocation + ")" +" must start after previous sibling " + prevNode.GetType () + "(" + prevNode.StartLocation + ")"); + + } + Assert.IsTrue(assertion, currentFileName + ": Child " + child.GetType () +" (" + child.StartLocation + ")" +" must start after previous sibling " + prevNode.GetType () + "(" + prevNode.StartLocation + ")"); CheckPositionConsistency(child); prevNodeEnd = child.EndLocation; prevNode = child; @@ -129,8 +134,9 @@ namespace ICSharpCode.NRefactory.CSharp.Parser string text = currentDocument.GetText(start, end - start); bool assertion = string.IsNullOrWhiteSpace(text); if (!assertion) { - if (startNode.Parent == endNode.Parent) + if (startNode.Parent != endNode.Parent) PrintNode (startNode.Parent); + PrintNode (endNode.Parent); } Assert.IsTrue(assertion, "Expected whitespace between " + startNode.GetType () +":" + whitespaceStart + " and " + endNode.GetType () + ":" + whitespaceEnd + ", but got '" + text + "' (in " + currentFileName + " parent:" + startNode.Parent.GetType () +")"); From a2a077fc0e9f6faddf28030fe06f1342f133068c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 15:31:37 +0200 Subject: [PATCH 46/92] added enum member assign token & case label colon token. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 19ee45aaf7..481ec8f0ce 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -605,6 +605,7 @@ namespace ICSharpCode.NRefactory.CSharp newField.AddChild (Identifier.Create (em.Name, Convert (em.Location)), AstNode.Roles.Identifier); if (em.Initializer != null) { + newField.AddChild (new CSharpTokenNode (Convert (em.Initializer.Location), 1), EnumMemberDeclaration.Roles.Assign); newField.AddChild ((Expression)em.Initializer.Accept (this), EnumMemberDeclaration.InitializerRole); } @@ -1618,7 +1619,9 @@ namespace ICSharpCode.NRefactory.CSharp newLabel.AddChild (new CSharpTokenNode (Convert (caseLabel.Location), "case".Length), SwitchStatement.Roles.Keyword); if (caseLabel.Label != null) newLabel.AddChild ((Expression)caseLabel.Label.Accept (this), SwitchStatement.Roles.Expression); - + var colonLocation = LocationsBag.GetLocations (caseLabel); + if (colonLocation != null) + result.AddChild (new CSharpTokenNode (Convert (colonLocation [0]), 1), SwitchStatement.Roles.Colon); newSection.AddChild (newLabel, SwitchSection.CaseLabelRole); } From 22a97b5e9f856b9bc50ffe99df0dfc9f7eb46826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sun, 4 Sep 2011 15:42:52 +0200 Subject: [PATCH 47/92] Added 'default' section keywords. --- .../Ast/Statements/SwitchStatement.cs | 3 +++ .../Parser/CSharpParser.cs | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs index c3fd4dd3fb..4df2569da6 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs @@ -151,6 +151,9 @@ namespace ICSharpCode.NRefactory.CSharp } } + /// + /// Gets or sets the expression. The expression can be null - if the expression is null, it's the default switch section. + /// public Expression Expression { get { return GetChildByRole (Roles.Expression); } set { SetChildByRole (Roles.Expression, value); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 481ec8f0ce..ae3d83f0c5 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1616,12 +1616,16 @@ namespace ICSharpCode.NRefactory.CSharp var newSection = new SwitchSection (); foreach (var caseLabel in section.Labels) { var newLabel = new CaseLabel (); - newLabel.AddChild (new CSharpTokenNode (Convert (caseLabel.Location), "case".Length), SwitchStatement.Roles.Keyword); - if (caseLabel.Label != null) + if (caseLabel.Label != null) { + newLabel.AddChild (new CSharpTokenNode (Convert (caseLabel.Location), "case".Length), SwitchStatement.Roles.Keyword); newLabel.AddChild ((Expression)caseLabel.Label.Accept (this), SwitchStatement.Roles.Expression); - var colonLocation = LocationsBag.GetLocations (caseLabel); - if (colonLocation != null) - result.AddChild (new CSharpTokenNode (Convert (colonLocation [0]), 1), SwitchStatement.Roles.Colon); + var colonLocation = LocationsBag.GetLocations (caseLabel); + if (colonLocation != null) + newLabel.AddChild (new CSharpTokenNode (Convert (colonLocation [0]), 1), SwitchStatement.Roles.Colon); + } else { + newLabel.AddChild (new CSharpTokenNode (Convert (caseLabel.Location), "default".Length), SwitchStatement.Roles.Keyword); + newLabel.AddChild (new CSharpTokenNode (new TextLocation (caseLabel.Location.Row, caseLabel.Location.Column + "default".Length), 1), SwitchStatement.Roles.Colon); + } newSection.AddChild (newLabel, SwitchSection.CaseLabelRole); } From 61c989421520c6cb28cb5eb68079f3736fe8dc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Mon, 5 Sep 2011 11:26:46 +0200 Subject: [PATCH 48/92] removed debug message. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index ae3d83f0c5..0d8a55ffda 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2276,9 +2276,6 @@ namespace ICSharpCode.NRefactory.CSharp if (typeArguments == null || typeArguments.IsEmpty) return; var chevronLocs = LocationsBag.GetLocations (typeArguments); - if (chevronLocs != null) - foreach (var loc in chevronLocs) - Console.WriteLine (loc); if (chevronLocs != null) parent.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); for (int i = 0; i < typeArguments.Count; i++) { From d683689d05ab73d80ef33d4df766ff853d87c158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Mon, 5 Sep 2011 11:28:12 +0200 Subject: [PATCH 49/92] added serializable attributes. --- ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs b/ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs index 2021496969..a62262255f 100644 --- a/ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs +++ b/ICSharpCode.NRefactory/TypeSystem/IAnnotatable.cs @@ -78,11 +78,13 @@ namespace ICSharpCode.NRefactory void RemoveAnnotations(Type type); } + [Serializable] public abstract class AbstractAnnotatable : IAnnotatable { // Annotations: points either null (no annotations), to the single annotation, // or to an AnnotationList. // Once it is pointed at an AnnotationList, it will never change (this allows thread-safety support by locking the list) + [NonSerialized] protected object annotations; sealed class AnnotationList : List, ICloneable From 9d3c0767b550222e84419208aede4a31944c1016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 12:27:24 +0200 Subject: [PATCH 50/92] Fixed some issues with comment insertion. --- .../Parser/CSharpParser.cs | 5 ++ .../Parser/mcs/cs-tokenizer.cs | 61 +++++++++++-------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 0d8a55ffda..c5633f3466 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -3194,6 +3194,7 @@ namespace ICSharpCode.NRefactory.CSharp var leaf = GetOuterLeft(conversionVisitor.Unit); foreach (var special in top.SpecialsBag.Specials) { + var comment = special as SpecialsBag.Comment; if (comment == null) continue; @@ -3211,6 +3212,10 @@ namespace ICSharpCode.NRefactory.CSharp // insert comment at begin if (domComment.StartLocation < leaf.StartLocation) { var node = leaf.Parent ?? conversionVisitor.Unit; + while (node.Parent != null && node.FirstChild == leaf) { + leaf = node; + node = node.Parent; + } node.InsertChildBefore (leaf, domComment, AstNode.Roles.Comment); leaf = domComment; break; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs index 8862e71ae1..7c9c599d83 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs @@ -1866,7 +1866,8 @@ namespace Mono.CSharp var cmd = GetPreprocessorDirective (id_builder, TokenizePreprocessorIdentifier (out c, out endLine, out endCol)); if ((cmd & PreprocessorDirective.CustomArgumentsParsing) != 0) { - sbag.AddPreProcessorDirective (startLine, startCol, line, col, cmd, null); + if (position_stack.Count == 0) + sbag.AddPreProcessorDirective (startLine, startCol, line, col, cmd, null); return cmd; } @@ -1932,7 +1933,8 @@ namespace Mono.CSharp // Eat any trailing whitespaces arg = arg.Trim (simple_whitespaces); } - sbag.AddPreProcessorDirective (startLine, startCol, endLine, endCol, cmd, arg); + if (position_stack.Count == 0) + sbag.AddPreProcessorDirective (startLine, startCol, endLine, endCol, cmd, arg); return cmd; } @@ -2229,14 +2231,16 @@ namespace Mono.CSharp { if (peek_char () != '/') Report.Warning (1696, 1, Location, "Single-line comment or end-of-line expected"); - sbag.StartComment (SpecialsBag.CommentType.Single, startsLine, line, col - 1); + if (position_stack.Count == 0) + sbag.StartComment (SpecialsBag.CommentType.Single, startsLine, line, col - 1); // Read everything till the end of the line or file int c; do { c = get_char (); - sbag.PushCommentChar (c); + if (position_stack.Count == 0) + sbag.PushCommentChar (c); var pc = peek_char (); - if (pc == '\n' || pc == -1) + if (pc == '\n' || pc == -1 && position_stack.Count == 0) sbag.EndComment (line, col + 1); } while (c != -1 && c != '\n'); } @@ -3182,17 +3186,17 @@ namespace Mono.CSharp get_char (); return Token.OP_DIV_ASSIGN; } - // Handle double-slash comments. if (d == '/') { + Console.WriteLine (line + "/" + col); get_char (); if (doc_processing) { if (peek_char () == '/') { - sbag.StartComment (SpecialsBag.CommentType.Documentation, startsLine, line, col - 1); get_char (); // Don't allow ////. if ((d = peek_char ()) != '/') { - sbag.PushCommentChar (d); + if (position_stack.Count == 0) + sbag.PushCommentChar (d); if (doc_state == XmlCommentState.Allowed) handle_one_line_xml_comment (); else if (doc_state == XmlCommentState.NotAllowed) @@ -3204,39 +3208,41 @@ namespace Mono.CSharp } } else { bool isDoc = peek_char () == '/'; - sbag.StartComment (isDoc ? SpecialsBag.CommentType.Documentation : SpecialsBag.CommentType.Single, startsLine, line, col - 1); + if (position_stack.Count == 0) + sbag.StartComment (isDoc ? SpecialsBag.CommentType.Documentation : SpecialsBag.CommentType.Single, startsLine, line, col - 1); if (isDoc) get_char (); } d = peek_char (); - if (d == '\n' || d == '\r') - sbag.EndComment (line, col + 1); while ((d = get_char ()) != -1 && (d != '\n') && d != '\r') { - sbag.PushCommentChar (d); - var pc = peek_char (); - if (pc == -1 || pc == '\n' || pc == '\r') { - sbag.EndComment (line, col + 1); - } + if (position_stack.Count == 0) + sbag.PushCommentChar (d); } + if (position_stack.Count == 0) + sbag.EndComment (line, col + 1); any_token_seen |= tokens_seen; tokens_seen = false; comments_seen = false; continue; } else if (d == '*'){ - sbag.StartComment (SpecialsBag.CommentType.Multi, startsLine, line, col); + if (position_stack.Count == 0) + sbag.StartComment (SpecialsBag.CommentType.Multi, startsLine, line, col); get_char (); bool docAppend = false; if (doc_processing && peek_char () == '*') { int ch = get_char (); - sbag.PushCommentChar (ch); + if (position_stack.Count == 0) + sbag.PushCommentChar (ch); // But when it is /**/, just do nothing. if (peek_char () == '/') { ch = get_char (); - sbag.PushCommentChar (ch); - sbag.EndComment (line, col + 1); + if (position_stack.Count == 0) { + sbag.PushCommentChar (ch); + sbag.EndComment (line, col + 1); + } continue; } if (doc_state == XmlCommentState.Allowed) @@ -3253,11 +3259,14 @@ namespace Mono.CSharp } while ((d = get_char ()) != -1){ - sbag.PushCommentChar (d); + if (position_stack.Count == 0) + sbag.PushCommentChar (d); if (d == '*' && peek_char () == '/'){ - sbag.PushCommentChar ('/'); + if (position_stack.Count == 0) + sbag.PushCommentChar ('/'); get_char (); - sbag.EndComment (line, col + 1); + if (position_stack.Count == 0) + sbag.EndComment (line, col + 1); comments_seen = true; break; } @@ -3513,11 +3522,13 @@ namespace Mono.CSharp { int c; while ((c = peek_char ()) == ' ') { - sbag.PushCommentChar (c); + if (position_stack.Count == 0) + sbag.PushCommentChar (c); get_char (); // skip heading whitespaces. } while ((c = peek_char ()) != -1 && c != '\n' && c != '\r') { - sbag.PushCommentChar (c); + if (position_stack.Count == 0) + sbag.PushCommentChar (c); xml_comment_buffer.Append ((char) get_char ()); } if (c == '\r' || c == '\n') From 8fb218baad2665f60164c86f1fa5ae271071ace3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 12:35:10 +0200 Subject: [PATCH 51/92] Handled pre processor directives - fist approach. --- .../Parser/CSharpParser.cs | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index c5633f3466..8d6c57e48c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -3194,46 +3194,56 @@ namespace ICSharpCode.NRefactory.CSharp var leaf = GetOuterLeft(conversionVisitor.Unit); foreach (var special in top.SpecialsBag.Specials) { + Comment newLeaf = null; var comment = special as SpecialsBag.Comment; - if (comment == null) - continue; - if (conversionVisitor.convertTypeSystemMode && (comment.CommentType != SpecialsBag.CommentType.Documentation)) + if (comment != null) { + if (conversionVisitor.convertTypeSystemMode && (comment.CommentType != SpecialsBag.CommentType.Documentation)) + continue; + var type = (CommentType)comment.CommentType; + var start = new TextLocation (comment.Line, comment.Col); + var end = new TextLocation (comment.EndLine, comment.EndCol); + newLeaf = new Comment (type, start, end) { + StartsLine = comment.StartsLine, + Content = comment.Content + }; + } else { + // TODO: Proper handling of pre processor directives (atm got treated as comments Ast wise) + var directive = special as SpecialsBag.PreProcessorDirective; + if (directive != null) + newLeaf = new Comment (CommentType.SingleLine, new TextLocation (directive.Line, directive.Col), new TextLocation (directive.EndLine, directive.EndCol + 1)); + } + + if (newLeaf == null) continue; - var type = (CommentType)comment.CommentType; - var start = new TextLocation (comment.Line, comment.Col); - var end = new TextLocation (comment.EndLine, comment.EndCol); - var domComment = new Comment (type, start, end); - domComment.StartsLine = comment.StartsLine; - domComment.Content = comment.Content; while (true) { var nextLeaf = NextLeaf(leaf); // insert comment at begin - if (domComment.StartLocation < leaf.StartLocation) { + if (newLeaf.StartLocation < leaf.StartLocation) { var node = leaf.Parent ?? conversionVisitor.Unit; while (node.Parent != null && node.FirstChild == leaf) { leaf = node; node = node.Parent; } - node.InsertChildBefore (leaf, domComment, AstNode.Roles.Comment); - leaf = domComment; + node.InsertChildBefore (leaf, newLeaf, AstNode.Roles.Comment); + leaf = newLeaf; break; } // insert comment at the end if (nextLeaf == null) { var node = leaf.Parent ?? conversionVisitor.Unit; - node.AddChild(domComment, AstNode.Roles.Comment); - leaf = domComment; + node.AddChild(newLeaf, AstNode.Roles.Comment); + leaf = newLeaf; break; } // comment is between 2 nodes - if (leaf.EndLocation <= domComment.StartLocation && domComment.StartLocation <= nextLeaf.StartLocation) { + if (leaf.EndLocation <= newLeaf.StartLocation && newLeaf.StartLocation <= nextLeaf.StartLocation) { var node = leaf.Parent ?? conversionVisitor.Unit; - node.InsertChildAfter(leaf, domComment, AstNode.Roles.Comment); - leaf = domComment; + node.InsertChildAfter(leaf, newLeaf, AstNode.Roles.Comment); + leaf = newLeaf; break; } leaf = nextLeaf; From cff7997d5c58d1a6627c0c917d9ff22bea1d388f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 12:56:51 +0200 Subject: [PATCH 52/92] Fixed some declarator assign token locations. --- .../Parser/CSharpParser.cs | 12 +- .../Parser/mcs/cs-parser.cs | 135 +++++++++--------- .../Parser/mcs/cs-parser.jay | 1 + 3 files changed, 76 insertions(+), 72 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 8d6c57e48c..76535eee0a 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -687,12 +687,13 @@ namespace ICSharpCode.NRefactory.CSharp foreach (var decl in f.Declarators) { var declLoc = LocationsBag.GetLocations (decl); if (declLoc != null) - newField.AddChild (new CSharpTokenNode (Convert (declLoc[0]), 1), FieldDeclaration.Roles.Comma); + newField.AddChild (new CSharpTokenNode (Convert (declLoc [0]), 1), FieldDeclaration.Roles.Comma); variable = new VariableInitializer (); variable.AddChild (Identifier.Create (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); + if (declLoc != null) + variable.AddChild (new CSharpTokenNode (Convert (declLoc [1]), 1), FieldDeclaration.Roles.Assign); variable.AddChild ((Expression)decl.Initializer.Accept (this), VariableInitializer.Roles.Expression); } newField.AddChild (variable, FieldDeclaration.Roles.Variable); @@ -1129,13 +1130,14 @@ namespace ICSharpCode.NRefactory.CSharp 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); + newEvent.AddChild (new CSharpTokenNode (Convert (declLoc [0]), 1), FieldDeclaration.Roles.Comma); variable = new VariableInitializer (); variable.AddChild (Identifier.Create (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); + if (declLoc != null) + variable.AddChild (new CSharpTokenNode (Convert (declLoc [1]), 1), FieldDeclaration.Roles.Assign); variable.AddChild ((Expression)decl.Initializer.Accept (this), VariableInitializer.Roles.Expression); } newEvent.AddChild (variable, FieldDeclaration.Roles.Variable); @@ -1545,7 +1547,7 @@ namespace ICSharpCode.NRefactory.CSharp var loc = LocationsBag.GetLocations (u.Variables); if (loc != null) - initializer.AddChild (new CSharpTokenNode (Convert (loc[1]), 1), VariableInitializer.Roles.Assign); + initializer.AddChild (new CSharpTokenNode (Convert (loc[0]), 1), VariableInitializer.Roles.Assign); if (u.Variables.Initializer != null) initializer.Initializer = u.Variables.Initializer.Accept (this) as Expression; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index fe4c798634..03c561ac43 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -3702,7 +3702,7 @@ case 860: case_860(); break; case 861: -#line 5724 "cs-parser.jay" +#line 5725 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3711,7 +3711,7 @@ case 862: case_862(); break; case 863: -#line 5739 "cs-parser.jay" +#line 5740 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3726,7 +3726,7 @@ case 867: case_867(); break; case 868: -#line 5784 "cs-parser.jay" +#line 5785 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3747,7 +3747,7 @@ case 876: case_876(); break; case 882: -#line 5843 "cs-parser.jay" +#line 5844 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3756,7 +3756,7 @@ case 883: case_883(); break; case 884: -#line 5862 "cs-parser.jay" +#line 5863 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3789,13 +3789,13 @@ case 893: case_893(); break; case 895: -#line 6006 "cs-parser.jay" +#line 6007 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 896: -#line 6013 "cs-parser.jay" +#line 6014 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3816,7 +3816,7 @@ case 903: case_903(); break; case 904: -#line 6059 "cs-parser.jay" +#line 6060 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3828,7 +3828,7 @@ case 906: case_906(); break; case 907: -#line 6076 "cs-parser.jay" +#line 6077 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3852,13 +3852,13 @@ case 916: case_916(); break; case 924: -#line 6200 "cs-parser.jay" +#line 6201 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 925: -#line 6207 "cs-parser.jay" +#line 6208 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3870,13 +3870,13 @@ case 927: case_927(); break; case 928: -#line 6224 "cs-parser.jay" +#line 6225 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 929: -#line 6228 "cs-parser.jay" +#line 6229 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3894,25 +3894,25 @@ case 933: case_933(); break; case 935: -#line 6264 "cs-parser.jay" +#line 6265 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 937: -#line 6272 "cs-parser.jay" +#line 6273 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 938: -#line 6276 "cs-parser.jay" +#line 6277 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 939: -#line 6283 "cs-parser.jay" +#line 6284 "cs-parser.jay" { yyVal = new List (0); } @@ -8153,11 +8153,12 @@ void case_852() #line 5626 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; + lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); yyVal = current_variable; } void case_853() -#line 5637 "cs-parser.jay" +#line 5638 "cs-parser.jay" { lexer.query_parsing = false; @@ -8171,7 +8172,7 @@ void case_853() } void case_854() -#line 5649 "cs-parser.jay" +#line 5650 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8183,7 +8184,7 @@ void case_854() } void case_855() -#line 5660 "cs-parser.jay" +#line 5661 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8193,7 +8194,7 @@ void case_855() } void case_856() -#line 5667 "cs-parser.jay" +#line 5668 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8201,7 +8202,7 @@ void case_856() } void case_857() -#line 5676 "cs-parser.jay" +#line 5677 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8211,7 +8212,7 @@ void case_857() } void case_858() -#line 5684 "cs-parser.jay" +#line 5685 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8225,7 +8226,7 @@ void case_858() } void case_859() -#line 5699 "cs-parser.jay" +#line 5700 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8235,7 +8236,7 @@ void case_859() } void case_860() -#line 5707 "cs-parser.jay" +#line 5708 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8249,7 +8250,7 @@ void case_860() } void case_862() -#line 5726 "cs-parser.jay" +#line 5727 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8262,7 +8263,7 @@ void case_862() } void case_864() -#line 5741 "cs-parser.jay" +#line 5742 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8278,7 +8279,7 @@ void case_864() } void case_865() -#line 5758 "cs-parser.jay" +#line 5759 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8295,14 +8296,14 @@ void case_865() } void case_867() -#line 5774 "cs-parser.jay" +#line 5775 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_869() -#line 5786 "cs-parser.jay" +#line 5787 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8311,7 +8312,7 @@ void case_869() } void case_870() -#line 5793 "cs-parser.jay" +#line 5794 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8321,7 +8322,7 @@ void case_870() } void case_871() -#line 5801 "cs-parser.jay" +#line 5802 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8330,7 +8331,7 @@ void case_871() } void case_872() -#line 5808 "cs-parser.jay" +#line 5809 "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])); @@ -8340,14 +8341,14 @@ void case_872() } void case_876() -#line 5825 "cs-parser.jay" +#line 5826 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_883() -#line 5845 "cs-parser.jay" +#line 5846 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8361,7 +8362,7 @@ void case_883() } void case_885() -#line 5864 "cs-parser.jay" +#line 5865 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8370,7 +8371,7 @@ void case_885() } void case_886() -#line 5874 "cs-parser.jay" +#line 5875 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8380,7 +8381,7 @@ void case_886() } void case_887() -#line 5882 "cs-parser.jay" +#line 5883 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8390,7 +8391,7 @@ void case_887() } void case_888() -#line 5890 "cs-parser.jay" +#line 5891 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8400,7 +8401,7 @@ void case_888() } void case_889() -#line 5898 "cs-parser.jay" +#line 5899 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8440,7 +8441,7 @@ void case_889() } void case_890() -#line 5936 "cs-parser.jay" +#line 5937 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8450,7 +8451,7 @@ void case_890() } void case_891() -#line 5944 "cs-parser.jay" +#line 5945 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8460,7 +8461,7 @@ void case_891() } void case_892() -#line 5952 "cs-parser.jay" +#line 5953 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8470,7 +8471,7 @@ void case_892() } void case_893() -#line 5960 "cs-parser.jay" +#line 5961 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8512,7 +8513,7 @@ void case_893() } void case_897() -#line 6015 "cs-parser.jay" +#line 6016 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8521,7 +8522,7 @@ void case_897() } void case_899() -#line 6026 "cs-parser.jay" +#line 6027 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8530,14 +8531,14 @@ void case_899() } void case_900() -#line 6033 "cs-parser.jay" +#line 6034 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_902() -#line 6042 "cs-parser.jay" +#line 6043 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8546,42 +8547,42 @@ void case_902() } void case_903() -#line 6049 "cs-parser.jay" +#line 6050 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_905() -#line 6061 "cs-parser.jay" +#line 6062 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_906() -#line 6066 "cs-parser.jay" +#line 6067 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_908() -#line 6078 "cs-parser.jay" +#line 6079 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6083 "cs-parser.jay" +#line 6084 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_911() -#line 6093 "cs-parser.jay" +#line 6094 "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*/ @@ -8599,7 +8600,7 @@ void case_911() } void case_912() -#line 6109 "cs-parser.jay" +#line 6110 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8610,7 +8611,7 @@ void case_912() } void case_915() -#line 6136 "cs-parser.jay" +#line 6137 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8642,7 +8643,7 @@ void case_915() } void case_916() -#line 6166 "cs-parser.jay" +#line 6167 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8654,7 +8655,7 @@ void case_916() } void case_926() -#line 6209 "cs-parser.jay" +#line 6210 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8662,7 +8663,7 @@ void case_926() } void case_927() -#line 6215 "cs-parser.jay" +#line 6216 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8671,14 +8672,14 @@ void case_927() } void case_930() -#line 6230 "cs-parser.jay" +#line 6231 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_931() -#line 6235 "cs-parser.jay" +#line 6236 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8688,7 +8689,7 @@ void case_931() } void case_932() -#line 6243 "cs-parser.jay" +#line 6244 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8698,7 +8699,7 @@ void case_932() } void case_933() -#line 6251 "cs-parser.jay" +#line 6252 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8707,7 +8708,7 @@ void case_933() } void case_941() -#line 6289 "cs-parser.jay" +#line 6290 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8715,7 +8716,7 @@ void case_941() } void case_942() -#line 6295 "cs-parser.jay" +#line 6296 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8723,7 +8724,7 @@ void case_942() } void case_943() -#line 6304 "cs-parser.jay" +#line 6305 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12056,7 +12057,7 @@ void case_943() -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6313 "cs-parser.jay" +#line 6314 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index e5b7b33c8b..4704aed3c7 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -5625,6 +5625,7 @@ using_or_fixed_variable_initializer | ASSIGN variable_initializer { current_variable.Initializer = (Expression) $2; + lbag.AppendTo (current_variable, GetLocation ($1)); $$ = current_variable; } ; From 7ed3af27fcc2224fe7f27e5b7ad3989ade9f9606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 16:40:39 +0200 Subject: [PATCH 53/92] Updated mcs (fixed char posititions). --- .../Parser/mcs/class.cs | 6 ++ .../Parser/mcs/cs-tokenizer.cs | 22 +++-- .../Parser/mcs/ecore.cs | 11 +++ .../Parser/mcs/expression.cs | 44 ++++++++-- .../Parser/mcs/flowanalysis.cs | 7 +- .../Parser/mcs/method.cs | 81 ++++++++++--------- .../Parser/mcs/pending.cs | 11 +-- .../Parser/mcs/property.cs | 6 +- 8 files changed, 127 insertions(+), 61 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs index de0d0f5bb4..3959f351bb 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/class.cs @@ -319,6 +319,12 @@ namespace Mono.CSharp } } + public TypeSpec[] Interfaces { + get { + return iface_exprs; + } + } + #endregion public override void Accept (StructuralVisitor visitor) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs index 7c9c599d83..db2d176c5d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs @@ -3188,7 +3188,6 @@ namespace Mono.CSharp } // Handle double-slash comments. if (d == '/') { - Console.WriteLine (line + "/" + col); get_char (); if (doc_processing) { if (peek_char () == '/') { @@ -3432,16 +3431,20 @@ namespace Mono.CSharp int TokenizeBackslash () { +#if FULL_AST + int read_start = reader.Position; +#endif + Location start_location = Location; int c = get_char (); tokens_seen = true; if (c == '\'') { - val = new CharLiteral (context.BuiltinTypes, (char) c, Location); - Report.Error (1011, Location, "Empty character literal"); + val = new CharLiteral (context.BuiltinTypes, (char) c, start_location); + Report.Error (1011, start_location, "Empty character literal"); return Token.LITERAL; } - if (c == '\n') { - Report.Error (1010, Location, "Newline in constant"); + if (c == '\r') { + Report.Error (1010, start_location, "Newline in constant"); return Token.ERROR; } @@ -3452,11 +3455,12 @@ namespace Mono.CSharp if (d != 0) throw new NotImplementedException (); - val = new CharLiteral (context.BuiltinTypes, (char) c, Location); + ILiteralConstant res = new CharLiteral (context.BuiltinTypes, (char) c, start_location); + val = res; c = get_char (); if (c != '\'') { - Report.Error (1012, Location, "Too many characters in character literal"); + Report.Error (1012, start_location, "Too many characters in character literal"); // Try to recover, read until newline or next "'" while ((c = get_char ()) != -1) { @@ -3465,6 +3469,10 @@ namespace Mono.CSharp } } +#if FULL_AST + res.ParsedValue = reader.ReadChars (read_start - 1, reader.Position); +#endif + return Token.LITERAL; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs index 8ea57ed36d..d7e357c012 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/ecore.cs @@ -1862,6 +1862,17 @@ namespace Mono.CSharp { c = new ReducedConstantExpression (c, orig_expr); return c; } + + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + { + // + // LAMESPEC: Reduced conditional expression is allowed as an attribute argument + // + if (orig_expr is Conditional) + child.EncodeAttributeValue (rc, enc, targetType); + else + base.EncodeAttributeValue (rc, enc, targetType); + } } sealed class ReducedExpressionStatement : ExpressionStatement diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs index bd2d50c921..f440ab7c62 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs @@ -4563,8 +4563,32 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext ec) { expr = expr.Resolve (ec); - true_expr = true_expr.Resolve (ec); - false_expr = false_expr.Resolve (ec); + + // + // Unreachable code needs different resolve path. For instance for await + // expression to not generate unreachable resumable statement + // + Constant c = expr as Constant; + if (c != null && ec.CurrentBranching != null) { + bool unreachable = ec.CurrentBranching.CurrentUsageVector.IsUnreachable; + + if (c.IsDefaultValue) { + ec.CurrentBranching.CurrentUsageVector.IsUnreachable = true; + true_expr = true_expr.Resolve (ec); + ec.CurrentBranching.CurrentUsageVector.IsUnreachable = unreachable; + + false_expr = false_expr.Resolve (ec); + } else { + true_expr = true_expr.Resolve (ec); + + ec.CurrentBranching.CurrentUsageVector.IsUnreachable = true; + false_expr = false_expr.Resolve (ec); + ec.CurrentBranching.CurrentUsageVector.IsUnreachable = unreachable; + } + } else { + true_expr = true_expr.Resolve (ec); + false_expr = false_expr.Resolve (ec); + } if (true_expr == null || false_expr == null || expr == null) return null; @@ -4604,11 +4628,17 @@ namespace Mono.CSharp } } - // Dead code optimalization - Constant c = expr as Constant; - if (c != null){ + if (c != null) { bool is_false = c.IsDefaultValue; - ec.Report.Warning (429, 4, is_false ? true_expr.Location : false_expr.Location, "Unreachable expression code detected"); + + // + // Don't issue the warning for constant expressions + // + if (!(is_false ? true_expr is Constant : false_expr is Constant)) { + ec.Report.Warning (429, 4, is_false ? true_expr.Location : false_expr.Location, + "Unreachable expression code detected"); + } + return ReducedExpression.Create ( is_false ? false_expr : true_expr, this, false_expr is Constant && true_expr is Constant).Resolve (ec); @@ -5965,7 +5995,7 @@ namespace Mono.CSharp { var current_field = rc.CurrentMemberDefinition as FieldBase; TypeExpression type; - if (current_field != null) { + if (current_field != null && rc.CurrentAnonymousMethod == null) { type = new TypeExpression (current_field.MemberType, current_field.Location); } else if (variable != null) { if (variable.TypeExpression is VarExpr) { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs index 1becb532d4..f54f6f1790 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/flowanalysis.cs @@ -251,7 +251,12 @@ namespace Mono.CSharp } public bool IsUnreachable { - get { return is_unreachable; } + get { + return is_unreachable; + } + set { + is_unreachable = value; + } } public void ResetBarrier () diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs index ec453172ff..c69c1d766f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs @@ -613,7 +613,7 @@ namespace Mono.CSharp { MethodData = new MethodData ( this, ModFlags, flags, this, MethodBuilder, GenericMethod, base_method); - if (!MethodData.Define (Parent.PartialContainer, GetFullName (MemberName), Report)) + if (!MethodData.Define (Parent.PartialContainer, GetFullName (MemberName))) return false; MethodBuilder = MethodData.MethodBuilder; @@ -1819,32 +1819,34 @@ namespace Mono.CSharp { this.parent_method = parent_method; } - public bool Define (DeclSpace parent, string method_full_name, Report Report) + public bool Define (TypeContainer container, string method_full_name) { - TypeContainer container = parent.PartialContainer; - PendingImplementation pending = container.PendingImplementations; MethodSpec ambig_iface_method; + bool optional = false; + if (pending != null) { - implementing = pending.IsInterfaceMethod (method.MethodName, member.InterfaceType, this, out ambig_iface_method); + implementing = pending.IsInterfaceMethod (method.MethodName, member.InterfaceType, this, out ambig_iface_method, ref optional); if (member.InterfaceType != null) { if (implementing == null) { if (member is PropertyBase) { - Report.Error (550, method.Location, "`{0}' is an accessor not found in interface member `{1}{2}'", + container.Compiler.Report.Error (550, method.Location, + "`{0}' is an accessor not found in interface member `{1}{2}'", method.GetSignatureForError (), TypeManager.CSharpName (member.InterfaceType), member.GetSignatureForError ().Substring (member.GetSignatureForError ().LastIndexOf ('.'))); } else { - Report.Error (539, method.Location, + container.Compiler.Report.Error (539, method.Location, "`{0}.{1}' in explicit interface declaration is not a member of interface", TypeManager.CSharpName (member.InterfaceType), member.ShortName); } return false; } if (implementing.IsAccessor && !method.IsAccessor) { - Report.SymbolRelatedToPreviousError (implementing); - Report.Error (683, method.Location, "`{0}' explicit method implementation cannot implement `{1}' because it is an accessor", + container.Compiler.Report.SymbolRelatedToPreviousError (implementing); + container.Compiler.Report.Error (683, method.Location, + "`{0}' explicit method implementation cannot implement `{1}' because it is an accessor", member.GetSignatureForError (), TypeManager.CSharpSignature (implementing)); return false; } @@ -1852,20 +1854,23 @@ namespace Mono.CSharp { if (implementing != null) { if (!method.IsAccessor) { if (implementing.IsAccessor) { - Report.SymbolRelatedToPreviousError (implementing); - Report.Error (470, method.Location, "Method `{0}' cannot implement interface accessor `{1}'", + container.Compiler.Report.SymbolRelatedToPreviousError (implementing); + container.Compiler.Report.Error (470, method.Location, + "Method `{0}' cannot implement interface accessor `{1}'", method.GetSignatureForError (), TypeManager.CSharpSignature (implementing)); } } else if (implementing.DeclaringType.IsInterface) { if (!implementing.IsAccessor) { - Report.SymbolRelatedToPreviousError (implementing); - Report.Error (686, method.Location, "Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use an explicit interface implementation", + container.Compiler.Report.SymbolRelatedToPreviousError (implementing); + container.Compiler.Report.Error (686, method.Location, + "Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use an explicit interface implementation", method.GetSignatureForError (), TypeManager.CSharpSignature (implementing), container.GetSignatureForError ()); } else { PropertyBase.PropertyMethod pm = method as PropertyBase.PropertyMethod; if (pm != null && pm.HasCustomAccessModifier && (pm.ModFlags & Modifiers.PUBLIC) == 0) { - Report.SymbolRelatedToPreviousError (implementing); - Report.Error (277, method.Location, "Accessor `{0}' must be declared public to implement interface member `{1}'", + container.Compiler.Report.SymbolRelatedToPreviousError (implementing); + container.Compiler.Report.Error (277, method.Location, + "Accessor `{0}' must be declared public to implement interface member `{1}'", method.GetSignatureForError (), implementing.GetSignatureForError ()); } } @@ -1881,43 +1886,44 @@ namespace Mono.CSharp { // explicit implementations, make sure we are private. // if (implementing != null){ - // - // Setting null inside this block will trigger a more - // verbose error reporting for missing interface implementations - // - // The "candidate" function has been flagged already - // but it wont get cleared - // - if (member.IsExplicitImpl){ + if (member.IsExplicitImpl) { if (method.ParameterInfo.HasParams && !implementing.Parameters.HasParams) { - Report.SymbolRelatedToPreviousError (implementing); - Report.Error (466, method.Location, "`{0}': the explicit interface implementation cannot introduce the params modifier", + container.Compiler.Report.SymbolRelatedToPreviousError (implementing); + container.Compiler.Report.Error (466, method.Location, + "`{0}': the explicit interface implementation cannot introduce the params modifier", method.GetSignatureForError ()); } if (ambig_iface_method != null) { - Report.SymbolRelatedToPreviousError (ambig_iface_method); - Report.SymbolRelatedToPreviousError (implementing); - Report.Warning (473, 2, method.Location, + container.Compiler.Report.SymbolRelatedToPreviousError (ambig_iface_method); + container.Compiler.Report.SymbolRelatedToPreviousError (implementing); + container.Compiler.Report.Warning (473, 2, method.Location, "Explicit interface implementation `{0}' matches more than one interface member. Consider using a non-explicit implementation instead", method.GetSignatureForError ()); } - } else { + // + // Setting implementin to null inside this block will trigger a more + // verbose error reporting for missing interface implementations + // if (implementing.DeclaringType.IsInterface) { // // If this is an interface method implementation, // check for public accessibility // - if ((flags & MethodAttributes.MemberAccessMask) != MethodAttributes.Public) - { + if ((flags & MethodAttributes.MemberAccessMask) != MethodAttributes.Public) { + implementing = null; + } else if (optional && (container.Interfaces == null || Array.IndexOf (container.Interfaces, implementing.DeclaringType) < 0)) { + // + // We are not implementing interface when base class already implemented it + // implementing = null; } - } else if ((flags & MethodAttributes.MemberAccessMask) == MethodAttributes.Private){ + } else if ((flags & MethodAttributes.MemberAccessMask) == MethodAttributes.Private) { // We may never be private. implementing = null; - } else if ((modifiers & Modifiers.OVERRIDE) == 0){ + } else if ((modifiers & Modifiers.OVERRIDE) == 0) { // // We may be protected if we're overriding something. // @@ -1941,9 +1947,8 @@ namespace Mono.CSharp { // When implementing interface methods, set NewSlot // unless, we are overwriting a method. // - if (implementing.DeclaringType.IsInterface){ - if ((modifiers & Modifiers.OVERRIDE) == 0) - flags |= MethodAttributes.NewSlot; + if ((modifiers & Modifiers.OVERRIDE) == 0 && implementing.DeclaringType.IsInterface) { + flags |= MethodAttributes.NewSlot; } flags |= MethodAttributes.Virtual | MethodAttributes.HideBySig; @@ -1955,8 +1960,8 @@ namespace Mono.CSharp { // // clear the pending implementation flag (requires explicit methods to be defined first) // - parent.PartialContainer.PendingImplementations.ImplementMethod (method.MethodName, - member.InterfaceType, this, member.IsExplicitImpl, out ambig_iface_method); + pending.ImplementMethod (method.MethodName, + member.InterfaceType, this, member.IsExplicitImpl, out ambig_iface_method, ref optional); // // Update indexer accessor name to match implementing abstract accessor diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs index b9f9da18fd..0852b0f826 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/pending.cs @@ -345,14 +345,14 @@ namespace Mono.CSharp { /// /// Whether the specified method is an interface method implementation /// - public MethodSpec IsInterfaceMethod (MemberName name, TypeSpec ifaceType, MethodData method, out MethodSpec ambiguousCandidate) + public MethodSpec IsInterfaceMethod (MemberName name, TypeSpec ifaceType, MethodData method, out MethodSpec ambiguousCandidate, ref bool optional) { - return InterfaceMethod (name, ifaceType, method, Operation.Lookup, out ambiguousCandidate); + return InterfaceMethod (name, ifaceType, method, Operation.Lookup, out ambiguousCandidate, ref optional); } - public void ImplementMethod (MemberName name, TypeSpec ifaceType, MethodData method, bool clear_one, out MethodSpec ambiguousCandidate) + public void ImplementMethod (MemberName name, TypeSpec ifaceType, MethodData method, bool clear_one, out MethodSpec ambiguousCandidate, ref bool optional) { - InterfaceMethod (name, ifaceType, method, clear_one ? Operation.ClearOne : Operation.ClearAll, out ambiguousCandidate); + InterfaceMethod (name, ifaceType, method, clear_one ? Operation.ClearOne : Operation.ClearAll, out ambiguousCandidate, ref optional); } /// @@ -372,7 +372,7 @@ namespace Mono.CSharp { /// that was used in the interface, then we always need to create a proxy for it. /// /// - public MethodSpec InterfaceMethod (MemberName name, TypeSpec iType, MethodData method, Operation op, out MethodSpec ambiguousCandidate) + public MethodSpec InterfaceMethod (MemberName name, TypeSpec iType, MethodData method, Operation op, out MethodSpec ambiguousCandidate, ref bool optional) { ambiguousCandidate = null; @@ -439,6 +439,7 @@ namespace Mono.CSharp { } } else { tm.found [i] = method; + optional = tm.optional; } if (op == Operation.Lookup && name.Left != null && ambiguousCandidate == null) { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs index d5adfccad9..db013e307f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/property.cs @@ -205,7 +205,7 @@ namespace Mono.CSharp method_data = new MethodData (method, ModFlags, flags, this); - if (!method_data.Define (parent, method.GetFullName (MemberName), Report)) + if (!method_data.Define (parent.PartialContainer, method.GetFullName (MemberName))) return null; Spec.SetMetaInfo (method_data.MethodBuilder); @@ -272,7 +272,7 @@ namespace Mono.CSharp method_data = new MethodData (method, ModFlags, flags, this); - if (!method_data.Define (parent, method.GetFullName (MemberName), Report)) + if (!method_data.Define (parent.PartialContainer, method.GetFullName (MemberName))) return null; Spec.SetMetaInfo (method_data.MethodBuilder); @@ -1165,7 +1165,7 @@ namespace Mono.CSharp method_data = new MethodData (method, method.ModFlags, method.flags | MethodAttributes.HideBySig | MethodAttributes.SpecialName, this); - if (!method_data.Define (parent, method.GetFullName (MemberName), Report)) + if (!method_data.Define (parent.PartialContainer, method.GetFullName (MemberName))) return null; MethodBuilder mb = method_data.MethodBuilder; From 0dd31176bf8ccc6493c3c55753c183a2807d4804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 16:41:17 +0200 Subject: [PATCH 54/92] Fixed empty statement end location. --- ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs index e8c460913e..f33600f8ac 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.CSharp public override TextLocation EndLocation { get { - return new TextLocation (Location.Line, Location.Column); + return new TextLocation (Location.Line, Location.Column + 1); } } From e07b8fa3fef05f1f20aaf04c3e6ae80aaba9c50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 18:08:25 +0200 Subject: [PATCH 55/92] Fixed some dot locations. --- .../Parser/CSharpParser.cs | 22 +- .../Parser/mcs/cs-parser.cs | 1371 +++++++++-------- .../Parser/mcs/cs-parser.jay | 47 +- .../Parser/mcs/decl.cs | 13 +- .../Parser/mcs/expression.cs | 7 + 5 files changed, 745 insertions(+), 715 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 76535eee0a..157086f41e 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -134,10 +134,7 @@ namespace ICSharpCode.NRefactory.CSharp var memberType = new MemberType (); memberType.AddChild (ConvertToType (ma.LeftExpression), MemberType.TargetRole); - - var location = LocationsBag.GetLocations (ma); - if (location != null) - memberType.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberType.Roles.Dot); + memberType.AddChild (new CSharpTokenNode (Convert (ma.DotLocation), 1), MemberType.Roles.Dot); memberType.MemberNameToken = Identifier.Create (ma.Name, Convert (ma.Location)); @@ -292,10 +289,8 @@ namespace ICSharpCode.NRefactory.CSharp namespaceDecl.InsertChildBefore (insertPos, newIdent, NamespaceDeclaration.Roles.Identifier); insertPos = newIdent; - var location = LocationsBag.GetLocations (memberName); - - if (location != null) { - var dotToken = new CSharpTokenNode (Convert (location[0]), 1); + if (!memberName.DotLocation.IsNull) { + var dotToken = new CSharpTokenNode (Convert (memberName.DotLocation), 1); namespaceDecl.InsertChildBefore (insertPos, dotToken, NamespaceDeclaration.Roles.Dot); insertPos = dotToken; } @@ -342,9 +337,8 @@ namespace ICSharpCode.NRefactory.CSharp t.IsDoubleColon = memberName.IsDoubleColon; t.AddChild (ConvertImport (memberName.Left), MemberType.TargetRole); - var location = LocationsBag.GetLocations (memberName); - if (location != null) - t.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberType.Roles.Dot); + if (!memberName.DotLocation.IsNull) + t.AddChild (new CSharpTokenNode (Convert (memberName.DotLocation), 1), MemberType.Roles.Dot); t.AddChild (Identifier.Create (memberName.Name, Convert(memberName.Location)), MemberType.Roles.Identifier); AddTypeArguments (t, memberName.TypeArguments); @@ -1914,9 +1908,9 @@ namespace ICSharpCode.NRefactory.CSharp var leftExpr = memberAccess.LeftExpression.Accept (this); result.AddChild ((Expression)leftExpr, MemberReferenceExpression.Roles.TargetExpression); } - var location = LocationsBag.GetLocations (memberAccess); - if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), MemberReferenceExpression.Roles.Dot); + if (!memberAccess.DotLocation.IsNull) { + result.AddChild (new CSharpTokenNode (Convert (memberAccess.DotLocation), 1), MemberReferenceExpression.Roles.Dot); + } } result.AddChild (Identifier.Create (memberAccess.Name, Convert (memberAccess.Location)), MemberReferenceExpression.Roles.Identifier); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 03c561ac43..cfd54b5c56 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1459,7 +1459,7 @@ case 41: case_41(); break; case 42: -#line 643 "cs-parser.jay" +#line 644 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1489,18 +1489,18 @@ case 57: case_57(); break; case 58: -#line 739 "cs-parser.jay" +#line 740 "cs-parser.jay" { yyVal = "event"; } break; case 59: -#line 740 "cs-parser.jay" +#line 741 "cs-parser.jay" { yyVal = "return"; } break; case 60: case_60(); break; case 61: -#line 757 "cs-parser.jay" +#line 758 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1509,7 +1509,7 @@ case 62: case_62(); break; case 63: -#line 772 "cs-parser.jay" +#line 773 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1518,14 +1518,14 @@ case 64: case_64(); break; case 66: -#line 796 "cs-parser.jay" +#line 797 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 807 "cs-parser.jay" +#line 808 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1541,13 +1541,13 @@ case 72: case_72(); break; case 73: -#line 851 "cs-parser.jay" +#line 852 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 859 "cs-parser.jay" +#line 860 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1559,29 +1559,29 @@ case 77: case_77(); break; case 78: -#line 884 "cs-parser.jay" +#line 885 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 888 "cs-parser.jay" +#line 889 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 892 "cs-parser.jay" +#line 893 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; case 83: -#line 904 "cs-parser.jay" +#line 905 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 84: -#line 908 "cs-parser.jay" +#line 909 "cs-parser.jay" { lexer.parsing_modifiers = true; } @@ -1590,7 +1590,7 @@ case 95: case_95(); break; case 96: -#line 938 "cs-parser.jay" +#line 939 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1611,7 +1611,7 @@ case 101: case_101(); break; case 102: -#line 979 "cs-parser.jay" +#line 980 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1623,13 +1623,13 @@ case 104: case_104(); break; case 107: -#line 1020 "cs-parser.jay" +#line 1021 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 108: -#line 1024 "cs-parser.jay" +#line 1025 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1638,7 +1638,7 @@ case 109: case_109(); break; case 110: -#line 1040 "cs-parser.jay" +#line 1041 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1662,7 +1662,7 @@ case 118: case_118(); break; case 119: -#line 1119 "cs-parser.jay" +#line 1120 "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"); } @@ -1674,13 +1674,13 @@ case 122: case_122(); break; case 125: -#line 1149 "cs-parser.jay" +#line 1150 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: -#line 1153 "cs-parser.jay" +#line 1154 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1689,7 +1689,7 @@ case 127: case_127(); break; case 128: -#line 1166 "cs-parser.jay" +#line 1167 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1698,13 +1698,13 @@ case 129: case_129(); break; case 132: -#line 1185 "cs-parser.jay" +#line 1186 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 133: -#line 1189 "cs-parser.jay" +#line 1190 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1713,7 +1713,7 @@ case 134: case_134(); break; case 135: -#line 1205 "cs-parser.jay" +#line 1206 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1734,13 +1734,13 @@ case 142: case_142(); break; case 143: -#line 1276 "cs-parser.jay" +#line 1277 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 144: -#line 1280 "cs-parser.jay" +#line 1281 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1749,7 +1749,7 @@ case 145: case_145(); break; case 146: -#line 1320 "cs-parser.jay" +#line 1321 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1758,7 +1758,7 @@ case 147: case_147(); break; case 148: -#line 1330 "cs-parser.jay" +#line 1331 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1770,11 +1770,11 @@ case 150: case_150(); break; case 152: -#line 1404 "cs-parser.jay" +#line 1405 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 153: -#line 1408 "cs-parser.jay" +#line 1409 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: @@ -1799,13 +1799,13 @@ case 161: case_161(); break; case 162: -#line 1480 "cs-parser.jay" +#line 1481 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 163: -#line 1484 "cs-parser.jay" +#line 1485 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1829,7 +1829,7 @@ case 169: case_169(); break; case 170: -#line 1559 "cs-parser.jay" +#line 1560 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1838,11 +1838,11 @@ case 171: case_171(); break; case 172: -#line 1600 "cs-parser.jay" +#line 1601 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 174: -#line 1608 "cs-parser.jay" +#line 1609 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1875,7 +1875,7 @@ case 183: case_183(); break; case 184: -#line 1697 "cs-parser.jay" +#line 1698 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1896,7 +1896,7 @@ case 189: case_189(); break; case 190: -#line 1751 "cs-parser.jay" +#line 1752 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1905,7 +1905,7 @@ case 191: case_191(); break; case 192: -#line 1780 "cs-parser.jay" +#line 1781 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1935,7 +1935,7 @@ case 205: case_205(); break; case 206: -#line 1929 "cs-parser.jay" +#line 1930 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1953,55 +1953,55 @@ case 210: case_210(); break; case 211: -#line 1966 "cs-parser.jay" +#line 1967 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1978 "cs-parser.jay" +#line 1979 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 1982 "cs-parser.jay" +#line 1983 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 1989 "cs-parser.jay" +#line 1990 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 1993 "cs-parser.jay" +#line 1994 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2001 "cs-parser.jay" +#line 2002 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2005 "cs-parser.jay" +#line 2006 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2009 "cs-parser.jay" +#line 2010 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2015 "cs-parser.jay" +#line 2016 "cs-parser.jay" { } break; @@ -2009,14 +2009,14 @@ case 226: case_226(); break; case 228: -#line 2048 "cs-parser.jay" +#line 2049 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2064 "cs-parser.jay" +#line 2065 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2025,95 +2025,95 @@ case 232: case_232(); break; case 234: -#line 2110 "cs-parser.jay" +#line 2111 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2111 "cs-parser.jay" +#line 2112 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2112 "cs-parser.jay" +#line 2113 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2113 "cs-parser.jay" +#line 2114 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2114 "cs-parser.jay" +#line 2115 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2115 "cs-parser.jay" +#line 2116 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2117 "cs-parser.jay" +#line 2118 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2118 "cs-parser.jay" +#line 2119 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2120 "cs-parser.jay" +#line 2121 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2121 "cs-parser.jay" +#line 2122 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2122 "cs-parser.jay" +#line 2123 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2123 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2124 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2125 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2126 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2127 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2128 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2129 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2130 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2131 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2132 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2133 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2140 "cs-parser.jay" +#line 2141 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2122,7 +2122,7 @@ case 257: case_257(); break; case 258: -#line 2159 "cs-parser.jay" +#line 2160 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2149,11 +2149,11 @@ case 265: case_265(); break; case 267: -#line 2262 "cs-parser.jay" +#line 2263 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2274 "cs-parser.jay" +#line 2275 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2162,7 +2162,7 @@ case 271: case_271(); break; case 272: -#line 2284 "cs-parser.jay" +#line 2285 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2195,7 +2195,7 @@ case 281: case_281(); break; case 283: -#line 2393 "cs-parser.jay" +#line 2394 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2204,13 +2204,13 @@ case 284: case_284(); break; case 287: -#line 2410 "cs-parser.jay" +#line 2411 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2414 "cs-parser.jay" +#line 2415 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2219,7 +2219,7 @@ case 289: case_289(); break; case 290: -#line 2427 "cs-parser.jay" +#line 2428 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2231,7 +2231,7 @@ case 292: case_292(); break; case 293: -#line 2452 "cs-parser.jay" +#line 2453 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2279,7 +2279,7 @@ case 311: case_311(); break; case 314: -#line 2611 "cs-parser.jay" +#line 2612 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2297,7 +2297,7 @@ case 319: case_319(); break; case 320: -#line 2669 "cs-parser.jay" +#line 2670 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2306,7 +2306,7 @@ case 321: case_321(); break; case 322: -#line 2691 "cs-parser.jay" +#line 2692 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2339,7 +2339,7 @@ case 335: case_335(); break; case 336: -#line 2795 "cs-parser.jay" +#line 2797 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2384,13 +2384,13 @@ case 351: case_351(); break; case 353: -#line 2916 "cs-parser.jay" +#line 2918 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 354: -#line 2923 "cs-parser.jay" +#line 2925 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2405,7 +2405,7 @@ case 360: case_360(); break; case 362: -#line 2961 "cs-parser.jay" +#line 2963 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2414,22 +2414,22 @@ case 363: case_363(); break; case 364: -#line 2981 "cs-parser.jay" +#line 2983 "cs-parser.jay" { - yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); + yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 365: case_365(); break; case 366: -#line 2990 "cs-parser.jay" +#line 2992 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 367: -#line 2994 "cs-parser.jay" +#line 2996 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2447,63 +2447,63 @@ case 371: case_371(); break; case 372: -#line 3033 "cs-parser.jay" +#line 3035 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 373: -#line 3034 "cs-parser.jay" +#line 3036 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3035 "cs-parser.jay" +#line 3037 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3036 "cs-parser.jay" +#line 3038 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3037 "cs-parser.jay" +#line 3039 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3038 "cs-parser.jay" +#line 3040 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 379: -#line 3043 "cs-parser.jay" +#line 3045 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3044 "cs-parser.jay" +#line 3046 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3045 "cs-parser.jay" +#line 3047 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3046 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3047 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3048 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3049 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3050 "cs-parser.jay" +#line 3052 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3051 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 408: @@ -2513,22 +2513,22 @@ case 409: case_409(); break; case 413: -#line 3098 "cs-parser.jay" +#line 3100 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 414: -#line 3102 "cs-parser.jay" +#line 3104 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3103 "cs-parser.jay" +#line 3105 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 420: case_420(); break; case 421: -#line 3136 "cs-parser.jay" +#line 3138 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2546,7 +2546,7 @@ case 425: case_425(); break; case 426: -#line 3168 "cs-parser.jay" +#line 3173 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2555,7 +2555,7 @@ case 427: case_427(); break; case 428: -#line 3176 "cs-parser.jay" +#line 3181 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2567,7 +2567,7 @@ case 430: case_430(); break; case 431: -#line 3192 "cs-parser.jay" +#line 3197 "cs-parser.jay" { yyVal = null; } break; case 433: @@ -2577,11 +2577,11 @@ case 434: case_434(); break; case 435: -#line 3215 "cs-parser.jay" +#line 3220 "cs-parser.jay" { yyVal = null; } break; case 436: -#line 3219 "cs-parser.jay" +#line 3224 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2599,7 +2599,7 @@ case 440: case_440(); break; case 441: -#line 3252 "cs-parser.jay" +#line 3257 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2614,7 +2614,7 @@ case 444: case_444(); break; case 447: -#line 3280 "cs-parser.jay" +#line 3285 "cs-parser.jay" { yyVal = null; } break; case 449: @@ -2633,7 +2633,7 @@ case 453: case_453(); break; case 454: -#line 3332 "cs-parser.jay" +#line 3337 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2669,13 +2669,13 @@ case 468: case_468(); break; case 469: -#line 3419 "cs-parser.jay" +#line 3424 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 471: -#line 3427 "cs-parser.jay" +#line 3432 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2687,13 +2687,13 @@ case 473: case_473(); break; case 474: -#line 3447 "cs-parser.jay" +#line 3452 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 475: -#line 3454 "cs-parser.jay" +#line 3459 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2720,7 +2720,7 @@ case 482: case_482(); break; case 483: -#line 3520 "cs-parser.jay" +#line 3525 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2732,7 +2732,7 @@ case 485: case_485(); break; case 488: -#line 3547 "cs-parser.jay" +#line 3552 "cs-parser.jay" { yyVal = null; } break; case 490: @@ -2763,25 +2763,25 @@ case 501: case_501(); break; case 502: -#line 3625 "cs-parser.jay" +#line 3630 "cs-parser.jay" { yyVal = 2; } break; case 503: -#line 3629 "cs-parser.jay" +#line 3634 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 504: -#line 3636 "cs-parser.jay" +#line 3641 "cs-parser.jay" { yyVal = null; } break; case 505: -#line 3640 "cs-parser.jay" +#line 3645 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2799,7 +2799,7 @@ case 509: case_509(); break; case 510: -#line 3684 "cs-parser.jay" +#line 3689 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2844,7 +2844,7 @@ case 525: case_525(); break; case 526: -#line 3798 "cs-parser.jay" +#line 3809 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2853,25 +2853,25 @@ case 527: case_527(); break; case 528: -#line 3811 "cs-parser.jay" +#line 3822 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 529: -#line 3815 "cs-parser.jay" +#line 3826 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 530: -#line 3822 "cs-parser.jay" +#line 3833 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 532: -#line 3830 "cs-parser.jay" +#line 3841 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2883,13 +2883,13 @@ case 534: case_534(); break; case 536: -#line 3856 "cs-parser.jay" +#line 3867 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 537: -#line 3860 "cs-parser.jay" +#line 3871 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2901,37 +2901,37 @@ case 541: case_541(); break; case 543: -#line 3890 "cs-parser.jay" +#line 3901 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 544: -#line 3894 "cs-parser.jay" +#line 3905 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3898 "cs-parser.jay" +#line 3909 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3902 "cs-parser.jay" +#line 3913 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3906 "cs-parser.jay" +#line 3917 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3910 "cs-parser.jay" +#line 3921 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2949,7 +2949,7 @@ case 554: case_554(); break; case 555: -#line 3942 "cs-parser.jay" +#line 3953 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2958,13 +2958,13 @@ case 556: case_556(); break; case 557: -#line 3951 "cs-parser.jay" +#line 3962 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 558: -#line 3955 "cs-parser.jay" +#line 3966 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3015,7 +3015,7 @@ case 583: case_583(); break; case 584: -#line 4079 "cs-parser.jay" +#line 4090 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3066,14 +3066,14 @@ case 599: case_599(); break; case 600: -#line 4176 "cs-parser.jay" +#line 4187 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 601: case_601(); break; case 604: -#line 4191 "cs-parser.jay" +#line 4202 "cs-parser.jay" { start_block (lexer.Location); } @@ -3097,7 +3097,7 @@ case 611: case_611(); break; case 612: -#line 4236 "cs-parser.jay" +#line 4247 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3109,7 +3109,7 @@ case 614: case_614(); break; case 615: -#line 4250 "cs-parser.jay" +#line 4261 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3121,7 +3121,7 @@ case 617: case_617(); break; case 623: -#line 4275 "cs-parser.jay" +#line 4286 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3136,13 +3136,13 @@ case 626: case_626(); break; case 628: -#line 4304 "cs-parser.jay" +#line 4315 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 629: -#line 4317 "cs-parser.jay" +#line 4328 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3160,18 +3160,18 @@ case 633: case_633(); break; case 634: -#line 4360 "cs-parser.jay" +#line 4371 "cs-parser.jay" { yyVal = null; } break; case 635: -#line 4362 "cs-parser.jay" +#line 4373 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 636: case_636(); break; case 637: -#line 4375 "cs-parser.jay" +#line 4386 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3228,7 +3228,7 @@ case 656: case_656(); break; case 658: -#line 4495 "cs-parser.jay" +#line 4506 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3258,19 +3258,19 @@ case 666: case_666(); break; case 667: -#line 4585 "cs-parser.jay" +#line 4596 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 668: -#line 4589 "cs-parser.jay" +#line 4600 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4596 "cs-parser.jay" +#line 4607 "cs-parser.jay" { yyVal = Variance.None; } @@ -3288,7 +3288,7 @@ case 673: case_673(); break; case 674: -#line 4641 "cs-parser.jay" +#line 4652 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3306,13 +3306,13 @@ case 678: case_678(); break; case 683: -#line 4685 "cs-parser.jay" +#line 4696 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 684: -#line 4689 "cs-parser.jay" +#line 4700 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3321,13 +3321,13 @@ case 686: case_686(); break; case 689: -#line 4713 "cs-parser.jay" +#line 4724 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 690: -#line 4717 "cs-parser.jay" +#line 4728 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3360,13 +3360,13 @@ case 729: case_729(); break; case 730: -#line 4861 "cs-parser.jay" +#line 4872 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 731: -#line 4865 "cs-parser.jay" +#line 4876 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3378,7 +3378,7 @@ case 734: case_734(); break; case 735: -#line 4886 "cs-parser.jay" +#line 4897 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3411,7 +3411,7 @@ case 750: case_750(); break; case 751: -#line 4986 "cs-parser.jay" +#line 4997 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3432,15 +3432,15 @@ case 761: case_761(); break; case 762: -#line 5036 "cs-parser.jay" +#line 5047 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 763: -#line 5040 "cs-parser.jay" +#line 5051 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5041 "cs-parser.jay" +#line 5052 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: @@ -3459,7 +3459,7 @@ case 771: case_771(); break; case 772: -#line 5109 "cs-parser.jay" +#line 5120 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3480,13 +3480,13 @@ case 778: case_778(); break; case 779: -#line 5153 "cs-parser.jay" +#line 5164 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 780: -#line 5157 "cs-parser.jay" +#line 5168 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3501,7 +3501,7 @@ case 783: case_783(); break; case 784: -#line 5186 "cs-parser.jay" +#line 5197 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3516,7 +3516,7 @@ case 791: case_791(); break; case 792: -#line 5225 "cs-parser.jay" +#line 5236 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3528,7 +3528,7 @@ case 794: case_794(); break; case 795: -#line 5253 "cs-parser.jay" +#line 5264 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 797: @@ -3538,11 +3538,11 @@ case 798: case_798(); break; case 800: -#line 5274 "cs-parser.jay" +#line 5285 "cs-parser.jay" { yyVal = null; } break; case 802: -#line 5279 "cs-parser.jay" +#line 5290 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 806: @@ -3585,7 +3585,7 @@ case 824: case_824(); break; case 827: -#line 5434 "cs-parser.jay" +#line 5445 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3606,7 +3606,7 @@ case 832: case_832(); break; case 835: -#line 5487 "cs-parser.jay" +#line 5498 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3615,7 +3615,7 @@ case 836: case_836(); break; case 837: -#line 5506 "cs-parser.jay" +#line 5517 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3624,13 +3624,13 @@ case 838: case_838(); break; case 839: -#line 5524 "cs-parser.jay" +#line 5535 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 840: -#line 5531 "cs-parser.jay" +#line 5542 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3639,7 +3639,7 @@ case 841: case_841(); break; case 842: -#line 5541 "cs-parser.jay" +#line 5552 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3669,7 +3669,7 @@ case 850: case_850(); break; case 851: -#line 5624 "cs-parser.jay" +#line 5635 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3702,7 +3702,7 @@ case 860: case_860(); break; case 861: -#line 5725 "cs-parser.jay" +#line 5736 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3711,7 +3711,7 @@ case 862: case_862(); break; case 863: -#line 5740 "cs-parser.jay" +#line 5751 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3726,7 +3726,7 @@ case 867: case_867(); break; case 868: -#line 5785 "cs-parser.jay" +#line 5796 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3747,7 +3747,7 @@ case 876: case_876(); break; case 882: -#line 5844 "cs-parser.jay" +#line 5855 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3756,7 +3756,7 @@ case 883: case_883(); break; case 884: -#line 5863 "cs-parser.jay" +#line 5874 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3789,13 +3789,13 @@ case 893: case_893(); break; case 895: -#line 6007 "cs-parser.jay" +#line 6018 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 896: -#line 6014 "cs-parser.jay" +#line 6025 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3816,7 +3816,7 @@ case 903: case_903(); break; case 904: -#line 6060 "cs-parser.jay" +#line 6071 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3828,7 +3828,7 @@ case 906: case_906(); break; case 907: -#line 6077 "cs-parser.jay" +#line 6088 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3852,13 +3852,13 @@ case 916: case_916(); break; case 924: -#line 6201 "cs-parser.jay" +#line 6212 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 925: -#line 6208 "cs-parser.jay" +#line 6219 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3870,13 +3870,13 @@ case 927: case_927(); break; case 928: -#line 6225 "cs-parser.jay" +#line 6236 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 929: -#line 6229 "cs-parser.jay" +#line 6240 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3894,25 +3894,25 @@ case 933: case_933(); break; case 935: -#line 6265 "cs-parser.jay" +#line 6276 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 937: -#line 6273 "cs-parser.jay" +#line 6284 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 938: -#line 6277 "cs-parser.jay" +#line 6288 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 939: -#line 6284 "cs-parser.jay" +#line 6295 "cs-parser.jay" { yyVal = new List (0); } @@ -4102,19 +4102,20 @@ void case_26() #line 566 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; - yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location); - lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); + yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location) { + DotLocation = GetLocation (yyVals[-1+yyTop]) + }; } void case_27() -#line 572 "cs-parser.jay" +#line 573 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 590 "cs-parser.jay" +#line 591 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4125,7 +4126,7 @@ void case_32() } void case_41() -#line 622 "cs-parser.jay" +#line 623 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4146,7 +4147,7 @@ void case_41() } void case_50() -#line 672 "cs-parser.jay" +#line 673 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4158,7 +4159,7 @@ void case_50() } void case_51() -#line 682 "cs-parser.jay" +#line 683 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4170,21 +4171,21 @@ void case_51() } void case_52() -#line 695 "cs-parser.jay" +#line 696 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 700 "cs-parser.jay" +#line 701 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 708 "cs-parser.jay" +#line 709 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4193,7 +4194,7 @@ void case_54() } void case_55() -#line 715 "cs-parser.jay" +#line 716 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4207,21 +4208,21 @@ void case_55() } void case_56() -#line 727 "cs-parser.jay" +#line 728 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_57() -#line 735 "cs-parser.jay" +#line 736 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); } void case_60() -#line 742 "cs-parser.jay" +#line 743 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4233,7 +4234,7 @@ void case_60() } void case_62() -#line 759 "cs-parser.jay" +#line 760 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4243,7 +4244,7 @@ void case_62() } void case_64() -#line 774 "cs-parser.jay" +#line 775 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4253,7 +4254,7 @@ void case_64() } Arguments [] arguments = (Arguments []) yyVals[0+yyTop]; - ATypeNameExpression expr = mname.GetTypeExpression (lbag); + ATypeNameExpression expr = mname.GetTypeExpression (); yyVal = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); if (arguments != null) { lbag.AddLocation (yyVal, savedAttrParenOpenLocation, savedAttrParenCloseLocation); @@ -4261,7 +4262,7 @@ void case_64() } void case_67() -#line 798 "cs-parser.jay" +#line 799 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4269,7 +4270,7 @@ void case_67() } void case_69() -#line 809 "cs-parser.jay" +#line 810 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4277,7 +4278,7 @@ void case_69() } void case_70() -#line 815 "cs-parser.jay" +#line 816 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4285,7 +4286,7 @@ void case_70() } void case_71() -#line 821 "cs-parser.jay" +#line 822 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4302,7 +4303,7 @@ void case_71() } void case_72() -#line 836 "cs-parser.jay" +#line 837 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4314,7 +4315,7 @@ void case_72() } void case_76() -#line 861 "cs-parser.jay" +#line 862 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4323,7 +4324,7 @@ void case_76() } void case_77() -#line 871 "cs-parser.jay" +#line 872 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4336,7 +4337,7 @@ void case_77() } void case_95() -#line 923 "cs-parser.jay" +#line 924 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4345,7 +4346,7 @@ void case_95() } void case_97() -#line 940 "cs-parser.jay" +#line 941 "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]); @@ -4353,7 +4354,7 @@ void case_97() } void case_98() -#line 947 "cs-parser.jay" +#line 948 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4367,14 +4368,14 @@ void case_98() } void case_99() -#line 959 "cs-parser.jay" +#line 960 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_100() -#line 964 "cs-parser.jay" +#line 965 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); --lexer.parsing_declaration; @@ -4383,7 +4384,7 @@ void case_100() } void case_101() -#line 971 "cs-parser.jay" +#line 972 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[-1+yyTop]); @@ -4391,7 +4392,7 @@ void case_101() } void case_103() -#line 986 "cs-parser.jay" +#line 987 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4406,7 +4407,7 @@ void case_103() } void case_104() -#line 999 "cs-parser.jay" +#line 1000 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4419,7 +4420,7 @@ void case_104() } void case_109() -#line 1029 "cs-parser.jay" +#line 1030 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4427,7 +4428,7 @@ void case_109() } void case_111() -#line 1042 "cs-parser.jay" +#line 1043 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4435,14 +4436,14 @@ void case_111() } void case_112() -#line 1048 "cs-parser.jay" +#line 1049 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_115() -#line 1063 "cs-parser.jay" +#line 1064 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4457,7 +4458,7 @@ void case_115() } void case_116() -#line 1078 "cs-parser.jay" +#line 1079 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4470,7 +4471,7 @@ void case_116() } void case_117() -#line 1091 "cs-parser.jay" +#line 1092 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4483,7 +4484,7 @@ void case_117() } void case_118() -#line 1102 "cs-parser.jay" +#line 1103 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4497,7 +4498,7 @@ void case_118() } void case_121() -#line 1125 "cs-parser.jay" +#line 1126 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4505,7 +4506,7 @@ void case_121() } void case_122() -#line 1131 "cs-parser.jay" +#line 1132 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4515,7 +4516,7 @@ void case_122() } void case_127() -#line 1158 "cs-parser.jay" +#line 1159 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4523,7 +4524,7 @@ void case_127() } void case_129() -#line 1168 "cs-parser.jay" +#line 1169 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4532,7 +4533,7 @@ void case_129() } void case_134() -#line 1194 "cs-parser.jay" +#line 1195 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4540,7 +4541,7 @@ void case_134() } void case_136() -#line 1207 "cs-parser.jay" +#line 1208 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4548,14 +4549,14 @@ void case_136() } void case_137() -#line 1213 "cs-parser.jay" +#line 1214 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_140() -#line 1223 "cs-parser.jay" +#line 1224 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4563,7 +4564,7 @@ void case_140() } void case_141() -#line 1232 "cs-parser.jay" +#line 1233 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4575,7 +4576,7 @@ void case_141() } void case_142() -#line 1242 "cs-parser.jay" +#line 1243 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4603,7 +4604,7 @@ void case_142() } void case_145() -#line 1282 "cs-parser.jay" +#line 1283 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4638,14 +4639,14 @@ void case_145() } void case_147() -#line 1323 "cs-parser.jay" +#line 1324 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_149() -#line 1332 "cs-parser.jay" +#line 1333 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4697,7 +4698,7 @@ void case_149() } void case_150() -#line 1385 "cs-parser.jay" +#line 1386 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4715,7 +4716,7 @@ void case_150() } void case_155() -#line 1414 "cs-parser.jay" +#line 1415 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4723,7 +4724,7 @@ void case_155() } void case_156() -#line 1420 "cs-parser.jay" +#line 1421 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4734,7 +4735,7 @@ void case_156() } void case_157() -#line 1429 "cs-parser.jay" +#line 1430 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4745,7 +4746,7 @@ void case_157() } void case_158() -#line 1438 "cs-parser.jay" +#line 1439 "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"); @@ -4755,7 +4756,7 @@ void case_158() } void case_159() -#line 1446 "cs-parser.jay" +#line 1447 "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"); @@ -4770,7 +4771,7 @@ void case_159() } void case_160() -#line 1459 "cs-parser.jay" +#line 1460 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4779,7 +4780,7 @@ void case_160() } void case_161() -#line 1466 "cs-parser.jay" +#line 1467 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4793,14 +4794,14 @@ void case_161() } void case_164() -#line 1486 "cs-parser.jay" +#line 1487 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_165() -#line 1494 "cs-parser.jay" +#line 1495 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4811,7 +4812,7 @@ void case_165() } void case_166() -#line 1503 "cs-parser.jay" +#line 1504 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4831,7 +4832,7 @@ void case_166() } void case_167() -#line 1527 "cs-parser.jay" +#line 1528 "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); @@ -4839,7 +4840,7 @@ void case_167() } void case_168() -#line 1536 "cs-parser.jay" +#line 1537 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4848,7 +4849,7 @@ void case_168() } void case_169() -#line 1546 "cs-parser.jay" +#line 1547 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4857,7 +4858,7 @@ void case_169() } void case_171() -#line 1561 "cs-parser.jay" +#line 1562 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4896,7 +4897,7 @@ void case_171() } void case_175() -#line 1610 "cs-parser.jay" +#line 1611 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4919,7 +4920,7 @@ void case_175() } void case_176() -#line 1634 "cs-parser.jay" +#line 1635 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4928,7 +4929,7 @@ void case_176() } void case_177() -#line 1641 "cs-parser.jay" +#line 1642 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4937,7 +4938,7 @@ void case_177() } void case_178() -#line 1648 "cs-parser.jay" +#line 1649 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4949,14 +4950,14 @@ void case_178() } void case_179() -#line 1661 "cs-parser.jay" +#line 1662 "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_180() -#line 1666 "cs-parser.jay" +#line 1667 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4965,21 +4966,21 @@ void case_180() } void case_181() -#line 1673 "cs-parser.jay" +#line 1674 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1681 "cs-parser.jay" +#line 1682 "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"); } void case_183() -#line 1686 "cs-parser.jay" +#line 1687 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4990,21 +4991,21 @@ void case_183() } void case_185() -#line 1702 "cs-parser.jay" +#line 1703 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1713 "cs-parser.jay" +#line 1714 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1718 "cs-parser.jay" +#line 1719 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5020,7 +5021,7 @@ void case_187() } void case_188() -#line 1732 "cs-parser.jay" +#line 1733 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5029,14 +5030,14 @@ void case_188() } void case_189() -#line 1739 "cs-parser.jay" +#line 1740 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1753 "cs-parser.jay" +#line 1754 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5063,7 +5064,7 @@ void case_191() } void case_193() -#line 1782 "cs-parser.jay" +#line 1783 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5076,7 +5077,7 @@ void case_193() } void case_198() -#line 1801 "cs-parser.jay" +#line 1802 "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 ()); @@ -5089,7 +5090,7 @@ void case_198() } void case_199() -#line 1815 "cs-parser.jay" +#line 1816 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5112,7 +5113,7 @@ void case_199() } void case_200() -#line 1836 "cs-parser.jay" +#line 1837 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5135,7 +5136,7 @@ void case_200() } void case_201() -#line 1860 "cs-parser.jay" +#line 1861 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5163,7 +5164,7 @@ void case_201() } void case_202() -#line 1886 "cs-parser.jay" +#line 1887 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5186,21 +5187,21 @@ void case_202() } void case_204() -#line 1911 "cs-parser.jay" +#line 1912 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1916 "cs-parser.jay" +#line 1917 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1931 "cs-parser.jay" +#line 1932 "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]); @@ -5208,7 +5209,7 @@ void case_207() } void case_208() -#line 1938 "cs-parser.jay" +#line 1939 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5223,7 +5224,7 @@ void case_208() } void case_209() -#line 1951 "cs-parser.jay" +#line 1952 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5231,7 +5232,7 @@ void case_209() } void case_210() -#line 1957 "cs-parser.jay" +#line 1958 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5240,7 +5241,7 @@ void case_210() } void case_226() -#line 2017 "cs-parser.jay" +#line 2018 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5270,14 +5271,14 @@ void case_226() } void case_230() -#line 2054 "cs-parser.jay" +#line 2055 "cs-parser.jay" { 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_232() -#line 2066 "cs-parser.jay" +#line 2067 "cs-parser.jay" { valid_param_mod = 0; @@ -5319,7 +5320,7 @@ void case_232() } void case_257() -#line 2142 "cs-parser.jay" +#line 2143 "cs-parser.jay" { valid_param_mod = 0; @@ -5336,7 +5337,7 @@ void case_257() } void case_259() -#line 2161 "cs-parser.jay" +#line 2162 "cs-parser.jay" { valid_param_mod = 0; @@ -5353,7 +5354,7 @@ void case_259() } void case_260() -#line 2176 "cs-parser.jay" +#line 2177 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5361,7 +5362,7 @@ void case_260() } void case_261() -#line 2182 "cs-parser.jay" +#line 2183 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5369,7 +5370,7 @@ void case_261() } void case_262() -#line 2192 "cs-parser.jay" +#line 2193 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5385,7 +5386,7 @@ void case_262() } void case_263() -#line 2211 "cs-parser.jay" +#line 2212 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5396,7 +5397,7 @@ void case_263() } void case_264() -#line 2220 "cs-parser.jay" +#line 2221 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5409,7 +5410,7 @@ void case_264() } void case_265() -#line 2231 "cs-parser.jay" +#line 2232 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5439,7 +5440,7 @@ void case_265() } void case_271() -#line 2276 "cs-parser.jay" +#line 2277 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5447,7 +5448,7 @@ void case_271() } void case_273() -#line 2286 "cs-parser.jay" +#line 2287 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5455,14 +5456,14 @@ void case_273() } void case_274() -#line 2292 "cs-parser.jay" +#line 2293 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2300 "cs-parser.jay" +#line 2301 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5473,7 +5474,7 @@ void case_275() } void case_276() -#line 2309 "cs-parser.jay" +#line 2310 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5495,7 +5496,7 @@ void case_276() } void case_277() -#line 2334 "cs-parser.jay" +#line 2335 "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); @@ -5509,7 +5510,7 @@ void case_277() } void case_278() -#line 2348 "cs-parser.jay" +#line 2349 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5521,7 +5522,7 @@ void case_278() } void case_279() -#line 2361 "cs-parser.jay" +#line 2362 "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); @@ -5531,7 +5532,7 @@ void case_279() } void case_280() -#line 2369 "cs-parser.jay" +#line 2370 "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"); @@ -5540,7 +5541,7 @@ void case_280() } void case_281() -#line 2376 "cs-parser.jay" +#line 2377 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5553,14 +5554,14 @@ void case_281() } void case_284() -#line 2395 "cs-parser.jay" +#line 2396 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2419 "cs-parser.jay" +#line 2420 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5568,7 +5569,7 @@ void case_289() } void case_291() -#line 2429 "cs-parser.jay" +#line 2430 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5577,7 +5578,7 @@ void case_291() } void case_292() -#line 2438 "cs-parser.jay" +#line 2439 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5591,28 +5592,28 @@ void case_292() } void case_296() -#line 2459 "cs-parser.jay" +#line 2460 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2464 "cs-parser.jay" +#line 2465 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2469 "cs-parser.jay" +#line 2470 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2477 "cs-parser.jay" +#line 2478 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5626,7 +5627,7 @@ void case_299() } void case_300() -#line 2489 "cs-parser.jay" +#line 2490 "cs-parser.jay" { lexer.EventParsing = true; @@ -5641,7 +5642,7 @@ void case_300() } void case_301() -#line 2505 "cs-parser.jay" +#line 2506 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5655,7 +5656,7 @@ void case_301() } void case_302() -#line 2517 "cs-parser.jay" +#line 2518 "cs-parser.jay" { lexer.EventParsing = true; @@ -5670,14 +5671,14 @@ void case_302() } void case_303() -#line 2533 "cs-parser.jay" +#line 2534 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_305() -#line 2545 "cs-parser.jay" +#line 2546 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-2+yyTop])); if (doc_support) @@ -5685,7 +5686,7 @@ void case_305() } void case_306() -#line 2551 "cs-parser.jay" +#line 2552 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5700,7 +5701,7 @@ void case_306() } void case_307() -#line 2564 "cs-parser.jay" +#line 2565 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5708,7 +5709,7 @@ void case_307() } void case_308() -#line 2570 "cs-parser.jay" +#line 2571 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5724,7 +5725,7 @@ void case_308() } void case_310() -#line 2588 "cs-parser.jay" +#line 2589 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5737,21 +5738,21 @@ void case_310() } void case_311() -#line 2599 "cs-parser.jay" +#line 2600 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_316() -#line 2617 "cs-parser.jay" +#line 2618 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_317() -#line 2625 "cs-parser.jay" +#line 2626 "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]); @@ -5766,7 +5767,7 @@ void case_317() } void case_318() -#line 2638 "cs-parser.jay" +#line 2639 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5776,7 +5777,7 @@ void case_318() } void case_319() -#line 2646 "cs-parser.jay" +#line 2647 "cs-parser.jay" { --lexer.parsing_block; @@ -5792,7 +5793,7 @@ void case_319() } void case_321() -#line 2671 "cs-parser.jay" +#line 2672 "cs-parser.jay" { valid_param_mod = 0; @@ -5812,7 +5813,7 @@ void case_321() } void case_323() -#line 2693 "cs-parser.jay" +#line 2694 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5828,7 +5829,7 @@ void case_323() } void case_325() -#line 2711 "cs-parser.jay" +#line 2712 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5837,7 +5838,7 @@ void case_325() } void case_327() -#line 2722 "cs-parser.jay" +#line 2723 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5846,22 +5847,23 @@ void case_327() } void case_329() -#line 2733 "cs-parser.jay" +#line 2734 "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])); + yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) { + DotLocation = GetLocation (yyVals[-2+yyTop]) + }; } void case_330() -#line 2742 "cs-parser.jay" +#line 2744 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_332() -#line 2754 "cs-parser.jay" +#line 2756 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5874,14 +5876,14 @@ void case_332() } void case_333() -#line 2765 "cs-parser.jay" +#line 2767 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_334() -#line 2773 "cs-parser.jay" +#line 2775 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5890,7 +5892,7 @@ void case_334() } void case_335() -#line 2780 "cs-parser.jay" +#line 2782 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5899,7 +5901,7 @@ void case_335() } void case_337() -#line 2797 "cs-parser.jay" +#line 2799 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5907,7 +5909,7 @@ void case_337() } void case_338() -#line 2806 "cs-parser.jay" +#line 2808 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5916,7 +5918,7 @@ void case_338() } void case_340() -#line 2817 "cs-parser.jay" +#line 2819 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5924,21 +5926,21 @@ void case_340() } void case_341() -#line 2826 "cs-parser.jay" +#line 2828 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_342() -#line 2831 "cs-parser.jay" +#line 2833 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_343() -#line 2839 "cs-parser.jay" +#line 2841 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5946,7 +5948,7 @@ void case_343() } void case_344() -#line 2845 "cs-parser.jay" +#line 2847 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5956,7 +5958,7 @@ void case_344() } void case_345() -#line 2853 "cs-parser.jay" +#line 2855 "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); @@ -5964,7 +5966,7 @@ void case_345() } void case_347() -#line 2863 "cs-parser.jay" +#line 2865 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5974,7 +5976,7 @@ void case_347() } void case_348() -#line 2874 "cs-parser.jay" +#line 2876 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5982,7 +5984,7 @@ void case_348() } void case_349() -#line 2880 "cs-parser.jay" +#line 2882 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5991,7 +5993,7 @@ void case_349() } void case_350() -#line 2890 "cs-parser.jay" +#line 2892 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6001,7 +6003,7 @@ void case_350() } void case_351() -#line 2898 "cs-parser.jay" +#line 2900 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6012,50 +6014,50 @@ void case_351() } void case_356() -#line 2932 "cs-parser.jay" +#line 2934 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_358() -#line 2941 "cs-parser.jay" +#line 2943 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_360() -#line 2950 "cs-parser.jay" +#line 2952 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_363() -#line 2966 "cs-parser.jay" +#line 2968 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; if (yyVals[0+yyTop] != null) { - yyVal = new ComposedCast (name.GetTypeExpression (lbag), (ComposedTypeSpecifier) yyVals[0+yyTop]); + yyVal = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } else { if (name.Left == null && name.Name == "var") yyVal = new VarExpr (name.Location); else - yyVal = name.GetTypeExpression (lbag); + yyVal = name.GetTypeExpression (); } } void case_365() -#line 2983 "cs-parser.jay" +#line 2985 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_368() -#line 2999 "cs-parser.jay" +#line 3001 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6063,7 +6065,7 @@ void case_368() } void case_369() -#line 3005 "cs-parser.jay" +#line 3007 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6072,7 +6074,7 @@ void case_369() } void case_370() -#line 3015 "cs-parser.jay" +#line 3017 "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 ()); @@ -6081,59 +6083,62 @@ void case_370() } void case_371() -#line 3022 "cs-parser.jay" +#line 3024 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_408() -#line 3084 "cs-parser.jay" +#line 3086 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_409() -#line 3088 "cs-parser.jay" +#line 3090 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_420() -#line 3129 "cs-parser.jay" +#line 3131 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_422() -#line 3141 "cs-parser.jay" +#line 3143 "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])); + yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) { + DotLocation = GetLocation (yyVals[-2+yyTop]) + }; } void case_423() -#line 3147 "cs-parser.jay" +#line 3150 "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])); + yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) { + DotLocation = GetLocation (yyVals[-2+yyTop]) + }; } void case_424() -#line 3153 "cs-parser.jay" +#line 3157 "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])); + yyVal = new MemberAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location) { + DotLocation = GetLocation (yyVals[-2+yyTop]) + }; } void case_425() -#line 3159 "cs-parser.jay" +#line 3164 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6143,28 +6148,28 @@ void case_425() } void case_427() -#line 3169 "cs-parser.jay" +#line 3174 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_429() -#line 3177 "cs-parser.jay" +#line 3182 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3185 "cs-parser.jay" +#line 3190 "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_433() -#line 3198 "cs-parser.jay" +#line 3203 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6176,14 +6181,14 @@ void case_433() } void case_434() -#line 3208 "cs-parser.jay" +#line 3213 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3224 "cs-parser.jay" +#line 3229 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6191,7 +6196,7 @@ void case_437() } void case_438() -#line 3230 "cs-parser.jay" +#line 3235 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6200,14 +6205,14 @@ void case_438() } void case_439() -#line 3236 "cs-parser.jay" +#line 3241 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_440() -#line 3244 "cs-parser.jay" +#line 3249 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6215,7 +6220,7 @@ void case_440() } void case_442() -#line 3253 "cs-parser.jay" +#line 3258 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6225,7 +6230,7 @@ void case_442() } void case_443() -#line 3261 "cs-parser.jay" +#line 3266 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6234,14 +6239,14 @@ void case_443() } void case_444() -#line 3268 "cs-parser.jay" +#line 3273 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_449() -#line 3286 "cs-parser.jay" +#line 3291 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6249,7 +6254,7 @@ void case_449() } void case_450() -#line 3292 "cs-parser.jay" +#line 3297 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6261,7 +6266,7 @@ void case_450() } void case_451() -#line 3302 "cs-parser.jay" +#line 3307 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6278,56 +6283,56 @@ void case_451() } void case_452() -#line 3317 "cs-parser.jay" +#line 3322 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_453() -#line 3322 "cs-parser.jay" +#line 3327 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_458() -#line 3343 "cs-parser.jay" +#line 3348 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_459() -#line 3348 "cs-parser.jay" +#line 3353 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3353 "cs-parser.jay" +#line 3358 "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_461() -#line 3358 "cs-parser.jay" +#line 3363 "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_463() -#line 3370 "cs-parser.jay" +#line 3375 "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_464() -#line 3378 "cs-parser.jay" +#line 3383 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6335,7 +6340,7 @@ void case_464() } void case_465() -#line 3384 "cs-parser.jay" +#line 3389 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6344,14 +6349,14 @@ void case_465() } void case_466() -#line 3390 "cs-parser.jay" +#line 3395 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_467() -#line 3398 "cs-parser.jay" +#line 3403 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6359,7 +6364,7 @@ void case_467() } void case_468() -#line 3404 "cs-parser.jay" +#line 3409 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6371,21 +6376,21 @@ void case_468() } void case_472() -#line 3432 "cs-parser.jay" +#line 3437 "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_473() -#line 3437 "cs-parser.jay" +#line 3442 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_476() -#line 3459 "cs-parser.jay" +#line 3464 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6400,7 +6405,7 @@ void case_476() } void case_477() -#line 3472 "cs-parser.jay" +#line 3477 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6409,7 +6414,7 @@ void case_477() } void case_478() -#line 3484 "cs-parser.jay" +#line 3489 "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])) { @@ -6419,7 +6424,7 @@ void case_478() } void case_479() -#line 3492 "cs-parser.jay" +#line 3497 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6428,7 +6433,7 @@ void case_479() } void case_480() -#line 3499 "cs-parser.jay" +#line 3504 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6437,28 +6442,28 @@ void case_480() } void case_481() -#line 3506 "cs-parser.jay" +#line 3511 "cs-parser.jay" { 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_482() -#line 3511 "cs-parser.jay" +#line 3516 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_484() -#line 3522 "cs-parser.jay" +#line 3527 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_485() -#line 3530 "cs-parser.jay" +#line 3535 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6470,7 +6475,7 @@ void case_485() } void case_490() -#line 3553 "cs-parser.jay" +#line 3558 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6478,7 +6483,7 @@ void case_490() } void case_491() -#line 3559 "cs-parser.jay" +#line 3564 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6488,7 +6493,7 @@ void case_491() } void case_492() -#line 3570 "cs-parser.jay" +#line 3575 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6496,7 +6501,7 @@ void case_492() } void case_493() -#line 3576 "cs-parser.jay" +#line 3581 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6504,14 +6509,14 @@ void case_493() } void case_494() -#line 3582 "cs-parser.jay" +#line 3587 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_495() -#line 3587 "cs-parser.jay" +#line 3592 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6519,28 +6524,28 @@ void case_495() } void case_499() -#line 3602 "cs-parser.jay" +#line 3607 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_500() -#line 3610 "cs-parser.jay" +#line 3615 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_501() -#line 3615 "cs-parser.jay" +#line 3620 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_506() -#line 3645 "cs-parser.jay" +#line 3650 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6549,7 +6554,7 @@ void case_506() } void case_507() -#line 3652 "cs-parser.jay" +#line 3657 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6562,7 +6567,7 @@ void case_507() } void case_508() -#line 3666 "cs-parser.jay" +#line 3671 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6570,7 +6575,7 @@ void case_508() } void case_509() -#line 3672 "cs-parser.jay" +#line 3677 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6579,7 +6584,7 @@ void case_509() } void case_511() -#line 3686 "cs-parser.jay" +#line 3691 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6587,14 +6592,14 @@ void case_511() } void case_514() -#line 3697 "cs-parser.jay" +#line 3702 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_515() -#line 3705 "cs-parser.jay" +#line 3710 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6602,7 +6607,7 @@ void case_515() } void case_516() -#line 3711 "cs-parser.jay" +#line 3716 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6612,34 +6617,40 @@ void case_516() } void case_517() -#line 3719 "cs-parser.jay" +#line 3724 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; - yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location); + yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location) { + DotLocation = GetLocation (yyVals[-1+yyTop]) + }; } void case_518() -#line 3725 "cs-parser.jay" +#line 3732 "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); + yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (int) yyVals[0+yyTop], lt.Location) { + DotLocation = GetLocation (yyVals[-2+yyTop]) + }; } void case_519() -#line 3731 "cs-parser.jay" +#line 3740 "cs-parser.jay" { - var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (lbag); + var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) Error_TypeExpected (GetLocation (yyVals[0+yyTop])); var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; - yyVal = new MemberAccess (te, lt.Value, (int) yyVals[0+yyTop], lt.Location); + yyVal = new MemberAccess (te, lt.Value, (int) yyVals[0+yyTop], lt.Location) { + DotLocation = GetLocation (yyVals[-2+yyTop]) + }; } void case_520() -#line 3743 "cs-parser.jay" +#line 3754 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6648,7 +6659,7 @@ void case_520() } void case_521() -#line 3753 "cs-parser.jay" +#line 3764 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6658,35 +6669,35 @@ void case_521() } void case_522() -#line 3764 "cs-parser.jay" +#line 3775 "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_523() -#line 3772 "cs-parser.jay" +#line 3783 "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_524() -#line 3780 "cs-parser.jay" +#line 3791 "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_525() -#line 3788 "cs-parser.jay" +#line 3799 "cs-parser.jay" { 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_527() -#line 3800 "cs-parser.jay" +#line 3811 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6697,7 +6708,7 @@ void case_527() } void case_533() -#line 3832 "cs-parser.jay" +#line 3843 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6706,7 +6717,7 @@ void case_533() } void case_534() -#line 3842 "cs-parser.jay" +#line 3853 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6716,147 +6727,147 @@ void case_534() } void case_540() -#line 3867 "cs-parser.jay" +#line 3878 "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_541() -#line 3875 "cs-parser.jay" +#line 3886 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_550() -#line 3916 "cs-parser.jay" +#line 3927 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3921 "cs-parser.jay" +#line 3932 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3926 "cs-parser.jay" +#line 3937 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_554() -#line 3935 "cs-parser.jay" +#line 3946 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_556() -#line 3944 "cs-parser.jay" +#line 3955 "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_560() -#line 3961 "cs-parser.jay" +#line 3972 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_561() -#line 3966 "cs-parser.jay" +#line 3977 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_563() -#line 3975 "cs-parser.jay" +#line 3986 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 3980 "cs-parser.jay" +#line 3991 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3985 "cs-parser.jay" +#line 3996 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 3990 "cs-parser.jay" +#line 4001 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_568() -#line 3999 "cs-parser.jay" +#line 4010 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4004 "cs-parser.jay" +#line 4015 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 4013 "cs-parser.jay" +#line 4024 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_573() -#line 4022 "cs-parser.jay" +#line 4033 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_575() -#line 4031 "cs-parser.jay" +#line 4042 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_577() -#line 4040 "cs-parser.jay" +#line 4051 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 4049 "cs-parser.jay" +#line 4060 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4058 "cs-parser.jay" +#line 4069 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6865,84 +6876,84 @@ void case_581() } void case_583() -#line 4069 "cs-parser.jay" +#line 4080 "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_585() -#line 4081 "cs-parser.jay" +#line 4092 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4086 "cs-parser.jay" +#line 4097 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4091 "cs-parser.jay" +#line 4102 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4096 "cs-parser.jay" +#line 4107 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4101 "cs-parser.jay" +#line 4112 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4106 "cs-parser.jay" +#line 4117 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4111 "cs-parser.jay" +#line 4122 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4116 "cs-parser.jay" +#line 4127 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4121 "cs-parser.jay" +#line 4132 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4126 "cs-parser.jay" +#line 4137 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4134 "cs-parser.jay" +#line 4145 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6951,7 +6962,7 @@ void case_595() } void case_596() -#line 4141 "cs-parser.jay" +#line 4152 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6966,7 +6977,7 @@ void case_596() } void case_597() -#line 4157 "cs-parser.jay" +#line 4168 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6974,7 +6985,7 @@ void case_597() } void case_598() -#line 4163 "cs-parser.jay" +#line 4174 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6982,21 +6993,21 @@ void case_598() } void case_599() -#line 4169 "cs-parser.jay" +#line 4180 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_601() -#line 4177 "cs-parser.jay" +#line 4188 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_605() -#line 4193 "cs-parser.jay" +#line 4204 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7005,14 +7016,14 @@ void case_605() } void case_607() -#line 4204 "cs-parser.jay" +#line 4215 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_608() -#line 4212 "cs-parser.jay" +#line 4223 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7020,14 +7031,14 @@ void case_608() } void case_609() -#line 4218 "cs-parser.jay" +#line 4229 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_610() -#line 4223 "cs-parser.jay" +#line 4234 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7035,63 +7046,63 @@ void case_610() } void case_611() -#line 4229 "cs-parser.jay" +#line 4240 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_613() -#line 4238 "cs-parser.jay" +#line 4249 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_614() -#line 4243 "cs-parser.jay" +#line 4254 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_616() -#line 4252 "cs-parser.jay" +#line 4263 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_617() -#line 4257 "cs-parser.jay" +#line 4268 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_624() -#line 4280 "cs-parser.jay" +#line 4291 "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_625() -#line 4285 "cs-parser.jay" +#line 4296 "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_626() -#line 4290 "cs-parser.jay" +#line 4301 "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_630() -#line 4319 "cs-parser.jay" +#line 4330 "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]); @@ -7104,7 +7115,7 @@ void case_630() } void case_631() -#line 4331 "cs-parser.jay" +#line 4342 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7119,7 +7130,7 @@ void case_631() } void case_632() -#line 4344 "cs-parser.jay" +#line 4355 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7127,7 +7138,7 @@ void case_632() } void case_633() -#line 4350 "cs-parser.jay" +#line 4361 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7136,7 +7147,7 @@ void case_633() } void case_636() -#line 4367 "cs-parser.jay" +#line 4378 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7144,7 +7155,7 @@ void case_636() } void case_639() -#line 4381 "cs-parser.jay" +#line 4392 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7162,7 +7173,7 @@ void case_639() } void case_640() -#line 4400 "cs-parser.jay" +#line 4411 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7172,91 +7183,91 @@ void case_640() } void case_641() -#line 4408 "cs-parser.jay" +#line 4419 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_642() -#line 4413 "cs-parser.jay" +#line 4424 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4418 "cs-parser.jay" +#line 4429 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4423 "cs-parser.jay" +#line 4434 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4428 "cs-parser.jay" +#line 4439 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4433 "cs-parser.jay" +#line 4444 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4438 "cs-parser.jay" +#line 4449 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4443 "cs-parser.jay" +#line 4454 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4448 "cs-parser.jay" +#line 4459 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4453 "cs-parser.jay" +#line 4464 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4458 "cs-parser.jay" +#line 4469 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4463 "cs-parser.jay" +#line 4474 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4468 "cs-parser.jay" +#line 4479 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7265,28 +7276,28 @@ void case_653() } void case_654() -#line 4475 "cs-parser.jay" +#line 4486 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_656() -#line 4484 "cs-parser.jay" +#line 4495 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_659() -#line 4497 "cs-parser.jay" +#line 4508 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_660() -#line 4505 "cs-parser.jay" +#line 4516 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7294,7 +7305,7 @@ void case_660() } void case_661() -#line 4511 "cs-parser.jay" +#line 4522 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7312,7 +7323,7 @@ void case_661() } void case_662() -#line 4530 "cs-parser.jay" +#line 4541 "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])); @@ -7320,7 +7331,7 @@ void case_662() } void case_663() -#line 4539 "cs-parser.jay" +#line 4550 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7328,7 +7339,7 @@ void case_663() } void case_664() -#line 4545 "cs-parser.jay" +#line 4556 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7353,7 +7364,7 @@ void case_664() } void case_665() -#line 4571 "cs-parser.jay" +#line 4582 "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 ()); @@ -7362,14 +7373,14 @@ void case_665() } void case_666() -#line 4578 "cs-parser.jay" +#line 4589 "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_670() -#line 4598 "cs-parser.jay" +#line 4609 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7378,91 +7389,91 @@ void case_670() } void case_671() -#line 4608 "cs-parser.jay" +#line 4619 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_672() -#line 4613 "cs-parser.jay" +#line 4624 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4634 "cs-parser.jay" +#line 4645 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_675() -#line 4646 "cs-parser.jay" +#line 4657 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4651 "cs-parser.jay" +#line 4662 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_677() -#line 4660 "cs-parser.jay" +#line 4671 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_678() -#line 4665 "cs-parser.jay" +#line 4676 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_686() -#line 4692 "cs-parser.jay" +#line 4703 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_719() -#line 4756 "cs-parser.jay" +#line 4767 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_720() -#line 4761 "cs-parser.jay" +#line 4772 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4766 "cs-parser.jay" +#line 4777 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_722() -#line 4774 "cs-parser.jay" +#line 4785 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_723() -#line 4782 "cs-parser.jay" +#line 4793 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7472,7 +7483,7 @@ void case_723() } void case_726() -#line 4795 "cs-parser.jay" +#line 4806 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7481,7 +7492,7 @@ void case_726() } void case_727() -#line 4811 "cs-parser.jay" +#line 4822 "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*/ @@ -7513,7 +7524,7 @@ void case_727() } void case_728() -#line 4841 "cs-parser.jay" +#line 4852 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7526,7 +7537,7 @@ void case_728() } void case_729() -#line 4852 "cs-parser.jay" +#line 4863 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7535,21 +7546,21 @@ void case_729() } void case_732() -#line 4867 "cs-parser.jay" +#line 4878 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_734() -#line 4876 "cs-parser.jay" +#line 4887 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_736() -#line 4891 "cs-parser.jay" +#line 4902 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7558,7 +7569,7 @@ void case_736() } void case_737() -#line 4898 "cs-parser.jay" +#line 4909 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7566,7 +7577,7 @@ void case_737() } void case_738() -#line 4904 "cs-parser.jay" +#line 4915 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7575,7 +7586,7 @@ void case_738() } void case_739() -#line 4911 "cs-parser.jay" +#line 4922 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7587,14 +7598,14 @@ void case_739() } void case_741() -#line 4925 "cs-parser.jay" +#line 4936 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_742() -#line 4930 "cs-parser.jay" +#line 4941 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7605,7 +7616,7 @@ void case_742() } void case_746() -#line 4948 "cs-parser.jay" +#line 4959 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7614,7 +7625,7 @@ void case_746() } void case_749() -#line 4963 "cs-parser.jay" +#line 4974 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7625,7 +7636,7 @@ void case_749() } void case_750() -#line 4972 "cs-parser.jay" +#line 4983 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7636,14 +7647,14 @@ void case_750() } void case_752() -#line 4988 "cs-parser.jay" +#line 4999 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_757() -#line 5006 "cs-parser.jay" +#line 5017 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7654,28 +7665,28 @@ void case_757() } void case_759() -#line 5019 "cs-parser.jay" +#line 5030 "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_760() -#line 5024 "cs-parser.jay" +#line 5035 "cs-parser.jay" { 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_761() -#line 5032 "cs-parser.jay" +#line 5043 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_765() -#line 5050 "cs-parser.jay" +#line 5061 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7687,7 +7698,7 @@ void case_765() } void case_766() -#line 5063 "cs-parser.jay" +#line 5074 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7697,14 +7708,14 @@ void case_766() } void case_767() -#line 5071 "cs-parser.jay" +#line 5082 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_770() -#line 5085 "cs-parser.jay" +#line 5096 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7714,7 +7725,7 @@ void case_770() } void case_771() -#line 5094 "cs-parser.jay" +#line 5105 "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])); @@ -7726,7 +7737,7 @@ void case_771() } void case_773() -#line 5111 "cs-parser.jay" +#line 5122 "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])); @@ -7734,14 +7745,14 @@ void case_773() } void case_774() -#line 5120 "cs-parser.jay" +#line 5131 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_776() -#line 5129 "cs-parser.jay" +#line 5140 "cs-parser.jay" { var sections = new List (4); @@ -7750,7 +7761,7 @@ void case_776() } void case_777() -#line 5136 "cs-parser.jay" +#line 5147 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7759,14 +7770,14 @@ void case_777() } void case_778() -#line 5143 "cs-parser.jay" +#line 5154 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_781() -#line 5162 "cs-parser.jay" +#line 5173 "cs-parser.jay" { var labels = new List (2); @@ -7775,7 +7786,7 @@ void case_781() } void case_782() -#line 5169 "cs-parser.jay" +#line 5180 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7784,14 +7795,14 @@ void case_782() } void case_783() -#line 5179 "cs-parser.jay" +#line 5190 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_789() -#line 5198 "cs-parser.jay" +#line 5209 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7801,21 +7812,21 @@ void case_789() } void case_790() -#line 5210 "cs-parser.jay" +#line 5221 "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_791() -#line 5218 "cs-parser.jay" +#line 5229 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_793() -#line 5234 "cs-parser.jay" +#line 5245 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7829,14 +7840,14 @@ void case_793() } void case_794() -#line 5246 "cs-parser.jay" +#line 5257 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_797() -#line 5259 "cs-parser.jay" +#line 5270 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7845,14 +7856,14 @@ void case_797() } void case_798() -#line 5266 "cs-parser.jay" +#line 5277 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_806() -#line 5290 "cs-parser.jay" +#line 5301 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7867,14 +7878,14 @@ void case_806() } void case_807() -#line 5306 "cs-parser.jay" +#line 5317 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_808() -#line 5311 "cs-parser.jay" +#line 5322 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7885,7 +7896,7 @@ void case_808() } void case_809() -#line 5320 "cs-parser.jay" +#line 5331 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7898,21 +7909,21 @@ void case_809() } void case_816() -#line 5343 "cs-parser.jay" +#line 5354 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_817() -#line 5351 "cs-parser.jay" +#line 5362 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5359 "cs-parser.jay" +#line 5370 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7920,35 +7931,35 @@ void case_818() } void case_819() -#line 5365 "cs-parser.jay" +#line 5376 "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_820() -#line 5370 "cs-parser.jay" +#line 5381 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_821() -#line 5378 "cs-parser.jay" +#line 5389 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5386 "cs-parser.jay" +#line 5397 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5394 "cs-parser.jay" +#line 5405 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7966,7 +7977,7 @@ void case_823() } void case_824() -#line 5410 "cs-parser.jay" +#line 5421 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7982,28 +7993,28 @@ void case_824() } void case_828() -#line 5436 "cs-parser.jay" +#line 5447 "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_829() -#line 5441 "cs-parser.jay" +#line 5452 "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_830() -#line 5446 "cs-parser.jay" +#line 5457 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_831() -#line 5454 "cs-parser.jay" +#line 5465 "cs-parser.jay" { var l = new List (2); @@ -8012,7 +8023,7 @@ void case_831() } void case_832() -#line 5461 "cs-parser.jay" +#line 5472 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8030,7 +8041,7 @@ void case_832() } void case_836() -#line 5489 "cs-parser.jay" +#line 5500 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8047,7 +8058,7 @@ void case_836() } void case_838() -#line 5508 "cs-parser.jay" +#line 5519 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8060,14 +8071,14 @@ void case_838() } void case_841() -#line 5536 "cs-parser.jay" +#line 5547 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_843() -#line 5546 "cs-parser.jay" +#line 5557 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8077,7 +8088,7 @@ void case_843() } void case_844() -#line 5557 "cs-parser.jay" +#line 5568 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8089,14 +8100,14 @@ void case_844() } void case_845() -#line 5567 "cs-parser.jay" +#line 5578 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_846() -#line 5572 "cs-parser.jay" +#line 5583 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8108,7 +8119,7 @@ void case_846() } void case_847() -#line 5585 "cs-parser.jay" +#line 5596 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8120,14 +8131,14 @@ void case_847() } void case_848() -#line 5595 "cs-parser.jay" +#line 5606 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_849() -#line 5600 "cs-parser.jay" +#line 5611 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8139,7 +8150,7 @@ void case_849() } void case_850() -#line 5610 "cs-parser.jay" +#line 5621 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8150,7 +8161,7 @@ void case_850() } void case_852() -#line 5626 "cs-parser.jay" +#line 5637 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8158,7 +8169,7 @@ void case_852() } void case_853() -#line 5638 "cs-parser.jay" +#line 5649 "cs-parser.jay" { lexer.query_parsing = false; @@ -8172,7 +8183,7 @@ void case_853() } void case_854() -#line 5650 "cs-parser.jay" +#line 5661 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8184,7 +8195,7 @@ void case_854() } void case_855() -#line 5661 "cs-parser.jay" +#line 5672 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8194,7 +8205,7 @@ void case_855() } void case_856() -#line 5668 "cs-parser.jay" +#line 5679 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8202,7 +8213,7 @@ void case_856() } void case_857() -#line 5677 "cs-parser.jay" +#line 5688 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8212,7 +8223,7 @@ void case_857() } void case_858() -#line 5685 "cs-parser.jay" +#line 5696 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8226,7 +8237,7 @@ void case_858() } void case_859() -#line 5700 "cs-parser.jay" +#line 5711 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8236,7 +8247,7 @@ void case_859() } void case_860() -#line 5708 "cs-parser.jay" +#line 5719 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8250,7 +8261,7 @@ void case_860() } void case_862() -#line 5727 "cs-parser.jay" +#line 5738 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8263,7 +8274,7 @@ void case_862() } void case_864() -#line 5742 "cs-parser.jay" +#line 5753 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8279,7 +8290,7 @@ void case_864() } void case_865() -#line 5759 "cs-parser.jay" +#line 5770 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8296,14 +8307,14 @@ void case_865() } void case_867() -#line 5775 "cs-parser.jay" +#line 5786 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_869() -#line 5787 "cs-parser.jay" +#line 5798 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8312,7 +8323,7 @@ void case_869() } void case_870() -#line 5794 "cs-parser.jay" +#line 5805 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8322,7 +8333,7 @@ void case_870() } void case_871() -#line 5802 "cs-parser.jay" +#line 5813 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8331,7 +8342,7 @@ void case_871() } void case_872() -#line 5809 "cs-parser.jay" +#line 5820 "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])); @@ -8341,14 +8352,14 @@ void case_872() } void case_876() -#line 5826 "cs-parser.jay" +#line 5837 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_883() -#line 5846 "cs-parser.jay" +#line 5857 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8362,7 +8373,7 @@ void case_883() } void case_885() -#line 5865 "cs-parser.jay" +#line 5876 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8371,7 +8382,7 @@ void case_885() } void case_886() -#line 5875 "cs-parser.jay" +#line 5886 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8381,7 +8392,7 @@ void case_886() } void case_887() -#line 5883 "cs-parser.jay" +#line 5894 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8391,7 +8402,7 @@ void case_887() } void case_888() -#line 5891 "cs-parser.jay" +#line 5902 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8401,7 +8412,7 @@ void case_888() } void case_889() -#line 5899 "cs-parser.jay" +#line 5910 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8441,7 +8452,7 @@ void case_889() } void case_890() -#line 5937 "cs-parser.jay" +#line 5948 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8451,7 +8462,7 @@ void case_890() } void case_891() -#line 5945 "cs-parser.jay" +#line 5956 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8461,7 +8472,7 @@ void case_891() } void case_892() -#line 5953 "cs-parser.jay" +#line 5964 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8471,7 +8482,7 @@ void case_892() } void case_893() -#line 5961 "cs-parser.jay" +#line 5972 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8513,7 +8524,7 @@ void case_893() } void case_897() -#line 6016 "cs-parser.jay" +#line 6027 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8522,7 +8533,7 @@ void case_897() } void case_899() -#line 6027 "cs-parser.jay" +#line 6038 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8531,14 +8542,14 @@ void case_899() } void case_900() -#line 6034 "cs-parser.jay" +#line 6045 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_902() -#line 6043 "cs-parser.jay" +#line 6054 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8547,42 +8558,42 @@ void case_902() } void case_903() -#line 6050 "cs-parser.jay" +#line 6061 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_905() -#line 6062 "cs-parser.jay" +#line 6073 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_906() -#line 6067 "cs-parser.jay" +#line 6078 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_908() -#line 6079 "cs-parser.jay" +#line 6090 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6084 "cs-parser.jay" +#line 6095 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_911() -#line 6094 "cs-parser.jay" +#line 6105 "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*/ @@ -8600,7 +8611,7 @@ void case_911() } void case_912() -#line 6110 "cs-parser.jay" +#line 6121 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8611,7 +8622,7 @@ void case_912() } void case_915() -#line 6137 "cs-parser.jay" +#line 6148 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8643,7 +8654,7 @@ void case_915() } void case_916() -#line 6167 "cs-parser.jay" +#line 6178 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8655,7 +8666,7 @@ void case_916() } void case_926() -#line 6210 "cs-parser.jay" +#line 6221 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8663,7 +8674,7 @@ void case_926() } void case_927() -#line 6216 "cs-parser.jay" +#line 6227 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8672,14 +8683,14 @@ void case_927() } void case_930() -#line 6231 "cs-parser.jay" +#line 6242 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_931() -#line 6236 "cs-parser.jay" +#line 6247 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8689,7 +8700,7 @@ void case_931() } void case_932() -#line 6244 "cs-parser.jay" +#line 6255 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8699,7 +8710,7 @@ void case_932() } void case_933() -#line 6252 "cs-parser.jay" +#line 6263 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8708,7 +8719,7 @@ void case_933() } void case_941() -#line 6290 "cs-parser.jay" +#line 6301 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8716,7 +8727,7 @@ void case_941() } void case_942() -#line 6296 "cs-parser.jay" +#line 6307 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8724,7 +8735,7 @@ void case_942() } void case_943() -#line 6305 "cs-parser.jay" +#line 6316 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12057,7 +12068,7 @@ void case_943() -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6314 "cs-parser.jay" +#line 6325 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 4704aed3c7..e71e7393b8 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -565,8 +565,9 @@ qualified_identifier | qualified_identifier DOT IDENTIFIER { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberName ((MemberName) $1, lt.Value, lt.Location); - lbag.AddLocation ($$, GetLocation ($2)); + $$ = new MemberName ((MemberName) $1, lt.Value, lt.Location) { + DotLocation = GetLocation ($2) + }; } | error { @@ -780,7 +781,7 @@ attribute } Arguments [] arguments = (Arguments []) $3; - ATypeNameExpression expr = mname.GetTypeExpression (lbag); + ATypeNameExpression expr = mname.GetTypeExpression (); $$ = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); if (arguments != null) { lbag.AddLocation ($$, savedAttrParenOpenLocation, savedAttrParenCloseLocation); @@ -2732,8 +2733,9 @@ member_name | namespace_or_type_name DOT IDENTIFIER opt_type_argument_list { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberName ((MemberName) $1, lt.Value, (TypeArguments) $4, lt.Location); - lbag.AddLocation ($$, GetLocation ($2)); + $$ = new MemberName ((MemberName) $1, lt.Value, (TypeArguments) $4, lt.Location) { + DotLocation = GetLocation ($2) + }; } ; @@ -2967,17 +2969,17 @@ type_expression MemberName name = (MemberName) $1; if ($2 != null) { - $$ = new ComposedCast (name.GetTypeExpression (lbag), (ComposedTypeSpecifier) $2); + $$ = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) $2); } else { if (name.Left == null && name.Name == "var") $$ = new VarExpr (name.Location); else - $$ = name.GetTypeExpression (lbag); + $$ = name.GetTypeExpression (); } } | namespace_or_type_name pointer_stars { - $$ = new ComposedCast (((MemberName) $1).GetTypeExpression (lbag), (ComposedTypeSpecifier) $2); + $$ = new ComposedCast (((MemberName) $1).GetTypeExpression (), (ComposedTypeSpecifier) $2); } | builtin_types opt_nullable { @@ -3140,20 +3142,23 @@ member_access : primary_expression DOT IDENTIFIER opt_type_argument_list { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location); - lbag.AddLocation ($$, GetLocation ($2)); + $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location) { + DotLocation = GetLocation ($2) + }; } | builtin_types DOT IDENTIFIER opt_type_argument_list { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location); - lbag.AddLocation ($$, GetLocation ($2)); + $$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location) { + DotLocation = GetLocation ($2) + }; } | BASE DOT IDENTIFIER opt_type_argument_list { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess (new BaseThis (GetLocation ($1)), lt.Value, (TypeArguments) $4, lt.Location); - lbag.AddLocation ($$, GetLocation ($2)); + $$ = new MemberAccess (new BaseThis (GetLocation ($1)), lt.Value, (TypeArguments) $4, lt.Location) { + DotLocation = GetLocation ($2) + }; } | qualified_alias_member IDENTIFIER opt_type_argument_list { @@ -3719,22 +3724,28 @@ unbound_type_name { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location); + $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location) { + DotLocation = GetLocation ($2) + }; } | unbound_type_name DOT IDENTIFIER generic_dimension { var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location); + $$ = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location) { + DotLocation = GetLocation ($2) + }; } | namespace_or_type_name DOT IDENTIFIER generic_dimension { - var te = ((MemberName) $1).GetTypeExpression (lbag); + var te = ((MemberName) $1).GetTypeExpression (); if (te.HasTypeArguments) Error_TypeExpected (GetLocation ($4)); var lt = (Tokenizer.LocatedToken) $3; - $$ = new MemberAccess (te, lt.Value, (int) $4, lt.Location); + $$ = new MemberAccess (te, lt.Value, (int) $4, lt.Location) { + DotLocation = GetLocation ($2) + }; } ; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs index e161907b44..32c8d071a4 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/decl.cs @@ -49,6 +49,12 @@ namespace Mono.CSharp { public bool IsDoubleColon { get { return is_double_colon; } } +#if FULL_AST + public Location DotLocation { + get; + set; + } +#endif private MemberName (MemberName left, string name, bool is_double_colon, Location loc) { @@ -138,7 +144,7 @@ namespace Mono.CSharp { return name; } - public ATypeNameExpression GetTypeExpression (LocationsBag locations = null) + public ATypeNameExpression GetTypeExpression () { if (Left == null) { if (TypeArguments != null) @@ -155,8 +161,9 @@ namespace Mono.CSharp { Expression lexpr = Left.GetTypeExpression (); var result = new MemberAccess (lexpr, Name, TypeArguments, Location); - if (locations != null) - locations.AddLocation (result, locations.GetLocations (this)); +#if FULL_AST + result.DotLocation = DotLocation; +#endif return result; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs index f440ab7c62..e708b6c1c2 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/expression.cs @@ -7763,6 +7763,13 @@ namespace Mono.CSharp { protected Expression expr; +#if FULL_AST + public Location DotLocation { + get; + set; + } +#endif + public MemberAccess (Expression expr, string id) : base (id, expr.Location) { From 2ba4a181b0a2f3c89e0c4c54bb2cea40cad3ae2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 6 Sep 2011 18:17:25 +0200 Subject: [PATCH 56/92] Location of global attributes was wrong. Fixed for tests - should be inserted like the comments for the real fix. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 157086f41e..16bf59f231 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -241,7 +241,6 @@ namespace ICSharpCode.NRefactory.CSharp { if (optAttributes == null) return null; - AttributeSection result = new AttributeSection (); var loc = LocationsBag.GetLocations (optAttributes); if (loc != null) @@ -267,8 +266,8 @@ namespace ICSharpCode.NRefactory.CSharp nDecl.AddChild (new CSharpTokenNode (Convert (nspace.OpenBrace), 1), NamespaceDeclaration.Roles.LBrace); AddToNamespace (nDecl); namespaceStack.Push (nDecl); - } + VisitNamespaceUsings (nspace); VisitNamespaceBody (nspace); @@ -3252,8 +3251,8 @@ namespace ICSharpCode.NRefactory.CSharp if (top == null) return null; CSharpParser.ConversionVisitor conversionVisitor = new ConversionVisitor (convertTypeSystemMode, top.LocationsBag); - conversionVisitor.AddAttributeSection (conversionVisitor.Unit, top.ModuleCompiled); top.UsingsBag.Global.Accept (conversionVisitor); + conversionVisitor.AddAttributeSection (conversionVisitor.Unit, top.ModuleCompiled); InsertComments (top, conversionVisitor); return conversionVisitor.Unit; } @@ -3325,8 +3324,8 @@ namespace ICSharpCode.NRefactory.CSharp if (top == null) return null; CSharpParser.ConversionVisitor conversionVisitor = new ConversionVisitor (GenerateTypeSystemMode, top.LocationsBag); - conversionVisitor.AddAttributeSection (conversionVisitor.Unit, top.ModuleCompiled); top.UsingsBag.Global.Accept (conversionVisitor); + conversionVisitor.AddAttributeSection (conversionVisitor.Unit, top.ModuleCompiled); InsertComments (top, conversionVisitor); if (CompilationUnitCallback != null) CompilationUnitCallback (top); From 0fb1105d050dce8cd293f0a188cea807505003a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 08:52:19 +0200 Subject: [PATCH 57/92] Fixed attribute section locations. --- .../Ast/GeneralScope/AttributeSection.cs | 17 +- .../Parser/CSharpParser.cs | 24 +- .../Parser/mcs/cs-parser.cs | 1337 +++++++++-------- .../Parser/mcs/cs-parser.jay | 23 +- 4 files changed, 727 insertions(+), 674 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs index bce347c92a..76905bebf7 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs @@ -85,8 +85,21 @@ namespace ICSharpCode.NRefactory.CSharp } public string AttributeTarget { - get; - set; + get { + return GetChildByRole (Roles.Identifier).Name; + } + set { + SetChildByRole (Roles.Identifier, CSharp.Identifier.Create (value, TextLocation.Empty)); + } + } + + public Identifier AttributeTargetToken { + get { + return GetChildByRole (Roles.Identifier); + } + set { + SetChildByRole (Roles.Identifier, value); + } } public AstNodeCollection Attributes { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 16bf59f231..37d88623ab 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -243,16 +243,30 @@ namespace ICSharpCode.NRefactory.CSharp return null; AttributeSection result = new AttributeSection (); var loc = LocationsBag.GetLocations (optAttributes); + int pos = 0; if (loc != null) - result.AddChild (new CSharpTokenNode (Convert (loc [0]), 1), AttributeSection.Roles.LBracket); + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.LBracket); + + string target = optAttributes.First ().ExplicitTarget; + + if (!string.IsNullOrEmpty (target)) { + if (loc != null && pos < loc.Count - 1) { + result.AddChild (Identifier.Create (target, Convert (loc [pos++])), AttributeSection.Roles.Identifier); + } else { + result.AddChild (Identifier.Create (target), AttributeSection.Roles.Identifier); + } + if (loc != null && pos < loc.Count) + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.Colon); + } - result.AttributeTarget = optAttributes.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); + // optional comma + if (loc != null && pos < loc.Count - 1 && !loc [pos].Equals (loc [pos + 1])) + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.Comma); + if (loc != null && pos < loc.Count) + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.RBracket); return result; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index cfd54b5c56..fd133d63a8 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1489,18 +1489,18 @@ case 57: case_57(); break; case 58: -#line 740 "cs-parser.jay" - { yyVal = "event"; } +#line 753 "cs-parser.jay" + { yyVal = "event"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } break; case 59: -#line 741 "cs-parser.jay" - { yyVal = "return"; } +#line 754 "cs-parser.jay" + { yyVal = "return"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } break; case 60: case_60(); break; case 61: -#line 758 "cs-parser.jay" +#line 771 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1509,7 +1509,7 @@ case 62: case_62(); break; case 63: -#line 773 "cs-parser.jay" +#line 786 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1518,14 +1518,14 @@ case 64: case_64(); break; case 66: -#line 797 "cs-parser.jay" +#line 810 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 808 "cs-parser.jay" +#line 821 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1541,13 +1541,13 @@ case 72: case_72(); break; case 73: -#line 852 "cs-parser.jay" +#line 865 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 860 "cs-parser.jay" +#line 873 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1559,29 +1559,29 @@ case 77: case_77(); break; case 78: -#line 885 "cs-parser.jay" +#line 898 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 889 "cs-parser.jay" +#line 902 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 893 "cs-parser.jay" +#line 906 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; case 83: -#line 905 "cs-parser.jay" +#line 918 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 84: -#line 909 "cs-parser.jay" +#line 922 "cs-parser.jay" { lexer.parsing_modifiers = true; } @@ -1590,7 +1590,7 @@ case 95: case_95(); break; case 96: -#line 939 "cs-parser.jay" +#line 952 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1611,7 +1611,7 @@ case 101: case_101(); break; case 102: -#line 980 "cs-parser.jay" +#line 993 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1623,13 +1623,13 @@ case 104: case_104(); break; case 107: -#line 1021 "cs-parser.jay" +#line 1034 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 108: -#line 1025 "cs-parser.jay" +#line 1038 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1638,7 +1638,7 @@ case 109: case_109(); break; case 110: -#line 1041 "cs-parser.jay" +#line 1054 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1662,7 +1662,7 @@ case 118: case_118(); break; case 119: -#line 1120 "cs-parser.jay" +#line 1133 "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"); } @@ -1674,13 +1674,13 @@ case 122: case_122(); break; case 125: -#line 1150 "cs-parser.jay" +#line 1163 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: -#line 1154 "cs-parser.jay" +#line 1167 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1689,7 +1689,7 @@ case 127: case_127(); break; case 128: -#line 1167 "cs-parser.jay" +#line 1180 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1698,13 +1698,13 @@ case 129: case_129(); break; case 132: -#line 1186 "cs-parser.jay" +#line 1199 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 133: -#line 1190 "cs-parser.jay" +#line 1203 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1713,7 +1713,7 @@ case 134: case_134(); break; case 135: -#line 1206 "cs-parser.jay" +#line 1219 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1734,13 +1734,13 @@ case 142: case_142(); break; case 143: -#line 1277 "cs-parser.jay" +#line 1290 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 144: -#line 1281 "cs-parser.jay" +#line 1294 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1749,7 +1749,7 @@ case 145: case_145(); break; case 146: -#line 1321 "cs-parser.jay" +#line 1334 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1758,7 +1758,7 @@ case 147: case_147(); break; case 148: -#line 1331 "cs-parser.jay" +#line 1344 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1770,11 +1770,11 @@ case 150: case_150(); break; case 152: -#line 1405 "cs-parser.jay" +#line 1418 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 153: -#line 1409 "cs-parser.jay" +#line 1422 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: @@ -1799,13 +1799,13 @@ case 161: case_161(); break; case 162: -#line 1481 "cs-parser.jay" +#line 1494 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 163: -#line 1485 "cs-parser.jay" +#line 1498 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1829,7 +1829,7 @@ case 169: case_169(); break; case 170: -#line 1560 "cs-parser.jay" +#line 1573 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1838,11 +1838,11 @@ case 171: case_171(); break; case 172: -#line 1601 "cs-parser.jay" +#line 1614 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 174: -#line 1609 "cs-parser.jay" +#line 1622 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1875,7 +1875,7 @@ case 183: case_183(); break; case 184: -#line 1698 "cs-parser.jay" +#line 1711 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1896,7 +1896,7 @@ case 189: case_189(); break; case 190: -#line 1752 "cs-parser.jay" +#line 1765 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1905,7 +1905,7 @@ case 191: case_191(); break; case 192: -#line 1781 "cs-parser.jay" +#line 1794 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1935,7 +1935,7 @@ case 205: case_205(); break; case 206: -#line 1930 "cs-parser.jay" +#line 1943 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1953,55 +1953,55 @@ case 210: case_210(); break; case 211: -#line 1967 "cs-parser.jay" +#line 1980 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1979 "cs-parser.jay" +#line 1992 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 1983 "cs-parser.jay" +#line 1996 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 1990 "cs-parser.jay" +#line 2003 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 1994 "cs-parser.jay" +#line 2007 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2002 "cs-parser.jay" +#line 2015 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2006 "cs-parser.jay" +#line 2019 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2010 "cs-parser.jay" +#line 2023 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2016 "cs-parser.jay" +#line 2029 "cs-parser.jay" { } break; @@ -2009,14 +2009,14 @@ case 226: case_226(); break; case 228: -#line 2049 "cs-parser.jay" +#line 2062 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2065 "cs-parser.jay" +#line 2078 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2025,95 +2025,95 @@ case 232: case_232(); break; case 234: -#line 2111 "cs-parser.jay" +#line 2124 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2112 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2113 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2114 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2115 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2116 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2118 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2119 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2121 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2122 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2123 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2124 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2125 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2126 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2127 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2128 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2129 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2130 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2131 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2132 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2133 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2134 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2141 "cs-parser.jay" +#line 2154 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2122,7 +2122,7 @@ case 257: case_257(); break; case 258: -#line 2160 "cs-parser.jay" +#line 2173 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2149,11 +2149,11 @@ case 265: case_265(); break; case 267: -#line 2263 "cs-parser.jay" +#line 2276 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2275 "cs-parser.jay" +#line 2288 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2162,7 +2162,7 @@ case 271: case_271(); break; case 272: -#line 2285 "cs-parser.jay" +#line 2298 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2195,7 +2195,7 @@ case 281: case_281(); break; case 283: -#line 2394 "cs-parser.jay" +#line 2407 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2204,13 +2204,13 @@ case 284: case_284(); break; case 287: -#line 2411 "cs-parser.jay" +#line 2424 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2415 "cs-parser.jay" +#line 2428 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2219,7 +2219,7 @@ case 289: case_289(); break; case 290: -#line 2428 "cs-parser.jay" +#line 2441 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2231,7 +2231,7 @@ case 292: case_292(); break; case 293: -#line 2453 "cs-parser.jay" +#line 2466 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2279,7 +2279,7 @@ case 311: case_311(); break; case 314: -#line 2612 "cs-parser.jay" +#line 2625 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2297,7 +2297,7 @@ case 319: case_319(); break; case 320: -#line 2670 "cs-parser.jay" +#line 2683 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2306,7 +2306,7 @@ case 321: case_321(); break; case 322: -#line 2692 "cs-parser.jay" +#line 2705 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2339,7 +2339,7 @@ case 335: case_335(); break; case 336: -#line 2797 "cs-parser.jay" +#line 2810 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2384,13 +2384,13 @@ case 351: case_351(); break; case 353: -#line 2918 "cs-parser.jay" +#line 2931 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 354: -#line 2925 "cs-parser.jay" +#line 2938 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2405,7 +2405,7 @@ case 360: case_360(); break; case 362: -#line 2963 "cs-parser.jay" +#line 2976 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2414,7 +2414,7 @@ case 363: case_363(); break; case 364: -#line 2983 "cs-parser.jay" +#line 2996 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2423,13 +2423,13 @@ case 365: case_365(); break; case 366: -#line 2992 "cs-parser.jay" +#line 3005 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 367: -#line 2996 "cs-parser.jay" +#line 3009 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2447,63 +2447,63 @@ case 371: case_371(); break; case 372: -#line 3035 "cs-parser.jay" +#line 3048 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 373: -#line 3036 "cs-parser.jay" +#line 3049 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3037 "cs-parser.jay" +#line 3050 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3038 "cs-parser.jay" +#line 3051 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3039 "cs-parser.jay" +#line 3052 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3040 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 379: -#line 3045 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3046 "cs-parser.jay" +#line 3059 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3047 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3048 "cs-parser.jay" +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3049 "cs-parser.jay" +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3050 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3051 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3052 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3053 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 408: @@ -2513,22 +2513,22 @@ case 409: case_409(); break; case 413: -#line 3100 "cs-parser.jay" +#line 3113 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 414: -#line 3104 "cs-parser.jay" +#line 3117 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3105 "cs-parser.jay" +#line 3118 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 420: case_420(); break; case 421: -#line 3138 "cs-parser.jay" +#line 3151 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2546,7 +2546,7 @@ case 425: case_425(); break; case 426: -#line 3173 "cs-parser.jay" +#line 3186 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2555,7 +2555,7 @@ case 427: case_427(); break; case 428: -#line 3181 "cs-parser.jay" +#line 3194 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2567,7 +2567,7 @@ case 430: case_430(); break; case 431: -#line 3197 "cs-parser.jay" +#line 3210 "cs-parser.jay" { yyVal = null; } break; case 433: @@ -2577,11 +2577,11 @@ case 434: case_434(); break; case 435: -#line 3220 "cs-parser.jay" +#line 3233 "cs-parser.jay" { yyVal = null; } break; case 436: -#line 3224 "cs-parser.jay" +#line 3237 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2599,7 +2599,7 @@ case 440: case_440(); break; case 441: -#line 3257 "cs-parser.jay" +#line 3270 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2614,7 +2614,7 @@ case 444: case_444(); break; case 447: -#line 3285 "cs-parser.jay" +#line 3298 "cs-parser.jay" { yyVal = null; } break; case 449: @@ -2633,7 +2633,7 @@ case 453: case_453(); break; case 454: -#line 3337 "cs-parser.jay" +#line 3350 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2669,13 +2669,13 @@ case 468: case_468(); break; case 469: -#line 3424 "cs-parser.jay" +#line 3437 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 471: -#line 3432 "cs-parser.jay" +#line 3445 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2687,13 +2687,13 @@ case 473: case_473(); break; case 474: -#line 3452 "cs-parser.jay" +#line 3465 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 475: -#line 3459 "cs-parser.jay" +#line 3472 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2720,7 +2720,7 @@ case 482: case_482(); break; case 483: -#line 3525 "cs-parser.jay" +#line 3538 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2732,7 +2732,7 @@ case 485: case_485(); break; case 488: -#line 3552 "cs-parser.jay" +#line 3565 "cs-parser.jay" { yyVal = null; } break; case 490: @@ -2763,25 +2763,25 @@ case 501: case_501(); break; case 502: -#line 3630 "cs-parser.jay" +#line 3643 "cs-parser.jay" { yyVal = 2; } break; case 503: -#line 3634 "cs-parser.jay" +#line 3647 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 504: -#line 3641 "cs-parser.jay" +#line 3654 "cs-parser.jay" { yyVal = null; } break; case 505: -#line 3645 "cs-parser.jay" +#line 3658 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2799,7 +2799,7 @@ case 509: case_509(); break; case 510: -#line 3689 "cs-parser.jay" +#line 3702 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2844,7 +2844,7 @@ case 525: case_525(); break; case 526: -#line 3809 "cs-parser.jay" +#line 3822 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2853,25 +2853,25 @@ case 527: case_527(); break; case 528: -#line 3822 "cs-parser.jay" +#line 3835 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 529: -#line 3826 "cs-parser.jay" +#line 3839 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 530: -#line 3833 "cs-parser.jay" +#line 3846 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 532: -#line 3841 "cs-parser.jay" +#line 3854 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2883,13 +2883,13 @@ case 534: case_534(); break; case 536: -#line 3867 "cs-parser.jay" +#line 3880 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 537: -#line 3871 "cs-parser.jay" +#line 3884 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2901,37 +2901,37 @@ case 541: case_541(); break; case 543: -#line 3901 "cs-parser.jay" +#line 3914 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 544: -#line 3905 "cs-parser.jay" +#line 3918 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3909 "cs-parser.jay" +#line 3922 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3913 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3917 "cs-parser.jay" +#line 3930 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3921 "cs-parser.jay" +#line 3934 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2949,7 +2949,7 @@ case 554: case_554(); break; case 555: -#line 3953 "cs-parser.jay" +#line 3966 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2958,13 +2958,13 @@ case 556: case_556(); break; case 557: -#line 3962 "cs-parser.jay" +#line 3975 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 558: -#line 3966 "cs-parser.jay" +#line 3979 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3015,7 +3015,7 @@ case 583: case_583(); break; case 584: -#line 4090 "cs-parser.jay" +#line 4103 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3066,14 +3066,14 @@ case 599: case_599(); break; case 600: -#line 4187 "cs-parser.jay" +#line 4200 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 601: case_601(); break; case 604: -#line 4202 "cs-parser.jay" +#line 4215 "cs-parser.jay" { start_block (lexer.Location); } @@ -3097,7 +3097,7 @@ case 611: case_611(); break; case 612: -#line 4247 "cs-parser.jay" +#line 4260 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3109,7 +3109,7 @@ case 614: case_614(); break; case 615: -#line 4261 "cs-parser.jay" +#line 4274 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3121,7 +3121,7 @@ case 617: case_617(); break; case 623: -#line 4286 "cs-parser.jay" +#line 4299 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3136,13 +3136,13 @@ case 626: case_626(); break; case 628: -#line 4315 "cs-parser.jay" +#line 4328 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 629: -#line 4328 "cs-parser.jay" +#line 4341 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3160,18 +3160,18 @@ case 633: case_633(); break; case 634: -#line 4371 "cs-parser.jay" +#line 4384 "cs-parser.jay" { yyVal = null; } break; case 635: -#line 4373 "cs-parser.jay" +#line 4386 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 636: case_636(); break; case 637: -#line 4386 "cs-parser.jay" +#line 4399 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3228,7 +3228,7 @@ case 656: case_656(); break; case 658: -#line 4506 "cs-parser.jay" +#line 4519 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3258,19 +3258,19 @@ case 666: case_666(); break; case 667: -#line 4596 "cs-parser.jay" +#line 4609 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 668: -#line 4600 "cs-parser.jay" +#line 4613 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4607 "cs-parser.jay" +#line 4620 "cs-parser.jay" { yyVal = Variance.None; } @@ -3288,7 +3288,7 @@ case 673: case_673(); break; case 674: -#line 4652 "cs-parser.jay" +#line 4665 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3306,13 +3306,13 @@ case 678: case_678(); break; case 683: -#line 4696 "cs-parser.jay" +#line 4709 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 684: -#line 4700 "cs-parser.jay" +#line 4713 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3321,13 +3321,13 @@ case 686: case_686(); break; case 689: -#line 4724 "cs-parser.jay" +#line 4737 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 690: -#line 4728 "cs-parser.jay" +#line 4741 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3360,13 +3360,13 @@ case 729: case_729(); break; case 730: -#line 4872 "cs-parser.jay" +#line 4885 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 731: -#line 4876 "cs-parser.jay" +#line 4889 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3378,7 +3378,7 @@ case 734: case_734(); break; case 735: -#line 4897 "cs-parser.jay" +#line 4910 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3411,7 +3411,7 @@ case 750: case_750(); break; case 751: -#line 4997 "cs-parser.jay" +#line 5010 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3432,15 +3432,15 @@ case 761: case_761(); break; case 762: -#line 5047 "cs-parser.jay" +#line 5060 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 763: -#line 5051 "cs-parser.jay" +#line 5064 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5052 "cs-parser.jay" +#line 5065 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: @@ -3459,7 +3459,7 @@ case 771: case_771(); break; case 772: -#line 5120 "cs-parser.jay" +#line 5133 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3480,13 +3480,13 @@ case 778: case_778(); break; case 779: -#line 5164 "cs-parser.jay" +#line 5177 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 780: -#line 5168 "cs-parser.jay" +#line 5181 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3501,7 +3501,7 @@ case 783: case_783(); break; case 784: -#line 5197 "cs-parser.jay" +#line 5210 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3516,7 +3516,7 @@ case 791: case_791(); break; case 792: -#line 5236 "cs-parser.jay" +#line 5249 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3528,7 +3528,7 @@ case 794: case_794(); break; case 795: -#line 5264 "cs-parser.jay" +#line 5277 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 797: @@ -3538,11 +3538,11 @@ case 798: case_798(); break; case 800: -#line 5285 "cs-parser.jay" +#line 5298 "cs-parser.jay" { yyVal = null; } break; case 802: -#line 5290 "cs-parser.jay" +#line 5303 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 806: @@ -3585,7 +3585,7 @@ case 824: case_824(); break; case 827: -#line 5445 "cs-parser.jay" +#line 5458 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3606,7 +3606,7 @@ case 832: case_832(); break; case 835: -#line 5498 "cs-parser.jay" +#line 5511 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3615,7 +3615,7 @@ case 836: case_836(); break; case 837: -#line 5517 "cs-parser.jay" +#line 5530 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3624,13 +3624,13 @@ case 838: case_838(); break; case 839: -#line 5535 "cs-parser.jay" +#line 5548 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 840: -#line 5542 "cs-parser.jay" +#line 5555 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3639,7 +3639,7 @@ case 841: case_841(); break; case 842: -#line 5552 "cs-parser.jay" +#line 5565 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3669,7 +3669,7 @@ case 850: case_850(); break; case 851: -#line 5635 "cs-parser.jay" +#line 5648 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3702,7 +3702,7 @@ case 860: case_860(); break; case 861: -#line 5736 "cs-parser.jay" +#line 5749 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3711,7 +3711,7 @@ case 862: case_862(); break; case 863: -#line 5751 "cs-parser.jay" +#line 5764 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3726,7 +3726,7 @@ case 867: case_867(); break; case 868: -#line 5796 "cs-parser.jay" +#line 5809 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3747,7 +3747,7 @@ case 876: case_876(); break; case 882: -#line 5855 "cs-parser.jay" +#line 5868 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3756,7 +3756,7 @@ case 883: case_883(); break; case 884: -#line 5874 "cs-parser.jay" +#line 5887 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3789,13 +3789,13 @@ case 893: case_893(); break; case 895: -#line 6018 "cs-parser.jay" +#line 6031 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 896: -#line 6025 "cs-parser.jay" +#line 6038 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3816,7 +3816,7 @@ case 903: case_903(); break; case 904: -#line 6071 "cs-parser.jay" +#line 6084 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3828,7 +3828,7 @@ case 906: case_906(); break; case 907: -#line 6088 "cs-parser.jay" +#line 6101 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3852,13 +3852,13 @@ case 916: case_916(); break; case 924: -#line 6212 "cs-parser.jay" +#line 6225 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 925: -#line 6219 "cs-parser.jay" +#line 6232 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3870,13 +3870,13 @@ case 927: case_927(); break; case 928: -#line 6236 "cs-parser.jay" +#line 6249 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 929: -#line 6240 "cs-parser.jay" +#line 6253 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3894,25 +3894,25 @@ case 933: case_933(); break; case 935: -#line 6276 "cs-parser.jay" +#line 6289 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 937: -#line 6284 "cs-parser.jay" +#line 6297 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 938: -#line 6288 "cs-parser.jay" +#line 6301 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 939: -#line 6295 "cs-parser.jay" +#line 6308 "cs-parser.jay" { yyVal = new List (0); } @@ -4151,7 +4151,8 @@ void case_50() { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); - lbag.AddLocation (sect, savedOpenLocation, savedCloseLocation); + if (locationListStack.Count > 0) + lbag.AddLocation (sect, locationListStack.Pop ()); if (attributeCommas.Count > 0) { lbag.AppendTo (sect, attributeCommas); attributeCommas.Clear (); @@ -4159,10 +4160,13 @@ void case_50() } void case_51() -#line 683 "cs-parser.jay" +#line 684 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; + + if (locationListStack.Count > 0) + lbag.AddLocation (sect, locationListStack.Pop ()); if (attrs == null) attrs = new Attributes (sect); else @@ -4171,21 +4175,21 @@ void case_51() } void case_52() -#line 696 "cs-parser.jay" +#line 700 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 701 "cs-parser.jay" +#line 705 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 709 "cs-parser.jay" +#line 713 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4194,7 +4198,7 @@ void case_54() } void case_55() -#line 716 "cs-parser.jay" +#line 720 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4204,25 +4208,34 @@ void case_55() current_attr_target = null; lexer.parsing_attribute_section = false; - savedCloseLocation = GetLocation (yyVals[0+yyTop]); + if (yyVals[-1+yyTop] != null) { + locationListStack.Push (new List(new [] { savedOpenLocation, savedCloseLocation, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]) })); + } else { + locationListStack.Push (new List(new [] { savedOpenLocation, savedCloseLocation, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[0+yyTop]) })); + } } void case_56() -#line 728 "cs-parser.jay" +#line 736 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; - savedCloseLocation = GetLocation (yyVals[0+yyTop]); + if (yyVals[-1+yyTop] != null) { + locationListStack.Push (new List(new [] { savedOpenLocation, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]) })); + } else { + locationListStack.Push (new List(new [] { savedOpenLocation, GetLocation (yyVals[0+yyTop]) })); + } } void case_57() -#line 736 "cs-parser.jay" +#line 748 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); + savedCloseLocation = GetLocation (yyVals[0+yyTop]); } void case_60() -#line 743 "cs-parser.jay" +#line 756 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4234,7 +4247,7 @@ void case_60() } void case_62() -#line 760 "cs-parser.jay" +#line 773 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4244,7 +4257,7 @@ void case_62() } void case_64() -#line 775 "cs-parser.jay" +#line 788 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4262,7 +4275,7 @@ void case_64() } void case_67() -#line 799 "cs-parser.jay" +#line 812 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4270,7 +4283,7 @@ void case_67() } void case_69() -#line 810 "cs-parser.jay" +#line 823 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4278,7 +4291,7 @@ void case_69() } void case_70() -#line 816 "cs-parser.jay" +#line 829 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4286,7 +4299,7 @@ void case_70() } void case_71() -#line 822 "cs-parser.jay" +#line 835 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4303,7 +4316,7 @@ void case_71() } void case_72() -#line 837 "cs-parser.jay" +#line 850 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4315,7 +4328,7 @@ void case_72() } void case_76() -#line 862 "cs-parser.jay" +#line 875 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4324,7 +4337,7 @@ void case_76() } void case_77() -#line 872 "cs-parser.jay" +#line 885 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4337,7 +4350,7 @@ void case_77() } void case_95() -#line 924 "cs-parser.jay" +#line 937 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4346,7 +4359,7 @@ void case_95() } void case_97() -#line 941 "cs-parser.jay" +#line 954 "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]); @@ -4354,7 +4367,7 @@ void case_97() } void case_98() -#line 948 "cs-parser.jay" +#line 961 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4368,14 +4381,14 @@ void case_98() } void case_99() -#line 960 "cs-parser.jay" +#line 973 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_100() -#line 965 "cs-parser.jay" +#line 978 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); --lexer.parsing_declaration; @@ -4384,7 +4397,7 @@ void case_100() } void case_101() -#line 972 "cs-parser.jay" +#line 985 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[-1+yyTop]); @@ -4392,7 +4405,7 @@ void case_101() } void case_103() -#line 987 "cs-parser.jay" +#line 1000 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4407,7 +4420,7 @@ void case_103() } void case_104() -#line 1000 "cs-parser.jay" +#line 1013 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4420,7 +4433,7 @@ void case_104() } void case_109() -#line 1030 "cs-parser.jay" +#line 1043 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4428,7 +4441,7 @@ void case_109() } void case_111() -#line 1043 "cs-parser.jay" +#line 1056 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4436,14 +4449,14 @@ void case_111() } void case_112() -#line 1049 "cs-parser.jay" +#line 1062 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_115() -#line 1064 "cs-parser.jay" +#line 1077 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4458,7 +4471,7 @@ void case_115() } void case_116() -#line 1079 "cs-parser.jay" +#line 1092 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4471,7 +4484,7 @@ void case_116() } void case_117() -#line 1092 "cs-parser.jay" +#line 1105 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4484,7 +4497,7 @@ void case_117() } void case_118() -#line 1103 "cs-parser.jay" +#line 1116 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4498,7 +4511,7 @@ void case_118() } void case_121() -#line 1126 "cs-parser.jay" +#line 1139 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4506,7 +4519,7 @@ void case_121() } void case_122() -#line 1132 "cs-parser.jay" +#line 1145 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4516,7 +4529,7 @@ void case_122() } void case_127() -#line 1159 "cs-parser.jay" +#line 1172 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4524,7 +4537,7 @@ void case_127() } void case_129() -#line 1169 "cs-parser.jay" +#line 1182 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4533,7 +4546,7 @@ void case_129() } void case_134() -#line 1195 "cs-parser.jay" +#line 1208 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4541,7 +4554,7 @@ void case_134() } void case_136() -#line 1208 "cs-parser.jay" +#line 1221 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4549,14 +4562,14 @@ void case_136() } void case_137() -#line 1214 "cs-parser.jay" +#line 1227 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_140() -#line 1224 "cs-parser.jay" +#line 1237 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4564,7 +4577,7 @@ void case_140() } void case_141() -#line 1233 "cs-parser.jay" +#line 1246 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4576,7 +4589,7 @@ void case_141() } void case_142() -#line 1243 "cs-parser.jay" +#line 1256 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4604,7 +4617,7 @@ void case_142() } void case_145() -#line 1283 "cs-parser.jay" +#line 1296 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4639,14 +4652,14 @@ void case_145() } void case_147() -#line 1324 "cs-parser.jay" +#line 1337 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_149() -#line 1333 "cs-parser.jay" +#line 1346 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4698,7 +4711,7 @@ void case_149() } void case_150() -#line 1386 "cs-parser.jay" +#line 1399 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4716,7 +4729,7 @@ void case_150() } void case_155() -#line 1415 "cs-parser.jay" +#line 1428 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4724,7 +4737,7 @@ void case_155() } void case_156() -#line 1421 "cs-parser.jay" +#line 1434 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4735,7 +4748,7 @@ void case_156() } void case_157() -#line 1430 "cs-parser.jay" +#line 1443 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4746,7 +4759,7 @@ void case_157() } void case_158() -#line 1439 "cs-parser.jay" +#line 1452 "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"); @@ -4756,7 +4769,7 @@ void case_158() } void case_159() -#line 1447 "cs-parser.jay" +#line 1460 "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"); @@ -4771,7 +4784,7 @@ void case_159() } void case_160() -#line 1460 "cs-parser.jay" +#line 1473 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4780,7 +4793,7 @@ void case_160() } void case_161() -#line 1467 "cs-parser.jay" +#line 1480 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4794,14 +4807,14 @@ void case_161() } void case_164() -#line 1487 "cs-parser.jay" +#line 1500 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_165() -#line 1495 "cs-parser.jay" +#line 1508 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4812,7 +4825,7 @@ void case_165() } void case_166() -#line 1504 "cs-parser.jay" +#line 1517 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4832,7 +4845,7 @@ void case_166() } void case_167() -#line 1528 "cs-parser.jay" +#line 1541 "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); @@ -4840,7 +4853,7 @@ void case_167() } void case_168() -#line 1537 "cs-parser.jay" +#line 1550 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4849,7 +4862,7 @@ void case_168() } void case_169() -#line 1547 "cs-parser.jay" +#line 1560 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4858,7 +4871,7 @@ void case_169() } void case_171() -#line 1562 "cs-parser.jay" +#line 1575 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4897,7 +4910,7 @@ void case_171() } void case_175() -#line 1611 "cs-parser.jay" +#line 1624 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4920,7 +4933,7 @@ void case_175() } void case_176() -#line 1635 "cs-parser.jay" +#line 1648 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4929,7 +4942,7 @@ void case_176() } void case_177() -#line 1642 "cs-parser.jay" +#line 1655 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4938,7 +4951,7 @@ void case_177() } void case_178() -#line 1649 "cs-parser.jay" +#line 1662 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4950,14 +4963,14 @@ void case_178() } void case_179() -#line 1662 "cs-parser.jay" +#line 1675 "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_180() -#line 1667 "cs-parser.jay" +#line 1680 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4966,21 +4979,21 @@ void case_180() } void case_181() -#line 1674 "cs-parser.jay" +#line 1687 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1682 "cs-parser.jay" +#line 1695 "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"); } void case_183() -#line 1687 "cs-parser.jay" +#line 1700 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -4991,21 +5004,21 @@ void case_183() } void case_185() -#line 1703 "cs-parser.jay" +#line 1716 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1714 "cs-parser.jay" +#line 1727 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1719 "cs-parser.jay" +#line 1732 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5021,7 +5034,7 @@ void case_187() } void case_188() -#line 1733 "cs-parser.jay" +#line 1746 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5030,14 +5043,14 @@ void case_188() } void case_189() -#line 1740 "cs-parser.jay" +#line 1753 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1754 "cs-parser.jay" +#line 1767 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5064,7 +5077,7 @@ void case_191() } void case_193() -#line 1783 "cs-parser.jay" +#line 1796 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5077,7 +5090,7 @@ void case_193() } void case_198() -#line 1802 "cs-parser.jay" +#line 1815 "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 ()); @@ -5090,7 +5103,7 @@ void case_198() } void case_199() -#line 1816 "cs-parser.jay" +#line 1829 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5113,7 +5126,7 @@ void case_199() } void case_200() -#line 1837 "cs-parser.jay" +#line 1850 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5136,7 +5149,7 @@ void case_200() } void case_201() -#line 1861 "cs-parser.jay" +#line 1874 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5164,7 +5177,7 @@ void case_201() } void case_202() -#line 1887 "cs-parser.jay" +#line 1900 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5187,21 +5200,21 @@ void case_202() } void case_204() -#line 1912 "cs-parser.jay" +#line 1925 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1917 "cs-parser.jay" +#line 1930 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1932 "cs-parser.jay" +#line 1945 "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]); @@ -5209,7 +5222,7 @@ void case_207() } void case_208() -#line 1939 "cs-parser.jay" +#line 1952 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5224,7 +5237,7 @@ void case_208() } void case_209() -#line 1952 "cs-parser.jay" +#line 1965 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5232,7 +5245,7 @@ void case_209() } void case_210() -#line 1958 "cs-parser.jay" +#line 1971 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5241,7 +5254,7 @@ void case_210() } void case_226() -#line 2018 "cs-parser.jay" +#line 2031 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5271,14 +5284,14 @@ void case_226() } void case_230() -#line 2055 "cs-parser.jay" +#line 2068 "cs-parser.jay" { 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_232() -#line 2067 "cs-parser.jay" +#line 2080 "cs-parser.jay" { valid_param_mod = 0; @@ -5320,7 +5333,7 @@ void case_232() } void case_257() -#line 2143 "cs-parser.jay" +#line 2156 "cs-parser.jay" { valid_param_mod = 0; @@ -5337,7 +5350,7 @@ void case_257() } void case_259() -#line 2162 "cs-parser.jay" +#line 2175 "cs-parser.jay" { valid_param_mod = 0; @@ -5354,7 +5367,7 @@ void case_259() } void case_260() -#line 2177 "cs-parser.jay" +#line 2190 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5362,7 +5375,7 @@ void case_260() } void case_261() -#line 2183 "cs-parser.jay" +#line 2196 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5370,7 +5383,7 @@ void case_261() } void case_262() -#line 2193 "cs-parser.jay" +#line 2206 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5386,7 +5399,7 @@ void case_262() } void case_263() -#line 2212 "cs-parser.jay" +#line 2225 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5397,7 +5410,7 @@ void case_263() } void case_264() -#line 2221 "cs-parser.jay" +#line 2234 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5410,7 +5423,7 @@ void case_264() } void case_265() -#line 2232 "cs-parser.jay" +#line 2245 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5440,7 +5453,7 @@ void case_265() } void case_271() -#line 2277 "cs-parser.jay" +#line 2290 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5448,7 +5461,7 @@ void case_271() } void case_273() -#line 2287 "cs-parser.jay" +#line 2300 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5456,14 +5469,14 @@ void case_273() } void case_274() -#line 2293 "cs-parser.jay" +#line 2306 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2301 "cs-parser.jay" +#line 2314 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5474,7 +5487,7 @@ void case_275() } void case_276() -#line 2310 "cs-parser.jay" +#line 2323 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5496,7 +5509,7 @@ void case_276() } void case_277() -#line 2335 "cs-parser.jay" +#line 2348 "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); @@ -5510,7 +5523,7 @@ void case_277() } void case_278() -#line 2349 "cs-parser.jay" +#line 2362 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5522,7 +5535,7 @@ void case_278() } void case_279() -#line 2362 "cs-parser.jay" +#line 2375 "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); @@ -5532,7 +5545,7 @@ void case_279() } void case_280() -#line 2370 "cs-parser.jay" +#line 2383 "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"); @@ -5541,7 +5554,7 @@ void case_280() } void case_281() -#line 2377 "cs-parser.jay" +#line 2390 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5554,14 +5567,14 @@ void case_281() } void case_284() -#line 2396 "cs-parser.jay" +#line 2409 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2420 "cs-parser.jay" +#line 2433 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5569,7 +5582,7 @@ void case_289() } void case_291() -#line 2430 "cs-parser.jay" +#line 2443 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5578,7 +5591,7 @@ void case_291() } void case_292() -#line 2439 "cs-parser.jay" +#line 2452 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5592,28 +5605,28 @@ void case_292() } void case_296() -#line 2460 "cs-parser.jay" +#line 2473 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2465 "cs-parser.jay" +#line 2478 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2470 "cs-parser.jay" +#line 2483 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2478 "cs-parser.jay" +#line 2491 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5627,7 +5640,7 @@ void case_299() } void case_300() -#line 2490 "cs-parser.jay" +#line 2503 "cs-parser.jay" { lexer.EventParsing = true; @@ -5642,7 +5655,7 @@ void case_300() } void case_301() -#line 2506 "cs-parser.jay" +#line 2519 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5656,7 +5669,7 @@ void case_301() } void case_302() -#line 2518 "cs-parser.jay" +#line 2531 "cs-parser.jay" { lexer.EventParsing = true; @@ -5671,14 +5684,14 @@ void case_302() } void case_303() -#line 2534 "cs-parser.jay" +#line 2547 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_305() -#line 2546 "cs-parser.jay" +#line 2559 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-2+yyTop])); if (doc_support) @@ -5686,7 +5699,7 @@ void case_305() } void case_306() -#line 2552 "cs-parser.jay" +#line 2565 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5701,7 +5714,7 @@ void case_306() } void case_307() -#line 2565 "cs-parser.jay" +#line 2578 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5709,7 +5722,7 @@ void case_307() } void case_308() -#line 2571 "cs-parser.jay" +#line 2584 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5725,7 +5738,7 @@ void case_308() } void case_310() -#line 2589 "cs-parser.jay" +#line 2602 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5738,21 +5751,21 @@ void case_310() } void case_311() -#line 2600 "cs-parser.jay" +#line 2613 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_316() -#line 2618 "cs-parser.jay" +#line 2631 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_317() -#line 2626 "cs-parser.jay" +#line 2639 "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]); @@ -5767,7 +5780,7 @@ void case_317() } void case_318() -#line 2639 "cs-parser.jay" +#line 2652 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5777,7 +5790,7 @@ void case_318() } void case_319() -#line 2647 "cs-parser.jay" +#line 2660 "cs-parser.jay" { --lexer.parsing_block; @@ -5793,7 +5806,7 @@ void case_319() } void case_321() -#line 2672 "cs-parser.jay" +#line 2685 "cs-parser.jay" { valid_param_mod = 0; @@ -5813,7 +5826,7 @@ void case_321() } void case_323() -#line 2694 "cs-parser.jay" +#line 2707 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5829,7 +5842,7 @@ void case_323() } void case_325() -#line 2712 "cs-parser.jay" +#line 2725 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5838,7 +5851,7 @@ void case_325() } void case_327() -#line 2723 "cs-parser.jay" +#line 2736 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5847,7 +5860,7 @@ void case_327() } void case_329() -#line 2734 "cs-parser.jay" +#line 2747 "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) { @@ -5856,14 +5869,14 @@ void case_329() } void case_330() -#line 2744 "cs-parser.jay" +#line 2757 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_332() -#line 2756 "cs-parser.jay" +#line 2769 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5876,14 +5889,14 @@ void case_332() } void case_333() -#line 2767 "cs-parser.jay" +#line 2780 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_334() -#line 2775 "cs-parser.jay" +#line 2788 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5892,7 +5905,7 @@ void case_334() } void case_335() -#line 2782 "cs-parser.jay" +#line 2795 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5901,7 +5914,7 @@ void case_335() } void case_337() -#line 2799 "cs-parser.jay" +#line 2812 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5909,7 +5922,7 @@ void case_337() } void case_338() -#line 2808 "cs-parser.jay" +#line 2821 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5918,7 +5931,7 @@ void case_338() } void case_340() -#line 2819 "cs-parser.jay" +#line 2832 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5926,21 +5939,21 @@ void case_340() } void case_341() -#line 2828 "cs-parser.jay" +#line 2841 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_342() -#line 2833 "cs-parser.jay" +#line 2846 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_343() -#line 2841 "cs-parser.jay" +#line 2854 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5948,7 +5961,7 @@ void case_343() } void case_344() -#line 2847 "cs-parser.jay" +#line 2860 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5958,7 +5971,7 @@ void case_344() } void case_345() -#line 2855 "cs-parser.jay" +#line 2868 "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); @@ -5966,7 +5979,7 @@ void case_345() } void case_347() -#line 2865 "cs-parser.jay" +#line 2878 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5976,7 +5989,7 @@ void case_347() } void case_348() -#line 2876 "cs-parser.jay" +#line 2889 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5984,7 +5997,7 @@ void case_348() } void case_349() -#line 2882 "cs-parser.jay" +#line 2895 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -5993,7 +6006,7 @@ void case_349() } void case_350() -#line 2892 "cs-parser.jay" +#line 2905 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6003,7 +6016,7 @@ void case_350() } void case_351() -#line 2900 "cs-parser.jay" +#line 2913 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6014,28 +6027,28 @@ void case_351() } void case_356() -#line 2934 "cs-parser.jay" +#line 2947 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_358() -#line 2943 "cs-parser.jay" +#line 2956 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_360() -#line 2952 "cs-parser.jay" +#line 2965 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_363() -#line 2968 "cs-parser.jay" +#line 2981 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6050,14 +6063,14 @@ void case_363() } void case_365() -#line 2985 "cs-parser.jay" +#line 2998 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_368() -#line 3001 "cs-parser.jay" +#line 3014 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6065,7 +6078,7 @@ void case_368() } void case_369() -#line 3007 "cs-parser.jay" +#line 3020 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6074,7 +6087,7 @@ void case_369() } void case_370() -#line 3017 "cs-parser.jay" +#line 3030 "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 ()); @@ -6083,35 +6096,35 @@ void case_370() } void case_371() -#line 3024 "cs-parser.jay" +#line 3037 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_408() -#line 3086 "cs-parser.jay" +#line 3099 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_409() -#line 3090 "cs-parser.jay" +#line 3103 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_420() -#line 3131 "cs-parser.jay" +#line 3144 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_422() -#line 3143 "cs-parser.jay" +#line 3156 "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) { @@ -6120,7 +6133,7 @@ void case_422() } void case_423() -#line 3150 "cs-parser.jay" +#line 3163 "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) { @@ -6129,7 +6142,7 @@ void case_423() } void case_424() -#line 3157 "cs-parser.jay" +#line 3170 "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) { @@ -6138,7 +6151,7 @@ void case_424() } void case_425() -#line 3164 "cs-parser.jay" +#line 3177 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6148,28 +6161,28 @@ void case_425() } void case_427() -#line 3174 "cs-parser.jay" +#line 3187 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_429() -#line 3182 "cs-parser.jay" +#line 3195 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3190 "cs-parser.jay" +#line 3203 "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_433() -#line 3203 "cs-parser.jay" +#line 3216 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6181,14 +6194,14 @@ void case_433() } void case_434() -#line 3213 "cs-parser.jay" +#line 3226 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_437() -#line 3229 "cs-parser.jay" +#line 3242 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6196,7 +6209,7 @@ void case_437() } void case_438() -#line 3235 "cs-parser.jay" +#line 3248 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6205,14 +6218,14 @@ void case_438() } void case_439() -#line 3241 "cs-parser.jay" +#line 3254 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_440() -#line 3249 "cs-parser.jay" +#line 3262 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6220,7 +6233,7 @@ void case_440() } void case_442() -#line 3258 "cs-parser.jay" +#line 3271 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6230,7 +6243,7 @@ void case_442() } void case_443() -#line 3266 "cs-parser.jay" +#line 3279 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6239,14 +6252,14 @@ void case_443() } void case_444() -#line 3273 "cs-parser.jay" +#line 3286 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_449() -#line 3291 "cs-parser.jay" +#line 3304 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6254,7 +6267,7 @@ void case_449() } void case_450() -#line 3297 "cs-parser.jay" +#line 3310 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6266,7 +6279,7 @@ void case_450() } void case_451() -#line 3307 "cs-parser.jay" +#line 3320 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6283,56 +6296,56 @@ void case_451() } void case_452() -#line 3322 "cs-parser.jay" +#line 3335 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_453() -#line 3327 "cs-parser.jay" +#line 3340 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_458() -#line 3348 "cs-parser.jay" +#line 3361 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_459() -#line 3353 "cs-parser.jay" +#line 3366 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3358 "cs-parser.jay" +#line 3371 "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_461() -#line 3363 "cs-parser.jay" +#line 3376 "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_463() -#line 3375 "cs-parser.jay" +#line 3388 "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_464() -#line 3383 "cs-parser.jay" +#line 3396 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6340,7 +6353,7 @@ void case_464() } void case_465() -#line 3389 "cs-parser.jay" +#line 3402 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6349,14 +6362,14 @@ void case_465() } void case_466() -#line 3395 "cs-parser.jay" +#line 3408 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_467() -#line 3403 "cs-parser.jay" +#line 3416 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6364,7 +6377,7 @@ void case_467() } void case_468() -#line 3409 "cs-parser.jay" +#line 3422 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6376,21 +6389,21 @@ void case_468() } void case_472() -#line 3437 "cs-parser.jay" +#line 3450 "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_473() -#line 3442 "cs-parser.jay" +#line 3455 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_476() -#line 3464 "cs-parser.jay" +#line 3477 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6405,7 +6418,7 @@ void case_476() } void case_477() -#line 3477 "cs-parser.jay" +#line 3490 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6414,7 +6427,7 @@ void case_477() } void case_478() -#line 3489 "cs-parser.jay" +#line 3502 "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])) { @@ -6424,7 +6437,7 @@ void case_478() } void case_479() -#line 3497 "cs-parser.jay" +#line 3510 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6433,7 +6446,7 @@ void case_479() } void case_480() -#line 3504 "cs-parser.jay" +#line 3517 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6442,28 +6455,28 @@ void case_480() } void case_481() -#line 3511 "cs-parser.jay" +#line 3524 "cs-parser.jay" { 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_482() -#line 3516 "cs-parser.jay" +#line 3529 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_484() -#line 3527 "cs-parser.jay" +#line 3540 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_485() -#line 3535 "cs-parser.jay" +#line 3548 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6475,7 +6488,7 @@ void case_485() } void case_490() -#line 3558 "cs-parser.jay" +#line 3571 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6483,7 +6496,7 @@ void case_490() } void case_491() -#line 3564 "cs-parser.jay" +#line 3577 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6493,7 +6506,7 @@ void case_491() } void case_492() -#line 3575 "cs-parser.jay" +#line 3588 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6501,7 +6514,7 @@ void case_492() } void case_493() -#line 3581 "cs-parser.jay" +#line 3594 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6509,14 +6522,14 @@ void case_493() } void case_494() -#line 3587 "cs-parser.jay" +#line 3600 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_495() -#line 3592 "cs-parser.jay" +#line 3605 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6524,28 +6537,28 @@ void case_495() } void case_499() -#line 3607 "cs-parser.jay" +#line 3620 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_500() -#line 3615 "cs-parser.jay" +#line 3628 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_501() -#line 3620 "cs-parser.jay" +#line 3633 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_506() -#line 3650 "cs-parser.jay" +#line 3663 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6554,7 +6567,7 @@ void case_506() } void case_507() -#line 3657 "cs-parser.jay" +#line 3670 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6567,7 +6580,7 @@ void case_507() } void case_508() -#line 3671 "cs-parser.jay" +#line 3684 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6575,7 +6588,7 @@ void case_508() } void case_509() -#line 3677 "cs-parser.jay" +#line 3690 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6584,7 +6597,7 @@ void case_509() } void case_511() -#line 3691 "cs-parser.jay" +#line 3704 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6592,14 +6605,14 @@ void case_511() } void case_514() -#line 3702 "cs-parser.jay" +#line 3715 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_515() -#line 3710 "cs-parser.jay" +#line 3723 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6607,7 +6620,7 @@ void case_515() } void case_516() -#line 3716 "cs-parser.jay" +#line 3729 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6617,7 +6630,7 @@ void case_516() } void case_517() -#line 3724 "cs-parser.jay" +#line 3737 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6627,7 +6640,7 @@ void case_517() } void case_518() -#line 3732 "cs-parser.jay" +#line 3745 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6637,7 +6650,7 @@ void case_518() } void case_519() -#line 3740 "cs-parser.jay" +#line 3753 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6650,7 +6663,7 @@ void case_519() } void case_520() -#line 3754 "cs-parser.jay" +#line 3767 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6659,7 +6672,7 @@ void case_520() } void case_521() -#line 3764 "cs-parser.jay" +#line 3777 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6669,35 +6682,35 @@ void case_521() } void case_522() -#line 3775 "cs-parser.jay" +#line 3788 "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_523() -#line 3783 "cs-parser.jay" +#line 3796 "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_524() -#line 3791 "cs-parser.jay" +#line 3804 "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_525() -#line 3799 "cs-parser.jay" +#line 3812 "cs-parser.jay" { 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_527() -#line 3811 "cs-parser.jay" +#line 3824 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6708,7 +6721,7 @@ void case_527() } void case_533() -#line 3843 "cs-parser.jay" +#line 3856 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6717,7 +6730,7 @@ void case_533() } void case_534() -#line 3853 "cs-parser.jay" +#line 3866 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6727,147 +6740,147 @@ void case_534() } void case_540() -#line 3878 "cs-parser.jay" +#line 3891 "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_541() -#line 3886 "cs-parser.jay" +#line 3899 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_550() -#line 3927 "cs-parser.jay" +#line 3940 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3932 "cs-parser.jay" +#line 3945 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3937 "cs-parser.jay" +#line 3950 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_554() -#line 3946 "cs-parser.jay" +#line 3959 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_556() -#line 3955 "cs-parser.jay" +#line 3968 "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_560() -#line 3972 "cs-parser.jay" +#line 3985 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_561() -#line 3977 "cs-parser.jay" +#line 3990 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_563() -#line 3986 "cs-parser.jay" +#line 3999 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 3991 "cs-parser.jay" +#line 4004 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 3996 "cs-parser.jay" +#line 4009 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 4001 "cs-parser.jay" +#line 4014 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_568() -#line 4010 "cs-parser.jay" +#line 4023 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4015 "cs-parser.jay" +#line 4028 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_571() -#line 4024 "cs-parser.jay" +#line 4037 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_573() -#line 4033 "cs-parser.jay" +#line 4046 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_575() -#line 4042 "cs-parser.jay" +#line 4055 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_577() -#line 4051 "cs-parser.jay" +#line 4064 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_579() -#line 4060 "cs-parser.jay" +#line 4073 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_581() -#line 4069 "cs-parser.jay" +#line 4082 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6876,84 +6889,84 @@ void case_581() } void case_583() -#line 4080 "cs-parser.jay" +#line 4093 "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_585() -#line 4092 "cs-parser.jay" +#line 4105 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_586() -#line 4097 "cs-parser.jay" +#line 4110 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4102 "cs-parser.jay" +#line 4115 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4107 "cs-parser.jay" +#line 4120 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4112 "cs-parser.jay" +#line 4125 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4117 "cs-parser.jay" +#line 4130 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4122 "cs-parser.jay" +#line 4135 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4127 "cs-parser.jay" +#line 4140 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4132 "cs-parser.jay" +#line 4145 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4137 "cs-parser.jay" +#line 4150 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4145 "cs-parser.jay" +#line 4158 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6962,7 +6975,7 @@ void case_595() } void case_596() -#line 4152 "cs-parser.jay" +#line 4165 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6977,7 +6990,7 @@ void case_596() } void case_597() -#line 4168 "cs-parser.jay" +#line 4181 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6985,7 +6998,7 @@ void case_597() } void case_598() -#line 4174 "cs-parser.jay" +#line 4187 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6993,21 +7006,21 @@ void case_598() } void case_599() -#line 4180 "cs-parser.jay" +#line 4193 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_601() -#line 4188 "cs-parser.jay" +#line 4201 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_605() -#line 4204 "cs-parser.jay" +#line 4217 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7016,14 +7029,14 @@ void case_605() } void case_607() -#line 4215 "cs-parser.jay" +#line 4228 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_608() -#line 4223 "cs-parser.jay" +#line 4236 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7031,14 +7044,14 @@ void case_608() } void case_609() -#line 4229 "cs-parser.jay" +#line 4242 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_610() -#line 4234 "cs-parser.jay" +#line 4247 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7046,63 +7059,63 @@ void case_610() } void case_611() -#line 4240 "cs-parser.jay" +#line 4253 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_613() -#line 4249 "cs-parser.jay" +#line 4262 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_614() -#line 4254 "cs-parser.jay" +#line 4267 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_616() -#line 4263 "cs-parser.jay" +#line 4276 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_617() -#line 4268 "cs-parser.jay" +#line 4281 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_624() -#line 4291 "cs-parser.jay" +#line 4304 "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_625() -#line 4296 "cs-parser.jay" +#line 4309 "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_626() -#line 4301 "cs-parser.jay" +#line 4314 "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_630() -#line 4330 "cs-parser.jay" +#line 4343 "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]); @@ -7115,7 +7128,7 @@ void case_630() } void case_631() -#line 4342 "cs-parser.jay" +#line 4355 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7130,7 +7143,7 @@ void case_631() } void case_632() -#line 4355 "cs-parser.jay" +#line 4368 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7138,7 +7151,7 @@ void case_632() } void case_633() -#line 4361 "cs-parser.jay" +#line 4374 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7147,7 +7160,7 @@ void case_633() } void case_636() -#line 4378 "cs-parser.jay" +#line 4391 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7155,7 +7168,7 @@ void case_636() } void case_639() -#line 4392 "cs-parser.jay" +#line 4405 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7173,7 +7186,7 @@ void case_639() } void case_640() -#line 4411 "cs-parser.jay" +#line 4424 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7183,91 +7196,91 @@ void case_640() } void case_641() -#line 4419 "cs-parser.jay" +#line 4432 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_642() -#line 4424 "cs-parser.jay" +#line 4437 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4429 "cs-parser.jay" +#line 4442 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4434 "cs-parser.jay" +#line 4447 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4439 "cs-parser.jay" +#line 4452 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4444 "cs-parser.jay" +#line 4457 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4449 "cs-parser.jay" +#line 4462 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4454 "cs-parser.jay" +#line 4467 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4459 "cs-parser.jay" +#line 4472 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4464 "cs-parser.jay" +#line 4477 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4469 "cs-parser.jay" +#line 4482 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4474 "cs-parser.jay" +#line 4487 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4479 "cs-parser.jay" +#line 4492 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7276,28 +7289,28 @@ void case_653() } void case_654() -#line 4486 "cs-parser.jay" +#line 4499 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_656() -#line 4495 "cs-parser.jay" +#line 4508 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_659() -#line 4508 "cs-parser.jay" +#line 4521 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_660() -#line 4516 "cs-parser.jay" +#line 4529 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7305,7 +7318,7 @@ void case_660() } void case_661() -#line 4522 "cs-parser.jay" +#line 4535 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7323,7 +7336,7 @@ void case_661() } void case_662() -#line 4541 "cs-parser.jay" +#line 4554 "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])); @@ -7331,7 +7344,7 @@ void case_662() } void case_663() -#line 4550 "cs-parser.jay" +#line 4563 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7339,7 +7352,7 @@ void case_663() } void case_664() -#line 4556 "cs-parser.jay" +#line 4569 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7364,7 +7377,7 @@ void case_664() } void case_665() -#line 4582 "cs-parser.jay" +#line 4595 "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 ()); @@ -7373,14 +7386,14 @@ void case_665() } void case_666() -#line 4589 "cs-parser.jay" +#line 4602 "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_670() -#line 4609 "cs-parser.jay" +#line 4622 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7389,91 +7402,91 @@ void case_670() } void case_671() -#line 4619 "cs-parser.jay" +#line 4632 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_672() -#line 4624 "cs-parser.jay" +#line 4637 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4645 "cs-parser.jay" +#line 4658 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_675() -#line 4657 "cs-parser.jay" +#line 4670 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4662 "cs-parser.jay" +#line 4675 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_677() -#line 4671 "cs-parser.jay" +#line 4684 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_678() -#line 4676 "cs-parser.jay" +#line 4689 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_686() -#line 4703 "cs-parser.jay" +#line 4716 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_719() -#line 4767 "cs-parser.jay" +#line 4780 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_720() -#line 4772 "cs-parser.jay" +#line 4785 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4777 "cs-parser.jay" +#line 4790 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_722() -#line 4785 "cs-parser.jay" +#line 4798 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_723() -#line 4793 "cs-parser.jay" +#line 4806 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7483,7 +7496,7 @@ void case_723() } void case_726() -#line 4806 "cs-parser.jay" +#line 4819 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7492,7 +7505,7 @@ void case_726() } void case_727() -#line 4822 "cs-parser.jay" +#line 4835 "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*/ @@ -7524,7 +7537,7 @@ void case_727() } void case_728() -#line 4852 "cs-parser.jay" +#line 4865 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7537,7 +7550,7 @@ void case_728() } void case_729() -#line 4863 "cs-parser.jay" +#line 4876 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7546,21 +7559,21 @@ void case_729() } void case_732() -#line 4878 "cs-parser.jay" +#line 4891 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_734() -#line 4887 "cs-parser.jay" +#line 4900 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_736() -#line 4902 "cs-parser.jay" +#line 4915 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7569,7 +7582,7 @@ void case_736() } void case_737() -#line 4909 "cs-parser.jay" +#line 4922 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7577,7 +7590,7 @@ void case_737() } void case_738() -#line 4915 "cs-parser.jay" +#line 4928 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7586,7 +7599,7 @@ void case_738() } void case_739() -#line 4922 "cs-parser.jay" +#line 4935 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7598,14 +7611,14 @@ void case_739() } void case_741() -#line 4936 "cs-parser.jay" +#line 4949 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_742() -#line 4941 "cs-parser.jay" +#line 4954 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7616,7 +7629,7 @@ void case_742() } void case_746() -#line 4959 "cs-parser.jay" +#line 4972 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7625,7 +7638,7 @@ void case_746() } void case_749() -#line 4974 "cs-parser.jay" +#line 4987 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7636,7 +7649,7 @@ void case_749() } void case_750() -#line 4983 "cs-parser.jay" +#line 4996 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7647,14 +7660,14 @@ void case_750() } void case_752() -#line 4999 "cs-parser.jay" +#line 5012 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_757() -#line 5017 "cs-parser.jay" +#line 5030 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7665,28 +7678,28 @@ void case_757() } void case_759() -#line 5030 "cs-parser.jay" +#line 5043 "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_760() -#line 5035 "cs-parser.jay" +#line 5048 "cs-parser.jay" { 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_761() -#line 5043 "cs-parser.jay" +#line 5056 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_765() -#line 5061 "cs-parser.jay" +#line 5074 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7698,7 +7711,7 @@ void case_765() } void case_766() -#line 5074 "cs-parser.jay" +#line 5087 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7708,14 +7721,14 @@ void case_766() } void case_767() -#line 5082 "cs-parser.jay" +#line 5095 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_770() -#line 5096 "cs-parser.jay" +#line 5109 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7725,7 +7738,7 @@ void case_770() } void case_771() -#line 5105 "cs-parser.jay" +#line 5118 "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])); @@ -7737,7 +7750,7 @@ void case_771() } void case_773() -#line 5122 "cs-parser.jay" +#line 5135 "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])); @@ -7745,14 +7758,14 @@ void case_773() } void case_774() -#line 5131 "cs-parser.jay" +#line 5144 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_776() -#line 5140 "cs-parser.jay" +#line 5153 "cs-parser.jay" { var sections = new List (4); @@ -7761,7 +7774,7 @@ void case_776() } void case_777() -#line 5147 "cs-parser.jay" +#line 5160 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7770,14 +7783,14 @@ void case_777() } void case_778() -#line 5154 "cs-parser.jay" +#line 5167 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_781() -#line 5173 "cs-parser.jay" +#line 5186 "cs-parser.jay" { var labels = new List (2); @@ -7786,7 +7799,7 @@ void case_781() } void case_782() -#line 5180 "cs-parser.jay" +#line 5193 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7795,14 +7808,14 @@ void case_782() } void case_783() -#line 5190 "cs-parser.jay" +#line 5203 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_789() -#line 5209 "cs-parser.jay" +#line 5222 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7812,21 +7825,21 @@ void case_789() } void case_790() -#line 5221 "cs-parser.jay" +#line 5234 "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_791() -#line 5229 "cs-parser.jay" +#line 5242 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_793() -#line 5245 "cs-parser.jay" +#line 5258 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7840,14 +7853,14 @@ void case_793() } void case_794() -#line 5257 "cs-parser.jay" +#line 5270 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_797() -#line 5270 "cs-parser.jay" +#line 5283 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7856,14 +7869,14 @@ void case_797() } void case_798() -#line 5277 "cs-parser.jay" +#line 5290 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_806() -#line 5301 "cs-parser.jay" +#line 5314 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7878,14 +7891,14 @@ void case_806() } void case_807() -#line 5317 "cs-parser.jay" +#line 5330 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_808() -#line 5322 "cs-parser.jay" +#line 5335 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7896,7 +7909,7 @@ void case_808() } void case_809() -#line 5331 "cs-parser.jay" +#line 5344 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7909,21 +7922,21 @@ void case_809() } void case_816() -#line 5354 "cs-parser.jay" +#line 5367 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_817() -#line 5362 "cs-parser.jay" +#line 5375 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5370 "cs-parser.jay" +#line 5383 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7931,35 +7944,35 @@ void case_818() } void case_819() -#line 5376 "cs-parser.jay" +#line 5389 "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_820() -#line 5381 "cs-parser.jay" +#line 5394 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_821() -#line 5389 "cs-parser.jay" +#line 5402 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5397 "cs-parser.jay" +#line 5410 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5405 "cs-parser.jay" +#line 5418 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7977,7 +7990,7 @@ void case_823() } void case_824() -#line 5421 "cs-parser.jay" +#line 5434 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -7993,28 +8006,28 @@ void case_824() } void case_828() -#line 5447 "cs-parser.jay" +#line 5460 "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_829() -#line 5452 "cs-parser.jay" +#line 5465 "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_830() -#line 5457 "cs-parser.jay" +#line 5470 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_831() -#line 5465 "cs-parser.jay" +#line 5478 "cs-parser.jay" { var l = new List (2); @@ -8023,7 +8036,7 @@ void case_831() } void case_832() -#line 5472 "cs-parser.jay" +#line 5485 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8041,7 +8054,7 @@ void case_832() } void case_836() -#line 5500 "cs-parser.jay" +#line 5513 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8058,7 +8071,7 @@ void case_836() } void case_838() -#line 5519 "cs-parser.jay" +#line 5532 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8071,14 +8084,14 @@ void case_838() } void case_841() -#line 5547 "cs-parser.jay" +#line 5560 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_843() -#line 5557 "cs-parser.jay" +#line 5570 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8088,7 +8101,7 @@ void case_843() } void case_844() -#line 5568 "cs-parser.jay" +#line 5581 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8100,14 +8113,14 @@ void case_844() } void case_845() -#line 5578 "cs-parser.jay" +#line 5591 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_846() -#line 5583 "cs-parser.jay" +#line 5596 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8119,7 +8132,7 @@ void case_846() } void case_847() -#line 5596 "cs-parser.jay" +#line 5609 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8131,14 +8144,14 @@ void case_847() } void case_848() -#line 5606 "cs-parser.jay" +#line 5619 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_849() -#line 5611 "cs-parser.jay" +#line 5624 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8150,7 +8163,7 @@ void case_849() } void case_850() -#line 5621 "cs-parser.jay" +#line 5634 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8161,7 +8174,7 @@ void case_850() } void case_852() -#line 5637 "cs-parser.jay" +#line 5650 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8169,7 +8182,7 @@ void case_852() } void case_853() -#line 5649 "cs-parser.jay" +#line 5662 "cs-parser.jay" { lexer.query_parsing = false; @@ -8183,7 +8196,7 @@ void case_853() } void case_854() -#line 5661 "cs-parser.jay" +#line 5674 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8195,7 +8208,7 @@ void case_854() } void case_855() -#line 5672 "cs-parser.jay" +#line 5685 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8205,7 +8218,7 @@ void case_855() } void case_856() -#line 5679 "cs-parser.jay" +#line 5692 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8213,7 +8226,7 @@ void case_856() } void case_857() -#line 5688 "cs-parser.jay" +#line 5701 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8223,7 +8236,7 @@ void case_857() } void case_858() -#line 5696 "cs-parser.jay" +#line 5709 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8237,7 +8250,7 @@ void case_858() } void case_859() -#line 5711 "cs-parser.jay" +#line 5724 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8247,7 +8260,7 @@ void case_859() } void case_860() -#line 5719 "cs-parser.jay" +#line 5732 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8261,7 +8274,7 @@ void case_860() } void case_862() -#line 5738 "cs-parser.jay" +#line 5751 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8274,7 +8287,7 @@ void case_862() } void case_864() -#line 5753 "cs-parser.jay" +#line 5766 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8290,7 +8303,7 @@ void case_864() } void case_865() -#line 5770 "cs-parser.jay" +#line 5783 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8307,14 +8320,14 @@ void case_865() } void case_867() -#line 5786 "cs-parser.jay" +#line 5799 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_869() -#line 5798 "cs-parser.jay" +#line 5811 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8323,7 +8336,7 @@ void case_869() } void case_870() -#line 5805 "cs-parser.jay" +#line 5818 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8333,7 +8346,7 @@ void case_870() } void case_871() -#line 5813 "cs-parser.jay" +#line 5826 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8342,7 +8355,7 @@ void case_871() } void case_872() -#line 5820 "cs-parser.jay" +#line 5833 "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])); @@ -8352,14 +8365,14 @@ void case_872() } void case_876() -#line 5837 "cs-parser.jay" +#line 5850 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_883() -#line 5857 "cs-parser.jay" +#line 5870 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8373,7 +8386,7 @@ void case_883() } void case_885() -#line 5876 "cs-parser.jay" +#line 5889 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8382,7 +8395,7 @@ void case_885() } void case_886() -#line 5886 "cs-parser.jay" +#line 5899 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8392,7 +8405,7 @@ void case_886() } void case_887() -#line 5894 "cs-parser.jay" +#line 5907 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8402,7 +8415,7 @@ void case_887() } void case_888() -#line 5902 "cs-parser.jay" +#line 5915 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8412,7 +8425,7 @@ void case_888() } void case_889() -#line 5910 "cs-parser.jay" +#line 5923 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8452,7 +8465,7 @@ void case_889() } void case_890() -#line 5948 "cs-parser.jay" +#line 5961 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8462,7 +8475,7 @@ void case_890() } void case_891() -#line 5956 "cs-parser.jay" +#line 5969 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8472,7 +8485,7 @@ void case_891() } void case_892() -#line 5964 "cs-parser.jay" +#line 5977 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8482,7 +8495,7 @@ void case_892() } void case_893() -#line 5972 "cs-parser.jay" +#line 5985 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8524,7 +8537,7 @@ void case_893() } void case_897() -#line 6027 "cs-parser.jay" +#line 6040 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8533,7 +8546,7 @@ void case_897() } void case_899() -#line 6038 "cs-parser.jay" +#line 6051 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8542,14 +8555,14 @@ void case_899() } void case_900() -#line 6045 "cs-parser.jay" +#line 6058 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_902() -#line 6054 "cs-parser.jay" +#line 6067 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8558,42 +8571,42 @@ void case_902() } void case_903() -#line 6061 "cs-parser.jay" +#line 6074 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_905() -#line 6073 "cs-parser.jay" +#line 6086 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_906() -#line 6078 "cs-parser.jay" +#line 6091 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_908() -#line 6090 "cs-parser.jay" +#line 6103 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6095 "cs-parser.jay" +#line 6108 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_911() -#line 6105 "cs-parser.jay" +#line 6118 "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*/ @@ -8611,7 +8624,7 @@ void case_911() } void case_912() -#line 6121 "cs-parser.jay" +#line 6134 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8622,7 +8635,7 @@ void case_912() } void case_915() -#line 6148 "cs-parser.jay" +#line 6161 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8654,7 +8667,7 @@ void case_915() } void case_916() -#line 6178 "cs-parser.jay" +#line 6191 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8666,7 +8679,7 @@ void case_916() } void case_926() -#line 6221 "cs-parser.jay" +#line 6234 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8674,7 +8687,7 @@ void case_926() } void case_927() -#line 6227 "cs-parser.jay" +#line 6240 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8683,14 +8696,14 @@ void case_927() } void case_930() -#line 6242 "cs-parser.jay" +#line 6255 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_931() -#line 6247 "cs-parser.jay" +#line 6260 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8700,7 +8713,7 @@ void case_931() } void case_932() -#line 6255 "cs-parser.jay" +#line 6268 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8710,7 +8723,7 @@ void case_932() } void case_933() -#line 6263 "cs-parser.jay" +#line 6276 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8719,7 +8732,7 @@ void case_933() } void case_941() -#line 6301 "cs-parser.jay" +#line 6314 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8727,7 +8740,7 @@ void case_941() } void case_942() -#line 6307 "cs-parser.jay" +#line 6320 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8735,7 +8748,7 @@ void case_942() } void case_943() -#line 6316 "cs-parser.jay" +#line 6329 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12068,7 +12081,7 @@ void case_943() -1, -1, -1, -1, -1, -1, -1, -1, 362, }; -#line 6325 "cs-parser.jay" +#line 6338 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index e71e7393b8..e82049a156 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -673,7 +673,8 @@ attribute_sections { var sect = (List) $1; $$ = new Attributes (sect); - lbag.AddLocation (sect, savedOpenLocation, savedCloseLocation); + if (locationListStack.Count > 0) + lbag.AddLocation (sect, locationListStack.Pop ()); if (attributeCommas.Count > 0) { lbag.AppendTo (sect, attributeCommas); attributeCommas.Clear (); @@ -683,6 +684,9 @@ attribute_sections { Attributes attrs = $1 as Attributes; var sect = (List) $2; + + if (locationListStack.Count > 0) + lbag.AddLocation (sect, locationListStack.Pop ()); if (attrs == null) attrs = new Attributes (sect); else @@ -722,12 +726,20 @@ attribute_section_cont current_attr_target = null; lexer.parsing_attribute_section = false; - savedCloseLocation = GetLocation ($6); + if ($5 != null) { + locationListStack.Push (new List(new [] { savedOpenLocation, savedCloseLocation, GetLocation ($2), GetLocation ($5), GetLocation ($6) })); + } else { + locationListStack.Push (new List(new [] { savedOpenLocation, savedCloseLocation, GetLocation ($2), GetLocation ($6) })); + } } | attribute_list opt_comma CLOSE_BRACKET { $$ = $1; - savedCloseLocation = GetLocation ($3); + if ($2 != null) { + locationListStack.Push (new List(new [] { savedOpenLocation, GetLocation ($2), GetLocation ($3) })); + } else { + locationListStack.Push (new List(new [] { savedOpenLocation, GetLocation ($3) })); + } } ; @@ -736,9 +748,10 @@ attribute_target { var lt = (Tokenizer.LocatedToken) $1; $$ = CheckAttributeTarget (lt.Value, lt.Location); + savedCloseLocation = GetLocation ($1); } - | EVENT { $$ = "event"; } - | RETURN { $$ = "return"; } + | EVENT { $$ = "event"; savedCloseLocation = GetLocation ($1); } + | RETURN { $$ = "return"; savedCloseLocation = GetLocation ($1); } | error { if (yyToken == Token.IDENTIFIER) { From 3147a3abb6f426e5f886186b9dcf933d23abbe47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 09:07:32 +0200 Subject: [PATCH 58/92] Fixed enum positions. --- .../Parser/mcs/cs-parser.cs | 7740 ++++++++--------- .../Parser/mcs/cs-parser.jay | 19 +- 2 files changed, 3870 insertions(+), 3889 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index fd133d63a8..14d6ca2cbc 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -514,7 +514,8 @@ namespace Mono.CSharp //t "$$56 :", //t "$$57 :", //t "$$58 :", -//t "enum_declaration : opt_attributes opt_modifiers ENUM type_declaration_name opt_enum_base $$56 OPEN_BRACE $$57 opt_enum_member_declarations $$58 CLOSE_BRACE opt_semicolon", +//t "$$59 :", +//t "enum_declaration : opt_attributes opt_modifiers ENUM $$56 type_declaration_name opt_enum_base $$57 OPEN_BRACE $$58 opt_enum_member_declarations $$59 CLOSE_BRACE opt_semicolon", //t "opt_enum_base :", //t "opt_enum_base : COLON type", //t "opt_enum_base : COLON error", @@ -524,12 +525,12 @@ namespace Mono.CSharp //t "enum_member_declarations : enum_member_declaration", //t "enum_member_declarations : enum_member_declarations COMMA enum_member_declaration", //t "enum_member_declaration : opt_attributes IDENTIFIER", -//t "$$59 :", -//t "enum_member_declaration : opt_attributes IDENTIFIER $$59 ASSIGN constant_expression", //t "$$60 :", +//t "enum_member_declaration : opt_attributes IDENTIFIER $$60 ASSIGN constant_expression", //t "$$61 :", //t "$$62 :", -//t "delegate_declaration : opt_attributes opt_modifiers DELEGATE member_type type_declaration_name OPEN_PARENS $$60 opt_formal_parameter_list CLOSE_PARENS $$61 opt_type_parameter_constraints_clauses $$62 SEMICOLON", +//t "$$63 :", +//t "delegate_declaration : opt_attributes opt_modifiers DELEGATE member_type type_declaration_name OPEN_PARENS $$61 opt_formal_parameter_list CLOSE_PARENS $$62 opt_type_parameter_constraints_clauses $$63 SEMICOLON", //t "opt_nullable :", //t "opt_nullable : INTERR_NULLABLE", //t "namespace_or_type_name : member_name", @@ -542,8 +543,8 @@ namespace Mono.CSharp //t "opt_type_argument_list : OP_GENERICS_LT error", //t "type_arguments : type", //t "type_arguments : type_arguments COMMA type", -//t "$$63 :", -//t "type_declaration_name : IDENTIFIER $$63 opt_type_parameter_list", +//t "$$64 :", +//t "type_declaration_name : IDENTIFIER $$64 opt_type_parameter_list", //t "member_declaration_name : method_declaration_name", //t "method_declaration_name : type_declaration_name", //t "method_declaration_name : explicit_interface IDENTIFIER opt_type_parameter_list", @@ -689,8 +690,8 @@ namespace Mono.CSharp //t "array_creation_expression : NEW rank_specifier array_initializer", //t "array_creation_expression : NEW new_expr_type OPEN_BRACKET CLOSE_BRACKET OPEN_BRACKET_EXPR error CLOSE_BRACKET", //t "array_creation_expression : NEW new_expr_type error", -//t "$$64 :", -//t "new_expr_type : $$64 simple_type", +//t "$$65 :", +//t "new_expr_type : $$65 simple_type", //t "anonymous_type_expression : NEW OPEN_BRACE anonymous_type_parameters_opt_comma CLOSE_BRACE", //t "anonymous_type_parameters_opt_comma : anonymous_type_parameters_opt", //t "anonymous_type_parameters_opt_comma : anonymous_type_parameters COMMA", @@ -716,8 +717,8 @@ namespace Mono.CSharp //t "array_initializer : OPEN_BRACE variable_initializer_list opt_comma CLOSE_BRACE", //t "variable_initializer_list : variable_initializer", //t "variable_initializer_list : variable_initializer_list COMMA variable_initializer", -//t "$$65 :", -//t "typeof_expression : TYPEOF $$65 open_parens_any typeof_type_expression CLOSE_PARENS", +//t "$$66 :", +//t "typeof_expression : TYPEOF $$66 open_parens_any typeof_type_expression CLOSE_PARENS", //t "typeof_type_expression : type_and_void", //t "typeof_type_expression : unbound_type_name", //t "typeof_type_expression : error", @@ -732,14 +733,14 @@ namespace Mono.CSharp //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 opt_type_argument_list", -//t "$$66 :", -//t "anonymous_method_expression : DELEGATE opt_anonymous_method_signature $$66 block", //t "$$67 :", -//t "anonymous_method_expression : ASYNC DELEGATE opt_anonymous_method_signature $$67 block", +//t "anonymous_method_expression : DELEGATE opt_anonymous_method_signature $$67 block", +//t "$$68 :", +//t "anonymous_method_expression : ASYNC DELEGATE opt_anonymous_method_signature $$68 block", //t "opt_anonymous_method_signature :", //t "opt_anonymous_method_signature : anonymous_method_signature", -//t "$$68 :", -//t "anonymous_method_signature : OPEN_PARENS $$68 opt_formal_parameter_list CLOSE_PARENS", +//t "$$69 :", +//t "anonymous_method_signature : OPEN_PARENS $$69 opt_formal_parameter_list CLOSE_PARENS", //t "default_value_expression : DEFAULT open_parens_any type CLOSE_PARENS", //t "unary_expression : primary_expression", //t "unary_expression : BANG prefixed_unary_expression", @@ -810,20 +811,20 @@ namespace Mono.CSharp //t "opt_lambda_parameter_list : lambda_parameter_list", //t "lambda_expression_body : lambda_expression_body_simple", //t "lambda_expression_body : block", -//t "$$69 :", -//t "lambda_expression_body_simple : $$69 expression_or_error", +//t "$$70 :", +//t "lambda_expression_body_simple : $$70 expression_or_error", //t "expression_or_error : expression", //t "expression_or_error : error", -//t "$$70 :", -//t "lambda_expression : IDENTIFIER ARROW $$70 lambda_expression_body", //t "$$71 :", -//t "lambda_expression : ASYNC IDENTIFIER ARROW $$71 lambda_expression_body", +//t "lambda_expression : IDENTIFIER ARROW $$71 lambda_expression_body", //t "$$72 :", +//t "lambda_expression : ASYNC IDENTIFIER ARROW $$72 lambda_expression_body", //t "$$73 :", -//t "lambda_expression : OPEN_PARENS_LAMBDA $$72 opt_lambda_parameter_list CLOSE_PARENS ARROW $$73 lambda_expression_body", //t "$$74 :", +//t "lambda_expression : OPEN_PARENS_LAMBDA $$73 opt_lambda_parameter_list CLOSE_PARENS ARROW $$74 lambda_expression_body", //t "$$75 :", -//t "lambda_expression : ASYNC OPEN_PARENS_LAMBDA $$74 opt_lambda_parameter_list CLOSE_PARENS ARROW $$75 lambda_expression_body", +//t "$$76 :", +//t "lambda_expression : ASYNC OPEN_PARENS_LAMBDA $$75 opt_lambda_parameter_list CLOSE_PARENS ARROW $$76 lambda_expression_body", //t "expression : assignment_expression", //t "expression : non_assignment_expression", //t "non_assignment_expression : conditional_expression", @@ -835,11 +836,11 @@ namespace Mono.CSharp //t "undocumented_expressions : MAKEREF open_parens_any expression CLOSE_PARENS", //t "constant_expression : expression", //t "boolean_expression : expression", -//t "$$76 :", //t "$$77 :", //t "$$78 :", //t "$$79 :", -//t "class_declaration : opt_attributes opt_modifiers opt_partial CLASS $$76 type_declaration_name $$77 opt_class_base opt_type_parameter_constraints_clauses $$78 OPEN_BRACE opt_class_member_declarations CLOSE_BRACE $$79 opt_semicolon", +//t "$$80 :", +//t "class_declaration : opt_attributes opt_modifiers opt_partial CLASS $$77 type_declaration_name $$78 opt_class_base opt_type_parameter_constraints_clauses $$79 OPEN_BRACE opt_class_member_declarations CLOSE_BRACE $$80 opt_semicolon", //t "opt_partial :", //t "opt_partial : PARTIAL", //t "opt_modifiers :", @@ -879,12 +880,12 @@ namespace Mono.CSharp //t "opt_type_parameter_variance : type_parameter_variance", //t "type_parameter_variance : OUT", //t "type_parameter_variance : IN", -//t "$$80 :", -//t "block : OPEN_BRACE $$80 opt_statement_list block_end", +//t "$$81 :", +//t "block : OPEN_BRACE $$81 opt_statement_list block_end", //t "block_end : CLOSE_BRACE", //t "block_end : COMPLETE_COMPLETION", -//t "$$81 :", -//t "block_prepared : OPEN_BRACE $$81 opt_statement_list CLOSE_BRACE", +//t "$$82 :", +//t "block_prepared : OPEN_BRACE $$82 opt_statement_list CLOSE_BRACE", //t "opt_statement_list :", //t "opt_statement_list : statement_list", //t "statement_list : statement", @@ -929,8 +930,8 @@ namespace Mono.CSharp //t "embedded_statement : labeled_statement", //t "embedded_statement : error", //t "empty_statement : SEMICOLON", -//t "$$82 :", -//t "labeled_statement : IDENTIFIER COLON $$82 statement", +//t "$$83 :", +//t "labeled_statement : IDENTIFIER COLON $$83 statement", //t "variable_type : variable_type_simple", //t "variable_type : variable_type_simple rank_specifiers", //t "variable_type_simple : primary_expression_or_type opt_nullable", @@ -942,10 +943,10 @@ namespace Mono.CSharp //t "pointer_stars : pointer_star", //t "pointer_stars : pointer_star pointer_stars", //t "pointer_star : STAR", -//t "$$83 :", -//t "block_variable_declaration : variable_type IDENTIFIER $$83 opt_local_variable_initializer opt_variable_declarators SEMICOLON", //t "$$84 :", -//t "block_variable_declaration : CONST variable_type IDENTIFIER $$84 const_variable_initializer opt_const_declarators SEMICOLON", +//t "block_variable_declaration : variable_type IDENTIFIER $$84 opt_local_variable_initializer opt_variable_declarators SEMICOLON", +//t "$$85 :", +//t "block_variable_declaration : CONST variable_type IDENTIFIER $$85 const_variable_initializer opt_const_declarators SEMICOLON", //t "opt_local_variable_initializer :", //t "opt_local_variable_initializer : ASSIGN block_variable_initializer", //t "opt_local_variable_initializer : error", @@ -978,15 +979,15 @@ namespace Mono.CSharp //t "selection_statement : switch_statement", //t "if_statement : IF open_parens_any boolean_expression CLOSE_PARENS embedded_statement", //t "if_statement : IF open_parens_any boolean_expression CLOSE_PARENS embedded_statement ELSE embedded_statement", -//t "$$85 :", -//t "switch_statement : SWITCH open_parens_any expression CLOSE_PARENS OPEN_BRACE $$85 opt_switch_sections CLOSE_BRACE", +//t "$$86 :", +//t "switch_statement : SWITCH open_parens_any expression CLOSE_PARENS OPEN_BRACE $$86 opt_switch_sections CLOSE_BRACE", //t "opt_switch_sections :", //t "opt_switch_sections : switch_sections", //t "switch_sections : switch_section", //t "switch_sections : switch_sections switch_section", //t "switch_sections : error", -//t "$$86 :", -//t "switch_section : switch_labels $$86 statement_list", +//t "$$87 :", +//t "switch_section : switch_labels $$87 statement_list", //t "switch_labels : switch_label", //t "switch_labels : switch_labels switch_label", //t "switch_label : CASE constant_expression COLON", @@ -997,14 +998,14 @@ namespace Mono.CSharp //t "iteration_statement : foreach_statement", //t "while_statement : WHILE open_parens_any boolean_expression CLOSE_PARENS embedded_statement", //t "do_statement : DO embedded_statement WHILE open_parens_any boolean_expression CLOSE_PARENS SEMICOLON", -//t "$$87 :", -//t "for_statement : FOR open_parens_any $$87 for_statement_cont", +//t "$$88 :", +//t "for_statement : FOR open_parens_any $$88 for_statement_cont", //t "for_statement_cont : opt_for_initializer SEMICOLON opt_for_condition SEMICOLON opt_for_iterator CLOSE_PARENS embedded_statement", //t "for_statement_cont : error", //t "opt_for_initializer :", //t "opt_for_initializer : for_initializer", -//t "$$88 :", -//t "for_initializer : variable_type IDENTIFIER $$88 opt_local_variable_initializer opt_variable_declarators", +//t "$$89 :", +//t "for_initializer : variable_type IDENTIFIER $$89 opt_local_variable_initializer opt_variable_declarators", //t "for_initializer : statement_expression_list", //t "opt_for_condition :", //t "opt_for_condition : boolean_expression", @@ -1014,8 +1015,8 @@ namespace Mono.CSharp //t "statement_expression_list : statement_expression", //t "statement_expression_list : statement_expression_list COMMA statement_expression", //t "foreach_statement : FOREACH open_parens_any type IN expression CLOSE_PARENS", -//t "$$89 :", -//t "foreach_statement : FOREACH open_parens_any type IDENTIFIER IN expression CLOSE_PARENS $$89 embedded_statement", +//t "$$90 :", +//t "foreach_statement : FOREACH open_parens_any type IDENTIFIER IN expression CLOSE_PARENS $$90 embedded_statement", //t "jump_statement : break_statement", //t "jump_statement : continue_statement", //t "jump_statement : goto_statement", @@ -1042,20 +1043,20 @@ namespace Mono.CSharp //t "opt_identifier :", //t "opt_identifier : IDENTIFIER", //t "catch_clause : CATCH block", -//t "$$90 :", -//t "catch_clause : CATCH open_parens_any type opt_identifier CLOSE_PARENS $$90 block_prepared", +//t "$$91 :", +//t "catch_clause : CATCH open_parens_any type opt_identifier CLOSE_PARENS $$91 block_prepared", //t "catch_clause : CATCH open_parens_any error", //t "checked_statement : CHECKED block", //t "unchecked_statement : UNCHECKED block", -//t "$$91 :", -//t "unsafe_statement : UNSAFE $$91 block", -//t "lock_statement : LOCK open_parens_any expression CLOSE_PARENS embedded_statement", //t "$$92 :", +//t "unsafe_statement : UNSAFE $$92 block", +//t "lock_statement : LOCK open_parens_any expression CLOSE_PARENS embedded_statement", //t "$$93 :", -//t "fixed_statement : FIXED open_parens_any variable_type IDENTIFIER $$92 using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS $$93 embedded_statement", //t "$$94 :", +//t "fixed_statement : FIXED open_parens_any variable_type IDENTIFIER $$93 using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS $$94 embedded_statement", //t "$$95 :", -//t "using_statement : USING open_parens_any variable_type IDENTIFIER $$94 using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS $$95 embedded_statement", +//t "$$96 :", +//t "using_statement : USING open_parens_any variable_type IDENTIFIER $$95 using_or_fixed_variable_initializer opt_using_or_fixed_variable_declarators CLOSE_PARENS $$96 embedded_statement", //t "using_statement : USING open_parens_any expression CLOSE_PARENS embedded_statement", //t "using_or_fixed_variable_initializer :", //t "using_or_fixed_variable_initializer : ASSIGN variable_initializer", @@ -1067,18 +1068,18 @@ namespace Mono.CSharp //t "first_from_clause : FROM_FIRST type IDENTIFIER IN expression", //t "nested_from_clause : FROM IDENTIFIER IN expression", //t "nested_from_clause : FROM type IDENTIFIER IN expression", -//t "$$96 :", -//t "from_clause : FROM IDENTIFIER IN $$96 expression", //t "$$97 :", -//t "from_clause : FROM type IDENTIFIER IN $$97 expression", +//t "from_clause : FROM IDENTIFIER IN $$97 expression", +//t "$$98 :", +//t "from_clause : FROM type IDENTIFIER IN $$98 expression", //t "query_body : opt_query_body_clauses select_or_group_clause opt_query_continuation", //t "query_body : opt_query_body_clauses COMPLETE_COMPLETION", //t "query_body : error", -//t "$$98 :", -//t "select_or_group_clause : SELECT $$98 expression", //t "$$99 :", +//t "select_or_group_clause : SELECT $$99 expression", //t "$$100 :", -//t "select_or_group_clause : GROUP $$99 expression $$100 BY expression", +//t "$$101 :", +//t "select_or_group_clause : GROUP $$100 expression $$101 BY expression", //t "opt_query_body_clauses :", //t "opt_query_body_clauses : query_body_clauses", //t "query_body_clauses : query_body_clause", @@ -1088,28 +1089,28 @@ namespace Mono.CSharp //t "query_body_clause : where_clause", //t "query_body_clause : join_clause", //t "query_body_clause : orderby_clause", -//t "$$101 :", -//t "let_clause : LET IDENTIFIER ASSIGN $$101 expression", //t "$$102 :", -//t "where_clause : WHERE $$102 expression", +//t "let_clause : LET IDENTIFIER ASSIGN $$102 expression", //t "$$103 :", +//t "where_clause : WHERE $$103 expression", //t "$$104 :", //t "$$105 :", -//t "join_clause : JOIN IDENTIFIER IN $$103 expression ON $$104 expression EQUALS $$105 expression opt_join_into", //t "$$106 :", +//t "join_clause : JOIN IDENTIFIER IN $$104 expression ON $$105 expression EQUALS $$106 expression opt_join_into", //t "$$107 :", //t "$$108 :", -//t "join_clause : JOIN type IDENTIFIER IN $$106 expression ON $$107 expression EQUALS $$108 expression opt_join_into", +//t "$$109 :", +//t "join_clause : JOIN type IDENTIFIER IN $$107 expression ON $$108 expression EQUALS $$109 expression opt_join_into", //t "opt_join_into :", //t "opt_join_into : INTO IDENTIFIER", -//t "$$109 :", -//t "orderby_clause : ORDERBY $$109 orderings", -//t "orderings : order_by", //t "$$110 :", -//t "orderings : order_by COMMA $$110 orderings_then_by", -//t "orderings_then_by : then_by", +//t "orderby_clause : ORDERBY $$110 orderings", +//t "orderings : order_by", //t "$$111 :", -//t "orderings_then_by : orderings_then_by COMMA $$111 then_by", +//t "orderings : order_by COMMA $$111 orderings_then_by", +//t "orderings_then_by : then_by", +//t "$$112 :", +//t "orderings_then_by : orderings_then_by COMMA $$112 then_by", //t "order_by : expression", //t "order_by : expression ASCENDING", //t "order_by : expression DESCENDING", @@ -1117,12 +1118,12 @@ namespace Mono.CSharp //t "then_by : expression ASCENDING", //t "then_by : expression DESCENDING", //t "opt_query_continuation :", -//t "$$112 :", -//t "opt_query_continuation : INTO IDENTIFIER $$112 query_body", +//t "$$113 :", +//t "opt_query_continuation : INTO IDENTIFIER $$113 query_body", //t "interactive_parsing : EVAL_STATEMENT_PARSER EOF", //t "interactive_parsing : EVAL_USING_DECLARATIONS_UNIT_PARSER using_directives opt_COMPLETE_COMPLETION", -//t "$$113 :", -//t "interactive_parsing : EVAL_STATEMENT_PARSER $$113 interactive_statement_list opt_COMPLETE_COMPLETION", +//t "$$114 :", +//t "interactive_parsing : EVAL_STATEMENT_PARSER $$114 interactive_statement_list opt_COMPLETE_COMPLETION", //t "interactive_parsing : EVAL_COMPILATION_UNIT_PARSER interactive_compilation_unit", //t "interactive_compilation_unit : opt_extern_alias_directives opt_using_directives", //t "interactive_compilation_unit : opt_extern_alias_directives opt_using_directives namespace_or_type_declarations", @@ -1135,16 +1136,16 @@ namespace Mono.CSharp //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 "$$114 :", -//t "doc_cref : doc_type_declaration_name DOT THIS OPEN_BRACKET $$114 opt_doc_parameters CLOSE_BRACKET", +//t "$$115 :", +//t "doc_cref : doc_type_declaration_name DOT THIS OPEN_BRACKET $$115 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 "$$115 :", -//t "opt_doc_method_sig : OPEN_PARENS $$115 opt_doc_parameters CLOSE_PARENS", +//t "$$116 :", +//t "opt_doc_method_sig : OPEN_PARENS $$116 opt_doc_parameters CLOSE_PARENS", //t "opt_doc_parameters :", //t "opt_doc_parameters : doc_parameters", //t "doc_parameters : doc_parameter", @@ -2261,7 +2262,10 @@ case 303: case_303(); break; case 305: - case_305(); +#line 2560 "cs-parser.jay" + { + enumCommas.Add (GetLocation (yyVals[0+yyTop])); + } break; case 306: case_306(); @@ -2272,21 +2276,21 @@ case 307: case 308: case_308(); break; -case 310: - case_310(); +case 309: + case_309(); break; case 311: case_311(); break; -case 314: -#line 2625 "cs-parser.jay" +case 312: + case_312(); + break; +case 315: +#line 2628 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } break; -case 316: - case_316(); - break; case 317: case_317(); break; @@ -2297,37 +2301,37 @@ case 319: case_319(); break; case 320: -#line 2683 "cs-parser.jay" + case_320(); + break; +case 321: +#line 2686 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } break; -case 321: - case_321(); - break; case 322: -#line 2705 "cs-parser.jay" + case_322(); + break; +case 323: +#line 2708 "cs-parser.jay" { lexer.ConstraintsParsing = false; } break; -case 323: - case_323(); - break; -case 325: - case_325(); +case 324: + case_324(); break; -case 327: - case_327(); +case 326: + case_326(); break; -case 329: - case_329(); +case 328: + case_328(); break; case 330: case_330(); break; -case 332: - case_332(); +case 331: + case_331(); break; case 333: case_333(); @@ -2339,19 +2343,19 @@ case 335: case_335(); break; case 336: -#line 2810 "cs-parser.jay" + case_336(); + break; +case 337: +#line 2813 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } break; -case 337: - case_337(); - break; case 338: case_338(); break; -case 340: - case_340(); +case 339: + case_339(); break; case 341: case_341(); @@ -2368,8 +2372,8 @@ case 344: case 345: case_345(); break; -case 347: - case_347(); +case 346: + case_346(); break; case 348: case_348(); @@ -2383,60 +2387,60 @@ case 350: case 351: case_351(); break; -case 353: -#line 2931 "cs-parser.jay" +case 352: + case_352(); + break; +case 354: +#line 2934 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; -case 354: -#line 2938 "cs-parser.jay" +case 355: +#line 2941 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } break; -case 356: - case_356(); +case 357: + case_357(); break; -case 358: - case_358(); +case 359: + case_359(); break; -case 360: - case_360(); +case 361: + case_361(); break; -case 362: -#line 2976 "cs-parser.jay" +case 363: +#line 2979 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 363: - case_363(); - break; case 364: -#line 2996 "cs-parser.jay" + case_364(); + break; +case 365: +#line 2999 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 365: - case_365(); - break; case 366: -#line 3005 "cs-parser.jay" + case_366(); + break; +case 367: +#line 3008 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 367: -#line 3009 "cs-parser.jay" +case 368: +#line 3012 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 368: - case_368(); - break; case 369: case_369(); break; @@ -2447,95 +2451,95 @@ case 371: case_371(); break; case 372: -#line 3048 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } + case_372(); break; case 373: -#line 3049 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } +#line 3051 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3050 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } +#line 3052 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3051 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } +#line 3053 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3052 "cs-parser.jay" - { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } +#line 3054 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3053 "cs-parser.jay" +#line 3055 "cs-parser.jay" + { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } + break; +case 378: +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; -case 379: -#line 3058 "cs-parser.jay" +case 380: +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; -case 380: -#line 3059 "cs-parser.jay" +case 381: +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; -case 381: -#line 3060 "cs-parser.jay" +case 382: +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; -case 382: -#line 3061 "cs-parser.jay" +case 383: +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; -case 383: -#line 3062 "cs-parser.jay" +case 384: +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; -case 384: -#line 3063 "cs-parser.jay" +case 385: +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; -case 385: -#line 3064 "cs-parser.jay" +case 386: +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; -case 386: -#line 3065 "cs-parser.jay" +case 387: +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; -case 387: -#line 3066 "cs-parser.jay" +case 388: +#line 3069 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; -case 408: - case_408(); - break; case 409: case_409(); break; -case 413: -#line 3113 "cs-parser.jay" - { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } +case 410: + case_410(); break; case 414: -#line 3117 "cs-parser.jay" - { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } +#line 3116 "cs-parser.jay" + { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3118 "cs-parser.jay" - { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } +#line 3120 "cs-parser.jay" + { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; -case 420: - case_420(); +case 416: +#line 3121 "cs-parser.jay" + { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 421: -#line 3151 "cs-parser.jay" + case_421(); + break; +case 422: +#line 3154 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } break; -case 422: - case_422(); - break; case 423: case_423(); break; @@ -2546,49 +2550,49 @@ case 425: case_425(); break; case 426: -#line 3186 "cs-parser.jay" + case_426(); + break; +case 427: +#line 3189 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } break; -case 427: - case_427(); - break; case 428: -#line 3194 "cs-parser.jay" + case_428(); + break; +case 429: +#line 3197 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } break; -case 429: - case_429(); - break; case 430: case_430(); break; case 431: -#line 3210 "cs-parser.jay" - { yyVal = null; } + case_431(); break; -case 433: - case_433(); +case 432: +#line 3213 "cs-parser.jay" + { yyVal = null; } break; case 434: case_434(); break; case 435: -#line 3233 "cs-parser.jay" - { yyVal = null; } + case_435(); break; case 436: -#line 3237 "cs-parser.jay" +#line 3236 "cs-parser.jay" + { yyVal = null; } + break; +case 437: +#line 3240 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 437: - case_437(); - break; case 438: case_438(); break; @@ -2599,26 +2603,26 @@ case 440: case_440(); break; case 441: -#line 3270 "cs-parser.jay" + case_441(); + break; +case 442: +#line 3273 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } break; -case 442: - case_442(); - break; case 443: case_443(); break; case 444: case_444(); break; -case 447: -#line 3298 "cs-parser.jay" - { yyVal = null; } +case 445: + case_445(); break; -case 449: - case_449(); +case 448: +#line 3301 "cs-parser.jay" + { yyVal = null; } break; case 450: case_450(); @@ -2633,14 +2637,14 @@ case 453: case_453(); break; case 454: -#line 3350 "cs-parser.jay" + case_454(); + break; +case 455: +#line 3353 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; -case 458: - case_458(); - break; case 459: case_459(); break; @@ -2650,8 +2654,8 @@ case 460: case 461: case_461(); break; -case 463: - case_463(); +case 462: + case_462(); break; case 464: case_464(); @@ -2669,38 +2673,38 @@ case 468: case_468(); break; case 469: -#line 3437 "cs-parser.jay" + case_469(); + break; +case 470: +#line 3440 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; -case 471: -#line 3445 "cs-parser.jay" +case 472: +#line 3448 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } break; -case 472: - case_472(); - break; case 473: case_473(); break; case 474: -#line 3465 "cs-parser.jay" + case_474(); + break; +case 475: +#line 3468 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; -case 475: -#line 3472 "cs-parser.jay" +case 476: +#line 3475 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; -case 476: - case_476(); - break; case 477: case_477(); break; @@ -2720,23 +2724,23 @@ case 482: case_482(); break; case 483: -#line 3538 "cs-parser.jay" + case_483(); + break; +case 484: +#line 3541 "cs-parser.jay" { ++lexer.parsing_type; } break; -case 484: - case_484(); - break; case 485: case_485(); break; -case 488: -#line 3565 "cs-parser.jay" - { yyVal = null; } +case 486: + case_486(); break; -case 490: - case_490(); +case 489: +#line 3568 "cs-parser.jay" + { yyVal = null; } break; case 491: case_491(); @@ -2753,8 +2757,8 @@ case 494: case 495: case_495(); break; -case 499: - case_499(); +case 496: + case_496(); break; case 500: case_500(); @@ -2763,32 +2767,32 @@ case 501: case_501(); break; case 502: -#line 3643 "cs-parser.jay" + case_502(); + break; +case 503: +#line 3646 "cs-parser.jay" { yyVal = 2; } break; -case 503: -#line 3647 "cs-parser.jay" +case 504: +#line 3650 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; -case 504: -#line 3654 "cs-parser.jay" +case 505: +#line 3657 "cs-parser.jay" { yyVal = null; } break; -case 505: -#line 3658 "cs-parser.jay" +case 506: +#line 3661 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 506: - case_506(); - break; case 507: case_507(); break; @@ -2799,16 +2803,16 @@ case 509: case_509(); break; case 510: -#line 3702 "cs-parser.jay" + case_510(); + break; +case 511: +#line 3705 "cs-parser.jay" { lexer.TypeOfParsing = true; } break; -case 511: - case_511(); - break; -case 514: - case_514(); +case 512: + case_512(); break; case 515: case_515(); @@ -2844,139 +2848,139 @@ case 525: case_525(); break; case 526: -#line 3822 "cs-parser.jay" + case_526(); + break; +case 527: +#line 3825 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } break; -case 527: - case_527(); - break; case 528: -#line 3835 "cs-parser.jay" + case_528(); + break; +case 529: +#line 3838 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; -case 529: -#line 3839 "cs-parser.jay" +case 530: +#line 3842 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; -case 530: -#line 3846 "cs-parser.jay" +case 531: +#line 3849 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; -case 532: -#line 3854 "cs-parser.jay" +case 533: +#line 3857 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 533: - case_533(); - break; case 534: case_534(); break; -case 536: -#line 3880 "cs-parser.jay" +case 535: + case_535(); + break; +case 537: +#line 3883 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 537: -#line 3884 "cs-parser.jay" +case 538: +#line 3887 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 540: - case_540(); - break; case 541: case_541(); break; -case 543: -#line 3914 "cs-parser.jay" +case 542: + case_542(); + break; +case 544: +#line 3917 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 544: -#line 3918 "cs-parser.jay" +case 545: +#line 3921 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 545: -#line 3922 "cs-parser.jay" +case 546: +#line 3925 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 546: -#line 3926 "cs-parser.jay" +case 547: +#line 3929 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 547: -#line 3930 "cs-parser.jay" +case 548: +#line 3933 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 548: -#line 3934 "cs-parser.jay" +case 549: +#line 3937 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 550: - case_550(); - break; case 551: case_551(); break; case 552: case_552(); break; -case 554: - case_554(); +case 553: + case_553(); break; case 555: -#line 3966 "cs-parser.jay" + case_555(); + break; +case 556: +#line 3969 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 556: - case_556(); - break; case 557: -#line 3975 "cs-parser.jay" + case_557(); + break; +case 558: +#line 3978 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 558: -#line 3979 "cs-parser.jay" +case 559: +#line 3982 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 560: - case_560(); - break; case 561: case_561(); break; -case 563: - case_563(); +case 562: + case_562(); break; case 564: case_564(); @@ -2987,42 +2991,42 @@ case 565: case 566: case_566(); break; -case 568: - case_568(); +case 567: + case_567(); break; case 569: case_569(); break; -case 571: - case_571(); +case 570: + case_570(); break; -case 573: - case_573(); +case 572: + case_572(); break; -case 575: - case_575(); +case 574: + case_574(); break; -case 577: - case_577(); +case 576: + case_576(); break; -case 579: - case_579(); +case 578: + case_578(); break; -case 581: - case_581(); +case 580: + case_580(); break; -case 583: - case_583(); +case 582: + case_582(); break; case 584: -#line 4103 "cs-parser.jay" + case_584(); + break; +case 585: +#line 4106 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 585: - case_585(); - break; case 586: case_586(); break; @@ -3066,23 +3070,23 @@ case 599: case_599(); break; case 600: -#line 4200 "cs-parser.jay" - { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } + case_600(); break; case 601: - case_601(); +#line 4203 "cs-parser.jay" + { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } + break; +case 602: + case_602(); break; -case 604: -#line 4215 "cs-parser.jay" +case 605: +#line 4218 "cs-parser.jay" { start_block (lexer.Location); } break; -case 605: - case_605(); - break; -case 607: - case_607(); +case 606: + case_606(); break; case 608: case_608(); @@ -3097,59 +3101,59 @@ case 611: case_611(); break; case 612: -#line 4260 "cs-parser.jay" + case_612(); + break; +case 613: +#line 4263 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 613: - case_613(); - break; case 614: case_614(); break; case 615: -#line 4274 "cs-parser.jay" - { - valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; - } + case_615(); break; case 616: - case_616(); +#line 4277 "cs-parser.jay" + { + valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; + } break; case 617: case_617(); break; -case 623: -#line 4299 "cs-parser.jay" +case 618: + case_618(); + break; +case 624: +#line 4302 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } break; -case 624: - case_624(); - break; case 625: case_625(); break; case 626: case_626(); break; -case 628: -#line 4328 "cs-parser.jay" +case 627: + case_627(); + break; +case 629: +#line 4331 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; -case 629: -#line 4341 "cs-parser.jay" +case 630: +#line 4344 "cs-parser.jay" { lexer.ConstraintsParsing = true; } break; -case 630: - case_630(); - break; case 631: case_631(); break; @@ -3160,25 +3164,25 @@ case 633: case_633(); break; case 634: -#line 4384 "cs-parser.jay" - { yyVal = null; } + case_634(); break; case 635: -#line 4386 "cs-parser.jay" - { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } +#line 4387 "cs-parser.jay" + { yyVal = null; } break; case 636: - case_636(); +#line 4389 "cs-parser.jay" + { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 637: -#line 4399 "cs-parser.jay" + case_637(); + break; +case 638: +#line 4402 "cs-parser.jay" { lexer.parsing_modifiers = false; } break; -case 639: - case_639(); - break; case 640: case_640(); break; @@ -3224,18 +3228,18 @@ case 653: case 654: case_654(); break; -case 656: - case_656(); +case 655: + case_655(); + break; +case 657: + case_657(); break; -case 658: -#line 4519 "cs-parser.jay" +case 659: +#line 4522 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 659: - case_659(); - break; case 660: case_660(); break; @@ -3258,26 +3262,26 @@ case 666: case_666(); break; case 667: -#line 4609 "cs-parser.jay" + case_667(); + break; +case 668: +#line 4612 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; -case 668: -#line 4613 "cs-parser.jay" +case 669: +#line 4616 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; -case 669: -#line 4620 "cs-parser.jay" +case 670: +#line 4623 "cs-parser.jay" { yyVal = Variance.None; } break; -case 670: - case_670(); - break; case 671: case_671(); break; @@ -3288,14 +3292,14 @@ case 673: case_673(); break; case 674: -#line 4665 "cs-parser.jay" + case_674(); + break; +case 675: +#line 4668 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 675: - case_675(); - break; case 676: case_676(); break; @@ -3305,36 +3309,36 @@ case 677: case 678: case_678(); break; -case 683: -#line 4709 "cs-parser.jay" +case 679: + case_679(); + break; +case 684: +#line 4712 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 684: -#line 4713 "cs-parser.jay" +case 685: +#line 4716 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 686: - case_686(); +case 687: + case_687(); break; -case 689: -#line 4737 "cs-parser.jay" +case 690: +#line 4740 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 690: -#line 4741 "cs-parser.jay" +case 691: +#line 4744 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; -case 719: - case_719(); - break; case 720: case_720(); break; @@ -3347,8 +3351,8 @@ case 722: case 723: case_723(); break; -case 726: - case_726(); +case 724: + case_724(); break; case 727: case_727(); @@ -3360,32 +3364,32 @@ case 729: case_729(); break; case 730: -#line 4885 "cs-parser.jay" + case_730(); + break; +case 731: +#line 4888 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 731: -#line 4889 "cs-parser.jay" +case 732: +#line 4892 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; -case 732: - case_732(); - break; -case 734: - case_734(); +case 733: + case_733(); break; case 735: -#line 4910 "cs-parser.jay" + case_735(); + break; +case 736: +#line 4913 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } break; -case 736: - case_736(); - break; case 737: case_737(); break; @@ -3395,35 +3399,35 @@ case 738: case 739: case_739(); break; -case 741: - case_741(); +case 740: + case_740(); break; case 742: case_742(); break; -case 746: - case_746(); +case 743: + case_743(); break; -case 749: - case_749(); +case 747: + case_747(); break; case 750: case_750(); break; case 751: -#line 5010 "cs-parser.jay" + case_751(); + break; +case 752: +#line 5013 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } break; -case 752: - case_752(); - break; -case 757: - case_757(); +case 753: + case_753(); break; -case 759: - case_759(); +case 758: + case_758(); break; case 760: case_760(); @@ -3432,19 +3436,19 @@ case 761: case_761(); break; case 762: -#line 5060 "cs-parser.jay" - { yyVal = yyVals[-1+yyTop]; } + case_762(); break; case 763: -#line 5064 "cs-parser.jay" +#line 5063 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5065 "cs-parser.jay" +#line 5067 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: - case_765(); +#line 5068 "cs-parser.jay" + { yyVal = yyVals[-1+yyTop]; } break; case 766: case_766(); @@ -3452,26 +3456,26 @@ case 766: case 767: case_767(); break; -case 770: - case_770(); +case 768: + case_768(); break; case 771: case_771(); break; case 772: -#line 5133 "cs-parser.jay" + case_772(); + break; +case 773: +#line 5136 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } break; -case 773: - case_773(); - break; case 774: case_774(); break; -case 776: - case_776(); +case 775: + case_775(); break; case 777: case_777(); @@ -3480,20 +3484,20 @@ case 778: case_778(); break; case 779: -#line 5177 "cs-parser.jay" + case_779(); + break; +case 780: +#line 5180 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; -case 780: -#line 5181 "cs-parser.jay" +case 781: +#line 5184 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } break; -case 781: - case_781(); - break; case 782: case_782(); break; @@ -3501,14 +3505,14 @@ case 783: case_783(); break; case 784: -#line 5210 "cs-parser.jay" + case_784(); + break; +case 785: +#line 5213 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } break; -case 789: - case_789(); - break; case 790: case_790(); break; @@ -3516,38 +3520,38 @@ case 791: case_791(); break; case 792: -#line 5249 "cs-parser.jay" + case_792(); + break; +case 793: +#line 5252 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 793: - case_793(); - break; case 794: case_794(); break; case 795: -#line 5277 "cs-parser.jay" - { yyVal = new EmptyStatement (lexer.Location); } + case_795(); break; -case 797: - case_797(); +case 796: +#line 5280 "cs-parser.jay" + { yyVal = new EmptyStatement (lexer.Location); } break; case 798: case_798(); break; -case 800: -#line 5298 "cs-parser.jay" +case 799: + case_799(); + break; +case 801: +#line 5301 "cs-parser.jay" { yyVal = null; } break; -case 802: -#line 5303 "cs-parser.jay" +case 803: +#line 5306 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; -case 806: - case_806(); - break; case 807: case_807(); break; @@ -3557,8 +3561,8 @@ case 808: case 809: case_809(); break; -case 816: - case_816(); +case 810: + case_810(); break; case 817: case_817(); @@ -3584,15 +3588,15 @@ case 823: case 824: case_824(); break; -case 827: -#line 5458 "cs-parser.jay" +case 825: + case_825(); + break; +case 828: +#line 5461 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } break; -case 828: - case_828(); - break; case 829: case_829(); break; @@ -3605,48 +3609,48 @@ case 831: case 832: case_832(); break; -case 835: -#line 5511 "cs-parser.jay" +case 833: + case_833(); + break; +case 836: +#line 5514 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 836: - case_836(); - break; case 837: -#line 5530 "cs-parser.jay" + case_837(); + break; +case 838: +#line 5533 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; -case 838: - case_838(); - break; case 839: -#line 5548 "cs-parser.jay" + case_839(); + break; +case 840: +#line 5551 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 840: -#line 5555 "cs-parser.jay" +case 841: +#line 5558 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; -case 841: - case_841(); - break; case 842: -#line 5565 "cs-parser.jay" + case_842(); + break; +case 843: +#line 5568 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } break; -case 843: - case_843(); - break; case 844: case_844(); break; @@ -3669,14 +3673,14 @@ case 850: case_850(); break; case 851: -#line 5648 "cs-parser.jay" + case_851(); + break; +case 852: +#line 5651 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } break; -case 852: - case_852(); - break; case 853: case_853(); break; @@ -3702,38 +3706,38 @@ case 860: case_860(); break; case 861: -#line 5749 "cs-parser.jay" + case_861(); + break; +case 862: +#line 5752 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 862: - case_862(); - break; case 863: -#line 5764 "cs-parser.jay" + case_863(); + break; +case 864: +#line 5767 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 864: - case_864(); - break; case 865: case_865(); break; -case 867: - case_867(); +case 866: + case_866(); break; case 868: -#line 5809 "cs-parser.jay" + case_868(); + break; +case 869: +#line 5812 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 869: - case_869(); - break; case 870: case_870(); break; @@ -3743,27 +3747,27 @@ case 871: case 872: case_872(); break; -case 876: - case_876(); +case 873: + case_873(); break; -case 882: -#line 5868 "cs-parser.jay" +case 877: + case_877(); + break; +case 883: +#line 5871 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 883: - case_883(); - break; case 884: -#line 5887 "cs-parser.jay" + case_884(); + break; +case 885: +#line 5890 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 885: - case_885(); - break; case 886: case_886(); break; @@ -3788,102 +3792,102 @@ case 892: case 893: case_893(); break; -case 895: -#line 6031 "cs-parser.jay" +case 894: + case_894(); + break; +case 896: +#line 6034 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 896: -#line 6038 "cs-parser.jay" +case 897: +#line 6041 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } break; -case 897: - case_897(); - break; -case 899: - case_899(); +case 898: + case_898(); break; case 900: case_900(); break; -case 902: - case_902(); +case 901: + case_901(); break; case 903: case_903(); break; case 904: -#line 6084 "cs-parser.jay" + case_904(); + break; +case 905: +#line 6087 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } break; -case 905: - case_905(); - break; case 906: case_906(); break; case 907: -#line 6101 "cs-parser.jay" + case_907(); + break; +case 908: +#line 6104 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } break; -case 908: - case_908(); - break; case 909: case_909(); break; -case 911: - case_911(); +case 910: + case_910(); break; case 912: case_912(); break; -case 915: - case_915(); +case 913: + case_913(); break; case 916: case_916(); break; -case 924: -#line 6225 "cs-parser.jay" +case 917: + case_917(); + break; +case 925: +#line 6228 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; -case 925: -#line 6232 "cs-parser.jay" +case 926: +#line 6235 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } break; -case 926: - case_926(); - break; case 927: case_927(); break; case 928: -#line 6249 "cs-parser.jay" + case_928(); + break; +case 929: +#line 6252 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; -case 929: -#line 6253 "cs-parser.jay" +case 930: +#line 6256 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 930: - case_930(); - break; case 931: case_931(); break; @@ -3893,39 +3897,42 @@ case 932: case 933: case_933(); break; -case 935: -#line 6289 "cs-parser.jay" +case 934: + case_934(); + break; +case 936: +#line 6292 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; -case 937: -#line 6297 "cs-parser.jay" +case 938: +#line 6300 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; -case 938: -#line 6301 "cs-parser.jay" +case 939: +#line 6304 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; -case 939: -#line 6308 "cs-parser.jay" +case 940: +#line 6311 "cs-parser.jay" { yyVal = new List (0); } break; -case 941: - case_941(); - break; case 942: case_942(); break; case 943: case_943(); break; +case 944: + case_944(); + break; #line default } yyTop -= yyLen[yyN]; @@ -5690,16 +5697,15 @@ void case_303() yyVal = null; } -void case_305() -#line 2559 "cs-parser.jay" +void case_306() +#line 2563 "cs-parser.jay" { - enumCommas.Add (GetLocation (yyVals[-2+yyTop])); if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } -void case_306() -#line 2565 "cs-parser.jay" +void case_307() +#line 2568 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5710,19 +5716,19 @@ void case_306() 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); + push_current_class (new Enum (current_namespace, current_class, (TypeExpression) yyVals[-2+yyTop], (Modifiers) yyVals[-6+yyTop], MakeName (name), (Attributes) yyVals[-7+yyTop]), null); } -void case_307() -#line 2578 "cs-parser.jay" +void case_308() +#line 2581 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_308() -#line 2584 "cs-parser.jay" +void case_309() +#line 2587 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5737,8 +5743,8 @@ void case_308() yyVal = pop_current_class (); } -void case_310() -#line 2602 "cs-parser.jay" +void case_311() +#line 2605 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5750,22 +5756,22 @@ void case_310() } } -void case_311() -#line 2613 "cs-parser.jay" +void case_312() +#line 2616 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } -void case_316() -#line 2631 "cs-parser.jay" +void case_317() +#line 2634 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } -void case_317() -#line 2639 "cs-parser.jay" +void case_318() +#line 2642 "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]); @@ -5779,8 +5785,8 @@ void case_317() yyVal = em; } -void case_318() -#line 2652 "cs-parser.jay" +void case_319() +#line 2655 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5789,8 +5795,8 @@ void case_318() } } -void case_319() -#line 2660 "cs-parser.jay" +void case_320() +#line 2663 "cs-parser.jay" { --lexer.parsing_block; @@ -5805,8 +5811,8 @@ void case_319() yyVal = em; } -void case_321() -#line 2685 "cs-parser.jay" +void case_322() +#line 2688 "cs-parser.jay" { valid_param_mod = 0; @@ -5825,8 +5831,8 @@ void case_321() lexer.ConstraintsParsing = true; } -void case_323() -#line 2707 "cs-parser.jay" +void case_324() +#line 2710 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5841,8 +5847,8 @@ void case_323() current_delegate = null; } -void case_325() -#line 2725 "cs-parser.jay" +void case_326() +#line 2728 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5850,8 +5856,8 @@ void case_325() yyVal = ComposedTypeSpecifier.CreateNullable (GetLocation (yyVals[0+yyTop])); } -void case_327() -#line 2736 "cs-parser.jay" +void case_328() +#line 2739 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5859,8 +5865,8 @@ void case_327() yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location); } -void case_329() -#line 2747 "cs-parser.jay" +void case_330() +#line 2750 "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) { @@ -5868,15 +5874,15 @@ void case_329() }; } -void case_330() -#line 2757 "cs-parser.jay" +void case_331() +#line 2760 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_332() -#line 2769 "cs-parser.jay" +void case_333() +#line 2772 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5888,15 +5894,15 @@ void case_332() yyVal = yyVals[-1+yyTop];; } -void case_333() -#line 2780 "cs-parser.jay" +void case_334() +#line 2783 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } -void case_334() -#line 2788 "cs-parser.jay" +void case_335() +#line 2791 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5904,8 +5910,8 @@ void case_334() locationListStack.Push (new List ()); } -void case_335() -#line 2795 "cs-parser.jay" +void case_336() +#line 2798 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5913,16 +5919,16 @@ void case_335() locationListStack.Peek ().Add (GetLocation (yyVals[-1+yyTop])); } -void case_337() -#line 2812 "cs-parser.jay" +void case_338() +#line 2815 "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_338() -#line 2821 "cs-parser.jay" +void case_339() +#line 2824 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5930,38 +5936,38 @@ void case_338() mn.GetSignatureForError ())); } -void case_340() -#line 2832 "cs-parser.jay" +void case_341() +#line 2835 "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_341() -#line 2841 "cs-parser.jay" +void case_342() +#line 2844 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } -void case_342() -#line 2846 "cs-parser.jay" +void case_343() +#line 2849 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } -void case_343() -#line 2854 "cs-parser.jay" +void case_344() +#line 2857 "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_344() -#line 2860 "cs-parser.jay" +void case_345() +#line 2863 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5970,16 +5976,16 @@ void case_344() lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_345() -#line 2868 "cs-parser.jay" +void case_346() +#line 2871 "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_347() -#line 2878 "cs-parser.jay" +void case_348() +#line 2881 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5988,16 +5994,16 @@ void case_347() lbag.AppendTo (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_348() -#line 2889 "cs-parser.jay" +void case_349() +#line 2892 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); yyVal = type_args; } -void case_349() -#line 2895 "cs-parser.jay" +void case_350() +#line 2898 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6005,8 +6011,8 @@ void case_349() lbag.AppendTo (type_args, GetLocation (yyVals[-1+yyTop])); } -void case_350() -#line 2905 "cs-parser.jay" +void case_351() +#line 2908 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6015,8 +6021,8 @@ void case_350() lbag.AddLocation (yyVal, savedLocation); } -void case_351() -#line 2913 "cs-parser.jay" +void case_352() +#line 2916 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6026,29 +6032,29 @@ void case_351() yyVal = new TypeParameterName ("", null, lexer.Location); } -void case_356() -#line 2947 "cs-parser.jay" +void case_357() +#line 2950 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_358() -#line 2956 "cs-parser.jay" +void case_359() +#line 2959 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_360() -#line 2965 "cs-parser.jay" +void case_361() +#line 2968 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_363() -#line 2981 "cs-parser.jay" +void case_364() +#line 2984 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6062,23 +6068,23 @@ void case_363() } } -void case_365() -#line 2998 "cs-parser.jay" +void case_366() +#line 3001 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_368() -#line 3014 "cs-parser.jay" +void case_369() +#line 3017 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = types; } -void case_369() -#line 3020 "cs-parser.jay" +void case_370() +#line 3023 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6086,8 +6092,8 @@ void case_369() yyVal = types; } -void case_370() -#line 3030 "cs-parser.jay" +void case_371() +#line 3033 "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 ()); @@ -6095,36 +6101,36 @@ void case_370() yyVal = yyVals[0+yyTop]; } -void case_371() -#line 3037 "cs-parser.jay" +void case_372() +#line 3040 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } -void case_408() -#line 3099 "cs-parser.jay" +void case_409() +#line 3102 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } -void case_409() -#line 3103 "cs-parser.jay" +void case_410() +#line 3106 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } -void case_420() -#line 3144 "cs-parser.jay" +void case_421() +#line 3147 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_422() -#line 3156 "cs-parser.jay" +void case_423() +#line 3159 "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) { @@ -6132,8 +6138,8 @@ void case_422() }; } -void case_423() -#line 3163 "cs-parser.jay" +void case_424() +#line 3166 "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) { @@ -6141,8 +6147,8 @@ void case_423() }; } -void case_424() -#line 3170 "cs-parser.jay" +void case_425() +#line 3173 "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) { @@ -6150,8 +6156,8 @@ void case_424() }; } -void case_425() -#line 3177 "cs-parser.jay" +void case_426() +#line 3180 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6160,29 +6166,29 @@ void case_425() lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_427() -#line 3187 "cs-parser.jay" +void case_428() +#line 3190 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } -void case_429() -#line 3195 "cs-parser.jay" +void case_430() +#line 3198 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } -void case_430() -#line 3203 "cs-parser.jay" +void case_431() +#line 3206 "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_433() -#line 3216 "cs-parser.jay" +void case_434() +#line 3219 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6193,23 +6199,23 @@ void case_433() } } -void case_434() -#line 3226 "cs-parser.jay" +void case_435() +#line 3229 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_437() -#line 3242 "cs-parser.jay" +void case_438() +#line 3245 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); yyVal = a; } -void case_438() -#line 3248 "cs-parser.jay" +void case_439() +#line 3251 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6217,23 +6223,23 @@ void case_438() yyVal = a; } -void case_439() -#line 3254 "cs-parser.jay" +void case_440() +#line 3257 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } -void case_440() -#line 3262 "cs-parser.jay" +void case_441() +#line 3265 "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_442() -#line 3271 "cs-parser.jay" +void case_443() +#line 3274 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6242,8 +6248,8 @@ void case_442() yyVal = new CompletionElementInitializer (csn.Prefix, csn.Location); } -void case_443() -#line 3279 "cs-parser.jay" +void case_444() +#line 3282 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6251,23 +6257,23 @@ void case_443() yyVal = new CollectionElementInitializer ((List)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_444() -#line 3286 "cs-parser.jay" +void case_445() +#line 3289 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } -void case_449() -#line 3304 "cs-parser.jay" +void case_450() +#line 3307 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); yyVal = list; } -void case_450() -#line 3310 "cs-parser.jay" +void case_451() +#line 3313 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6278,8 +6284,8 @@ void case_450() yyVal = list; } -void case_451() -#line 3320 "cs-parser.jay" +void case_452() +#line 3323 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6295,65 +6301,65 @@ void case_451() yyVal = list; } -void case_452() -#line 3335 "cs-parser.jay" +void case_453() +#line 3338 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } -void case_453() -#line 3340 "cs-parser.jay" +void case_454() +#line 3343 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } -void case_458() -#line 3361 "cs-parser.jay" +void case_459() +#line 3364 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_459() -#line 3366 "cs-parser.jay" +void case_460() +#line 3369 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_460() -#line 3371 "cs-parser.jay" +void case_461() +#line 3374 "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_461() -#line 3376 "cs-parser.jay" +void case_462() +#line 3379 "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_463() -#line 3388 "cs-parser.jay" +void case_464() +#line 3391 "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_464() -#line 3396 "cs-parser.jay" +void case_465() +#line 3399 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); yyVal = list; } -void case_465() -#line 3402 "cs-parser.jay" +void case_466() +#line 3405 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6361,23 +6367,23 @@ void case_465() yyVal = list; } -void case_466() -#line 3408 "cs-parser.jay" +void case_467() +#line 3411 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } -void case_467() -#line 3416 "cs-parser.jay" +void case_468() +#line 3419 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); yyVal = args; } -void case_468() -#line 3422 "cs-parser.jay" +void case_469() +#line 3425 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6388,22 +6394,22 @@ void case_468() yyVal = args; } -void case_472() -#line 3450 "cs-parser.jay" +void case_473() +#line 3453 "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_473() -#line 3455 "cs-parser.jay" +void case_474() +#line 3458 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } -void case_476() -#line 3477 "cs-parser.jay" +void case_477() +#line 3480 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6417,8 +6423,8 @@ void case_476() lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_477() -#line 3490 "cs-parser.jay" +void case_478() +#line 3493 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6426,8 +6432,8 @@ void case_477() yyVal = new NewInitialize ((FullNamedExpression) yyVals[-1+yyTop], null, (CollectionOrObjectInitializers) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_478() -#line 3502 "cs-parser.jay" +void case_479() +#line 3505 "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])) { @@ -6436,8 +6442,8 @@ void case_478() lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_479() -#line 3510 "cs-parser.jay" +void case_480() +#line 3513 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6445,8 +6451,8 @@ void case_479() yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-2+yyTop], (ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop])); } -void case_480() -#line 3517 "cs-parser.jay" +void case_481() +#line 3520 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6454,29 +6460,29 @@ void case_480() yyVal = new ImplicitlyTypedArrayCreation ((ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } -void case_481() -#line 3524 "cs-parser.jay" +void case_482() +#line 3527 "cs-parser.jay" { 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_482() -#line 3529 "cs-parser.jay" +void case_483() +#line 3532 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } -void case_484() -#line 3540 "cs-parser.jay" +void case_485() +#line 3543 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } -void case_485() -#line 3548 "cs-parser.jay" +void case_486() +#line 3551 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6487,16 +6493,16 @@ void case_485() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_490() -#line 3571 "cs-parser.jay" +void case_491() +#line 3574 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); yyVal = a; } -void case_491() -#line 3577 "cs-parser.jay" +void case_492() +#line 3580 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6505,60 +6511,60 @@ void case_491() yyVal = a; } -void case_492() -#line 3588 "cs-parser.jay" +void case_493() +#line 3591 "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_493() -#line 3594 "cs-parser.jay" +void case_494() +#line 3597 "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_494() -#line 3600 "cs-parser.jay" +void case_495() +#line 3603 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } -void case_495() -#line 3605 "cs-parser.jay" +void case_496() +#line 3608 "cs-parser.jay" { 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_499() -#line 3620 "cs-parser.jay" +void case_500() +#line 3623 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_500() -#line 3628 "cs-parser.jay" +void case_501() +#line 3631 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_501() -#line 3633 "cs-parser.jay" +void case_502() +#line 3636 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_506() -#line 3663 "cs-parser.jay" +void case_507() +#line 3666 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6566,8 +6572,8 @@ void case_506() yyVal = ai; } -void case_507() -#line 3670 "cs-parser.jay" +void case_508() +#line 3673 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6579,16 +6585,16 @@ void case_507() yyVal = ai; } -void case_508() -#line 3684 "cs-parser.jay" +void case_509() +#line 3687 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); yyVal = list; } -void case_509() -#line 3690 "cs-parser.jay" +void case_510() +#line 3693 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6596,31 +6602,31 @@ void case_509() yyVal = list; } -void case_511() -#line 3704 "cs-parser.jay" +void case_512() +#line 3707 "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_514() -#line 3715 "cs-parser.jay" +void case_515() +#line 3718 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } -void case_515() -#line 3723 "cs-parser.jay" +void case_516() +#line 3726 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (int) yyVals[0+yyTop], lt.Location); } -void case_516() -#line 3729 "cs-parser.jay" +void case_517() +#line 3732 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6629,8 +6635,8 @@ void case_516() lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_517() -#line 3737 "cs-parser.jay" +void case_518() +#line 3740 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6639,8 +6645,8 @@ void case_517() }; } -void case_518() -#line 3745 "cs-parser.jay" +void case_519() +#line 3748 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6649,8 +6655,8 @@ void case_518() }; } -void case_519() -#line 3753 "cs-parser.jay" +void case_520() +#line 3756 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6662,8 +6668,8 @@ void case_519() }; } -void case_520() -#line 3767 "cs-parser.jay" +void case_521() +#line 3770 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6671,8 +6677,8 @@ void case_520() yyVal = yyVals[0+yyTop]; } -void case_521() -#line 3777 "cs-parser.jay" +void case_522() +#line 3780 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6681,36 +6687,36 @@ void case_521() yyVal = lt; } -void case_522() -#line 3788 "cs-parser.jay" +void case_523() +#line 3791 "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_523() -#line 3796 "cs-parser.jay" +void case_524() +#line 3799 "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_524() -#line 3804 "cs-parser.jay" +void case_525() +#line 3807 "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_525() -#line 3812 "cs-parser.jay" +void case_526() +#line 3815 "cs-parser.jay" { 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_527() -#line 3824 "cs-parser.jay" +void case_528() +#line 3827 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6720,8 +6726,8 @@ void case_527() } } -void case_533() -#line 3856 "cs-parser.jay" +void case_534() +#line 3859 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6729,8 +6735,8 @@ void case_533() savedCloseLocation = GetLocation (yyVals[-2+yyTop]); } -void case_534() -#line 3866 "cs-parser.jay" +void case_535() +#line 3869 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6739,148 +6745,148 @@ void case_534() lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_540() -#line 3891 "cs-parser.jay" +void case_541() +#line 3894 "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_541() -#line 3899 "cs-parser.jay" +void case_542() +#line 3902 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_550() -#line 3940 "cs-parser.jay" +void case_551() +#line 3943 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_551() -#line 3945 "cs-parser.jay" +void case_552() +#line 3948 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_552() -#line 3950 "cs-parser.jay" +void case_553() +#line 3953 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_554() -#line 3959 "cs-parser.jay" +void case_555() +#line 3962 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_556() -#line 3968 "cs-parser.jay" +void case_557() +#line 3971 "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_560() -#line 3985 "cs-parser.jay" +void case_561() +#line 3988 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_561() -#line 3990 "cs-parser.jay" +void case_562() +#line 3993 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_563() -#line 3999 "cs-parser.jay" +void case_564() +#line 4002 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_564() -#line 4004 "cs-parser.jay" +void case_565() +#line 4007 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_565() -#line 4009 "cs-parser.jay" +void case_566() +#line 4012 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_566() -#line 4014 "cs-parser.jay" +void case_567() +#line 4017 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_568() -#line 4023 "cs-parser.jay" +void case_569() +#line 4026 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_569() -#line 4028 "cs-parser.jay" +void case_570() +#line 4031 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_571() -#line 4037 "cs-parser.jay" +void case_572() +#line 4040 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_573() -#line 4046 "cs-parser.jay" +void case_574() +#line 4049 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_575() -#line 4055 "cs-parser.jay" +void case_576() +#line 4058 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_577() -#line 4064 "cs-parser.jay" +void case_578() +#line 4067 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_579() -#line 4073 "cs-parser.jay" +void case_580() +#line 4076 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_581() -#line 4082 "cs-parser.jay" +void case_582() +#line 4085 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6888,85 +6894,85 @@ void case_581() yyVal = new Nullable.NullCoalescingOperator ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_583() -#line 4093 "cs-parser.jay" +void case_584() +#line 4096 "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_585() -#line 4105 "cs-parser.jay" +void case_586() +#line 4108 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_586() -#line 4110 "cs-parser.jay" +void case_587() +#line 4113 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_587() -#line 4115 "cs-parser.jay" +void case_588() +#line 4118 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_588() -#line 4120 "cs-parser.jay" +void case_589() +#line 4123 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_589() -#line 4125 "cs-parser.jay" +void case_590() +#line 4128 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_590() -#line 4130 "cs-parser.jay" +void case_591() +#line 4133 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_591() -#line 4135 "cs-parser.jay" +void case_592() +#line 4138 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_592() -#line 4140 "cs-parser.jay" +void case_593() +#line 4143 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_593() -#line 4145 "cs-parser.jay" +void case_594() +#line 4148 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_594() -#line 4150 "cs-parser.jay" +void case_595() +#line 4153 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } -void case_595() -#line 4158 "cs-parser.jay" +void case_596() +#line 4161 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6974,8 +6980,8 @@ void case_595() yyVal = pars; } -void case_596() -#line 4165 "cs-parser.jay" +void case_597() +#line 4168 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6989,38 +6995,38 @@ void case_596() yyVal = pars; } -void case_597() -#line 4181 "cs-parser.jay" +void case_598() +#line 4184 "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_598() -#line 4187 "cs-parser.jay" +void case_599() +#line 4190 "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_599() -#line 4193 "cs-parser.jay" +void case_600() +#line 4196 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } -void case_601() -#line 4201 "cs-parser.jay" +void case_602() +#line 4204 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } -void case_605() -#line 4217 "cs-parser.jay" +void case_606() +#line 4220 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7028,94 +7034,94 @@ void case_605() yyVal = b; } -void case_607() -#line 4228 "cs-parser.jay" +void case_608() +#line 4231 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } -void case_608() -#line 4236 "cs-parser.jay" +void case_609() +#line 4239 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); start_anonymous (true, new ParametersCompiled (p), false, lt.Location); } -void case_609() -#line 4242 "cs-parser.jay" +void case_610() +#line 4245 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } -void case_610() -#line 4247 "cs-parser.jay" +void case_611() +#line 4250 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); start_anonymous (true, new ParametersCompiled (p), true, lt.Location); } -void case_611() -#line 4253 "cs-parser.jay" +void case_612() +#line 4256 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_613() -#line 4262 "cs-parser.jay" +void case_614() +#line 4265 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } -void case_614() -#line 4267 "cs-parser.jay" +void case_615() +#line 4270 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_616() -#line 4276 "cs-parser.jay" +void case_617() +#line 4279 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } -void case_617() -#line 4281 "cs-parser.jay" +void case_618() +#line 4284 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } -void case_624() -#line 4304 "cs-parser.jay" +void case_625() +#line 4307 "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_625() -#line 4309 "cs-parser.jay" +void case_626() +#line 4312 "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_626() -#line 4314 "cs-parser.jay" +void case_627() +#line 4317 "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_630() -#line 4343 "cs-parser.jay" +void case_631() +#line 4346 "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]); @@ -7127,8 +7133,8 @@ void case_630() lbag.AddMember (current_class, GetModifierLocations (), GetLocation (yyVals[-2+yyTop])); } -void case_631() -#line 4355 "cs-parser.jay" +void case_632() +#line 4358 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7142,16 +7148,16 @@ void case_631() lexer.parsing_modifiers = true; } -void case_632() -#line 4368 "cs-parser.jay" +void case_633() +#line 4371 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } -void case_633() -#line 4374 "cs-parser.jay" +void case_634() +#line 4377 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7159,16 +7165,16 @@ void case_633() yyVal = pop_current_class (); } -void case_636() -#line 4391 "cs-parser.jay" +void case_637() +#line 4394 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; lexer.parsing_modifiers = false; } -void case_639() -#line 4405 "cs-parser.jay" +void case_640() +#line 4408 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7185,8 +7191,8 @@ void case_639() yyVal = m1 | m2; } -void case_640() -#line 4424 "cs-parser.jay" +void case_641() +#line 4427 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7195,92 +7201,92 @@ void case_640() report.Error (1530, GetLocation (yyVals[0+yyTop]), "Keyword `new' is not allowed on namespace elements"); } -void case_641() -#line 4432 "cs-parser.jay" +void case_642() +#line 4435 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_642() -#line 4437 "cs-parser.jay" +void case_643() +#line 4440 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_643() -#line 4442 "cs-parser.jay" +void case_644() +#line 4445 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_644() -#line 4447 "cs-parser.jay" +void case_645() +#line 4450 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_645() -#line 4452 "cs-parser.jay" +void case_646() +#line 4455 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_646() -#line 4457 "cs-parser.jay" +void case_647() +#line 4460 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_647() -#line 4462 "cs-parser.jay" +void case_648() +#line 4465 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_648() -#line 4467 "cs-parser.jay" +void case_649() +#line 4470 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_649() -#line 4472 "cs-parser.jay" +void case_650() +#line 4475 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_650() -#line 4477 "cs-parser.jay" +void case_651() +#line 4480 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_651() -#line 4482 "cs-parser.jay" +void case_652() +#line 4485 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_652() -#line 4487 "cs-parser.jay" +void case_653() +#line 4490 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_653() -#line 4492 "cs-parser.jay" +void case_654() +#line 4495 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7288,37 +7294,37 @@ void case_653() Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } -void case_654() -#line 4499 "cs-parser.jay" +void case_655() +#line 4502 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_656() -#line 4508 "cs-parser.jay" +void case_657() +#line 4511 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } -void case_659() -#line 4521 "cs-parser.jay" +void case_660() +#line 4524 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_660() -#line 4529 "cs-parser.jay" +void case_661() +#line 4532 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); yyVal = constraints; } -void case_661() -#line 4535 "cs-parser.jay" +void case_662() +#line 4538 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7335,24 +7341,24 @@ void case_661() yyVal = constraints; } -void case_662() -#line 4554 "cs-parser.jay" +void case_663() +#line 4557 "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])); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } -void case_663() -#line 4563 "cs-parser.jay" +void case_664() +#line 4566 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); yyVal = constraints; } -void case_664() -#line 4569 "cs-parser.jay" +void case_665() +#line 4572 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7376,8 +7382,8 @@ void case_664() yyVal = constraints; } -void case_665() -#line 4595 "cs-parser.jay" +void case_666() +#line 4598 "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 ()); @@ -7385,15 +7391,15 @@ void case_665() yyVal = yyVals[0+yyTop]; } -void case_666() -#line 4602 "cs-parser.jay" +void case_667() +#line 4605 "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_670() -#line 4622 "cs-parser.jay" +void case_671() +#line 4625 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7401,92 +7407,92 @@ void case_670() yyVal = yyVals[0+yyTop]; } -void case_671() -#line 4632 "cs-parser.jay" +void case_672() +#line 4635 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } -void case_672() -#line 4637 "cs-parser.jay" +void case_673() +#line 4640 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } -void case_673() -#line 4658 "cs-parser.jay" +void case_674() +#line 4661 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } -void case_675() -#line 4670 "cs-parser.jay" +void case_676() +#line 4673 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } -void case_676() -#line 4675 "cs-parser.jay" +void case_677() +#line 4678 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } -void case_677() -#line 4684 "cs-parser.jay" +void case_678() +#line 4687 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } -void case_678() -#line 4689 "cs-parser.jay" +void case_679() +#line 4692 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } -void case_686() -#line 4716 "cs-parser.jay" +void case_687() +#line 4719 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_719() -#line 4780 "cs-parser.jay" +void case_720() +#line 4783 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } -void case_720() -#line 4785 "cs-parser.jay" +void case_721() +#line 4788 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } -void case_721() -#line 4790 "cs-parser.jay" +void case_722() +#line 4793 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_722() -#line 4798 "cs-parser.jay" +void case_723() +#line 4801 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } -void case_723() -#line 4806 "cs-parser.jay" +void case_724() +#line 4809 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7495,8 +7501,8 @@ void case_723() current_block.AddStatement (labeled); } -void case_726() -#line 4819 "cs-parser.jay" +void case_727() +#line 4822 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7504,8 +7510,8 @@ void case_726() yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_727() -#line 4835 "cs-parser.jay" +void case_728() +#line 4838 "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*/ @@ -7536,8 +7542,8 @@ void case_727() } } -void case_728() -#line 4865 "cs-parser.jay" +void case_729() +#line 4868 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7549,8 +7555,8 @@ void case_728() } } -void case_729() -#line 4876 "cs-parser.jay" +void case_730() +#line 4879 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7558,22 +7564,22 @@ void case_729() yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } -void case_732() -#line 4891 "cs-parser.jay" +void case_733() +#line 4894 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } -void case_734() -#line 4900 "cs-parser.jay" +void case_735() +#line 4903 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_736() -#line 4915 "cs-parser.jay" +void case_737() +#line 4918 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7581,16 +7587,16 @@ void case_736() current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_737() -#line 4922 "cs-parser.jay" +void case_738() +#line 4925 "cs-parser.jay" { yyVal = current_variable; current_variable = null; lbag.AppendTo (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_738() -#line 4928 "cs-parser.jay" +void case_739() +#line 4931 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7598,8 +7604,8 @@ void case_738() current_variable = new BlockConstantDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_739() -#line 4935 "cs-parser.jay" +void case_740() +#line 4938 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7610,15 +7616,15 @@ void case_739() current_variable = null; } -void case_741() -#line 4949 "cs-parser.jay" +void case_742() +#line 4952 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } -void case_742() -#line 4954 "cs-parser.jay" +void case_743() +#line 4957 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7628,8 +7634,8 @@ void case_742() } } -void case_746() -#line 4972 "cs-parser.jay" +void case_747() +#line 4975 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7637,8 +7643,8 @@ void case_746() } } -void case_749() -#line 4987 "cs-parser.jay" +void case_750() +#line 4990 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7648,8 +7654,8 @@ void case_749() lbag.AddLocation (d, GetLocation (yyVals[-1+yyTop])); } -void case_750() -#line 4996 "cs-parser.jay" +void case_751() +#line 4999 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7659,15 +7665,15 @@ void case_750() lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_752() -#line 5012 "cs-parser.jay" +void case_753() +#line 5015 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } -void case_757() -#line 5030 "cs-parser.jay" +void case_758() +#line 5033 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7677,29 +7683,29 @@ void case_757() lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_759() -#line 5043 "cs-parser.jay" +void case_760() +#line 5046 "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_760() -#line 5048 "cs-parser.jay" +void case_761() +#line 5051 "cs-parser.jay" { 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_761() -#line 5056 "cs-parser.jay" +void case_762() +#line 5059 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_765() -#line 5074 "cs-parser.jay" +void case_766() +#line 5077 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7710,8 +7716,8 @@ void case_765() } } -void case_766() -#line 5087 "cs-parser.jay" +void case_767() +#line 5090 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7720,15 +7726,15 @@ void case_766() yyVal = new StatementExpression (s); } -void case_767() -#line 5095 "cs-parser.jay" +void case_768() +#line 5098 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_770() -#line 5109 "cs-parser.jay" +void case_771() +#line 5112 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7737,8 +7743,8 @@ void case_770() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_771() -#line 5118 "cs-parser.jay" +void case_772() +#line 5121 "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])); @@ -7749,23 +7755,23 @@ void case_771() Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); } -void case_773() -#line 5135 "cs-parser.jay" +void case_774() +#line 5138 "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_774() -#line 5144 "cs-parser.jay" +void case_775() +#line 5147 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } -void case_776() -#line 5153 "cs-parser.jay" +void case_777() +#line 5156 "cs-parser.jay" { var sections = new List (4); @@ -7773,8 +7779,8 @@ void case_776() yyVal = sections; } -void case_777() -#line 5160 "cs-parser.jay" +void case_778() +#line 5163 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7782,15 +7788,15 @@ void case_777() yyVal = sections; } -void case_778() -#line 5167 "cs-parser.jay" +void case_779() +#line 5170 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } -void case_781() -#line 5186 "cs-parser.jay" +void case_782() +#line 5189 "cs-parser.jay" { var labels = new List (2); @@ -7798,8 +7804,8 @@ void case_781() yyVal = labels; } -void case_782() -#line 5193 "cs-parser.jay" +void case_783() +#line 5196 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7807,15 +7813,15 @@ void case_782() yyVal = labels; } -void case_783() -#line 5203 "cs-parser.jay" +void case_784() +#line 5206 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_789() -#line 5222 "cs-parser.jay" +void case_790() +#line 5225 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7824,22 +7830,22 @@ void case_789() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_790() -#line 5234 "cs-parser.jay" +void case_791() +#line 5237 "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_791() -#line 5242 "cs-parser.jay" +void case_792() +#line 5245 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } -void case_793() -#line 5258 "cs-parser.jay" +void case_794() +#line 5261 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7852,15 +7858,15 @@ void case_793() yyVal = end_block (GetLocation (yyVals[-5+yyTop])); } -void case_794() -#line 5270 "cs-parser.jay" +void case_795() +#line 5273 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } -void case_797() -#line 5283 "cs-parser.jay" +void case_798() +#line 5286 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7868,15 +7874,15 @@ void case_797() current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_798() -#line 5290 "cs-parser.jay" +void case_799() +#line 5293 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_806() -#line 5314 "cs-parser.jay" +void case_807() +#line 5317 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7890,15 +7896,15 @@ void case_806() yyVal = sl; } -void case_807() -#line 5330 "cs-parser.jay" +void case_808() +#line 5333 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } -void case_808() -#line 5335 "cs-parser.jay" +void case_809() +#line 5338 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7908,8 +7914,8 @@ void case_808() yyVal = li; } -void case_809() -#line 5344 "cs-parser.jay" +void case_810() +#line 5347 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7921,58 +7927,58 @@ void case_809() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_816() -#line 5367 "cs-parser.jay" +void case_817() +#line 5370 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_817() -#line 5375 "cs-parser.jay" +void case_818() +#line 5378 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_818() -#line 5383 "cs-parser.jay" +void case_819() +#line 5386 "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_819() -#line 5389 "cs-parser.jay" +void case_820() +#line 5392 "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_820() -#line 5394 "cs-parser.jay" +void case_821() +#line 5397 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_821() -#line 5402 "cs-parser.jay" +void case_822() +#line 5405 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_822() -#line 5410 "cs-parser.jay" +void case_823() +#line 5413 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_823() -#line 5418 "cs-parser.jay" +void case_824() +#line 5421 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7989,8 +7995,8 @@ void case_823() lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_824() -#line 5434 "cs-parser.jay" +void case_825() +#line 5437 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -8005,29 +8011,29 @@ void case_824() lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } -void case_828() -#line 5460 "cs-parser.jay" +void case_829() +#line 5463 "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_829() -#line 5465 "cs-parser.jay" +void case_830() +#line 5468 "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_830() -#line 5470 "cs-parser.jay" +void case_831() +#line 5473 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } -void case_831() -#line 5478 "cs-parser.jay" +void case_832() +#line 5481 "cs-parser.jay" { var l = new List (2); @@ -8035,8 +8041,8 @@ void case_831() yyVal = l; } -void case_832() -#line 5485 "cs-parser.jay" +void case_833() +#line 5488 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8053,8 +8059,8 @@ void case_832() yyVal = l; } -void case_836() -#line 5513 "cs-parser.jay" +void case_837() +#line 5516 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8070,8 +8076,8 @@ void case_836() yyVal = c; } -void case_838() -#line 5532 "cs-parser.jay" +void case_839() +#line 5535 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8083,15 +8089,15 @@ void case_838() yyVal = new Catch (null, GetLocation (yyVals[-2+yyTop])); } -void case_841() -#line 5560 "cs-parser.jay" +void case_842() +#line 5563 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } -void case_843() -#line 5570 "cs-parser.jay" +void case_844() +#line 5573 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8100,8 +8106,8 @@ void case_843() lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); } -void case_844() -#line 5581 "cs-parser.jay" +void case_845() +#line 5584 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8112,15 +8118,15 @@ void case_844() current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_845() -#line 5591 "cs-parser.jay" +void case_846() +#line 5594 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_846() -#line 5596 "cs-parser.jay" +void case_847() +#line 5599 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8131,8 +8137,8 @@ void case_846() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_847() -#line 5609 "cs-parser.jay" +void case_848() +#line 5612 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8143,15 +8149,15 @@ void case_847() current_variable = new Using.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li); } -void case_848() -#line 5619 "cs-parser.jay" +void case_849() +#line 5622 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } -void case_849() -#line 5624 "cs-parser.jay" +void case_850() +#line 5627 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8162,8 +8168,8 @@ void case_849() yyVal = end_block (GetLocation (yyVals[-2+yyTop])); } -void case_850() -#line 5634 "cs-parser.jay" +void case_851() +#line 5637 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8173,16 +8179,16 @@ void case_850() yyVal = u; } -void case_852() -#line 5650 "cs-parser.jay" +void case_853() +#line 5653 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); yyVal = current_variable; } -void case_853() -#line 5662 "cs-parser.jay" +void case_854() +#line 5665 "cs-parser.jay" { lexer.query_parsing = false; @@ -8195,8 +8201,8 @@ void case_853() current_block = current_block.Parent; } -void case_854() -#line 5674 "cs-parser.jay" +void case_855() +#line 5677 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8207,8 +8213,8 @@ void case_854() current_block = current_block.Parent; } -void case_855() -#line 5685 "cs-parser.jay" +void case_856() +#line 5688 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8217,16 +8223,16 @@ void case_855() current_block = current_block.Parent; } -void case_856() -#line 5692 "cs-parser.jay" +void case_857() +#line 5695 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; } -void case_857() -#line 5701 "cs-parser.jay" +void case_858() +#line 5704 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8235,8 +8241,8 @@ void case_857() yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop]))); } -void case_858() -#line 5709 "cs-parser.jay" +void case_859() +#line 5712 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8249,8 +8255,8 @@ void case_858() ); } -void case_859() -#line 5724 "cs-parser.jay" +void case_860() +#line 5727 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8259,8 +8265,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 5732 "cs-parser.jay" +void case_861() +#line 5735 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8273,8 +8279,8 @@ void case_860() ); } -void case_862() -#line 5751 "cs-parser.jay" +void case_863() +#line 5754 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8286,8 +8292,8 @@ void case_862() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_864() -#line 5766 "cs-parser.jay" +void case_865() +#line 5769 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8302,8 +8308,8 @@ void case_864() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_865() -#line 5783 "cs-parser.jay" +void case_866() +#line 5786 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8319,15 +8325,15 @@ void case_865() yyVal = head; } -void case_867() -#line 5799 "cs-parser.jay" +void case_868() +#line 5802 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } -void case_869() -#line 5811 "cs-parser.jay" +void case_870() +#line 5814 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8335,8 +8341,8 @@ void case_869() current_block = current_block.Parent; } -void case_870() -#line 5818 "cs-parser.jay" +void case_871() +#line 5821 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8345,8 +8351,8 @@ void case_870() linq_clause_blocks.Push ((Linq.QueryBlock)current_block); } -void case_871() -#line 5826 "cs-parser.jay" +void case_872() +#line 5829 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8354,8 +8360,8 @@ void case_871() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_872() -#line 5833 "cs-parser.jay" +void case_873() +#line 5836 "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])); @@ -8364,15 +8370,15 @@ void case_872() current_block = current_block.Parent; } -void case_876() -#line 5850 "cs-parser.jay" +void case_877() +#line 5853 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } -void case_883() -#line 5870 "cs-parser.jay" +void case_884() +#line 5873 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8385,8 +8391,8 @@ void case_883() ((Linq.QueryBlock)current_block).AddRangeVariable (sn); } -void case_885() -#line 5889 "cs-parser.jay" +void case_886() +#line 5892 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8394,8 +8400,8 @@ void case_885() current_block = current_block.Parent; } -void case_886() -#line 5899 "cs-parser.jay" +void case_887() +#line 5902 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8404,8 +8410,8 @@ void case_886() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_887() -#line 5907 "cs-parser.jay" +void case_888() +#line 5910 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8414,8 +8420,8 @@ void case_887() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_888() -#line 5915 "cs-parser.jay" +void case_889() +#line 5918 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8424,8 +8430,8 @@ void case_888() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_889() -#line 5923 "cs-parser.jay" +void case_890() +#line 5926 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8464,8 +8470,8 @@ void case_889() ((Linq.QueryBlock)current_block).AddRangeVariable (into); } -void case_890() -#line 5961 "cs-parser.jay" +void case_891() +#line 5964 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8474,8 +8480,8 @@ void case_890() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_891() -#line 5969 "cs-parser.jay" +void case_892() +#line 5972 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8484,8 +8490,8 @@ void case_891() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_892() -#line 5977 "cs-parser.jay" +void case_893() +#line 5980 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8494,8 +8500,8 @@ void case_892() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_893() -#line 5985 "cs-parser.jay" +void case_894() +#line 5988 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8536,8 +8542,8 @@ void case_893() ((Linq.QueryBlock)current_block).AddRangeVariable (into); } -void case_897() -#line 6040 "cs-parser.jay" +void case_898() +#line 6043 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8545,8 +8551,8 @@ void case_897() yyVal = yyVals[0+yyTop]; } -void case_899() -#line 6051 "cs-parser.jay" +void case_900() +#line 6054 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8554,15 +8560,15 @@ void case_899() current_block = new Linq.QueryBlock (current_block, lexer.Location); } -void case_900() -#line 6058 "cs-parser.jay" +void case_901() +#line 6061 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } -void case_902() -#line 6067 "cs-parser.jay" +void case_903() +#line 6070 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8570,43 +8576,43 @@ void case_902() current_block = new Linq.QueryBlock ((Linq.QueryBlock) current_block, lexer.Location); } -void case_903() -#line 6074 "cs-parser.jay" +void case_904() +#line 6077 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } -void case_905() -#line 6086 "cs-parser.jay" +void case_906() +#line 6089 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_906() -#line 6091 "cs-parser.jay" +void case_907() +#line 6094 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_908() -#line 6103 "cs-parser.jay" +void case_909() +#line 6106 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_909() -#line 6108 "cs-parser.jay" +void case_910() +#line 6111 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } -void case_911() -#line 6118 "cs-parser.jay" +void case_912() +#line 6121 "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*/ @@ -8623,8 +8629,8 @@ void case_911() linq_clause_blocks.Push ((Linq.QueryBlock) current_block); } -void case_912() -#line 6134 "cs-parser.jay" +void case_913() +#line 6137 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8634,8 +8640,8 @@ void case_912() }; } -void case_915() -#line 6161 "cs-parser.jay" +void case_916() +#line 6164 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8666,8 +8672,8 @@ void case_915() start_block (lexer.Location); } -void case_916() -#line 6191 "cs-parser.jay" +void case_917() +#line 6194 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8678,16 +8684,16 @@ void case_916() current_local_parameters = null; } -void case_926() -#line 6234 "cs-parser.jay" +void case_927() +#line 6237 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; yyVal = null; } -void case_927() -#line 6240 "cs-parser.jay" +void case_928() +#line 6243 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8695,15 +8701,15 @@ void case_927() yyVal = new MemberName (lt.Value); } -void case_930() -#line 6255 "cs-parser.jay" +void case_931() +#line 6258 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } -void case_931() -#line 6260 "cs-parser.jay" +void case_932() +#line 6263 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8712,8 +8718,8 @@ void case_931() yyVal = null; } -void case_932() -#line 6268 "cs-parser.jay" +void case_933() +#line 6271 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8722,8 +8728,8 @@ void case_932() yyVal = null; } -void case_933() -#line 6276 "cs-parser.jay" +void case_934() +#line 6279 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8731,24 +8737,24 @@ void case_933() yyVal = null; } -void case_941() -#line 6314 "cs-parser.jay" +void case_942() +#line 6317 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); yyVal = parameters; } -void case_942() -#line 6320 "cs-parser.jay" +void case_943() +#line 6323 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); yyVal = parameters; } -void case_943() -#line 6329 "cs-parser.jay" +void case_944() +#line 6332 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -8788,71 +8794,71 @@ void case_943() 158, 161, 158, 158, 162, 61, 164, 57, 167, 168, 57, 163, 170, 163, 165, 165, 171, 171, 172, 173, 172, 174, 169, 166, 166, 166, 166, 166, 178, 175, - 179, 176, 177, 177, 181, 183, 184, 31, 180, 180, - 180, 182, 182, 182, 185, 185, 186, 187, 186, 188, - 189, 190, 32, 191, 191, 17, 17, 192, 192, 195, - 194, 194, 194, 196, 196, 198, 64, 121, 101, 101, - 126, 126, 199, 199, 199, 197, 197, 200, 200, 201, - 201, 203, 203, 82, 72, 72, 86, 86, 116, 116, - 146, 146, 204, 204, 204, 204, 204, 208, 208, 209, - 209, 207, 207, 207, 207, 207, 207, 207, 210, 210, - 210, 210, 210, 210, 210, 210, 210, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 211, 212, 212, 212, - 213, 213, 213, 233, 233, 234, 234, 235, 235, 215, - 215, 232, 232, 232, 232, 232, 232, 232, 232, 217, - 236, 236, 237, 237, 238, 238, 240, 240, 240, 241, - 241, 241, 241, 241, 242, 242, 159, 159, 246, 246, - 246, 246, 246, 248, 248, 247, 247, 249, 249, 249, - 249, 250, 218, 245, 245, 245, 251, 251, 252, 252, - 219, 220, 220, 221, 222, 223, 223, 214, 214, 214, - 214, 214, 257, 253, 224, 258, 258, 259, 259, 260, - 260, 261, 261, 261, 261, 254, 254, 205, 205, 256, - 256, 262, 262, 255, 255, 81, 81, 263, 263, 264, - 225, 265, 265, 265, 266, 266, 266, 266, 266, 267, - 193, 226, 227, 228, 229, 269, 230, 270, 230, 268, - 268, 272, 271, 216, 273, 273, 273, 273, 273, 275, - 276, 274, 274, 274, 274, 274, 274, 274, 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, - 297, 300, 301, 297, 302, 303, 297, 46, 46, 243, - 243, 243, 243, 231, 231, 231, 80, 305, 306, 307, - 308, 309, 28, 63, 63, 62, 62, 108, 108, 310, - 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, - 310, 310, 310, 310, 66, 66, 68, 68, 68, 311, - 311, 312, 313, 313, 314, 314, 314, 314, 202, 202, - 315, 315, 317, 109, 318, 318, 319, 157, 316, 316, - 320, 320, 321, 321, 321, 321, 325, 325, 326, 326, - 326, 323, 323, 323, 323, 323, 323, 323, 323, 323, - 323, 323, 323, 323, 327, 327, 327, 327, 327, 327, - 327, 327, 327, 327, 327, 327, 327, 341, 341, 341, - 341, 328, 342, 324, 343, 343, 344, 344, 344, 344, - 344, 344, 206, 206, 345, 347, 322, 350, 322, 346, - 346, 346, 348, 348, 354, 354, 353, 353, 355, 355, - 349, 349, 351, 351, 356, 356, 357, 352, 352, 352, - 329, 329, 340, 340, 358, 359, 359, 330, 330, 360, - 360, 363, 361, 362, 362, 364, 364, 364, 367, 365, - 366, 366, 368, 368, 331, 331, 331, 331, 369, 370, - 374, 371, 373, 373, 375, 375, 379, 378, 378, 376, - 376, 377, 377, 381, 380, 380, 372, 382, 372, 332, - 332, 332, 332, 332, 332, 383, 384, 385, 385, 385, - 386, 387, 388, 388, 389, 389, 333, 333, 333, 333, - 390, 390, 392, 392, 391, 393, 391, 391, 334, 335, - 394, 338, 336, 396, 397, 339, 398, 399, 337, 337, - 395, 395, 304, 304, 304, 304, 400, 400, 402, 402, - 404, 403, 405, 403, 401, 401, 401, 409, 407, 410, - 411, 407, 406, 406, 412, 412, 413, 413, 413, 413, - 413, 418, 414, 419, 415, 420, 421, 422, 416, 424, - 425, 426, 416, 423, 423, 428, 417, 427, 431, 427, - 430, 433, 430, 429, 429, 429, 432, 432, 432, 408, - 434, 408, 3, 3, 435, 3, 3, 436, 436, 244, - 244, 239, 239, 5, 437, 437, 437, 437, 441, 437, - 437, 437, 437, 438, 438, 439, 442, 439, 440, 440, - 443, 443, 444, + 179, 176, 177, 177, 180, 182, 184, 185, 31, 181, + 181, 181, 183, 183, 183, 186, 186, 187, 188, 187, + 189, 190, 191, 32, 192, 192, 17, 17, 193, 193, + 196, 195, 195, 195, 197, 197, 199, 64, 121, 101, + 101, 126, 126, 200, 200, 200, 198, 198, 201, 201, + 202, 202, 204, 204, 82, 72, 72, 86, 86, 116, + 116, 146, 146, 205, 205, 205, 205, 205, 209, 209, + 210, 210, 208, 208, 208, 208, 208, 208, 208, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 213, 213, + 213, 214, 214, 214, 234, 234, 235, 235, 236, 236, + 216, 216, 233, 233, 233, 233, 233, 233, 233, 233, + 218, 237, 237, 238, 238, 239, 239, 241, 241, 241, + 242, 242, 242, 242, 242, 243, 243, 159, 159, 247, + 247, 247, 247, 247, 249, 249, 248, 248, 250, 250, + 250, 250, 251, 219, 246, 246, 246, 252, 252, 253, + 253, 220, 221, 221, 222, 223, 224, 224, 215, 215, + 215, 215, 215, 258, 254, 225, 259, 259, 260, 260, + 261, 261, 262, 262, 262, 262, 255, 255, 206, 206, + 257, 257, 263, 263, 256, 256, 81, 81, 264, 264, + 265, 226, 266, 266, 266, 267, 267, 267, 267, 267, + 268, 194, 227, 228, 229, 230, 270, 231, 271, 231, + 269, 269, 273, 272, 217, 274, 274, 274, 274, 274, + 276, 277, 275, 275, 275, 275, 275, 275, 275, 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, 298, 301, 302, 298, 303, 304, 298, 46, 46, + 244, 244, 244, 244, 232, 232, 232, 80, 306, 307, + 308, 309, 310, 28, 63, 63, 62, 62, 108, 108, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 66, 66, 68, 68, 68, + 312, 312, 313, 314, 314, 315, 315, 315, 315, 203, + 203, 316, 316, 318, 109, 319, 319, 320, 157, 317, + 317, 321, 321, 322, 322, 322, 322, 326, 326, 327, + 327, 327, 324, 324, 324, 324, 324, 324, 324, 324, + 324, 324, 324, 324, 324, 328, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 328, 328, 328, 342, 342, + 342, 342, 329, 343, 325, 344, 344, 345, 345, 345, + 345, 345, 345, 207, 207, 346, 348, 323, 351, 323, + 347, 347, 347, 349, 349, 355, 355, 354, 354, 356, + 356, 350, 350, 352, 352, 357, 357, 358, 353, 353, + 353, 330, 330, 341, 341, 359, 360, 360, 331, 331, + 361, 361, 364, 362, 363, 363, 365, 365, 365, 368, + 366, 367, 367, 369, 369, 332, 332, 332, 332, 370, + 371, 375, 372, 374, 374, 376, 376, 380, 379, 379, + 377, 377, 378, 378, 382, 381, 381, 373, 383, 373, + 333, 333, 333, 333, 333, 333, 384, 385, 386, 386, + 386, 387, 388, 389, 389, 390, 390, 334, 334, 334, + 334, 391, 391, 393, 393, 392, 394, 392, 392, 335, + 336, 395, 339, 337, 397, 398, 340, 399, 400, 338, + 338, 396, 396, 305, 305, 305, 305, 401, 401, 403, + 403, 405, 404, 406, 404, 402, 402, 402, 410, 408, + 411, 412, 408, 407, 407, 413, 413, 414, 414, 414, + 414, 414, 419, 415, 420, 416, 421, 422, 423, 417, + 425, 426, 427, 417, 424, 424, 429, 418, 428, 432, + 428, 431, 434, 431, 430, 430, 430, 433, 433, 433, + 409, 435, 409, 3, 3, 436, 3, 3, 437, 437, + 245, 245, 240, 240, 5, 438, 438, 438, 438, 442, + 438, 438, 438, 438, 439, 439, 440, 443, 440, 441, + 441, 444, 444, 445, }; static readonly short [] yyLen = { 2, 2, 0, 3, 1, 2, 4, 3, 1, 0, 1, @@ -8885,1321 +8891,1318 @@ void case_943() 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, + 0, 5, 1, 1, 0, 0, 0, 0, 13, 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, 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, 2, 2, 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, 4, 0, 4, 0, 5, 0, - 1, 0, 4, 4, 1, 2, 2, 1, 1, 4, - 2, 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, - 5, 0, 0, 7, 0, 0, 8, 1, 1, 1, - 1, 1, 1, 6, 4, 4, 1, 1, 0, 0, - 0, 0, 15, 0, 1, 0, 1, 1, 2, 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, 5, + 0, 1, 0, 4, 4, 1, 2, 2, 1, 1, + 4, 2, 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, 5, 0, 0, 7, 0, 0, 8, 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, 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, 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, 0, 4, 1, 2, 2, 2, 2, 2, - 2, 1, 1, 2, 1, 0, 6, 0, 7, 0, - 2, 1, 0, 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, + 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, 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, 8, 0, 0, 0, 0, 0, 0, 0, 2, 4, - 0, 0, 11, 14, 0, 913, 0, 0, 917, 0, - 0, 15, 17, 18, 374, 380, 387, 375, 377, 0, - 376, 0, 383, 385, 372, 0, 379, 381, 373, 384, - 386, 382, 336, 934, 0, 378, 924, 0, 10, 1, - 0, 0, 0, 12, 0, 767, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 0, - 0, 0, 413, 0, 0, 0, 471, 0, 414, 0, - 510, 0, 841, 0, 0, 0, 623, 0, 0, 0, - 0, 0, 0, 0, 673, 0, 722, 0, 0, 0, - 0, 0, 0, 0, 0, 412, 0, 612, 0, 766, - 705, 0, 0, 0, 0, 389, 390, 0, 392, 393, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 410, 411, 619, 542, 0, 538, - 539, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 620, 618, 621, 622, 689, 691, 0, 687, - 690, 706, 708, 709, 710, 711, 712, 713, 714, 715, - 716, 717, 707, 0, 0, 0, 768, 769, 785, 786, - 787, 788, 810, 811, 812, 813, 814, 815, 0, 0, - 0, 20, 0, 0, 0, 326, 0, 328, 921, 16, - 914, 0, 0, 239, 238, 235, 240, 241, 234, 253, + 0, 0, 11, 14, 0, 914, 0, 0, 918, 0, + 0, 15, 17, 18, 375, 381, 388, 376, 378, 0, + 377, 0, 384, 386, 373, 0, 380, 382, 374, 385, + 387, 383, 337, 935, 0, 379, 925, 0, 10, 1, + 0, 0, 0, 12, 0, 768, 0, 0, 0, 0, + 0, 0, 0, 0, 416, 0, 0, 0, 0, 0, + 0, 0, 414, 0, 0, 0, 472, 0, 415, 0, + 511, 0, 842, 0, 0, 0, 624, 0, 0, 0, + 0, 0, 0, 0, 674, 0, 723, 0, 0, 0, + 0, 0, 0, 0, 0, 413, 0, 613, 0, 767, + 706, 0, 0, 0, 0, 390, 391, 0, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 411, 412, 620, 543, 0, 539, + 540, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 621, 619, 622, 623, 690, 692, 0, 688, + 691, 707, 709, 710, 711, 712, 713, 714, 715, 716, + 717, 718, 708, 0, 0, 0, 769, 770, 786, 787, + 788, 789, 811, 812, 813, 814, 815, 816, 0, 0, + 0, 20, 0, 0, 0, 327, 0, 329, 922, 16, + 915, 0, 0, 239, 238, 235, 240, 241, 234, 253, 252, 245, 246, 242, 244, 243, 247, 236, 237, 248, - 249, 255, 254, 250, 251, 0, 0, 937, 0, 926, - 0, 925, 3, 52, 0, 0, 0, 42, 39, 41, + 249, 255, 254, 250, 251, 0, 0, 938, 0, 927, + 0, 926, 3, 52, 0, 0, 0, 42, 39, 41, 43, 44, 45, 46, 47, 50, 13, 0, 0, 0, - 816, 416, 417, 839, 0, 0, 0, 0, 0, 0, - 391, 0, 817, 0, 532, 526, 531, 721, 765, 692, - 719, 718, 720, 693, 694, 695, 696, 697, 698, 699, - 700, 701, 702, 703, 704, 0, 0, 0, 791, 0, + 817, 417, 418, 840, 0, 0, 0, 0, 0, 0, + 392, 0, 818, 0, 533, 527, 532, 722, 766, 693, + 720, 719, 721, 694, 695, 696, 697, 698, 699, 700, + 701, 702, 703, 704, 705, 0, 0, 0, 792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 826, 0, 388, 0, 0, 0, 0, 0, 0, - 840, 0, 0, 0, 735, 731, 0, 0, 0, 0, - 0, 0, 355, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 615, 541, 0, 0, 537, 543, 544, 536, - 548, 547, 545, 546, 0, 0, 608, 723, 521, 0, - 409, 408, 0, 0, 0, 0, 325, 0, 729, 730, - 0, 474, 475, 0, 0, 0, 727, 728, 0, 0, + 0, 827, 0, 389, 0, 0, 0, 0, 0, 0, + 841, 0, 0, 0, 736, 732, 0, 0, 0, 0, + 0, 0, 356, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 616, 542, 0, 0, 538, 544, 545, 537, + 549, 548, 546, 547, 0, 0, 609, 724, 522, 0, + 410, 409, 0, 0, 0, 0, 326, 0, 730, 731, + 0, 475, 476, 0, 0, 0, 728, 729, 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, 0, 916, 688, 736, 726, 0, 763, 764, 867, - 884, 0, 0, 0, 896, 855, 853, 877, 0, 0, - 875, 878, 879, 880, 881, 856, 854, 0, 0, 0, - 330, 0, 21, 0, 0, 0, 933, 0, 337, 0, - 0, 0, 935, 0, 0, 40, 645, 651, 643, 0, - 640, 650, 644, 642, 641, 648, 646, 647, 653, 649, - 652, 654, 0, 0, 638, 51, 473, 0, 0, 469, - 470, 0, 467, 0, 738, 0, 0, 0, 0, 761, - 762, 0, 0, 0, 627, 0, 820, 818, 628, 0, - 0, 495, 0, 0, 0, 486, 0, 490, 500, 502, - 0, 482, 0, 0, 0, 0, 0, 477, 0, 480, - 0, 484, 357, 821, 0, 0, 822, 830, 0, 0, - 0, 831, 0, 0, 842, 0, 0, 734, 0, 367, - 0, 363, 364, 0, 362, 365, 366, 0, 0, 0, - 549, 0, 0, 528, 610, 0, 686, 0, 0, 681, - 683, 684, 685, 420, 421, 824, 0, 0, 0, 333, - 334, 0, 177, 176, 178, 0, 0, 0, 0, 359, - 0, 595, 0, 0, 425, 0, 428, 0, 426, 0, - 0, 0, 0, 0, 0, 454, 457, 0, 0, 449, - 456, 455, 0, 584, 585, 586, 587, 588, 589, 590, - 591, 592, 594, 593, 550, 552, 551, 557, 558, 0, + 0, 0, 917, 689, 737, 727, 0, 764, 765, 868, + 885, 0, 0, 0, 897, 856, 854, 878, 0, 0, + 876, 879, 880, 881, 882, 857, 855, 0, 0, 0, + 331, 0, 21, 0, 0, 0, 934, 0, 338, 0, + 0, 0, 936, 0, 0, 40, 646, 652, 644, 0, + 641, 651, 645, 643, 642, 649, 647, 648, 654, 650, + 653, 655, 0, 0, 639, 51, 474, 0, 0, 470, + 471, 0, 468, 0, 739, 0, 0, 0, 0, 762, + 763, 0, 0, 0, 628, 0, 821, 819, 629, 0, + 0, 496, 0, 0, 0, 487, 0, 491, 501, 503, + 0, 483, 0, 0, 0, 0, 0, 478, 0, 481, + 0, 485, 358, 822, 0, 0, 823, 831, 0, 0, + 0, 832, 0, 0, 843, 0, 0, 735, 0, 368, + 0, 364, 365, 0, 363, 366, 367, 0, 0, 0, + 550, 0, 0, 529, 611, 0, 687, 0, 0, 682, + 684, 685, 686, 421, 422, 825, 0, 0, 0, 334, + 335, 0, 177, 176, 178, 0, 0, 0, 0, 360, + 0, 596, 0, 0, 426, 0, 429, 0, 427, 0, + 0, 0, 0, 0, 0, 455, 458, 0, 0, 450, + 457, 456, 0, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 595, 594, 551, 553, 552, 558, 559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 581, 0, 0, 499, 0, 0, - 0, 0, 0, 0, 0, 868, 870, 866, 0, 876, - 0, 0, 327, 931, 932, 351, 0, 0, 348, 0, - 0, 174, 0, 0, 941, 927, 929, 60, 58, 59, + 0, 0, 0, 0, 582, 0, 0, 500, 0, 0, + 0, 0, 0, 0, 0, 869, 871, 867, 0, 877, + 0, 0, 328, 932, 933, 352, 0, 0, 349, 0, + 0, 174, 0, 0, 942, 928, 930, 60, 58, 59, 0, 0, 53, 0, 0, 61, 63, 27, 25, 0, - 0, 0, 635, 0, 639, 424, 0, 472, 0, 523, - 0, 534, 164, 185, 0, 0, 154, 0, 0, 0, - 165, 527, 0, 844, 794, 0, 805, 792, 0, 796, - 0, 0, 0, 819, 0, 0, 0, 485, 0, 501, - 503, 0, 0, 441, 0, 0, 437, 0, 0, 464, - 0, 505, 479, 0, 140, 506, 138, 139, 508, 0, - 522, 0, 835, 0, 828, 0, 832, 514, 0, 0, - 0, 352, 0, 512, 0, 0, 524, 0, 847, 0, - 859, 0, 857, 0, 0, 625, 626, 0, 0, 0, - 675, 676, 674, 682, 823, 603, 609, 602, 0, 724, - 0, 332, 598, 0, 0, 0, 540, 429, 423, 427, - 422, 525, 463, 462, 459, 458, 0, 453, 418, 419, - 430, 0, 0, 742, 0, 0, 885, 861, 0, 886, - 0, 882, 0, 897, 0, 0, 0, 0, 865, 19, - 329, 672, 671, 0, 670, 0, 347, 943, 175, 938, - 0, 0, 54, 0, 0, 0, 0, 0, 0, 354, - 0, 629, 0, 0, 80, 79, 0, 468, 0, 0, - 0, 0, 0, 533, 0, 0, 0, 0, 0, 797, - 0, 0, 0, 0, 0, 843, 492, 491, 444, 0, - 0, 922, 923, 433, 439, 0, 442, 0, 466, 0, - 0, 0, 0, 0, 772, 838, 0, 829, 520, 515, - 0, 0, 511, 0, 850, 0, 789, 860, 858, 0, - 529, 611, 0, 607, 606, 605, 335, 597, 596, 613, - 461, 0, 451, 450, 583, 0, 758, 741, 0, 0, - 0, 747, 0, 863, 0, 890, 0, 905, 906, 899, - 869, 871, 911, 350, 349, 942, 0, 0, 62, 56, - 0, 64, 26, 23, 0, 0, 305, 0, 211, 0, - 102, 0, 77, 752, 113, 114, 0, 0, 0, 755, - 183, 184, 0, 0, 0, 0, 157, 166, 158, 160, - 0, 0, 0, 0, 801, 0, 806, 807, 0, 0, - 443, 445, 446, 440, 434, 438, 0, 497, 0, 465, - 476, 432, 509, 507, 0, 834, 0, 0, 516, 0, - 0, 624, 616, 0, 460, 0, 0, 737, 748, 862, - 0, 0, 0, 883, 0, 0, 0, 930, 0, 0, - 0, 69, 70, 73, 74, 0, 320, 311, 310, 0, - 630, 207, 97, 0, 739, 756, 169, 0, 181, 0, - 0, 0, 790, 852, 0, 0, 0, 0, 808, 771, - 481, 478, 778, 0, 784, 0, 0, 776, 0, 781, - 836, 519, 518, 0, 0, 614, 0, 0, 864, 887, - 0, 0, 0, 901, 0, 912, 0, 75, 67, 0, - 0, 0, 306, 0, 0, 0, 0, 0, 170, 0, - 161, 159, 845, 798, 0, 0, 803, 0, 0, 773, - 777, 0, 782, 0, 848, 617, 0, 750, 0, 891, - 908, 909, 902, 872, 55, 0, 71, 72, 0, 0, - 0, 0, 0, 0, 0, 757, 168, 0, 180, 0, - 0, 809, 783, 0, 677, 837, 0, 759, 0, 0, - 0, 76, 0, 0, 321, 0, 307, 0, 315, 371, - 370, 0, 368, 659, 0, 631, 0, 660, 208, 98, - 171, 846, 793, 0, 849, 888, 0, 903, 0, 0, - 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, - 0, 892, 29, 24, 322, 0, 0, 316, 369, 0, - 0, 0, 99, 678, 0, 0, 0, 0, 308, 667, - 0, 668, 665, 0, 663, 95, 0, 94, 0, 0, - 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 141, 0, 0, 224, 216, 217, 218, 219, 220, 221, - 222, 223, 0, 0, 214, 0, 0, 889, 0, 323, - 319, 0, 0, 0, 632, 84, 0, 267, 262, 266, - 0, 209, 215, 0, 895, 893, 666, 664, 0, 0, - 0, 0, 0, 0, 0, 275, 0, 0, 225, 0, - 0, 233, 0, 152, 142, 151, 0, 100, 0, 0, - 261, 0, 0, 260, 0, 146, 0, 0, 341, 0, - 339, 0, 0, 186, 0, 0, 0, 0, 0, 633, - 210, 0, 103, 0, 338, 0, 0, 0, 0, 117, - 0, 0, 0, 0, 0, 0, 143, 0, 0, 190, - 0, 342, 0, 228, 227, 226, 0, 101, 0, 279, - 0, 258, 119, 0, 256, 0, 0, 0, 121, 0, - 343, 0, 0, 187, 0, 0, 0, 340, 231, 112, - 110, 0, 0, 283, 0, 0, 0, 0, 0, 147, - 0, 264, 0, 0, 0, 0, 125, 0, 0, 0, - 0, 344, 345, 0, 0, 0, 0, 0, 107, 298, - 0, 280, 0, 0, 292, 0, 0, 0, 287, 0, - 137, 0, 0, 0, 0, 132, 0, 0, 276, 0, - 122, 0, 116, 126, 144, 150, 198, 0, 188, 0, - 0, 0, 0, 111, 0, 104, 108, 0, 0, 0, - 294, 0, 295, 284, 0, 0, 278, 288, 259, 0, - 0, 118, 133, 257, 0, 274, 0, 265, 269, 128, - 0, 0, 0, 195, 197, 191, 232, 109, 299, 301, - 281, 0, 0, 293, 290, 136, 134, 148, 0, 0, - 0, 145, 199, 201, 189, 0, 0, 0, 292, 0, - 270, 272, 129, 0, 0, 192, 303, 304, 300, 302, - 291, 149, 0, 0, 205, 204, 203, 200, 202, 0, - 0, 0, 193, 271, 273, + 0, 305, 636, 0, 640, 425, 0, 473, 0, 524, + 0, 535, 164, 185, 0, 0, 154, 0, 0, 0, + 165, 528, 0, 845, 795, 0, 806, 793, 0, 797, + 0, 0, 0, 820, 0, 0, 0, 486, 0, 502, + 504, 0, 0, 442, 0, 0, 438, 0, 0, 465, + 0, 506, 480, 0, 140, 507, 138, 139, 509, 0, + 523, 0, 836, 0, 829, 0, 833, 515, 0, 0, + 0, 353, 0, 513, 0, 0, 525, 0, 848, 0, + 860, 0, 858, 0, 0, 626, 627, 0, 0, 0, + 676, 677, 675, 683, 824, 604, 610, 603, 0, 725, + 0, 333, 599, 0, 0, 0, 541, 430, 424, 428, + 423, 526, 464, 463, 460, 459, 0, 454, 419, 420, + 431, 0, 0, 743, 0, 0, 886, 862, 0, 887, + 0, 883, 0, 898, 0, 0, 0, 0, 866, 19, + 330, 673, 672, 0, 671, 0, 348, 944, 175, 939, + 0, 0, 54, 0, 0, 0, 0, 0, 0, 355, + 0, 630, 0, 0, 80, 79, 0, 469, 0, 0, + 0, 0, 0, 534, 0, 0, 0, 0, 0, 798, + 0, 0, 0, 0, 0, 844, 493, 492, 445, 0, + 0, 923, 924, 434, 440, 0, 443, 0, 467, 0, + 0, 0, 0, 0, 773, 839, 0, 830, 521, 516, + 0, 0, 512, 0, 851, 0, 790, 861, 859, 0, + 530, 612, 0, 608, 607, 606, 336, 598, 597, 614, + 462, 0, 452, 451, 584, 0, 759, 742, 0, 0, + 0, 748, 0, 864, 0, 891, 0, 906, 907, 900, + 870, 872, 912, 351, 350, 943, 0, 0, 62, 56, + 0, 64, 26, 23, 0, 0, 0, 211, 0, 102, + 0, 77, 753, 113, 114, 0, 0, 0, 756, 183, + 184, 0, 0, 0, 0, 157, 166, 158, 160, 0, + 0, 0, 0, 802, 0, 807, 808, 0, 0, 444, + 446, 447, 441, 435, 439, 0, 498, 0, 466, 477, + 433, 510, 508, 0, 835, 0, 0, 517, 0, 0, + 625, 617, 0, 461, 0, 0, 738, 749, 863, 0, + 0, 0, 884, 0, 0, 0, 931, 0, 0, 0, + 69, 70, 73, 74, 0, 321, 0, 306, 631, 207, + 97, 0, 740, 757, 169, 0, 181, 0, 0, 0, + 791, 853, 0, 0, 0, 0, 809, 772, 482, 479, + 779, 0, 785, 0, 0, 777, 0, 782, 837, 520, + 519, 0, 0, 615, 0, 0, 865, 888, 0, 0, + 0, 902, 0, 913, 0, 75, 67, 0, 0, 0, + 312, 311, 0, 0, 0, 0, 0, 0, 170, 0, + 161, 159, 846, 799, 0, 0, 804, 0, 0, 774, + 778, 0, 783, 0, 849, 618, 0, 751, 0, 892, + 909, 910, 903, 873, 55, 0, 71, 72, 0, 0, + 307, 0, 0, 0, 0, 758, 168, 0, 180, 0, + 0, 810, 784, 0, 678, 838, 0, 760, 0, 0, + 0, 76, 0, 0, 322, 0, 372, 371, 0, 369, + 660, 0, 632, 0, 661, 208, 98, 171, 847, 794, + 0, 850, 889, 0, 904, 0, 0, 0, 308, 0, + 316, 0, 0, 0, 662, 0, 0, 0, 0, 893, + 29, 24, 323, 0, 0, 0, 370, 0, 0, 0, + 99, 679, 0, 0, 0, 0, 0, 317, 668, 0, + 669, 666, 0, 664, 95, 0, 94, 0, 0, 83, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 141, + 0, 0, 224, 216, 217, 218, 219, 220, 221, 222, + 223, 0, 0, 214, 0, 0, 890, 0, 324, 0, + 309, 0, 0, 0, 633, 84, 0, 267, 262, 266, + 0, 209, 215, 0, 896, 894, 320, 667, 665, 0, + 0, 0, 0, 0, 0, 0, 275, 0, 0, 225, + 0, 0, 233, 0, 152, 142, 151, 0, 100, 0, + 0, 261, 0, 0, 260, 0, 146, 0, 0, 342, + 0, 340, 0, 0, 186, 0, 0, 0, 0, 0, + 634, 210, 0, 103, 0, 339, 0, 0, 0, 0, + 117, 0, 0, 0, 0, 0, 0, 143, 0, 0, + 190, 0, 343, 0, 228, 227, 226, 0, 101, 0, + 279, 0, 258, 119, 0, 256, 0, 0, 0, 121, + 0, 344, 0, 0, 187, 0, 0, 0, 341, 231, + 112, 110, 0, 0, 283, 0, 0, 0, 0, 0, + 147, 0, 264, 0, 0, 0, 0, 125, 0, 0, + 0, 0, 345, 346, 0, 0, 0, 0, 0, 107, + 298, 0, 280, 0, 0, 292, 0, 0, 0, 287, + 0, 137, 0, 0, 0, 0, 132, 0, 0, 276, + 0, 122, 0, 116, 126, 144, 150, 198, 0, 188, + 0, 0, 0, 0, 111, 0, 104, 108, 0, 0, + 0, 294, 0, 295, 284, 0, 0, 278, 288, 259, + 0, 0, 118, 133, 257, 0, 274, 0, 265, 269, + 128, 0, 0, 0, 195, 197, 191, 232, 109, 299, + 301, 281, 0, 0, 293, 290, 136, 134, 148, 0, + 0, 0, 145, 199, 201, 189, 0, 0, 0, 292, + 0, 270, 272, 129, 0, 0, 192, 303, 304, 300, + 302, 291, 149, 0, 0, 205, 204, 203, 200, 202, + 0, 0, 0, 193, 271, 273, }; protected static readonly short [] yyDgoto = { 7, 8, 50, 9, 51, 10, 11, 52, 235, 685, 429, 12, 13, 53, 22, 23, 24, 321, 195, 238, 670, - 828, 1016, 1134, 1467, 825, 239, 240, 241, 242, 243, + 828, 1015, 1134, 1468, 825, 239, 240, 241, 242, 243, 244, 245, 246, 663, 444, 664, 665, 928, 666, 667, - 932, 826, 1011, 1012, 1013, 269, 587, 1106, 837, 1199, - 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, - 1210, 463, 674, 1281, 942, 1113, 1076, 1146, 1169, 1226, - 1292, 1141, 1342, 1319, 1367, 1368, 1369, 944, 1365, 945, - 728, 1258, 1330, 1305, 1355, 512, 1348, 1324, 1384, 907, - 1353, 1356, 1357, 1451, 1385, 1386, 1382, 1211, 1265, 1237, - 1282, 686, 1332, 1431, 1302, 1388, 1460, 464, 270, 687, + 932, 826, 1010, 1011, 1012, 269, 587, 1106, 837, 1198, + 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, + 1209, 463, 674, 1282, 941, 1113, 1076, 1143, 1167, 1225, + 1293, 1138, 1343, 1320, 1368, 1369, 1370, 943, 1366, 944, + 728, 1259, 1331, 1306, 1356, 512, 1349, 1325, 1385, 907, + 1354, 1357, 1358, 1452, 1386, 1387, 1383, 1210, 1266, 1237, + 1283, 686, 1333, 1432, 1303, 1389, 1461, 464, 270, 687, 688, 689, 690, 691, 650, 568, 1118, 651, 652, 843, - 1284, 1309, 1399, 1360, 1433, 1285, 1335, 1456, 1480, 1400, - 1401, 1478, 1464, 1465, 940, 1075, 1168, 1223, 1267, 1224, - 1225, 1259, 1316, 1288, 1260, 323, 226, 1364, 1262, 1349, - 1346, 1212, 1239, 1278, 1428, 1390, 1126, 1429, 588, 1473, - 1474, 1277, 1345, 1321, 1377, 1372, 1343, 1409, 1414, 1375, - 1378, 1379, 1459, 1415, 1373, 1374, 1469, 1457, 1458, 937, - 1020, 1137, 1111, 1162, 1138, 1139, 1176, 1072, 1160, 1187, - 532, 196, 112, 431, 198, 562, 439, 227, 1297, 648, - 649, 814, 830, 324, 406, 530, 303, 1142, 1143, 46, - 114, 304, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 255, 791, 981, 508, 715, 864, 716, - 717, 974, 137, 201, 721, 589, 590, 591, 592, 785, - 472, 473, 298, 979, 723, 407, 300, 495, 496, 497, - 498, 501, 730, 310, 745, 746, 880, 266, 478, 758, - 267, 477, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 571, - 572, 573, 767, 768, 896, 769, 155, 558, 759, 353, - 994, 546, 1055, 156, 490, 938, 1074, 1166, 1263, 465, - 1147, 1148, 1194, 1195, 815, 548, 335, 763, 1154, 549, - 550, 271, 272, 273, 159, 160, 161, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 173, - 286, 559, 174, 175, 317, 796, 627, 910, 840, 681, - 948, 908, 911, 1036, 912, 949, 950, 287, 176, 177, - 178, 1046, 985, 1047, 1048, 1049, 1092, 1050, 179, 180, - 181, 182, 698, 483, 699, 966, 1085, 700, 964, 701, - 1087, 1088, 183, 184, 185, 186, 187, 188, 305, 521, - 522, 987, 1094, 313, 963, 849, 1120, 886, 1127, 189, - 417, 190, 418, 913, 1001, 419, 639, 809, 806, 807, - 1006, 420, 421, 422, 423, 424, 425, 917, 629, 915, - 1099, 1171, 1228, 1003, 1130, 1186, 804, 635, 805, 1063, - 1005, 1064, 1131, 1007, 17, 19, 47, 48, 230, 653, - 822, 440, 654, 655, + 1285, 1310, 1400, 1361, 1434, 1286, 1336, 1457, 1481, 1401, + 1402, 1479, 1465, 1466, 939, 1075, 1166, 1222, 1268, 1223, + 1224, 1260, 1317, 1289, 1261, 323, 226, 1365, 1263, 1350, + 1347, 1211, 1239, 1279, 1429, 1391, 1126, 1430, 588, 1474, + 1475, 1278, 1346, 1322, 1378, 1373, 1344, 1410, 1415, 1376, + 1379, 1380, 1460, 1416, 1374, 1375, 1470, 1458, 1459, 831, + 1018, 1073, 1159, 1136, 1175, 1160, 1161, 1186, 1070, 1157, + 1185, 532, 196, 112, 431, 198, 562, 439, 227, 1298, + 648, 649, 814, 830, 324, 406, 530, 303, 1139, 1140, + 46, 114, 304, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 255, 791, 980, 508, 715, 864, + 716, 717, 973, 137, 201, 721, 589, 590, 591, 592, + 785, 472, 473, 298, 978, 723, 407, 300, 495, 496, + 497, 498, 501, 730, 310, 745, 746, 880, 266, 478, + 758, 267, 477, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 571, 572, 573, 767, 768, 896, 769, 155, 558, 759, + 353, 993, 546, 1053, 156, 490, 937, 1074, 1164, 1264, + 465, 1144, 1145, 1193, 1194, 815, 548, 335, 763, 1151, + 549, 550, 271, 272, 273, 159, 160, 161, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 173, 286, 559, 174, 175, 317, 796, 627, 910, 840, + 681, 947, 908, 911, 1034, 912, 948, 949, 287, 176, + 177, 178, 1044, 984, 1045, 1046, 1047, 1092, 1048, 179, + 180, 181, 182, 698, 483, 699, 965, 1085, 700, 963, + 701, 1087, 1088, 183, 184, 185, 186, 187, 188, 305, + 521, 522, 986, 1094, 313, 962, 849, 1120, 886, 1127, + 189, 417, 190, 418, 913, 1000, 419, 639, 809, 806, + 807, 1005, 420, 421, 422, 423, 424, 425, 917, 629, + 915, 1099, 1169, 1227, 1002, 1130, 1184, 804, 635, 805, + 1061, 1004, 1062, 1131, 1006, 17, 19, 47, 48, 230, + 653, 822, 440, 654, 655, }; - protected static readonly short [] yySindex = { -213, - 0, -208, -132, -211, -24,11730, 0, 74, 0, 0, - -24, -211, 0, 0, -82, 0, 6706, -24, 0, -203, - -261, 0, 0, 0, 0, 0, 0, 0, 0, 145, - 0, 163, 0, 0, 0, 492, 0, 0, 0, 0, - 0, 0, 0, 0, 371, 0, 0, 484, 0, 0, - 74, 117, -24, 0, 158, 0, 21, 197, -253,11230, - 221, 170, 256, 6863, 0, 170, 170, 170, -184, 170, - 170, 526, 0,10249, 170, 170, 0,10249, 0, 236, - 0, -253, 0, 170, 249, 170, 0, 8412,11309, 392, - 170, 170, -189,11053, 0,10249, 0,10929,10929,10929, -10929,10929,10929,10929,10929, 0, -125, 0,11749, 0, - 0, 190, 281, 338, 223, 0, 0, 312, 0, 0, + protected static readonly short [] yySindex = { -185, + 0, -190, -128, -221, -14,11657, 0, -93, 0, 0, + -14, -221, 0, 0, -72, 0, 6676, -14, 0, -173, + -247, 0, 0, 0, 0, 0, 0, 0, 0, 46, + 0, 112, 0, 0, 0, 5062, 0, 0, 0, 0, + 0, 0, 0, 0, 288, 0, 0, 335, 0, 0, + -93, 128, -14, 0, 5, 0, -36, 103, 129,11157, + 147, -272, 230, 6833, 0, -272, -272, -272, -166, -272, + -272, 374, 0,10176, -272, -272, 0,10176, 0, 267, + 0, 129, 0, -272, 228, -272, 0, 7930, 8225, 329, + -272, -272, -219,10980, 0,10176, 0,10856,10856,10856, +10856,10856,10856,10856,10856, 0, 70, 0, 8382, 0, + 0, 394, 341, 252, -233, 0, 0, 409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 688, 0, - 0, 657, 73, 473, 411, 615, 418, 442, 467, 512, - -286, 538, 0, 0, 0, 0, 0, 0, 3369, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 893, 0, + 0, 708, 168, 373, 475, 556, 447, 460, 480, 445, + -74, 498, 0, 0, 0, 0, 0, 0, 3428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 505, 569, -55, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -188, -153, - 117, 0, 400, 570, 592, 0, 557, 0, 0, 0, - 0,11749,11749, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 491, 570, 75, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -208, -174, + 128, 0, 391, 574, 589, 0, 564, 0, 0, 0, + 0, 8382, 8382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 635, 602, 0, 619, 0, - -226, 0, 0, 0, 117, 3043, 117, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 764, 634,10385, - 0, 0, 0, 0,10249, 170, 170, 790, 345, 338, - 0, 637, 0,11749, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 624, 583, 0, 586, 0, + -249, 0, 0, 0, 128,12382, 128, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 775, 630,10312, + 0, 0, 0, 0,10176, -272, -272, 781, 311, 252, + 0, 643, 0, 8382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 733, -49,11230, 0,11749, -10249, 705, 708,10249,10249, 4571, 435, -83, 736,11803, - 71, 0, 727, 0, 734,11749,10249, 741, 83, 170, - 0,10249, 236, 9705, 0, 0, 249,10249, 249, -230, - 562, 707, 0, 569, 223, 12, 718,10249,10249,10249, - 256, 763, 0, 0, 7020, -244, 0, 0, 0, 0, - 0, 0, 0, 0, 765,10249, 0, 0, 0, 940, - 0, 0,11659, -279, 771, 747, 0, -84, 0, 0, - 270, 0, 0, 729,10385, 9433, 0, 0,10929,10249, -10249,10249,10249,10249,10249,10249,10249,10249,10249,10249, -10929,10929,10929,11749,11749,10929,10929,10929,10929,10929, -10929,10929,10929,10929,10929,10929,10929,10929,10929,10929, -10929,10249, 0, 0, 0, 0, 569, 0, 0, 0, - 0,11820,11874, 748, 0, 0, 0, 0, 82, 686, - 0, 0, 0, 0, 0, 0, 0, 117, 117, 750, - 0, 754, 0, 747, 635, 635, 0, -161, 0, 591, - 635, 786, 0, -191, 3043, 0, 0, 0, 0, -186, + 0, 0, 0, 0, 0, 725, 95,11157, 0, 8382, +10176, 697, 712,10176,10176, 4630, 604, -144, 717,11676, + 183, 0, 706, 0, 715, 8382,10176, 727, 561, -272, + 0,10176, 267, 9632, 0, 0, 228,10176, 228, -92, + 456, 710, 0, 570, -233, -83, 743,10176,10176,10176, + 230, 772, 0, 0, 6990, -258, 0, 0, 0, 0, + 0, 0, 0, 0, 734,10176, 0, 0, 0, 320, + 0, 0,11586, 235, 752, 755, 0, -126, 0, 0, + 240, 0, 0, 747,10312, 9360, 0, 0,10856,10176, +10176,10176,10176,10176,10176,10176,10176,10176,10176,10176, +10856,10856,10856, 8382, 8382,10856,10856,10856,10856,10856, +10856,10856,10856,10856,10856,10856,10856,10856,10856,10856, +10856,10176, 0, 0, 0, 0, 570, 0, 0, 0, + 0,11730,11747, 758, 0, 0, 0, 0, -252, 617, + 0, 0, 0, 0, 0, 0, 0, 128, 128, 761, + 0, 778, 0, 755, 624, 624, 0, -145, 0, 399, + 624, 764, 0, -192,12382, 0, 0, 0, 0, -171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 47,12527, 0, 0, 0, 747, 172, 0, - 0, 475, 0, 806, 0, 828, 131, 236, 170, 0, - 0, 758, 7943, -221, 0, 794, 0, 0, 0, 829, - 830, 0, 343, 0, 836, 0, 832, 0, 0, 0, - 572, 0, 8079, 684,10249, 736, 9433, 0, 7491, 0, - 249, 0, 0, 0, 837, 839, 0, 0, -253, 236, - -103, 0, 4252, 840, 0, 842, 799, 0, 844, 0, -10249, 0, 0, 914, 0, 0, 0,10249, 924, 846, - 0, 849, 851, 0, 0,11659, 0, -59, 7020, 0, - 0, 0, 0, 0, 0, 0, 853, 236, 7020, 0, - 0, 195, 0, 0, 0, 249, -279, 807,11898, 0, - 856, 0, 859,10929, 0, 273, 0, 289, 0, 747, - 691,10249,10249, 862, 981, 0, 0, -31, 864, 0, - 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 657, - 657, 73, 73, 473, 473, 473, 473, 411, 411, 615, - 418, 442, 467, 512, 0, 866, -209, 0,10249, 22, - 821, 26, 831, 865,10249, 0, 0, 0, 891, 0, - 349, 747, 0, 0, 0, 0, 364, 233, 0,11898, - 591, 0, 876, 878, 0, 0, 0, 0, 0, 0, - -279, 570, 0, 879, 883, 0, 0, 0, 0, 886, -11948, 843, 0, -175, 0, 0, 347, 0,10385, 0, - 888, 0, 0, 0, 441, 892, 0, 898, 899, 904, - 0, 0,10249, 0, 0, 861, 0, 0, 884, 0, - 906,10249, 987, 0, 6863, 6863, 8238, 0, 4571, 0, - 0, 9841, 187, 0, -30, -87, 0, 854, 863, 0, - 48, 0, 0, 910, 0, 0, 0, 0, 0, 911, - 0, 920, 0, 4411, 0, 236, 0, 0, 249, 452, - 568, 0, 870, 0, 918, 926, 0, 6863, 0, 6863, - 0,10249, 0,10249,11749, 0, 0, 236, 236, 919, - 0, 0, 0, 0, 0, 0, 0, 0, 8395, 0, -11749, 0, 0, 875,11659, 954, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9297, 0, 0, 0, - 0, 9569,10249, 0, 7648, 927, 0, 0, 1006, 0, - 1008, 0, 778, 0, 929,10249,10249, 887, 0, 0, - 0, 0, 0, 890, 0, -161, 0, 0, 0, 0, - 591, 591, 0, 750, 934, 935, 893, 942, 843, 0, - 937, 0, 1054, 1058, 0, 0,10249, 0, 9977, 943, - 441,11898,11749, 0, -19, 1060, 1062, 947, 941, 0, -10249,10249, 949,10249, 1043, 0, 0, 0, 0, -101, -10113, 0, 0, 0, 0, 7784, 0, 1068, 0, 569, -10249, 961, 8238, 963, 0, 0, 921, 0, 0, 0, - 923, 383, 0, 925, 0, 941, 0, 0, 0, 957, - 0, 0, 994, 0, 0, 0, 0, 0, 0, 0, - 0, 533, 0, 0, 0,11803, 0, 0, 928, 966, - 927, 0,10249, 0,10249, 0,10249, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 975, 750, 0, 0, -10521, 0, 0, 0, 976, 7508, 0, 843, 0, 843, - 0, 843, 0, 0, 0, 0, 933, 979, 943, 0, - 0, 0, -179, -176, 978, 983, 0, 0, 0, 0, - 984, 8238, 927, -209, 0, 986, 0, 0, 991, 6863, - 0, 0, 0, 0, 0, 0, 996, 0, 736, 0, - 0, 0, 0, 0, -196, 0, 992, 383, 0, 950, - 927, 0, 0, 236, 0, 945, 989, 0, 0, 0, -10249, 1026,10249, 0,10249, 1024, 185, 0, 883, 144, - 543, 0, 0, 0, 0, -211, 0, 0, 0, 1009, - 0, 0, 0, 998, 0, 0, 0, 374, 0, 999, - 1126, 1127, 0, 0, 927, 1012, 927,10249, 0, 0, - 0, 0, 0,10249, 0, 1018, -178, 0, -178, 0, - 0, 0, 0, 1015, 236, 0,10249, 7648, 0, 0, - 1041, 797, 1017, 0,10249, 0, 1019, 0, 0,10521, - -24, 131, 0, 1020, 1020, 1020, 9977, 1030, 0,10249, - 0, 0, 0, 0, 1021, 906, 0, 6863, 1028, 0, - 0, 7020, 0, 1029, 0, 0, 1031, 0,10249, 0, - 0, 0, 0, 0, 0,10249, 0, 0, 117, 1033, - 117, 7665, -180, -180, -180, 0, 0,10249, 0, 6863, - 6863, 0, 0, 7020, 0, 0, 6863, 0, 1059,10249, -10249, 0, 117, 1040, 0, 993, 0, 1036, 0, 0, - 0, 1039, 0, 0, 1003, 0, 1075, 0, 0, 0, - 0, 0, 0, 7020, 0, 0, 1069, 0, 1046, -180, - 0, 1048, 117, 7665, 1051, 1056, 0, 1061, 1063, 1067, -10249, 0, 0, 0, 0, 1050, 1046, 0, 0, 1102, - -147, 117, 0, 0, 1071,10249, 1053,10249, 0, 0, - 1066, 0, 0, 1064, 0, 0,12527, 0, 1072, -147, + 0, 0, -168, 9092, 0, 0, 0, 755, 111, 0, + 0, 631, 0, 774, 0, 832, -161, 267, -272, 0, + 0, 797, 7913, -202, 0, 840, 0, 0, 0, 845, + 848, 0, 241, 0, 853, 0, 849, 0, 0, 0, + 654, 0, 8049, 662,10176, 717, 9360, 0, 7461, 0, + 228, 0, 0, 0, 855, 857, 0, 0, 129, 267, + 463, 0, 1429, 858, 0, 859, 814, 0, 861, 0, +10176, 0, 0, 940, 0, 0, 0,10176, 943, 865, + 0, 868, 869, 0, 0,11586, 0, -261, 6990, 0, + 0, 0, 0, 0, 0, 0, 872, 267, 6990, 0, + 0, -254, 0, 0, 0, 228, 235, 831,11801, 0, + 877, 0, 880,10856, 0, 355, 0, 366, 0, 755, + 663,10176,10176, 882, 998, 0, 0, 38, 881, 0, + 0, 0, 708, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 708, + 708, 168, 168, 373, 373, 373, 373, 475, 475, 556, + 447, 460, 480, 445, 0, 884, -191, 0,10176, -48, + 839, 20, 842, 883,10176, 0, 0, 0, 906, 0, + 545, 755, 0, 0, 0, 0, 520, 247, 0,11801, + 399, 0, 891, 892, 0, 0, 0, 0, 0, 0, + 235, 574, 0, 895, 897, 0, 0, 0, 0, 894, +11825, 0, 0, 68, 0, 0, 204, 0,10312, 0, + 896, 0, 0, 0, 542, 903, 0, 907, 909, 910, + 0, 0,10176, 0, 0, 862, 0, 0, 911, 0, + 912,10176, 995, 0, 6833, 6833, 8208, 0, 4630, 0, + 0, 9768, 189, 0, -61, -138, 0, 863, 867, 0, + -90, 0, 0, 919, 0, 0, 0, 0, 0, 932, + 0, 941, 0, 4152, 0, 267, 0, 0, 228, 370, + 560, 0, 889, 0, 951, 953, 0, 6833, 0, 6833, + 0,10176, 0,10176, 8382, 0, 0, 267, 267, 957, + 0, 0, 0, 0, 0, 0, 0, 0, 8365, 0, + 8382, 0, 0, 913,11586, 987, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9224, 0, 0, 0, + 0, 9496,10176, 0, 7618, 958, 0, 0, 1039, 0, + 1041, 0, 744, 0, 969,10176,10176, 926, 0, 0, + 0, 0, 0, 927, 0, -145, 0, 0, 0, 0, + 399, 399, 0, 761, 976, 977, 929, 983, 935, 0, + 935, 0, 1099, 1101, 0, 0,10176, 0, 9904, 990, + 542,11801, 8382, 0, 332, 1105, 1109, 997, 992, 0, +10176,10176, 999,10176, 1095, 0, 0, 0, 0, 85, +10040, 0, 0, 0, 0, 7754, 0, 1123, 0, 570, +10176, 1014, 8208, 1017, 0, 0, 964, 0, 0, 0, + 970, 239, 0, 971, 0, 992, 0, 0, 0, 1015, + 0, 0, 1047, 0, 0, 0, 0, 0, 0, 0, + 0, 421, 0, 0, 0,11676, 0, 0, 973, 1016, + 958, 0,10176, 0,10176, 0,10176, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1024, 761, 0, 0, +10448, 0, 0, 0, 1025, 1023, 935, 0, 935, 0, + 935, 0, 0, 0, 0, 982, 1026, 990, 0, 0, + 0, -167, -156, 1027, 1029, 0, 0, 0, 0, 1028, + 8208, 958, -191, 0, 1032, 0, 0, 1033, 6833, 0, + 0, 0, 0, 0, 0, 1040, 0, 717, 0, 0, + 0, 0, 0, -213, 0, 1037, 239, 0, 991, 958, + 0, 0, 267, 0, 988, 1034, 0, 0, 0,10176, + 1067,10176, 0,10176, 1065, 225, 0, 897, 219, 557, + 0, 0, 0, 0, -221, 0, 4311, 0, 0, 0, + 0, 1036, 0, 0, 0, 493, 0, 1038, 1162, 1164, + 0, 0, 958, 1049, 958,10176, 0, 0, 0, 0, + 0,10176, 0, 1055, -224, 0, -224, 0, 0, 0, + 0, 1052, 267, 0,10176, 7618, 0, 0, 1078, 782, + 1053, 0,10176, 0, 1056, 0, 0,10448, -14, -161, + 0, 0, 1061, 1054, 1054, 1054, 9904, 1060, 0,10176, + 0, 0, 0, 0, 1059, 912, 0, 6833, 1057, 0, + 0, 6990, 0, 1066, 0, 0, 1064, 0,10176, 0, + 0, 0, 0, 0, 0,10176, 0, 0, 128, 1068, + 0, 4470, -153, -153, -153, 0, 0,10176, 0, 6833, + 6833, 0, 0, 6990, 0, 0, 6833, 0, 1088,10176, +10176, 0, 128, 1069, 0, 128, 0, 0, 1070, 0, + 0, 1020, 0, 1100, 0, 0, 0, 0, 0, 0, + 6990, 0, 0, 1093, 0, 1071, -153, 1030, 0, 1075, + 0, 4470, 1076, 1083, 0, 1089, 1092, 1074,10176, 0, + 0, 0, 0, 0, 1087, 128, 0,11236, -75, 128, + 0, 0, 1104,10176, 1086, 1062, 1071, 0, 0, 1090, + 0, 0, 1096, 0, 0, 9092, 0, 1120, -75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 237,12527, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1074, 117, 0, -147, 1025, 0, 1071, 0, - 0, 1076, 1102,11475, 0, 0, 257, 0, 0, 0, -11507, 0, 0, 1078, 0, 0, 0, 0,11749,11749, - 290,11803, 301, 249, 1110, 0, -279, 9222, 0, 1144, - 0, 0, 1046, 0, 0, 0, 1046, 0, 1032, 1037, - 0,11749, -171, 0,11749, 0, 1042, 1083, 0, -279, - 0, 1087, 1023, 0, 1090, 1044, -76, 389, 492, 0, - 0, 1046, 0, -279, 0, 1094, 1070, 1093, 1092, 0, - 1098, 1037, 1119, 131, 1111, 1118, 0, 1123, 1128, 0, - 747, 0, 745, 0, 0, 0, 1125, 0, -194, 0, - 1116, 0, 0, 1129, 0, 1130, 1131, 1133, 0, 1132, - 0, 131, 131, 0, 131, 1134, 1135, 0, 0, 0, - 0, 1136, -99, 0, 1137, 131, 1243, 1138, 131, 0, - 257, 0, 8238, 1082, 1139, 1132, 0, 1142, 1145, -51, - 1148, 0, 0, 131, 9977, 1101, 1146, 1136, 0, 0, -12527, 0, 117, 117, 0, 1103, 1147, 1137, 0, 1152, - 0,10249, 1107, 1150, 1138, 0, 1155, 131, 0, -185, - 0, 1121, 0, 0, 0, 0, 0,12527, 0, -51, - -51, 1163, 1159, 0, -194, 0, 0, 176, 1164,12527, - 0,12527, 0, 0, 8238, 1154, 0, 0, 0, 1166, - 1129, 0, 0, 0, 1165, 0, -163, 0, 0, 0, - -180, 798, 1170, 0, 0, 0, 0, 0, 0, 0, - 0, 1225, 1282, 0, 0, 0, 0, 0, 1175, 1176, - 8238, 0, 0, 0, 0, -51, 483, 483, 0, -180, - 0, 0, 0, -173, -173, 0, 0, 0, 0, 0, - 0, 0, 9433, 9433, 0, 0, 0, 0, 0, 1180, - 1179, 1184, 0, 0, 0, + -248, 9092, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1121, 128, 0, -75, 1045, 0, 1104, 0,10176, + 0, 1097,11236,11402, 0, 0, -244, 0, 0, 0, +11434, 0, 0, 1122, 0, 0, 0, 0, 0, 8382, + 8382, -122,11676, -109, 228, 1154, 0, 235, 9160, 0, + 1188, 0, 0, 1071, 0, 0, 0, 1071, 0, 1081, + 1082, 0, 8382, -152, 0, 8382, 0, 1108, 1125, 0, + 235, 0, 1130, 682, 0, 1135, 1112, 1, 354, 5062, + 0, 0, 1071, 0, 235, 0, 1127, 1113, 1134, 1139, + 0, 1156, 1082, 1163, -161, 1152, 1165, 0, 1168, 1173, + 0, 755, 0, 736, 0, 0, 0, 1170, 0, -178, + 0, 1161, 0, 0, 1174, 0, 1175, 1176, 1178, 0, + 1171, 0, -161, -161, 0, -161, 1181, 1182, 0, 0, + 0, 0, 1177, -59, 0, 1183, -161, 1300, 1184, -161, + 0, -244, 0, 8208, 1141, 1185, 1171, 0, 1190, 1191, + 27, 1194, 0, 0, -161, 9904, 1142, 1189, 1177, 0, + 0, 9092, 0, 128, 128, 0, 1148, 1192, 1183, 0, + 1197, 0,10176, 1155, 1196, 1184, 0, 1202, -161, 0, + -107, 0, 1195, 0, 0, 0, 0, 0, 9092, 0, + 27, 27, 1220, 1217, 0, -178, 0, 0, -148, 1224, + 9092, 0, 9092, 0, 0, 8208, 1212, 0, 0, 0, + 1225, 1174, 0, 0, 0, 1222, 0, 83, 0, 0, + 0, -153, 834, 1228, 0, 0, 0, 0, 0, 0, + 0, 0, 1282, 1335, 0, 0, 0, 0, 0, 1229, + 1233, 8208, 0, 0, 0, 0, 27, 484, 484, 0, + -153, 0, 0, 0, -80, -80, 0, 0, 0, 0, + 0, 0, 0, 9360, 9360, 0, 0, 0, 0, 0, + 1240, 1237, 1238, 0, 0, 0, }; - protected static readonly short [] yyRindex = { 1232, - 0, 0, 7177, 1232, 0, 0, 0, 1552, 0, 0, - 2999, 2824, 0, 0, 0, 0, 0, 2999, 0, 0, - 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, + protected static readonly short [] yyRindex = { 2961, + 0, 0, 7147, 2961, 0, 0, 0, 1611, 0, 0, + 3114, 2892, 0, 0, 0, 0, 0, 3114, 0, 0, + 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1557, 0, 0, 1557, 0, 0, - 1552, 3086, 2893, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1191, 0, 0, 0, 0, 0, 0, 0, - 0,11972, 0, 1185, 0, 0, 0, 1185, 0, 0, - 0, 0, 0, 0, 216, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1613, 0, 0, 1613, 0, 0, + 1611, 3157, 3008, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1247, 0, 0, 0, 0, 0, 0, 0, + 0,11875, 0, 1239, 0, 0, 0, 1239, 0, 0, + 0, 0, 0, 0, -35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 6546, 0, 0, 0, - 0, 0, 230, 4569, 3840, 0, 0, 4410, 0, 0, + 0, 0, 0, 0, 0, 0, 3740, 0, 0, 0, + 0, 0, 171, 4628, 3581, 0, 0, 4469, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4725, 0, - 0, 4793, 5137, 5341, 5681, 5885, 6021, 6157, 6293, 6429, - 4656, 2446, 0, 0, 0, 0, 0, 0, 39, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4784, 0, + 0, 4852, 5196, 5400, 5740, 5944, 6080, 6216, 6352, 6488, + 529, 966, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1151, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 815, 815, - 3149, 0, 409, 1186, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1198, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 805, 805, + 3200, 0, 572, 1242, 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, 1557, 108, 0, 0, 0, - 0, 0, 0, 0, 3196, 333, 3243, 0, 0, 0, + 0, 0, 0, 0, 0, 1613, 47, 0, 0, 0, + 0, 0, 0, 0, 3243, 432, 3286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3456, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3515, 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, 0, 0, 0, 1195, 0, 0, 0, 0, - 3456, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2082, 0, 2484, 320, - 2212, 0, 0, 2359, 2212, 320, 0, 0, 0, 0, - 1191, 0, 0, 0, -21, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, - 0, 0, 1192, 1463, 0, 3456, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1262, 0, 0, 0, 0, + 3515, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2149, 0, 1273, 132, + 2279, 0, 0, 2426, 2279, 132, 0, 0, 0, 0, + 1247, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1239, 0, 0, 0, 0, + 0, 0, 1259, 2551, 0, 3515, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 106, 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, 0, - 0, 0, 0, 0, 0, 0, 1298, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, - 0, 0, 0, 0, 0, 0, 0, 3290, 2642, 0, - 0, 0, 0, 1929, 1557, 1557, 0, -170, 0, 7960, - 1557, 1566, 0, 0, 111, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1532, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, + 0, 0, 0, 0, 0, 0, 0, 3349, 2716, 0, + 0, 0, 0, 1996, 1613, 1613, 0, -189, 0, 7478, + 1613, 1632, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 232,11162, 0, 0, 0, 3456, 3999, 0, - 0, 0, 0, 0, 0, 0,11551, 0, 0, 0, - 0, 0, 1196, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 490, 598, 0, 0, 1203, 0, 0, 0, - 0, 0, 16, 0, 0, 3933, 1201, 0, 0, 0, - 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1633, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 296,11089, 0, 0, 0, 3515, 3899, 0, + 0, 0, 0, 0, 0, 0,11478, 0, 0, 0, + 0, 0, 1257, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 719, 785, 0, 0, 1266, 0, 0, 0, + 0, 0, 6, 0, 0, 3992, 1263, 0, 0, 0, + 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1700, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1192, 0, 0, 44, 0, - 0, 0, 0, 0, 0, 0, 0, 8552, 0, 0, - 0, 0, 0, 0, 0, -149, 202, 0, 0, 0, - 1204, 0, 0, 0, 0, 3456, 0, 3456, 0, 4092, - 0, 0, 0, -276, 0, 0, 0, 0, 154, 0, - 0, 0, 4897, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4965, - 5069, 5205, 5273, 5409, 5477, 5545, 5613, 5749, 5817, 5953, - 6089, 6225, 6361, 6485, 0, 0, 609, 0, 0, 320, - 0, 320, 0, 0, 0, 0, 0, 0, 3736, 0, - 0, 1929, 0, 0, 0, 0, 1157, 0, 0, 0, -12026, 0, 0, 595, 0, 0, 0, 0, 0, 0, - 676, 413, 0, 0, 1207, 0, 0, 0, 0, 1211, - 0, 0, 0, 0, 0, 0,10657, 0, 0, 0, - 625, 0, 0, 0,12043, 0, 0, 654, 732, 737, + 0, 0, 0, 0, 0, 1259, 0, 0, 31, 0, + 0, 0, 0, 0, 0, 0, 0, 8522, 0, 0, + 0, 0, 0, 0, 0, -181, 385, 0, 0, 0, + 1264, 0, 0, 0, 0, 3515, 0, 3515, 0, 4151, + 0, 0, 0, 90, 0, 0, 0, 0, 144, 0, + 0, 0, 4956, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 5024, + 5128, 5264, 5332, 5468, 5536, 5604, 5672, 5808, 5876, 6012, + 6148, 6284, 6420, 6544, 0, 0, 597, 0, 0, 132, + 0, 132, 0, 0, 0, 0, 0, 0, 1231, 0, + 0, 1996, 0, 0, 0, 0, 1219, 0, 0, 0, +11899, 0, 0, 641, 0, 0, 0, 0, 0, 0, + 519, 626, 0, 0, 1268, 0, 0, 0, 0, 1275, + 0, 0, 0, 0, 0, 0,10584, 0, 0, 0, + 733, 0, 0, 0,11953, 0, 0, 732, 746, 749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1205, 0, 0, 0, 0, 0, 0, 0, 1215, 0, - 0, 0, 3522, 0, 0, 51, 0, 59, 3615, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1216, - 0, 0, 0, 0, 0, 0, 0, 0, 138, 650, - 456, 0, 0, 0, 0, 1213, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8552, 0, + 1270, 0, 0, 0, 0, 0, 0, 0, 1285, 0, + 0, 0, 1124, 0, 0, 41, 0, 117, 3674, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1286, + 0, 0, 0, 0, 0, 0, 0, 0, -68, 595, + 650, 0, 0, 0, 0, 1278, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8522, 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, -255, 0, 0, 0, 1210, 0, 0, 0, 0, - 0, 0, 366, 0, 587, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -170, 0, 0, 0, 0, -12043, 8255, 0, 1209, 0, 696, 0, 0, 0, 0, - 1221, 0, 1171, 1172, 0, 0, 0, 0, 0, 1217, -12097, 0, 0, 0,11627, 0, 0, 0, 752, 0, - 1222, 0, 0, 0, 1800, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3774, - 0, 4251, 1223, 0, 0, 0, 1227, 0, 0, 0, - 0, 650, 0, 0, 0, 752, 0, 0, 0, 0, + 0, 162, 0, 0, 0, 1288, 0, 0, 0, 0, + 0, 0, 458, 0, 677, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -189, 0, 0, 0, 0, +11953, 7635, 0, 1291, 0, 680, 0, 0, 0, 0, + 0, 0, 1248, 1258, 0, 0, 0, 0, 0, 1289, +11970, 0, 0, 0,11554, 0, 0, 0, 748, 0, + 1299, 0, 0, 0, 1867, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3833, + 0, 4310, 1309, 0, 0, 0, 1306, 0, 0, 0, + 0, 595, 0, 0, 0, 748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1226, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 756, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1228, 0, - 0, 0, 0, 0, 759, 767, 0, 0, 0, 0, - 0, 0, 1234, 609, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3933, 0, - 0, 0, 0, 0, 1229, 0, 0, 650, 0, 802, - 1234, 0, 0, 8552, 0, 583, 604, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 203, 0, 1207, 8602, - 0, 0, 0, 0, 0,12139, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 630, 0, 661, - 0, 0, 0, 0, 1239, 0, 1210, 1240, 0, 0, - 0, 0, 0, 0, 0, 0, 1245, 0, 7334, 0, - 0, 0, 0, 0, 8552, 0, 0, 0, 0, 0, - 0, 477, 643, 0, 0, 0, 0, 0, 0, 0, -12215,11551, 0, 89, 89, 89, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1244, 0, 0, 0, 0, + 751, 0, 0, 0, 0, 1313, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1305, 0, 0, + 0, 0, 0, 790, 794, 0, 0, 0, 0, 0, + 0, 1310, 597, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3992, 0, 0, + 0, 0, 0, 1315, 0, 0, 595, 0, 828, 1310, + 0, 0, 8522, 0, 614, 636, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 44, 0, 1268, 8572, 0, + 0, 0, 0, 0,12001, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 671, 0, 692, 0, 0, + 0, 0, 858, 0, 1288, 1312, 0, 0, 0, 0, + 0, 0, 0, 0, 1319, 0, 7304, 0, 0, 0, + 0, 0, 8522, 0, 0, 0, 0, 0, 0, 588, + 703, 0, 0, 0, 0, 0, 0, 0,12044,11478, + 0, 0, 0, -51, -51, -51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,12258, 0, - 52, 0, 1250, 1250, 1250, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,12113, 0, + 0, 0, 1323, 1323, 1323, 0, 0, 0, 0, 0, 0, 0, 0, -205, 0, 0, 0, 0, 0, 0, - 0, 0,12301, 0, 0, 0, 0, 1252, 0, 0, - 0, 110, 0, 0, 0, 0, 525, 0, 0, 0, - 0, 0, 0, 1253, 0, 0, 0, 0, 2956, 1242, - 596, 0, 164, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2761, 0, 0, 0, - 8756, 8954, 0, 0, 659, 0, 0, 0, 0, 0, - 0, 0, 0, 353, 0, 0,11333, 0, 0, 8855, + 0, 0,12156, 0, 0, 64, 0, 0, 109, 0, + 0, 0, 0, 540, 0, 0, 0, 0, 0, 0, + 1324, 0, 0, 0, 0, 3071, 1317, 0, 0, 1327, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 485, 0, 154, 0, 0, 8726, 8924, + 0, 0, 728, 0, 0, 0, 2829, 0, 0, 0, + 0, 0, 397, 0, 0,11260, 0, 0, 8825, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,11401, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9048, 0, 8756, 0, 0, 659, 0, - 0, 0, 0, 232, 0, 0, 0, 0, 0, 0, - 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 9160, 264, 0, 9090, 0, 0, 0, - 9190, 0, 2761, 0, 0, 0, 2761, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, - 0, 1255, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2761, 0, 425, 0, 386, 0, 0, 0, 0, - 0, 0, 0,11551, 766, 0, 0, 0, 0, 0, - 1251, 0, 704, 0, 0, 0, 0, 0, 0, 0, - 770, 0, 0, 0, 0, 0, 0, 0, 0, 1249, - 0,11551,11551, 0,11583, 0, 0, 0, 0, 0, - 0, 1254,12487, 0, 1256,11551,10793, 1259,11551, 0, - 0, 0, 0, 0, 0, 1262, 0, 0, 0,12457, - 0, 0, 0,11551, 0, 0, 0, 1263, 0, 0, - 198, 0,11084,12419, 0, 0, 0, 1264, 0, 0, - 0, 0, 0, 0, 1265, 0, 0,11551, 0, 527, - 0, 774, 0, 0, 0, 0, 0, 816, 0,12343, -12381, 0, 0, 0, 0, 0, 0, 0, 0, 1311, - 0, 1364, 0, 0, 0, 782, 0, 0, 0, 0, + 0,11328, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9018, 0, 8726, 0, 0, 728, 0, 0, + 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, + 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4758, 344, 0, 9060, 0, 0, + 0, 9130, 0, 2829, 0, 0, 0, 2829, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 544, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 307, 0, 1330, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2829, 0, 425, 0, 442, 0, 0, 0, + 0, 0, 0, 0,11478, 798, 0, 0, 0, 0, + 0, 1325, 0, 767, 0, 0, 0, 0, 0, 0, + 0, 806, 0, 0, 0, 0, 0, 0, 0, 0, + 1329, 0,11478,11478, 0,11510, 0, 0, 0, 0, + 0, 0, 1331,12342, 0, 1333,11478,10720, 1336,11478, + 0, 0, 0, 0, 0, 0, 1337, 0, 0, 0, +12312, 0, 0, 0,11478, 0, 0, 0, 1339, 0, + 0, 266, 0, 1470,12274, 0, 0, 0, 1340, 0, + 0, 0, 0, 0, 0, 1342, 0, 0,11478, 0, + 548, 0, 818, 0, 0, 0, 0, 0, 838, 0, +12198,12236, 0, 0, 0, 0, 0, 0, 0, 0, + 1386, 0, 1440, 0, 0, 0, 819, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,12457, 9122,10965, 0, 544, + 0, 559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1201, 1201, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,12312, 382,10892, 0, + 559, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1263, 1263, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, }; protected static readonly short [] yyGindex = { 0, - 0, 1577, 0, 0, 0, -1, -12, -182, -47, 1591, - 0, 1617, 1650, 79, 0, 0, -6, 0, 0, 0, - 0, 0, 0, -867, -692, -224, -498, 0, 0, 0, - 0, 0, -192, 0, 0, 0, 728, 0, 833, 0, - 0, 0, 0, 589, 593, -17, -231, 0, 0, 436, - 0, 461, -605, -546, -538, -530, -525, -511, -510, -503, - 0,-1147, 0, 9, 0, 119, 0,-1056, 0, 0, - 0, 17, 259, 0, 0, 0, 299,-1040, 0, -270, - -297, 1004, 0, 0, 0, -873, 268, 0, 0, -491, - 0, 0, 322, 0, 0, 327, 0, 0, 362, 0, - -470, -837, 0, 0, 0, 0, 0, 457, -13, 0, - 0, 872, 877, 881, 1035, -528, 0, 0, -318, 882, - 454, 0,-1307, 0, 0, 0, 0, 0, 0, 0, - 0, 263, 0, 0, 0, 0, 0, 0, 0, 0, - 506, 0, 0, 0, 0, -278, 440, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 519, 0, -500, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 274, 0, - 0, 356, 0, 0, 361, 365, 279, 0, 0, 0, - 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, - -71, 0, -7, -58, 0, 0, 427, 0, 485, 0, - 930, 0, 1218, -290, -268, -61, 644, 0, 578, 0, - -35, -9, 0, 0, 77, 0, 0, 0, 0, 0, + 0, 1655, 0, 0, 0, -1, -12, -179, -50, 1659, + 0, 1707, 1715, 87, 0, 0, -3, 0, 0, 0, + 0, 0, 0, -781, -693, -222, -446, 0, 0, 0, + 0, 0, -198, 0, 0, 0, 793, 0, 898, 0, + 0, 0, 0, 655, 657, -17, -235, 0, 0, 501, + 0, 528, -686, -685, -617, -594, -592, -575, -571, -553, + 0,-1140, 0, 12, 0, 131, 0,-1061, 0, 0, + 0, -8, 322, 0, 0, 0, 361,-1046, 0, -280, + -291, 1073, 0, 0, 0, -871, 310, 0, 0, -493, + 0, 0, 378, 0, 0, 350, 0, 0, 386, 0, + -555, -806, 0, 0, 0, 0, 0, 478, -13, 0, + 0, 905, 908, 916, 1063, -524, 0, 0, -326, 899, + 468, 0,-1078, 0, 0, 0, 0, 0, 0, 0, + 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, + 532, 0, 0, 0, 0, -339, 462, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 546, 0, -498, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, + 0, 377, 0, 0, 387, 390, 306, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 592, 0, 0, 0, + 0, -53, 0, -15, -67, 0, 0, 455, 0, 511, + 0, 959, 0, 1251, -293, -274, -64, 622, 0, 616, + 0, -38, 158, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -267, 0, 555, 0, 0, -406, 0, 0, 0, - 885, 0, -296, -139, 1038, 958, 0, 952, 0, 1169, - 1382, 1079, 0, 0, 769, 1677, 0, 0, 0, 0, - 1045, 0, 0, 0, 0, 0, -485, 1422, 0, 0, - 0, 0, 1661, 1084, 0, 0, 107, 803, 730, 804, - 1363, 1365, 1362, 1367, 1369, 0, 1366, 0, 0, 0, - 988, 1224, -723, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -284, 0, 0, 0, 0, -441, - 0, 626, 0, 539, 0, 620, 0, 0, 0, 683, - -532, -16, -313, -5, 0, 1618, 0, 72, 0, 93, - 96, 99, 103, 113, 116, 121, 123, 135, 143, 0, - -619, 0, -29, 0, 0, 812, 0, 742, 0, 0, - 0, 720, -793, 789, -833, 0, 834, -457, 0, 0, - 0, 0, 0, 0, 735, 0, 0, 738, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 743, - 0, 0, 0, 0, 0, 0, 0, 0, -38, 0, - 1267, 0, 0, 0, 900, 0, 0, 0, 0, 0, - -174, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1370, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 556, 0, 0, 0, 0, 0, 0, 0, - 0, 653, 0, 0, 0, 0, 0, 0, -20, 967, - 0, 0, 0, 970, + 0, 0, -262, 0, 1292, 0, 0, -279, 0, 0, + 0, 917, 0, -299, -134, 1077, 989, 0, 994, 0, + 1207, 1427, 1116, 0, 0, 820, 1724, 0, 0, 0, + 0, 1098, 0, 0, 0, 0, 0, -537, 1466, 0, + 0, 0, 0, 1705, 1085, 0, 0, 483, 821, 678, + 817, 1405, 1407, 1404, 1406, 1409, 0, 1411, 0, 0, + 0, 1035, 1267, -723, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -290, 0, 0, 0, 0, + -445, 0, 670, 0, 582, 0, 666, 0, 0, 0, + 726, -526, -16, -305, -7, 0, 1660, 0, 42, 0, + 51, 53, 60, 76, 89, 104, 108, 110, 122, 134, + 0, -664, 0, -28, 0, 0, 860, 0, 786, 0, + 0, 0, 766, -325, 830, -820, 0, 876, -457, 0, + 0, 0, 0, 0, 0, 780, 0, 0, 784, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 791, 0, 0, 0, 0, 0, 0, 0, 0, -40, + 0, 1307, 0, 0, 0, 947, 0, 0, 0, 0, + 0, -170, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1415, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 608, 0, 0, 0, 0, 0, 0, + 0, 0, 709, 0, 0, 0, 0, 0, 0, 39, + 1042, 0, 0, 0, 1031, }; protected static readonly short [] yyTable = { 110, - 157, 510, 18, 111, 236, 191, 724, 115, 428, 513, - 446, 158, 197, 194, 44, 427, 764, 729, 471, 403, - 486, 552, 675, 316, 260, 697, 770, 232, 494, 506, - 262, 540, 996, 529, 569, 892, 1116, 874, 920, 308, - 774, 359, 1, 367, 466, 254, 794, 14, 352, 1234, - 115, 360, 192, 368, 115, 535, 302, 1149, 1150, 1043, - 302, 1340, 780, 531, 658, 1241, 309, 410, 311, 668, - 1426, 1044, 702, 20, 570, 1144, 1027, 999, 336, 1029, - 197, 197, 1475, 291, 1299, 855, 856, 331, 162, 1044, - 659, 292, 1434, 1435, 646, 623, 832, 623, 442, 200, - 1449, 197, 410, 1175, 322, 327, 360, 346, 1196, 163, - 6, 349, 164, 95, 400, 165, 452, 252, 452, 166, - 833, 818, 660, 48, 16, 355, 401, 554, 885, 167, - 887, 200, 168, 471, 350, 48, 261, 169, 628, 170, - 345, 110, 157, 236, 2, 111, 2, 834, 1466, 115, - 411, 171, 623, 158, 869, 412, 1370, 413, 1145, 172, - 349, 1450, 780, 414, 415, 519, 253, 199, 865, 1035, - 261, 795, 502, 452, 261, 261, 261, 261, 261, 261, - 261, 261, 736, 350, 555, 411, 1341, 445, 346, 1427, - 412, 43, 413, 95, 197, 197, 703, 1035, 414, 415, - 352, 999, 1476, 446, 1397, 437, 718, 234, 722, 15, - 3, 4, 5, 6, 193, 857, 780, 347, 435, 436, - 360, 234, 360, 1408, 360, 1045, 661, 569, 332, 333, - 162, 669, 470, 293, 1110, 552, 466, 474, 1028, 443, - 416, 1030, 352, 1045, 742, 552, 1300, 48, 1312, 348, - 1432, 163, 260, 536, 164, 528, 197, 165, 482, 533, - 260, 166, 1442, 537, 1443, 349, 971, 570, 360, 234, - 1056, 167, 871, 485, 168, 426, 489, 491, 115, 169, - 476, 170, 197, 503, 527, 504, 866, 252, 350, 516, - 570, 1174, 197, 171, 524, 920, 526, 575, 197, 525, - 489, 172, 351, 869, 115, 538, 484, 557, 761, 1189, - 20, 542, 543, 953, 920, 798, 1067, 234, 551, 800, - 408, 955, 515, 671, 1404, 115, 480, 672, 302, 553, - 49, 1096, 819, 576, 384, 55, 253, 862, 518, 505, - 789, 1313, 197, 577, 655, 197, 679, 470, 586, 234, - 1040, 519, 594, 595, 596, 597, 598, 599, 600, 601, - 602, 603, 604, 346, 261, 656, 561, 6, 520, 762, - 385, 570, 261, 409, 1452, 643, 197, 197, 1273, 481, - 236, 983, 636, 435, 626, 447, 683, 636, 673, 248, - 647, 636, 742, 249, 967, 1290, 989, 790, 863, 1291, - 608, 609, 349, 1472, 197, 197, 636, 679, 848, 676, - 352, 680, 349, 347, 644, 645, 349, 870, 436, 312, - 656, 871, 197, 641, 1318, 350, 920, 655, 631, 633, - 636, 637, 920, 636, 352, 350, 197, 662, 1439, 350, - 410, 494, 447, 250, 435, 261, 346, 471, 656, 202, - 386, 387, 636, 696, 973, 655, 569, 261, 261, 261, - 636, 349, 261, 261, 692, 982, 1328, 203, 1122, 48, - 1034, 684, 680, 115, 346, 593, 656, 358, 346, 436, - 346, 346, 346, 346, 350, 234, 347, 720, 346, 586, - 1440, 727, 610, 611, 1358, 1359, 570, 1361, 351, 234, - 1152, 1153, 1052, 634, 1053, 733, 735, 1155, 1380, 353, - 638, 1387, 636, 751, 347, 743, 741, 779, 677, 781, - 753, 782, 951, 411, 1068, 448, 1403, 634, 412, 347, - 413, 314, 551, 247, 349, 635, 414, 415, 197, 115, - 252, 946, 551, 553, 766, 1271, 677, 874, 874, 115, - 1425, 873, 873, 553, 634, 353, 1274, 350, 331, 635, - 903, 197, 349, 570, 784, 784, 965, 861, 771, 718, - 331, 351, 251, 599, 331, 599, 1215, 349, 867, 357, - 697, 48, 448, 811, 732, 350, 635, 331, 358, 253, - 358, 764, 358, 358, 1272, 358, 263, 358, 324, 351, - 350, 978, 95, 1125, 636, 1275, 816, 356, 315, 636, - 772, 797, 1238, 636, 351, 513, 264, 803, 1215, 331, - 288, 289, 290, 95, 294, 295, 265, 874, 636, 306, - 307, 873, 1264, 732, 315, 1216, 312, 357, 314, 358, - 318, 358, 197, 1217, 358, 329, 330, 324, 817, 45, - 261, 1218, 835, 358, 352, 636, 1219, 812, 336, 836, - 113, 470, 336, 197, 331, 115, 315, 115, 366, 813, - 1220, 1221, 115, 260, 636, 489, 331, 1216, 1222, 533, - 831, 722, 1198, 1214, 853, 1217, 350, 578, 331, 727, - 369, 662, 331, 1218, 720, 115, 115, 579, 1219, 1015, - 778, 1198, 350, 113, 904, 331, 336, 113, 252, 904, - 361, 904, 1220, 1221, 904, 904, 780, 904, 904, 662, - 1222, 432, 878, 707, 810, 1214, 197, 1198, 662, 362, - 363, 325, 325, 349, 888, 349, 889, 331, 115, 904, - 115, 228, 1078, 229, 891, 766, 563, 197, 841, 364, - 877, 895, 325, 564, 1079, 95, 350, 253, 350, 277, - 365, 277, 328, 197, 1314, 565, 277, 197, 647, 586, - 351, 890, 351, 1089, 586, 905, 204, 727, 552, 946, - 430, 331, 65, 65, 331, 261, 65, 897, 921, 922, - 349, 336, 390, 391, 904, 336, 350, 331, 336, 1295, - 336, 396, 113, 879, 499, 336, 392, 393, 500, 1119, - 552, 312, 1308, 350, 366, 907, 197, 662, 205, 943, - 907, 485, 907, 643, 324, 907, 907, 324, 907, 907, - 397, 1326, 1066, 489, 197, 197, 969, 935, 1015, 336, - 552, 675, 349, 972, 678, 325, 325, 1151, 679, 95, - 907, 398, 507, 980, 228, 727, 231, 493, 1173, 954, - 331, 1391, 331, 493, 523, 350, 388, 389, 206, 207, - 208, 209, 879, 210, 211, 212, 213, 214, 215, 216, - 217, 331, 331, 218, 219, 220, 221, 222, 223, 224, - 225, 658, 296, 268, 297, 1000, 563, 1002, 197, 1004, - 658, 331, 268, 564, 995, 907, 792, 325, 446, 331, - 657, 399, 331, 1014, 1069, 565, 1070, 1231, 357, 657, - 197, 662, 405, 1444, 357, 898, 1133, 402, 197, 811, - 898, 113, 898, 325, 432, 898, 898, 297, 898, 898, - 881, 710, 432, 325, 727, 711, 1021, 315, 1022, 325, - 1023, 352, 1019, 315, 760, 1261, 760, 113, 760, 1463, - 115, 513, 1261, 317, 940, 494, 940, 433, 410, 317, - 410, 494, 1481, 1482, 434, 749, 318, 749, 113, 749, - 766, 900, 740, 1059, 740, 1061, 900, 1062, 900, 410, - 410, 900, 900, 325, 900, 900, 325, 894, 751, 167, - 751, 167, 894, 167, 894, 228, 331, 894, 894, 410, - 894, 894, 394, 395, 1071, 898, 438, 410, 331, 467, - 410, 331, 331, 155, 411, 155, 485, 325, 325, 412, - 179, 413, 179, 693, 179, 331, 441, 414, 415, 1097, - 727, 766, 381, 382, 383, 331, 331, 1104, 331, 331, - 57, 468, 1014, 719, 475, 325, 325, 500, 1109, 485, - 783, 236, 485, 1136, 679, 66, 331, 946, 370, 66, - 346, 900, 479, 734, 346, 551, 331, 346, 115, 346, - 487, 1129, 115, 488, 346, 236, 553, 894, 1132, 371, - 372, 373, 374, 375, 376, 377, 378, 379, 380, 358, - 485, 162, 509, 162, 197, 545, 163, 551, 163, 514, - 115, 115, 1157, 1062, 115, 1136, 517, 115, 553, 614, - 615, 616, 617, 851, 534, 851, 113, 68, 185, 68, - 185, 918, 919, 1197, 1213, 539, 156, 551, 156, 120, - 556, 120, 574, 282, 115, 282, 580, 127, 553, 127, - 1101, 1102, 1197, 1185, 657, 289, 197, 289, 350, 438, - 350, 1453, 1454, 873, 873, 634, 325, 354, 1229, 704, - 485, 642, 197, 517, 517, 694, 1213, 680, 1197, 636, - 636, 337, 338, 339, 340, 341, 342, 343, 344, 325, - 612, 613, 113, 1114, 1115, 560, 1193, 618, 619, 682, - 705, 706, 113, 708, 25, 709, 26, 752, 731, 27, - 732, 747, 325, 748, 28, 750, 749, 754, 29, 755, - 756, 1306, 757, 1266, 773, 197, 197, 31, 765, 775, - 776, 35, 787, 197, 33, 1306, 788, 792, 799, 34, - 793, 197, 197, 35, 197, 802, 808, 820, 801, 1193, - 1286, 821, 1336, 823, 1337, 37, 824, 38, 827, 851, - 43, 39, 1286, 844, 197, 1269, 1270, 197, 839, 40, - 41, 845, 846, 42, 1315, 1286, 319, 847, 850, 852, - 854, 872, 199, 447, 873, 868, 875, 882, 1298, 883, - 893, 1301, 898, 325, 1286, 1371, 900, 498, 884, 914, - 909, 916, 920, 930, 923, 931, 448, 924, 934, 939, - 933, 936, 1398, 941, 325, 959, 947, 960, 961, 449, - 968, 962, 970, 977, 451, 1410, 1412, 503, 992, 452, - 984, 453, 454, 455, 456, 727, 993, 1266, 986, 457, - 988, 998, 990, 458, 1008, 997, 1017, 485, 113, 113, - 1024, 1031, 1398, 1398, 1025, 459, 1032, 354, 460, 1033, - 461, 1038, 1039, 1051, 1420, 1041, 25, 1057, 26, 1058, - 879, 27, 1060, 1190, 1065, 1073, 28, 325, 1077, 1080, - 29, 1081, 1082, 1083, 462, 1090, 1095, 1100, 1105, 31, - 1103, 113, 1121, 113, 1112, 1125, 33, 727, 325, 1117, - 1128, 34, 1123, 1191, 1135, 35, 1156, 1159, 1398, 1163, - 1161, 541, 1164, 1145, 325, 1177, 1172, 37, 325, 38, - 1165, 1173, 1181, 39, 1192, 1180, 1227, 1182, 1230, 1183, - 1188, 40, 41, 727, 1184, 42, 1232, 1233, 319, 1235, - 1294, 1242, 1245, 1468, 1468, 1268, 1276, 1247, 1289, 1293, - 1477, 1477, 541, 1304, 1294, 586, 586, 1307, 1310, 1303, - 1320, 1311, 331, 1322, 605, 606, 607, 1323, 1325, 541, + 157, 236, 18, 111, 197, 191, 513, 510, 724, 158, + 486, 428, 446, 570, 471, 729, 194, 44, 675, 427, + 316, 260, 764, 506, 403, 697, 569, 529, 540, 552, + 1116, 262, 770, 494, 995, 892, 874, 308, 466, 352, + 855, 856, 1041, 1042, 774, 254, 347, 410, 360, 535, + 368, 921, 1146, 1147, 1042, 1234, 302, 331, 162, 359, + 302, 367, 781, 658, 794, 14, 309, 163, 311, 164, + 1, 1241, 197, 197, 361, 442, 165, 1341, 336, 322, + 327, 410, 192, 885, 668, 887, 232, 20, 1025, 659, + 998, 702, 166, 197, 683, 1173, 636, 637, 252, 1027, + 355, 291, 1141, 1300, 48, 167, 761, 200, 671, 292, + 646, 502, 672, 554, 1440, 261, 48, 865, 1125, 771, + 168, 660, 95, 357, 169, 818, 170, 1238, 16, 471, + 411, 1265, 628, 1272, 6, 412, 2, 413, 171, 200, + 236, 110, 157, 414, 415, 111, 1275, 253, 1427, 261, + 172, 158, 315, 261, 261, 261, 261, 261, 261, 261, + 261, 772, 781, 49, 411, 869, 1441, 762, 43, 412, + 555, 413, 2, 673, 115, 1476, 638, 414, 415, 684, + 1195, 199, 1273, 742, 445, 1142, 197, 197, 361, 795, + 361, 352, 361, 435, 436, 1276, 1371, 1043, 332, 333, + 162, 531, 1342, 718, 656, 446, 570, 234, 1043, 163, + 538, 164, 998, 857, 722, 703, 781, 115, 165, 569, + 416, 115, 503, 234, 504, 661, 252, 15, 48, 570, + 466, 1409, 470, 352, 166, 866, 361, 474, 3, 4, + 5, 6, 443, 552, 193, 798, 669, 167, 197, 260, + 1026, 293, 528, 552, 426, 476, 533, 260, 1433, 482, + 537, 1028, 168, 1110, 437, 1301, 169, 1428, 170, 1054, + 1443, 536, 1444, 485, 197, 253, 489, 491, 505, 870, + 171, 484, 1398, 871, 197, 527, 95, 656, 575, 516, + 197, 576, 172, 234, 524, 1477, 526, 515, 349, 525, + 489, 577, 347, 354, 1038, 557, 862, 349, 921, 234, + 570, 542, 543, 800, 1065, 656, 115, 952, 551, 1405, + 20, 350, 1435, 1436, 819, 1313, 400, 553, 302, 1096, + 350, 742, 248, 733, 197, 345, 249, 197, 401, 832, + 869, 561, 349, 261, 988, 55, 1450, 470, 586, 354, + 202, 261, 594, 595, 596, 597, 598, 599, 600, 601, + 602, 603, 604, 833, 657, 350, 643, 863, 197, 197, + 1453, 680, 921, 436, 1172, 608, 609, 236, 1467, 982, + 247, 1274, 733, 346, 626, 347, 250, 647, 875, 875, + 834, 6, 874, 874, 966, 234, 197, 197, 681, 1473, + 676, 352, 848, 631, 633, 1231, 637, 1451, 437, 789, + 349, 637, 347, 347, 197, 637, 203, 347, 1314, 347, + 347, 347, 347, 1122, 261, 352, 641, 347, 197, 384, + 637, 313, 680, 350, 436, 570, 261, 261, 261, 359, + 662, 261, 261, 471, 348, 115, 494, 657, 569, 1050, + 408, 1051, 970, 347, 696, 1149, 1150, 637, 871, 681, + 349, 624, 1152, 624, 692, 385, 790, 1032, 875, 437, + 480, 115, 874, 644, 645, 657, 637, 448, 251, 656, + 410, 48, 1291, 350, 921, 677, 1292, 720, 332, 586, + 921, 727, 115, 1214, 1215, 95, 234, 351, 1329, 252, + 332, 349, 570, 409, 332, 733, 735, 743, 779, 835, + 781, 1319, 782, 751, 950, 449, 836, 332, 624, 741, + 753, 315, 263, 481, 350, 347, 1359, 1360, 637, 1362, + 197, 347, 551, 453, 448, 453, 1214, 1215, 351, 325, + 1381, 553, 551, 1388, 766, 386, 387, 945, 253, 332, + 359, 553, 359, 197, 359, 359, 903, 359, 1404, 359, + 964, 347, 1216, 411, 784, 784, 718, 635, 412, 861, + 413, 48, 449, 349, 811, 560, 414, 415, 697, 349, + 637, 972, 1426, 867, 25, 1217, 26, 1218, 325, 27, + 453, 635, 981, 677, 28, 977, 350, 764, 29, 1066, + 265, 359, 350, 359, 1219, 1216, 359, 31, 1220, 349, + 351, 797, 513, 315, 33, 636, 351, 803, 635, 34, + 816, 707, 252, 35, 361, 349, 1221, 45, 1217, 261, + 1218, 349, 350, 95, 197, 37, 1033, 38, 113, 636, + 115, 39, 28, 362, 363, 352, 351, 1219, 350, 40, + 41, 1220, 350, 42, 350, 197, 319, 578, 228, 879, + 229, 470, 817, 364, 1033, 28, 636, 579, 351, 1221, + 260, 253, 954, 337, 365, 489, 533, 337, 28, 332, + 115, 113, 115, 28, 853, 113, 722, 115, 28, 727, + 28, 28, 28, 28, 720, 1014, 28, 357, 28, 328, + 234, 349, 28, 637, 563, 228, 115, 231, 637, 325, + 325, 564, 637, 358, 28, 1296, 115, 28, 197, 28, + 95, 337, 878, 565, 350, 877, 315, 637, 1309, 1315, + 325, 519, 1197, 1213, 888, 663, 889, 354, 351, 197, + 296, 332, 297, 28, 891, 766, 890, 1327, 736, 28, + 28, 895, 1197, 332, 637, 197, 600, 332, 600, 197, + 349, 1089, 897, 663, 261, 647, 388, 389, 350, 586, + 332, 430, 663, 637, 586, 905, 1213, 727, 1197, 350, + 113, 349, 778, 350, 581, 945, 552, 369, 921, 922, + 879, 337, 994, 780, 792, 337, 905, 332, 337, 1119, + 337, 905, 332, 905, 350, 337, 905, 905, 197, 905, + 905, 356, 357, 812, 643, 277, 518, 277, 552, 942, + 662, 485, 277, 325, 325, 813, 197, 197, 432, 519, + 396, 905, 1014, 489, 953, 1064, 968, 1148, 675, 337, + 935, 315, 936, 971, 399, 552, 520, 563, 397, 841, + 95, 593, 318, 979, 564, 727, 390, 391, 318, 1171, + 1392, 1078, 115, 115, 398, 319, 565, 581, 610, 611, + 392, 393, 581, 1079, 581, 581, 581, 581, 581, 581, + 581, 581, 581, 581, 581, 325, 905, 402, 332, 332, + 197, 332, 332, 57, 1262, 999, 581, 1001, 581, 1003, + 581, 1262, 581, 581, 581, 115, 659, 115, 405, 113, + 446, 325, 197, 1013, 268, 659, 357, 432, 581, 811, + 810, 325, 1445, 268, 662, 658, 908, 325, 1067, 1133, + 1068, 908, 881, 908, 658, 113, 908, 908, 297, 908, + 908, 352, 447, 727, 332, 315, 432, 332, 1019, 1247, + 1020, 332, 1021, 394, 395, 411, 113, 581, 1464, 513, + 412, 908, 413, 332, 433, 448, 332, 332, 414, 415, + 741, 325, 741, 499, 325, 1482, 1483, 500, 449, 766, + 332, 434, 1057, 451, 1059, 761, 1060, 761, 452, 761, + 453, 454, 455, 456, 228, 65, 65, 438, 457, 65, + 678, 197, 458, 441, 679, 325, 325, 750, 1072, 750, + 941, 750, 941, 1069, 459, 899, 908, 460, 325, 461, + 899, 325, 899, 710, 485, 899, 899, 711, 899, 899, + 467, 719, 783, 325, 325, 500, 679, 1097, 727, 766, + 167, 901, 167, 462, 167, 1104, 901, 468, 901, 66, + 1013, 901, 901, 66, 901, 901, 1109, 331, 236, 485, + 475, 179, 485, 179, 479, 179, 895, 614, 615, 616, + 617, 895, 487, 895, 945, 551, 895, 895, 358, 895, + 895, 1129, 236, 509, 553, 1158, 494, 488, 1132, 332, + 514, 332, 494, 381, 382, 383, 197, 918, 919, 1295, + 485, 155, 517, 155, 113, 899, 752, 551, 752, 556, + 332, 332, 1154, 1060, 545, 162, 553, 162, 163, 852, + 163, 852, 68, 574, 68, 1158, 115, 534, 1196, 1212, + 332, 901, 657, 347, 551, 1101, 1102, 347, 332, 332, + 347, 332, 347, 553, 325, 680, 197, 347, 1196, 350, + 438, 1183, 495, 874, 874, 411, 895, 411, 495, 185, + 539, 185, 197, 156, 580, 156, 1228, 325, 350, 1192, + 113, 120, 1212, 120, 1196, 634, 411, 411, 354, 282, + 113, 282, 337, 338, 339, 340, 341, 342, 343, 344, + 325, 127, 289, 127, 289, 642, 411, 1454, 1455, 518, + 518, 637, 637, 682, 411, 1114, 1115, 411, 612, 613, + 618, 619, 485, 1307, 694, 704, 705, 197, 197, 706, + 708, 583, 709, 1267, 1192, 197, 731, 1307, 732, 747, + 748, 749, 750, 752, 197, 197, 754, 197, 755, 756, + 757, 1270, 1271, 1287, 1337, 115, 1338, 765, 773, 115, + 775, 776, 787, 788, 792, 1287, 799, 197, 793, 801, + 197, 808, 820, 802, 1299, 821, 827, 1302, 1287, 823, + 824, 325, 357, 370, 844, 1316, 839, 115, 115, 850, + 845, 115, 846, 847, 115, 852, 851, 1287, 854, 868, + 872, 199, 325, 1372, 371, 372, 373, 374, 375, 376, + 377, 378, 379, 380, 583, 873, 882, 875, 115, 583, + 1399, 583, 583, 583, 583, 583, 583, 583, 583, 583, + 583, 583, 883, 1411, 1413, 884, 113, 113, 893, 900, + 898, 909, 914, 583, 916, 583, 727, 583, 1267, 583, + 583, 583, 920, 923, 924, 930, 933, 931, 485, 934, + 1399, 1399, 43, 264, 938, 325, 940, 288, 289, 290, + 958, 294, 295, 946, 959, 1421, 306, 307, 960, 113, + 967, 113, 961, 312, 969, 314, 325, 318, 976, 332, + 503, 985, 329, 330, 983, 332, 991, 987, 989, 992, + 996, 997, 325, 1007, 583, 1016, 325, 1017, 727, 1022, + 1029, 1023, 1030, 1031, 1037, 366, 1399, 1036, 1049, 1039, + 1055, 879, 541, 1058, 1056, 1063, 1077, 1081, 1080, 1082, + 1083, 332, 1090, 1095, 1100, 1105, 1103, 1111, 1112, 1117, + 1121, 1123, 1125, 1128, 727, 1153, 1156, 1163, 1142, 1135, + 1170, 1182, 1230, 1162, 1469, 1469, 1171, 1174, 1176, 1179, + 1178, 1478, 1478, 541, 1187, 1180, 586, 586, 1181, 1226, + 1232, 1229, 1245, 325, 325, 605, 606, 607, 1248, 1233, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, - 541, 541, 541, 541, 541, 325, 325, 1313, 35, 1327, - 1331, 1329, 35, 1333, 1334, 1339, 1344, 1347, 1381, 1392, - 1350, 1430, 1351, 35, 1352, 1354, 1362, 1363, 35, 1366, - 1376, 1383, 35, 1395, 1393, 35, 1396, 1402, 1405, 354, - 1416, 1406, 1417, 1419, 1421, 1422, 1424, 35, 35, 1436, - 1437, 1441, 35, 35, 1445, 1446, 1448, 1455, 35, 1440, - 35, 35, 35, 35, 1439, 1461, 1462, 1483, 35, 325, - 1484, 9, 35, 498, 35, 1485, 936, 530, 498, 498, - 825, 32, 488, 600, 35, 928, 35, 35, 725, 35, - 489, 795, 447, 35, 669, 601, 30, 22, 31, 325, - 799, 498, 487, 30, 513, 743, 541, 309, 206, 96, - 31, 498, 753, 35, 498, 498, 774, 800, 833, 498, - 35, 744, 498, 754, 498, 745, 498, 498, 498, 498, - 746, 802, 775, 113, 498, 804, 657, 657, 498, 313, - 679, 338, 498, 331, 123, 636, 636, 233, 54, 105, - 498, 285, 827, 498, 130, 498, 498, 124, 106, 286, - 131, 498, 237, 498, 498, 498, 498, 498, 498, 498, - 498, 498, 498, 498, 21, 1009, 929, 777, 1107, 498, - 1236, 1244, 1108, 1438, 498, 498, 1407, 498, 498, 498, - 498, 498, 498, 498, 829, 498, 498, 1394, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 498, 1447, 498, - 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, - 498, 1423, 1389, 498, 1283, 498, 956, 498, 331, 842, - 498, 957, 952, 1296, 331, 958, 498, 1479, 1317, 1243, - 1240, 113, 1471, 1418, 1413, 113, 1470, 1411, 1178, 1338, - 744, 1179, 1287, 904, 902, 925, 581, 1042, 299, 860, - 976, 786, 544, 858, 334, 325, 331, 838, 620, 622, - 331, 621, 899, 113, 113, 623, 625, 113, 624, 760, - 113, 1248, 1167, 1170, 1124, 1037, 404, 1098, 1084, 1054, - 1086, 1091, 1026, 1158, 1246, 991, 1093, 737, 927, 640, - 926, 0, 0, 0, 0, 0, 0, 113, 0, 770, - 0, 331, 0, 0, 0, 0, 331, 325, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 0, 0, 0, 325, 0, 0, 0, 0, 0, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 0, - 331, 331, 0, 0, 331, 331, 331, 331, 331, 0, - 0, 331, 331, 0, 0, 0, 331, 331, 331, 331, - 331, 331, 331, 331, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 331, 325, 325, 331, 0, - 331, 0, 331, 0, 325, 331, 0, 0, 827, 827, - 0, 331, 325, 325, 0, 325, 827, 827, 827, 827, - 827, 0, 827, 827, 0, 827, 827, 827, 827, 827, - 827, 827, 827, 0, 0, 325, 0, 827, 325, 827, - 827, 827, 827, 827, 827, 0, 0, 827, 331, 0, - 0, 827, 827, 0, 827, 827, 827, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 827, 0, 827, 541, - 827, 827, 0, 0, 827, 0, 827, 827, 827, 827, - 827, 827, 827, 827, 827, 827, 827, 827, 0, 827, - 0, 0, 827, 827, 0, 0, 827, 827, 0, 0, + 541, 541, 541, 541, 541, 541, 911, 1235, 1242, 1269, + 1277, 332, 1290, 1321, 332, 1305, 332, 332, 1294, 1295, + 1308, 332, 332, 1311, 1323, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 1324, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 1304, 1326, 325, 357, 1312, + 1314, 499, 1330, 1328, 357, 332, 332, 1332, 1334, 1335, + 1340, 1345, 1348, 332, 1355, 1351, 332, 1352, 312, 1353, + 1367, 366, 332, 1363, 1364, 1382, 1377, 1384, 1393, 1406, + 1394, 1396, 1397, 1403, 1407, 1417, 357, 1418, 1420, 911, + 357, 1423, 1422, 1425, 911, 1431, 911, 911, 911, 911, + 911, 911, 911, 911, 911, 911, 1437, 541, 1438, 507, + 113, 1442, 1446, 1449, 1447, 1456, 1441, 1440, 911, 1462, + 911, 523, 911, 1463, 911, 911, 911, 1484, 1485, 1486, + 9, 357, 937, 531, 826, 726, 357, 32, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, 357, 489, + 601, 929, 796, 490, 448, 602, 670, 30, 325, 357, + 357, 22, 357, 357, 357, 800, 357, 357, 357, 514, + 357, 357, 488, 30, 357, 357, 357, 357, 777, 911, + 31, 357, 357, 744, 754, 206, 357, 357, 357, 357, + 357, 357, 357, 357, 801, 96, 31, 834, 745, 310, + 755, 746, 775, 803, 738, 357, 776, 805, 357, 658, + 357, 680, 658, 25, 314, 26, 339, 332, 27, 828, + 637, 357, 637, 28, 123, 233, 105, 29, 285, 113, + 237, 130, 124, 113, 106, 286, 31, 131, 54, 21, + 1008, 929, 1107, 33, 1108, 1244, 1236, 1439, 34, 1408, + 48, 1448, 35, 325, 1395, 1424, 1284, 1390, 1297, 951, + 1480, 113, 113, 829, 37, 113, 38, 842, 113, 955, + 39, 1318, 956, 48, 1243, 1419, 1240, 1472, 40, 41, + 957, 1414, 42, 1412, 1471, 739, 48, 1188, 1339, 1288, + 693, 48, 113, 744, 925, 902, 48, 1177, 48, 48, + 48, 48, 975, 325, 48, 904, 48, 499, 860, 786, + 48, 581, 499, 499, 838, 299, 544, 1040, 334, 325, + 620, 622, 48, 621, 623, 48, 858, 48, 624, 899, + 734, 625, 760, 1165, 1249, 499, 1168, 1124, 404, 1052, + 1084, 1098, 1035, 1024, 1091, 499, 1086, 737, 499, 499, + 1093, 48, 990, 499, 640, 1246, 499, 296, 499, 1155, + 499, 499, 499, 499, 0, 0, 740, 0, 499, 0, + 0, 926, 499, 0, 325, 325, 499, 0, 0, 0, + 0, 0, 325, 927, 499, 0, 771, 499, 0, 499, + 499, 325, 325, 0, 325, 499, 0, 499, 499, 499, + 499, 499, 499, 499, 499, 499, 499, 499, 0, 0, + 0, 0, 0, 499, 325, 0, 0, 325, 499, 499, + 0, 499, 499, 499, 499, 499, 499, 499, 0, 499, + 499, 0, 499, 499, 499, 499, 499, 499, 499, 499, + 499, 499, 0, 499, 499, 499, 499, 499, 499, 499, + 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, + 499, 499, 499, 499, 499, 0, 0, 499, 0, 499, + 541, 499, 0, 0, 499, 828, 828, 0, 0, 0, + 499, 0, 0, 828, 828, 828, 828, 828, 0, 828, + 828, 0, 828, 828, 828, 828, 828, 828, 828, 828, + 0, 0, 0, 0, 828, 0, 828, 828, 828, 828, + 828, 828, 0, 0, 828, 332, 0, 0, 828, 828, + 0, 828, 828, 828, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 828, 0, 828, 0, 828, 828, 0, + 0, 828, 0, 828, 828, 828, 828, 828, 828, 828, + 828, 828, 828, 828, 828, 0, 828, 0, 0, 828, + 828, 0, 0, 828, 828, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 828, 828, + 828, 828, 828, 0, 0, 0, 828, 828, 0, 0, + 828, 0, 0, 0, 0, 828, 828, 828, 828, 828, + 0, 0, 0, 828, 0, 828, 0, 0, 0, 0, + 0, 828, 828, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 827, 827, 827, 827, 827, 0, 0, 0, 827, - 827, 0, 0, 827, 0, 0, 0, 0, 827, 827, - 827, 827, 827, 0, 0, 0, 827, 0, 827, 0, - 0, 0, 0, 0, 827, 827, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 828, 828, 828, 828, + 0, 828, 771, 771, 0, 0, 0, 0, 828, 0, + 771, 771, 771, 771, 771, 0, 771, 771, 0, 771, + 771, 771, 771, 771, 771, 771, 0, 0, 734, 0, + 0, 771, 0, 771, 771, 771, 771, 771, 771, 0, + 0, 771, 0, 0, 0, 771, 771, 0, 771, 771, + 771, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 771, 0, 771, 0, 771, 771, 0, 0, 771, 0, + 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, + 771, 771, 0, 771, 0, 0, 771, 771, 0, 0, + 771, 771, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 771, 771, 771, 771, 771, + 0, 0, 0, 771, 771, 0, 0, 771, 0, 0, + 0, 0, 771, 771, 771, 771, 771, 0, 0, 0, + 771, 332, 771, 0, 0, 0, 332, 332, 771, 771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 827, - 827, 827, 827, 0, 827, 770, 770, 0, 0, 0, - 0, 827, 0, 770, 770, 770, 770, 770, 0, 770, - 770, 0, 770, 770, 770, 770, 770, 770, 770, 0, - 0, 733, 0, 0, 770, 0, 770, 770, 770, 770, - 770, 770, 0, 0, 770, 0, 0, 0, 770, 770, - 0, 770, 770, 770, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 770, 0, 770, 0, 770, 770, 0, - 0, 770, 0, 770, 770, 770, 770, 770, 770, 770, - 770, 770, 770, 770, 770, 0, 770, 0, 0, 770, - 770, 0, 0, 770, 770, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 770, 770, - 770, 770, 770, 0, 0, 0, 770, 770, 0, 0, - 770, 0, 0, 0, 0, 770, 770, 770, 770, 770, - 0, 0, 0, 770, 331, 770, 0, 0, 0, 331, - 331, 770, 770, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 325, 332, + 0, 0, 0, 771, 771, 771, 771, 0, 771, 332, + 0, 0, 332, 332, 0, 771, 0, 332, 0, 0, + 332, 0, 332, 0, 332, 332, 332, 332, 0, 0, + 0, 0, 332, 0, 0, 0, 332, 0, 0, 0, + 332, 0, 0, 0, 0, 0, 0, 0, 332, 0, + 0, 332, 0, 332, 332, 0, 0, 0, 0, 332, + 0, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 0, 0, 0, 0, 332, 0, 0, + 0, 0, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 0, 332, 332, 0, 0, 332, 332, 332, + 332, 332, 0, 0, 332, 332, 0, 0, 0, 332, + 332, 332, 332, 332, 332, 332, 332, 0, 0, 0, + 0, 0, 0, 0, 734, 0, 0, 0, 332, 734, + 734, 332, 0, 332, 0, 332, 0, 0, 332, 0, + 0, 0, 0, 0, 332, 362, 0, 0, 0, 0, + 0, 0, 734, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 734, 0, 0, 734, 734, 0, 0, 0, + 734, 0, 0, 734, 0, 734, 0, 734, 734, 734, + 734, 0, 0, 0, 0, 734, 0, 0, 0, 734, + 0, 0, 0, 734, 0, 0, 0, 0, 0, 0, + 0, 734, 0, 0, 734, 0, 734, 734, 0, 0, + 0, 0, 734, 0, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 734, 734, 0, 0, 0, 0, 0, + 734, 0, 0, 0, 0, 734, 734, 734, 734, 734, + 734, 0, 734, 734, 734, 0, 734, 734, 0, 0, + 734, 734, 734, 734, 325, 0, 0, 734, 734, 325, + 325, 0, 734, 734, 734, 734, 734, 734, 734, 734, + 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 734, 325, 0, 734, 0, 734, 0, 734, 0, + 0, 734, 325, 0, 0, 325, 325, 734, 0, 0, + 325, 0, 0, 325, 0, 325, 0, 325, 325, 325, + 325, 0, 0, 0, 0, 325, 0, 0, 0, 325, + 0, 0, 0, 325, 0, 0, 0, 0, 0, 0, + 0, 325, 0, 0, 325, 0, 325, 325, 0, 0, + 0, 0, 325, 0, 325, 325, 325, 325, 325, 325, + 325, 325, 325, 325, 325, 0, 0, 0, 0, 0, + 325, 0, 0, 0, 0, 325, 325, 325, 325, 325, + 325, 0, 325, 325, 325, 0, 325, 325, 0, 0, + 325, 325, 325, 325, 0, 0, 0, 325, 325, 0, + 0, 0, 325, 325, 325, 325, 325, 325, 325, 325, + 0, 362, 0, 0, 0, 0, 362, 362, 0, 0, + 0, 325, 0, 0, 325, 0, 325, 0, 325, 0, + 0, 325, 0, 0, 0, 0, 0, 325, 0, 362, + 0, 0, 0, 0, 0, 49, 0, 0, 0, 362, + 0, 0, 362, 362, 0, 0, 0, 362, 0, 0, + 362, 0, 362, 0, 362, 362, 362, 362, 0, 0, + 0, 0, 362, 0, 0, 0, 362, 0, 0, 0, + 362, 0, 0, 0, 0, 0, 0, 0, 362, 0, + 0, 362, 0, 362, 362, 0, 0, 0, 0, 362, + 0, 362, 362, 362, 362, 362, 362, 362, 362, 362, + 362, 362, 0, 0, 0, 0, 0, 362, 0, 0, + 0, 0, 362, 362, 0, 362, 362, 362, 0, 362, + 362, 362, 0, 362, 362, 0, 332, 362, 362, 362, + 362, 0, 332, 0, 362, 362, 0, 0, 0, 362, + 362, 362, 362, 362, 362, 362, 362, 0, 28, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, + 0, 362, 0, 362, 332, 0, 0, 0, 332, 0, + 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 324, 331, 0, 0, 0, 770, 770, 770, 770, - 0, 770, 331, 0, 0, 331, 331, 0, 770, 0, - 331, 0, 0, 331, 0, 331, 0, 331, 331, 331, - 331, 0, 0, 0, 0, 331, 0, 0, 0, 331, - 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, - 0, 331, 0, 0, 331, 0, 331, 331, 0, 0, - 0, 0, 331, 0, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 0, 0, 0, 0, - 331, 0, 0, 0, 0, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 0, 331, 331, 0, 0, - 331, 331, 331, 331, 331, 0, 0, 331, 331, 0, - 0, 0, 331, 331, 331, 331, 331, 331, 331, 331, - 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, - 0, 331, 733, 733, 331, 0, 331, 0, 331, 0, - 0, 331, 0, 0, 0, 0, 0, 331, 361, 0, - 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 733, 0, 0, 733, 733, - 0, 0, 0, 733, 0, 0, 733, 0, 733, 0, - 733, 733, 733, 733, 0, 0, 0, 0, 733, 0, - 0, 0, 733, 0, 0, 0, 733, 0, 0, 0, - 0, 0, 0, 0, 733, 0, 0, 733, 0, 733, - 733, 0, 0, 0, 0, 733, 0, 733, 733, 733, - 733, 733, 733, 733, 733, 733, 733, 733, 0, 0, - 0, 0, 0, 733, 0, 0, 0, 0, 733, 733, - 733, 733, 733, 733, 0, 733, 733, 733, 0, 733, - 733, 0, 0, 733, 733, 733, 733, 324, 0, 0, - 733, 733, 324, 324, 0, 733, 733, 733, 733, 733, - 733, 733, 733, 356, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 733, 324, 0, 733, 0, 733, - 0, 733, 0, 0, 733, 324, 0, 0, 324, 324, - 733, 0, 0, 324, 0, 0, 324, 0, 324, 0, - 324, 324, 324, 324, 0, 0, 0, 0, 324, 0, - 0, 0, 324, 0, 0, 0, 324, 0, 0, 0, - 0, 0, 0, 0, 324, 0, 0, 324, 0, 324, - 324, 0, 0, 0, 0, 324, 0, 324, 324, 324, - 324, 324, 324, 324, 324, 324, 324, 324, 0, 0, - 0, 0, 0, 324, 0, 0, 0, 0, 324, 324, - 324, 324, 324, 324, 0, 324, 324, 324, 0, 324, - 324, 0, 0, 324, 324, 324, 324, 0, 0, 0, - 324, 324, 0, 0, 0, 324, 324, 324, 324, 324, - 324, 324, 324, 0, 361, 0, 0, 0, 0, 361, - 361, 0, 0, 0, 324, 0, 0, 324, 0, 324, - 0, 324, 0, 0, 324, 0, 0, 0, 0, 0, - 324, 49, 361, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 361, 0, 0, 361, 361, 0, 0, 0, - 361, 0, 0, 361, 0, 361, 0, 361, 361, 361, - 361, 0, 0, 0, 0, 361, 0, 0, 0, 361, - 0, 0, 0, 361, 0, 0, 0, 0, 0, 0, - 0, 361, 0, 0, 361, 0, 361, 361, 0, 0, - 0, 582, 361, 0, 361, 361, 361, 361, 361, 361, - 361, 361, 361, 361, 361, 0, 0, 0, 0, 0, - 361, 0, 0, 0, 0, 361, 361, 0, 361, 361, - 361, 0, 361, 361, 361, 0, 361, 361, 0, 356, - 361, 361, 361, 361, 0, 356, 0, 361, 361, 0, - 0, 0, 361, 361, 361, 361, 361, 361, 361, 361, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 361, 0, 0, 361, 0, 361, 356, 0, 0, - 0, 356, 0, 0, 582, 0, 0, 361, 0, 582, - 0, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 582, 582, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 582, 0, 582, 0, 582, 0, 582, - 582, 582, 356, 36, 0, 0, 0, 356, 0, 356, - 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 356, 356, 0, 356, 356, 356, 0, 356, 356, 356, - 0, 356, 356, 0, 0, 356, 356, 356, 356, 0, - 0, 0, 356, 356, 582, 0, 0, 356, 356, 356, - 356, 356, 356, 356, 356, 0, 0, 0, 0, 0, - 0, 0, 34, 0, 0, 0, 356, 0, 49, 356, - 0, 356, 49, 0, 49, 0, 49, 0, 49, 0, - 0, 49, 356, 49, 49, 0, 49, 0, 49, 0, - 49, 0, 49, 49, 49, 49, 0, 0, 49, 49, - 0, 0, 0, 0, 49, 49, 49, 49, 49, 0, - 0, 49, 49, 49, 0, 49, 0, 49, 49, 49, - 49, 49, 49, 49, 49, 28, 49, 49, 49, 49, - 0, 0, 49, 49, 49, 0, 49, 0, 0, 0, - 0, 49, 49, 0, 49, 49, 0, 49, 49, 49, - 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 49, 0, 49, 49, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 28, 28, 49, 0, - 0, 28, 0, 0, 0, 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, 0, 28, 0, 28, 28, 28, 0, 49, - 28, 28, 28, 0, 28, 0, 0, 28, 0, 28, - 28, 28, 28, 0, 0, 0, 28, 28, 28, 0, - 36, 28, 28, 28, 36, 5, 0, 0, 0, 0, - 28, 28, 0, 28, 28, 36, 28, 28, 28, 0, - 36, 0, 28, 0, 36, 0, 0, 36, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, - 36, 0, 28, 0, 36, 36, 0, 0, 28, 28, - 36, 0, 36, 36, 36, 36, 0, 28, 0, 0, - 36, 0, 0, 0, 36, 0, 36, 0, 918, 34, - 0, 0, 0, 34, 0, 0, 36, 0, 36, 36, - 0, 36, 0, 0, 34, 36, 0, 0, 0, 34, - 0, 0, 0, 34, 0, 0, 34, 0, 28, 0, - 0, 0, 0, 0, 0, 36, 0, 0, 34, 34, - 0, 36, 36, 34, 34, 48, 0, 0, 0, 34, - 0, 34, 34, 34, 34, 0, 0, 0, 0, 34, - 0, 0, 28, 34, 0, 34, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 34, 0, 28, 34, 0, - 34, 0, 28, 0, 34, 0, 28, 0, 0, 28, - 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 28, 0, 34, 33, 28, 28, 0, 33, - 34, 34, 28, 0, 28, 28, 28, 28, 0, 0, - 33, 0, 28, 0, 0, 33, 28, 0, 28, 33, - 0, 0, 33, 0, 0, 0, 0, 0, 28, 919, - 0, 28, 0, 28, 33, 33, 0, 28, 0, 33, - 33, 0, 0, 447, 0, 33, 0, 33, 33, 33, - 33, 0, 0, 0, 0, 33, 0, 28, 0, 33, - 0, 33, 0, 28, 28, 0, 448, 0, 0, 0, - 0, 33, 0, 0, 33, 0, 33, 0, 0, 449, - 33, 0, 5, 450, 451, 0, 48, 0, 0, 452, - 0, 453, 454, 455, 456, 0, 0, 48, 0, 457, - 33, 0, 48, 458, 0, 0, 48, 33, 0, 48, - 0, 0, 0, 0, 0, 459, 0, 0, 460, 0, - 461, 48, 48, 0, 0, 0, 48, 48, 0, 0, - 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, - 0, 0, 48, 0, 462, 918, 48, 0, 48, 48, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, - 48, 48, 0, 48, 0, 48, 0, 48, 0, 48, - 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 48, 0, 48, 0, 48, - 48, 0, 48, 0, 0, 48, 48, 48, 48, 48, - 48, 0, 0, 0, 0, 48, 0, 48, 0, 48, - 0, 48, 48, 0, 0, 0, 48, 0, 0, 48, - 0, 48, 0, 0, 48, 0, 48, 0, 0, 0, - 48, 48, 48, 0, 0, 0, 48, 48, 0, 7, - 0, 0, 48, 49, 48, 48, 48, 48, 0, 0, - 48, 0, 48, 0, 49, 0, 48, 0, 48, 49, - 0, 0, 0, 49, 0, 0, 49, 0, 48, 0, - 0, 48, 0, 48, 0, 0, 0, 48, 49, 49, - 0, 0, 0, 49, 49, 0, 919, 0, 0, 49, - 48, 49, 49, 49, 49, 0, 0, 48, 0, 49, - 0, 48, 0, 49, 0, 49, 48, 0, 0, 0, - 48, 0, 0, 48, 0, 49, 0, 0, 49, 0, - 49, 0, 0, 0, 49, 48, 48, 0, 0, 0, - 48, 48, 0, 0, 0, 0, 48, 0, 48, 48, - 48, 48, 0, 0, 49, 0, 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, 0, 0, - 0, 48, 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, 331, 88, 89, 0, 0, 0, 331, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 90, 91, 92, - 93, 94, 0, 0, 0, 95, 0, 0, 0, 96, - 0, 0, 0, 0, 97, 98, 99, 100, 101, 0, - 0, 0, 102, 331, 103, 0, 0, 0, 0, 0, - 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, - 0, 0, 0, 331, 0, 106, 107, 108, 109, 0, - 0, 0, 0, 0, 331, 0, 0, 199, 0, 331, - 0, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 0, 0, 0, 0, 0, 0, 331, - 0, 0, 0, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 0, 331, 331, 0, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 0, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 0, - 500, 0, 0, 331, 0, 331, 500, 0, 331, 0, - 0, 0, 0, 0, 331, 0, 0, 0, 0, 331, - 0, 0, 331, 0, 331, 331, 0, 0, 0, 331, - 331, 0, 0, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 500, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 331, 331, 0, 0, 0, 0, 0, - 0, 331, 0, 0, 331, 0, 0, 0, 0, 0, - 331, 0, 0, 500, 0, 0, 0, 0, 500, 0, - 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, - 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 500, 500, 500, 500, 500, 500, 500, 500, 500, - 500, 910, 500, 500, 0, 500, 500, 500, 500, 500, - 500, 500, 500, 500, 500, 0, 500, 500, 500, 500, - 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, - 500, 500, 500, 500, 500, 500, 500, 500, 0, 496, - 0, 0, 0, 0, 500, 496, 0, 0, 0, 0, - 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, + 0, 36, 0, 0, 332, 0, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 0, 332, 332, + 0, 0, 332, 332, 332, 332, 332, 0, 0, 332, + 332, 0, 0, 0, 332, 332, 332, 332, 332, 332, + 332, 332, 0, 0, 0, 0, 0, 0, 0, 0, + 35, 0, 0, 332, 0, 0, 332, 0, 332, 0, + 332, 0, 49, 332, 0, 0, 49, 0, 49, 332, + 49, 0, 49, 0, 0, 49, 0, 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, + 0, 49, 49, 49, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 0, 0, 49, 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, 33, 0, 28, 28, 0, 0, 0, + 0, 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, 36, 28, + 28, 28, 36, 0, 0, 0, 5, 0, 28, 28, + 0, 28, 28, 36, 28, 28, 28, 0, 36, 0, + 28, 0, 36, 0, 0, 36, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 36, 36, 0, + 28, 0, 36, 36, 0, 0, 28, 28, 36, 919, + 36, 36, 36, 36, 0, 28, 0, 0, 36, 0, + 0, 0, 36, 0, 36, 0, 0, 35, 0, 0, + 0, 35, 0, 0, 36, 0, 36, 36, 0, 36, + 0, 0, 35, 36, 0, 0, 0, 35, 0, 0, + 0, 35, 48, 0, 35, 0, 28, 0, 0, 0, + 0, 0, 0, 36, 0, 0, 35, 35, 0, 36, + 36, 35, 35, 0, 34, 0, 0, 35, 34, 35, + 35, 35, 35, 0, 0, 0, 0, 35, 0, 34, + 0, 35, 0, 35, 34, 7, 0, 0, 34, 0, + 0, 34, 0, 35, 0, 35, 35, 0, 35, 0, + 0, 0, 35, 34, 34, 0, 0, 0, 34, 34, + 0, 0, 0, 0, 34, 0, 34, 34, 34, 34, + 0, 0, 35, 0, 34, 0, 0, 28, 34, 35, + 34, 28, 0, 0, 0, 0, 0, 0, 0, 0, + 34, 0, 28, 34, 0, 34, 0, 28, 920, 34, + 0, 28, 0, 0, 28, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 28, 28, 0, 34, + 33, 28, 28, 0, 33, 34, 34, 28, 0, 28, + 28, 28, 28, 0, 0, 33, 0, 28, 0, 0, + 33, 28, 0, 28, 33, 0, 0, 33, 0, 0, + 0, 0, 0, 28, 0, 0, 28, 0, 28, 33, + 33, 0, 28, 5, 33, 33, 0, 48, 0, 0, + 33, 0, 33, 33, 33, 33, 0, 0, 48, 0, + 33, 0, 28, 48, 33, 0, 33, 48, 28, 28, + 48, 0, 0, 0, 0, 0, 33, 0, 0, 33, + 0, 33, 48, 48, 0, 33, 919, 48, 48, 0, + 48, 0, 0, 48, 0, 48, 48, 48, 48, 0, + 0, 48, 0, 48, 0, 33, 48, 48, 0, 48, + 48, 0, 33, 48, 0, 0, 0, 0, 0, 48, + 0, 0, 48, 0, 48, 48, 48, 0, 48, 48, + 48, 48, 0, 48, 0, 0, 48, 0, 48, 48, + 48, 48, 0, 0, 48, 0, 48, 0, 48, 48, + 48, 0, 48, 48, 0, 0, 48, 0, 0, 0, + 0, 0, 48, 0, 0, 48, 0, 48, 48, 48, + 0, 48, 7, 48, 48, 0, 49, 0, 0, 48, + 0, 48, 48, 48, 48, 0, 0, 49, 0, 48, + 0, 48, 49, 48, 0, 48, 49, 0, 0, 49, + 0, 0, 0, 0, 0, 48, 0, 0, 48, 0, + 48, 49, 49, 0, 48, 0, 49, 49, 0, 0, + 0, 0, 49, 0, 49, 49, 49, 49, 0, 0, + 0, 0, 49, 0, 48, 920, 49, 0, 49, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, + 48, 49, 0, 49, 0, 48, 0, 49, 0, 48, + 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 48, 0, 49, 0, 48, + 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, + 48, 0, 0, 0, 0, 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, 0, 0, 0, + 48, 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, + 332, 88, 89, 0, 0, 0, 332, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 90, 91, 92, 93, + 94, 0, 0, 0, 95, 0, 0, 0, 96, 0, + 0, 0, 0, 97, 98, 99, 100, 101, 0, 0, + 0, 102, 332, 103, 0, 0, 0, 0, 0, 104, + 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 496, 0, 0, 910, 0, 0, 0, 0, 910, - 0, 910, 910, 910, 910, 910, 910, 910, 910, 910, - 910, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 388, 0, 910, 0, 910, 0, 910, 0, 910, - 910, 910, 496, 0, 0, 0, 0, 496, 0, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 0, 0, 0, 0, 0, 0, 0, 388, 0, 0, - 496, 496, 0, 496, 496, 496, 496, 496, 496, 496, - 0, 496, 496, 0, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 910, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 0, 504, 0, - 0, 0, 0, 496, 504, 0, 496, 0, 0, 0, - 0, 0, 496, 0, 0, 0, 0, 0, 324, 0, - 388, 388, 388, 388, 0, 388, 0, 388, 388, 0, - 388, 388, 388, 388, 388, 0, 388, 388, 388, 388, - 504, 388, 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, - 388, 388, 388, 0, 0, 0, 0, 324, 0, 388, - 331, 0, 388, 0, 0, 0, 0, 0, 388, 0, - 0, 504, 0, 0, 0, 0, 504, 0, 504, 504, - 504, 504, 504, 504, 504, 504, 504, 504, 504, 0, - 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, - 504, 0, 504, 504, 504, 504, 504, 504, 504, 0, - 504, 504, 0, 504, 504, 504, 504, 504, 504, 504, - 504, 504, 504, 0, 504, 504, 504, 504, 504, 504, - 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, - 504, 504, 504, 504, 504, 504, 0, 331, 0, 0, - 0, 0, 504, 331, 0, 504, 0, 0, 0, 0, - 0, 504, 0, 0, 0, 0, 0, 0, 331, 331, - 331, 331, 331, 0, 0, 0, 331, 331, 0, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 0, 0, 0, 0, 0, 0, 331, 0, - 0, 331, 0, 0, 0, 0, 0, 331, 0, 0, - 331, 0, 0, 0, 0, 331, 0, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, - 0, 331, 331, 331, 331, 331, 331, 331, 0, 331, - 331, 0, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 0, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 0, 431, 738, 0, 0, - 0, 331, 431, 0, 331, 0, 25, 0, 26, 0, - 331, 27, 0, 0, 0, 0, 28, 0, 0, 0, + 0, 0, 389, 0, 106, 107, 108, 109, 0, 0, + 0, 0, 0, 332, 0, 0, 199, 0, 332, 0, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 0, 0, 0, 0, 0, 0, 389, 0, + 0, 0, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 0, 332, 332, 0, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 0, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 0, 501, + 0, 0, 332, 0, 332, 501, 0, 332, 0, 0, + 0, 0, 0, 332, 0, 0, 0, 0, 0, 325, + 0, 389, 389, 389, 389, 0, 389, 0, 389, 389, + 0, 389, 389, 389, 389, 389, 0, 389, 389, 389, + 389, 501, 389, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + 389, 389, 389, 389, 0, 0, 0, 0, 325, 0, + 389, 332, 0, 389, 0, 0, 0, 0, 0, 389, + 0, 0, 501, 0, 0, 0, 0, 501, 0, 501, + 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, + 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, + 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, + 0, 501, 501, 0, 501, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 0, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 501, 501, 501, 0, 497, 0, + 0, 0, 0, 501, 497, 0, 332, 0, 0, 0, + 0, 0, 501, 0, 0, 0, 0, 0, 332, 0, + 332, 0, 332, 0, 0, 332, 0, 332, 332, 0, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 497, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 0, 0, 0, 0, 332, 0, 332, + 332, 0, 332, 0, 0, 0, 0, 0, 332, 0, + 0, 497, 0, 0, 0, 0, 497, 0, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, 497, 0, + 0, 0, 0, 0, 0, 0, 332, 0, 0, 497, + 497, 0, 497, 497, 497, 497, 497, 497, 497, 0, + 497, 497, 0, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 0, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 0, 505, 0, 0, + 0, 0, 497, 505, 0, 497, 0, 0, 0, 0, + 0, 497, 0, 0, 0, 0, 0, 0, 332, 332, + 332, 332, 332, 0, 0, 0, 332, 332, 0, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 505, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 0, 0, 0, 0, 0, 0, 332, 0, + 0, 332, 0, 0, 0, 0, 0, 332, 0, 0, + 505, 0, 0, 0, 0, 505, 0, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 505, + 0, 505, 505, 505, 505, 505, 505, 505, 0, 505, + 505, 0, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 0, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 0, 332, 876, 0, 0, + 0, 505, 332, 0, 505, 0, 25, 0, 26, 0, + 505, 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, 431, 0, + 0, 0, 0, 0, 0, 0, 33, 0, 332, 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, 739, 431, - 0, 0, 0, 0, 431, 0, 431, 431, 431, 431, - 431, 431, 431, 431, 431, 431, 431, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 431, 0, - 431, 431, 431, 431, 431, 431, 431, 0, 431, 431, - 0, 431, 431, 431, 431, 431, 431, 431, 431, 431, - 431, 0, 431, 431, 431, 431, 431, 431, 431, 431, - 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, - 431, 431, 431, 431, 0, 391, 876, 0, 0, 740, - 431, 391, 0, 431, 0, 25, 0, 26, 0, 431, + 0, 40, 41, 0, 0, 42, 0, 0, 319, 332, + 0, 0, 0, 0, 332, 0, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 332, 0, + 332, 332, 332, 332, 332, 332, 332, 0, 332, 332, + 0, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 0, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 0, 432, 1071, 0, 0, 354, + 332, 432, 0, 332, 0, 25, 0, 26, 0, 332, 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, 391, 0, 0, + 0, 0, 0, 0, 0, 33, 0, 432, 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, 319, 391, 0, - 0, 0, 0, 391, 0, 391, 391, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 391, 0, 391, - 391, 391, 391, 391, 391, 391, 0, 391, 0, 0, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 0, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, - 391, 391, 391, 0, 535, 0, 492, 0, 354, 391, - 535, 0, 391, 0, 57, 25, 0, 26, 391, 0, - 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, - 0, 0, 0, 0, 0, 65, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 33, 535, 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, 257, 0, 42, 0, 0, 535, 0, 0, - 0, 580, 535, 0, 535, 535, 535, 535, 535, 535, - 535, 535, 535, 535, 535, 0, 0, 0, 0, 90, - 91, 92, 258, 0, 0, 0, 535, 0, 535, 0, - 535, 96, 535, 535, 535, 0, 535, 535, 0, 535, - 535, 535, 535, 535, 535, 535, 535, 535, 535, 0, - 0, 0, 535, 535, 535, 535, 535, 535, 535, 535, - 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, - 549, 535, 0, 0, 0, 0, 549, 106, 493, 0, - 0, 0, 0, 0, 580, 0, 0, 535, 0, 580, - 0, 580, 580, 580, 580, 580, 580, 580, 580, 580, - 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 549, 580, 0, 580, 0, 580, 0, 580, - 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 580, 0, 0, 553, 0, - 0, 0, 0, 0, 553, 0, 0, 0, 0, 0, - 0, 0, 0, 549, 0, 0, 0, 0, 549, 0, - 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, - 549, 0, 0, 0, 580, 0, 0, 0, 0, 0, - 553, 0, 549, 0, 549, 0, 549, 0, 549, 549, - 549, 0, 549, 549, 0, 0, 549, 549, 549, 549, - 549, 549, 549, 549, 549, 0, 0, 0, 549, 549, - 549, 549, 549, 549, 549, 549, 0, 0, 0, 0, - 0, 553, 0, 0, 0, 0, 553, 549, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 0, - 0, 0, 556, 549, 0, 0, 0, 0, 556, 0, - 553, 0, 553, 0, 553, 0, 553, 553, 553, 0, - 553, 553, 0, 0, 553, 553, 553, 553, 0, 0, - 0, 553, 553, 0, 0, 0, 553, 553, 553, 553, - 553, 553, 553, 553, 556, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 553, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 554, 553, 0, 0, 0, 0, 554, 0, 0, 0, - 0, 0, 0, 0, 0, 556, 0, 0, 0, 0, - 556, 0, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 556, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 554, 0, 556, 0, 556, 0, 556, 0, - 556, 556, 556, 0, 556, 556, 0, 0, 556, 556, - 556, 556, 0, 0, 0, 556, 556, 0, 0, 0, - 556, 556, 556, 556, 556, 556, 556, 556, 0, 0, - 0, 0, 0, 554, 0, 0, 0, 0, 554, 556, - 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, - 554, 0, 0, 0, 555, 556, 0, 0, 0, 0, - 555, 0, 554, 0, 554, 0, 554, 0, 554, 554, - 554, 0, 554, 554, 0, 0, 554, 554, 554, 554, - 0, 0, 0, 554, 554, 0, 0, 0, 554, 554, - 554, 554, 554, 554, 554, 554, 555, 0, 0, 0, + 40, 41, 0, 0, 42, 0, 0, 319, 432, 0, + 0, 0, 0, 432, 0, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 432, 0, 432, + 432, 432, 432, 432, 432, 432, 0, 432, 432, 0, + 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, + 0, 432, 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, + 432, 432, 432, 0, 392, 1137, 0, 0, 354, 432, + 392, 0, 432, 0, 25, 0, 26, 0, 432, 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, 392, 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, 319, 392, 0, 0, + 0, 0, 392, 0, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 392, 0, 392, 392, + 392, 392, 392, 392, 392, 0, 392, 0, 0, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 0, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + 392, 392, 0, 536, 0, 492, 0, 354, 392, 536, + 0, 392, 0, 57, 25, 0, 26, 392, 0, 27, + 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, + 0, 0, 0, 0, 65, 0, 0, 31, 0, 0, + 0, 0, 0, 0, 33, 536, 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, 257, 0, 42, 0, 0, 536, 0, 0, 0, + 0, 536, 0, 536, 536, 536, 536, 536, 536, 536, + 536, 536, 536, 536, 0, 0, 0, 0, 90, 91, + 92, 258, 0, 0, 0, 536, 0, 536, 0, 536, + 96, 536, 536, 536, 0, 536, 536, 0, 536, 536, + 536, 536, 536, 536, 536, 536, 536, 536, 354, 0, + 0, 536, 536, 536, 536, 536, 536, 536, 536, 536, + 536, 536, 536, 536, 536, 536, 536, 536, 536, 550, + 536, 354, 0, 0, 0, 550, 106, 493, 0, 0, + 0, 0, 0, 0, 354, 0, 536, 0, 0, 354, + 0, 0, 230, 0, 354, 0, 354, 354, 354, 354, + 0, 0, 0, 0, 354, 0, 0, 0, 354, 0, + 0, 550, 354, 0, 0, 0, 0, 0, 0, 0, + 354, 0, 0, 354, 0, 354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 554, 0, 0, + 0, 0, 0, 554, 0, 0, 0, 0, 0, 354, + 0, 0, 550, 0, 0, 0, 0, 550, 0, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 554, + 0, 550, 0, 550, 0, 550, 0, 550, 550, 550, + 0, 550, 550, 0, 0, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 0, 354, 0, 550, 550, 550, + 550, 550, 550, 550, 550, 0, 0, 0, 0, 0, + 554, 0, 0, 0, 0, 554, 550, 554, 554, 554, + 554, 554, 554, 554, 554, 554, 554, 554, 0, 0, + 0, 557, 550, 0, 0, 0, 0, 557, 0, 554, + 0, 554, 0, 554, 0, 554, 554, 554, 0, 554, + 554, 0, 0, 554, 554, 554, 554, 0, 0, 0, + 554, 554, 0, 0, 0, 554, 554, 554, 554, 554, + 554, 554, 554, 557, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 554, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 555, + 554, 0, 0, 0, 0, 555, 0, 0, 0, 0, + 0, 0, 0, 0, 557, 0, 0, 0, 0, 557, + 0, 557, 557, 557, 557, 557, 557, 557, 557, 557, + 557, 557, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 555, 0, 557, 0, 557, 0, 557, 0, 557, + 557, 557, 0, 557, 557, 0, 0, 557, 557, 557, + 557, 0, 0, 0, 557, 557, 204, 0, 0, 557, + 557, 557, 557, 557, 557, 557, 557, 0, 0, 0, + 0, 0, 555, 0, 0, 0, 0, 555, 557, 555, + 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, + 0, 0, 0, 556, 557, 0, 0, 0, 205, 556, + 0, 555, 0, 555, 0, 555, 0, 555, 555, 555, + 0, 555, 555, 0, 0, 555, 555, 555, 555, 0, + 0, 0, 555, 555, 0, 0, 0, 555, 555, 555, + 555, 555, 555, 555, 555, 556, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 555, 0, 206, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 560, 555, 218, 219, 220, 221, 222, 223, 224, + 225, 0, 0, 0, 0, 0, 556, 0, 0, 0, + 0, 556, 0, 556, 556, 556, 556, 556, 556, 556, + 556, 556, 556, 556, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 556, 0, 556, 0, 556, + 0, 556, 556, 556, 0, 556, 556, 0, 0, 556, + 556, 556, 556, 0, 0, 0, 556, 556, 0, 561, + 0, 556, 556, 556, 556, 556, 556, 556, 556, 0, + 0, 0, 0, 0, 560, 0, 0, 0, 0, 560, + 556, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 0, 0, 0, 0, 556, 0, 0, 0, + 0, 0, 0, 560, 0, 560, 0, 560, 0, 560, + 560, 560, 0, 0, 0, 0, 0, 560, 560, 560, + 560, 0, 0, 0, 560, 560, 0, 562, 0, 560, + 560, 560, 560, 560, 560, 560, 560, 0, 0, 0, + 0, 0, 561, 0, 0, 0, 0, 561, 560, 561, + 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, + 0, 0, 0, 0, 560, 0, 0, 0, 0, 0, + 0, 561, 0, 561, 0, 561, 0, 561, 561, 561, + 0, 0, 0, 0, 0, 561, 561, 561, 561, 0, + 0, 0, 561, 561, 0, 563, 0, 561, 561, 561, + 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, + 562, 0, 0, 0, 0, 562, 561, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 562, 0, 0, + 0, 0, 561, 0, 0, 0, 0, 0, 0, 562, + 0, 562, 0, 562, 0, 562, 562, 562, 0, 0, + 0, 0, 0, 562, 562, 562, 562, 0, 0, 0, + 562, 562, 0, 564, 0, 562, 562, 562, 562, 562, + 562, 562, 562, 0, 0, 0, 0, 0, 563, 0, + 0, 0, 0, 563, 562, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 563, 563, 0, 0, 0, 0, + 562, 0, 0, 0, 0, 0, 0, 563, 0, 563, + 0, 563, 0, 563, 563, 563, 0, 0, 0, 0, + 0, 563, 563, 563, 563, 0, 0, 0, 563, 563, + 0, 565, 0, 0, 0, 563, 563, 563, 563, 563, + 563, 0, 0, 0, 0, 0, 564, 0, 0, 0, + 0, 564, 563, 564, 564, 564, 564, 564, 564, 564, + 564, 564, 564, 564, 0, 0, 0, 0, 563, 0, + 0, 0, 0, 0, 0, 564, 0, 564, 0, 564, + 0, 564, 564, 564, 0, 0, 0, 0, 0, 564, + 564, 564, 564, 0, 0, 0, 564, 564, 0, 566, + 0, 0, 0, 564, 564, 564, 564, 564, 564, 0, + 0, 0, 0, 0, 565, 0, 0, 0, 0, 565, + 564, 565, 565, 565, 565, 565, 565, 565, 565, 565, + 565, 565, 0, 0, 0, 0, 564, 0, 0, 0, + 0, 0, 0, 565, 0, 565, 0, 565, 0, 565, + 565, 565, 0, 0, 0, 0, 0, 565, 565, 565, + 565, 0, 0, 0, 565, 565, 0, 567, 0, 0, + 0, 565, 565, 565, 565, 565, 565, 0, 0, 0, + 0, 0, 566, 0, 0, 0, 0, 566, 565, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 0, 0, 0, 0, 565, 0, 0, 0, 0, 0, + 0, 566, 0, 566, 0, 566, 0, 566, 566, 566, + 0, 0, 0, 0, 0, 566, 566, 566, 566, 0, + 0, 0, 566, 566, 0, 568, 0, 0, 0, 566, + 566, 566, 566, 566, 566, 0, 0, 0, 0, 0, + 567, 0, 0, 0, 0, 567, 566, 567, 567, 567, + 567, 567, 567, 567, 567, 567, 567, 567, 0, 0, + 0, 0, 566, 0, 0, 0, 0, 0, 0, 567, + 0, 567, 0, 567, 0, 567, 567, 567, 0, 0, + 0, 0, 0, 567, 567, 567, 567, 0, 0, 0, + 567, 567, 0, 569, 0, 0, 0, 567, 567, 567, + 567, 567, 567, 0, 0, 0, 0, 0, 568, 0, + 0, 0, 0, 568, 567, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 568, 0, 0, 0, 0, + 567, 0, 0, 0, 0, 0, 0, 568, 0, 568, + 0, 568, 0, 568, 568, 568, 0, 0, 0, 0, + 0, 0, 0, 568, 568, 0, 0, 0, 568, 568, + 0, 570, 0, 0, 0, 0, 0, 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, 0, 568, 0, + 0, 0, 0, 0, 0, 569, 0, 569, 0, 569, + 0, 569, 569, 569, 0, 0, 0, 0, 0, 0, + 0, 569, 569, 0, 0, 0, 569, 569, 0, 571, + 0, 0, 0, 0, 0, 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, 0, 570, 0, 570, 0, 570, 0, 570, + 570, 570, 0, 0, 0, 0, 0, 0, 0, 570, + 570, 0, 0, 0, 570, 570, 0, 572, 0, 0, + 0, 0, 0, 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, + 0, 571, 0, 571, 0, 571, 0, 571, 571, 571, + 0, 0, 0, 0, 0, 0, 0, 571, 571, 0, + 0, 0, 571, 571, 0, 573, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 572, + 0, 572, 0, 572, 0, 572, 572, 572, 0, 0, + 0, 0, 0, 0, 0, 572, 572, 0, 0, 0, + 572, 572, 0, 574, 0, 0, 0, 0, 0, 0, + 0, 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, 0, 573, 0, 573, + 0, 573, 0, 573, 573, 573, 0, 0, 0, 0, + 0, 0, 0, 0, 573, 0, 0, 0, 573, 573, + 0, 575, 0, 0, 0, 0, 0, 0, 0, 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, 0, 574, 0, 574, 0, 574, + 0, 574, 574, 574, 0, 0, 0, 0, 0, 0, + 0, 0, 574, 0, 0, 0, 574, 574, 0, 576, + 0, 0, 0, 0, 0, 0, 0, 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, 0, 575, 0, 575, 0, 575, 0, 575, + 575, 575, 0, 0, 0, 0, 0, 0, 0, 0, + 575, 0, 0, 0, 0, 575, 0, 577, 0, 0, + 0, 0, 0, 0, 0, 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, + 0, 576, 0, 576, 0, 576, 0, 576, 576, 576, + 0, 0, 0, 0, 0, 0, 0, 0, 576, 0, + 0, 0, 0, 576, 0, 578, 0, 0, 0, 0, + 0, 0, 0, 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, 0, 577, + 0, 577, 0, 577, 0, 577, 577, 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 559, 554, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 555, 0, 0, - 0, 0, 555, 0, 555, 555, 555, 555, 555, 555, - 555, 555, 555, 555, 555, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 555, 0, 555, 0, - 555, 0, 555, 555, 555, 0, 555, 555, 0, 0, - 555, 555, 555, 555, 0, 0, 0, 555, 555, 0, - 560, 0, 555, 555, 555, 555, 555, 555, 555, 555, - 0, 0, 0, 0, 0, 559, 0, 0, 0, 0, - 559, 555, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 0, 0, 0, 0, 555, 0, 0, - 0, 0, 0, 0, 559, 0, 559, 0, 559, 0, - 559, 559, 559, 0, 0, 0, 0, 0, 559, 559, - 559, 559, 0, 0, 0, 559, 559, 0, 561, 0, - 559, 559, 559, 559, 559, 559, 559, 559, 0, 0, - 0, 0, 0, 560, 0, 0, 0, 0, 560, 559, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 0, 0, 0, 0, 559, 0, 0, 0, 0, - 0, 0, 560, 0, 560, 0, 560, 0, 560, 560, - 560, 0, 0, 0, 0, 0, 560, 560, 560, 560, - 0, 0, 0, 560, 560, 0, 562, 0, 560, 560, - 560, 560, 560, 560, 560, 560, 0, 0, 0, 0, - 0, 561, 0, 0, 0, 0, 561, 560, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, - 0, 0, 0, 560, 0, 0, 0, 0, 0, 0, - 561, 0, 561, 0, 561, 0, 561, 561, 561, 0, - 0, 0, 0, 0, 561, 561, 561, 561, 0, 0, - 0, 561, 561, 0, 563, 0, 561, 561, 561, 561, - 561, 561, 561, 561, 0, 0, 0, 0, 0, 562, - 0, 0, 0, 0, 562, 561, 562, 562, 562, 562, - 562, 562, 562, 562, 562, 562, 562, 0, 0, 0, - 0, 561, 0, 0, 0, 0, 0, 0, 562, 0, - 562, 0, 562, 0, 562, 562, 562, 0, 0, 0, - 0, 0, 562, 562, 562, 562, 0, 0, 0, 562, - 562, 0, 564, 0, 0, 0, 562, 562, 562, 562, - 562, 562, 0, 0, 0, 0, 0, 563, 0, 0, - 0, 0, 563, 562, 563, 563, 563, 563, 563, 563, - 563, 563, 563, 563, 563, 0, 0, 0, 0, 562, - 0, 0, 0, 0, 0, 0, 563, 0, 563, 0, - 563, 0, 563, 563, 563, 0, 0, 0, 0, 0, - 563, 563, 563, 563, 0, 0, 0, 563, 563, 0, - 565, 0, 0, 0, 563, 563, 563, 563, 563, 563, - 0, 0, 0, 0, 0, 564, 0, 0, 0, 0, - 564, 563, 564, 564, 564, 564, 564, 564, 564, 564, - 564, 564, 564, 0, 0, 0, 0, 563, 0, 0, - 0, 0, 0, 0, 564, 0, 564, 0, 564, 0, - 564, 564, 564, 0, 0, 0, 0, 0, 564, 564, - 564, 564, 0, 0, 0, 564, 564, 0, 566, 0, - 0, 0, 564, 564, 564, 564, 564, 564, 0, 0, - 0, 0, 0, 565, 0, 0, 0, 0, 565, 564, - 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, - 565, 0, 0, 0, 0, 564, 0, 0, 0, 0, - 0, 0, 565, 0, 565, 0, 565, 0, 565, 565, - 565, 0, 0, 0, 0, 0, 565, 565, 565, 565, - 0, 0, 0, 565, 565, 0, 567, 0, 0, 0, - 565, 565, 565, 565, 565, 565, 0, 0, 0, 0, - 0, 566, 0, 0, 0, 0, 566, 565, 566, 566, - 566, 566, 566, 566, 566, 566, 566, 566, 566, 0, - 0, 0, 0, 565, 0, 0, 0, 0, 0, 0, - 566, 0, 566, 0, 566, 0, 566, 566, 566, 0, - 0, 0, 0, 0, 566, 566, 566, 566, 0, 0, - 0, 566, 566, 0, 568, 0, 0, 0, 566, 566, - 566, 566, 566, 566, 0, 0, 0, 0, 0, 567, - 0, 0, 0, 0, 567, 566, 567, 567, 567, 567, - 567, 567, 567, 567, 567, 567, 567, 0, 0, 0, - 0, 566, 0, 0, 0, 0, 0, 0, 567, 0, - 567, 0, 567, 0, 567, 567, 567, 0, 0, 0, - 0, 0, 0, 0, 567, 567, 0, 0, 0, 567, - 567, 0, 569, 0, 0, 0, 0, 0, 567, 567, - 567, 567, 0, 0, 0, 0, 0, 568, 0, 0, - 0, 0, 568, 567, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 0, 0, 0, 0, 567, - 0, 0, 0, 0, 0, 0, 568, 0, 568, 0, - 568, 0, 568, 568, 568, 0, 0, 0, 0, 0, - 0, 0, 568, 568, 0, 0, 0, 568, 568, 0, - 570, 0, 0, 0, 0, 0, 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, 0, 568, 0, 0, - 0, 0, 0, 0, 569, 0, 569, 0, 569, 0, - 569, 569, 569, 0, 0, 0, 0, 0, 0, 0, - 569, 569, 0, 0, 0, 569, 569, 0, 571, 0, - 0, 0, 0, 0, 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, 0, 570, 0, 570, 0, 570, 0, 570, 570, - 570, 0, 0, 0, 0, 0, 0, 0, 570, 570, - 0, 0, 0, 570, 570, 0, 572, 0, 0, 0, - 0, 0, 0, 0, 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, 0, - 571, 0, 571, 0, 571, 0, 571, 571, 571, 0, - 0, 0, 0, 0, 0, 0, 571, 571, 0, 0, - 0, 571, 571, 0, 573, 0, 0, 0, 0, 0, - 0, 0, 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, 0, 572, 0, - 572, 0, 572, 0, 572, 572, 572, 0, 0, 0, - 0, 0, 0, 0, 0, 572, 0, 0, 0, 572, - 572, 0, 574, 0, 0, 0, 0, 0, 0, 0, - 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, 0, 573, 0, 573, 0, - 573, 0, 573, 573, 573, 0, 0, 0, 0, 0, - 0, 0, 0, 573, 0, 0, 0, 573, 573, 0, - 575, 0, 0, 0, 0, 0, 0, 0, 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, 0, 574, 0, 574, 0, 574, 0, - 574, 574, 574, 0, 0, 0, 0, 0, 0, 0, - 0, 574, 0, 0, 0, 0, 574, 0, 576, 0, - 0, 0, 0, 0, 0, 0, 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, 0, 575, 0, 575, 0, 575, 0, 575, 575, - 575, 0, 0, 0, 0, 0, 0, 0, 0, 575, - 0, 0, 0, 0, 575, 0, 577, 0, 0, 0, - 0, 0, 0, 0, 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, 0, - 576, 0, 576, 0, 576, 0, 576, 576, 576, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 576, 0, 578, 0, 0, 0, 0, 0, - 0, 0, 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, 0, 577, 0, - 577, 0, 577, 0, 577, 577, 577, 0, 0, 0, - 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 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, 0, 578, 0, 578, 0, - 578, 0, 578, 578, 578, 0, 0, 331, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, - 0, 0, 0, 579, 0, 0, 0, 0, 579, 578, - 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, - 579, 578, 0, 331, 0, 0, 0, 0, 0, 0, - 0, 0, 579, 0, 579, 0, 579, 578, 579, 579, - 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 579, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 579, 0, 0, 0, 0, + 0, 577, 0, 579, 0, 0, 0, 0, 0, 0, + 0, 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, 0, 578, 0, 578, + 0, 578, 0, 578, 578, 578, 0, 0, 0, 580, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 578, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 579, 0, 579, 0, 579, + 0, 579, 579, 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, 0, 0, - 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 579, 331, 0, 331, 0, 331, 0, - 0, 331, 0, 331, 331, 0, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 0, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 0, - 0, 56, 0, 331, 0, 331, 0, 0, 331, 57, - 25, 58, 26, 0, 331, 27, 59, 0, 60, 61, - 28, 62, 63, 64, 29, 0, 0, 0, 0, 0, + 0, 0, 580, 0, 0, 0, 0, 580, 579, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 580, 0, 580, 0, 580, 579, 580, 580, 580, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 56, 0, 580, 0, 0, 0, 0, 0, 57, + 25, 58, 26, 0, 580, 27, 59, 0, 60, 61, + 28, 62, 63, 64, 29, 0, 580, 0, 0, 0, 65, 0, 66, 31, 67, 68, 69, 70, 0, 0, - 33, 0, 0, 0, 71, 34, 0, 72, 73, 35, + 33, 0, 580, 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, @@ -10242,101 +10245,101 @@ void case_943() 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 915, 0, 0, 0, 106, 107, 108, 109, - 915, 915, 915, 915, 0, 0, 915, 915, 0, 915, - 915, 915, 915, 915, 915, 915, 0, 0, 0, 0, - 0, 915, 0, 915, 915, 915, 915, 915, 915, 0, - 0, 915, 0, 0, 0, 915, 915, 0, 915, 915, - 915, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 915, 0, 915, 0, 915, 915, 0, 0, 915, 0, - 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, - 915, 915, 0, 915, 0, 0, 915, 915, 0, 0, - 915, 915, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 915, 915, 915, 915, 915, - 0, 0, 0, 915, 0, 0, 0, 915, 0, 0, - 0, 0, 915, 915, 915, 915, 915, 0, 0, 0, - 915, 0, 915, 0, 0, 0, 0, 0, 915, 915, + 0, 0, 916, 0, 0, 0, 106, 107, 108, 109, + 916, 916, 916, 916, 0, 0, 916, 916, 0, 916, + 916, 916, 916, 916, 916, 916, 0, 0, 0, 0, + 0, 916, 0, 916, 916, 916, 916, 916, 916, 0, + 0, 916, 0, 0, 0, 916, 916, 0, 916, 916, + 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 916, 0, 916, 0, 916, 916, 0, 0, 916, 0, + 916, 916, 916, 916, 916, 916, 916, 916, 916, 916, + 916, 916, 0, 916, 0, 0, 916, 916, 0, 0, + 916, 916, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 916, 916, 916, 916, 916, + 0, 0, 0, 916, 0, 0, 0, 916, 0, 0, + 0, 0, 916, 916, 916, 916, 916, 0, 0, 0, + 916, 0, 916, 0, 0, 0, 0, 0, 916, 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 779, - 0, 0, 0, 915, 915, 915, 915, 779, 779, 779, - 779, 0, 0, 779, 779, 0, 779, 779, 779, 779, - 779, 779, 779, 0, 0, 0, 0, 0, 779, 0, - 779, 779, 779, 779, 779, 779, 0, 0, 779, 0, - 0, 0, 779, 779, 0, 779, 779, 779, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 779, 0, 779, - 0, 779, 779, 0, 0, 779, 0, 779, 779, 779, - 779, 779, 779, 779, 779, 779, 779, 779, 779, 0, - 779, 0, 0, 779, 779, 0, 0, 779, 779, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 780, + 0, 0, 0, 916, 916, 916, 916, 780, 780, 780, + 780, 0, 0, 780, 780, 0, 780, 780, 780, 780, + 780, 780, 780, 0, 0, 0, 0, 0, 780, 0, + 780, 780, 780, 780, 780, 780, 0, 0, 780, 0, + 0, 0, 780, 780, 0, 780, 780, 780, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 780, 0, 780, + 0, 780, 780, 0, 0, 780, 0, 780, 780, 780, + 780, 780, 780, 780, 780, 780, 780, 780, 780, 0, + 780, 0, 0, 780, 780, 0, 0, 780, 780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 779, 779, 779, 779, 779, 0, 0, 0, - 779, 0, 0, 0, 779, 0, 0, 0, 0, 779, - 779, 779, 779, 779, 0, 0, 0, 779, 0, 779, - 0, 0, 0, 0, 0, 779, 779, 0, 0, 0, + 0, 0, 780, 780, 780, 780, 780, 0, 0, 0, + 780, 0, 0, 0, 780, 0, 0, 0, 0, 780, + 780, 780, 780, 780, 0, 0, 0, 780, 0, 780, + 0, 0, 0, 0, 0, 780, 780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, - 779, 779, 779, 779, 57, 25, 0, 26, 0, 0, - 27, 256, 0, 1018, 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, 257, 37, 42, 38, 0, 0, 0, 39, - 0, 87, 0, 0, 88, 89, 0, 40, 41, 0, - 0, 42, 0, 0, 319, 0, 0, 0, 0, 90, + 780, 780, 780, 780, 57, 25, 0, 26, 0, 0, + 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, + 0, 0, 172, 0, 172, 65, 0, 172, 31, 0, + 0, 0, 172, 0, 0, 33, 172, 0, 0, 0, + 34, 0, 72, 73, 35, 172, 0, 0, 0, 0, + 0, 0, 172, 0, 0, 0, 37, 172, 38, 75, + 0, 172, 39, 0, 0, 77, 0, 79, 0, 81, + 40, 41, 257, 172, 42, 172, 0, 0, 0, 172, + 0, 87, 0, 0, 88, 89, 0, 172, 172, 0, + 0, 172, 0, 0, 172, 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, 509, 726, 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, - 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, + 101, 0, 0, 0, 102, 0, 103, 0, 0, 940, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, 106, 301, 108, 109, 57, 25, 0, 26, 0, 0, 27, 256, 0, - 1140, 0, 28, 62, 63, 354, 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, 906, 35, 39, + 0, 0, 28, 62, 63, 172, 29, 0, 0, 172, + 0, 172, 65, 0, 172, 31, 0, 0, 0, 172, + 0, 0, 33, 172, 0, 0, 0, 34, 0, 72, + 73, 35, 172, 0, 0, 0, 0, 0, 0, 172, + 0, 0, 0, 37, 172, 38, 75, 906, 172, 39, 0, 0, 77, 0, 79, 0, 81, 40, 41, 257, - 37, 42, 38, 0, 0, 0, 39, 0, 87, 0, - 0, 88, 89, 0, 40, 41, 0, 0, 42, 0, - 0, 319, 0, 0, 0, 0, 90, 91, 92, 93, + 172, 42, 172, 0, 0, 0, 172, 0, 87, 0, + 0, 88, 89, 0, 172, 172, 0, 0, 172, 0, + 0, 172, 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, 509, 0, 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, + 0, 102, 0, 103, 940, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, 301, 108, 109, 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 354, 34, 0, 72, 73, 35, 0, 0, + 0, 0, 172, 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, 257, 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, 90, 91, 92, 93, 94, 0, 0, 0, - 712, 975, 0, 0, 96, 0, 0, 0, 0, 0, + 712, 974, 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 695, 0, 106, 713, 108, 109, 0, 0, 57, 25, 0, 26, 0, 714, 27, 256, 0, 0, 0, 28, 62, 63, - 0, 29, 0, 0, 172, 0, 172, 65, 0, 172, - 31, 0, 0, 0, 172, 0, 0, 33, 172, 0, - 0, 0, 34, 0, 72, 73, 35, 172, 0, 0, - 0, 0, 0, 0, 172, 0, 0, 0, 37, 172, - 38, 75, 0, 172, 39, 0, 0, 77, 0, 79, - 0, 81, 40, 41, 257, 172, 42, 172, 0, 85, - 0, 172, 0, 87, 0, 0, 88, 89, 0, 172, - 172, 0, 0, 172, 0, 0, 172, 0, 0, 0, + 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, 257, 37, 42, 38, 0, 85, + 0, 39, 0, 87, 0, 0, 88, 89, 0, 40, + 41, 0, 0, 42, 0, 0, 319, 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, - 0, 939, 0, 0, 104, 105, 0, 0, 0, 0, + 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, 301, 108, 109, 65, 0, 0, 31, 0, 0, 0, - 0, 0, 0, 33, 0, 0, 0, 172, 34, 0, + 0, 0, 0, 33, 0, 0, 0, 320, 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, @@ -10350,23 +10353,23 @@ void case_943() 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 725, 0, 106, 713, 108, 109, 0, 0, 57, 25, 0, 26, 0, 714, 27, 256, 0, - 0, 0, 28, 62, 63, 0, 29, 0, 0, 172, - 0, 172, 65, 0, 172, 31, 0, 0, 0, 172, - 0, 0, 33, 172, 0, 0, 0, 34, 0, 72, - 73, 35, 172, 0, 0, 0, 0, 0, 0, 172, - 0, 0, 0, 37, 172, 38, 75, 0, 172, 39, + 0, 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, 257, - 172, 42, 172, 0, 0, 0, 172, 0, 87, 0, - 0, 88, 89, 0, 172, 172, 0, 0, 172, 0, - 0, 172, 0, 0, 0, 0, 90, 91, 92, 93, + 37, 42, 38, 0, 0, 0, 39, 0, 87, 0, + 0, 88, 89, 0, 40, 41, 0, 0, 42, 0, + 0, 319, 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, 509, 0, 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, - 0, 102, 0, 103, 939, 0, 0, 0, 0, 104, + 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 894, 0, 0, 0, 106, 301, 108, 109, 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, - 62, 63, 172, 29, 0, 0, 25, 0, 26, 65, + 62, 63, 326, 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, @@ -10379,29 +10382,29 @@ void case_943() 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 604, 0, 0, - 0, 106, 301, 108, 109, 604, 604, 0, 604, 0, - 0, 604, 604, 0, 0, 0, 604, 604, 604, 320, - 604, 0, 0, 0, 0, 0, 604, 0, 0, 604, - 0, 0, 0, 0, 0, 0, 604, 0, 0, 0, - 0, 604, 0, 604, 604, 604, 0, 0, 0, 0, - 0, 0, 0, 331, 0, 0, 0, 604, 0, 604, - 604, 0, 0, 604, 0, 0, 604, 0, 604, 0, - 604, 604, 604, 604, 0, 604, 0, 0, 0, 0, - 0, 0, 604, 0, 0, 604, 604, 0, 0, 331, + 0, 0, 0, 0, 0, 0, 0, 605, 0, 0, + 0, 106, 301, 108, 109, 605, 605, 0, 605, 0, + 0, 605, 605, 0, 0, 0, 605, 605, 605, 354, + 605, 0, 0, 0, 0, 0, 605, 0, 0, 605, + 0, 0, 0, 0, 0, 0, 605, 0, 0, 0, + 0, 605, 0, 605, 605, 605, 0, 0, 0, 0, + 0, 0, 0, 332, 0, 0, 0, 605, 0, 605, + 605, 0, 0, 605, 0, 0, 605, 0, 605, 0, + 605, 605, 605, 605, 0, 605, 0, 0, 0, 0, + 0, 0, 605, 0, 0, 605, 605, 0, 0, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 604, 604, 604, 604, 604, 0, 0, 0, 0, 0, - 0, 0, 604, 0, 0, 0, 0, 0, 604, 604, - 604, 604, 0, 0, 0, 604, 0, 604, 0, 0, - 0, 0, 0, 604, 604, 0, 0, 0, 0, 0, + 605, 605, 605, 605, 605, 0, 0, 0, 0, 0, + 0, 0, 605, 0, 0, 0, 0, 0, 605, 605, + 605, 605, 0, 0, 0, 605, 0, 605, 0, 0, + 0, 0, 0, 605, 605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 604, 604, - 604, 604, 331, 331, 331, 331, 0, 0, 0, 331, - 331, 0, 0, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 0, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 0, 48, 0, 0, 0, - 48, 331, 48, 0, 331, 48, 0, 48, 48, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 605, 605, + 605, 605, 332, 332, 332, 332, 0, 0, 0, 332, + 332, 0, 0, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 0, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 0, 48, 0, 0, 0, + 48, 332, 48, 0, 332, 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, @@ -10434,573 +10437,552 @@ void case_943() 48, 212, 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, - 331, 48, 0, 0, 48, 0, 48, 48, 48, 48, + 332, 48, 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 0, 0, 48, 48, - 48, 48, 0, 331, 0, 0, 0, 48, 48, 0, - 48, 48, 28, 48, 48, 48, 331, 0, 0, 48, - 0, 331, 0, 0, 331, 0, 331, 0, 331, 331, - 331, 331, 0, 0, 0, 28, 331, 0, 0, 48, - 331, 0, 0, 0, 331, 213, 0, 0, 28, 0, - 353, 0, 331, 28, 0, 331, 0, 331, 28, 0, - 28, 28, 28, 28, 0, 0, 28, 0, 28, 0, - 0, 0, 28, 353, 0, 0, 331, 0, 0, 0, - 352, 331, 0, 0, 28, 0, 353, 28, 331, 28, - 263, 353, 331, 0, 230, 48, 353, 0, 353, 353, - 353, 353, 0, 352, 0, 331, 353, 0, 0, 0, - 353, 0, 447, 28, 353, 0, 352, 0, 0, 28, - 28, 352, 353, 0, 229, 353, 352, 353, 352, 352, - 352, 352, 0, 0, 0, 448, 352, 331, 0, 0, - 352, 0, 0, 0, 352, 0, 0, 0, 449, 0, - 0, 353, 352, 451, 0, 352, 0, 352, 452, 0, + 48, 48, 0, 332, 0, 0, 0, 48, 48, 0, + 48, 48, 447, 48, 48, 48, 332, 0, 0, 48, + 0, 332, 0, 0, 332, 0, 332, 0, 332, 332, + 332, 332, 0, 0, 0, 448, 332, 0, 0, 48, + 332, 0, 0, 0, 332, 213, 0, 0, 449, 0, + 353, 0, 332, 451, 0, 332, 0, 332, 452, 0, 453, 454, 455, 456, 0, 0, 0, 0, 457, 0, - 0, 0, 458, 0, 0, 0, 1279, 0, 0, 0, - 0, 352, 0, 0, 459, 0, 0, 460, 0, 461, - 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, - 0, 28, 62, 63, 0, 29, 0, 353, 0, 0, - 0, 65, 0, 462, 31, 0, 0, 0, 0, 0, - 0, 33, 0, 0, 0, 0, 34, 0, 72, 73, - 35, 0, 582, 0, 0, 0, 0, 352, 0, 583, - 0, 0, 37, 0, 38, 75, 0, 0, 39, 0, - 0, 77, 0, 79, 0, 81, 40, 41, 257, 0, - 42, 0, 0, 0, 0, 0, 0, 584, 0, 1280, - 88, 89, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 90, 91, 92, 93, 94, - 0, 0, 0, 0, 0, 0, 0, 96, 901, 0, - 585, 0, 0, 98, 99, 100, 101, 0, 0, 0, - 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, - 0, 0, 0, 0, 0, 0, 57, 25, 0, 26, - 0, 0, 27, 256, 0, 0, 0, 28, 62, 63, - 0, 29, 0, 106, 469, 108, 109, 65, 0, 0, - 31, 0, 0, 0, 0, 0, 0, 33, 0, 0, - 0, 0, 34, 0, 72, 73, 35, 0, 582, 0, - 0, 0, 0, 0, 0, 583, 0, 0, 37, 0, - 38, 75, 0, 0, 39, 0, 0, 77, 0, 79, - 0, 81, 40, 41, 257, 0, 42, 0, 0, 0, - 0, 0, 0, 584, 0, 0, 88, 89, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 90, 91, 92, 93, 94, 0, 0, 0, 0, - 0, 0, 0, 96, 0, 0, 585, 0, 0, 98, - 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, - 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, - 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, - 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, - 469, 108, 109, 65, 0, 0, 31, 0, 0, 0, - 0, 0, 0, 33, 0, 0, 0, 0, 34, 0, - 72, 73, 35, 0, 582, 0, 0, 0, 0, 0, - 0, 583, 0, 0, 37, 0, 38, 75, 0, 0, - 39, 0, 0, 77, 0, 79, 0, 81, 40, 41, - 257, 0, 42, 0, 0, 0, 0, 0, 0, 584, - 0, 0, 88, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 90, 91, 92, - 93, 94, 0, 0, 0, 0, 0, 0, 0, 96, - 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, - 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, - 104, 105, 0, 0, 0, 0, 0, 0, 57, 25, - 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, - 62, 63, 0, 29, 0, 106, 469, 108, 109, 65, - 0, 0, 31, 0, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 34, 0, 72, 73, 35, 0, + 0, 0, 458, 353, 0, 0, 332, 0, 0, 0, + 447, 332, 0, 0, 459, 0, 353, 460, 332, 461, + 263, 353, 332, 0, 229, 48, 353, 0, 353, 353, + 353, 353, 0, 448, 0, 332, 353, 0, 0, 0, + 353, 0, 0, 462, 353, 0, 449, 0, 0, 0, + 0, 451, 353, 0, 0, 353, 452, 353, 453, 454, + 455, 456, 0, 0, 0, 0, 457, 332, 0, 0, + 458, 0, 0, 0, 1280, 0, 0, 57, 25, 0, + 26, 353, 459, 27, 256, 460, 0, 461, 28, 62, + 63, 0, 29, 0, 0, 0, 0, 0, 65, 0, + 0, 31, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 462, 0, 34, 0, 72, 73, 35, 0, 582, + 0, 0, 0, 0, 0, 0, 583, 0, 0, 37, + 0, 38, 75, 0, 0, 39, 0, 353, 77, 0, + 79, 0, 81, 40, 41, 257, 0, 42, 0, 0, + 0, 0, 0, 0, 584, 0, 0, 88, 89, 0, + 0, 0, 0, 0, 0, 0, 0, 1281, 0, 0, + 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, + 0, 0, 0, 0, 96, 901, 0, 585, 0, 0, + 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, + 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, + 0, 0, 0, 57, 25, 0, 26, 0, 0, 27, + 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, + 106, 469, 108, 109, 65, 0, 0, 31, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 0, 34, + 0, 72, 73, 35, 0, 582, 0, 0, 0, 0, + 0, 0, 583, 0, 0, 37, 0, 38, 75, 0, + 0, 39, 0, 0, 77, 0, 79, 0, 81, 40, + 41, 257, 0, 42, 0, 0, 0, 0, 0, 0, + 584, 0, 0, 88, 89, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 90, 91, + 92, 93, 94, 0, 0, 0, 0, 0, 0, 0, + 96, 0, 0, 585, 0, 0, 98, 99, 100, 101, + 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, + 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 106, 469, 108, 109, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 34, 0, 72, 73, 35, + 0, 582, 0, 0, 0, 0, 0, 0, 583, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 257, 0, 42, + 0, 0, 0, 0, 0, 0, 584, 0, 0, 88, + 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 90, 91, 92, 93, 94, 0, + 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, + 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, + 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, + 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, + 0, 27, 256, 0, 0, 0, 28, 62, 63, 0, + 29, 0, 106, 469, 108, 109, 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, 257, 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, - 37, 0, 38, 75, 0, 0, 39, 0, 0, 77, - 0, 79, 0, 81, 40, 41, 257, 0, 42, 0, - 0, 85, 0, 0, 0, 87, 0, 0, 88, 89, + 90, 91, 92, 93, 94, 0, 0, 0, 0, 0, + 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, + 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, + 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, + 0, 57, 25, 0, 26, 0, 0, 27, 256, 0, + 0, 0, 28, 62, 63, 0, 29, 0, 106, 301, + 108, 109, 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, 257, + 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, 90, 91, 92, 93, + 94, 0, 0, 0, 0, 859, 0, 0, 96, 0, + 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, + 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, + 105, 0, 0, 0, 0, 0, 0, 57, 25, 0, + 26, 0, 0, 27, 256, 0, 0, 0, 28, 62, + 63, 0, 29, 0, 106, 301, 108, 109, 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, 257, 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, 93, 94, 0, 0, - 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, - 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, - 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, - 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, - 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, - 0, 106, 301, 108, 109, 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, 257, 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, 90, - 91, 92, 93, 94, 0, 0, 0, 0, 859, 0, - 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, - 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, - 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, - 57, 25, 0, 26, 0, 0, 27, 256, 0, 0, - 0, 28, 62, 63, 0, 29, 0, 106, 301, 108, - 109, 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, 257, 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, 90, 91, 92, 93, 94, - 0, 0, 0, 509, 0, 0, 0, 96, 0, 0, - 0, 0, 0, 98, 99, 100, 101, 0, 0, 0, - 102, 0, 103, 0, 0, 0, 0, 0, 104, 105, - 0, 0, 0, 0, 0, 0, 57, 25, 0, 26, - 0, 0, 27, 256, 0, 0, 0, 28, 62, 63, - 0, 29, 0, 106, 301, 108, 109, 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, 257, 0, 42, 0, 0, 0, - 0, 0, 0, 87, 0, 0, 88, 89, 0, 0, + 0, 0, 90, 91, 92, 93, 94, 0, 0, 0, + 509, 0, 0, 0, 96, 0, 0, 0, 0, 0, + 98, 99, 100, 101, 0, 0, 0, 102, 0, 103, + 0, 0, 0, 0, 0, 104, 105, 0, 0, 0, + 0, 0, 0, 57, 25, 0, 26, 0, 0, 27, + 256, 0, 0, 0, 28, 62, 63, 0, 29, 0, + 106, 301, 108, 109, 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, 257, 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, 90, 91, + 92, 93, 94, 0, 0, 0, 503, 0, 0, 0, + 96, 0, 0, 0, 0, 0, 98, 99, 100, 101, + 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, + 0, 104, 105, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 106, 301, 108, 109, + 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, 90, 91, 92, 93, 94, 0, 0, 0, 503, - 0, 0, 0, 96, 0, 0, 0, 0, 0, 98, - 99, 100, 101, 0, 0, 0, 102, 0, 103, 0, - 0, 0, 0, 0, 104, 105, 0, 0, 0, 0, - 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, - 0, 0, 0, 28, 62, 63, 0, 29, 0, 106, - 301, 108, 109, 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, - 257, 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, 90, 91, 92, - 93, 94, 0, 0, 0, 0, 0, 0, 0, 96, - 0, 0, 0, 0, 0, 98, 99, 100, 101, 0, - 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, - 104, 105, 0, 0, 0, 0, 0, 0, 57, 25, - 0, 26, 0, 0, 27, 256, 0, 0, 0, 28, - 62, 63, 0, 29, 0, 106, 301, 108, 109, 65, - 0, 0, 31, 0, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 34, 0, 72, 73, 35, 0, + 0, 37, 0, 38, 75, 0, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 257, 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, 90, 91, 92, 93, 94, 0, + 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, + 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, + 0, 103, 0, 0, 0, 0, 0, 104, 105, 0, + 0, 0, 0, 0, 0, 57, 25, 0, 26, 0, + 0, 27, 256, 0, 0, 0, 28, 62, 63, 0, + 29, 0, 106, 301, 108, 109, 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, 257, 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, - 37, 0, 38, 75, 0, 0, 39, 0, 0, 77, - 0, 79, 0, 81, 40, 41, 257, 0, 42, 0, - 0, 0, 0, 0, 0, 87, 0, 0, 88, 89, + 90, 91, 92, 93, 94, 0, 0, 0, 0, 0, + 0, 0, 96, 0, 0, 0, 0, 0, 98, 99, + 100, 101, 0, 0, 0, 102, 0, 103, 0, 0, + 0, 0, 0, 104, 105, 0, 0, 0, 0, 0, + 0, 57, 25, 0, 26, 0, 0, 27, 256, 0, + 0, 0, 28, 62, 63, 0, 29, 0, 106, 469, + 108, 109, 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, 257, + 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, 90, 91, 92, 93, + 94, 0, 0, 0, 0, 0, 0, 0, 96, 0, + 0, 0, 0, 0, 98, 99, 100, 101, 0, 0, + 0, 102, 0, 103, 0, 0, 0, 0, 0, 104, + 105, 0, 0, 0, 0, 0, 0, 78, 78, 0, + 78, 0, 0, 78, 78, 0, 0, 0, 78, 78, + 78, 0, 78, 0, 106, 1009, 108, 109, 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, 90, 91, 92, 93, 94, 0, 0, - 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, - 0, 98, 99, 100, 101, 0, 0, 0, 102, 0, - 103, 0, 0, 0, 0, 0, 104, 105, 0, 0, - 0, 0, 0, 0, 57, 25, 0, 26, 0, 0, - 27, 256, 0, 0, 0, 28, 62, 63, 0, 29, - 0, 106, 469, 108, 109, 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, 257, 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, 90, - 91, 92, 93, 94, 0, 0, 0, 0, 0, 0, - 0, 96, 0, 0, 0, 0, 0, 98, 99, 100, - 101, 0, 0, 0, 102, 0, 103, 0, 0, 0, - 0, 0, 104, 105, 0, 0, 0, 0, 0, 0, - 78, 78, 0, 78, 0, 0, 78, 78, 0, 0, - 0, 78, 78, 78, 0, 78, 0, 106, 1010, 108, - 109, 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, 78, 78, 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, 135, 135, 0, 135, - 0, 0, 135, 135, 0, 0, 0, 135, 135, 135, - 0, 135, 0, 78, 78, 78, 78, 135, 0, 0, - 135, 0, 0, 0, 0, 0, 0, 135, 0, 0, - 0, 0, 135, 0, 135, 135, 135, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 135, 0, - 135, 135, 0, 0, 135, 0, 0, 135, 0, 135, - 0, 135, 135, 135, 135, 0, 135, 0, 0, 0, - 0, 0, 0, 135, 0, 0, 135, 135, 0, 0, + 0, 0, 78, 78, 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, 135, 135, 0, 135, 0, 0, 135, + 135, 0, 0, 0, 135, 135, 135, 0, 135, 0, + 78, 78, 78, 78, 135, 0, 0, 135, 0, 0, + 0, 0, 0, 0, 135, 0, 0, 0, 0, 135, + 0, 135, 135, 135, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 135, 0, 135, 135, 0, + 0, 135, 0, 0, 135, 0, 135, 0, 135, 135, + 135, 135, 0, 135, 0, 0, 0, 0, 0, 0, + 135, 0, 0, 135, 135, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, + 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, + 135, 0, 0, 0, 0, 0, 135, 135, 135, 135, + 0, 0, 0, 135, 0, 135, 0, 0, 0, 0, + 0, 135, 135, 0, 0, 0, 0, 0, 0, 57, + 25, 0, 26, 0, 0, 27, 256, 0, 0, 0, + 28, 62, 63, 0, 29, 0, 135, 135, 135, 135, + 65, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 0, 28, 0, 28, 34, 0, 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 135, 135, 135, 135, 135, 0, 0, 0, 0, - 0, 0, 0, 135, 0, 0, 0, 0, 0, 135, - 135, 135, 135, 0, 0, 0, 135, 0, 135, 0, - 0, 0, 0, 0, 135, 135, 0, 0, 0, 0, - 0, 0, 57, 25, 0, 26, 0, 0, 27, 256, - 0, 0, 0, 28, 62, 63, 0, 29, 0, 135, - 135, 135, 135, 65, 0, 0, 31, 0, 0, 0, - 0, 0, 0, 33, 0, 28, 0, 28, 34, 0, - 72, 73, 35, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 38, 75, 28, 0, - 39, 0, 0, 77, 0, 79, 0, 81, 40, 41, - 257, 28, 42, 0, 0, 0, 28, 0, 0, 0, - 0, 28, 0, 28, 28, 28, 28, 0, 0, 0, - 0, 28, 0, 0, 0, 28, 0, 90, 91, 92, - 258, 94, 0, 0, 0, 0, 0, 28, 0, 96, - 28, 0, 28, 0, 0, 98, 99, 100, 101, 0, - 0, 0, 102, 0, 103, 0, 57, 25, 0, 26, - 104, 105, 27, 256, 0, 0, 28, 28, 62, 63, - 0, 29, 28, 28, 0, 0, 0, 65, 0, 0, - 31, 0, 0, 0, 48, 106, 259, 33, 109, 0, - 0, 0, 34, 0, 72, 73, 35, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 48, 37, 0, - 38, 75, 0, 0, 39, 0, 0, 77, 0, 79, - 48, 81, 40, 41, 257, 48, 42, 0, 0, 0, - 48, 0, 48, 48, 48, 48, 0, 0, 48, 0, - 48, 0, 0, 0, 48, 0, 0, 0, 0, 0, - 0, 90, 91, 92, 258, 94, 48, 0, 0, 48, - 0, 48, 0, 96, 637, 0, 637, 0, 637, 98, - 0, 637, 101, 637, 637, 0, 637, 0, 637, 0, - 637, 0, 637, 637, 637, 48, 0, 0, 637, 637, - 0, 296, 0, 0, 637, 0, 637, 637, 0, 0, - 0, 637, 0, 0, 0, 637, 0, 0, 0, 106, - 259, 0, 109, 0, 0, 0, 637, 637, 0, 637, - 0, 0, 0, 637, 637, 0, 0, 0, 0, 0, - 0, 637, 637, 57, 25, 637, 26, 0, 637, 27, - 256, 0, 0, 637, 28, 62, 63, 0, 29, 0, - 0, 0, 0, 0, 65, 0, 0, 31, 0, 0, - 0, 0, 0, 0, 33, 637, 637, 0, 0, 34, - 0, 72, 73, 35, 0, 0, 0, 0, 637, 0, + 0, 37, 0, 38, 75, 28, 0, 39, 0, 0, + 77, 0, 79, 0, 81, 40, 41, 257, 28, 42, + 0, 0, 0, 28, 0, 0, 0, 0, 28, 0, + 28, 28, 28, 28, 0, 0, 0, 0, 28, 0, + 0, 0, 28, 0, 90, 91, 92, 258, 94, 0, + 0, 0, 0, 0, 28, 0, 96, 28, 0, 28, + 0, 0, 98, 99, 100, 101, 0, 0, 0, 102, + 0, 103, 0, 57, 25, 0, 26, 104, 105, 27, + 256, 0, 0, 28, 28, 62, 63, 0, 29, 28, + 28, 0, 0, 0, 65, 0, 0, 31, 0, 0, + 0, 0, 106, 259, 33, 109, 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, 257, 0, 42, 0, 0, 85, 0, 0, 0, - 0, 0, 0, 25, 0, 26, 0, 0, 27, 637, - 0, 0, 0, 28, 0, 0, 0, 29, 90, 91, - 92, 258, 0, 0, 0, 0, 31, 636, 0, 636, - 96, 0, 636, 33, 636, 636, 0, 636, 34, 636, - 0, 636, 35, 636, 636, 636, 0, 0, 0, 636, - 636, 0, 0, 0, 37, 636, 38, 636, 636, 0, - 39, 0, 636, 0, 0, 0, 636, 0, 40, 41, - 0, 0, 42, 0, 0, 319, 106, 259, 636, 0, - 636, 0, 0, 0, 636, 636, 0, 0, 0, 0, - 0, 0, 636, 636, 0, 636, 636, 636, 0, 636, - 636, 0, 636, 636, 636, 636, 0, 636, 0, 636, - 0, 636, 636, 636, 0, 0, 0, 636, 636, 0, - 0, 0, 0, 636, 0, 636, 636, 0, 0, 0, - 636, 0, 0, 0, 636, 0, 0, 0, 0, 636, - 0, 0, 0, 0, 0, 0, 636, 0, 636, 0, - 0, 0, 636, 636, 0, 0, 326, 0, 0, 0, - 636, 636, 0, 0, 636, 0, 0, 636, 0, 25, - 0, 26, 636, 0, 27, 0, 0, 1249, 0, 28, - 636, 671, 0, 29, 0, 672, 1250, 1251, 0, 0, - 0, 1252, 31, 0, 0, 0, 0, 1253, 0, 33, - 0, 25, 0, 26, 34, 0, 27, 0, 35, 1249, - 0, 28, 0, 671, 0, 29, 0, 672, 1250, 1251, - 37, 0, 38, 1252, 31, 0, 39, 0, 0, 1253, - 0, 33, 0, 0, 40, 41, 34, 0, 42, 0, - 35, 1254, 0, 0, 0, 48, 1255, 48, 636, 0, - 48, 0, 37, 0, 38, 48, 0, 0, 39, 48, - 0, 0, 0, 0, 0, 0, 40, 41, 48, 0, - 42, 0, 0, 1254, 0, 48, 0, 48, 1255, 48, - 48, 1256, 48, 0, 48, 0, 48, 48, 48, 0, - 0, 48, 0, 48, 0, 0, 48, 0, 48, 0, - 48, 0, 48, 0, 0, 48, 0, 48, 0, 0, - 48, 48, 48, 0, 48, 0, 48, 48, 48, 0, - 48, 48, 1257, 48, 0, 48, 48, 0, 48, 0, - 48, 48, 0, 0, 48, 48, 0, 48, 0, 0, - 0, 0, 48, 48, 48, 0, 48, 0, 0, 48, - 0, 48, 153, 25, 1257, 26, 48, 0, 27, 0, - 48, 0, 48, 28, 48, 0, 0, 29, 0, 48, - 0, 0, 48, 0, 48, 0, 31, 0, 48, 0, - 0, 48, 153, 33, 0, 0, 48, 48, 34, 0, - 48, 0, 35, 48, 563, 0, 0, 0, 48, 0, - 0, 564, 0, 0, 37, 0, 38, 0, 0, 0, - 39, 0, 0, 565, 0, 0, 0, 0, 40, 41, - 0, 0, 42, 0, 25, 566, 26, 0, 0, 27, - 48, 0, 0, 0, 28, 0, 0, 0, 29, 0, - 0, 0, 30, 25, 0, 26, 0, 31, 27, 0, - 0, 0, 32, 28, 33, 0, 0, 29, 0, 34, - 0, 0, 0, 35, 36, 0, 31, 0, 0, 0, - 0, 0, 0, 33, 48, 37, 0, 38, 34, 0, - 0, 39, 35, 0, 0, 0, 0, 0, 0, 40, - 41, 0, 0, 42, 37, 0, 38, 25, 0, 26, - 39, 0, 27, 0, 0, 0, 567, 28, 40, 41, - 0, 29, 42, 0, 25, 319, 26, 0, 0, 27, - 31, 0, 0, 0, 28, 0, 0, 33, 29, 0, - 0, 0, 34, 0, 0, 0, 35, 31, 0, 0, - 0, 0, 0, 0, 33, 0, 0, 0, 37, 34, - 38, 0, 0, 35, 39, 0, 0, 0, 0, 0, - 0, 0, 40, 41, 0, 37, 42, 38, 25, 511, - 26, 39, 0, 27, 0, 0, 0, 43, 28, 40, - 41, 0, 29, 42, 0, 0, 319, 0, 0, 0, - 0, 31, 25, 0, 26, 0, 354, 27, 33, 0, - 0, 0, 28, 34, 0, 0, 29, 35, 0, 0, - 0, 0, 0, 0, 0, 31, 0, 0, 0, 37, - 0, 38, 33, 0, 0, 39, 0, 34, 0, 0, - 0, 35, 0, 40, 41, 0, 0, 42, 0, 0, - 319, 0, 25, 37, 26, 38, 0, 27, 0, 39, - 354, 0, 28, 0, 0, 0, 29, 40, 41, 0, - 0, 42, 0, 0, 566, 31, 483, 630, 483, 0, - 0, 483, 33, 0, 0, 0, 483, 34, 0, 0, - 483, 35, 0, 0, 0, 0, 0, 0, 0, 483, - 0, 0, 0, 37, 0, 38, 483, 0, 0, 39, - 0, 483, 0, 0, 0, 483, 0, 40, 41, 0, - 0, 42, 0, 0, 739, 0, 0, 483, 0, 483, - 173, 632, 173, 483, 0, 173, 0, 0, 0, 0, - 173, 483, 483, 0, 173, 483, 0, 172, 483, 172, - 0, 0, 172, 173, 0, 354, 0, 172, 0, 0, - 173, 172, 0, 0, 0, 173, 0, 0, 0, 173, - 172, 0, 0, 0, 0, 0, 0, 172, 0, 0, - 0, 173, 172, 173, 0, 0, 172, 173, 0, 0, - 0, 0, 0, 0, 0, 173, 173, 0, 172, 173, - 172, 182, 173, 182, 172, 354, 182, 0, 0, 0, - 0, 182, 172, 172, 0, 182, 172, 0, 0, 172, - 0, 0, 0, 0, 182, 0, 0, 0, 0, 483, - 0, 182, 0, 0, 0, 0, 182, 0, 0, 35, - 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 35, 0, 182, 0, 182, 35, 0, 0, 182, 35, - 0, 0, 35, 0, 0, 0, 182, 182, 0, 0, - 182, 0, 0, 182, 35, 35, 0, 0, 0, 35, - 35, 0, 0, 173, 0, 35, 0, 35, 35, 35, - 35, 0, 0, 0, 0, 35, 0, 0, 0, 35, - 172, 35, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 35, 0, 35, 35, 33, 35, 0, 0, 0, - 35, 0, 0, 0, 0, 0, 33, 0, 0, 0, - 0, 33, 0, 0, 0, 33, 0, 0, 33, 0, - 35, 0, 0, 0, 0, 0, 35, 35, 0, 0, - 33, 33, 0, 0, 182, 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, 48, 0, 0, 48, 0, 48, 48, 48, 48, - 0, 0, 48, 0, 48, 0, 33, 48, 48, 0, - 48, 48, 33, 33, 48, 0, 0, 0, 0, 0, - 48, 0, 0, 48, 0, 48, 48, 48, 0, 48, - 0, 48, 48, 48, 0, 0, 0, 48, 0, 48, - 48, 48, 48, 0, 0, 0, 0, 48, 0, 48, - 0, 48, 0, 48, 0, 37, 48, 0, 0, 0, - 0, 0, 0, 48, 0, 0, 48, 0, 48, 48, + 41, 257, 0, 42, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 90, 91, + 92, 258, 94, 0, 0, 0, 0, 0, 0, 0, + 96, 638, 0, 638, 0, 638, 98, 0, 638, 101, + 638, 638, 0, 638, 0, 638, 0, 638, 0, 638, + 638, 638, 0, 0, 0, 638, 638, 0, 0, 0, + 0, 638, 0, 638, 638, 0, 0, 0, 638, 0, + 0, 0, 638, 0, 0, 0, 106, 259, 0, 109, + 0, 0, 0, 638, 638, 0, 638, 0, 0, 0, + 638, 638, 0, 0, 0, 0, 0, 0, 638, 638, + 57, 25, 638, 26, 0, 638, 27, 256, 0, 0, + 638, 28, 62, 63, 0, 29, 0, 0, 0, 0, + 0, 65, 0, 0, 31, 0, 0, 0, 0, 0, + 0, 33, 638, 638, 0, 0, 34, 0, 72, 73, + 35, 0, 0, 0, 0, 638, 0, 0, 0, 0, + 0, 0, 37, 0, 38, 75, 0, 0, 39, 0, + 0, 77, 0, 79, 0, 81, 40, 41, 257, 0, + 42, 0, 0, 85, 0, 0, 0, 0, 0, 0, + 25, 0, 26, 0, 0, 27, 638, 1189, 0, 0, + 28, 0, 0, 0, 29, 90, 91, 92, 258, 0, + 0, 0, 0, 31, 637, 0, 637, 96, 0, 637, + 33, 637, 637, 0, 637, 34, 637, 1190, 637, 35, + 637, 637, 637, 0, 0, 0, 637, 637, 0, 0, + 0, 37, 637, 38, 637, 637, 0, 39, 1191, 637, + 0, 0, 0, 637, 0, 40, 41, 0, 0, 42, + 0, 0, 319, 106, 259, 637, 0, 637, 0, 0, + 0, 637, 637, 0, 0, 0, 0, 0, 0, 637, + 637, 0, 637, 637, 637, 0, 637, 637, 0, 637, + 637, 637, 637, 0, 637, 0, 637, 0, 637, 637, + 637, 0, 0, 0, 637, 637, 0, 0, 0, 0, + 637, 0, 637, 637, 0, 0, 0, 637, 0, 0, + 0, 637, 0, 0, 0, 0, 637, 0, 0, 0, + 0, 0, 0, 637, 0, 637, 0, 0, 0, 637, + 637, 0, 0, 354, 0, 0, 0, 637, 637, 0, + 0, 637, 0, 0, 637, 0, 25, 0, 26, 637, + 0, 27, 0, 0, 1250, 0, 28, 637, 671, 0, + 29, 0, 672, 1251, 1252, 0, 0, 0, 1253, 31, + 0, 0, 0, 0, 1254, 0, 33, 0, 25, 0, + 26, 34, 0, 27, 0, 35, 1250, 0, 28, 0, + 671, 0, 29, 0, 672, 1251, 1252, 37, 0, 38, + 1253, 31, 0, 39, 0, 0, 1254, 0, 33, 0, + 0, 40, 41, 34, 0, 42, 0, 35, 1255, 0, + 0, 0, 48, 1256, 48, 637, 0, 48, 0, 37, + 0, 38, 48, 0, 0, 39, 48, 0, 0, 0, + 0, 0, 0, 40, 41, 48, 0, 42, 0, 0, + 1255, 0, 48, 0, 48, 1256, 48, 48, 1257, 48, + 0, 48, 0, 48, 48, 48, 0, 0, 48, 0, + 48, 0, 0, 48, 0, 48, 0, 48, 0, 48, + 0, 0, 48, 0, 48, 0, 0, 48, 48, 48, + 0, 48, 0, 48, 48, 48, 0, 48, 48, 1258, + 48, 0, 48, 48, 0, 48, 0, 48, 48, 0, 0, 48, 48, 0, 48, 0, 0, 0, 0, 48, - 0, 48, 48, 48, 48, 0, 0, 0, 0, 48, - 0, 0, 48, 48, 48, 0, 0, 0, 38, 0, - 0, 0, 0, 0, 0, 48, 0, 48, 48, 48, - 48, 48, 48, 0, 0, 0, 0, 48, 0, 48, - 48, 48, 48, 0, 0, 0, 0, 48, 0, 0, - 0, 48, 48, 0, 48, 0, 48, 48, 0, 0, - 194, 0, 0, 48, 0, 48, 48, 48, 48, 0, - 48, 0, 0, 0, 0, 48, 0, 48, 48, 48, - 48, 0, 0, 0, 0, 48, 0, 0, 0, 48, - 48, 0, 48, 0, 48, 48, 0, 48, 196, 48, - 0, 48, 0, 48, 48, 0, 48, 0, 48, 0, - 0, 0, 0, 48, 0, 48, 48, 48, 48, 0, - 48, 0, 0, 48, 0, 0, 0, 48, 0, 0, - 48, 0, 0, 48, 0, 0, 297, 447, 48, 48, - 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, - 0, 48, 0, 48, 0, 0, 0, 48, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 48, 48, - 48, 48, 48, 449, 48, 0, 0, 0, 451, 0, - 0, 0, 0, 452, 0, 453, 454, 455, 456, 0, - 0, 0, 0, 457, 0, 0, 0, 458, 48, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 459, - 0, 0, 460, 0, 461, 0, 0, 0, 0, 0, + 48, 48, 0, 48, 0, 0, 48, 0, 48, 153, + 25, 1258, 26, 48, 0, 27, 0, 48, 0, 48, + 28, 48, 0, 0, 29, 0, 48, 0, 0, 48, + 0, 48, 0, 31, 0, 48, 0, 0, 48, 153, + 33, 0, 0, 48, 48, 34, 0, 48, 0, 35, + 48, 563, 0, 0, 0, 48, 0, 0, 564, 0, + 0, 37, 0, 38, 0, 0, 0, 39, 0, 0, + 565, 0, 0, 0, 0, 40, 41, 0, 0, 42, + 0, 25, 566, 26, 0, 0, 27, 48, 0, 0, + 0, 28, 0, 0, 0, 29, 0, 0, 0, 30, + 25, 0, 26, 0, 31, 27, 0, 0, 0, 32, + 28, 33, 0, 0, 29, 0, 34, 0, 0, 0, + 35, 36, 0, 31, 0, 0, 0, 0, 0, 0, + 33, 48, 37, 0, 38, 34, 0, 0, 39, 35, + 0, 0, 0, 0, 0, 0, 40, 41, 0, 0, + 42, 37, 0, 38, 25, 0, 26, 39, 0, 27, + 0, 0, 0, 567, 28, 40, 41, 0, 29, 42, + 0, 25, 511, 26, 0, 0, 27, 31, 0, 0, + 0, 28, 0, 0, 33, 29, 0, 0, 0, 34, + 0, 0, 0, 35, 31, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 0, 37, 34, 38, 0, 0, + 35, 39, 0, 0, 0, 0, 0, 0, 0, 40, + 41, 0, 37, 42, 38, 25, 319, 26, 39, 0, + 27, 0, 0, 0, 43, 28, 40, 41, 0, 29, + 42, 0, 0, 319, 0, 0, 0, 0, 31, 25, + 0, 26, 0, 354, 27, 33, 0, 0, 0, 28, + 34, 0, 0, 29, 35, 0, 0, 0, 0, 0, + 0, 0, 31, 0, 0, 0, 37, 0, 38, 33, + 0, 0, 39, 0, 34, 0, 0, 0, 35, 0, + 40, 41, 0, 0, 42, 0, 0, 566, 0, 484, + 37, 484, 38, 0, 484, 0, 39, 630, 0, 484, + 0, 0, 0, 484, 40, 41, 0, 0, 42, 0, + 0, 739, 484, 173, 632, 173, 0, 0, 173, 484, + 0, 0, 0, 173, 484, 0, 0, 173, 484, 0, + 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, + 484, 0, 484, 173, 0, 0, 484, 0, 173, 0, + 0, 0, 173, 0, 484, 484, 0, 0, 484, 0, + 0, 484, 0, 0, 173, 0, 173, 172, 354, 172, + 173, 0, 172, 0, 0, 0, 0, 172, 173, 173, + 0, 172, 173, 0, 182, 173, 182, 0, 0, 182, + 172, 0, 354, 0, 182, 0, 0, 172, 182, 0, + 0, 0, 172, 0, 0, 0, 172, 182, 0, 0, + 0, 35, 0, 0, 182, 0, 0, 0, 172, 182, + 172, 0, 35, 182, 172, 0, 0, 35, 0, 0, + 0, 35, 172, 172, 35, 182, 172, 182, 0, 172, + 0, 182, 484, 0, 0, 0, 35, 35, 0, 182, + 182, 35, 35, 182, 33, 0, 182, 35, 0, 35, + 35, 35, 35, 0, 0, 33, 173, 35, 0, 0, + 33, 35, 0, 35, 33, 0, 0, 33, 0, 0, + 0, 0, 0, 35, 0, 35, 35, 0, 35, 33, + 33, 0, 35, 0, 33, 33, 0, 0, 0, 0, + 33, 0, 33, 33, 33, 33, 0, 0, 0, 0, + 33, 0, 35, 0, 33, 0, 33, 0, 35, 35, + 172, 0, 0, 48, 0, 0, 33, 0, 0, 33, + 0, 33, 0, 0, 48, 33, 0, 182, 0, 48, + 0, 0, 0, 48, 0, 0, 48, 0, 0, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 48, 48, + 0, 33, 33, 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, 48, 0, + 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, + 0, 0, 48, 0, 48, 0, 48, 0, 48, 0, + 37, 48, 0, 0, 0, 0, 0, 0, 48, 0, + 0, 48, 0, 48, 48, 0, 48, 48, 0, 48, + 0, 0, 0, 0, 48, 0, 48, 48, 48, 48, + 0, 0, 0, 0, 48, 0, 0, 48, 48, 48, + 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, + 48, 0, 48, 48, 48, 48, 48, 48, 0, 0, + 0, 0, 48, 0, 48, 48, 48, 48, 0, 0, + 0, 0, 48, 0, 0, 0, 48, 48, 0, 48, + 0, 48, 48, 0, 0, 194, 0, 0, 48, 0, + 48, 48, 48, 48, 0, 48, 0, 0, 0, 0, + 48, 0, 48, 48, 48, 48, 0, 0, 0, 0, + 48, 0, 0, 0, 48, 48, 0, 48, 0, 48, + 48, 0, 48, 196, 48, 0, 48, 0, 48, 48, + 0, 48, 0, 48, 0, 0, 0, 0, 48, 0, + 48, 48, 48, 48, 0, 48, 0, 0, 48, 0, + 0, 0, 48, 0, 0, 48, 0, 0, 48, 0, + 0, 297, 447, 48, 48, 0, 0, 48, 48, 48, + 48, 48, 48, 48, 0, 0, 48, 0, 48, 0, + 0, 0, 48, 0, 0, 448, 0, 0, 0, 0, + 0, 0, 0, 48, 48, 48, 48, 48, 449, 48, + 0, 0, 450, 451, 0, 0, 0, 0, 452, 0, + 453, 454, 455, 456, 0, 0, 0, 0, 457, 0, + 0, 0, 458, 48, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 459, 0, 0, 460, 0, 461, + 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, 462, + 0, 0, 0, 462, }; protected static readonly short [] yyCheck = { 17, - 17, 299, 4, 17, 52, 18, 507, 17, 191, 300, - 235, 17, 20, 20, 6, 190, 549, 509, 250, 159, - 291, 335, 464, 85, 60, 483, 559, 48, 296, 298, - 60, 328, 906, 318, 353, 759, 1077, 730, 0, 78, - 569, 113, 256, 115, 237, 59, 256, 256, 107, 1197, - 60, 113, 256, 115, 64, 324, 74, 1114, 1115, 256, - 78, 256, 268, 294, 256, 1213, 80, 256, 82, 256, - 256, 268, 294, 335, 353, 256, 256, 911, 96, 256, - 88, 89, 256, 268, 256, 705, 706, 277, 17, 268, - 282, 276, 1400, 1401, 256, 372, 272, 374, 325, 21, - 264, 109, 256, 1160, 88, 89, 256, 0, 256, 17, - 0, 391, 17, 367, 401, 17, 372, 371, 374, 17, - 296, 650, 314, 294, 257, 109, 413, 372, 748, 17, - 750, 53, 17, 365, 414, 306, 60, 17, 407, 17, - 266, 159, 159, 191, 358, 159, 358, 323, 1456, 159, - 339, 17, 429, 159, 256, 344, 256, 346, 339, 17, - 391, 325, 368, 352, 353, 269, 420, 429, 256, 963, - 94, 381, 256, 429, 98, 99, 100, 101, 102, 103, - 104, 105, 286, 414, 429, 339, 381, 235, 314, 375, - 344, 418, 346, 367, 202, 203, 418, 991, 352, 353, - 259, 1035, 376, 428, 256, 226, 503, 369, 506, 418, - 424, 425, 426, 427, 418, 707, 422, 343, 202, 203, - 370, 369, 372, 1371, 374, 422, 418, 546, 418, 419, - 159, 418, 250, 418, 1072, 549, 429, 255, 418, 231, - 429, 418, 301, 422, 523, 559, 418, 418, 325, 375, - 1398, 159, 288, 325, 159, 317, 264, 159, 288, 321, - 296, 159, 1410, 325, 1412, 391, 368, 546, 418, 369, - 994, 159, 374, 291, 159, 429, 294, 295, 288, 159, - 264, 159, 290, 367, 314, 369, 374, 371, 414, 307, - 569, 1159, 300, 159, 312, 257, 314, 356, 306, 313, - 318, 159, 428, 256, 314, 294, 290, 346, 368, 1177, - 335, 329, 330, 842, 256, 294, 1009, 369, 335, 294, - 376, 341, 306, 277, 1365, 335, 376, 281, 346, 335, - 257, 1055, 651, 418, 262, 418, 420, 368, 256, 423, - 372, 418, 350, 428, 256, 353, 368, 365, 366, 369, - 970, 269, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 256, 288, 256, 350, 257, 286, 429, - 298, 650, 296, 429, 1431, 434, 384, 385, 1252, 429, - 428, 873, 272, 368, 402, 372, 256, 277, 342, 369, - 438, 281, 671, 373, 852, 1263, 882, 429, 429, 1267, - 384, 385, 391, 1460, 412, 413, 296, 429, 693, 468, - 469, 368, 391, 343, 435, 436, 391, 370, 368, 368, - 441, 374, 430, 430, 1292, 414, 368, 339, 412, 413, - 349, 350, 374, 323, 493, 414, 444, 444, 263, 414, - 256, 709, 429, 423, 429, 369, 339, 679, 339, 305, - 378, 379, 342, 483, 861, 367, 775, 381, 382, 383, - 263, 391, 386, 387, 478, 872, 1304, 305, 1088, 418, - 962, 341, 429, 483, 367, 369, 367, 256, 371, 429, - 373, 374, 375, 376, 414, 369, 343, 505, 381, 507, - 315, 509, 386, 387, 1332, 1333, 775, 1335, 428, 369, - 1120, 1121, 988, 272, 990, 519, 520, 1127, 1346, 372, - 429, 1349, 315, 531, 343, 523, 523, 576, 375, 578, - 538, 580, 841, 339, 381, 372, 1364, 296, 344, 343, - 346, 368, 549, 376, 391, 272, 352, 353, 546, 549, - 371, 839, 559, 549, 558, 256, 375, 349, 350, 559, - 1388, 349, 350, 559, 323, 418, 256, 414, 357, 296, - 792, 569, 391, 842, 582, 583, 851, 381, 374, 866, - 369, 428, 376, 372, 373, 374, 1182, 391, 718, 357, - 1038, 418, 429, 642, 369, 414, 323, 386, 367, 420, - 369, 1124, 371, 372, 305, 374, 376, 376, 369, 428, - 414, 870, 367, 367, 272, 305, 374, 418, 386, 277, - 416, 629, 376, 281, 428, 906, 62, 635, 1224, 418, - 66, 67, 68, 367, 70, 71, 371, 429, 296, 75, - 76, 429, 376, 418, 386, 1182, 82, 357, 84, 418, - 86, 420, 650, 1182, 423, 91, 92, 418, 416, 6, - 574, 1182, 306, 373, 713, 323, 1182, 294, 367, 313, - 17, 679, 371, 671, 373, 374, 386, 376, 114, 306, - 1182, 1182, 381, 709, 342, 693, 357, 1224, 1182, 741, - 672, 979, 1181, 1182, 702, 1224, 414, 418, 369, 707, - 379, 339, 373, 1224, 712, 705, 706, 428, 1224, 931, - 428, 1200, 414, 60, 339, 386, 415, 64, 371, 344, - 373, 346, 1224, 1224, 349, 350, 428, 352, 353, 367, - 1224, 373, 736, 381, 376, 1224, 734, 1226, 376, 392, - 393, 88, 89, 391, 752, 391, 754, 418, 748, 374, - 750, 371, 369, 373, 758, 759, 306, 755, 308, 412, - 734, 769, 109, 313, 381, 367, 414, 420, 414, 374, - 423, 376, 371, 771, 376, 325, 381, 775, 816, 787, - 428, 755, 428, 1044, 792, 793, 285, 795, 1092, 1077, - 381, 373, 370, 371, 376, 709, 374, 771, 806, 807, - 391, 367, 382, 383, 429, 371, 414, 373, 374, 1270, - 376, 384, 159, 421, 370, 381, 396, 397, 374, 1080, - 1124, 257, 1283, 414, 260, 339, 824, 824, 327, 837, - 344, 839, 346, 882, 369, 349, 350, 372, 352, 353, - 389, 1302, 1007, 851, 842, 843, 854, 829, 1070, 415, - 1154, 1283, 391, 861, 370, 202, 203, 1118, 374, 367, - 374, 385, 298, 871, 371, 873, 373, 368, 376, 843, - 371, 1353, 373, 374, 310, 414, 394, 395, 377, 378, - 379, 380, 421, 382, 383, 384, 385, 386, 387, 388, - 389, 392, 393, 392, 393, 394, 395, 396, 397, 398, - 399, 367, 367, 367, 369, 913, 306, 915, 906, 917, - 376, 412, 376, 313, 372, 429, 374, 264, 1133, 420, - 367, 400, 423, 931, 372, 325, 374, 1188, 357, 376, - 928, 928, 418, 1415, 357, 339, 1109, 390, 936, 988, - 344, 288, 346, 290, 373, 349, 350, 369, 352, 353, - 373, 370, 373, 300, 962, 374, 938, 386, 940, 306, - 942, 1010, 936, 386, 372, 1234, 374, 314, 376, 1451, - 970, 1252, 1241, 368, 370, 368, 372, 376, 371, 374, - 373, 374, 1473, 1474, 418, 372, 381, 374, 335, 376, - 994, 339, 374, 1001, 376, 1003, 344, 1005, 346, 392, - 393, 349, 350, 350, 352, 353, 353, 339, 374, 370, - 376, 372, 344, 374, 346, 371, 357, 349, 350, 412, - 352, 353, 398, 399, 1016, 429, 415, 420, 369, 256, - 423, 372, 373, 370, 339, 372, 1044, 384, 385, 344, - 370, 346, 372, 479, 374, 386, 418, 352, 353, 1057, - 1058, 1055, 386, 387, 388, 370, 371, 1065, 373, 374, - 375, 418, 1070, 370, 418, 412, 413, 374, 1071, 1077, - 370, 1109, 1080, 1111, 374, 370, 277, 1365, 381, 374, - 367, 429, 340, 519, 371, 1092, 373, 374, 1088, 376, - 376, 1099, 1092, 376, 381, 1133, 1092, 429, 1106, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, 373, - 1118, 370, 367, 372, 1112, 343, 370, 1124, 372, 376, - 1120, 1121, 1130, 1131, 1124, 1163, 376, 1127, 1124, 390, - 391, 392, 393, 372, 418, 374, 483, 372, 370, 374, - 372, 354, 355, 1181, 1182, 418, 370, 1154, 372, 374, - 376, 376, 372, 374, 1154, 376, 418, 374, 1154, 376, - 354, 355, 1200, 1171, 369, 374, 1164, 376, 414, 415, - 414, 364, 365, 349, 350, 418, 523, 418, 1186, 376, - 1188, 418, 1180, 372, 373, 418, 1224, 372, 1226, 364, - 365, 98, 99, 100, 101, 102, 103, 104, 105, 546, - 388, 389, 549, 1075, 1076, 256, 1180, 394, 395, 372, - 372, 372, 559, 368, 265, 374, 267, 294, 372, 270, - 372, 372, 569, 372, 275, 372, 418, 294, 279, 374, - 372, 1280, 372, 1237, 418, 1233, 1234, 288, 376, 374, - 372, 0, 371, 1241, 295, 1294, 256, 374, 418, 300, - 375, 1249, 1250, 304, 1252, 381, 356, 372, 418, 1233, - 1258, 374, 1311, 375, 1313, 316, 374, 318, 373, 376, - 418, 322, 1270, 372, 1272, 1249, 1250, 1275, 381, 330, - 331, 374, 374, 334, 1288, 1283, 337, 374, 418, 374, - 294, 372, 429, 261, 374, 423, 367, 418, 1272, 372, - 372, 1275, 418, 650, 1302, 1343, 343, 0, 373, 294, - 374, 294, 374, 370, 418, 371, 284, 418, 367, 256, - 418, 375, 1360, 256, 671, 256, 374, 256, 372, 297, - 372, 381, 280, 256, 302, 1373, 1374, 367, 372, 307, - 368, 309, 310, 311, 312, 1353, 343, 1351, 418, 317, - 418, 376, 418, 321, 370, 418, 371, 1365, 705, 706, - 418, 374, 1400, 1401, 376, 333, 374, 418, 336, 376, - 338, 376, 372, 372, 1382, 370, 265, 423, 267, 381, - 421, 270, 347, 272, 351, 367, 275, 734, 381, 381, - 279, 256, 256, 372, 362, 368, 372, 347, 370, 288, - 374, 748, 372, 750, 375, 367, 295, 1415, 755, 370, - 370, 300, 375, 302, 372, 304, 348, 368, 1456, 374, - 418, 328, 374, 339, 771, 368, 348, 316, 775, 318, - 418, 376, 367, 322, 323, 375, 356, 367, 376, 367, - 381, 330, 331, 1451, 368, 334, 371, 374, 337, 368, - 418, 368, 418, 1457, 1458, 368, 337, 372, 305, 418, - 1464, 1465, 369, 371, 418, 1473, 1474, 371, 369, 418, - 367, 418, 0, 371, 381, 382, 383, 376, 371, 386, - 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, - 397, 398, 399, 400, 401, 842, 843, 418, 257, 371, - 373, 381, 261, 371, 367, 371, 381, 369, 256, 418, - 371, 381, 372, 272, 372, 374, 373, 373, 277, 374, - 374, 374, 281, 372, 376, 284, 372, 370, 418, 418, - 418, 376, 376, 372, 418, 376, 372, 296, 297, 367, - 372, 368, 301, 302, 381, 370, 372, 368, 307, 315, - 309, 310, 311, 312, 263, 371, 371, 368, 317, 906, - 372, 0, 321, 256, 323, 372, 0, 367, 261, 262, - 376, 376, 368, 372, 333, 0, 335, 336, 418, 338, - 368, 376, 372, 342, 418, 372, 370, 367, 370, 936, - 376, 284, 368, 368, 372, 376, 503, 367, 418, 418, - 368, 294, 376, 362, 297, 298, 368, 376, 372, 302, - 369, 376, 305, 376, 307, 372, 309, 310, 311, 312, - 372, 372, 368, 970, 317, 372, 367, 376, 321, 368, - 368, 367, 325, 373, 376, 315, 263, 51, 12, 376, - 333, 376, 0, 336, 376, 338, 339, 376, 376, 376, - 376, 344, 52, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 5, 928, 824, 574, 1070, 362, - 1200, 1226, 1070, 1405, 367, 368, 1368, 370, 371, 372, - 373, 374, 375, 376, 671, 378, 379, 1356, 381, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 1421, 392, - 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, - 413, 1385, 1351, 416, 1258, 418, 845, 420, 256, 685, - 423, 845, 841, 1270, 262, 845, 429, 1465, 1289, 1224, - 1212, 1088, 1459, 1378, 1374, 1092, 1458, 1373, 1163, 1313, - 523, 1164, 1258, 792, 787, 816, 365, 979, 72, 712, - 866, 583, 331, 709, 94, 1112, 294, 679, 396, 398, - 298, 397, 775, 1120, 1121, 399, 401, 1124, 400, 546, - 1127, 1233, 1147, 1154, 1092, 964, 159, 1058, 1037, 991, - 1038, 1047, 949, 1131, 1229, 886, 1049, 521, 822, 420, - 821, -1, -1, -1, -1, -1, -1, 1154, -1, 0, - -1, 339, -1, -1, -1, -1, 344, 1164, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, - -1, -1, -1, 1180, -1, -1, -1, -1, -1, 367, - 368, 369, 370, 371, 372, 373, 374, 375, 376, -1, - 378, 379, -1, -1, 382, 383, 384, 385, 386, -1, - -1, 389, 390, -1, -1, -1, 394, 395, 396, 397, - 398, 399, 400, 401, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 413, 1233, 1234, 416, -1, - 418, -1, 420, -1, 1241, 423, -1, -1, 256, 257, - -1, 429, 1249, 1250, -1, 1252, 264, 265, 266, 267, - 268, -1, 270, 271, -1, 273, 274, 275, 276, 277, - 278, 279, 280, -1, -1, 1272, -1, 285, 1275, 287, - 288, 289, 290, 291, 292, -1, -1, 295, 0, -1, - -1, 299, 300, -1, 302, 303, 304, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 314, -1, 316, 866, - 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, 359, 360, 361, 362, 363, -1, -1, -1, 367, - 368, -1, -1, 371, -1, -1, -1, -1, 376, 377, - 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, - -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 417, - 418, 419, 420, -1, 422, 256, 257, -1, -1, -1, - -1, 429, -1, 264, 265, 266, 267, 268, -1, 270, - 271, -1, 273, 274, 275, 276, 277, 278, 279, -1, - -1, 0, -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, + 17, 52, 4, 17, 20, 18, 300, 299, 507, 17, + 291, 191, 235, 353, 250, 509, 20, 6, 464, 190, + 85, 60, 549, 298, 159, 483, 353, 318, 328, 335, + 1077, 60, 559, 296, 906, 759, 730, 78, 237, 107, + 705, 706, 256, 268, 569, 59, 0, 256, 113, 324, + 115, 0, 1114, 1115, 268, 1196, 74, 277, 17, 113, + 78, 115, 268, 256, 256, 256, 80, 17, 82, 17, + 256, 1212, 88, 89, 256, 325, 17, 256, 96, 88, + 89, 256, 256, 748, 256, 750, 48, 335, 256, 282, + 911, 294, 17, 109, 256, 1157, 349, 350, 371, 256, + 109, 268, 256, 256, 294, 17, 368, 21, 277, 276, + 256, 256, 281, 372, 263, 60, 306, 256, 367, 374, + 17, 314, 367, 357, 17, 650, 17, 376, 257, 365, + 339, 376, 407, 256, 0, 344, 358, 346, 17, 53, + 191, 159, 159, 352, 353, 159, 256, 420, 256, 94, + 17, 159, 386, 98, 99, 100, 101, 102, 103, 104, + 105, 416, 368, 257, 339, 256, 315, 429, 418, 344, + 429, 346, 358, 342, 17, 256, 429, 352, 353, 341, + 256, 429, 305, 523, 235, 339, 202, 203, 370, 381, + 372, 259, 374, 202, 203, 305, 256, 422, 418, 419, + 159, 294, 381, 503, 256, 428, 546, 369, 422, 159, + 294, 159, 1033, 707, 506, 418, 422, 60, 159, 546, + 429, 64, 367, 369, 369, 418, 371, 418, 418, 569, + 429, 1372, 250, 301, 159, 374, 418, 255, 424, 425, + 426, 427, 231, 549, 418, 294, 418, 159, 264, 288, + 418, 418, 317, 559, 429, 264, 321, 296, 1399, 288, + 325, 418, 159, 1070, 226, 418, 159, 375, 159, 993, + 1411, 325, 1413, 291, 290, 420, 294, 295, 423, 370, + 159, 290, 256, 374, 300, 314, 367, 339, 356, 307, + 306, 418, 159, 369, 312, 376, 314, 306, 391, 313, + 318, 428, 256, 372, 969, 346, 368, 391, 257, 369, + 650, 329, 330, 294, 1008, 367, 159, 842, 335, 1366, + 335, 414, 1401, 1402, 651, 325, 401, 335, 346, 1053, + 414, 671, 369, 369, 350, 266, 373, 353, 413, 272, + 256, 350, 391, 288, 882, 418, 264, 365, 366, 418, + 305, 296, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 296, 256, 414, 434, 429, 384, 385, + 1432, 368, 256, 368, 1156, 384, 385, 428, 1457, 873, + 376, 1253, 418, 314, 402, 339, 423, 438, 349, 350, + 323, 257, 349, 350, 852, 369, 412, 413, 368, 1461, + 468, 469, 693, 412, 413, 1187, 272, 325, 368, 372, + 391, 277, 343, 367, 430, 281, 305, 371, 418, 373, + 374, 375, 376, 1088, 369, 493, 430, 381, 444, 262, + 296, 368, 429, 414, 429, 775, 381, 382, 383, 256, + 444, 386, 387, 679, 375, 288, 709, 339, 775, 987, + 376, 989, 368, 343, 483, 1120, 1121, 323, 374, 429, + 391, 372, 1127, 374, 478, 298, 429, 961, 429, 429, + 376, 314, 429, 435, 436, 367, 342, 372, 376, 441, + 256, 418, 1264, 414, 368, 375, 1268, 505, 357, 507, + 374, 509, 335, 1180, 1180, 367, 369, 428, 1305, 371, + 369, 391, 842, 429, 373, 519, 520, 523, 576, 306, + 578, 1293, 580, 531, 841, 372, 313, 386, 429, 523, + 538, 368, 376, 429, 414, 343, 1333, 1334, 263, 1336, + 546, 343, 549, 372, 429, 374, 1223, 1223, 428, 369, + 1347, 549, 559, 1350, 558, 378, 379, 839, 420, 418, + 367, 559, 369, 569, 371, 372, 792, 374, 1365, 376, + 851, 343, 1180, 339, 582, 583, 866, 272, 344, 381, + 346, 418, 429, 391, 642, 256, 352, 353, 1036, 391, + 315, 861, 1389, 718, 265, 1180, 267, 1180, 418, 270, + 429, 296, 872, 375, 275, 870, 414, 1124, 279, 381, + 371, 418, 414, 420, 1180, 1223, 423, 288, 1180, 391, + 428, 629, 906, 386, 295, 272, 428, 635, 323, 300, + 374, 381, 371, 304, 373, 391, 1180, 6, 1223, 574, + 1223, 391, 414, 367, 650, 316, 962, 318, 17, 296, + 483, 322, 261, 392, 393, 713, 428, 1223, 414, 330, + 331, 1223, 414, 334, 414, 671, 337, 418, 371, 421, + 373, 679, 416, 412, 990, 284, 323, 428, 428, 1223, + 709, 420, 341, 367, 423, 693, 741, 371, 297, 373, + 374, 60, 376, 302, 702, 64, 978, 381, 307, 707, + 309, 310, 311, 312, 712, 931, 315, 357, 317, 371, + 369, 391, 321, 272, 306, 371, 549, 373, 277, 88, + 89, 313, 281, 373, 333, 1271, 559, 336, 734, 338, + 367, 415, 736, 325, 414, 734, 386, 296, 1284, 376, + 109, 269, 1179, 1180, 752, 339, 754, 418, 428, 755, + 367, 357, 369, 362, 758, 759, 755, 1303, 286, 368, + 369, 769, 1199, 369, 323, 771, 372, 373, 374, 775, + 391, 1042, 771, 367, 709, 816, 394, 395, 414, 787, + 386, 381, 376, 342, 792, 793, 1223, 795, 1225, 414, + 159, 391, 428, 414, 256, 1077, 1092, 379, 806, 807, + 421, 367, 372, 428, 374, 371, 339, 373, 374, 1080, + 376, 344, 418, 346, 414, 381, 349, 350, 824, 352, + 353, 418, 357, 294, 882, 374, 256, 376, 1124, 837, + 824, 839, 381, 202, 203, 306, 842, 843, 373, 269, + 384, 374, 1068, 851, 843, 1006, 854, 1118, 1284, 415, + 829, 386, 831, 861, 400, 1151, 286, 306, 389, 308, + 367, 369, 368, 871, 313, 873, 382, 383, 374, 376, + 1354, 369, 705, 706, 385, 381, 325, 339, 386, 387, + 396, 397, 344, 381, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 264, 429, 390, 370, 371, + 906, 373, 374, 375, 1234, 913, 368, 915, 370, 917, + 372, 1241, 374, 375, 376, 748, 367, 750, 418, 288, + 1133, 290, 928, 931, 367, 376, 357, 373, 390, 987, + 376, 300, 1416, 376, 928, 367, 339, 306, 372, 1109, + 374, 344, 373, 346, 376, 314, 349, 350, 369, 352, + 353, 1009, 261, 961, 373, 386, 373, 376, 937, 1230, + 939, 357, 941, 398, 399, 339, 335, 429, 1452, 1253, + 344, 374, 346, 369, 376, 284, 372, 373, 352, 353, + 374, 350, 376, 370, 353, 1474, 1475, 374, 297, 993, + 386, 418, 1000, 302, 1002, 372, 1004, 374, 307, 376, + 309, 310, 311, 312, 371, 370, 371, 415, 317, 374, + 370, 1017, 321, 418, 374, 384, 385, 372, 1017, 374, + 370, 376, 372, 1015, 333, 339, 429, 336, 369, 338, + 344, 372, 346, 370, 1042, 349, 350, 374, 352, 353, + 256, 370, 370, 412, 413, 374, 374, 1055, 1056, 1053, + 370, 339, 372, 362, 374, 1063, 344, 418, 346, 370, + 1068, 349, 350, 374, 352, 353, 1069, 277, 1109, 1077, + 418, 370, 1080, 372, 340, 374, 339, 390, 391, 392, + 393, 344, 376, 346, 1366, 1092, 349, 350, 373, 352, + 353, 1099, 1133, 367, 1092, 1136, 368, 376, 1106, 371, + 376, 373, 374, 386, 387, 388, 1112, 354, 355, 418, + 1118, 370, 376, 372, 483, 429, 374, 1124, 376, 376, + 392, 393, 1130, 1131, 343, 370, 1124, 372, 370, 372, + 372, 374, 372, 372, 374, 1176, 969, 418, 1179, 1180, + 412, 429, 369, 367, 1151, 354, 355, 371, 420, 373, + 374, 423, 376, 1151, 523, 372, 1162, 381, 1199, 414, + 415, 1169, 368, 349, 350, 371, 429, 373, 374, 370, + 418, 372, 1178, 370, 418, 372, 1184, 546, 414, 1178, + 549, 374, 1223, 376, 1225, 418, 392, 393, 418, 374, + 559, 376, 98, 99, 100, 101, 102, 103, 104, 105, + 569, 374, 374, 376, 376, 418, 412, 364, 365, 372, + 373, 364, 365, 372, 420, 1075, 1076, 423, 388, 389, + 394, 395, 1230, 1281, 418, 376, 372, 1233, 1234, 372, + 368, 256, 374, 1237, 1233, 1241, 372, 1295, 372, 372, + 372, 418, 372, 294, 1250, 1251, 294, 1253, 374, 372, + 372, 1250, 1251, 1259, 1312, 1088, 1314, 376, 418, 1092, + 374, 372, 371, 256, 374, 1271, 418, 1273, 375, 418, + 1276, 356, 372, 381, 1273, 374, 373, 1276, 1284, 375, + 374, 650, 0, 381, 372, 1289, 381, 1120, 1121, 418, + 374, 1124, 374, 374, 1127, 374, 376, 1303, 294, 423, + 372, 429, 671, 1344, 402, 403, 404, 405, 406, 407, + 408, 409, 410, 411, 339, 374, 418, 367, 1151, 344, + 1361, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 372, 1374, 1375, 373, 705, 706, 372, 343, + 418, 374, 294, 368, 294, 370, 1354, 372, 1352, 374, + 375, 376, 374, 418, 418, 370, 418, 371, 1366, 367, + 1401, 1402, 418, 62, 256, 734, 256, 66, 67, 68, + 256, 70, 71, 374, 256, 1383, 75, 76, 372, 748, + 372, 750, 381, 82, 280, 84, 755, 86, 256, 256, + 367, 418, 91, 92, 368, 262, 372, 418, 418, 343, + 418, 376, 771, 370, 429, 371, 775, 375, 1416, 418, + 374, 376, 374, 376, 372, 114, 1457, 376, 372, 370, + 423, 421, 328, 347, 381, 351, 381, 256, 381, 256, + 372, 298, 368, 372, 347, 370, 374, 367, 375, 370, + 372, 375, 367, 370, 1452, 348, 368, 418, 339, 372, + 348, 368, 381, 374, 1458, 1459, 376, 418, 374, 367, + 375, 1465, 1466, 369, 368, 367, 1474, 1475, 367, 356, + 371, 376, 418, 842, 843, 381, 382, 383, 372, 374, + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, + 396, 397, 398, 399, 400, 401, 256, 368, 368, 368, + 337, 368, 305, 367, 371, 371, 373, 374, 418, 418, + 371, 378, 379, 369, 371, 382, 383, 384, 385, 386, + 387, 388, 389, 390, 376, 392, 393, 394, 395, 396, + 397, 398, 399, 400, 401, 418, 371, 906, 256, 418, + 418, 0, 381, 371, 262, 412, 413, 373, 371, 367, + 371, 381, 369, 420, 374, 371, 423, 372, 257, 372, + 374, 260, 429, 373, 373, 256, 374, 374, 418, 418, + 376, 372, 372, 370, 376, 418, 294, 376, 372, 339, + 298, 376, 418, 372, 344, 381, 346, 347, 348, 349, + 350, 351, 352, 353, 354, 355, 367, 503, 372, 298, + 969, 368, 381, 372, 370, 368, 315, 263, 368, 371, + 370, 310, 372, 371, 374, 375, 376, 368, 372, 372, + 0, 339, 0, 367, 376, 418, 344, 376, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 368, + 372, 0, 376, 368, 372, 372, 418, 370, 1017, 367, + 368, 367, 370, 371, 372, 376, 374, 375, 376, 372, + 378, 379, 368, 368, 382, 383, 384, 385, 574, 429, + 370, 389, 390, 376, 376, 418, 394, 395, 396, 397, + 398, 399, 400, 401, 376, 418, 368, 372, 376, 367, + 376, 372, 368, 372, 256, 413, 368, 372, 416, 367, + 418, 368, 376, 265, 368, 267, 367, 373, 270, 0, + 315, 429, 263, 275, 376, 51, 376, 279, 376, 1088, + 52, 376, 376, 1092, 376, 376, 288, 376, 12, 5, + 928, 824, 1068, 295, 1068, 1225, 1199, 1406, 300, 1369, + 261, 1422, 304, 1112, 1357, 1386, 1259, 1352, 1271, 841, + 1466, 1120, 1121, 671, 316, 1124, 318, 685, 1127, 845, + 322, 1290, 845, 284, 1223, 1379, 1211, 1460, 330, 331, + 845, 1375, 334, 1374, 1459, 337, 297, 1176, 1314, 1259, + 479, 302, 1151, 523, 816, 787, 307, 1162, 309, 310, + 311, 312, 866, 1162, 315, 792, 317, 256, 712, 583, + 321, 365, 261, 262, 679, 72, 331, 978, 94, 1178, + 396, 398, 333, 397, 399, 336, 709, 338, 400, 775, + 519, 401, 546, 1144, 1233, 284, 1151, 1092, 159, 990, + 1035, 1056, 963, 948, 1045, 294, 1036, 521, 297, 298, + 1047, 362, 886, 302, 420, 1228, 305, 368, 307, 1131, + 309, 310, 311, 312, -1, -1, 418, -1, 317, -1, + -1, 821, 321, -1, 1233, 1234, 325, -1, -1, -1, + -1, -1, 1241, 822, 333, -1, 0, 336, -1, 338, + 339, 1250, 1251, -1, 1253, 344, -1, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, -1, -1, 362, 1273, -1, -1, 1276, 367, 368, + -1, 370, 371, 372, 373, 374, 375, 376, -1, 378, + 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, + 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, + 409, 410, 411, 412, 413, -1, -1, 416, -1, 418, + 866, 420, -1, -1, 423, 256, 257, -1, -1, -1, + 429, -1, -1, 264, 265, 266, 267, 268, -1, 270, + 271, -1, 273, 274, 275, 276, 277, 278, 279, 280, + -1, -1, -1, -1, 285, -1, 287, 288, 289, 290, + 291, 292, -1, -1, 295, 0, -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, @@ -11008,218 +10990,218 @@ void case_943() -1, -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, -1, -1, 371, -1, -1, -1, -1, 376, 377, 378, 379, 380, - -1, -1, -1, 384, 256, 386, -1, -1, -1, 261, - 262, 392, 393, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, + -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 417, 418, 419, 420, + -1, 422, 256, 257, -1, -1, -1, -1, 429, -1, + 264, 265, 266, 267, 268, -1, 270, 271, -1, 273, + 274, 275, 276, 277, 278, 279, -1, -1, 0, -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, 359, 360, 361, 362, 363, + -1, -1, -1, 367, 368, -1, -1, 371, -1, -1, + -1, -1, 376, 377, 378, 379, 380, -1, -1, -1, + 384, 256, 386, -1, -1, -1, 261, 262, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 0, 284, -1, -1, -1, 417, 418, 419, 420, - -1, 422, 294, -1, -1, 297, 298, -1, 429, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 0, 284, + -1, -1, -1, 417, 418, 419, 420, -1, 422, 294, + -1, -1, 297, 298, -1, 429, -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, 357, -1, -1, -1, -1, 362, -1, -1, + -1, -1, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, -1, 378, 379, -1, -1, 382, 383, 384, + 385, 386, -1, -1, 389, 390, -1, -1, -1, 394, + 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, + -1, -1, -1, -1, 256, -1, -1, -1, 413, 261, + 262, 416, -1, 418, -1, 420, -1, -1, 423, -1, + -1, -1, -1, -1, 429, 0, -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, 357, -1, -1, -1, -1, + 352, 353, 354, 355, 356, -1, -1, -1, -1, -1, 362, -1, -1, -1, -1, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, -1, 378, 379, -1, -1, - 382, 383, 384, 385, 386, -1, -1, 389, 390, -1, - -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, - -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, - -1, 413, 261, 262, 416, -1, 418, -1, 420, -1, - -1, 423, -1, -1, -1, -1, -1, 429, 0, -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, - -1, -1, -1, 362, -1, -1, -1, -1, 367, 368, - 369, 370, 371, 372, -1, 374, 375, 376, -1, 378, - 379, -1, -1, 382, 383, 384, 385, 256, -1, -1, - 389, 390, 261, 262, -1, 394, 395, 396, 397, 398, - 399, 400, 401, 0, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 413, 284, -1, 416, -1, 418, - -1, 420, -1, -1, 423, 294, -1, -1, 297, 298, - 429, -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, - -1, -1, -1, 362, -1, -1, -1, -1, 367, 368, - 369, 370, 371, 372, -1, 374, 375, 376, -1, 378, - 379, -1, -1, 382, 383, 384, 385, -1, -1, -1, - 389, 390, -1, -1, -1, 394, 395, 396, 397, 398, - 399, 400, 401, -1, 256, -1, -1, -1, -1, 261, - 262, -1, -1, -1, 413, -1, -1, 416, -1, 418, - -1, 420, -1, -1, 423, -1, -1, -1, -1, -1, - 429, 0, 284, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 294, -1, -1, 297, 298, -1, -1, -1, + 372, -1, 374, 375, 376, -1, 378, 379, -1, -1, + 382, 383, 384, 385, 256, -1, -1, 389, 390, 261, + 262, -1, 394, 395, 396, 397, 398, 399, 400, 401, + 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 413, 284, -1, 416, -1, 418, -1, 420, -1, + -1, 423, 294, -1, -1, 297, 298, 429, -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, 256, 344, -1, 346, 347, 348, 349, 350, 351, + -1, -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, -1, - 362, -1, -1, -1, -1, 367, 368, -1, 370, 371, - 372, -1, 374, 375, 376, -1, 378, 379, -1, 256, - 382, 383, 384, 385, -1, 262, -1, 389, 390, -1, + 362, -1, -1, -1, -1, 367, 368, 369, 370, 371, + 372, -1, 374, 375, 376, -1, 378, 379, -1, -1, + 382, 383, 384, 385, -1, -1, -1, 389, 390, -1, -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, - 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 413, -1, -1, 416, -1, 418, 294, -1, -1, - -1, 298, -1, -1, 339, -1, -1, 429, -1, 344, + -1, 256, -1, -1, -1, -1, 261, 262, -1, -1, + -1, 413, -1, -1, 416, -1, 418, -1, 420, -1, + -1, 423, -1, -1, -1, -1, -1, 429, -1, 284, + -1, -1, -1, -1, -1, 0, -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, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, 339, 0, -1, -1, -1, 344, -1, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 355, 356, -1, -1, -1, -1, -1, 362, -1, -1, + -1, -1, 367, 368, -1, 370, 371, 372, -1, 374, + 375, 376, -1, 378, 379, -1, 256, 382, 383, 384, + 385, -1, 262, -1, 389, 390, -1, -1, -1, 394, + 395, 396, 397, 398, 399, 400, 401, -1, 0, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 413, -1, + -1, 416, -1, 418, 294, -1, -1, -1, 298, -1, + -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 367, 368, -1, 370, 371, 372, -1, 374, 375, 376, - -1, 378, 379, -1, -1, 382, 383, 384, 385, -1, - -1, -1, 389, 390, 429, -1, -1, 394, 395, 396, - 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, - -1, -1, 0, -1, -1, -1, 413, -1, 257, 416, - -1, 418, 261, -1, 263, -1, 265, -1, 267, -1, - -1, 270, 429, 272, 273, -1, 275, -1, 277, -1, - 279, -1, 281, 282, 283, 284, -1, -1, 287, 288, - -1, -1, -1, -1, 293, 294, 295, 296, 297, -1, - -1, 300, 301, 302, -1, 304, -1, 306, 307, 308, - 309, 310, 311, 312, 313, 0, 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, -1, -1, 342, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, - -1, -1, -1, 362, -1, 364, 365, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 256, 257, 377, -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, 418, - 300, 301, 302, -1, 304, -1, -1, 307, -1, 309, - 310, 311, 312, -1, -1, -1, 316, 317, 318, -1, - 257, 321, 322, 323, 261, 0, -1, -1, -1, -1, - 330, 331, -1, 333, 334, 272, 336, 337, 338, -1, - 277, -1, 342, -1, 281, -1, -1, 284, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 296, - 297, -1, 362, -1, 301, 302, -1, -1, 368, 369, - 307, -1, 309, 310, 311, 312, -1, 377, -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, -1, 281, -1, -1, 284, -1, 418, -1, - -1, -1, -1, -1, -1, 362, -1, -1, 296, 297, - -1, 368, 369, 301, 302, 0, -1, -1, -1, 307, - -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, - -1, -1, 257, 321, -1, 323, 261, -1, -1, -1, - -1, -1, -1, -1, -1, 333, -1, 272, 336, -1, - 338, -1, 277, -1, 342, -1, 281, -1, -1, 284, - -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, - -1, 296, 297, -1, 362, 257, 301, 302, -1, 261, - 368, 369, 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, 0, - -1, 336, -1, 338, 296, 297, -1, 342, -1, 301, - 302, -1, -1, 261, -1, 307, -1, 309, 310, 311, - 312, -1, -1, -1, -1, 317, -1, 362, -1, 321, - -1, 323, -1, 368, 369, -1, 284, -1, -1, -1, - -1, 333, -1, -1, 336, -1, 338, -1, -1, 297, - 342, -1, 257, 301, 302, -1, 261, -1, -1, 307, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 339, + -1, 0, -1, -1, 344, -1, 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, 376, -1, 378, 379, + -1, -1, 382, 383, 384, 385, 386, -1, -1, 389, + 390, -1, -1, -1, 394, 395, 396, 397, 398, 399, + 400, 401, -1, -1, -1, -1, -1, -1, -1, -1, + 0, -1, -1, 413, -1, -1, 416, -1, 418, -1, + 420, -1, 257, 423, -1, -1, 261, -1, 263, 429, + 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, 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, + -1, 336, 337, 338, -1, -1, -1, 342, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, -1, -1, -1, -1, -1, -1, 362, -1, 364, + 365, -1, -1, -1, 256, 257, -1, -1, -1, 261, + -1, -1, 377, 265, -1, 267, -1, -1, 270, -1, + 272, 273, -1, 275, -1, 277, -1, 279, -1, 281, + 282, 283, 284, 0, -1, 287, 288, -1, -1, -1, + -1, 293, -1, 295, 296, 297, -1, -1, 300, 301, + 302, -1, 304, 418, -1, 307, -1, 309, 310, 311, + 312, -1, -1, -1, 316, 317, 318, -1, 257, 321, + 322, 323, 261, -1, -1, -1, 0, -1, 330, 331, + -1, 333, 334, 272, 336, 337, 338, -1, 277, -1, + 342, -1, 281, -1, -1, 284, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 296, 297, -1, + 362, -1, 301, 302, -1, -1, 368, 369, 307, 0, + 309, 310, 311, 312, -1, 377, -1, -1, 317, -1, + -1, -1, 321, -1, 323, -1, -1, 257, -1, -1, + -1, 261, -1, -1, 333, -1, 335, 336, -1, 338, + -1, -1, 272, 342, -1, -1, -1, 277, -1, -1, + -1, 281, 0, -1, 284, -1, 418, -1, -1, -1, + -1, -1, -1, 362, -1, -1, 296, 297, -1, 368, + 369, 301, 302, -1, 257, -1, -1, 307, 261, 309, + 310, 311, 312, -1, -1, -1, -1, 317, -1, 272, + -1, 321, -1, 323, 277, 0, -1, -1, 281, -1, + -1, 284, -1, 333, -1, 335, 336, -1, 338, -1, + -1, -1, 342, 296, 297, -1, -1, -1, 301, 302, + -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, + -1, -1, 362, -1, 317, -1, -1, 257, 321, 369, + 323, 261, -1, -1, -1, -1, -1, -1, -1, -1, + 333, -1, 272, 336, -1, 338, -1, 277, 0, 342, + -1, 281, -1, -1, 284, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 296, 297, -1, 362, + 257, 301, 302, -1, 261, 368, 369, 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, -1, + 317, -1, 362, 277, 321, -1, 323, 281, 368, 369, + 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, -1, 317, -1, 362, 277, 321, -1, 323, + 281, -1, 369, 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, -1, 317, -1, 362, 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, -1, 317, - 362, -1, 277, 321, -1, -1, 281, 369, -1, 284, + -1, 362, 277, 321, -1, 323, 281, -1, -1, 284, -1, -1, -1, -1, -1, 333, -1, -1, 336, -1, - 338, 296, 297, -1, -1, -1, 301, 302, -1, -1, + 338, 296, 297, -1, 342, -1, 301, 302, -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, 362, 257, 321, -1, 323, 261, -1, -1, -1, -1, -1, -1, -1, -1, 333, -1, 272, 336, -1, 338, -1, 277, -1, 342, -1, 281, -1, -1, 284, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 296, 297, -1, 362, -1, 301, - 302, -1, 257, -1, -1, 307, 261, 309, 310, 311, - 312, -1, -1, -1, -1, 317, -1, 272, -1, 321, - -1, 323, 277, -1, -1, -1, 281, -1, -1, 284, - -1, 333, -1, -1, 336, -1, 338, -1, -1, -1, - 342, 296, 297, -1, -1, -1, 301, 302, -1, 257, - -1, -1, 307, 261, 309, 310, 311, 312, -1, -1, - 362, -1, 317, -1, 272, -1, 321, -1, 323, 277, - -1, -1, -1, 281, -1, -1, 284, -1, 333, -1, - -1, 336, -1, 338, -1, -1, -1, 342, 296, 297, - -1, -1, -1, 301, 302, -1, 257, -1, -1, 307, - 261, 309, 310, 311, 312, -1, -1, 362, -1, 317, - -1, 272, -1, 321, -1, 323, 277, -1, -1, -1, - 281, -1, -1, 284, -1, 333, -1, -1, 336, -1, - 338, -1, -1, -1, 342, 296, 297, -1, -1, -1, - 301, 302, -1, -1, -1, -1, 307, -1, 309, 310, - 311, 312, -1, -1, 362, -1, 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, -1, -1, - -1, 362, -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, 256, 344, 345, -1, -1, -1, 262, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, - 362, 363, -1, -1, -1, 367, -1, -1, -1, 371, - -1, -1, -1, -1, 376, 377, 378, 379, 380, -1, - -1, -1, 384, 298, 386, -1, -1, -1, -1, -1, - 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, - -1, -1, -1, 262, -1, 417, 418, 419, 420, -1, - -1, -1, -1, -1, 339, -1, -1, 429, -1, 344, - -1, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, -1, -1, -1, -1, -1, -1, 298, - -1, -1, -1, 368, 369, 370, 371, 372, 373, 374, - 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, - 256, -1, -1, 418, -1, 420, 262, -1, 423, -1, - -1, -1, -1, -1, 429, -1, -1, -1, -1, 368, - -1, -1, 371, -1, 373, 374, -1, -1, -1, 378, - 379, -1, -1, 382, 383, 384, 385, 386, 387, 388, - 389, 390, 298, 392, 393, 394, 395, 396, 397, 398, - 399, 400, 401, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 412, 413, -1, -1, -1, -1, -1, - -1, 420, -1, -1, 423, -1, -1, -1, -1, -1, - 429, -1, -1, 339, -1, -1, -1, -1, 344, -1, + 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, -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, -1, -1, -1, + 362, -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, + 256, 344, 345, -1, -1, -1, 262, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 359, 360, 361, 362, + 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, + -1, -1, -1, 376, 377, 378, 379, 380, -1, -1, + -1, 384, 298, 386, -1, -1, -1, -1, -1, 392, + 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 262, -1, 417, 418, 419, 420, -1, -1, + -1, -1, -1, 339, -1, -1, 429, -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, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 256, 378, 379, -1, 381, 382, 383, 384, 385, + 356, 357, -1, -1, -1, -1, -1, -1, 298, -1, + -1, -1, 368, 369, 370, 371, 372, 373, 374, 375, + 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, 256, - -1, -1, -1, -1, 420, 262, -1, -1, -1, -1, - -1, -1, -1, 429, -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, -1, 368, -1, 370, -1, 372, -1, 374, - 375, 376, 339, -1, -1, -1, -1, 344, -1, 346, + -1, -1, 418, -1, 420, 262, -1, 423, -1, -1, + -1, -1, -1, 429, -1, -1, -1, -1, -1, 369, + -1, 371, 372, 373, 374, -1, 376, -1, 378, 379, + -1, 381, 382, 383, 384, 385, -1, 387, 388, 389, + 390, 298, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, + 410, 411, 412, 413, -1, -1, -1, -1, 418, -1, + 420, 262, -1, 423, -1, -1, -1, -1, -1, 429, + -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, 368, -1, 370, 371, 372, 373, 374, 375, 376, + 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, - 387, 388, 389, 390, 429, 392, 393, 394, 395, 396, + 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, 256, -1, - -1, -1, -1, 420, 262, -1, 423, -1, -1, -1, + -1, -1, -1, 420, 262, -1, 357, -1, -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, 369, -1, - 371, 372, 373, 374, -1, 376, -1, 378, 379, -1, - 381, 382, 383, 384, 385, -1, 387, 388, 389, 390, + 371, -1, 373, -1, -1, 376, -1, 378, 379, -1, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 298, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, 418, -1, 420, 262, -1, 423, -1, -1, -1, -1, -1, 429, -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, -1, + -1, -1, -1, -1, -1, -1, 298, -1, -1, 367, 368, -1, 370, 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, @@ -11268,229 +11250,236 @@ void case_943() -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, -1, 368, -1, 370, - 371, 372, 373, 374, 375, 376, -1, 378, -1, -1, + 371, 372, 373, 374, 375, 376, -1, 378, 379, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 412, 413, -1, 256, -1, 256, -1, 418, 420, - 262, -1, 423, -1, 264, 265, -1, 267, 429, -1, - 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, - -1, -1, -1, -1, -1, 285, -1, -1, 288, -1, - -1, -1, -1, -1, -1, 295, 298, -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, 339, -1, -1, - -1, 256, 344, -1, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, 359, - 360, 361, 362, -1, -1, -1, 368, -1, 370, -1, - 372, 371, 374, 375, 376, -1, 378, 379, -1, 381, + 411, 412, 413, -1, 256, 256, -1, -1, 418, 420, + 262, -1, 423, -1, 265, -1, 267, -1, 429, 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, -1, 368, -1, 370, 371, + 372, 373, 374, 375, 376, -1, 378, -1, -1, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, -1, - -1, -1, 394, 395, 396, 397, 398, 399, 400, 401, + 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 256, 413, -1, -1, -1, -1, 262, 417, 418, -1, - -1, -1, -1, -1, 339, -1, -1, 429, -1, 344, + 412, 413, -1, 256, -1, 256, -1, 418, 420, 262, + -1, 423, -1, 264, 265, -1, 267, 429, -1, 270, + 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, + -1, -1, -1, -1, 285, -1, -1, 288, -1, -1, + -1, -1, -1, -1, 295, 298, -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, 339, -1, -1, -1, + -1, 344, -1, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, 359, 360, + 361, 362, -1, -1, -1, 368, -1, 370, -1, 372, + 371, 374, 375, 376, -1, 378, 379, -1, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 261, -1, + -1, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 408, 409, 410, 411, 256, + 413, 284, -1, -1, -1, 262, 417, 418, -1, -1, + -1, -1, -1, -1, 297, -1, 429, -1, -1, 302, + -1, -1, 305, -1, 307, -1, 309, 310, 311, 312, + -1, -1, -1, -1, 317, -1, -1, -1, 321, -1, + -1, 298, 325, -1, -1, -1, -1, -1, -1, -1, + 333, -1, -1, 336, -1, 338, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, + -1, -1, -1, 262, -1, -1, -1, -1, -1, 362, + -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, 298, + -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, + -1, 378, 379, -1, -1, 382, 383, 384, 385, 386, + 387, 388, 389, 390, -1, 418, -1, 394, 395, 396, + 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, + 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, 256, 429, -1, -1, -1, -1, 262, -1, 368, + -1, 370, -1, 372, -1, 374, 375, 376, -1, 378, + 379, -1, -1, 382, 383, 384, 385, -1, -1, -1, + 389, 390, -1, -1, -1, 394, 395, 396, 397, 398, + 399, 400, 401, 298, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 413, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, + 429, -1, -1, -1, -1, 262, -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, 298, 368, -1, 370, -1, 372, -1, 374, + -1, 298, -1, 368, -1, 370, -1, 372, -1, 374, + 375, 376, -1, 378, 379, -1, -1, 382, 383, 384, + 385, -1, -1, -1, 389, 390, 285, -1, -1, 394, + 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, -1, -1, 256, 429, -1, -1, -1, 327, 262, + -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, + -1, 378, 379, -1, -1, 382, 383, 384, 385, -1, + -1, -1, 389, 390, -1, -1, -1, 394, 395, 396, + 397, 398, 399, 400, 401, 298, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 413, -1, 377, 378, + 379, 380, -1, 382, 383, 384, 385, 386, 387, 388, + 389, 256, 429, 392, 393, 394, 395, 396, 397, 398, + 399, -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, -1, 368, -1, 370, -1, 372, + -1, 374, 375, 376, -1, 378, 379, -1, -1, 382, + 383, 384, 385, -1, -1, -1, 389, 390, -1, 256, + -1, 394, 395, 396, 397, 398, 399, 400, 401, -1, + -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, + 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, + -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, + 375, 376, -1, -1, -1, -1, -1, 382, 383, 384, + 385, -1, -1, -1, 389, 390, -1, 256, -1, 394, + 395, 396, 397, 398, 399, 400, 401, -1, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, + -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, + -1, -1, -1, -1, -1, 382, 383, 384, 385, -1, + -1, -1, 389, 390, -1, 256, -1, 394, 395, 396, + 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, + 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, + -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, + -1, -1, -1, 382, 383, 384, 385, -1, -1, -1, + 389, 390, -1, 256, -1, 394, 395, 396, 397, 398, + 399, 400, 401, -1, -1, -1, -1, -1, 339, -1, + -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, + -1, 382, 383, 384, 385, -1, -1, -1, 389, 390, + -1, 256, -1, -1, -1, 396, 397, 398, 399, 400, + 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, + -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, + -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, + -1, 374, 375, 376, -1, -1, -1, -1, -1, 382, + 383, 384, 385, -1, -1, -1, 389, 390, -1, 256, + -1, -1, -1, 396, 397, 398, 399, 400, 401, -1, + -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, + 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, + -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, + 375, 376, -1, -1, -1, -1, -1, 382, 383, 384, + 385, -1, -1, -1, 389, 390, -1, 256, -1, -1, + -1, 396, 397, 398, 399, 400, 401, -1, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, + -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, + -1, -1, -1, -1, -1, 382, 383, 384, 385, -1, + -1, -1, 389, 390, -1, 256, -1, -1, -1, 396, + 397, 398, 399, 400, 401, -1, -1, -1, -1, -1, + 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, + -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, + -1, -1, -1, 382, 383, 384, 385, -1, -1, -1, + 389, 390, -1, 256, -1, -1, -1, 396, 397, 398, + 399, 400, 401, -1, -1, -1, -1, -1, 339, -1, + -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, + -1, -1, -1, 384, 385, -1, -1, -1, 389, 390, + -1, 256, -1, -1, -1, -1, -1, 398, 399, 400, + 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, + -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, + -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, + -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, + -1, 384, 385, -1, -1, -1, 389, 390, -1, 256, + -1, -1, -1, -1, -1, 398, 399, 400, 401, -1, + -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, + 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, + -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, + 375, 376, -1, -1, -1, -1, -1, -1, -1, 384, + 385, -1, -1, -1, 389, 390, -1, 256, -1, -1, + -1, -1, -1, 398, 399, 400, 401, -1, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, + -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, + -1, -1, -1, -1, -1, -1, -1, 384, 385, -1, + -1, -1, 389, 390, -1, 256, -1, -1, -1, -1, + -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, + 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, + -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, + -1, -1, -1, -1, -1, 384, 385, -1, -1, -1, + 389, 390, -1, 256, -1, -1, -1, -1, -1, -1, + -1, 400, 401, -1, -1, -1, -1, -1, 339, -1, + -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, + -1, -1, -1, -1, 385, -1, -1, -1, 389, 390, + -1, 256, -1, -1, -1, -1, -1, -1, -1, 400, + 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, + -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, + -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, + -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, + -1, -1, 385, -1, -1, -1, 389, 390, -1, 256, + -1, -1, -1, -1, -1, -1, -1, 400, 401, -1, + -1, -1, -1, -1, 339, -1, -1, -1, -1, 344, + 413, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, -1, -1, -1, -1, 429, -1, -1, -1, + -1, -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 390, -1, -1, 256, -1, - -1, -1, -1, -1, 262, -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, 429, -1, -1, -1, -1, -1, - 298, -1, 368, -1, 370, -1, 372, -1, 374, 375, - 376, -1, 378, 379, -1, -1, 382, 383, 384, 385, - 386, 387, 388, 389, 390, -1, -1, -1, 394, 395, - 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, - -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, 256, 429, -1, -1, -1, -1, 262, -1, - 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, - 378, 379, -1, -1, 382, 383, 384, 385, -1, -1, - -1, 389, 390, -1, -1, -1, 394, 395, 396, 397, - 398, 399, 400, 401, 298, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 413, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 256, 429, -1, -1, -1, -1, 262, -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, 298, -1, 368, -1, 370, -1, 372, -1, - 374, 375, 376, -1, 378, 379, -1, -1, 382, 383, - 384, 385, -1, -1, -1, 389, 390, -1, -1, -1, - 394, 395, 396, 397, 398, 399, 400, 401, -1, -1, - -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, 256, 429, -1, -1, -1, -1, - 262, -1, 368, -1, 370, -1, 372, -1, 374, 375, - 376, -1, 378, 379, -1, -1, 382, 383, 384, 385, - -1, -1, -1, 389, 390, -1, -1, -1, 394, 395, - 396, 397, 398, 399, 400, 401, 298, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 413, -1, -1, + 385, -1, -1, -1, -1, 390, -1, 256, -1, -1, + -1, -1, -1, -1, -1, 400, 401, -1, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 413, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, -1, -1, -1, 429, -1, -1, -1, -1, -1, + -1, 368, -1, 370, -1, 372, -1, 374, 375, 376, + -1, -1, -1, -1, -1, -1, -1, -1, 385, -1, + -1, -1, -1, 390, -1, 256, -1, -1, -1, -1, + -1, -1, -1, 400, 401, -1, -1, -1, -1, -1, + 339, -1, -1, -1, -1, 344, 413, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, -1, -1, + -1, -1, 429, -1, -1, -1, -1, -1, -1, 368, + -1, 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 256, 429, -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, -1, 368, -1, 370, -1, - 372, -1, 374, 375, 376, -1, 378, 379, -1, -1, - 382, 383, 384, 385, -1, -1, -1, 389, 390, -1, - 256, -1, 394, 395, 396, 397, 398, 399, 400, 401, - -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, - 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, - -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, - 374, 375, 376, -1, -1, -1, -1, -1, 382, 383, - 384, 385, -1, -1, -1, 389, 390, -1, 256, -1, - 394, 395, 396, 397, 398, 399, 400, 401, -1, -1, - -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, - -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, - 376, -1, -1, -1, -1, -1, 382, 383, 384, 385, - -1, -1, -1, 389, 390, -1, 256, -1, 394, 395, - 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, - -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, - 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, - -1, -1, -1, -1, 382, 383, 384, 385, -1, -1, - -1, 389, 390, -1, 256, -1, 394, 395, 396, 397, - 398, 399, 400, 401, -1, -1, -1, -1, -1, 339, - -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, - 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, - -1, -1, 382, 383, 384, 385, -1, -1, -1, 389, - 390, -1, 256, -1, -1, -1, 396, 397, 398, 399, - 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, - -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, - -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, - 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, - 382, 383, 384, 385, -1, -1, -1, 389, 390, -1, - 256, -1, -1, -1, 396, 397, 398, 399, 400, 401, - -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, - 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, - -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, - 374, 375, 376, -1, -1, -1, -1, -1, 382, 383, - 384, 385, -1, -1, -1, 389, 390, -1, 256, -1, - -1, -1, 396, 397, 398, 399, 400, 401, -1, -1, - -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, - -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, - 376, -1, -1, -1, -1, -1, 382, 383, 384, 385, - -1, -1, -1, 389, 390, -1, 256, -1, -1, -1, - 396, 397, 398, 399, 400, 401, -1, -1, -1, -1, - -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, - 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, - -1, -1, -1, -1, 382, 383, 384, 385, -1, -1, - -1, 389, 390, -1, 256, -1, -1, -1, 396, 397, - 398, 399, 400, 401, -1, -1, -1, -1, -1, 339, - -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, - 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, - -1, -1, -1, -1, 384, 385, -1, -1, -1, 389, - 390, -1, 256, -1, -1, -1, -1, -1, 398, 399, - 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, - -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, - -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, - 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, - -1, -1, 384, 385, -1, -1, -1, 389, 390, -1, - 256, -1, -1, -1, -1, -1, 398, 399, 400, 401, - -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, - 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, - -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, - 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, - 384, 385, -1, -1, -1, 389, 390, -1, 256, -1, - -1, -1, -1, -1, 398, 399, 400, 401, -1, -1, - -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, - -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, - 376, -1, -1, -1, -1, -1, -1, -1, 384, 385, - -1, -1, -1, 389, 390, -1, 256, -1, -1, -1, - -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, - -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, - 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, - -1, -1, -1, -1, -1, -1, 384, 385, -1, -1, - -1, 389, 390, -1, 256, -1, -1, -1, -1, -1, - -1, -1, 400, 401, -1, -1, -1, -1, -1, 339, - -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, - 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, - -1, -1, -1, -1, -1, 385, -1, -1, -1, 389, - 390, -1, 256, -1, -1, -1, -1, -1, -1, -1, - 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, - -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, - -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, - 372, -1, 374, 375, 376, -1, -1, -1, -1, -1, - -1, -1, -1, 385, -1, -1, -1, 389, 390, -1, - 256, -1, -1, -1, -1, -1, -1, -1, 400, 401, - -1, -1, -1, -1, -1, 339, -1, -1, -1, -1, - 344, 413, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, -1, -1, -1, -1, 429, -1, -1, - -1, -1, -1, -1, 368, -1, 370, -1, 372, -1, - 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, - -1, 385, -1, -1, -1, -1, 390, -1, 256, -1, - -1, -1, -1, -1, -1, -1, 400, 401, -1, -1, - -1, -1, -1, 339, -1, -1, -1, -1, 344, 413, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, -1, -1, -1, -1, 429, -1, -1, -1, -1, - -1, -1, 368, -1, 370, -1, 372, -1, 374, 375, - 376, -1, -1, -1, -1, -1, -1, -1, -1, 385, - -1, -1, -1, -1, 390, -1, 256, -1, -1, -1, - -1, -1, -1, -1, 400, 401, -1, -1, -1, -1, - -1, 339, -1, -1, -1, -1, 344, 413, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, -1, - -1, -1, -1, 429, -1, -1, -1, -1, -1, -1, - 368, -1, 370, -1, 372, -1, 374, 375, 376, -1, + -1, 390, -1, 256, -1, -1, -1, -1, -1, -1, + -1, 400, 401, -1, -1, -1, -1, -1, 339, -1, + -1, -1, -1, 344, 413, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 356, -1, -1, -1, -1, + 429, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 372, -1, 374, 375, 376, -1, -1, -1, 256, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 390, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 400, + 401, -1, -1, -1, -1, -1, 339, -1, -1, -1, + -1, 344, 413, 346, 347, 348, 349, 350, 351, 352, + 353, 354, 355, 356, -1, -1, -1, -1, 429, -1, + -1, -1, -1, -1, -1, 368, -1, 370, -1, 372, + -1, 374, 375, 376, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 390, -1, -1, + -1, -1, 339, -1, -1, -1, -1, 344, 401, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 413, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 368, -1, 370, -1, 372, 429, 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 390, -1, 256, -1, -1, -1, -1, -1, - -1, -1, 400, 401, -1, -1, -1, -1, -1, 339, - -1, -1, -1, -1, 344, 413, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, -1, -1, -1, - -1, 429, -1, -1, -1, -1, -1, -1, 368, -1, - 370, -1, 372, -1, 374, 375, 376, -1, -1, -1, - 256, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 390, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 400, 401, -1, -1, -1, -1, -1, 339, -1, -1, - -1, -1, 344, 413, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, -1, -1, -1, -1, 429, - -1, -1, -1, -1, -1, -1, 368, -1, 370, -1, - 372, -1, 374, 375, 376, -1, -1, 262, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 390, -1, - -1, -1, -1, 339, -1, -1, -1, -1, 344, 401, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 413, -1, 298, -1, -1, -1, -1, -1, -1, - -1, -1, 368, -1, 370, -1, 372, 429, 374, 375, - 376, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 390, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 401, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 413, -1, -1, - -1, -1, 357, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 429, 369, -1, 371, -1, 373, -1, - -1, 376, -1, 378, 379, -1, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, -1, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, -1, - -1, 256, -1, 418, -1, 420, -1, -1, 423, 264, - 265, 266, 267, -1, 429, 270, 271, -1, 273, 274, - 275, 276, 277, 278, 279, -1, -1, -1, -1, -1, + -1, 256, -1, 390, -1, -1, -1, -1, -1, 264, + 265, 266, 267, -1, 401, 270, 271, -1, 273, 274, + 275, 276, 277, 278, 279, -1, 413, -1, -1, -1, 285, -1, 287, 288, 289, 290, 291, 292, -1, -1, - 295, -1, -1, -1, 299, 300, -1, 302, 303, 304, + 295, -1, 429, -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, @@ -11566,7 +11555,7 @@ void case_943() -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, 417, 418, 419, 420, 264, 265, -1, 267, -1, -1, - 270, 271, -1, 256, -1, 275, 276, 277, -1, 279, + 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, @@ -11577,12 +11566,12 @@ void case_943() -1, 334, -1, -1, 337, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, 367, 368, -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, - 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, + 380, -1, -1, -1, 384, -1, 386, -1, -1, 372, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, 417, 418, 419, 420, 264, 265, -1, 267, -1, -1, 270, 271, -1, - 256, -1, 275, 276, 277, 418, 279, -1, -1, 265, + -1, -1, 275, 276, 277, 418, 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, @@ -11593,7 +11582,7 @@ void case_943() -1, 337, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, - -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, + -1, 384, -1, 386, 370, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, 285, -1, @@ -11623,7 +11612,7 @@ void case_943() -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, - -1, 372, -1, -1, 392, 393, -1, -1, -1, -1, + -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, 285, -1, -1, 288, -1, -1, -1, @@ -11652,7 +11641,7 @@ void case_943() -1, 337, -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, 367, -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, - -1, 384, -1, 386, 370, -1, -1, -1, -1, 392, + -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, -1, -1, -1, 417, 418, 419, 420, 264, 265, @@ -11733,355 +11722,344 @@ void case_943() 311, 312, -1, -1, -1, 284, 317, -1, -1, 362, 321, -1, -1, -1, 325, 368, -1, -1, 297, -1, 261, -1, 333, 302, -1, 336, -1, 338, 307, -1, - 309, 310, 311, 312, -1, -1, 315, -1, 317, -1, + 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, -1, 321, 284, -1, -1, 357, -1, -1, -1, 261, 362, -1, -1, 333, -1, 297, 336, 369, 338, 371, 302, 373, -1, 305, 418, 307, -1, 309, 310, 311, 312, -1, 284, -1, 386, 317, -1, -1, -1, - 321, -1, 261, 362, 325, -1, 297, -1, -1, 368, - 369, 302, 333, -1, 305, 336, 307, 338, 309, 310, - 311, 312, -1, -1, -1, 284, 317, 418, -1, -1, - 321, -1, -1, -1, 325, -1, -1, -1, 297, -1, - -1, 362, 333, 302, -1, 336, -1, 338, 307, -1, - 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, - -1, -1, 321, -1, -1, -1, 325, -1, -1, -1, - -1, 362, -1, -1, 333, -1, -1, 336, -1, 338, - 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, - -1, 275, 276, 277, -1, 279, -1, 418, -1, -1, - -1, 285, -1, 362, 288, -1, -1, -1, -1, -1, - -1, 295, -1, -1, -1, -1, 300, -1, 302, 303, - 304, -1, 306, -1, -1, -1, -1, 418, -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, 418, - 344, 345, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 359, 360, 361, 362, 363, - -1, -1, -1, -1, -1, -1, -1, 371, 372, -1, - 374, -1, -1, 377, 378, 379, 380, -1, -1, -1, - 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, - -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, - -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, - -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, 371, -1, -1, 374, -1, -1, 377, - 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, - -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, - -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, - -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, - 418, 419, 420, 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, 359, 360, 361, - 362, 363, -1, -1, -1, -1, -1, -1, -1, 371, - -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, - -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, - 392, 393, -1, -1, -1, -1, -1, -1, 264, 265, - -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 417, 418, 419, 420, 285, - -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -1, + 321, -1, -1, 362, 325, -1, 297, -1, -1, -1, + -1, 302, 333, -1, -1, 336, 307, 338, 309, 310, + 311, 312, -1, -1, -1, -1, 317, 418, -1, -1, + 321, -1, -1, -1, 325, -1, -1, 264, 265, -1, + 267, 362, 333, 270, 271, 336, -1, 338, 275, 276, + 277, -1, 279, -1, -1, -1, -1, -1, 285, -1, + -1, 288, -1, -1, -1, -1, -1, -1, 295, -1, + -1, 362, -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, 418, 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, 418, -1, -1, + -1, -1, 359, 360, 361, 362, 363, -1, -1, -1, + -1, -1, -1, -1, 371, 372, -1, 374, -1, -1, + 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, + -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, + -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, + 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, + 417, 418, 419, 420, 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, 359, 360, + 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, + 371, -1, -1, 374, -1, -1, 377, 378, 379, 380, + -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, + -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, + 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, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, -1, -1, 371, -1, -1, -1, + -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, + -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, + -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, + -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, + 279, -1, 417, 418, 419, 420, 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, - 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, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, + 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, + -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, + -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, + -1, -1, 275, 276, 277, -1, 279, -1, 417, 418, + 419, 420, 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, 359, 360, 361, 362, + 363, -1, -1, -1, -1, 368, -1, -1, 371, -1, + -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, + -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, + 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, + 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, + 277, -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, - -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, - -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, - 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, - -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, - 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, - -1, 417, 418, 419, 420, 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, 359, - 360, 361, 362, 363, -1, -1, -1, -1, 368, -1, - -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, - 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, - -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, - 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, - -1, 275, 276, 277, -1, 279, -1, 417, 418, 419, - 420, 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, 359, 360, 361, 362, 363, - -1, -1, -1, 367, -1, -1, -1, 371, -1, -1, - -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, - 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, - -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, - -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, - -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, + 367, -1, -1, -1, 371, -1, -1, -1, -1, -1, + 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, + -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, + -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, + 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, + 417, 418, 419, 420, 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, 359, 360, + 361, 362, 363, -1, -1, -1, 367, -1, -1, -1, + 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, + -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, + -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, + 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, 359, 360, 361, 362, 363, -1, -1, -1, 367, - -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, - 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, - -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, - -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, - -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, - 418, 419, 420, 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, 359, 360, 361, - 362, 363, -1, -1, -1, -1, -1, -1, -1, 371, - -1, -1, -1, -1, -1, 377, 378, 379, 380, -1, - -1, -1, 384, -1, 386, -1, -1, -1, -1, -1, - 392, 393, -1, -1, -1, -1, -1, -1, 264, 265, - -1, 267, -1, -1, 270, 271, -1, -1, -1, 275, - 276, 277, -1, 279, -1, 417, 418, 419, 420, 285, - -1, -1, 288, -1, -1, -1, -1, -1, -1, 295, - -1, -1, -1, -1, 300, -1, 302, 303, 304, -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, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, -1, -1, 371, -1, -1, -1, + -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, + -1, 386, -1, -1, -1, -1, -1, 392, 393, -1, + -1, -1, -1, -1, -1, 264, 265, -1, 267, -1, + -1, 270, 271, -1, -1, -1, 275, 276, 277, -1, + 279, -1, 417, 418, 419, 420, 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, - 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, + 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, 371, -1, -1, -1, -1, -1, 377, 378, + 379, 380, -1, -1, -1, 384, -1, 386, -1, -1, + -1, -1, -1, 392, 393, -1, -1, -1, -1, -1, + -1, 264, 265, -1, 267, -1, -1, 270, 271, -1, + -1, -1, 275, 276, 277, -1, 279, -1, 417, 418, + 419, 420, 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, 359, 360, 361, 362, + 363, -1, -1, -1, -1, -1, -1, -1, 371, -1, + -1, -1, -1, -1, 377, 378, 379, 380, -1, -1, + -1, 384, -1, 386, -1, -1, -1, -1, -1, 392, + 393, -1, -1, -1, -1, -1, -1, 264, 265, -1, + 267, -1, -1, 270, 271, -1, -1, -1, 275, 276, + 277, -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, - -1, -1, -1, -1, -1, 371, -1, -1, -1, -1, - -1, 377, 378, 379, 380, -1, -1, -1, 384, -1, - 386, -1, -1, -1, -1, -1, 392, 393, -1, -1, - -1, -1, -1, -1, 264, 265, -1, 267, -1, -1, - 270, 271, -1, -1, -1, 275, 276, 277, -1, 279, - -1, 417, 418, 419, 420, 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, 359, - 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, - -1, 371, -1, -1, -1, -1, -1, 377, 378, 379, - 380, -1, -1, -1, 384, -1, 386, -1, -1, -1, - -1, -1, 392, 393, -1, -1, -1, -1, -1, -1, - 264, 265, -1, 267, -1, -1, 270, 271, -1, -1, - -1, 275, 276, 277, -1, 279, -1, 417, 418, 419, - 420, 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, 359, 360, 361, 362, 363, - -1, -1, -1, -1, -1, -1, -1, 371, -1, -1, - -1, -1, -1, 377, 378, 379, 380, -1, -1, -1, - 384, -1, 386, -1, -1, -1, -1, -1, 392, 393, - -1, -1, -1, -1, -1, -1, 264, 265, -1, 267, - -1, -1, 270, 271, -1, -1, -1, 275, 276, 277, - -1, 279, -1, 417, 418, 419, 420, 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, 359, 360, 361, 362, 363, -1, -1, -1, + -1, -1, -1, -1, 371, -1, -1, -1, -1, -1, + 377, 378, 379, 380, -1, -1, -1, 384, -1, 386, + -1, -1, -1, -1, -1, 392, 393, -1, -1, -1, + -1, -1, -1, 264, 265, -1, 267, -1, -1, 270, + 271, -1, -1, -1, 275, 276, 277, -1, 279, -1, + 417, 418, 419, 420, 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, 359, 360, + 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, + 371, -1, -1, -1, -1, -1, 377, 378, 379, 380, + -1, -1, -1, 384, -1, 386, -1, -1, -1, -1, + -1, 392, 393, -1, -1, -1, -1, -1, -1, 264, + 265, -1, 267, -1, -1, 270, 271, -1, -1, -1, + 275, 276, 277, -1, 279, -1, 417, 418, 419, 420, + 285, -1, -1, 288, -1, -1, -1, -1, -1, -1, + 295, -1, 261, -1, 263, 300, -1, 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, 371, -1, -1, -1, -1, -1, 377, - 378, 379, 380, -1, -1, -1, 384, -1, 386, -1, - -1, -1, -1, -1, 392, 393, -1, -1, -1, -1, - -1, -1, 264, 265, -1, 267, -1, -1, 270, 271, - -1, -1, -1, 275, 276, 277, -1, 279, -1, 417, - 418, 419, 420, 285, -1, -1, 288, -1, -1, -1, - -1, -1, -1, 295, -1, 261, -1, 263, 300, -1, - 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 316, -1, 318, 319, 284, -1, - 322, -1, -1, 325, -1, 327, -1, 329, 330, 331, - 332, 297, 334, -1, -1, -1, 302, -1, -1, -1, - -1, 307, -1, 309, 310, 311, 312, -1, -1, -1, - -1, 317, -1, -1, -1, 321, -1, 359, 360, 361, - 362, 363, -1, -1, -1, -1, -1, 333, -1, 371, - 336, -1, 338, -1, -1, 377, 378, 379, 380, -1, - -1, -1, 384, -1, 386, -1, 264, 265, -1, 267, - 392, 393, 270, 271, -1, -1, 362, 275, 276, 277, - -1, 279, 368, 369, -1, -1, -1, 285, -1, -1, - 288, -1, -1, -1, 261, 417, 418, 295, 420, -1, - -1, -1, 300, -1, 302, 303, 304, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 284, 316, -1, - 318, 319, -1, -1, 322, -1, -1, 325, -1, 327, - 297, 329, 330, 331, 332, 302, 334, -1, -1, -1, - 307, -1, 309, 310, 311, 312, -1, -1, 315, -1, - 317, -1, -1, -1, 321, -1, -1, -1, -1, -1, - -1, 359, 360, 361, 362, 363, 333, -1, -1, 336, - -1, 338, -1, 371, 263, -1, 265, -1, 267, 377, - -1, 270, 380, 272, 273, -1, 275, -1, 277, -1, - 279, -1, 281, 282, 283, 362, -1, -1, 287, 288, - -1, 368, -1, -1, 293, -1, 295, 296, -1, -1, - -1, 300, -1, -1, -1, 304, -1, -1, -1, 417, - 418, -1, 420, -1, -1, -1, 315, 316, -1, 318, - -1, -1, -1, 322, 323, -1, -1, -1, -1, -1, - -1, 330, 331, 264, 265, 334, 267, -1, 337, 270, - 271, -1, -1, 342, 275, 276, 277, -1, 279, -1, - -1, -1, -1, -1, 285, -1, -1, 288, -1, -1, - -1, -1, -1, -1, 295, 364, 365, -1, -1, 300, - -1, 302, 303, 304, -1, -1, -1, -1, 377, -1, + -1, 316, -1, 318, 319, 284, -1, 322, -1, -1, + 325, -1, 327, -1, 329, 330, 331, 332, 297, 334, + -1, -1, -1, 302, -1, -1, -1, -1, 307, -1, + 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, + -1, -1, 321, -1, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, 333, -1, 371, 336, -1, 338, + -1, -1, 377, 378, 379, 380, -1, -1, -1, 384, + -1, 386, -1, 264, 265, -1, 267, 392, 393, 270, + 271, -1, -1, 362, 275, 276, 277, -1, 279, 368, + 369, -1, -1, -1, 285, -1, -1, 288, -1, -1, + -1, -1, 417, 418, 295, 420, -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, - -1, -1, -1, 265, -1, 267, -1, -1, 270, 418, - -1, -1, -1, 275, -1, -1, -1, 279, 359, 360, - 361, 362, -1, -1, -1, -1, 288, 265, -1, 267, - 371, -1, 270, 295, 272, 273, -1, 275, 300, 277, - -1, 279, 304, 281, 282, 283, -1, -1, -1, 287, - 288, -1, -1, -1, 316, 293, 318, 295, 296, -1, - 322, -1, 300, -1, -1, -1, 304, -1, 330, 331, - -1, -1, 334, -1, -1, 337, 417, 418, 316, -1, - 318, -1, -1, -1, 322, 323, -1, -1, -1, -1, - -1, -1, 330, 331, -1, 265, 334, 267, -1, 337, - 270, -1, 272, 273, 342, 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, 377, - -1, -1, -1, -1, -1, -1, 316, -1, 318, -1, - -1, -1, 322, 323, -1, -1, 418, -1, -1, -1, + 331, 332, -1, 334, -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, 360, + 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, + 371, 263, -1, 265, -1, 267, 377, -1, 270, 380, + 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, 417, 418, -1, 420, + -1, -1, -1, 315, 316, -1, 318, -1, -1, -1, + 322, 323, -1, -1, -1, -1, -1, -1, 330, 331, + 264, 265, 334, 267, -1, 337, 270, 271, -1, -1, + 342, 275, 276, 277, -1, 279, -1, -1, -1, -1, + -1, 285, -1, -1, 288, -1, -1, -1, -1, -1, + -1, 295, 364, 365, -1, -1, 300, -1, 302, 303, + 304, -1, -1, -1, -1, 377, -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, -1, -1, -1, + 265, -1, 267, -1, -1, 270, 418, 272, -1, -1, + 275, -1, -1, -1, 279, 359, 360, 361, 362, -1, + -1, -1, -1, 288, 265, -1, 267, 371, -1, 270, + 295, 272, 273, -1, 275, 300, 277, 302, 279, 304, + 281, 282, 283, -1, -1, -1, 287, 288, -1, -1, + -1, 316, 293, 318, 295, 296, -1, 322, 323, 300, + -1, -1, -1, 304, -1, 330, 331, -1, -1, 334, + -1, -1, 337, 417, 418, 316, -1, 318, -1, -1, + -1, 322, 323, -1, -1, -1, -1, -1, -1, 330, + 331, -1, 265, 334, 267, -1, 337, 270, -1, 272, + 273, 342, 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, 377, -1, -1, -1, + -1, -1, -1, 316, -1, 318, -1, -1, -1, 322, + 323, -1, -1, 418, -1, -1, -1, 330, 331, -1, + -1, 334, -1, -1, 337, -1, 265, -1, 267, 342, + -1, 270, -1, -1, 273, -1, 275, 418, 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, 273, -1, 275, -1, + 277, -1, 279, -1, 281, 282, 283, 316, -1, 318, + 287, 288, -1, 322, -1, -1, 293, -1, 295, -1, + -1, 330, 331, 300, -1, 334, -1, 304, 337, -1, + -1, -1, 265, 342, 267, 418, -1, 270, -1, 316, + -1, 318, 275, -1, -1, 322, 279, -1, -1, -1, + -1, -1, -1, 330, 331, 288, -1, 334, -1, -1, + 337, -1, 295, -1, 265, 342, 267, 300, 377, 270, + -1, 304, -1, 306, 275, 308, -1, -1, 279, -1, + 313, -1, -1, 316, -1, 318, -1, 288, -1, 322, + -1, -1, 325, -1, 295, -1, -1, 330, 331, 300, + -1, 334, -1, 304, 337, 306, -1, 308, 265, 418, + 267, -1, 313, 270, -1, 316, -1, 318, 275, -1, + -1, 322, 279, -1, 325, -1, -1, -1, -1, 330, + 331, 288, -1, 334, -1, -1, 337, -1, 295, 372, + 265, 418, 267, 300, -1, 270, -1, 304, -1, 306, + 275, 308, -1, -1, 279, -1, 313, -1, -1, 316, + -1, 318, -1, 288, -1, 322, -1, -1, 325, 370, + 295, -1, -1, 330, 331, 300, -1, 334, -1, 304, + 337, 306, -1, -1, -1, 418, -1, -1, 313, -1, + -1, 316, -1, 318, -1, -1, -1, 322, -1, -1, + 325, -1, -1, -1, -1, 330, 331, -1, -1, 334, + -1, 265, 337, 267, -1, -1, 270, 418, -1, -1, + -1, 275, -1, -1, -1, 279, -1, -1, -1, 283, + 265, -1, 267, -1, 288, 270, -1, -1, -1, 293, + 275, 295, -1, -1, 279, -1, 300, -1, -1, -1, + 304, 305, -1, 288, -1, -1, -1, -1, -1, -1, + 295, 418, 316, -1, 318, 300, -1, -1, 322, 304, + -1, -1, -1, -1, -1, -1, 330, 331, -1, -1, + 334, 316, -1, 318, 265, -1, 267, 322, -1, 270, + -1, -1, -1, 418, 275, 330, 331, -1, 279, 334, + -1, 265, 337, 267, -1, -1, 270, 288, -1, -1, + -1, 275, -1, -1, 295, 279, -1, -1, -1, 300, + -1, -1, -1, 304, 288, -1, -1, -1, -1, -1, + -1, 295, -1, -1, -1, 316, 300, 318, -1, -1, + 304, 322, -1, -1, -1, -1, -1, -1, -1, 330, + 331, -1, 316, 334, 318, 265, 337, 267, 322, -1, + 270, -1, -1, -1, 418, 275, 330, 331, -1, 279, + 334, -1, -1, 337, -1, -1, -1, -1, 288, 265, + -1, 267, -1, 418, 270, 295, -1, -1, -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, -1, 334, -1, -1, 337, -1, 265, - -1, 267, 342, -1, 270, -1, -1, 273, -1, 275, - 418, 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, 273, - -1, 275, -1, 277, -1, 279, -1, 281, 282, 283, - 316, -1, 318, 287, 288, -1, 322, -1, -1, 293, - -1, 295, -1, -1, 330, 331, 300, -1, 334, -1, - 304, 337, -1, -1, -1, 265, 342, 267, 418, -1, - 270, -1, 316, -1, 318, 275, -1, -1, 322, 279, - -1, -1, -1, -1, -1, -1, 330, 331, 288, -1, - 334, -1, -1, 337, -1, 295, -1, 265, 342, 267, - 300, 377, 270, -1, 304, -1, 306, 275, 308, -1, - -1, 279, -1, 313, -1, -1, 316, -1, 318, -1, - 288, -1, 322, -1, -1, 325, -1, 295, -1, -1, - 330, 331, 300, -1, 334, -1, 304, 337, 306, -1, - 308, 265, 418, 267, -1, 313, 270, -1, 316, -1, - 318, 275, -1, -1, 322, 279, -1, 325, -1, -1, - -1, -1, 330, 331, 288, -1, 334, -1, -1, 337, - -1, 295, 372, 265, 418, 267, 300, -1, 270, -1, - 304, -1, 306, 275, 308, -1, -1, 279, -1, 313, - -1, -1, 316, -1, 318, -1, 288, -1, 322, -1, - -1, 325, 370, 295, -1, -1, 330, 331, 300, -1, - 334, -1, 304, 337, 306, -1, -1, -1, 418, -1, - -1, 313, -1, -1, 316, -1, 318, -1, -1, -1, - 322, -1, -1, 325, -1, -1, -1, -1, 330, 331, - -1, -1, 334, -1, 265, 337, 267, -1, -1, 270, - 418, -1, -1, -1, 275, -1, -1, -1, 279, -1, - -1, -1, 283, 265, -1, 267, -1, 288, 270, -1, - -1, -1, 293, 275, 295, -1, -1, 279, -1, 300, - -1, -1, -1, 304, 305, -1, 288, -1, -1, -1, - -1, -1, -1, 295, 418, 316, -1, 318, 300, -1, - -1, 322, 304, -1, -1, -1, -1, -1, -1, 330, - 331, -1, -1, 334, 316, -1, 318, 265, -1, 267, - 322, -1, 270, -1, -1, -1, 418, 275, 330, 331, + 316, 267, 318, -1, 270, -1, 322, 418, -1, 275, + -1, -1, -1, 279, 330, 331, -1, -1, 334, -1, + -1, 337, 288, 265, 418, 267, -1, -1, 270, 295, + -1, -1, -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, -1, 334, -1, + -1, 337, -1, -1, 316, -1, 318, 265, 418, 267, + 322, -1, 270, -1, -1, -1, -1, 275, 330, 331, -1, 279, 334, -1, 265, 337, 267, -1, -1, 270, - 288, -1, -1, -1, 275, -1, -1, 295, 279, -1, + 288, -1, 418, -1, 275, -1, -1, 295, 279, -1, -1, -1, 300, -1, -1, -1, 304, 288, -1, -1, - -1, -1, -1, -1, 295, -1, -1, -1, 316, 300, - 318, -1, -1, 304, 322, -1, -1, -1, -1, -1, - -1, -1, 330, 331, -1, 316, 334, 318, 265, 337, - 267, 322, -1, 270, -1, -1, -1, 418, 275, 330, - 331, -1, 279, 334, -1, -1, 337, -1, -1, -1, - -1, 288, 265, -1, 267, -1, 418, 270, 295, -1, - -1, -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, -1, 334, -1, -1, - 337, -1, 265, 316, 267, 318, -1, 270, -1, 322, - 418, -1, 275, -1, -1, -1, 279, 330, 331, -1, - -1, 334, -1, -1, 337, 288, 265, 418, 267, -1, - -1, 270, 295, -1, -1, -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, - -1, 334, -1, -1, 337, -1, -1, 316, -1, 318, - 265, 418, 267, 322, -1, 270, -1, -1, -1, -1, - 275, 330, 331, -1, 279, 334, -1, 265, 337, 267, - -1, -1, 270, 288, -1, 418, -1, 275, -1, -1, - 295, 279, -1, -1, -1, 300, -1, -1, -1, 304, - 288, -1, -1, -1, -1, -1, -1, 295, -1, -1, - -1, 316, 300, 318, -1, -1, 304, 322, -1, -1, - -1, -1, -1, -1, -1, 330, 331, -1, 316, 334, - 318, 265, 337, 267, 322, 418, 270, -1, -1, -1, - -1, 275, 330, 331, -1, 279, 334, -1, -1, 337, - -1, -1, -1, -1, 288, -1, -1, -1, -1, 418, - -1, 295, -1, -1, -1, -1, 300, -1, -1, 261, - 304, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 272, -1, 316, -1, 318, 277, -1, -1, 322, 281, - -1, -1, 284, -1, -1, -1, 330, 331, -1, -1, - 334, -1, -1, 337, 296, 297, -1, -1, -1, 301, - 302, -1, -1, 418, -1, 307, -1, 309, 310, 311, - 312, -1, -1, -1, -1, 317, -1, -1, -1, 321, - 418, 323, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 333, -1, 335, 336, 261, 338, -1, -1, -1, - 342, -1, -1, -1, -1, -1, 272, -1, -1, -1, - -1, 277, -1, -1, -1, 281, -1, -1, 284, -1, - 362, -1, -1, -1, -1, -1, 368, 369, -1, -1, - 296, 297, -1, -1, 418, 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, 272, -1, 317, -1, 362, 277, 321, -1, - 323, 281, 368, 369, 284, -1, -1, -1, -1, -1, - 333, -1, -1, 336, -1, 338, 296, 297, -1, 342, - -1, 301, 302, 261, -1, -1, -1, 307, -1, 309, - 310, 311, 312, -1, -1, -1, -1, 317, -1, 362, - -1, 321, -1, 323, -1, 368, 284, -1, -1, -1, - -1, -1, -1, 333, -1, -1, 336, -1, 338, 297, - -1, 261, 342, -1, 302, -1, -1, -1, -1, 307, - -1, 309, 310, 311, 312, -1, -1, -1, -1, 317, - -1, -1, 362, 321, 284, -1, -1, -1, 368, -1, - -1, -1, -1, -1, -1, 333, -1, 297, 336, 261, - 338, 263, 302, -1, -1, -1, -1, 307, -1, 309, - 310, 311, 312, -1, -1, -1, -1, 317, -1, -1, - -1, 321, 284, -1, 362, -1, 364, 365, -1, -1, - 368, -1, -1, 333, -1, 297, 336, 261, 338, -1, - 302, -1, -1, -1, -1, 307, -1, 309, 310, 311, - 312, -1, -1, -1, -1, 317, -1, -1, -1, 321, - 284, -1, 362, -1, 364, 365, -1, 261, 368, 263, - -1, 333, -1, 297, 336, -1, 338, -1, 302, -1, - -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, - 284, -1, -1, 317, -1, -1, -1, 321, -1, -1, - 362, -1, -1, 297, -1, -1, 368, 261, 302, 333, - -1, -1, 336, 307, 338, 309, 310, 311, 312, -1, - -1, 315, -1, 317, -1, -1, -1, 321, -1, -1, - 284, -1, -1, -1, -1, -1, -1, -1, 362, 333, - 364, 365, 336, 297, 338, -1, -1, -1, 302, -1, - -1, -1, -1, 307, -1, 309, 310, 311, 312, -1, - -1, -1, -1, 317, -1, -1, -1, 321, 362, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 333, - -1, -1, 336, -1, 338, -1, -1, -1, -1, -1, + -1, 261, -1, -1, 295, -1, -1, -1, 316, 300, + 318, -1, 272, 304, 322, -1, -1, 277, -1, -1, + -1, 281, 330, 331, 284, 316, 334, 318, -1, 337, + -1, 322, 418, -1, -1, -1, 296, 297, -1, 330, + 331, 301, 302, 334, 261, -1, 337, 307, -1, 309, + 310, 311, 312, -1, -1, 272, 418, 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, -1, 301, 302, -1, -1, -1, -1, + 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, + 317, -1, 362, -1, 321, -1, 323, -1, 368, 369, + 418, -1, -1, 261, -1, -1, 333, -1, -1, 336, + -1, 338, -1, -1, 272, 342, -1, 418, -1, 277, + -1, -1, -1, 281, -1, -1, 284, -1, -1, -1, + -1, -1, -1, -1, -1, 362, -1, -1, 296, 297, + -1, 368, 369, 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, 261, -1, + -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, + -1, -1, 317, -1, 362, -1, 321, -1, 323, -1, + 368, 284, -1, -1, -1, -1, -1, -1, 333, -1, + -1, 336, -1, 338, 297, -1, 261, 342, -1, 302, + -1, -1, -1, -1, 307, -1, 309, 310, 311, 312, + -1, -1, -1, -1, 317, -1, -1, 362, 321, 284, + -1, -1, -1, 368, -1, -1, -1, -1, -1, -1, + 333, -1, 297, 336, 261, 338, 263, 302, -1, -1, + -1, -1, 307, -1, 309, 310, 311, 312, -1, -1, + -1, -1, 317, -1, -1, -1, 321, 284, -1, 362, + -1, 364, 365, -1, -1, 368, -1, -1, 333, -1, + 297, 336, 261, 338, -1, 302, -1, -1, -1, -1, + 307, -1, 309, 310, 311, 312, -1, -1, -1, -1, + 317, -1, -1, -1, 321, 284, -1, 362, -1, 364, + 365, -1, 261, 368, 263, -1, 333, -1, 297, 336, + -1, 338, -1, 302, -1, -1, -1, -1, 307, -1, + 309, 310, 311, 312, -1, 284, -1, -1, 317, -1, + -1, -1, 321, -1, -1, 362, -1, -1, 297, -1, + -1, 368, 261, 302, 333, -1, -1, 336, 307, 338, + 309, 310, 311, 312, -1, -1, 315, -1, 317, -1, + -1, -1, 321, -1, -1, 284, -1, -1, -1, -1, + -1, -1, -1, 362, 333, 364, 365, 336, 297, 338, + -1, -1, 301, 302, -1, -1, -1, -1, 307, -1, + 309, 310, 311, 312, -1, -1, -1, -1, 317, -1, + -1, -1, 321, 362, -1, -1, -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, -1, -1, 362, + -1, -1, -1, 362, }; -#line 6338 "cs-parser.jay" +#line 6341 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index e82049a156..58a9ed9115 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -2554,10 +2554,13 @@ event_accessor_block enum_declaration : opt_attributes opt_modifiers - ENUM type_declaration_name - opt_enum_base + ENUM { enumCommas.Add (GetLocation ($3)); + } + type_declaration_name + opt_enum_base + { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } @@ -2565,14 +2568,14 @@ enum_declaration { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; - enumCommas.Add (GetLocation ($7)); + enumCommas.Add (GetLocation ($8)); - MemberName name = (MemberName) $4; + MemberName name = (MemberName) $5; if (name.IsGeneric) { 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); + push_current_class (new Enum (current_namespace, current_class, (TypeExpression) $6, (Modifiers) $2, MakeName (name), (Attributes) $1), null); } opt_enum_member_declarations { @@ -2582,9 +2585,9 @@ enum_declaration } CLOSE_BRACE opt_semicolon { - enumCommas.Add (GetLocation ($11)); - if ($12 != null) - current_class.OptionalSemicolon = GetLocation ($12); + enumCommas.Add (GetLocation ($12)); + if ($13 != null) + current_class.OptionalSemicolon = GetLocation ($13); if (doc_support) current_class.DocComment = enumTypeComment; From aee84bdaa60571170d5387b8a8389b21b71d756a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 09:13:12 +0200 Subject: [PATCH 59/92] Fixed nullable position. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 37d88623ab..6000bcdf69 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -156,9 +156,9 @@ namespace ICSharpCode.NRefactory.CSharp var ccSpec = cc.Spec; while (ccSpec != null) { if (ccSpec.IsNullable) { - result.HasNullableSpecifier = true; + result.AddChild (new CSharpTokenNode (Convert (ccSpec.Location), 1), ComposedType.NullableRole); } else if (ccSpec.IsPointer) { - result.PointerRank++; + result.AddChild (new CSharpTokenNode (Convert (ccSpec.Location), 1), ComposedType.PointerRole); } else { var location = LocationsBag.GetLocations (ccSpec); var spec = new ArraySpecifier () { Dimensions = ccSpec.Dimension }; From 618cb984d12af70c0d9c5060231372eae535fc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 09:58:34 +0200 Subject: [PATCH 60/92] Fixed initializer comma locations. --- .../Parser/CSharpParser.cs | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 6000bcdf69..449d8fd152 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2488,8 +2488,6 @@ namespace ICSharpCode.NRefactory.CSharp if (braceLocs != null) init.AddChild (new CSharpTokenNode (Convert (braceLocs[0]), 1), ArrayInitializerExpression.Roles.LBrace); AddConvertCollectionOrObjectInitializers (init, minit); - if (braceLocs != null) - init.AddChild (new CSharpTokenNode (Convert (braceLocs[1]), 1), ArrayInitializerExpression.Roles.RBrace); return init; } @@ -2497,7 +2495,7 @@ namespace ICSharpCode.NRefactory.CSharp { var initLoc = LocationsBag.GetLocations (minit); var commaLoc = LocationsBag.GetLocations (minit.Initializers); - int curComma = commaLoc != null ? commaLoc.Count - 1 : -1; + int curComma = 0; foreach (var expr in minit.Initializers) { var collectionInit = expr as CollectionElementInitializer; if (collectionInit != null) { @@ -2505,43 +2503,42 @@ namespace ICSharpCode.NRefactory.CSharp var braceLocs = LocationsBag.GetLocations (expr); if (braceLocs != null) - parent.AddChild (new CSharpTokenNode (Convert (braceLocs[0]), 1), ArrayInitializerExpression.Roles.LBrace); + parent.AddChild (new CSharpTokenNode (Convert (braceLocs [0]), 1), ArrayInitializerExpression.Roles.LBrace); for (int i = 0; i < collectionInit.Arguments.Count; i++) { - var arg = collectionInit.Arguments[i] as CollectionElementInitializer.ElementInitializerArgument; + var arg = collectionInit.Arguments [i] as CollectionElementInitializer.ElementInitializerArgument; if (arg == null) continue; parent.AddChild ((ICSharpCode.NRefactory.CSharp.Expression)arg.Expr.Accept (this), ArrayInitializerExpression.Roles.Expression); - if (curComma >= 0) - parent.AddChild (new CSharpTokenNode (Convert (commaLoc[curComma--]), 1), ArrayInitializerExpression.Roles.Comma); } if (braceLocs != null) - parent.AddChild (new CSharpTokenNode (Convert (braceLocs[1]), 1), ArrayInitializerExpression.Roles.RBrace); + parent.AddChild (new CSharpTokenNode (Convert (braceLocs [1]), 1), ArrayInitializerExpression.Roles.RBrace); init.AddChild (parent, ArrayInitializerExpression.Roles.Expression); - continue; - } - - var eleInit = expr as ElementInitializer; - if (eleInit != null) { - var nexpr = new NamedExpression (); - nexpr.AddChild (Identifier.Create (eleInit.Name, Convert(eleInit.Location)), NamedArgumentExpression.Roles.Identifier); - var assignLoc = LocationsBag.GetLocations (eleInit); - if (assignLoc != null) - nexpr.AddChild (new CSharpTokenNode (Convert (assignLoc[0]), 1), NamedArgumentExpression.Roles.Assign); - if (eleInit.Source != null) { - if (eleInit.Source is CollectionOrObjectInitializers) { - var arrInit = new ArrayInitializerExpression (); - AddConvertCollectionOrObjectInitializers (arrInit, eleInit.Source as CollectionOrObjectInitializers); - nexpr.AddChild (arrInit, NamedArgumentExpression.Roles.Expression); - } else { - nexpr.AddChild ((Expression)eleInit.Source.Accept (this), NamedArgumentExpression.Roles.Expression); + } else { + var eleInit = expr as ElementInitializer; + if (eleInit != null) { + var nexpr = new NamedExpression (); + nexpr.AddChild (Identifier.Create (eleInit.Name, Convert (eleInit.Location)), NamedArgumentExpression.Roles.Identifier); + var assignLoc = LocationsBag.GetLocations (eleInit); + if (assignLoc != null) + nexpr.AddChild (new CSharpTokenNode (Convert (assignLoc [0]), 1), NamedArgumentExpression.Roles.Assign); + if (eleInit.Source != null) { + if (eleInit.Source is CollectionOrObjectInitializers) { + var arrInit = new ArrayInitializerExpression (); + AddConvertCollectionOrObjectInitializers (arrInit, eleInit.Source as CollectionOrObjectInitializers); + nexpr.AddChild (arrInit, NamedArgumentExpression.Roles.Expression); + } else { + nexpr.AddChild ((Expression)eleInit.Source.Accept (this), NamedArgumentExpression.Roles.Expression); + } } + + init.AddChild (nexpr, ArrayInitializerExpression.Roles.Expression); } - - init.AddChild (nexpr, ArrayInitializerExpression.Roles.Expression); } + if (commaLoc != null && curComma < commaLoc.Count) + init.AddChild (new CSharpTokenNode (Convert (commaLoc [curComma++]), 1), ArrayInitializerExpression.Roles.Comma); } if (initLoc != null) { From 60430391f6fab66b6263aef04efc7997f28d38db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:01:14 +0200 Subject: [PATCH 61/92] Fixed base type comma order. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 449d8fd152..a51d4615b2 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -398,7 +398,7 @@ namespace ICSharpCode.NRefactory.CSharp foreach (var baseTypes in c.TypeBaseExpressions) { newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); if (commaLocations != null && i < commaLocations.Count) { - newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i - 1]), 1), TypeDeclaration.Roles.Comma); + newType.AddChild (new CSharpTokenNode (Convert (commaLocations [i]), 1), TypeDeclaration.Roles.Comma); i++; } } @@ -446,7 +446,7 @@ namespace ICSharpCode.NRefactory.CSharp foreach (var baseTypes in s.TypeBaseExpressions) { newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); if (commaLocations != null && i < commaLocations.Count) { - newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - i - 1]), 1), TypeDeclaration.Roles.Comma); + newType.AddChild (new CSharpTokenNode (Convert (commaLocations [i]), 1), TypeDeclaration.Roles.Comma); i++; } } @@ -493,7 +493,7 @@ namespace ICSharpCode.NRefactory.CSharp foreach (var baseTypes in i.TypeBaseExpressions) { newType.AddChild (ConvertToType (baseTypes), TypeDeclaration.BaseTypeRole); if (commaLocations != null && j < commaLocations.Count) { - newType.AddChild (new CSharpTokenNode (Convert (commaLocations [commaLocations.Count - j - 1]), 1), TypeDeclaration.Roles.Comma); + newType.AddChild (new CSharpTokenNode (Convert (commaLocations [j]), 1), TypeDeclaration.Roles.Comma); j++; } } From d63f1fa0f66d1e10c7b89d98c2137e34cd6a4386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:05:05 +0200 Subject: [PATCH 62/92] Fixed named argument expression. --- .../Expressions/NamedArgumentExpression.cs | 5 +- .../Parser/CSharpParser.cs | 4 +- .../Parser/mcs/cs-parser.cs | 1267 +++++++++-------- .../Parser/mcs/cs-parser.jay | 1 + 4 files changed, 640 insertions(+), 637 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs index c4cf8e8a58..e7684277bb 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs @@ -22,6 +22,7 @@ namespace ICSharpCode.NRefactory.CSharp { /// /// Represents a named argument passed to a method or attribute. + /// name: expression /// public class NamedArgumentExpression : Expression { @@ -53,8 +54,8 @@ namespace ICSharpCode.NRefactory.CSharp } } - public CSharpTokenNode AssignToken { - get { return GetChildByRole (Roles.Assign); } + public CSharpTokenNode ColonToken { + get { return GetChildByRole (Roles.Colon); } } public Expression Expression { diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index a51d4615b2..0f82184a07 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -210,7 +210,7 @@ namespace ICSharpCode.NRefactory.CSharp var argLoc = LocationsBag.GetLocations (na); if (argLoc != null) - newArg.AddChild (new CSharpTokenNode (Convert (argLoc[0]), 1), NamedArgumentExpression.Roles.Assign); + newArg.AddChild (new CSharpTokenNode (Convert (argLoc[0]), 1), NamedArgumentExpression.Roles.Colon); newArg.AddChild ((Expression)na.Expr.Accept (this), NamedExpression.Roles.Expression); result.AddChild (newArg, Attribute.Roles.Argument); continue; @@ -2380,7 +2380,7 @@ namespace ICSharpCode.NRefactory.CSharp var loc = LocationsBag.GetLocations (na); if (loc != null) - newArg.AddChild (new CSharpTokenNode (Convert (loc[0]), 1), NamedArgumentExpression.Roles.Assign); + newArg.AddChild (new CSharpTokenNode (Convert (loc[0]), 1), NamedArgumentExpression.Roles.Colon); if (arg.ArgType == Argument.AType.Out || arg.ArgType == Argument.AType.Ref) { DirectionExpression direction = new DirectionExpression (); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 14d6ca2cbc..47b7a2226e 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1560,29 +1560,29 @@ case 77: case_77(); break; case 78: -#line 898 "cs-parser.jay" +#line 899 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 902 "cs-parser.jay" +#line 903 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 906 "cs-parser.jay" +#line 907 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; case 83: -#line 918 "cs-parser.jay" +#line 919 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 84: -#line 922 "cs-parser.jay" +#line 923 "cs-parser.jay" { lexer.parsing_modifiers = true; } @@ -1591,7 +1591,7 @@ case 95: case_95(); break; case 96: -#line 952 "cs-parser.jay" +#line 953 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1612,7 +1612,7 @@ case 101: case_101(); break; case 102: -#line 993 "cs-parser.jay" +#line 994 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1624,13 +1624,13 @@ case 104: case_104(); break; case 107: -#line 1034 "cs-parser.jay" +#line 1035 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 108: -#line 1038 "cs-parser.jay" +#line 1039 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1639,7 +1639,7 @@ case 109: case_109(); break; case 110: -#line 1054 "cs-parser.jay" +#line 1055 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1663,7 +1663,7 @@ case 118: case_118(); break; case 119: -#line 1133 "cs-parser.jay" +#line 1134 "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"); } @@ -1675,13 +1675,13 @@ case 122: case_122(); break; case 125: -#line 1163 "cs-parser.jay" +#line 1164 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: -#line 1167 "cs-parser.jay" +#line 1168 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1690,7 +1690,7 @@ case 127: case_127(); break; case 128: -#line 1180 "cs-parser.jay" +#line 1181 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1699,13 +1699,13 @@ case 129: case_129(); break; case 132: -#line 1199 "cs-parser.jay" +#line 1200 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 133: -#line 1203 "cs-parser.jay" +#line 1204 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1714,7 +1714,7 @@ case 134: case_134(); break; case 135: -#line 1219 "cs-parser.jay" +#line 1220 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1735,13 +1735,13 @@ case 142: case_142(); break; case 143: -#line 1290 "cs-parser.jay" +#line 1291 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 144: -#line 1294 "cs-parser.jay" +#line 1295 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1750,7 +1750,7 @@ case 145: case_145(); break; case 146: -#line 1334 "cs-parser.jay" +#line 1335 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1759,7 +1759,7 @@ case 147: case_147(); break; case 148: -#line 1344 "cs-parser.jay" +#line 1345 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1771,11 +1771,11 @@ case 150: case_150(); break; case 152: -#line 1418 "cs-parser.jay" +#line 1419 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 153: -#line 1422 "cs-parser.jay" +#line 1423 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: @@ -1800,13 +1800,13 @@ case 161: case_161(); break; case 162: -#line 1494 "cs-parser.jay" +#line 1495 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 163: -#line 1498 "cs-parser.jay" +#line 1499 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1830,7 +1830,7 @@ case 169: case_169(); break; case 170: -#line 1573 "cs-parser.jay" +#line 1574 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1839,11 +1839,11 @@ case 171: case_171(); break; case 172: -#line 1614 "cs-parser.jay" +#line 1615 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 174: -#line 1622 "cs-parser.jay" +#line 1623 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1876,7 +1876,7 @@ case 183: case_183(); break; case 184: -#line 1711 "cs-parser.jay" +#line 1712 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1897,7 +1897,7 @@ case 189: case_189(); break; case 190: -#line 1765 "cs-parser.jay" +#line 1766 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1906,7 +1906,7 @@ case 191: case_191(); break; case 192: -#line 1794 "cs-parser.jay" +#line 1795 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1936,7 +1936,7 @@ case 205: case_205(); break; case 206: -#line 1943 "cs-parser.jay" +#line 1944 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1954,55 +1954,55 @@ case 210: case_210(); break; case 211: -#line 1980 "cs-parser.jay" +#line 1981 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1992 "cs-parser.jay" +#line 1993 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 1996 "cs-parser.jay" +#line 1997 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 2003 "cs-parser.jay" +#line 2004 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 2007 "cs-parser.jay" +#line 2008 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2015 "cs-parser.jay" +#line 2016 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2019 "cs-parser.jay" +#line 2020 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2023 "cs-parser.jay" +#line 2024 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2029 "cs-parser.jay" +#line 2030 "cs-parser.jay" { } break; @@ -2010,14 +2010,14 @@ case 226: case_226(); break; case 228: -#line 2062 "cs-parser.jay" +#line 2063 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2078 "cs-parser.jay" +#line 2079 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2026,95 +2026,95 @@ case 232: case_232(); break; case 234: -#line 2124 "cs-parser.jay" +#line 2125 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2125 "cs-parser.jay" +#line 2126 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2126 "cs-parser.jay" +#line 2127 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2127 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2128 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2129 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2131 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2132 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2134 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2135 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2136 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2137 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2138 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2139 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2140 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2141 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2142 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2143 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2144 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2145 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2146 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2147 "cs-parser.jay" +#line 2148 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2154 "cs-parser.jay" +#line 2155 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2123,7 +2123,7 @@ case 257: case_257(); break; case 258: -#line 2173 "cs-parser.jay" +#line 2174 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2150,11 +2150,11 @@ case 265: case_265(); break; case 267: -#line 2276 "cs-parser.jay" +#line 2277 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2288 "cs-parser.jay" +#line 2289 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2163,7 +2163,7 @@ case 271: case_271(); break; case 272: -#line 2298 "cs-parser.jay" +#line 2299 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2196,7 +2196,7 @@ case 281: case_281(); break; case 283: -#line 2407 "cs-parser.jay" +#line 2408 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2205,13 +2205,13 @@ case 284: case_284(); break; case 287: -#line 2424 "cs-parser.jay" +#line 2425 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2428 "cs-parser.jay" +#line 2429 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2220,7 +2220,7 @@ case 289: case_289(); break; case 290: -#line 2441 "cs-parser.jay" +#line 2442 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2232,7 +2232,7 @@ case 292: case_292(); break; case 293: -#line 2466 "cs-parser.jay" +#line 2467 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2262,7 +2262,7 @@ case 303: case_303(); break; case 305: -#line 2560 "cs-parser.jay" +#line 2561 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2286,7 +2286,7 @@ case 312: case_312(); break; case 315: -#line 2628 "cs-parser.jay" +#line 2629 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2304,7 +2304,7 @@ case 320: case_320(); break; case 321: -#line 2686 "cs-parser.jay" +#line 2687 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2313,7 +2313,7 @@ case 322: case_322(); break; case 323: -#line 2708 "cs-parser.jay" +#line 2709 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2346,7 +2346,7 @@ case 336: case_336(); break; case 337: -#line 2813 "cs-parser.jay" +#line 2814 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2391,13 +2391,13 @@ case 352: case_352(); break; case 354: -#line 2934 "cs-parser.jay" +#line 2935 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 355: -#line 2941 "cs-parser.jay" +#line 2942 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2412,7 +2412,7 @@ case 361: case_361(); break; case 363: -#line 2979 "cs-parser.jay" +#line 2980 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2421,7 +2421,7 @@ case 364: case_364(); break; case 365: -#line 2999 "cs-parser.jay" +#line 3000 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2430,13 +2430,13 @@ case 366: case_366(); break; case 367: -#line 3008 "cs-parser.jay" +#line 3009 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 368: -#line 3012 "cs-parser.jay" +#line 3013 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2454,63 +2454,63 @@ case 372: case_372(); break; case 373: -#line 3051 "cs-parser.jay" +#line 3052 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3052 "cs-parser.jay" +#line 3053 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3053 "cs-parser.jay" +#line 3054 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3054 "cs-parser.jay" +#line 3055 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3055 "cs-parser.jay" +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 378: -#line 3056 "cs-parser.jay" +#line 3057 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3061 "cs-parser.jay" +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3062 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3063 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3064 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3065 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3066 "cs-parser.jay" +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3067 "cs-parser.jay" +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3068 "cs-parser.jay" +#line 3069 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3069 "cs-parser.jay" +#line 3070 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 409: @@ -2520,22 +2520,22 @@ case 410: case_410(); break; case 414: -#line 3116 "cs-parser.jay" +#line 3117 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3120 "cs-parser.jay" +#line 3121 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 416: -#line 3121 "cs-parser.jay" +#line 3122 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 421: case_421(); break; case 422: -#line 3154 "cs-parser.jay" +#line 3155 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2553,7 +2553,7 @@ case 426: case_426(); break; case 427: -#line 3189 "cs-parser.jay" +#line 3190 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2562,7 +2562,7 @@ case 428: case_428(); break; case 429: -#line 3197 "cs-parser.jay" +#line 3198 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2574,7 +2574,7 @@ case 431: case_431(); break; case 432: -#line 3213 "cs-parser.jay" +#line 3214 "cs-parser.jay" { yyVal = null; } break; case 434: @@ -2584,11 +2584,11 @@ case 435: case_435(); break; case 436: -#line 3236 "cs-parser.jay" +#line 3237 "cs-parser.jay" { yyVal = null; } break; case 437: -#line 3240 "cs-parser.jay" +#line 3241 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2606,7 +2606,7 @@ case 441: case_441(); break; case 442: -#line 3273 "cs-parser.jay" +#line 3274 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2621,7 +2621,7 @@ case 445: case_445(); break; case 448: -#line 3301 "cs-parser.jay" +#line 3302 "cs-parser.jay" { yyVal = null; } break; case 450: @@ -2640,7 +2640,7 @@ case 454: case_454(); break; case 455: -#line 3353 "cs-parser.jay" +#line 3354 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2676,13 +2676,13 @@ case 469: case_469(); break; case 470: -#line 3440 "cs-parser.jay" +#line 3441 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 472: -#line 3448 "cs-parser.jay" +#line 3449 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2694,13 +2694,13 @@ case 474: case_474(); break; case 475: -#line 3468 "cs-parser.jay" +#line 3469 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 476: -#line 3475 "cs-parser.jay" +#line 3476 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2727,7 +2727,7 @@ case 483: case_483(); break; case 484: -#line 3541 "cs-parser.jay" +#line 3542 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2739,7 +2739,7 @@ case 486: case_486(); break; case 489: -#line 3568 "cs-parser.jay" +#line 3569 "cs-parser.jay" { yyVal = null; } break; case 491: @@ -2770,25 +2770,25 @@ case 502: case_502(); break; case 503: -#line 3646 "cs-parser.jay" +#line 3647 "cs-parser.jay" { yyVal = 2; } break; case 504: -#line 3650 "cs-parser.jay" +#line 3651 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 505: -#line 3657 "cs-parser.jay" +#line 3658 "cs-parser.jay" { yyVal = null; } break; case 506: -#line 3661 "cs-parser.jay" +#line 3662 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2806,7 +2806,7 @@ case 510: case_510(); break; case 511: -#line 3705 "cs-parser.jay" +#line 3706 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2851,7 +2851,7 @@ case 526: case_526(); break; case 527: -#line 3825 "cs-parser.jay" +#line 3826 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2860,25 +2860,25 @@ case 528: case_528(); break; case 529: -#line 3838 "cs-parser.jay" +#line 3839 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 530: -#line 3842 "cs-parser.jay" +#line 3843 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 531: -#line 3849 "cs-parser.jay" +#line 3850 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 533: -#line 3857 "cs-parser.jay" +#line 3858 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2890,13 +2890,13 @@ case 535: case_535(); break; case 537: -#line 3883 "cs-parser.jay" +#line 3884 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 538: -#line 3887 "cs-parser.jay" +#line 3888 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2908,37 +2908,37 @@ case 542: case_542(); break; case 544: -#line 3917 "cs-parser.jay" +#line 3918 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3921 "cs-parser.jay" +#line 3922 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3925 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3929 "cs-parser.jay" +#line 3930 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3933 "cs-parser.jay" +#line 3934 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 549: -#line 3937 "cs-parser.jay" +#line 3938 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2956,7 +2956,7 @@ case 555: case_555(); break; case 556: -#line 3969 "cs-parser.jay" +#line 3970 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2965,13 +2965,13 @@ case 557: case_557(); break; case 558: -#line 3978 "cs-parser.jay" +#line 3979 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3982 "cs-parser.jay" +#line 3983 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3022,7 +3022,7 @@ case 584: case_584(); break; case 585: -#line 4106 "cs-parser.jay" +#line 4107 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3073,14 +3073,14 @@ case 600: case_600(); break; case 601: -#line 4203 "cs-parser.jay" +#line 4204 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 602: case_602(); break; case 605: -#line 4218 "cs-parser.jay" +#line 4219 "cs-parser.jay" { start_block (lexer.Location); } @@ -3104,7 +3104,7 @@ case 612: case_612(); break; case 613: -#line 4263 "cs-parser.jay" +#line 4264 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3116,7 +3116,7 @@ case 615: case_615(); break; case 616: -#line 4277 "cs-parser.jay" +#line 4278 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3128,7 +3128,7 @@ case 618: case_618(); break; case 624: -#line 4302 "cs-parser.jay" +#line 4303 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3143,13 +3143,13 @@ case 627: case_627(); break; case 629: -#line 4331 "cs-parser.jay" +#line 4332 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 630: -#line 4344 "cs-parser.jay" +#line 4345 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3167,18 +3167,18 @@ case 634: case_634(); break; case 635: -#line 4387 "cs-parser.jay" +#line 4388 "cs-parser.jay" { yyVal = null; } break; case 636: -#line 4389 "cs-parser.jay" +#line 4390 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 637: case_637(); break; case 638: -#line 4402 "cs-parser.jay" +#line 4403 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3235,7 +3235,7 @@ case 657: case_657(); break; case 659: -#line 4522 "cs-parser.jay" +#line 4523 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3265,19 +3265,19 @@ case 667: case_667(); break; case 668: -#line 4612 "cs-parser.jay" +#line 4613 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4616 "cs-parser.jay" +#line 4617 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 670: -#line 4623 "cs-parser.jay" +#line 4624 "cs-parser.jay" { yyVal = Variance.None; } @@ -3295,7 +3295,7 @@ case 674: case_674(); break; case 675: -#line 4668 "cs-parser.jay" +#line 4669 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3313,13 +3313,13 @@ case 679: case_679(); break; case 684: -#line 4712 "cs-parser.jay" +#line 4713 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 685: -#line 4716 "cs-parser.jay" +#line 4717 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3328,13 +3328,13 @@ case 687: case_687(); break; case 690: -#line 4740 "cs-parser.jay" +#line 4741 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 691: -#line 4744 "cs-parser.jay" +#line 4745 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3367,13 +3367,13 @@ case 730: case_730(); break; case 731: -#line 4888 "cs-parser.jay" +#line 4889 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 732: -#line 4892 "cs-parser.jay" +#line 4893 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3385,7 +3385,7 @@ case 735: case_735(); break; case 736: -#line 4913 "cs-parser.jay" +#line 4914 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3418,7 +3418,7 @@ case 751: case_751(); break; case 752: -#line 5013 "cs-parser.jay" +#line 5014 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3439,15 +3439,15 @@ case 762: case_762(); break; case 763: -#line 5063 "cs-parser.jay" +#line 5064 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5067 "cs-parser.jay" +#line 5068 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: -#line 5068 "cs-parser.jay" +#line 5069 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 766: @@ -3466,7 +3466,7 @@ case 772: case_772(); break; case 773: -#line 5136 "cs-parser.jay" +#line 5137 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3487,13 +3487,13 @@ case 779: case_779(); break; case 780: -#line 5180 "cs-parser.jay" +#line 5181 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 781: -#line 5184 "cs-parser.jay" +#line 5185 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3508,7 +3508,7 @@ case 784: case_784(); break; case 785: -#line 5213 "cs-parser.jay" +#line 5214 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3523,7 +3523,7 @@ case 792: case_792(); break; case 793: -#line 5252 "cs-parser.jay" +#line 5253 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3535,7 +3535,7 @@ case 795: case_795(); break; case 796: -#line 5280 "cs-parser.jay" +#line 5281 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 798: @@ -3545,11 +3545,11 @@ case 799: case_799(); break; case 801: -#line 5301 "cs-parser.jay" +#line 5302 "cs-parser.jay" { yyVal = null; } break; case 803: -#line 5306 "cs-parser.jay" +#line 5307 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 807: @@ -3592,7 +3592,7 @@ case 825: case_825(); break; case 828: -#line 5461 "cs-parser.jay" +#line 5462 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3613,7 +3613,7 @@ case 833: case_833(); break; case 836: -#line 5514 "cs-parser.jay" +#line 5515 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3622,7 +3622,7 @@ case 837: case_837(); break; case 838: -#line 5533 "cs-parser.jay" +#line 5534 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3631,13 +3631,13 @@ case 839: case_839(); break; case 840: -#line 5551 "cs-parser.jay" +#line 5552 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 841: -#line 5558 "cs-parser.jay" +#line 5559 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3646,7 +3646,7 @@ case 842: case_842(); break; case 843: -#line 5568 "cs-parser.jay" +#line 5569 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3676,7 +3676,7 @@ case 851: case_851(); break; case 852: -#line 5651 "cs-parser.jay" +#line 5652 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3709,7 +3709,7 @@ case 861: case_861(); break; case 862: -#line 5752 "cs-parser.jay" +#line 5753 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3718,7 +3718,7 @@ case 863: case_863(); break; case 864: -#line 5767 "cs-parser.jay" +#line 5768 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3733,7 +3733,7 @@ case 868: case_868(); break; case 869: -#line 5812 "cs-parser.jay" +#line 5813 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3754,7 +3754,7 @@ case 877: case_877(); break; case 883: -#line 5871 "cs-parser.jay" +#line 5872 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3763,7 +3763,7 @@ case 884: case_884(); break; case 885: -#line 5890 "cs-parser.jay" +#line 5891 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3796,13 +3796,13 @@ case 894: case_894(); break; case 896: -#line 6034 "cs-parser.jay" +#line 6035 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 897: -#line 6041 "cs-parser.jay" +#line 6042 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3823,7 +3823,7 @@ case 904: case_904(); break; case 905: -#line 6087 "cs-parser.jay" +#line 6088 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3835,7 +3835,7 @@ case 907: case_907(); break; case 908: -#line 6104 "cs-parser.jay" +#line 6105 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3859,13 +3859,13 @@ case 917: case_917(); break; case 925: -#line 6228 "cs-parser.jay" +#line 6229 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 926: -#line 6235 "cs-parser.jay" +#line 6236 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3877,13 +3877,13 @@ case 928: case_928(); break; case 929: -#line 6252 "cs-parser.jay" +#line 6253 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 930: -#line 6256 "cs-parser.jay" +#line 6257 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3901,25 +3901,25 @@ case 934: case_934(); break; case 936: -#line 6292 "cs-parser.jay" +#line 6293 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 938: -#line 6300 "cs-parser.jay" +#line 6301 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 939: -#line 6304 "cs-parser.jay" +#line 6305 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 940: -#line 6311 "cs-parser.jay" +#line 6312 "cs-parser.jay" { yyVal = new List (0); } @@ -4354,10 +4354,11 @@ void case_77() var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod); + lbag.AddLocation (yyVal, GetLocation(yyVals[-2+yyTop])); } void case_95() -#line 937 "cs-parser.jay" +#line 938 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4366,7 +4367,7 @@ void case_95() } void case_97() -#line 954 "cs-parser.jay" +#line 955 "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]); @@ -4374,7 +4375,7 @@ void case_97() } void case_98() -#line 961 "cs-parser.jay" +#line 962 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4388,14 +4389,14 @@ void case_98() } void case_99() -#line 973 "cs-parser.jay" +#line 974 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_100() -#line 978 "cs-parser.jay" +#line 979 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); --lexer.parsing_declaration; @@ -4404,7 +4405,7 @@ void case_100() } void case_101() -#line 985 "cs-parser.jay" +#line 986 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[-1+yyTop]); @@ -4412,7 +4413,7 @@ void case_101() } void case_103() -#line 1000 "cs-parser.jay" +#line 1001 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4427,7 +4428,7 @@ void case_103() } void case_104() -#line 1013 "cs-parser.jay" +#line 1014 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4440,7 +4441,7 @@ void case_104() } void case_109() -#line 1043 "cs-parser.jay" +#line 1044 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4448,7 +4449,7 @@ void case_109() } void case_111() -#line 1056 "cs-parser.jay" +#line 1057 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4456,14 +4457,14 @@ void case_111() } void case_112() -#line 1062 "cs-parser.jay" +#line 1063 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_115() -#line 1077 "cs-parser.jay" +#line 1078 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4478,7 +4479,7 @@ void case_115() } void case_116() -#line 1092 "cs-parser.jay" +#line 1093 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4491,7 +4492,7 @@ void case_116() } void case_117() -#line 1105 "cs-parser.jay" +#line 1106 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4504,7 +4505,7 @@ void case_117() } void case_118() -#line 1116 "cs-parser.jay" +#line 1117 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4518,7 +4519,7 @@ void case_118() } void case_121() -#line 1139 "cs-parser.jay" +#line 1140 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4526,7 +4527,7 @@ void case_121() } void case_122() -#line 1145 "cs-parser.jay" +#line 1146 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4536,7 +4537,7 @@ void case_122() } void case_127() -#line 1172 "cs-parser.jay" +#line 1173 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4544,7 +4545,7 @@ void case_127() } void case_129() -#line 1182 "cs-parser.jay" +#line 1183 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4553,7 +4554,7 @@ void case_129() } void case_134() -#line 1208 "cs-parser.jay" +#line 1209 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4561,7 +4562,7 @@ void case_134() } void case_136() -#line 1221 "cs-parser.jay" +#line 1222 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4569,14 +4570,14 @@ void case_136() } void case_137() -#line 1227 "cs-parser.jay" +#line 1228 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_140() -#line 1237 "cs-parser.jay" +#line 1238 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4584,7 +4585,7 @@ void case_140() } void case_141() -#line 1246 "cs-parser.jay" +#line 1247 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4596,7 +4597,7 @@ void case_141() } void case_142() -#line 1256 "cs-parser.jay" +#line 1257 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4624,7 +4625,7 @@ void case_142() } void case_145() -#line 1296 "cs-parser.jay" +#line 1297 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4659,14 +4660,14 @@ void case_145() } void case_147() -#line 1337 "cs-parser.jay" +#line 1338 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_149() -#line 1346 "cs-parser.jay" +#line 1347 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4718,7 +4719,7 @@ void case_149() } void case_150() -#line 1399 "cs-parser.jay" +#line 1400 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4736,7 +4737,7 @@ void case_150() } void case_155() -#line 1428 "cs-parser.jay" +#line 1429 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4744,7 +4745,7 @@ void case_155() } void case_156() -#line 1434 "cs-parser.jay" +#line 1435 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4755,7 +4756,7 @@ void case_156() } void case_157() -#line 1443 "cs-parser.jay" +#line 1444 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4766,7 +4767,7 @@ void case_157() } void case_158() -#line 1452 "cs-parser.jay" +#line 1453 "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"); @@ -4776,7 +4777,7 @@ void case_158() } void case_159() -#line 1460 "cs-parser.jay" +#line 1461 "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"); @@ -4791,7 +4792,7 @@ void case_159() } void case_160() -#line 1473 "cs-parser.jay" +#line 1474 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4800,7 +4801,7 @@ void case_160() } void case_161() -#line 1480 "cs-parser.jay" +#line 1481 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4814,14 +4815,14 @@ void case_161() } void case_164() -#line 1500 "cs-parser.jay" +#line 1501 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_165() -#line 1508 "cs-parser.jay" +#line 1509 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4832,7 +4833,7 @@ void case_165() } void case_166() -#line 1517 "cs-parser.jay" +#line 1518 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4852,7 +4853,7 @@ void case_166() } void case_167() -#line 1541 "cs-parser.jay" +#line 1542 "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); @@ -4860,7 +4861,7 @@ void case_167() } void case_168() -#line 1550 "cs-parser.jay" +#line 1551 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4869,7 +4870,7 @@ void case_168() } void case_169() -#line 1560 "cs-parser.jay" +#line 1561 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4878,7 +4879,7 @@ void case_169() } void case_171() -#line 1575 "cs-parser.jay" +#line 1576 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4917,7 +4918,7 @@ void case_171() } void case_175() -#line 1624 "cs-parser.jay" +#line 1625 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4940,7 +4941,7 @@ void case_175() } void case_176() -#line 1648 "cs-parser.jay" +#line 1649 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4949,7 +4950,7 @@ void case_176() } void case_177() -#line 1655 "cs-parser.jay" +#line 1656 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4958,7 +4959,7 @@ void case_177() } void case_178() -#line 1662 "cs-parser.jay" +#line 1663 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4970,14 +4971,14 @@ void case_178() } void case_179() -#line 1675 "cs-parser.jay" +#line 1676 "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_180() -#line 1680 "cs-parser.jay" +#line 1681 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4986,21 +4987,21 @@ void case_180() } void case_181() -#line 1687 "cs-parser.jay" +#line 1688 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1695 "cs-parser.jay" +#line 1696 "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"); } void case_183() -#line 1700 "cs-parser.jay" +#line 1701 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -5011,21 +5012,21 @@ void case_183() } void case_185() -#line 1716 "cs-parser.jay" +#line 1717 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1727 "cs-parser.jay" +#line 1728 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1732 "cs-parser.jay" +#line 1733 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5041,7 +5042,7 @@ void case_187() } void case_188() -#line 1746 "cs-parser.jay" +#line 1747 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5050,14 +5051,14 @@ void case_188() } void case_189() -#line 1753 "cs-parser.jay" +#line 1754 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1767 "cs-parser.jay" +#line 1768 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5084,7 +5085,7 @@ void case_191() } void case_193() -#line 1796 "cs-parser.jay" +#line 1797 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5097,7 +5098,7 @@ void case_193() } void case_198() -#line 1815 "cs-parser.jay" +#line 1816 "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 ()); @@ -5110,7 +5111,7 @@ void case_198() } void case_199() -#line 1829 "cs-parser.jay" +#line 1830 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5133,7 +5134,7 @@ void case_199() } void case_200() -#line 1850 "cs-parser.jay" +#line 1851 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5156,7 +5157,7 @@ void case_200() } void case_201() -#line 1874 "cs-parser.jay" +#line 1875 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5184,7 +5185,7 @@ void case_201() } void case_202() -#line 1900 "cs-parser.jay" +#line 1901 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5207,21 +5208,21 @@ void case_202() } void case_204() -#line 1925 "cs-parser.jay" +#line 1926 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1930 "cs-parser.jay" +#line 1931 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1945 "cs-parser.jay" +#line 1946 "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]); @@ -5229,7 +5230,7 @@ void case_207() } void case_208() -#line 1952 "cs-parser.jay" +#line 1953 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5244,7 +5245,7 @@ void case_208() } void case_209() -#line 1965 "cs-parser.jay" +#line 1966 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5252,7 +5253,7 @@ void case_209() } void case_210() -#line 1971 "cs-parser.jay" +#line 1972 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5261,7 +5262,7 @@ void case_210() } void case_226() -#line 2031 "cs-parser.jay" +#line 2032 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5291,14 +5292,14 @@ void case_226() } void case_230() -#line 2068 "cs-parser.jay" +#line 2069 "cs-parser.jay" { 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_232() -#line 2080 "cs-parser.jay" +#line 2081 "cs-parser.jay" { valid_param_mod = 0; @@ -5340,7 +5341,7 @@ void case_232() } void case_257() -#line 2156 "cs-parser.jay" +#line 2157 "cs-parser.jay" { valid_param_mod = 0; @@ -5357,7 +5358,7 @@ void case_257() } void case_259() -#line 2175 "cs-parser.jay" +#line 2176 "cs-parser.jay" { valid_param_mod = 0; @@ -5374,7 +5375,7 @@ void case_259() } void case_260() -#line 2190 "cs-parser.jay" +#line 2191 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5382,7 +5383,7 @@ void case_260() } void case_261() -#line 2196 "cs-parser.jay" +#line 2197 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5390,7 +5391,7 @@ void case_261() } void case_262() -#line 2206 "cs-parser.jay" +#line 2207 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5406,7 +5407,7 @@ void case_262() } void case_263() -#line 2225 "cs-parser.jay" +#line 2226 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5417,7 +5418,7 @@ void case_263() } void case_264() -#line 2234 "cs-parser.jay" +#line 2235 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5430,7 +5431,7 @@ void case_264() } void case_265() -#line 2245 "cs-parser.jay" +#line 2246 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5460,7 +5461,7 @@ void case_265() } void case_271() -#line 2290 "cs-parser.jay" +#line 2291 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5468,7 +5469,7 @@ void case_271() } void case_273() -#line 2300 "cs-parser.jay" +#line 2301 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5476,14 +5477,14 @@ void case_273() } void case_274() -#line 2306 "cs-parser.jay" +#line 2307 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2314 "cs-parser.jay" +#line 2315 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5494,7 +5495,7 @@ void case_275() } void case_276() -#line 2323 "cs-parser.jay" +#line 2324 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5516,7 +5517,7 @@ void case_276() } void case_277() -#line 2348 "cs-parser.jay" +#line 2349 "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); @@ -5530,7 +5531,7 @@ void case_277() } void case_278() -#line 2362 "cs-parser.jay" +#line 2363 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5542,7 +5543,7 @@ void case_278() } void case_279() -#line 2375 "cs-parser.jay" +#line 2376 "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); @@ -5552,7 +5553,7 @@ void case_279() } void case_280() -#line 2383 "cs-parser.jay" +#line 2384 "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"); @@ -5561,7 +5562,7 @@ void case_280() } void case_281() -#line 2390 "cs-parser.jay" +#line 2391 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5574,14 +5575,14 @@ void case_281() } void case_284() -#line 2409 "cs-parser.jay" +#line 2410 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2433 "cs-parser.jay" +#line 2434 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5589,7 +5590,7 @@ void case_289() } void case_291() -#line 2443 "cs-parser.jay" +#line 2444 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5598,7 +5599,7 @@ void case_291() } void case_292() -#line 2452 "cs-parser.jay" +#line 2453 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5612,28 +5613,28 @@ void case_292() } void case_296() -#line 2473 "cs-parser.jay" +#line 2474 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2478 "cs-parser.jay" +#line 2479 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2483 "cs-parser.jay" +#line 2484 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2491 "cs-parser.jay" +#line 2492 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5647,7 +5648,7 @@ void case_299() } void case_300() -#line 2503 "cs-parser.jay" +#line 2504 "cs-parser.jay" { lexer.EventParsing = true; @@ -5662,7 +5663,7 @@ void case_300() } void case_301() -#line 2519 "cs-parser.jay" +#line 2520 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5676,7 +5677,7 @@ void case_301() } void case_302() -#line 2531 "cs-parser.jay" +#line 2532 "cs-parser.jay" { lexer.EventParsing = true; @@ -5691,21 +5692,21 @@ void case_302() } void case_303() -#line 2547 "cs-parser.jay" +#line 2548 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_306() -#line 2563 "cs-parser.jay" +#line 2564 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_307() -#line 2568 "cs-parser.jay" +#line 2569 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5720,7 +5721,7 @@ void case_307() } void case_308() -#line 2581 "cs-parser.jay" +#line 2582 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5728,7 +5729,7 @@ void case_308() } void case_309() -#line 2587 "cs-parser.jay" +#line 2588 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5744,7 +5745,7 @@ void case_309() } void case_311() -#line 2605 "cs-parser.jay" +#line 2606 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5757,21 +5758,21 @@ void case_311() } void case_312() -#line 2616 "cs-parser.jay" +#line 2617 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_317() -#line 2634 "cs-parser.jay" +#line 2635 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_318() -#line 2642 "cs-parser.jay" +#line 2643 "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]); @@ -5786,7 +5787,7 @@ void case_318() } void case_319() -#line 2655 "cs-parser.jay" +#line 2656 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5796,7 +5797,7 @@ void case_319() } void case_320() -#line 2663 "cs-parser.jay" +#line 2664 "cs-parser.jay" { --lexer.parsing_block; @@ -5812,7 +5813,7 @@ void case_320() } void case_322() -#line 2688 "cs-parser.jay" +#line 2689 "cs-parser.jay" { valid_param_mod = 0; @@ -5832,7 +5833,7 @@ void case_322() } void case_324() -#line 2710 "cs-parser.jay" +#line 2711 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5848,7 +5849,7 @@ void case_324() } void case_326() -#line 2728 "cs-parser.jay" +#line 2729 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5857,7 +5858,7 @@ void case_326() } void case_328() -#line 2739 "cs-parser.jay" +#line 2740 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5866,7 +5867,7 @@ void case_328() } void case_330() -#line 2750 "cs-parser.jay" +#line 2751 "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) { @@ -5875,14 +5876,14 @@ void case_330() } void case_331() -#line 2760 "cs-parser.jay" +#line 2761 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_333() -#line 2772 "cs-parser.jay" +#line 2773 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5895,14 +5896,14 @@ void case_333() } void case_334() -#line 2783 "cs-parser.jay" +#line 2784 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_335() -#line 2791 "cs-parser.jay" +#line 2792 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5911,7 +5912,7 @@ void case_335() } void case_336() -#line 2798 "cs-parser.jay" +#line 2799 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5920,7 +5921,7 @@ void case_336() } void case_338() -#line 2815 "cs-parser.jay" +#line 2816 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5928,7 +5929,7 @@ void case_338() } void case_339() -#line 2824 "cs-parser.jay" +#line 2825 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5937,7 +5938,7 @@ void case_339() } void case_341() -#line 2835 "cs-parser.jay" +#line 2836 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5945,21 +5946,21 @@ void case_341() } void case_342() -#line 2844 "cs-parser.jay" +#line 2845 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_343() -#line 2849 "cs-parser.jay" +#line 2850 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_344() -#line 2857 "cs-parser.jay" +#line 2858 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5967,7 +5968,7 @@ void case_344() } void case_345() -#line 2863 "cs-parser.jay" +#line 2864 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5977,7 +5978,7 @@ void case_345() } void case_346() -#line 2871 "cs-parser.jay" +#line 2872 "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); @@ -5985,7 +5986,7 @@ void case_346() } void case_348() -#line 2881 "cs-parser.jay" +#line 2882 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5995,7 +5996,7 @@ void case_348() } void case_349() -#line 2892 "cs-parser.jay" +#line 2893 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6003,7 +6004,7 @@ void case_349() } void case_350() -#line 2898 "cs-parser.jay" +#line 2899 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6012,7 +6013,7 @@ void case_350() } void case_351() -#line 2908 "cs-parser.jay" +#line 2909 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6022,7 +6023,7 @@ void case_351() } void case_352() -#line 2916 "cs-parser.jay" +#line 2917 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6033,28 +6034,28 @@ void case_352() } void case_357() -#line 2950 "cs-parser.jay" +#line 2951 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_359() -#line 2959 "cs-parser.jay" +#line 2960 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_361() -#line 2968 "cs-parser.jay" +#line 2969 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_364() -#line 2984 "cs-parser.jay" +#line 2985 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6069,14 +6070,14 @@ void case_364() } void case_366() -#line 3001 "cs-parser.jay" +#line 3002 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_369() -#line 3017 "cs-parser.jay" +#line 3018 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6084,7 +6085,7 @@ void case_369() } void case_370() -#line 3023 "cs-parser.jay" +#line 3024 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6093,7 +6094,7 @@ void case_370() } void case_371() -#line 3033 "cs-parser.jay" +#line 3034 "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 ()); @@ -6102,35 +6103,35 @@ void case_371() } void case_372() -#line 3040 "cs-parser.jay" +#line 3041 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_409() -#line 3102 "cs-parser.jay" +#line 3103 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_410() -#line 3106 "cs-parser.jay" +#line 3107 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_421() -#line 3147 "cs-parser.jay" +#line 3148 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_423() -#line 3159 "cs-parser.jay" +#line 3160 "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) { @@ -6139,7 +6140,7 @@ void case_423() } void case_424() -#line 3166 "cs-parser.jay" +#line 3167 "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) { @@ -6148,7 +6149,7 @@ void case_424() } void case_425() -#line 3173 "cs-parser.jay" +#line 3174 "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) { @@ -6157,7 +6158,7 @@ void case_425() } void case_426() -#line 3180 "cs-parser.jay" +#line 3181 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6167,28 +6168,28 @@ void case_426() } void case_428() -#line 3190 "cs-parser.jay" +#line 3191 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3198 "cs-parser.jay" +#line 3199 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_431() -#line 3206 "cs-parser.jay" +#line 3207 "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_434() -#line 3219 "cs-parser.jay" +#line 3220 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6200,14 +6201,14 @@ void case_434() } void case_435() -#line 3229 "cs-parser.jay" +#line 3230 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_438() -#line 3245 "cs-parser.jay" +#line 3246 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6215,7 +6216,7 @@ void case_438() } void case_439() -#line 3251 "cs-parser.jay" +#line 3252 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6224,14 +6225,14 @@ void case_439() } void case_440() -#line 3257 "cs-parser.jay" +#line 3258 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_441() -#line 3265 "cs-parser.jay" +#line 3266 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6239,7 +6240,7 @@ void case_441() } void case_443() -#line 3274 "cs-parser.jay" +#line 3275 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6249,7 +6250,7 @@ void case_443() } void case_444() -#line 3282 "cs-parser.jay" +#line 3283 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6258,14 +6259,14 @@ void case_444() } void case_445() -#line 3289 "cs-parser.jay" +#line 3290 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_450() -#line 3307 "cs-parser.jay" +#line 3308 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6273,7 +6274,7 @@ void case_450() } void case_451() -#line 3313 "cs-parser.jay" +#line 3314 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6285,7 +6286,7 @@ void case_451() } void case_452() -#line 3323 "cs-parser.jay" +#line 3324 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6302,56 +6303,56 @@ void case_452() } void case_453() -#line 3338 "cs-parser.jay" +#line 3339 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_454() -#line 3343 "cs-parser.jay" +#line 3344 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_459() -#line 3364 "cs-parser.jay" +#line 3365 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3369 "cs-parser.jay" +#line 3370 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_461() -#line 3374 "cs-parser.jay" +#line 3375 "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_462() -#line 3379 "cs-parser.jay" +#line 3380 "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_464() -#line 3391 "cs-parser.jay" +#line 3392 "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_465() -#line 3399 "cs-parser.jay" +#line 3400 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6359,7 +6360,7 @@ void case_465() } void case_466() -#line 3405 "cs-parser.jay" +#line 3406 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6368,14 +6369,14 @@ void case_466() } void case_467() -#line 3411 "cs-parser.jay" +#line 3412 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3419 "cs-parser.jay" +#line 3420 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6383,7 +6384,7 @@ void case_468() } void case_469() -#line 3425 "cs-parser.jay" +#line 3426 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6395,21 +6396,21 @@ void case_469() } void case_473() -#line 3453 "cs-parser.jay" +#line 3454 "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_474() -#line 3458 "cs-parser.jay" +#line 3459 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_477() -#line 3480 "cs-parser.jay" +#line 3481 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6424,7 +6425,7 @@ void case_477() } void case_478() -#line 3493 "cs-parser.jay" +#line 3494 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6433,7 +6434,7 @@ void case_478() } void case_479() -#line 3505 "cs-parser.jay" +#line 3506 "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])) { @@ -6443,7 +6444,7 @@ void case_479() } void case_480() -#line 3513 "cs-parser.jay" +#line 3514 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6452,7 +6453,7 @@ void case_480() } void case_481() -#line 3520 "cs-parser.jay" +#line 3521 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6461,28 +6462,28 @@ void case_481() } void case_482() -#line 3527 "cs-parser.jay" +#line 3528 "cs-parser.jay" { 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_483() -#line 3532 "cs-parser.jay" +#line 3533 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_485() -#line 3543 "cs-parser.jay" +#line 3544 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_486() -#line 3551 "cs-parser.jay" +#line 3552 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6494,7 +6495,7 @@ void case_486() } void case_491() -#line 3574 "cs-parser.jay" +#line 3575 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6502,7 +6503,7 @@ void case_491() } void case_492() -#line 3580 "cs-parser.jay" +#line 3581 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6512,7 +6513,7 @@ void case_492() } void case_493() -#line 3591 "cs-parser.jay" +#line 3592 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6520,7 +6521,7 @@ void case_493() } void case_494() -#line 3597 "cs-parser.jay" +#line 3598 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6528,14 +6529,14 @@ void case_494() } void case_495() -#line 3603 "cs-parser.jay" +#line 3604 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_496() -#line 3608 "cs-parser.jay" +#line 3609 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6543,28 +6544,28 @@ void case_496() } void case_500() -#line 3623 "cs-parser.jay" +#line 3624 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_501() -#line 3631 "cs-parser.jay" +#line 3632 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_502() -#line 3636 "cs-parser.jay" +#line 3637 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_507() -#line 3666 "cs-parser.jay" +#line 3667 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6573,7 +6574,7 @@ void case_507() } void case_508() -#line 3673 "cs-parser.jay" +#line 3674 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6586,7 +6587,7 @@ void case_508() } void case_509() -#line 3687 "cs-parser.jay" +#line 3688 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6594,7 +6595,7 @@ void case_509() } void case_510() -#line 3693 "cs-parser.jay" +#line 3694 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6603,7 +6604,7 @@ void case_510() } void case_512() -#line 3707 "cs-parser.jay" +#line 3708 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6611,14 +6612,14 @@ void case_512() } void case_515() -#line 3718 "cs-parser.jay" +#line 3719 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_516() -#line 3726 "cs-parser.jay" +#line 3727 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6626,7 +6627,7 @@ void case_516() } void case_517() -#line 3732 "cs-parser.jay" +#line 3733 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6636,7 +6637,7 @@ void case_517() } void case_518() -#line 3740 "cs-parser.jay" +#line 3741 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6646,7 +6647,7 @@ void case_518() } void case_519() -#line 3748 "cs-parser.jay" +#line 3749 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6656,7 +6657,7 @@ void case_519() } void case_520() -#line 3756 "cs-parser.jay" +#line 3757 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6669,7 +6670,7 @@ void case_520() } void case_521() -#line 3770 "cs-parser.jay" +#line 3771 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6678,7 +6679,7 @@ void case_521() } void case_522() -#line 3780 "cs-parser.jay" +#line 3781 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6688,35 +6689,35 @@ void case_522() } void case_523() -#line 3791 "cs-parser.jay" +#line 3792 "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_524() -#line 3799 "cs-parser.jay" +#line 3800 "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_525() -#line 3807 "cs-parser.jay" +#line 3808 "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_526() -#line 3815 "cs-parser.jay" +#line 3816 "cs-parser.jay" { 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_528() -#line 3827 "cs-parser.jay" +#line 3828 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6727,7 +6728,7 @@ void case_528() } void case_534() -#line 3859 "cs-parser.jay" +#line 3860 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6736,7 +6737,7 @@ void case_534() } void case_535() -#line 3869 "cs-parser.jay" +#line 3870 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6746,147 +6747,147 @@ void case_535() } void case_541() -#line 3894 "cs-parser.jay" +#line 3895 "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_542() -#line 3902 "cs-parser.jay" +#line 3903 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3943 "cs-parser.jay" +#line 3944 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3948 "cs-parser.jay" +#line 3949 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_553() -#line 3953 "cs-parser.jay" +#line 3954 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_555() -#line 3962 "cs-parser.jay" +#line 3963 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_557() -#line 3971 "cs-parser.jay" +#line 3972 "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_561() -#line 3988 "cs-parser.jay" +#line 3989 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_562() -#line 3993 "cs-parser.jay" +#line 3994 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 4002 "cs-parser.jay" +#line 4003 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 4007 "cs-parser.jay" +#line 4008 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 4012 "cs-parser.jay" +#line 4013 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 4017 "cs-parser.jay" +#line 4018 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4026 "cs-parser.jay" +#line 4027 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_570() -#line 4031 "cs-parser.jay" +#line 4032 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_572() -#line 4040 "cs-parser.jay" +#line 4041 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_574() -#line 4049 "cs-parser.jay" +#line 4050 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 4058 "cs-parser.jay" +#line 4059 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 4067 "cs-parser.jay" +#line 4068 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4076 "cs-parser.jay" +#line 4077 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_582() -#line 4085 "cs-parser.jay" +#line 4086 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6895,84 +6896,84 @@ void case_582() } void case_584() -#line 4096 "cs-parser.jay" +#line 4097 "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_586() -#line 4108 "cs-parser.jay" +#line 4109 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4113 "cs-parser.jay" +#line 4114 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4118 "cs-parser.jay" +#line 4119 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4123 "cs-parser.jay" +#line 4124 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4128 "cs-parser.jay" +#line 4129 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4133 "cs-parser.jay" +#line 4134 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4138 "cs-parser.jay" +#line 4139 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4143 "cs-parser.jay" +#line 4144 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4148 "cs-parser.jay" +#line 4149 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4153 "cs-parser.jay" +#line 4154 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4161 "cs-parser.jay" +#line 4162 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6981,7 +6982,7 @@ void case_596() } void case_597() -#line 4168 "cs-parser.jay" +#line 4169 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6996,7 +6997,7 @@ void case_597() } void case_598() -#line 4184 "cs-parser.jay" +#line 4185 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7004,7 +7005,7 @@ void case_598() } void case_599() -#line 4190 "cs-parser.jay" +#line 4191 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7012,21 +7013,21 @@ void case_599() } void case_600() -#line 4196 "cs-parser.jay" +#line 4197 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_602() -#line 4204 "cs-parser.jay" +#line 4205 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_606() -#line 4220 "cs-parser.jay" +#line 4221 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7035,14 +7036,14 @@ void case_606() } void case_608() -#line 4231 "cs-parser.jay" +#line 4232 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_609() -#line 4239 "cs-parser.jay" +#line 4240 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7050,14 +7051,14 @@ void case_609() } void case_610() -#line 4245 "cs-parser.jay" +#line 4246 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_611() -#line 4250 "cs-parser.jay" +#line 4251 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7065,63 +7066,63 @@ void case_611() } void case_612() -#line 4256 "cs-parser.jay" +#line 4257 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_614() -#line 4265 "cs-parser.jay" +#line 4266 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_615() -#line 4270 "cs-parser.jay" +#line 4271 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_617() -#line 4279 "cs-parser.jay" +#line 4280 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_618() -#line 4284 "cs-parser.jay" +#line 4285 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4307 "cs-parser.jay" +#line 4308 "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_626() -#line 4312 "cs-parser.jay" +#line 4313 "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_627() -#line 4317 "cs-parser.jay" +#line 4318 "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_631() -#line 4346 "cs-parser.jay" +#line 4347 "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]); @@ -7134,7 +7135,7 @@ void case_631() } void case_632() -#line 4358 "cs-parser.jay" +#line 4359 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7149,7 +7150,7 @@ void case_632() } void case_633() -#line 4371 "cs-parser.jay" +#line 4372 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7157,7 +7158,7 @@ void case_633() } void case_634() -#line 4377 "cs-parser.jay" +#line 4378 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7166,7 +7167,7 @@ void case_634() } void case_637() -#line 4394 "cs-parser.jay" +#line 4395 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7174,7 +7175,7 @@ void case_637() } void case_640() -#line 4408 "cs-parser.jay" +#line 4409 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7192,7 +7193,7 @@ void case_640() } void case_641() -#line 4427 "cs-parser.jay" +#line 4428 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7202,91 +7203,91 @@ void case_641() } void case_642() -#line 4435 "cs-parser.jay" +#line 4436 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4440 "cs-parser.jay" +#line 4441 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4445 "cs-parser.jay" +#line 4446 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4450 "cs-parser.jay" +#line 4451 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4455 "cs-parser.jay" +#line 4456 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4460 "cs-parser.jay" +#line 4461 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4465 "cs-parser.jay" +#line 4466 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4470 "cs-parser.jay" +#line 4471 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4475 "cs-parser.jay" +#line 4476 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4480 "cs-parser.jay" +#line 4481 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4485 "cs-parser.jay" +#line 4486 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4490 "cs-parser.jay" +#line 4491 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_654() -#line 4495 "cs-parser.jay" +#line 4496 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7295,28 +7296,28 @@ void case_654() } void case_655() -#line 4502 "cs-parser.jay" +#line 4503 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4511 "cs-parser.jay" +#line 4512 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_660() -#line 4524 "cs-parser.jay" +#line 4525 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_661() -#line 4532 "cs-parser.jay" +#line 4533 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7324,7 +7325,7 @@ void case_661() } void case_662() -#line 4538 "cs-parser.jay" +#line 4539 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7342,7 +7343,7 @@ void case_662() } void case_663() -#line 4557 "cs-parser.jay" +#line 4558 "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])); @@ -7350,7 +7351,7 @@ void case_663() } void case_664() -#line 4566 "cs-parser.jay" +#line 4567 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7358,7 +7359,7 @@ void case_664() } void case_665() -#line 4572 "cs-parser.jay" +#line 4573 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7383,7 +7384,7 @@ void case_665() } void case_666() -#line 4598 "cs-parser.jay" +#line 4599 "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 ()); @@ -7392,14 +7393,14 @@ void case_666() } void case_667() -#line 4605 "cs-parser.jay" +#line 4606 "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_671() -#line 4625 "cs-parser.jay" +#line 4626 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7408,91 +7409,91 @@ void case_671() } void case_672() -#line 4635 "cs-parser.jay" +#line 4636 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4640 "cs-parser.jay" +#line 4641 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_674() -#line 4661 "cs-parser.jay" +#line 4662 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4673 "cs-parser.jay" +#line 4674 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_677() -#line 4678 "cs-parser.jay" +#line 4679 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_678() -#line 4687 "cs-parser.jay" +#line 4688 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_679() -#line 4692 "cs-parser.jay" +#line 4693 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_687() -#line 4719 "cs-parser.jay" +#line 4720 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_720() -#line 4783 "cs-parser.jay" +#line 4784 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4788 "cs-parser.jay" +#line 4789 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_722() -#line 4793 "cs-parser.jay" +#line 4794 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_723() -#line 4801 "cs-parser.jay" +#line 4802 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_724() -#line 4809 "cs-parser.jay" +#line 4810 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7502,7 +7503,7 @@ void case_724() } void case_727() -#line 4822 "cs-parser.jay" +#line 4823 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7511,7 +7512,7 @@ void case_727() } void case_728() -#line 4838 "cs-parser.jay" +#line 4839 "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*/ @@ -7543,7 +7544,7 @@ void case_728() } void case_729() -#line 4868 "cs-parser.jay" +#line 4869 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7556,7 +7557,7 @@ void case_729() } void case_730() -#line 4879 "cs-parser.jay" +#line 4880 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7565,21 +7566,21 @@ void case_730() } void case_733() -#line 4894 "cs-parser.jay" +#line 4895 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_735() -#line 4903 "cs-parser.jay" +#line 4904 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_737() -#line 4918 "cs-parser.jay" +#line 4919 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7588,7 +7589,7 @@ void case_737() } void case_738() -#line 4925 "cs-parser.jay" +#line 4926 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7596,7 +7597,7 @@ void case_738() } void case_739() -#line 4931 "cs-parser.jay" +#line 4932 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7605,7 +7606,7 @@ void case_739() } void case_740() -#line 4938 "cs-parser.jay" +#line 4939 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7617,14 +7618,14 @@ void case_740() } void case_742() -#line 4952 "cs-parser.jay" +#line 4953 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_743() -#line 4957 "cs-parser.jay" +#line 4958 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7635,7 +7636,7 @@ void case_743() } void case_747() -#line 4975 "cs-parser.jay" +#line 4976 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7644,7 +7645,7 @@ void case_747() } void case_750() -#line 4990 "cs-parser.jay" +#line 4991 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7655,7 +7656,7 @@ void case_750() } void case_751() -#line 4999 "cs-parser.jay" +#line 5000 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7666,14 +7667,14 @@ void case_751() } void case_753() -#line 5015 "cs-parser.jay" +#line 5016 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_758() -#line 5033 "cs-parser.jay" +#line 5034 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7684,28 +7685,28 @@ void case_758() } void case_760() -#line 5046 "cs-parser.jay" +#line 5047 "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_761() -#line 5051 "cs-parser.jay" +#line 5052 "cs-parser.jay" { 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_762() -#line 5059 "cs-parser.jay" +#line 5060 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_766() -#line 5077 "cs-parser.jay" +#line 5078 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7717,7 +7718,7 @@ void case_766() } void case_767() -#line 5090 "cs-parser.jay" +#line 5091 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7727,14 +7728,14 @@ void case_767() } void case_768() -#line 5098 "cs-parser.jay" +#line 5099 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_771() -#line 5112 "cs-parser.jay" +#line 5113 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7744,7 +7745,7 @@ void case_771() } void case_772() -#line 5121 "cs-parser.jay" +#line 5122 "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])); @@ -7756,7 +7757,7 @@ void case_772() } void case_774() -#line 5138 "cs-parser.jay" +#line 5139 "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])); @@ -7764,14 +7765,14 @@ void case_774() } void case_775() -#line 5147 "cs-parser.jay" +#line 5148 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_777() -#line 5156 "cs-parser.jay" +#line 5157 "cs-parser.jay" { var sections = new List (4); @@ -7780,7 +7781,7 @@ void case_777() } void case_778() -#line 5163 "cs-parser.jay" +#line 5164 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7789,14 +7790,14 @@ void case_778() } void case_779() -#line 5170 "cs-parser.jay" +#line 5171 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_782() -#line 5189 "cs-parser.jay" +#line 5190 "cs-parser.jay" { var labels = new List (2); @@ -7805,7 +7806,7 @@ void case_782() } void case_783() -#line 5196 "cs-parser.jay" +#line 5197 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7814,14 +7815,14 @@ void case_783() } void case_784() -#line 5206 "cs-parser.jay" +#line 5207 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_790() -#line 5225 "cs-parser.jay" +#line 5226 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7831,21 +7832,21 @@ void case_790() } void case_791() -#line 5237 "cs-parser.jay" +#line 5238 "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_792() -#line 5245 "cs-parser.jay" +#line 5246 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_794() -#line 5261 "cs-parser.jay" +#line 5262 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7859,14 +7860,14 @@ void case_794() } void case_795() -#line 5273 "cs-parser.jay" +#line 5274 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_798() -#line 5286 "cs-parser.jay" +#line 5287 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7875,14 +7876,14 @@ void case_798() } void case_799() -#line 5293 "cs-parser.jay" +#line 5294 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_807() -#line 5317 "cs-parser.jay" +#line 5318 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7897,14 +7898,14 @@ void case_807() } void case_808() -#line 5333 "cs-parser.jay" +#line 5334 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_809() -#line 5338 "cs-parser.jay" +#line 5339 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7915,7 +7916,7 @@ void case_809() } void case_810() -#line 5347 "cs-parser.jay" +#line 5348 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7928,21 +7929,21 @@ void case_810() } void case_817() -#line 5370 "cs-parser.jay" +#line 5371 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5378 "cs-parser.jay" +#line 5379 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_819() -#line 5386 "cs-parser.jay" +#line 5387 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7950,35 +7951,35 @@ void case_819() } void case_820() -#line 5392 "cs-parser.jay" +#line 5393 "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_821() -#line 5397 "cs-parser.jay" +#line 5398 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5405 "cs-parser.jay" +#line 5406 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5413 "cs-parser.jay" +#line 5414 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_824() -#line 5421 "cs-parser.jay" +#line 5422 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7996,7 +7997,7 @@ void case_824() } void case_825() -#line 5437 "cs-parser.jay" +#line 5438 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -8012,28 +8013,28 @@ void case_825() } void case_829() -#line 5463 "cs-parser.jay" +#line 5464 "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_830() -#line 5468 "cs-parser.jay" +#line 5469 "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_831() -#line 5473 "cs-parser.jay" +#line 5474 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_832() -#line 5481 "cs-parser.jay" +#line 5482 "cs-parser.jay" { var l = new List (2); @@ -8042,7 +8043,7 @@ void case_832() } void case_833() -#line 5488 "cs-parser.jay" +#line 5489 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8060,7 +8061,7 @@ void case_833() } void case_837() -#line 5516 "cs-parser.jay" +#line 5517 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8077,7 +8078,7 @@ void case_837() } void case_839() -#line 5535 "cs-parser.jay" +#line 5536 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8090,14 +8091,14 @@ void case_839() } void case_842() -#line 5563 "cs-parser.jay" +#line 5564 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_844() -#line 5573 "cs-parser.jay" +#line 5574 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8107,7 +8108,7 @@ void case_844() } void case_845() -#line 5584 "cs-parser.jay" +#line 5585 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8119,14 +8120,14 @@ void case_845() } void case_846() -#line 5594 "cs-parser.jay" +#line 5595 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_847() -#line 5599 "cs-parser.jay" +#line 5600 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8138,7 +8139,7 @@ void case_847() } void case_848() -#line 5612 "cs-parser.jay" +#line 5613 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8150,14 +8151,14 @@ void case_848() } void case_849() -#line 5622 "cs-parser.jay" +#line 5623 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_850() -#line 5627 "cs-parser.jay" +#line 5628 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8169,7 +8170,7 @@ void case_850() } void case_851() -#line 5637 "cs-parser.jay" +#line 5638 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8180,7 +8181,7 @@ void case_851() } void case_853() -#line 5653 "cs-parser.jay" +#line 5654 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8188,7 +8189,7 @@ void case_853() } void case_854() -#line 5665 "cs-parser.jay" +#line 5666 "cs-parser.jay" { lexer.query_parsing = false; @@ -8202,7 +8203,7 @@ void case_854() } void case_855() -#line 5677 "cs-parser.jay" +#line 5678 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8214,7 +8215,7 @@ void case_855() } void case_856() -#line 5688 "cs-parser.jay" +#line 5689 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8224,7 +8225,7 @@ void case_856() } void case_857() -#line 5695 "cs-parser.jay" +#line 5696 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8232,7 +8233,7 @@ void case_857() } void case_858() -#line 5704 "cs-parser.jay" +#line 5705 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8242,7 +8243,7 @@ void case_858() } void case_859() -#line 5712 "cs-parser.jay" +#line 5713 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8256,7 +8257,7 @@ void case_859() } void case_860() -#line 5727 "cs-parser.jay" +#line 5728 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8266,7 +8267,7 @@ void case_860() } void case_861() -#line 5735 "cs-parser.jay" +#line 5736 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8280,7 +8281,7 @@ void case_861() } void case_863() -#line 5754 "cs-parser.jay" +#line 5755 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8293,7 +8294,7 @@ void case_863() } void case_865() -#line 5769 "cs-parser.jay" +#line 5770 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8309,7 +8310,7 @@ void case_865() } void case_866() -#line 5786 "cs-parser.jay" +#line 5787 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8326,14 +8327,14 @@ void case_866() } void case_868() -#line 5802 "cs-parser.jay" +#line 5803 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_870() -#line 5814 "cs-parser.jay" +#line 5815 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8342,7 +8343,7 @@ void case_870() } void case_871() -#line 5821 "cs-parser.jay" +#line 5822 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8352,7 +8353,7 @@ void case_871() } void case_872() -#line 5829 "cs-parser.jay" +#line 5830 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8361,7 +8362,7 @@ void case_872() } void case_873() -#line 5836 "cs-parser.jay" +#line 5837 "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])); @@ -8371,14 +8372,14 @@ void case_873() } void case_877() -#line 5853 "cs-parser.jay" +#line 5854 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_884() -#line 5873 "cs-parser.jay" +#line 5874 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8392,7 +8393,7 @@ void case_884() } void case_886() -#line 5892 "cs-parser.jay" +#line 5893 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8401,7 +8402,7 @@ void case_886() } void case_887() -#line 5902 "cs-parser.jay" +#line 5903 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8411,7 +8412,7 @@ void case_887() } void case_888() -#line 5910 "cs-parser.jay" +#line 5911 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8421,7 +8422,7 @@ void case_888() } void case_889() -#line 5918 "cs-parser.jay" +#line 5919 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8431,7 +8432,7 @@ void case_889() } void case_890() -#line 5926 "cs-parser.jay" +#line 5927 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8471,7 +8472,7 @@ void case_890() } void case_891() -#line 5964 "cs-parser.jay" +#line 5965 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8481,7 +8482,7 @@ void case_891() } void case_892() -#line 5972 "cs-parser.jay" +#line 5973 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8491,7 +8492,7 @@ void case_892() } void case_893() -#line 5980 "cs-parser.jay" +#line 5981 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8501,7 +8502,7 @@ void case_893() } void case_894() -#line 5988 "cs-parser.jay" +#line 5989 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8543,7 +8544,7 @@ void case_894() } void case_898() -#line 6043 "cs-parser.jay" +#line 6044 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8552,7 +8553,7 @@ void case_898() } void case_900() -#line 6054 "cs-parser.jay" +#line 6055 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8561,14 +8562,14 @@ void case_900() } void case_901() -#line 6061 "cs-parser.jay" +#line 6062 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_903() -#line 6070 "cs-parser.jay" +#line 6071 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8577,42 +8578,42 @@ void case_903() } void case_904() -#line 6077 "cs-parser.jay" +#line 6078 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_906() -#line 6089 "cs-parser.jay" +#line 6090 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_907() -#line 6094 "cs-parser.jay" +#line 6095 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6106 "cs-parser.jay" +#line 6107 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_910() -#line 6111 "cs-parser.jay" +#line 6112 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_912() -#line 6121 "cs-parser.jay" +#line 6122 "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*/ @@ -8630,7 +8631,7 @@ void case_912() } void case_913() -#line 6137 "cs-parser.jay" +#line 6138 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8641,7 +8642,7 @@ void case_913() } void case_916() -#line 6164 "cs-parser.jay" +#line 6165 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8673,7 +8674,7 @@ void case_916() } void case_917() -#line 6194 "cs-parser.jay" +#line 6195 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8685,7 +8686,7 @@ void case_917() } void case_927() -#line 6237 "cs-parser.jay" +#line 6238 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8693,7 +8694,7 @@ void case_927() } void case_928() -#line 6243 "cs-parser.jay" +#line 6244 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8702,14 +8703,14 @@ void case_928() } void case_931() -#line 6258 "cs-parser.jay" +#line 6259 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_932() -#line 6263 "cs-parser.jay" +#line 6264 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8719,7 +8720,7 @@ void case_932() } void case_933() -#line 6271 "cs-parser.jay" +#line 6272 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8729,7 +8730,7 @@ void case_933() } void case_934() -#line 6279 "cs-parser.jay" +#line 6280 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8738,7 +8739,7 @@ void case_934() } void case_942() -#line 6317 "cs-parser.jay" +#line 6318 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8746,7 +8747,7 @@ void case_942() } void case_943() -#line 6323 "cs-parser.jay" +#line 6324 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8754,7 +8755,7 @@ void case_943() } void case_944() -#line 6332 "cs-parser.jay" +#line 6333 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12059,7 +12060,7 @@ void case_944() -1, -1, -1, 362, }; -#line 6341 "cs-parser.jay" +#line 6342 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 58a9ed9115..6139e7f761 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -891,6 +891,7 @@ named_argument var lt = (Tokenizer.LocatedToken) $1; $$ = new NamedArgument (lt.Value, lt.Location, (Expression) $4, arg_mod); + lbag.AddLocation ($$, GetLocation($2)); } ; From 7f141c0d8eef9620aee427d7a400b2d37554e14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:08:26 +0200 Subject: [PATCH 63/92] fixed goto location. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 0f82184a07..b872f4060f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1459,9 +1459,10 @@ namespace ICSharpCode.NRefactory.CSharp var result = new GotoStatement (); var location = LocationsBag.GetLocations (gotoStatement); result.AddChild (new CSharpTokenNode (Convert (gotoStatement.loc), "goto".Length), GotoStatement.Roles.Keyword); - result.AddChild (Identifier.Create (gotoStatement.Target, Convert (gotoStatement.loc)), GotoStatement.Roles.Identifier); + var loc = location != null ? Convert (location [0]) : TextLocation.Empty; + result.AddChild (Identifier.Create (gotoStatement.Target, loc), GotoStatement.Roles.Identifier); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), 1), GotoStatement.Roles.Semicolon); + result.AddChild (new CSharpTokenNode (Convert (location [1]), 1), GotoStatement.Roles.Semicolon); return result; } From 72b2ff1412817c85e72838bd9b3b82565fa78a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:14:47 +0200 Subject: [PATCH 64/92] Added labeled statement colon. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 3 +++ ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs | 2 +- ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index b872f4060f..3559155c48 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1471,6 +1471,9 @@ namespace ICSharpCode.NRefactory.CSharp { var result = new LabelStatement (); result.AddChild (Identifier.Create (labeledStatement.Name, Convert (labeledStatement.loc)), LabelStatement.Roles.Identifier); + var location = LocationsBag.GetLocations (labeledStatement); + if (location != null) + result.AddChild (new CSharpTokenNode (Convert (location [0]), 1), LabelStatement.Roles.Colon); return result; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 47b7a2226e..ba66356be7 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -7497,7 +7497,7 @@ void case_724() { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); - + lbag.AddLocation (labeled, GetLocation (yyVals[0+yyTop])); current_block.AddLabel (labeled); current_block.AddStatement (labeled); } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 6139e7f761..afc7244f7c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -4810,7 +4810,7 @@ labeled_statement { var lt = (Tokenizer.LocatedToken) $1; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); - + lbag.AddLocation (labeled, GetLocation ($2)); current_block.AddLabel (labeled); current_block.AddStatement (labeled); } From c133a2a0a130775187a2f3b164d3d618fd12ff66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:27:01 +0200 Subject: [PATCH 65/92] Handled #if values. --- .../Parser/CSharpParser.cs | 19 +++++++++++++------ .../Parser/mcs/cs-tokenizer.cs | 1 + .../Parser/mcs/location.cs | 13 ++++++++++++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 3559155c48..2c85916a4d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -3201,9 +3201,10 @@ namespace ICSharpCode.NRefactory.CSharp static void InsertComments (CompilerCompilationUnit top, ConversionVisitor conversionVisitor) { - var leaf = GetOuterLeft(conversionVisitor.Unit); + var leaf = GetOuterLeft (conversionVisitor.Unit); - foreach (var special in top.SpecialsBag.Specials) { + for (int i = 0; i < top.SpecialsBag.Specials.Count; i++) { + var special = top.SpecialsBag.Specials [i]; Comment newLeaf = null; var comment = special as SpecialsBag.Comment; @@ -3220,15 +3221,21 @@ namespace ICSharpCode.NRefactory.CSharp } else { // TODO: Proper handling of pre processor directives (atm got treated as comments Ast wise) var directive = special as SpecialsBag.PreProcessorDirective; - if (directive != null) + if (directive != null) { + //FixMe:Search correct #endif newLeaf = new Comment (CommentType.SingleLine, new TextLocation (directive.Line, directive.Col), new TextLocation (directive.EndLine, directive.EndCol + 1)); + if (!directive.Take && i + 1 < top.SpecialsBag.Specials.Count) { + var s = top.SpecialsBag.Specials [i + 1] as SpecialsBag.PreProcessorDirective; + newLeaf = new Comment (CommentType.SingleLine, new TextLocation (directive.Line, directive.Col), new TextLocation (s.Line, s.Col)); + } + } } if (newLeaf == null) continue; while (true) { - var nextLeaf = NextLeaf(leaf); + var nextLeaf = NextLeaf (leaf); // insert comment at begin if (newLeaf.StartLocation < leaf.StartLocation) { var node = leaf.Parent ?? conversionVisitor.Unit; @@ -3244,7 +3251,7 @@ namespace ICSharpCode.NRefactory.CSharp // insert comment at the end if (nextLeaf == null) { var node = leaf.Parent ?? conversionVisitor.Unit; - node.AddChild(newLeaf, AstNode.Roles.Comment); + node.AddChild (newLeaf, AstNode.Roles.Comment); leaf = newLeaf; break; } @@ -3252,7 +3259,7 @@ namespace ICSharpCode.NRefactory.CSharp // comment is between 2 nodes if (leaf.EndLocation <= newLeaf.StartLocation && newLeaf.StartLocation <= nextLeaf.StartLocation) { var node = leaf.Parent ?? conversionVisitor.Unit; - node.InsertChildAfter(leaf, newLeaf, AstNode.Roles.Comment); + node.InsertChildAfter (leaf, newLeaf, AstNode.Roles.Comment); leaf = newLeaf; break; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs index db2d176c5d..e87f7676a7 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-tokenizer.cs @@ -2578,6 +2578,7 @@ namespace Mono.CSharp ifstack.Push (flags | TAKING); return true; } + sbag.SkipIf (); ifstack.Push (flags); return false; diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs index 8cbe7bc750..04907b3464 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/location.cs @@ -516,7 +516,9 @@ if (checkpoints.Length <= CheckpointIndex) throw new Exception (String.Format (" public readonly Tokenizer.PreprocessorDirective Cmd; public readonly string Arg; - + + public bool Take = true; + public PreProcessorDirective (int line, int col, int endLine, int endCol, Tokenizer.PreprocessorDirective cmd, string arg) { this.Line = line; @@ -574,6 +576,15 @@ if (checkpoints.Length <= CheckpointIndex) throw new Exception (String.Format (" { Specials.Add (new PreProcessorDirective (startLine, startCol, endLine, endColumn, cmd, arg)); } + + public void SkipIf () + { + if (Specials.Count > 0) { + var directive = Specials[Specials.Count - 1] as PreProcessorDirective; + if (directive != null) + directive.Take = false; + } + } } // From f6de4e3c5de8cb167d20e7f5c941a663247ac5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:40:59 +0200 Subject: [PATCH 66/92] improved error msg. --- .../CSharp/Parser/ParseSelfTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs index c469a73b76..924a3ebba1 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs @@ -87,10 +87,13 @@ namespace ICSharpCode.NRefactory.CSharp.Parser Console.WriteLine ("----"); } - void CheckPositionConsistency(AstNode node) + void CheckPositionConsistency (AstNode node) { - string comment = "(" + node.GetType().Name + " at " + node.StartLocation + " in " + currentFileName + ")"; - Assert.IsTrue(node.StartLocation <= node.EndLocation, "StartLocation must be before EndLocation " + comment); + string comment = "(" + node.GetType ().Name + " at " + node.StartLocation + " in " + currentFileName + ")"; + var pred = node.StartLocation <= node.EndLocation; + if (!pred) + PrintNode (node); + Assert.IsTrue(pred, "StartLocation must be before EndLocation " + comment); var prevNodeEnd = node.StartLocation; var prevNode = node; for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) { From 9d55421ef3a10e1201b12e5a989833758fc8e065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:43:17 +0200 Subject: [PATCH 67/92] Fixed attribute argument commas. --- .../Parser/CSharpParser.cs | 17 +- .../Parser/mcs/cs-parser.cs | 1370 +++++++++-------- .../Parser/mcs/cs-parser.jay | 9 +- 3 files changed, 704 insertions(+), 692 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 2c85916a4d..e8a133d6c8 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -198,8 +198,9 @@ namespace ICSharpCode.NRefactory.CSharp result.Type = ConvertToType (attr.TypeNameExpression); var loc = LocationsBag.GetLocations (attr); result.HasArgumentList = loc != null; + int pos = 0; if (loc != null) - result.AddChild (new CSharpTokenNode (Convert (loc [0]), 1), AttributeSection.Roles.LPar); + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.LPar); if (attr.PosArguments != null) { foreach (var arg in attr.PosArguments) { @@ -210,12 +211,14 @@ namespace ICSharpCode.NRefactory.CSharp var argLoc = LocationsBag.GetLocations (na); if (argLoc != null) - newArg.AddChild (new CSharpTokenNode (Convert (argLoc[0]), 1), NamedArgumentExpression.Roles.Colon); + newArg.AddChild (new CSharpTokenNode (Convert (argLoc [0]), 1), NamedArgumentExpression.Roles.Colon); newArg.AddChild ((Expression)na.Expr.Accept (this), NamedExpression.Roles.Expression); result.AddChild (newArg, Attribute.Roles.Argument); - continue; + } else { + result.AddChild ((Expression)arg.Expr.Accept (this), Attribute.Roles.Argument); } - result.AddChild ((Expression)arg.Expr.Accept (this), Attribute.Roles.Argument); + if (loc != null && pos + 1 < loc.Count) + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.Comma); } } if (attr.NamedArguments != null) { @@ -228,10 +231,12 @@ namespace ICSharpCode.NRefactory.CSharp newArg.AddChild (new CSharpTokenNode (Convert (argLoc[0]), 1), NamedExpression.Roles.Assign); newArg.AddChild ((Expression)na.Expr.Accept (this), NamedExpression.Roles.Expression); result.AddChild (newArg, Attribute.Roles.Argument); + if (loc != null && pos + 1 < loc.Count) + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.Comma); } } - if (loc != null) - result.AddChild (new CSharpTokenNode (Convert (loc [1]), 1), AttributeSection.Roles.RPar); + if (loc != null && pos < loc.Count) + result.AddChild (new CSharpTokenNode (Convert (loc [pos++]), 1), AttributeSection.Roles.RPar); yield return result; } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index ba66356be7..f8035daa55 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -149,6 +149,7 @@ namespace Mono.CSharp Location savedAttrParenOpenLocation, savedAttrParenCloseLocation, savedOperatorLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); + List attributeArgumentCommas = new List (); List parameterListCommas = new List (); List enumCommas = new List (); @@ -1390,20 +1391,20 @@ namespace Mono.CSharp yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: -#line 399 "cs-parser.jay" +#line 400 "cs-parser.jay" { Lexer.check_incorrect_doc_comment (); } break; case 2: -#line 400 "cs-parser.jay" +#line 401 "cs-parser.jay" { Lexer.CompleteOnEOF = false; } break; case 6: case_6(); break; case 7: -#line 417 "cs-parser.jay" +#line 418 "cs-parser.jay" { module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace); } @@ -1415,7 +1416,7 @@ case 13: case_13(); break; case 14: -#line 455 "cs-parser.jay" +#line 456 "cs-parser.jay" { syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected"); /* TODO: better*/ } @@ -1460,7 +1461,7 @@ case 41: case_41(); break; case 42: -#line 644 "cs-parser.jay" +#line 645 "cs-parser.jay" { current_namespace.DeclarationFound = true; } @@ -1490,18 +1491,18 @@ case 57: case_57(); break; case 58: -#line 753 "cs-parser.jay" +#line 754 "cs-parser.jay" { yyVal = "event"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } break; case 59: -#line 754 "cs-parser.jay" +#line 755 "cs-parser.jay" { yyVal = "return"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); } break; case 60: case_60(); break; case 61: -#line 771 "cs-parser.jay" +#line 772 "cs-parser.jay" { yyVal = new List (4) { (Attribute) yyVals[0+yyTop] }; } @@ -1510,7 +1511,7 @@ case 62: case_62(); break; case 63: -#line 786 "cs-parser.jay" +#line 787 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1519,14 +1520,14 @@ case 64: case_64(); break; case 66: -#line 810 "cs-parser.jay" +#line 813 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 821 "cs-parser.jay" +#line 824 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1542,13 +1543,13 @@ case 72: case_72(); break; case 73: -#line 865 "cs-parser.jay" +#line 868 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 873 "cs-parser.jay" +#line 876 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1560,29 +1561,29 @@ case 77: case_77(); break; case 78: -#line 899 "cs-parser.jay" +#line 902 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 903 "cs-parser.jay" +#line 906 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 907 "cs-parser.jay" +#line 910 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; case 83: -#line 919 "cs-parser.jay" +#line 922 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 84: -#line 923 "cs-parser.jay" +#line 926 "cs-parser.jay" { lexer.parsing_modifiers = true; } @@ -1591,7 +1592,7 @@ case 95: case_95(); break; case 96: -#line 953 "cs-parser.jay" +#line 956 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1612,7 +1613,7 @@ case 101: case_101(); break; case 102: -#line 994 "cs-parser.jay" +#line 997 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1624,13 +1625,13 @@ case 104: case_104(); break; case 107: -#line 1035 "cs-parser.jay" +#line 1038 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 108: -#line 1039 "cs-parser.jay" +#line 1042 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1639,7 +1640,7 @@ case 109: case_109(); break; case 110: -#line 1055 "cs-parser.jay" +#line 1058 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1663,7 +1664,7 @@ case 118: case_118(); break; case 119: -#line 1134 "cs-parser.jay" +#line 1137 "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"); } @@ -1675,13 +1676,13 @@ case 122: case_122(); break; case 125: -#line 1164 "cs-parser.jay" +#line 1167 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: -#line 1168 "cs-parser.jay" +#line 1171 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1690,7 +1691,7 @@ case 127: case_127(); break; case 128: -#line 1181 "cs-parser.jay" +#line 1184 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1699,13 +1700,13 @@ case 129: case_129(); break; case 132: -#line 1200 "cs-parser.jay" +#line 1203 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 133: -#line 1204 "cs-parser.jay" +#line 1207 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1714,7 +1715,7 @@ case 134: case_134(); break; case 135: -#line 1220 "cs-parser.jay" +#line 1223 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1735,13 +1736,13 @@ case 142: case_142(); break; case 143: -#line 1291 "cs-parser.jay" +#line 1294 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 144: -#line 1295 "cs-parser.jay" +#line 1298 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1750,7 +1751,7 @@ case 145: case_145(); break; case 146: -#line 1335 "cs-parser.jay" +#line 1338 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1759,7 +1760,7 @@ case 147: case_147(); break; case 148: -#line 1345 "cs-parser.jay" +#line 1348 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1771,11 +1772,11 @@ case 150: case_150(); break; case 152: -#line 1419 "cs-parser.jay" +#line 1422 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 153: -#line 1423 "cs-parser.jay" +#line 1426 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: @@ -1800,13 +1801,13 @@ case 161: case_161(); break; case 162: -#line 1495 "cs-parser.jay" +#line 1498 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 163: -#line 1499 "cs-parser.jay" +#line 1502 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1830,7 +1831,7 @@ case 169: case_169(); break; case 170: -#line 1574 "cs-parser.jay" +#line 1577 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1839,11 +1840,11 @@ case 171: case_171(); break; case 172: -#line 1615 "cs-parser.jay" +#line 1618 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 174: -#line 1623 "cs-parser.jay" +#line 1626 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1876,7 +1877,7 @@ case 183: case_183(); break; case 184: -#line 1712 "cs-parser.jay" +#line 1715 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1897,7 +1898,7 @@ case 189: case_189(); break; case 190: -#line 1766 "cs-parser.jay" +#line 1769 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1906,7 +1907,7 @@ case 191: case_191(); break; case 192: -#line 1795 "cs-parser.jay" +#line 1798 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1936,7 +1937,7 @@ case 205: case_205(); break; case 206: -#line 1944 "cs-parser.jay" +#line 1947 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1954,55 +1955,55 @@ case 210: case_210(); break; case 211: -#line 1981 "cs-parser.jay" +#line 1984 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1993 "cs-parser.jay" +#line 1996 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 1997 "cs-parser.jay" +#line 2000 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 2004 "cs-parser.jay" +#line 2007 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 2008 "cs-parser.jay" +#line 2011 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2016 "cs-parser.jay" +#line 2019 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2020 "cs-parser.jay" +#line 2023 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2024 "cs-parser.jay" +#line 2027 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2030 "cs-parser.jay" +#line 2033 "cs-parser.jay" { } break; @@ -2010,14 +2011,14 @@ case 226: case_226(); break; case 228: -#line 2063 "cs-parser.jay" +#line 2066 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2079 "cs-parser.jay" +#line 2082 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2026,95 +2027,95 @@ case 232: case_232(); break; case 234: -#line 2125 "cs-parser.jay" +#line 2128 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2126 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2127 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2128 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2129 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2130 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2132 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2133 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2135 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2136 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2137 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2138 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2139 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2140 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2141 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2142 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2143 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2144 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2145 "cs-parser.jay" +#line 2148 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2146 "cs-parser.jay" +#line 2149 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2147 "cs-parser.jay" +#line 2150 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2148 "cs-parser.jay" +#line 2151 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2155 "cs-parser.jay" +#line 2158 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2123,7 +2124,7 @@ case 257: case_257(); break; case 258: -#line 2174 "cs-parser.jay" +#line 2177 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2150,11 +2151,11 @@ case 265: case_265(); break; case 267: -#line 2277 "cs-parser.jay" +#line 2280 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2289 "cs-parser.jay" +#line 2292 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2163,7 +2164,7 @@ case 271: case_271(); break; case 272: -#line 2299 "cs-parser.jay" +#line 2302 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2196,7 +2197,7 @@ case 281: case_281(); break; case 283: -#line 2408 "cs-parser.jay" +#line 2411 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2205,13 +2206,13 @@ case 284: case_284(); break; case 287: -#line 2425 "cs-parser.jay" +#line 2428 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2429 "cs-parser.jay" +#line 2432 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2220,7 +2221,7 @@ case 289: case_289(); break; case 290: -#line 2442 "cs-parser.jay" +#line 2445 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2232,7 +2233,7 @@ case 292: case_292(); break; case 293: -#line 2467 "cs-parser.jay" +#line 2470 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2262,7 +2263,7 @@ case 303: case_303(); break; case 305: -#line 2561 "cs-parser.jay" +#line 2564 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2286,7 +2287,7 @@ case 312: case_312(); break; case 315: -#line 2629 "cs-parser.jay" +#line 2632 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2304,7 +2305,7 @@ case 320: case_320(); break; case 321: -#line 2687 "cs-parser.jay" +#line 2690 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2313,7 +2314,7 @@ case 322: case_322(); break; case 323: -#line 2709 "cs-parser.jay" +#line 2712 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2346,7 +2347,7 @@ case 336: case_336(); break; case 337: -#line 2814 "cs-parser.jay" +#line 2817 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2391,13 +2392,13 @@ case 352: case_352(); break; case 354: -#line 2935 "cs-parser.jay" +#line 2938 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 355: -#line 2942 "cs-parser.jay" +#line 2945 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2412,7 +2413,7 @@ case 361: case_361(); break; case 363: -#line 2980 "cs-parser.jay" +#line 2983 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2421,7 +2422,7 @@ case 364: case_364(); break; case 365: -#line 3000 "cs-parser.jay" +#line 3003 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2430,13 +2431,13 @@ case 366: case_366(); break; case 367: -#line 3009 "cs-parser.jay" +#line 3012 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 368: -#line 3013 "cs-parser.jay" +#line 3016 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2454,63 +2455,63 @@ case 372: case_372(); break; case 373: -#line 3052 "cs-parser.jay" +#line 3055 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3053 "cs-parser.jay" +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3054 "cs-parser.jay" +#line 3057 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3055 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3056 "cs-parser.jay" +#line 3059 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 378: -#line 3057 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3062 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3063 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3064 "cs-parser.jay" +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3065 "cs-parser.jay" +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3066 "cs-parser.jay" +#line 3069 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3067 "cs-parser.jay" +#line 3070 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3068 "cs-parser.jay" +#line 3071 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3069 "cs-parser.jay" +#line 3072 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3070 "cs-parser.jay" +#line 3073 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 409: @@ -2520,22 +2521,22 @@ case 410: case_410(); break; case 414: -#line 3117 "cs-parser.jay" +#line 3120 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3121 "cs-parser.jay" +#line 3124 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 416: -#line 3122 "cs-parser.jay" +#line 3125 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 421: case_421(); break; case 422: -#line 3155 "cs-parser.jay" +#line 3158 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2553,7 +2554,7 @@ case 426: case_426(); break; case 427: -#line 3190 "cs-parser.jay" +#line 3193 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2562,7 +2563,7 @@ case 428: case_428(); break; case 429: -#line 3198 "cs-parser.jay" +#line 3201 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2574,7 +2575,7 @@ case 431: case_431(); break; case 432: -#line 3214 "cs-parser.jay" +#line 3217 "cs-parser.jay" { yyVal = null; } break; case 434: @@ -2584,11 +2585,11 @@ case 435: case_435(); break; case 436: -#line 3237 "cs-parser.jay" +#line 3240 "cs-parser.jay" { yyVal = null; } break; case 437: -#line 3241 "cs-parser.jay" +#line 3244 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2606,7 +2607,7 @@ case 441: case_441(); break; case 442: -#line 3274 "cs-parser.jay" +#line 3277 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2621,7 +2622,7 @@ case 445: case_445(); break; case 448: -#line 3302 "cs-parser.jay" +#line 3305 "cs-parser.jay" { yyVal = null; } break; case 450: @@ -2640,7 +2641,7 @@ case 454: case_454(); break; case 455: -#line 3354 "cs-parser.jay" +#line 3357 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2676,13 +2677,13 @@ case 469: case_469(); break; case 470: -#line 3441 "cs-parser.jay" +#line 3444 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 472: -#line 3449 "cs-parser.jay" +#line 3452 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2694,13 +2695,13 @@ case 474: case_474(); break; case 475: -#line 3469 "cs-parser.jay" +#line 3472 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 476: -#line 3476 "cs-parser.jay" +#line 3479 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2727,7 +2728,7 @@ case 483: case_483(); break; case 484: -#line 3542 "cs-parser.jay" +#line 3545 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2739,7 +2740,7 @@ case 486: case_486(); break; case 489: -#line 3569 "cs-parser.jay" +#line 3572 "cs-parser.jay" { yyVal = null; } break; case 491: @@ -2770,25 +2771,25 @@ case 502: case_502(); break; case 503: -#line 3647 "cs-parser.jay" +#line 3650 "cs-parser.jay" { yyVal = 2; } break; case 504: -#line 3651 "cs-parser.jay" +#line 3654 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 505: -#line 3658 "cs-parser.jay" +#line 3661 "cs-parser.jay" { yyVal = null; } break; case 506: -#line 3662 "cs-parser.jay" +#line 3665 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2806,7 +2807,7 @@ case 510: case_510(); break; case 511: -#line 3706 "cs-parser.jay" +#line 3709 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2851,7 +2852,7 @@ case 526: case_526(); break; case 527: -#line 3826 "cs-parser.jay" +#line 3829 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2860,25 +2861,25 @@ case 528: case_528(); break; case 529: -#line 3839 "cs-parser.jay" +#line 3842 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 530: -#line 3843 "cs-parser.jay" +#line 3846 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 531: -#line 3850 "cs-parser.jay" +#line 3853 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 533: -#line 3858 "cs-parser.jay" +#line 3861 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2890,13 +2891,13 @@ case 535: case_535(); break; case 537: -#line 3884 "cs-parser.jay" +#line 3887 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 538: -#line 3888 "cs-parser.jay" +#line 3891 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2908,37 +2909,37 @@ case 542: case_542(); break; case 544: -#line 3918 "cs-parser.jay" +#line 3921 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3922 "cs-parser.jay" +#line 3925 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3926 "cs-parser.jay" +#line 3929 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3930 "cs-parser.jay" +#line 3933 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3934 "cs-parser.jay" +#line 3937 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 549: -#line 3938 "cs-parser.jay" +#line 3941 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2956,7 +2957,7 @@ case 555: case_555(); break; case 556: -#line 3970 "cs-parser.jay" +#line 3973 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2965,13 +2966,13 @@ case 557: case_557(); break; case 558: -#line 3979 "cs-parser.jay" +#line 3982 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3983 "cs-parser.jay" +#line 3986 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3022,7 +3023,7 @@ case 584: case_584(); break; case 585: -#line 4107 "cs-parser.jay" +#line 4110 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3073,14 +3074,14 @@ case 600: case_600(); break; case 601: -#line 4204 "cs-parser.jay" +#line 4207 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 602: case_602(); break; case 605: -#line 4219 "cs-parser.jay" +#line 4222 "cs-parser.jay" { start_block (lexer.Location); } @@ -3104,7 +3105,7 @@ case 612: case_612(); break; case 613: -#line 4264 "cs-parser.jay" +#line 4267 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3116,7 +3117,7 @@ case 615: case_615(); break; case 616: -#line 4278 "cs-parser.jay" +#line 4281 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3128,7 +3129,7 @@ case 618: case_618(); break; case 624: -#line 4303 "cs-parser.jay" +#line 4306 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3143,13 +3144,13 @@ case 627: case_627(); break; case 629: -#line 4332 "cs-parser.jay" +#line 4335 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 630: -#line 4345 "cs-parser.jay" +#line 4348 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3167,18 +3168,18 @@ case 634: case_634(); break; case 635: -#line 4388 "cs-parser.jay" +#line 4391 "cs-parser.jay" { yyVal = null; } break; case 636: -#line 4390 "cs-parser.jay" +#line 4393 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 637: case_637(); break; case 638: -#line 4403 "cs-parser.jay" +#line 4406 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3235,7 +3236,7 @@ case 657: case_657(); break; case 659: -#line 4523 "cs-parser.jay" +#line 4526 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3265,19 +3266,19 @@ case 667: case_667(); break; case 668: -#line 4613 "cs-parser.jay" +#line 4616 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4617 "cs-parser.jay" +#line 4620 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 670: -#line 4624 "cs-parser.jay" +#line 4627 "cs-parser.jay" { yyVal = Variance.None; } @@ -3295,7 +3296,7 @@ case 674: case_674(); break; case 675: -#line 4669 "cs-parser.jay" +#line 4672 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3313,13 +3314,13 @@ case 679: case_679(); break; case 684: -#line 4713 "cs-parser.jay" +#line 4716 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 685: -#line 4717 "cs-parser.jay" +#line 4720 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3328,13 +3329,13 @@ case 687: case_687(); break; case 690: -#line 4741 "cs-parser.jay" +#line 4744 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 691: -#line 4745 "cs-parser.jay" +#line 4748 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3367,13 +3368,13 @@ case 730: case_730(); break; case 731: -#line 4889 "cs-parser.jay" +#line 4892 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 732: -#line 4893 "cs-parser.jay" +#line 4896 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3385,7 +3386,7 @@ case 735: case_735(); break; case 736: -#line 4914 "cs-parser.jay" +#line 4917 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3418,7 +3419,7 @@ case 751: case_751(); break; case 752: -#line 5014 "cs-parser.jay" +#line 5017 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3439,15 +3440,15 @@ case 762: case_762(); break; case 763: -#line 5064 "cs-parser.jay" +#line 5067 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5068 "cs-parser.jay" +#line 5071 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: -#line 5069 "cs-parser.jay" +#line 5072 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 766: @@ -3466,7 +3467,7 @@ case 772: case_772(); break; case 773: -#line 5137 "cs-parser.jay" +#line 5140 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3487,13 +3488,13 @@ case 779: case_779(); break; case 780: -#line 5181 "cs-parser.jay" +#line 5184 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 781: -#line 5185 "cs-parser.jay" +#line 5188 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3508,7 +3509,7 @@ case 784: case_784(); break; case 785: -#line 5214 "cs-parser.jay" +#line 5217 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3523,7 +3524,7 @@ case 792: case_792(); break; case 793: -#line 5253 "cs-parser.jay" +#line 5256 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3535,7 +3536,7 @@ case 795: case_795(); break; case 796: -#line 5281 "cs-parser.jay" +#line 5284 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 798: @@ -3545,11 +3546,11 @@ case 799: case_799(); break; case 801: -#line 5302 "cs-parser.jay" +#line 5305 "cs-parser.jay" { yyVal = null; } break; case 803: -#line 5307 "cs-parser.jay" +#line 5310 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 807: @@ -3592,7 +3593,7 @@ case 825: case_825(); break; case 828: -#line 5462 "cs-parser.jay" +#line 5465 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3613,7 +3614,7 @@ case 833: case_833(); break; case 836: -#line 5515 "cs-parser.jay" +#line 5518 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3622,7 +3623,7 @@ case 837: case_837(); break; case 838: -#line 5534 "cs-parser.jay" +#line 5537 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3631,13 +3632,13 @@ case 839: case_839(); break; case 840: -#line 5552 "cs-parser.jay" +#line 5555 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 841: -#line 5559 "cs-parser.jay" +#line 5562 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3646,7 +3647,7 @@ case 842: case_842(); break; case 843: -#line 5569 "cs-parser.jay" +#line 5572 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3676,7 +3677,7 @@ case 851: case_851(); break; case 852: -#line 5652 "cs-parser.jay" +#line 5655 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3709,7 +3710,7 @@ case 861: case_861(); break; case 862: -#line 5753 "cs-parser.jay" +#line 5756 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3718,7 +3719,7 @@ case 863: case_863(); break; case 864: -#line 5768 "cs-parser.jay" +#line 5771 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3733,7 +3734,7 @@ case 868: case_868(); break; case 869: -#line 5813 "cs-parser.jay" +#line 5816 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3754,7 +3755,7 @@ case 877: case_877(); break; case 883: -#line 5872 "cs-parser.jay" +#line 5875 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3763,7 +3764,7 @@ case 884: case_884(); break; case 885: -#line 5891 "cs-parser.jay" +#line 5894 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3796,13 +3797,13 @@ case 894: case_894(); break; case 896: -#line 6035 "cs-parser.jay" +#line 6038 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 897: -#line 6042 "cs-parser.jay" +#line 6045 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3823,7 +3824,7 @@ case 904: case_904(); break; case 905: -#line 6088 "cs-parser.jay" +#line 6091 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3835,7 +3836,7 @@ case 907: case_907(); break; case 908: -#line 6105 "cs-parser.jay" +#line 6108 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3859,13 +3860,13 @@ case 917: case_917(); break; case 925: -#line 6229 "cs-parser.jay" +#line 6232 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 926: -#line 6236 "cs-parser.jay" +#line 6239 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3877,13 +3878,13 @@ case 928: case_928(); break; case 929: -#line 6253 "cs-parser.jay" +#line 6256 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 930: -#line 6257 "cs-parser.jay" +#line 6260 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3901,25 +3902,25 @@ case 934: case_934(); break; case 936: -#line 6293 "cs-parser.jay" +#line 6296 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 938: -#line 6301 "cs-parser.jay" +#line 6304 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 939: -#line 6305 "cs-parser.jay" +#line 6308 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 940: -#line 6312 "cs-parser.jay" +#line 6315 "cs-parser.jay" { yyVal = new List (0); } @@ -3969,7 +3970,7 @@ case 944: All more than 3 lines long rules are wrapped into a method */ void case_6() -#line 407 "cs-parser.jay" +#line 408 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { Attributes attrs = (Attributes) yyVals[0+yyTop]; @@ -3979,7 +3980,7 @@ void case_6() } void case_8() -#line 419 "cs-parser.jay" +#line 420 "cs-parser.jay" { if (yyToken == Token.EXTERN_ALIAS) report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements"); @@ -3988,7 +3989,7 @@ void case_8() } void case_13() -#line 439 "cs-parser.jay" +#line 440 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -4004,21 +4005,21 @@ void case_13() } void case_17() -#line 465 "cs-parser.jay" +#line 466 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_18() -#line 470 "cs-parser.jay" +#line 471 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_19() -#line 478 "cs-parser.jay" +#line 479 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") { @@ -4031,21 +4032,21 @@ void case_19() } void case_20() -#line 489 "cs-parser.jay" +#line 490 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_21() -#line 497 "cs-parser.jay" +#line 498 "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_22() -#line 510 "cs-parser.jay" +#line 511 "cs-parser.jay" { Attributes attrs = (Attributes) yyVals[-2+yyTop]; MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4078,7 +4079,7 @@ void case_22() } void case_23() -#line 541 "cs-parser.jay" +#line 542 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -4086,7 +4087,7 @@ void case_23() } void case_24() -#line 547 "cs-parser.jay" +#line 548 "cs-parser.jay" { current_namespace = current_namespace.Parent; current_class = current_namespace.SlaveDeclSpace; @@ -4099,14 +4100,14 @@ void case_24() } void case_25() -#line 561 "cs-parser.jay" +#line 562 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName (lt.Value, lt.Location); } void case_26() -#line 566 "cs-parser.jay" +#line 567 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location) { @@ -4115,14 +4116,14 @@ void case_26() } void case_27() -#line 573 "cs-parser.jay" +#line 574 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new MemberName ("", lexer.Location); } void case_32() -#line 591 "cs-parser.jay" +#line 592 "cs-parser.jay" { MemberName name = (MemberName) yyVals[0+yyTop]; @@ -4133,7 +4134,7 @@ void case_32() } void case_41() -#line 623 "cs-parser.jay" +#line 624 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { TypeContainer ds = (TypeContainer)yyVals[0+yyTop]; @@ -4154,7 +4155,7 @@ void case_41() } void case_50() -#line 673 "cs-parser.jay" +#line 674 "cs-parser.jay" { var sect = (List) yyVals[0+yyTop]; yyVal = new Attributes (sect); @@ -4167,7 +4168,7 @@ void case_50() } void case_51() -#line 684 "cs-parser.jay" +#line 685 "cs-parser.jay" { Attributes attrs = yyVals[-1+yyTop] as Attributes; var sect = (List) yyVals[0+yyTop]; @@ -4182,21 +4183,21 @@ void case_51() } void case_52() -#line 700 "cs-parser.jay" +#line 701 "cs-parser.jay" { lexer.parsing_attribute_section = true; savedOpenLocation = GetLocation (yyVals[0+yyTop]); } void case_53() -#line 705 "cs-parser.jay" +#line 706 "cs-parser.jay" { lexer.parsing_attribute_section = false; yyVal = yyVals[0+yyTop]; } void case_54() -#line 713 "cs-parser.jay" +#line 714 "cs-parser.jay" { current_attr_target = (string) yyVals[-1+yyTop]; if (current_attr_target == "assembly" || current_attr_target == "module") { @@ -4205,7 +4206,7 @@ void case_54() } void case_55() -#line 720 "cs-parser.jay" +#line 721 "cs-parser.jay" { /* when attribute target is invalid*/ if (current_attr_target == string.Empty) @@ -4223,7 +4224,7 @@ void case_55() } void case_56() -#line 736 "cs-parser.jay" +#line 737 "cs-parser.jay" { yyVal = yyVals[-2+yyTop]; if (yyVals[-1+yyTop] != null) { @@ -4234,7 +4235,7 @@ void case_56() } void case_57() -#line 748 "cs-parser.jay" +#line 749 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = CheckAttributeTarget (lt.Value, lt.Location); @@ -4242,7 +4243,7 @@ void case_57() } void case_60() -#line 756 "cs-parser.jay" +#line 757 "cs-parser.jay" { if (yyToken == Token.IDENTIFIER) { Error_SyntaxError (yyToken); @@ -4254,7 +4255,7 @@ void case_60() } void case_62() -#line 773 "cs-parser.jay" +#line 774 "cs-parser.jay" { var attrs = (List) yyVals[-2+yyTop]; attrs.Add ((Attribute) yyVals[0+yyTop]); @@ -4264,7 +4265,7 @@ void case_62() } void case_64() -#line 788 "cs-parser.jay" +#line 789 "cs-parser.jay" { --lexer.parsing_block; MemberName mname = (MemberName) yyVals[-2+yyTop]; @@ -4277,12 +4278,15 @@ void case_64() ATypeNameExpression expr = mname.GetTypeExpression (); yyVal = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); if (arguments != null) { - lbag.AddLocation (yyVal, savedAttrParenOpenLocation, savedAttrParenCloseLocation); + attributeArgumentCommas.Insert (0, savedAttrParenOpenLocation); + attributeArgumentCommas.Add (savedAttrParenCloseLocation); + lbag.AddLocation (yyVal, attributeArgumentCommas); + attributeArgumentCommas.Clear (); } } void case_67() -#line 812 "cs-parser.jay" +#line 815 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4290,7 +4294,7 @@ void case_67() } void case_69() -#line 823 "cs-parser.jay" +#line 826 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4298,7 +4302,7 @@ void case_69() } void case_70() -#line 829 "cs-parser.jay" +#line 832 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4306,7 +4310,7 @@ void case_70() } void case_71() -#line 835 "cs-parser.jay" +#line 838 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4319,11 +4323,11 @@ void case_71() Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]); args.Add ((Argument) yyVals[0+yyTop]); - lbag.AppendTo (args, GetLocation (yyVals[-1+yyTop])); + attributeArgumentCommas.Add (GetLocation (yyVals[-1+yyTop])); } void case_72() -#line 850 "cs-parser.jay" +#line 853 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4331,11 +4335,11 @@ void case_72() } ((Arguments) o [1]).Add ((Argument) yyVals[0+yyTop]); - lbag.AppendTo (o[1], GetLocation (yyVals[-1+yyTop])); + attributeArgumentCommas.Add (GetLocation (yyVals[-1+yyTop])); } void case_76() -#line 875 "cs-parser.jay" +#line 878 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4344,7 +4348,7 @@ void case_76() } void case_77() -#line 885 "cs-parser.jay" +#line 888 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4358,7 +4362,7 @@ void case_77() } void case_95() -#line 938 "cs-parser.jay" +#line 941 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4367,7 +4371,7 @@ void case_95() } void case_97() -#line 955 "cs-parser.jay" +#line 958 "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]); @@ -4375,7 +4379,7 @@ void case_97() } void case_98() -#line 962 "cs-parser.jay" +#line 965 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4389,14 +4393,14 @@ void case_98() } void case_99() -#line 974 "cs-parser.jay" +#line 977 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_100() -#line 979 "cs-parser.jay" +#line 982 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); --lexer.parsing_declaration; @@ -4405,7 +4409,7 @@ void case_100() } void case_101() -#line 986 "cs-parser.jay" +#line 989 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[-1+yyTop]); @@ -4413,7 +4417,7 @@ void case_101() } void case_103() -#line 1001 "cs-parser.jay" +#line 1004 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4428,7 +4432,7 @@ void case_103() } void case_104() -#line 1014 "cs-parser.jay" +#line 1017 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4441,7 +4445,7 @@ void case_104() } void case_109() -#line 1044 "cs-parser.jay" +#line 1047 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4449,7 +4453,7 @@ void case_109() } void case_111() -#line 1057 "cs-parser.jay" +#line 1060 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4457,14 +4461,14 @@ void case_111() } void case_112() -#line 1063 "cs-parser.jay" +#line 1066 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_115() -#line 1078 "cs-parser.jay" +#line 1081 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4479,7 +4483,7 @@ void case_115() } void case_116() -#line 1093 "cs-parser.jay" +#line 1096 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4492,7 +4496,7 @@ void case_116() } void case_117() -#line 1106 "cs-parser.jay" +#line 1109 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4505,7 +4509,7 @@ void case_117() } void case_118() -#line 1117 "cs-parser.jay" +#line 1120 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4519,7 +4523,7 @@ void case_118() } void case_121() -#line 1140 "cs-parser.jay" +#line 1143 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4527,7 +4531,7 @@ void case_121() } void case_122() -#line 1146 "cs-parser.jay" +#line 1149 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4537,7 +4541,7 @@ void case_122() } void case_127() -#line 1173 "cs-parser.jay" +#line 1176 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4545,7 +4549,7 @@ void case_127() } void case_129() -#line 1183 "cs-parser.jay" +#line 1186 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4554,7 +4558,7 @@ void case_129() } void case_134() -#line 1209 "cs-parser.jay" +#line 1212 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4562,7 +4566,7 @@ void case_134() } void case_136() -#line 1222 "cs-parser.jay" +#line 1225 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4570,14 +4574,14 @@ void case_136() } void case_137() -#line 1228 "cs-parser.jay" +#line 1231 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_140() -#line 1238 "cs-parser.jay" +#line 1241 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4585,7 +4589,7 @@ void case_140() } void case_141() -#line 1247 "cs-parser.jay" +#line 1250 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4597,7 +4601,7 @@ void case_141() } void case_142() -#line 1257 "cs-parser.jay" +#line 1260 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4625,7 +4629,7 @@ void case_142() } void case_145() -#line 1297 "cs-parser.jay" +#line 1300 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4660,14 +4664,14 @@ void case_145() } void case_147() -#line 1338 "cs-parser.jay" +#line 1341 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_149() -#line 1347 "cs-parser.jay" +#line 1350 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4719,7 +4723,7 @@ void case_149() } void case_150() -#line 1400 "cs-parser.jay" +#line 1403 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4737,7 +4741,7 @@ void case_150() } void case_155() -#line 1429 "cs-parser.jay" +#line 1432 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4745,7 +4749,7 @@ void case_155() } void case_156() -#line 1435 "cs-parser.jay" +#line 1438 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4756,7 +4760,7 @@ void case_156() } void case_157() -#line 1444 "cs-parser.jay" +#line 1447 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4767,7 +4771,7 @@ void case_157() } void case_158() -#line 1453 "cs-parser.jay" +#line 1456 "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"); @@ -4777,7 +4781,7 @@ void case_158() } void case_159() -#line 1461 "cs-parser.jay" +#line 1464 "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"); @@ -4792,7 +4796,7 @@ void case_159() } void case_160() -#line 1474 "cs-parser.jay" +#line 1477 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4801,7 +4805,7 @@ void case_160() } void case_161() -#line 1481 "cs-parser.jay" +#line 1484 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4815,14 +4819,14 @@ void case_161() } void case_164() -#line 1501 "cs-parser.jay" +#line 1504 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_165() -#line 1509 "cs-parser.jay" +#line 1512 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4833,7 +4837,7 @@ void case_165() } void case_166() -#line 1518 "cs-parser.jay" +#line 1521 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4853,7 +4857,7 @@ void case_166() } void case_167() -#line 1542 "cs-parser.jay" +#line 1545 "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); @@ -4861,7 +4865,7 @@ void case_167() } void case_168() -#line 1551 "cs-parser.jay" +#line 1554 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4870,7 +4874,7 @@ void case_168() } void case_169() -#line 1561 "cs-parser.jay" +#line 1564 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4879,7 +4883,7 @@ void case_169() } void case_171() -#line 1576 "cs-parser.jay" +#line 1579 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4918,7 +4922,7 @@ void case_171() } void case_175() -#line 1625 "cs-parser.jay" +#line 1628 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4941,7 +4945,7 @@ void case_175() } void case_176() -#line 1649 "cs-parser.jay" +#line 1652 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4950,7 +4954,7 @@ void case_176() } void case_177() -#line 1656 "cs-parser.jay" +#line 1659 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4959,7 +4963,7 @@ void case_177() } void case_178() -#line 1663 "cs-parser.jay" +#line 1666 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4971,14 +4975,14 @@ void case_178() } void case_179() -#line 1676 "cs-parser.jay" +#line 1679 "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_180() -#line 1681 "cs-parser.jay" +#line 1684 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4987,21 +4991,21 @@ void case_180() } void case_181() -#line 1688 "cs-parser.jay" +#line 1691 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1696 "cs-parser.jay" +#line 1699 "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"); } void case_183() -#line 1701 "cs-parser.jay" +#line 1704 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -5012,21 +5016,21 @@ void case_183() } void case_185() -#line 1717 "cs-parser.jay" +#line 1720 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1728 "cs-parser.jay" +#line 1731 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1733 "cs-parser.jay" +#line 1736 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5042,7 +5046,7 @@ void case_187() } void case_188() -#line 1747 "cs-parser.jay" +#line 1750 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5051,14 +5055,14 @@ void case_188() } void case_189() -#line 1754 "cs-parser.jay" +#line 1757 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1768 "cs-parser.jay" +#line 1771 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5085,7 +5089,7 @@ void case_191() } void case_193() -#line 1797 "cs-parser.jay" +#line 1800 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5098,7 +5102,7 @@ void case_193() } void case_198() -#line 1816 "cs-parser.jay" +#line 1819 "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 ()); @@ -5111,7 +5115,7 @@ void case_198() } void case_199() -#line 1830 "cs-parser.jay" +#line 1833 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5134,7 +5138,7 @@ void case_199() } void case_200() -#line 1851 "cs-parser.jay" +#line 1854 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5157,7 +5161,7 @@ void case_200() } void case_201() -#line 1875 "cs-parser.jay" +#line 1878 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5185,7 +5189,7 @@ void case_201() } void case_202() -#line 1901 "cs-parser.jay" +#line 1904 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5208,21 +5212,21 @@ void case_202() } void case_204() -#line 1926 "cs-parser.jay" +#line 1929 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1931 "cs-parser.jay" +#line 1934 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1946 "cs-parser.jay" +#line 1949 "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]); @@ -5230,7 +5234,7 @@ void case_207() } void case_208() -#line 1953 "cs-parser.jay" +#line 1956 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5245,7 +5249,7 @@ void case_208() } void case_209() -#line 1966 "cs-parser.jay" +#line 1969 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5253,7 +5257,7 @@ void case_209() } void case_210() -#line 1972 "cs-parser.jay" +#line 1975 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5262,7 +5266,7 @@ void case_210() } void case_226() -#line 2032 "cs-parser.jay" +#line 2035 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5292,14 +5296,14 @@ void case_226() } void case_230() -#line 2069 "cs-parser.jay" +#line 2072 "cs-parser.jay" { 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_232() -#line 2081 "cs-parser.jay" +#line 2084 "cs-parser.jay" { valid_param_mod = 0; @@ -5341,7 +5345,7 @@ void case_232() } void case_257() -#line 2157 "cs-parser.jay" +#line 2160 "cs-parser.jay" { valid_param_mod = 0; @@ -5358,7 +5362,7 @@ void case_257() } void case_259() -#line 2176 "cs-parser.jay" +#line 2179 "cs-parser.jay" { valid_param_mod = 0; @@ -5375,7 +5379,7 @@ void case_259() } void case_260() -#line 2191 "cs-parser.jay" +#line 2194 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5383,7 +5387,7 @@ void case_260() } void case_261() -#line 2197 "cs-parser.jay" +#line 2200 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5391,7 +5395,7 @@ void case_261() } void case_262() -#line 2207 "cs-parser.jay" +#line 2210 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5407,7 +5411,7 @@ void case_262() } void case_263() -#line 2226 "cs-parser.jay" +#line 2229 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5418,7 +5422,7 @@ void case_263() } void case_264() -#line 2235 "cs-parser.jay" +#line 2238 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5431,7 +5435,7 @@ void case_264() } void case_265() -#line 2246 "cs-parser.jay" +#line 2249 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5461,7 +5465,7 @@ void case_265() } void case_271() -#line 2291 "cs-parser.jay" +#line 2294 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5469,7 +5473,7 @@ void case_271() } void case_273() -#line 2301 "cs-parser.jay" +#line 2304 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5477,14 +5481,14 @@ void case_273() } void case_274() -#line 2307 "cs-parser.jay" +#line 2310 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2315 "cs-parser.jay" +#line 2318 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5495,7 +5499,7 @@ void case_275() } void case_276() -#line 2324 "cs-parser.jay" +#line 2327 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5517,7 +5521,7 @@ void case_276() } void case_277() -#line 2349 "cs-parser.jay" +#line 2352 "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); @@ -5531,7 +5535,7 @@ void case_277() } void case_278() -#line 2363 "cs-parser.jay" +#line 2366 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5543,7 +5547,7 @@ void case_278() } void case_279() -#line 2376 "cs-parser.jay" +#line 2379 "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); @@ -5553,7 +5557,7 @@ void case_279() } void case_280() -#line 2384 "cs-parser.jay" +#line 2387 "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"); @@ -5562,7 +5566,7 @@ void case_280() } void case_281() -#line 2391 "cs-parser.jay" +#line 2394 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5575,14 +5579,14 @@ void case_281() } void case_284() -#line 2410 "cs-parser.jay" +#line 2413 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2434 "cs-parser.jay" +#line 2437 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5590,7 +5594,7 @@ void case_289() } void case_291() -#line 2444 "cs-parser.jay" +#line 2447 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5599,7 +5603,7 @@ void case_291() } void case_292() -#line 2453 "cs-parser.jay" +#line 2456 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5613,28 +5617,28 @@ void case_292() } void case_296() -#line 2474 "cs-parser.jay" +#line 2477 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2479 "cs-parser.jay" +#line 2482 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2484 "cs-parser.jay" +#line 2487 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2492 "cs-parser.jay" +#line 2495 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5648,7 +5652,7 @@ void case_299() } void case_300() -#line 2504 "cs-parser.jay" +#line 2507 "cs-parser.jay" { lexer.EventParsing = true; @@ -5663,7 +5667,7 @@ void case_300() } void case_301() -#line 2520 "cs-parser.jay" +#line 2523 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5677,7 +5681,7 @@ void case_301() } void case_302() -#line 2532 "cs-parser.jay" +#line 2535 "cs-parser.jay" { lexer.EventParsing = true; @@ -5692,21 +5696,21 @@ void case_302() } void case_303() -#line 2548 "cs-parser.jay" +#line 2551 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_306() -#line 2564 "cs-parser.jay" +#line 2567 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_307() -#line 2569 "cs-parser.jay" +#line 2572 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5721,7 +5725,7 @@ void case_307() } void case_308() -#line 2582 "cs-parser.jay" +#line 2585 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5729,7 +5733,7 @@ void case_308() } void case_309() -#line 2588 "cs-parser.jay" +#line 2591 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5745,7 +5749,7 @@ void case_309() } void case_311() -#line 2606 "cs-parser.jay" +#line 2609 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5758,21 +5762,21 @@ void case_311() } void case_312() -#line 2617 "cs-parser.jay" +#line 2620 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_317() -#line 2635 "cs-parser.jay" +#line 2638 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_318() -#line 2643 "cs-parser.jay" +#line 2646 "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]); @@ -5787,7 +5791,7 @@ void case_318() } void case_319() -#line 2656 "cs-parser.jay" +#line 2659 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5797,7 +5801,7 @@ void case_319() } void case_320() -#line 2664 "cs-parser.jay" +#line 2667 "cs-parser.jay" { --lexer.parsing_block; @@ -5813,7 +5817,7 @@ void case_320() } void case_322() -#line 2689 "cs-parser.jay" +#line 2692 "cs-parser.jay" { valid_param_mod = 0; @@ -5833,7 +5837,7 @@ void case_322() } void case_324() -#line 2711 "cs-parser.jay" +#line 2714 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5849,7 +5853,7 @@ void case_324() } void case_326() -#line 2729 "cs-parser.jay" +#line 2732 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5858,7 +5862,7 @@ void case_326() } void case_328() -#line 2740 "cs-parser.jay" +#line 2743 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5867,7 +5871,7 @@ void case_328() } void case_330() -#line 2751 "cs-parser.jay" +#line 2754 "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) { @@ -5876,14 +5880,14 @@ void case_330() } void case_331() -#line 2761 "cs-parser.jay" +#line 2764 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_333() -#line 2773 "cs-parser.jay" +#line 2776 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5896,14 +5900,14 @@ void case_333() } void case_334() -#line 2784 "cs-parser.jay" +#line 2787 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_335() -#line 2792 "cs-parser.jay" +#line 2795 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5912,7 +5916,7 @@ void case_335() } void case_336() -#line 2799 "cs-parser.jay" +#line 2802 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5921,7 +5925,7 @@ void case_336() } void case_338() -#line 2816 "cs-parser.jay" +#line 2819 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5929,7 +5933,7 @@ void case_338() } void case_339() -#line 2825 "cs-parser.jay" +#line 2828 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5938,7 +5942,7 @@ void case_339() } void case_341() -#line 2836 "cs-parser.jay" +#line 2839 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5946,21 +5950,21 @@ void case_341() } void case_342() -#line 2845 "cs-parser.jay" +#line 2848 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_343() -#line 2850 "cs-parser.jay" +#line 2853 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_344() -#line 2858 "cs-parser.jay" +#line 2861 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5968,7 +5972,7 @@ void case_344() } void case_345() -#line 2864 "cs-parser.jay" +#line 2867 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5978,7 +5982,7 @@ void case_345() } void case_346() -#line 2872 "cs-parser.jay" +#line 2875 "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); @@ -5986,7 +5990,7 @@ void case_346() } void case_348() -#line 2882 "cs-parser.jay" +#line 2885 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5996,7 +6000,7 @@ void case_348() } void case_349() -#line 2893 "cs-parser.jay" +#line 2896 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6004,7 +6008,7 @@ void case_349() } void case_350() -#line 2899 "cs-parser.jay" +#line 2902 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6013,7 +6017,7 @@ void case_350() } void case_351() -#line 2909 "cs-parser.jay" +#line 2912 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6023,7 +6027,7 @@ void case_351() } void case_352() -#line 2917 "cs-parser.jay" +#line 2920 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6034,28 +6038,28 @@ void case_352() } void case_357() -#line 2951 "cs-parser.jay" +#line 2954 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_359() -#line 2960 "cs-parser.jay" +#line 2963 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_361() -#line 2969 "cs-parser.jay" +#line 2972 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_364() -#line 2985 "cs-parser.jay" +#line 2988 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6070,14 +6074,14 @@ void case_364() } void case_366() -#line 3002 "cs-parser.jay" +#line 3005 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_369() -#line 3018 "cs-parser.jay" +#line 3021 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6085,7 +6089,7 @@ void case_369() } void case_370() -#line 3024 "cs-parser.jay" +#line 3027 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6094,7 +6098,7 @@ void case_370() } void case_371() -#line 3034 "cs-parser.jay" +#line 3037 "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 ()); @@ -6103,35 +6107,35 @@ void case_371() } void case_372() -#line 3041 "cs-parser.jay" +#line 3044 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_409() -#line 3103 "cs-parser.jay" +#line 3106 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_410() -#line 3107 "cs-parser.jay" +#line 3110 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_421() -#line 3148 "cs-parser.jay" +#line 3151 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_423() -#line 3160 "cs-parser.jay" +#line 3163 "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) { @@ -6140,7 +6144,7 @@ void case_423() } void case_424() -#line 3167 "cs-parser.jay" +#line 3170 "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) { @@ -6149,7 +6153,7 @@ void case_424() } void case_425() -#line 3174 "cs-parser.jay" +#line 3177 "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) { @@ -6158,7 +6162,7 @@ void case_425() } void case_426() -#line 3181 "cs-parser.jay" +#line 3184 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6168,28 +6172,28 @@ void case_426() } void case_428() -#line 3191 "cs-parser.jay" +#line 3194 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3199 "cs-parser.jay" +#line 3202 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_431() -#line 3207 "cs-parser.jay" +#line 3210 "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_434() -#line 3220 "cs-parser.jay" +#line 3223 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6201,14 +6205,14 @@ void case_434() } void case_435() -#line 3230 "cs-parser.jay" +#line 3233 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_438() -#line 3246 "cs-parser.jay" +#line 3249 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6216,7 +6220,7 @@ void case_438() } void case_439() -#line 3252 "cs-parser.jay" +#line 3255 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6225,14 +6229,14 @@ void case_439() } void case_440() -#line 3258 "cs-parser.jay" +#line 3261 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_441() -#line 3266 "cs-parser.jay" +#line 3269 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6240,7 +6244,7 @@ void case_441() } void case_443() -#line 3275 "cs-parser.jay" +#line 3278 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6250,7 +6254,7 @@ void case_443() } void case_444() -#line 3283 "cs-parser.jay" +#line 3286 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6259,14 +6263,14 @@ void case_444() } void case_445() -#line 3290 "cs-parser.jay" +#line 3293 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_450() -#line 3308 "cs-parser.jay" +#line 3311 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6274,7 +6278,7 @@ void case_450() } void case_451() -#line 3314 "cs-parser.jay" +#line 3317 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6286,7 +6290,7 @@ void case_451() } void case_452() -#line 3324 "cs-parser.jay" +#line 3327 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6303,56 +6307,56 @@ void case_452() } void case_453() -#line 3339 "cs-parser.jay" +#line 3342 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_454() -#line 3344 "cs-parser.jay" +#line 3347 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_459() -#line 3365 "cs-parser.jay" +#line 3368 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3370 "cs-parser.jay" +#line 3373 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_461() -#line 3375 "cs-parser.jay" +#line 3378 "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_462() -#line 3380 "cs-parser.jay" +#line 3383 "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_464() -#line 3392 "cs-parser.jay" +#line 3395 "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_465() -#line 3400 "cs-parser.jay" +#line 3403 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6360,7 +6364,7 @@ void case_465() } void case_466() -#line 3406 "cs-parser.jay" +#line 3409 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6369,14 +6373,14 @@ void case_466() } void case_467() -#line 3412 "cs-parser.jay" +#line 3415 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3420 "cs-parser.jay" +#line 3423 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6384,7 +6388,7 @@ void case_468() } void case_469() -#line 3426 "cs-parser.jay" +#line 3429 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6396,21 +6400,21 @@ void case_469() } void case_473() -#line 3454 "cs-parser.jay" +#line 3457 "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_474() -#line 3459 "cs-parser.jay" +#line 3462 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_477() -#line 3481 "cs-parser.jay" +#line 3484 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6425,7 +6429,7 @@ void case_477() } void case_478() -#line 3494 "cs-parser.jay" +#line 3497 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6434,7 +6438,7 @@ void case_478() } void case_479() -#line 3506 "cs-parser.jay" +#line 3509 "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])) { @@ -6444,7 +6448,7 @@ void case_479() } void case_480() -#line 3514 "cs-parser.jay" +#line 3517 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6453,7 +6457,7 @@ void case_480() } void case_481() -#line 3521 "cs-parser.jay" +#line 3524 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6462,28 +6466,28 @@ void case_481() } void case_482() -#line 3528 "cs-parser.jay" +#line 3531 "cs-parser.jay" { 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_483() -#line 3533 "cs-parser.jay" +#line 3536 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_485() -#line 3544 "cs-parser.jay" +#line 3547 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_486() -#line 3552 "cs-parser.jay" +#line 3555 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6495,7 +6499,7 @@ void case_486() } void case_491() -#line 3575 "cs-parser.jay" +#line 3578 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6503,7 +6507,7 @@ void case_491() } void case_492() -#line 3581 "cs-parser.jay" +#line 3584 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6513,7 +6517,7 @@ void case_492() } void case_493() -#line 3592 "cs-parser.jay" +#line 3595 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6521,7 +6525,7 @@ void case_493() } void case_494() -#line 3598 "cs-parser.jay" +#line 3601 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6529,14 +6533,14 @@ void case_494() } void case_495() -#line 3604 "cs-parser.jay" +#line 3607 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_496() -#line 3609 "cs-parser.jay" +#line 3612 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6544,28 +6548,28 @@ void case_496() } void case_500() -#line 3624 "cs-parser.jay" +#line 3627 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_501() -#line 3632 "cs-parser.jay" +#line 3635 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_502() -#line 3637 "cs-parser.jay" +#line 3640 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_507() -#line 3667 "cs-parser.jay" +#line 3670 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6574,7 +6578,7 @@ void case_507() } void case_508() -#line 3674 "cs-parser.jay" +#line 3677 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6587,7 +6591,7 @@ void case_508() } void case_509() -#line 3688 "cs-parser.jay" +#line 3691 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6595,7 +6599,7 @@ void case_509() } void case_510() -#line 3694 "cs-parser.jay" +#line 3697 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6604,7 +6608,7 @@ void case_510() } void case_512() -#line 3708 "cs-parser.jay" +#line 3711 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6612,14 +6616,14 @@ void case_512() } void case_515() -#line 3719 "cs-parser.jay" +#line 3722 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_516() -#line 3727 "cs-parser.jay" +#line 3730 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6627,7 +6631,7 @@ void case_516() } void case_517() -#line 3733 "cs-parser.jay" +#line 3736 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6637,7 +6641,7 @@ void case_517() } void case_518() -#line 3741 "cs-parser.jay" +#line 3744 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6647,7 +6651,7 @@ void case_518() } void case_519() -#line 3749 "cs-parser.jay" +#line 3752 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6657,7 +6661,7 @@ void case_519() } void case_520() -#line 3757 "cs-parser.jay" +#line 3760 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6670,7 +6674,7 @@ void case_520() } void case_521() -#line 3771 "cs-parser.jay" +#line 3774 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6679,7 +6683,7 @@ void case_521() } void case_522() -#line 3781 "cs-parser.jay" +#line 3784 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6689,35 +6693,35 @@ void case_522() } void case_523() -#line 3792 "cs-parser.jay" +#line 3795 "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_524() -#line 3800 "cs-parser.jay" +#line 3803 "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_525() -#line 3808 "cs-parser.jay" +#line 3811 "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_526() -#line 3816 "cs-parser.jay" +#line 3819 "cs-parser.jay" { 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_528() -#line 3828 "cs-parser.jay" +#line 3831 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6728,7 +6732,7 @@ void case_528() } void case_534() -#line 3860 "cs-parser.jay" +#line 3863 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6737,7 +6741,7 @@ void case_534() } void case_535() -#line 3870 "cs-parser.jay" +#line 3873 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6747,147 +6751,147 @@ void case_535() } void case_541() -#line 3895 "cs-parser.jay" +#line 3898 "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_542() -#line 3903 "cs-parser.jay" +#line 3906 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3944 "cs-parser.jay" +#line 3947 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3949 "cs-parser.jay" +#line 3952 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_553() -#line 3954 "cs-parser.jay" +#line 3957 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_555() -#line 3963 "cs-parser.jay" +#line 3966 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_557() -#line 3972 "cs-parser.jay" +#line 3975 "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_561() -#line 3989 "cs-parser.jay" +#line 3992 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_562() -#line 3994 "cs-parser.jay" +#line 3997 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 4003 "cs-parser.jay" +#line 4006 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 4008 "cs-parser.jay" +#line 4011 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 4013 "cs-parser.jay" +#line 4016 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 4018 "cs-parser.jay" +#line 4021 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4027 "cs-parser.jay" +#line 4030 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_570() -#line 4032 "cs-parser.jay" +#line 4035 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_572() -#line 4041 "cs-parser.jay" +#line 4044 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_574() -#line 4050 "cs-parser.jay" +#line 4053 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 4059 "cs-parser.jay" +#line 4062 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 4068 "cs-parser.jay" +#line 4071 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4077 "cs-parser.jay" +#line 4080 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_582() -#line 4086 "cs-parser.jay" +#line 4089 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6896,84 +6900,84 @@ void case_582() } void case_584() -#line 4097 "cs-parser.jay" +#line 4100 "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_586() -#line 4109 "cs-parser.jay" +#line 4112 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4114 "cs-parser.jay" +#line 4117 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4119 "cs-parser.jay" +#line 4122 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4124 "cs-parser.jay" +#line 4127 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4129 "cs-parser.jay" +#line 4132 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4134 "cs-parser.jay" +#line 4137 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4139 "cs-parser.jay" +#line 4142 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4144 "cs-parser.jay" +#line 4147 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4149 "cs-parser.jay" +#line 4152 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4154 "cs-parser.jay" +#line 4157 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4162 "cs-parser.jay" +#line 4165 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6982,7 +6986,7 @@ void case_596() } void case_597() -#line 4169 "cs-parser.jay" +#line 4172 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -6997,7 +7001,7 @@ void case_597() } void case_598() -#line 4185 "cs-parser.jay" +#line 4188 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7005,7 +7009,7 @@ void case_598() } void case_599() -#line 4191 "cs-parser.jay" +#line 4194 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7013,21 +7017,21 @@ void case_599() } void case_600() -#line 4197 "cs-parser.jay" +#line 4200 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_602() -#line 4205 "cs-parser.jay" +#line 4208 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_606() -#line 4221 "cs-parser.jay" +#line 4224 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7036,14 +7040,14 @@ void case_606() } void case_608() -#line 4232 "cs-parser.jay" +#line 4235 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_609() -#line 4240 "cs-parser.jay" +#line 4243 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7051,14 +7055,14 @@ void case_609() } void case_610() -#line 4246 "cs-parser.jay" +#line 4249 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_611() -#line 4251 "cs-parser.jay" +#line 4254 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7066,63 +7070,63 @@ void case_611() } void case_612() -#line 4257 "cs-parser.jay" +#line 4260 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_614() -#line 4266 "cs-parser.jay" +#line 4269 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_615() -#line 4271 "cs-parser.jay" +#line 4274 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_617() -#line 4280 "cs-parser.jay" +#line 4283 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_618() -#line 4285 "cs-parser.jay" +#line 4288 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4308 "cs-parser.jay" +#line 4311 "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_626() -#line 4313 "cs-parser.jay" +#line 4316 "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_627() -#line 4318 "cs-parser.jay" +#line 4321 "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_631() -#line 4347 "cs-parser.jay" +#line 4350 "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]); @@ -7135,7 +7139,7 @@ void case_631() } void case_632() -#line 4359 "cs-parser.jay" +#line 4362 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7150,7 +7154,7 @@ void case_632() } void case_633() -#line 4372 "cs-parser.jay" +#line 4375 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7158,7 +7162,7 @@ void case_633() } void case_634() -#line 4378 "cs-parser.jay" +#line 4381 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7167,7 +7171,7 @@ void case_634() } void case_637() -#line 4395 "cs-parser.jay" +#line 4398 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7175,7 +7179,7 @@ void case_637() } void case_640() -#line 4409 "cs-parser.jay" +#line 4412 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7193,7 +7197,7 @@ void case_640() } void case_641() -#line 4428 "cs-parser.jay" +#line 4431 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7203,91 +7207,91 @@ void case_641() } void case_642() -#line 4436 "cs-parser.jay" +#line 4439 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4441 "cs-parser.jay" +#line 4444 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4446 "cs-parser.jay" +#line 4449 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4451 "cs-parser.jay" +#line 4454 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4456 "cs-parser.jay" +#line 4459 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4461 "cs-parser.jay" +#line 4464 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4466 "cs-parser.jay" +#line 4469 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4471 "cs-parser.jay" +#line 4474 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4476 "cs-parser.jay" +#line 4479 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4481 "cs-parser.jay" +#line 4484 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4486 "cs-parser.jay" +#line 4489 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4491 "cs-parser.jay" +#line 4494 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_654() -#line 4496 "cs-parser.jay" +#line 4499 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7296,28 +7300,28 @@ void case_654() } void case_655() -#line 4503 "cs-parser.jay" +#line 4506 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4512 "cs-parser.jay" +#line 4515 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_660() -#line 4525 "cs-parser.jay" +#line 4528 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_661() -#line 4533 "cs-parser.jay" +#line 4536 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7325,7 +7329,7 @@ void case_661() } void case_662() -#line 4539 "cs-parser.jay" +#line 4542 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7343,7 +7347,7 @@ void case_662() } void case_663() -#line 4558 "cs-parser.jay" +#line 4561 "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])); @@ -7351,7 +7355,7 @@ void case_663() } void case_664() -#line 4567 "cs-parser.jay" +#line 4570 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7359,7 +7363,7 @@ void case_664() } void case_665() -#line 4573 "cs-parser.jay" +#line 4576 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7384,7 +7388,7 @@ void case_665() } void case_666() -#line 4599 "cs-parser.jay" +#line 4602 "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 ()); @@ -7393,14 +7397,14 @@ void case_666() } void case_667() -#line 4606 "cs-parser.jay" +#line 4609 "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_671() -#line 4626 "cs-parser.jay" +#line 4629 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7409,91 +7413,91 @@ void case_671() } void case_672() -#line 4636 "cs-parser.jay" +#line 4639 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4641 "cs-parser.jay" +#line 4644 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_674() -#line 4662 "cs-parser.jay" +#line 4665 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4674 "cs-parser.jay" +#line 4677 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_677() -#line 4679 "cs-parser.jay" +#line 4682 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_678() -#line 4688 "cs-parser.jay" +#line 4691 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_679() -#line 4693 "cs-parser.jay" +#line 4696 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_687() -#line 4720 "cs-parser.jay" +#line 4723 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_720() -#line 4784 "cs-parser.jay" +#line 4787 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4789 "cs-parser.jay" +#line 4792 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_722() -#line 4794 "cs-parser.jay" +#line 4797 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_723() -#line 4802 "cs-parser.jay" +#line 4805 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_724() -#line 4810 "cs-parser.jay" +#line 4813 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7503,7 +7507,7 @@ void case_724() } void case_727() -#line 4823 "cs-parser.jay" +#line 4826 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7512,7 +7516,7 @@ void case_727() } void case_728() -#line 4839 "cs-parser.jay" +#line 4842 "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*/ @@ -7544,7 +7548,7 @@ void case_728() } void case_729() -#line 4869 "cs-parser.jay" +#line 4872 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7557,7 +7561,7 @@ void case_729() } void case_730() -#line 4880 "cs-parser.jay" +#line 4883 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7566,21 +7570,21 @@ void case_730() } void case_733() -#line 4895 "cs-parser.jay" +#line 4898 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_735() -#line 4904 "cs-parser.jay" +#line 4907 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_737() -#line 4919 "cs-parser.jay" +#line 4922 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7589,7 +7593,7 @@ void case_737() } void case_738() -#line 4926 "cs-parser.jay" +#line 4929 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7597,7 +7601,7 @@ void case_738() } void case_739() -#line 4932 "cs-parser.jay" +#line 4935 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7606,7 +7610,7 @@ void case_739() } void case_740() -#line 4939 "cs-parser.jay" +#line 4942 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7618,14 +7622,14 @@ void case_740() } void case_742() -#line 4953 "cs-parser.jay" +#line 4956 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_743() -#line 4958 "cs-parser.jay" +#line 4961 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7636,7 +7640,7 @@ void case_743() } void case_747() -#line 4976 "cs-parser.jay" +#line 4979 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7645,7 +7649,7 @@ void case_747() } void case_750() -#line 4991 "cs-parser.jay" +#line 4994 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7656,7 +7660,7 @@ void case_750() } void case_751() -#line 5000 "cs-parser.jay" +#line 5003 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7667,14 +7671,14 @@ void case_751() } void case_753() -#line 5016 "cs-parser.jay" +#line 5019 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_758() -#line 5034 "cs-parser.jay" +#line 5037 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7685,28 +7689,28 @@ void case_758() } void case_760() -#line 5047 "cs-parser.jay" +#line 5050 "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_761() -#line 5052 "cs-parser.jay" +#line 5055 "cs-parser.jay" { 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_762() -#line 5060 "cs-parser.jay" +#line 5063 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_766() -#line 5078 "cs-parser.jay" +#line 5081 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7718,7 +7722,7 @@ void case_766() } void case_767() -#line 5091 "cs-parser.jay" +#line 5094 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7728,14 +7732,14 @@ void case_767() } void case_768() -#line 5099 "cs-parser.jay" +#line 5102 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_771() -#line 5113 "cs-parser.jay" +#line 5116 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7745,7 +7749,7 @@ void case_771() } void case_772() -#line 5122 "cs-parser.jay" +#line 5125 "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])); @@ -7757,7 +7761,7 @@ void case_772() } void case_774() -#line 5139 "cs-parser.jay" +#line 5142 "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])); @@ -7765,14 +7769,14 @@ void case_774() } void case_775() -#line 5148 "cs-parser.jay" +#line 5151 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_777() -#line 5157 "cs-parser.jay" +#line 5160 "cs-parser.jay" { var sections = new List (4); @@ -7781,7 +7785,7 @@ void case_777() } void case_778() -#line 5164 "cs-parser.jay" +#line 5167 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7790,14 +7794,14 @@ void case_778() } void case_779() -#line 5171 "cs-parser.jay" +#line 5174 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_782() -#line 5190 "cs-parser.jay" +#line 5193 "cs-parser.jay" { var labels = new List (2); @@ -7806,7 +7810,7 @@ void case_782() } void case_783() -#line 5197 "cs-parser.jay" +#line 5200 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7815,14 +7819,14 @@ void case_783() } void case_784() -#line 5207 "cs-parser.jay" +#line 5210 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_790() -#line 5226 "cs-parser.jay" +#line 5229 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7832,21 +7836,21 @@ void case_790() } void case_791() -#line 5238 "cs-parser.jay" +#line 5241 "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_792() -#line 5246 "cs-parser.jay" +#line 5249 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_794() -#line 5262 "cs-parser.jay" +#line 5265 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7860,14 +7864,14 @@ void case_794() } void case_795() -#line 5274 "cs-parser.jay" +#line 5277 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_798() -#line 5287 "cs-parser.jay" +#line 5290 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7876,14 +7880,14 @@ void case_798() } void case_799() -#line 5294 "cs-parser.jay" +#line 5297 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_807() -#line 5318 "cs-parser.jay" +#line 5321 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7898,14 +7902,14 @@ void case_807() } void case_808() -#line 5334 "cs-parser.jay" +#line 5337 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_809() -#line 5339 "cs-parser.jay" +#line 5342 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7916,7 +7920,7 @@ void case_809() } void case_810() -#line 5348 "cs-parser.jay" +#line 5351 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7929,21 +7933,21 @@ void case_810() } void case_817() -#line 5371 "cs-parser.jay" +#line 5374 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5379 "cs-parser.jay" +#line 5382 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_819() -#line 5387 "cs-parser.jay" +#line 5390 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7951,35 +7955,35 @@ void case_819() } void case_820() -#line 5393 "cs-parser.jay" +#line 5396 "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_821() -#line 5398 "cs-parser.jay" +#line 5401 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5406 "cs-parser.jay" +#line 5409 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5414 "cs-parser.jay" +#line 5417 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_824() -#line 5422 "cs-parser.jay" +#line 5425 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -7997,7 +8001,7 @@ void case_824() } void case_825() -#line 5438 "cs-parser.jay" +#line 5441 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -8013,28 +8017,28 @@ void case_825() } void case_829() -#line 5464 "cs-parser.jay" +#line 5467 "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_830() -#line 5469 "cs-parser.jay" +#line 5472 "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_831() -#line 5474 "cs-parser.jay" +#line 5477 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_832() -#line 5482 "cs-parser.jay" +#line 5485 "cs-parser.jay" { var l = new List (2); @@ -8043,7 +8047,7 @@ void case_832() } void case_833() -#line 5489 "cs-parser.jay" +#line 5492 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8061,7 +8065,7 @@ void case_833() } void case_837() -#line 5517 "cs-parser.jay" +#line 5520 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8078,7 +8082,7 @@ void case_837() } void case_839() -#line 5536 "cs-parser.jay" +#line 5539 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8091,14 +8095,14 @@ void case_839() } void case_842() -#line 5564 "cs-parser.jay" +#line 5567 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_844() -#line 5574 "cs-parser.jay" +#line 5577 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8108,7 +8112,7 @@ void case_844() } void case_845() -#line 5585 "cs-parser.jay" +#line 5588 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8120,14 +8124,14 @@ void case_845() } void case_846() -#line 5595 "cs-parser.jay" +#line 5598 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_847() -#line 5600 "cs-parser.jay" +#line 5603 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8139,7 +8143,7 @@ void case_847() } void case_848() -#line 5613 "cs-parser.jay" +#line 5616 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8151,14 +8155,14 @@ void case_848() } void case_849() -#line 5623 "cs-parser.jay" +#line 5626 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_850() -#line 5628 "cs-parser.jay" +#line 5631 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8170,7 +8174,7 @@ void case_850() } void case_851() -#line 5638 "cs-parser.jay" +#line 5641 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8181,7 +8185,7 @@ void case_851() } void case_853() -#line 5654 "cs-parser.jay" +#line 5657 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8189,7 +8193,7 @@ void case_853() } void case_854() -#line 5666 "cs-parser.jay" +#line 5669 "cs-parser.jay" { lexer.query_parsing = false; @@ -8203,7 +8207,7 @@ void case_854() } void case_855() -#line 5678 "cs-parser.jay" +#line 5681 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8215,7 +8219,7 @@ void case_855() } void case_856() -#line 5689 "cs-parser.jay" +#line 5692 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8225,7 +8229,7 @@ void case_856() } void case_857() -#line 5696 "cs-parser.jay" +#line 5699 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8233,7 +8237,7 @@ void case_857() } void case_858() -#line 5705 "cs-parser.jay" +#line 5708 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8243,7 +8247,7 @@ void case_858() } void case_859() -#line 5713 "cs-parser.jay" +#line 5716 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8257,7 +8261,7 @@ void case_859() } void case_860() -#line 5728 "cs-parser.jay" +#line 5731 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8267,7 +8271,7 @@ void case_860() } void case_861() -#line 5736 "cs-parser.jay" +#line 5739 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8281,7 +8285,7 @@ void case_861() } void case_863() -#line 5755 "cs-parser.jay" +#line 5758 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8294,7 +8298,7 @@ void case_863() } void case_865() -#line 5770 "cs-parser.jay" +#line 5773 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8310,7 +8314,7 @@ void case_865() } void case_866() -#line 5787 "cs-parser.jay" +#line 5790 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8327,14 +8331,14 @@ void case_866() } void case_868() -#line 5803 "cs-parser.jay" +#line 5806 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_870() -#line 5815 "cs-parser.jay" +#line 5818 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8343,7 +8347,7 @@ void case_870() } void case_871() -#line 5822 "cs-parser.jay" +#line 5825 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8353,7 +8357,7 @@ void case_871() } void case_872() -#line 5830 "cs-parser.jay" +#line 5833 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8362,7 +8366,7 @@ void case_872() } void case_873() -#line 5837 "cs-parser.jay" +#line 5840 "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])); @@ -8372,14 +8376,14 @@ void case_873() } void case_877() -#line 5854 "cs-parser.jay" +#line 5857 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_884() -#line 5874 "cs-parser.jay" +#line 5877 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8393,7 +8397,7 @@ void case_884() } void case_886() -#line 5893 "cs-parser.jay" +#line 5896 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8402,7 +8406,7 @@ void case_886() } void case_887() -#line 5903 "cs-parser.jay" +#line 5906 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8412,7 +8416,7 @@ void case_887() } void case_888() -#line 5911 "cs-parser.jay" +#line 5914 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8422,7 +8426,7 @@ void case_888() } void case_889() -#line 5919 "cs-parser.jay" +#line 5922 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8432,7 +8436,7 @@ void case_889() } void case_890() -#line 5927 "cs-parser.jay" +#line 5930 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8472,7 +8476,7 @@ void case_890() } void case_891() -#line 5965 "cs-parser.jay" +#line 5968 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8482,7 +8486,7 @@ void case_891() } void case_892() -#line 5973 "cs-parser.jay" +#line 5976 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8492,7 +8496,7 @@ void case_892() } void case_893() -#line 5981 "cs-parser.jay" +#line 5984 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8502,7 +8506,7 @@ void case_893() } void case_894() -#line 5989 "cs-parser.jay" +#line 5992 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8544,7 +8548,7 @@ void case_894() } void case_898() -#line 6044 "cs-parser.jay" +#line 6047 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8553,7 +8557,7 @@ void case_898() } void case_900() -#line 6055 "cs-parser.jay" +#line 6058 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8562,14 +8566,14 @@ void case_900() } void case_901() -#line 6062 "cs-parser.jay" +#line 6065 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_903() -#line 6071 "cs-parser.jay" +#line 6074 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8578,42 +8582,42 @@ void case_903() } void case_904() -#line 6078 "cs-parser.jay" +#line 6081 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_906() -#line 6090 "cs-parser.jay" +#line 6093 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_907() -#line 6095 "cs-parser.jay" +#line 6098 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6107 "cs-parser.jay" +#line 6110 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_910() -#line 6112 "cs-parser.jay" +#line 6115 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_912() -#line 6122 "cs-parser.jay" +#line 6125 "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*/ @@ -8631,7 +8635,7 @@ void case_912() } void case_913() -#line 6138 "cs-parser.jay" +#line 6141 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8642,7 +8646,7 @@ void case_913() } void case_916() -#line 6165 "cs-parser.jay" +#line 6168 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8674,7 +8678,7 @@ void case_916() } void case_917() -#line 6195 "cs-parser.jay" +#line 6198 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8686,7 +8690,7 @@ void case_917() } void case_927() -#line 6238 "cs-parser.jay" +#line 6241 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8694,7 +8698,7 @@ void case_927() } void case_928() -#line 6244 "cs-parser.jay" +#line 6247 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8703,14 +8707,14 @@ void case_928() } void case_931() -#line 6259 "cs-parser.jay" +#line 6262 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_932() -#line 6264 "cs-parser.jay" +#line 6267 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8720,7 +8724,7 @@ void case_932() } void case_933() -#line 6272 "cs-parser.jay" +#line 6275 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8730,7 +8734,7 @@ void case_933() } void case_934() -#line 6280 "cs-parser.jay" +#line 6283 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8739,7 +8743,7 @@ void case_934() } void case_942() -#line 6318 "cs-parser.jay" +#line 6321 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8747,7 +8751,7 @@ void case_942() } void case_943() -#line 6324 "cs-parser.jay" +#line 6327 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8755,7 +8759,7 @@ void case_943() } void case_944() -#line 6333 "cs-parser.jay" +#line 6336 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12060,7 +12064,7 @@ void case_944() -1, -1, -1, 362, }; -#line 6342 "cs-parser.jay" +#line 6345 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index afc7244f7c..321650fc3f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -147,6 +147,7 @@ namespace Mono.CSharp Location savedAttrParenOpenLocation, savedAttrParenCloseLocation, savedOperatorLocation; Stack> locationListStack = new Stack> (); // used for type parameters List attributeCommas = new List (); + List attributeArgumentCommas = new List (); List parameterListCommas = new List (); List enumCommas = new List (); @@ -797,7 +798,9 @@ attribute ATypeNameExpression expr = mname.GetTypeExpression (); $$ = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname)); if (arguments != null) { - lbag.AddLocation ($$, savedAttrParenOpenLocation, savedAttrParenCloseLocation); + attributeArgumentCommas.Insert (0, savedAttrParenOpenLocation); + attributeArgumentCommas.Add (savedAttrParenCloseLocation); + lbag.AddLocation ($$, attributeArgumentCommas); } } ; @@ -844,7 +847,7 @@ attribute_arguments Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]); args.Add ((Argument) $3); - lbag.AppendTo (args, GetLocation ($2)); + attributeArgumentCommas.Add (GetLocation ($2)); } | attribute_arguments COMMA named_attribute_argument { @@ -854,7 +857,7 @@ attribute_arguments } ((Arguments) o [1]).Add ((Argument) $3); - lbag.AppendTo (o[1], GetLocation ($2)); + attributeArgumentCommas.Add (GetLocation ($2)); } ; From 86806707f2c5def2f237acbc253a345fa9a0c792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:49:56 +0200 Subject: [PATCH 68/92] Fixed endif position. --- .../Parser/CSharpParser.cs | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index e8a133d6c8..de6a54da3f 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -3227,11 +3227,30 @@ namespace ICSharpCode.NRefactory.CSharp // TODO: Proper handling of pre processor directives (atm got treated as comments Ast wise) var directive = special as SpecialsBag.PreProcessorDirective; if (directive != null) { - //FixMe:Search correct #endif newLeaf = new Comment (CommentType.SingleLine, new TextLocation (directive.Line, directive.Col), new TextLocation (directive.EndLine, directive.EndCol + 1)); - if (!directive.Take && i + 1 < top.SpecialsBag.Specials.Count) { - var s = top.SpecialsBag.Specials [i + 1] as SpecialsBag.PreProcessorDirective; - newLeaf = new Comment (CommentType.SingleLine, new TextLocation (directive.Line, directive.Col), new TextLocation (s.Line, s.Col)); + + if (!directive.Take) { + SpecialsBag.PreProcessorDirective endif = null; + int endifLevel = 0; + for (int j = i + 1; j < top.SpecialsBag.Specials.Count; j++) { + var s = top.SpecialsBag.Specials [j] as SpecialsBag.PreProcessorDirective; + if (s == null) + continue; + if (s.Cmd == Tokenizer.PreprocessorDirective.If) { + endifLevel++; + continue; + } + if (s.Cmd == Tokenizer.PreprocessorDirective.Endif) { + if (endifLevel == 0) { + endif = s; + i = j; + break; + } + endifLevel--; + } + } + if (endif != null) + newLeaf = new Comment (CommentType.SingleLine, new TextLocation (directive.Line, directive.Col), new TextLocation (endif.EndLine, endif.EndCol)); } } } From bb591759457e66252326712b87f2cd7dae54a912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 10:55:15 +0200 Subject: [PATCH 69/92] Fixed constraint commas. --- .../Parser/CSharpParser.cs | 7 +- .../Parser/mcs/cs-parser.cs | 1291 +++++++++-------- .../Parser/mcs/cs-parser.jay | 2 + 3 files changed, 654 insertions(+), 646 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index de6a54da3f..ddf27cf687 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2374,8 +2374,13 @@ namespace ICSharpCode.NRefactory.CSharp constraint.AddChild (Identifier.Create (c.TypeParameter.Value, Convert (c.TypeParameter.Location)), InvocationExpression.Roles.Identifier); if (location != null) constraint.AddChild (new CSharpTokenNode (Convert (location [0]), 1), Constraint.ColonRole); - foreach (var expr in c.ConstraintExpressions) + var commaLocs = LocationsBag.GetLocations (c.ConstraintExpressions); + int curComma = 0; + foreach (var expr in c.ConstraintExpressions) { constraint.AddChild (ConvertToType (expr), Constraint.BaseTypeRole); + if (commaLocs != null && curComma < commaLocs.Count) + constraint.AddChild (new CSharpTokenNode (Convert (commaLocs[curComma++]), 1), InvocationExpression.Roles.Comma); + } parent.AddChild (constraint, AstNode.Roles.Constraint); } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index f8035daa55..e9a4d57739 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1520,14 +1520,14 @@ case 64: case_64(); break; case 66: -#line 813 "cs-parser.jay" +#line 814 "cs-parser.jay" { yyVal = null; } break; case 67: case_67(); break; case 68: -#line 824 "cs-parser.jay" +#line 825 "cs-parser.jay" { yyVal = null; } break; case 69: @@ -1543,13 +1543,13 @@ case 72: case_72(); break; case 73: -#line 868 "cs-parser.jay" +#line 869 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 75: -#line 876 "cs-parser.jay" +#line 877 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1561,29 +1561,29 @@ case 77: case_77(); break; case 78: -#line 902 "cs-parser.jay" +#line 903 "cs-parser.jay" { yyVal = null; } break; case 79: -#line 906 "cs-parser.jay" +#line 907 "cs-parser.jay" { yyVal = Argument.AType.Ref; } break; case 80: -#line 910 "cs-parser.jay" +#line 911 "cs-parser.jay" { yyVal = Argument.AType.Out; } break; case 83: -#line 922 "cs-parser.jay" +#line 923 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 84: -#line 926 "cs-parser.jay" +#line 927 "cs-parser.jay" { lexer.parsing_modifiers = true; } @@ -1592,7 +1592,7 @@ case 95: case_95(); break; case 96: -#line 956 "cs-parser.jay" +#line 957 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1613,7 +1613,7 @@ case 101: case_101(); break; case 102: -#line 997 "cs-parser.jay" +#line 998 "cs-parser.jay" { Error_SyntaxError (yyToken); } @@ -1625,13 +1625,13 @@ case 104: case_104(); break; case 107: -#line 1038 "cs-parser.jay" +#line 1039 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 108: -#line 1042 "cs-parser.jay" +#line 1043 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1640,7 +1640,7 @@ case 109: case_109(); break; case 110: -#line 1058 "cs-parser.jay" +#line 1059 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1664,7 +1664,7 @@ case 118: case_118(); break; case 119: -#line 1137 "cs-parser.jay" +#line 1138 "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"); } @@ -1676,13 +1676,13 @@ case 122: case_122(); break; case 125: -#line 1167 "cs-parser.jay" +#line 1168 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 126: -#line 1171 "cs-parser.jay" +#line 1172 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1691,7 +1691,7 @@ case 127: case_127(); break; case 128: -#line 1184 "cs-parser.jay" +#line 1185 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1700,13 +1700,13 @@ case 129: case_129(); break; case 132: -#line 1203 "cs-parser.jay" +#line 1204 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 133: -#line 1207 "cs-parser.jay" +#line 1208 "cs-parser.jay" { current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -1715,7 +1715,7 @@ case 134: case_134(); break; case 135: -#line 1223 "cs-parser.jay" +#line 1224 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1736,13 +1736,13 @@ case 142: case_142(); break; case 143: -#line 1294 "cs-parser.jay" +#line 1295 "cs-parser.jay" { valid_param_mod = ParameterModifierType.All; } break; case 144: -#line 1298 "cs-parser.jay" +#line 1299 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1751,7 +1751,7 @@ case 145: case_145(); break; case 146: -#line 1338 "cs-parser.jay" +#line 1339 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -1760,7 +1760,7 @@ case 147: case_147(); break; case 148: -#line 1348 "cs-parser.jay" +#line 1349 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1772,11 +1772,11 @@ case 150: case_150(); break; case 152: -#line 1422 "cs-parser.jay" +#line 1423 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 153: -#line 1426 "cs-parser.jay" +#line 1427 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 155: @@ -1801,13 +1801,13 @@ case 161: case_161(); break; case 162: -#line 1498 "cs-parser.jay" +#line 1499 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } ); } break; case 163: -#line 1502 "cs-parser.jay" +#line 1503 "cs-parser.jay" { yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true); } @@ -1831,7 +1831,7 @@ case 169: case_169(); break; case 170: -#line 1577 "cs-parser.jay" +#line 1578 "cs-parser.jay" { ++lexer.parsing_block; } @@ -1840,11 +1840,11 @@ case 171: case_171(); break; case 172: -#line 1618 "cs-parser.jay" +#line 1619 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; case 174: -#line 1626 "cs-parser.jay" +#line 1627 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -1877,7 +1877,7 @@ case 183: case_183(); break; case 184: -#line 1715 "cs-parser.jay" +#line 1716 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1898,7 +1898,7 @@ case 189: case_189(); break; case 190: -#line 1769 "cs-parser.jay" +#line 1770 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1907,7 +1907,7 @@ case 191: case_191(); break; case 192: -#line 1798 "cs-parser.jay" +#line 1799 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1937,7 +1937,7 @@ case 205: case_205(); break; case 206: -#line 1947 "cs-parser.jay" +#line 1948 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1955,55 +1955,55 @@ case 210: case_210(); break; case 211: -#line 1984 "cs-parser.jay" +#line 1985 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1996 "cs-parser.jay" +#line 1997 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 2000 "cs-parser.jay" +#line 2001 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 2007 "cs-parser.jay" +#line 2008 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 2011 "cs-parser.jay" +#line 2012 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2019 "cs-parser.jay" +#line 2020 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2023 "cs-parser.jay" +#line 2024 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2027 "cs-parser.jay" +#line 2028 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2033 "cs-parser.jay" +#line 2034 "cs-parser.jay" { } break; @@ -2011,14 +2011,14 @@ case 226: case_226(); break; case 228: -#line 2066 "cs-parser.jay" +#line 2067 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2082 "cs-parser.jay" +#line 2083 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2027,95 +2027,95 @@ case 232: case_232(); break; case 234: -#line 2128 "cs-parser.jay" +#line 2129 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2129 "cs-parser.jay" +#line 2130 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2130 "cs-parser.jay" +#line 2131 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2131 "cs-parser.jay" +#line 2132 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2132 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2133 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2135 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2136 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2138 "cs-parser.jay" +#line 2139 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2139 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2140 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2141 "cs-parser.jay" +#line 2142 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2142 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2143 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2144 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2145 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2146 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2147 "cs-parser.jay" +#line 2148 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2148 "cs-parser.jay" +#line 2149 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2149 "cs-parser.jay" +#line 2150 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2150 "cs-parser.jay" +#line 2151 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2151 "cs-parser.jay" +#line 2152 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2158 "cs-parser.jay" +#line 2159 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2124,7 +2124,7 @@ case 257: case_257(); break; case 258: -#line 2177 "cs-parser.jay" +#line 2178 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2151,11 +2151,11 @@ case 265: case_265(); break; case 267: -#line 2280 "cs-parser.jay" +#line 2281 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2292 "cs-parser.jay" +#line 2293 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2164,7 +2164,7 @@ case 271: case_271(); break; case 272: -#line 2302 "cs-parser.jay" +#line 2303 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2197,7 +2197,7 @@ case 281: case_281(); break; case 283: -#line 2411 "cs-parser.jay" +#line 2412 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2206,13 +2206,13 @@ case 284: case_284(); break; case 287: -#line 2428 "cs-parser.jay" +#line 2429 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2432 "cs-parser.jay" +#line 2433 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2221,7 +2221,7 @@ case 289: case_289(); break; case 290: -#line 2445 "cs-parser.jay" +#line 2446 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2233,7 +2233,7 @@ case 292: case_292(); break; case 293: -#line 2470 "cs-parser.jay" +#line 2471 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2263,7 +2263,7 @@ case 303: case_303(); break; case 305: -#line 2564 "cs-parser.jay" +#line 2565 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2287,7 +2287,7 @@ case 312: case_312(); break; case 315: -#line 2632 "cs-parser.jay" +#line 2633 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2305,7 +2305,7 @@ case 320: case_320(); break; case 321: -#line 2690 "cs-parser.jay" +#line 2691 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2314,7 +2314,7 @@ case 322: case_322(); break; case 323: -#line 2712 "cs-parser.jay" +#line 2713 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2347,7 +2347,7 @@ case 336: case_336(); break; case 337: -#line 2817 "cs-parser.jay" +#line 2818 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2392,13 +2392,13 @@ case 352: case_352(); break; case 354: -#line 2938 "cs-parser.jay" +#line 2939 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 355: -#line 2945 "cs-parser.jay" +#line 2946 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2413,7 +2413,7 @@ case 361: case_361(); break; case 363: -#line 2983 "cs-parser.jay" +#line 2984 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2422,7 +2422,7 @@ case 364: case_364(); break; case 365: -#line 3003 "cs-parser.jay" +#line 3004 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2431,13 +2431,13 @@ case 366: case_366(); break; case 367: -#line 3012 "cs-parser.jay" +#line 3013 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 368: -#line 3016 "cs-parser.jay" +#line 3017 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2455,63 +2455,63 @@ case 372: case_372(); break; case 373: -#line 3055 "cs-parser.jay" +#line 3056 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3056 "cs-parser.jay" +#line 3057 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3057 "cs-parser.jay" +#line 3058 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3058 "cs-parser.jay" +#line 3059 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3059 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 378: -#line 3060 "cs-parser.jay" +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3065 "cs-parser.jay" +#line 3066 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3066 "cs-parser.jay" +#line 3067 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3067 "cs-parser.jay" +#line 3068 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3068 "cs-parser.jay" +#line 3069 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3069 "cs-parser.jay" +#line 3070 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3070 "cs-parser.jay" +#line 3071 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3071 "cs-parser.jay" +#line 3072 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3072 "cs-parser.jay" +#line 3073 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3073 "cs-parser.jay" +#line 3074 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 409: @@ -2521,22 +2521,22 @@ case 410: case_410(); break; case 414: -#line 3120 "cs-parser.jay" +#line 3121 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3124 "cs-parser.jay" +#line 3125 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 416: -#line 3125 "cs-parser.jay" +#line 3126 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 421: case_421(); break; case 422: -#line 3158 "cs-parser.jay" +#line 3159 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2554,7 +2554,7 @@ case 426: case_426(); break; case 427: -#line 3193 "cs-parser.jay" +#line 3194 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2563,7 +2563,7 @@ case 428: case_428(); break; case 429: -#line 3201 "cs-parser.jay" +#line 3202 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2575,7 +2575,7 @@ case 431: case_431(); break; case 432: -#line 3217 "cs-parser.jay" +#line 3218 "cs-parser.jay" { yyVal = null; } break; case 434: @@ -2585,11 +2585,11 @@ case 435: case_435(); break; case 436: -#line 3240 "cs-parser.jay" +#line 3241 "cs-parser.jay" { yyVal = null; } break; case 437: -#line 3244 "cs-parser.jay" +#line 3245 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2607,7 +2607,7 @@ case 441: case_441(); break; case 442: -#line 3277 "cs-parser.jay" +#line 3278 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2622,7 +2622,7 @@ case 445: case_445(); break; case 448: -#line 3305 "cs-parser.jay" +#line 3306 "cs-parser.jay" { yyVal = null; } break; case 450: @@ -2641,7 +2641,7 @@ case 454: case_454(); break; case 455: -#line 3357 "cs-parser.jay" +#line 3358 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2677,13 +2677,13 @@ case 469: case_469(); break; case 470: -#line 3444 "cs-parser.jay" +#line 3445 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 472: -#line 3452 "cs-parser.jay" +#line 3453 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2695,13 +2695,13 @@ case 474: case_474(); break; case 475: -#line 3472 "cs-parser.jay" +#line 3473 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 476: -#line 3479 "cs-parser.jay" +#line 3480 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2728,7 +2728,7 @@ case 483: case_483(); break; case 484: -#line 3545 "cs-parser.jay" +#line 3546 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2740,7 +2740,7 @@ case 486: case_486(); break; case 489: -#line 3572 "cs-parser.jay" +#line 3573 "cs-parser.jay" { yyVal = null; } break; case 491: @@ -2771,25 +2771,25 @@ case 502: case_502(); break; case 503: -#line 3650 "cs-parser.jay" +#line 3651 "cs-parser.jay" { yyVal = 2; } break; case 504: -#line 3654 "cs-parser.jay" +#line 3655 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 505: -#line 3661 "cs-parser.jay" +#line 3662 "cs-parser.jay" { yyVal = null; } break; case 506: -#line 3665 "cs-parser.jay" +#line 3666 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2807,7 +2807,7 @@ case 510: case_510(); break; case 511: -#line 3709 "cs-parser.jay" +#line 3710 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2852,7 +2852,7 @@ case 526: case_526(); break; case 527: -#line 3829 "cs-parser.jay" +#line 3830 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2861,25 +2861,25 @@ case 528: case_528(); break; case 529: -#line 3842 "cs-parser.jay" +#line 3843 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 530: -#line 3846 "cs-parser.jay" +#line 3847 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 531: -#line 3853 "cs-parser.jay" +#line 3854 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 533: -#line 3861 "cs-parser.jay" +#line 3862 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2891,13 +2891,13 @@ case 535: case_535(); break; case 537: -#line 3887 "cs-parser.jay" +#line 3888 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 538: -#line 3891 "cs-parser.jay" +#line 3892 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2909,37 +2909,37 @@ case 542: case_542(); break; case 544: -#line 3921 "cs-parser.jay" +#line 3922 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3925 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3929 "cs-parser.jay" +#line 3930 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3933 "cs-parser.jay" +#line 3934 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3937 "cs-parser.jay" +#line 3938 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 549: -#line 3941 "cs-parser.jay" +#line 3942 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2957,7 +2957,7 @@ case 555: case_555(); break; case 556: -#line 3973 "cs-parser.jay" +#line 3974 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2966,13 +2966,13 @@ case 557: case_557(); break; case 558: -#line 3982 "cs-parser.jay" +#line 3983 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3986 "cs-parser.jay" +#line 3987 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3023,7 +3023,7 @@ case 584: case_584(); break; case 585: -#line 4110 "cs-parser.jay" +#line 4111 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3074,14 +3074,14 @@ case 600: case_600(); break; case 601: -#line 4207 "cs-parser.jay" +#line 4208 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 602: case_602(); break; case 605: -#line 4222 "cs-parser.jay" +#line 4223 "cs-parser.jay" { start_block (lexer.Location); } @@ -3105,7 +3105,7 @@ case 612: case_612(); break; case 613: -#line 4267 "cs-parser.jay" +#line 4268 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3117,7 +3117,7 @@ case 615: case_615(); break; case 616: -#line 4281 "cs-parser.jay" +#line 4282 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3129,7 +3129,7 @@ case 618: case_618(); break; case 624: -#line 4306 "cs-parser.jay" +#line 4307 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3144,13 +3144,13 @@ case 627: case_627(); break; case 629: -#line 4335 "cs-parser.jay" +#line 4336 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 630: -#line 4348 "cs-parser.jay" +#line 4349 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3168,18 +3168,18 @@ case 634: case_634(); break; case 635: -#line 4391 "cs-parser.jay" +#line 4392 "cs-parser.jay" { yyVal = null; } break; case 636: -#line 4393 "cs-parser.jay" +#line 4394 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 637: case_637(); break; case 638: -#line 4406 "cs-parser.jay" +#line 4407 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3236,7 +3236,7 @@ case 657: case_657(); break; case 659: -#line 4526 "cs-parser.jay" +#line 4527 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3266,19 +3266,19 @@ case 667: case_667(); break; case 668: -#line 4616 "cs-parser.jay" +#line 4618 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4620 "cs-parser.jay" +#line 4622 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 670: -#line 4627 "cs-parser.jay" +#line 4629 "cs-parser.jay" { yyVal = Variance.None; } @@ -3296,7 +3296,7 @@ case 674: case_674(); break; case 675: -#line 4672 "cs-parser.jay" +#line 4674 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3314,13 +3314,13 @@ case 679: case_679(); break; case 684: -#line 4716 "cs-parser.jay" +#line 4718 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 685: -#line 4720 "cs-parser.jay" +#line 4722 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3329,13 +3329,13 @@ case 687: case_687(); break; case 690: -#line 4744 "cs-parser.jay" +#line 4746 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 691: -#line 4748 "cs-parser.jay" +#line 4750 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3368,13 +3368,13 @@ case 730: case_730(); break; case 731: -#line 4892 "cs-parser.jay" +#line 4894 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 732: -#line 4896 "cs-parser.jay" +#line 4898 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3386,7 +3386,7 @@ case 735: case_735(); break; case 736: -#line 4917 "cs-parser.jay" +#line 4919 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3419,7 +3419,7 @@ case 751: case_751(); break; case 752: -#line 5017 "cs-parser.jay" +#line 5019 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3440,15 +3440,15 @@ case 762: case_762(); break; case 763: -#line 5067 "cs-parser.jay" +#line 5069 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5071 "cs-parser.jay" +#line 5073 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: -#line 5072 "cs-parser.jay" +#line 5074 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 766: @@ -3467,7 +3467,7 @@ case 772: case_772(); break; case 773: -#line 5140 "cs-parser.jay" +#line 5142 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3488,13 +3488,13 @@ case 779: case_779(); break; case 780: -#line 5184 "cs-parser.jay" +#line 5186 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 781: -#line 5188 "cs-parser.jay" +#line 5190 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3509,7 +3509,7 @@ case 784: case_784(); break; case 785: -#line 5217 "cs-parser.jay" +#line 5219 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3524,7 +3524,7 @@ case 792: case_792(); break; case 793: -#line 5256 "cs-parser.jay" +#line 5258 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3536,7 +3536,7 @@ case 795: case_795(); break; case 796: -#line 5284 "cs-parser.jay" +#line 5286 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 798: @@ -3546,11 +3546,11 @@ case 799: case_799(); break; case 801: -#line 5305 "cs-parser.jay" +#line 5307 "cs-parser.jay" { yyVal = null; } break; case 803: -#line 5310 "cs-parser.jay" +#line 5312 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 807: @@ -3593,7 +3593,7 @@ case 825: case_825(); break; case 828: -#line 5465 "cs-parser.jay" +#line 5467 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3614,7 +3614,7 @@ case 833: case_833(); break; case 836: -#line 5518 "cs-parser.jay" +#line 5520 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3623,7 +3623,7 @@ case 837: case_837(); break; case 838: -#line 5537 "cs-parser.jay" +#line 5539 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3632,13 +3632,13 @@ case 839: case_839(); break; case 840: -#line 5555 "cs-parser.jay" +#line 5557 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 841: -#line 5562 "cs-parser.jay" +#line 5564 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3647,7 +3647,7 @@ case 842: case_842(); break; case 843: -#line 5572 "cs-parser.jay" +#line 5574 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3677,7 +3677,7 @@ case 851: case_851(); break; case 852: -#line 5655 "cs-parser.jay" +#line 5657 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3710,7 +3710,7 @@ case 861: case_861(); break; case 862: -#line 5756 "cs-parser.jay" +#line 5758 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3719,7 +3719,7 @@ case 863: case_863(); break; case 864: -#line 5771 "cs-parser.jay" +#line 5773 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3734,7 +3734,7 @@ case 868: case_868(); break; case 869: -#line 5816 "cs-parser.jay" +#line 5818 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3755,7 +3755,7 @@ case 877: case_877(); break; case 883: -#line 5875 "cs-parser.jay" +#line 5877 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3764,7 +3764,7 @@ case 884: case_884(); break; case 885: -#line 5894 "cs-parser.jay" +#line 5896 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3797,13 +3797,13 @@ case 894: case_894(); break; case 896: -#line 6038 "cs-parser.jay" +#line 6040 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 897: -#line 6045 "cs-parser.jay" +#line 6047 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3824,7 +3824,7 @@ case 904: case_904(); break; case 905: -#line 6091 "cs-parser.jay" +#line 6093 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3836,7 +3836,7 @@ case 907: case_907(); break; case 908: -#line 6108 "cs-parser.jay" +#line 6110 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3860,13 +3860,13 @@ case 917: case_917(); break; case 925: -#line 6232 "cs-parser.jay" +#line 6234 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 926: -#line 6239 "cs-parser.jay" +#line 6241 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3878,13 +3878,13 @@ case 928: case_928(); break; case 929: -#line 6256 "cs-parser.jay" +#line 6258 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 930: -#line 6260 "cs-parser.jay" +#line 6262 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3902,25 +3902,25 @@ case 934: case_934(); break; case 936: -#line 6296 "cs-parser.jay" +#line 6298 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 938: -#line 6304 "cs-parser.jay" +#line 6306 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 939: -#line 6308 "cs-parser.jay" +#line 6310 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 940: -#line 6315 "cs-parser.jay" +#line 6317 "cs-parser.jay" { yyVal = new List (0); } @@ -4281,12 +4281,12 @@ void case_64() attributeArgumentCommas.Insert (0, savedAttrParenOpenLocation); attributeArgumentCommas.Add (savedAttrParenCloseLocation); lbag.AddLocation (yyVal, attributeArgumentCommas); - attributeArgumentCommas.Clear (); + attributeArgumentCommas.Clear (); } } void case_67() -#line 815 "cs-parser.jay" +#line 816 "cs-parser.jay" { savedAttrParenOpenLocation = GetLocation (yyVals[-2+yyTop]); savedAttrParenCloseLocation = GetLocation (yyVals[0+yyTop]); @@ -4294,7 +4294,7 @@ void case_67() } void case_69() -#line 826 "cs-parser.jay" +#line 827 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4302,7 +4302,7 @@ void case_69() } void case_70() -#line 832 "cs-parser.jay" +#line 833 "cs-parser.jay" { Arguments a = new Arguments (4); a.Add ((Argument) yyVals[0+yyTop]); @@ -4310,7 +4310,7 @@ void case_70() } void case_71() -#line 838 "cs-parser.jay" +#line 839 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] != null) { @@ -4327,7 +4327,7 @@ void case_71() } void case_72() -#line 853 "cs-parser.jay" +#line 854 "cs-parser.jay" { Arguments[] o = (Arguments[]) yyVals[-2+yyTop]; if (o [1] == null) { @@ -4339,7 +4339,7 @@ void case_72() } void case_76() -#line 878 "cs-parser.jay" +#line 879 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4348,7 +4348,7 @@ void case_76() } void case_77() -#line 888 "cs-parser.jay" +#line 889 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument"); @@ -4362,7 +4362,7 @@ void case_77() } void case_95() -#line 941 "cs-parser.jay" +#line 942 "cs-parser.jay" { report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration", GetSymbolName (yyToken)); @@ -4371,7 +4371,7 @@ void case_95() } void case_97() -#line 958 "cs-parser.jay" +#line 959 "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]); @@ -4379,7 +4379,7 @@ void case_97() } void case_98() -#line 965 "cs-parser.jay" +#line 966 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -4393,14 +4393,14 @@ void case_98() } void case_99() -#line 977 "cs-parser.jay" +#line 978 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; } void case_100() -#line 982 "cs-parser.jay" +#line 983 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop])); --lexer.parsing_declaration; @@ -4409,7 +4409,7 @@ void case_100() } void case_101() -#line 989 "cs-parser.jay" +#line 990 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[-1+yyTop]); @@ -4417,7 +4417,7 @@ void case_101() } void case_103() -#line 1004 "cs-parser.jay" +#line 1005 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var mod = (Modifiers) yyVals[-3+yyTop]; @@ -4432,7 +4432,7 @@ void case_103() } void case_104() -#line 1017 "cs-parser.jay" +#line 1018 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4445,7 +4445,7 @@ void case_104() } void case_109() -#line 1047 "cs-parser.jay" +#line 1048 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4453,7 +4453,7 @@ void case_109() } void case_111() -#line 1060 "cs-parser.jay" +#line 1061 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -4461,14 +4461,14 @@ void case_111() } void case_112() -#line 1066 "cs-parser.jay" +#line 1067 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); yyVal = null; } void case_115() -#line 1081 "cs-parser.jay" +#line 1082 "cs-parser.jay" { lexer.parsing_generic_declaration = false; @@ -4483,7 +4483,7 @@ void case_115() } void case_116() -#line 1096 "cs-parser.jay" +#line 1097 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4496,7 +4496,7 @@ void case_116() } void case_117() -#line 1109 "cs-parser.jay" +#line 1110 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers"); @@ -4509,7 +4509,7 @@ void case_117() } void case_118() -#line 1120 "cs-parser.jay" +#line 1121 "cs-parser.jay" { if (doc_support) { current_field.DocComment = Lexer.consume_doc_comment (); @@ -4523,7 +4523,7 @@ void case_118() } void case_121() -#line 1143 "cs-parser.jay" +#line 1144 "cs-parser.jay" { ++lexer.parsing_block; current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -4531,7 +4531,7 @@ void case_121() } void case_122() -#line 1149 "cs-parser.jay" +#line 1150 "cs-parser.jay" { --lexer.parsing_block; current_field.Initializer = (Expression) yyVals[0+yyTop]; @@ -4541,7 +4541,7 @@ void case_122() } void case_127() -#line 1176 "cs-parser.jay" +#line 1177 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -4549,7 +4549,7 @@ void case_127() } void case_129() -#line 1186 "cs-parser.jay" +#line 1187 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -4558,7 +4558,7 @@ void case_129() } void case_134() -#line 1212 "cs-parser.jay" +#line 1213 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]); @@ -4566,7 +4566,7 @@ void case_134() } void case_136() -#line 1225 "cs-parser.jay" +#line 1226 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])); @@ -4574,14 +4574,14 @@ void case_136() } void case_137() -#line 1231 "cs-parser.jay" +#line 1232 "cs-parser.jay" { report.Error (443, lexer.Location, "Value or constant expected"); yyVal = null; } void case_140() -#line 1241 "cs-parser.jay" +#line 1242 "cs-parser.jay" { /* It has to be here for the parent to safely restore artificial block*/ Error_SyntaxError (yyToken); @@ -4589,7 +4589,7 @@ void case_140() } void case_141() -#line 1250 "cs-parser.jay" +#line 1251 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.NotAllowed; @@ -4601,7 +4601,7 @@ void case_141() } void case_142() -#line 1260 "cs-parser.jay" +#line 1261 "cs-parser.jay" { Method method = (Method) yyVals[-2+yyTop]; method.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -4629,7 +4629,7 @@ void case_142() } void case_145() -#line 1300 "cs-parser.jay" +#line 1301 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4664,14 +4664,14 @@ void case_145() } void case_147() -#line 1341 "cs-parser.jay" +#line 1342 "cs-parser.jay" { lexer.parsing_generic_declaration = false; valid_param_mod = ParameterModifierType.All; } void case_149() -#line 1350 "cs-parser.jay" +#line 1351 "cs-parser.jay" { lexer.ConstraintsParsing = false; valid_param_mod = 0; @@ -4723,7 +4723,7 @@ void case_149() } void case_150() -#line 1403 "cs-parser.jay" +#line 1404 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-3+yyTop]; report.Error (1585, name.Location, @@ -4741,7 +4741,7 @@ void case_150() } void case_155() -#line 1432 "cs-parser.jay" +#line 1433 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -4749,7 +4749,7 @@ void case_155() } void case_156() -#line 1438 "cs-parser.jay" +#line 1439 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add ((Parameter) yyVals[0+yyTop]); @@ -4760,7 +4760,7 @@ void case_156() } void case_157() -#line 1447 "cs-parser.jay" +#line 1448 "cs-parser.jay" { var pars_list = (List) yyVals[-2+yyTop]; pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop]))); @@ -4771,7 +4771,7 @@ void case_157() } void case_158() -#line 1456 "cs-parser.jay" +#line 1457 "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"); @@ -4781,7 +4781,7 @@ void case_158() } void case_159() -#line 1464 "cs-parser.jay" +#line 1465 "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"); @@ -4796,7 +4796,7 @@ void case_159() } void case_160() -#line 1477 "cs-parser.jay" +#line 1478 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4805,7 +4805,7 @@ void case_160() } void case_161() -#line 1484 "cs-parser.jay" +#line 1485 "cs-parser.jay" { report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list"); @@ -4819,14 +4819,14 @@ void case_161() } void case_164() -#line 1504 "cs-parser.jay" +#line 1505 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = ParametersCompiled.EmptyReadOnlyParameters; } void case_165() -#line 1512 "cs-parser.jay" +#line 1513 "cs-parser.jay" { parameters_bucket.Clear (); Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4837,7 +4837,7 @@ void case_165() } void case_166() -#line 1521 "cs-parser.jay" +#line 1522 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter) yyVals[0+yyTop]; @@ -4857,7 +4857,7 @@ void case_166() } void case_167() -#line 1545 "cs-parser.jay" +#line 1546 "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); @@ -4865,7 +4865,7 @@ void case_167() } void case_168() -#line 1554 "cs-parser.jay" +#line 1555 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name"); @@ -4874,7 +4874,7 @@ void case_168() } void case_169() -#line 1564 "cs-parser.jay" +#line 1565 "cs-parser.jay" { Error_SyntaxError (yyToken); Location l = GetLocation (yyVals[0+yyTop]); @@ -4883,7 +4883,7 @@ void case_169() } void case_171() -#line 1579 "cs-parser.jay" +#line 1580 "cs-parser.jay" { --lexer.parsing_block; if (lang_version <= LanguageVersion.V_3) { @@ -4922,7 +4922,7 @@ void case_171() } void case_175() -#line 1628 "cs-parser.jay" +#line 1629 "cs-parser.jay" { Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop]; Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2; @@ -4945,7 +4945,7 @@ void case_175() } void case_176() -#line 1652 "cs-parser.jay" +#line 1653 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Ref) == 0) Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop])); @@ -4954,7 +4954,7 @@ void case_176() } void case_177() -#line 1659 "cs-parser.jay" +#line 1660 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Out) == 0) Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop])); @@ -4963,7 +4963,7 @@ void case_177() } void case_178() -#line 1666 "cs-parser.jay" +#line 1667 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.This) == 0) Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop])); @@ -4975,14 +4975,14 @@ void case_178() } void case_179() -#line 1679 "cs-parser.jay" +#line 1680 "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_180() -#line 1684 "cs-parser.jay" +#line 1685 "cs-parser.jay" { report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array"); @@ -4991,21 +4991,21 @@ void case_180() } void case_181() -#line 1691 "cs-parser.jay" +#line 1692 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1699 "cs-parser.jay" +#line 1700 "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"); } void case_183() -#line 1704 "cs-parser.jay" +#line 1705 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -5016,21 +5016,21 @@ void case_183() } void case_185() -#line 1720 "cs-parser.jay" +#line 1721 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1731 "cs-parser.jay" +#line 1732 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1736 "cs-parser.jay" +#line 1737 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5046,7 +5046,7 @@ void case_187() } void case_188() -#line 1750 "cs-parser.jay" +#line 1751 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5055,14 +5055,14 @@ void case_188() } void case_189() -#line 1757 "cs-parser.jay" +#line 1758 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1771 "cs-parser.jay" +#line 1772 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5089,7 +5089,7 @@ void case_191() } void case_193() -#line 1800 "cs-parser.jay" +#line 1801 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5102,7 +5102,7 @@ void case_193() } void case_198() -#line 1819 "cs-parser.jay" +#line 1820 "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 ()); @@ -5115,7 +5115,7 @@ void case_198() } void case_199() -#line 1833 "cs-parser.jay" +#line 1834 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5138,7 +5138,7 @@ void case_199() } void case_200() -#line 1854 "cs-parser.jay" +#line 1855 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5161,7 +5161,7 @@ void case_200() } void case_201() -#line 1878 "cs-parser.jay" +#line 1879 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5189,7 +5189,7 @@ void case_201() } void case_202() -#line 1904 "cs-parser.jay" +#line 1905 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5212,21 +5212,21 @@ void case_202() } void case_204() -#line 1929 "cs-parser.jay" +#line 1930 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1934 "cs-parser.jay" +#line 1935 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1949 "cs-parser.jay" +#line 1950 "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]); @@ -5234,7 +5234,7 @@ void case_207() } void case_208() -#line 1956 "cs-parser.jay" +#line 1957 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5249,7 +5249,7 @@ void case_208() } void case_209() -#line 1969 "cs-parser.jay" +#line 1970 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5257,7 +5257,7 @@ void case_209() } void case_210() -#line 1975 "cs-parser.jay" +#line 1976 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5266,7 +5266,7 @@ void case_210() } void case_226() -#line 2035 "cs-parser.jay" +#line 2036 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5296,14 +5296,14 @@ void case_226() } void case_230() -#line 2072 "cs-parser.jay" +#line 2073 "cs-parser.jay" { 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_232() -#line 2084 "cs-parser.jay" +#line 2085 "cs-parser.jay" { valid_param_mod = 0; @@ -5345,7 +5345,7 @@ void case_232() } void case_257() -#line 2160 "cs-parser.jay" +#line 2161 "cs-parser.jay" { valid_param_mod = 0; @@ -5362,7 +5362,7 @@ void case_257() } void case_259() -#line 2179 "cs-parser.jay" +#line 2180 "cs-parser.jay" { valid_param_mod = 0; @@ -5379,7 +5379,7 @@ void case_259() } void case_260() -#line 2194 "cs-parser.jay" +#line 2195 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5387,7 +5387,7 @@ void case_260() } void case_261() -#line 2200 "cs-parser.jay" +#line 2201 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5395,7 +5395,7 @@ void case_261() } void case_262() -#line 2210 "cs-parser.jay" +#line 2211 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5411,7 +5411,7 @@ void case_262() } void case_263() -#line 2229 "cs-parser.jay" +#line 2230 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5422,7 +5422,7 @@ void case_263() } void case_264() -#line 2238 "cs-parser.jay" +#line 2239 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5435,7 +5435,7 @@ void case_264() } void case_265() -#line 2249 "cs-parser.jay" +#line 2250 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5465,7 +5465,7 @@ void case_265() } void case_271() -#line 2294 "cs-parser.jay" +#line 2295 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5473,7 +5473,7 @@ void case_271() } void case_273() -#line 2304 "cs-parser.jay" +#line 2305 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5481,14 +5481,14 @@ void case_273() } void case_274() -#line 2310 "cs-parser.jay" +#line 2311 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2318 "cs-parser.jay" +#line 2319 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5499,7 +5499,7 @@ void case_275() } void case_276() -#line 2327 "cs-parser.jay" +#line 2328 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5521,7 +5521,7 @@ void case_276() } void case_277() -#line 2352 "cs-parser.jay" +#line 2353 "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); @@ -5535,7 +5535,7 @@ void case_277() } void case_278() -#line 2366 "cs-parser.jay" +#line 2367 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5547,7 +5547,7 @@ void case_278() } void case_279() -#line 2379 "cs-parser.jay" +#line 2380 "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); @@ -5557,7 +5557,7 @@ void case_279() } void case_280() -#line 2387 "cs-parser.jay" +#line 2388 "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"); @@ -5566,7 +5566,7 @@ void case_280() } void case_281() -#line 2394 "cs-parser.jay" +#line 2395 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5579,14 +5579,14 @@ void case_281() } void case_284() -#line 2413 "cs-parser.jay" +#line 2414 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2437 "cs-parser.jay" +#line 2438 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5594,7 +5594,7 @@ void case_289() } void case_291() -#line 2447 "cs-parser.jay" +#line 2448 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5603,7 +5603,7 @@ void case_291() } void case_292() -#line 2456 "cs-parser.jay" +#line 2457 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5617,28 +5617,28 @@ void case_292() } void case_296() -#line 2477 "cs-parser.jay" +#line 2478 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2482 "cs-parser.jay" +#line 2483 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2487 "cs-parser.jay" +#line 2488 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2495 "cs-parser.jay" +#line 2496 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5652,7 +5652,7 @@ void case_299() } void case_300() -#line 2507 "cs-parser.jay" +#line 2508 "cs-parser.jay" { lexer.EventParsing = true; @@ -5667,7 +5667,7 @@ void case_300() } void case_301() -#line 2523 "cs-parser.jay" +#line 2524 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5681,7 +5681,7 @@ void case_301() } void case_302() -#line 2535 "cs-parser.jay" +#line 2536 "cs-parser.jay" { lexer.EventParsing = true; @@ -5696,21 +5696,21 @@ void case_302() } void case_303() -#line 2551 "cs-parser.jay" +#line 2552 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_306() -#line 2567 "cs-parser.jay" +#line 2568 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_307() -#line 2572 "cs-parser.jay" +#line 2573 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5725,7 +5725,7 @@ void case_307() } void case_308() -#line 2585 "cs-parser.jay" +#line 2586 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5733,7 +5733,7 @@ void case_308() } void case_309() -#line 2591 "cs-parser.jay" +#line 2592 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5749,7 +5749,7 @@ void case_309() } void case_311() -#line 2609 "cs-parser.jay" +#line 2610 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5762,21 +5762,21 @@ void case_311() } void case_312() -#line 2620 "cs-parser.jay" +#line 2621 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_317() -#line 2638 "cs-parser.jay" +#line 2639 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_318() -#line 2646 "cs-parser.jay" +#line 2647 "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]); @@ -5791,7 +5791,7 @@ void case_318() } void case_319() -#line 2659 "cs-parser.jay" +#line 2660 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5801,7 +5801,7 @@ void case_319() } void case_320() -#line 2667 "cs-parser.jay" +#line 2668 "cs-parser.jay" { --lexer.parsing_block; @@ -5817,7 +5817,7 @@ void case_320() } void case_322() -#line 2692 "cs-parser.jay" +#line 2693 "cs-parser.jay" { valid_param_mod = 0; @@ -5837,7 +5837,7 @@ void case_322() } void case_324() -#line 2714 "cs-parser.jay" +#line 2715 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5853,7 +5853,7 @@ void case_324() } void case_326() -#line 2732 "cs-parser.jay" +#line 2733 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5862,7 +5862,7 @@ void case_326() } void case_328() -#line 2743 "cs-parser.jay" +#line 2744 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5871,7 +5871,7 @@ void case_328() } void case_330() -#line 2754 "cs-parser.jay" +#line 2755 "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) { @@ -5880,14 +5880,14 @@ void case_330() } void case_331() -#line 2764 "cs-parser.jay" +#line 2765 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_333() -#line 2776 "cs-parser.jay" +#line 2777 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5900,14 +5900,14 @@ void case_333() } void case_334() -#line 2787 "cs-parser.jay" +#line 2788 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_335() -#line 2795 "cs-parser.jay" +#line 2796 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5916,7 +5916,7 @@ void case_335() } void case_336() -#line 2802 "cs-parser.jay" +#line 2803 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5925,7 +5925,7 @@ void case_336() } void case_338() -#line 2819 "cs-parser.jay" +#line 2820 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5933,7 +5933,7 @@ void case_338() } void case_339() -#line 2828 "cs-parser.jay" +#line 2829 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5942,7 +5942,7 @@ void case_339() } void case_341() -#line 2839 "cs-parser.jay" +#line 2840 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5950,21 +5950,21 @@ void case_341() } void case_342() -#line 2848 "cs-parser.jay" +#line 2849 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_343() -#line 2853 "cs-parser.jay" +#line 2854 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); } void case_344() -#line 2861 "cs-parser.jay" +#line 2862 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5972,7 +5972,7 @@ void case_344() } void case_345() -#line 2867 "cs-parser.jay" +#line 2868 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5982,7 +5982,7 @@ void case_345() } void case_346() -#line 2875 "cs-parser.jay" +#line 2876 "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); @@ -5990,7 +5990,7 @@ void case_346() } void case_348() -#line 2885 "cs-parser.jay" +#line 2886 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -6000,7 +6000,7 @@ void case_348() } void case_349() -#line 2896 "cs-parser.jay" +#line 2897 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6008,7 +6008,7 @@ void case_349() } void case_350() -#line 2902 "cs-parser.jay" +#line 2903 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6017,7 +6017,7 @@ void case_350() } void case_351() -#line 2912 "cs-parser.jay" +#line 2913 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6027,7 +6027,7 @@ void case_351() } void case_352() -#line 2920 "cs-parser.jay" +#line 2921 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6038,28 +6038,28 @@ void case_352() } void case_357() -#line 2954 "cs-parser.jay" +#line 2955 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_359() -#line 2963 "cs-parser.jay" +#line 2964 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_361() -#line 2972 "cs-parser.jay" +#line 2973 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_364() -#line 2988 "cs-parser.jay" +#line 2989 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6074,14 +6074,14 @@ void case_364() } void case_366() -#line 3005 "cs-parser.jay" +#line 3006 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_369() -#line 3021 "cs-parser.jay" +#line 3022 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6089,7 +6089,7 @@ void case_369() } void case_370() -#line 3027 "cs-parser.jay" +#line 3028 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6098,7 +6098,7 @@ void case_370() } void case_371() -#line 3037 "cs-parser.jay" +#line 3038 "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 ()); @@ -6107,35 +6107,35 @@ void case_371() } void case_372() -#line 3044 "cs-parser.jay" +#line 3045 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_409() -#line 3106 "cs-parser.jay" +#line 3107 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_410() -#line 3110 "cs-parser.jay" +#line 3111 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_421() -#line 3151 "cs-parser.jay" +#line 3152 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_423() -#line 3163 "cs-parser.jay" +#line 3164 "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) { @@ -6144,7 +6144,7 @@ void case_423() } void case_424() -#line 3170 "cs-parser.jay" +#line 3171 "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) { @@ -6153,7 +6153,7 @@ void case_424() } void case_425() -#line 3177 "cs-parser.jay" +#line 3178 "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) { @@ -6162,7 +6162,7 @@ void case_425() } void case_426() -#line 3184 "cs-parser.jay" +#line 3185 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6172,28 +6172,28 @@ void case_426() } void case_428() -#line 3194 "cs-parser.jay" +#line 3195 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3202 "cs-parser.jay" +#line 3203 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_431() -#line 3210 "cs-parser.jay" +#line 3211 "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_434() -#line 3223 "cs-parser.jay" +#line 3224 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6205,14 +6205,14 @@ void case_434() } void case_435() -#line 3233 "cs-parser.jay" +#line 3234 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_438() -#line 3249 "cs-parser.jay" +#line 3250 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6220,7 +6220,7 @@ void case_438() } void case_439() -#line 3255 "cs-parser.jay" +#line 3256 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6229,14 +6229,14 @@ void case_439() } void case_440() -#line 3261 "cs-parser.jay" +#line 3262 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_441() -#line 3269 "cs-parser.jay" +#line 3270 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6244,7 +6244,7 @@ void case_441() } void case_443() -#line 3278 "cs-parser.jay" +#line 3279 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6254,7 +6254,7 @@ void case_443() } void case_444() -#line 3286 "cs-parser.jay" +#line 3287 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6263,14 +6263,14 @@ void case_444() } void case_445() -#line 3293 "cs-parser.jay" +#line 3294 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_450() -#line 3311 "cs-parser.jay" +#line 3312 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6278,7 +6278,7 @@ void case_450() } void case_451() -#line 3317 "cs-parser.jay" +#line 3318 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6290,7 +6290,7 @@ void case_451() } void case_452() -#line 3327 "cs-parser.jay" +#line 3328 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6307,56 +6307,56 @@ void case_452() } void case_453() -#line 3342 "cs-parser.jay" +#line 3343 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_454() -#line 3347 "cs-parser.jay" +#line 3348 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_459() -#line 3368 "cs-parser.jay" +#line 3369 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3373 "cs-parser.jay" +#line 3374 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_461() -#line 3378 "cs-parser.jay" +#line 3379 "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_462() -#line 3383 "cs-parser.jay" +#line 3384 "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_464() -#line 3395 "cs-parser.jay" +#line 3396 "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_465() -#line 3403 "cs-parser.jay" +#line 3404 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6364,7 +6364,7 @@ void case_465() } void case_466() -#line 3409 "cs-parser.jay" +#line 3410 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6373,14 +6373,14 @@ void case_466() } void case_467() -#line 3415 "cs-parser.jay" +#line 3416 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3423 "cs-parser.jay" +#line 3424 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6388,7 +6388,7 @@ void case_468() } void case_469() -#line 3429 "cs-parser.jay" +#line 3430 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6400,21 +6400,21 @@ void case_469() } void case_473() -#line 3457 "cs-parser.jay" +#line 3458 "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_474() -#line 3462 "cs-parser.jay" +#line 3463 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_477() -#line 3484 "cs-parser.jay" +#line 3485 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6429,7 +6429,7 @@ void case_477() } void case_478() -#line 3497 "cs-parser.jay" +#line 3498 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6438,7 +6438,7 @@ void case_478() } void case_479() -#line 3509 "cs-parser.jay" +#line 3510 "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])) { @@ -6448,7 +6448,7 @@ void case_479() } void case_480() -#line 3517 "cs-parser.jay" +#line 3518 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6457,7 +6457,7 @@ void case_480() } void case_481() -#line 3524 "cs-parser.jay" +#line 3525 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6466,28 +6466,28 @@ void case_481() } void case_482() -#line 3531 "cs-parser.jay" +#line 3532 "cs-parser.jay" { 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_483() -#line 3536 "cs-parser.jay" +#line 3537 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_485() -#line 3547 "cs-parser.jay" +#line 3548 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_486() -#line 3555 "cs-parser.jay" +#line 3556 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6499,7 +6499,7 @@ void case_486() } void case_491() -#line 3578 "cs-parser.jay" +#line 3579 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6507,7 +6507,7 @@ void case_491() } void case_492() -#line 3584 "cs-parser.jay" +#line 3585 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6517,7 +6517,7 @@ void case_492() } void case_493() -#line 3595 "cs-parser.jay" +#line 3596 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6525,7 +6525,7 @@ void case_493() } void case_494() -#line 3601 "cs-parser.jay" +#line 3602 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6533,14 +6533,14 @@ void case_494() } void case_495() -#line 3607 "cs-parser.jay" +#line 3608 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_496() -#line 3612 "cs-parser.jay" +#line 3613 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6548,28 +6548,28 @@ void case_496() } void case_500() -#line 3627 "cs-parser.jay" +#line 3628 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_501() -#line 3635 "cs-parser.jay" +#line 3636 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_502() -#line 3640 "cs-parser.jay" +#line 3641 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_507() -#line 3670 "cs-parser.jay" +#line 3671 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6578,7 +6578,7 @@ void case_507() } void case_508() -#line 3677 "cs-parser.jay" +#line 3678 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6591,7 +6591,7 @@ void case_508() } void case_509() -#line 3691 "cs-parser.jay" +#line 3692 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6599,7 +6599,7 @@ void case_509() } void case_510() -#line 3697 "cs-parser.jay" +#line 3698 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6608,7 +6608,7 @@ void case_510() } void case_512() -#line 3711 "cs-parser.jay" +#line 3712 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6616,14 +6616,14 @@ void case_512() } void case_515() -#line 3722 "cs-parser.jay" +#line 3723 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_516() -#line 3730 "cs-parser.jay" +#line 3731 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6631,7 +6631,7 @@ void case_516() } void case_517() -#line 3736 "cs-parser.jay" +#line 3737 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6641,7 +6641,7 @@ void case_517() } void case_518() -#line 3744 "cs-parser.jay" +#line 3745 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6651,7 +6651,7 @@ void case_518() } void case_519() -#line 3752 "cs-parser.jay" +#line 3753 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6661,7 +6661,7 @@ void case_519() } void case_520() -#line 3760 "cs-parser.jay" +#line 3761 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6674,7 +6674,7 @@ void case_520() } void case_521() -#line 3774 "cs-parser.jay" +#line 3775 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6683,7 +6683,7 @@ void case_521() } void case_522() -#line 3784 "cs-parser.jay" +#line 3785 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6693,35 +6693,35 @@ void case_522() } void case_523() -#line 3795 "cs-parser.jay" +#line 3796 "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_524() -#line 3803 "cs-parser.jay" +#line 3804 "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_525() -#line 3811 "cs-parser.jay" +#line 3812 "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_526() -#line 3819 "cs-parser.jay" +#line 3820 "cs-parser.jay" { 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_528() -#line 3831 "cs-parser.jay" +#line 3832 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6732,7 +6732,7 @@ void case_528() } void case_534() -#line 3863 "cs-parser.jay" +#line 3864 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6741,7 +6741,7 @@ void case_534() } void case_535() -#line 3873 "cs-parser.jay" +#line 3874 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6751,147 +6751,147 @@ void case_535() } void case_541() -#line 3898 "cs-parser.jay" +#line 3899 "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_542() -#line 3906 "cs-parser.jay" +#line 3907 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3947 "cs-parser.jay" +#line 3948 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3952 "cs-parser.jay" +#line 3953 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_553() -#line 3957 "cs-parser.jay" +#line 3958 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_555() -#line 3966 "cs-parser.jay" +#line 3967 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_557() -#line 3975 "cs-parser.jay" +#line 3976 "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_561() -#line 3992 "cs-parser.jay" +#line 3993 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_562() -#line 3997 "cs-parser.jay" +#line 3998 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 4006 "cs-parser.jay" +#line 4007 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 4011 "cs-parser.jay" +#line 4012 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 4016 "cs-parser.jay" +#line 4017 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 4021 "cs-parser.jay" +#line 4022 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4030 "cs-parser.jay" +#line 4031 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_570() -#line 4035 "cs-parser.jay" +#line 4036 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_572() -#line 4044 "cs-parser.jay" +#line 4045 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_574() -#line 4053 "cs-parser.jay" +#line 4054 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 4062 "cs-parser.jay" +#line 4063 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 4071 "cs-parser.jay" +#line 4072 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4080 "cs-parser.jay" +#line 4081 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_582() -#line 4089 "cs-parser.jay" +#line 4090 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6900,84 +6900,84 @@ void case_582() } void case_584() -#line 4100 "cs-parser.jay" +#line 4101 "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_586() -#line 4112 "cs-parser.jay" +#line 4113 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4117 "cs-parser.jay" +#line 4118 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4122 "cs-parser.jay" +#line 4123 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4127 "cs-parser.jay" +#line 4128 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4132 "cs-parser.jay" +#line 4133 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4137 "cs-parser.jay" +#line 4138 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4142 "cs-parser.jay" +#line 4143 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4147 "cs-parser.jay" +#line 4148 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4152 "cs-parser.jay" +#line 4153 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4157 "cs-parser.jay" +#line 4158 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4165 "cs-parser.jay" +#line 4166 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6986,7 +6986,7 @@ void case_596() } void case_597() -#line 4172 "cs-parser.jay" +#line 4173 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -7001,7 +7001,7 @@ void case_597() } void case_598() -#line 4188 "cs-parser.jay" +#line 4189 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7009,7 +7009,7 @@ void case_598() } void case_599() -#line 4194 "cs-parser.jay" +#line 4195 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7017,21 +7017,21 @@ void case_599() } void case_600() -#line 4200 "cs-parser.jay" +#line 4201 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_602() -#line 4208 "cs-parser.jay" +#line 4209 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); } void case_606() -#line 4224 "cs-parser.jay" +#line 4225 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7040,14 +7040,14 @@ void case_606() } void case_608() -#line 4235 "cs-parser.jay" +#line 4236 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_609() -#line 4243 "cs-parser.jay" +#line 4244 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7055,14 +7055,14 @@ void case_609() } void case_610() -#line 4249 "cs-parser.jay" +#line 4250 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_611() -#line 4254 "cs-parser.jay" +#line 4255 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7070,63 +7070,63 @@ void case_611() } void case_612() -#line 4260 "cs-parser.jay" +#line 4261 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_614() -#line 4269 "cs-parser.jay" +#line 4270 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_615() -#line 4274 "cs-parser.jay" +#line 4275 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_617() -#line 4283 "cs-parser.jay" +#line 4284 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_618() -#line 4288 "cs-parser.jay" +#line 4289 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4311 "cs-parser.jay" +#line 4312 "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_626() -#line 4316 "cs-parser.jay" +#line 4317 "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_627() -#line 4321 "cs-parser.jay" +#line 4322 "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_631() -#line 4350 "cs-parser.jay" +#line 4351 "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]); @@ -7139,7 +7139,7 @@ void case_631() } void case_632() -#line 4362 "cs-parser.jay" +#line 4363 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7154,7 +7154,7 @@ void case_632() } void case_633() -#line 4375 "cs-parser.jay" +#line 4376 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7162,7 +7162,7 @@ void case_633() } void case_634() -#line 4381 "cs-parser.jay" +#line 4382 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7171,7 +7171,7 @@ void case_634() } void case_637() -#line 4398 "cs-parser.jay" +#line 4399 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7179,7 +7179,7 @@ void case_637() } void case_640() -#line 4412 "cs-parser.jay" +#line 4413 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7197,7 +7197,7 @@ void case_640() } void case_641() -#line 4431 "cs-parser.jay" +#line 4432 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7207,91 +7207,91 @@ void case_641() } void case_642() -#line 4439 "cs-parser.jay" +#line 4440 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4444 "cs-parser.jay" +#line 4445 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4449 "cs-parser.jay" +#line 4450 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4454 "cs-parser.jay" +#line 4455 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4459 "cs-parser.jay" +#line 4460 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4464 "cs-parser.jay" +#line 4465 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4469 "cs-parser.jay" +#line 4470 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4474 "cs-parser.jay" +#line 4475 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4479 "cs-parser.jay" +#line 4480 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4484 "cs-parser.jay" +#line 4485 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4489 "cs-parser.jay" +#line 4490 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4494 "cs-parser.jay" +#line 4495 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_654() -#line 4499 "cs-parser.jay" +#line 4500 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7300,28 +7300,28 @@ void case_654() } void case_655() -#line 4506 "cs-parser.jay" +#line 4507 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4515 "cs-parser.jay" +#line 4516 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_660() -#line 4528 "cs-parser.jay" +#line 4529 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_661() -#line 4536 "cs-parser.jay" +#line 4537 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7329,7 +7329,7 @@ void case_661() } void case_662() -#line 4542 "cs-parser.jay" +#line 4543 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7347,7 +7347,7 @@ void case_662() } void case_663() -#line 4561 "cs-parser.jay" +#line 4562 "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])); @@ -7355,7 +7355,7 @@ void case_663() } void case_664() -#line 4570 "cs-parser.jay" +#line 4571 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7363,7 +7363,7 @@ void case_664() } void case_665() -#line 4576 "cs-parser.jay" +#line 4577 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7384,11 +7384,12 @@ void case_665() } constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); + lbag.AppendTo (constraints, GetLocation (yyVals[-1+yyTop])); yyVal = constraints; } void case_666() -#line 4602 "cs-parser.jay" +#line 4604 "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 ()); @@ -7397,14 +7398,14 @@ void case_666() } void case_667() -#line 4609 "cs-parser.jay" +#line 4611 "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_671() -#line 4629 "cs-parser.jay" +#line 4631 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7413,91 +7414,91 @@ void case_671() } void case_672() -#line 4639 "cs-parser.jay" +#line 4641 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4644 "cs-parser.jay" +#line 4646 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_674() -#line 4665 "cs-parser.jay" +#line 4667 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4677 "cs-parser.jay" +#line 4679 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_677() -#line 4682 "cs-parser.jay" +#line 4684 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_678() -#line 4691 "cs-parser.jay" +#line 4693 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_679() -#line 4696 "cs-parser.jay" +#line 4698 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_687() -#line 4723 "cs-parser.jay" +#line 4725 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_720() -#line 4787 "cs-parser.jay" +#line 4789 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4792 "cs-parser.jay" +#line 4794 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_722() -#line 4797 "cs-parser.jay" +#line 4799 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_723() -#line 4805 "cs-parser.jay" +#line 4807 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_724() -#line 4813 "cs-parser.jay" +#line 4815 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7507,7 +7508,7 @@ void case_724() } void case_727() -#line 4826 "cs-parser.jay" +#line 4828 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7516,7 +7517,7 @@ void case_727() } void case_728() -#line 4842 "cs-parser.jay" +#line 4844 "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*/ @@ -7548,7 +7549,7 @@ void case_728() } void case_729() -#line 4872 "cs-parser.jay" +#line 4874 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7561,7 +7562,7 @@ void case_729() } void case_730() -#line 4883 "cs-parser.jay" +#line 4885 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7570,21 +7571,21 @@ void case_730() } void case_733() -#line 4898 "cs-parser.jay" +#line 4900 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_735() -#line 4907 "cs-parser.jay" +#line 4909 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_737() -#line 4922 "cs-parser.jay" +#line 4924 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7593,7 +7594,7 @@ void case_737() } void case_738() -#line 4929 "cs-parser.jay" +#line 4931 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7601,7 +7602,7 @@ void case_738() } void case_739() -#line 4935 "cs-parser.jay" +#line 4937 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7610,7 +7611,7 @@ void case_739() } void case_740() -#line 4942 "cs-parser.jay" +#line 4944 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7622,14 +7623,14 @@ void case_740() } void case_742() -#line 4956 "cs-parser.jay" +#line 4958 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_743() -#line 4961 "cs-parser.jay" +#line 4963 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7640,7 +7641,7 @@ void case_743() } void case_747() -#line 4979 "cs-parser.jay" +#line 4981 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7649,7 +7650,7 @@ void case_747() } void case_750() -#line 4994 "cs-parser.jay" +#line 4996 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7660,7 +7661,7 @@ void case_750() } void case_751() -#line 5003 "cs-parser.jay" +#line 5005 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7671,14 +7672,14 @@ void case_751() } void case_753() -#line 5019 "cs-parser.jay" +#line 5021 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_758() -#line 5037 "cs-parser.jay" +#line 5039 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7689,28 +7690,28 @@ void case_758() } void case_760() -#line 5050 "cs-parser.jay" +#line 5052 "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_761() -#line 5055 "cs-parser.jay" +#line 5057 "cs-parser.jay" { 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_762() -#line 5063 "cs-parser.jay" +#line 5065 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_766() -#line 5081 "cs-parser.jay" +#line 5083 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7722,7 +7723,7 @@ void case_766() } void case_767() -#line 5094 "cs-parser.jay" +#line 5096 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7732,14 +7733,14 @@ void case_767() } void case_768() -#line 5102 "cs-parser.jay" +#line 5104 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_771() -#line 5116 "cs-parser.jay" +#line 5118 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7749,7 +7750,7 @@ void case_771() } void case_772() -#line 5125 "cs-parser.jay" +#line 5127 "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])); @@ -7761,7 +7762,7 @@ void case_772() } void case_774() -#line 5142 "cs-parser.jay" +#line 5144 "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])); @@ -7769,14 +7770,14 @@ void case_774() } void case_775() -#line 5151 "cs-parser.jay" +#line 5153 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_777() -#line 5160 "cs-parser.jay" +#line 5162 "cs-parser.jay" { var sections = new List (4); @@ -7785,7 +7786,7 @@ void case_777() } void case_778() -#line 5167 "cs-parser.jay" +#line 5169 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7794,14 +7795,14 @@ void case_778() } void case_779() -#line 5174 "cs-parser.jay" +#line 5176 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_782() -#line 5193 "cs-parser.jay" +#line 5195 "cs-parser.jay" { var labels = new List (2); @@ -7810,7 +7811,7 @@ void case_782() } void case_783() -#line 5200 "cs-parser.jay" +#line 5202 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7819,14 +7820,14 @@ void case_783() } void case_784() -#line 5210 "cs-parser.jay" +#line 5212 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_790() -#line 5229 "cs-parser.jay" +#line 5231 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7836,21 +7837,21 @@ void case_790() } void case_791() -#line 5241 "cs-parser.jay" +#line 5243 "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_792() -#line 5249 "cs-parser.jay" +#line 5251 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_794() -#line 5265 "cs-parser.jay" +#line 5267 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7864,14 +7865,14 @@ void case_794() } void case_795() -#line 5277 "cs-parser.jay" +#line 5279 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_798() -#line 5290 "cs-parser.jay" +#line 5292 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7880,14 +7881,14 @@ void case_798() } void case_799() -#line 5297 "cs-parser.jay" +#line 5299 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_807() -#line 5321 "cs-parser.jay" +#line 5323 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7902,14 +7903,14 @@ void case_807() } void case_808() -#line 5337 "cs-parser.jay" +#line 5339 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_809() -#line 5342 "cs-parser.jay" +#line 5344 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7920,7 +7921,7 @@ void case_809() } void case_810() -#line 5351 "cs-parser.jay" +#line 5353 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7933,21 +7934,21 @@ void case_810() } void case_817() -#line 5374 "cs-parser.jay" +#line 5376 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5382 "cs-parser.jay" +#line 5384 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_819() -#line 5390 "cs-parser.jay" +#line 5392 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7955,35 +7956,35 @@ void case_819() } void case_820() -#line 5396 "cs-parser.jay" +#line 5398 "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_821() -#line 5401 "cs-parser.jay" +#line 5403 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5409 "cs-parser.jay" +#line 5411 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5417 "cs-parser.jay" +#line 5419 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_824() -#line 5425 "cs-parser.jay" +#line 5427 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -8001,7 +8002,7 @@ void case_824() } void case_825() -#line 5441 "cs-parser.jay" +#line 5443 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -8017,28 +8018,28 @@ void case_825() } void case_829() -#line 5467 "cs-parser.jay" +#line 5469 "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_830() -#line 5472 "cs-parser.jay" +#line 5474 "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_831() -#line 5477 "cs-parser.jay" +#line 5479 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_832() -#line 5485 "cs-parser.jay" +#line 5487 "cs-parser.jay" { var l = new List (2); @@ -8047,7 +8048,7 @@ void case_832() } void case_833() -#line 5492 "cs-parser.jay" +#line 5494 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8065,7 +8066,7 @@ void case_833() } void case_837() -#line 5520 "cs-parser.jay" +#line 5522 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8082,7 +8083,7 @@ void case_837() } void case_839() -#line 5539 "cs-parser.jay" +#line 5541 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8095,14 +8096,14 @@ void case_839() } void case_842() -#line 5567 "cs-parser.jay" +#line 5569 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_844() -#line 5577 "cs-parser.jay" +#line 5579 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8112,7 +8113,7 @@ void case_844() } void case_845() -#line 5588 "cs-parser.jay" +#line 5590 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8124,14 +8125,14 @@ void case_845() } void case_846() -#line 5598 "cs-parser.jay" +#line 5600 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_847() -#line 5603 "cs-parser.jay" +#line 5605 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8143,7 +8144,7 @@ void case_847() } void case_848() -#line 5616 "cs-parser.jay" +#line 5618 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8155,14 +8156,14 @@ void case_848() } void case_849() -#line 5626 "cs-parser.jay" +#line 5628 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_850() -#line 5631 "cs-parser.jay" +#line 5633 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8174,7 +8175,7 @@ void case_850() } void case_851() -#line 5641 "cs-parser.jay" +#line 5643 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8185,7 +8186,7 @@ void case_851() } void case_853() -#line 5657 "cs-parser.jay" +#line 5659 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8193,7 +8194,7 @@ void case_853() } void case_854() -#line 5669 "cs-parser.jay" +#line 5671 "cs-parser.jay" { lexer.query_parsing = false; @@ -8207,7 +8208,7 @@ void case_854() } void case_855() -#line 5681 "cs-parser.jay" +#line 5683 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8219,7 +8220,7 @@ void case_855() } void case_856() -#line 5692 "cs-parser.jay" +#line 5694 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8229,7 +8230,7 @@ void case_856() } void case_857() -#line 5699 "cs-parser.jay" +#line 5701 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8237,7 +8238,7 @@ void case_857() } void case_858() -#line 5708 "cs-parser.jay" +#line 5710 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8247,7 +8248,7 @@ void case_858() } void case_859() -#line 5716 "cs-parser.jay" +#line 5718 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8261,7 +8262,7 @@ void case_859() } void case_860() -#line 5731 "cs-parser.jay" +#line 5733 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8271,7 +8272,7 @@ void case_860() } void case_861() -#line 5739 "cs-parser.jay" +#line 5741 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8285,7 +8286,7 @@ void case_861() } void case_863() -#line 5758 "cs-parser.jay" +#line 5760 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8298,7 +8299,7 @@ void case_863() } void case_865() -#line 5773 "cs-parser.jay" +#line 5775 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8314,7 +8315,7 @@ void case_865() } void case_866() -#line 5790 "cs-parser.jay" +#line 5792 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8331,14 +8332,14 @@ void case_866() } void case_868() -#line 5806 "cs-parser.jay" +#line 5808 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_870() -#line 5818 "cs-parser.jay" +#line 5820 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8347,7 +8348,7 @@ void case_870() } void case_871() -#line 5825 "cs-parser.jay" +#line 5827 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8357,7 +8358,7 @@ void case_871() } void case_872() -#line 5833 "cs-parser.jay" +#line 5835 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8366,7 +8367,7 @@ void case_872() } void case_873() -#line 5840 "cs-parser.jay" +#line 5842 "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])); @@ -8376,14 +8377,14 @@ void case_873() } void case_877() -#line 5857 "cs-parser.jay" +#line 5859 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_884() -#line 5877 "cs-parser.jay" +#line 5879 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8397,7 +8398,7 @@ void case_884() } void case_886() -#line 5896 "cs-parser.jay" +#line 5898 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8406,7 +8407,7 @@ void case_886() } void case_887() -#line 5906 "cs-parser.jay" +#line 5908 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8416,7 +8417,7 @@ void case_887() } void case_888() -#line 5914 "cs-parser.jay" +#line 5916 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8426,7 +8427,7 @@ void case_888() } void case_889() -#line 5922 "cs-parser.jay" +#line 5924 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8436,7 +8437,7 @@ void case_889() } void case_890() -#line 5930 "cs-parser.jay" +#line 5932 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8476,7 +8477,7 @@ void case_890() } void case_891() -#line 5968 "cs-parser.jay" +#line 5970 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8486,7 +8487,7 @@ void case_891() } void case_892() -#line 5976 "cs-parser.jay" +#line 5978 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8496,7 +8497,7 @@ void case_892() } void case_893() -#line 5984 "cs-parser.jay" +#line 5986 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8506,7 +8507,7 @@ void case_893() } void case_894() -#line 5992 "cs-parser.jay" +#line 5994 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8548,7 +8549,7 @@ void case_894() } void case_898() -#line 6047 "cs-parser.jay" +#line 6049 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8557,7 +8558,7 @@ void case_898() } void case_900() -#line 6058 "cs-parser.jay" +#line 6060 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8566,14 +8567,14 @@ void case_900() } void case_901() -#line 6065 "cs-parser.jay" +#line 6067 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_903() -#line 6074 "cs-parser.jay" +#line 6076 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8582,42 +8583,42 @@ void case_903() } void case_904() -#line 6081 "cs-parser.jay" +#line 6083 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_906() -#line 6093 "cs-parser.jay" +#line 6095 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_907() -#line 6098 "cs-parser.jay" +#line 6100 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6110 "cs-parser.jay" +#line 6112 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_910() -#line 6115 "cs-parser.jay" +#line 6117 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_912() -#line 6125 "cs-parser.jay" +#line 6127 "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*/ @@ -8635,7 +8636,7 @@ void case_912() } void case_913() -#line 6141 "cs-parser.jay" +#line 6143 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8646,7 +8647,7 @@ void case_913() } void case_916() -#line 6168 "cs-parser.jay" +#line 6170 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8678,7 +8679,7 @@ void case_916() } void case_917() -#line 6198 "cs-parser.jay" +#line 6200 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8690,7 +8691,7 @@ void case_917() } void case_927() -#line 6241 "cs-parser.jay" +#line 6243 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8698,7 +8699,7 @@ void case_927() } void case_928() -#line 6247 "cs-parser.jay" +#line 6249 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8707,14 +8708,14 @@ void case_928() } void case_931() -#line 6262 "cs-parser.jay" +#line 6264 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_932() -#line 6267 "cs-parser.jay" +#line 6269 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8724,7 +8725,7 @@ void case_932() } void case_933() -#line 6275 "cs-parser.jay" +#line 6277 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8734,7 +8735,7 @@ void case_933() } void case_934() -#line 6283 "cs-parser.jay" +#line 6285 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8743,7 +8744,7 @@ void case_934() } void case_942() -#line 6321 "cs-parser.jay" +#line 6323 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8751,7 +8752,7 @@ void case_942() } void case_943() -#line 6327 "cs-parser.jay" +#line 6329 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8759,7 +8760,7 @@ void case_943() } void case_944() -#line 6336 "cs-parser.jay" +#line 6338 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12064,7 +12065,7 @@ void case_944() -1, -1, -1, 362, }; -#line 6345 "cs-parser.jay" +#line 6347 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 321650fc3f..304b391d22 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -801,6 +801,7 @@ attribute attributeArgumentCommas.Insert (0, savedAttrParenOpenLocation); attributeArgumentCommas.Add (savedAttrParenCloseLocation); lbag.AddLocation ($$, attributeArgumentCommas); + attributeArgumentCommas.Clear (); } } ; @@ -4593,6 +4594,7 @@ type_parameter_constraints } constraints.Add ((FullNamedExpression) $3); + lbag.AppendTo (constraints, GetLocation ($2)); $$ = constraints; } ; From 8d630fd28119d76e11702f384ee59af9dc83e29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:03:31 +0200 Subject: [PATCH 70/92] Fixed array initializer brace position. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index ddf27cf687..125a494c46 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2498,9 +2498,6 @@ namespace ICSharpCode.NRefactory.CSharp if (minit == null) return null; var init = new ArrayInitializerExpression (); - var braceLocs = LocationsBag.GetLocations (minit); - if (braceLocs != null) - init.AddChild (new CSharpTokenNode (Convert (braceLocs[0]), 1), ArrayInitializerExpression.Roles.LBrace); AddConvertCollectionOrObjectInitializers (init, minit); return init; } @@ -2510,6 +2507,8 @@ namespace ICSharpCode.NRefactory.CSharp var initLoc = LocationsBag.GetLocations (minit); var commaLoc = LocationsBag.GetLocations (minit.Initializers); int curComma = 0; + if (initLoc != null) + init.AddChild (new CSharpTokenNode (Convert (initLoc [0]), 1), ArrayInitializerExpression.Roles.LBrace); foreach (var expr in minit.Initializers) { var collectionInit = expr as CollectionElementInitializer; if (collectionInit != null) { @@ -2557,8 +2556,8 @@ namespace ICSharpCode.NRefactory.CSharp } if (initLoc != null) { if (initLoc.Count == 3) // optional comma - init.AddChild (new CSharpTokenNode (Convert (initLoc[1]), 1), ArrayInitializerExpression.Roles.Comma); - init.AddChild (new CSharpTokenNode (Convert (initLoc[initLoc.Count - 1]), 1), ArrayInitializerExpression.Roles.RBrace); + init.AddChild (new CSharpTokenNode (Convert (initLoc [1]), 1), ArrayInitializerExpression.Roles.Comma); + init.AddChild (new CSharpTokenNode (Convert (initLoc [initLoc.Count - 1]), 1), ArrayInitializerExpression.Roles.RBrace); } } From fbb77b755c175b5e2464f30877a712ba5ba539ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:14:22 +0200 Subject: [PATCH 71/92] fixed indexer locations. --- .../Parser/CSharpParser.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 125a494c46..b650728a51 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -828,17 +828,20 @@ namespace ICSharpCode.NRefactory.CSharp AddAttributeSection (newIndexer, indexer); var location = LocationsBag.GetMemberLocation (indexer); AddModifiers (newIndexer, location); - - if (indexer.MemberName.Left != null) { - newIndexer.AddChild (ConvertToType (indexer.MemberName.Left), IndexerDeclaration.PrivateImplementationTypeRole); - var privateImplTypeLoc = LocationsBag.GetLocations (indexer.MemberName.Left); + newIndexer.AddChild (ConvertToType (indexer.TypeName), IndexerDeclaration.Roles.Type); + var name = indexer.MemberName; + if (name.Left != null) // the representation is a bit weird ? + name = name.Left; + if (name.Left != null) { + newIndexer.AddChild (ConvertToType (name.Left), IndexerDeclaration.PrivateImplementationTypeRole); + var privateImplTypeLoc = LocationsBag.GetLocations (name.Left); if (privateImplTypeLoc != null) newIndexer.AddChild (new CSharpTokenNode (Convert (privateImplTypeLoc[0]), 1), MethodDeclaration.Roles.Dot); } - newIndexer.AddChild (ConvertToType (indexer.TypeName), IndexerDeclaration.Roles.Type); + newIndexer.AddChild (Identifier.Create ("this", Convert (name.Location)), IndexerDeclaration.Roles.Identifier); if (location != null) - newIndexer.AddChild (new CSharpTokenNode (Convert (location[0]), 1), IndexerDeclaration.Roles.LBracket); + newIndexer.AddChild (new CSharpTokenNode (Convert (location [0]), 1), IndexerDeclaration.Roles.LBracket); AddParameter (newIndexer, indexer.ParameterInfo); if (location != null) newIndexer.AddChild (new CSharpTokenNode (Convert (location[1]), 1), IndexerDeclaration.Roles.RBracket); From 994f9310db8c6532165789648663b9b8b135296a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:17:42 +0200 Subject: [PATCH 72/92] fixed dot location. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index b650728a51..ffadf503f8 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -91,8 +91,12 @@ namespace ICSharpCode.NRefactory.CSharp { AstType result; if (memberName.Left != null) { - result = new MemberType () { MemberNameToken = Identifier.Create (memberName.Name, Convert (memberName.Location)) }; + result = new MemberType (); result.AddChild (ConvertToType (memberName.Left), MemberType.TargetRole); + var loc = LocationsBag.GetLocations (memberName.Left); + if (loc != null) + result.AddChild (new CSharpTokenNode (Convert (loc [0]), 1), MemberType.Roles.Dot); + result.AddChild (Identifier.Create (memberName.Name, Convert (memberName.Location)), MemberType.Roles.Identifier); } else { result = new SimpleType () { IdentifierToken = Identifier.Create (memberName.Name, Convert (memberName.Location)) }; } From 9e909e1d4e582227e1dd072cfa87c8bb67edd84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:23:53 +0200 Subject: [PATCH 73/92] Found wrong indexer pos. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 2 -- ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs | 2 +- ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index ffadf503f8..a69ba10417 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -834,8 +834,6 @@ namespace ICSharpCode.NRefactory.CSharp AddModifiers (newIndexer, location); newIndexer.AddChild (ConvertToType (indexer.TypeName), IndexerDeclaration.Roles.Type); var name = indexer.MemberName; - if (name.Left != null) // the representation is a bit weird ? - name = name.Left; if (name.Left != null) { newIndexer.AddChild (ConvertToType (name.Left), IndexerDeclaration.PrivateImplementationTypeRole); var privateImplTypeLoc = LocationsBag.GetLocations (name.Left); diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index e9a4d57739..f7dd632c4d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -5960,7 +5960,7 @@ void case_343() #line 2854 "cs-parser.jay" { lexer.parsing_generic_declaration = false; - yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop])); + yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[0+yyTop])); } void case_344() diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 304b391d22..35ecc6ac4d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -2853,7 +2853,7 @@ indexer_declaration_name | explicit_interface THIS { lexer.parsing_generic_declaration = false; - $$ = new MemberName ((MemberName) $1, TypeContainer.DefaultIndexerName, null, GetLocation ($1)); + $$ = new MemberName ((MemberName) $1, TypeContainer.DefaultIndexerName, null, GetLocation ($2)); } ; @@ -4594,7 +4594,7 @@ type_parameter_constraints } constraints.Add ((FullNamedExpression) $3); - lbag.AppendTo (constraints, GetLocation ($2)); + lbag.AppendTo (constraints, GetLocation ($2)); $$ = constraints; } ; From 84135f5421b7b6f0c7eeca0573eee558e0be9428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:29:14 +0200 Subject: [PATCH 74/92] Fixed lambda parameter commas. --- .../Parser/CSharpParser.cs | 6 +- .../Parser/mcs/cs-parser.cs | 473 +++++++++--------- .../Parser/mcs/cs-parser.jay | 5 +- 3 files changed, 243 insertions(+), 241 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index a69ba10417..f9773c7b99 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2249,9 +2249,6 @@ namespace ICSharpCode.NRefactory.CSharp var paramLocation = LocationsBag.GetLocations (parameters); for (int i = 0; i < parameters.Count; i++) { - if (paramLocation != null && i > 0 && i - 1 < paramLocation.Count) { - parent.AddChild (new CSharpTokenNode (Convert (paramLocation [i - 1]), 1), ParameterDeclaration.Roles.Comma); - } var p = (Parameter)parameters.FixedParameters [i]; var location = LocationsBag.GetLocations (p); ParameterDeclaration parameterDeclarationExpression = new ParameterDeclaration (); @@ -2291,6 +2288,9 @@ namespace ICSharpCode.NRefactory.CSharp parameterDeclarationExpression.AddChild ((Expression)p.DefaultValue.Accept (this), ParameterDeclaration.Roles.Expression); } parent.AddChild (parameterDeclarationExpression, InvocationExpression.Roles.Parameter); + if (paramLocation != null && i < paramLocation.Count) { + parent.AddChild (new CSharpTokenNode (Convert (paramLocation [i]), 1), ParameterDeclaration.Roles.Comma); + } } } diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index f7dd632c4d..52b1f63dbb 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -3081,7 +3081,7 @@ case 602: case_602(); break; case 605: -#line 4223 "cs-parser.jay" +#line 4224 "cs-parser.jay" { start_block (lexer.Location); } @@ -3105,7 +3105,7 @@ case 612: case_612(); break; case 613: -#line 4268 "cs-parser.jay" +#line 4269 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3117,7 +3117,7 @@ case 615: case_615(); break; case 616: -#line 4282 "cs-parser.jay" +#line 4283 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3129,7 +3129,7 @@ case 618: case_618(); break; case 624: -#line 4307 "cs-parser.jay" +#line 4308 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3144,13 +3144,13 @@ case 627: case_627(); break; case 629: -#line 4336 "cs-parser.jay" +#line 4337 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 630: -#line 4349 "cs-parser.jay" +#line 4350 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3168,18 +3168,18 @@ case 634: case_634(); break; case 635: -#line 4392 "cs-parser.jay" +#line 4393 "cs-parser.jay" { yyVal = null; } break; case 636: -#line 4394 "cs-parser.jay" +#line 4395 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 637: case_637(); break; case 638: -#line 4407 "cs-parser.jay" +#line 4408 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3236,7 +3236,7 @@ case 657: case_657(); break; case 659: -#line 4527 "cs-parser.jay" +#line 4528 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3266,19 +3266,19 @@ case 667: case_667(); break; case 668: -#line 4618 "cs-parser.jay" +#line 4619 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4622 "cs-parser.jay" +#line 4623 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 670: -#line 4629 "cs-parser.jay" +#line 4630 "cs-parser.jay" { yyVal = Variance.None; } @@ -3296,7 +3296,7 @@ case 674: case_674(); break; case 675: -#line 4674 "cs-parser.jay" +#line 4675 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3314,13 +3314,13 @@ case 679: case_679(); break; case 684: -#line 4718 "cs-parser.jay" +#line 4719 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 685: -#line 4722 "cs-parser.jay" +#line 4723 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3329,13 +3329,13 @@ case 687: case_687(); break; case 690: -#line 4746 "cs-parser.jay" +#line 4747 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 691: -#line 4750 "cs-parser.jay" +#line 4751 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3368,13 +3368,13 @@ case 730: case_730(); break; case 731: -#line 4894 "cs-parser.jay" +#line 4895 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 732: -#line 4898 "cs-parser.jay" +#line 4899 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3386,7 +3386,7 @@ case 735: case_735(); break; case 736: -#line 4919 "cs-parser.jay" +#line 4920 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3419,7 +3419,7 @@ case 751: case_751(); break; case 752: -#line 5019 "cs-parser.jay" +#line 5020 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3440,15 +3440,15 @@ case 762: case_762(); break; case 763: -#line 5069 "cs-parser.jay" +#line 5070 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5073 "cs-parser.jay" +#line 5074 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: -#line 5074 "cs-parser.jay" +#line 5075 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 766: @@ -3467,7 +3467,7 @@ case 772: case_772(); break; case 773: -#line 5142 "cs-parser.jay" +#line 5143 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3488,13 +3488,13 @@ case 779: case_779(); break; case 780: -#line 5186 "cs-parser.jay" +#line 5187 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 781: -#line 5190 "cs-parser.jay" +#line 5191 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3509,7 +3509,7 @@ case 784: case_784(); break; case 785: -#line 5219 "cs-parser.jay" +#line 5220 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3524,7 +3524,7 @@ case 792: case_792(); break; case 793: -#line 5258 "cs-parser.jay" +#line 5259 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3536,7 +3536,7 @@ case 795: case_795(); break; case 796: -#line 5286 "cs-parser.jay" +#line 5287 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 798: @@ -3546,11 +3546,11 @@ case 799: case_799(); break; case 801: -#line 5307 "cs-parser.jay" +#line 5308 "cs-parser.jay" { yyVal = null; } break; case 803: -#line 5312 "cs-parser.jay" +#line 5313 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 807: @@ -3593,7 +3593,7 @@ case 825: case_825(); break; case 828: -#line 5467 "cs-parser.jay" +#line 5468 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3614,7 +3614,7 @@ case 833: case_833(); break; case 836: -#line 5520 "cs-parser.jay" +#line 5521 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3623,7 +3623,7 @@ case 837: case_837(); break; case 838: -#line 5539 "cs-parser.jay" +#line 5540 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3632,13 +3632,13 @@ case 839: case_839(); break; case 840: -#line 5557 "cs-parser.jay" +#line 5558 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 841: -#line 5564 "cs-parser.jay" +#line 5565 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3647,7 +3647,7 @@ case 842: case_842(); break; case 843: -#line 5574 "cs-parser.jay" +#line 5575 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3677,7 +3677,7 @@ case 851: case_851(); break; case 852: -#line 5657 "cs-parser.jay" +#line 5658 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3710,7 +3710,7 @@ case 861: case_861(); break; case 862: -#line 5758 "cs-parser.jay" +#line 5759 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3719,7 +3719,7 @@ case 863: case_863(); break; case 864: -#line 5773 "cs-parser.jay" +#line 5774 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3734,7 +3734,7 @@ case 868: case_868(); break; case 869: -#line 5818 "cs-parser.jay" +#line 5819 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3755,7 +3755,7 @@ case 877: case_877(); break; case 883: -#line 5877 "cs-parser.jay" +#line 5878 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3764,7 +3764,7 @@ case 884: case_884(); break; case 885: -#line 5896 "cs-parser.jay" +#line 5897 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3797,13 +3797,13 @@ case 894: case_894(); break; case 896: -#line 6040 "cs-parser.jay" +#line 6041 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 897: -#line 6047 "cs-parser.jay" +#line 6048 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3824,7 +3824,7 @@ case 904: case_904(); break; case 905: -#line 6093 "cs-parser.jay" +#line 6094 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3836,7 +3836,7 @@ case 907: case_907(); break; case 908: -#line 6110 "cs-parser.jay" +#line 6111 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3860,13 +3860,13 @@ case 917: case_917(); break; case 925: -#line 6234 "cs-parser.jay" +#line 6235 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 926: -#line 6241 "cs-parser.jay" +#line 6242 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3878,13 +3878,13 @@ case 928: case_928(); break; case 929: -#line 6258 "cs-parser.jay" +#line 6259 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 930: -#line 6262 "cs-parser.jay" +#line 6263 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3902,25 +3902,25 @@ case 934: case_934(); break; case 936: -#line 6298 "cs-parser.jay" +#line 6299 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 938: -#line 6306 "cs-parser.jay" +#line 6307 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 939: -#line 6310 "cs-parser.jay" +#line 6311 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 940: -#line 6317 "cs-parser.jay" +#line 6318 "cs-parser.jay" { yyVal = new List (0); } @@ -6981,7 +6981,7 @@ void case_596() { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); - + parameterListCommas.Clear (); yyVal = pars; } @@ -6995,7 +6995,7 @@ void case_597() } pars.Add (p); - lbag.AppendTo (pars, GetLocation (yyVals[-1+yyTop])); + parameterListCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = pars; } @@ -7028,10 +7028,11 @@ void case_602() { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); + lbag.AddLocation (yyVal, parameterListCommas); } void case_606() -#line 4225 "cs-parser.jay" +#line 4226 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7040,14 +7041,14 @@ void case_606() } void case_608() -#line 4236 "cs-parser.jay" +#line 4237 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_609() -#line 4244 "cs-parser.jay" +#line 4245 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7055,14 +7056,14 @@ void case_609() } void case_610() -#line 4250 "cs-parser.jay" +#line 4251 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_611() -#line 4255 "cs-parser.jay" +#line 4256 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7070,63 +7071,63 @@ void case_611() } void case_612() -#line 4261 "cs-parser.jay" +#line 4262 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_614() -#line 4270 "cs-parser.jay" +#line 4271 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_615() -#line 4275 "cs-parser.jay" +#line 4276 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_617() -#line 4284 "cs-parser.jay" +#line 4285 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_618() -#line 4289 "cs-parser.jay" +#line 4290 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4312 "cs-parser.jay" +#line 4313 "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_626() -#line 4317 "cs-parser.jay" +#line 4318 "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_627() -#line 4322 "cs-parser.jay" +#line 4323 "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_631() -#line 4351 "cs-parser.jay" +#line 4352 "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]); @@ -7139,7 +7140,7 @@ void case_631() } void case_632() -#line 4363 "cs-parser.jay" +#line 4364 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7154,7 +7155,7 @@ void case_632() } void case_633() -#line 4376 "cs-parser.jay" +#line 4377 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7162,7 +7163,7 @@ void case_633() } void case_634() -#line 4382 "cs-parser.jay" +#line 4383 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7171,7 +7172,7 @@ void case_634() } void case_637() -#line 4399 "cs-parser.jay" +#line 4400 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7179,7 +7180,7 @@ void case_637() } void case_640() -#line 4413 "cs-parser.jay" +#line 4414 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7197,7 +7198,7 @@ void case_640() } void case_641() -#line 4432 "cs-parser.jay" +#line 4433 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7207,91 +7208,91 @@ void case_641() } void case_642() -#line 4440 "cs-parser.jay" +#line 4441 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4445 "cs-parser.jay" +#line 4446 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4450 "cs-parser.jay" +#line 4451 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4455 "cs-parser.jay" +#line 4456 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4460 "cs-parser.jay" +#line 4461 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4465 "cs-parser.jay" +#line 4466 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4470 "cs-parser.jay" +#line 4471 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4475 "cs-parser.jay" +#line 4476 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4480 "cs-parser.jay" +#line 4481 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4485 "cs-parser.jay" +#line 4486 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4490 "cs-parser.jay" +#line 4491 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4495 "cs-parser.jay" +#line 4496 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_654() -#line 4500 "cs-parser.jay" +#line 4501 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7300,28 +7301,28 @@ void case_654() } void case_655() -#line 4507 "cs-parser.jay" +#line 4508 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4516 "cs-parser.jay" +#line 4517 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_660() -#line 4529 "cs-parser.jay" +#line 4530 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_661() -#line 4537 "cs-parser.jay" +#line 4538 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7329,7 +7330,7 @@ void case_661() } void case_662() -#line 4543 "cs-parser.jay" +#line 4544 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7347,7 +7348,7 @@ void case_662() } void case_663() -#line 4562 "cs-parser.jay" +#line 4563 "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])); @@ -7355,7 +7356,7 @@ void case_663() } void case_664() -#line 4571 "cs-parser.jay" +#line 4572 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7363,7 +7364,7 @@ void case_664() } void case_665() -#line 4577 "cs-parser.jay" +#line 4578 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7389,7 +7390,7 @@ void case_665() } void case_666() -#line 4604 "cs-parser.jay" +#line 4605 "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 ()); @@ -7398,14 +7399,14 @@ void case_666() } void case_667() -#line 4611 "cs-parser.jay" +#line 4612 "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_671() -#line 4631 "cs-parser.jay" +#line 4632 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7414,91 +7415,91 @@ void case_671() } void case_672() -#line 4641 "cs-parser.jay" +#line 4642 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4646 "cs-parser.jay" +#line 4647 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_674() -#line 4667 "cs-parser.jay" +#line 4668 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4679 "cs-parser.jay" +#line 4680 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_677() -#line 4684 "cs-parser.jay" +#line 4685 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_678() -#line 4693 "cs-parser.jay" +#line 4694 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_679() -#line 4698 "cs-parser.jay" +#line 4699 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_687() -#line 4725 "cs-parser.jay" +#line 4726 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_720() -#line 4789 "cs-parser.jay" +#line 4790 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4794 "cs-parser.jay" +#line 4795 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_722() -#line 4799 "cs-parser.jay" +#line 4800 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_723() -#line 4807 "cs-parser.jay" +#line 4808 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_724() -#line 4815 "cs-parser.jay" +#line 4816 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7508,7 +7509,7 @@ void case_724() } void case_727() -#line 4828 "cs-parser.jay" +#line 4829 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7517,7 +7518,7 @@ void case_727() } void case_728() -#line 4844 "cs-parser.jay" +#line 4845 "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*/ @@ -7549,7 +7550,7 @@ void case_728() } void case_729() -#line 4874 "cs-parser.jay" +#line 4875 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7562,7 +7563,7 @@ void case_729() } void case_730() -#line 4885 "cs-parser.jay" +#line 4886 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7571,21 +7572,21 @@ void case_730() } void case_733() -#line 4900 "cs-parser.jay" +#line 4901 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_735() -#line 4909 "cs-parser.jay" +#line 4910 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_737() -#line 4924 "cs-parser.jay" +#line 4925 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7594,7 +7595,7 @@ void case_737() } void case_738() -#line 4931 "cs-parser.jay" +#line 4932 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7602,7 +7603,7 @@ void case_738() } void case_739() -#line 4937 "cs-parser.jay" +#line 4938 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7611,7 +7612,7 @@ void case_739() } void case_740() -#line 4944 "cs-parser.jay" +#line 4945 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7623,14 +7624,14 @@ void case_740() } void case_742() -#line 4958 "cs-parser.jay" +#line 4959 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_743() -#line 4963 "cs-parser.jay" +#line 4964 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7641,7 +7642,7 @@ void case_743() } void case_747() -#line 4981 "cs-parser.jay" +#line 4982 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7650,7 +7651,7 @@ void case_747() } void case_750() -#line 4996 "cs-parser.jay" +#line 4997 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7661,7 +7662,7 @@ void case_750() } void case_751() -#line 5005 "cs-parser.jay" +#line 5006 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7672,14 +7673,14 @@ void case_751() } void case_753() -#line 5021 "cs-parser.jay" +#line 5022 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_758() -#line 5039 "cs-parser.jay" +#line 5040 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7690,28 +7691,28 @@ void case_758() } void case_760() -#line 5052 "cs-parser.jay" +#line 5053 "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_761() -#line 5057 "cs-parser.jay" +#line 5058 "cs-parser.jay" { 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_762() -#line 5065 "cs-parser.jay" +#line 5066 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_766() -#line 5083 "cs-parser.jay" +#line 5084 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7723,7 +7724,7 @@ void case_766() } void case_767() -#line 5096 "cs-parser.jay" +#line 5097 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7733,14 +7734,14 @@ void case_767() } void case_768() -#line 5104 "cs-parser.jay" +#line 5105 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_771() -#line 5118 "cs-parser.jay" +#line 5119 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7750,7 +7751,7 @@ void case_771() } void case_772() -#line 5127 "cs-parser.jay" +#line 5128 "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])); @@ -7762,7 +7763,7 @@ void case_772() } void case_774() -#line 5144 "cs-parser.jay" +#line 5145 "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])); @@ -7770,14 +7771,14 @@ void case_774() } void case_775() -#line 5153 "cs-parser.jay" +#line 5154 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_777() -#line 5162 "cs-parser.jay" +#line 5163 "cs-parser.jay" { var sections = new List (4); @@ -7786,7 +7787,7 @@ void case_777() } void case_778() -#line 5169 "cs-parser.jay" +#line 5170 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7795,14 +7796,14 @@ void case_778() } void case_779() -#line 5176 "cs-parser.jay" +#line 5177 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_782() -#line 5195 "cs-parser.jay" +#line 5196 "cs-parser.jay" { var labels = new List (2); @@ -7811,7 +7812,7 @@ void case_782() } void case_783() -#line 5202 "cs-parser.jay" +#line 5203 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7820,14 +7821,14 @@ void case_783() } void case_784() -#line 5212 "cs-parser.jay" +#line 5213 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_790() -#line 5231 "cs-parser.jay" +#line 5232 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7837,21 +7838,21 @@ void case_790() } void case_791() -#line 5243 "cs-parser.jay" +#line 5244 "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_792() -#line 5251 "cs-parser.jay" +#line 5252 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_794() -#line 5267 "cs-parser.jay" +#line 5268 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7865,14 +7866,14 @@ void case_794() } void case_795() -#line 5279 "cs-parser.jay" +#line 5280 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_798() -#line 5292 "cs-parser.jay" +#line 5293 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7881,14 +7882,14 @@ void case_798() } void case_799() -#line 5299 "cs-parser.jay" +#line 5300 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_807() -#line 5323 "cs-parser.jay" +#line 5324 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7903,14 +7904,14 @@ void case_807() } void case_808() -#line 5339 "cs-parser.jay" +#line 5340 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_809() -#line 5344 "cs-parser.jay" +#line 5345 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7921,7 +7922,7 @@ void case_809() } void case_810() -#line 5353 "cs-parser.jay" +#line 5354 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7934,21 +7935,21 @@ void case_810() } void case_817() -#line 5376 "cs-parser.jay" +#line 5377 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5384 "cs-parser.jay" +#line 5385 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_819() -#line 5392 "cs-parser.jay" +#line 5393 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7956,35 +7957,35 @@ void case_819() } void case_820() -#line 5398 "cs-parser.jay" +#line 5399 "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_821() -#line 5403 "cs-parser.jay" +#line 5404 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5411 "cs-parser.jay" +#line 5412 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5419 "cs-parser.jay" +#line 5420 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_824() -#line 5427 "cs-parser.jay" +#line 5428 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -8002,7 +8003,7 @@ void case_824() } void case_825() -#line 5443 "cs-parser.jay" +#line 5444 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -8018,28 +8019,28 @@ void case_825() } void case_829() -#line 5469 "cs-parser.jay" +#line 5470 "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_830() -#line 5474 "cs-parser.jay" +#line 5475 "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_831() -#line 5479 "cs-parser.jay" +#line 5480 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_832() -#line 5487 "cs-parser.jay" +#line 5488 "cs-parser.jay" { var l = new List (2); @@ -8048,7 +8049,7 @@ void case_832() } void case_833() -#line 5494 "cs-parser.jay" +#line 5495 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8066,7 +8067,7 @@ void case_833() } void case_837() -#line 5522 "cs-parser.jay" +#line 5523 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8083,7 +8084,7 @@ void case_837() } void case_839() -#line 5541 "cs-parser.jay" +#line 5542 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8096,14 +8097,14 @@ void case_839() } void case_842() -#line 5569 "cs-parser.jay" +#line 5570 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_844() -#line 5579 "cs-parser.jay" +#line 5580 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8113,7 +8114,7 @@ void case_844() } void case_845() -#line 5590 "cs-parser.jay" +#line 5591 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8125,14 +8126,14 @@ void case_845() } void case_846() -#line 5600 "cs-parser.jay" +#line 5601 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_847() -#line 5605 "cs-parser.jay" +#line 5606 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8144,7 +8145,7 @@ void case_847() } void case_848() -#line 5618 "cs-parser.jay" +#line 5619 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8156,14 +8157,14 @@ void case_848() } void case_849() -#line 5628 "cs-parser.jay" +#line 5629 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_850() -#line 5633 "cs-parser.jay" +#line 5634 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8175,7 +8176,7 @@ void case_850() } void case_851() -#line 5643 "cs-parser.jay" +#line 5644 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8186,7 +8187,7 @@ void case_851() } void case_853() -#line 5659 "cs-parser.jay" +#line 5660 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8194,7 +8195,7 @@ void case_853() } void case_854() -#line 5671 "cs-parser.jay" +#line 5672 "cs-parser.jay" { lexer.query_parsing = false; @@ -8208,7 +8209,7 @@ void case_854() } void case_855() -#line 5683 "cs-parser.jay" +#line 5684 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8220,7 +8221,7 @@ void case_855() } void case_856() -#line 5694 "cs-parser.jay" +#line 5695 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8230,7 +8231,7 @@ void case_856() } void case_857() -#line 5701 "cs-parser.jay" +#line 5702 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8238,7 +8239,7 @@ void case_857() } void case_858() -#line 5710 "cs-parser.jay" +#line 5711 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8248,7 +8249,7 @@ void case_858() } void case_859() -#line 5718 "cs-parser.jay" +#line 5719 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8262,7 +8263,7 @@ void case_859() } void case_860() -#line 5733 "cs-parser.jay" +#line 5734 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8272,7 +8273,7 @@ void case_860() } void case_861() -#line 5741 "cs-parser.jay" +#line 5742 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8286,7 +8287,7 @@ void case_861() } void case_863() -#line 5760 "cs-parser.jay" +#line 5761 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8299,7 +8300,7 @@ void case_863() } void case_865() -#line 5775 "cs-parser.jay" +#line 5776 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8315,7 +8316,7 @@ void case_865() } void case_866() -#line 5792 "cs-parser.jay" +#line 5793 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8332,14 +8333,14 @@ void case_866() } void case_868() -#line 5808 "cs-parser.jay" +#line 5809 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_870() -#line 5820 "cs-parser.jay" +#line 5821 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8348,7 +8349,7 @@ void case_870() } void case_871() -#line 5827 "cs-parser.jay" +#line 5828 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8358,7 +8359,7 @@ void case_871() } void case_872() -#line 5835 "cs-parser.jay" +#line 5836 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8367,7 +8368,7 @@ void case_872() } void case_873() -#line 5842 "cs-parser.jay" +#line 5843 "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])); @@ -8377,14 +8378,14 @@ void case_873() } void case_877() -#line 5859 "cs-parser.jay" +#line 5860 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_884() -#line 5879 "cs-parser.jay" +#line 5880 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8398,7 +8399,7 @@ void case_884() } void case_886() -#line 5898 "cs-parser.jay" +#line 5899 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8407,7 +8408,7 @@ void case_886() } void case_887() -#line 5908 "cs-parser.jay" +#line 5909 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8417,7 +8418,7 @@ void case_887() } void case_888() -#line 5916 "cs-parser.jay" +#line 5917 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8427,7 +8428,7 @@ void case_888() } void case_889() -#line 5924 "cs-parser.jay" +#line 5925 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8437,7 +8438,7 @@ void case_889() } void case_890() -#line 5932 "cs-parser.jay" +#line 5933 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8477,7 +8478,7 @@ void case_890() } void case_891() -#line 5970 "cs-parser.jay" +#line 5971 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8487,7 +8488,7 @@ void case_891() } void case_892() -#line 5978 "cs-parser.jay" +#line 5979 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8497,7 +8498,7 @@ void case_892() } void case_893() -#line 5986 "cs-parser.jay" +#line 5987 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8507,7 +8508,7 @@ void case_893() } void case_894() -#line 5994 "cs-parser.jay" +#line 5995 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8549,7 +8550,7 @@ void case_894() } void case_898() -#line 6049 "cs-parser.jay" +#line 6050 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8558,7 +8559,7 @@ void case_898() } void case_900() -#line 6060 "cs-parser.jay" +#line 6061 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8567,14 +8568,14 @@ void case_900() } void case_901() -#line 6067 "cs-parser.jay" +#line 6068 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_903() -#line 6076 "cs-parser.jay" +#line 6077 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8583,42 +8584,42 @@ void case_903() } void case_904() -#line 6083 "cs-parser.jay" +#line 6084 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_906() -#line 6095 "cs-parser.jay" +#line 6096 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_907() -#line 6100 "cs-parser.jay" +#line 6101 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6112 "cs-parser.jay" +#line 6113 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_910() -#line 6117 "cs-parser.jay" +#line 6118 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_912() -#line 6127 "cs-parser.jay" +#line 6128 "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*/ @@ -8636,7 +8637,7 @@ void case_912() } void case_913() -#line 6143 "cs-parser.jay" +#line 6144 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8647,7 +8648,7 @@ void case_913() } void case_916() -#line 6170 "cs-parser.jay" +#line 6171 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8679,7 +8680,7 @@ void case_916() } void case_917() -#line 6200 "cs-parser.jay" +#line 6201 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8691,7 +8692,7 @@ void case_917() } void case_927() -#line 6243 "cs-parser.jay" +#line 6244 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8699,7 +8700,7 @@ void case_927() } void case_928() -#line 6249 "cs-parser.jay" +#line 6250 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8708,14 +8709,14 @@ void case_928() } void case_931() -#line 6264 "cs-parser.jay" +#line 6265 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_932() -#line 6269 "cs-parser.jay" +#line 6270 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8725,7 +8726,7 @@ void case_932() } void case_933() -#line 6277 "cs-parser.jay" +#line 6278 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8735,7 +8736,7 @@ void case_933() } void case_934() -#line 6285 "cs-parser.jay" +#line 6286 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8744,7 +8745,7 @@ void case_934() } void case_942() -#line 6323 "cs-parser.jay" +#line 6324 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8752,7 +8753,7 @@ void case_942() } void case_943() -#line 6329 "cs-parser.jay" +#line 6330 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8760,7 +8761,7 @@ void case_943() } void case_944() -#line 6338 "cs-parser.jay" +#line 6339 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12065,7 +12066,7 @@ void case_944() -1, -1, -1, 362, }; -#line 6347 "cs-parser.jay" +#line 6348 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 35ecc6ac4d..9fc9c0fd93 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -4166,7 +4166,7 @@ lambda_parameter_list { var pars = new List (4); pars.Add ((Parameter) $1); - + parameterListCommas.Clear (); $$ = pars; } | lambda_parameter_list COMMA lambda_parameter @@ -4178,7 +4178,7 @@ lambda_parameter_list } pars.Add (p); - lbag.AppendTo (pars, GetLocation ($2)); + parameterListCommas.Add (GetLocation ($2)); $$ = pars; } @@ -4209,6 +4209,7 @@ opt_lambda_parameter_list | lambda_parameter_list { var pars_list = (List) $1; $$ = new ParametersCompiled (pars_list.ToArray ()); + lbag.AddLocation ($$, parameterListCommas); } ; From a9bae21dfa41ef34a59113ead196ec022ccf4fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:36:29 +0200 Subject: [PATCH 75/92] fixed 'params' location. --- .../Parser/mcs/cs-parser.cs | 1118 +++++++++-------- .../Parser/mcs/cs-parser.jay | 4 + 2 files changed, 565 insertions(+), 557 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs index 52b1f63dbb..ab4fdfce2c 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs @@ -1877,7 +1877,7 @@ case 183: case_183(); break; case 184: -#line 1716 "cs-parser.jay" +#line 1720 "cs-parser.jay" { Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS); } @@ -1898,7 +1898,7 @@ case 189: case_189(); break; case 190: -#line 1770 "cs-parser.jay" +#line 1774 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -1907,7 +1907,7 @@ case 191: case_191(); break; case 192: -#line 1799 "cs-parser.jay" +#line 1803 "cs-parser.jay" { lexer.PropertyParsing = false; } @@ -1937,7 +1937,7 @@ case 205: case_205(); break; case 206: -#line 1948 "cs-parser.jay" +#line 1952 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -1955,55 +1955,55 @@ case 210: case_210(); break; case 211: -#line 1985 "cs-parser.jay" +#line 1989 "cs-parser.jay" { Error_SyntaxError (yyToken); } break; case 214: -#line 1997 "cs-parser.jay" +#line 2001 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 215: -#line 2001 "cs-parser.jay" +#line 2005 "cs-parser.jay" { lexer.parsing_modifiers = true; } break; case 216: -#line 2008 "cs-parser.jay" +#line 2012 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 217: -#line 2012 "cs-parser.jay" +#line 2016 "cs-parser.jay" { report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants"); } break; case 222: -#line 2020 "cs-parser.jay" +#line 2024 "cs-parser.jay" { report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators"); } break; case 223: -#line 2024 "cs-parser.jay" +#line 2028 "cs-parser.jay" { report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors"); } break; case 224: -#line 2028 "cs-parser.jay" +#line 2032 "cs-parser.jay" { report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations"); } break; case 225: -#line 2034 "cs-parser.jay" +#line 2038 "cs-parser.jay" { } break; @@ -2011,14 +2011,14 @@ case 226: case_226(); break; case 228: -#line 2067 "cs-parser.jay" +#line 2071 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } break; case 230: case_230(); break; case 231: -#line 2083 "cs-parser.jay" +#line 2087 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2027,95 +2027,95 @@ case 232: case_232(); break; case 234: -#line 2129 "cs-parser.jay" +#line 2133 "cs-parser.jay" { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 235: -#line 2130 "cs-parser.jay" +#line 2134 "cs-parser.jay" { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 236: -#line 2131 "cs-parser.jay" +#line 2135 "cs-parser.jay" { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 237: -#line 2132 "cs-parser.jay" +#line 2136 "cs-parser.jay" { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 238: -#line 2133 "cs-parser.jay" +#line 2137 "cs-parser.jay" { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 239: -#line 2134 "cs-parser.jay" +#line 2138 "cs-parser.jay" { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 240: -#line 2136 "cs-parser.jay" +#line 2140 "cs-parser.jay" { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 241: -#line 2137 "cs-parser.jay" +#line 2141 "cs-parser.jay" { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 242: -#line 2139 "cs-parser.jay" +#line 2143 "cs-parser.jay" { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 243: -#line 2140 "cs-parser.jay" +#line 2144 "cs-parser.jay" { yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 244: -#line 2141 "cs-parser.jay" +#line 2145 "cs-parser.jay" { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 245: -#line 2142 "cs-parser.jay" +#line 2146 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 246: -#line 2143 "cs-parser.jay" +#line 2147 "cs-parser.jay" { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 247: -#line 2144 "cs-parser.jay" +#line 2148 "cs-parser.jay" { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 248: -#line 2145 "cs-parser.jay" +#line 2149 "cs-parser.jay" { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 249: -#line 2146 "cs-parser.jay" +#line 2150 "cs-parser.jay" { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 250: -#line 2147 "cs-parser.jay" +#line 2151 "cs-parser.jay" { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 251: -#line 2148 "cs-parser.jay" +#line 2152 "cs-parser.jay" { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 252: -#line 2149 "cs-parser.jay" +#line 2153 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 253: -#line 2150 "cs-parser.jay" +#line 2154 "cs-parser.jay" { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 254: -#line 2151 "cs-parser.jay" +#line 2155 "cs-parser.jay" { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 255: -#line 2152 "cs-parser.jay" +#line 2156 "cs-parser.jay" { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); } break; case 256: -#line 2159 "cs-parser.jay" +#line 2163 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2124,7 +2124,7 @@ case 257: case_257(); break; case 258: -#line 2178 "cs-parser.jay" +#line 2182 "cs-parser.jay" { valid_param_mod = ParameterModifierType.DefaultValue; } @@ -2151,11 +2151,11 @@ case 265: case_265(); break; case 267: -#line 2281 "cs-parser.jay" +#line 2285 "cs-parser.jay" { current_block = null; yyVal = null; } break; case 270: -#line 2293 "cs-parser.jay" +#line 2297 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2164,7 +2164,7 @@ case 271: case_271(); break; case 272: -#line 2303 "cs-parser.jay" +#line 2307 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2197,7 +2197,7 @@ case 281: case_281(); break; case 283: -#line 2412 "cs-parser.jay" +#line 2416 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2206,13 +2206,13 @@ case 284: case_284(); break; case 287: -#line 2429 "cs-parser.jay" +#line 2433 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } break; case 288: -#line 2433 "cs-parser.jay" +#line 2437 "cs-parser.jay" { current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]); } @@ -2221,7 +2221,7 @@ case 289: case_289(); break; case 290: -#line 2446 "cs-parser.jay" +#line 2450 "cs-parser.jay" { ++lexer.parsing_block; } @@ -2233,7 +2233,7 @@ case 292: case_292(); break; case 293: -#line 2471 "cs-parser.jay" +#line 2475 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2263,7 +2263,7 @@ case 303: case_303(); break; case 305: -#line 2565 "cs-parser.jay" +#line 2569 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2287,7 +2287,7 @@ case 312: case_312(); break; case 315: -#line 2633 "cs-parser.jay" +#line 2637 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[0+yyTop])); } @@ -2305,7 +2305,7 @@ case 320: case_320(); break; case 321: -#line 2691 "cs-parser.jay" +#line 2695 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; } @@ -2314,7 +2314,7 @@ case 322: case_322(); break; case 323: -#line 2713 "cs-parser.jay" +#line 2717 "cs-parser.jay" { lexer.ConstraintsParsing = false; } @@ -2347,7 +2347,7 @@ case 336: case_336(); break; case 337: -#line 2818 "cs-parser.jay" +#line 2822 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2392,13 +2392,13 @@ case 352: case_352(); break; case 354: -#line 2939 "cs-parser.jay" +#line 2943 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } break; case 355: -#line 2946 "cs-parser.jay" +#line 2950 "cs-parser.jay" { lexer.parsing_generic_declaration = true; } @@ -2413,7 +2413,7 @@ case 361: case_361(); break; case 363: -#line 2984 "cs-parser.jay" +#line 2988 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2422,7 +2422,7 @@ case 364: case_364(); break; case 365: -#line 3004 "cs-parser.jay" +#line 3008 "cs-parser.jay" { yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2431,13 +2431,13 @@ case 366: case_366(); break; case 367: -#line 3013 "cs-parser.jay" +#line 3017 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 368: -#line 3017 "cs-parser.jay" +#line 3021 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -2455,63 +2455,63 @@ case 372: case_372(); break; case 373: -#line 3056 "cs-parser.jay" +#line 3060 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); } break; case 374: -#line 3057 "cs-parser.jay" +#line 3061 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); } break; case 375: -#line 3058 "cs-parser.jay" +#line 3062 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); } break; case 376: -#line 3059 "cs-parser.jay" +#line 3063 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); } break; case 377: -#line 3060 "cs-parser.jay" +#line 3064 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); } break; case 378: -#line 3061 "cs-parser.jay" +#line 3065 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); } break; case 380: -#line 3066 "cs-parser.jay" +#line 3070 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); } break; case 381: -#line 3067 "cs-parser.jay" +#line 3071 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); } break; case 382: -#line 3068 "cs-parser.jay" +#line 3072 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); } break; case 383: -#line 3069 "cs-parser.jay" +#line 3073 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); } break; case 384: -#line 3070 "cs-parser.jay" +#line 3074 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); } break; case 385: -#line 3071 "cs-parser.jay" +#line 3075 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); } break; case 386: -#line 3072 "cs-parser.jay" +#line 3076 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); } break; case 387: -#line 3073 "cs-parser.jay" +#line 3077 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); } break; case 388: -#line 3074 "cs-parser.jay" +#line 3078 "cs-parser.jay" { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); } break; case 409: @@ -2521,22 +2521,22 @@ case 410: case_410(); break; case 414: -#line 3121 "cs-parser.jay" +#line 3125 "cs-parser.jay" { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); } break; case 415: -#line 3125 "cs-parser.jay" +#line 3129 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); } break; case 416: -#line 3126 "cs-parser.jay" +#line 3130 "cs-parser.jay" { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); } break; case 421: case_421(); break; case 422: -#line 3159 "cs-parser.jay" +#line 3163 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); } @@ -2554,7 +2554,7 @@ case 426: case_426(); break; case 427: -#line 3194 "cs-parser.jay" +#line 3198 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop])); } @@ -2563,7 +2563,7 @@ case 428: case_428(); break; case 429: -#line 3202 "cs-parser.jay" +#line 3206 "cs-parser.jay" { yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location); } @@ -2575,7 +2575,7 @@ case 431: case_431(); break; case 432: -#line 3218 "cs-parser.jay" +#line 3222 "cs-parser.jay" { yyVal = null; } break; case 434: @@ -2585,11 +2585,11 @@ case 435: case_435(); break; case 436: -#line 3241 "cs-parser.jay" +#line 3245 "cs-parser.jay" { yyVal = null; } break; case 437: -#line 3245 "cs-parser.jay" +#line 3249 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2607,7 +2607,7 @@ case 441: case_441(); break; case 442: -#line 3278 "cs-parser.jay" +#line 3282 "cs-parser.jay" { yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop])); } @@ -2622,7 +2622,7 @@ case 445: case_445(); break; case 448: -#line 3306 "cs-parser.jay" +#line 3310 "cs-parser.jay" { yyVal = null; } break; case 450: @@ -2641,7 +2641,7 @@ case 454: case_454(); break; case 455: -#line 3358 "cs-parser.jay" +#line 3362 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } @@ -2677,13 +2677,13 @@ case 469: case_469(); break; case 470: -#line 3445 "cs-parser.jay" +#line 3449 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop]); } break; case 472: -#line 3453 "cs-parser.jay" +#line 3457 "cs-parser.jay" { yyVal = new This (GetLocation (yyVals[0+yyTop])); } @@ -2695,13 +2695,13 @@ case 474: case_474(); break; case 475: -#line 3473 "cs-parser.jay" +#line 3477 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } break; case 476: -#line 3480 "cs-parser.jay" +#line 3484 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop])); } @@ -2728,7 +2728,7 @@ case 483: case_483(); break; case 484: -#line 3546 "cs-parser.jay" +#line 3550 "cs-parser.jay" { ++lexer.parsing_type; } @@ -2740,7 +2740,7 @@ case 486: case_486(); break; case 489: -#line 3573 "cs-parser.jay" +#line 3577 "cs-parser.jay" { yyVal = null; } break; case 491: @@ -2771,25 +2771,25 @@ case 502: case_502(); break; case 503: -#line 3651 "cs-parser.jay" +#line 3655 "cs-parser.jay" { yyVal = 2; } break; case 504: -#line 3655 "cs-parser.jay" +#line 3659 "cs-parser.jay" { yyVal = ((int) yyVals[-1+yyTop]) + 1; } break; case 505: -#line 3662 "cs-parser.jay" +#line 3666 "cs-parser.jay" { yyVal = null; } break; case 506: -#line 3666 "cs-parser.jay" +#line 3670 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -2807,7 +2807,7 @@ case 510: case_510(); break; case 511: -#line 3710 "cs-parser.jay" +#line 3714 "cs-parser.jay" { lexer.TypeOfParsing = true; } @@ -2852,7 +2852,7 @@ case 526: case_526(); break; case 527: -#line 3830 "cs-parser.jay" +#line 3834 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop])); } @@ -2861,25 +2861,25 @@ case 528: case_528(); break; case 529: -#line 3843 "cs-parser.jay" +#line 3847 "cs-parser.jay" { start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop])); } break; case 530: -#line 3847 "cs-parser.jay" +#line 3851 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); } break; case 531: -#line 3854 "cs-parser.jay" +#line 3858 "cs-parser.jay" { yyVal = ParametersCompiled.Undefined; } break; case 533: -#line 3862 "cs-parser.jay" +#line 3866 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -2891,13 +2891,13 @@ case 535: case_535(); break; case 537: -#line 3888 "cs-parser.jay" +#line 3892 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 538: -#line 3892 "cs-parser.jay" +#line 3896 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2909,37 +2909,37 @@ case 542: case_542(); break; case 544: -#line 3922 "cs-parser.jay" +#line 3926 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 545: -#line 3926 "cs-parser.jay" +#line 3930 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 546: -#line 3930 "cs-parser.jay" +#line 3934 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 547: -#line 3934 "cs-parser.jay" +#line 3938 "cs-parser.jay" { yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 548: -#line 3938 "cs-parser.jay" +#line 3942 "cs-parser.jay" { yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 549: -#line 3942 "cs-parser.jay" +#line 3946 "cs-parser.jay" { yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2957,7 +2957,7 @@ case 555: case_555(); break; case 556: -#line 3974 "cs-parser.jay" +#line 3978 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -2966,13 +2966,13 @@ case 557: case_557(); break; case 558: -#line 3983 "cs-parser.jay" +#line 3987 "cs-parser.jay" { yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 559: -#line 3987 "cs-parser.jay" +#line 3991 "cs-parser.jay" { yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3023,7 +3023,7 @@ case 584: case_584(); break; case 585: -#line 4111 "cs-parser.jay" +#line 4115 "cs-parser.jay" { yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3074,14 +3074,14 @@ case 600: case_600(); break; case 601: -#line 4208 "cs-parser.jay" +#line 4212 "cs-parser.jay" { yyVal = ParametersCompiled.EmptyReadOnlyParameters; } break; case 602: case_602(); break; case 605: -#line 4224 "cs-parser.jay" +#line 4228 "cs-parser.jay" { start_block (lexer.Location); } @@ -3105,7 +3105,7 @@ case 612: case_612(); break; case 613: -#line 4269 "cs-parser.jay" +#line 4273 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3117,7 +3117,7 @@ case 615: case_615(); break; case 616: -#line 4283 "cs-parser.jay" +#line 4287 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3129,7 +3129,7 @@ case 618: case_618(); break; case 624: -#line 4308 "cs-parser.jay" +#line 4312 "cs-parser.jay" { yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop])); } @@ -3144,13 +3144,13 @@ case 627: case_627(); break; case 629: -#line 4337 "cs-parser.jay" +#line 4341 "cs-parser.jay" { yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]); } break; case 630: -#line 4350 "cs-parser.jay" +#line 4354 "cs-parser.jay" { lexer.ConstraintsParsing = true; } @@ -3168,18 +3168,18 @@ case 634: case_634(); break; case 635: -#line 4393 "cs-parser.jay" +#line 4397 "cs-parser.jay" { yyVal = null; } break; case 636: -#line 4395 "cs-parser.jay" +#line 4399 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); } break; case 637: case_637(); break; case 638: -#line 4408 "cs-parser.jay" +#line 4412 "cs-parser.jay" { lexer.parsing_modifiers = false; } @@ -3236,7 +3236,7 @@ case 657: case_657(); break; case 659: -#line 4528 "cs-parser.jay" +#line 4532 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3266,19 +3266,19 @@ case 667: case_667(); break; case 668: -#line 4619 "cs-parser.jay" +#line 4623 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop])); } break; case 669: -#line 4623 "cs-parser.jay" +#line 4627 "cs-parser.jay" { yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop])); } break; case 670: -#line 4630 "cs-parser.jay" +#line 4634 "cs-parser.jay" { yyVal = Variance.None; } @@ -3296,7 +3296,7 @@ case 674: case_674(); break; case 675: -#line 4675 "cs-parser.jay" +#line 4679 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3314,13 +3314,13 @@ case 679: case_679(); break; case 684: -#line 4719 "cs-parser.jay" +#line 4723 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 685: -#line 4723 "cs-parser.jay" +#line 4727 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3329,13 +3329,13 @@ case 687: case_687(); break; case 690: -#line 4747 "cs-parser.jay" +#line 4751 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } break; case 691: -#line 4751 "cs-parser.jay" +#line 4755 "cs-parser.jay" { current_block.AddStatement ((Statement) yyVals[0+yyTop]); } @@ -3368,13 +3368,13 @@ case 730: case_730(); break; case 731: -#line 4895 "cs-parser.jay" +#line 4899 "cs-parser.jay" { yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } break; case 732: -#line 4899 "cs-parser.jay" +#line 4903 "cs-parser.jay" { yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]); } @@ -3386,7 +3386,7 @@ case 735: case_735(); break; case 736: -#line 4920 "cs-parser.jay" +#line 4924 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop])); } @@ -3419,7 +3419,7 @@ case 751: case_751(); break; case 752: -#line 5020 "cs-parser.jay" +#line 5024 "cs-parser.jay" { report.Error (145, lexer.Location, "A const field requires a value to be provided"); } @@ -3440,15 +3440,15 @@ case 762: case_762(); break; case 763: -#line 5070 "cs-parser.jay" +#line 5074 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 764: -#line 5074 "cs-parser.jay" +#line 5078 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 765: -#line 5075 "cs-parser.jay" +#line 5079 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 766: @@ -3467,7 +3467,7 @@ case 772: case_772(); break; case 773: -#line 5143 "cs-parser.jay" +#line 5147 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); } @@ -3488,13 +3488,13 @@ case 779: case_779(); break; case 780: -#line 5187 "cs-parser.jay" +#line 5191 "cs-parser.jay" { current_block = current_block.CreateSwitchBlock (lexer.Location); } break; case 781: -#line 5191 "cs-parser.jay" +#line 5195 "cs-parser.jay" { yyVal = new SwitchSection ((List) yyVals[-2+yyTop], current_block); } @@ -3509,7 +3509,7 @@ case 784: case_784(); break; case 785: -#line 5220 "cs-parser.jay" +#line 5224 "cs-parser.jay" { yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop])); } @@ -3524,7 +3524,7 @@ case 792: case_792(); break; case 793: -#line 5259 "cs-parser.jay" +#line 5263 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } @@ -3536,7 +3536,7 @@ case 795: case_795(); break; case 796: -#line 5287 "cs-parser.jay" +#line 5291 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 798: @@ -3546,11 +3546,11 @@ case 799: case_799(); break; case 801: -#line 5308 "cs-parser.jay" +#line 5312 "cs-parser.jay" { yyVal = null; } break; case 803: -#line 5313 "cs-parser.jay" +#line 5317 "cs-parser.jay" { yyVal = new EmptyStatement (lexer.Location); } break; case 807: @@ -3593,7 +3593,7 @@ case 825: case_825(); break; case 828: -#line 5468 "cs-parser.jay" +#line 5472 "cs-parser.jay" { yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false); } @@ -3614,7 +3614,7 @@ case 833: case_833(); break; case 836: -#line 5521 "cs-parser.jay" +#line 5525 "cs-parser.jay" { yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3623,7 +3623,7 @@ case 837: case_837(); break; case 838: -#line 5540 "cs-parser.jay" +#line 5544 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } @@ -3632,13 +3632,13 @@ case 839: case_839(); break; case 840: -#line 5558 "cs-parser.jay" +#line 5562 "cs-parser.jay" { yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } break; case 841: -#line 5565 "cs-parser.jay" +#line 5569 "cs-parser.jay" { yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } @@ -3647,7 +3647,7 @@ case 842: case_842(); break; case 843: -#line 5575 "cs-parser.jay" +#line 5579 "cs-parser.jay" { yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); } @@ -3677,7 +3677,7 @@ case 851: case_851(); break; case 852: -#line 5658 "cs-parser.jay" +#line 5662 "cs-parser.jay" { Error_MissingInitializer (lexer.Location); } @@ -3710,7 +3710,7 @@ case 861: case_861(); break; case 862: -#line 5759 "cs-parser.jay" +#line 5763 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3719,7 +3719,7 @@ case 863: case_863(); break; case 864: -#line 5774 "cs-parser.jay" +#line 5778 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3734,7 +3734,7 @@ case 868: case_868(); break; case 869: -#line 5819 "cs-parser.jay" +#line 5823 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3755,7 +3755,7 @@ case 877: case_877(); break; case 883: -#line 5878 "cs-parser.jay" +#line 5882 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3764,7 +3764,7 @@ case 884: case_884(); break; case 885: -#line 5897 "cs-parser.jay" +#line 5901 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3797,13 +3797,13 @@ case 894: case_894(); break; case 896: -#line 6041 "cs-parser.jay" +#line 6045 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; case 897: -#line 6048 "cs-parser.jay" +#line 6052 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); } @@ -3824,7 +3824,7 @@ case 904: case_904(); break; case 905: -#line 6094 "cs-parser.jay" +#line 6098 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3836,7 +3836,7 @@ case 907: case_907(); break; case 908: -#line 6111 "cs-parser.jay" +#line 6115 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]); } @@ -3860,13 +3860,13 @@ case 917: case_917(); break; case 925: -#line 6235 "cs-parser.jay" +#line 6239 "cs-parser.jay" { module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop]; } break; case 926: -#line 6242 "cs-parser.jay" +#line 6246 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; } @@ -3878,13 +3878,13 @@ case 928: case_928(); break; case 929: -#line 6259 "cs-parser.jay" +#line 6263 "cs-parser.jay" { yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } break; case 930: -#line 6263 "cs-parser.jay" +#line 6267 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } @@ -3902,25 +3902,25 @@ case 934: case_934(); break; case 936: -#line 6299 "cs-parser.jay" +#line 6303 "cs-parser.jay" { yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]); } break; case 938: -#line 6307 "cs-parser.jay" +#line 6311 "cs-parser.jay" { valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; } break; case 939: -#line 6311 "cs-parser.jay" +#line 6315 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; case 940: -#line 6318 "cs-parser.jay" +#line 6322 "cs-parser.jay" { yyVal = new List (0); } @@ -4979,33 +4979,36 @@ void case_179() { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Attributes) yyVals[-3+yyTop], lt.Location); + lbag.AddLocation (yyVal, savedLocation); } void case_180() -#line 1685 "cs-parser.jay" +#line 1686 "cs-parser.jay" { 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); + lbag.AddLocation (yyVal, savedLocation); } void case_181() -#line 1692 "cs-parser.jay" +#line 1694 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_182() -#line 1700 "cs-parser.jay" +#line 1702 "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"); + savedLocation = GetLocation (yyVals[0+yyTop]); } void case_183() -#line 1705 "cs-parser.jay" +#line 1708 "cs-parser.jay" { Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop]; if ((mod & Parameter.Modifier.This) != 0) { @@ -5013,24 +5016,25 @@ void case_183() } else { report.Error (1611, GetLocation (yyVals[-1+yyTop]), "The params parameter cannot be declared as ref or out"); } + savedLocation = GetLocation (yyVals[-1+yyTop]); } void case_185() -#line 1721 "cs-parser.jay" +#line 1725 "cs-parser.jay" { if ((valid_param_mod & ParameterModifierType.Arglist) == 0) report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context"); } void case_186() -#line 1732 "cs-parser.jay" +#line 1736 "cs-parser.jay" { if (doc_support) tmpComment = Lexer.consume_doc_comment (); } void case_187() -#line 1737 "cs-parser.jay" +#line 1741 "cs-parser.jay" { var type = (FullNamedExpression) yyVals[-3+yyTop]; current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop], @@ -5046,7 +5050,7 @@ void case_187() } void case_188() -#line 1751 "cs-parser.jay" +#line 1755 "cs-parser.jay" { lexer.PropertyParsing = false; @@ -5055,14 +5059,14 @@ void case_188() } void case_189() -#line 1758 "cs-parser.jay" +#line 1762 "cs-parser.jay" { lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop])); current_property = null; } void case_191() -#line 1772 "cs-parser.jay" +#line 1776 "cs-parser.jay" { valid_param_mod = 0; var type = (FullNamedExpression) yyVals[-6+yyTop]; @@ -5089,7 +5093,7 @@ void case_191() } void case_193() -#line 1801 "cs-parser.jay" +#line 1805 "cs-parser.jay" { if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); @@ -5102,7 +5106,7 @@ void case_193() } void case_198() -#line 1820 "cs-parser.jay" +#line 1824 "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 ()); @@ -5115,7 +5119,7 @@ void case_198() } void case_199() -#line 1834 "cs-parser.jay" +#line 1838 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5138,7 +5142,7 @@ void case_199() } void case_200() -#line 1855 "cs-parser.jay" +#line 1859 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5161,7 +5165,7 @@ void case_200() } void case_201() -#line 1879 "cs-parser.jay" +#line 1883 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) { FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties"); @@ -5189,7 +5193,7 @@ void case_201() } void case_202() -#line 1905 "cs-parser.jay" +#line 1909 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5212,21 +5216,21 @@ void case_202() } void case_204() -#line 1930 "cs-parser.jay" +#line 1934 "cs-parser.jay" { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; } void case_205() -#line 1935 "cs-parser.jay" +#line 1939 "cs-parser.jay" { Error_SyntaxError (1043, yyToken, "Invalid accessor body"); yyVal = null; } void case_207() -#line 1950 "cs-parser.jay" +#line 1954 "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]); @@ -5234,7 +5238,7 @@ void case_207() } void case_208() -#line 1957 "cs-parser.jay" +#line 1961 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -5249,7 +5253,7 @@ void case_208() } void case_209() -#line 1970 "cs-parser.jay" +#line 1974 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -5257,7 +5261,7 @@ void case_209() } void case_210() -#line 1976 "cs-parser.jay" +#line 1980 "cs-parser.jay" { if (yyVals[0+yyTop] != null) current_class.OptionalSemicolon = GetLocation (yyVals[0+yyTop]); @@ -5266,7 +5270,7 @@ void case_210() } void case_226() -#line 2036 "cs-parser.jay" +#line 2040 "cs-parser.jay" { OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop]; if (decl != null) { @@ -5296,14 +5300,14 @@ void case_226() } void case_230() -#line 2073 "cs-parser.jay" +#line 2077 "cs-parser.jay" { 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_232() -#line 2085 "cs-parser.jay" +#line 2089 "cs-parser.jay" { valid_param_mod = 0; @@ -5345,7 +5349,7 @@ void case_232() } void case_257() -#line 2161 "cs-parser.jay" +#line 2165 "cs-parser.jay" { valid_param_mod = 0; @@ -5362,7 +5366,7 @@ void case_257() } void case_259() -#line 2180 "cs-parser.jay" +#line 2184 "cs-parser.jay" { valid_param_mod = 0; @@ -5379,7 +5383,7 @@ void case_259() } void case_260() -#line 2195 "cs-parser.jay" +#line 2199 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5387,7 +5391,7 @@ void case_260() } void case_261() -#line 2201 "cs-parser.jay" +#line 2205 "cs-parser.jay" { Error_SyntaxError (yyToken); current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; @@ -5395,7 +5399,7 @@ void case_261() } void case_262() -#line 2211 "cs-parser.jay" +#line 2215 "cs-parser.jay" { Constructor c = (Constructor) yyVals[-1+yyTop]; c.Block = (ToplevelBlock) yyVals[0+yyTop]; @@ -5411,7 +5415,7 @@ void case_262() } void case_263() -#line 2230 "cs-parser.jay" +#line 2234 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5422,7 +5426,7 @@ void case_263() } void case_264() -#line 2239 "cs-parser.jay" +#line 2243 "cs-parser.jay" { valid_param_mod = 0; current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop]; @@ -5435,7 +5439,7 @@ void case_264() } void case_265() -#line 2250 "cs-parser.jay" +#line 2254 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop]; var mods = (Modifiers) yyVals[-7+yyTop]; @@ -5465,7 +5469,7 @@ void case_265() } void case_271() -#line 2295 "cs-parser.jay" +#line 2299 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5473,7 +5477,7 @@ void case_271() } void case_273() -#line 2305 "cs-parser.jay" +#line 2309 "cs-parser.jay" { --lexer.parsing_block; yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -5481,14 +5485,14 @@ void case_273() } void case_274() -#line 2311 "cs-parser.jay" +#line 2315 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_275() -#line 2319 "cs-parser.jay" +#line 2323 "cs-parser.jay" { if (doc_support) { tmpComment = Lexer.consume_doc_comment (); @@ -5499,7 +5503,7 @@ void case_275() } void case_276() -#line 2328 "cs-parser.jay" +#line 2332 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; if (lt.Value != current_container.MemberName.Name){ @@ -5521,7 +5525,7 @@ void case_276() } void case_277() -#line 2353 "cs-parser.jay" +#line 2357 "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); @@ -5535,7 +5539,7 @@ void case_277() } void case_278() -#line 2367 "cs-parser.jay" +#line 2371 "cs-parser.jay" { if (doc_support) { current_event_field.DocComment = Lexer.consume_doc_comment (); @@ -5547,7 +5551,7 @@ void case_278() } void case_279() -#line 2380 "cs-parser.jay" +#line 2384 "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); @@ -5557,7 +5561,7 @@ void case_279() } void case_280() -#line 2388 "cs-parser.jay" +#line 2392 "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"); @@ -5566,7 +5570,7 @@ void case_280() } void case_281() -#line 2395 "cs-parser.jay" +#line 2399 "cs-parser.jay" { if (doc_support) { current_event.DocComment = Lexer.consume_doc_comment (); @@ -5579,14 +5583,14 @@ void case_281() } void case_284() -#line 2414 "cs-parser.jay" +#line 2418 "cs-parser.jay" { --lexer.parsing_block; current_event_field.Initializer = (Expression) yyVals[0+yyTop]; } void case_289() -#line 2438 "cs-parser.jay" +#line 2442 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null); @@ -5594,7 +5598,7 @@ void case_289() } void case_291() -#line 2448 "cs-parser.jay" +#line 2452 "cs-parser.jay" { --lexer.parsing_block; var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; @@ -5603,7 +5607,7 @@ void case_291() } void case_292() -#line 2457 "cs-parser.jay" +#line 2461 "cs-parser.jay" { if (current_container.Kind == MemberKind.Interface) { report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer", @@ -5617,28 +5621,28 @@ void case_292() } void case_296() -#line 2478 "cs-parser.jay" +#line 2482 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_297() -#line 2483 "cs-parser.jay" +#line 2487 "cs-parser.jay" { report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors", current_event.GetSignatureForError ()); } void case_298() -#line 2488 "cs-parser.jay" +#line 2492 "cs-parser.jay" { report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected"); yyVal = null; } void case_299() -#line 2496 "cs-parser.jay" +#line 2500 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5652,7 +5656,7 @@ void case_299() } void case_300() -#line 2508 "cs-parser.jay" +#line 2512 "cs-parser.jay" { lexer.EventParsing = true; @@ -5667,7 +5671,7 @@ void case_300() } void case_301() -#line 2524 "cs-parser.jay" +#line 2528 "cs-parser.jay" { if (yyVals[-1+yyTop] != ModifierNone) { report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations"); @@ -5681,7 +5685,7 @@ void case_301() } void case_302() -#line 2536 "cs-parser.jay" +#line 2540 "cs-parser.jay" { lexer.EventParsing = true; @@ -5696,21 +5700,21 @@ void case_302() } void case_303() -#line 2552 "cs-parser.jay" +#line 2556 "cs-parser.jay" { report.Error (73, lexer.Location, "An add or remove accessor must have a body"); yyVal = null; } void case_306() -#line 2568 "cs-parser.jay" +#line 2572 "cs-parser.jay" { if (doc_support) enumTypeComment = Lexer.consume_doc_comment (); } void case_307() -#line 2573 "cs-parser.jay" +#line 2577 "cs-parser.jay" { if (doc_support) Lexer.doc_state = XmlCommentState.Allowed; @@ -5725,7 +5729,7 @@ void case_307() } void case_308() -#line 2586 "cs-parser.jay" +#line 2590 "cs-parser.jay" { /* here will be evaluated after CLOSE_BLACE is consumed.*/ if (doc_support) @@ -5733,7 +5737,7 @@ void case_308() } void case_309() -#line 2592 "cs-parser.jay" +#line 2596 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); if (yyVals[0+yyTop] != null) @@ -5749,7 +5753,7 @@ void case_309() } void case_311() -#line 2610 "cs-parser.jay" +#line 2614 "cs-parser.jay" { var te = yyVals[0+yyTop] as TypeExpression; if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) { @@ -5762,21 +5766,21 @@ void case_311() } void case_312() -#line 2621 "cs-parser.jay" +#line 2625 "cs-parser.jay" { Error_TypeExpected (GetLocation (yyVals[-1+yyTop])); yyVal = null; } void case_317() -#line 2639 "cs-parser.jay" +#line 2643 "cs-parser.jay" { enumCommas.Add (GetLocation (yyVals[-1+yyTop])); yyVal = yyVals[0+yyTop]; } void case_318() -#line 2647 "cs-parser.jay" +#line 2651 "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]); @@ -5791,7 +5795,7 @@ void case_318() } void case_319() -#line 2660 "cs-parser.jay" +#line 2664 "cs-parser.jay" { ++lexer.parsing_block; if (doc_support) { @@ -5801,7 +5805,7 @@ void case_319() } void case_320() -#line 2668 "cs-parser.jay" +#line 2672 "cs-parser.jay" { --lexer.parsing_block; @@ -5817,7 +5821,7 @@ void case_320() } void case_322() -#line 2693 "cs-parser.jay" +#line 2697 "cs-parser.jay" { valid_param_mod = 0; @@ -5837,7 +5841,7 @@ void case_322() } void case_324() -#line 2715 "cs-parser.jay" +#line 2719 "cs-parser.jay" { if (doc_support) { current_delegate.DocComment = Lexer.consume_doc_comment (); @@ -5853,7 +5857,7 @@ void case_324() } void case_326() -#line 2733 "cs-parser.jay" +#line 2737 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types"); @@ -5862,7 +5866,7 @@ void case_326() } void case_328() -#line 2744 "cs-parser.jay" +#line 2748 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5871,7 +5875,7 @@ void case_328() } void case_330() -#line 2755 "cs-parser.jay" +#line 2759 "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) { @@ -5880,14 +5884,14 @@ void case_330() } void case_331() -#line 2765 "cs-parser.jay" +#line 2769 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_333() -#line 2777 "cs-parser.jay" +#line 2781 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -5900,14 +5904,14 @@ void case_333() } void case_334() -#line 2788 "cs-parser.jay" +#line 2792 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = new TypeArguments (); } void case_335() -#line 2796 "cs-parser.jay" +#line 2800 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5916,7 +5920,7 @@ void case_335() } void case_336() -#line 2803 "cs-parser.jay" +#line 2807 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -5925,7 +5929,7 @@ void case_336() } void case_338() -#line 2820 "cs-parser.jay" +#line 2824 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5933,7 +5937,7 @@ void case_338() } void case_339() -#line 2829 "cs-parser.jay" +#line 2833 "cs-parser.jay" { MemberName mn = (MemberName)yyVals[0+yyTop]; if (mn.TypeArguments != null) @@ -5942,7 +5946,7 @@ void case_339() } void case_341() -#line 2840 "cs-parser.jay" +#line 2844 "cs-parser.jay" { lexer.parsing_generic_declaration = false; var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -5950,21 +5954,21 @@ void case_341() } void case_342() -#line 2849 "cs-parser.jay" +#line 2853 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop])); } void case_343() -#line 2854 "cs-parser.jay" +#line 2858 "cs-parser.jay" { lexer.parsing_generic_declaration = false; yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[0+yyTop])); } void case_344() -#line 2862 "cs-parser.jay" +#line 2866 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location); @@ -5972,7 +5976,7 @@ void case_344() } void case_345() -#line 2868 "cs-parser.jay" +#line 2872 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -5982,7 +5986,7 @@ void case_345() } void case_346() -#line 2876 "cs-parser.jay" +#line 2880 "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); @@ -5990,7 +5994,7 @@ void case_346() } void case_348() -#line 2886 "cs-parser.jay" +#line 2890 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics"); @@ -6000,7 +6004,7 @@ void case_348() } void case_349() -#line 2897 "cs-parser.jay" +#line 2901 "cs-parser.jay" { TypeArguments type_args = new TypeArguments (); type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6008,7 +6012,7 @@ void case_349() } void case_350() -#line 2903 "cs-parser.jay" +#line 2907 "cs-parser.jay" { TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop]; type_args.Add ((FullNamedExpression)yyVals[0+yyTop]); @@ -6017,7 +6021,7 @@ void case_350() } void case_351() -#line 2913 "cs-parser.jay" +#line 2917 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; var variance = (Variance) yyVals[-1+yyTop]; @@ -6027,7 +6031,7 @@ void case_351() } void case_352() -#line 2921 "cs-parser.jay" +#line 2925 "cs-parser.jay" { if (GetTokenName (yyToken) == "type") report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type"); @@ -6038,28 +6042,28 @@ void case_352() } void case_357() -#line 2955 "cs-parser.jay" +#line 2959 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_359() -#line 2964 "cs-parser.jay" +#line 2968 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_361() -#line 2973 "cs-parser.jay" +#line 2977 "cs-parser.jay" { report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'"); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_364() -#line 2989 "cs-parser.jay" +#line 2993 "cs-parser.jay" { MemberName name = (MemberName) yyVals[-1+yyTop]; @@ -6074,14 +6078,14 @@ void case_364() } void case_366() -#line 3006 "cs-parser.jay" +#line 3010 "cs-parser.jay" { if (yyVals[0+yyTop] != null) yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]); } void case_369() -#line 3022 "cs-parser.jay" +#line 3026 "cs-parser.jay" { var types = new List (2); types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6089,7 +6093,7 @@ void case_369() } void case_370() -#line 3028 "cs-parser.jay" +#line 3032 "cs-parser.jay" { var types = (List) yyVals[-2+yyTop]; types.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -6098,7 +6102,7 @@ void case_370() } void case_371() -#line 3038 "cs-parser.jay" +#line 3042 "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 ()); @@ -6107,35 +6111,35 @@ void case_371() } void case_372() -#line 3045 "cs-parser.jay" +#line 3049 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_409() -#line 3107 "cs-parser.jay" +#line 3111 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location); } void case_410() -#line 3111 "cs-parser.jay" +#line 3115 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location); } void case_421() -#line 3152 "cs-parser.jay" +#line 3156 "cs-parser.jay" { yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_423() -#line 3164 "cs-parser.jay" +#line 3168 "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) { @@ -6144,7 +6148,7 @@ void case_423() } void case_424() -#line 3171 "cs-parser.jay" +#line 3175 "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) { @@ -6153,7 +6157,7 @@ void case_424() } void case_425() -#line 3178 "cs-parser.jay" +#line 3182 "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) { @@ -6162,7 +6166,7 @@ void case_425() } void case_426() -#line 3185 "cs-parser.jay" +#line 3189 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6172,28 +6176,28 @@ void case_426() } void case_428() -#line 3195 "cs-parser.jay" +#line 3199 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_430() -#line 3203 "cs-parser.jay" +#line 3207 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location); } void case_431() -#line 3211 "cs-parser.jay" +#line 3215 "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_434() -#line 3224 "cs-parser.jay" +#line 3228 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) { yyVal = CollectionOrObjectInitializers.Empty; @@ -6205,14 +6209,14 @@ void case_434() } void case_435() -#line 3234 "cs-parser.jay" +#line 3238 "cs-parser.jay" { yyVal = new CollectionOrObjectInitializers ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_438() -#line 3250 "cs-parser.jay" +#line 3254 "cs-parser.jay" { var a = new List (); a.Add ((Expression) yyVals[0+yyTop]); @@ -6220,7 +6224,7 @@ void case_438() } void case_439() -#line 3256 "cs-parser.jay" +#line 3260 "cs-parser.jay" { var a = (List)yyVals[-2+yyTop]; a.Add ((Expression) yyVals[0+yyTop]); @@ -6229,14 +6233,14 @@ void case_439() } void case_440() -#line 3262 "cs-parser.jay" +#line 3266 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_441() -#line 3270 "cs-parser.jay" +#line 3274 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location); @@ -6244,7 +6248,7 @@ void case_441() } void case_443() -#line 3279 "cs-parser.jay" +#line 3283 "cs-parser.jay" { CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName; if (csn == null) @@ -6254,7 +6258,7 @@ void case_443() } void case_444() -#line 3287 "cs-parser.jay" +#line 3291 "cs-parser.jay" { if (yyVals[-1+yyTop] == null) yyVal = null; @@ -6263,14 +6267,14 @@ void case_444() } void case_445() -#line 3294 "cs-parser.jay" +#line 3298 "cs-parser.jay" { report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty"); yyVal = null; } void case_450() -#line 3312 "cs-parser.jay" +#line 3316 "cs-parser.jay" { Arguments list = new Arguments (4); list.Add ((Argument) yyVals[0+yyTop]); @@ -6278,7 +6282,7 @@ void case_450() } void case_451() -#line 3318 "cs-parser.jay" +#line 3322 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; if (list [list.Count - 1] is NamedArgument) @@ -6290,7 +6294,7 @@ void case_451() } void case_452() -#line 3328 "cs-parser.jay" +#line 3332 "cs-parser.jay" { Arguments list = (Arguments) yyVals[-2+yyTop]; NamedArgument a = (NamedArgument) yyVals[0+yyTop]; @@ -6307,56 +6311,56 @@ void case_452() } void case_453() -#line 3343 "cs-parser.jay" +#line 3347 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing"); yyVal = yyVals[-1+yyTop]; } void case_454() -#line 3348 "cs-parser.jay" +#line 3352 "cs-parser.jay" { report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing"); yyVal = null; } void case_459() -#line 3369 "cs-parser.jay" +#line 3373 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_460() -#line 3374 "cs-parser.jay" +#line 3378 "cs-parser.jay" { yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out); lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop])); } void case_461() -#line 3379 "cs-parser.jay" +#line 3383 "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_462() -#line 3384 "cs-parser.jay" +#line 3388 "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_464() -#line 3396 "cs-parser.jay" +#line 3400 "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_465() -#line 3404 "cs-parser.jay" +#line 3408 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6364,7 +6368,7 @@ void case_465() } void case_466() -#line 3410 "cs-parser.jay" +#line 3414 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6373,14 +6377,14 @@ void case_466() } void case_467() -#line 3416 "cs-parser.jay" +#line 3420 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = yyVals[-1+yyTop]; } void case_468() -#line 3424 "cs-parser.jay" +#line 3428 "cs-parser.jay" { Arguments args = new Arguments (4); args.Add ((Argument) yyVals[0+yyTop]); @@ -6388,7 +6392,7 @@ void case_468() } void case_469() -#line 3430 "cs-parser.jay" +#line 3434 "cs-parser.jay" { Arguments args = (Arguments) yyVals[-2+yyTop]; if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument)) @@ -6400,21 +6404,21 @@ void case_469() } void case_473() -#line 3458 "cs-parser.jay" +#line 3462 "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_474() -#line 3463 "cs-parser.jay" +#line 3467 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop])); } void case_477() -#line 3485 "cs-parser.jay" +#line 3489 "cs-parser.jay" { if (yyVals[0+yyTop] != null) { if (lang_version <= LanguageVersion.ISO_2) @@ -6429,7 +6433,7 @@ void case_477() } void case_478() -#line 3498 "cs-parser.jay" +#line 3502 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers"); @@ -6438,7 +6442,7 @@ void case_478() } void case_479() -#line 3510 "cs-parser.jay" +#line 3514 "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])) { @@ -6448,7 +6452,7 @@ void case_479() } void case_480() -#line 3518 "cs-parser.jay" +#line 3522 "cs-parser.jay" { if (yyVals[0+yyTop] == null) report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer"); @@ -6457,7 +6461,7 @@ void case_480() } void case_481() -#line 3525 "cs-parser.jay" +#line 3529 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays"); @@ -6466,28 +6470,28 @@ void case_481() } void case_482() -#line 3532 "cs-parser.jay" +#line 3536 "cs-parser.jay" { 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_483() -#line 3537 "cs-parser.jay" +#line 3541 "cs-parser.jay" { Error_SyntaxError (1526, yyToken, "Unexpected symbol"); yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop])); } void case_485() -#line 3548 "cs-parser.jay" +#line 3552 "cs-parser.jay" { --lexer.parsing_type; yyVal = yyVals[0+yyTop]; } void case_486() -#line 3556 "cs-parser.jay" +#line 3560 "cs-parser.jay" { if (lang_version <= LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types"); @@ -6499,7 +6503,7 @@ void case_486() } void case_491() -#line 3579 "cs-parser.jay" +#line 3583 "cs-parser.jay" { var a = new List (4); a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6507,7 +6511,7 @@ void case_491() } void case_492() -#line 3585 "cs-parser.jay" +#line 3589 "cs-parser.jay" { var a = (List) yyVals[-2+yyTop]; a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]); @@ -6517,7 +6521,7 @@ void case_492() } void case_493() -#line 3596 "cs-parser.jay" +#line 3600 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop]; yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location); @@ -6525,7 +6529,7 @@ void case_493() } void case_494() -#line 3602 "cs-parser.jay" +#line 3606 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location), @@ -6533,14 +6537,14 @@ void case_494() } void case_495() -#line 3608 "cs-parser.jay" +#line 3612 "cs-parser.jay" { MemberAccess ma = (MemberAccess) yyVals[0+yyTop]; yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location); } void case_496() -#line 3613 "cs-parser.jay" +#line 3617 "cs-parser.jay" { report.Error (746, lexer.Location, "Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression"); @@ -6548,28 +6552,28 @@ void case_496() } void case_500() -#line 3628 "cs-parser.jay" +#line 3632 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_501() -#line 3636 "cs-parser.jay" +#line 3640 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_502() -#line 3641 "cs-parser.jay" +#line 3645 "cs-parser.jay" { yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_507() -#line 3671 "cs-parser.jay" +#line 3675 "cs-parser.jay" { var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop])); ai.VariableDeclaration = current_variable; @@ -6578,7 +6582,7 @@ void case_507() } void case_508() -#line 3678 "cs-parser.jay" +#line 3682 "cs-parser.jay" { var ai = new ArrayInitializer ((List) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop])); ai.VariableDeclaration = current_variable; @@ -6591,7 +6595,7 @@ void case_508() } void case_509() -#line 3692 "cs-parser.jay" +#line 3696 "cs-parser.jay" { var list = new List (4); list.Add ((Expression) yyVals[0+yyTop]); @@ -6599,7 +6603,7 @@ void case_509() } void case_510() -#line 3698 "cs-parser.jay" +#line 3702 "cs-parser.jay" { var list = (List) yyVals[-2+yyTop]; list.Add ((Expression) yyVals[0+yyTop]); @@ -6608,7 +6612,7 @@ void case_510() } void case_512() -#line 3712 "cs-parser.jay" +#line 3716 "cs-parser.jay" { lexer.TypeOfParsing = false; yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop])); @@ -6616,14 +6620,14 @@ void case_512() } void case_515() -#line 3723 "cs-parser.jay" +#line 3727 "cs-parser.jay" { Error_TypeExpected (lexer.Location); yyVal = null; } void case_516() -#line 3731 "cs-parser.jay" +#line 3735 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6631,7 +6635,7 @@ void case_516() } void case_517() -#line 3737 "cs-parser.jay" +#line 3741 "cs-parser.jay" { var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6641,7 +6645,7 @@ void case_517() } void case_518() -#line 3745 "cs-parser.jay" +#line 3749 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -6651,7 +6655,7 @@ void case_518() } void case_519() -#line 3753 "cs-parser.jay" +#line 3757 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; @@ -6661,7 +6665,7 @@ void case_519() } void case_520() -#line 3761 "cs-parser.jay" +#line 3765 "cs-parser.jay" { var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression (); if (te.HasTypeArguments) @@ -6674,7 +6678,7 @@ void case_520() } void case_521() -#line 3775 "cs-parser.jay" +#line 3779 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics"); @@ -6683,7 +6687,7 @@ void case_521() } void case_522() -#line 3785 "cs-parser.jay" +#line 3789 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; if (lang_version == LanguageVersion.ISO_1) @@ -6693,35 +6697,35 @@ void case_522() } void case_523() -#line 3796 "cs-parser.jay" +#line 3800 "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_524() -#line 3804 "cs-parser.jay" +#line 3808 "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_525() -#line 3812 "cs-parser.jay" +#line 3816 "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_526() -#line 3820 "cs-parser.jay" +#line 3824 "cs-parser.jay" { 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_528() -#line 3832 "cs-parser.jay" +#line 3836 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); if ((ParametersCompiled) yyVals[-2+yyTop] != ParametersCompiled.Undefined) { @@ -6732,7 +6736,7 @@ void case_528() } void case_534() -#line 3864 "cs-parser.jay" +#line 3868 "cs-parser.jay" { valid_param_mod = 0; yyVal = yyVals[-1+yyTop]; @@ -6741,7 +6745,7 @@ void case_534() } void case_535() -#line 3874 "cs-parser.jay" +#line 3878 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression"); @@ -6751,147 +6755,147 @@ void case_535() } void case_541() -#line 3899 "cs-parser.jay" +#line 3903 "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_542() -#line 3907 "cs-parser.jay" +#line 3911 "cs-parser.jay" { current_block.ParametersBlock.IsAsync = true; yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_551() -#line 3948 "cs-parser.jay" +#line 3952 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_552() -#line 3953 "cs-parser.jay" +#line 3957 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_553() -#line 3958 "cs-parser.jay" +#line 3962 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_555() -#line 3967 "cs-parser.jay" +#line 3971 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_557() -#line 3976 "cs-parser.jay" +#line 3980 "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_561() -#line 3993 "cs-parser.jay" +#line 3997 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_562() -#line 3998 "cs-parser.jay" +#line 4002 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_564() -#line 4007 "cs-parser.jay" +#line 4011 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_565() -#line 4012 "cs-parser.jay" +#line 4016 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThan, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_566() -#line 4017 "cs-parser.jay" +#line 4021 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LessThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_567() -#line 4022 "cs-parser.jay" +#line 4026 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_569() -#line 4031 "cs-parser.jay" +#line 4035 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Equality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_570() -#line 4036 "cs-parser.jay" +#line 4040 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.Inequality, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_572() -#line 4045 "cs-parser.jay" +#line 4049 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_574() -#line 4054 "cs-parser.jay" +#line 4058 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_576() -#line 4063 "cs-parser.jay" +#line 4067 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_578() -#line 4072 "cs-parser.jay" +#line 4076 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_580() -#line 4081 "cs-parser.jay" +#line 4085 "cs-parser.jay" { yyVal = new Binary (Binary.Operator.LogicalOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_582() -#line 4090 "cs-parser.jay" +#line 4094 "cs-parser.jay" { if (lang_version < LanguageVersion.ISO_2) FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator"); @@ -6900,84 +6904,84 @@ void case_582() } void case_584() -#line 4101 "cs-parser.jay" +#line 4105 "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_586() -#line 4113 "cs-parser.jay" +#line 4117 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_587() -#line 4118 "cs-parser.jay" +#line 4122 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_588() -#line 4123 "cs-parser.jay" +#line 4127 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_589() -#line 4128 "cs-parser.jay" +#line 4132 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_590() -#line 4133 "cs-parser.jay" +#line 4137 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_591() -#line 4138 "cs-parser.jay" +#line 4142 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_592() -#line 4143 "cs-parser.jay" +#line 4147 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_593() -#line 4148 "cs-parser.jay" +#line 4152 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_594() -#line 4153 "cs-parser.jay" +#line 4157 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_595() -#line 4158 "cs-parser.jay" +#line 4162 "cs-parser.jay" { yyVal = new CompoundAssign ( Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop])); } void case_596() -#line 4166 "cs-parser.jay" +#line 4170 "cs-parser.jay" { var pars = new List (4); pars.Add ((Parameter) yyVals[0+yyTop]); @@ -6986,7 +6990,7 @@ void case_596() } void case_597() -#line 4173 "cs-parser.jay" +#line 4177 "cs-parser.jay" { var pars = (List) yyVals[-2+yyTop]; Parameter p = (Parameter)yyVals[0+yyTop]; @@ -7001,7 +7005,7 @@ void case_597() } void case_598() -#line 4189 "cs-parser.jay" +#line 4193 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7009,7 +7013,7 @@ void case_598() } void case_599() -#line 4195 "cs-parser.jay" +#line 4199 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; @@ -7017,14 +7021,14 @@ void case_599() } void case_600() -#line 4201 "cs-parser.jay" +#line 4205 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location); } void case_602() -#line 4209 "cs-parser.jay" +#line 4213 "cs-parser.jay" { var pars_list = (List) yyVals[0+yyTop]; yyVal = new ParametersCompiled (pars_list.ToArray ()); @@ -7032,7 +7036,7 @@ void case_602() } void case_606() -#line 4226 "cs-parser.jay" +#line 4230 "cs-parser.jay" { Block b = end_block (lexer.Location); b.IsCompilerGenerated = true; @@ -7041,14 +7045,14 @@ void case_606() } void case_608() -#line 4237 "cs-parser.jay" +#line 4241 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = EmptyExpression.Null; } void case_609() -#line 4245 "cs-parser.jay" +#line 4249 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7056,14 +7060,14 @@ void case_609() } void case_610() -#line 4251 "cs-parser.jay" +#line 4255 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop])); } void case_611() -#line 4256 "cs-parser.jay" +#line 4260 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location); @@ -7071,63 +7075,63 @@ void case_611() } void case_612() -#line 4262 "cs-parser.jay" +#line 4266 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_614() -#line 4271 "cs-parser.jay" +#line 4275 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop])); } void case_615() -#line 4276 "cs-parser.jay" +#line 4280 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_617() -#line 4285 "cs-parser.jay" +#line 4289 "cs-parser.jay" { valid_param_mod = 0; start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop])); } void case_618() -#line 4290 "cs-parser.jay" +#line 4294 "cs-parser.jay" { yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop])); } void case_625() -#line 4313 "cs-parser.jay" +#line 4317 "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_626() -#line 4318 "cs-parser.jay" +#line 4322 "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_627() -#line 4323 "cs-parser.jay" +#line 4327 "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_631() -#line 4352 "cs-parser.jay" +#line 4356 "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]); @@ -7140,7 +7144,7 @@ void case_631() } void case_632() -#line 4364 "cs-parser.jay" +#line 4368 "cs-parser.jay" { lexer.ConstraintsParsing = false; @@ -7155,7 +7159,7 @@ void case_632() } void case_633() -#line 4377 "cs-parser.jay" +#line 4381 "cs-parser.jay" { --lexer.parsing_declaration; if (doc_support) @@ -7163,7 +7167,7 @@ void case_633() } void case_634() -#line 4383 "cs-parser.jay" +#line 4387 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop])); if (yyVals[0+yyTop] != null) @@ -7172,7 +7176,7 @@ void case_634() } void case_637() -#line 4400 "cs-parser.jay" +#line 4404 "cs-parser.jay" { mod_locations = null; yyVal = ModifierNone; @@ -7180,7 +7184,7 @@ void case_637() } void case_640() -#line 4414 "cs-parser.jay" +#line 4418 "cs-parser.jay" { var m1 = (Modifiers) yyVals[-1+yyTop]; var m2 = (Modifiers) yyVals[0+yyTop]; @@ -7198,7 +7202,7 @@ void case_640() } void case_641() -#line 4433 "cs-parser.jay" +#line 4437 "cs-parser.jay" { yyVal = Modifiers.NEW; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7208,91 +7212,91 @@ void case_641() } void case_642() -#line 4441 "cs-parser.jay" +#line 4445 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_643() -#line 4446 "cs-parser.jay" +#line 4450 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_644() -#line 4451 "cs-parser.jay" +#line 4455 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_645() -#line 4456 "cs-parser.jay" +#line 4460 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_646() -#line 4461 "cs-parser.jay" +#line 4465 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_647() -#line 4466 "cs-parser.jay" +#line 4470 "cs-parser.jay" { yyVal = Modifiers.SEALED; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_648() -#line 4471 "cs-parser.jay" +#line 4475 "cs-parser.jay" { yyVal = Modifiers.STATIC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_649() -#line 4476 "cs-parser.jay" +#line 4480 "cs-parser.jay" { yyVal = Modifiers.READONLY; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_650() -#line 4481 "cs-parser.jay" +#line 4485 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_651() -#line 4486 "cs-parser.jay" +#line 4490 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_652() -#line 4491 "cs-parser.jay" +#line 4495 "cs-parser.jay" { yyVal = Modifiers.EXTERN; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_653() -#line 4496 "cs-parser.jay" +#line 4500 "cs-parser.jay" { yyVal = Modifiers.VOLATILE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_654() -#line 4501 "cs-parser.jay" +#line 4505 "cs-parser.jay" { yyVal = Modifiers.UNSAFE; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); @@ -7301,28 +7305,28 @@ void case_654() } void case_655() -#line 4508 "cs-parser.jay" +#line 4512 "cs-parser.jay" { yyVal = Modifiers.ASYNC; StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_657() -#line 4517 "cs-parser.jay" +#line 4521 "cs-parser.jay" { lbag.AppendToMember (current_class, GetLocation (yyVals[-1+yyTop])); current_container.AddBasesForPart (current_class, (List) yyVals[0+yyTop]); } void case_660() -#line 4530 "cs-parser.jay" +#line 4534 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_661() -#line 4538 "cs-parser.jay" +#line 4542 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((Constraints) yyVals[0+yyTop]); @@ -7330,7 +7334,7 @@ void case_661() } void case_662() -#line 4544 "cs-parser.jay" +#line 4548 "cs-parser.jay" { var constraints = (List) yyVals[-1+yyTop]; Constraints new_constraint = (Constraints)yyVals[0+yyTop]; @@ -7348,7 +7352,7 @@ void case_662() } void case_663() -#line 4563 "cs-parser.jay" +#line 4567 "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])); @@ -7356,7 +7360,7 @@ void case_663() } void case_664() -#line 4572 "cs-parser.jay" +#line 4576 "cs-parser.jay" { var constraints = new List (1); constraints.Add ((FullNamedExpression) yyVals[0+yyTop]); @@ -7364,7 +7368,7 @@ void case_664() } void case_665() -#line 4578 "cs-parser.jay" +#line 4582 "cs-parser.jay" { var constraints = (List) yyVals[-2+yyTop]; var prev = constraints [constraints.Count - 1] as SpecialContraintExpr; @@ -7390,7 +7394,7 @@ void case_665() } void case_666() -#line 4605 "cs-parser.jay" +#line 4609 "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 ()); @@ -7399,14 +7403,14 @@ void case_666() } void case_667() -#line 4612 "cs-parser.jay" +#line 4616 "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_671() -#line 4632 "cs-parser.jay" +#line 4636 "cs-parser.jay" { if (lang_version <= LanguageVersion.V_3) FeatureIsNotAvailable (lexer.Location, "generic type variance"); @@ -7415,91 +7419,91 @@ void case_671() } void case_672() -#line 4642 "cs-parser.jay" +#line 4646 "cs-parser.jay" { yyVal = Variance.Covariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_673() -#line 4647 "cs-parser.jay" +#line 4651 "cs-parser.jay" { yyVal = Variance.Contravariant; savedLocation = GetLocation (yyVals[0+yyTop]); } void case_674() -#line 4668 "cs-parser.jay" +#line 4672 "cs-parser.jay" { ++lexer.parsing_block; start_block (GetLocation (yyVals[0+yyTop])); } void case_676() -#line 4680 "cs-parser.jay" +#line 4684 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_677() -#line 4685 "cs-parser.jay" +#line 4689 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (lexer.Location); } void case_678() -#line 4694 "cs-parser.jay" +#line 4698 "cs-parser.jay" { ++lexer.parsing_block; current_block.StartLocation = GetLocation (yyVals[0+yyTop]); } void case_679() -#line 4699 "cs-parser.jay" +#line 4703 "cs-parser.jay" { --lexer.parsing_block; yyVal = end_block (GetLocation (yyVals[0+yyTop])); } void case_687() -#line 4726 "cs-parser.jay" +#line 4730 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_720() -#line 4790 "cs-parser.jay" +#line 4794 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_721() -#line 4795 "cs-parser.jay" +#line 4799 "cs-parser.jay" { report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement"); yyVal = null; } void case_722() -#line 4800 "cs-parser.jay" +#line 4804 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_723() -#line 4808 "cs-parser.jay" +#line 4812 "cs-parser.jay" { /* Uses lexer.Location because semicolon location is not kept in quick mode*/ yyVal = new EmptyStatement (lexer.Location); } void case_724() -#line 4816 "cs-parser.jay" +#line 4820 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location); @@ -7509,7 +7513,7 @@ void case_724() } void case_727() -#line 4829 "cs-parser.jay" +#line 4833 "cs-parser.jay" { if (yyVals[-1+yyTop] is VarExpr) yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location); @@ -7518,7 +7522,7 @@ void case_727() } void case_728() -#line 4845 "cs-parser.jay" +#line 4849 "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*/ @@ -7550,7 +7554,7 @@ void case_728() } void case_729() -#line 4875 "cs-parser.jay" +#line 4879 "cs-parser.jay" { ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression; @@ -7563,7 +7567,7 @@ void case_729() } void case_730() -#line 4886 "cs-parser.jay" +#line 4890 "cs-parser.jay" { if (yyVals[0+yyTop] == null) yyVal = yyVals[-1+yyTop]; @@ -7572,21 +7576,21 @@ void case_730() } void case_733() -#line 4901 "cs-parser.jay" +#line 4905 "cs-parser.jay" { Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report); yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop])); } void case_735() -#line 4910 "cs-parser.jay" +#line 4914 "cs-parser.jay" { ((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_737() -#line 4925 "cs-parser.jay" +#line 4929 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7595,7 +7599,7 @@ void case_737() } void case_738() -#line 4932 "cs-parser.jay" +#line 4936 "cs-parser.jay" { yyVal = current_variable; current_variable = null; @@ -7603,7 +7607,7 @@ void case_738() } void case_739() -#line 4938 "cs-parser.jay" +#line 4942 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7612,7 +7616,7 @@ void case_739() } void case_740() -#line 4945 "cs-parser.jay" +#line 4949 "cs-parser.jay" { if (current_variable.Initializer != null) { lbag.AddLocation (current_variable, GetLocation (yyVals[-6+yyTop]), savedLocation, GetLocation (yyVals[0+yyTop])); @@ -7624,14 +7628,14 @@ void case_740() } void case_742() -#line 4959 "cs-parser.jay" +#line 4963 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); } void case_743() -#line 4964 "cs-parser.jay" +#line 4968 "cs-parser.jay" { if (yyToken == Token.OPEN_BRACKET_EXPR) { report.Error (650, lexer.Location, @@ -7642,7 +7646,7 @@ void case_743() } void case_747() -#line 4982 "cs-parser.jay" +#line 4986 "cs-parser.jay" { foreach (var d in current_variable.Declarators) { if (d.Initializer == null) @@ -7651,7 +7655,7 @@ void case_747() } void case_750() -#line 4997 "cs-parser.jay" +#line 5001 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7662,7 +7666,7 @@ void case_750() } void case_751() -#line 5006 "cs-parser.jay" +#line 5010 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location); @@ -7673,14 +7677,14 @@ void case_751() } void case_753() -#line 5022 "cs-parser.jay" +#line 5026 "cs-parser.jay" { savedLocation = GetLocation (yyVals[-1+yyTop]); current_variable.Initializer = (Expression) yyVals[0+yyTop]; } void case_758() -#line 5040 "cs-parser.jay" +#line 5044 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location); @@ -7691,28 +7695,28 @@ void case_758() } void case_760() -#line 5053 "cs-parser.jay" +#line 5057 "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_761() -#line 5058 "cs-parser.jay" +#line 5062 "cs-parser.jay" { 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_762() -#line 5066 "cs-parser.jay" +#line 5070 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_766() -#line 5084 "cs-parser.jay" +#line 5088 "cs-parser.jay" { ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement; if (s == null) { @@ -7724,7 +7728,7 @@ void case_766() } void case_767() -#line 5097 "cs-parser.jay" +#line 5101 "cs-parser.jay" { Expression expr = (Expression) yyVals[0+yyTop]; ExpressionStatement s; @@ -7734,14 +7738,14 @@ void case_767() } void case_768() -#line 5105 "cs-parser.jay" +#line 5109 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop])); } void case_771() -#line 5119 "cs-parser.jay" +#line 5123 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7751,7 +7755,7 @@ void case_771() } void case_772() -#line 5128 "cs-parser.jay" +#line 5132 "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])); @@ -7763,7 +7767,7 @@ void case_772() } void case_774() -#line 5145 "cs-parser.jay" +#line 5149 "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])); @@ -7771,14 +7775,14 @@ void case_774() } void case_775() -#line 5154 "cs-parser.jay" +#line 5158 "cs-parser.jay" { report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); yyVal = new List (); } void case_777() -#line 5163 "cs-parser.jay" +#line 5167 "cs-parser.jay" { var sections = new List (4); @@ -7787,7 +7791,7 @@ void case_777() } void case_778() -#line 5170 "cs-parser.jay" +#line 5174 "cs-parser.jay" { var sections = (List) yyVals[-1+yyTop]; @@ -7796,14 +7800,14 @@ void case_778() } void case_779() -#line 5177 "cs-parser.jay" +#line 5181 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = new List (); } void case_782() -#line 5196 "cs-parser.jay" +#line 5200 "cs-parser.jay" { var labels = new List (2); @@ -7812,7 +7816,7 @@ void case_782() } void case_783() -#line 5203 "cs-parser.jay" +#line 5207 "cs-parser.jay" { var labels = (List) (yyVals[-1+yyTop]); labels.Add ((SwitchLabel) yyVals[0+yyTop]); @@ -7821,14 +7825,14 @@ void case_783() } void case_784() -#line 5213 "cs-parser.jay" +#line 5217 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_790() -#line 5232 "cs-parser.jay" +#line 5236 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7838,21 +7842,21 @@ void case_790() } void case_791() -#line 5244 "cs-parser.jay" +#line 5248 "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_792() -#line 5252 "cs-parser.jay" +#line 5256 "cs-parser.jay" { start_block (GetLocation (yyVals[0+yyTop])); current_block.IsCompilerGenerated = true; } void case_794() -#line 5268 "cs-parser.jay" +#line 5272 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7866,14 +7870,14 @@ void case_794() } void case_795() -#line 5280 "cs-parser.jay" +#line 5284 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = end_block (current_block.StartLocation); } void case_798() -#line 5293 "cs-parser.jay" +#line 5297 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop]; var li = new LocalVariable (current_block, lt.Value, lt.Location); @@ -7882,14 +7886,14 @@ void case_798() } void case_799() -#line 5300 "cs-parser.jay" +#line 5304 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_807() -#line 5324 "cs-parser.jay" +#line 5328 "cs-parser.jay" { var sl = yyVals[-2+yyTop] as StatementList; if (sl == null) { @@ -7904,14 +7908,14 @@ void case_807() } void case_808() -#line 5340 "cs-parser.jay" +#line 5344 "cs-parser.jay" { report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement"); yyVal = null; } void case_809() -#line 5345 "cs-parser.jay" +#line 5349 "cs-parser.jay" { start_block (GetLocation (yyVals[-5+yyTop])); current_block.IsCompilerGenerated = true; @@ -7922,7 +7926,7 @@ void case_809() } void case_810() -#line 5354 "cs-parser.jay" +#line 5358 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -7935,21 +7939,21 @@ void case_810() } void case_817() -#line 5377 "cs-parser.jay" +#line 5381 "cs-parser.jay" { yyVal = new Break (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_818() -#line 5385 "cs-parser.jay" +#line 5389 "cs-parser.jay" { yyVal = new Continue (GetLocation (yyVals[-1+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_819() -#line 5393 "cs-parser.jay" +#line 5397 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; yyVal = new Goto (lt.Value, GetLocation (yyVals[-2+yyTop])); @@ -7957,35 +7961,35 @@ void case_819() } void case_820() -#line 5399 "cs-parser.jay" +#line 5403 "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_821() -#line 5404 "cs-parser.jay" +#line 5408 "cs-parser.jay" { yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop])); } void case_822() -#line 5412 "cs-parser.jay" +#line 5416 "cs-parser.jay" { yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_823() -#line 5420 "cs-parser.jay" +#line 5424 "cs-parser.jay" { yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop])); lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop])); } void case_824() -#line 5428 "cs-parser.jay" +#line 5432 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; string s = lt.Value; @@ -8003,7 +8007,7 @@ void case_824() } void case_825() -#line 5444 "cs-parser.jay" +#line 5448 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; string s = lt.Value; @@ -8019,28 +8023,28 @@ void case_825() } void case_829() -#line 5470 "cs-parser.jay" +#line 5474 "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_830() -#line 5475 "cs-parser.jay" +#line 5479 "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_831() -#line 5480 "cs-parser.jay" +#line 5484 "cs-parser.jay" { report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally"); yyVal = null; } void case_832() -#line 5488 "cs-parser.jay" +#line 5492 "cs-parser.jay" { var l = new List (2); @@ -8049,7 +8053,7 @@ void case_832() } void case_833() -#line 5495 "cs-parser.jay" +#line 5499 "cs-parser.jay" { var l = (List) yyVals[-1+yyTop]; @@ -8067,7 +8071,7 @@ void case_833() } void case_837() -#line 5523 "cs-parser.jay" +#line 5527 "cs-parser.jay" { start_block (GetLocation (yyVals[-3+yyTop])); var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop])); @@ -8084,7 +8088,7 @@ void case_837() } void case_839() -#line 5542 "cs-parser.jay" +#line 5546 "cs-parser.jay" { if (yyToken == Token.CLOSE_PARENS) { report.Error (1015, lexer.Location, @@ -8097,14 +8101,14 @@ void case_839() } void case_842() -#line 5570 "cs-parser.jay" +#line 5574 "cs-parser.jay" { if (!settings.Unsafe) Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop])); } void case_844() -#line 5580 "cs-parser.jay" +#line 5584 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8114,7 +8118,7 @@ void case_844() } void case_845() -#line 5591 "cs-parser.jay" +#line 5595 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8126,14 +8130,14 @@ void case_845() } void case_846() -#line 5601 "cs-parser.jay" +#line 5605 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_847() -#line 5606 "cs-parser.jay" +#line 5610 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8145,7 +8149,7 @@ void case_847() } void case_848() -#line 5619 "cs-parser.jay" +#line 5623 "cs-parser.jay" { start_block (GetLocation (yyVals[-2+yyTop])); @@ -8157,14 +8161,14 @@ void case_848() } void case_849() -#line 5629 "cs-parser.jay" +#line 5633 "cs-parser.jay" { yyVal = current_variable; current_variable = null; } void case_850() -#line 5634 "cs-parser.jay" +#line 5638 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8176,7 +8180,7 @@ void case_850() } void case_851() -#line 5644 "cs-parser.jay" +#line 5648 "cs-parser.jay" { if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE) Warning_EmptyStatement (GetLocation (yyVals[0+yyTop])); @@ -8187,7 +8191,7 @@ void case_851() } void case_853() -#line 5660 "cs-parser.jay" +#line 5664 "cs-parser.jay" { current_variable.Initializer = (Expression) yyVals[0+yyTop]; lbag.AppendTo (current_variable, GetLocation (yyVals[-1+yyTop])); @@ -8195,7 +8199,7 @@ void case_853() } void case_854() -#line 5672 "cs-parser.jay" +#line 5676 "cs-parser.jay" { lexer.query_parsing = false; @@ -8209,7 +8213,7 @@ void case_854() } void case_855() -#line 5684 "cs-parser.jay" +#line 5688 "cs-parser.jay" { Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause; @@ -8221,7 +8225,7 @@ void case_855() } void case_856() -#line 5695 "cs-parser.jay" +#line 5699 "cs-parser.jay" { lexer.query_parsing = false; yyVal = yyVals[-1+yyTop]; @@ -8231,7 +8235,7 @@ void case_856() } void case_857() -#line 5702 "cs-parser.jay" +#line 5706 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; current_block.SetEndLocation (lexer.Location); @@ -8239,7 +8243,7 @@ void case_857() } void case_858() -#line 5711 "cs-parser.jay" +#line 5715 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8249,7 +8253,7 @@ void case_858() } void case_859() -#line 5719 "cs-parser.jay" +#line 5723 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8263,7 +8267,7 @@ void case_859() } void case_860() -#line 5734 "cs-parser.jay" +#line 5738 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8273,7 +8277,7 @@ void case_860() } void case_861() -#line 5742 "cs-parser.jay" +#line 5746 "cs-parser.jay" { current_block = new Linq.QueryBlock (current_block, lexer.Location); @@ -8287,7 +8291,7 @@ void case_861() } void case_863() -#line 5761 "cs-parser.jay" +#line 5765 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8300,7 +8304,7 @@ void case_863() } void case_865() -#line 5776 "cs-parser.jay" +#line 5780 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8316,7 +8320,7 @@ void case_865() } void case_866() -#line 5793 "cs-parser.jay" +#line 5797 "cs-parser.jay" { Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop]; @@ -8333,14 +8337,14 @@ void case_866() } void case_868() -#line 5809 "cs-parser.jay" +#line 5813 "cs-parser.jay" { Error_SyntaxError (yyToken); yyVal = null; } void case_870() -#line 5821 "cs-parser.jay" +#line 5825 "cs-parser.jay" { yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8349,7 +8353,7 @@ void case_870() } void case_871() -#line 5828 "cs-parser.jay" +#line 5832 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8359,7 +8363,7 @@ void case_871() } void case_872() -#line 5836 "cs-parser.jay" +#line 5840 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8368,7 +8372,7 @@ void case_872() } void case_873() -#line 5843 "cs-parser.jay" +#line 5847 "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])); @@ -8378,14 +8382,14 @@ void case_873() } void case_877() -#line 5860 "cs-parser.jay" +#line 5864 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-1+yyTop]; } void case_884() -#line 5880 "cs-parser.jay" +#line 5884 "cs-parser.jay" { var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop]; var sn = new Linq.RangeVariable (lt.Value, lt.Location); @@ -8399,7 +8403,7 @@ void case_884() } void case_886() -#line 5899 "cs-parser.jay" +#line 5903 "cs-parser.jay" { yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop])); @@ -8408,7 +8412,7 @@ void case_886() } void case_887() -#line 5909 "cs-parser.jay" +#line 5913 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8418,7 +8422,7 @@ void case_887() } void case_888() -#line 5917 "cs-parser.jay" +#line 5921 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8428,7 +8432,7 @@ void case_888() } void case_889() -#line 5925 "cs-parser.jay" +#line 5929 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8438,7 +8442,7 @@ void case_889() } void case_890() -#line 5933 "cs-parser.jay" +#line 5937 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8478,7 +8482,7 @@ void case_890() } void case_891() -#line 5971 "cs-parser.jay" +#line 5975 "cs-parser.jay" { if (linq_clause_blocks == null) linq_clause_blocks = new Stack (); @@ -8488,7 +8492,7 @@ void case_891() } void case_892() -#line 5979 "cs-parser.jay" +#line 5983 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8498,7 +8502,7 @@ void case_892() } void case_893() -#line 5987 "cs-parser.jay" +#line 5991 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8508,7 +8512,7 @@ void case_893() } void case_894() -#line 5995 "cs-parser.jay" +#line 5999 "cs-parser.jay" { current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop])); current_block.SetEndLocation (lexer.Location); @@ -8550,7 +8554,7 @@ void case_894() } void case_898() -#line 6050 "cs-parser.jay" +#line 6054 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8559,7 +8563,7 @@ void case_898() } void case_900() -#line 6061 "cs-parser.jay" +#line 6065 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8568,14 +8572,14 @@ void case_900() } void case_901() -#line 6068 "cs-parser.jay" +#line 6072 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_903() -#line 6077 "cs-parser.jay" +#line 6081 "cs-parser.jay" { current_block.SetEndLocation (lexer.Location); current_block = current_block.Parent; @@ -8584,42 +8588,42 @@ void case_903() } void case_904() -#line 6084 "cs-parser.jay" +#line 6088 "cs-parser.jay" { ((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop]; yyVal = yyVals[-3+yyTop]; } void case_906() -#line 6096 "cs-parser.jay" +#line 6100 "cs-parser.jay" { yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_907() -#line 6101 "cs-parser.jay" +#line 6105 "cs-parser.jay" { yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_909() -#line 6113 "cs-parser.jay" +#line 6117 "cs-parser.jay" { yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_910() -#line 6118 "cs-parser.jay" +#line 6122 "cs-parser.jay" { yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]); lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop])); } void case_912() -#line 6128 "cs-parser.jay" +#line 6132 "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*/ @@ -8637,7 +8641,7 @@ void case_912() } void case_913() -#line 6144 "cs-parser.jay" +#line 6148 "cs-parser.jay" { var current_block = linq_clause_blocks.Pop (); var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop]; @@ -8648,7 +8652,7 @@ void case_913() } void case_916() -#line 6171 "cs-parser.jay" +#line 6175 "cs-parser.jay" { current_container = new Class (current_namespace, current_class, new MemberName (""), Modifiers.PUBLIC, null); current_class = current_container; @@ -8680,7 +8684,7 @@ void case_916() } void case_917() -#line 6201 "cs-parser.jay" +#line 6205 "cs-parser.jay" { --lexer.parsing_block; Method method = (Method) oob_stack.Pop (); @@ -8692,7 +8696,7 @@ void case_917() } void case_927() -#line 6244 "cs-parser.jay" +#line 6248 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8700,7 +8704,7 @@ void case_927() } void case_928() -#line 6250 "cs-parser.jay" +#line 6254 "cs-parser.jay" { module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop]; module.DocumentationBuilder.ParsedParameters = (List)yyVals[0+yyTop]; @@ -8709,14 +8713,14 @@ void case_928() } void case_931() -#line 6265 "cs-parser.jay" +#line 6269 "cs-parser.jay" { module.DocumentationBuilder.ParsedParameters = (List)yyVals[-1+yyTop]; yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias)); } void case_932() -#line 6270 "cs-parser.jay" +#line 6274 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8726,7 +8730,7 @@ void case_932() } void case_933() -#line 6278 "cs-parser.jay" +#line 6282 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop])); @@ -8736,7 +8740,7 @@ void case_933() } void case_934() -#line 6286 "cs-parser.jay" +#line 6290 "cs-parser.jay" { var p = (List)yyVals[0+yyTop] ?? new List (1); module.DocumentationBuilder.ParsedParameters = p; @@ -8745,7 +8749,7 @@ void case_934() } void case_942() -#line 6324 "cs-parser.jay" +#line 6328 "cs-parser.jay" { var parameters = new List (); parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8753,7 +8757,7 @@ void case_942() } void case_943() -#line 6330 "cs-parser.jay" +#line 6334 "cs-parser.jay" { var parameters = yyVals[-2+yyTop] as List; parameters.Add ((DocumentationParameter) yyVals[0+yyTop]); @@ -8761,7 +8765,7 @@ void case_943() } void case_944() -#line 6339 "cs-parser.jay" +#line 6343 "cs-parser.jay" { if (yyVals[-1+yyTop] != null) yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]); @@ -12066,7 +12070,7 @@ void case_944() -1, -1, -1, 362, }; -#line 6348 "cs-parser.jay" +#line 6352 "cs-parser.jay" // // A class used to hold info about an operator declarator diff --git a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay index 9fc9c0fd93..09def5b046 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay +++ b/ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay @@ -1680,6 +1680,7 @@ parameter_array { var lt = (Tokenizer.LocatedToken) $4; $$ = new ParamsParameter ((FullNamedExpression) $3, lt.Value, (Attributes) $1, lt.Location); + lbag.AddLocation ($$, savedLocation); } | opt_attributes params_modifier type IDENTIFIER ASSIGN constant_expression { @@ -1687,6 +1688,7 @@ parameter_array var lt = (Tokenizer.LocatedToken) $4; $$ = new ParamsParameter ((FullNamedExpression) $3, lt.Value, (Attributes) $1, lt.Location); + lbag.AddLocation ($$, savedLocation); } | opt_attributes params_modifier type error { @@ -1700,6 +1702,7 @@ params_modifier { if ((valid_param_mod & ParameterModifierType.Params) == 0) report.Error (1670, (GetLocation ($1)), "The `params' modifier is not allowed in current context"); + savedLocation = GetLocation ($1); } | PARAMS parameter_modifier { @@ -1709,6 +1712,7 @@ params_modifier } else { report.Error (1611, GetLocation ($1), "The params parameter cannot be declared as ref or out"); } + savedLocation = GetLocation ($1); } | PARAMS params_modifier { From cc9cea00abd31c1924f46bacb2a34f1c046dfe52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:39:08 +0200 Subject: [PATCH 76/92] Fixed missing commas. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index f9773c7b99..f006d0c586 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -104,9 +104,11 @@ namespace ICSharpCode.NRefactory.CSharp var chevronLocs = LocationsBag.GetLocations (memberName.TypeArguments); if (chevronLocs != null) result.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 2]), 1), InvocationExpression.Roles.LChevron); - + int i = 0; foreach (var arg in memberName.TypeArguments.Args) { result.AddChild (ConvertToType (arg), AstType.Roles.TypeArgument); + if (chevronLocs != null && i < chevronLocs.Count - 2) + result.AddChild (new CSharpTokenNode (Convert (chevronLocs [i++]), 1), InvocationExpression.Roles.Comma); } if (chevronLocs != null) result.AddChild (new CSharpTokenNode (Convert (chevronLocs[chevronLocs.Count - 1]), 1), InvocationExpression.Roles.RChevron); From a48acf044782dcc73d0fdecd3f016036486c08d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Wed, 7 Sep 2011 11:48:21 +0200 Subject: [PATCH 77/92] put variable initializer assign into the right node. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index f006d0c586..4525cade90 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1257,7 +1257,7 @@ namespace ICSharpCode.NRefactory.CSharp init.AddChild (Identifier.Create (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 (new CSharpTokenNode (Convert (loc [1]), 1), VariableInitializer.Roles.Assign); init.AddChild ((Expression)decl.Initializer.Accept (this), VariableInitializer.Roles.Expression); } else { } @@ -3251,7 +3251,7 @@ namespace ICSharpCode.NRefactory.CSharp endifLevel++; continue; } - if (s.Cmd == Tokenizer.PreprocessorDirective.Endif) { + if (s.Cmd == Tokenizer.PreprocessorDirective.Endif || endifLevel == 0 && s.Cmd == Tokenizer.PreprocessorDirective.Else) { if (endifLevel == 0) { endif = s; i = j; From a1a80b63c930b5c2d1acdcb9e59dd3d562bfa6fc Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 7 Sep 2011 22:55:18 +0200 Subject: [PATCH 78/92] Fix StackOverflowException when subtyping does not terminate due to expansive inheritance. --- .../Resolver/Conversions.cs | 27 ++++++++++++++----- .../CSharp/Resolver/ConversionsTest.cs | 19 +++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs b/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs index a1f8876b19..1a29941da0 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs @@ -635,18 +635,33 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver // Determines whether s is a subtype of t. // Helper method used for ImplicitReferenceConversion, BoxingConversion and ImplicitTypeParameterConversion + + int subtypeCheckNestingDepth; + bool IsSubtypeOf(IType s, IType t) { // conversion to dynamic + object are always possible if (t.Equals(SharedTypes.Dynamic) || t.Equals(objectType)) return true; - - // let GetAllBaseTypes do the work for us - foreach (IType baseType in s.GetAllBaseTypes(context)) { - if (IdentityOrVarianceConversion(baseType, t)) - return true; + try { + if (++subtypeCheckNestingDepth > 10) { + // Subtyping in C# is undecidable + // (see "On Decidability of Nominal Subtyping with Variance" by Andrew J. Kennedy and Benjamin C. Pierce), + // so we'll prevent infinite recursions by putting a limit on the nesting depth of variance conversions. + + // No real C# code should use generics nested more than 10 levels deep, and even if they do, most of + // those nestings should not involve variance. + return false; + } + // let GetAllBaseTypes do the work for us + foreach (IType baseType in s.GetAllBaseTypes(context)) { + if (IdentityOrVarianceConversion(baseType, t)) + return true; + } + return false; + } finally { + subtypeCheckNestingDepth--; } - return false; } bool IdentityOrVarianceConversion(IType s, IType t) diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs index e2dce79c72..e1986cdb33 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/ConversionsTest.cs @@ -478,5 +478,24 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver Assert.AreEqual(2, BetterConversion(typeof(ushort?), typeof(long?), typeof(int?))); Assert.AreEqual(0, BetterConversion(typeof(sbyte), typeof(int?), typeof(uint?))); } + + [Test] + public void ExpansiveInheritance() + { + SimpleProjectContent pc = new SimpleProjectContent(); + DefaultTypeDefinition a = new DefaultTypeDefinition(pc, string.Empty, "A"); + DefaultTypeDefinition b = new DefaultTypeDefinition(pc, string.Empty, "B"); + // interface A + a.Kind = TypeKind.Interface; + a.TypeParameters.Add(new DefaultTypeParameter(EntityType.TypeDefinition, 0, "U") { Variance = VarianceModifier.Contravariant }); + // interface B : A>> { } + DefaultTypeParameter x = new DefaultTypeParameter(EntityType.TypeDefinition, 0, "X"); + b.TypeParameters.Add(x); + b.BaseTypes.Add(new ParameterizedType(a, new[] { new ParameterizedType(a, new [] { new ParameterizedType(b, new [] { x }) } ) })); + + IType type1 = new ParameterizedType(b, new[] { KnownTypeReference.Double.Resolve(ctx) }); + IType type2 = new ParameterizedType(a, new [] { new ParameterizedType(b, new[] { KnownTypeReference.String.Resolve(ctx) }) }); + Assert.IsFalse(conversions.ImplicitConversion(type1, type2)); + } } } From 2e67d5490d8c6ec279580507b5bee770b7384131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Mon, 12 Sep 2011 10:27:14 +0200 Subject: [PATCH 79/92] Now all formatting tests are green! --- .../FormattingTests/TestBlankLineFormatting.cs | 1 - .../FormattingTests/TestBraceStlye.cs | 3 --- .../FormattingTests/TestFormattingBugs.cs | 1 - .../FormattingTests/TestStatementIndentation.cs | 3 --- .../FormattingTests/TestTypeLevelIndentation.cs | 6 ------ 5 files changed, 14 deletions(-) diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs index 7557859e6d..d231327f1b 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBlankLineFormatting.cs @@ -31,7 +31,6 @@ using ICSharpCode.NRefactory.CSharp; namespace ICSharpCode.NRefactory.FormattingTests { - [Ignore ("TODO")] [TestFixture()] public class TestBlankLineFormatting : TestBase { diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs index 3746b3b0fa..033bf19245 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestBraceStlye.cs @@ -34,7 +34,6 @@ namespace ICSharpCode.NRefactory.FormattingTests [TestFixture()] public class TestBraceStyle : TestBase { - [Ignore ("TODO")] [Test()] public void TestNamespaceBraceStyle () { @@ -222,7 +221,6 @@ namespace B { }"); } - [Ignore ("TODO")] [Test()] public void TestAllowPropertyGetBlockInline () { @@ -264,7 +262,6 @@ namespace B { }"); } - [Ignore ("TODO")] [Test()] public void TestAllowPropertySetBlockInline () { diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs index 0b2184ccfc..ea509e221a 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestFormattingBugs.cs @@ -31,7 +31,6 @@ using ICSharpCode.NRefactory.CSharp; namespace ICSharpCode.NRefactory.FormattingTests { - [Ignore()] [TestFixture()] public class TestFormattingBugs : TestBase { diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs index 96d06c1c27..e0bf27ad9c 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestStatementIndentation.cs @@ -55,7 +55,6 @@ this.TestMethod (); }"); } - [Ignore ("TODO")] [Test()] public void TestIndentBlocks () { @@ -499,7 +498,6 @@ using (var o = new MyObj()) { }"); } - [Ignore ("TODO")] [Test()] public void TestUsingAlignment () { @@ -946,7 +944,6 @@ do { }"); } - [Ignore ("TODO")] [Test()] public void TestIfAlignment () { diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs index 1ba5ef5f53..7645aee99f 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs @@ -249,7 +249,6 @@ A }"); } - [Ignore ("TODO")] [Test()] public void TestIndentMethodBodyOperatorCase () { @@ -284,7 +283,6 @@ A }"); } - [Ignore ("TODO")] [Test()] public void TestIndentPropertyBody () { @@ -356,7 +354,6 @@ set; }"); } - [Ignore ("TODO")] [Test()] public void TestIndentPropertyBodyIndexerCase () { @@ -401,7 +398,6 @@ set { }"); } - [Ignore ("TODO")] [Test()] public void TestPropertyAlignment () { @@ -435,7 +431,6 @@ set { } - [Ignore ("TODO")] [Test()] public void TestIndentNamespaceBody () { @@ -515,7 +510,6 @@ set; } - [Ignore ("TODO")] [Test()] public void TestIndentEventBody () { From 6ef39441fbb9cdb6bf7d2689951e96d1f24b6c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Mon, 12 Sep 2011 11:04:08 +0200 Subject: [PATCH 80/92] Implemented attribute section formatting. --- .../Formatter/AstFormattingVisitor.cs | 33 +++++++++++++------ .../TestTypeLevelIndentation.cs | 14 ++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index e69cbe4abf..072b9cdd73 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -173,7 +173,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitTypeDeclaration (TypeDeclaration typeDeclaration, object data) { - FixIndentationForceNewLine (typeDeclaration.StartLocation); + FormatAttributedNode (typeDeclaration); BraceStyle braceStyle; bool indentBody = false; switch (typeDeclaration.ClassType) { @@ -334,7 +334,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitPropertyDeclaration (PropertyDeclaration propertyDeclaration, object data) { - FixIndentationForceNewLine (propertyDeclaration.StartLocation); + FormatAttributedNode (propertyDeclaration); bool oneLine = false; switch (policy.PropertyFormatting) { case PropertyFormatting.AllowOneLine: @@ -446,7 +446,7 @@ namespace ICSharpCode.NRefactory.CSharp FormatCommas (indexerDeclaration, policy.SpaceBeforeIndexerDeclarationParameterComma, policy.SpaceAfterIndexerDeclarationParameterComma); - FixIndentationForceNewLine (indexerDeclaration.StartLocation); + FormatAttributedNode (indexerDeclaration); EnforceBraceStyle (policy.PropertyBraceStyle, indexerDeclaration.LBraceToken, indexerDeclaration.RBraceToken); if (policy.IndentPropertyBody) IndentLevel++; @@ -549,7 +549,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitFieldDeclaration (FieldDeclaration fieldDeclaration, object data) { - FixIndentationForceNewLine (fieldDeclaration.StartLocation); + FormatAttributedNode (fieldDeclaration); FormatCommas (fieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); if (fieldDeclaration.NextSibling is FieldDeclaration || fieldDeclaration.NextSibling is FixedFieldDeclaration) { EnsureBlankLinesAfter (fieldDeclaration, policy.BlankLinesBetweenFields); @@ -579,7 +579,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitDelegateDeclaration (DelegateDeclaration delegateDeclaration, object data) { - FixIndentation (delegateDeclaration.StartLocation); + FormatAttributedNode (delegateDeclaration); ForceSpacesBefore (delegateDeclaration.LParToken, policy.SpaceBeforeDelegateDeclarationParentheses); if (delegateDeclaration.Parameters.Any ()) { @@ -604,10 +604,23 @@ namespace ICSharpCode.NRefactory.CSharp { return nextSibling != null && nextSibling.NodeType == NodeType.Member; } - + + void FormatAttributedNode (AstNode node) + { + if (node == null) + return; + AstNode child = node.FirstChild; + while (child != null && child is AttributeSection) { + FixIndentationForceNewLine (child.StartLocation); + child = child.NextSibling; + } + if (child != null) + FixIndentationForceNewLine (child.StartLocation); + } + public override object VisitMethodDeclaration (MethodDeclaration methodDeclaration, object data) { - FixIndentationForceNewLine (methodDeclaration.StartLocation); + FormatAttributedNode (methodDeclaration); ForceSpacesBefore (methodDeclaration.LParToken, policy.SpaceBeforeMethodDeclarationParentheses); if (methodDeclaration.Parameters.Any ()) { @@ -635,7 +648,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitOperatorDeclaration (OperatorDeclaration operatorDeclaration, object data) { - FixIndentationForceNewLine (operatorDeclaration.StartLocation); + FormatAttributedNode (operatorDeclaration); ForceSpacesBefore (operatorDeclaration.LParToken, policy.SpaceBeforeMethodDeclarationParentheses); if (operatorDeclaration.Parameters.Any ()) { @@ -663,7 +676,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitConstructorDeclaration (ConstructorDeclaration constructorDeclaration, object data) { - FixIndentationForceNewLine (constructorDeclaration.StartLocation); + FormatAttributedNode (constructorDeclaration); ForceSpacesBefore (constructorDeclaration.LParToken, policy.SpaceBeforeConstructorDeclarationParentheses); if (constructorDeclaration.Parameters.Any ()) { @@ -691,7 +704,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitDestructorDeclaration (DestructorDeclaration destructorDeclaration, object data) { - FixIndentationForceNewLine (destructorDeclaration.StartLocation); + FormatAttributedNode (destructorDeclaration); CSharpTokenNode lParen = destructorDeclaration.LParToken; int offset = this.document.GetOffset (lParen.StartLocation); diff --git a/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs b/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs index 7645aee99f..6bef2a7803 100644 --- a/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs +++ b/ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs @@ -45,6 +45,20 @@ namespace ICSharpCode.NRefactory.FormattingTests @"class Test {}"); } + [Test()] + public void TestAttributeIndentation () + { + CSharpFormattingOptions policy = new CSharpFormattingOptions (); + policy.ClassBraceStyle = BraceStyle.DoNotChange; + + Test (policy, +@" [Attribute1] + [Attribute2()] + class Test {}", +@"[Attribute1] +[Attribute2()] +class Test {}"); + } [Test()] public void TestClassIndentationInNamespaces () From abd8372f3d03a3a55d03e788824151ebb72b2b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Mon, 12 Sep 2011 11:11:24 +0200 Subject: [PATCH 81/92] fixed some attributed node formattings. --- .../Formatter/AstFormattingVisitor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index 072b9cdd73..e5ea1e3457 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -561,7 +561,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitFixedFieldDeclaration (FixedFieldDeclaration fixedFieldDeclaration, object data) { - FixIndentationForceNewLine (fixedFieldDeclaration.StartLocation); + FormatAttributedNode (fixedFieldDeclaration); FormatCommas (fixedFieldDeclaration, policy.SpaceBeforeFieldDeclarationComma, policy.SpaceAfterFieldDeclarationComma); if (fixedFieldDeclaration.NextSibling is FieldDeclaration || fixedFieldDeclaration.NextSibling is FixedFieldDeclaration) { EnsureBlankLinesAfter (fixedFieldDeclaration, policy.BlankLinesBetweenFields); @@ -573,7 +573,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitEnumMemberDeclaration (EnumMemberDeclaration enumMemberDeclaration, object data) { - FixIndentationForceNewLine (enumMemberDeclaration.StartLocation); + FormatAttributedNode (enumMemberDeclaration); return base.VisitEnumMemberDeclaration (enumMemberDeclaration, data); } From ddaaaafeee9f78cef1ee4cf69fdc13d18a8d0926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Mon, 12 Sep 2011 11:35:16 +0200 Subject: [PATCH 82/92] added some more attributed nodes. --- .../Formatter/AstFormattingVisitor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index e5ea1e3457..5c90e215a4 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -488,7 +488,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitCustomEventDeclaration (CustomEventDeclaration eventDeclaration, object data) { - FixIndentationForceNewLine (eventDeclaration.StartLocation); + FormatAttributedNode (eventDeclaration); EnforceBraceStyle (policy.EventBraceStyle, eventDeclaration.LBraceToken, eventDeclaration.RBraceToken); if (policy.IndentEventBody) IndentLevel++; @@ -531,7 +531,7 @@ namespace ICSharpCode.NRefactory.CSharp public override object VisitEventDeclaration (EventDeclaration eventDeclaration, object data) { - FixIndentationForceNewLine (eventDeclaration.StartLocation); + FormatAttributedNode (eventDeclaration); if (eventDeclaration.NextSibling is EventDeclaration && IsSimpleEvent (eventDeclaration) && IsSimpleEvent (eventDeclaration.NextSibling)) { EnsureBlankLinesAfter (eventDeclaration, policy.BlankLinesBetweenEventFields); } else if (IsMember (eventDeclaration.NextSibling)) { From 770b5c6d67e4a0652794eb311d75bbe76e91c3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Thu, 15 Sep 2011 09:10:34 +0200 Subject: [PATCH 83/92] fixed possible null ref. --- ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 4525cade90..3de34cce2e 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -2488,12 +2488,14 @@ namespace ICSharpCode.NRefactory.CSharp var location = LocationsBag.GetLocations (par); if (location == null) { - result.AddChild ((Expression)par.Expr.Accept (this), AnonymousTypeCreateExpression.Roles.Expression); + if (par.Expr != null) + result.AddChild ((Expression)par.Expr.Accept (this), AnonymousTypeCreateExpression.Roles.Expression); } else { var namedExpression = new NamedExpression (); namedExpression.AddChild (Identifier.Create (par.Name, Convert (par.Location)), AnonymousTypeCreateExpression.Roles.Identifier); namedExpression.AddChild (new CSharpTokenNode (Convert (location[0]), 1), AnonymousTypeCreateExpression.Roles.Assign); - namedExpression.AddChild ((Expression)par.Expr.Accept (this), AnonymousTypeCreateExpression.Roles.Expression); + if (par.Expr != null) + namedExpression.AddChild ((Expression)par.Expr.Accept (this), AnonymousTypeCreateExpression.Roles.Expression); result.AddChild (namedExpression, AnonymousTypeCreateExpression.Roles.Expression); } } From af5ae57e898d3fbeb2e89c12ce322fb6377ee841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Thu, 15 Sep 2011 10:18:49 +0200 Subject: [PATCH 84/92] Added type case for resolvenode at location. --- .../Resolver/ResolveAtLocation.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveAtLocation.cs b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveAtLocation.cs index aa6bffb7bc..adc2d572f7 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveAtLocation.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveAtLocation.cs @@ -36,7 +36,15 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver if (node == null) return null; AstNode resolvableNode; - if (node is Identifier) { + if (node is AstType) { + resolvableNode = node; + if (resolvableNode.Parent is ComposedType) { + while (resolvableNode.Parent is ComposedType) + resolvableNode = resolvableNode.Parent; + //node is preffered over the resolvable node. Which shouldn't be done in the case of nullables, arrays etc. + node = resolvableNode; + } + } else if (node is Identifier) { resolvableNode = node.Parent; } else if (node.NodeType == NodeType.Token) { if (node.Parent is ConstructorInitializer) { From e4d1f545fdfe9d7060b037beebcf90f31963a22e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Sep 2011 18:06:58 +0200 Subject: [PATCH 85/92] Add CodeDomConvertVisitor. --- .../Analysis/ControlFlow.cs | 2 +- ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs | 8 +- ICSharpCode.NRefactory.CSharp/Ast/AstType.cs | 4 +- .../Ast/CSharpTokenNode.cs | 4 +- .../Ast/CompilationUnit.cs | 2 +- .../Ast/ComposedType.cs | 4 +- .../Ast/DepthFirstAstVisitor.cs | 4 +- .../Ast/ErrorNode.cs | 2 +- .../Expressions/AnonymousMethodExpression.cs | 2 +- .../AnonymousTypeCreateExpression.cs | 2 +- .../Ast/Expressions/ArrayCreateExpression.cs | 2 +- .../Expressions/ArrayInitializerExpression.cs | 4 +- .../Ast/Expressions/AsExpression.cs | 2 +- .../Ast/Expressions/AssignmentExpression.cs | 2 +- .../Expressions/BaseReferenceExpression.cs | 2 +- .../Expressions/BinaryOperatorExpression.cs | 2 +- .../Ast/Expressions/CastExpression.cs | 2 +- .../Ast/Expressions/CheckedExpression.cs | 2 +- .../Ast/Expressions/ConditionalExpression.cs | 2 +- .../Ast/Expressions/DefaultValueExpression.cs | 2 +- .../Ast/Expressions/DirectionExpression.cs | 2 +- .../Ast/Expressions/EmptyExpression.cs | 2 +- .../Ast/Expressions/Expression.cs | 4 +- .../Ast/Expressions/IdentifierExpression.cs | 2 +- .../Ast/Expressions/IndexerExpression.cs | 2 +- .../Ast/Expressions/InvocationExpression.cs | 2 +- .../Ast/Expressions/IsExpression.cs | 2 +- .../Ast/Expressions/LambdaExpression.cs | 2 +- .../Expressions/MemberReferenceExpression.cs | 2 +- .../Expressions/NamedArgumentExpression.cs | 2 +- .../Ast/Expressions/NamedExpression.cs | 2 +- .../Expressions/NullReferenceExpression.cs | 2 +- .../Ast/Expressions/ObjectCreateExpression.cs | 2 +- .../Expressions/ParenthesizedExpression.cs | 2 +- .../Expressions/PointerReferenceExpression.cs | 2 +- .../Ast/Expressions/PrimitiveExpression.cs | 2 +- .../Ast/Expressions/QueryExpression.cs | 22 +- .../Ast/Expressions/SizeOfExpression.cs | 2 +- .../Ast/Expressions/StackAllocExpression.cs | 2 +- .../Expressions/ThisReferenceExpression.cs | 2 +- .../Ast/Expressions/TypeOfExpression.cs | 2 +- .../Expressions/TypeReferenceExpression.cs | 2 +- .../Expressions/UnaryOperatorExpression.cs | 2 +- .../Ast/Expressions/UncheckedExpression.cs | 2 +- .../Ast/Expressions/UndocumentedExpression.cs | 2 +- .../Ast/GeneralScope/Attribute.cs | 4 +- .../Ast/GeneralScope/AttributeSection.cs | 4 +- .../Ast/GeneralScope/Comment.cs | 2 +- .../Ast/GeneralScope/Constraint.cs | 2 +- .../Ast/GeneralScope/DelegateDeclaration.cs | 2 +- .../GeneralScope/ExternAliasDeclaration.cs | 2 +- .../Ast/GeneralScope/NamespaceDeclaration.cs | 2 +- .../Ast/GeneralScope/TypeDeclaration.cs | 2 +- .../GeneralScope/TypeParameterDeclaration.cs | 2 +- .../Ast/GeneralScope/UsingAliasDeclaration.cs | 2 +- .../Ast/GeneralScope/UsingDeclaration.cs | 2 +- .../Ast/IAstVisitor.cs | 2 +- .../Ast/Identifier.cs | 4 +- .../Ast/MemberType.cs | 2 +- .../Ast/ObservableAstVisitor.cs | 8 +- .../Ast/PrimitiveType.cs | 2 +- .../Ast/SimpleType.cs | 2 +- .../Ast/Statements/BlockStatement.cs | 6 +- .../Ast/Statements/BreakStatement.cs | 2 +- .../Ast/Statements/CheckedStatement.cs | 2 +- .../Ast/Statements/ContinueStatement.cs | 2 +- .../Ast/Statements/DoWhileStatement.cs | 2 +- .../Ast/Statements/EmptyStatement.cs | 2 +- .../Ast/Statements/ExpressionStatement.cs | 2 +- .../Ast/Statements/FixedStatement.cs | 2 +- .../Ast/Statements/ForStatement.cs | 2 +- .../Ast/Statements/ForeachStatement.cs | 2 +- .../Ast/Statements/GotoStatement.cs | 6 +- .../Ast/Statements/IfElseStatement.cs | 2 +- .../Ast/Statements/LabelStatement.cs | 2 +- .../Ast/Statements/LockStatement.cs | 2 +- .../Ast/Statements/ReturnStatement.cs | 2 +- .../Ast/Statements/Statement.cs | 4 +- .../Ast/Statements/SwitchStatement.cs | 8 +- .../Ast/Statements/ThrowStatement.cs | 2 +- .../Ast/Statements/TryCatchStatement.cs | 6 +- .../Ast/Statements/UncheckedStatement.cs | 2 +- .../Ast/Statements/UnsafeStatement.cs | 2 +- .../Ast/Statements/UsingStatement.cs | 2 +- .../VariableDeclarationStatement.cs | 2 +- .../Ast/Statements/WhileStatement.cs | 2 +- .../Ast/Statements/YieldBreakStatement.cs | 2 +- ...ldStatement.cs => YieldReturnStatement.cs} | 8 +- .../Ast/TypeMembers/Accessor.cs | 4 +- .../Ast/TypeMembers/ConstructorDeclaration.cs | 6 +- .../Ast/TypeMembers/DestructorDeclaration.cs | 2 +- .../Ast/TypeMembers/EnumMemberDeclaration.cs | 2 +- .../Ast/TypeMembers/EventDeclaration.cs | 4 +- .../Ast/TypeMembers/FieldDeclaration.cs | 2 +- .../Ast/TypeMembers/FixedFieldDeclaration.cs | 2 +- .../TypeMembers/FixedVariableInitializer.cs | 2 +- .../Ast/TypeMembers/IndexerDeclaration.cs | 2 +- .../Ast/TypeMembers/MethodDeclaration.cs | 2 +- .../Ast/TypeMembers/OperatorDeclaration.cs | 2 +- .../Ast/TypeMembers/ParameterDeclaration.cs | 2 +- .../Ast/TypeMembers/PropertyDeclaration.cs | 2 +- .../Ast/TypeMembers/VariableInitializer.cs | 4 +- .../Formatter/AstFormattingVisitor.cs | 2 +- .../ICSharpCode.NRefactory.CSharp.csproj | 11 +- ...utputVisitor.cs => CSharpOutputVisitor.cs} | 18 +- .../OutputVisitor/CodeDomConvertVisitor.cs | 1245 +++++++++++++++++ .../Parser/CSharpParser.cs | 10 +- .../Refactoring/Script.cs | 4 +- .../Resolver/ResolveVisitor.cs | 2 +- ICSharpCode.NRefactory.Demo/CSDemo.cs | 2 +- .../CSharp/InsertParenthesesVisitorTests.cs | 4 +- .../CSharp/OutputVisitorTests.cs | 2 +- .../CSharp/Parser/ParseUtil.cs | 2 +- .../Parser/Statements/YieldStatementTests.cs | 2 +- .../Visitors/CSharpToVBConverterVisitor.cs | 4 +- .../Implementation/DefaultTypeParameter.cs | 1 + 116 files changed, 1425 insertions(+), 174 deletions(-) rename ICSharpCode.NRefactory.CSharp/Ast/Statements/{YieldStatement.cs => YieldReturnStatement.cs} (92%) rename ICSharpCode.NRefactory.CSharp/OutputVisitor/{OutputVisitor.cs => CSharpOutputVisitor.cs} (99%) create mode 100644 ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs diff --git a/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs b/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs index 148cf2a7a2..36e63d8188 100644 --- a/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs +++ b/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs @@ -673,7 +673,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis return CreateConnectedEndNode(usingStatement, bodyEnd); } - public override ControlFlowNode VisitYieldStatement(YieldStatement yieldStatement, ControlFlowNode data) + public override ControlFlowNode VisitYieldReturnStatement(YieldReturnStatement yieldStatement, ControlFlowNode data) { return CreateConnectedEndNode(yieldStatement, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs b/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs index 7f8c62e5b6..a09dc9f1c9 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs @@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -83,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder (this, child, data); } @@ -441,7 +441,7 @@ namespace ICSharpCode.NRefactory.CSharp return copy; } - public abstract S AcceptVisitor (IAstVisitor visitor, T data); + public abstract S AcceptVisitor (IAstVisitor visitor, T data = default(T)); #region Pattern Matching protected static bool MatchString (string name1, string name2) @@ -613,7 +613,7 @@ namespace ICSharpCode.NRefactory.CSharp if (IsNull) return "Null"; StringWriter w = new StringWriter(); - AcceptVisitor(new OutputVisitor(w, new CSharpFormattingOptions()), null); + AcceptVisitor(new CSharpOutputVisitor(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/AstType.cs b/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs index 517a4783f4..fbc3eccf21 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs b/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs index f174adecca..00bf53dfd2 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs @@ -42,7 +42,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -87,7 +87,7 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCSharpTokenNode (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs b/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs index 889e8d048b..f90f7cf011 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs @@ -83,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp return o != null && GetChildrenByRole(MemberRole).DoMatch(o.GetChildrenByRole(MemberRole), match); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCompilationUnit (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/ComposedType.cs b/ICSharpCode.NRefactory.CSharp/Ast/ComposedType.cs index dceeae35f0..d70a478207 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/ComposedType.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/ComposedType.cs @@ -73,7 +73,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (ArraySpecifierRole); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitComposedType (this, data); } @@ -159,7 +159,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBracket); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitArraySpecifier(this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs b/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs index 89e73063dd..d001b7490c 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs @@ -360,9 +360,9 @@ namespace ICSharpCode.NRefactory.CSharp return VisitChildren (yieldBreakStatement, data); } - public virtual S VisitYieldStatement (YieldStatement yieldStatement, T data) + public virtual S VisitYieldReturnStatement (YieldReturnStatement yieldReturnStatement, T data) { - return VisitChildren (yieldStatement, data); + return VisitChildren (yieldReturnStatement, data); } public virtual S VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression, T data) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/ErrorNode.cs b/ICSharpCode.NRefactory.CSharp/Ast/ErrorNode.cs index c8569c55a8..53dfd7126f 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/ErrorNode.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/ErrorNode.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { // nothing return default (S); diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs index f8c8cefac9..9a2bb8ea12 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs @@ -78,7 +78,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitAnonymousMethodExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs index 3a433fbc3a..496a2cfdb5 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousTypeCreateExpression.cs @@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitAnonymousTypeCreateExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayCreateExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayCreateExpression.cs index d3f6c26893..f9bee2a68b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayCreateExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayCreateExpression.cs @@ -51,7 +51,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (InitializerRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitArrayCreateExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayInitializerExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayInitializerExpression.cs index 92afafe856..d4858d8b23 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayInitializerExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ArrayInitializerExpression.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -82,7 +82,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitArrayInitializerExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AsExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AsExpression.cs index b1a1b80653..59f4652da9 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AsExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AsExpression.cs @@ -55,7 +55,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (type, Roles.Type); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitAsExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs index 998ab78fb4..c0e9ef3f7d 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AssignmentExpression.cs @@ -74,7 +74,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(RightRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitAssignmentExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BaseReferenceExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BaseReferenceExpression.cs index de964170b6..2214e3eaac 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BaseReferenceExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BaseReferenceExpression.cs @@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitBaseReferenceExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BinaryOperatorExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BinaryOperatorExpression.cs index cef22fecd2..68259dedf1 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BinaryOperatorExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/BinaryOperatorExpression.cs @@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(RightRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitBinaryOperatorExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CastExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CastExpression.cs index 88c7dcfe36..6a3f1ceb93 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CastExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CastExpression.cs @@ -59,7 +59,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (expression, Roles.Expression); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCastExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CheckedExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CheckedExpression.cs index 349976c68a..f9fd9ab9db 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CheckedExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/CheckedExpression.cs @@ -57,7 +57,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (expression, Roles.Expression); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCheckedExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ConditionalExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ConditionalExpression.cs index 5e80994328..3a98ed7ed7 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ConditionalExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ConditionalExpression.cs @@ -71,7 +71,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (falseExpression, FalseRole); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitConditionalExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DefaultValueExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DefaultValueExpression.cs index 1a91d6d086..28fb4adc45 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DefaultValueExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DefaultValueExpression.cs @@ -57,7 +57,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (type, Roles.Type); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitDefaultValueExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DirectionExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DirectionExpression.cs index 0c19b2ca7d..d99182d335 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DirectionExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/DirectionExpression.cs @@ -62,7 +62,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (expression, Roles.Expression); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitDirectionExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs index 9ea3c99079..e333090eb2 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/EmptyExpression.cs @@ -62,7 +62,7 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitEmptyExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/Expression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/Expression.cs index 23f3342585..f61e67f0b7 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/Expression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/Expression.cs @@ -41,7 +41,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs index cce153e97b..892807fd3b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.TypeArgument); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitIdentifierExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IndexerExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IndexerExpression.cs index 045d8d0388..1d7d9a4642 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IndexerExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IndexerExpression.cs @@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitIndexerExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs index 84d0830fee..b609ae8864 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs @@ -50,7 +50,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitInvocationExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IsExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IsExpression.cs index a8c7b0e002..d01fe48b1b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IsExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IsExpression.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(Roles.Type, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitIsExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs index 774bd6c4a3..ad5c81a9c9 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (BodyRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitLambdaExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs index fdea7dc635..cf0c1808fa 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs @@ -87,7 +87,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitMemberReferenceExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs index e7684277bb..6b63038632 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedArgumentExpression.cs @@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitNamedArgumentExpression(this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedExpression.cs index 5c4892f131..fb5ce405a1 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NamedExpression.cs @@ -72,7 +72,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitNamedExpression(this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NullReferenceExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NullReferenceExpression.cs index 3fe5a0e49a..3a92c97f30 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NullReferenceExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/NullReferenceExpression.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp this.location = location; } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitNullReferenceExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ObjectCreateExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ObjectCreateExpression.cs index 7bb5dc821f..0e72c04b11 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ObjectCreateExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ObjectCreateExpression.cs @@ -79,7 +79,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitObjectCreateExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ParenthesizedExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ParenthesizedExpression.cs index 8cdb5cfd17..8c32a42ddf 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ParenthesizedExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ParenthesizedExpression.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp Expression = expr; } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitParenthesizedExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PointerReferenceExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PointerReferenceExpression.cs index b9f3a95299..a1b7f051f1 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PointerReferenceExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PointerReferenceExpression.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.TypeArgument); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitPointerReferenceExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs index 4ba03a1508..6e39fc2779 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/PrimitiveExpression.cs @@ -83,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitPrimitiveExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/QueryExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/QueryExpression.cs index 6280b676d8..5e7ffaa67d 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/QueryExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/QueryExpression.cs @@ -36,7 +36,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -52,7 +52,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole(ClauseRole); } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryExpression (this, data); } @@ -112,7 +112,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Identifier); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryContinuationClause (this, data); } @@ -152,7 +152,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryFromClause (this, data); } @@ -193,7 +193,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(Roles.Expression, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryLetClause (this, data); } @@ -217,7 +217,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Condition, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryWhereClause (this, data); } @@ -316,7 +316,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole(IntoIdentifierRole); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryJoinClause (this, data); } @@ -344,7 +344,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (OrderingRole); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryOrderClause (this, data); } @@ -376,7 +376,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Keyword); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryOrdering (this, data); } @@ -406,7 +406,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQuerySelectClause (this, data); } @@ -443,7 +443,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (KeyRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitQueryGroupClause (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/SizeOfExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/SizeOfExpression.cs index 6e7a740d61..eba12d3e02 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/SizeOfExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/SizeOfExpression.cs @@ -57,7 +57,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (type, Roles.Type); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitSizeOfExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/StackAllocExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/StackAllocExpression.cs index ad7fc1a7ef..f69d92286d 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/StackAllocExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/StackAllocExpression.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBracket); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitStackAllocExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ThisReferenceExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ThisReferenceExpression.cs index b874758b35..7d2bd33ebf 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ThisReferenceExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/ThisReferenceExpression.cs @@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitThisReferenceExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeOfExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeOfExpression.cs index 09e8931ff4..31e0b7bf3b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeOfExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeOfExpression.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (type, Roles.Type); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitTypeOfExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeReferenceExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeReferenceExpression.cs index 92037dea11..c568f824a9 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeReferenceExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/TypeReferenceExpression.cs @@ -31,7 +31,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole(Roles.Type, value); } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitTypeReferenceExpression(this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs index c99d4ea941..262bd51dd6 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UnaryOperatorExpression.cs @@ -59,7 +59,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUnaryOperatorExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UncheckedExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UncheckedExpression.cs index 6e9e61923a..6bd835775b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UncheckedExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UncheckedExpression.cs @@ -57,7 +57,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (expression, Roles.Expression); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUncheckedExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UndocumentedExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UndocumentedExpression.cs index 8bbd81a5f0..3a6d628553 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UndocumentedExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/UndocumentedExpression.cs @@ -62,7 +62,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUndocumentedExpression (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs index 95235527f3..4335103388 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Attribute.cs @@ -54,7 +54,7 @@ namespace ICSharpCode.NRefactory.CSharp set; } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitAttribute (this, data); } @@ -70,7 +70,7 @@ namespace ICSharpCode.NRefactory.CSharp if (IsNull) return "Null"; var w = new System.IO.StringWriter (); - AcceptVisitor (new OutputVisitor (w, new CSharpFormattingOptions ()), null); + AcceptVisitor (new CSharpOutputVisitor (w, new CSharpFormattingOptions ()), null); return w.ToString (); } } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs index 76905bebf7..cf142593cb 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/AttributeSection.cs @@ -54,7 +54,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } @@ -110,7 +110,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBracket); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitAttributeSection (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Comment.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Comment.cs index 7d3cbdaa0c..f6cd0d2afd 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Comment.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Comment.cs @@ -91,7 +91,7 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitComment (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Constraint.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Constraint.cs index cac7230997..6d6dc45d0b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Constraint.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/Constraint.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (BaseTypeRole); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitConstraint (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs index c6aebc4a4a..c226d8ffd8 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/DelegateDeclaration.cs @@ -83,7 +83,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.Constraint); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitDelegateDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs index 2e4857498e..f238f1aa2b 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/ExternAliasDeclaration.cs @@ -69,7 +69,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitExternAliasDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs index 5382033e46..d8736adc43 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs @@ -109,7 +109,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (child, MemberRole); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitNamespaceDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs index e828c7a76e..018e0491e1 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs @@ -100,7 +100,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitTypeDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs index 99184b7643..afa3122a57 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeParameterDeclaration.cs @@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitTypeParameterDeclaration(this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs index 5fc25031d1..8a69357c6e 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingAliasDeclaration.cs @@ -82,7 +82,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (import, ImportRole); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUsingAliasDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingDeclaration.cs index 77c2697f85..31ae7ddfc8 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/UsingDeclaration.cs @@ -74,7 +74,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (import, ImportRole); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUsingDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs b/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs index d18f464a2a..6079ca0466 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/IAstVisitor.cs @@ -110,7 +110,7 @@ namespace ICSharpCode.NRefactory.CSharp S VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement, T data); S VisitWhileStatement(WhileStatement whileStatement, T data); S VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement, T data); - S VisitYieldStatement(YieldStatement yieldStatement, T data); + S VisitYieldReturnStatement(YieldReturnStatement yieldReturnStatement, T data); S VisitAccessor(Accessor accessor, T data); S VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, T data); diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs b/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs index e95e36a90a..0938d9f0c3 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs @@ -39,7 +39,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -130,7 +130,7 @@ namespace ICSharpCode.NRefactory.CSharp return new Identifier (name, location); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitIdentifier (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/MemberType.cs b/ICSharpCode.NRefactory.CSharp/Ast/MemberType.cs index dc16f98cc4..b551e77eee 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/MemberType.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/MemberType.cs @@ -87,7 +87,7 @@ namespace ICSharpCode.NRefactory.CSharp { } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitMemberType (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs b/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs index ac8743de6a..9088ca0e39 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/ObservableAstVisitor.cs @@ -1,4 +1,4 @@ -// +// // ObservableAstVisitor.cs // // Author: @@ -671,11 +671,11 @@ namespace ICSharpCode.NRefactory.CSharp return VisitChildren (yieldBreakStatement, data); } - public event Action YieldStatementVisited; + public event Action YieldReturnStatementVisited; - S IAstVisitor.VisitYieldStatement (YieldStatement yieldStatement, T data) + S IAstVisitor.VisitYieldReturnStatement (YieldReturnStatement yieldStatement, T data) { - var handler = YieldStatementVisited; + var handler = YieldReturnStatementVisited; if (handler != null) handler (yieldStatement, data); return VisitChildren (yieldStatement, data); diff --git a/ICSharpCode.NRefactory.CSharp/Ast/PrimitiveType.cs b/ICSharpCode.NRefactory.CSharp/Ast/PrimitiveType.cs index 85e2e723ae..92705e96a4 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/PrimitiveType.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/PrimitiveType.cs @@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitPrimitiveType (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/SimpleType.cs b/ICSharpCode.NRefactory.CSharp/Ast/SimpleType.cs index cf451339c3..280511da0f 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/SimpleType.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/SimpleType.cs @@ -81,7 +81,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.TypeArgument); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitSimpleType (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs index 50cf3e6cd4..e42f13b6cc 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -76,7 +76,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } @@ -105,7 +105,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitBlockStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs index 6599b5eafc..5c993f8968 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/BreakStatement.cs @@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitBreakStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/CheckedStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/CheckedStatement.cs index 731649f4af..c81724b919 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/CheckedStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/CheckedStatement.cs @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (body, Roles.Body); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCheckedStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ContinueStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ContinueStatement.cs index 1de6b5d505..cb8cf30e6e 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ContinueStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ContinueStatement.cs @@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitContinueStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/DoWhileStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/DoWhileStatement.cs index 378fd43ab0..9e0cc4a43e 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/DoWhileStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/DoWhileStatement.cs @@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitDoWhileStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs index f33600f8ac..e0c8999835 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/EmptyStatement.cs @@ -55,7 +55,7 @@ namespace ICSharpCode.NRefactory.CSharp } #endregion - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitEmptyStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs index 4e76bd5bbe..3954d5e427 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ExpressionStatement.cs @@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitExpressionStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/FixedStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/FixedStatement.cs index 9a8efbc9ac..263cf8fbd5 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/FixedStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/FixedStatement.cs @@ -59,7 +59,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.EmbeddedStatement, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitFixedStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForStatement.cs index ebbe44022b..a6c91b322f 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForStatement.cs @@ -71,7 +71,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.EmbeddedStatement, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitForStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs index c9791bd5d8..ccd3ecdeb1 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ForeachStatement.cs @@ -80,7 +80,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.EmbeddedStatement, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitForeachStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/GotoStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/GotoStatement.cs index c7d57644f4..c02e223d63 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/GotoStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/GotoStatement.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitGotoStatement (this, data); } @@ -99,7 +99,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitGotoCaseStatement (this, data); } @@ -130,7 +130,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitGotoDefaultStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs index 8fa84392d7..803d7bf8ad 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs @@ -69,7 +69,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (FalseRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitIfElseStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/LabelStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/LabelStatement.cs index 81a9a186f5..6b3a08cf86 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/LabelStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/LabelStatement.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Colon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitLabelStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/LockStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/LockStatement.cs index 7298e4f1da..8a5f2f76f7 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/LockStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/LockStatement.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.EmbeddedStatement, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitLockStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs index 075a22589e..8219490d7d 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (returnExpression, Roles.Expression); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitReturnStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/Statement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/Statement.cs index 73100a64cd..665a5dfd75 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/Statement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/Statement.cs @@ -25,7 +25,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -56,7 +56,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs index 4df2569da6..bf5ca7a834 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/SwitchStatement.cs @@ -65,7 +65,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitSwitchStatement (this, data); } @@ -98,7 +98,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } @@ -131,7 +131,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.EmbeddedStatement); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitSwitchSection (this, data); } @@ -168,7 +168,7 @@ namespace ICSharpCode.NRefactory.CSharp this.Expression = expression; } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCaseLabel (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ThrowStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ThrowStatement.cs index 2eafdd977f..5d42af3ccc 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/ThrowStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/ThrowStatement.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (expression, Roles.Expression); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitThrowStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/TryCatchStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/TryCatchStatement.cs index e6cc8a48f9..711a6f491a 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/TryCatchStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/TryCatchStatement.cs @@ -62,7 +62,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (FinallyBlockRole, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitTryCatchStatement (this, data); } @@ -98,7 +98,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } @@ -162,7 +162,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Body, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCatchClause (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/UncheckedStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/UncheckedStatement.cs index af40fa5a9f..086cff8548 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/UncheckedStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/UncheckedStatement.cs @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp AddChild (body, Roles.Body); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUncheckedStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs index c5ccb63af3..fba1ebe439 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs @@ -40,7 +40,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Body, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUnsafeStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/UsingStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/UsingStatement.cs index 27714d61bf..030ce03687 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/UsingStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/UsingStatement.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.EmbeddedStatement, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitUsingStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs index 54f473684e..c9792125f0 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs @@ -66,7 +66,7 @@ namespace ICSharpCode.NRefactory.CSharp return Variables.FirstOrDefault (vi => vi.Name == name); } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitVariableDeclarationStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/WhileStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/WhileStatement.cs index 01470b3ab2..db71887c41 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/WhileStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/WhileStatement.cs @@ -55,7 +55,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.EmbeddedStatement, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitWhileStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldBreakStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldBreakStatement.cs index 4c572615ad..253253feff 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldBreakStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldBreakStatement.cs @@ -46,7 +46,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitYieldBreakStatement (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldStatement.cs b/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldReturnStatement.cs similarity index 92% rename from ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldStatement.cs rename to ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldReturnStatement.cs index 001815f3a8..a3b65ac2ab 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldStatement.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Statements/YieldReturnStatement.cs @@ -29,7 +29,7 @@ namespace ICSharpCode.NRefactory.CSharp /// /// yield return Expression; /// - public class YieldStatement : Statement + public class YieldReturnStatement : Statement { public static readonly Role YieldKeywordRole = new Role("YieldKeyword", CSharpTokenNode.Null); public static readonly Role ReturnKeywordRole = new Role("ReturnKeyword", CSharpTokenNode.Null); @@ -51,14 +51,14 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Semicolon); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { - return visitor.VisitYieldStatement (this, data); + return visitor.VisitYieldReturnStatement (this, data); } protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { - YieldStatement o = other as YieldStatement; + YieldReturnStatement o = other as YieldReturnStatement; return o != null && this.Expression.DoMatch(o.Expression, match); } } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs index 748948f6a7..0755e04369 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs @@ -42,7 +42,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -57,7 +57,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Body, value); } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitAccessor (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs index afcc2d47d6..f356e93ab6 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ConstructorDeclaration.cs @@ -71,7 +71,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Member; } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitConstructorDeclaration (this, data); } @@ -106,7 +106,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return default (S); } @@ -140,7 +140,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RPar); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitConstructorInitializer (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs index 829682e73f..0e129e4330 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/DestructorDeclaration.cs @@ -62,7 +62,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Member; } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitDestructorDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs index 286800cbe3..f646a93853 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EnumMemberDeclaration.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Member; } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitEnumMemberDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs index 49d28ede35..752463a2e2 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/EventDeclaration.cs @@ -43,7 +43,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.Variable); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitEventDeclaration (this, data); } @@ -79,7 +79,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitCustomEventDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs index 1003aa9b75..2b30b2be30 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FieldDeclaration.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (Roles.Variable); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitFieldDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs index 2fde822604..ea20b3585a 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedFieldDeclaration.cs @@ -48,7 +48,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildrenByRole (VariableRole); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitFixedFieldDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedVariableInitializer.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedVariableInitializer.cs index d6dbaf91a2..11bbc138ae 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedVariableInitializer.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/FixedVariableInitializer.cs @@ -80,7 +80,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBracket); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitFixedVariableInitializer (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs index 4d19c97d73..221a6dde8c 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/IndexerDeclaration.cs @@ -64,7 +64,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitIndexerDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs index 556c0a3a4c..129c87e26e 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs @@ -63,7 +63,7 @@ namespace ICSharpCode.NRefactory.CSharp } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitMethodDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs index 85ff7a7bd2..35865d24c0 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/OperatorDeclaration.cs @@ -129,7 +129,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Member; } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitOperatorDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ParameterDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ParameterDeclaration.cs index 8641a72277..3329730046 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ParameterDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/ParameterDeclaration.cs @@ -86,7 +86,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitParameterDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs index 2d1376a0ed..5362667504 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.RBrace); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitPropertyDeclaration (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/VariableInitializer.cs b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/VariableInitializer.cs index 8ebfc938d6..314fca0c9e 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/VariableInitializer.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/VariableInitializer.cs @@ -47,7 +47,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return NodeType.Pattern; } } - public override S AcceptVisitor(IAstVisitor visitor, T data) + public override S AcceptVisitor(IAstVisitor visitor, T data = default(T)) { return visitor.VisitPatternPlaceholder(this, child, data); } @@ -107,7 +107,7 @@ namespace ICSharpCode.NRefactory.CSharp set { SetChildByRole (Roles.Expression, value); } } - public override S AcceptVisitor (IAstVisitor visitor, T data) + public override S AcceptVisitor (IAstVisitor visitor, T data = default(T)) { return visitor.VisitVariableInitializer (this, data); } diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index 5c90e215a4..7b1779a37c 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -1278,7 +1278,7 @@ namespace ICSharpCode.NRefactory.CSharp return null; } - public override object VisitYieldStatement (YieldStatement yieldStatement, object data) + public override object VisitYieldReturnStatement (YieldReturnStatement yieldStatement, object data) { FixStatementIndentation (yieldStatement.StartLocation); return null; diff --git a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj index 7be6865e41..633504288c 100644 --- a/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj +++ b/ICSharpCode.NRefactory.CSharp/ICSharpCode.NRefactory.CSharp.csproj @@ -1,4 +1,4 @@ - + {53DCA265-3C3C-42F9-B647-F72BA678122B} @@ -14,6 +14,10 @@ false 10.0.0 2.0 + True + ..\ICSharpCode.NRefactory.snk + False + File AnyCPU @@ -144,7 +148,7 @@ - + @@ -164,9 +168,10 @@ + - + diff --git a/ICSharpCode.NRefactory.CSharp/OutputVisitor/OutputVisitor.cs b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs similarity index 99% rename from ICSharpCode.NRefactory.CSharp/OutputVisitor/OutputVisitor.cs rename to ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs index 123f053187..f50b0c53ca 100644 --- a/ICSharpCode.NRefactory.CSharp/OutputVisitor/OutputVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs @@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.CSharp /// /// Outputs the AST. /// - public class OutputVisitor : IAstVisitor + public class CSharpOutputVisitor : IAstVisitor { readonly IOutputFormatter formatter; readonly CSharpFormattingOptions policy; @@ -56,7 +56,7 @@ namespace ICSharpCode.NRefactory.CSharp Division } - public OutputVisitor (TextWriter textWriter, CSharpFormattingOptions formattingPolicy) + public CSharpOutputVisitor (TextWriter textWriter, CSharpFormattingOptions formattingPolicy) { if (textWriter == null) throw new ArgumentNullException ("textWriter"); @@ -66,7 +66,7 @@ namespace ICSharpCode.NRefactory.CSharp this.policy = formattingPolicy; } - public OutputVisitor (IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy) + public CSharpOutputVisitor (IOutputFormatter formatter, CSharpFormattingOptions formattingPolicy) { if (formatter == null) throw new ArgumentNullException ("formatter"); @@ -1856,15 +1856,15 @@ namespace ICSharpCode.NRefactory.CSharp return EndNode (yieldBreakStatement); } - public object VisitYieldStatement (YieldStatement yieldStatement, object data) + public object VisitYieldReturnStatement (YieldReturnStatement yieldReturnStatement, object data) { - StartNode (yieldStatement); - WriteKeyword ("yield", YieldStatement.YieldKeywordRole); - WriteKeyword ("return", YieldStatement.ReturnKeywordRole); + StartNode (yieldReturnStatement); + WriteKeyword ("yield", YieldReturnStatement.YieldKeywordRole); + WriteKeyword ("return", YieldReturnStatement.ReturnKeywordRole); Space (); - yieldStatement.Expression.AcceptVisitor (this, data); + yieldReturnStatement.Expression.AcceptVisitor (this, data); Semicolon (); - return EndNode (yieldStatement); + return EndNode (yieldReturnStatement); } #endregion diff --git a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs new file mode 100644 index 0000000000..9dc39b4323 --- /dev/null +++ b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs @@ -0,0 +1,1245 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team +// +// 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.CodeDom; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using ICSharpCode.NRefactory.CSharp.Resolver; +using ICSharpCode.NRefactory.PatternMatching; +using ICSharpCode.NRefactory.Semantics; +using ICSharpCode.NRefactory.TypeSystem; + +namespace ICSharpCode.NRefactory.CSharp +{ + /// + /// Converts from C# AST to CodeDom. + /// + /// + /// The conversion is intended for use in the SharpDevelop forms designer. + /// + public class CodeDomConvertVisitor : IAstVisitor + { + ITypeResolveContext context; + bool useFullyQualifiedTypeNames; + + ResolveResult Resolve(AstNode node) + { + throw new NotImplementedException(); + } + + CodeExpression Convert(Expression expr) + { + return (CodeExpression)expr.AcceptVisitor(this); + } + + CodeExpression[] Convert(IEnumerable expressions) + { + List result = new List(); + foreach (Expression expr in expressions) { + CodeExpression e = Convert(expr); + if (e != null) + result.Add(e); + } + return result.ToArray(); + } + + CodeTypeReference Convert(AstType type) + { + return (CodeTypeReference)type.AcceptVisitor(this); + } + + CodeTypeReference[] Convert(IEnumerable types) + { + List result = new List(); + foreach (AstType type in types) { + CodeTypeReference e = Convert(type); + if (e != null) + result.Add(e); + } + return result.ToArray(); + } + + CodeTypeReference Convert(IType type) + { + throw new NotImplementedException(); + } + + CodeStatement Convert(Statement stmt) + { + return (CodeStatement)stmt.AcceptVisitor(this); + } + + CodeStatement[] ConvertBlock(BlockStatement block) + { + List result = new List(); + foreach (Statement stmt in block.Statements) { + CodeStatement s = Convert(stmt); + if (s != null) + result.Add(s); + } + return result.ToArray(); + } + + CodeStatement[] ConvertEmbeddedStatement(Statement embeddedStatement) + { + BlockStatement block = embeddedStatement as BlockStatement; + if (block != null) { + return ConvertBlock(block); + } + CodeStatement s = Convert(embeddedStatement); + if (s != null) + return new CodeStatement[] { s }; + else + return new CodeStatement[0]; + } + + string MakeSnippet(AstNode node) + { + StringWriter w = new StringWriter(); + CSharpOutputVisitor v = new CSharpOutputVisitor(w, new CSharpFormattingOptions()); + node.AcceptVisitor(v); + return w.ToString(); + } + + /// + /// Converts an expression by storing it as C# snippet. + /// This is used for expressions that cannot be represented in CodeDom. + /// + CodeSnippetExpression MakeSnippetExpression(Expression expr) + { + return new CodeSnippetExpression(MakeSnippet(expr)); + } + + CodeSnippetStatement MakeSnippetStatement(Statement stmt) + { + return new CodeSnippetStatement(MakeSnippet(stmt)); + } + + CodeObject IAstVisitor.VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, object data) + { + return MakeSnippetExpression(anonymousMethodExpression); + } + + CodeObject IAstVisitor.VisitUndocumentedExpression(UndocumentedExpression undocumentedExpression, object data) + { + return MakeSnippetExpression(undocumentedExpression); + } + + CodeObject IAstVisitor.VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) + { + CodeArrayCreateExpression ace = new CodeArrayCreateExpression(); + int dimensions = arrayCreateExpression.Arguments.Count; + if (dimensions > 1) { + // CodeDom does not support multi-dimensional arrays + return MakeSnippetExpression(arrayCreateExpression); + } + if (arrayCreateExpression.Type.IsNull) { + ArrayType arrayType = Resolve(arrayCreateExpression).Type as ArrayType; + if (arrayType != null && arrayType.Dimensions == 1) + ace.CreateType = Convert(arrayType.ElementType); + else + return MakeSnippetExpression(arrayCreateExpression); + } else { + ace.CreateType = Convert(arrayCreateExpression.Type); + IEnumerable additionalArraySpecifiers = arrayCreateExpression.AdditionalArraySpecifiers; + if (dimensions == 0) { + additionalArraySpecifiers = additionalArraySpecifiers.Skip(1); + } + foreach (var spec in additionalArraySpecifiers.Reverse()) { + ace.CreateType = new CodeTypeReference(ace.CreateType, spec.Dimensions); + } + } + if (arrayCreateExpression.Arguments.Count == 1) { + ace.SizeExpression = Convert(arrayCreateExpression.Arguments.Single()); + } + ace.Initializers.AddRange(Convert(arrayCreateExpression.Initializer.Elements)); + return ace; + } + + CodeObject IAstVisitor.VisitArrayInitializerExpression(ArrayInitializerExpression arrayInitializerExpression, object data) + { + // Array initializers should be handled by the parent node + return MakeSnippetExpression(arrayInitializerExpression); + } + + CodeObject IAstVisitor.VisitAsExpression(AsExpression asExpression, object data) + { + return MakeSnippetExpression(asExpression); + } + + CodeObject IAstVisitor.VisitAssignmentExpression(AssignmentExpression assignmentExpression, object data) + { + // assignments are only supported as statements, not as expressions + return MakeSnippetExpression(assignmentExpression); + } + + CodeObject IAstVisitor.VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression, object data) + { + return new CodeBaseReferenceExpression(); + } + + CodeObject IAstVisitor.VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression, object data) + { + CodeBinaryOperatorType op; + switch (binaryOperatorExpression.Operator) { + case BinaryOperatorType.BitwiseAnd: + op = CodeBinaryOperatorType.BitwiseAnd; + break; + case BinaryOperatorType.BitwiseOr: + op = CodeBinaryOperatorType.BitwiseOr; + break; + case BinaryOperatorType.ConditionalAnd: + op = CodeBinaryOperatorType.BooleanAnd; + break; + case BinaryOperatorType.ConditionalOr: + op = CodeBinaryOperatorType.BooleanOr; + break; + case BinaryOperatorType.GreaterThan: + op = CodeBinaryOperatorType.GreaterThan; + break; + case BinaryOperatorType.GreaterThanOrEqual: + op = CodeBinaryOperatorType.GreaterThanOrEqual; + break; + case BinaryOperatorType.LessThan: + op = CodeBinaryOperatorType.LessThan; + break; + case BinaryOperatorType.LessThanOrEqual: + op = CodeBinaryOperatorType.LessThanOrEqual; + break; + case BinaryOperatorType.Add: + op = CodeBinaryOperatorType.Add; + break; + case BinaryOperatorType.Subtract: + op = CodeBinaryOperatorType.Subtract; + break; + case BinaryOperatorType.Multiply: + op = CodeBinaryOperatorType.Multiply; + break; + case BinaryOperatorType.Divide: + op = CodeBinaryOperatorType.Divide; + break; + case BinaryOperatorType.Modulus: + op = CodeBinaryOperatorType.Modulus; + break; + case BinaryOperatorType.Equality: + case BinaryOperatorType.InEquality: + BinaryOperatorResolveResult rr = Resolve(binaryOperatorExpression) as BinaryOperatorResolveResult; + if (rr != null && rr.Left.Type.IsReferenceType(context) == true) { + if (binaryOperatorExpression.Operator == BinaryOperatorType.Equality) + op = CodeBinaryOperatorType.IdentityEquality; + else + op = CodeBinaryOperatorType.IdentityInequality; + } else { + if (binaryOperatorExpression.Operator == BinaryOperatorType.Equality) { + op = CodeBinaryOperatorType.ValueEquality; + } else { + // CodeDom is retarded and does not support ValueInequality, so we'll simulate it using + // ValueEquality and Not... but CodeDom doesn't have Not either, so we use + // '(a == b) == false' + return new CodeBinaryOperatorExpression( + new CodeBinaryOperatorExpression( + Convert(binaryOperatorExpression.Left), + CodeBinaryOperatorType.ValueEquality, + Convert(binaryOperatorExpression.Right) + ), + CodeBinaryOperatorType.ValueEquality, + new CodePrimitiveExpression(false) + ); + } + } + break; + default: + // not supported: xor, shift, null coalescing + return MakeSnippetExpression(binaryOperatorExpression); + } + return new CodeBinaryOperatorExpression(Convert(binaryOperatorExpression.Left), op, Convert(binaryOperatorExpression.Right)); + } + + CodeObject IAstVisitor.VisitCastExpression(CastExpression castExpression, object data) + { + return new CodeCastExpression(Convert(castExpression.Type), Convert(castExpression.Expression)); + } + + CodeObject IAstVisitor.VisitCheckedExpression(CheckedExpression checkedExpression, object data) + { + return MakeSnippetExpression(checkedExpression); + } + + CodeObject IAstVisitor.VisitConditionalExpression(ConditionalExpression conditionalExpression, object data) + { + return MakeSnippetExpression(conditionalExpression); + } + + CodeObject IAstVisitor.VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression, object data) + { + return new CodeDefaultValueExpression(Convert(defaultValueExpression.Type)); + } + + CodeObject IAstVisitor.VisitDirectionExpression(DirectionExpression directionExpression, object data) + { + System.CodeDom.FieldDirection direction; + if (directionExpression.FieldDirection == FieldDirection.Out) { + direction = System.CodeDom.FieldDirection.Out; + } else { + direction = System.CodeDom.FieldDirection.Ref; + } + return new CodeDirectionExpression(direction, Convert(directionExpression.Expression)); + } + + CodeObject IAstVisitor.VisitIdentifierExpression(IdentifierExpression identifierExpression, object data) + { + ResolveResult rr = Resolve(identifierExpression); + LocalResolveResult lrr = rr as LocalResolveResult; + if (lrr != null && lrr.IsParameter) { + if (lrr.Variable.Name == "value" && identifierExpression.Ancestors.Any(a => a is Accessor)) { + return new CodePropertySetValueReferenceExpression(); + } else { + return new CodeArgumentReferenceExpression(lrr.Variable.Name); + } + } + MemberResolveResult mrr = rr as MemberResolveResult; + if (mrr != null) { + return HandleMemberReference(null, identifierExpression.Identifier, identifierExpression.TypeArguments, mrr); + } + TypeResolveResult trr = rr as TypeResolveResult; + if (trr != null) { + CodeTypeReference typeRef; + if (useFullyQualifiedTypeNames) { + typeRef = Convert(trr.Type); + } else { + typeRef = new CodeTypeReference(identifierExpression.Identifier); + typeRef.TypeArguments.AddRange(Convert(identifierExpression.TypeArguments)); + } + return new CodeTypeReferenceExpression(typeRef); + } + MethodGroupResolveResult mgrr = rr as MethodGroupResolveResult; + if (mgrr != null) { + return new CodeMethodReferenceExpression(new CodeThisReferenceExpression(), identifierExpression.Identifier, Convert(identifierExpression.TypeArguments)); + } + return new CodeVariableReferenceExpression(identifierExpression.Identifier); + } + + CodeObject IAstVisitor.VisitIndexerExpression(IndexerExpression indexerExpression, object data) + { + return new CodeArrayIndexerExpression(Convert(indexerExpression.Target), Convert(indexerExpression.Arguments)); + } + + CodeObject IAstVisitor.VisitInvocationExpression(InvocationExpression invocationExpression, object data) + { + MemberResolveResult rr = Resolve(invocationExpression) as MemberResolveResult; + CSharpInvocationResolveResult csRR = rr as CSharpInvocationResolveResult; + if (csRR != null && csRR.IsDelegateInvocation) { + return new CodeDelegateInvokeExpression(Convert(invocationExpression.Target), Convert(invocationExpression.Arguments)); + } + + Expression methodExpr = invocationExpression.Target; + while (methodExpr is ParenthesizedExpression) + methodExpr = ((ParenthesizedExpression)methodExpr).Expression; + CodeMethodReferenceExpression mr = null; + MemberReferenceExpression mre = methodExpr as MemberReferenceExpression; + if (mre != null) { + mr = new CodeMethodReferenceExpression(Convert(mre.Target), mre.MemberName, Convert(mre.TypeArguments)); + } + IdentifierExpression id = methodExpr as IdentifierExpression; + if (id != null) { + CodeExpression target; + if (rr != null && rr.Member.IsStatic) + target = new CodeTypeReferenceExpression(Convert(rr.Member.DeclaringType)); + else + target = new CodeThisReferenceExpression(); + + mr = new CodeMethodReferenceExpression(target, id.Identifier, Convert(id.TypeArguments)); + } + if (mr != null) + return new CodeMethodInvokeExpression(mr, Convert(invocationExpression.Arguments)); + else + return MakeSnippetExpression(invocationExpression); + } + + CodeObject IAstVisitor.VisitIsExpression(IsExpression isExpression, object data) + { + return MakeSnippetExpression(isExpression); + } + + CodeObject IAstVisitor.VisitLambdaExpression(LambdaExpression lambdaExpression, object data) + { + return MakeSnippetExpression(lambdaExpression); + } + + CodeObject IAstVisitor.VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression, object data) + { + CodeExpression target = Convert(memberReferenceExpression.Target); + ResolveResult rr = Resolve(memberReferenceExpression); + MemberResolveResult mrr = rr as MemberResolveResult; + if (mrr != null) { + return HandleMemberReference(target, memberReferenceExpression.MemberName, memberReferenceExpression.TypeArguments, mrr); + } else { + if (memberReferenceExpression.TypeArguments.Any() || rr is MethodGroupResolveResult) { + return new CodeMethodReferenceExpression(target, memberReferenceExpression.MemberName, Convert(memberReferenceExpression.TypeArguments)); + } else { + return new CodePropertyReferenceExpression(target, memberReferenceExpression.MemberName); + } + } + } + + CodeExpression HandleMemberReference(CodeExpression target, string identifier, AstNodeCollection typeArguments, MemberResolveResult mrr) + { + if (target == null) { + if (mrr.Member.IsStatic) + target = new CodeTypeReferenceExpression(Convert(mrr.Member.DeclaringType)); + else + target = new CodeThisReferenceExpression(); + } + if (mrr.Member is IField) { + return new CodeFieldReferenceExpression(target, identifier); + } else if (mrr.Member is IMethod) { + return new CodeMethodReferenceExpression(target, identifier, Convert(typeArguments)); + } else if (mrr.Member is IEvent) { + return new CodeEventReferenceExpression(target, identifier); + } else { + return new CodePropertyReferenceExpression(target, identifier); + } + } + + CodeObject IAstVisitor.VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data) + { + return MakeSnippetExpression(namedArgumentExpression); + } + + CodeObject IAstVisitor.VisitNamedExpression(NamedExpression namedExpression, object data) + { + return MakeSnippetExpression(namedExpression); + } + + CodeObject IAstVisitor.VisitNullReferenceExpression(NullReferenceExpression nullReferenceExpression, object data) + { + return new CodePrimitiveExpression(null); + } + + CodeObject IAstVisitor.VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, object data) + { + if (!objectCreateExpression.Initializer.IsNull) + return MakeSnippetExpression(objectCreateExpression); + return new CodeObjectCreateExpression(Convert(objectCreateExpression.Type), Convert(objectCreateExpression.Arguments)); + } + + CodeObject IAstVisitor.VisitAnonymousTypeCreateExpression(AnonymousTypeCreateExpression anonymousTypeCreateExpression, object data) + { + return MakeSnippetExpression(anonymousTypeCreateExpression); + } + + CodeObject IAstVisitor.VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) + { + // CodeDom generators will insert parentheses where necessary + return Convert(parenthesizedExpression.Expression); + } + + CodeObject IAstVisitor.VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) + { + return MakeSnippetExpression(pointerReferenceExpression); + } + + CodeObject IAstVisitor.VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, object data) + { + return new CodePrimitiveExpression(primitiveExpression.Value); + } + + CodeObject IAstVisitor.VisitSizeOfExpression(SizeOfExpression sizeOfExpression, object data) + { + return MakeSnippetExpression(sizeOfExpression); + } + + CodeObject IAstVisitor.VisitStackAllocExpression(StackAllocExpression stackAllocExpression, object data) + { + return MakeSnippetExpression(stackAllocExpression); + } + + CodeObject IAstVisitor.VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) + { + return new CodeThisReferenceExpression(); + } + + CodeObject IAstVisitor.VisitTypeOfExpression(TypeOfExpression typeOfExpression, object data) + { + return new CodeTypeOfExpression(Convert(typeOfExpression.Type)); + } + + CodeObject IAstVisitor.VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, object data) + { + return new CodeTypeReferenceExpression(Convert(typeReferenceExpression.Type)); + } + + CodeObject IAstVisitor.VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, object data) + { + switch (unaryOperatorExpression.Operator) { + case UnaryOperatorType.Not: + return new CodeBinaryOperatorExpression( + Convert(unaryOperatorExpression.Expression), + CodeBinaryOperatorType.ValueEquality, + new CodePrimitiveExpression(false)); + case UnaryOperatorType.Minus: + return new CodeBinaryOperatorExpression( + new CodePrimitiveExpression(0), + CodeBinaryOperatorType.Subtract, + Convert(unaryOperatorExpression.Expression)); + case UnaryOperatorType.Plus: + return Convert(unaryOperatorExpression.Expression); + default: + return MakeSnippetExpression(unaryOperatorExpression); + } + } + + CodeObject IAstVisitor.VisitUncheckedExpression(UncheckedExpression uncheckedExpression, object data) + { + return MakeSnippetExpression(uncheckedExpression); + } + + CodeObject IAstVisitor.VisitEmptyExpression(EmptyExpression emptyExpression, object data) + { + return null; + } + + CodeObject IAstVisitor.VisitQueryExpression(QueryExpression queryExpression, object data) + { + return MakeSnippetExpression(queryExpression); + } + + CodeObject IAstVisitor.VisitQueryContinuationClause(QueryContinuationClause queryContinuationClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryFromClause(QueryFromClause queryFromClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryLetClause(QueryLetClause queryLetClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryWhereClause(QueryWhereClause queryWhereClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryJoinClause(QueryJoinClause queryJoinClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryOrderClause(QueryOrderClause queryOrderClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryOrdering(QueryOrdering queryOrdering, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQuerySelectClause(QuerySelectClause querySelectClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitQueryGroupClause(QueryGroupClause queryGroupClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitAttribute(Attribute attribute, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitAttributeSection(AttributeSection attributeSection, object data) + { + throw new NotSupportedException(); + } + + CodeAttributeDeclaration Convert(Attribute attribute) + { + var attr = new CodeAttributeDeclaration(Convert(attribute.Type)); + foreach (Expression expr in attribute.Arguments) { + NamedExpression ne = expr as NamedExpression; + if (ne != null) + attr.Arguments.Add(new CodeAttributeArgument(ne.Identifier, Convert(ne.Expression))); + else + attr.Arguments.Add(new CodeAttributeArgument(Convert(expr))); + } + return attr; + } + + CodeAttributeDeclaration[] Convert(IEnumerable attributeSections) + { + List result = new List(); + foreach (AttributeSection section in attributeSections) { + foreach (Attribute attr in section.Attributes) { + CodeAttributeDeclaration attrDecl = Convert(attr); + if (attrDecl != null) + result.Add(attrDecl); + } + } + return result.ToArray(); + } + + CodeObject IAstVisitor.VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data) + { + CodeTypeDelegate d = new CodeTypeDelegate(delegateDeclaration.Name); + d.Attributes = ConvertMemberAttributes(delegateDeclaration.Modifiers); + d.CustomAttributes.AddRange(Convert(delegateDeclaration.Attributes)); + d.ReturnType = Convert(delegateDeclaration.ReturnType); + d.Parameters.AddRange(Convert(delegateDeclaration.Parameters)); + d.TypeParameters.AddRange(ConvertTypeParameters(delegateDeclaration.TypeParameters, delegateDeclaration.Constraints)); + return d; + } + + static MemberAttributes ConvertMemberAttributes(Modifiers modifiers) + { + MemberAttributes a = 0; + if ((modifiers & Modifiers.Abstract) != 0) + a |= MemberAttributes.Abstract; + if ((modifiers & Modifiers.Sealed) != 0) + a |= MemberAttributes.Final; + if ((modifiers & Modifiers.Static) != 0) + a |= MemberAttributes.Static; + if ((modifiers & Modifiers.Override) != 0) + a |= MemberAttributes.Override; + if ((modifiers & Modifiers.Const) != 0) + a |= MemberAttributes.Const; + if ((modifiers & Modifiers.New) != 0) + a |= MemberAttributes.New; + + if ((modifiers & Modifiers.Public) != 0) + a |= MemberAttributes.Public; + else if ((modifiers & (Modifiers.Protected | Modifiers.Internal)) == (Modifiers.Protected | Modifiers.Internal)) + a |= MemberAttributes.FamilyOrAssembly; + else if ((modifiers & Modifiers.Protected) != 0) + a |= MemberAttributes.Family; + else if ((modifiers & Modifiers.Internal) != 0) + a |= MemberAttributes.Assembly; + else if ((modifiers & Modifiers.Private) != 0) + a |= MemberAttributes.Private; + + return a; + } + + CodeObject IAstVisitor.VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data) + { + CodeNamespace ns = new CodeNamespace(namespaceDeclaration.Name); + foreach (AstNode node in namespaceDeclaration.Members) { + CodeObject r = node.AcceptVisitor(this); + + CodeNamespaceImport import = r as CodeNamespaceImport; + if (import != null) + ns.Imports.Add(import); + + CodeTypeDeclaration typeDecl = r as CodeTypeDeclaration; + if (typeDecl != null) + ns.Types.Add(typeDecl); + } + return ns; + } + + Stack typeStack = new Stack(); + + CodeObject IAstVisitor.VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) + { + bool isNestedType = typeStack.Count > 0; + CodeTypeDeclaration typeDecl = new CodeTypeDeclaration(typeDeclaration.Name); + typeDecl.Attributes = ConvertMemberAttributes(typeDeclaration.Modifiers); + typeDecl.CustomAttributes.AddRange(Convert(typeDeclaration.Attributes)); + + switch (typeDeclaration.ClassType) { + case ClassType.Struct: + typeDecl.IsStruct = true; + break; + case ClassType.Interface: + typeDecl.IsInterface = true; + break; + case ClassType.Enum: + typeDecl.IsEnum = true; + break; + default: + typeDecl.IsClass = true; + break; + } + typeDecl.IsPartial = (typeDeclaration.Modifiers & Modifiers.Partial) == Modifiers.Partial; + + typeDecl.BaseTypes.AddRange(Convert(typeDeclaration.BaseTypes)); + typeDecl.TypeParameters.AddRange(ConvertTypeParameters(typeDeclaration.TypeParameters, typeDeclaration.Constraints)); + + typeStack.Push(typeDecl); + foreach (var member in typeDeclaration.Members) { + CodeTypeMember m = member.AcceptVisitor(this) as CodeTypeMember; + if (m != null) + typeDecl.Members.Add(m); + } + typeStack.Pop(); + return typeDecl; + } + + void AddTypeMember(CodeTypeMember member) + { + if (typeStack.Count != 0) + typeStack.Peek().Members.Add(member); + } + + CodeObject IAstVisitor.VisitUsingAliasDeclaration(UsingAliasDeclaration usingAliasDeclaration, object data) + { + return new CodeSnippetTypeMember(MakeSnippet(usingAliasDeclaration)); + } + + CodeObject IAstVisitor.VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) + { + return new CodeNamespaceImport(usingDeclaration.Namespace); + } + + CodeObject IAstVisitor.VisitExternAliasDeclaration(ExternAliasDeclaration externAliasDeclaration, object data) + { + return new CodeSnippetTypeMember(MakeSnippet(externAliasDeclaration)); + } + + CodeObject IAstVisitor.VisitBlockStatement(BlockStatement blockStatement, object data) + { + return new CodeConditionStatement(new CodePrimitiveExpression(true), ConvertBlock(blockStatement)); + } + + CodeObject IAstVisitor.VisitBreakStatement(BreakStatement breakStatement, object data) + { + return MakeSnippetStatement(breakStatement); + } + + CodeObject IAstVisitor.VisitCheckedStatement(CheckedStatement checkedStatement, object data) + { + return MakeSnippetStatement(checkedStatement); + } + + CodeObject IAstVisitor.VisitContinueStatement(ContinueStatement continueStatement, object data) + { + return MakeSnippetStatement(continueStatement); + } + + CodeObject IAstVisitor.VisitDoWhileStatement(DoWhileStatement doWhileStatement, object data) + { + // do { } while (expr); + // + // emulate with: + // for (bool _do = true; _do; _do = expr) {} + string varName = "_do" + doWhileStatement.Ancestors.OfType().Count(); + return new CodeIterationStatement( + new CodeVariableDeclarationStatement(typeof(bool), varName, new CodePrimitiveExpression(true)), + new CodeVariableReferenceExpression(varName), + new CodeAssignStatement(new CodeVariableReferenceExpression(varName), Convert(doWhileStatement.Condition)), + ConvertEmbeddedStatement(doWhileStatement.EmbeddedStatement) + ); + } + + CodeObject IAstVisitor.VisitEmptyStatement(EmptyStatement emptyStatement, object data) + { + return null; + } + + CodeObject IAstVisitor.VisitExpressionStatement(ExpressionStatement expressionStatement, object data) + { + AssignmentExpression assignment = expressionStatement.Expression as AssignmentExpression; + if (assignment != null && assignment.Operator == AssignmentOperatorType.Assign) { + return new CodeAssignStatement(Convert(assignment.Left), Convert(assignment.Right)); + } + return new CodeExpressionStatement(Convert(expressionStatement.Expression)); + } + + CodeObject IAstVisitor.VisitFixedStatement(FixedStatement fixedStatement, object data) + { + return MakeSnippetStatement(fixedStatement); + } + + CodeObject IAstVisitor.VisitForeachStatement(ForeachStatement foreachStatement, object data) + { + return MakeSnippetStatement(foreachStatement); + } + + CodeObject IAstVisitor.VisitForStatement(ForStatement forStatement, object data) + { + if (forStatement.Initializers.Count != 1 || forStatement.Iterators.Count != 1) + return MakeSnippetStatement(forStatement); + return new CodeIterationStatement( + Convert(forStatement.Initializers.Single()), + Convert(forStatement.Condition), + Convert(forStatement.Iterators.Single()), + ConvertEmbeddedStatement(forStatement.EmbeddedStatement) + ); + } + + CodeObject IAstVisitor.VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, object data) + { + return MakeSnippetStatement(gotoCaseStatement); + } + + CodeObject IAstVisitor.VisitGotoDefaultStatement(GotoDefaultStatement gotoDefaultStatement, object data) + { + return MakeSnippetStatement(gotoDefaultStatement); + } + + CodeObject IAstVisitor.VisitGotoStatement(GotoStatement gotoStatement, object data) + { + return new CodeGotoStatement(gotoStatement.Label); + } + + CodeObject IAstVisitor.VisitIfElseStatement(IfElseStatement ifElseStatement, object data) + { + return new CodeConditionStatement( + Convert(ifElseStatement.Condition), + ConvertEmbeddedStatement(ifElseStatement.TrueStatement), + ConvertEmbeddedStatement(ifElseStatement.FalseStatement)); + } + + CodeObject IAstVisitor.VisitLabelStatement(LabelStatement labelStatement, object data) + { + return new CodeLabeledStatement(labelStatement.Label); + } + + CodeObject IAstVisitor.VisitLockStatement(LockStatement lockStatement, object data) + { + return MakeSnippetStatement(lockStatement); + } + + CodeObject IAstVisitor.VisitReturnStatement(ReturnStatement returnStatement, object data) + { + return new CodeMethodReturnStatement(Convert(returnStatement.Expression)); + } + + CodeObject IAstVisitor.VisitSwitchStatement(SwitchStatement switchStatement, object data) + { + return MakeSnippetStatement(switchStatement); + } + + CodeObject IAstVisitor.VisitSwitchSection(SwitchSection switchSection, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitCaseLabel(CaseLabel caseLabel, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitThrowStatement(ThrowStatement throwStatement, object data) + { + return new CodeThrowExceptionStatement(Convert(throwStatement.Expression)); + } + + CodeObject IAstVisitor.VisitTryCatchStatement(TryCatchStatement tryCatchStatement, object data) + { + List catchClauses = new List(); + foreach (var catchClause in tryCatchStatement.CatchClauses) { + catchClauses.Add(new CodeCatchClause(catchClause.VariableName, Convert(catchClause.Type), ConvertBlock(catchClause.Body))); + } + return new CodeTryCatchFinallyStatement( + ConvertBlock(tryCatchStatement.TryBlock), + catchClauses.ToArray(), + ConvertBlock(tryCatchStatement.FinallyBlock)); + } + + CodeObject IAstVisitor.VisitCatchClause(CatchClause catchClause, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitUncheckedStatement(UncheckedStatement uncheckedStatement, object data) + { + return MakeSnippetStatement(uncheckedStatement); + } + + CodeObject IAstVisitor.VisitUnsafeStatement(UnsafeStatement unsafeStatement, object data) + { + return MakeSnippetStatement(unsafeStatement); + } + + CodeObject IAstVisitor.VisitUsingStatement(UsingStatement usingStatement, object data) + { + return MakeSnippetStatement(usingStatement); + } + + CodeObject IAstVisitor.VisitVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement, object data) + { + if (variableDeclarationStatement.Variables.Count != 1) + return MakeSnippetStatement(variableDeclarationStatement); + VariableInitializer vi = variableDeclarationStatement.Variables.Single(); + return new CodeVariableDeclarationStatement( + Convert(variableDeclarationStatement.Type), + vi.Name, + ConvertVariableInitializer(vi.Initializer, variableDeclarationStatement.Type)); + } + + CodeExpression ConvertVariableInitializer(Expression expr, AstType type) + { + ArrayInitializerExpression aie = expr as ArrayInitializerExpression; + if (aie != null) { + return new CodeArrayCreateExpression(Convert(type), Convert(aie.Elements)); + } else { + return Convert(expr); + } + } + + CodeObject IAstVisitor.VisitWhileStatement(WhileStatement whileStatement, object data) + { + return new CodeIterationStatement(null, Convert(whileStatement.Condition), null, ConvertEmbeddedStatement(whileStatement.EmbeddedStatement)); + } + + CodeObject IAstVisitor.VisitYieldBreakStatement(YieldBreakStatement yieldBreakStatement, object data) + { + return MakeSnippetStatement(yieldBreakStatement); + } + + CodeObject IAstVisitor.VisitYieldReturnStatement(YieldReturnStatement yieldStatement, object data) + { + return MakeSnippetStatement(yieldStatement); + } + + CodeObject IAstVisitor.VisitAccessor(Accessor accessor, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, object data) + { + CodeConstructor ctor = new CodeConstructor(); + ctor.Attributes = ConvertMemberAttributes(constructorDeclaration.Modifiers); + ctor.CustomAttributes.AddRange(Convert(constructorDeclaration.Attributes)); + if (constructorDeclaration.Initializer.ConstructorInitializerType == ConstructorInitializerType.This) { + ctor.ChainedConstructorArgs.AddRange(Convert(constructorDeclaration.Initializer.Arguments)); + } else { + ctor.BaseConstructorArgs.AddRange(Convert(constructorDeclaration.Initializer.Arguments)); + } + ctor.Parameters.AddRange(Convert(constructorDeclaration.Parameters)); + + ctor.Statements.AddRange(ConvertBlock(constructorDeclaration.Body)); + return ctor; + } + + CodeObject IAstVisitor.VisitConstructorInitializer(ConstructorInitializer constructorInitializer, object data) + { + throw new NotSupportedException(); + } + + CodeObject IAstVisitor.VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration, object data) + { + return new CodeSnippetTypeMember(MakeSnippet(destructorDeclaration)); + } + + CodeObject IAstVisitor.VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration, object data) + { + TypeDeclaration td = enumMemberDeclaration.Parent as TypeDeclaration; + CodeMemberField f = new CodeMemberField(td != null ? td.Name : "Enum", enumMemberDeclaration.Name); + f.Attributes = MemberAttributes.Public | MemberAttributes.Static; + f.CustomAttributes.AddRange(Convert(enumMemberDeclaration.Attributes)); + f.InitExpression = Convert(enumMemberDeclaration.Initializer); + return f; + } + + CodeObject IAstVisitor.VisitEventDeclaration(EventDeclaration eventDeclaration, object data) + { + foreach (VariableInitializer vi in eventDeclaration.Variables) { + if (!vi.Initializer.IsNull) { + AddTypeMember(new CodeSnippetTypeMember(MakeSnippet(eventDeclaration))); + continue; + } + + CodeMemberEvent e = new CodeMemberEvent(); + e.Attributes = ConvertMemberAttributes(eventDeclaration.Modifiers); + e.CustomAttributes.AddRange(Convert(eventDeclaration.Attributes)); + e.Name = vi.Name; + e.Type = Convert(eventDeclaration.ReturnType); + AddTypeMember(e); + } + return null; + } + + CodeObject IAstVisitor.VisitCustomEventDeclaration(CustomEventDeclaration customEventDeclaration, object data) + { + return new CodeSnippetTypeMember(MakeSnippet(customEventDeclaration)); + } + + CodeObject IAstVisitor.VisitFieldDeclaration(FieldDeclaration fieldDeclaration, object data) + { + foreach (VariableInitializer vi in fieldDeclaration.Variables) { + CodeMemberField f = new CodeMemberField(Convert(fieldDeclaration.ReturnType), vi.Name); + f.Attributes = ConvertMemberAttributes(fieldDeclaration.Modifiers); + f.CustomAttributes.AddRange(Convert(fieldDeclaration.Attributes)); + f.InitExpression = ConvertVariableInitializer(vi.Initializer, fieldDeclaration.ReturnType); + AddTypeMember(f); + } + return null; + } + + CodeObject IAstVisitor.VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration, object data) + { + CodeMemberProperty p = new CodeMemberProperty(); + p.Attributes = ConvertMemberAttributes(indexerDeclaration.Modifiers); + p.CustomAttributes.AddRange(Convert(indexerDeclaration.Attributes)); + p.Name = "Items"; + p.PrivateImplementationType = Convert(indexerDeclaration.PrivateImplementationType); + p.Parameters.AddRange(Convert(indexerDeclaration.Parameters)); + p.Type = Convert(indexerDeclaration.ReturnType); + + if (!indexerDeclaration.Getter.IsNull) { + p.HasGet = true; + p.GetStatements.AddRange(ConvertBlock(indexerDeclaration.Getter.Body)); + } + if (!indexerDeclaration.Setter.IsNull) { + p.HasSet = true; + p.SetStatements.AddRange(ConvertBlock(indexerDeclaration.Setter.Body)); + } + return p; + } + + CodeObject IAstVisitor.VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) + { + CodeMemberMethod m = new CodeMemberMethod(); + m.Attributes = ConvertMemberAttributes(methodDeclaration.Modifiers); + + m.CustomAttributes.AddRange(Convert(methodDeclaration.Attributes.Where(a => a.AttributeTarget != "return"))); + m.ReturnTypeCustomAttributes.AddRange(Convert(methodDeclaration.Attributes.Where(a => a.AttributeTarget == "return"))); + + m.ReturnType = Convert(methodDeclaration.ReturnType); + m.PrivateImplementationType = Convert(methodDeclaration.PrivateImplementationType); + m.Name = methodDeclaration.Name; + m.TypeParameters.AddRange(ConvertTypeParameters(methodDeclaration.TypeParameters, methodDeclaration.Constraints)); + m.Parameters.AddRange(Convert(methodDeclaration.Parameters)); + + m.Statements.AddRange(ConvertBlock(methodDeclaration.Body)); + return m; + } + + CodeObject IAstVisitor.VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration, object data) + { + CodeMemberMethod m = new CodeMemberMethod(); + m.Attributes = ConvertMemberAttributes(operatorDeclaration.Modifiers); + + m.CustomAttributes.AddRange(Convert(operatorDeclaration.Attributes.Where(a => a.AttributeTarget != "return"))); + m.ReturnTypeCustomAttributes.AddRange(Convert(operatorDeclaration.Attributes.Where(a => a.AttributeTarget == "return"))); + + m.ReturnType = Convert(operatorDeclaration.ReturnType); + m.Name = operatorDeclaration.Name; + m.Parameters.AddRange(Convert(operatorDeclaration.Parameters)); + + m.Statements.AddRange(ConvertBlock(operatorDeclaration.Body)); + return m; + } + + CodeObject IAstVisitor.VisitParameterDeclaration(ParameterDeclaration parameterDeclaration, object data) + { + var p = new CodeParameterDeclarationExpression(Convert(parameterDeclaration.Type), parameterDeclaration.Name); + p.CustomAttributes.AddRange(Convert(parameterDeclaration.Attributes)); + switch (parameterDeclaration.ParameterModifier) { + case ParameterModifier.Ref: + p.Direction = System.CodeDom.FieldDirection.Ref; + break; + case ParameterModifier.Out: + p.Direction = System.CodeDom.FieldDirection.Out; + break; + } + return p; + } + + CodeParameterDeclarationExpression[] Convert(IEnumerable parameters) + { + List result = new List(); + foreach (ParameterDeclaration pd in parameters) { + CodeParameterDeclarationExpression pde = pd.AcceptVisitor(this) as CodeParameterDeclarationExpression; + if (pde != null) + result.Add(pde); + } + return result.ToArray(); + } + + CodeObject IAstVisitor.VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data) + { + CodeMemberProperty p = new CodeMemberProperty(); + p.Attributes = ConvertMemberAttributes(propertyDeclaration.Modifiers); + p.CustomAttributes.AddRange(Convert(propertyDeclaration.Attributes)); + p.Name = propertyDeclaration.Name; + p.PrivateImplementationType = Convert(propertyDeclaration.PrivateImplementationType); + p.Type = Convert(propertyDeclaration.ReturnType); + + if (!propertyDeclaration.Getter.IsNull) { + p.HasGet = true; + p.GetStatements.AddRange(ConvertBlock(propertyDeclaration.Getter.Body)); + } + if (!propertyDeclaration.Setter.IsNull) { + p.HasSet = true; + p.SetStatements.AddRange(ConvertBlock(propertyDeclaration.Setter.Body)); + } + return p; + } + + CodeObject IAstVisitor.VisitVariableInitializer(VariableInitializer variableInitializer, object data) + { + throw new NotSupportedException(); // should be handled by the parent node + } + + CodeObject IAstVisitor.VisitFixedFieldDeclaration(FixedFieldDeclaration fixedFieldDeclaration, object data) + { + return new CodeSnippetTypeMember(MakeSnippet(fixedFieldDeclaration)); + } + + CodeObject IAstVisitor.VisitFixedVariableInitializer(FixedVariableInitializer fixedVariableInitializer, object data) + { + throw new NotSupportedException(); // should be handled by the parent node + } + + CodeObject IAstVisitor.VisitCompilationUnit(CompilationUnit compilationUnit, object data) + { + CodeCompileUnit cu = new CodeCompileUnit(); + foreach (AstNode node in compilationUnit.Children) { + CodeObject o = node.AcceptVisitor(this); + + CodeNamespace ns = o as CodeNamespace; + if (ns != null) { + cu.Namespaces.Add(ns); + } + CodeTypeDeclaration td = o as CodeTypeDeclaration; + if (td != null) { + cu.Namespaces.Add(new CodeNamespace() { Types = { td } }); + } + } + return cu; + } + + CodeObject IAstVisitor.VisitSimpleType(SimpleType simpleType, object data) + { + if (useFullyQualifiedTypeNames) { + IType type = Resolve(simpleType).Type; + if (type.Kind != TypeKind.Unknown) + return Convert(type); + } + var tr = new CodeTypeReference(simpleType.Identifier); + tr.TypeArguments.AddRange(Convert(simpleType.TypeArguments)); + return tr; + } + + CodeObject IAstVisitor.VisitMemberType(MemberType memberType, object data) + { + if (memberType.IsDoubleColon && new SimpleType("global").IsMatch(memberType.Target)) { + var tr = new CodeTypeReference(memberType.MemberName, CodeTypeReferenceOptions.GlobalReference); + tr.TypeArguments.AddRange(Convert(memberType.TypeArguments)); + return tr; + } + if (useFullyQualifiedTypeNames || memberType.IsDoubleColon) { + IType type = Resolve(memberType).Type; + if (type.Kind != TypeKind.Unknown) + return Convert(type); + } + CodeTypeReference target = Convert(memberType.Target); + if (target == null) + return null; + target.BaseType = target.BaseType + "." + memberType.MemberName; + target.TypeArguments.AddRange(Convert(memberType.TypeArguments)); + return target; + } + + CodeObject IAstVisitor.VisitComposedType(ComposedType composedType, object data) + { + CodeTypeReference typeRef = Convert(composedType.BaseType); + if (typeRef == null) + return null; + if (composedType.HasNullableSpecifier) { + typeRef = new CodeTypeReference("System.Nullable") { TypeArguments = { typeRef } }; + } + foreach (ArraySpecifier s in composedType.ArraySpecifiers.Reverse()) { + typeRef = new CodeTypeReference(typeRef, s.Dimensions); + } + return typeRef; + } + + CodeObject IAstVisitor.VisitArraySpecifier(ArraySpecifier arraySpecifier, object data) + { + throw new NotSupportedException(); // handled by parent node + } + + CodeObject IAstVisitor.VisitPrimitiveType(PrimitiveType primitiveType, object data) + { + string keyword = primitiveType.Keyword; + for (TypeCode c = TypeCode.Empty; c <= TypeCode.String; c++) { + if (ReflectionHelper.GetCSharpNameByTypeCode(c) == keyword) + return new CodeTypeReference("System." + ReflectionHelper.GetShortNameByTypeCode(c)); + } + return new CodeTypeReference(primitiveType.Keyword); + } + + CodeObject IAstVisitor.VisitComment(Comment comment, object data) + { + return new CodeComment(comment.Content, comment.CommentType == CommentType.Documentation); + } + + CodeObject IAstVisitor.VisitTypeParameterDeclaration(TypeParameterDeclaration typeParameterDeclaration, object data) + { + throw new NotSupportedException(); // type parameters and constraints are handled together + } + + CodeObject IAstVisitor.VisitConstraint(Constraint constraint, object data) + { + throw new NotSupportedException(); + } + + CodeTypeParameter[] ConvertTypeParameters(IEnumerable typeParameters, IEnumerable constraints) + { + List result = new List(); + foreach (TypeParameterDeclaration tpDecl in typeParameters) { + CodeTypeParameter tp = new CodeTypeParameter(tpDecl.Name); + tp.CustomAttributes.AddRange(Convert(tpDecl.Attributes)); + foreach (Constraint constraint in constraints) { + if (constraint.TypeParameter == tp.Name) { + foreach (AstType baseType in constraint.BaseTypes) { + if (baseType is PrimitiveType && ((PrimitiveType)baseType).Keyword == "new") { + tp.HasConstructorConstraint = true; + } else { + CodeTypeReference tr = Convert(baseType); + if (tr != null) + tp.Constraints.Add(tr); + } + } + } + } + result.Add(tp); + } + return result.ToArray(); + } + + CodeObject IAstVisitor.VisitCSharpTokenNode(CSharpTokenNode cSharpTokenNode, object data) + { + return null; + } + + CodeObject IAstVisitor.VisitIdentifier(Identifier identifier, object data) + { + return null; + } + + CodeObject IAstVisitor.VisitPatternPlaceholder(AstNode placeholder, ICSharpCode.NRefactory.PatternMatching.Pattern pattern, object data) + { + return null; + } + } +} diff --git a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs index 3de34cce2e..e6eb0ed99d 100644 --- a/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs +++ b/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs @@ -1873,16 +1873,16 @@ namespace ICSharpCode.NRefactory.CSharp public override object Visit (Yield yieldStatement) { - var result = new YieldStatement (); + var result = new YieldReturnStatement (); var location = LocationsBag.GetLocations (yieldStatement); - result.AddChild (new CSharpTokenNode (Convert (yieldStatement.loc), "yield".Length), YieldStatement.YieldKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (yieldStatement.loc), "yield".Length), YieldReturnStatement.YieldKeywordRole); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[0]), "return".Length), YieldStatement.ReturnKeywordRole); + result.AddChild (new CSharpTokenNode (Convert (location[0]), "return".Length), YieldReturnStatement.ReturnKeywordRole); if (yieldStatement.Expr != null) - result.AddChild ((Expression)yieldStatement.Expr.Accept (this), YieldStatement.Roles.Expression); + result.AddChild ((Expression)yieldStatement.Expr.Accept (this), YieldReturnStatement.Roles.Expression); if (location != null) - result.AddChild (new CSharpTokenNode (Convert (location[1]), ";".Length), YieldStatement.Roles.Semicolon); + result.AddChild (new CSharpTokenNode (Convert (location[1]), ";".Length), YieldReturnStatement.Roles.Semicolon); return result; } diff --git a/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs b/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs index db6be31899..39d45f9afb 100644 --- a/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs +++ b/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs @@ -1,4 +1,4 @@ -// +// // Script.cs // // Author: @@ -157,7 +157,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring stringWriter.NewLine = Context.EolMarker; if (startWithNewLine) formatter.NewLine (); - var visitor = new OutputVisitor (formatter, Context.FormattingOptions); + var visitor = new CSharpOutputVisitor (formatter, Context.FormattingOptions); visitor.OutputStarted += (sender, e) => { result.NodeSegments [e.AstNode] = new NodeOutput.Segment (stringWriter.GetStringBuilder ().Length); }; diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs index 273b7d38a2..9a68f0784f 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs @@ -2466,7 +2466,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver return voidResult; } - ResolveResult IAstVisitor.VisitYieldStatement(YieldStatement yieldStatement, object data) + ResolveResult IAstVisitor.VisitYieldReturnStatement(YieldReturnStatement yieldStatement, object data) { if (resolverEnabled && resolver.CurrentMember != null) { IType returnType = resolver.CurrentMember.ReturnType.Resolve(resolver.Context); diff --git a/ICSharpCode.NRefactory.Demo/CSDemo.cs b/ICSharpCode.NRefactory.Demo/CSDemo.cs index bbbc856ac0..82dd465598 100644 --- a/ICSharpCode.NRefactory.Demo/CSDemo.cs +++ b/ICSharpCode.NRefactory.Demo/CSDemo.cs @@ -148,7 +148,7 @@ namespace ICSharpCode.NRefactory.Demo void CSharpGenerateCodeButtonClick(object sender, EventArgs e) { StringWriter w = new StringWriter(); - OutputVisitor output = new OutputVisitor(w, new CSharpFormattingOptions()); + CSharpOutputVisitor output = new CSharpOutputVisitor(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 c26595b4d8..05bbcede4e 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/InsertParenthesesVisitorTests.cs @@ -39,7 +39,7 @@ namespace ICSharpCode.NRefactory.CSharp expr.AcceptVisitor(new InsertParenthesesVisitor { InsertParenthesesForReadability = true }, null); StringWriter w = new StringWriter(); w.NewLine = " "; - expr.AcceptVisitor(new OutputVisitor(new TextWriterOutputFormatter(w) { IndentationString = "" }, policy), null); + expr.AcceptVisitor(new CSharpOutputVisitor(new TextWriterOutputFormatter(w) { IndentationString = "" }, policy), null); return w.ToString(); } @@ -49,7 +49,7 @@ namespace ICSharpCode.NRefactory.CSharp expr.AcceptVisitor(new InsertParenthesesVisitor { InsertParenthesesForReadability = false }, null); StringWriter w = new StringWriter(); w.NewLine = " "; - expr.AcceptVisitor(new OutputVisitor(new TextWriterOutputFormatter(w) { IndentationString = "" }, policy), null); + expr.AcceptVisitor(new CSharpOutputVisitor(new TextWriterOutputFormatter(w) { IndentationString = "" }, policy), null); return w.ToString(); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs index ab1eaf7d9b..e5dce267bd 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs @@ -31,7 +31,7 @@ namespace ICSharpCode.NRefactory.CSharp policy = new CSharpFormattingOptions();; StringWriter w = new StringWriter(); w.NewLine = "\n"; - expr.AcceptVisitor(new OutputVisitor(new TextWriterOutputFormatter(w) { IndentationString = "\t" }, policy), null); + expr.AcceptVisitor(new CSharpOutputVisitor(new TextWriterOutputFormatter(w) { IndentationString = "\t" }, policy), null); Assert.AreEqual(expected.Replace("\r", ""), w.ToString()); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs index 1b71c00e3a..c5068c9893 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs @@ -117,7 +117,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser static string ToCSharp(AstNode node) { StringWriter w = new StringWriter(); - node.AcceptVisitor(new OutputVisitor(w, new CSharpFormattingOptions()), null); + node.AcceptVisitor(new CSharpOutputVisitor(w, new CSharpFormattingOptions()), null); return w.ToString(); } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/YieldStatementTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/YieldStatementTests.cs index 5d55367e1f..dc46ae5dfb 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/YieldStatementTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Statements/YieldStatementTests.cs @@ -27,7 +27,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Statements [Test] public void YieldReturnStatementTest() { - YieldStatement yieldStmt = ParseUtilCSharp.ParseStatement("yield return \"Foo\";"); + YieldReturnStatement yieldStmt = ParseUtilCSharp.ParseStatement("yield return \"Foo\";"); PrimitiveExpression expr = (PrimitiveExpression)yieldStmt.Expression; Assert.AreEqual("Foo", expr.Value); } diff --git a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs index f2b8543b05..b28f2813d0 100644 --- a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs +++ b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs @@ -1369,11 +1369,11 @@ namespace ICSharpCode.NRefactory.VB.Visitors return EndNode(yieldBreakStatement, new ReturnStatement()); } - public AstNode VisitYieldStatement(CSharp.YieldStatement yieldStatement, object data) + public AstNode VisitYieldReturnStatement(CSharp.YieldReturnStatement yieldReturnStatement, object data) { var frame = members.Peek(); frame.inIterator = true; - return EndNode(yieldStatement, new YieldStatement((Expression)yieldStatement.Expression.AcceptVisitor(this, data))); + return EndNode(yieldReturnStatement, new YieldStatement((Expression)yieldReturnStatement.Expression.AcceptVisitor(this, data))); } public AstNode VisitAccessor(CSharp.Accessor accessor, object data) diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs index 29a1c4f893..424c55cdb0 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultTypeParameter.cs @@ -382,6 +382,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation return o != null && this.attributes == o.attributes && this.constraints == o.constraints + && this.name == o.name && this.flags == o.flags && this.ownerType == o.ownerType && this.index == o.index From fd8f8cf6cbd655704357e2218d301861893aee3d Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Sep 2011 19:15:40 +0200 Subject: [PATCH 86/92] Adjust AST for async/await. --- .../Expressions/AnonymousMethodExpression.cs | 11 +++++-- .../Ast/Expressions/LambdaExpression.cs | 11 ++++--- .../Ast/Modifiers.cs | 15 ++-------- .../OutputVisitor/CSharpOutputVisitor.cs | 29 +++++++++++++++---- ...s.cs => AnonymousMethodExpressionTests.cs} | 13 ++++++++- .../Expression/LambdaExpressionTests.cs | 24 +++++++++++++++ .../UnaryOperatorExpressionTests.cs | 26 +++++++++++++++++ .../TypeMembers/MethodDeclarationTests.cs | 28 ++++++++++++++++++ .../ICSharpCode.NRefactory.Tests.csproj | 2 +- 9 files changed, 133 insertions(+), 26 deletions(-) rename ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/{AnonymousMethodTests.cs => AnonymousMethodExpressionTests.cs} (86%) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs index 9a2bb8ea12..91fc0c4177 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/AnonymousMethodExpression.cs @@ -30,11 +30,15 @@ using System.Linq; namespace ICSharpCode.NRefactory.CSharp { /// - /// delegate(Parameters) {Body} + /// [async] delegate(Parameters) {Body} /// public class AnonymousMethodExpression : Expression { - // used to make a difference between delegate {} and delegate () {} + public readonly static Role AsyncModifierRole = LambdaExpression.AsyncModifierRole; + + public bool IsAsync { get; set; } + + // used to tell the difference between delegate {} and delegate () {} public bool HasParameterList { get; set; } @@ -86,7 +90,8 @@ namespace ICSharpCode.NRefactory.CSharp protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { AnonymousMethodExpression o = other as AnonymousMethodExpression; - return o != null && this.HasParameterList == o.HasParameterList && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match); + return o != null && this.IsAsync == o.IsAsync && this.HasParameterList == o.HasParameterList + && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match); } } } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs index ad5c81a9c9..2b6a39d6b9 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Expressions/LambdaExpression.cs @@ -1,6 +1,6 @@ // // LambdaExpression.cs -// +// // Author: // Mike Krüger // @@ -29,14 +29,17 @@ using System.Linq; namespace ICSharpCode.NRefactory.CSharp { /// - /// Parameters => Body + /// [async] Parameters => Body /// public class LambdaExpression : Expression { + public readonly static Role AsyncModifierRole = new Role("AsyncModifier", CSharpTokenNode.Null); public readonly static Role ArrowRole = new Role("Arrow", CSharpTokenNode.Null); public static readonly Role BodyRole = new Role("Body", AstNode.Null); - public AstNodeCollection Parameters { + public bool IsAsync { get; set; } + + public AstNodeCollection Parameters { get { return GetChildrenByRole (Roles.Parameter); } } @@ -57,7 +60,7 @@ namespace ICSharpCode.NRefactory.CSharp protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) { LambdaExpression o = other as LambdaExpression; - return o != null && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match); + return o != null && this.IsAsync == o.IsAsync && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match); } } } diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Modifiers.cs b/ICSharpCode.NRefactory.CSharp/Ast/Modifiers.cs index fec58e1761..eb320495c3 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Modifiers.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Modifiers.cs @@ -30,7 +30,6 @@ using System; namespace ICSharpCode.NRefactory.CSharp { - // For compatibility with old nrefactory - same flags. [Flags] public enum Modifiers { @@ -54,21 +53,13 @@ namespace ICSharpCode.NRefactory.CSharp Extern = 0x2000, Volatile = 0x4000, Unsafe = 0x8000, + Async = 0x10000, - //Overloads = 0x10000, - //WithEvents = 0x20000, - //Default = 0x40000, - //Fixed = 0x80000, - - //ProtectedOrInternal = Internal | Protected, - //ProtectedAndInternal = 0x100000, (not supported in C#) - //SpecialName = 0x200000, - //Final = 0x400000, - //Literal = 0x800000, VisibilityMask = Private | Internal | Protected | Public, /// /// Special value used to match any modifiers during pattern matching. /// Any = unchecked((int)0x80000000) - }} + } +} diff --git a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs index f50b0c53ca..07c1610df6 100644 --- a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CSharpOutputVisitor.cs @@ -23,7 +23,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Text; - +using System.Threading.Tasks; using ICSharpCode.NRefactory.PatternMatching; using ICSharpCode.NRefactory.TypeSystem; @@ -414,13 +414,21 @@ namespace ICSharpCode.NRefactory.CSharp { if (unconditionalKeywords.Contains (identifier)) return true; - if (context.Ancestors.Any (a => a is QueryExpression)) { - if (queryKeywords.Contains (identifier)) + foreach (AstNode ancestor in context.Ancestors) { + if (ancestor is QueryExpression && queryKeywords.Contains (identifier)) return true; + if (identifier == "await") { + // with lambdas/anonymous methods, + if (ancestor is LambdaExpression) + return ((LambdaExpression)ancestor).IsAsync; + if (ancestor is AnonymousMethodExpression) + return ((AnonymousMethodExpression)ancestor).IsAsync; + if (ancestor is AttributedNode) + return (((AttributedNode)ancestor).Modifiers & Modifiers.Async) == Modifiers.Async; + } } return false; } - #endregion #region Write constructs @@ -512,6 +520,10 @@ namespace ICSharpCode.NRefactory.CSharp public object VisitAnonymousMethodExpression (AnonymousMethodExpression anonymousMethodExpression, object data) { StartNode (anonymousMethodExpression); + if (anonymousMethodExpression.IsAsync) { + WriteKeyword ("async", AnonymousMethodExpression.AsyncModifierRole); + Space (); + } WriteKeyword ("delegate"); if (anonymousMethodExpression.HasParameterList) { Space (policy.SpaceBeforeMethodDeclarationParentheses); @@ -786,6 +798,10 @@ namespace ICSharpCode.NRefactory.CSharp public object VisitLambdaExpression (LambdaExpression lambdaExpression, object data) { StartNode (lambdaExpression); + if (lambdaExpression.IsAsync) { + WriteKeyword ("async", LambdaExpression.AsyncModifierRole); + Space (); + } if (LambdaNeedsParenthesis (lambdaExpression)) { WriteCommaSeparatedListInParenthesis (lambdaExpression.Parameters, policy.SpaceWithinMethodDeclarationParentheses); } else { @@ -1112,8 +1128,11 @@ namespace ICSharpCode.NRefactory.CSharp StartNode (unaryOperatorExpression); UnaryOperatorType opType = unaryOperatorExpression.Operator; string opSymbol = UnaryOperatorExpression.GetOperatorSymbol (opType); - if (!(opType == UnaryOperatorType.PostIncrement || opType == UnaryOperatorType.PostDecrement)) + if (opType == UnaryOperatorType.Await) { + WriteKeyword (opSymbol, UnaryOperatorExpression.OperatorRole); + } else if (!(opType == UnaryOperatorType.PostIncrement || opType == UnaryOperatorType.PostDecrement)) { WriteToken (opSymbol, UnaryOperatorExpression.OperatorRole); + } unaryOperatorExpression.Expression.AcceptVisitor (this, data); if (opType == UnaryOperatorType.PostIncrement || opType == UnaryOperatorType.PostDecrement) WriteToken (opSymbol, UnaryOperatorExpression.OperatorRole); diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodExpressionTests.cs similarity index 86% rename from ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs rename to ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodExpressionTests.cs index 70cc862078..1858b8d4c0 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodExpressionTests.cs @@ -24,7 +24,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp.Parser.Expression { [TestFixture] - public class AnonymousMethodTests + public class AnonymousMethodExpressionTests { AnonymousMethodExpression Parse(string expression) { @@ -37,6 +37,7 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression AnonymousMethodExpression ame = Parse("delegate {}"); Assert.AreEqual(0, ame.Parameters.Count()); Assert.AreEqual(0, ame.Body.Statements.Count()); + Assert.IsFalse(ame.IsAsync); Assert.IsFalse(ame.HasParameterList); } @@ -67,5 +68,15 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression Assert.AreEqual(1, ame.Body.Statements.Count()); Assert.IsTrue(ame.Body.Statements.First() is ReturnStatement); } + + [Test, Ignore("async/await not yet supported")] + public void AsyncAnonymousMethod() + { + AnonymousMethodExpression ame = Parse("async delegate {}"); + Assert.AreEqual(0, ame.Parameters.Count()); + Assert.AreEqual(0, ame.Body.Statements.Count()); + Assert.IsTrue(ame.IsAsync); + Assert.IsFalse(ame.HasParameterList); + } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs index caa7eb119e..7a67ccaad9 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs @@ -119,5 +119,29 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression FalseExpression = new NullReferenceExpression() }}); } + + [Test, Ignore("async/await not yet supported")] + public void AsyncLambdaExpression() + { + ParseUtilCSharp.AssertExpression( + "async x => x + 1", + new LambdaExpression { + IsAsync = true, + Parameters = { new ParameterDeclaration { Name = "x" } }, + Body = new BinaryOperatorExpression(new IdentifierExpression("x"), BinaryOperatorType.Add, new PrimitiveExpression(1)) + }); + } + + [Test, Ignore("async/await not yet supported")] + public void AsyncLambdaExpressionWithMultipleParameters() + { + ParseUtilCSharp.AssertExpression( + "async (x,y) => x + 1", + new LambdaExpression { + IsAsync = true, + Parameters = { new ParameterDeclaration { Name = "x" }, new ParameterDeclaration { Name = "y" } }, + Body = new BinaryOperatorExpression(new IdentifierExpression("x"), BinaryOperatorType.Add, new PrimitiveExpression(1)) + }); + } } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/UnaryOperatorExpressionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/UnaryOperatorExpressionTests.cs index 13afada640..a5c69f53b8 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/UnaryOperatorExpressionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/UnaryOperatorExpressionTests.cs @@ -92,6 +92,32 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.Expression TestUnaryOperatorExpressionTest("&a", UnaryOperatorType.AddressOf); } + [Test, Ignore("async/await not yet supported")] + public void Await() + { + ParseUtilCSharp.AssertExpression( + "async a => await a", + new LambdaExpression { + IsAsync = true, + Parameters = { new ParameterDeclaration { Name = "a" } }, + Body = new UnaryOperatorExpression(UnaryOperatorType.Await, new IdentifierExpression("a")) + }); + } + + [Test, Ignore("async/await not yet supported")] + public void AwaitAwait() + { + ParseUtilCSharp.AssertExpression( + "async a => await await a", + new LambdaExpression { + IsAsync = true, + Parameters = { new ParameterDeclaration { Name = "a" } }, + Body = new UnaryOperatorExpression( + UnaryOperatorType.Await, + new UnaryOperatorExpression(UnaryOperatorType.Await, new IdentifierExpression("a"))) + }); + } + [Test] public void DereferenceAfterCast() { diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs index f0f9b86f67..5742b24254 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs @@ -355,5 +355,33 @@ namespace ICSharpCode.NRefactory.CSharp.Parser.TypeMembers } }}); } + + [Test, Ignore("async/await not yet supported")] + public void AsyncMethod() + { + ParseUtilCSharp.AssertTypeMember( + "async void MyMethod() {}", + new MethodDeclaration { + Modifiers = Modifiers.Async, + ReturnType = new PrimitiveType("void"), + Name = "MyMethod", + Body = new BlockStatement() + }); + } + + [Test, Ignore("async/await not yet supported")] + public void AsyncAsyncAsync() + { + ParseUtilCSharp.AssertTypeMember( + "async async async(async async) {}", + new MethodDeclaration { + Modifiers = Modifiers.Async, + ReturnType = new SimpleType("async"), + Name = "async", + Body = new BlockStatement(), + Parameters = { + new ParameterDeclaration(new SimpleType("async"), "async") + }}); + } } } diff --git a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj index 7060cbbfd6..4502ceb78b 100644 --- a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj +++ b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj @@ -114,7 +114,7 @@ - + From 7ff012f1a59e34dbbc1c683f7a614da3641a3fb0 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Sep 2011 20:14:06 +0200 Subject: [PATCH 87/92] Fixed some issues in the CodeDomConvertVisitor. --- .../OutputVisitor/CodeDomConvertVisitor.cs | 92 +++++++-- .../Resolver/CSharpResolver.cs | 2 +- .../Resolver/ErrorResolveResult.cs | 5 + .../Resolver/ResolveVisitor.cs | 2 +- ...orTests.cs => CSharpOutputVisitorTests.cs} | 2 +- .../CSharp/CodeDomConvertVisitorTests.cs | 177 ++++++++++++++++++ .../ICSharpCode.NRefactory.Tests.csproj | 3 +- 7 files changed, 261 insertions(+), 22 deletions(-) rename ICSharpCode.NRefactory.Tests/CSharp/{OutputVisitorTests.cs => CSharpOutputVisitorTests.cs} (98%) create mode 100644 ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs diff --git a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs index 9dc39b4323..9cba2eb955 100644 --- a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs @@ -21,11 +21,12 @@ using System.CodeDom; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Reflection; + using ICSharpCode.NRefactory.CSharp.Resolver; using ICSharpCode.NRefactory.PatternMatching; using ICSharpCode.NRefactory.Semantics; using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.NRefactory.TypeSystem.Implementation; namespace ICSharpCode.NRefactory.CSharp { @@ -37,12 +38,75 @@ namespace ICSharpCode.NRefactory.CSharp /// public class CodeDomConvertVisitor : IAstVisitor { - ITypeResolveContext context; + ITypeResolveContext context = MinimalResolveContext.Instance; + ResolveVisitor resolveVisitor; bool useFullyQualifiedTypeNames; + /// + /// Gets/Sets whether the visitor should use fully-qualified type references. + /// + public bool UseFullyQualifiedTypeNames { + get { return useFullyQualifiedTypeNames; } + set { useFullyQualifiedTypeNames = value; } + } + + /// + /// Converts a compilation unit to CodeDom. + /// + /// The input compilation unit. + /// Type resolve context, used for resolving type references. + /// CSharpParsedFile, used for resolving. + /// Converted CodeCompileUnit + /// + /// This conversion process requires a resolver because it needs to distinguish field/property/event references etc. + /// + public CodeCompileUnit Convert(CompilationUnit compilationUnit, ITypeResolveContext context, CSharpParsedFile parsedFile) + { + if (compilationUnit == null) + throw new ArgumentNullException("compilationUnit"); + if (context == null) + throw new ArgumentNullException("context"); + if (parsedFile == null) + throw new ArgumentNullException("parsedFile"); + using (var ctx = context.Synchronize()) { + ResolveVisitor resolveVisitor = new ResolveVisitor(new CSharpResolver(ctx), parsedFile); + resolveVisitor.Scan(compilationUnit); + return (CodeCompileUnit)Convert(compilationUnit, resolveVisitor); + } + } + + /// + /// Converts a C# AST node to CodeDom. + /// + /// The input node. + /// The resolve visitor. + /// The visitor must be already initialized for the file containing the given node (Scan must be called). + /// The node converted into CodeDom + /// + /// This conversion process requires a resolver because it needs to distinguish field/property/event references etc. + /// + public CodeObject Convert(AstNode node, ResolveVisitor resolveVisitor) + { + if (node == null) + throw new ArgumentNullException("node"); + if (resolveVisitor == null) + throw new ArgumentNullException("resolveVisitor"); + try { + this.resolveVisitor = resolveVisitor; + this.context = resolveVisitor.TypeResolveContext; + return node.AcceptVisitor(this); + } finally { + this.resolveVisitor = null; + this.context = MinimalResolveContext.Instance; + } + } + ResolveResult Resolve(AstNode node) { - throw new NotImplementedException(); + if (resolveVisitor == null) + return ErrorResolveResult.UnknownError; + else + return resolveVisitor.GetResolveResult(node); } CodeExpression Convert(Expression expr) @@ -79,7 +143,7 @@ namespace ICSharpCode.NRefactory.CSharp CodeTypeReference Convert(IType type) { - throw new NotImplementedException(); + return new CodeTypeReference(type.ReflectionName); } CodeStatement Convert(Statement stmt) @@ -147,25 +211,17 @@ namespace ICSharpCode.NRefactory.CSharp { CodeArrayCreateExpression ace = new CodeArrayCreateExpression(); int dimensions = arrayCreateExpression.Arguments.Count; - if (dimensions > 1) { - // CodeDom does not support multi-dimensional arrays + int nestingDepth = arrayCreateExpression.AdditionalArraySpecifiers.Count; + if (dimensions > 0) + nestingDepth++; + if (nestingDepth > 1 || dimensions > 1) { + // CodeDom does not support jagged or multi-dimensional arrays return MakeSnippetExpression(arrayCreateExpression); } if (arrayCreateExpression.Type.IsNull) { - ArrayType arrayType = Resolve(arrayCreateExpression).Type as ArrayType; - if (arrayType != null && arrayType.Dimensions == 1) - ace.CreateType = Convert(arrayType.ElementType); - else - return MakeSnippetExpression(arrayCreateExpression); + ace.CreateType = Convert(Resolve(arrayCreateExpression).Type); } else { ace.CreateType = Convert(arrayCreateExpression.Type); - IEnumerable additionalArraySpecifiers = arrayCreateExpression.AdditionalArraySpecifiers; - if (dimensions == 0) { - additionalArraySpecifiers = additionalArraySpecifiers.Skip(1); - } - foreach (var spec in additionalArraySpecifiers.Reverse()) { - ace.CreateType = new CodeTypeReference(ace.CreateType, spec.Dimensions); - } } if (arrayCreateExpression.Arguments.Count == 1) { ace.SizeExpression = Convert(arrayCreateExpression.Arguments.Single()); diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs b/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs index 0eb276cf86..4c3798744a 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs @@ -37,7 +37,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver /// public class CSharpResolver { - static readonly ResolveResult ErrorResult = new ErrorResolveResult(SharedTypes.UnknownType); + static readonly ResolveResult ErrorResult = ErrorResolveResult.UnknownError; static readonly ResolveResult DynamicResult = new ResolveResult(SharedTypes.Dynamic); static readonly ResolveResult NullResult = new ResolveResult(SharedTypes.Null); diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/ErrorResolveResult.cs b/ICSharpCode.NRefactory.CSharp/Resolver/ErrorResolveResult.cs index df0a49b82e..138453b26b 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/ErrorResolveResult.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/ErrorResolveResult.cs @@ -27,6 +27,11 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver /// public class ErrorResolveResult : ResolveResult { + /// + /// Gets an ErrorResolveResult instance with Type = SharedTypes.UnknownType. + /// + public static readonly ErrorResolveResult UnknownError = new ErrorResolveResult(SharedTypes.UnknownType); + public ErrorResolveResult(IType type) : base(type) { } diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs index 9a68f0784f..d66b63912a 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs @@ -56,7 +56,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver { // The ResolveVisitor is also responsible for handling lambda expressions. - static readonly ResolveResult errorResult = new ErrorResolveResult(SharedTypes.UnknownType); + static readonly ResolveResult errorResult = ErrorResolveResult.UnknownError; static readonly ResolveResult transparentIdentifierResolveResult = new ResolveResult(SharedTypes.UnboundTypeArgument); readonly ResolveResult voidResult; diff --git a/ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs similarity index 98% rename from ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs rename to ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs index e5dce267bd..d836308e51 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/OutputVisitorTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/CSharpOutputVisitorTests.cs @@ -23,7 +23,7 @@ using NUnit.Framework; namespace ICSharpCode.NRefactory.CSharp { [TestFixture] - public class OutputVisitorTests + public class CSharpOutputVisitorTests { void AssertOutput(string expected, Expression expr, CSharpFormattingOptions policy = null) { diff --git a/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs new file mode 100644 index 0000000000..ab61edf510 --- /dev/null +++ b/ICSharpCode.NRefactory.Tests/CSharp/CodeDomConvertVisitorTests.cs @@ -0,0 +1,177 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team +// +// 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.CodeDom; +using System.CodeDom.Compiler; +using System.IO; +using System.Text.RegularExpressions; +using ICSharpCode.NRefactory.CSharp.Resolver; +using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.NRefactory.TypeSystem.Implementation; +using Microsoft.CSharp; +using NUnit.Framework; + +namespace ICSharpCode.NRefactory.CSharp +{ + [TestFixture] + public class CodeDomConvertVisitorTests : ResolverTestBase + { + CodeDomConvertVisitor convertVisitor; + + public override void SetUp() + { + base.SetUp(); + AddUsing("System"); + AddUsing("System.Collections.Generic"); + AddUsing("System.Linq"); + resolver.CurrentTypeDefinition = new DefaultTypeDefinition(project, string.Empty, "MyClass"); + convertVisitor = new CodeDomConvertVisitor(); + convertVisitor.UseFullyQualifiedTypeNames = true; + } + + string Convert(Expression expr) + { + ResolveVisitor rv = new ResolveVisitor(resolver, null); + rv.Scan(expr); + var codeExpr = (CodeExpression)convertVisitor.Convert(expr, rv); + StringWriter writer = new StringWriter(); + writer.NewLine = " "; + new CSharpCodeProvider().GenerateCodeFromExpression(codeExpr, writer, new CodeGeneratorOptions { IndentString = " " }); + return Regex.Replace(writer.ToString(), @"\s+", " "); + } + + [Test] + public void CreateArray() + { + Assert.AreEqual("new int[10]", Convert( + new ArrayCreateExpression { + Type = new PrimitiveType("int"), + Arguments = { new PrimitiveExpression(10) } + })); + } + + [Test] + public void CreateJaggedArray() + { + Assert.AreEqual("new int[10][]", Convert( + new ArrayCreateExpression { + Type = new PrimitiveType("int"), + Arguments = { new PrimitiveExpression(10) }, + AdditionalArraySpecifiers = { new ArraySpecifier() } + })); + } + + [Test] + public void Create2DArray() + { + Assert.AreEqual("new int[10, 20]", Convert( + new ArrayCreateExpression { + Type = new PrimitiveType("int"), + Arguments = { new PrimitiveExpression(10), new PrimitiveExpression(20) } + })); + } + + [Test] + public void CreateImplicitlyTypedArray() + { + // implicitly-typed array not supported in CodeDom, so the conversion should infer the type + Assert.AreEqual("new int[] { 1, 2, 3}", Convert( + new ArrayCreateExpression { + AdditionalArraySpecifiers = { new ArraySpecifier() }, + Initializer = new ArrayInitializerExpression { + Elements = { + new PrimitiveExpression(1), + new PrimitiveExpression(2), + new PrimitiveExpression(3) + } + } + })); + } + + [Test] + public void Create2DImplicitlyTypedArray() + { + Assert.AreEqual("new int[,] { { 1, 2 }, { 3, 4 }}", Convert( + new ArrayCreateExpression { + AdditionalArraySpecifiers = { new ArraySpecifier(2) }, + Initializer = new ArrayInitializerExpression { + Elements = { + new ArrayInitializerExpression(new PrimitiveExpression(1), new PrimitiveExpression(2)), + new ArrayInitializerExpression(new PrimitiveExpression(3), new PrimitiveExpression(4)) + } + } + })); + } + + [Test] + public void AdditionOperator() + { + Assert.AreEqual("(0 + 1)", Convert( + new BinaryOperatorExpression(new PrimitiveExpression(0), BinaryOperatorType.Add, new PrimitiveExpression(1)))); + } + + [Test] + public void EqualityOperator() + { + Assert.AreEqual("(0 == 1)", Convert( + new BinaryOperatorExpression(new PrimitiveExpression(0), BinaryOperatorType.Equality, new PrimitiveExpression(1)))); + } + + [Test] + public void InEqualityOperator() + { + Assert.AreEqual("((0 == 1) == false)", Convert( + new BinaryOperatorExpression(new PrimitiveExpression(0), BinaryOperatorType.InEquality, new PrimitiveExpression(1)))); + } + + [Test] + public void ReferenceInEqualityOperator() + { + Assert.AreEqual("(default(object) != null)", Convert( + new BinaryOperatorExpression(new DefaultValueExpression(new PrimitiveType("object")), BinaryOperatorType.InEquality, new NullReferenceExpression()))); + } + + [Test] + public void StaticProperty() + { + Assert.AreEqual("System.Environment.TickCount", Convert( + new IdentifierExpression("Environment").Member("TickCount"))); + } + + [Test] + public void InstanceMethodInvocation() + { + Assert.AreEqual("this.Equals(null)", + Convert(new IdentifierExpression("Equals").Invoke(new NullReferenceExpression()))); + } + + [Test] + public void StaticMethodInvocation() + { + Assert.AreEqual("object.Equals(null, null)", + Convert(new IdentifierExpression("Equals").Invoke(new NullReferenceExpression(), new NullReferenceExpression()))); + } + + [Test] + public void NotOperator() + { + Assert.AreEqual("(a == false)", Convert(new UnaryOperatorExpression(UnaryOperatorType.Not, new IdentifierExpression("a")))); + } + } +} diff --git a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj index 4502ceb78b..2b1bcb8ce8 100644 --- a/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj +++ b/ICSharpCode.NRefactory.Tests/ICSharpCode.NRefactory.Tests.csproj @@ -77,8 +77,9 @@ + - + From d0e9ce023ba1e5667b3177521fa37c4b735473d2 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Sep 2011 20:28:29 +0200 Subject: [PATCH 88/92] CodeDomConvertVisitor: choose between CodeIndexerExpression and CodeArrayIndexerExpression. DefaultParameter: fixed bug in interning - two parameters with different names were considered equal for interning. --- .../OutputVisitor/CodeDomConvertVisitor.cs | 5 ++++- .../TypeSystem/Implementation/DefaultParameter.cs | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs index 9cba2eb955..eb82b1981c 100644 --- a/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/OutputVisitor/CodeDomConvertVisitor.cs @@ -395,7 +395,10 @@ namespace ICSharpCode.NRefactory.CSharp CodeObject IAstVisitor.VisitIndexerExpression(IndexerExpression indexerExpression, object data) { - return new CodeArrayIndexerExpression(Convert(indexerExpression.Target), Convert(indexerExpression.Arguments)); + if (Resolve(indexerExpression) is ArrayAccessResolveResult) + return new CodeArrayIndexerExpression(Convert(indexerExpression.Target), Convert(indexerExpression.Arguments)); + else + return new CodeIndexerExpression(Convert(indexerExpression.Target), Convert(indexerExpression.Arguments)); } CodeObject IAstVisitor.VisitInvocationExpression(InvocationExpression invocationExpression, object data) diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs index 1c41fa577a..97818b4a64 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultParameter.cs @@ -155,13 +155,15 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation int ISupportsInterning.GetHashCodeForInterning() { - return type.GetHashCode() ^ (attributes != null ? attributes.GetHashCode() : 0) ^ (defaultValue != null ? defaultValue.GetHashCode() : 0); + return type.GetHashCode() ^ name.GetHashCode() + ^ (attributes != null ? attributes.GetHashCode() : 0) + ^ (defaultValue != null ? defaultValue.GetHashCode() : 0); } bool ISupportsInterning.EqualsForInterning(ISupportsInterning other) { DefaultParameter p = other as DefaultParameter; - return p != null && type == p.type && attributes == p.attributes + return p != null && type == p.type && attributes == p.attributes && name == p.name && defaultValue == p.defaultValue && region == p.region && flags == p.flags; } From a73d7ba8db559273e648e095cd4e149462b6526a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Sep 2011 22:17:25 +0200 Subject: [PATCH 89/92] Added async/await support to the resolver. --- .../Resolver/CSharpResolver.cs | 11 ++ .../Resolver/Conversions.cs | 22 +++- .../Resolver/LambdaResolveResult.cs | 5 + .../Resolver/MemberLookup.cs | 17 +++ .../Resolver/ResolveVisitor.cs | 109 +++++++++++++++--- .../Resolver/OverloadResolutionTests.cs | 4 + .../CSharp/Resolver/TypeInferenceTests.cs | 4 + 7 files changed, 158 insertions(+), 14 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs b/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs index 4c3798744a..1c17dac029 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs @@ -611,6 +611,17 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver return ErrorResult; case UnaryOperatorType.AddressOf: return new UnaryOperatorResolveResult(new PointerType(expression.Type), op, expression); + case UnaryOperatorType.Await: + ResolveResult getAwaiterMethodGroup = ResolveMemberAccess(expression, "GetAwaiter", EmptyList.Instance, true); + ResolveResult getAwaiterInvocation = ResolveInvocation(getAwaiterMethodGroup, new ResolveResult[0]); + var getResultMethodGroup = CreateMemberLookup().Lookup(getAwaiterInvocation, "GetResult", EmptyList.Instance, true) as MethodGroupResolveResult; + if (getResultMethodGroup != null) { + var or = getResultMethodGroup.PerformOverloadResolution(context, new ResolveResult[0], allowExtensionMethods: false, conversions: conversions); + IType awaitResultType = or.GetBestCandidateWithSubstitutedTypeArguments().ReturnType.Resolve(context); + return new UnaryOperatorResolveResult(awaitResultType, UnaryOperatorType.Await, expression); + } else { + return new UnaryOperatorResolveResult(SharedTypes.UnknownType, UnaryOperatorType.Await, expression); + } default: throw new ArgumentException("Invalid value for UnaryOperatorType", "op"); } diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs b/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs index 1a29941da0..e54b871151 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/Conversions.cs @@ -1057,12 +1057,32 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver return 2; IType inferredRet = lambda.GetInferredReturnType(parameterTypes); - return BetterConversion(inferredRet, ret1, ret2); + r = BetterConversion(inferredRet, ret1, ret2); + if (r == 0 && lambda.IsAsync) { + ret1 = UnpackTask(ret1); + ret2 = UnpackTask(ret2); + inferredRet = UnpackTask(inferredRet); + if (ret1 != null && ret2 != null && inferredRet != null) + r = BetterConversion(inferredRet, ret1, ret2); + } + return r; } else { return BetterConversion(resolveResult.Type, t1, t2); } } + /// + /// Unpacks the generic Task[T]. Returns null if the input is not Task[T]. + /// + static IType UnpackTask(IType type) + { + ParameterizedType pt = type as ParameterizedType; + if (pt != null && pt.TypeParameterCount == 1 && pt.Name == "Task" && pt.Namespace == "System.Threading.Tasks") { + return pt.GetTypeArgument(0); + } + return null; + } + /// /// Gets the better conversion (C# 4.0 spec, §7.5.3.4) /// diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs b/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs index 3dfbccd79d..5c25cd5c2f 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/LambdaResolveResult.cs @@ -50,6 +50,11 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver /// This property returns false for anonymous methods without parameter list. public abstract bool IsImplicitlyTyped { get; } + /// + /// Gets whether the lambda is async. + /// + public abstract bool IsAsync { get; } + /// /// Gets the return type inferred when the parameter types are inferred to be /// diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs b/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs index 6d174e8c29..5b924bb795 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/MemberLookup.cs @@ -174,6 +174,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver #region LookupType public ResolveResult LookupType(IType declaringType, string name, IList typeArguments, bool parameterizeResultType = true) { + if (declaringType == null) + throw new ArgumentNullException("declaringType"); + if (name == null) + throw new ArgumentNullException("name"); + if (typeArguments == null) + throw new ArgumentNullException("typeArguments"); + int typeArgumentCount = typeArguments.Count; Predicate filter = delegate (ITypeDefinition d) { return InnerTypeParameterCount(d) == typeArgumentCount && d.Name == name && IsAccessible(d, true); @@ -226,6 +233,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver /// public ResolveResult Lookup(ResolveResult targetResolveResult, string name, IList typeArguments, bool isInvocation) { + if (targetResolveResult == null) + throw new ArgumentNullException("targetResolveResult"); + if (name == null) + throw new ArgumentNullException("name"); + if (typeArguments == null) + throw new ArgumentNullException("typeArguments"); + bool targetIsTypeParameter = targetResolveResult.Type.Kind == TypeKind.TypeParameter; bool allowProtectedAccess = IsProtectedAccessAllowed(targetResolveResult.Type); @@ -291,6 +305,9 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver /// public IList LookupIndexers(IType targetType) { + if (targetType == null) + throw new ArgumentNullException("targetType"); + bool allowProtectedAccess = IsProtectedAccessAllowed(targetType); Predicate filter = delegate(IProperty property) { return property.IsIndexer && IsAccessible(property, allowProtectedAccess); diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs index d66b63912a..2bfed60137 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs @@ -313,7 +313,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver /// void ResolveAndProcessConversion(Expression expr, IType targetType) { - if (targetType.Kind == TypeKind.Unknown) { + if (targetType.Kind == TypeKind.Unknown || targetType.Kind == TypeKind.Void) { // no need to resolve the expression right now Scan(expr); } else { @@ -1619,7 +1619,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver return HandleExplicitlyTypedLambda( anonymousMethodExpression.Parameters, anonymousMethodExpression.Body, isAnonymousMethod: true, - hasParameterList: anonymousMethodExpression.HasParameterList); + hasParameterList: anonymousMethodExpression.HasParameterList, + isAsync: anonymousMethodExpression.IsAsync); } ResolveResult IAstVisitor.VisitLambdaExpression(LambdaExpression lambdaExpression, object data) @@ -1634,7 +1635,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver if (isExplicitlyTyped || !isImplicitlyTyped) { return HandleExplicitlyTypedLambda( lambdaExpression.Parameters, lambdaExpression.Body, - isAnonymousMethod: false, hasParameterList: true); + isAnonymousMethod: false, hasParameterList: true, isAsync: lambdaExpression.IsAsync); } else { return new ImplicitlyTypedLambda(lambdaExpression, this); } @@ -1643,7 +1644,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver #region Explicitly typed ExplicitlyTypedLambda HandleExplicitlyTypedLambda( AstNodeCollection parameterDeclarations, - AstNode body, bool isAnonymousMethod, bool hasParameterList) + AstNode body, bool isAnonymousMethod, bool hasParameterList, bool isAsync) { List parameters = new List(); resolver.PushLambdaBlock(); @@ -1659,7 +1660,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver Scan(pd); } - var lambda = new ExplicitlyTypedLambda(parameters, isAnonymousMethod, resolver.Clone(), this, body); + var lambda = new ExplicitlyTypedLambda(parameters, isAnonymousMethod, isAsync, resolver.Clone(), this, body); // Don't scan the lambda body here - we'll do that later when analyzing the ExplicitlyTypedLambda. @@ -1676,6 +1677,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver { readonly IList parameters; readonly bool isAnonymousMethod; + readonly bool isAsync; CSharpResolver storedContext; ResolveVisitor visitor; @@ -1702,10 +1704,11 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver get { return body; } } - public ExplicitlyTypedLambda(IList parameters, bool isAnonymousMethod, CSharpResolver storedContext, ResolveVisitor visitor, AstNode body) + public ExplicitlyTypedLambda(IList parameters, bool isAnonymousMethod, bool isAsync, CSharpResolver storedContext, ResolveVisitor visitor, AstNode body) { this.parameters = parameters; this.isAnonymousMethod = isAnonymousMethod; + this.isAsync = isAsync; this.storedContext = storedContext; this.visitor = visitor; this.body = body; @@ -1734,7 +1737,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver delegate { var oldNavigator = visitor.navigator; visitor.navigator = new ConstantModeResolveVisitorNavigator(ResolveVisitorNavigationMode.Resolve, oldNavigator); - visitor.AnalyzeLambda(body, out success, out isValidAsVoidMethod, out inferredReturnType, out returnExpressions, out returnValues); + visitor.AnalyzeLambda(body, isAsync, out success, out isValidAsVoidMethod, out inferredReturnType, out returnExpressions, out returnValues); visitor.navigator = oldNavigator; }); Log.Unindent(); @@ -1750,7 +1753,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver { Log.WriteLine("Testing validity of {0} for return-type {1}...", this, returnType); Log.Indent(); - bool valid = Analyze() && IsValidLambda(isValidAsVoidMethod, returnValues, returnType, conversions); + bool valid = Analyze() && IsValidLambda(isValidAsVoidMethod, isAsync, returnValues, returnType, conversions); Log.Unindent(); Log.WriteLine("{0} is {1} for return-type {2}", this, valid ? "valid" : "invalid", returnType); if (valid) { @@ -1770,6 +1773,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver get { return false; } } + public override bool IsAsync { + get { return isAsync; } + } + public override bool IsAnonymousMethod { get { return isAnonymousMethod; } } @@ -1800,6 +1807,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver visitor.undecidedLambdas.Remove(this); Analyze(); Log.WriteLine("Applying return type {0} to explicitly-typed lambda {1}", returnType, this.LambdaExpression); + if (isAsync) + returnType = parentVisitor.UnpackTask(returnType); for (int i = 0; i < returnExpressions.Count; i++) { visitor.ProcessConversion(returnExpressions[i], returnValues[i], returnType); } @@ -1976,6 +1985,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver get { return true; } } + public override bool IsAsync { + get { return lambda.IsAsync; } + } + public override string ToString() { return "[ImplicitlyTypedLambda " + this.LambdaExpression + "]"; @@ -2030,7 +2043,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver } } - visitor.AnalyzeLambda(lambda.Body, out success, out isValidAsVoidMethod, out inferredReturnType, out returnExpressions, out returnValues); + visitor.AnalyzeLambda(lambda.Body, lambda.IsAsync, out success, out isValidAsVoidMethod, out inferredReturnType, out returnExpressions, out returnValues); visitor.resolver.PopBlock(); Log.Unindent(); Log.WriteLine("Finished analyzing " + ToString()); @@ -2048,7 +2061,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver public Conversion IsValid(IType returnType, Conversions conversions) { - if (success && IsValidLambda(isValidAsVoidMethod, returnValues, returnType, conversions)) { + if (success && IsValidLambda(isValidAsVoidMethod, lambda.IsAsync, returnValues, returnType, conversions)) { return Conversion.AnonymousFunctionConversion(new AnonymousFunctionConversionData(returnType, this)); } else { return Conversion.None; @@ -2069,6 +2082,9 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver lambda.winningHypothesis = this; + Log.WriteLine("Applying return type {0} to implicitly-typed lambda {1}", returnType, lambda.LambdaExpression); + if (lambda.IsAsync) + returnType = parentVisitor.UnpackTask(returnType); for (int i = 0; i < returnExpressions.Count; i++) { visitor.ProcessConversion(returnExpressions[i], returnValues[i], returnType); } @@ -2159,7 +2175,21 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver #endregion #region AnalyzeLambda - void AnalyzeLambda(AstNode body, out bool success, out bool isValidAsVoidMethod, out IType inferredReturnType, out IList returnExpressions, out IList returnValues) + IType GetTaskType(IType resultType) + { + if (resultType.Kind == TypeKind.Unknown) + return SharedTypes.UnknownType; + if (resultType.Kind == TypeKind.Void) + return resolver.Context.GetTypeDefinition("System.Threading.Tasks", "Task", 0, StringComparer.Ordinal) ?? SharedTypes.UnknownType; + + ITypeDefinition def = resolver.Context.GetTypeDefinition("System.Threading.Tasks", "Task", 1, StringComparer.Ordinal); + if (def != null) + return new ParameterizedType(def, new[] { resultType }); + else + return SharedTypes.UnknownType; + } + + void AnalyzeLambda(AstNode body, bool isAsync, out bool success, out bool isValidAsVoidMethod, out IType inferredReturnType, out IList returnExpressions, out IList returnValues) { Expression expr = body as Expression; if (expr != null) { @@ -2190,6 +2220,8 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver // so we can ignore the 'tiSuccess' value } } + if (isAsync) + inferredReturnType = GetTaskType(inferredReturnType); Log.WriteLine("Lambda return type was inferred to: " + inferredReturnType); // TODO: check for compiler errors within the lambda body @@ -2216,13 +2248,26 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver || expr is AssignmentExpression; } - static bool IsValidLambda(bool isValidAsVoidMethod, IList returnValues, IType returnType, Conversions conversions) + static bool IsValidLambda(bool isValidAsVoidMethod, bool isAsync, IList returnValues, IType returnType, Conversions conversions) { if (returnType.Kind == TypeKind.Void) { + // Lambdas that are valid statement lambdas or expression lambdas with a statement-expression + // can be converted to delegates with void return type. + // This holds for both async and regular lambdas. + return isValidAsVoidMethod; + } else if (isAsync && IsTask(returnType) && returnType.TypeParameterCount == 0) { + // Additionally, async lambdas with the above property can be converted to non-generic Task. return isValidAsVoidMethod; } else { if (returnValues.Count == 0) return false; + if (isAsync) { + // async lambdas must return Task + if (!(IsTask(returnType) && returnType.TypeParameterCount == 1)) + return false; + // unpack Task for testing the implicit conversions + returnType = ((ParameterizedType)returnType).GetTypeArgument(0); + } foreach (ResolveResult returnRR in returnValues) { if (!conversions.ImplicitConversion(returnRR, returnType)) return false; @@ -2231,6 +2276,34 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver } } + /// + /// Gets the T in Task<T>. + /// Returns void for non-generic Task. + /// + IType UnpackTask(IType type) + { + if (!IsTask(type)) + return type; + if (type.TypeParameterCount == 0) + return KnownTypeReference.Void.Resolve(resolver.Context); + else + return ((ParameterizedType)type).GetTypeArgument(0); + } + + /// + /// Gets whether the specified type is Task or Task<T>. + /// + static bool IsTask(IType type) + { + if (type.Kind == TypeKind.Class && type.Name == "Task" && type.Namespace == "System.Threading.Tasks") { + if (type.TypeParameterCount == 0) + return true; + if (type.TypeParameterCount == 1) + return type is ParameterizedType; + } + return false; + } + sealed class AnalyzeLambdaVisitor : DepthFirstAstVisitor { public bool HasVoidReturnStatements; @@ -2459,7 +2532,13 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver ResolveResult IAstVisitor.VisitReturnStatement(ReturnStatement returnStatement, object data) { if (resolverEnabled && !resolver.IsWithinLambdaExpression && resolver.CurrentMember != null) { - ResolveAndProcessConversion(returnStatement.Expression, resolver.CurrentMember.ReturnType.Resolve(resolver.Context)); + IType type = resolver.CurrentMember.ReturnType.Resolve(resolver.Context); + if (IsTask(type)) { + var methodDecl = returnStatement.Ancestors.OfType().FirstOrDefault(); + if (methodDecl != null && (methodDecl.Modifiers & Modifiers.Async) == Modifiers.Async) + type = UnpackTask(type); + } + ResolveAndProcessConversion(returnStatement.Expression, type); } else { Scan(returnStatement.Expression); } @@ -2830,6 +2909,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver } } + public override bool IsAsync { + get { return false; } + } + public override bool IsImplicitlyTyped { get { return true; } } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs index c3367a5094..75620bf376 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/OverloadResolutionTests.cs @@ -236,6 +236,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver get { return true; } } + public override bool IsAsync { + get { return false; } + } + public override IType GetInferredReturnType(IType[] parameterTypes) { return inferredReturnType; diff --git a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs index 7afb04d737..12bdcdfe2c 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/Resolver/TypeInferenceTests.cs @@ -175,6 +175,10 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver get { return true; } } + public override bool IsAsync { + get { return false; } + } + public override IType GetInferredReturnType(IType[] parameterTypes) { Assert.AreEqual(expectedParameterTypes, parameterTypes, "Parameters types passed to " + this); From 9f988f6cb8200b408df59e4cf8012a80f722813c Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 17 Sep 2011 15:53:39 +0200 Subject: [PATCH 90/92] Adjust ILSpy to NRefactory changes. --- .../Visitors/CSharpToVBConverterVisitor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs index 1f873e9812..c515e28110 100644 --- a/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs +++ b/ICSharpCode.NRefactory.VB/Visitors/CSharpToVBConverterVisitor.cs @@ -15,7 +15,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors { string RootNamespace { get; } string GetTypeNameForAttribute(CSharp.Attribute attribute); - ClassType GetClassTypeForAstType(CSharp.AstType type); + TypeKind GetTypeKindForAstType(CSharp.AstType type); TypeCode ResolveExpression(CSharp.Expression expression); bool? IsReferenceType(CSharp.Expression expression); ITypeResolveContext ResolveContext { get; } @@ -881,7 +881,7 @@ namespace ICSharpCode.NRefactory.VB.Visitors if (typeDeclaration.BaseTypes.Any()) { var first = typeDeclaration.BaseTypes.First(); - if (provider.GetClassTypeForAstType(first) != ClassType.Interface) { + if (provider.GetTypeKindForAstType(first) != TypeKind.Interface) { ConvertNodes(typeDeclaration.BaseTypes.Skip(1), type.ImplementsTypes); type.InheritsType = (AstType)first.AcceptVisitor(this, data); } else From f0bfded6cb7c7efc9046527e589a45c346c1222a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 17 Sep 2011 16:18:38 +0200 Subject: [PATCH 91/92] C# AST: when setting a string property to null or an empty string, remove the corresponding identifier token. --- ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs b/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs index 0938d9f0c3..3c692706d1 100644 --- a/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs +++ b/ICSharpCode.NRefactory.CSharp/Ast/Identifier.cs @@ -113,17 +113,18 @@ namespace ICSharpCode.NRefactory.CSharp public static Identifier Create (string name, TextLocation location) { - if (name == null) - throw new ArgumentNullException("name"); - if (name.Length > 0 && name[0] == '@') + if (string.IsNullOrEmpty(name)) + return Identifier.Null; + if (name[0] == '@') return new VerbatimIdentifier(name.Substring (1), location); - return new Identifier (name, location); + else + return new Identifier (name, location); } public static Identifier Create (string name, TextLocation location, bool isVerbatim) { - if (name == null) - throw new ArgumentNullException("name"); + if (string.IsNullOrEmpty(name)) + return Identifier.Null; if (isVerbatim) return new VerbatimIdentifier(name, location); From b059dbcf413786069599d1686ac608150bd3f357 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 19 Sep 2011 13:28:44 +0200 Subject: [PATCH 92/92] Fixed NullReferenceException when resolving group join clause. --- ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs index 2bfed60137..39ca25c072 100644 --- a/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs @@ -1986,7 +1986,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver } public override bool IsAsync { - get { return lambda.IsAsync; } + get { return lambda != null && lambda.IsAsync; } } public override string ToString()