diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/CompletionDataHelper.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/CompletionDataHelper.cs index 4cef76ed6a..4be1415089 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/CompletionDataHelper.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/CompletionDataHelper.cs @@ -21,9 +21,9 @@ namespace ICSharpCode.VBNetBinding { public static class CompletionDataHelper { - public static ICompletionItemList GenerateCompletionData(this ExpressionResult expressionResult, ITextEditor editor) + public static ICompletionItemList GenerateCompletionData(this ExpressionResult expressionResult, ITextEditor editor, char pressedKey) { - var result = new NRefactoryCompletionItemList(); + DefaultCompletionItemList result = new NRefactoryCompletionItemList(); IResolver resolver = ParserService.CreateResolver(editor.FileName); ParseInformation info = ParserService.GetParseInformation(editor.FileName); @@ -33,12 +33,12 @@ namespace ICSharpCode.VBNetBinding List data = new List(); - if (string.IsNullOrEmpty(expressionResult.Expression)) { - data = new NRefactoryResolver(LanguageProperties.VBNet) - .CtrlSpace(editor.Caret.Line, editor.Caret.Column, info, editor.Document.Text, expressionResult.Context, result.ContainsItemsFromAllNamespaces); - } else { - if (expressionResult.Context != ExpressionContext.Global && expressionResult.Context != ExpressionContext.TypeDeclaration) { - if (expressionResult.Context == ExpressionContext.Importable && expressionResult.Expression == "Imports") { + if (expressionResult.Context != ExpressionContext.Global && expressionResult.Context != ExpressionContext.TypeDeclaration) { + if (string.IsNullOrEmpty(expressionResult.Expression) || IdentifierExpected(expressionResult.Tag)) { + data = new NRefactoryResolver(LanguageProperties.VBNet) + .CtrlSpace(editor.Caret.Line, editor.Caret.Column, info, editor.Document.Text, expressionResult.Context, ((NRefactoryCompletionItemList)result).ContainsItemsFromAllNamespaces); + } else { + if (expressionResult.Context == ExpressionContext.Importable && expressionResult.Expression.Equals("Imports", StringComparison.OrdinalIgnoreCase)) { expressionResult.Expression = "Global"; } @@ -47,14 +47,33 @@ namespace ICSharpCode.VBNetBinding if (rr == null) return result; - data = rr.GetCompletionData(info.CompilationUnit.ProjectContent, result.ContainsItemsFromAllNamespaces); + data = rr.GetCompletionData(info.CompilationUnit.ProjectContent, ((NRefactoryCompletionItemList)result).ContainsItemsFromAllNamespaces); } } - if (expressionResult.Tag != null && (expressionResult.Context != ExpressionContext.Importable)) + + bool addedKeywords = false; + + if (expressionResult.Tag != null && (expressionResult.Context != ExpressionContext.Importable) && pressedKey != '.') { AddVBNetKeywords(data, (BitArray)expressionResult.Tag); + if (((BitArray)expressionResult.Tag)[Tokens.New]) + data.Add(new KeywordEntry("New")); + addedKeywords = true; + } - return CodeCompletionItemProvider.ConvertCompletionData(result, data, expressionResult.Context); + result = CodeCompletionItemProvider.ConvertCompletionData(result, data, expressionResult.Context); + + if (addedKeywords) + AddTemplates(editor, result); + + return result; + } + + static bool IdentifierExpected(object tag) + { + if (tag is BitArray) + return (tag as BitArray)[2]; + return false; } static void AddVBNetKeywords(List ar, BitArray keywords) @@ -65,5 +84,15 @@ namespace ICSharpCode.VBNetBinding } } } + + static void AddTemplates(ITextEditor editor, DefaultCompletionItemList list) + { + if (list == null) + return; + List snippets = editor.GetSnippets().ToList(); + list.Items.RemoveAll(item => item.Image == ClassBrowserIconService.Keyword && snippets.Exists(i => i.Text == item.Text)); + list.Items.AddRange(snippets); + list.SortItems(); + } } } diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetCompletionBinding.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetCompletionBinding.cs index fea5e30c2f..34fd62d485 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetCompletionBinding.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetCompletionBinding.cs @@ -61,17 +61,18 @@ namespace ICSharpCode.VBNetBinding break; case '"': case '\n': + case ')': break; case '.': result = ef.FindExpression(editor.Document.Text, editor.Caret.Offset); LoggingService.Debug("CC: After dot, result=" + result + ", context=" + result.Context); - editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor)); + editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor, ch)); return CodeCompletionKeyPressResult.Completed; case ' ': result = ef.FindExpression(editor.Document.Text, editor.Caret.Offset); - if (HasKeywordsOnly(result.Tag as BitArray) || result.Context == ExpressionContext.Importable) { + if (HasKeywordsOnly(result.Tag as BitArray) || result.Context == ExpressionContext.Importable || result.Context == ExpressionContext.Type || result.Context == ExpressionContext.ObjectCreation) { LoggingService.Debug("CC: After space, result=" + result + ", context=" + result.Context); - editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor)); + editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor, ch)); return CodeCompletionKeyPressResult.Completed; } break; @@ -90,7 +91,7 @@ namespace ICSharpCode.VBNetBinding if ((result.Context != ExpressionContext.IdentifierExpected) && (!char.IsLetterOrDigit(prevChar) && prevChar != '.')) { LoggingService.Debug("CC: Beginning to type a word, result=" + result + ", context=" + result.Context); - editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor)); + editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor, ch)); return CodeCompletionKeyPressResult.CompletedIncludeKeyInCompletion; } } @@ -182,7 +183,7 @@ namespace ICSharpCode.VBNetBinding ExpressionResult result = ef.FindExpression(editor.Document.Text, cursor); LoggingService.Debug("CC: Beginning to type a word, result=" + result + ", context=" + result.Context); if (result.Context != ExpressionContext.IdentifierExpected) { - editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor)); + editor.ShowCompletionWindow(CompletionDataHelper.GenerateCompletionData(result, editor, ' ')); return true; } } diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Block.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Block.cs index f9be6175f6..00b338392c 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Block.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Block.cs @@ -16,6 +16,8 @@ namespace ICSharpCode.NRefactory.Parser.VB { Global, TypeDeclaration, + ObjectCreation, + Type, Member, IdentifierExpected, Body, diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg index 2f6d9b6f00..5dd304983e 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg @@ -322,7 +322,7 @@ TypeDeclaration = ClassOrModuleOrStructureTypeDeclaration = ( "Module" | "Class" | "Structure" ) (. PushContext(Context.IdentifierExpected, la, t); .) ANY (. PopContext(); .) - [ "(" "Of" [ "Out" | "In" ] IdentifierExceptOut [ "As" GenericConstraintList ] { "," [ "Out" | "In" ] IdentifierExceptOut [ "As" GenericConstraintList ] } ")" ] { ANY } [ StatementTerminator ] + [ "(" "Of" [ "Out" | "In" ] IdentifierExceptOut [ (. PushContext(Context.Type, la, t); .) "As" GenericConstraintList (. PopContext(); .) ] { "," [ "Out" | "In" ] IdentifierExceptOut [ (. PushContext(Context.Type, la, t); .) "As" GenericConstraintList (. PopContext(); .) ] } ")" ] { ANY } [ StatementTerminator ] [ "Inherits" { ANY } StatementTerminator ] [ "Implements" { ANY } StatementTerminator ] (. PushContext(Context.TypeDeclaration, la, t); .) @@ -342,7 +342,7 @@ GenericConstraintList = DelegateTypeDeclaration = "Delegate" ("Sub" | "Function") (. PushContext(Context.IdentifierExpected, la, t); .) ANY (. PopContext(); .) - [ "(" [ ParameterList ] ")" ] [ "As" TypeName ] StatementTerminator + [ "(" [ ParameterList ] ")" ] [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] StatementTerminator . MemberDeclaration = @@ -362,18 +362,18 @@ MemberDeclaration = SubOrFunctionDeclaration = ("Sub" | "Function") (. PushContext(Context.IdentifierExpected, la, t); .) ANY (. PopContext(); .) - [ "(" [ ParameterList ] ")" ] [ "As" TypeName ] + [ "(" [ ParameterList ] ")" ] [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] StatementTerminatorAndBlock "End" ("Sub" | "Function") StatementTerminator . ExternalMemberDeclaration = "Declare" [ "Ansi" | "Unicode" | "Auto" ] ( "Sub" | "Function" ) (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) - "Lib" LiteralString [ "Alias" LiteralString ] [ "(" [ ParameterList ] ")" ] [ "As" TypeName ] StatementTerminator + "Lib" LiteralString [ "Alias" LiteralString ] [ "(" [ ParameterList ] ")" ] [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] StatementTerminator . EventMemberDeclaration = - "Event" (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) ( "As" TypeName | [ "(" [ ParameterList ] ")" ] ) + "Event" (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) ( (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) | [ "(" [ ParameterList ] ")" ] ) [ "Implements" TypeName /*"." IdentifierOrKeyword*/ { "," TypeName /*"." IdentifierOrKeyword*/ } ] /* the TypeName production already allows the "." IdentifierOrKeyword syntax, so to avoid an ambiguous grammer we just leave that out */ StatementTerminator @@ -390,14 +390,14 @@ CustomEventMemberDeclaration = . OperatorDeclaration = - "Operator" (. PushContext(Context.IdentifierExpected, la, t); .) ANY (. PopContext(); .) "(" ParameterList ")" [ "As" { AttributeBlock } TypeName ] + "Operator" (. PushContext(Context.IdentifierExpected, la, t); .) ANY (. PopContext(); .) "(" ParameterList ")" [ "As" { AttributeBlock } (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) ] StatementTerminatorAndBlock "End" "Operator" StatementTerminator . MemberVariableOrConstantDeclaration = [ "Const" ] - (. PushContext(Context.IdentifierExpected, la, t); .) IdentifierForFieldDeclaration (. PopContext(); .) [ "As" TypeName ] [ "=" Expression ] StatementTerminator + (. PushContext(Context.IdentifierExpected, la, t); .) IdentifierForFieldDeclaration (. PopContext(); .) [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] [ "=" Expression ] StatementTerminator . ParameterList = @@ -405,7 +405,7 @@ ParameterList = . Parameter = - { AttributeBlock } { ParameterModifier } (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ "As" TypeName ] [ "=" Expression ] + { AttributeBlock } { ParameterModifier } (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] [ "=" Expression ] . StatementTerminatorAndBlock = @@ -482,7 +482,7 @@ SimpleExpression = . NewExpression = - "New" + (. PushContext(Context.ObjectCreation, la, t); .) "New" ( TypeName @@ -509,6 +509,7 @@ NewExpression = | "With" ObjectInitializer ) + (. PopContext(); .) . ObjectInitializer = @@ -566,7 +567,7 @@ SubLambdaExpression = FunctionLambdaExpression = "Function" "(" [ ParameterList ] ")" - ( GREEDY Expression | [ "As" TypeName ] StatementTerminatorAndBlock "End" "Function" ) + ( GREEDY Expression | [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] StatementTerminatorAndBlock "End" "Function" ) . QueryExpression @@ -653,7 +654,7 @@ ExpressionRangeVariable = ( (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) ( - "As" TypeName "=" + (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) "=" | "=" | (. currentState = endOfStatementTerminatorAndBlock; /* leave this block */ @@ -670,7 +671,7 @@ ExpressionRangeVariable = . CollectionRangeVariable = - (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ "As" TypeName ] "In" Expression + (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] "In" Expression . /* semantic action will be inserted on all paths that possibly lead to XmlLiteral */ @@ -938,7 +939,21 @@ Statement = VariableDeclarationStatement = ( "Dim" | "Static" | "Const" ) (. PushContext(Context.IdentifierExpected, la, t); .) - Identifier (. PopContext(); .) [ "?" ] [ ( "(" { "," } ")" ) ] { "," (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ "?" ] [ ( "(" { "," } ")" ) ] } [ "As" [ "New" ] TypeName ] [ "=" Expression ] + Identifier (. PopContext(); .) [ "?" ] [ ( "(" { "," } ")" ) ] + { "," + (. PushContext(Context.IdentifierExpected, la, t); .) + Identifier (. PopContext(); .) [ "?" ] [ ( "(" { "," } ")" ) ] + } + [ (. PushContext(Context.Type, la, t); .) + "As" TypeName + [ "New" (. PushContext(Context.ObjectCreation, la, t); .) ] + TypeName + (. + if (CurrentBlock.context == Context.ObjectCreation) + PopContext(); + PopContext(); + .) ] + [ "=" Expression ] . WithOrLockStatement = @@ -1027,7 +1042,7 @@ ForEachLoopStatement = . ForLoopVariable = - (. PushContext(Context.IdentifierExpected, la, t); .) SimpleExpression (. PopContext(); .) [ "?" ] { ExpressionSuffix } [ "As" TypeName ] + (. PushContext(Context.IdentifierExpected, la, t); .) SimpleExpression (. PopContext(); .) [ "?" ] { ExpressionSuffix } [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] . ErrorHandlingStatement = @@ -1044,7 +1059,7 @@ TryStatement = StatementTerminatorAndBlock { "Catch" - [ (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ "As" TypeName ] ] + [ (. PushContext(Context.IdentifierExpected, la, t); .) Identifier (. PopContext(); .) [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] ] [ "When" Expression ] StatementTerminatorAndBlock } diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs index 68b64aab0f..286e7b564c 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs @@ -32,7 +32,7 @@ namespace ICSharpCode.NRefactory.Parser.VB void PushContext(Context context, Token la, Token t) { string indent = new string('\t', stack.Count); - Location l = la == null ? Location.Empty : la.Location; + Location l = la == null ? (t == null ? Location.Empty : t.EndLocation) : la.Location; stack.Push(new Block() { context = context, lastExpressionStart = l }); Print(indent + "enter " + context); diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs index 1507aa0446..2d41d3086d 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs @@ -389,6 +389,7 @@ namespace ICSharpCode.NRefactory.Parser.VB prevToken = t; } ef.Advance(); + Debug.Assert(t != null); return t; } diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs index dd0574ee62..fa03f21759 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs @@ -14,8 +14,8 @@ namespace ICSharpCode.NRefactory.Parser.VB { partial class ExpressionFinder { - const int startOfExpression = 35; - const int endOfStatementTerminatorAndBlock = 204; + const int startOfExpression = 37; + const int endOfStatementTerminatorAndBlock = 213; static BitArray GetExpectedSet(int state) { switch (state) { @@ -30,8 +30,9 @@ partial class ExpressionFinder { case 5: return set[3]; case 6: - case 205: - case 451: + case 51: + case 214: + case 483: { BitArray a = new BitArray(239); return a; @@ -41,10 +42,10 @@ partial class ExpressionFinder { case 8: return set[5]; case 9: - case 191: - case 435: - case 442: - case 450: + case 200: + case 460: + case 474: + case 482: { BitArray a = new BitArray(239); a.Set(127, true); @@ -53,36 +54,38 @@ partial class ExpressionFinder { } case 10: case 11: - case 102: - case 157: - case 158: - case 206: - case 344: - case 345: - case 359: - case 360: - case 361: - case 384: - case 385: - case 386: - case 387: - case 400: - case 401: - case 443: - case 444: - case 463: - case 464: + case 107: + case 164: + case 165: + case 215: + case 366: + case 367: + case 381: + case 382: + case 383: + case 406: + case 407: + case 408: + case 409: + case 422: + case 423: + case 475: case 476: - case 477: + case 499: + case 500: + case 520: + case 521: return set[6]; case 12: case 13: - case 445: - case 446: + case 466: + case 477: + case 478: return set[7]; case 14: - case 406: - case 447: + case 428: + case 467: + case 479: { BitArray a = new BitArray(239); a.Set(1, true); @@ -92,28 +95,33 @@ partial class ExpressionFinder { } case 15: case 16: - case 197: - case 200: - case 201: - case 211: - case 225: - case 229: - case 247: - case 260: - case 271: + case 20: + case 206: + case 209: + case 210: + case 220: + case 234: + case 238: + case 258: case 274: - case 280: case 285: + case 288: case 294: - case 295: + case 299: case 308: - case 316: - case 394: - case 407: - case 419: - case 422: - case 448: - case 483: + case 309: + case 322: + case 330: + case 354: + case 416: + case 429: + case 433: + case 442: + case 445: + case 470: + case 480: + case 486: + case 527: { BitArray a = new BitArray(239); a.Set(1, true); @@ -121,603 +129,633 @@ partial class ExpressionFinder { return a; } case 17: - case 305: + case 319: { BitArray a = new BitArray(239); a.Set(1, true); return a; } case 18: + case 151: + case 168: + case 244: + case 268: + case 339: + case 352: + case 362: + case 455: + case 468: + case 484: + case 495: + case 509: + case 517: + { + BitArray a = new BitArray(239); + a.Set(63, true); + return a; + } case 19: - case 106: - case 115: - case 131: - case 146: - case 161: - case 235: - case 326: - case 334: + case 21: + case 111: + case 120: + case 136: + case 152: + case 169: + case 245: + case 269: + case 340: case 342: - case 370: - case 428: - case 432: - case 452: - case 461: - case 489: + case 344: + case 353: + case 363: + case 392: + case 451: + case 456: + case 469: + case 485: + case 496: + case 533: return set[8]; - case 20: - case 23: + case 22: + case 25: return set[9]; - case 21: + case 23: return set[10]; - case 22: - case 52: - case 56: - case 111: - case 311: - case 373: - return set[11]; case 24: - case 121: - case 128: - case 132: - case 192: - case 348: - case 366: - case 369: - case 402: - case 403: - case 416: + case 57: + case 61: + case 116: + case 325: + case 395: + return set[11]; + case 26: + case 126: + case 133: + case 137: + case 201: + case 370: + case 388: + case 391: + case 424: + case 425: + case 439: { BitArray a = new BitArray(239); a.Set(37, true); return a; } - case 25: - case 26: - case 113: - case 114: - return set[12]; case 27: - case 194: - case 332: + case 28: + case 118: + case 119: + return set[12]; + case 29: + case 203: case 350: - case 368: - case 383: + case 372: + case 390: case 405: - case 418: - case 431: + case 427: + case 441: case 454: + case 472: + case 488: { BitArray a = new BitArray(239); a.Set(38, true); return a; } - case 28: - case 29: - case 32: - case 33: - case 378: - case 379: - return set[13]; case 30: - return set[14]; case 31: - case 123: - case 130: - case 314: + case 34: + case 35: + case 400: + case 401: + return set[13]; + case 32: + return set[14]; + case 33: + case 128: + case 135: + case 328: { BitArray a = new BitArray(239); a.Set(22, true); return a; } - case 34: - case 116: - case 125: - case 331: - case 333: - case 336: - case 377: - case 381: - case 469: + case 36: + case 121: + case 130: + case 349: + case 351: + case 356: + case 399: + case 403: + case 505: + case 511: + case 519: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(38, true); return a; } - case 35: - case 36: + case 37: case 38: - case 39: case 40: - case 43: - case 54: - case 104: - case 122: - case 124: - case 126: + case 41: + case 42: + case 45: + case 59: + case 109: + case 127: case 129: - case 138: - case 140: - case 178: - case 210: - case 214: - case 216: - case 217: - case 232: - case 246: - case 251: - case 258: - case 264: - case 266: - case 270: - case 273: - case 279: - case 290: - case 292: - case 298: - case 313: - case 315: - case 363: - case 375: - case 376: - case 460: + case 131: + case 134: + case 143: + case 145: + case 187: + case 219: + case 223: + case 225: + case 226: + case 241: + case 257: + case 262: + case 272: + case 278: + case 280: + case 284: + case 287: + case 293: + case 304: + case 306: + case 312: + case 327: + case 329: + case 385: + case 397: + case 398: + case 494: return set[15]; - case 37: - case 41: + case 39: + case 43: + case 52: return set[16]; - case 42: - case 49: + case 44: + case 53: + case 54: { BitArray a = new BitArray(239); a.Set(35, true); return a; } - case 44: - case 55: - case 473: + case 46: + case 60: + case 514: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(36, true); return a; } - case 45: + case 47: { BitArray a = new BitArray(239); a.Set(36, true); return a; } - case 46: - case 76: + case 48: + case 81: { BitArray a = new BitArray(239); a.Set(162, true); return a; } - case 47: + case 49: return set[17]; - case 48: - case 57: + case 50: + case 62: { BitArray a = new BitArray(239); a.Set(233, true); return a; } - case 50: + case 55: { BitArray a = new BitArray(239); a.Set(26, true); a.Set(147, true); return a; } - case 51: + case 56: { BitArray a = new BitArray(239); a.Set(26, true); return a; } - case 53: - case 160: - case 162: - case 257: - case 485: + case 58: + case 167: + case 170: + case 171: + case 271: + case 529: { BitArray a = new BitArray(239); a.Set(20, true); return a; } - case 58: - case 276: + case 63: + case 290: { BitArray a = new BitArray(239); a.Set(231, true); return a; } - case 59: + case 64: { BitArray a = new BitArray(239); a.Set(230, true); return a; } - case 60: + case 65: { BitArray a = new BitArray(239); a.Set(224, true); return a; } - case 61: + case 66: { BitArray a = new BitArray(239); a.Set(223, true); return a; } - case 62: - case 228: + case 67: + case 237: { BitArray a = new BitArray(239); a.Set(218, true); return a; } - case 63: + case 68: { BitArray a = new BitArray(239); a.Set(213, true); return a; } - case 64: + case 69: { BitArray a = new BitArray(239); a.Set(212, true); return a; } - case 65: + case 70: { BitArray a = new BitArray(239); a.Set(211, true); return a; } - case 66: - case 354: + case 71: + case 376: { BitArray a = new BitArray(239); a.Set(210, true); return a; } - case 67: + case 72: { BitArray a = new BitArray(239); a.Set(209, true); return a; } - case 68: + case 73: { BitArray a = new BitArray(239); a.Set(206, true); return a; } - case 69: + case 74: { BitArray a = new BitArray(239); a.Set(203, true); return a; } - case 70: - case 282: + case 75: + case 296: { BitArray a = new BitArray(239); a.Set(197, true); return a; } - case 71: + case 76: { BitArray a = new BitArray(239); a.Set(186, true); return a; } - case 72: + case 77: { BitArray a = new BitArray(239); a.Set(184, true); return a; } - case 73: + case 78: { BitArray a = new BitArray(239); a.Set(176, true); return a; } - case 74: + case 79: { BitArray a = new BitArray(239); a.Set(170, true); return a; } - case 75: - case 241: - case 248: - case 261: + case 80: + case 252: + case 259: + case 275: { BitArray a = new BitArray(239); a.Set(163, true); return a; } - case 77: + case 82: { BitArray a = new BitArray(239); a.Set(147, true); return a; } - case 78: - case 165: - case 170: - case 172: + case 83: + case 174: + case 179: + case 181: { BitArray a = new BitArray(239); a.Set(146, true); return a; } - case 79: - case 167: - case 171: + case 84: + case 176: + case 180: { BitArray a = new BitArray(239); a.Set(143, true); return a; } - case 80: + case 85: { BitArray a = new BitArray(239); a.Set(139, true); return a; } - case 81: + case 86: { BitArray a = new BitArray(239); a.Set(133, true); return a; } - case 82: - case 199: + case 87: + case 208: { BitArray a = new BitArray(239); a.Set(127, true); return a; } - case 83: - case 190: + case 88: + case 199: { BitArray a = new BitArray(239); a.Set(126, true); return a; } - case 84: + case 89: { BitArray a = new BitArray(239); a.Set(124, true); return a; } - case 85: + case 90: { BitArray a = new BitArray(239); a.Set(121, true); return a; } - case 86: - case 139: + case 91: + case 144: { BitArray a = new BitArray(239); a.Set(116, true); return a; } - case 87: + case 92: { BitArray a = new BitArray(239); a.Set(108, true); return a; } - case 88: + case 93: { BitArray a = new BitArray(239); a.Set(107, true); return a; } - case 89: + case 94: { BitArray a = new BitArray(239); a.Set(104, true); return a; } - case 90: - case 411: + case 95: + case 434: { BitArray a = new BitArray(239); a.Set(98, true); return a; } - case 91: + case 96: { BitArray a = new BitArray(239); a.Set(87, true); return a; } - case 92: + case 97: { BitArray a = new BitArray(239); a.Set(84, true); return a; } - case 93: - case 150: - case 177: + case 98: + case 157: + case 186: { BitArray a = new BitArray(239); a.Set(70, true); return a; } - case 94: + case 99: { BitArray a = new BitArray(239); a.Set(67, true); return a; } - case 95: + case 100: { BitArray a = new BitArray(239); a.Set(66, true); return a; } - case 96: + case 101: { BitArray a = new BitArray(239); a.Set(65, true); return a; } - case 97: + case 102: { BitArray a = new BitArray(239); a.Set(64, true); return a; } - case 98: + case 103: { BitArray a = new BitArray(239); a.Set(62, true); return a; } - case 99: - case 189: + case 104: + case 198: { BitArray a = new BitArray(239); a.Set(58, true); return a; } - case 100: + case 105: { BitArray a = new BitArray(239); a.Set(2, true); return a; } - case 101: + case 106: return set[18]; - case 103: + case 108: return set[19]; - case 105: + case 110: { BitArray a = new BitArray(239); a.Set(144, true); return a; } - case 107: + case 112: return set[20]; - case 108: + case 113: return set[21]; - case 109: - case 110: - case 371: - case 372: + case 114: + case 115: + case 393: + case 394: return set[22]; - case 112: - return set[23]; case 117: - case 118: - case 244: - case 253: + return set[23]; + case 122: + case 123: + case 255: + case 264: return set[24]; - case 119: + case 124: return set[25]; - case 120: - case 297: + case 125: + case 311: { BitArray a = new BitArray(239); a.Set(135, true); return a; } - case 127: + case 132: return set[26]; - case 133: + case 138: { BitArray a = new BitArray(239); a.Set(58, true); a.Set(126, true); return a; } - case 134: - case 135: + case 139: + case 140: return set[27]; - case 136: - case 142: + case 141: case 147: - case 183: - case 187: - case 224: - case 319: - case 327: - case 367: - case 424: - case 436: - case 484: + case 154: + case 192: + case 196: + case 233: + case 333: + case 345: + case 389: + case 447: + case 461: + case 528: return set[28]; - case 137: + case 142: { BitArray a = new BitArray(239); a.Set(171, true); return a; } - case 141: - case 154: - case 169: - case 174: - case 180: - case 182: - case 186: - case 188: + case 146: + case 161: + case 178: + case 183: + case 189: + case 191: + case 195: + case 197: return set[29]; - case 143: - case 144: + case 148: + case 149: { BitArray a = new BitArray(239); a.Set(63, true); a.Set(138, true); return a; } - case 145: - case 245: + case 150: + case 153: + case 256: { BitArray a = new BitArray(239); a.Set(138, true); return a; } - case 148: - case 149: - case 151: - case 153: case 155: case 156: + case 158: + case 160: + case 162: case 163: - case 168: - case 173: - case 181: - case 185: + case 172: + case 177: + case 182: + case 190: + case 194: return set[30]; - case 152: + case 159: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(143, true); return a; } - case 159: + case 166: return set[31]; - case 164: + case 173: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(70, true); return a; } - case 166: + case 175: { BitArray a = new BitArray(239); a.Set(133, true); @@ -725,70 +763,71 @@ partial class ExpressionFinder { a.Set(146, true); return a; } - case 175: - case 176: + case 184: + case 185: return set[32]; - case 179: + case 188: { BitArray a = new BitArray(239); a.Set(64, true); a.Set(104, true); return a; } - case 184: - return set[33]; case 193: - case 349: - case 382: - case 430: + return set[33]; + case 202: + case 371: + case 404: case 453: + case 471: + case 487: return set[34]; - case 195: - case 196: + case 204: + case 205: return set[35]; - case 198: - case 212: - case 227: - case 275: - case 317: - case 353: - case 408: - case 420: - case 449: + case 207: + case 221: + case 236: + case 289: + case 331: + case 375: + case 430: + case 443: + case 481: { BitArray a = new BitArray(239); a.Set(113, true); return a; } - case 202: - case 203: + case 211: + case 212: return set[36]; - case 204: + case 213: return set[37]; - case 207: + case 216: return set[38]; - case 208: - case 209: - case 303: + case 217: + case 218: + case 317: return set[39]; - case 213: + case 222: { BitArray a = new BitArray(239); a.Set(226, true); return a; } - case 215: - case 252: - case 265: - return set[40]; - case 218: - case 219: - case 249: - case 250: - case 262: + case 224: case 263: + case 279: + return set[40]; + case 227: + case 228: + case 260: + case 261: + case 276: + case 277: return set[41]; - case 220: + case 229: { BitArray a = new BitArray(239); a.Set(108, true); @@ -796,18 +835,18 @@ partial class ExpressionFinder { a.Set(231, true); return a; } - case 221: + case 230: return set[42]; - case 222: - case 237: + case 231: + case 248: return set[43]; - case 223: + case 232: { BitArray a = new BitArray(239); a.Set(5, true); return a; } - case 226: + case 235: { BitArray a = new BitArray(239); a.Set(75, true); @@ -815,9 +854,10 @@ partial class ExpressionFinder { a.Set(123, true); return a; } - case 230: + case 239: return set[44]; - case 231: + case 240: + case 246: { BitArray a = new BitArray(239); a.Set(1, true); @@ -825,29 +865,36 @@ partial class ExpressionFinder { a.Set(229, true); return a; } - case 233: - case 234: + case 242: + case 243: return set[45]; - case 236: + case 247: return set[46]; - case 238: + case 249: { BitArray a = new BitArray(239); a.Set(118, true); return a; } - case 239: - case 240: + case 250: + case 251: return set[47]; - case 242: - case 243: - return set[48]; + case 253: case 254: - case 255: + return set[48]; + case 265: + case 266: return set[49]; - case 256: + case 267: return set[50]; - case 259: + case 270: + { + BitArray a = new BitArray(239); + a.Set(20, true); + a.Set(138, true); + return a; + } + case 273: { BitArray a = new BitArray(239); a.Set(1, true); @@ -855,35 +902,35 @@ partial class ExpressionFinder { a.Set(205, true); return a; } - case 267: + case 281: return set[51]; - case 268: - case 272: + case 282: + case 286: { BitArray a = new BitArray(239); a.Set(152, true); return a; } - case 269: + case 283: return set[52]; - case 277: - case 278: + case 291: + case 292: return set[53]; - case 281: + case 295: { BitArray a = new BitArray(239); a.Set(74, true); a.Set(113, true); return a; } - case 283: - case 284: + case 297: + case 298: return set[54]; - case 286: - case 287: + case 300: + case 301: return set[55]; - case 288: - case 429: + case 302: + case 452: { BitArray a = new BitArray(239); a.Set(1, true); @@ -891,11 +938,11 @@ partial class ExpressionFinder { a.Set(22, true); return a; } - case 289: - case 291: + case 303: + case 305: return set[56]; - case 293: - case 299: + case 307: + case 313: { BitArray a = new BitArray(239); a.Set(1, true); @@ -903,7 +950,7 @@ partial class ExpressionFinder { a.Set(214, true); return a; } - case 296: + case 310: { BitArray a = new BitArray(239); a.Set(111, true); @@ -911,7 +958,7 @@ partial class ExpressionFinder { a.Set(113, true); return a; } - case 300: + case 314: { BitArray a = new BitArray(239); a.Set(1, true); @@ -919,14 +966,14 @@ partial class ExpressionFinder { a.Set(135, true); return a; } - case 301: - case 302: - case 306: - case 307: - case 351: - case 352: + case 315: + case 316: + case 320: + case 321: + case 373: + case 374: return set[57]; - case 304: + case 318: { BitArray a = new BitArray(239); a.Set(1, true); @@ -934,43 +981,45 @@ partial class ExpressionFinder { a.Set(111, true); return a; } - case 309: - case 310: + case 323: + case 324: return set[58]; - case 312: + case 326: return set[59]; - case 318: + case 332: { BitArray a = new BitArray(239); a.Set(211, true); a.Set(233, true); return a; } - case 320: - case 321: - case 328: - case 329: + case 334: + case 335: + case 346: + case 347: return set[60]; - case 322: - case 330: + case 336: + case 348: return set[61]; - case 323: + case 337: return set[62]; - case 324: + case 338: + case 343: return set[63]; - case 325: + case 341: return set[64]; - case 335: - case 337: - case 404: - case 417: + case 355: + case 357: + case 426: + case 440: return set[65]; - case 338: + case 358: return set[66]; - case 339: - case 340: + case 359: + case 360: return set[67]; - case 341: + case 361: + case 364: { BitArray a = new BitArray(239); a.Set(20, true); @@ -978,16 +1027,16 @@ partial class ExpressionFinder { a.Set(38, true); return a; } - case 343: + case 365: { BitArray a = new BitArray(239); a.Set(40, true); return a; } - case 346: - case 347: + case 368: + case 369: return set[68]; - case 355: + case 377: { BitArray a = new BitArray(239); a.Set(10, true); @@ -995,45 +1044,45 @@ partial class ExpressionFinder { a.Set(19, true); return a; } - case 356: + case 378: return set[69]; - case 357: + case 379: return set[70]; - case 358: + case 380: { BitArray a = new BitArray(239); a.Set(10, true); return a; } - case 362: + case 384: { BitArray a = new BitArray(239); a.Set(12, true); return a; } - case 364: + case 386: { BitArray a = new BitArray(239); a.Set(13, true); return a; } - case 365: + case 387: return set[71]; - case 374: + case 396: return set[72]; - case 380: + case 402: return set[73]; - case 388: + case 410: return set[74]; - case 389: + case 411: return set[75]; - case 390: + case 412: return set[76]; - case 391: - case 392: - case 398: + case 413: + case 414: + case 420: return set[77]; - case 393: + case 415: { BitArray a = new BitArray(239); a.Set(84, true); @@ -1041,34 +1090,34 @@ partial class ExpressionFinder { a.Set(209, true); return a; } - case 395: + case 417: return set[78]; - case 396: + case 418: return set[79]; - case 397: + case 419: return set[80]; - case 399: - case 409: + case 421: + case 431: { BitArray a = new BitArray(239); a.Set(172, true); return a; } - case 410: + case 432: return set[81]; - case 412: - case 414: - case 423: + case 435: + case 437: + case 446: { BitArray a = new BitArray(239); a.Set(119, true); return a; } - case 413: + case 436: return set[82]; - case 415: + case 438: return set[83]; - case 421: + case 444: { BitArray a = new BitArray(239); a.Set(56, true); @@ -1076,10 +1125,11 @@ partial class ExpressionFinder { a.Set(193, true); return a; } - case 425: - case 426: + case 448: + case 449: return set[84]; - case 427: + case 450: + case 457: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1087,40 +1137,41 @@ partial class ExpressionFinder { a.Set(136, true); return a; } - case 433: + case 458: { BitArray a = new BitArray(239); a.Set(101, true); return a; } - case 434: + case 459: return set[85]; - case 437: - case 438: + case 462: + case 463: { BitArray a = new BitArray(239); a.Set(149, true); return a; } - case 439: - case 441: - case 486: + case 464: + case 473: + case 530: { BitArray a = new BitArray(239); a.Set(3, true); return a; } - case 440: + case 465: return set[86]; - case 455: + case 489: return set[87]; - case 456: - case 462: + case 490: + case 498: return set[88]; - case 457: - case 458: + case 491: + case 492: return set[89]; - case 459: + case 493: + case 497: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1128,18 +1179,21 @@ partial class ExpressionFinder { a.Set(21, true); return a; } - case 465: + case 501: { BitArray a = new BitArray(239); a.Set(169, true); return a; } - case 466: + case 502: + case 506: return set[90]; - case 467: - case 475: + case 503: + case 507: + case 516: return set[91]; - case 468: + case 504: + case 508: { BitArray a = new BitArray(239); a.Set(22, true); @@ -1147,53 +1201,54 @@ partial class ExpressionFinder { a.Set(63, true); return a; } - case 470: - case 471: + case 510: + case 512: + case 518: return set[92]; - case 472: - case 474: + case 513: + case 515: return set[93]; - case 478: + case 522: return set[94]; - case 479: + case 523: { BitArray a = new BitArray(239); a.Set(160, true); return a; } - case 480: + case 524: { BitArray a = new BitArray(239); a.Set(137, true); return a; } - case 481: - case 482: + case 525: + case 526: return set[95]; - case 487: + case 531: { BitArray a = new BitArray(239); a.Set(11, true); return a; } - case 488: + case 532: return set[96]; - case 490: + case 534: { BitArray a = new BitArray(239); a.Set(173, true); return a; } - case 491: + case 535: return set[97]; - case 492: + case 536: { BitArray a = new BitArray(239); a.Set(67, true); a.Set(213, true); return a; } - case 493: + case 537: return set[98]; default: throw new InvalidOperationException(); } @@ -1249,7 +1304,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 1; break; } if (la.kind == 173) { stateStack.Push(1); - goto case 490; + goto case 534; } else { goto case 2; } @@ -1259,7 +1314,7 @@ partial class ExpressionFinder { if (la.kind == 137) { stateStack.Push(2); PushContext(Context.Importable, la, t); - goto case 480; + goto case 524; } else { goto case 3; } @@ -1268,7 +1323,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 3; break; } if (la.kind == 40) { stateStack.Push(3); - goto case 343; + goto case 365; } else { goto case 4; } @@ -1287,7 +1342,7 @@ partial class ExpressionFinder { case 5: { if (la == null) { currentState = 5; break; } if (la.kind == 160) { - currentState = 476; + currentState = 520; break; } else { if (set[4].Get(la.kind)) { @@ -1306,7 +1361,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 7; break; } if (la.kind == 40) { stateStack.Push(7); - goto case 343; + goto case 365; } else { goto case 8; } @@ -1318,7 +1373,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 84 || la.kind == 155 || la.kind == 209) { - currentState = 384; + currentState = 406; break; } else { if (la.kind == 103) { @@ -1361,7 +1416,7 @@ partial class ExpressionFinder { case 13: { if (la == null) { currentState = 13; break; } if (la.kind == 37) { - currentState = 382; + currentState = 404; break; } else { goto case 14; @@ -1370,8 +1425,8 @@ partial class ExpressionFinder { case 14: { if (la == null) { currentState = 14; break; } if (la.kind == 63) { - currentState = 18; - break; + PushContext(Context.Type, la, t); + goto case 18; } else { goto case 15; } @@ -1399,156 +1454,166 @@ partial class ExpressionFinder { break; } case 18: { - stateStack.Push(15); - goto case 19; + if (la == null) { currentState = 18; break; } + Expect(63, la); // "As" + currentState = 19; + break; } case 19: { - if (la == null) { currentState = 19; break; } + stateStack.Push(20); + goto case 21; + } + case 20: { + PopContext(); + goto case 15; + } + case 21: { + if (la == null) { currentState = 21; break; } if (la.kind == 130) { - currentState = 20; + currentState = 22; break; } else { if (set[28].Get(la.kind)) { - currentState = 20; + currentState = 22; break; } else { if (set[100].Get(la.kind)) { - currentState = 20; + currentState = 22; break; } else { Error(la); - goto case 20; + goto case 22; } } } } - case 20: { - if (la == null) { currentState = 20; break; } + case 22: { + if (la == null) { currentState = 22; break; } if (la.kind == 37) { - stateStack.Push(20); - goto case 24; + stateStack.Push(22); + goto case 26; } else { - goto case 21; + goto case 23; } } - case 21: { - if (la == null) { currentState = 21; break; } + case 23: { + if (la == null) { currentState = 23; break; } if (la.kind == 26) { - currentState = 22; + currentState = 24; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 22: { - stateStack.Push(23); - goto case 56; + case 24: { + stateStack.Push(25); + goto case 61; } - case 23: { - if (la == null) { currentState = 23; break; } + case 25: { + if (la == null) { currentState = 25; break; } if (la.kind == 37) { - stateStack.Push(23); - goto case 24; + stateStack.Push(25); + goto case 26; } else { - goto case 21; + goto case 23; } } - case 24: { - if (la == null) { currentState = 24; break; } + case 26: { + if (la == null) { currentState = 26; break; } Expect(37, la); // "(" - currentState = 25; + currentState = 27; break; } - case 25: { + case 27: { nextTokenIsPotentialStartOfExpression = true; - goto case 26; + goto case 28; } - case 26: { - if (la == null) { currentState = 26; break; } + case 28: { + if (la == null) { currentState = 28; break; } if (la.kind == 169) { - currentState = 380; + currentState = 402; break; } else { if (set[13].Get(la.kind)) { - goto case 28; + goto case 30; } else { Error(la); - goto case 27; + goto case 29; } } } - case 27: { - if (la == null) { currentState = 27; break; } + case 29: { + if (la == null) { currentState = 29; break; } Expect(38, la); // ")" currentState = stateStack.Pop(); break; } - case 28: { + case 30: { nextTokenIsPotentialStartOfExpression = true; - goto case 29; + goto case 31; } - case 29: { - if (la == null) { currentState = 29; break; } + case 31: { + if (la == null) { currentState = 31; break; } if (set[14].Get(la.kind)) { - stateStack.Push(27); + stateStack.Push(29); nextTokenIsPotentialStartOfExpression = true; - goto case 30; + goto case 32; } else { - goto case 27; + goto case 29; } } - case 30: { - if (la == null) { currentState = 30; break; } + case 32: { + if (la == null) { currentState = 32; break; } if (set[15].Get(la.kind)) { - goto case 376; + goto case 398; } else { if (la.kind == 22) { - goto case 31; + goto case 33; } else { goto case 6; } } } - case 31: { - if (la == null) { currentState = 31; break; } - currentState = 32; + case 33: { + if (la == null) { currentState = 33; break; } + currentState = 34; break; } - case 32: { + case 34: { nextTokenIsPotentialStartOfExpression = true; - goto case 33; + goto case 35; } - case 33: { - if (la == null) { currentState = 33; break; } + case 35: { + if (la == null) { currentState = 35; break; } if (set[15].Get(la.kind)) { - stateStack.Push(34); - goto case 35; + stateStack.Push(36); + goto case 37; } else { - goto case 34; + goto case 36; } } - case 34: { - if (la == null) { currentState = 34; break; } + case 36: { + if (la == null) { currentState = 36; break; } if (la.kind == 22) { - goto case 31; + goto case 33; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 35: { + case 37: { PushContext(Context.Expression, la, t); - goto case 36; - } - case 36: { - stateStack.Push(37); goto case 38; } - case 37: { - if (la == null) { currentState = 37; break; } + case 38: { + stateStack.Push(39); + goto case 40; + } + case 39: { + if (la == null) { currentState = 39; break; } if (set[101].Get(la.kind)) { - currentState = 36; + currentState = 38; break; } else { PopContext(); @@ -1556,146 +1621,160 @@ partial class ExpressionFinder { goto switchlbl; } } - case 38: { + case 40: { PushContext(Context.Expression, la, t); - goto case 39; + goto case 41; } - case 39: { + case 41: { nextTokenIsPotentialStartOfExpression = true; - goto case 40; + goto case 42; } - case 40: { - if (la == null) { currentState = 40; break; } + case 42: { + if (la == null) { currentState = 42; break; } if (set[102].Get(la.kind)) { - currentState = 39; + currentState = 41; break; } else { if (set[24].Get(la.kind)) { - stateStack.Push(107); - goto case 117; + stateStack.Push(112); + goto case 122; } else { if (la.kind == 220) { - currentState = 104; + currentState = 109; break; } else { if (la.kind == 162) { - stateStack.Push(41); - goto case 46; + stateStack.Push(43); + PushContext(Context.ObjectCreation, la, t); + goto case 48; } else { if (la.kind == 35) { - stateStack.Push(41); - goto case 42; + stateStack.Push(43); + goto case 44; } else { Error(la); - goto case 41; + goto case 43; } } } } } } - case 41: { + case 43: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 42: { - if (la == null) { currentState = 42; break; } + case 44: { + if (la == null) { currentState = 44; break; } Expect(35, la); // "{" - currentState = 43; + currentState = 45; break; } - case 43: { - stateStack.Push(44); - goto case 35; + case 45: { + stateStack.Push(46); + goto case 37; } - case 44: { - if (la == null) { currentState = 44; break; } + case 46: { + if (la == null) { currentState = 46; break; } if (la.kind == 22) { - currentState = 43; + currentState = 45; break; } else { - goto case 45; + goto case 47; } } - case 45: { - if (la == null) { currentState = 45; break; } + case 47: { + if (la == null) { currentState = 47; break; } Expect(36, la); // "}" currentState = stateStack.Pop(); break; } - case 46: { - if (la == null) { currentState = 46; break; } + case 48: { + if (la == null) { currentState = 48; break; } Expect(162, la); // "New" - currentState = 47; + currentState = 49; break; } - case 47: { - if (la == null) { currentState = 47; break; } + case 49: { + if (la == null) { currentState = 49; break; } if (set[8].Get(la.kind)) { - stateStack.Push(101); - goto case 19; + stateStack.Push(106); + goto case 21; } else { - goto case 48; + goto case 50; } } - case 48: { - if (la == null) { currentState = 48; break; } + case 50: { + if (la == null) { currentState = 50; break; } if (la.kind == 233) { - currentState = 49; + currentState = 53; break; } else { - goto case 6; + goto case 51; } } - case 49: { - if (la == null) { currentState = 49; break; } + case 51: { + Error(la); + goto case 52; + } + case 52: { + PopContext(); + currentState = stateStack.Pop(); + goto switchlbl; + } + case 53: { + stateStack.Push(52); + goto case 54; + } + case 54: { + if (la == null) { currentState = 54; break; } Expect(35, la); // "{" - currentState = 50; + currentState = 55; break; } - case 50: { - if (la == null) { currentState = 50; break; } + case 55: { + if (la == null) { currentState = 55; break; } if (la.kind == 147) { - currentState = 51; + currentState = 56; break; } else { - goto case 51; + goto case 56; } } - case 51: { - if (la == null) { currentState = 51; break; } + case 56: { + if (la == null) { currentState = 56; break; } Expect(26, la); // "." - currentState = 52; + currentState = 57; break; } - case 52: { - stateStack.Push(53); - goto case 56; + case 57: { + stateStack.Push(58); + goto case 61; } - case 53: { - if (la == null) { currentState = 53; break; } + case 58: { + if (la == null) { currentState = 58; break; } Expect(20, la); // "=" - currentState = 54; + currentState = 59; break; } - case 54: { - stateStack.Push(55); - goto case 35; + case 59: { + stateStack.Push(60); + goto case 37; } - case 55: { - if (la == null) { currentState = 55; break; } + case 60: { + if (la == null) { currentState = 60; break; } if (la.kind == 22) { - currentState = 50; + currentState = 55; break; } else { - goto case 45; + goto case 47; } } - case 56: { - if (la == null) { currentState = 56; break; } + case 61: { + if (la == null) { currentState = 61; break; } if (la.kind == 2) { - goto case 100; + goto case 105; } else { if (la.kind == 56) { currentState = stateStack.Pop(); @@ -1706,7 +1785,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 58) { - goto case 99; + goto case 104; } else { if (la.kind == 59) { currentState = stateStack.Pop(); @@ -1721,23 +1800,23 @@ partial class ExpressionFinder { break; } else { if (la.kind == 62) { - goto case 98; + goto case 103; } else { if (la.kind == 63) { currentState = stateStack.Pop(); break; } else { if (la.kind == 64) { - goto case 97; + goto case 102; } else { if (la.kind == 65) { - goto case 96; + goto case 101; } else { if (la.kind == 66) { - goto case 95; + goto case 100; } else { if (la.kind == 67) { - goto case 94; + goto case 99; } else { if (la.kind == 68) { currentState = stateStack.Pop(); @@ -1748,7 +1827,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 70) { - goto case 93; + goto case 98; } else { if (la.kind == 71) { currentState = stateStack.Pop(); @@ -1803,7 +1882,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 84) { - goto case 92; + goto case 97; } else { if (la.kind == 85) { currentState = stateStack.Pop(); @@ -1814,7 +1893,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 87) { - goto case 91; + goto case 96; } else { if (la.kind == 88) { currentState = stateStack.Pop(); @@ -1857,7 +1936,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 98) { - goto case 90; + goto case 95; } else { if (la.kind == 99) { currentState = stateStack.Pop(); @@ -1880,7 +1959,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 104) { - goto case 89; + goto case 94; } else { if (la.kind == 105) { currentState = stateStack.Pop(); @@ -1891,10 +1970,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 107) { - goto case 88; + goto case 93; } else { if (la.kind == 108) { - goto case 87; + goto case 92; } else { if (la.kind == 109) { currentState = stateStack.Pop(); @@ -1925,7 +2004,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 116) { - goto case 86; + goto case 91; } else { if (la.kind == 117) { currentState = stateStack.Pop(); @@ -1944,7 +2023,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 121) { - goto case 85; + goto case 90; } else { if (la.kind == 122) { currentState = stateStack.Pop(); @@ -1955,17 +2034,17 @@ partial class ExpressionFinder { break; } else { if (la.kind == 124) { - goto case 84; + goto case 89; } else { if (la.kind == 125) { currentState = stateStack.Pop(); break; } else { if (la.kind == 126) { - goto case 83; + goto case 88; } else { if (la.kind == 127) { - goto case 82; + goto case 87; } else { if (la.kind == 128) { currentState = stateStack.Pop(); @@ -1988,7 +2067,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 133) { - goto case 81; + goto case 86; } else { if (la.kind == 134) { currentState = stateStack.Pop(); @@ -2011,7 +2090,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 139) { - goto case 80; + goto case 85; } else { if (la.kind == 140) { currentState = stateStack.Pop(); @@ -2026,7 +2105,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 143) { - goto case 79; + goto case 84; } else { if (la.kind == 144) { currentState = stateStack.Pop(); @@ -2037,10 +2116,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 146) { - goto case 78; + goto case 83; } else { if (la.kind == 147) { - goto case 77; + goto case 82; } else { if (la.kind == 148) { currentState = stateStack.Pop(); @@ -2099,10 +2178,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 162) { - goto case 76; + goto case 81; } else { if (la.kind == 163) { - goto case 75; + goto case 80; } else { if (la.kind == 164) { currentState = stateStack.Pop(); @@ -2129,7 +2208,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 170) { - goto case 74; + goto case 79; } else { if (la.kind == 171) { currentState = stateStack.Pop(); @@ -2152,7 +2231,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 176) { - goto case 73; + goto case 78; } else { if (la.kind == 177) { currentState = stateStack.Pop(); @@ -2183,14 +2262,14 @@ partial class ExpressionFinder { break; } else { if (la.kind == 184) { - goto case 72; + goto case 77; } else { if (la.kind == 185) { currentState = stateStack.Pop(); break; } else { if (la.kind == 186) { - goto case 71; + goto case 76; } else { if (la.kind == 187) { currentState = stateStack.Pop(); @@ -2233,7 +2312,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 197) { - goto case 70; + goto case 75; } else { if (la.kind == 198) { currentState = stateStack.Pop(); @@ -2256,7 +2335,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 203) { - goto case 69; + goto case 74; } else { if (la.kind == 204) { currentState = stateStack.Pop(); @@ -2267,7 +2346,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 206) { - goto case 68; + goto case 73; } else { if (la.kind == 207) { currentState = stateStack.Pop(); @@ -2278,19 +2357,19 @@ partial class ExpressionFinder { break; } else { if (la.kind == 209) { - goto case 67; + goto case 72; } else { if (la.kind == 210) { - goto case 66; + goto case 71; } else { if (la.kind == 211) { - goto case 65; + goto case 70; } else { if (la.kind == 212) { - goto case 64; + goto case 69; } else { if (la.kind == 213) { - goto case 63; + goto case 68; } else { if (la.kind == 214) { currentState = stateStack.Pop(); @@ -2309,7 +2388,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 218) { - goto case 62; + goto case 67; } else { if (la.kind == 219) { currentState = stateStack.Pop(); @@ -2328,10 +2407,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 223) { - goto case 61; + goto case 66; } else { if (la.kind == 224) { - goto case 60; + goto case 65; } else { if (la.kind == 225) { currentState = stateStack.Pop(); @@ -2354,17 +2433,17 @@ partial class ExpressionFinder { break; } else { if (la.kind == 230) { - goto case 59; + goto case 64; } else { if (la.kind == 231) { - goto case 58; + goto case 63; } else { if (la.kind == 232) { currentState = stateStack.Pop(); break; } else { if (la.kind == 233) { - goto case 57; + goto case 62; } else { if (la.kind == 234) { currentState = stateStack.Pop(); @@ -2567,31 +2646,6 @@ partial class ExpressionFinder { } } } - case 57: { - if (la == null) { currentState = 57; break; } - currentState = stateStack.Pop(); - break; - } - case 58: { - if (la == null) { currentState = 58; break; } - currentState = stateStack.Pop(); - break; - } - case 59: { - if (la == null) { currentState = 59; break; } - currentState = stateStack.Pop(); - break; - } - case 60: { - if (la == null) { currentState = 60; break; } - currentState = stateStack.Pop(); - break; - } - case 61: { - if (la == null) { currentState = 61; break; } - currentState = stateStack.Pop(); - break; - } case 62: { if (la == null) { currentState = 62; break; } currentState = stateStack.Pop(); @@ -2789,23 +2843,47 @@ partial class ExpressionFinder { } case 101: { if (la == null) { currentState = 101; break; } + currentState = stateStack.Pop(); + break; + } + case 102: { + if (la == null) { currentState = 102; break; } + currentState = stateStack.Pop(); + break; + } + case 103: { + if (la == null) { currentState = 103; break; } + currentState = stateStack.Pop(); + break; + } + case 104: { + if (la == null) { currentState = 104; break; } + currentState = stateStack.Pop(); + break; + } + case 105: { + if (la == null) { currentState = 105; break; } + currentState = stateStack.Pop(); + break; + } + case 106: { + if (la == null) { currentState = 106; break; } if (la.kind == 126 || la.kind == 233) { if (la.kind == 126) { - currentState = 102; + currentState = 107; break; } else { - goto case 48; + goto case 50; } } else { - currentState = stateStack.Pop(); - goto switchlbl; + goto case 52; } } - case 102: { - if (la == null) { currentState = 102; break; } + case 107: { + if (la == null) { currentState = 107; break; } if (la.kind == 35) { - currentState = 43; - break; + stateStack.Push(52); + goto case 44; } else { if (set[19].Get(la.kind)) { currentState = endOfStatementTerminatorAndBlock; /* leave this block */ @@ -2814,71 +2892,71 @@ partial class ExpressionFinder { goto switchlbl; } else { - goto case 6; + goto case 51; } } } - case 103: { - if (la == null) { currentState = 103; break; } - currentState = stateStack.Pop(); + case 108: { + if (la == null) { currentState = 108; break; } + currentState = 52; break; } - case 104: { - stateStack.Push(105); - goto case 38; + case 109: { + stateStack.Push(110); + goto case 40; } - case 105: { - if (la == null) { currentState = 105; break; } + case 110: { + if (la == null) { currentState = 110; break; } Expect(144, la); // "Is" - currentState = 106; + currentState = 111; break; } - case 106: { - stateStack.Push(41); - goto case 19; + case 111: { + stateStack.Push(43); + goto case 21; } - case 107: { - if (la == null) { currentState = 107; break; } + case 112: { + if (la == null) { currentState = 112; break; } if (set[21].Get(la.kind)) { - stateStack.Push(107); - goto case 108; + stateStack.Push(112); + goto case 113; } else { - goto case 41; + goto case 43; } } - case 108: { - if (la == null) { currentState = 108; break; } + case 113: { + if (la == null) { currentState = 113; break; } if (la.kind == 37) { - currentState = 113; + currentState = 118; break; } else { if (set[103].Get(la.kind)) { - currentState = 109; + currentState = 114; break; } else { goto case 6; } } } - case 109: { + case 114: { nextTokenIsStartOfImportsOrAccessExpression = true; - goto case 110; + goto case 115; } - case 110: { - if (la == null) { currentState = 110; break; } + case 115: { + if (la == null) { currentState = 115; break; } if (la.kind == 10) { - currentState = 111; + currentState = 116; break; } else { - goto case 111; + goto case 116; } } - case 111: { - stateStack.Push(112); - goto case 56; + case 116: { + stateStack.Push(117); + goto case 61; } - case 112: { - if (la == null) { currentState = 112; break; } + case 117: { + if (la == null) { currentState = 117; break; } if (la.kind == 11) { currentState = stateStack.Pop(); break; @@ -2887,92 +2965,92 @@ partial class ExpressionFinder { goto switchlbl; } } - case 113: { + case 118: { nextTokenIsPotentialStartOfExpression = true; - goto case 114; + goto case 119; } - case 114: { - if (la == null) { currentState = 114; break; } + case 119: { + if (la == null) { currentState = 119; break; } if (la.kind == 169) { - currentState = 115; + currentState = 120; break; } else { if (set[13].Get(la.kind)) { - goto case 28; + goto case 30; } else { goto case 6; } } } - case 115: { - stateStack.Push(116); - goto case 19; + case 120: { + stateStack.Push(121); + goto case 21; } - case 116: { - if (la == null) { currentState = 116; break; } + case 121: { + if (la == null) { currentState = 121; break; } if (la.kind == 22) { - currentState = 115; + currentState = 120; break; } else { - goto case 27; + goto case 29; } } - case 117: { + case 122: { PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; - goto case 118; + goto case 123; } - case 118: { - if (la == null) { currentState = 118; break; } + case 123: { + if (la == null) { currentState = 123; break; } if (set[104].Get(la.kind)) { - currentState = 119; + currentState = 124; break; } else { if (la.kind == 37) { - currentState = 375; + currentState = 397; break; } else { if (set[105].Get(la.kind)) { - currentState = 119; + currentState = 124; break; } else { if (set[103].Get(la.kind)) { - currentState = 371; + currentState = 393; break; } else { if (la.kind == 129) { - currentState = 369; + currentState = 391; break; } else { if (la.kind == 237) { - currentState = 366; + currentState = 388; break; } else { if (la.kind == 10 || la.kind == 17 || la.kind == 19) { - stateStack.Push(119); + stateStack.Push(124); nextTokenIsPotentialStartOfExpression = true; PushContext(Context.Xml, la, t); - goto case 355; + goto case 377; } else { if (la.kind == 127 || la.kind == 210) { - stateStack.Push(119); - goto case 191; + stateStack.Push(124); + goto case 200; } else { if (la.kind == 58 || la.kind == 126) { - stateStack.Push(119); + stateStack.Push(124); PushContext(Context.Query, la, t); - goto case 133; + goto case 138; } else { if (set[26].Get(la.kind)) { - stateStack.Push(119); - goto case 127; + stateStack.Push(124); + goto case 132; } else { if (la.kind == 135) { - stateStack.Push(119); - goto case 120; + stateStack.Push(124); + goto case 125; } else { Error(la); - goto case 119; + goto case 124; } } } @@ -2985,155 +3063,155 @@ partial class ExpressionFinder { } } } - case 119: { + case 124: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 120: { - if (la == null) { currentState = 120; break; } + case 125: { + if (la == null) { currentState = 125; break; } Expect(135, la); // "If" - currentState = 121; + currentState = 126; break; } - case 121: { - if (la == null) { currentState = 121; break; } + case 126: { + if (la == null) { currentState = 126; break; } Expect(37, la); // "(" - currentState = 122; + currentState = 127; break; } - case 122: { - stateStack.Push(123); - goto case 35; + case 127: { + stateStack.Push(128); + goto case 37; } - case 123: { - if (la == null) { currentState = 123; break; } + case 128: { + if (la == null) { currentState = 128; break; } Expect(22, la); // "," - currentState = 124; + currentState = 129; break; } - case 124: { - stateStack.Push(125); - goto case 35; + case 129: { + stateStack.Push(130); + goto case 37; } - case 125: { - if (la == null) { currentState = 125; break; } + case 130: { + if (la == null) { currentState = 130; break; } if (la.kind == 22) { - currentState = 126; + currentState = 131; break; } else { - goto case 27; + goto case 29; } } - case 126: { - stateStack.Push(27); - goto case 35; + case 131: { + stateStack.Push(29); + goto case 37; } - case 127: { - if (la == null) { currentState = 127; break; } + case 132: { + if (la == null) { currentState = 132; break; } if (set[106].Get(la.kind)) { - currentState = 132; + currentState = 137; break; } else { if (la.kind == 94 || la.kind == 106 || la.kind == 219) { - currentState = 128; + currentState = 133; break; } else { goto case 6; } } } - case 128: { - if (la == null) { currentState = 128; break; } + case 133: { + if (la == null) { currentState = 133; break; } Expect(37, la); // "(" - currentState = 129; + currentState = 134; break; } - case 129: { - stateStack.Push(130); - goto case 35; + case 134: { + stateStack.Push(135); + goto case 37; } - case 130: { - if (la == null) { currentState = 130; break; } + case 135: { + if (la == null) { currentState = 135; break; } Expect(22, la); // "," - currentState = 131; + currentState = 136; break; } - case 131: { - stateStack.Push(27); - goto case 19; + case 136: { + stateStack.Push(29); + goto case 21; } - case 132: { - if (la == null) { currentState = 132; break; } + case 137: { + if (la == null) { currentState = 137; break; } Expect(37, la); // "(" - currentState = 126; + currentState = 131; break; } - case 133: { - if (la == null) { currentState = 133; break; } + case 138: { + if (la == null) { currentState = 138; break; } if (la.kind == 126) { - stateStack.Push(134); - goto case 190; + stateStack.Push(139); + goto case 199; } else { if (la.kind == 58) { - stateStack.Push(134); - goto case 189; + stateStack.Push(139); + goto case 198; } else { Error(la); - goto case 134; + goto case 139; } } } - case 134: { - if (la == null) { currentState = 134; break; } + case 139: { + if (la == null) { currentState = 139; break; } if (set[27].Get(la.kind)) { - stateStack.Push(134); - goto case 135; + stateStack.Push(139); + goto case 140; } else { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } } - case 135: { - if (la == null) { currentState = 135; break; } + case 140: { + if (la == null) { currentState = 140; break; } if (la.kind == 126) { - currentState = 187; + currentState = 196; break; } else { if (la.kind == 58) { - currentState = 183; + currentState = 192; break; } else { if (la.kind == 197) { - currentState = 181; + currentState = 190; break; } else { if (la.kind == 107) { - goto case 88; + goto case 93; } else { if (la.kind == 230) { - currentState = 35; + currentState = 37; break; } else { if (la.kind == 176) { - currentState = 177; + currentState = 186; break; } else { if (la.kind == 203 || la.kind == 212) { - currentState = 175; + currentState = 184; break; } else { if (la.kind == 148) { - currentState = 173; + currentState = 182; break; } else { if (la.kind == 133) { - currentState = 148; + currentState = 155; break; } else { if (la.kind == 146) { - currentState = 136; + currentState = 141; break; } else { goto case 6; @@ -3148,100 +3226,110 @@ partial class ExpressionFinder { } } } - case 136: { - stateStack.Push(137); - goto case 142; + case 141: { + stateStack.Push(142); + goto case 147; } - case 137: { - if (la == null) { currentState = 137; break; } + case 142: { + if (la == null) { currentState = 142; break; } Expect(171, la); // "On" - currentState = 138; + currentState = 143; break; } - case 138: { - stateStack.Push(139); - goto case 35; + case 143: { + stateStack.Push(144); + goto case 37; } - case 139: { - if (la == null) { currentState = 139; break; } + case 144: { + if (la == null) { currentState = 144; break; } Expect(116, la); // "Equals" - currentState = 140; + currentState = 145; break; } - case 140: { - stateStack.Push(141); - goto case 35; + case 145: { + stateStack.Push(146); + goto case 37; } - case 141: { - if (la == null) { currentState = 141; break; } + case 146: { + if (la == null) { currentState = 146; break; } if (la.kind == 22) { - currentState = 138; + currentState = 143; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 142: { + case 147: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(143); - goto case 147; + stateStack.Push(148); + goto case 154; } - case 143: { + case 148: { PopContext(); - goto case 144; + goto case 149; } - case 144: { - if (la == null) { currentState = 144; break; } + case 149: { + if (la == null) { currentState = 149; break; } if (la.kind == 63) { - currentState = 146; - break; + PushContext(Context.Type, la, t); + goto case 151; } else { - goto case 145; + goto case 150; } } - case 145: { - if (la == null) { currentState = 145; break; } + case 150: { + if (la == null) { currentState = 150; break; } Expect(138, la); // "In" - currentState = 35; + currentState = 37; break; } - case 146: { - stateStack.Push(145); - goto case 19; + case 151: { + if (la == null) { currentState = 151; break; } + Expect(63, la); // "As" + currentState = 152; + break; } - case 147: { - if (la == null) { currentState = 147; break; } + case 152: { + stateStack.Push(153); + goto case 21; + } + case 153: { + PopContext(); + goto case 150; + } + case 154: { + if (la == null) { currentState = 154; break; } if (set[88].Get(la.kind)) { currentState = stateStack.Pop(); break; } else { if (la.kind == 98) { - goto case 90; + goto case 95; } else { goto case 6; } } } - case 148: { + case 155: { nextTokenIsPotentialStartOfExpression = true; - goto case 149; + goto case 156; } - case 149: { - if (la == null) { currentState = 149; break; } + case 156: { + if (la == null) { currentState = 156; break; } if (la.kind == 146) { - goto case 165; + goto case 174; } else { if (set[30].Get(la.kind)) { if (la.kind == 70) { - currentState = 151; + currentState = 158; break; } else { if (set[30].Get(la.kind)) { - goto case 163; + goto case 172; } else { Error(la); - goto case 150; + goto case 157; } } } else { @@ -3249,67 +3337,67 @@ partial class ExpressionFinder { } } } - case 150: { - if (la == null) { currentState = 150; break; } + case 157: { + if (la == null) { currentState = 157; break; } Expect(70, la); // "By" - currentState = 151; + currentState = 158; break; } - case 151: { - stateStack.Push(152); - goto case 155; + case 158: { + stateStack.Push(159); + goto case 162; } - case 152: { - if (la == null) { currentState = 152; break; } + case 159: { + if (la == null) { currentState = 159; break; } if (la.kind == 22) { - currentState = 151; + currentState = 158; break; } else { Expect(143, la); // "Into" - currentState = 153; + currentState = 160; break; } } - case 153: { - stateStack.Push(154); - goto case 155; + case 160: { + stateStack.Push(161); + goto case 162; } - case 154: { - if (la == null) { currentState = 154; break; } + case 161: { + if (la == null) { currentState = 161; break; } if (la.kind == 22) { - currentState = 153; + currentState = 160; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 155: { + case 162: { nextTokenIsPotentialStartOfExpression = true; - goto case 156; + goto case 163; } - case 156: { - if (la == null) { currentState = 156; break; } + case 163: { + if (la == null) { currentState = 163; break; } if (set[28].Get(la.kind)) { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(157); - goto case 147; + stateStack.Push(164); + goto case 154; } else { - goto case 35; + goto case 37; } } - case 157: { + case 164: { PopContext(); - goto case 158; + goto case 165; } - case 158: { - if (la == null) { currentState = 158; break; } + case 165: { + if (la == null) { currentState = 165; break; } if (la.kind == 63) { - currentState = 161; - break; + PushContext(Context.Type, la, t); + goto case 168; } else { if (la.kind == 20) { - goto case 160; + goto case 167; } else { if (set[31].Get(la.kind)) { currentState = endOfStatementTerminatorAndBlock; /* leave this block */ @@ -3319,350 +3407,360 @@ partial class ExpressionFinder { } else { Error(la); - goto case 35; + goto case 37; } } } } - case 159: { - if (la == null) { currentState = 159; break; } - currentState = 35; + case 166: { + if (la == null) { currentState = 166; break; } + currentState = 37; break; } - case 160: { - if (la == null) { currentState = 160; break; } - currentState = 35; + case 167: { + if (la == null) { currentState = 167; break; } + currentState = 37; break; } - case 161: { - stateStack.Push(162); - goto case 19; + case 168: { + if (la == null) { currentState = 168; break; } + Expect(63, la); // "As" + currentState = 169; + break; } - case 162: { - if (la == null) { currentState = 162; break; } + case 169: { + stateStack.Push(170); + goto case 21; + } + case 170: { + PopContext(); + goto case 171; + } + case 171: { + if (la == null) { currentState = 171; break; } Expect(20, la); // "=" - currentState = 35; + currentState = 37; break; } - case 163: { - stateStack.Push(164); - goto case 155; + case 172: { + stateStack.Push(173); + goto case 162; } - case 164: { - if (la == null) { currentState = 164; break; } + case 173: { + if (la == null) { currentState = 173; break; } if (la.kind == 22) { - currentState = 163; + currentState = 172; break; } else { - goto case 150; + goto case 157; } } - case 165: { - stateStack.Push(166); - goto case 172; + case 174: { + stateStack.Push(175); + goto case 181; } - case 166: { - if (la == null) { currentState = 166; break; } + case 175: { + if (la == null) { currentState = 175; break; } if (la.kind == 133 || la.kind == 146) { if (la.kind == 133) { - currentState = 170; + currentState = 179; break; } else { if (la.kind == 146) { - goto case 165; + goto case 174; } else { Error(la); - goto case 166; + goto case 175; } } } else { - goto case 167; + goto case 176; } } - case 167: { - if (la == null) { currentState = 167; break; } + case 176: { + if (la == null) { currentState = 176; break; } Expect(143, la); // "Into" - currentState = 168; + currentState = 177; break; } - case 168: { - stateStack.Push(169); - goto case 155; + case 177: { + stateStack.Push(178); + goto case 162; } - case 169: { - if (la == null) { currentState = 169; break; } + case 178: { + if (la == null) { currentState = 178; break; } if (la.kind == 22) { - currentState = 168; + currentState = 177; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 170: { - stateStack.Push(171); - goto case 172; + case 179: { + stateStack.Push(180); + goto case 181; } - case 171: { - stateStack.Push(166); - goto case 167; + case 180: { + stateStack.Push(175); + goto case 176; } - case 172: { - if (la == null) { currentState = 172; break; } + case 181: { + if (la == null) { currentState = 181; break; } Expect(146, la); // "Join" - currentState = 136; + currentState = 141; break; } - case 173: { - stateStack.Push(174); - goto case 155; + case 182: { + stateStack.Push(183); + goto case 162; } - case 174: { - if (la == null) { currentState = 174; break; } + case 183: { + if (la == null) { currentState = 183; break; } if (la.kind == 22) { - currentState = 173; + currentState = 182; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 175: { + case 184: { nextTokenIsPotentialStartOfExpression = true; - goto case 176; + goto case 185; } - case 176: { - if (la == null) { currentState = 176; break; } + case 185: { + if (la == null) { currentState = 185; break; } if (la.kind == 231) { - currentState = 35; + currentState = 37; break; } else { - goto case 35; + goto case 37; } } - case 177: { - if (la == null) { currentState = 177; break; } + case 186: { + if (la == null) { currentState = 186; break; } Expect(70, la); // "By" - currentState = 178; + currentState = 187; break; } - case 178: { - stateStack.Push(179); - goto case 35; + case 187: { + stateStack.Push(188); + goto case 37; } - case 179: { - if (la == null) { currentState = 179; break; } + case 188: { + if (la == null) { currentState = 188; break; } if (la.kind == 64) { - currentState = 180; + currentState = 189; break; } else { if (la.kind == 104) { - currentState = 180; + currentState = 189; break; } else { Error(la); - goto case 180; + goto case 189; } } } - case 180: { - if (la == null) { currentState = 180; break; } + case 189: { + if (la == null) { currentState = 189; break; } if (la.kind == 22) { - currentState = 178; + currentState = 187; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 181: { - stateStack.Push(182); - goto case 155; + case 190: { + stateStack.Push(191); + goto case 162; } - case 182: { - if (la == null) { currentState = 182; break; } + case 191: { + if (la == null) { currentState = 191; break; } if (la.kind == 22) { - currentState = 181; + currentState = 190; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 183: { - stateStack.Push(184); - goto case 142; + case 192: { + stateStack.Push(193); + goto case 147; } - case 184: { - if (la == null) { currentState = 184; break; } + case 193: { + if (la == null) { currentState = 193; break; } if (set[27].Get(la.kind)) { - stateStack.Push(184); - goto case 135; + stateStack.Push(193); + goto case 140; } else { Expect(143, la); // "Into" - currentState = 185; + currentState = 194; break; } } - case 185: { - stateStack.Push(186); - goto case 155; + case 194: { + stateStack.Push(195); + goto case 162; } - case 186: { - if (la == null) { currentState = 186; break; } + case 195: { + if (la == null) { currentState = 195; break; } if (la.kind == 22) { - currentState = 185; + currentState = 194; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 187: { - stateStack.Push(188); - goto case 142; + case 196: { + stateStack.Push(197); + goto case 147; } - case 188: { - if (la == null) { currentState = 188; break; } + case 197: { + if (la == null) { currentState = 197; break; } if (la.kind == 22) { - currentState = 187; + currentState = 196; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 189: { - if (la == null) { currentState = 189; break; } + case 198: { + if (la == null) { currentState = 198; break; } Expect(58, la); // "Aggregate" - currentState = 183; + currentState = 192; break; } - case 190: { - if (la == null) { currentState = 190; break; } + case 199: { + if (la == null) { currentState = 199; break; } Expect(126, la); // "From" - currentState = 187; + currentState = 196; break; } - case 191: { - if (la == null) { currentState = 191; break; } + case 200: { + if (la == null) { currentState = 200; break; } if (la.kind == 210) { - currentState = 348; + currentState = 370; break; } else { if (la.kind == 127) { - currentState = 192; + currentState = 201; break; } else { goto case 6; } } } - case 192: { - if (la == null) { currentState = 192; break; } + case 201: { + if (la == null) { currentState = 201; break; } Expect(37, la); // "(" - currentState = 193; + currentState = 202; break; } - case 193: { - if (la == null) { currentState = 193; break; } + case 202: { + if (la == null) { currentState = 202; break; } if (set[65].Get(la.kind)) { - stateStack.Push(194); - goto case 335; + stateStack.Push(203); + goto case 355; } else { - goto case 194; + goto case 203; } } - case 194: { - if (la == null) { currentState = 194; break; } + case 203: { + if (la == null) { currentState = 203; break; } Expect(38, la); // ")" - currentState = 195; + currentState = 204; break; } - case 195: { + case 204: { nextTokenIsPotentialStartOfExpression = true; - goto case 196; + goto case 205; } - case 196: { - if (la == null) { currentState = 196; break; } + case 205: { + if (la == null) { currentState = 205; break; } if (set[15].Get(la.kind)) { - goto case 35; + goto case 37; } else { if (la.kind == 1 || la.kind == 21 || la.kind == 63) { if (la.kind == 63) { - currentState = 334; - break; + PushContext(Context.Type, la, t); + goto case 352; } else { - goto case 197; + goto case 206; } } else { goto case 6; } } } - case 197: { - stateStack.Push(198); - goto case 200; + case 206: { + stateStack.Push(207); + goto case 209; } - case 198: { - if (la == null) { currentState = 198; break; } + case 207: { + if (la == null) { currentState = 207; break; } Expect(113, la); // "End" - currentState = 199; + currentState = 208; break; } - case 199: { - if (la == null) { currentState = 199; break; } + case 208: { + if (la == null) { currentState = 208; break; } Expect(127, la); // "Function" currentState = stateStack.Pop(); break; } - case 200: { + case 209: { PushContext(Context.Body, la, t); - goto case 201; + goto case 210; } - case 201: { - stateStack.Push(202); + case 210: { + stateStack.Push(211); goto case 15; } - case 202: { + case 211: { nextTokenIsPotentialStartOfExpression = true; - goto case 203; + goto case 212; } - case 203: { - if (la == null) { currentState = 203; break; } + case 212: { + if (la == null) { currentState = 212; break; } if (set[107].Get(la.kind)) { if (set[57].Get(la.kind)) { if (set[39].Get(la.kind)) { - stateStack.Push(201); - goto case 208; + stateStack.Push(210); + goto case 217; } else { - goto case 201; + goto case 210; } } else { if (la.kind == 113) { - currentState = 206; + currentState = 215; break; } else { - goto case 205; + goto case 214; } } } else { - goto case 204; + goto case 213; } } - case 204: { + case 213: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 205: { + case 214: { Error(la); - goto case 202; + goto case 211; } - case 206: { - if (la == null) { currentState = 206; break; } + case 215: { + if (la == null) { currentState = 215; break; } if (la.kind == 1 || la.kind == 21) { - goto case 201; + goto case 210; } else { if (set[38].Get(la.kind)) { currentState = endOfStatementTerminatorAndBlock; /* leave this block */ @@ -3671,68 +3769,68 @@ partial class ExpressionFinder { goto switchlbl; } else { - goto case 205; + goto case 214; } } } - case 207: { - if (la == null) { currentState = 207; break; } - currentState = 202; + case 216: { + if (la == null) { currentState = 216; break; } + currentState = 211; break; } - case 208: { + case 217: { nextTokenIsPotentialStartOfExpression = true; - goto case 209; + goto case 218; } - case 209: { - if (la == null) { currentState = 209; break; } + case 218: { + if (la == null) { currentState = 218; break; } if (la.kind == 88 || la.kind == 105 || la.kind == 204) { - currentState = 319; + currentState = 333; break; } else { if (la.kind == 211 || la.kind == 233) { - currentState = 315; + currentState = 329; break; } else { if (la.kind == 56 || la.kind == 193) { - currentState = 313; + currentState = 327; break; } else { if (la.kind == 189) { - currentState = 311; + currentState = 325; break; } else { if (la.kind == 135) { - currentState = 292; + currentState = 306; break; } else { if (la.kind == 197) { - currentState = 277; + currentState = 291; break; } else { if (la.kind == 231) { - currentState = 273; + currentState = 287; break; } else { if (la.kind == 108) { - currentState = 267; + currentState = 281; break; } else { if (la.kind == 124) { - currentState = 242; + currentState = 253; break; } else { if (la.kind == 118 || la.kind == 171 || la.kind == 194) { if (la.kind == 118 || la.kind == 171) { if (la.kind == 171) { - currentState = 238; + currentState = 249; break; } else { - goto case 238; + goto case 249; } } else { if (la.kind == 194) { - currentState = 236; + currentState = 247; break; } else { goto case 6; @@ -3740,31 +3838,31 @@ partial class ExpressionFinder { } } else { if (la.kind == 215) { - currentState = 218; + currentState = 227; break; } else { if (la.kind == 218) { - currentState = 225; + currentState = 234; break; } else { if (set[108].Get(la.kind)) { if (la.kind == 132) { - currentState = 222; + currentState = 231; break; } else { if (la.kind == 120) { - currentState = 221; + currentState = 230; break; } else { if (la.kind == 89) { - currentState = 220; + currentState = 229; break; } else { if (la.kind == 206) { - goto case 68; + goto case 73; } else { if (la.kind == 195) { - currentState = 218; + currentState = 227; break; } else { goto case 6; @@ -3775,23 +3873,23 @@ partial class ExpressionFinder { } } else { if (la.kind == 191) { - currentState = 216; + currentState = 225; break; } else { if (la.kind == 117) { - currentState = 214; + currentState = 223; break; } else { if (la.kind == 226) { - currentState = 210; + currentState = 219; break; } else { if (set[109].Get(la.kind)) { if (la.kind == 73) { - currentState = 35; + currentState = 37; break; } else { - goto case 35; + goto case 37; } } else { goto case 6; @@ -3813,107 +3911,107 @@ partial class ExpressionFinder { } } } - case 210: { - stateStack.Push(211); - goto case 35; + case 219: { + stateStack.Push(220); + goto case 37; } - case 211: { - stateStack.Push(212); - goto case 200; + case 220: { + stateStack.Push(221); + goto case 209; } - case 212: { - if (la == null) { currentState = 212; break; } + case 221: { + if (la == null) { currentState = 221; break; } Expect(113, la); // "End" - currentState = 213; + currentState = 222; break; } - case 213: { - if (la == null) { currentState = 213; break; } + case 222: { + if (la == null) { currentState = 222; break; } Expect(226, la); // "Using" currentState = stateStack.Pop(); break; } - case 214: { - stateStack.Push(215); - goto case 35; + case 223: { + stateStack.Push(224); + goto case 37; } - case 215: { - if (la == null) { currentState = 215; break; } + case 224: { + if (la == null) { currentState = 224; break; } if (la.kind == 22) { - currentState = 214; + currentState = 223; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 216: { + case 225: { nextTokenIsPotentialStartOfExpression = true; - goto case 217; + goto case 226; } - case 217: { - if (la == null) { currentState = 217; break; } + case 226: { + if (la == null) { currentState = 226; break; } if (la.kind == 184) { - currentState = 35; + currentState = 37; break; } else { - goto case 35; + goto case 37; } } - case 218: { + case 227: { nextTokenIsPotentialStartOfExpression = true; - goto case 219; + goto case 228; } - case 219: { - if (la == null) { currentState = 219; break; } + case 228: { + if (la == null) { currentState = 228; break; } if (set[15].Get(la.kind)) { - goto case 35; + goto case 37; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 220: { - if (la == null) { currentState = 220; break; } + case 229: { + if (la == null) { currentState = 229; break; } if (la.kind == 108) { - goto case 87; + goto case 92; } else { if (la.kind == 124) { - goto case 84; + goto case 89; } else { if (la.kind == 231) { - goto case 58; + goto case 63; } else { goto case 6; } } } } - case 221: { - if (la == null) { currentState = 221; break; } + case 230: { + if (la == null) { currentState = 230; break; } if (la.kind == 108) { - goto case 87; + goto case 92; } else { if (la.kind == 124) { - goto case 84; + goto case 89; } else { if (la.kind == 231) { - goto case 58; + goto case 63; } else { if (la.kind == 197) { - goto case 70; + goto case 75; } else { if (la.kind == 210) { - goto case 66; + goto case 71; } else { if (la.kind == 127) { - goto case 82; + goto case 87; } else { if (la.kind == 186) { - goto case 71; + goto case 76; } else { if (la.kind == 218) { - goto case 62; + goto case 67; } else { goto case 6; } @@ -3925,143 +4023,153 @@ partial class ExpressionFinder { } } } - case 222: { - if (la == null) { currentState = 222; break; } + case 231: { + if (la == null) { currentState = 231; break; } if (set[28].Get(la.kind)) { - goto case 224; + goto case 233; } else { if (la.kind == 5) { - goto case 223; + goto case 232; } else { goto case 6; } } } - case 223: { - if (la == null) { currentState = 223; break; } + case 232: { + if (la == null) { currentState = 232; break; } currentState = stateStack.Pop(); break; } - case 224: { - if (la == null) { currentState = 224; break; } + case 233: { + if (la == null) { currentState = 233; break; } currentState = stateStack.Pop(); break; } - case 225: { - stateStack.Push(226); - goto case 200; + case 234: { + stateStack.Push(235); + goto case 209; } - case 226: { - if (la == null) { currentState = 226; break; } + case 235: { + if (la == null) { currentState = 235; break; } if (la.kind == 75) { - currentState = 230; + currentState = 239; break; } else { if (la.kind == 123) { - currentState = 229; + currentState = 238; break; } else { - goto case 227; + goto case 236; } } } - case 227: { - if (la == null) { currentState = 227; break; } + case 236: { + if (la == null) { currentState = 236; break; } Expect(113, la); // "End" - currentState = 228; + currentState = 237; break; } - case 228: { - if (la == null) { currentState = 228; break; } + case 237: { + if (la == null) { currentState = 237; break; } Expect(218, la); // "Try" currentState = stateStack.Pop(); break; } - case 229: { - stateStack.Push(227); - goto case 200; + case 238: { + stateStack.Push(236); + goto case 209; } - case 230: { - if (la == null) { currentState = 230; break; } + case 239: { + if (la == null) { currentState = 239; break; } if (set[28].Get(la.kind)) { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(233); - goto case 147; + stateStack.Push(242); + goto case 154; } else { - goto case 231; + goto case 240; } } - case 231: { - if (la == null) { currentState = 231; break; } + case 240: { + if (la == null) { currentState = 240; break; } if (la.kind == 229) { - currentState = 232; + currentState = 241; break; } else { - goto case 225; + goto case 234; } } - case 232: { - stateStack.Push(225); - goto case 35; + case 241: { + stateStack.Push(234); + goto case 37; } - case 233: { + case 242: { PopContext(); - goto case 234; + goto case 243; } - case 234: { - if (la == null) { currentState = 234; break; } + case 243: { + if (la == null) { currentState = 243; break; } if (la.kind == 63) { - currentState = 235; - break; + PushContext(Context.Type, la, t); + goto case 244; } else { - goto case 231; + goto case 240; } } - case 235: { - stateStack.Push(231); - goto case 19; + case 244: { + if (la == null) { currentState = 244; break; } + Expect(63, la); // "As" + currentState = 245; + break; } - case 236: { - if (la == null) { currentState = 236; break; } + case 245: { + stateStack.Push(246); + goto case 21; + } + case 246: { + PopContext(); + goto case 240; + } + case 247: { + if (la == null) { currentState = 247; break; } if (la.kind == 163) { - goto case 75; + goto case 80; } else { - goto case 237; + goto case 248; } } - case 237: { - if (la == null) { currentState = 237; break; } + case 248: { + if (la == null) { currentState = 248; break; } if (la.kind == 5) { - goto case 223; + goto case 232; } else { if (set[28].Get(la.kind)) { - goto case 224; + goto case 233; } else { goto case 6; } } } - case 238: { - if (la == null) { currentState = 238; break; } + case 249: { + if (la == null) { currentState = 249; break; } Expect(118, la); // "Error" - currentState = 239; + currentState = 250; break; } - case 239: { + case 250: { nextTokenIsPotentialStartOfExpression = true; - goto case 240; + goto case 251; } - case 240: { - if (la == null) { currentState = 240; break; } + case 251: { + if (la == null) { currentState = 251; break; } if (set[15].Get(la.kind)) { - goto case 35; + goto case 37; } else { if (la.kind == 132) { - currentState = 237; + currentState = 248; break; } else { if (la.kind == 194) { - currentState = 241; + currentState = 252; break; } else { goto case 6; @@ -4069,340 +4177,355 @@ partial class ExpressionFinder { } } } - case 241: { - if (la == null) { currentState = 241; break; } + case 252: { + if (la == null) { currentState = 252; break; } Expect(163, la); // "Next" currentState = stateStack.Pop(); break; } - case 242: { + case 253: { nextTokenIsPotentialStartOfExpression = true; - goto case 243; + goto case 254; } - case 243: { - if (la == null) { currentState = 243; break; } + case 254: { + if (la == null) { currentState = 254; break; } if (set[24].Get(la.kind)) { - stateStack.Push(257); - goto case 253; + stateStack.Push(271); + goto case 264; } else { if (la.kind == 110) { - currentState = 244; + currentState = 255; break; } else { goto case 6; } } } - case 244: { - stateStack.Push(245); - goto case 253; + case 255: { + stateStack.Push(256); + goto case 264; } - case 245: { - if (la == null) { currentState = 245; break; } + case 256: { + if (la == null) { currentState = 256; break; } Expect(138, la); // "In" - currentState = 246; + currentState = 257; break; } - case 246: { - stateStack.Push(247); - goto case 35; + case 257: { + stateStack.Push(258); + goto case 37; } - case 247: { - stateStack.Push(248); - goto case 200; + case 258: { + stateStack.Push(259); + goto case 209; } - case 248: { - if (la == null) { currentState = 248; break; } + case 259: { + if (la == null) { currentState = 259; break; } Expect(163, la); // "Next" - currentState = 249; + currentState = 260; break; } - case 249: { + case 260: { nextTokenIsPotentialStartOfExpression = true; - goto case 250; + goto case 261; } - case 250: { - if (la == null) { currentState = 250; break; } + case 261: { + if (la == null) { currentState = 261; break; } if (set[15].Get(la.kind)) { - goto case 251; + goto case 262; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 251: { - stateStack.Push(252); - goto case 35; + case 262: { + stateStack.Push(263); + goto case 37; } - case 252: { - if (la == null) { currentState = 252; break; } + case 263: { + if (la == null) { currentState = 263; break; } if (la.kind == 22) { - currentState = 251; + currentState = 262; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 253: { + case 264: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(254); - goto case 117; + stateStack.Push(265); + goto case 122; } - case 254: { + case 265: { PopContext(); - goto case 255; + goto case 266; } - case 255: { - if (la == null) { currentState = 255; break; } + case 266: { + if (la == null) { currentState = 266; break; } if (la.kind == 33) { - currentState = 256; + currentState = 267; break; } else { - goto case 256; + goto case 267; } } - case 256: { - if (la == null) { currentState = 256; break; } + case 267: { + if (la == null) { currentState = 267; break; } if (set[21].Get(la.kind)) { - stateStack.Push(256); - goto case 108; + stateStack.Push(267); + goto case 113; } else { if (la.kind == 63) { - currentState = 19; - break; + PushContext(Context.Type, la, t); + goto case 268; } else { currentState = stateStack.Pop(); goto switchlbl; } } } - case 257: { - if (la == null) { currentState = 257; break; } + case 268: { + if (la == null) { currentState = 268; break; } + Expect(63, la); // "As" + currentState = 269; + break; + } + case 269: { + stateStack.Push(270); + goto case 21; + } + case 270: { + PopContext(); + currentState = stateStack.Pop(); + goto switchlbl; + } + case 271: { + if (la == null) { currentState = 271; break; } Expect(20, la); // "=" - currentState = 258; + currentState = 272; break; } - case 258: { - stateStack.Push(259); - goto case 35; + case 272: { + stateStack.Push(273); + goto case 37; } - case 259: { - if (la == null) { currentState = 259; break; } + case 273: { + if (la == null) { currentState = 273; break; } if (la.kind == 205) { - currentState = 266; + currentState = 280; break; } else { - goto case 260; + goto case 274; } } - case 260: { - stateStack.Push(261); - goto case 200; + case 274: { + stateStack.Push(275); + goto case 209; } - case 261: { - if (la == null) { currentState = 261; break; } + case 275: { + if (la == null) { currentState = 275; break; } Expect(163, la); // "Next" - currentState = 262; + currentState = 276; break; } - case 262: { + case 276: { nextTokenIsPotentialStartOfExpression = true; - goto case 263; + goto case 277; } - case 263: { - if (la == null) { currentState = 263; break; } + case 277: { + if (la == null) { currentState = 277; break; } if (set[15].Get(la.kind)) { - goto case 264; + goto case 278; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 264: { - stateStack.Push(265); - goto case 35; + case 278: { + stateStack.Push(279); + goto case 37; } - case 265: { - if (la == null) { currentState = 265; break; } + case 279: { + if (la == null) { currentState = 279; break; } if (la.kind == 22) { - currentState = 264; + currentState = 278; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 266: { - stateStack.Push(260); - goto case 35; + case 280: { + stateStack.Push(274); + goto case 37; } - case 267: { - if (la == null) { currentState = 267; break; } + case 281: { + if (la == null) { currentState = 281; break; } if (la.kind == 224 || la.kind == 231) { - currentState = 270; + currentState = 284; break; } else { if (la.kind == 1 || la.kind == 21) { - stateStack.Push(268); - goto case 200; + stateStack.Push(282); + goto case 209; } else { goto case 6; } } } - case 268: { - if (la == null) { currentState = 268; break; } + case 282: { + if (la == null) { currentState = 282; break; } Expect(152, la); // "Loop" - currentState = 269; + currentState = 283; break; } - case 269: { - if (la == null) { currentState = 269; break; } + case 283: { + if (la == null) { currentState = 283; break; } if (la.kind == 224 || la.kind == 231) { - currentState = 35; + currentState = 37; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 270: { - stateStack.Push(271); - goto case 35; + case 284: { + stateStack.Push(285); + goto case 37; } - case 271: { - stateStack.Push(272); - goto case 200; + case 285: { + stateStack.Push(286); + goto case 209; } - case 272: { - if (la == null) { currentState = 272; break; } + case 286: { + if (la == null) { currentState = 286; break; } Expect(152, la); // "Loop" currentState = stateStack.Pop(); break; } - case 273: { - stateStack.Push(274); - goto case 35; + case 287: { + stateStack.Push(288); + goto case 37; } - case 274: { - stateStack.Push(275); - goto case 200; + case 288: { + stateStack.Push(289); + goto case 209; } - case 275: { - if (la == null) { currentState = 275; break; } + case 289: { + if (la == null) { currentState = 289; break; } Expect(113, la); // "End" - currentState = 276; + currentState = 290; break; } - case 276: { - if (la == null) { currentState = 276; break; } + case 290: { + if (la == null) { currentState = 290; break; } Expect(231, la); // "While" currentState = stateStack.Pop(); break; } - case 277: { + case 291: { nextTokenIsPotentialStartOfExpression = true; - goto case 278; + goto case 292; } - case 278: { - if (la == null) { currentState = 278; break; } + case 292: { + if (la == null) { currentState = 292; break; } if (la.kind == 74) { - currentState = 279; + currentState = 293; break; } else { - goto case 279; + goto case 293; } } - case 279: { - stateStack.Push(280); - goto case 35; + case 293: { + stateStack.Push(294); + goto case 37; } - case 280: { - stateStack.Push(281); + case 294: { + stateStack.Push(295); goto case 15; } - case 281: { - if (la == null) { currentState = 281; break; } + case 295: { + if (la == null) { currentState = 295; break; } if (la.kind == 74) { - currentState = 283; + currentState = 297; break; } else { Expect(113, la); // "End" - currentState = 282; + currentState = 296; break; } } - case 282: { - if (la == null) { currentState = 282; break; } + case 296: { + if (la == null) { currentState = 296; break; } Expect(197, la); // "Select" currentState = stateStack.Pop(); break; } - case 283: { + case 297: { nextTokenIsPotentialStartOfExpression = true; - goto case 284; + goto case 298; } - case 284: { - if (la == null) { currentState = 284; break; } + case 298: { + if (la == null) { currentState = 298; break; } if (la.kind == 111) { - currentState = 285; + currentState = 299; break; } else { if (set[55].Get(la.kind)) { - goto case 286; + goto case 300; } else { Error(la); - goto case 285; + goto case 299; } } } - case 285: { - stateStack.Push(281); - goto case 200; + case 299: { + stateStack.Push(295); + goto case 209; } - case 286: { + case 300: { nextTokenIsPotentialStartOfExpression = true; - goto case 287; + goto case 301; } - case 287: { - if (la == null) { currentState = 287; break; } + case 301: { + if (la == null) { currentState = 301; break; } if (set[110].Get(la.kind)) { if (la.kind == 144) { - currentState = 289; + currentState = 303; break; } else { - goto case 289; + goto case 303; } } else { if (set[15].Get(la.kind)) { - stateStack.Push(288); - goto case 35; + stateStack.Push(302); + goto case 37; } else { Error(la); - goto case 288; + goto case 302; } } } - case 288: { - if (la == null) { currentState = 288; break; } + case 302: { + if (la == null) { currentState = 302; break; } if (la.kind == 22) { - currentState = 286; + currentState = 300; break; } else { - goto case 285; + goto case 299; } } - case 289: { - stateStack.Push(290); - goto case 291; + case 303: { + stateStack.Push(304); + goto case 305; } - case 290: { - stateStack.Push(288); - goto case 38; + case 304: { + stateStack.Push(302); + goto case 40; } - case 291: { - if (la == null) { currentState = 291; break; } + case 305: { + if (la == null) { currentState = 305; break; } if (la.kind == 20) { currentState = stateStack.Pop(); break; @@ -4435,405 +4558,446 @@ partial class ExpressionFinder { } } } - case 292: { - stateStack.Push(293); - goto case 35; + case 306: { + stateStack.Push(307); + goto case 37; } - case 293: { - if (la == null) { currentState = 293; break; } + case 307: { + if (la == null) { currentState = 307; break; } if (la.kind == 214) { - currentState = 301; + currentState = 315; break; } else { - goto case 294; + goto case 308; } } - case 294: { - if (la == null) { currentState = 294; break; } + case 308: { + if (la == null) { currentState = 308; break; } if (la.kind == 1 || la.kind == 21) { - goto case 295; + goto case 309; } else { goto case 6; } } - case 295: { - stateStack.Push(296); - goto case 200; + case 309: { + stateStack.Push(310); + goto case 209; } - case 296: { - if (la == null) { currentState = 296; break; } + case 310: { + if (la == null) { currentState = 310; break; } if (la.kind == 111 || la.kind == 112) { if (la.kind == 111) { - currentState = 300; + currentState = 314; break; } else { if (la.kind == 112) { - currentState = 298; + currentState = 312; break; } else { Error(la); - goto case 295; + goto case 309; } } } else { Expect(113, la); // "End" - currentState = 297; + currentState = 311; break; } } - case 297: { - if (la == null) { currentState = 297; break; } + case 311: { + if (la == null) { currentState = 311; break; } Expect(135, la); // "If" currentState = stateStack.Pop(); break; } - case 298: { - stateStack.Push(299); - goto case 35; + case 312: { + stateStack.Push(313); + goto case 37; } - case 299: { - if (la == null) { currentState = 299; break; } + case 313: { + if (la == null) { currentState = 313; break; } if (la.kind == 214) { - currentState = 295; + currentState = 309; break; } else { - goto case 295; + goto case 309; } } - case 300: { - if (la == null) { currentState = 300; break; } + case 314: { + if (la == null) { currentState = 314; break; } if (la.kind == 135) { - currentState = 298; + currentState = 312; break; } else { - goto case 295; + goto case 309; } } - case 301: { + case 315: { nextTokenIsPotentialStartOfExpression = true; - goto case 302; + goto case 316; } - case 302: { - if (la == null) { currentState = 302; break; } + case 316: { + if (la == null) { currentState = 316; break; } if (set[39].Get(la.kind)) { - goto case 303; + goto case 317; } else { - goto case 294; + goto case 308; } } - case 303: { - stateStack.Push(304); - goto case 208; + case 317: { + stateStack.Push(318); + goto case 217; } - case 304: { - if (la == null) { currentState = 304; break; } + case 318: { + if (la == null) { currentState = 318; break; } if (la.kind == 21) { - currentState = 309; + currentState = 323; break; } else { if (la.kind == 111) { - currentState = 306; + currentState = 320; break; } else { - goto case 305; + goto case 319; } } } - case 305: { - if (la == null) { currentState = 305; break; } + case 319: { + if (la == null) { currentState = 319; break; } Expect(1, la); // EOL currentState = stateStack.Pop(); break; } - case 306: { + case 320: { nextTokenIsPotentialStartOfExpression = true; - goto case 307; + goto case 321; } - case 307: { - if (la == null) { currentState = 307; break; } + case 321: { + if (la == null) { currentState = 321; break; } if (set[39].Get(la.kind)) { - stateStack.Push(308); - goto case 208; + stateStack.Push(322); + goto case 217; } else { - goto case 308; + goto case 322; } } - case 308: { - if (la == null) { currentState = 308; break; } + case 322: { + if (la == null) { currentState = 322; break; } if (la.kind == 21) { - currentState = 306; + currentState = 320; break; } else { - goto case 305; + goto case 319; } } - case 309: { + case 323: { nextTokenIsPotentialStartOfExpression = true; - goto case 310; + goto case 324; } - case 310: { - if (la == null) { currentState = 310; break; } + case 324: { + if (la == null) { currentState = 324; break; } if (set[39].Get(la.kind)) { - goto case 303; + goto case 317; } else { - goto case 304; + goto case 318; } } - case 311: { - stateStack.Push(312); - goto case 56; + case 325: { + stateStack.Push(326); + goto case 61; } - case 312: { - if (la == null) { currentState = 312; break; } + case 326: { + if (la == null) { currentState = 326; break; } if (la.kind == 37) { - currentState = 28; + currentState = 30; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 313: { - stateStack.Push(314); - goto case 35; + case 327: { + stateStack.Push(328); + goto case 37; } - case 314: { - if (la == null) { currentState = 314; break; } + case 328: { + if (la == null) { currentState = 328; break; } Expect(22, la); // "," - currentState = 35; + currentState = 37; break; } - case 315: { - stateStack.Push(316); - goto case 35; + case 329: { + stateStack.Push(330); + goto case 37; } - case 316: { - stateStack.Push(317); - goto case 200; + case 330: { + stateStack.Push(331); + goto case 209; } - case 317: { - if (la == null) { currentState = 317; break; } + case 331: { + if (la == null) { currentState = 331; break; } Expect(113, la); // "End" - currentState = 318; + currentState = 332; break; } - case 318: { - if (la == null) { currentState = 318; break; } + case 332: { + if (la == null) { currentState = 332; break; } if (la.kind == 233) { - goto case 57; + goto case 62; } else { if (la.kind == 211) { - goto case 65; + goto case 70; } else { goto case 6; } } } - case 319: { + case 333: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(320); - goto case 147; + stateStack.Push(334); + goto case 154; } - case 320: { + case 334: { PopContext(); - goto case 321; + goto case 335; } - case 321: { - if (la == null) { currentState = 321; break; } + case 335: { + if (la == null) { currentState = 335; break; } if (la.kind == 33) { - currentState = 322; + currentState = 336; break; } else { - goto case 322; + goto case 336; } } - case 322: { - if (la == null) { currentState = 322; break; } + case 336: { + if (la == null) { currentState = 336; break; } if (la.kind == 37) { - currentState = 333; + currentState = 351; break; } else { - goto case 323; + goto case 337; } } - case 323: { - if (la == null) { currentState = 323; break; } + case 337: { + if (la == null) { currentState = 337; break; } if (la.kind == 22) { - currentState = 327; + currentState = 345; break; } else { if (la.kind == 63) { - currentState = 325; - break; + PushContext(Context.Type, la, t); + goto case 339; } else { - goto case 324; + goto case 338; } } } - case 324: { - if (la == null) { currentState = 324; break; } + case 338: { + if (la == null) { currentState = 338; break; } if (la.kind == 20) { - goto case 160; + goto case 167; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 325: { - if (la == null) { currentState = 325; break; } + case 339: { + if (la == null) { currentState = 339; break; } + Expect(63, la); // "As" + currentState = 340; + break; + } + case 340: { + stateStack.Push(341); + goto case 21; + } + case 341: { + if (la == null) { currentState = 341; break; } if (la.kind == 162) { - currentState = 326; + currentState = 344; break; } else { - goto case 326; + goto case 342; } } - case 326: { - stateStack.Push(324); - goto case 19; + case 342: { + stateStack.Push(343); + goto case 21; } - case 327: { + case 343: { + if (CurrentBlock.context == Context.ObjectCreation) + PopContext(); + PopContext(); + + goto case 338; + } + case 344: { + PushContext(Context.ObjectCreation, la, t); + goto case 342; + } + case 345: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(328); - goto case 147; + stateStack.Push(346); + goto case 154; } - case 328: { + case 346: { PopContext(); - goto case 329; + goto case 347; } - case 329: { - if (la == null) { currentState = 329; break; } + case 347: { + if (la == null) { currentState = 347; break; } if (la.kind == 33) { - currentState = 330; + currentState = 348; break; } else { - goto case 330; + goto case 348; } } - case 330: { - if (la == null) { currentState = 330; break; } + case 348: { + if (la == null) { currentState = 348; break; } if (la.kind == 37) { - currentState = 331; + currentState = 349; break; } else { - goto case 323; + goto case 337; } } - case 331: { - if (la == null) { currentState = 331; break; } + case 349: { + if (la == null) { currentState = 349; break; } if (la.kind == 22) { - currentState = 331; + currentState = 349; break; } else { - goto case 332; + goto case 350; } } - case 332: { - if (la == null) { currentState = 332; break; } + case 350: { + if (la == null) { currentState = 350; break; } Expect(38, la); // ")" - currentState = 323; + currentState = 337; break; } - case 333: { - if (la == null) { currentState = 333; break; } + case 351: { + if (la == null) { currentState = 351; break; } if (la.kind == 22) { - currentState = 333; + currentState = 351; break; } else { - goto case 332; + goto case 350; } } - case 334: { - stateStack.Push(197); - goto case 19; + case 352: { + if (la == null) { currentState = 352; break; } + Expect(63, la); // "As" + currentState = 353; + break; } - case 335: { - stateStack.Push(336); - goto case 337; + case 353: { + stateStack.Push(354); + goto case 21; } - case 336: { - if (la == null) { currentState = 336; break; } + case 354: { + PopContext(); + goto case 206; + } + case 355: { + stateStack.Push(356); + goto case 357; + } + case 356: { + if (la == null) { currentState = 356; break; } if (la.kind == 22) { - currentState = 335; + currentState = 355; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 337: { - if (la == null) { currentState = 337; break; } + case 357: { + if (la == null) { currentState = 357; break; } if (la.kind == 40) { - stateStack.Push(337); - goto case 343; + stateStack.Push(357); + goto case 365; } else { - goto case 338; + goto case 358; } } - case 338: { - if (la == null) { currentState = 338; break; } + case 358: { + if (la == null) { currentState = 358; break; } if (set[111].Get(la.kind)) { - currentState = 338; + currentState = 358; break; } else { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(339); - goto case 147; + stateStack.Push(359); + goto case 154; } } - case 339: { + case 359: { PopContext(); - goto case 340; + goto case 360; } - case 340: { - if (la == null) { currentState = 340; break; } + case 360: { + if (la == null) { currentState = 360; break; } if (la.kind == 63) { - currentState = 342; - break; + PushContext(Context.Type, la, t); + goto case 362; } else { - goto case 341; + goto case 361; } } - case 341: { - if (la == null) { currentState = 341; break; } + case 361: { + if (la == null) { currentState = 361; break; } if (la.kind == 20) { - goto case 160; + goto case 167; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 342: { - stateStack.Push(341); - goto case 19; + case 362: { + if (la == null) { currentState = 362; break; } + Expect(63, la); // "As" + currentState = 363; + break; } - case 343: { - if (la == null) { currentState = 343; break; } + case 363: { + stateStack.Push(364); + goto case 21; + } + case 364: { + PopContext(); + goto case 361; + } + case 365: { + if (la == null) { currentState = 365; break; } Expect(40, la); // "<" - currentState = 344; + currentState = 366; break; } - case 344: { + case 366: { PushContext(Context.Attribute, la, t); - goto case 345; + goto case 367; } - case 345: { - if (la == null) { currentState = 345; break; } + case 367: { + if (la == null) { currentState = 367; break; } if (set[112].Get(la.kind)) { - currentState = 345; + currentState = 367; break; } else { Expect(39, la); // ">" - currentState = 346; + currentState = 368; break; } } - case 346: { + case 368: { PopContext(); - goto case 347; + goto case 369; } - case 347: { - if (la == null) { currentState = 347; break; } + case 369: { + if (la == null) { currentState = 369; break; } if (la.kind == 1) { goto case 17; } else { @@ -4841,70 +5005,70 @@ partial class ExpressionFinder { goto switchlbl; } } - case 348: { - if (la == null) { currentState = 348; break; } + case 370: { + if (la == null) { currentState = 370; break; } Expect(37, la); // "(" - currentState = 349; + currentState = 371; break; } - case 349: { - if (la == null) { currentState = 349; break; } + case 371: { + if (la == null) { currentState = 371; break; } if (set[65].Get(la.kind)) { - stateStack.Push(350); - goto case 335; + stateStack.Push(372); + goto case 355; } else { - goto case 350; + goto case 372; } } - case 350: { - if (la == null) { currentState = 350; break; } + case 372: { + if (la == null) { currentState = 372; break; } Expect(38, la); // ")" - currentState = 351; + currentState = 373; break; } - case 351: { + case 373: { nextTokenIsPotentialStartOfExpression = true; - goto case 352; + goto case 374; } - case 352: { - if (la == null) { currentState = 352; break; } + case 374: { + if (la == null) { currentState = 374; break; } if (set[39].Get(la.kind)) { - goto case 208; + goto case 217; } else { if (la.kind == 1 || la.kind == 21) { - stateStack.Push(353); - goto case 200; + stateStack.Push(375); + goto case 209; } else { goto case 6; } } } - case 353: { - if (la == null) { currentState = 353; break; } + case 375: { + if (la == null) { currentState = 375; break; } Expect(113, la); // "End" - currentState = 354; + currentState = 376; break; } - case 354: { - if (la == null) { currentState = 354; break; } + case 376: { + if (la == null) { currentState = 376; break; } Expect(210, la); // "Sub" currentState = stateStack.Pop(); break; } - case 355: { - if (la == null) { currentState = 355; break; } + case 377: { + if (la == null) { currentState = 377; break; } if (la.kind == 17 || la.kind == 19) { - currentState = 365; + currentState = 387; break; } else { - stateStack.Push(356); - goto case 358; + stateStack.Push(378); + goto case 380; } } - case 356: { - if (la == null) { currentState = 356; break; } + case 378: { + if (la == null) { currentState = 378; break; } if (la.kind == 17) { - currentState = 357; + currentState = 379; break; } else { PopContext(); @@ -4912,34 +5076,34 @@ partial class ExpressionFinder { goto switchlbl; } } - case 357: { - if (la == null) { currentState = 357; break; } + case 379: { + if (la == null) { currentState = 379; break; } if (la.kind == 16) { - currentState = 356; + currentState = 378; break; } else { - goto case 356; + goto case 378; } } - case 358: { - if (la == null) { currentState = 358; break; } + case 380: { + if (la == null) { currentState = 380; break; } Expect(10, la); // XmlOpenTag - currentState = 359; + currentState = 381; break; } - case 359: { - if (la == null) { currentState = 359; break; } + case 381: { + if (la == null) { currentState = 381; break; } if (set[113].Get(la.kind)) { if (set[114].Get(la.kind)) { - currentState = 359; + currentState = 381; break; } else { if (la.kind == 12) { - stateStack.Push(359); - goto case 362; + stateStack.Push(381); + goto case 384; } else { Error(la); - goto case 359; + goto case 381; } } } else { @@ -4948,7 +5112,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 11) { - currentState = 360; + currentState = 382; break; } else { goto case 6; @@ -4956,45 +5120,45 @@ partial class ExpressionFinder { } } } - case 360: { - if (la == null) { currentState = 360; break; } + case 382: { + if (la == null) { currentState = 382; break; } if (set[115].Get(la.kind)) { if (set[116].Get(la.kind)) { - currentState = 360; + currentState = 382; break; } else { if (la.kind == 12) { - stateStack.Push(360); - goto case 362; + stateStack.Push(382); + goto case 384; } else { if (la.kind == 10) { - stateStack.Push(360); - goto case 358; + stateStack.Push(382); + goto case 380; } else { Error(la); - goto case 360; + goto case 382; } } } } else { Expect(15, la); // XmlOpenEndTag - currentState = 361; + currentState = 383; break; } } - case 361: { - if (la == null) { currentState = 361; break; } + case 383: { + if (la == null) { currentState = 383; break; } if (set[117].Get(la.kind)) { if (set[118].Get(la.kind)) { - currentState = 361; + currentState = 383; break; } else { if (la.kind == 12) { - stateStack.Push(361); - goto case 362; + stateStack.Push(383); + goto case 384; } else { Error(la); - goto case 361; + goto case 383; } } } else { @@ -5003,287 +5167,287 @@ partial class ExpressionFinder { break; } } - case 362: { - if (la == null) { currentState = 362; break; } + case 384: { + if (la == null) { currentState = 384; break; } Expect(12, la); // XmlStartInlineVB - currentState = 363; + currentState = 385; break; } - case 363: { - stateStack.Push(364); - goto case 35; + case 385: { + stateStack.Push(386); + goto case 37; } - case 364: { - if (la == null) { currentState = 364; break; } + case 386: { + if (la == null) { currentState = 386; break; } Expect(13, la); // XmlEndInlineVB currentState = stateStack.Pop(); break; } - case 365: { - if (la == null) { currentState = 365; break; } + case 387: { + if (la == null) { currentState = 387; break; } if (la.kind == 16) { - currentState = 355; + currentState = 377; break; } else { - goto case 355; + goto case 377; } } - case 366: { - if (la == null) { currentState = 366; break; } + case 388: { + if (la == null) { currentState = 388; break; } Expect(37, la); // "(" - currentState = 367; + currentState = 389; break; } - case 367: { + case 389: { readXmlIdentifier = true; - stateStack.Push(368); - goto case 147; + stateStack.Push(390); + goto case 154; } - case 368: { - if (la == null) { currentState = 368; break; } + case 390: { + if (la == null) { currentState = 390; break; } Expect(38, la); // ")" - currentState = 119; + currentState = 124; break; } - case 369: { - if (la == null) { currentState = 369; break; } + case 391: { + if (la == null) { currentState = 391; break; } Expect(37, la); // "(" - currentState = 370; + currentState = 392; break; } - case 370: { - stateStack.Push(368); - goto case 19; + case 392: { + stateStack.Push(390); + goto case 21; } - case 371: { + case 393: { nextTokenIsStartOfImportsOrAccessExpression = true; wasQualifierTokenAtStart = true; - goto case 372; + goto case 394; } - case 372: { - if (la == null) { currentState = 372; break; } + case 394: { + if (la == null) { currentState = 394; break; } if (la.kind == 10) { - currentState = 373; + currentState = 395; break; } else { - goto case 373; + goto case 395; } } - case 373: { - stateStack.Push(374); - goto case 56; + case 395: { + stateStack.Push(396); + goto case 61; } - case 374: { - if (la == null) { currentState = 374; break; } + case 396: { + if (la == null) { currentState = 396; break; } if (la.kind == 11) { - currentState = 119; + currentState = 124; break; } else { - goto case 119; + goto case 124; } } - case 375: { - stateStack.Push(368); - goto case 35; + case 397: { + stateStack.Push(390); + goto case 37; } - case 376: { - stateStack.Push(377); - goto case 35; + case 398: { + stateStack.Push(399); + goto case 37; } - case 377: { - if (la == null) { currentState = 377; break; } + case 399: { + if (la == null) { currentState = 399; break; } if (la.kind == 22) { - currentState = 378; + currentState = 400; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 378: { + case 400: { nextTokenIsPotentialStartOfExpression = true; - goto case 379; + goto case 401; } - case 379: { - if (la == null) { currentState = 379; break; } + case 401: { + if (la == null) { currentState = 401; break; } if (set[15].Get(la.kind)) { - goto case 376; + goto case 398; } else { - goto case 377; + goto case 399; } } - case 380: { - if (la == null) { currentState = 380; break; } + case 402: { + if (la == null) { currentState = 402; break; } if (set[8].Get(la.kind)) { - stateStack.Push(381); - goto case 19; + stateStack.Push(403); + goto case 21; } else { - goto case 381; + goto case 403; } } - case 381: { - if (la == null) { currentState = 381; break; } + case 403: { + if (la == null) { currentState = 403; break; } if (la.kind == 22) { - currentState = 380; + currentState = 402; break; } else { - goto case 27; + goto case 29; } } - case 382: { - if (la == null) { currentState = 382; break; } + case 404: { + if (la == null) { currentState = 404; break; } if (set[65].Get(la.kind)) { - stateStack.Push(383); - goto case 335; + stateStack.Push(405); + goto case 355; } else { - goto case 383; + goto case 405; } } - case 383: { - if (la == null) { currentState = 383; break; } + case 405: { + if (la == null) { currentState = 405; break; } Expect(38, la); // ")" currentState = 14; break; } - case 384: { + case 406: { PushContext(Context.IdentifierExpected, la, t); - goto case 385; + goto case 407; } - case 385: { - if (la == null) { currentState = 385; break; } - currentState = 386; + case 407: { + if (la == null) { currentState = 407; break; } + currentState = 408; break; } - case 386: { + case 408: { PopContext(); - goto case 387; + goto case 409; } - case 387: { - if (la == null) { currentState = 387; break; } + case 409: { + if (la == null) { currentState = 409; break; } if (la.kind == 37) { - currentState = 465; + currentState = 501; break; } else { - goto case 388; + goto case 410; } } - case 388: { - if (la == null) { currentState = 388; break; } + case 410: { + if (la == null) { currentState = 410; break; } if (set[119].Get(la.kind)) { - currentState = 388; + currentState = 410; break; } else { if (la.kind == 1 || la.kind == 21) { - stateStack.Push(389); + stateStack.Push(411); goto case 15; } else { - goto case 389; + goto case 411; } } } - case 389: { - if (la == null) { currentState = 389; break; } + case 411: { + if (la == null) { currentState = 411; break; } if (la.kind == 140) { - currentState = 464; + currentState = 500; break; } else { - goto case 390; + goto case 412; } } - case 390: { - if (la == null) { currentState = 390; break; } + case 412: { + if (la == null) { currentState = 412; break; } if (la.kind == 136) { - currentState = 463; + currentState = 499; break; } else { - goto case 391; + goto case 413; } } - case 391: { + case 413: { PushContext(Context.TypeDeclaration, la, t); - goto case 392; + goto case 414; } - case 392: { - if (la == null) { currentState = 392; break; } + case 414: { + if (la == null) { currentState = 414; break; } if (set[79].Get(la.kind)) { - stateStack.Push(392); + stateStack.Push(414); PushContext(Context.Member, la, t); - goto case 396; + goto case 418; } else { Expect(113, la); // "End" - currentState = 393; + currentState = 415; break; } } - case 393: { - if (la == null) { currentState = 393; break; } + case 415: { + if (la == null) { currentState = 415; break; } if (la.kind == 155) { - currentState = 394; + currentState = 416; break; } else { if (la.kind == 84) { - currentState = 394; + currentState = 416; break; } else { if (la.kind == 209) { - currentState = 394; + currentState = 416; break; } else { Error(la); - goto case 394; + goto case 416; } } } } - case 394: { - stateStack.Push(395); + case 416: { + stateStack.Push(417); goto case 15; } - case 395: { + case 417: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 396: { - if (la == null) { currentState = 396; break; } + case 418: { + if (la == null) { currentState = 418; break; } if (la.kind == 40) { - stateStack.Push(396); - goto case 343; + stateStack.Push(418); + goto case 365; } else { - goto case 397; + goto case 419; } } - case 397: { - if (la == null) { currentState = 397; break; } + case 419: { + if (la == null) { currentState = 419; break; } if (set[120].Get(la.kind)) { - currentState = 397; + currentState = 419; break; } else { if (set[87].Get(la.kind)) { - stateStack.Push(398); - goto case 455; + stateStack.Push(420); + goto case 489; } else { if (la.kind == 127 || la.kind == 210) { - stateStack.Push(398); - goto case 442; + stateStack.Push(420); + goto case 474; } else { if (la.kind == 101) { - stateStack.Push(398); - goto case 433; + stateStack.Push(420); + goto case 458; } else { if (la.kind == 119) { - stateStack.Push(398); - goto case 423; + stateStack.Push(420); + goto case 446; } else { if (la.kind == 98) { - stateStack.Push(398); - goto case 411; + stateStack.Push(420); + goto case 434; } else { if (la.kind == 172) { - stateStack.Push(398); - goto case 399; + stateStack.Push(420); + goto case 421; } else { Error(la); - goto case 398; + goto case 420; } } } @@ -5292,381 +5456,443 @@ partial class ExpressionFinder { } } } - case 398: { + case 420: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 399: { - if (la == null) { currentState = 399; break; } + case 421: { + if (la == null) { currentState = 421; break; } Expect(172, la); // "Operator" - currentState = 400; + currentState = 422; break; } - case 400: { + case 422: { PushContext(Context.IdentifierExpected, la, t); - goto case 401; + goto case 423; } - case 401: { - if (la == null) { currentState = 401; break; } - currentState = 402; + case 423: { + if (la == null) { currentState = 423; break; } + currentState = 424; break; } - case 402: { + case 424: { PopContext(); - goto case 403; + goto case 425; } - case 403: { - if (la == null) { currentState = 403; break; } + case 425: { + if (la == null) { currentState = 425; break; } Expect(37, la); // "(" - currentState = 404; + currentState = 426; break; } - case 404: { - stateStack.Push(405); - goto case 335; + case 426: { + stateStack.Push(427); + goto case 355; } - case 405: { - if (la == null) { currentState = 405; break; } + case 427: { + if (la == null) { currentState = 427; break; } Expect(38, la); // ")" - currentState = 406; + currentState = 428; break; } - case 406: { - if (la == null) { currentState = 406; break; } + case 428: { + if (la == null) { currentState = 428; break; } if (la.kind == 63) { - currentState = 410; + currentState = 432; break; } else { - goto case 407; + goto case 429; } } - case 407: { - stateStack.Push(408); - goto case 200; + case 429: { + stateStack.Push(430); + goto case 209; } - case 408: { - if (la == null) { currentState = 408; break; } + case 430: { + if (la == null) { currentState = 430; break; } Expect(113, la); // "End" - currentState = 409; + currentState = 431; break; } - case 409: { - if (la == null) { currentState = 409; break; } + case 431: { + if (la == null) { currentState = 431; break; } Expect(172, la); // "Operator" currentState = 15; break; } - case 410: { - if (la == null) { currentState = 410; break; } + case 432: { + if (la == null) { currentState = 432; break; } if (la.kind == 40) { - stateStack.Push(410); - goto case 343; + stateStack.Push(432); + goto case 365; } else { - stateStack.Push(407); - goto case 19; + PushContext(Context.Type, la, t); + stateStack.Push(433); + goto case 21; } } - case 411: { - if (la == null) { currentState = 411; break; } + case 433: { + PopContext(); + goto case 429; + } + case 434: { + if (la == null) { currentState = 434; break; } Expect(98, la); // "Custom" - currentState = 412; + currentState = 435; break; } - case 412: { - stateStack.Push(413); - goto case 423; + case 435: { + stateStack.Push(436); + goto case 446; } - case 413: { - if (la == null) { currentState = 413; break; } + case 436: { + if (la == null) { currentState = 436; break; } if (set[83].Get(la.kind)) { - goto case 415; + goto case 438; } else { Expect(113, la); // "End" - currentState = 414; + currentState = 437; break; } } - case 414: { - if (la == null) { currentState = 414; break; } + case 437: { + if (la == null) { currentState = 437; break; } Expect(119, la); // "Event" currentState = 15; break; } - case 415: { - if (la == null) { currentState = 415; break; } + case 438: { + if (la == null) { currentState = 438; break; } if (la.kind == 40) { - stateStack.Push(415); - goto case 343; + stateStack.Push(438); + goto case 365; } else { if (la.kind == 56) { - currentState = 416; + currentState = 439; break; } else { if (la.kind == 193) { - currentState = 416; + currentState = 439; break; } else { if (la.kind == 189) { - currentState = 416; + currentState = 439; break; } else { Error(la); - goto case 416; + goto case 439; } } } } } - case 416: { - if (la == null) { currentState = 416; break; } + case 439: { + if (la == null) { currentState = 439; break; } Expect(37, la); // "(" - currentState = 417; + currentState = 440; break; } - case 417: { - stateStack.Push(418); - goto case 335; + case 440: { + stateStack.Push(441); + goto case 355; } - case 418: { - if (la == null) { currentState = 418; break; } + case 441: { + if (la == null) { currentState = 441; break; } Expect(38, la); // ")" - currentState = 419; + currentState = 442; break; } - case 419: { - stateStack.Push(420); - goto case 200; + case 442: { + stateStack.Push(443); + goto case 209; } - case 420: { - if (la == null) { currentState = 420; break; } + case 443: { + if (la == null) { currentState = 443; break; } Expect(113, la); // "End" - currentState = 421; + currentState = 444; break; } - case 421: { - if (la == null) { currentState = 421; break; } + case 444: { + if (la == null) { currentState = 444; break; } if (la.kind == 56) { - currentState = 422; + currentState = 445; break; } else { if (la.kind == 193) { - currentState = 422; + currentState = 445; break; } else { if (la.kind == 189) { - currentState = 422; + currentState = 445; break; } else { Error(la); - goto case 422; + goto case 445; } } } } - case 422: { - stateStack.Push(413); + case 445: { + stateStack.Push(436); goto case 15; } - case 423: { - if (la == null) { currentState = 423; break; } + case 446: { + if (la == null) { currentState = 446; break; } Expect(119, la); // "Event" - currentState = 424; + currentState = 447; break; } - case 424: { + case 447: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(425); - goto case 147; + stateStack.Push(448); + goto case 154; } - case 425: { + case 448: { PopContext(); - goto case 426; + goto case 449; } - case 426: { - if (la == null) { currentState = 426; break; } + case 449: { + if (la == null) { currentState = 449; break; } if (la.kind == 63) { - currentState = 432; - break; + PushContext(Context.Type, la, t); + goto case 455; } else { if (set[121].Get(la.kind)) { if (la.kind == 37) { - currentState = 430; + currentState = 453; break; } else { - goto case 427; + goto case 450; } } else { Error(la); - goto case 427; + goto case 450; } } } - case 427: { - if (la == null) { currentState = 427; break; } + case 450: { + if (la == null) { currentState = 450; break; } if (la.kind == 136) { - currentState = 428; + currentState = 451; break; } else { goto case 15; } } - case 428: { - stateStack.Push(429); - goto case 19; + case 451: { + stateStack.Push(452); + goto case 21; } - case 429: { - if (la == null) { currentState = 429; break; } + case 452: { + if (la == null) { currentState = 452; break; } if (la.kind == 22) { - currentState = 428; + currentState = 451; break; } else { goto case 15; } } - case 430: { - if (la == null) { currentState = 430; break; } + case 453: { + if (la == null) { currentState = 453; break; } if (set[65].Get(la.kind)) { - stateStack.Push(431); - goto case 335; + stateStack.Push(454); + goto case 355; } else { - goto case 431; + goto case 454; } } - case 431: { - if (la == null) { currentState = 431; break; } + case 454: { + if (la == null) { currentState = 454; break; } Expect(38, la); // ")" - currentState = 427; + currentState = 450; break; } - case 432: { - stateStack.Push(427); - goto case 19; + case 455: { + if (la == null) { currentState = 455; break; } + Expect(63, la); // "As" + currentState = 456; + break; } - case 433: { - if (la == null) { currentState = 433; break; } + case 456: { + stateStack.Push(457); + goto case 21; + } + case 457: { + PopContext(); + goto case 450; + } + case 458: { + if (la == null) { currentState = 458; break; } Expect(101, la); // "Declare" - currentState = 434; + currentState = 459; break; } - case 434: { - if (la == null) { currentState = 434; break; } + case 459: { + if (la == null) { currentState = 459; break; } if (la.kind == 62 || la.kind == 66 || la.kind == 223) { - currentState = 435; + currentState = 460; break; } else { - goto case 435; + goto case 460; } } - case 435: { - if (la == null) { currentState = 435; break; } + case 460: { + if (la == null) { currentState = 460; break; } if (la.kind == 210) { - currentState = 436; + currentState = 461; break; } else { if (la.kind == 127) { - currentState = 436; + currentState = 461; break; } else { Error(la); - goto case 436; + goto case 461; } } } - case 436: { + case 461: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(437); - goto case 147; + stateStack.Push(462); + goto case 154; } - case 437: { + case 462: { PopContext(); - goto case 438; + goto case 463; } - case 438: { - if (la == null) { currentState = 438; break; } + case 463: { + if (la == null) { currentState = 463; break; } Expect(149, la); // "Lib" - currentState = 439; + currentState = 464; break; } - case 439: { - if (la == null) { currentState = 439; break; } + case 464: { + if (la == null) { currentState = 464; break; } Expect(3, la); // LiteralString - currentState = 440; + currentState = 465; break; } - case 440: { - if (la == null) { currentState = 440; break; } + case 465: { + if (la == null) { currentState = 465; break; } if (la.kind == 59) { - currentState = 441; + currentState = 473; break; } else { - goto case 13; + goto case 466; } } - case 441: { - if (la == null) { currentState = 441; break; } + case 466: { + if (la == null) { currentState = 466; break; } + if (la.kind == 37) { + currentState = 471; + break; + } else { + goto case 467; + } + } + case 467: { + if (la == null) { currentState = 467; break; } + if (la.kind == 63) { + PushContext(Context.Type, la, t); + goto case 468; + } else { + goto case 15; + } + } + case 468: { + if (la == null) { currentState = 468; break; } + Expect(63, la); // "As" + currentState = 469; + break; + } + case 469: { + stateStack.Push(470); + goto case 21; + } + case 470: { + PopContext(); + goto case 15; + } + case 471: { + if (la == null) { currentState = 471; break; } + if (set[65].Get(la.kind)) { + stateStack.Push(472); + goto case 355; + } else { + goto case 472; + } + } + case 472: { + if (la == null) { currentState = 472; break; } + Expect(38, la); // ")" + currentState = 467; + break; + } + case 473: { + if (la == null) { currentState = 473; break; } Expect(3, la); // LiteralString - currentState = 13; + currentState = 466; break; } - case 442: { - if (la == null) { currentState = 442; break; } + case 474: { + if (la == null) { currentState = 474; break; } if (la.kind == 210) { - currentState = 443; + currentState = 475; break; } else { if (la.kind == 127) { - currentState = 443; + currentState = 475; break; } else { Error(la); - goto case 443; + goto case 475; } } } - case 443: { + case 475: { PushContext(Context.IdentifierExpected, la, t); - goto case 444; + goto case 476; } - case 444: { - if (la == null) { currentState = 444; break; } - currentState = 445; + case 476: { + if (la == null) { currentState = 476; break; } + currentState = 477; break; } - case 445: { + case 477: { PopContext(); - goto case 446; + goto case 478; } - case 446: { - if (la == null) { currentState = 446; break; } + case 478: { + if (la == null) { currentState = 478; break; } if (la.kind == 37) { - currentState = 453; + currentState = 487; break; } else { - goto case 447; + goto case 479; } } - case 447: { - if (la == null) { currentState = 447; break; } + case 479: { + if (la == null) { currentState = 479; break; } if (la.kind == 63) { - currentState = 452; - break; + PushContext(Context.Type, la, t); + goto case 484; } else { - goto case 448; + goto case 480; } } - case 448: { - stateStack.Push(449); - goto case 200; + case 480: { + stateStack.Push(481); + goto case 209; } - case 449: { - if (la == null) { currentState = 449; break; } + case 481: { + if (la == null) { currentState = 481; break; } Expect(113, la); // "End" - currentState = 450; + currentState = 482; break; } - case 450: { - if (la == null) { currentState = 450; break; } + case 482: { + if (la == null) { currentState = 482; break; } if (la.kind == 210) { currentState = 15; break; @@ -5675,197 +5901,249 @@ partial class ExpressionFinder { currentState = 15; break; } else { - goto case 451; + goto case 483; } } } - case 451: { + case 483: { Error(la); goto case 15; } - case 452: { - stateStack.Push(448); - goto case 19; + case 484: { + if (la == null) { currentState = 484; break; } + Expect(63, la); // "As" + currentState = 485; + break; } - case 453: { - if (la == null) { currentState = 453; break; } + case 485: { + stateStack.Push(486); + goto case 21; + } + case 486: { + PopContext(); + goto case 480; + } + case 487: { + if (la == null) { currentState = 487; break; } if (set[65].Get(la.kind)) { - stateStack.Push(454); - goto case 335; + stateStack.Push(488); + goto case 355; } else { - goto case 454; + goto case 488; } } - case 454: { - if (la == null) { currentState = 454; break; } + case 488: { + if (la == null) { currentState = 488; break; } Expect(38, la); // ")" - currentState = 447; + currentState = 479; break; } - case 455: { - if (la == null) { currentState = 455; break; } + case 489: { + if (la == null) { currentState = 489; break; } if (la.kind == 88) { - currentState = 456; + currentState = 490; break; } else { - goto case 456; + goto case 490; } } - case 456: { + case 490: { PushContext(Context.IdentifierExpected, la, t); - stateStack.Push(457); - goto case 462; + stateStack.Push(491); + goto case 498; } - case 457: { + case 491: { PopContext(); - goto case 458; + goto case 492; } - case 458: { - if (la == null) { currentState = 458; break; } + case 492: { + if (la == null) { currentState = 492; break; } if (la.kind == 63) { - currentState = 461; - break; + PushContext(Context.Type, la, t); + goto case 495; } else { - goto case 459; + goto case 493; } } - case 459: { - if (la == null) { currentState = 459; break; } + case 493: { + if (la == null) { currentState = 493; break; } if (la.kind == 20) { - currentState = 460; + currentState = 494; break; } else { goto case 15; } } - case 460: { + case 494: { stateStack.Push(15); - goto case 35; + goto case 37; } - case 461: { - stateStack.Push(459); - goto case 19; + case 495: { + if (la == null) { currentState = 495; break; } + Expect(63, la); // "As" + currentState = 496; + break; } - case 462: { - if (la == null) { currentState = 462; break; } + case 496: { + stateStack.Push(497); + goto case 21; + } + case 497: { + PopContext(); + goto case 493; + } + case 498: { + if (la == null) { currentState = 498; break; } if (set[105].Get(la.kind)) { currentState = stateStack.Pop(); break; } else { if (la.kind == 58) { - goto case 99; + goto case 104; } else { if (la.kind == 126) { - goto case 83; + goto case 88; } else { goto case 6; } } } } - case 463: { - if (la == null) { currentState = 463; break; } + case 499: { + if (la == null) { currentState = 499; break; } if (set[38].Get(la.kind)) { - currentState = 463; + currentState = 499; break; } else { - stateStack.Push(391); + stateStack.Push(413); goto case 15; } } - case 464: { - if (la == null) { currentState = 464; break; } + case 500: { + if (la == null) { currentState = 500; break; } if (set[38].Get(la.kind)) { - currentState = 464; + currentState = 500; break; } else { - stateStack.Push(390); + stateStack.Push(412); goto case 15; } } - case 465: { - if (la == null) { currentState = 465; break; } + case 501: { + if (la == null) { currentState = 501; break; } Expect(169, la); // "Of" - currentState = 466; + currentState = 502; break; } - case 466: { - if (la == null) { currentState = 466; break; } + case 502: { + if (la == null) { currentState = 502; break; } if (la.kind == 138 || la.kind == 178) { - currentState = 467; + currentState = 503; break; } else { - goto case 467; + goto case 503; } } - case 467: { - stateStack.Push(468); - goto case 475; + case 503: { + stateStack.Push(504); + goto case 516; } - case 468: { - if (la == null) { currentState = 468; break; } + case 504: { + if (la == null) { currentState = 504; break; } if (la.kind == 63) { - currentState = 470; - break; + PushContext(Context.Type, la, t); + goto case 517; } else { - goto case 469; + goto case 505; } } - case 469: { - if (la == null) { currentState = 469; break; } + case 505: { + if (la == null) { currentState = 505; break; } if (la.kind == 22) { - currentState = 466; + currentState = 506; break; } else { Expect(38, la); // ")" - currentState = 388; + currentState = 410; break; } } - case 470: { - stateStack.Push(469); - goto case 471; + case 506: { + if (la == null) { currentState = 506; break; } + if (la.kind == 138 || la.kind == 178) { + currentState = 507; + break; + } else { + goto case 507; + } } - case 471: { - if (la == null) { currentState = 471; break; } + case 507: { + stateStack.Push(508); + goto case 516; + } + case 508: { + if (la == null) { currentState = 508; break; } + if (la.kind == 63) { + PushContext(Context.Type, la, t); + goto case 509; + } else { + goto case 505; + } + } + case 509: { + if (la == null) { currentState = 509; break; } + Expect(63, la); // "As" + currentState = 510; + break; + } + case 510: { + stateStack.Push(511); + goto case 512; + } + case 511: { + PopContext(); + goto case 505; + } + case 512: { + if (la == null) { currentState = 512; break; } if (set[93].Get(la.kind)) { - goto case 474; + goto case 515; } else { if (la.kind == 35) { - currentState = 472; + currentState = 513; break; } else { goto case 6; } } } - case 472: { - stateStack.Push(473); - goto case 474; + case 513: { + stateStack.Push(514); + goto case 515; } - case 473: { - if (la == null) { currentState = 473; break; } + case 514: { + if (la == null) { currentState = 514; break; } if (la.kind == 22) { - currentState = 472; + currentState = 513; break; } else { - goto case 45; + goto case 47; } } - case 474: { - if (la == null) { currentState = 474; break; } + case 515: { + if (la == null) { currentState = 515; break; } if (set[8].Get(la.kind)) { - currentState = 20; + currentState = 22; break; } else { if (la.kind == 162) { - goto case 76; + goto case 81; } else { if (la.kind == 84) { - goto case 92; + goto case 97; } else { if (la.kind == 209) { - goto case 67; + goto case 72; } else { goto case 6; } @@ -5873,85 +6151,85 @@ partial class ExpressionFinder { } } } - case 475: { - if (la == null) { currentState = 475; break; } + case 516: { + if (la == null) { currentState = 516; break; } if (la.kind == 2) { - goto case 100; + goto case 105; } else { if (la.kind == 62) { - goto case 98; + goto case 103; } else { if (la.kind == 64) { - goto case 97; + goto case 102; } else { if (la.kind == 65) { - goto case 96; + goto case 101; } else { if (la.kind == 66) { - goto case 95; + goto case 100; } else { if (la.kind == 67) { - goto case 94; + goto case 99; } else { if (la.kind == 70) { - goto case 93; + goto case 98; } else { if (la.kind == 87) { - goto case 91; + goto case 96; } else { if (la.kind == 104) { - goto case 89; + goto case 94; } else { if (la.kind == 107) { - goto case 88; + goto case 93; } else { if (la.kind == 116) { - goto case 86; + goto case 91; } else { if (la.kind == 121) { - goto case 85; + goto case 90; } else { if (la.kind == 133) { - goto case 81; + goto case 86; } else { if (la.kind == 139) { - goto case 80; + goto case 85; } else { if (la.kind == 143) { - goto case 79; + goto case 84; } else { if (la.kind == 146) { - goto case 78; + goto case 83; } else { if (la.kind == 147) { - goto case 77; + goto case 82; } else { if (la.kind == 170) { - goto case 74; + goto case 79; } else { if (la.kind == 176) { - goto case 73; + goto case 78; } else { if (la.kind == 184) { - goto case 72; + goto case 77; } else { if (la.kind == 203) { - goto case 69; + goto case 74; } else { if (la.kind == 212) { - goto case 64; + goto case 69; } else { if (la.kind == 213) { - goto case 63; + goto case 68; } else { if (la.kind == 223) { - goto case 61; + goto case 66; } else { if (la.kind == 224) { - goto case 60; + goto case 65; } else { if (la.kind == 230) { - goto case 59; + goto case 64; } else { goto case 6; } @@ -5981,133 +6259,147 @@ partial class ExpressionFinder { } } } - case 476: { + case 517: { + if (la == null) { currentState = 517; break; } + Expect(63, la); // "As" + currentState = 518; + break; + } + case 518: { + stateStack.Push(519); + goto case 512; + } + case 519: { + PopContext(); + goto case 505; + } + case 520: { PushContext(Context.IdentifierExpected, la, t); - goto case 477; + goto case 521; } - case 477: { - if (la == null) { currentState = 477; break; } + case 521: { + if (la == null) { currentState = 521; break; } if (set[38].Get(la.kind)) { - currentState = 477; + currentState = 521; break; } else { PopContext(); - stateStack.Push(478); + stateStack.Push(522); goto case 15; } } - case 478: { - if (la == null) { currentState = 478; break; } + case 522: { + if (la == null) { currentState = 522; break; } if (set[3].Get(la.kind)) { - stateStack.Push(478); + stateStack.Push(522); goto case 5; } else { Expect(113, la); // "End" - currentState = 479; + currentState = 523; break; } } - case 479: { - if (la == null) { currentState = 479; break; } + case 523: { + if (la == null) { currentState = 523; break; } Expect(160, la); // "Namespace" currentState = 15; break; } - case 480: { - if (la == null) { currentState = 480; break; } + case 524: { + if (la == null) { currentState = 524; break; } Expect(137, la); // "Imports" - currentState = 481; + currentState = 525; break; } - case 481: { + case 525: { nextTokenIsStartOfImportsOrAccessExpression = true; if (la != null) CurrentBlock.lastExpressionStart = la.Location; - goto case 482; + goto case 526; } - case 482: { - if (la == null) { currentState = 482; break; } + case 526: { + if (la == null) { currentState = 526; break; } if (set[8].Get(la.kind)) { - currentState = 488; + currentState = 532; break; } else { if (la.kind == 10) { - currentState = 484; + currentState = 528; break; } else { Error(la); - goto case 483; + goto case 527; } } } - case 483: { + case 527: { PopContext(); goto case 15; } - case 484: { - stateStack.Push(485); - goto case 147; + case 528: { + stateStack.Push(529); + goto case 154; } - case 485: { - if (la == null) { currentState = 485; break; } + case 529: { + if (la == null) { currentState = 529; break; } Expect(20, la); // "=" - currentState = 486; + currentState = 530; break; } - case 486: { - if (la == null) { currentState = 486; break; } + case 530: { + if (la == null) { currentState = 530; break; } Expect(3, la); // LiteralString - currentState = 487; + currentState = 531; break; } - case 487: { - if (la == null) { currentState = 487; break; } + case 531: { + if (la == null) { currentState = 531; break; } Expect(11, la); // XmlCloseTag - currentState = 483; + currentState = 527; break; } - case 488: { - if (la == null) { currentState = 488; break; } + case 532: { + if (la == null) { currentState = 532; break; } if (la.kind == 37) { - stateStack.Push(488); - goto case 24; + stateStack.Push(532); + goto case 26; } else { if (la.kind == 20 || la.kind == 26) { - currentState = 489; + currentState = 533; break; } else { - goto case 483; + goto case 527; } } } - case 489: { - stateStack.Push(483); - goto case 19; + case 533: { + stateStack.Push(527); + goto case 21; } - case 490: { - if (la == null) { currentState = 490; break; } + case 534: { + if (la == null) { currentState = 534; break; } Expect(173, la); // "Option" - currentState = 491; + currentState = 535; break; } - case 491: { - if (la == null) { currentState = 491; break; } + case 535: { + if (la == null) { currentState = 535; break; } if (la.kind == 121 || la.kind == 139 || la.kind == 207) { - currentState = 493; + currentState = 537; break; } else { if (la.kind == 87) { - currentState = 492; + currentState = 536; break; } else { - goto case 451; + goto case 483; } } } - case 492: { - if (la == null) { currentState = 492; break; } + case 536: { + if (la == null) { currentState = 536; break; } if (la.kind == 213) { currentState = 15; break; @@ -6116,12 +6408,12 @@ partial class ExpressionFinder { currentState = 15; break; } else { - goto case 451; + goto case 483; } } } - case 493: { - if (la == null) { currentState = 493; break; } + case 537: { + if (la == null) { currentState = 537; break; } if (la.kind == 170 || la.kind == 171) { currentState = 15; break; @@ -6152,8 +6444,8 @@ partial class ExpressionFinder { new BitArray(new int[] {-2, -1, -1, -1, -1, -1, -1, -1}), new BitArray(new int[] {2097154, -2147483616, 0, 0, 0, 0, 0, 0}), new BitArray(new int[] {4, 1140850688, 8650975, 1108355356, 9218084, 17106176, -533656048, 67}), - new BitArray(new int[] {-940564478, 889192437, 65, 1074825472, 72844576, 231424, 22030368, 4704}), - new BitArray(new int[] {-940564478, 889192405, 65, 1074825472, 72844576, 231424, 22030368, 4704}), + new BitArray(new int[] {-940564474, 1962934261, 8650975, 1108388124, 81767716, 17272068, -512676304, 4707}), + new BitArray(new int[] {-940564474, 1962934229, 8650975, 1108388124, 81767716, 17272068, -512676304, 4707}), new BitArray(new int[] {4, -16777216, -1, -1, -1, -1, -1, 16383}), new BitArray(new int[] {-62257156, 1174405224, -51646385, -972026621, -1039365982, 17106484, -1707866112, 8257}), new BitArray(new int[] {-62257156, 1174405224, -51646385, -972026621, -1039365982, 17105972, -1707866112, 8257}), diff --git a/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs b/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs index e6987c87dc..692a008b56 100644 --- a/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs +++ b/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs @@ -83,6 +83,8 @@ End Class enter Member enter IdentifierExpected exit IdentifierExpected + enter Type + exit Type enter Expression enter Expression enter Expression @@ -295,6 +297,8 @@ End Class enter Expression exit Expression exit IdentifierExpected + enter Type + exit Type enter Expression enter Expression enter Expression @@ -311,6 +315,8 @@ End Class enter Expression exit Expression exit IdentifierExpected + enter Type + exit Type enter Expression enter Expression enter Expression @@ -323,6 +329,8 @@ End Class exit Body enter IdentifierExpected exit IdentifierExpected + enter Type + exit Type enter Body exit Body exit Body @@ -352,6 +360,8 @@ End Class", enter Member enter IdentifierExpected exit IdentifierExpected + enter Type + exit Type exit Member enter Member enter IdentifierExpected @@ -465,18 +475,20 @@ End Module", exit Expression enter Expression enter Expression - enter Expression + enter ObjectCreation enter Expression enter Expression + enter Expression + exit Expression exit Expression exit Expression - exit Expression - enter Expression enter Expression enter Expression + enter Expression + exit Expression exit Expression exit Expression - exit Expression + exit ObjectCreation exit Expression exit Expression exit Expression @@ -522,7 +534,7 @@ exit Global RunTest(@"Imports System Imports System.Linq Imports System.Collections.Generic", - @"enter Global + @"enter Global enter Importable exit Importable enter Importable diff --git a/src/Main/Base/Test/VBExpressionFinderTests.cs b/src/Main/Base/Test/VBExpressionFinderTests.cs index 40108c1a84..82aa8835bf 100644 --- a/src/Main/Base/Test/VBExpressionFinderTests.cs +++ b/src/Main/Base/Test/VBExpressionFinderTests.cs @@ -49,6 +49,14 @@ Class MainClass End Class "; + const string program4 = @" +Class MainClass + Sub A + Dim a + End Sub +End Class + "; + VBNetExpressionFinder ef; [SetUp] @@ -83,7 +91,7 @@ End Class [Test] public void FindSimple() { - Find(program2, "sole", 0,"Con", ExpressionContext.Default); + Find(program2, "sole", 0,"Con", ExpressionContext.MethodBody); } [Test] @@ -107,7 +115,7 @@ End Class [Test] public void ForEachLoop() { - Find(program1, "loopVarName", 4, "loop", ExpressionContext.Default); + Find(program1, "loopVarName", 4, "loop", ExpressionContext.IdentifierExpected); } [Test] @@ -117,6 +125,22 @@ End Class } #endregion + #region Context Tests + void ContextTest(string program, string location, int offset, ExpressionContext context) + { + int pos = program.IndexOf(location); + if (pos < 0) Assert.Fail("location not found in program"); + ExpressionResult er = ef.FindExpression(program, pos + offset); + Assert.AreEqual(context.ToString(), er.Context.ToString()); + } + + [Test] + public void ContextAfterDimIdentifier() + { + ContextTest(program4, " a ", 3, ExpressionContext.MethodBody); + } + #endregion + #region FindFull [Test] public void Simple() diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs index 23ddcf3947..1e40e77ac4 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs @@ -1139,8 +1139,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver List result = new List(); if (language == NR.SupportedLanguage.VBNet) { - if (context == ExpressionContext.MethodBody) - CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else { if (context == ExpressionContext.TypeDeclaration) { AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.TypeLevel); diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs index 63bddf13d7..3eb5781bb2 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/VBNet/VBNetExpressionFinder.cs @@ -59,18 +59,23 @@ namespace ICSharpCode.SharpDevelop.Dom.VBNet ExpressionFinder p = new ExpressionFinder(); lexer = ParserFactory.CreateLexer(SupportedLanguage.VBNet, new StringReader(text)); - Token t; + Token t = lexer.NextToken(); - do { - t = lexer.NextToken(); - if (t.Location >= targetPosition) - break; + while (t.EndLocation < targetPosition) { p.InformToken(t); - } while (t.EndLocation < targetPosition); + t = lexer.NextToken(); + } + + p.Advance(); var block = p.CurrentBlock; - p.Advance(); + ExpressionContext context = p.IsIdentifierExpected ? ExpressionContext.IdentifierExpected : GetContext(block); + + if (t.Location < targetPosition) { + p.InformToken(t); + p.Advance(); + } BitArray expectedSet; @@ -81,11 +86,10 @@ namespace ICSharpCode.SharpDevelop.Dom.VBNet } if (p.NextTokenIsPotentialStartOfExpression) - return new ExpressionResult("", DomRegion.Empty, GetContext(p.CurrentBlock), expectedSet); + return new ExpressionResult("", DomRegion.Empty, GetContext(block), expectedSet); int lastExpressionStartOffset = LocationToOffset(block.lastExpressionStart); - ExpressionContext context = p.IsIdentifierExpected ? ExpressionContext.IdentifierExpected : GetContext(block); if (lastExpressionStartOffset < 0) return new ExpressionResult(null, DomRegion.Empty, context, expectedSet); @@ -130,10 +134,14 @@ namespace ICSharpCode.SharpDevelop.Dom.VBNet return ExpressionContext.IdentifierExpected; case Context.TypeDeclaration: return ExpressionContext.TypeDeclaration; + case Context.Type: + return ExpressionContext.Type; case Context.Body: return ExpressionContext.MethodBody; case Context.Importable: return ExpressionContext.Importable; + case Context.ObjectCreation: + return ExpressionContext.ObjectCreation; } return ExpressionContext.Default; @@ -190,4 +198,4 @@ namespace ICSharpCode.SharpDevelop.Dom.VBNet #endregion } -} +} \ No newline at end of file