diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/Parser.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/Parser.cs deleted file mode 100644 index 181a3ff5b4..0000000000 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/Parser.cs +++ /dev/null @@ -1,3057 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; -using System.Collections; -using System.Collections.Generic; -using ICSharpCode.NRefactory.Parser; - - - -namespace ICSharpCode.VBNetBinding { - - - -partial class VBIndentationStrategy { - const int startOfExpression = 35; - const int endOfStatementTerminatorAndBlock = 82; - - const bool T = true; - const bool x = false; - - int currentState = 0; - - readonly Stack stateStack = new Stack(); - List errors = new List(); - - VBIndentationStrategy() - { - stateStack.Push(-1); // required so that we don't crash when leaving the root production - } - - void Expect(int expectedKind, Token la) - { - if (la.Kind != expectedKind) { - Error(la); - Console.WriteLine("expected: " + expectedKind); - } - } - - void Error(Token la) - { - Console.WriteLine("not expected: " + la); - errors.Add(la); - } - - Token t; - - public void InformToken(Token la) - { - switchlbl: switch (currentState) { - case 0: { - if (la == null) { currentState = 0; break; } - if (set[0].Get(la.Kind)) { - currentState = 0; - break; - } else { - goto case 1; - } - } - case 1: { - if (la == null) { currentState = 1; break; } - if (set[1].Get(la.Kind)) { - stateStack.Push(2); - goto case 3; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 2: { - if (la == null) { currentState = 2; break; } - if (set[2].Get(la.Kind)) { - currentState = 2; - break; - } else { - goto case 1; - } - } - case 3: { - if (la == null) { currentState = 3; break; } - if (la.Kind == 160) { - goto case 357; - } else { - if (set[3].Get(la.Kind)) { - if (la.Kind == 84 || la.Kind == 155 || la.Kind == 209) { - goto case 350; - } else { - if (la.Kind == 103) { - currentState = 263; - break; - } else { - if (la.Kind == 115) { - goto case 261; - } else { - if (la.Kind == 142) { - currentState = 5; - break; - } else { - goto case 4; - } - } - } - } - } else { - goto case 4; - } - } - } - case 4: { - Error(la); - currentState = stateStack.Pop(); - goto switchlbl; - } - case 5: { - if (la == null) { currentState = 5; break; } - currentState = 6; - break; - } - case 6: { - if (la == null) { currentState = 6; break; } - if (la.Kind == 37) { - currentState = 354; - break; - } else { - goto case 7; - } - } - case 7: { - stateStack.Push(8); - goto case 13; - } - case 8: { - Indent(la); - goto case 9; - } - case 9: { - if (la == null) { currentState = 9; break; } - if (la.Kind == 140) { - goto case 351; - } else { - goto case 10; - } - } - case 10: { - if (la == null) { currentState = 10; break; } - if (set[4].Get(la.Kind)) { - if (la.Kind == 84 || la.Kind == 155 || la.Kind == 209) { - stateStack.Push(15); - goto case 268; - } else { - if (la.Kind == 103) { - stateStack.Push(15); - goto case 262; - } else { - if (la.Kind == 115) { - stateStack.Push(15); - goto case 252; - } else { - if (la.Kind == 142) { - stateStack.Push(15); - goto case 251; - } else { - if (set[5].Get(la.Kind)) { - stateStack.Push(15); - goto case 16; - } else { - Error(la); - goto case 15; - } - } - } - } - } - } else { - Unindent(la); - goto case 11; - } - } - case 11: { - if (la == null) { currentState = 11; break; } - Expect(113, la); // "End" - currentState = 12; - break; - } - case 12: { - if (la == null) { currentState = 12; break; } - Expect(142, la); // "Interface" - currentState = 13; - break; - } - case 13: { - if (la == null) { currentState = 13; break; } - if (la.Kind == 1 || la.Kind == 21) { - goto case 14; - } else { - goto case 4; - } - } - case 14: { - if (la == null) { currentState = 14; break; } - currentState = stateStack.Pop(); - break; - } - case 15: { - if (la == null) { currentState = 15; break; } - if (set[6].Get(la.Kind)) { - currentState = 15; - break; - } else { - goto case 10; - } - } - case 16: { - if (la == null) { currentState = 16; break; } - if (la.Kind == 119) { - goto case 249; - } else { - if (la.Kind == 186) { - goto case 247; - } else { - if (la.Kind == 127 || la.Kind == 210) { - goto case 17; - } else { - goto case 4; - } - } - } - } - case 17: { - if (la == null) { currentState = 17; break; } - currentState = 18; - break; - } - case 18: { - if (la == null) { currentState = 18; break; } - if (set[7].Get(la.Kind)) { - goto case 17; - } else { - goto case 19; - } - } - case 19: { - if (la == null) { currentState = 19; break; } - if (la.Kind == 37) { - currentState = 234; - break; - } else { - goto case 20; - } - } - case 20: { - if (la == null) { currentState = 20; break; } - if (la.Kind == 63) { - currentState = 21; - break; - } else { - goto case 13; - } - } - case 21: { - stateStack.Push(13); - goto case 22; - } - case 22: { - if (la == null) { currentState = 22; break; } - if (set[8].Get(la.Kind)) { - goto case 233; - } else { - Error(la); - goto case 23; - } - } - case 23: { - if (la == null) { currentState = 23; break; } - if (la.Kind == 37) { - stateStack.Push(23); - goto case 27; - } else { - goto case 24; - } - } - case 24: { - if (la == null) { currentState = 24; break; } - if (la.Kind == 26) { - currentState = 25; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 25: { - stateStack.Push(26); - goto case 14; - } - case 26: { - if (la == null) { currentState = 26; break; } - if (la.Kind == 37) { - stateStack.Push(26); - goto case 27; - } else { - goto case 24; - } - } - case 27: { - if (la == null) { currentState = 27; break; } - Expect(37, la); // "(" - currentState = 28; - break; - } - case 28: { - if (la == null) { currentState = 28; break; } - if (la.Kind == 169) { - goto case 230; - } else { - if (set[9].Get(la.Kind)) { - goto case 30; - } else { - Error(la); - goto case 29; - } - } - } - case 29: { - if (la == null) { currentState = 29; break; } - Expect(38, la); // ")" - currentState = stateStack.Pop(); - break; - } - case 30: { - if (la == null) { currentState = 30; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(29); - goto case 31; - } else { - goto case 29; - } - } - case 31: { - if (la == null) { currentState = 31; break; } - if (set[9].Get(la.Kind)) { - goto case 227; - } else { - if (la.Kind == 22) { - goto case 32; - } else { - goto case 4; - } - } - } - case 32: { - if (la == null) { currentState = 32; break; } - currentState = 33; - break; - } - case 33: { - if (la == null) { currentState = 33; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(34); - goto case 35; - } else { - goto case 34; - } - } - case 34: { - if (la == null) { currentState = 34; break; } - if (la.Kind == 22) { - goto case 32; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 35: { - goto case 36; - } - case 36: { - stateStack.Push(37); - goto case 38; - } - case 37: { - if (la == null) { currentState = 37; break; } - if (set[10].Get(la.Kind)) { - currentState = 36; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 38: { - if (la == null) { currentState = 38; break; } - if (set[11].Get(la.Kind)) { - currentState = 38; - break; - } else { - if (set[9].Get(la.Kind)) { - stateStack.Push(56); - goto case 65; - } else { - if (la.Kind == 220) { - currentState = 54; - break; - } else { - if (la.Kind == 162) { - currentState = 43; - break; - } else { - if (la.Kind == 35) { - goto case 39; - } else { - goto case 4; - } - } - } - } - } - } - case 39: { - if (la == null) { currentState = 39; break; } - currentState = 40; - break; - } - case 40: { - stateStack.Push(41); - goto case 35; - } - case 41: { - if (la == null) { currentState = 41; break; } - if (la.Kind == 22) { - goto case 39; - } else { - goto case 42; - } - } - case 42: { - if (la == null) { currentState = 42; break; } - Expect(36, la); // "}" - currentState = stateStack.Pop(); - break; - } - case 43: { - if (la == null) { currentState = 43; break; } - if (set[8].Get(la.Kind)) { - stateStack.Push(52); - goto case 22; - } else { - goto case 44; - } - } - case 44: { - if (la == null) { currentState = 44; break; } - if (la.Kind == 233) { - currentState = 45; - break; - } else { - goto case 4; - } - } - case 45: { - if (la == null) { currentState = 45; break; } - Expect(35, la); // "{" - currentState = 46; - break; - } - case 46: { - if (la == null) { currentState = 46; break; } - if (la.Kind == 147) { - currentState = 47; - break; - } else { - goto case 47; - } - } - case 47: { - if (la == null) { currentState = 47; break; } - Expect(26, la); // "." - currentState = 48; - break; - } - case 48: { - if (la == null) { currentState = 48; break; } - currentState = 49; - break; - } - case 49: { - if (la == null) { currentState = 49; break; } - Expect(20, la); // "=" - currentState = 50; - break; - } - case 50: { - stateStack.Push(51); - goto case 35; - } - case 51: { - if (la == null) { currentState = 51; break; } - if (la.Kind == 22) { - currentState = 46; - break; - } else { - goto case 42; - } - } - case 52: { - if (la == null) { currentState = 52; break; } - if (la.Kind == 126 || la.Kind == 233) { - if (la.Kind == 126) { - currentState = 53; - break; - } else { - goto case 44; - } - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 53: { - if (la == null) { currentState = 53; break; } - if (la.Kind == 35) { - goto case 39; - } else { - if (set[12].Get(la.Kind)) { - currentState = endOfStatementTerminatorAndBlock; /* leave this block */ - InformToken(t); /* process From again*/ - /* for processing current token (la): go to the position after processing End */ - goto switchlbl; - - } else { - goto case 4; - } - } - } - case 54: { - stateStack.Push(55); - goto case 38; - } - case 55: { - if (la == null) { currentState = 55; break; } - Expect(144, la); // "Is" - currentState = 22; - break; - } - case 56: { - if (la == null) { currentState = 56; break; } - if (set[13].Get(la.Kind)) { - stateStack.Push(56); - goto case 57; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 57: { - if (la == null) { currentState = 57; break; } - if (la.Kind == 37) { - currentState = 61; - break; - } else { - if (set[14].Get(la.Kind)) { - currentState = 58; - break; - } else { - goto case 4; - } - } - } - case 58: { - if (la == null) { currentState = 58; break; } - if (la.Kind == 10) { - currentState = 59; - break; - } else { - goto case 59; - } - } - case 59: { - if (la == null) { currentState = 59; break; } - currentState = 60; - break; - } - case 60: { - if (la == null) { currentState = 60; break; } - if (la.Kind == 11) { - goto case 14; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 61: { - if (la == null) { currentState = 61; break; } - if (la.Kind == 169) { - goto case 62; - } else { - if (set[9].Get(la.Kind)) { - goto case 30; - } else { - goto case 4; - } - } - } - case 62: { - if (la == null) { currentState = 62; break; } - currentState = 63; - break; - } - case 63: { - stateStack.Push(64); - goto case 22; - } - case 64: { - if (la == null) { currentState = 64; break; } - if (la.Kind == 22) { - goto case 62; - } else { - goto case 29; - } - } - case 65: { - if (la == null) { currentState = 65; break; } - if (set[15].Get(la.Kind)) { - goto case 14; - } else { - if (set[16].Get(la.Kind)) { - if (la.Kind == 17 || la.Kind == 18 || la.Kind == 19) { - goto case 222; - } else { - if (la.Kind == 10) { - stateStack.Push(212); - goto case 214; - } else { - goto case 4; - } - } - } else { - if (la.Kind == 127 || la.Kind == 210) { - if (la.Kind == 210) { - currentState = 206; - break; - } else { - if (la.Kind == 127) { - currentState = 72; - break; - } else { - goto case 4; - } - } - } else { - if (la.Kind == 135) { - currentState = 66; - break; - } else { - goto case 4; - } - } - } - } - } - case 66: { - if (la == null) { currentState = 66; break; } - Expect(37, la); // "(" - currentState = 67; - break; - } - case 67: { - stateStack.Push(68); - goto case 35; - } - case 68: { - if (la == null) { currentState = 68; break; } - Expect(22, la); // "," - currentState = 69; - break; - } - case 69: { - stateStack.Push(70); - goto case 35; - } - case 70: { - if (la == null) { currentState = 70; break; } - if (la.Kind == 22) { - currentState = 71; - break; - } else { - goto case 29; - } - } - case 71: { - stateStack.Push(29); - goto case 35; - } - case 72: { - if (la == null) { currentState = 72; break; } - Expect(37, la); // "(" - currentState = 73; - break; - } - case 73: { - if (la == null) { currentState = 73; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(74); - goto case 202; - } else { - goto case 74; - } - } - case 74: { - if (la == null) { currentState = 74; break; } - Expect(38, la); // ")" - currentState = 75; - break; - } - case 75: { - if (la == null) { currentState = 75; break; } - if (set[9].Get(la.Kind)) { - goto case 35; - } else { - if (la.Kind == 1 || la.Kind == 21 || la.Kind == 63) { - if (la.Kind == 63) { - currentState = 201; - break; - } else { - goto case 76; - } - } else { - goto case 4; - } - } - } - case 76: { - stateStack.Push(77); - goto case 79; - } - case 77: { - if (la == null) { currentState = 77; break; } - Expect(113, la); // "End" - currentState = 78; - break; - } - case 78: { - if (la == null) { currentState = 78; break; } - Expect(127, la); // "Function" - currentState = stateStack.Pop(); - break; - } - case 79: { - Indent(la); - goto case 80; - } - case 80: { - stateStack.Push(81); - goto case 13; - } - case 81: { - if (la == null) { currentState = 81; break; } - if (set[9].Get(la.Kind)) { - if (set[9].Get(la.Kind)) { - if (set[9].Get(la.Kind)) { - stateStack.Push(80); - goto case 86; - } else { - goto case 80; - } - } else { - if (la.Kind == 113) { - currentState = 84; - break; - } else { - goto case 83; - } - } - } else { - goto case 82; - } - } - case 82: { - Unindent(la); - currentState = stateStack.Pop(); - goto switchlbl; - } - case 83: { - Error(la); - goto case 81; - } - case 84: { - if (la == null) { currentState = 84; break; } - if (la.Kind == 1 || la.Kind == 21) { - goto case 85; - } else { - if (set[17].Get(la.Kind)) { - currentState = endOfStatementTerminatorAndBlock; /* leave this block */ - InformToken(t); /* process End again*/ - /* for processing current token (la): go to the position after processing End */ - goto switchlbl; - - } else { - goto case 83; - } - } - } - case 85: { - if (la == null) { currentState = 85; break; } - currentState = 81; - break; - } - case 86: { - if (la == null) { currentState = 86; break; } - if (la.Kind == 88 || la.Kind == 105 || la.Kind == 204) { - currentState = 184; - break; - } else { - if (la.Kind == 211 || la.Kind == 233) { - currentState = 180; - break; - } else { - if (la.Kind == 56 || la.Kind == 193) { - currentState = 178; - break; - } else { - if (la.Kind == 189) { - currentState = 176; - break; - } else { - if (la.Kind == 135) { - currentState = 159; - break; - } else { - if (la.Kind == 197) { - currentState = 147; - break; - } else { - if (la.Kind == 231) { - currentState = 143; - break; - } else { - if (la.Kind == 108) { - currentState = 137; - break; - } else { - if (la.Kind == 124) { - currentState = 116; - break; - } else { - if (la.Kind == 118 || la.Kind == 171 || la.Kind == 194) { - if (la.Kind == 118 || la.Kind == 171) { - if (la.Kind == 171) { - currentState = 112; - break; - } else { - goto case 112; - } - } else { - if (la.Kind == 194) { - currentState = 111; - break; - } else { - goto case 4; - } - } - } else { - if (la.Kind == 215) { - goto case 96; - } else { - if (la.Kind == 218) { - currentState = 101; - break; - } else { - if (set[18].Get(la.Kind)) { - if (la.Kind == 132) { - currentState = 100; - break; - } else { - if (la.Kind == 120) { - currentState = 99; - break; - } else { - if (la.Kind == 89) { - currentState = 98; - break; - } else { - if (la.Kind == 206) { - goto case 14; - } else { - if (la.Kind == 195) { - goto case 96; - } else { - goto case 4; - } - } - } - } - } - } else { - if (la.Kind == 191) { - currentState = 95; - break; - } else { - if (la.Kind == 117) { - goto case 92; - } else { - if (la.Kind == 226) { - currentState = 88; - break; - } else { - if (set[9].Get(la.Kind)) { - if (la.Kind == 73) { - goto case 87; - } else { - goto case 35; - } - } else { - goto case 4; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - case 87: { - if (la == null) { currentState = 87; break; } - currentState = 35; - break; - } - case 88: { - stateStack.Push(89); - goto case 35; - } - case 89: { - stateStack.Push(90); - goto case 79; - } - case 90: { - if (la == null) { currentState = 90; break; } - Expect(113, la); // "End" - currentState = 91; - break; - } - case 91: { - if (la == null) { currentState = 91; break; } - Expect(226, la); // "Using" - currentState = stateStack.Pop(); - break; - } - case 92: { - if (la == null) { currentState = 92; break; } - currentState = 93; - break; - } - case 93: { - stateStack.Push(94); - goto case 35; - } - case 94: { - if (la == null) { currentState = 94; break; } - if (la.Kind == 22) { - goto case 92; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 95: { - if (la == null) { currentState = 95; break; } - if (la.Kind == 184) { - goto case 87; - } else { - goto case 35; - } - } - case 96: { - if (la == null) { currentState = 96; break; } - currentState = 97; - break; - } - case 97: { - if (la == null) { currentState = 97; break; } - if (set[9].Get(la.Kind)) { - goto case 35; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 98: { - if (la == null) { currentState = 98; break; } - if (la.Kind == 108 || la.Kind == 124 || la.Kind == 231) { - goto case 14; - } else { - goto case 4; - } - } - case 99: { - if (la == null) { currentState = 99; break; } - if (set[19].Get(la.Kind)) { - goto case 14; - } else { - goto case 4; - } - } - case 100: { - if (la == null) { currentState = 100; break; } - if (la.Kind == 2 || la.Kind == 5) { - goto case 14; - } else { - goto case 4; - } - } - case 101: { - stateStack.Push(102); - goto case 79; - } - case 102: { - if (la == null) { currentState = 102; break; } - if (la.Kind == 75) { - currentState = 106; - break; - } else { - if (la.Kind == 123) { - currentState = 105; - break; - } else { - goto case 103; - } - } - } - case 103: { - if (la == null) { currentState = 103; break; } - Expect(113, la); // "End" - currentState = 104; - break; - } - case 104: { - if (la == null) { currentState = 104; break; } - Expect(218, la); // "Try" - currentState = stateStack.Pop(); - break; - } - case 105: { - stateStack.Push(103); - goto case 79; - } - case 106: { - if (la == null) { currentState = 106; break; } - if (set[20].Get(la.Kind)) { - currentState = 109; - break; - } else { - goto case 107; - } - } - case 107: { - if (la == null) { currentState = 107; break; } - if (la.Kind == 229) { - currentState = 108; - break; - } else { - goto case 101; - } - } - case 108: { - stateStack.Push(101); - goto case 35; - } - case 109: { - if (la == null) { currentState = 109; break; } - if (la.Kind == 63) { - currentState = 110; - break; - } else { - goto case 107; - } - } - case 110: { - stateStack.Push(107); - goto case 22; - } - case 111: { - if (la == null) { currentState = 111; break; } - if (la.Kind == 2 || la.Kind == 5 || la.Kind == 163) { - goto case 14; - } else { - goto case 4; - } - } - case 112: { - if (la == null) { currentState = 112; break; } - Expect(118, la); // "Error" - currentState = 113; - break; - } - case 113: { - if (la == null) { currentState = 113; break; } - if (set[9].Get(la.Kind)) { - goto case 35; - } else { - if (la.Kind == 132) { - currentState = 115; - break; - } else { - if (la.Kind == 194) { - currentState = 114; - break; - } else { - goto case 4; - } - } - } - } - case 114: { - if (la == null) { currentState = 114; break; } - Expect(163, la); // "Next" - currentState = stateStack.Pop(); - break; - } - case 115: { - if (la == null) { currentState = 115; break; } - if (la.Kind == 2 || la.Kind == 5) { - goto case 14; - } else { - goto case 4; - } - } - case 116: { - if (la == null) { currentState = 116; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(128); - goto case 125; - } else { - if (la.Kind == 110) { - currentState = 117; - break; - } else { - goto case 4; - } - } - } - case 117: { - stateStack.Push(118); - goto case 125; - } - case 118: { - if (la == null) { currentState = 118; break; } - Expect(138, la); // "In" - currentState = 119; - break; - } - case 119: { - stateStack.Push(120); - goto case 35; - } - case 120: { - stateStack.Push(121); - goto case 79; - } - case 121: { - if (la == null) { currentState = 121; break; } - Expect(163, la); // "Next" - currentState = 122; - break; - } - case 122: { - if (la == null) { currentState = 122; break; } - if (set[9].Get(la.Kind)) { - goto case 123; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 123: { - stateStack.Push(124); - goto case 35; - } - case 124: { - if (la == null) { currentState = 124; break; } - if (la.Kind == 22) { - currentState = 123; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 125: { - stateStack.Push(126); - goto case 65; - } - case 126: { - if (la == null) { currentState = 126; break; } - if (la.Kind == 33) { - currentState = 127; - break; - } else { - goto case 127; - } - } - case 127: { - if (la == null) { currentState = 127; break; } - if (set[13].Get(la.Kind)) { - stateStack.Push(127); - goto case 57; - } else { - if (la.Kind == 63) { - currentState = 22; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - } - case 128: { - if (la == null) { currentState = 128; break; } - Expect(20, la); // "=" - currentState = 129; - break; - } - case 129: { - stateStack.Push(130); - goto case 35; - } - case 130: { - if (la == null) { currentState = 130; break; } - if (la.Kind == 205) { - currentState = 136; - break; - } else { - goto case 131; - } - } - case 131: { - stateStack.Push(132); - goto case 79; - } - case 132: { - if (la == null) { currentState = 132; break; } - Expect(163, la); // "Next" - currentState = 133; - break; - } - case 133: { - if (la == null) { currentState = 133; break; } - if (set[9].Get(la.Kind)) { - goto case 134; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 134: { - stateStack.Push(135); - goto case 35; - } - case 135: { - if (la == null) { currentState = 135; break; } - if (la.Kind == 22) { - currentState = 134; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 136: { - stateStack.Push(131); - goto case 35; - } - case 137: { - if (la == null) { currentState = 137; break; } - if (la.Kind == 224 || la.Kind == 231) { - currentState = 140; - break; - } else { - if (la.Kind == 1 || la.Kind == 21) { - stateStack.Push(138); - goto case 79; - } else { - goto case 4; - } - } - } - case 138: { - if (la == null) { currentState = 138; break; } - Expect(152, la); // "Loop" - currentState = 139; - break; - } - case 139: { - if (la == null) { currentState = 139; break; } - if (la.Kind == 224 || la.Kind == 231) { - goto case 87; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 140: { - stateStack.Push(141); - goto case 35; - } - case 141: { - stateStack.Push(142); - goto case 79; - } - case 142: { - if (la == null) { currentState = 142; break; } - Expect(152, la); // "Loop" - currentState = stateStack.Pop(); - break; - } - case 143: { - stateStack.Push(144); - goto case 35; - } - case 144: { - stateStack.Push(145); - goto case 79; - } - case 145: { - if (la == null) { currentState = 145; break; } - Expect(113, la); // "End" - currentState = 146; - break; - } - case 146: { - if (la == null) { currentState = 146; break; } - Expect(231, la); // "While" - currentState = stateStack.Pop(); - break; - } - case 147: { - if (la == null) { currentState = 147; break; } - if (la.Kind == 74) { - currentState = 148; - break; - } else { - goto case 148; - } - } - case 148: { - stateStack.Push(149); - goto case 35; - } - case 149: { - stateStack.Push(150); - goto case 13; - } - case 150: { - if (la == null) { currentState = 150; break; } - if (la.Kind == 74) { - currentState = 152; - break; - } else { - Expect(113, la); // "End" - currentState = 151; - break; - } - } - case 151: { - if (la == null) { currentState = 151; break; } - Expect(197, la); // "Select" - currentState = stateStack.Pop(); - break; - } - case 152: { - if (la == null) { currentState = 152; break; } - if (la.Kind == 111) { - currentState = 153; - break; - } else { - if (set[9].Get(la.Kind)) { - goto case 154; - } else { - Error(la); - goto case 153; - } - } - } - case 153: { - stateStack.Push(150); - goto case 79; - } - case 154: { - if (la == null) { currentState = 154; break; } - if (set[21].Get(la.Kind)) { - if (la.Kind == 144) { - currentState = 156; - break; - } else { - goto case 156; - } - } else { - if (set[9].Get(la.Kind)) { - stateStack.Push(155); - goto case 35; - } else { - Error(la); - goto case 155; - } - } - } - case 155: { - if (la == null) { currentState = 155; break; } - if (la.Kind == 22) { - currentState = 154; - break; - } else { - goto case 153; - } - } - case 156: { - stateStack.Push(157); - goto case 158; - } - case 157: { - stateStack.Push(155); - goto case 38; - } - case 158: { - if (la == null) { currentState = 158; break; } - if (set[22].Get(la.Kind)) { - goto case 14; - } else { - goto case 4; - } - } - case 159: { - stateStack.Push(160); - goto case 35; - } - case 160: { - if (la == null) { currentState = 160; break; } - if (la.Kind == 214) { - currentState = 169; - break; - } else { - goto case 161; - } - } - case 161: { - if (la == null) { currentState = 161; break; } - if (la.Kind == 1 || la.Kind == 21) { - goto case 162; - } else { - goto case 4; - } - } - case 162: { - stateStack.Push(163); - goto case 79; - } - case 163: { - if (la == null) { currentState = 163; break; } - if (la.Kind == 111 || la.Kind == 112) { - if (la.Kind == 111) { - currentState = 168; - break; - } else { - if (la.Kind == 112) { - goto case 165; - } else { - Error(la); - goto case 162; - } - } - } else { - Expect(113, la); // "End" - currentState = 164; - break; - } - } - case 164: { - if (la == null) { currentState = 164; break; } - Expect(135, la); // "If" - currentState = stateStack.Pop(); - break; - } - case 165: { - if (la == null) { currentState = 165; break; } - currentState = 166; - break; - } - case 166: { - stateStack.Push(167); - goto case 35; - } - case 167: { - if (la == null) { currentState = 167; break; } - if (la.Kind == 214) { - currentState = 162; - break; - } else { - goto case 162; - } - } - case 168: { - if (la == null) { currentState = 168; break; } - if (la.Kind == 135) { - goto case 165; - } else { - goto case 162; - } - } - case 169: { - if (la == null) { currentState = 169; break; } - if (set[9].Get(la.Kind)) { - goto case 170; - } else { - goto case 161; - } - } - case 170: { - stateStack.Push(171); - goto case 86; - } - case 171: { - if (la == null) { currentState = 171; break; } - if (la.Kind == 21) { - currentState = 175; - break; - } else { - if (la.Kind == 111) { - goto case 172; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - } - case 172: { - if (la == null) { currentState = 172; break; } - currentState = 173; - break; - } - case 173: { - if (la == null) { currentState = 173; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(174); - goto case 86; - } else { - goto case 174; - } - } - case 174: { - if (la == null) { currentState = 174; break; } - if (la.Kind == 21) { - goto case 172; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 175: { - if (la == null) { currentState = 175; break; } - if (set[9].Get(la.Kind)) { - goto case 170; - } else { - goto case 171; - } - } - case 176: { - stateStack.Push(177); - goto case 14; - } - case 177: { - if (la == null) { currentState = 177; break; } - if (la.Kind == 37) { - currentState = 30; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 178: { - stateStack.Push(179); - goto case 35; - } - case 179: { - if (la == null) { currentState = 179; break; } - Expect(22, la); // "," - currentState = 35; - break; - } - case 180: { - stateStack.Push(181); - goto case 35; - } - case 181: { - stateStack.Push(182); - goto case 79; - } - case 182: { - if (la == null) { currentState = 182; break; } - Expect(113, la); // "End" - currentState = 183; - break; - } - case 183: { - if (la == null) { currentState = 183; break; } - if (la.Kind == 211 || la.Kind == 233) { - goto case 14; - } else { - goto case 4; - } - } - case 184: { - if (la == null) { currentState = 184; break; } - currentState = 185; - break; - } - case 185: { - if (la == null) { currentState = 185; break; } - if (la.Kind == 33) { - currentState = 186; - break; - } else { - goto case 186; - } - } - case 186: { - if (la == null) { currentState = 186; break; } - if (la.Kind == 37) { - goto case 199; - } else { - goto case 187; - } - } - case 187: { - if (la == null) { currentState = 187; break; } - if (la.Kind == 22) { - currentState = 193; - break; - } else { - goto case 188; - } - } - case 188: { - if (la == null) { currentState = 188; break; } - if (la.Kind == 63) { - currentState = 190; - break; - } else { - goto case 189; - } - } - case 189: { - if (la == null) { currentState = 189; break; } - if (la.Kind == 20) { - goto case 87; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 190: { - if (la == null) { currentState = 190; break; } - if (la.Kind == 162) { - stateStack.Push(189); - goto case 192; - } else { - if (set[8].Get(la.Kind)) { - goto case 191; - } else { - Error(la); - goto case 189; - } - } - } - case 191: { - stateStack.Push(189); - goto case 22; - } - case 192: { - if (la == null) { currentState = 192; break; } - Expect(162, la); // "New" - currentState = 43; - break; - } - case 193: { - if (la == null) { currentState = 193; break; } - currentState = 194; - break; - } - case 194: { - if (la == null) { currentState = 194; break; } - if (la.Kind == 33) { - currentState = 195; - break; - } else { - goto case 195; - } - } - case 195: { - if (la == null) { currentState = 195; break; } - if (la.Kind == 37) { - goto case 196; - } else { - goto case 187; - } - } - case 196: { - if (la == null) { currentState = 196; break; } - currentState = 197; - break; - } - case 197: { - if (la == null) { currentState = 197; break; } - if (la.Kind == 22) { - goto case 196; - } else { - goto case 198; - } - } - case 198: { - if (la == null) { currentState = 198; break; } - Expect(38, la); // ")" - currentState = 187; - break; - } - case 199: { - if (la == null) { currentState = 199; break; } - currentState = 200; - break; - } - case 200: { - if (la == null) { currentState = 200; break; } - if (la.Kind == 22) { - goto case 199; - } else { - goto case 198; - } - } - case 201: { - stateStack.Push(76); - goto case 22; - } - case 202: { - stateStack.Push(203); - goto case 204; - } - case 203: { - if (la == null) { currentState = 203; break; } - if (la.Kind == 22) { - currentState = 202; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 204: { - if (la == null) { currentState = 204; break; } - currentState = 205; - break; - } - case 205: { - if (la == null) { currentState = 205; break; } - if (set[23].Get(la.Kind)) { - goto case 204; - } else { - if (la.Kind == 63) { - currentState = 191; - break; - } else { - goto case 189; - } - } - } - case 206: { - if (la == null) { currentState = 206; break; } - Expect(37, la); // "(" - currentState = 207; - break; - } - case 207: { - if (la == null) { currentState = 207; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(208); - goto case 202; - } else { - goto case 208; - } - } - case 208: { - if (la == null) { currentState = 208; break; } - Expect(38, la); // ")" - currentState = 209; - break; - } - case 209: { - if (la == null) { currentState = 209; break; } - if (set[9].Get(la.Kind)) { - goto case 86; - } else { - if (la.Kind == 1 || la.Kind == 21) { - stateStack.Push(210); - goto case 79; - } else { - goto case 4; - } - } - } - case 210: { - if (la == null) { currentState = 210; break; } - Expect(113, la); // "End" - currentState = 211; - break; - } - case 211: { - if (la == null) { currentState = 211; break; } - Expect(210, la); // "Sub" - currentState = stateStack.Pop(); - break; - } - case 212: { - if (la == null) { currentState = 212; break; } - if (la.Kind == 17) { - currentState = 213; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 213: { - if (la == null) { currentState = 213; break; } - if (la.Kind == 16) { - currentState = 212; - break; - } else { - goto case 212; - } - } - case 214: { - if (la == null) { currentState = 214; break; } - Expect(10, la); // XmlOpenTag - currentState = 215; - break; - } - case 215: { - if (la == null) { currentState = 215; break; } - if (set[24].Get(la.Kind)) { - if (set[25].Get(la.Kind)) { - currentState = 215; - break; - } else { - if (la.Kind == 12) { - stateStack.Push(215); - goto case 219; - } else { - Error(la); - goto case 215; - } - } - } else { - if (la.Kind == 14) { - goto case 14; - } else { - if (la.Kind == 11) { - goto case 216; - } else { - goto case 4; - } - } - } - } - case 216: { - if (la == null) { currentState = 216; break; } - currentState = 217; - break; - } - case 217: { - if (la == null) { currentState = 217; break; } - if (set[26].Get(la.Kind)) { - if (set[27].Get(la.Kind)) { - goto case 216; - } else { - if (la.Kind == 12) { - stateStack.Push(217); - goto case 219; - } else { - if (la.Kind == 10) { - stateStack.Push(217); - goto case 214; - } else { - Error(la); - goto case 217; - } - } - } - } else { - Expect(15, la); // XmlOpenEndTag - currentState = 218; - break; - } - } - case 218: { - if (la == null) { currentState = 218; break; } - if (set[28].Get(la.Kind)) { - if (set[29].Get(la.Kind)) { - currentState = 218; - break; - } else { - if (la.Kind == 12) { - stateStack.Push(218); - goto case 219; - } else { - Error(la); - goto case 218; - } - } - } else { - Expect(11, la); // XmlCloseTag - currentState = stateStack.Pop(); - break; - } - } - case 219: { - if (la == null) { currentState = 219; break; } - Expect(12, la); // XmlStartInlineVB - currentState = 220; - break; - } - case 220: { - stateStack.Push(221); - goto case 35; - } - case 221: { - if (la == null) { currentState = 221; break; } - Expect(13, la); // XmlEndInlineVB - currentState = stateStack.Pop(); - break; - } - case 222: { - if (la == null) { currentState = 222; break; } - currentState = 223; - break; - } - case 223: { - if (la == null) { currentState = 223; break; } - if (la.Kind == 16) { - currentState = 224; - break; - } else { - goto case 224; - } - } - case 224: { - if (la == null) { currentState = 224; break; } - if (la.Kind == 17 || la.Kind == 19) { - goto case 222; - } else { - if (la.Kind == 10) { - stateStack.Push(225); - goto case 214; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - } - case 225: { - if (la == null) { currentState = 225; break; } - if (la.Kind == 17) { - currentState = 226; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 226: { - if (la == null) { currentState = 226; break; } - if (la.Kind == 16) { - currentState = 225; - break; - } else { - goto case 225; - } - } - case 227: { - stateStack.Push(228); - goto case 35; - } - case 228: { - if (la == null) { currentState = 228; break; } - if (la.Kind == 22) { - currentState = 229; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 229: { - if (la == null) { currentState = 229; break; } - if (set[9].Get(la.Kind)) { - goto case 227; - } else { - goto case 228; - } - } - case 230: { - if (la == null) { currentState = 230; break; } - currentState = 231; - break; - } - case 231: { - if (la == null) { currentState = 231; break; } - if (set[8].Get(la.Kind)) { - stateStack.Push(232); - goto case 22; - } else { - goto case 232; - } - } - case 232: { - if (la == null) { currentState = 232; break; } - if (la.Kind == 22) { - goto case 230; - } else { - goto case 29; - } - } - case 233: { - if (la == null) { currentState = 233; break; } - currentState = 23; - break; - } - case 234: { - if (la == null) { currentState = 234; break; } - if (set[9].Get(la.Kind)) { - if (la.Kind == 169) { - currentState = 236; - break; - } else { - if (set[9].Get(la.Kind)) { - stateStack.Push(235); - goto case 202; - } else { - Error(la); - goto case 235; - } - } - } else { - goto case 235; - } - } - case 235: { - if (la == null) { currentState = 235; break; } - Expect(38, la); // ")" - currentState = 19; - break; - } - case 236: { - stateStack.Push(235); - goto case 237; - } - case 237: { - if (la == null) { currentState = 237; break; } - if (la.Kind == 138 || la.Kind == 178) { - currentState = 238; - break; - } else { - goto case 238; - } - } - case 238: { - if (la == null) { currentState = 238; break; } - currentState = 239; - break; - } - case 239: { - if (la == null) { currentState = 239; break; } - if (la.Kind == 63) { - currentState = 241; - break; - } else { - goto case 240; - } - } - case 240: { - if (la == null) { currentState = 240; break; } - if (la.Kind == 22) { - currentState = 237; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - case 241: { - stateStack.Push(240); - goto case 242; - } - case 242: { - if (la == null) { currentState = 242; break; } - if (set[30].Get(la.Kind)) { - goto case 246; - } else { - if (la.Kind == 35) { - goto case 243; - } else { - goto case 4; - } - } - } - case 243: { - if (la == null) { currentState = 243; break; } - currentState = 244; - break; - } - case 244: { - stateStack.Push(245); - goto case 246; - } - case 245: { - if (la == null) { currentState = 245; break; } - if (la.Kind == 22) { - goto case 243; - } else { - goto case 42; - } - } - case 246: { - if (la == null) { currentState = 246; break; } - if (set[8].Get(la.Kind)) { - goto case 233; - } else { - if (la.Kind == 84 || la.Kind == 162 || la.Kind == 209) { - goto case 14; - } else { - goto case 4; - } - } - } - case 247: { - if (la == null) { currentState = 247; break; } - currentState = 248; - break; - } - case 248: { - if (la == null) { currentState = 248; break; } - if (set[17].Get(la.Kind)) { - goto case 247; - } else { - goto case 13; - } - } - case 249: { - if (la == null) { currentState = 249; break; } - currentState = 250; - break; - } - case 250: { - if (la == null) { currentState = 250; break; } - if (set[17].Get(la.Kind)) { - goto case 249; - } else { - goto case 13; - } - } - case 251: { - if (la == null) { currentState = 251; break; } - Expect(142, la); // "Interface" - currentState = 5; - break; - } - case 252: { - if (la == null) { currentState = 252; break; } - Expect(115, la); // "Enum" - currentState = 253; - break; - } - case 253: { - if (la == null) { currentState = 253; break; } - if (set[17].Get(la.Kind)) { - goto case 261; - } else { - stateStack.Push(254); - goto case 13; - } - } - case 254: { - Indent(la); - goto case 255; - } - case 255: { - if (la == null) { currentState = 255; break; } - if (set[31].Get(la.Kind)) { - currentState = 258; - break; - } else { - Unindent(la); - goto case 256; - } - } - case 256: { - if (la == null) { currentState = 256; break; } - Expect(113, la); // "End" - currentState = 257; - break; - } - case 257: { - if (la == null) { currentState = 257; break; } - Expect(115, la); // "Enum" - currentState = 13; - break; - } - case 258: { - if (la == null) { currentState = 258; break; } - if (la.Kind == 20) { - currentState = 260; - break; - } else { - goto case 259; - } - } - case 259: { - stateStack.Push(255); - goto case 13; - } - case 260: { - stateStack.Push(259); - goto case 35; - } - case 261: { - if (la == null) { currentState = 261; break; } - currentState = 253; - break; - } - case 262: { - if (la == null) { currentState = 262; break; } - Expect(103, la); // "Delegate" - currentState = 263; - break; - } - case 263: { - if (la == null) { currentState = 263; break; } - if (la.Kind == 127 || la.Kind == 210) { - currentState = 264; - break; - } else { - Error(la); - goto case 264; - } - } - case 264: { - if (la == null) { currentState = 264; break; } - currentState = 265; - break; - } - case 265: { - if (la == null) { currentState = 265; break; } - if (la.Kind == 37) { - currentState = 266; - break; - } else { - goto case 20; - } - } - case 266: { - if (la == null) { currentState = 266; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(267); - goto case 202; - } else { - goto case 267; - } - } - case 267: { - if (la == null) { currentState = 267; break; } - Expect(38, la); // ")" - currentState = 20; - break; - } - case 268: { - if (la == null) { currentState = 268; break; } - if (la.Kind == 84 || la.Kind == 155 || la.Kind == 209) { - goto case 350; - } else { - Error(la); - goto case 269; - } - } - case 269: { - if (la == null) { currentState = 269; break; } - currentState = 270; - break; - } - case 270: { - if (la == null) { currentState = 270; break; } - if (la.Kind == 37) { - currentState = 347; - break; - } else { - goto case 271; - } - } - case 271: { - stateStack.Push(272); - goto case 13; - } - case 272: { - Indent(la); - goto case 273; - } - case 273: { - if (la == null) { currentState = 273; break; } - if (set[9].Get(la.Kind)) { - if (la.Kind == 84 || la.Kind == 155 || la.Kind == 209) { - stateStack.Push(273); - goto case 268; - } else { - if (la.Kind == 103) { - stateStack.Push(273); - goto case 262; - } else { - if (la.Kind == 115) { - stateStack.Push(273); - goto case 252; - } else { - if (la.Kind == 142) { - stateStack.Push(273); - goto case 251; - } else { - if (set[9].Get(la.Kind)) { - stateStack.Push(273); - goto case 278; - } else { - Error(la); - goto case 273; - } - } - } - } - } - } else { - Unindent(la); - goto case 274; - } - } - case 274: { - if (la == null) { currentState = 274; break; } - Expect(113, la); // "End" - currentState = 275; - break; - } - case 275: { - if (la == null) { currentState = 275; break; } - if (la.Kind == 84 || la.Kind == 155 || la.Kind == 209) { - goto case 277; - } else { - goto case 276; - } - } - case 276: { - Error(la); - goto case 13; - } - case 277: { - if (la == null) { currentState = 277; break; } - currentState = 13; - break; - } - case 278: { - if (la == null) { currentState = 278; break; } - if (set[9].Get(la.Kind)) { - goto case 343; - } else { - if (la.Kind == 127 || la.Kind == 210) { - currentState = 334; - break; - } else { - if (la.Kind == 101) { - currentState = 327; - break; - } else { - if (la.Kind == 119) { - currentState = 318; - break; - } else { - if (la.Kind == 98) { - currentState = 307; - break; - } else { - if (la.Kind == 186) { - goto case 283; - } else { - if (la.Kind == 172) { - goto case 279; - } else { - goto case 4; - } - } - } - } - } - } - } - } - case 279: { - if (la == null) { currentState = 279; break; } - currentState = 280; - break; - } - case 280: { - if (la == null) { currentState = 280; break; } - if (set[17].Get(la.Kind)) { - goto case 279; - } else { - stateStack.Push(281); - goto case 79; - } - } - case 281: { - if (la == null) { currentState = 281; break; } - Expect(113, la); // "End" - currentState = 282; - break; - } - case 282: { - if (la == null) { currentState = 282; break; } - Expect(172, la); // "Operator" - currentState = 13; - break; - } - case 283: { - if (la == null) { currentState = 283; break; } - currentState = 284; - break; - } - case 284: { - if (la == null) { currentState = 284; break; } - if (set[32].Get(la.Kind)) { - goto case 283; - } else { - if (la.Kind == 20) { - currentState = 306; - break; - } else { - goto case 285; - } - } - } - case 285: { - stateStack.Push(286); - goto case 13; - } - case 286: { - if (la == null) { currentState = 286; break; } - if (set[33].Get(la.Kind)) { - currentState = 286; - break; - } else { - if (la.Kind == 128 || la.Kind == 198) { - Indent(la); - goto case 287; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } - } - } - case 287: { - if (la == null) { currentState = 287; break; } - if (la.Kind == 128 || la.Kind == 198) { - currentState = 288; - break; - } else { - Error(la); - goto case 288; - } - } - case 288: { - if (la == null) { currentState = 288; break; } - if (la.Kind == 37) { - currentState = 304; - break; - } else { - goto case 289; - } - } - case 289: { - stateStack.Push(290); - goto case 79; - } - case 290: { - if (la == null) { currentState = 290; break; } - Expect(113, la); // "End" - currentState = 291; - break; - } - case 291: { - if (la == null) { currentState = 291; break; } - if (la.Kind == 128 || la.Kind == 198) { - currentState = 292; - break; - } else { - Error(la); - goto case 292; - } - } - case 292: { - stateStack.Push(293); - goto case 13; - } - case 293: { - if (la == null) { currentState = 293; break; } - if (la.Kind == 128 || la.Kind == 198) { - currentState = 297; - break; - } else { - goto case 294; - } - } - case 294: { - Unindent(la); - goto case 295; - } - case 295: { - if (la == null) { currentState = 295; break; } - Expect(113, la); // "End" - currentState = 296; - break; - } - case 296: { - if (la == null) { currentState = 296; break; } - Expect(186, la); // "Property" - currentState = 13; - break; - } - case 297: { - if (la == null) { currentState = 297; break; } - if (la.Kind == 37) { - currentState = 302; - break; - } else { - goto case 298; - } - } - case 298: { - stateStack.Push(299); - goto case 79; - } - case 299: { - if (la == null) { currentState = 299; break; } - Expect(113, la); // "End" - currentState = 300; - break; - } - case 300: { - if (la == null) { currentState = 300; break; } - if (la.Kind == 128 || la.Kind == 198) { - currentState = 301; - break; - } else { - Error(la); - goto case 301; - } - } - case 301: { - stateStack.Push(294); - goto case 13; - } - case 302: { - if (la == null) { currentState = 302; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(303); - goto case 202; - } else { - goto case 303; - } - } - case 303: { - if (la == null) { currentState = 303; break; } - Expect(38, la); // ")" - currentState = 298; - break; - } - case 304: { - if (la == null) { currentState = 304; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(305); - goto case 202; - } else { - goto case 305; - } - } - case 305: { - if (la == null) { currentState = 305; break; } - Expect(38, la); // ")" - currentState = 289; - break; - } - case 306: { - stateStack.Push(285); - goto case 35; - } - case 307: { - stateStack.Push(308); - goto case 317; - } - case 308: { - if (la == null) { currentState = 308; break; } - if (la.Kind == 56 || la.Kind == 189 || la.Kind == 193) { - currentState = 310; - break; - } else { - Expect(113, la); // "End" - currentState = 309; - break; - } - } - case 309: { - if (la == null) { currentState = 309; break; } - Expect(119, la); // "Event" - currentState = 13; - break; - } - case 310: { - if (la == null) { currentState = 310; break; } - Expect(37, la); // "(" - currentState = 311; - break; - } - case 311: { - stateStack.Push(312); - goto case 202; - } - case 312: { - if (la == null) { currentState = 312; break; } - Expect(38, la); // ")" - currentState = 313; - break; - } - case 313: { - stateStack.Push(314); - goto case 79; - } - case 314: { - if (la == null) { currentState = 314; break; } - Expect(113, la); // "End" - currentState = 315; - break; - } - case 315: { - if (la == null) { currentState = 315; break; } - if (la.Kind == 56 || la.Kind == 189 || la.Kind == 193) { - currentState = 316; - break; - } else { - Error(la); - goto case 316; - } - } - case 316: { - stateStack.Push(308); - goto case 13; - } - case 317: { - if (la == null) { currentState = 317; break; } - Expect(119, la); // "Event" - currentState = 318; - break; - } - case 318: { - if (la == null) { currentState = 318; break; } - currentState = 319; - break; - } - case 319: { - if (la == null) { currentState = 319; break; } - if (la.Kind == 63) { - currentState = 326; - break; - } else { - if (set[34].Get(la.Kind)) { - if (la.Kind == 37) { - currentState = 324; - break; - } else { - goto case 320; - } - } else { - Error(la); - goto case 320; - } - } - } - case 320: { - if (la == null) { currentState = 320; break; } - if (la.Kind == 136) { - goto case 321; - } else { - goto case 13; - } - } - case 321: { - if (la == null) { currentState = 321; break; } - currentState = 322; - break; - } - case 322: { - stateStack.Push(323); - goto case 22; - } - case 323: { - if (la == null) { currentState = 323; break; } - if (la.Kind == 22) { - goto case 321; - } else { - goto case 13; - } - } - case 324: { - if (la == null) { currentState = 324; break; } - if (set[9].Get(la.Kind)) { - stateStack.Push(325); - goto case 202; - } else { - goto case 325; - } - } - case 325: { - if (la == null) { currentState = 325; break; } - Expect(38, la); // ")" - currentState = 320; - break; - } - case 326: { - stateStack.Push(320); - goto case 22; - } - case 327: { - if (la == null) { currentState = 327; break; } - if (la.Kind == 62 || la.Kind == 66 || la.Kind == 223) { - currentState = 328; - break; - } else { - goto case 328; - } - } - case 328: { - if (la == null) { currentState = 328; break; } - if (la.Kind == 127 || la.Kind == 210) { - currentState = 329; - break; - } else { - Error(la); - goto case 329; - } - } - case 329: { - if (la == null) { currentState = 329; break; } - currentState = 330; - break; - } - case 330: { - if (la == null) { currentState = 330; break; } - Expect(149, la); // "Lib" - currentState = 331; - break; - } - case 331: { - if (la == null) { currentState = 331; break; } - Expect(3, la); // LiteralString - currentState = 332; - break; - } - case 332: { - if (la == null) { currentState = 332; break; } - if (la.Kind == 59) { - currentState = 333; - break; - } else { - goto case 265; - } - } - case 333: { - if (la == null) { currentState = 333; break; } - Expect(3, la); // LiteralString - currentState = 265; - break; - } - case 334: { - if (la == null) { currentState = 334; break; } - currentState = 335; - break; - } - case 335: { - if (la == null) { currentState = 335; break; } - if (la.Kind == 37) { - currentState = 340; - break; - } else { - if (la.Kind == 63) { - currentState = 339; - break; - } else { - goto case 336; - } - } - } - case 336: { - stateStack.Push(337); - goto case 79; - } - case 337: { - if (la == null) { currentState = 337; break; } - Expect(113, la); // "End" - currentState = 338; - break; - } - case 338: { - if (la == null) { currentState = 338; break; } - if (la.Kind == 127 || la.Kind == 210) { - goto case 277; - } else { - goto case 276; - } - } - case 339: { - stateStack.Push(336); - goto case 22; - } - case 340: { - if (la == null) { currentState = 340; break; } - if (set[9].Get(la.Kind)) { - if (la.Kind == 169) { - currentState = 342; - break; - } else { - if (set[9].Get(la.Kind)) { - stateStack.Push(341); - goto case 202; - } else { - Error(la); - goto case 341; - } - } - } else { - goto case 341; - } - } - case 341: { - if (la == null) { currentState = 341; break; } - Expect(38, la); // ")" - currentState = 335; - break; - } - case 342: { - stateStack.Push(341); - goto case 237; - } - case 343: { - stateStack.Push(344); - goto case 345; - } - case 344: { - if (la == null) { currentState = 344; break; } - if (la.Kind == 22) { - currentState = 343; - break; - } else { - goto case 13; - } - } - case 345: { - if (la == null) { currentState = 345; break; } - if (la.Kind == 88) { - currentState = 346; - break; - } else { - goto case 346; - } - } - case 346: { - if (la == null) { currentState = 346; break; } - currentState = 188; - break; - } - case 347: { - if (la == null) { currentState = 347; break; } - Expect(169, la); // "Of" - currentState = 348; - break; - } - case 348: { - stateStack.Push(349); - goto case 237; - } - case 349: { - if (la == null) { currentState = 349; break; } - Expect(38, la); // ")" - currentState = 271; - break; - } - case 350: { - if (la == null) { currentState = 350; break; } - currentState = 269; - break; - } - case 351: { - if (la == null) { currentState = 351; break; } - currentState = 352; - break; - } - case 352: { - stateStack.Push(353); - goto case 22; - } - case 353: { - if (la == null) { currentState = 353; break; } - if (la.Kind == 22) { - goto case 351; - } else { - stateStack.Push(10); - goto case 13; - } - } - case 354: { - if (la == null) { currentState = 354; break; } - Expect(169, la); // "Of" - currentState = 355; - break; - } - case 355: { - stateStack.Push(356); - goto case 237; - } - case 356: { - if (la == null) { currentState = 356; break; } - Expect(38, la); // ")" - currentState = 7; - break; - } - case 357: { - if (la == null) { currentState = 357; break; } - currentState = 358; - break; - } - case 358: { - if (la == null) { currentState = 358; break; } - if (set[17].Get(la.Kind)) { - goto case 357; - } else { - stateStack.Push(359); - goto case 13; - } - } - case 359: { - Indent(la); - goto case 360; - } - case 360: { - if (la == null) { currentState = 360; break; } - if (set[1].Get(la.Kind)) { - stateStack.Push(363); - goto case 3; - } else { - Unindent(la); - goto case 361; - } - } - case 361: { - if (la == null) { currentState = 361; break; } - Expect(113, la); // "End" - currentState = 362; - break; - } - case 362: { - if (la == null) { currentState = 362; break; } - Expect(160, la); // "Namespace" - currentState = 13; - break; - } - case 363: { - if (la == null) { currentState = 363; break; } - if (set[35].Get(la.Kind)) { - currentState = 363; - break; - } else { - goto case 360; - } - } - } - - if (la != null) - t = la; - } - - public void Advance() - { - //Console.WriteLine("Advance"); - InformToken(null); - } - - static readonly BitArray[] set = { - new BitArray(new int[] {-2, -1, -1048577, -524417, -134234113, -2, -131073, -1}), - new BitArray(new int[] {0, 0, 1048576, 524416, 134234112, 1, 131072, 0}), - new BitArray(new int[] {-2, -1, -1048577, -524417, -134234113, -2, -131073, -1}), - new BitArray(new int[] {0, 0, 1048576, 524416, 134234112, 0, 131072, 0}), - new BitArray(new int[] {0, 0, 1048576, -2138570624, 134234112, 67108864, 393216, 0}), - new BitArray(new int[] {0, 0, 0, -2139095040, 0, 67108864, 262144, 0}), - new BitArray(new int[] {-2, -1, -1048577, 2138439551, -134234113, -67108865, -393217, -1}), - new BitArray(new int[] {-2097156, 2147483615, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {4, 2, 262288, 8216, 8396804, 256, 1610679824, 2}), - new BitArray(new int[] {-2, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-1013972992, 822083461, 0, 0, 71499776, 163840, 16777216, 4096}), - new BitArray(new int[] {-1073741824, 33554432, 0, 0, 0, 16, 0, 0}), - new BitArray(new int[] {-2, -9, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {1006632960, 32, 0, 0, 0, 0, 0, 0}), - new BitArray(new int[] {1006632960, 0, 0, 0, 0, 0, 0, 0}), - new BitArray(new int[] {-918530, -1, -1, 2147483647, -129, -1, -262145, -1}), - new BitArray(new int[] {918528, 0, 0, 0, 0, 0, 0, 0}), - new BitArray(new int[] {-2097156, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {0, 0, 33554432, 16777216, 16, 0, 16392, 0}), - new BitArray(new int[] {0, 0, 0, -1879044096, 0, 67108864, 67371040, 128}), - new BitArray(new int[] {-2097156, -1, -1, -1, -1, -1, -1, -33}), - new BitArray(new int[] {1048576, 3968, 0, 0, 65536, 0, 0, 0}), - new BitArray(new int[] {1048576, 3968, 0, 0, 0, 0, 0, 0}), - new BitArray(new int[] {-1048578, 2147483647, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-18434, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-22530, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-32770, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-37890, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-2050, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-6146, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {4, 2, 1310864, 8216, 8396804, 260, 1610810896, 2}), - new BitArray(new int[] {-2, -1, -1, -131073, -1, -1, -1, -1}), - new BitArray(new int[] {-3145732, -1, -1, -1, -1, -1, -1, -1}), - new BitArray(new int[] {-2, -1, -1, -1, -2, -1, -65, -1}), - new BitArray(new int[] {2097154, 32, 0, 0, 256, 0, 0, 0}), - new BitArray(new int[] {-2, -1, -1048577, -655489, -134234113, -2, -131073, -1}) - - }; - -} // end Parser - - -} diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/PushParser.frame b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/PushParser.frame deleted file mode 100644 index 71b2106a1d..0000000000 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/PushParser.frame +++ /dev/null @@ -1,80 +0,0 @@ -/*---------------------------------------------------------------------- -Compiler Generator Coco/R, -Copyright (c) 1990, 2004 Hanspeter Moessenboeck, University of Linz -extended by M. Loeberbauer & A. Woess, Univ. of Linz -with improvements by Pat Terry, Rhodes University - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -As an exception, it is allowed to write an extension of Coco/R that is -used as a plugin in non-free software. - -If not otherwise stated, any source code generated by Coco/R (other than -Coco/R itself) does not fall under the GNU General Public License. -----------------------------------------------------------------------*/ --->begin --->namespace - -partial class VBIndentationStrategy { --->constants - const bool T = true; - const bool x = false; - --->declarations - readonly Stack stateStack = new Stack(); - List errors = new List(); - - VBIndentationStrategy() - { - stateStack.Push(-1); // required so that we don't crash when leaving the root production - } - - void Expect(int expectedKind, Token la) - { - if (la.Kind != expectedKind) { - Error(la); - Console.WriteLine("expected: " + expectedKind); - } - } - - void Error(Token la) - { - Console.WriteLine("not expected: " + la); - errors.Add(la); - } - - Token t; - - public void InformToken(Token la) - { - -->informToken - if (la != null) - t = la; - } - - public void Advance() - { - //Console.WriteLine("Advance"); - InformToken(null); - } - - static readonly BitArray[] set = { --->initialization - }; - -} // end Parser - - -$$$ \ No newline at end of file diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBIndentationStrategy.atg b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBIndentationStrategy.atg deleted file mode 100644 index 20857c05ae..0000000000 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBIndentationStrategy.atg +++ /dev/null @@ -1,298 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using ICSharpCode.NRefactory.Parser; - -PUSHCOMPILER VBIndentationStrategy - -$tokenKindFieldName=Kind - -/* START AUTOGENERATED TOKENS SECTION */ -TOKENS - /* ----- terminal classes ----- */ - /* EOF is 0 */ - EOL - ident - LiteralString - LiteralCharacter - LiteralInteger - LiteralDouble - LiteralSingle - LiteralDecimal - LiteralDate - XmlOpenTag - XmlCloseTag - XmlStartInlineVB - XmlEndInlineVB - XmlCloseTagEmptyElement - XmlOpenEndTag - XmlContent - XmlComment - XmlCData - XmlProcessingInstruction - - /* ----- special character ----- */ - "=" - ":" - "," - "&" - "/" - "\\" - "." - "..." - ".@" - "!" - "-" - "+" - "^" - "?" - "*" - "{" - "}" - "(" - ")" - ">" - "<" - "<>" - ">=" - "<=" - "<<" - ">>" - "+=" - "^=" - "-=" - "*=" - "/=" - "\\=" - "<<=" - ">>=" - "&=" - ":=" - - /* ----- keywords ----- */ - "AddHandler" - "AddressOf" - "Aggregate" - "Alias" - "And" - "AndAlso" - "Ansi" - "As" - "Ascending" - "Assembly" - "Auto" - "Binary" - "Boolean" - "ByRef" - "By" - "Byte" - "ByVal" - "Call" - "Case" - "Catch" - "CBool" - "CByte" - "CChar" - "CDate" - "CDbl" - "CDec" - "Char" - "CInt" - "Class" - "CLng" - "CObj" - "Compare" - "Const" - "Continue" - "CSByte" - "CShort" - "CSng" - "CStr" - "CType" - "CUInt" - "CULng" - "CUShort" - "Custom" - "Date" - "Decimal" - "Declare" - "Default" - "Delegate" - "Descending" - "Dim" - "DirectCast" - "Distinct" - "Do" - "Double" - "Each" - "Else" - "ElseIf" - "End" - "EndIf" - "Enum" - "Equals" - "Erase" - "Error" - "Event" - "Exit" - "Explicit" - "False" - "Finally" - "For" - "Friend" - "From" - "Function" - "Get" - "GetType" - "Global" - "GoSub" - "GoTo" - "Group" - "Handles" - "If" - "Implements" - "Imports" - "In" - "Infer" - "Inherits" - "Integer" - "Interface" - "Into" - "Is" - "IsNot" - "Join" - "Key" - "Let" - "Lib" - "Like" - "Long" - "Loop" - "Me" - "Mod" - "Module" - "MustInherit" - "MustOverride" - "MyBase" - "MyClass" - "Namespace" - "Narrowing" - "New" - "Next" - "Not" - "Nothing" - "NotInheritable" - "NotOverridable" - "Object" - "Of" - "Off" - "On" - "Operator" - "Option" - "Optional" - "Or" - "Order" - "OrElse" - "Out" - "Overloads" - "Overridable" - "Overrides" - "ParamArray" - "Partial" - "Preserve" - "Private" - "Property" - "Protected" - "Public" - "RaiseEvent" - "ReadOnly" - "ReDim" - "Rem" - "RemoveHandler" - "Resume" - "Return" - "SByte" - "Select" - "Set" - "Shadows" - "Shared" - "Short" - "Single" - "Skip" - "Static" - "Step" - "Stop" - "Strict" - "String" - "Structure" - "Sub" - "SyncLock" - "Take" - "Text" - "Then" - "Throw" - "To" - "True" - "Try" - "TryCast" - "TypeOf" - "UInteger" - "ULong" - "Unicode" - "Until" - "UShort" - "Using" - "Variant" - "Wend" - "When" - "Where" - "While" - "Widening" - "With" - "WithEvents" - "WriteOnly" - "Xor" - "GetXmlNamespace" -/* END AUTOGENERATED TOKENS SECTION */ - -PRODUCTIONS -/*------------------------------------------------------------------------*/ -VBIndentationStrategy = - { ANY } - { NamespaceMemberDeclaration { ANY } } -. - -StatementTerminator = - EOL | ":" -. - -NamespaceMemberDeclaration = - NamespaceDeclaration - | TypeDeclaration -. - -NamespaceDeclaration = - "Namespace" { ANY } StatementTerminator - (. Indent(la); .) - { NamespaceMemberDeclaration { ANY } } - (. Unindent(la); .) - "End" "Namespace" StatementTerminator -. - -TypeDeclaration = - ClassOrModuleOrStructureTypeDeclaration | - DelegateTypeDeclaration | - EnumTypeDeclaration | - InterfaceDeclaration -. - -DelegateTypeDeclaration = "Delegate" { ANY } StatementTerminator . - -EnumTypeDeclaration = - "Enum" { ANY } StatementTerminator - (. Indent(la); .) - { ANY } StatementTerminator - (. Unindent(la); .) - "End" "Enum" StatementTerminator -. - -END VBIndentationStrategy. \ No newline at end of file diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBIndentationStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBIndentationStrategy.cs deleted file mode 100644 index 71740b52d6..0000000000 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBIndentationStrategy.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) -// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) - -using System; -using System.Collections.Generic; -using ICSharpCode.NRefactory.Parser; -using ICSharpCode.SharpDevelop.Editor; - -namespace ICSharpCode.VBNetBinding -{ - /// - /// Description of VBIndentationStrategy. - /// - public partial class VBIndentationStrategy - { - Stack indentationStack = new Stack(); - ITextEditor editor; - IDocumentLine startLine, endLine; - - public string CurrentIndent { - get { return (indentationStack.PeekOrDefault() ?? Block.Empty).Indentation; } - } - - class Block { - public static readonly Block Empty = new Block { - Indentation = "", - StartLine = 1 - }; - - public string Indentation; - public int StartLine; - } - - public VBIndentationStrategy(ITextEditor editor, int start, int end) - : this() - { - this.editor = editor; - - startLine = editor.Document.GetLine(start); - endLine = editor.Document.GetLine(end); - } - - void Indent(Token la) - { - ApplyIndent(la); - Block parent = indentationStack.PeekOrDefault() ?? Block.Empty; - indentationStack.Push(new Block() { Indentation = parent.Indentation + editor.Options.IndentationString, StartLine = t.Location.Line + 1 } ); - } - - void Unindent(Token la) - { - ApplyIndent(la); - indentationStack.PopOrDefault(); - } - - void ApplyIndent(Token la) - { - Block current = indentationStack.PeekOrDefault() ?? Block.Empty; - - if (t.Location.Line < startLine.LineNumber) - return; - - IDocumentLine firstLine = startLine.LineNumber > current.StartLine ? startLine : editor.Document.GetLine(current.StartLine); - IDocumentLine currentLine = firstLine; - - while (currentLine.LineNumber < la.Location.Line) { - editor.Document.SmartReplaceLine(currentLine, current.Indentation + currentLine.Text.Trim()); - - if (currentLine.LineNumber == endLine.LineNumber) - break; - - currentLine = editor.Document.GetLine(currentLine.LineNumber + 1); - } - } - } -} diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs index e77ac474c3..772c827abb 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs @@ -23,6 +23,7 @@ namespace ICSharpCode.VBNetBinding /// public class VBNetFormattingStrategy : DefaultFormattingStrategy { + #region VB Statements static readonly List statements; internal static List Statements { @@ -85,6 +86,7 @@ namespace ICSharpCode.VBNetBinding Tokens.If, Tokens.For, Tokens.Do, Tokens.While, Tokens.With, Tokens.Select, Tokens.Try, Tokens.Property, Tokens.Get, Tokens.Set }); + #endregion bool doCasing; bool doInsertion; @@ -408,7 +410,6 @@ namespace ICSharpCode.VBNetBinding while ((currentToken = lexer.NextToken()).Kind != Tokens.EOF) { if (prevToken == null) prevToken = currentToken; - if (IsBlockStart(lexer, currentToken, prevToken)) { if ((tokens.Count > 0 && tokens.Peek().Kind != Tokens.Interface) || IsDeclaration(currentToken.Kind)) tokens.Push(currentToken); @@ -514,10 +515,9 @@ namespace ICSharpCode.VBNetBinding ILexer lexer = ParserFactory.CreateLexer(SupportedLanguage.VBNet, new StringReader(editor.Document.Text)); Stack indentation = new Stack(); - indentation.Push(string.Empty); - int oldLine = 1; + List eols = new List(); bool inInterface = false; bool isMustOverride = false; @@ -527,6 +527,9 @@ namespace ICSharpCode.VBNetBinding Token currentToken = null; Token prevToken = null; + int blockStart = 1; + int lambdaNesting = 0; + while ((currentToken = lexer.NextToken()).Kind != Tokens.EOF) { if (prevToken == null) prevToken = currentToken; @@ -540,11 +543,29 @@ namespace ICSharpCode.VBNetBinding if (currentToken.Kind == Tokens.Declare) isDeclare = true; - if (currentToken.Kind == Tokens.EOL) + if (currentToken.Kind == Tokens.EOL) { isDelegate = isDeclare = isMustOverride = false; + eols.Add(currentToken.Location.Line); + } if (IsBlockEnd(currentToken, prevToken)) { - ApplyToRange(editor, indentation, oldLine, currentToken.Location.Line, begin, end); + // indent the lines inside the block + // this is an End-statement + // hence we indent from blockStart to the previous line + int blockEnd = currentToken.Location.Line - 1; + + // if this is a lambda end include End-Statement in block +// if (lambdaNesting > 0 && (currentToken.Kind == Tokens.Function || currentToken.Kind == Tokens.Sub)) { +// blockEnd++; +// } + + ApplyToRange(editor, indentation, eols, blockStart, blockEnd, begin, end); + + if (lambdaNesting > 0 && (currentToken.Kind == Tokens.Function || currentToken.Kind == Tokens.Sub)) { + Unindent(indentation); + + ApplyToRange(editor, indentation, eols, currentToken.Location.Line, currentToken.Location.Line, begin, end); + } if (currentToken.Kind == Tokens.Interface) inInterface = false; @@ -556,12 +577,31 @@ namespace ICSharpCode.VBNetBinding Unindent(indentation); } - oldLine = currentToken.Location.Line; + // block start is this line (for the lines between two blocks) + blockStart = currentToken.Location.Line; + + if (lambdaNesting > 0 && (currentToken.Kind == Tokens.Function || currentToken.Kind == Tokens.Sub)) { + blockStart++; + lambdaNesting--; + } } - if (IsBlockStart(lexer, currentToken, prevToken)) { - int line = GetLastVisualLine(currentToken.Location.Line, editor); - ApplyToRange(editor, indentation, oldLine, line, begin, end); + bool isMultiLineLambda; + if (IsBlockStart(lexer, currentToken, prevToken, out isMultiLineLambda)) { + // indent the lines between the last and this block + // this is a Begin-statement + // hence we indent from blockStart to the this line + int lastVisualLine = FindNextEol(lexer); + eols.Add(lastVisualLine); + ApplyToRange(editor, indentation, eols, blockStart, lastVisualLine, begin, end); + + if (isMultiLineLambda && (currentToken.Kind == Tokens.Function || currentToken.Kind == Tokens.Sub)) { + lambdaNesting++; + int endColumn = currentToken.Location.Column; + int startColumn = DocumentUtilitites.GetWhitespaceAfter(editor.Document, editor.Document.GetLine(lastVisualLine).Offset).Length; + if (startColumn < endColumn) + Indent(editor, indentation, new string(' ', endColumn - startColumn - 1)); + } if (!inInterface && !isMustOverride && !isDeclare && !isDelegate) { Indent(editor, indentation); @@ -573,31 +613,78 @@ namespace ICSharpCode.VBNetBinding if (currentToken.Kind == Tokens.Interface) inInterface = true; - oldLine = line + 1; + // block start is the following line (for the lines inside a block) + blockStart = lastVisualLine + 1; } prevToken = currentToken; } - // do last indent step - int newLine = prevToken.Location.Line; - - if (oldLine > newLine) - newLine = oldLine; - - ApplyToRange(editor, indentation, oldLine, newLine, begin, end); + ApplyToRange(editor, indentation, eols, blockStart, editor.Document.TotalNumberOfLines, begin, end); return (indentation.PeekOrDefault() ?? string.Empty).Length; } - static int GetLastVisualLine(int line, ITextEditor area) + static int FindNextEol(ILexer lexer) { - string text = area.Document.GetLine(line).Text.TrimComments(); - while (text.EndsWith("_", StringComparison.Ordinal)) { - line++; - text = area.Document.GetLine(line).Text.TrimComments(); + lexer.StartPeek(); + + Token t = lexer.Peek(); + + while (t.Kind != Tokens.EOL) + t = lexer.Peek(); + + return t.Location.Line; + } + + static void ApplyToRange(ITextEditor editor, Stack indentation, List eols, int blockStart, int blockEnd, int selectionStart, int selectionEnd) { + LoggingService.InfoFormatted("indenting line {0} to {1} with {2}", blockStart, blockEnd, (indentation.PeekOrDefault() ?? "").Length); + + int nextEol = -1; + bool wasMultiLine = false; + + for (int i = blockStart; i <= blockEnd; i++) { + IDocumentLine curLine = editor.Document.GetLine(i); + string lineText = curLine.Text.TrimStart(); + string noComments = lineText.TrimComments().TrimEnd(); + + // adjust indentation if the current line is not selected + // lines between the selection will be aligned to the selected level + if (i < selectionStart || i > selectionEnd) { + indentation.PopOrDefault(); + indentation.Push(DocumentUtilitites.GetWhitespaceAfter(editor.Document, curLine.Offset)); + } + + // look for next eol if line is not empty + // (the lexer does not produce eols for empty lines) + if (!string.IsNullOrEmpty(noComments) && i >= nextEol) { + int search = eols.BinarySearch(i); + if (search < 0) + search = ~search; + nextEol = search < eols.Count ? eols[search] : i; + } + + // remove indentation in last line of multiline array(, collection, object) initializers + if (i == nextEol && wasMultiLine && noComments == "}") { + wasMultiLine = false; + Unindent(indentation); + } + + // apply the indentation + editor.Document.SmartReplaceLine(curLine, (indentation.PeekOrDefault() ?? "") + lineText); + + // indent line if it is ended by (implicit) line continuation + if (i < nextEol && !wasMultiLine) { + wasMultiLine = true; + Indent(editor, indentation); + } + + // unindent if this is the last line of a multiline statement + if (i == nextEol && wasMultiLine) { + wasMultiLine = false; + Unindent(indentation); + } } - return line; } static void Unindent(Stack indentation) @@ -605,13 +692,21 @@ namespace ICSharpCode.VBNetBinding indentation.PopOrDefault(); } - static void Indent(ITextEditor editor, Stack indentation) + static void Indent(ITextEditor editor, Stack indentation, string indent = null) { - indentation.Push((indentation.PeekOrDefault() ?? string.Empty) + editor.Options.IndentationString); + indentation.Push((indentation.PeekOrDefault() ?? string.Empty) + (indent ?? editor.Options.IndentationString)); } internal static bool IsBlockStart(ILexer lexer, Token current, Token prev) { + bool tmp; + return IsBlockStart(lexer, current, prev, out tmp); + } + + static bool IsBlockStart(ILexer lexer, Token current, Token prev, out bool isMultiLineLambda) + { + isMultiLineLambda = false; + if (blockTokens.Contains(current.Kind)) { if (current.Kind == Tokens.If) { if (prev.Kind != Tokens.EOL) @@ -627,10 +722,33 @@ namespace ICSharpCode.VBNetBinding } } - if (current.Kind == Tokens.Function) { + // check if it is a lambda + if (current.Kind == Tokens.Function || current.Kind == Tokens.Sub) { lexer.StartPeek(); - if (lexer.Peek().Kind == Tokens.OpenParenthesis) + bool isSingleLineLambda = false; + + if (lexer.Peek().Kind == Tokens.OpenParenthesis) { + isSingleLineLambda = true; + + int brackets = 1; + + // look for end of parameter list + while (brackets > 0) { + var t = lexer.Peek(); + if (t.Kind == Tokens.OpenParenthesis) + brackets++; + if (t.Kind == Tokens.CloseParenthesis) + brackets--; + } + + // expression is multi-line lambda if next Token is EOL + if (brackets == 0) + return isMultiLineLambda = (lexer.Peek().Kind == Tokens.EOL); + } + + // do not indent if current token is start of single-line lambda + if (isSingleLineLambda) return false; } @@ -716,41 +834,6 @@ namespace ICSharpCode.VBNetBinding return false; } - static void ApplyToRange(ITextEditor editor, Stack indentation, int begin, int end, int selBegin, int selEnd) - { - bool multiLine = false; - - for (int i = begin; i <= end; i++) { - IDocumentLine curLine = editor.Document.GetLine(i); - string lineText = curLine.Text.TrimStart(' ', '\t', '\r', '\n'); - string noComments = lineText.TrimComments().TrimEnd(' ', '\t', '\r', '\n'); - - if (i < selBegin || i > selEnd) { - indentation.PopOrDefault(); - indentation.Push(DocumentUtilitites.GetWhitespaceAfter(editor.Document, curLine.Offset)); - } - - // change indentation before (indent this line) - if (multiLine && noComments.EndsWith("}", StringComparison.OrdinalIgnoreCase)) { - Unindent(indentation); - multiLine = false; - } - - editor.Document.SmartReplaceLine(curLine, (indentation.PeekOrDefault() ?? string.Empty) + lineText); - - // change indentation afterwards (indent next line) - if (!multiLine && noComments.EndsWith("_", StringComparison.OrdinalIgnoreCase)) { - Indent(editor, indentation); - multiLine = true; - } - - if (multiLine && !noComments.EndsWith("_", StringComparison.OrdinalIgnoreCase)) { - multiLine = false; - Unindent(indentation); - } - } - } - /// /// Gets the next member after the specified caret position. /// diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/LanguageUtils.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/LanguageUtils.cs index c5d76c5951..3677dfd1de 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/LanguageUtils.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/LanguageUtils.cs @@ -20,7 +20,7 @@ namespace ICSharpCode.VBNetBinding if (line[i] == '"') inStr = !inStr; if (line[i] == '\'' && !inStr) - return line.Substring(0, i).Trim(); + return line.Substring(0, i); } return line; diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs index 4e8f3c70ff..388100c388 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs @@ -56,7 +56,7 @@ namespace ICSharpCode.VBNetBinding && directive.Arg.StartsWith("region", StringComparison.OrdinalIgnoreCase) && regionStartDirectives.Any()) { ICSharpCode.NRefactory.PreprocessingDirective start = regionStartDirectives.Pop(); - cu.FoldingRegions.Add(new FoldingRegion(start.Arg.TrimComments().Trim('"'), DomRegion.FromLocation(start.StartPosition, directive.EndPosition))); + cu.FoldingRegions.Add(new FoldingRegion(start.Arg.TrimComments().Trim().Trim('"'), DomRegion.FromLocation(start.StartPosition, directive.EndPosition))); } } } diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj index 2e42256570..7213182a95 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj @@ -63,10 +63,6 @@ Resources.BuildOptions.xfrm - - VBIndentationStrategy.atg - - @@ -88,13 +84,6 @@ - - VBIndentationStrategy.atg - - - CocoParserGenerator - ICSharpCode.VBNetBinding - Always diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs index 3e17e45937..2394108efb 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs @@ -9,7 +9,7 @@ using NUnit.Framework; namespace ICSharpCode.VBNetBinding.Tests { - [TestFixture, Ignore] + [TestFixture] public class IndentationTests { [Test] @@ -63,22 +63,93 @@ End Interface"; } [Test] - public void ArrayInitializerTest() + public void SD1775_Fix() { string expected = @"Public Class Test Private Sub Tester() - test(asdf, _ - asdf, _ - asdf, _ - asdf) - - Dim test As Integer() = { _ - 2,2,3,34,4,5 _ - } + B = New Burger With {Cheese = True, _ + Lettuce = True, _ + Tomato = True, _ + CookLevel = MeatCookLevel.WellDone} End Sub End Class"; string code = @"Public Class Test +Private Sub Tester() +B = New Burger With {Cheese = True, _ +Lettuce = True, _ +Tomato = True, _ +CookLevel = MeatCookLevel.WellDone} +End Sub +End Class"; + + RunFormatTest(code, expected); + } + + [Test] + public void Simple() + { + string expected = @"' +' Created by SharpDevelop. +' User: Siegfried +' Date: 25.02.2011 +' Time: 14:41 +' +' To change this template use Tools | Options | Coding | Edit Standard Headers. +' +Imports Microsoft.VisualBasic.ApplicationServices + +Namespace My + ' This file controls the behaviour of the application. + Partial Class MyApplication + Public Sub New() + MyBase.New(AuthenticationMode.Windows) + Me.IsSingleInstance = False + Me.EnableVisualStyles = True + Me.SaveMySettingsOnExit = True + Me.ShutDownStyle = ShutdownMode.AfterMainFormCloses + End Sub + + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = My.Forms.MainForm + End Sub + End Class +End Namespace"; + + string code = @"' +' Created by SharpDevelop. +' User: Siegfried +' Date: 25.02.2011 +' Time: 14:41 +' +' To change this template use Tools | Options | Coding | Edit Standard Headers. +' +Imports Microsoft.VisualBasic.ApplicationServices + +Namespace My +' This file controls the behaviour of the application. +Partial Class MyApplication +Public Sub New() +MyBase.New(AuthenticationMode.Windows) +Me.IsSingleInstance = False +Me.EnableVisualStyles = True +Me.SaveMySettingsOnExit = True +Me.ShutDownStyle = ShutdownMode.AfterMainFormCloses +End Sub + +Protected Overrides Sub OnCreateMainForm() +Me.MainForm = My.Forms.MainForm +End Sub +End Class +End Namespace"; + + RunFormatTest(code, expected); + } + + [Test] + public void ArrayInitializerTest() + { + string expected = @"Public Class Test Private Sub Tester() test(asdf, _ asdf, _ @@ -86,11 +157,24 @@ End Class"; asdf) Dim test As Integer() = { _ - 2,2,3,34,4,5 _ + 2,2,3,34,4,5 _ } End Sub End Class"; + string code = @"Public Class Test +Private Sub Tester() +test(asdf, _ +asdf, _ +asdf, _ +asdf) + +Dim test As Integer() = { _ +2,2,3,34,4,5 _ +} +End Sub +End Class"; + RunFormatTest(code, expected); } @@ -177,7 +261,7 @@ End Class"; [Test] public void SelectCaseTest() { - string expected = @"Public Class Test + string expected = @"Public Class Test Private Sub Tester() Select Case a Case 0 @@ -215,7 +299,7 @@ End Class"; [Test] public void SelectCaseTest2() { - string expected = @"Public Class Test + string expected = @"Public Class Test Private Sub Tester() Select Case a Case 0 @@ -247,7 +331,7 @@ End Class"; [Test] public void WithTest() { - string expected = @"Public Class Test + string expected = @"Public Class Test Private Sub Tester() With a If True Then @@ -281,7 +365,7 @@ End Class"; [Test] public void WithTest2() { - string expected = @"Public Class Test + string expected = @"Public Class Test Private Sub Tester() With a If True Then @@ -320,6 +404,56 @@ End Class"; RunFormatTest(code, expected); } + [Test, Ignore] + // TODO : find out why unit test does not work, but normal run works + public void FunctionLambda() + { + string expected = @"Public Class Test + Private Sub Tester() + Dim increment1 = Function(x) x + 1 + Dim increment2 = Function(x) + Return x + 2 + End Function + End Sub +End Class"; + + string code = @"Public Class Test +Private Sub Tester() +Dim increment1 = Function(x) x + 1 +Dim increment2 = Function(x) +Return x + 2 +End Function +End Sub +End Class"; + + RunFormatTest(code, expected); + } + + [Test, Ignore] + // TODO : find out why unit test does not work, but normal run works + public void SubLambda() + { + string expected = @"Public Class Test + Private Sub Tester() + Dim writeline1 = Sub(x) Console.WriteLine(x) + Dim writeline2 = Sub(x) + Console.WriteLine(x) + End Sub + End Sub +End Class"; + + string code = @"Public Class Test +Private Sub Tester() +Dim writeline1 = Sub(x) Console.WriteLine(x) +Dim writeline2 = Sub(x) +Console.WriteLine(x) +End Sub +End Sub +End Class"; + + RunFormatTest(code, expected); + } + void RunFormatTest(string code, string expectedCode) { AvalonEditTextEditorAdapter editor = new AvalonEditTextEditorAdapter(new TextEditor()); diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs index 5e7f176696..1dc3dffb6b 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.cs @@ -28,7 +28,7 @@ namespace ICSharpCode.AvalonEdit.AddIn /// /// ViewModel used for combobox items. /// - class EntityItem : IComparable + class EntityItem : IComparable, System.ComponentModel.INotifyPropertyChanged { IEntity entity; IImage image; @@ -96,6 +96,14 @@ namespace ICSharpCode.AvalonEdit.AddIn { return text; } + + // I'm not sure if it actually was a leak or caused by something else, but I saw QCB.EntityItem being alive for longer + // than it should when looking at the heap with WinDbg. + // Maybe this was caused by http://support.microsoft.com/kb/938416/en-us, so I'm adding INotifyPropertyChanged to be sure. + event System.ComponentModel.PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged { + add { } + remove { } + } } public QuickClassBrowser() diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs index 40d2d85741..8143e975a6 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs @@ -2,6 +2,7 @@ // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using System.ComponentModel; using System.Linq; using System.Windows; using System.Windows.Controls; @@ -137,7 +138,7 @@ namespace ICSharpCode.AvalonEdit.AddIn new object Description { get; } } - sealed class CodeCompletionDataAdapter : ICompletionData + sealed class CodeCompletionDataAdapter : ICompletionData, INotifyPropertyChanged { readonly SharpDevelopCompletionWindow window; readonly ICompletionItem item; @@ -202,5 +203,11 @@ namespace ICSharpCode.AvalonEdit.AddIn if (context.CompletionCharHandled && txea != null) txea.Handled = true; } + + // This is required to work around http://support.microsoft.com/kb/938416/en-us + event System.ComponentModel.PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged { + add { } + remove { } + } } } diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs index 2606e46be1..9fd70137df 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs @@ -219,6 +219,14 @@ End If", End While", Keyword = "While" }, + new CodeSnippet { + Name = "ctor", + Description = "Constructor", + Text = @"Public Sub New(${anchor:parameterList}) + ${refactoring:ctor} +End Sub", + Keyword = "Sub" + }, new CodeSnippet { Name = "Select", Description = "Select statement", diff --git a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/EDMDesignerViewContent.cs b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/EDMDesignerViewContent.cs index 37f5293ac1..8cb947a9b5 100644 --- a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/EDMDesignerViewContent.cs +++ b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/EDMDesignerViewContent.cs @@ -89,12 +89,7 @@ namespace ICSharpCode.Data.EDMDesigner.Core.UI.DisplayBinding if (primaryFile == null) throw new ArgumentNullException("primaryFile"); - try { - primaryFile.ForceInitializeView(this); // call Load() - } catch (WizardCancelledException) { - this.Files.Clear(); // unregister with OpenedFile - throw; - } + primaryFile.ForceInitializeView(this); // call Load() EDMDesignerChangeWatcher.AddEDMDesignerViewContent(this); } diff --git a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/Windows/EDMWizard/EDMWizardErrorUserControl.xaml b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/Windows/EDMWizard/EDMWizardErrorUserControl.xaml index c1914b05d5..c8806fea37 100644 --- a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/Windows/EDMWizard/EDMWizardErrorUserControl.xaml +++ b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/Windows/EDMWizard/EDMWizardErrorUserControl.xaml @@ -9,6 +9,6 @@ The following error(s) occured during generation of the Entity Data Model: - + diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml.cs index 37bb94f5ea..475c5102d1 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml.cs @@ -80,7 +80,7 @@ namespace SharpRefactoring.Gui new ThrowStatement( new ObjectCreateExpression( new TypeReference("ArgumentOutOfRangeException"), - new List() { new PrimitiveExpression(w.ParameterName, '"' + w.ParameterName + '"'), new IdentifierExpression(w.ParameterName), new BinaryOperatorExpression(new PrimitiveExpression("Value must be between "), BinaryOperatorType.Add, new BinaryOperatorExpression(new IdentifierExpression("lower"), BinaryOperatorType.Add, new BinaryOperatorExpression(new PrimitiveExpression(" and "), BinaryOperatorType.Add, new IdentifierExpression("upper")))) } + new List() { new PrimitiveExpression(w.ParameterName, '"' + w.ParameterName + '"'), new IdentifierExpression(w.ParameterName), new BinaryOperatorExpression(new PrimitiveExpression("Value must be between "), BinaryOperatorType.Concat, new BinaryOperatorExpression(new IdentifierExpression("lower"), BinaryOperatorType.Concat, new BinaryOperatorExpression(new PrimitiveExpression(" and "), BinaryOperatorType.Concat, new IdentifierExpression("upper")))) } ) ) ) diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs index 4c636a0f20..4137800d7f 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/InsertCtorSnippetRefactoring.cs @@ -70,14 +70,17 @@ namespace SharpRefactoring { int i = 0; - foreach (var f in sourceClass.Fields.Where(field => !field.IsConst && field.IsStatic == sourceClass.IsStatic)) { + foreach (var f in sourceClass.Fields.Where(field => !field.IsConst + && field.IsStatic == sourceClass.IsStatic + && field.ReturnType != null)) { yield return new PropertyOrFieldWrapper(f) { Index = i, IsSelected = true }; i++; } foreach (var p in sourceClass.Properties.Where(prop => prop.CanSet && !prop.IsIndexer && PropertyRefactoringMenuBuilder.IsAutomaticProperty(prop) - && prop.IsStatic == sourceClass.IsStatic)) { + && prop.IsStatic == sourceClass.IsStatic + && prop.ReturnType != null)) { yield return new PropertyOrFieldWrapper(p) { Index = i, IsSelected = true }; i++; } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs index 86dc81848d..23ed66e594 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Globalization; @@ -21,7 +22,7 @@ namespace ICSharpCode.AvalonEdit.Document /// /// However, there is a single method that is thread-safe: (and its overloads). /// - public sealed class TextDocument : ITextSource + public sealed class TextDocument : ITextSource, INotifyPropertyChanged { #region Thread ownership readonly object lockObject = new object(); @@ -207,8 +208,16 @@ namespace ICSharpCode.AvalonEdit.Document /// Is raised when the TextLength property changes. /// /// + [Obsolete("This event will be removed in a future version; use the PropertyChanged event instead")] public event EventHandler TextLengthChanged; + /// + /// Is raised when one of the properties , , , + /// changes. + /// + /// + public event PropertyChangedEventHandler PropertyChanged; + /// /// Is raised before the document changes. /// @@ -231,8 +240,7 @@ namespace ICSharpCode.AvalonEdit.Document /// EndUpdate() /// /// event is raised - /// event is raised - /// event is raised + /// event is raised (for the Text, TextLength, LineCount properties, in that order) /// End of change group (on undo stack) /// event is raised /// @@ -418,21 +426,30 @@ namespace ICSharpCode.AvalonEdit.Document fireTextChanged = false; if (TextChanged != null) TextChanged(this, EventArgs.Empty); + OnPropertyChanged("Text"); int textLength = rope.Length; if (textLength != oldTextLength) { oldTextLength = textLength; if (TextLengthChanged != null) TextLengthChanged(this, EventArgs.Empty); + OnPropertyChanged("TextLength"); } int lineCount = lineTree.LineCount; if (lineCount != oldLineCount) { oldLineCount = lineCount; if (LineCountChanged != null) LineCountChanged(this, EventArgs.Empty); + OnPropertyChanged("LineCount"); } } } + + void OnPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } #endregion #region Insert / Remove / Replace @@ -743,6 +760,7 @@ namespace ICSharpCode.AvalonEdit.Document undoStack.ClearAll(); // first clear old undo stack, so that it can't be used to perform unexpected changes on this document // ClearAll() will also throw an exception when it's not safe to replace the undo stack (e.g. update is currently in progress) undoStack = value; + OnPropertyChanged("UndoStack"); } } } @@ -775,6 +793,7 @@ namespace ICSharpCode.AvalonEdit.Document /// /// Is raised when the LineCount property changes. /// + [Obsolete("This event will be removed in a future version; use the PropertyChanged event instead")] public event EventHandler LineCountChanged; #endregion diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocumentWeakEventManager.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocumentWeakEventManager.cs index 9c118cd00c..ba71084cbc 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocumentWeakEventManager.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocumentWeakEventManager.cs @@ -91,6 +91,7 @@ namespace ICSharpCode.AvalonEdit.Document /// Weak event manager for the event. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] + [Obsolete("The TextDocument.LineCountChanged event will be removed in a future version. Use PropertyChangedEventManager instead.")] public sealed class LineCountChanged : WeakEventManagerBase { /// @@ -110,6 +111,7 @@ namespace ICSharpCode.AvalonEdit.Document /// Weak event manager for the event. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] + [Obsolete("The TextDocument.TextLengthChanged event will be removed in a future version. Use PropertyChangedEventManager instead.")] public sealed class TextLengthChanged : WeakEventManagerBase { /// diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/LineNumberMargin.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/LineNumberMargin.cs index 59ca29864b..a4e0c17683 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/LineNumberMargin.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/LineNumberMargin.cs @@ -2,6 +2,7 @@ // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using System.ComponentModel; using System.Globalization; using System.Windows; using System.Windows.Controls; @@ -89,11 +90,11 @@ namespace ICSharpCode.AvalonEdit.Editing protected override void OnDocumentChanged(TextDocument oldDocument, TextDocument newDocument) { if (oldDocument != null) { - TextDocumentWeakEventManager.LineCountChanged.RemoveListener(oldDocument, this); + PropertyChangedEventManager.RemoveListener(oldDocument, this, "LineCount"); } base.OnDocumentChanged(oldDocument, newDocument); if (newDocument != null) { - TextDocumentWeakEventManager.LineCountChanged.AddListener(newDocument, this); + PropertyChangedEventManager.AddListener(newDocument, this, "LineCount"); } OnDocumentLineCountChanged(); } @@ -101,7 +102,7 @@ namespace ICSharpCode.AvalonEdit.Editing /// protected virtual bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e) { - if (managerType == typeof(TextDocumentWeakEventManager.LineCountChanged)) { + if (managerType == typeof(PropertyChangedEventManager)) { OnDocumentLineCountChanged(); return true; } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs index 6fdaa077a0..68483921bb 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs @@ -1739,12 +1739,21 @@ namespace ICSharpCode.AvalonEdit.Rendering #endregion /// - /// Collapses lines for the purpose of scrolling. This method is meant for - /// s that cause s to span + /// Collapses lines for the purpose of scrolling. s marked as collapsed will be hidden + /// and not used to start the generation of a . + /// + /// + /// This method is meant for s that cause s to span /// multiple s. Do not call it without providing a corresponding /// . /// If you want to create collapsible text sections, see . - /// + /// + /// Note that if you want a VisualLineElement to span from line N to line M, then you need to collapse only the lines + /// N+1 to M. Do not collapse line N itself. + /// + /// When you no longer need the section to be collapsed, call on the + /// returned from this method. + /// public CollapsedLineSection CollapseLines(DocumentLine start, DocumentLine end) { VerifyAccess(); diff --git a/src/Libraries/NRefactory/Project/NRefactory.csproj b/src/Libraries/NRefactory/Project/NRefactory.csproj index 20b44eab7e..bf4c1e7325 100644 --- a/src/Libraries/NRefactory/Project/NRefactory.csproj +++ b/src/Libraries/NRefactory/Project/NRefactory.csproj @@ -155,6 +155,7 @@ CocoParserGenerator ICSharpCode.NRefactory.Parser.VB + Parser.cs ExpressionFinder.atg diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg index 21548a0637..b0961d47f3 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg @@ -367,13 +367,13 @@ TypeOrMemberModifier = InterfaceEvent = "Event" (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) - [ "As" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) | "(" [ ParameterList ] ")" ] + [ "As" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) | ParameterListInParenthesis ] StatementTerminator . InterfaceProperty = "Property" (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) - [ "(" [ ParameterList ] ")" ] [ "As" (. PushContext(Context.Type, la, t); .) { AttributeBlock } TypeName (. PopContext(); .) ] + [ ParameterListInParenthesis ] [ "As" (. PushContext(Context.Type, la, t); .) { AttributeBlock } TypeName (. PopContext(); .) ] StatementTerminator . @@ -435,7 +435,7 @@ ExternalMemberDeclaration = (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) "Lib" LiteralString [ "Alias" LiteralString ] - [ "(" [ ParameterList ] ")" ] + [ ParameterListInParenthesis ] [ "As" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) ] StatementTerminator . @@ -443,10 +443,10 @@ ExternalMemberDeclaration = EventMemberDeclaration = "Event" (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) - ( "As" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) | [ "(" [ ParameterList ] ")" ] ) + ( "As" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) | [ ParameterListInParenthesis ] ) [ "Implements" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) /*"." IdentifierOrKeyword*/ { "," (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) /*"." IdentifierOrKeyword*/ } ] - /* the TypeName production already allows the "." IdentifierOrKeyword syntax, so to avoid an ambiguous grammer we just leave that out */ + /* the TypeName production already allows the "." IdentifierOrKeyword syntax, so to avoid an ambiguous grammar we just leave that out */ StatementTerminator . @@ -463,8 +463,8 @@ CustomEventMemberDeclaration = PropertyDeclaration = "Property" (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) - [ "(" [ ParameterList ] ")" ] - [ "As" { AttributeBlock } ( NewExpression | (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) ) ] + [ ParameterListInParenthesis ] + [ "As" (. PushContext(Context.Type, la, t); .) { AttributeBlock } ( NewExpression | TypeName ) (. PopContext(); .) ] [ "Implements" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) /*"." IdentifierOrKeyword*/ { "," (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) /*"." IdentifierOrKeyword*/ } ] [ "=" Expression ] StatementTerminator @@ -474,10 +474,10 @@ PropertyDeclaration = // so we need to simulate it (.OnEachPossiblePath: SetIdentifierExpected(la); .) } [ (. PushContext(Context.Member, la, t); .) - ( "Get" | "Set" ) [ "(" [ ParameterList ] ")" ] + ( "Get" | "Set" ) [ ParameterListInParenthesis ] StatementTerminatorAndBlock "End" ( "Get" | "Set" ) StatementTerminator - [ { AttributeBlock } { AccessModifier } ( "Get" | "Set" ) [ "(" [ ParameterList ] ")" ] + [ { AttributeBlock } { AccessModifier } ( "Get" | "Set" ) [ ParameterListInParenthesis ] StatementTerminatorAndBlock "End" ( "Get" | "Set" ) StatementTerminator ] @@ -686,15 +686,19 @@ LambdaExpression = . SubLambdaExpression = - "Sub" "(" [ ParameterList ] ")" + "Sub" ParameterListInParenthesis ( GREEDY Statement | StatementTerminatorAndBlock "End" "Sub" ) . FunctionLambdaExpression = - "Function" "(" [ ParameterList ] ")" + "Function" ParameterListInParenthesis ( GREEDY Expression | [ "As" (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) ] StatementTerminatorAndBlock "End" "Function" ) . +ParameterListInParenthesis = + "(" (. PushContext(Context.Default, la, t); .) [ ParameterList ] (. PopContext(); .) ")" +. + QueryExpression (. PushContext(Context.Query, la, t); .) = @@ -848,7 +852,7 @@ PrimitiveTypeName = TypeName = ( "Global" | Identifier | PrimitiveTypeName | "?" /* used for ? = completion */ ) { TypeSuffix } { "." IdentifierOrKeyword { TypeSuffix } } . -TypeSuffix = "(" ( "Of" [ TypeName ] { "," [ TypeName ] } | [ ArgumentList ] ) ")" . +TypeSuffix = "(" (. PushContext(Context.Expression, la, t); .) ( "Of" [ (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) ] { "," [ (. PushContext(Context.Type, la, t); .) TypeName (. PopContext(); .) ] } | [ ArgumentList ] ) (. PopContext(); .) ")" . IdentifierOrKeyword = ident | "AddHandler" @@ -1076,12 +1080,14 @@ VariableDeclarationStatement = ( "Dim" | "Static" | "Const" ) (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) [ "?" ] { "(" [ Expression ] { "," [ Expression ] } ")" } + [ "As" (. PushContext(Context.Type, la, t); .) ( NewExpression | TypeName ) (. PopContext(); .) ] + [ "=" Expression ] { "," (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) [ "?" ] { "(" [ Expression ] { "," [ Expression ] } ")" } + [ "As" (. PushContext(Context.Type, la, t); .) ( NewExpression | TypeName ) (. PopContext(); .) ] + [ "=" Expression ] } - [ "As" (. PushContext(Context.Type, la, t); .) ( NewExpression | TypeName ) (. PopContext(); .) ] - [ "=" Expression ] . WithOrLockStatement = @@ -1093,7 +1099,7 @@ AddOrRemoveHandlerStatement = . RaiseEventStatement = - "RaiseEvent" IdentifierOrKeyword [ "(" [ ArgumentList ] ")" ] + "RaiseEvent" IdentifierOrKeyword [ "(" (. PushContext(Context.Expression, la, t); .) [ ArgumentList ] (. PopContext(); .) ")" ] . IfStatement = diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs index 711f24d38c..40f9244fe9 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs @@ -25,14 +25,14 @@ namespace ICSharpCode.NRefactory.Parser.VB } } - void PushContext(Context context, Token la, Token t) - { - string indent = new string('\t', stack.Count); - Location l = la == null ? (t == null ? Location.Empty : t.EndLocation) : la.Location; - - stack.Push(new Block() { context = context, lastExpressionStart = l }); - Print(indent + "enter " + context); - } +void PushContext(Context context, Token la, Token t) +{ + string indent = new string('\t', stack.Count); + Location l = la == null ? (t == null ? Location.Empty : t.EndLocation) : la.Location; + + stack.Push(new Block() { context = context, lastExpressionStart = l }); + Print(indent + "enter " + context); +} public ExpressionFinder(ExpressionFinderState state) { diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs index 7d67e1d3ab..de47334b3e 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs @@ -9,8 +9,8 @@ namespace ICSharpCode.NRefactory.Parser.VB { partial class ExpressionFinder { - const int startOfExpression = 56; - const int endOfStatementTerminatorAndBlock = 267; + const int startOfExpression = 55; + const int endOfStatementTerminatorAndBlock = 263; static BitArray GetExpectedSet(int state) { switch (state) { @@ -25,9 +25,9 @@ partial class ExpressionFinder { case 5: return set[3]; case 6: - case 89: - case 268: - case 525: + case 88: + case 264: + case 528: { BitArray a = new BitArray(239); return a; @@ -45,23 +45,23 @@ partial class ExpressionFinder { return a; } case 11: - case 194: - case 200: - case 206: - case 245: - case 249: - case 299: - case 400: - case 410: - case 469: - case 512: - case 522: + case 193: + case 199: + case 205: + case 244: + case 248: + case 295: + case 399: + case 405: + case 472: + case 518: + case 525: case 533: case 563: case 599: - case 656: - case 673: - case 749: + case 648: + case 662: + case 735: return set[6]; case 12: case 13: @@ -81,22 +81,22 @@ partial class ExpressionFinder { case 23: case 24: case 36: + case 256: + case 259: case 260: - case 263: - case 264: + case 296: case 300: - case 304: - case 326: - case 341: - case 352: - case 355: - case 361: - case 366: - case 376: - case 377: - case 397: - case 421: - case 518: + case 322: + case 337: + case 348: + case 351: + case 357: + case 362: + case 372: + case 373: + case 396: + case 423: + case 524: case 530: case 536: case 540: @@ -111,12 +111,12 @@ partial class ExpressionFinder { case 614: case 621: case 624: - case 651: - case 654: - case 681: - case 692: - case 728: - case 748: + case 643: + case 646: + case 670: + case 678: + case 714: + case 734: { BitArray a = new BitArray(239); a.Set(1, true); @@ -130,19 +130,19 @@ partial class ExpressionFinder { case 18: return set[8]; case 19: - case 261: - case 275: - case 302: - case 356: - case 398: - case 449: + case 257: + case 271: + case 298: + case 352: + case 397: + case 452: case 573: case 593: case 612: case 616: case 622: - case 652: - case 693: + case 644: + case 679: { BitArray a = new BitArray(239); a.Set(113, true); @@ -162,7 +162,7 @@ partial class ExpressionFinder { case 27: return set[10]; case 28: - case 732: + case 718: return set[11]; case 29: return set[12]; @@ -170,67 +170,67 @@ partial class ExpressionFinder { return set[13]; case 31: case 32: - case 153: + case 152: + case 217: case 218: - case 219: - case 269: - case 280: - case 281: - case 436: - case 437: - case 457: - case 458: - case 459: + case 265: + case 276: + case 277: + case 442: + case 443: case 460: + case 461: + case 462: + case 463: case 551: case 552: case 585: case 586: - case 687: - case 688: - case 741: - case 742: + case 673: + case 674: + case 727: + case 728: return set[14]; case 33: case 34: - case 513: - case 514: - case 523: - case 524: + case 519: + case 520: + case 526: + case 527: case 553: case 554: - case 678: + case 667: return set[15]; case 35: case 37: - case 158: - case 169: - case 172: - case 188: - case 204: - case 222: - case 311: - case 336: - case 420: - case 433: - case 472: + case 157: + case 168: + case 171: + case 187: + case 203: + case 221: + case 307: + case 332: + case 422: + case 439: + case 475: case 529: case 547: case 555: - case 633: - case 636: - case 660: - case 663: - case 668: - case 680: - case 696: - case 698: - case 721: - case 724: - case 727: - case 733: - case 736: - case 754: + case 627: + case 630: + case 652: + case 655: + case 657: + case 669: + case 682: + case 684: + case 707: + case 710: + case 713: + case 719: + case 722: + case 740: return set[16]; case 38: case 41: @@ -238,23 +238,24 @@ partial class ExpressionFinder { case 39: return set[18]; case 40: - case 98: - case 102: - case 164: - case 392: - case 476: + case 97: + case 101: + case 163: + case 388: + case 479: return set[19]; case 42: - case 178: - case 185: - case 190: - case 254: - case 443: - case 468: + case 177: + case 184: + case 189: + case 253: + case 424: + case 449: case 471: + case 474: case 587: case 588: - case 648: + case 640: { BitArray a = new BitArray(239); a.Set(37, true); @@ -262,287 +263,283 @@ partial class ExpressionFinder { } case 43: case 44: + case 165: case 166: - case 167: return set[20]; case 45: - case 168: - case 189: - case 257: - case 446: - case 470: + case 46: + case 167: + case 188: + case 392: + case 427: case 473: - case 490: - case 521: - case 528: + case 476: + case 496: case 559: case 590: - case 627: - case 630: case 642: - case 650: - case 667: - case 684: - case 702: - case 731: - case 740: + case 688: + case 717: + case 726: { BitArray a = new BitArray(239); a.Set(38, true); return a; } - case 46: case 47: - case 51: - case 52: - case 53: - case 55: - case 414: - case 415: - case 417: - case 418: - case 484: - case 485: - case 715: - case 716: - return set[21]; case 48: + return set[21]; case 49: - return set[22]; - case 50: - case 180: - case 187: - case 395: + case 179: + case 186: + case 394: { BitArray a = new BitArray(239); a.Set(22, true); return a; } + case 50: + case 51: + case 52: case 54: - case 170: - case 171: - case 173: - case 182: - case 416: + case 390: + case 391: + case 412: + case 413: case 419: - case 423: - case 431: - case 480: - case 483: + case 420: case 487: - case 497: - case 504: - case 511: - case 717: + case 488: + case 701: + case 702: + return set[22]; + case 53: + case 169: + case 170: + case 172: + case 181: + case 414: + case 421: + case 429: + case 437: + case 483: + case 486: + case 490: + case 492: + case 493: + case 503: + case 510: + case 517: + case 703: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(38, true); return a; } + case 55: case 56: - case 57: - case 71: + case 70: + case 75: case 76: case 77: - case 78: - case 84: - case 100: - case 156: - case 179: - case 181: - case 183: - case 186: - case 196: - case 198: - case 216: - case 240: - case 278: - case 288: - case 290: - case 291: - case 308: - case 325: - case 330: - case 339: - case 345: + case 83: + case 99: + case 155: + case 178: + case 180: + case 182: + case 185: + case 195: + case 197: + case 215: + case 239: + case 274: + case 284: + case 286: + case 287: + case 304: + case 321: + case 326: + case 335: + case 341: + case 343: case 347: - case 351: - case 354: - case 360: - case 371: - case 373: - case 374: - case 380: - case 394: - case 396: - case 432: - case 462: - case 478: - case 479: + case 350: + case 356: + case 367: + case 369: + case 370: + case 376: + case 393: + case 395: + case 415: + case 438: + case 465: case 481: case 482: + case 484: + case 485: case 546: - case 632: + case 626: return set[23]; - case 58: - case 79: - case 159: + case 57: + case 78: + case 158: return set[24]; - case 59: + case 58: return set[25]; - case 60: + case 59: { BitArray a = new BitArray(239); a.Set(216, true); return a; } - case 61: + case 60: { BitArray a = new BitArray(239); a.Set(145, true); return a; } - case 62: - case 157: + case 61: + case 156: { BitArray a = new BitArray(239); a.Set(144, true); return a; } - case 63: + case 62: { BitArray a = new BitArray(239); a.Set(236, true); return a; } - case 64: + case 63: { BitArray a = new BitArray(239); a.Set(177, true); return a; } - case 65: + case 64: { BitArray a = new BitArray(239); a.Set(175, true); return a; } - case 66: + case 65: { BitArray a = new BitArray(239); a.Set(61, true); return a; } - case 67: + case 66: { BitArray a = new BitArray(239); a.Set(60, true); return a; } - case 68: + case 67: { BitArray a = new BitArray(239); a.Set(150, true); return a; } - case 69: + case 68: { BitArray a = new BitArray(239); a.Set(42, true); return a; } - case 70: + case 69: { BitArray a = new BitArray(239); a.Set(43, true); return a; } - case 72: - case 435: + case 71: + case 441: { BitArray a = new BitArray(239); a.Set(40, true); return a; } - case 73: + case 72: { BitArray a = new BitArray(239); a.Set(41, true); return a; } - case 74: - case 99: + case 73: + case 98: + case 222: case 223: - case 224: - case 286: - case 287: - case 338: - case 406: - case 750: + case 282: + case 283: + case 334: + case 736: { BitArray a = new BitArray(239); a.Set(20, true); return a; } - case 75: + case 74: { BitArray a = new BitArray(239); a.Set(154, true); return a; } - case 80: - case 92: - case 94: - case 149: + case 79: + case 91: + case 93: + case 148: { BitArray a = new BitArray(239); a.Set(35, true); return a; } + case 80: case 81: - case 82: return set[26]; - case 83: + case 82: { BitArray a = new BitArray(239); a.Set(36, true); return a; } - case 85: - case 101: - case 507: + case 84: + case 100: + case 513: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(36, true); return a; } - case 86: - case 122: + case 85: + case 121: { BitArray a = new BitArray(239); a.Set(162, true); return a; } + case 86: case 87: - case 88: return set[27]; - case 90: - case 93: + case 89: + case 92: + case 149: case 150: - case 151: - case 154: + case 153: return set[28]; - case 91: - case 103: - case 148: + case 90: + case 102: + case 147: { BitArray a = new BitArray(239); a.Set(233, true); return a; } - case 95: + case 94: { BitArray a = new BitArray(239); a.Set(26, true); @@ -550,103 +547,103 @@ partial class ExpressionFinder { a.Set(147, true); return a; } - case 96: + case 95: { BitArray a = new BitArray(239); a.Set(26, true); a.Set(147, true); return a; } - case 97: - case 697: + case 96: + case 683: { BitArray a = new BitArray(239); a.Set(26, true); return a; } - case 104: - case 357: + case 103: + case 353: { BitArray a = new BitArray(239); a.Set(231, true); return a; } - case 105: + case 104: { BitArray a = new BitArray(239); a.Set(230, true); return a; } - case 106: + case 105: { BitArray a = new BitArray(239); a.Set(224, true); return a; } - case 107: + case 106: { BitArray a = new BitArray(239); a.Set(223, true); return a; } - case 108: - case 303: + case 107: + case 299: { BitArray a = new BitArray(239); a.Set(218, true); return a; } - case 109: + case 108: { BitArray a = new BitArray(239); a.Set(213, true); return a; } - case 110: + case 109: { BitArray a = new BitArray(239); a.Set(212, true); return a; } - case 111: + case 110: { BitArray a = new BitArray(239); a.Set(211, true); return a; } - case 112: - case 450: + case 111: + case 453: { BitArray a = new BitArray(239); a.Set(210, true); return a; } - case 113: + case 112: { BitArray a = new BitArray(239); a.Set(209, true); return a; } - case 114: + case 113: { BitArray a = new BitArray(239); a.Set(206, true); return a; } - case 115: + case 114: { BitArray a = new BitArray(239); a.Set(203, true); return a; } - case 116: - case 363: + case 115: + case 359: { BitArray a = new BitArray(239); a.Set(197, true); return a; } - case 117: + case 116: case 598: case 617: { @@ -654,300 +651,300 @@ partial class ExpressionFinder { a.Set(186, true); return a; } - case 118: + case 117: { BitArray a = new BitArray(239); a.Set(184, true); return a; } - case 119: + case 118: { BitArray a = new BitArray(239); a.Set(176, true); return a; } - case 120: + case 119: { BitArray a = new BitArray(239); a.Set(170, true); return a; - } - case 121: - case 320: - case 327: - case 342: + } + case 120: + case 316: + case 323: + case 338: { BitArray a = new BitArray(239); a.Set(163, true); return a; } - case 123: + case 122: { BitArray a = new BitArray(239); a.Set(147, true); return a; } - case 124: - case 227: - case 232: - case 234: + case 123: + case 226: + case 231: + case 233: { BitArray a = new BitArray(239); a.Set(146, true); return a; } - case 125: - case 229: - case 233: + case 124: + case 228: + case 232: { BitArray a = new BitArray(239); a.Set(143, true); return a; } - case 126: + case 125: { BitArray a = new BitArray(239); a.Set(139, true); return a; } - case 127: + case 126: { BitArray a = new BitArray(239); a.Set(133, true); return a; } - case 128: - case 262: + case 127: + case 258: { BitArray a = new BitArray(239); a.Set(127, true); return a; } - case 129: - case 152: - case 252: + case 128: + case 151: + case 251: { BitArray a = new BitArray(239); a.Set(126, true); return a; } - case 130: + case 129: { BitArray a = new BitArray(239); a.Set(124, true); return a; } - case 131: + case 130: { BitArray a = new BitArray(239); a.Set(121, true); return a; } - case 132: - case 197: + case 131: + case 196: { BitArray a = new BitArray(239); a.Set(116, true); return a; } - case 133: + case 132: { BitArray a = new BitArray(239); a.Set(108, true); return a; } - case 134: + case 133: { BitArray a = new BitArray(239); a.Set(107, true); return a; } - case 135: + case 134: { BitArray a = new BitArray(239); a.Set(104, true); return a; } - case 136: - case 643: + case 135: + case 635: { BitArray a = new BitArray(239); a.Set(98, true); return a; } - case 137: + case 136: { BitArray a = new BitArray(239); a.Set(87, true); return a; } - case 138: + case 137: { BitArray a = new BitArray(239); a.Set(84, true); return a; } - case 139: - case 209: - case 239: + case 138: + case 208: + case 238: { BitArray a = new BitArray(239); a.Set(70, true); return a; } - case 140: + case 139: { BitArray a = new BitArray(239); a.Set(67, true); return a; } - case 141: + case 140: { BitArray a = new BitArray(239); a.Set(66, true); return a; } - case 142: + case 141: { BitArray a = new BitArray(239); a.Set(65, true); return a; } - case 143: + case 142: { BitArray a = new BitArray(239); a.Set(64, true); return a; } - case 144: + case 143: { BitArray a = new BitArray(239); a.Set(62, true); return a; } - case 145: - case 251: + case 144: + case 250: { BitArray a = new BitArray(239); a.Set(58, true); return a; } - case 146: + case 145: { BitArray a = new BitArray(239); a.Set(2, true); return a; } - case 147: + case 146: return set[29]; - case 155: + case 154: return set[30]; - case 160: + case 159: return set[31]; - case 161: + case 160: return set[32]; + case 161: case 162: - case 163: - case 474: - case 475: + case 477: + case 478: return set[33]; - case 165: + case 164: return set[34]; + case 173: case 174: - case 175: - case 323: - case 332: + case 319: + case 328: return set[35]; - case 176: - case 452: + case 175: + case 455: return set[36]; - case 177: - case 379: + case 176: + case 375: { BitArray a = new BitArray(239); a.Set(135, true); return a; } - case 184: + case 183: return set[37]; - case 191: + case 190: { BitArray a = new BitArray(239); a.Set(58, true); a.Set(126, true); return a; } + case 191: case 192: - case 193: return set[38]; - case 195: + case 194: { BitArray a = new BitArray(239); a.Set(171, true); return a; } - case 199: - case 213: - case 231: - case 236: - case 242: - case 244: - case 248: - case 250: + case 198: + case 212: + case 230: + case 235: + case 241: + case 243: + case 247: + case 249: return set[39]; + case 200: case 201: - case 202: { BitArray a = new BitArray(239); a.Set(63, true); a.Set(138, true); return a; } - case 203: - case 205: - case 324: + case 202: + case 204: + case 320: { BitArray a = new BitArray(239); a.Set(138, true); return a; } + case 206: case 207: - case 208: - case 210: - case 212: + case 209: + case 211: + case 213: case 214: - case 215: - case 225: - case 230: - case 235: - case 243: - case 247: + case 224: + case 229: + case 234: + case 242: + case 246: + case 269: case 273: - case 277: return set[40]; - case 211: + case 210: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(143, true); return a; } - case 217: + case 216: return set[41]; - case 220: - case 282: + case 219: + case 278: return set[42]; - case 221: - case 283: + case 220: + case 279: return set[43]; - case 226: + case 225: { BitArray a = new BitArray(239); a.Set(22, true); a.Set(70, true); return a; } - case 228: + case 227: { BitArray a = new BitArray(239); a.Set(133, true); @@ -955,75 +952,56 @@ partial class ExpressionFinder { a.Set(146, true); return a; } + case 236: case 237: - case 238: return set[44]; - case 241: + case 240: { BitArray a = new BitArray(239); a.Set(64, true); a.Set(104, true); return a; } - case 246: + case 245: return set[45]; - case 253: + case 252: case 550: + case 661: case 672: - case 686: - case 694: + case 680: { BitArray a = new BitArray(239); a.Set(127, true); a.Set(210, true); return a; } + case 254: case 255: - case 256: - case 444: - case 445: - case 519: - case 520: - case 526: - case 527: - case 625: - case 626: - case 628: - case 629: - case 640: - case 641: - case 665: - case 666: - case 682: - case 683: return set[46]; - case 258: - case 259: + case 261: + case 262: return set[47]; - case 265: - case 266: + case 263: return set[48]; - case 267: + case 266: return set[49]; - case 270: + case 267: + case 268: + case 381: return set[50]; - case 271: - case 272: - case 385: - return set[51]; - case 274: - case 279: - case 369: - case 661: - case 662: - case 664: - case 705: - case 722: + case 270: + case 275: + case 365: + case 653: + case 654: + case 656: + case 691: + case 708: + case 709: + case 711: + case 720: + case 721: case 723: - case 725: - case 734: - case 735: - case 737: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1031,31 +1009,32 @@ partial class ExpressionFinder { a.Set(22, true); return a; } - case 276: + case 272: { BitArray a = new BitArray(239); a.Set(226, true); return a; } - case 284: + case 280: + case 281: + return set[51]; case 285: + case 327: + case 342: + case 404: return set[52]; + case 288: case 289: - case 331: - case 346: + case 309: + case 310: + case 324: + case 325: + case 339: + case 340: return set[53]; - case 292: - case 293: - case 313: - case 314: - case 328: - case 329: - case 343: - case 344: - return set[54]; - case 294: - case 386: - case 389: + case 290: + case 382: + case 385: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1063,7 +1042,7 @@ partial class ExpressionFinder { a.Set(111, true); return a; } - case 295: + case 291: { BitArray a = new BitArray(239); a.Set(108, true); @@ -1071,18 +1050,18 @@ partial class ExpressionFinder { a.Set(231, true); return a; } - case 296: + case 292: + return set[54]; + case 293: + case 312: return set[55]; - case 297: - case 316: - return set[56]; - case 298: + case 294: { BitArray a = new BitArray(239); a.Set(5, true); return a; } - case 301: + case 297: { BitArray a = new BitArray(239); a.Set(75, true); @@ -1090,11 +1069,11 @@ partial class ExpressionFinder { a.Set(123, true); return a; } - case 305: - case 306: - return set[57]; - case 307: - case 312: + case 301: + case 302: + return set[56]; + case 303: + case 308: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1102,36 +1081,36 @@ partial class ExpressionFinder { a.Set(229, true); return a; } - case 309: - case 310: + case 305: + case 306: + return set[57]; + case 311: return set[58]; - case 315: - return set[59]; - case 317: + case 313: { BitArray a = new BitArray(239); a.Set(118, true); return a; } + case 314: + case 315: + return set[59]; + case 317: case 318: - case 319: return set[60]; - case 321: - case 322: + case 329: + case 330: return set[61]; - case 333: - case 334: + case 331: return set[62]; - case 335: - return set[63]; - case 337: + case 333: { BitArray a = new BitArray(239); a.Set(20, true); a.Set(138, true); return a; } - case 340: + case 336: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1139,38 +1118,38 @@ partial class ExpressionFinder { a.Set(205, true); return a; } - case 348: - return set[64]; + case 344: + return set[63]; + case 345: case 349: - case 353: { BitArray a = new BitArray(239); a.Set(152, true); return a; } - case 350: + case 346: + return set[64]; + case 354: + case 355: return set[65]; case 358: - case 359: - return set[66]; - case 362: { BitArray a = new BitArray(239); a.Set(74, true); a.Set(113, true); return a; } + case 360: + case 361: + return set[66]; + case 363: case 364: - case 365: return set[67]; - case 367: + case 366: case 368: return set[68]; - case 370: - case 372: - return set[69]; - case 375: - case 381: + case 371: + case 377: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1178,7 +1157,7 @@ partial class ExpressionFinder { a.Set(214, true); return a; } - case 378: + case 374: { BitArray a = new BitArray(239); a.Set(111, true); @@ -1186,7 +1165,7 @@ partial class ExpressionFinder { a.Set(113, true); return a; } - case 382: + case 378: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1194,57 +1173,61 @@ partial class ExpressionFinder { a.Set(135, true); return a; } + case 379: + case 380: + case 450: + case 451: + return set[69]; case 383: case 384: - case 447: - case 448: - return set[70]; + case 386: case 387: - case 388: - case 390: - case 391: + return set[70]; + case 389: return set[71]; - case 393: - return set[72]; - case 399: + case 398: { BitArray a = new BitArray(239); a.Set(211, true); a.Set(233, true); return a; } + case 400: case 401: + case 406: + case 407: + return set[72]; case 402: - case 411: - case 412: + case 408: return set[73]; case 403: - case 413: + case 411: + case 418: return set[74]; - case 404: - return set[75]; - case 405: case 409: - return set[76]; - case 407: - case 408: - case 712: - case 713: - return set[77]; - case 422: - case 424: + case 410: + case 416: + case 417: + case 698: + case 699: + return set[75]; case 425: - case 589: - case 649: - return set[78]; case 426: - case 427: - return set[79]; + return set[76]; case 428: - case 429: - return set[80]; case 430: + case 431: + case 589: + case 641: + return set[77]; + case 432: + case 433: + return set[78]; case 434: + case 435: + return set[79]; + case 436: + case 440: { BitArray a = new BitArray(239); a.Set(20, true); @@ -1252,78 +1235,79 @@ partial class ExpressionFinder { a.Set(38, true); return a; } - case 438: - case 442: + case 444: + case 448: + return set[80]; + case 445: + case 446: return set[81]; - case 439: - case 440: - return set[82]; - case 441: + case 447: { BitArray a = new BitArray(239); a.Set(21, true); return a; } - case 451: - return set[83]; - case 453: - case 466: - return set[84]; case 454: - case 467: - return set[85]; - case 455: + return set[82]; case 456: + case 469: + return set[83]; + case 457: + case 470: + return set[84]; + case 458: + case 459: { BitArray a = new BitArray(239); a.Set(10, true); return a; } - case 461: + case 464: { BitArray a = new BitArray(239); a.Set(12, true); return a; } - case 463: + case 466: { BitArray a = new BitArray(239); a.Set(13, true); return a; } - case 464: + case 467: + return set[85]; + case 468: return set[86]; - case 465: + case 480: return set[87]; - case 477: - return set[88]; - case 486: - return set[89]; - case 488: case 489: + case 491: + return set[88]; + case 494: + case 495: case 557: case 558: - case 700: - case 701: - return set[90]; - case 491: - case 492: - case 493: + case 686: + case 687: + return set[89]; + case 497: case 498: case 499: + case 504: + case 505: case 560: - case 703: - case 730: - case 739: - return set[91]; - case 494: + case 689: + case 716: + case 725: + return set[90]; case 500: - case 509: - return set[92]; - case 495: - case 496: + case 506: + case 515: + return set[91]; case 501: case 502: + case 507: + case 508: { BitArray a = new BitArray(239); a.Set(22, true); @@ -1331,18 +1315,18 @@ partial class ExpressionFinder { a.Set(63, true); return a; } - case 503: - case 505: - case 510: + case 509: + case 511: + case 516: + return set[92]; + case 512: + case 514: return set[93]; - case 506: - case 508: - return set[94]; - case 515: + case 521: case 534: case 535: case 591: - case 679: + case 668: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1350,11 +1334,11 @@ partial class ExpressionFinder { a.Set(63, true); return a; } - case 516: - case 517: + case 522: + case 523: case 595: case 596: - return set[95]; + return set[94]; case 531: case 532: case 539: @@ -1365,10 +1349,10 @@ partial class ExpressionFinder { } case 537: case 538: - return set[96]; + return set[95]; case 542: case 543: - return set[97]; + return set[96]; case 544: case 545: case 604: @@ -1397,25 +1381,25 @@ partial class ExpressionFinder { } case 567: case 568: - return set[98]; + return set[97]; case 569: case 570: - return set[99]; + return set[98]; case 571: case 572: case 583: - return set[100]; + return set[99]; case 577: case 578: - return set[101]; + return set[100]; case 579: case 580: - case 719: - return set[102]; + case 705: + return set[101]; case 581: - return set[103]; + return set[102]; case 582: - return set[104]; + return set[103]; case 584: case 594: { @@ -1425,17 +1409,17 @@ partial class ExpressionFinder { } case 600: case 601: - return set[105]; + return set[104]; case 602: - return set[106]; + return set[105]; case 603: - case 639: - return set[107]; + case 634: + return set[106]; case 606: case 607: case 608: - case 631: - return set[108]; + case 625: + return set[107]; case 609: case 613: case 623: @@ -1446,32 +1430,33 @@ partial class ExpressionFinder { return a; } case 615: - return set[109]; + return set[108]; case 618: - return set[110]; + return set[109]; case 619: + return set[110]; + case 628: + case 629: + case 631: + case 697: + case 700: return set[111]; - case 634: - case 635: - case 637: - case 711: - case 714: + case 632: + case 633: return set[112]; + case 636: case 638: - return set[113]; - case 644: - case 646: - case 655: + case 647: { BitArray a = new BitArray(239); a.Set(119, true); return a; } - case 645: + case 637: + return set[113]; + case 639: return set[114]; - case 647: - return set[115]; - case 653: + case 645: { BitArray a = new BitArray(239); a.Set(56, true); @@ -1479,11 +1464,11 @@ partial class ExpressionFinder { a.Set(193, true); return a; } - case 657: + case 649: + case 650: + return set[115]; + case 651: case 658: - return set[116]; - case 659: - case 669: { BitArray a = new BitArray(239); a.Set(1, true); @@ -1491,111 +1476,111 @@ partial class ExpressionFinder { a.Set(136, true); return a; } - case 670: + case 659: { BitArray a = new BitArray(239); a.Set(101, true); return a; } - case 671: - return set[117]; - case 674: - case 675: + case 660: + return set[116]; + case 663: + case 664: { BitArray a = new BitArray(239); a.Set(149, true); return a; } - case 676: - case 685: - case 751: + case 665: + case 671: + case 737: { BitArray a = new BitArray(239); a.Set(3, true); return a; } - case 677: + case 666: + return set[117]; + case 675: + case 676: return set[118]; - case 689: - case 690: + case 677: + case 685: return set[119]; - case 691: - case 699: + case 681: return set[120]; - case 695: + case 690: + case 692: return set[121]; + case 693: case 704: - case 706: return set[122]; - case 707: - case 718: + case 694: + case 695: return set[123]; - case 708: - case 709: + case 696: return set[124]; - case 710: - return set[125]; - case 720: + case 706: { BitArray a = new BitArray(239); a.Set(136, true); return a; } - case 726: + case 712: { BitArray a = new BitArray(239); a.Set(140, true); return a; } - case 729: - case 738: + case 715: + case 724: { BitArray a = new BitArray(239); a.Set(169, true); return a; } - case 743: - return set[126]; - case 744: + case 729: + return set[125]; + case 730: { BitArray a = new BitArray(239); a.Set(160, true); return a; } - case 745: + case 731: { BitArray a = new BitArray(239); a.Set(137, true); return a; } - case 746: - case 747: - return set[127]; - case 752: + case 732: + case 733: + return set[126]; + case 738: { BitArray a = new BitArray(239); a.Set(11, true); return a; } - case 753: - return set[128]; - case 755: + case 739: + return set[127]; + case 741: { BitArray a = new BitArray(239); a.Set(173, true); return a; } - case 756: - return set[129]; - case 757: + case 742: + return set[128]; + case 743: { BitArray a = new BitArray(239); a.Set(67, true); a.Set(213, true); return a; } - case 758: - return set[130]; + case 744: + return set[129]; default: throw new InvalidOperationException(); } } @@ -1651,7 +1636,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 1; break; } if (la.kind == 173) { stateStack.Push(1); - goto case 755; + goto case 741; } else { goto case 2; } @@ -1660,7 +1645,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 2; break; } if (la.kind == 137) { stateStack.Push(2); - goto case 745; + goto case 731; } else { goto case 3; } @@ -1669,7 +1654,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 3; break; } if (la.kind == 40) { stateStack.Push(3); - goto case 435; + goto case 441; } else { goto case 4; } @@ -1688,7 +1673,7 @@ partial class ExpressionFinder { case 5: { if (la == null) { currentState = 5; break; } if (la.kind == 160) { - currentState = 741; + currentState = 727; break; } else { if (set[4].Get(la.kind)) { @@ -1707,14 +1692,14 @@ partial class ExpressionFinder { if (la == null) { currentState = 7; break; } if (la.kind == 40) { stateStack.Push(7); - goto case 435; + goto case 441; } else { goto case 8; } } case 8: { if (la == null) { currentState = 8; break; } - if (set[131].Get(la.kind)) { + if (set[130].Get(la.kind)) { currentState = 8; break; } else { @@ -1752,7 +1737,7 @@ partial class ExpressionFinder { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); stateStack.Push(12); - goto case 206; + goto case 205; } case 12: { PopContext(); @@ -1761,7 +1746,7 @@ partial class ExpressionFinder { case 13: { if (la == null) { currentState = 13; break; } if (la.kind == 37) { - currentState = 738; + currentState = 724; break; } else { goto case 14; @@ -1778,7 +1763,7 @@ partial class ExpressionFinder { case 16: { if (la == null) { currentState = 16; break; } if (la.kind == 140) { - currentState = 733; + currentState = 719; break; } else { goto case 17; @@ -1848,7 +1833,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 27; break; } if (la.kind == 40) { stateStack.Push(26); - goto case 435; + goto case 441; } else { isMissingModifier = true; goto case 28; @@ -1856,8 +1841,8 @@ partial class ExpressionFinder { } case 28: { if (la == null) { currentState = 28; break; } - if (set[132].Get(la.kind)) { - currentState = 732; + if (set[131].Get(la.kind)) { + currentState = 718; break; } else { isMissingModifier = false; @@ -1897,11 +1882,11 @@ partial class ExpressionFinder { case 30: { if (la == null) { currentState = 30; break; } if (la.kind == 119) { - currentState = 522; + currentState = 525; break; } else { if (la.kind == 186) { - currentState = 512; + currentState = 518; break; } else { if (la.kind == 127 || la.kind == 210) { @@ -1930,7 +1915,7 @@ partial class ExpressionFinder { case 34: { if (la == null) { currentState = 34; break; } if (la.kind == 37) { - currentState = 488; + currentState = 494; break; } else { if (la.kind == 63) { @@ -1960,7 +1945,7 @@ partial class ExpressionFinder { currentState = 38; break; } else { - if (set[133].Get(la.kind)) { + if (set[132].Get(la.kind)) { currentState = 38; break; } else { @@ -1996,7 +1981,7 @@ partial class ExpressionFinder { } case 40: { stateStack.Push(41); - goto case 102; + goto case 101; } case 41: { if (la == null) { currentState = 41; break; } @@ -2014,17 +1999,23 @@ partial class ExpressionFinder { break; } case 43: { + PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; goto case 44; } case 44: { if (la == null) { currentState = 44; break; } if (la.kind == 169) { - currentState = 486; + currentState = 489; break; } else { - if (set[21].Get(la.kind)) { - goto case 46; + if (set[22].Get(la.kind)) { + if (set[21].Get(la.kind)) { + stateStack.Push(45); + goto case 47; + } else { + goto case 45; + } } else { Error(la); goto case 45; @@ -2032,100 +2023,91 @@ partial class ExpressionFinder { } } case 45: { - if (la == null) { currentState = 45; break; } + PopContext(); + goto case 46; + } + case 46: { + if (la == null) { currentState = 46; break; } Expect(38, la); // ")" currentState = stateStack.Pop(); break; } - case 46: { - nextTokenIsPotentialStartOfExpression = true; - goto case 47; - } case 47: { - if (la == null) { currentState = 47; break; } - if (set[22].Get(la.kind)) { - stateStack.Push(45); - goto case 48; - } else { - goto case 45; - } - } - case 48: { nextTokenIsPotentialStartOfExpression = true; - goto case 49; + goto case 48; } - case 49: { - if (la == null) { currentState = 49; break; } + case 48: { + if (la == null) { currentState = 48; break; } if (set[23].Get(la.kind)) { activeArgument = 0; - goto case 482; + goto case 485; } else { if (la.kind == 22) { activeArgument = 0; - goto case 50; + goto case 49; } else { goto case 6; } } } - case 50: { - if (la == null) { currentState = 50; break; } + case 49: { + if (la == null) { currentState = 49; break; } Expect(22, la); // "," - currentState = 51; + currentState = 50; break; } - case 51: { + case 50: { activeArgument++; - goto case 52; + goto case 51; } - case 52: { + case 51: { nextTokenIsPotentialStartOfExpression = true; - goto case 53; + goto case 52; } - case 53: { - if (la == null) { currentState = 53; break; } + case 52: { + if (la == null) { currentState = 52; break; } if (set[23].Get(la.kind)) { - stateStack.Push(54); - goto case 56; + stateStack.Push(53); + goto case 55; } else { - goto case 54; + goto case 53; } } - case 54: { - if (la == null) { currentState = 54; break; } + case 53: { + if (la == null) { currentState = 53; break; } if (la.kind == 22) { - currentState = 55; + currentState = 54; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 55: { + case 54: { activeArgument++; - goto case 52; + goto case 51; } - case 56: { + case 55: { PushContext(Context.Expression, la, t); - goto case 57; + goto case 56; } - case 57: { - stateStack.Push(58); - goto case 76; + case 56: { + stateStack.Push(57); + goto case 75; } - case 58: { - if (la == null) { currentState = 58; break; } + case 57: { + if (la == null) { currentState = 57; break; } if (set[25].Get(la.kind)) { - stateStack.Push(57); - goto case 59; + stateStack.Push(56); + goto case 58; } else { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } } - case 59: { - if (la == null) { currentState = 59; break; } + case 58: { + if (la == null) { currentState = 58; break; } if (la.kind == 31) { currentState = stateStack.Pop(); break; @@ -2151,48 +2133,48 @@ partial class ExpressionFinder { break; } else { if (la.kind == 154) { - goto case 75; + goto case 74; } else { if (la.kind == 20) { - goto case 74; + goto case 73; } else { if (la.kind == 41) { - goto case 73; + goto case 72; } else { if (la.kind == 40) { - goto case 72; + goto case 71; } else { if (la.kind == 39) { - currentState = 71; + currentState = 70; break; } else { if (la.kind == 43) { - goto case 70; + goto case 69; } else { if (la.kind == 42) { - goto case 69; + goto case 68; } else { if (la.kind == 150) { - goto case 68; + goto case 67; } else { if (la.kind == 23) { currentState = stateStack.Pop(); break; } else { if (la.kind == 60) { - goto case 67; + goto case 66; } else { if (la.kind == 61) { - goto case 66; + goto case 65; } else { if (la.kind == 175) { - goto case 65; + goto case 64; } else { if (la.kind == 177) { - goto case 64; + goto case 63; } else { if (la.kind == 236) { - goto case 63; + goto case 62; } else { if (la.kind == 44) { currentState = stateStack.Pop(); @@ -2203,10 +2185,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 144) { - goto case 62; + goto case 61; } else { if (la.kind == 145) { - goto case 61; + goto case 60; } else { if (la.kind == 47) { currentState = stateStack.Pop(); @@ -2245,7 +2227,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 216) { - goto case 60; + goto case 59; } else { if (la.kind == 55) { currentState = stateStack.Pop(); @@ -2288,6 +2270,11 @@ partial class ExpressionFinder { } } } + case 59: { + if (la == null) { currentState = 59; break; } + currentState = stateStack.Pop(); + break; + } case 60: { if (la == null) { currentState = 60; break; } currentState = stateStack.Pop(); @@ -2339,14 +2326,14 @@ partial class ExpressionFinder { break; } case 70: { - if (la == null) { currentState = 70; break; } + wasNormalAttribute = false; currentState = stateStack.Pop(); - break; + goto switchlbl; } case 71: { - wasNormalAttribute = false; + if (la == null) { currentState = 71; break; } currentState = stateStack.Pop(); - goto switchlbl; + break; } case 72: { if (la == null) { currentState = 72; break; } @@ -2364,193 +2351,188 @@ partial class ExpressionFinder { break; } case 75: { - if (la == null) { currentState = 75; break; } - currentState = stateStack.Pop(); - break; + PushContext(Context.Expression, la, t); + goto case 76; } case 76: { - PushContext(Context.Expression, la, t); + nextTokenIsPotentialStartOfExpression = true; goto case 77; } case 77: { - nextTokenIsPotentialStartOfExpression = true; - goto case 78; - } - case 78: { - if (la == null) { currentState = 78; break; } - if (set[134].Get(la.kind)) { - currentState = 77; + if (la == null) { currentState = 77; break; } + if (set[133].Get(la.kind)) { + currentState = 76; break; } else { if (set[35].Get(la.kind)) { - stateStack.Push(160); - goto case 174; + stateStack.Push(159); + goto case 173; } else { if (la.kind == 220) { - currentState = 156; + currentState = 155; break; } else { if (la.kind == 162) { - stateStack.Push(79); - goto case 86; + stateStack.Push(78); + goto case 85; } else { if (la.kind == 35) { - stateStack.Push(79); - goto case 80; + stateStack.Push(78); + goto case 79; } else { Error(la); - goto case 79; + goto case 78; } } } } } } - case 79: { + case 78: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 80: { - if (la == null) { currentState = 80; break; } + case 79: { + if (la == null) { currentState = 79; break; } Expect(35, la); // "{" - currentState = 81; + currentState = 80; break; } - case 81: { + case 80: { nextTokenIsPotentialStartOfExpression = true; - goto case 82; + goto case 81; } - case 82: { - if (la == null) { currentState = 82; break; } + case 81: { + if (la == null) { currentState = 81; break; } if (set[23].Get(la.kind)) { - goto case 84; - } else { goto case 83; + } else { + goto case 82; } } - case 83: { - if (la == null) { currentState = 83; break; } + case 82: { + if (la == null) { currentState = 82; break; } Expect(36, la); // "}" currentState = stateStack.Pop(); break; } - case 84: { - stateStack.Push(85); - goto case 56; + case 83: { + stateStack.Push(84); + goto case 55; } - case 85: { - if (la == null) { currentState = 85; break; } + case 84: { + if (la == null) { currentState = 84; break; } if (la.kind == 22) { - currentState = 84; + currentState = 83; break; } else { - goto case 83; + goto case 82; } } - case 86: { - if (la == null) { currentState = 86; break; } + case 85: { + if (la == null) { currentState = 85; break; } Expect(162, la); // "New" - currentState = 87; + currentState = 86; break; } - case 87: { + case 86: { PushContext(Context.ObjectCreation, la, t); - goto case 88; + goto case 87; } - case 88: { - if (la == null) { currentState = 88; break; } + case 87: { + if (la == null) { currentState = 87; break; } if (set[16].Get(la.kind)) { - stateStack.Push(147); + stateStack.Push(146); goto case 37; } else { if (la.kind == 233) { PushContext(Context.ObjectInitializer, la, t); - goto case 91; + goto case 90; } else { - goto case 89; + goto case 88; } } } - case 89: { + case 88: { Error(la); - goto case 90; + goto case 89; } - case 90: { + case 89: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 91: { - if (la == null) { currentState = 91; break; } + case 90: { + if (la == null) { currentState = 90; break; } Expect(233, la); // "With" - currentState = 92; + currentState = 91; break; } - case 92: { - stateStack.Push(93); - goto case 94; + case 91: { + stateStack.Push(92); + goto case 93; } - case 93: { + case 92: { PopContext(); - goto case 90; + goto case 89; } - case 94: { - if (la == null) { currentState = 94; break; } + case 93: { + if (la == null) { currentState = 93; break; } Expect(35, la); // "{" - currentState = 95; + currentState = 94; break; } - case 95: { - if (la == null) { currentState = 95; break; } + case 94: { + if (la == null) { currentState = 94; break; } if (la.kind == 26 || la.kind == 147) { - goto case 96; + goto case 95; } else { - goto case 83; + goto case 82; } } - case 96: { - if (la == null) { currentState = 96; break; } + case 95: { + if (la == null) { currentState = 95; break; } if (la.kind == 147) { - currentState = 97; + currentState = 96; break; } else { - goto case 97; + goto case 96; } } - case 97: { - if (la == null) { currentState = 97; break; } + case 96: { + if (la == null) { currentState = 96; break; } Expect(26, la); // "." - currentState = 98; + currentState = 97; break; } - case 98: { - stateStack.Push(99); - goto case 102; + case 97: { + stateStack.Push(98); + goto case 101; } - case 99: { - if (la == null) { currentState = 99; break; } + case 98: { + if (la == null) { currentState = 98; break; } Expect(20, la); // "=" - currentState = 100; + currentState = 99; break; } - case 100: { - stateStack.Push(101); - goto case 56; + case 99: { + stateStack.Push(100); + goto case 55; } - case 101: { - if (la == null) { currentState = 101; break; } + case 100: { + if (la == null) { currentState = 100; break; } if (la.kind == 22) { - currentState = 96; + currentState = 95; break; } else { - goto case 83; + goto case 82; } } - case 102: { - if (la == null) { currentState = 102; break; } + case 101: { + if (la == null) { currentState = 101; break; } if (la.kind == 2) { - goto case 146; + goto case 145; } else { if (la.kind == 56) { currentState = stateStack.Pop(); @@ -2561,36 +2543,36 @@ partial class ExpressionFinder { break; } else { if (la.kind == 58) { - goto case 145; + goto case 144; } else { if (la.kind == 59) { currentState = stateStack.Pop(); break; } else { if (la.kind == 60) { - goto case 67; + goto case 66; } else { if (la.kind == 61) { - goto case 66; + goto case 65; } else { if (la.kind == 62) { - goto case 144; + goto case 143; } else { if (la.kind == 63) { currentState = stateStack.Pop(); break; } else { if (la.kind == 64) { - goto case 143; + goto case 142; } else { if (la.kind == 65) { - goto case 142; + goto case 141; } else { if (la.kind == 66) { - goto case 141; + goto case 140; } else { if (la.kind == 67) { - goto case 140; + goto case 139; } else { if (la.kind == 68) { currentState = stateStack.Pop(); @@ -2601,7 +2583,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 70) { - goto case 139; + goto case 138; } else { if (la.kind == 71) { currentState = stateStack.Pop(); @@ -2656,7 +2638,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 84) { - goto case 138; + goto case 137; } else { if (la.kind == 85) { currentState = stateStack.Pop(); @@ -2667,7 +2649,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 87) { - goto case 137; + goto case 136; } else { if (la.kind == 88) { currentState = stateStack.Pop(); @@ -2710,7 +2692,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 98) { - goto case 136; + goto case 135; } else { if (la.kind == 99) { currentState = stateStack.Pop(); @@ -2733,7 +2715,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 104) { - goto case 135; + goto case 134; } else { if (la.kind == 105) { currentState = stateStack.Pop(); @@ -2744,10 +2726,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 107) { - goto case 134; + goto case 133; } else { if (la.kind == 108) { - goto case 133; + goto case 132; } else { if (la.kind == 109) { currentState = stateStack.Pop(); @@ -2778,7 +2760,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 116) { - goto case 132; + goto case 131; } else { if (la.kind == 117) { currentState = stateStack.Pop(); @@ -2797,7 +2779,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 121) { - goto case 131; + goto case 130; } else { if (la.kind == 122) { currentState = stateStack.Pop(); @@ -2808,17 +2790,17 @@ partial class ExpressionFinder { break; } else { if (la.kind == 124) { - goto case 130; + goto case 129; } else { if (la.kind == 125) { currentState = stateStack.Pop(); break; } else { if (la.kind == 126) { - goto case 129; + goto case 128; } else { if (la.kind == 127) { - goto case 128; + goto case 127; } else { if (la.kind == 128) { currentState = stateStack.Pop(); @@ -2841,7 +2823,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 133) { - goto case 127; + goto case 126; } else { if (la.kind == 134) { currentState = stateStack.Pop(); @@ -2864,7 +2846,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 139) { - goto case 126; + goto case 125; } else { if (la.kind == 140) { currentState = stateStack.Pop(); @@ -2879,19 +2861,19 @@ partial class ExpressionFinder { break; } else { if (la.kind == 143) { - goto case 125; + goto case 124; } else { if (la.kind == 144) { - goto case 62; + goto case 61; } else { if (la.kind == 145) { - goto case 61; + goto case 60; } else { if (la.kind == 146) { - goto case 124; + goto case 123; } else { if (la.kind == 147) { - goto case 123; + goto case 122; } else { if (la.kind == 148) { currentState = stateStack.Pop(); @@ -2902,7 +2884,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 150) { - goto case 68; + goto case 67; } else { if (la.kind == 151) { currentState = stateStack.Pop(); @@ -2917,7 +2899,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 154) { - goto case 75; + goto case 74; } else { if (la.kind == 155) { currentState = stateStack.Pop(); @@ -2948,10 +2930,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 162) { - goto case 122; + goto case 121; } else { if (la.kind == 163) { - goto case 121; + goto case 120; } else { if (la.kind == 164) { currentState = stateStack.Pop(); @@ -2978,7 +2960,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 170) { - goto case 120; + goto case 119; } else { if (la.kind == 171) { currentState = stateStack.Pop(); @@ -2997,13 +2979,13 @@ partial class ExpressionFinder { break; } else { if (la.kind == 175) { - goto case 65; + goto case 64; } else { if (la.kind == 176) { - goto case 119; + goto case 118; } else { if (la.kind == 177) { - goto case 64; + goto case 63; } else { if (la.kind == 178) { currentState = stateStack.Pop(); @@ -3030,14 +3012,14 @@ partial class ExpressionFinder { break; } else { if (la.kind == 184) { - goto case 118; + goto case 117; } else { if (la.kind == 185) { currentState = stateStack.Pop(); break; } else { if (la.kind == 186) { - goto case 117; + goto case 116; } else { if (la.kind == 187) { currentState = stateStack.Pop(); @@ -3080,7 +3062,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 197) { - goto case 116; + goto case 115; } else { if (la.kind == 198) { currentState = stateStack.Pop(); @@ -3103,7 +3085,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 203) { - goto case 115; + goto case 114; } else { if (la.kind == 204) { currentState = stateStack.Pop(); @@ -3114,7 +3096,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 206) { - goto case 114; + goto case 113; } else { if (la.kind == 207) { currentState = stateStack.Pop(); @@ -3125,19 +3107,19 @@ partial class ExpressionFinder { break; } else { if (la.kind == 209) { - goto case 113; + goto case 112; } else { if (la.kind == 210) { - goto case 112; + goto case 111; } else { if (la.kind == 211) { - goto case 111; + goto case 110; } else { if (la.kind == 212) { - goto case 110; + goto case 109; } else { if (la.kind == 213) { - goto case 109; + goto case 108; } else { if (la.kind == 214) { currentState = stateStack.Pop(); @@ -3148,14 +3130,14 @@ partial class ExpressionFinder { break; } else { if (la.kind == 216) { - goto case 60; + goto case 59; } else { if (la.kind == 217) { currentState = stateStack.Pop(); break; } else { if (la.kind == 218) { - goto case 108; + goto case 107; } else { if (la.kind == 219) { currentState = stateStack.Pop(); @@ -3174,10 +3156,10 @@ partial class ExpressionFinder { break; } else { if (la.kind == 223) { - goto case 107; + goto case 106; } else { if (la.kind == 224) { - goto case 106; + goto case 105; } else { if (la.kind == 225) { currentState = stateStack.Pop(); @@ -3200,17 +3182,17 @@ partial class ExpressionFinder { break; } else { if (la.kind == 230) { - goto case 105; + goto case 104; } else { if (la.kind == 231) { - goto case 104; + goto case 103; } else { if (la.kind == 232) { currentState = stateStack.Pop(); break; } else { if (la.kind == 233) { - goto case 103; + goto case 102; } else { if (la.kind == 234) { currentState = stateStack.Pop(); @@ -3221,7 +3203,7 @@ partial class ExpressionFinder { break; } else { if (la.kind == 236) { - goto case 63; + goto case 62; } else { if (la.kind == 237) { currentState = stateStack.Pop(); @@ -3412,6 +3394,11 @@ partial class ExpressionFinder { } } } + case 102: { + if (la == null) { currentState = 102; break; } + currentState = stateStack.Pop(); + break; + } case 103: { if (la == null) { currentState = 103; break; } currentState = stateStack.Pop(); @@ -3629,62 +3616,57 @@ partial class ExpressionFinder { } case 146: { if (la == null) { currentState = 146; break; } - currentState = stateStack.Pop(); - break; - } - case 147: { - if (la == null) { currentState = 147; break; } if (la.kind == 35 || la.kind == 126 || la.kind == 233) { if (la.kind == 126) { PushContext(Context.CollectionInitializer, la, t); - goto case 152; + goto case 151; } else { if (la.kind == 35) { PushContext(Context.CollectionInitializer, la, t); - stateStack.Push(151); - goto case 80; + stateStack.Push(150); + goto case 79; } else { if (la.kind == 233) { PushContext(Context.ObjectInitializer, la, t); - goto case 148; + goto case 147; } else { - goto case 89; + goto case 88; } } } } else { - goto case 90; + goto case 89; } } - case 148: { - if (la == null) { currentState = 148; break; } + case 147: { + if (la == null) { currentState = 147; break; } Expect(233, la); // "With" - currentState = 149; + currentState = 148; break; } + case 148: { + stateStack.Push(149); + goto case 93; + } case 149: { - stateStack.Push(150); - goto case 94; + PopContext(); + goto case 89; } case 150: { PopContext(); - goto case 90; + goto case 89; } case 151: { - PopContext(); - goto case 90; - } - case 152: { - if (la == null) { currentState = 152; break; } + if (la == null) { currentState = 151; break; } Expect(126, la); // "From" - currentState = 153; + currentState = 152; break; } - case 153: { - if (la == null) { currentState = 153; break; } + case 152: { + if (la == null) { currentState = 152; break; } if (la.kind == 35) { - stateStack.Push(154); - goto case 80; + stateStack.Push(153); + goto case 79; } else { if (set[30].Get(la.kind)) { currentState = endOfStatementTerminatorAndBlock; /* leave this block */ @@ -3694,80 +3676,80 @@ partial class ExpressionFinder { } else { Error(la); - goto case 154; + goto case 153; } } } - case 154: { + case 153: { PopContext(); - goto case 90; + goto case 89; } - case 155: { - if (la == null) { currentState = 155; break; } - currentState = 154; + case 154: { + if (la == null) { currentState = 154; break; } + currentState = 153; break; } - case 156: { - stateStack.Push(157); - goto case 76; + case 155: { + stateStack.Push(156); + goto case 75; } - case 157: { - if (la == null) { currentState = 157; break; } + case 156: { + if (la == null) { currentState = 156; break; } Expect(144, la); // "Is" - currentState = 158; + currentState = 157; break; } - case 158: { + case 157: { PushContext(Context.Type, la, t); - stateStack.Push(159); + stateStack.Push(158); goto case 37; } - case 159: { + case 158: { PopContext(); - goto case 79; + goto case 78; } - case 160: { - if (la == null) { currentState = 160; break; } + case 159: { + if (la == null) { currentState = 159; break; } if (set[32].Get(la.kind)) { - stateStack.Push(160); - goto case 161; + stateStack.Push(159); + goto case 160; } else { - goto case 79; + goto case 78; } } - case 161: { - if (la == null) { currentState = 161; break; } + case 160: { + if (la == null) { currentState = 160; break; } if (la.kind == 37) { - currentState = 166; + currentState = 165; break; } else { - if (set[135].Get(la.kind)) { - currentState = 162; + if (set[134].Get(la.kind)) { + currentState = 161; break; } else { goto case 6; } } } - case 162: { + case 161: { nextTokenIsStartOfImportsOrAccessExpression = true; - goto case 163; + goto case 162; } - case 163: { - if (la == null) { currentState = 163; break; } + case 162: { + if (la == null) { currentState = 162; break; } if (la.kind == 10) { - currentState = 164; + currentState = 163; break; } else { - goto case 164; + goto case 163; } } - case 164: { - stateStack.Push(165); - goto case 102; + case 163: { + stateStack.Push(164); + goto case 101; } - case 165: { - if (la == null) { currentState = 165; break; } + case 164: { + if (la == null) { currentState = 164; break; } if (la.kind == 11) { currentState = stateStack.Pop(); break; @@ -3776,121 +3758,121 @@ partial class ExpressionFinder { goto switchlbl; } } - case 166: { + case 165: { PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; - goto case 167; + goto case 166; } - case 167: { - if (la == null) { currentState = 167; break; } + case 166: { + if (la == null) { currentState = 166; break; } if (la.kind == 169) { - currentState = 169; + currentState = 168; break; } else { - if (set[21].Get(la.kind)) { - if (set[22].Get(la.kind)) { - stateStack.Push(168); - goto case 48; + if (set[22].Get(la.kind)) { + if (set[21].Get(la.kind)) { + stateStack.Push(167); + goto case 47; } else { - goto case 168; + goto case 167; } } else { Error(la); - goto case 168; + goto case 167; } } } - case 168: { + case 167: { PopContext(); - goto case 45; + goto case 46; } - case 169: { + case 168: { PushContext(Context.Type, la, t); - stateStack.Push(170); + stateStack.Push(169); goto case 37; } - case 170: { + case 169: { PopContext(); - goto case 171; + goto case 170; } - case 171: { - if (la == null) { currentState = 171; break; } + case 170: { + if (la == null) { currentState = 170; break; } if (la.kind == 22) { - currentState = 172; + currentState = 171; break; } else { - goto case 168; + goto case 167; } } - case 172: { + case 171: { PushContext(Context.Type, la, t); - stateStack.Push(173); + stateStack.Push(172); goto case 37; } - case 173: { + case 172: { PopContext(); - goto case 171; + goto case 170; } - case 174: { + case 173: { PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; - goto case 175; + goto case 174; } - case 175: { - if (la == null) { currentState = 175; break; } - if (set[136].Get(la.kind)) { - currentState = 176; + case 174: { + if (la == null) { currentState = 174; break; } + if (set[135].Get(la.kind)) { + currentState = 175; break; } else { if (la.kind == 37) { - currentState = 478; + currentState = 481; break; } else { - if (set[137].Get(la.kind)) { - currentState = 176; + if (set[136].Get(la.kind)) { + currentState = 175; break; } else { - if (set[133].Get(la.kind)) { - currentState = 176; + if (set[132].Get(la.kind)) { + currentState = 175; break; } else { - if (set[135].Get(la.kind)) { - currentState = 474; + if (set[134].Get(la.kind)) { + currentState = 477; break; } else { if (la.kind == 129) { - currentState = 471; + currentState = 474; break; } else { if (la.kind == 237) { - currentState = 468; + currentState = 471; break; } else { - if (set[83].Get(la.kind)) { - stateStack.Push(176); + if (set[82].Get(la.kind)) { + stateStack.Push(175); nextTokenIsPotentialStartOfExpression = true; PushContext(Context.Xml, la, t); - goto case 451; + goto case 454; } else { if (la.kind == 127 || la.kind == 210) { - stateStack.Push(176); - goto case 253; + stateStack.Push(175); + goto case 252; } else { if (la.kind == 58 || la.kind == 126) { - stateStack.Push(176); + stateStack.Push(175); PushContext(Context.Query, la, t); - goto case 191; + goto case 190; } else { if (set[37].Get(la.kind)) { - stateStack.Push(176); - goto case 184; + stateStack.Push(175); + goto case 183; } else { if (la.kind == 135) { - stateStack.Push(176); - goto case 177; + stateStack.Push(175); + goto case 176; } else { Error(la); - goto case 176; + goto case 175; } } } @@ -3904,160 +3886,160 @@ partial class ExpressionFinder { } } } - case 176: { + case 175: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } + case 176: { + if (la == null) { currentState = 176; break; } + Expect(135, la); // "If" + currentState = 177; + break; + } case 177: { if (la == null) { currentState = 177; break; } - Expect(135, la); // "If" + Expect(37, la); // "(" currentState = 178; break; } case 178: { - if (la == null) { currentState = 178; break; } - Expect(37, la); // "(" - currentState = 179; - break; + stateStack.Push(179); + goto case 55; } case 179: { - stateStack.Push(180); - goto case 56; - } - case 180: { - if (la == null) { currentState = 180; break; } + if (la == null) { currentState = 179; break; } Expect(22, la); // "," - currentState = 181; + currentState = 180; break; } - case 181: { - stateStack.Push(182); - goto case 56; + case 180: { + stateStack.Push(181); + goto case 55; } - case 182: { - if (la == null) { currentState = 182; break; } + case 181: { + if (la == null) { currentState = 181; break; } if (la.kind == 22) { - currentState = 183; + currentState = 182; break; } else { - goto case 45; + goto case 46; } } - case 183: { - stateStack.Push(45); - goto case 56; + case 182: { + stateStack.Push(46); + goto case 55; } - case 184: { - if (la == null) { currentState = 184; break; } - if (set[138].Get(la.kind)) { - currentState = 190; + case 183: { + if (la == null) { currentState = 183; break; } + if (set[137].Get(la.kind)) { + currentState = 189; break; } else { if (la.kind == 94 || la.kind == 106 || la.kind == 219) { - currentState = 185; + currentState = 184; break; } else { goto case 6; } } } - case 185: { - if (la == null) { currentState = 185; break; } + case 184: { + if (la == null) { currentState = 184; break; } Expect(37, la); // "(" - currentState = 186; + currentState = 185; break; } - case 186: { - stateStack.Push(187); - goto case 56; + case 185: { + stateStack.Push(186); + goto case 55; } - case 187: { - if (la == null) { currentState = 187; break; } + case 186: { + if (la == null) { currentState = 186; break; } Expect(22, la); // "," - currentState = 188; + currentState = 187; break; } - case 188: { + case 187: { PushContext(Context.Type, la, t); - stateStack.Push(189); + stateStack.Push(188); goto case 37; } - case 189: { + case 188: { PopContext(); - goto case 45; + goto case 46; } - case 190: { - if (la == null) { currentState = 190; break; } + case 189: { + if (la == null) { currentState = 189; break; } Expect(37, la); // "(" - currentState = 183; + currentState = 182; break; } - case 191: { - if (la == null) { currentState = 191; break; } + case 190: { + if (la == null) { currentState = 190; break; } if (la.kind == 126) { - stateStack.Push(192); - goto case 252; + stateStack.Push(191); + goto case 251; } else { if (la.kind == 58) { - stateStack.Push(192); - goto case 251; + stateStack.Push(191); + goto case 250; } else { Error(la); - goto case 192; + goto case 191; } } } - case 192: { - if (la == null) { currentState = 192; break; } + case 191: { + if (la == null) { currentState = 191; break; } if (set[38].Get(la.kind)) { - stateStack.Push(192); - goto case 193; + stateStack.Push(191); + goto case 192; } else { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } } - case 193: { - if (la == null) { currentState = 193; break; } + case 192: { + if (la == null) { currentState = 192; break; } if (la.kind == 126) { - currentState = 249; + currentState = 248; break; } else { if (la.kind == 58) { - currentState = 245; + currentState = 244; break; } else { if (la.kind == 197) { - currentState = 243; + currentState = 242; break; } else { if (la.kind == 107) { - goto case 134; + goto case 133; } else { if (la.kind == 230) { - currentState = 56; + currentState = 55; break; } else { if (la.kind == 176) { - currentState = 239; + currentState = 238; break; } else { if (la.kind == 203 || la.kind == 212) { - currentState = 237; + currentState = 236; break; } else { if (la.kind == 148) { - currentState = 235; + currentState = 234; break; } else { if (la.kind == 133) { - currentState = 207; + currentState = 206; break; } else { if (la.kind == 146) { - currentState = 194; + currentState = 193; break; } else { goto case 6; @@ -4072,107 +4054,107 @@ partial class ExpressionFinder { } } } - case 194: { - stateStack.Push(195); - goto case 200; + case 193: { + stateStack.Push(194); + goto case 199; } - case 195: { - if (la == null) { currentState = 195; break; } + case 194: { + if (la == null) { currentState = 194; break; } Expect(171, la); // "On" - currentState = 196; + currentState = 195; break; } - case 196: { - stateStack.Push(197); - goto case 56; + case 195: { + stateStack.Push(196); + goto case 55; } - case 197: { - if (la == null) { currentState = 197; break; } + case 196: { + if (la == null) { currentState = 196; break; } Expect(116, la); // "Equals" - currentState = 198; + currentState = 197; break; } - case 198: { - stateStack.Push(199); - goto case 56; + case 197: { + stateStack.Push(198); + goto case 55; } - case 199: { - if (la == null) { currentState = 199; break; } + case 198: { + if (la == null) { currentState = 198; break; } if (la.kind == 22) { - currentState = 196; + currentState = 195; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 200: { + case 199: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(201); - goto case 206; + stateStack.Push(200); + goto case 205; } - case 201: { + case 200: { PopContext(); - goto case 202; + goto case 201; } - case 202: { - if (la == null) { currentState = 202; break; } + case 201: { + if (la == null) { currentState = 201; break; } if (la.kind == 63) { - currentState = 204; + currentState = 203; break; } else { - goto case 203; + goto case 202; } } - case 203: { - if (la == null) { currentState = 203; break; } + case 202: { + if (la == null) { currentState = 202; break; } Expect(138, la); // "In" - currentState = 56; + currentState = 55; break; } - case 204: { + case 203: { PushContext(Context.Type, la, t); - stateStack.Push(205); + stateStack.Push(204); goto case 37; } - case 205: { + case 204: { PopContext(); - goto case 203; + goto case 202; } - case 206: { - if (la == null) { currentState = 206; break; } - if (set[123].Get(la.kind)) { + case 205: { + if (la == null) { currentState = 205; break; } + if (set[122].Get(la.kind)) { currentState = stateStack.Pop(); break; } else { if (la.kind == 98) { - goto case 136; + goto case 135; } else { goto case 6; } } } - case 207: { + case 206: { SetIdentifierExpected(la); nextTokenIsPotentialStartOfExpression = true; - goto case 208; + goto case 207; } - case 208: { - if (la == null) { currentState = 208; break; } + case 207: { + if (la == null) { currentState = 207; break; } if (la.kind == 146) { - goto case 227; + goto case 226; } else { if (set[40].Get(la.kind)) { if (la.kind == 70) { - currentState = 210; + currentState = 209; break; } else { if (set[40].Get(la.kind)) { - goto case 225; + goto case 224; } else { Error(la); - goto case 209; + goto case 208; } } } else { @@ -4180,87 +4162,87 @@ partial class ExpressionFinder { } } } - case 209: { - if (la == null) { currentState = 209; break; } + case 208: { + if (la == null) { currentState = 208; break; } Expect(70, la); // "By" - currentState = 210; + currentState = 209; break; } - case 210: { - stateStack.Push(211); - goto case 214; + case 209: { + stateStack.Push(210); + goto case 213; } - case 211: { - if (la == null) { currentState = 211; break; } + case 210: { + if (la == null) { currentState = 210; break; } if (la.kind == 22) { - currentState = 210; + currentState = 209; break; } else { Expect(143, la); // "Into" - currentState = 212; + currentState = 211; break; } } - case 212: { - stateStack.Push(213); - goto case 214; + case 211: { + stateStack.Push(212); + goto case 213; } - case 213: { - if (la == null) { currentState = 213; break; } + case 212: { + if (la == null) { currentState = 212; break; } if (la.kind == 22) { - currentState = 212; + currentState = 211; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 214: { + case 213: { SetIdentifierExpected(la); nextTokenIsPotentialStartOfExpression = true; - goto case 215; + goto case 214; } - case 215: { - if (la == null) { currentState = 215; break; } + case 214: { + if (la == null) { currentState = 214; break; } if (set[6].Get(la.kind)) { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(218); - goto case 206; + stateStack.Push(217); + goto case 205; } else { - goto case 216; + goto case 215; } } - case 216: { - stateStack.Push(217); - goto case 56; + case 215: { + stateStack.Push(216); + goto case 55; } - case 217: { + case 216: { if (!isAlreadyInExpr) PopContext(); isAlreadyInExpr = false; currentState = stateStack.Pop(); goto switchlbl; } - case 218: { + case 217: { nextTokenIsPotentialStartOfExpression = true; - goto case 219; + goto case 218; } - case 219: { - if (la == null) { currentState = 219; break; } + case 218: { + if (la == null) { currentState = 218; break; } if (set[42].Get(la.kind)) { PopContext(); isAlreadyInExpr = true; - goto case 220; + goto case 219; } else { - goto case 216; + goto case 215; } } - case 220: { - if (la == null) { currentState = 220; break; } + case 219: { + if (la == null) { currentState = 219; break; } if (la.kind == 63) { - currentState = 222; + currentState = 221; break; } else { if (la.kind == 20) { - currentState = 216; + currentState = 215; break; } else { if (set[43].Get(la.kind)) { @@ -4271,424 +4253,403 @@ partial class ExpressionFinder { } else { Error(la); - goto case 216; + goto case 215; } } } } - case 221: { - if (la == null) { currentState = 221; break; } - currentState = 216; + case 220: { + if (la == null) { currentState = 220; break; } + currentState = 215; break; } - case 222: { + case 221: { PushContext(Context.Type, la, t); - stateStack.Push(223); + stateStack.Push(222); goto case 37; } - case 223: { + case 222: { PopContext(); - goto case 224; + goto case 223; } - case 224: { - if (la == null) { currentState = 224; break; } + case 223: { + if (la == null) { currentState = 223; break; } Expect(20, la); // "=" - currentState = 216; + currentState = 215; break; } - case 225: { - stateStack.Push(226); - goto case 214; + case 224: { + stateStack.Push(225); + goto case 213; } - case 226: { - if (la == null) { currentState = 226; break; } + case 225: { + if (la == null) { currentState = 225; break; } if (la.kind == 22) { - currentState = 225; + currentState = 224; break; } else { - goto case 209; + goto case 208; } } - case 227: { - stateStack.Push(228); - goto case 234; + case 226: { + stateStack.Push(227); + goto case 233; } - case 228: { - if (la == null) { currentState = 228; break; } + case 227: { + if (la == null) { currentState = 227; break; } if (la.kind == 133 || la.kind == 146) { if (la.kind == 133) { - currentState = 232; + currentState = 231; break; } else { if (la.kind == 146) { - goto case 227; + goto case 226; } else { Error(la); - goto case 228; + goto case 227; } } } else { - goto case 229; + goto case 228; } } - case 229: { - if (la == null) { currentState = 229; break; } + case 228: { + if (la == null) { currentState = 228; break; } Expect(143, la); // "Into" - currentState = 230; + currentState = 229; break; } - case 230: { - stateStack.Push(231); - goto case 214; + case 229: { + stateStack.Push(230); + goto case 213; } - case 231: { - if (la == null) { currentState = 231; break; } + case 230: { + if (la == null) { currentState = 230; break; } if (la.kind == 22) { - currentState = 230; + currentState = 229; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } + case 231: { + stateStack.Push(232); + goto case 233; + } case 232: { - stateStack.Push(233); - goto case 234; + stateStack.Push(227); + goto case 228; } case 233: { - stateStack.Push(228); - goto case 229; - } - case 234: { - if (la == null) { currentState = 234; break; } + if (la == null) { currentState = 233; break; } Expect(146, la); // "Join" - currentState = 194; + currentState = 193; break; } - case 235: { - stateStack.Push(236); - goto case 214; + case 234: { + stateStack.Push(235); + goto case 213; } - case 236: { - if (la == null) { currentState = 236; break; } + case 235: { + if (la == null) { currentState = 235; break; } if (la.kind == 22) { - currentState = 235; + currentState = 234; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 237: { + case 236: { nextTokenIsPotentialStartOfExpression = true; - goto case 238; + goto case 237; } - case 238: { - if (la == null) { currentState = 238; break; } + case 237: { + if (la == null) { currentState = 237; break; } if (la.kind == 231) { - currentState = 56; + currentState = 55; break; } else { - goto case 56; + goto case 55; } } - case 239: { - if (la == null) { currentState = 239; break; } + case 238: { + if (la == null) { currentState = 238; break; } Expect(70, la); // "By" - currentState = 240; + currentState = 239; break; } - case 240: { - stateStack.Push(241); - goto case 56; + case 239: { + stateStack.Push(240); + goto case 55; } - case 241: { - if (la == null) { currentState = 241; break; } + case 240: { + if (la == null) { currentState = 240; break; } if (la.kind == 64) { - currentState = 242; + currentState = 241; break; } else { if (la.kind == 104) { - currentState = 242; + currentState = 241; break; } else { Error(la); - goto case 242; + goto case 241; } } } - case 242: { - if (la == null) { currentState = 242; break; } + case 241: { + if (la == null) { currentState = 241; break; } if (la.kind == 22) { - currentState = 240; + currentState = 239; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 243: { - stateStack.Push(244); - goto case 214; + case 242: { + stateStack.Push(243); + goto case 213; } - case 244: { - if (la == null) { currentState = 244; break; } + case 243: { + if (la == null) { currentState = 243; break; } if (la.kind == 22) { - currentState = 243; + currentState = 242; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 245: { - stateStack.Push(246); - goto case 200; + case 244: { + stateStack.Push(245); + goto case 199; } - case 246: { - if (la == null) { currentState = 246; break; } + case 245: { + if (la == null) { currentState = 245; break; } if (set[38].Get(la.kind)) { - stateStack.Push(246); - goto case 193; + stateStack.Push(245); + goto case 192; } else { Expect(143, la); // "Into" - currentState = 247; + currentState = 246; break; } } - case 247: { - stateStack.Push(248); - goto case 214; + case 246: { + stateStack.Push(247); + goto case 213; } - case 248: { - if (la == null) { currentState = 248; break; } + case 247: { + if (la == null) { currentState = 247; break; } if (la.kind == 22) { - currentState = 247; + currentState = 246; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 249: { - stateStack.Push(250); - goto case 200; + case 248: { + stateStack.Push(249); + goto case 199; } - case 250: { - if (la == null) { currentState = 250; break; } + case 249: { + if (la == null) { currentState = 249; break; } if (la.kind == 22) { - currentState = 249; + currentState = 248; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 251: { - if (la == null) { currentState = 251; break; } + case 250: { + if (la == null) { currentState = 250; break; } Expect(58, la); // "Aggregate" - currentState = 245; + currentState = 244; break; } - case 252: { - if (la == null) { currentState = 252; break; } + case 251: { + if (la == null) { currentState = 251; break; } Expect(126, la); // "From" - currentState = 249; + currentState = 248; break; } - case 253: { - if (la == null) { currentState = 253; break; } + case 252: { + if (la == null) { currentState = 252; break; } if (la.kind == 210) { - currentState = 443; + currentState = 449; break; } else { if (la.kind == 127) { - currentState = 254; + currentState = 253; break; } else { goto case 6; } } } - case 254: { - if (la == null) { currentState = 254; break; } - Expect(37, la); // "(" - currentState = 255; - break; - } - case 255: { - SetIdentifierExpected(la); - goto case 256; - } - case 256: { - if (la == null) { currentState = 256; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(257); - goto case 422; - } else { - goto case 257; - } - } - case 257: { - if (la == null) { currentState = 257; break; } - Expect(38, la); // ")" - currentState = 258; - break; + case 253: { + stateStack.Push(254); + goto case 424; } - case 258: { + case 254: { nextTokenIsPotentialStartOfExpression = true; - goto case 259; + goto case 255; } - case 259: { - if (la == null) { currentState = 259; break; } + case 255: { + if (la == null) { currentState = 255; break; } if (set[23].Get(la.kind)) { - goto case 56; + goto case 55; } else { if (la.kind == 1 || la.kind == 21 || la.kind == 63) { if (la.kind == 63) { - currentState = 420; + currentState = 422; break; } else { - goto case 260; + goto case 256; } } else { goto case 6; } } } - case 260: { - stateStack.Push(261); - goto case 263; + case 256: { + stateStack.Push(257); + goto case 259; } - case 261: { - if (la == null) { currentState = 261; break; } + case 257: { + if (la == null) { currentState = 257; break; } Expect(113, la); // "End" - currentState = 262; + currentState = 258; break; } - case 262: { - if (la == null) { currentState = 262; break; } + case 258: { + if (la == null) { currentState = 258; break; } Expect(127, la); // "Function" currentState = stateStack.Pop(); break; } - case 263: { + case 259: { PushContext(Context.Body, la, t); - goto case 264; + goto case 260; } - case 264: { - stateStack.Push(265); + case 260: { + stateStack.Push(261); goto case 23; } - case 265: { + case 261: { nextTokenIsPotentialStartOfExpression = true; - goto case 266; + goto case 262; } - case 266: { - if (la == null) { currentState = 266; break; } - if (set[139].Get(la.kind)) { - if (set[70].Get(la.kind)) { - if (set[51].Get(la.kind)) { - stateStack.Push(264); - goto case 271; + case 262: { + if (la == null) { currentState = 262; break; } + if (set[138].Get(la.kind)) { + if (set[69].Get(la.kind)) { + if (set[50].Get(la.kind)) { + stateStack.Push(260); + goto case 267; } else { - goto case 264; + goto case 260; } } else { if (la.kind == 113) { - currentState = 269; + currentState = 265; break; } else { - goto case 268; + goto case 264; } } } else { - goto case 267; + goto case 263; } } - case 267: { + case 263: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 268: { + case 264: { Error(la); - goto case 265; + goto case 261; } - case 269: { - if (la == null) { currentState = 269; break; } + case 265: { + if (la == null) { currentState = 265; break; } if (la.kind == 1 || la.kind == 21) { - goto case 264; + goto case 260; } else { - if (set[50].Get(la.kind)) { + if (set[49].Get(la.kind)) { currentState = endOfStatementTerminatorAndBlock; /* leave this block */ InformToken(t); /* process End again*/ /* for processing current token (la): go to the position after processing End */ goto switchlbl; } else { - goto case 268; + goto case 264; } } } - case 270: { - if (la == null) { currentState = 270; break; } - currentState = 265; + case 266: { + if (la == null) { currentState = 266; break; } + currentState = 261; break; } - case 271: { + case 267: { nextTokenIsPotentialStartOfExpression = true; - goto case 272; + goto case 268; } - case 272: { - if (la == null) { currentState = 272; break; } + case 268: { + if (la == null) { currentState = 268; break; } if (la.kind == 88 || la.kind == 105 || la.kind == 204) { - currentState = 400; + currentState = 399; break; } else { if (la.kind == 211 || la.kind == 233) { - currentState = 396; + currentState = 395; break; } else { if (la.kind == 56 || la.kind == 193) { - currentState = 394; + currentState = 393; break; } else { if (la.kind == 189) { - currentState = 392; + currentState = 388; break; } else { if (la.kind == 135) { - currentState = 374; + currentState = 370; break; } else { if (la.kind == 197) { - currentState = 358; + currentState = 354; break; } else { if (la.kind == 231) { - currentState = 354; + currentState = 350; break; } else { if (la.kind == 108) { - currentState = 348; + currentState = 344; break; } else { if (la.kind == 124) { - currentState = 321; + currentState = 317; break; } else { if (la.kind == 118 || la.kind == 171 || la.kind == 194) { if (la.kind == 118 || la.kind == 171) { if (la.kind == 171) { - currentState = 317; + currentState = 313; break; } else { - goto case 317; + goto case 313; } } else { if (la.kind == 194) { - currentState = 315; + currentState = 311; break; } else { goto case 6; @@ -4696,31 +4657,31 @@ partial class ExpressionFinder { } } else { if (la.kind == 215) { - currentState = 313; + currentState = 309; break; } else { if (la.kind == 218) { - currentState = 300; + currentState = 296; break; } else { - if (set[140].Get(la.kind)) { + if (set[139].Get(la.kind)) { if (la.kind == 132) { - currentState = 297; + currentState = 293; break; } else { if (la.kind == 120) { - currentState = 296; + currentState = 292; break; } else { if (la.kind == 89) { - currentState = 295; + currentState = 291; break; } else { if (la.kind == 206) { - goto case 114; + goto case 113; } else { if (la.kind == 195) { - currentState = 292; + currentState = 288; break; } else { goto case 6; @@ -4731,23 +4692,23 @@ partial class ExpressionFinder { } } else { if (la.kind == 191) { - currentState = 290; + currentState = 286; break; } else { if (la.kind == 117) { - currentState = 288; + currentState = 284; break; } else { if (la.kind == 226) { - currentState = 273; + currentState = 269; break; } else { - if (set[141].Get(la.kind)) { + if (set[140].Get(la.kind)) { if (la.kind == 73) { - currentState = 56; + currentState = 55; break; } else { - goto case 56; + goto case 55; } } else { goto case 6; @@ -4769,75 +4730,75 @@ partial class ExpressionFinder { } } } - case 273: { - stateStack.Push(274); + case 269: { + stateStack.Push(270); SetIdentifierExpected(la); nextTokenIsPotentialStartOfExpression = true; - goto case 277; + goto case 273; } - case 274: { - if (la == null) { currentState = 274; break; } + case 270: { + if (la == null) { currentState = 270; break; } if (la.kind == 22) { - currentState = 273; + currentState = 269; break; } else { - stateStack.Push(275); - goto case 263; + stateStack.Push(271); + goto case 259; } } - case 275: { - if (la == null) { currentState = 275; break; } + case 271: { + if (la == null) { currentState = 271; break; } Expect(113, la); // "End" - currentState = 276; + currentState = 272; break; } - case 276: { - if (la == null) { currentState = 276; break; } + case 272: { + if (la == null) { currentState = 272; break; } Expect(226, la); // "Using" currentState = stateStack.Pop(); break; } - case 277: { - if (la == null) { currentState = 277; break; } + case 273: { + if (la == null) { currentState = 273; break; } if (set[6].Get(la.kind)) { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(280); - goto case 206; + stateStack.Push(276); + goto case 205; } else { - goto case 278; + goto case 274; } } - case 278: { - stateStack.Push(279); - goto case 56; + case 274: { + stateStack.Push(275); + goto case 55; } - case 279: { + case 275: { if (!isAlreadyInExpr) PopContext(); isAlreadyInExpr = false; currentState = stateStack.Pop(); goto switchlbl; } - case 280: { + case 276: { nextTokenIsPotentialStartOfExpression = true; - goto case 281; + goto case 277; } - case 281: { - if (la == null) { currentState = 281; break; } + case 277: { + if (la == null) { currentState = 277; break; } if (set[42].Get(la.kind)) { PopContext(); isAlreadyInExpr = true; - goto case 282; - } else { goto case 278; + } else { + goto case 274; } } - case 282: { - if (la == null) { currentState = 282; break; } + case 278: { + if (la == null) { currentState = 278; break; } if (la.kind == 63) { - currentState = 284; + currentState = 280; break; } else { if (la.kind == 20) { - currentState = 278; + currentState = 274; break; } else { if (set[43].Get(la.kind)) { @@ -4848,127 +4809,127 @@ partial class ExpressionFinder { } else { Error(la); - goto case 278; + goto case 274; } } } } - case 283: { - if (la == null) { currentState = 283; break; } - currentState = 278; + case 279: { + if (la == null) { currentState = 279; break; } + currentState = 274; break; } - case 284: { + case 280: { nextTokenIsPotentialStartOfExpression = true; - goto case 285; + goto case 281; } - case 285: { - if (la == null) { currentState = 285; break; } + case 281: { + if (la == null) { currentState = 281; break; } if (set[16].Get(la.kind)) { PushContext(Context.Type, la, t); - stateStack.Push(286); + stateStack.Push(282); goto case 37; } else { - goto case 278; + goto case 274; } } - case 286: { + case 282: { PopContext(); - goto case 287; + goto case 283; } - case 287: { - if (la == null) { currentState = 287; break; } + case 283: { + if (la == null) { currentState = 283; break; } Expect(20, la); // "=" - currentState = 278; + currentState = 274; break; } - case 288: { - stateStack.Push(289); - goto case 56; + case 284: { + stateStack.Push(285); + goto case 55; } - case 289: { - if (la == null) { currentState = 289; break; } + case 285: { + if (la == null) { currentState = 285; break; } if (la.kind == 22) { - currentState = 288; + currentState = 284; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 290: { + case 286: { nextTokenIsPotentialStartOfExpression = true; - goto case 291; + goto case 287; } - case 291: { - if (la == null) { currentState = 291; break; } + case 287: { + if (la == null) { currentState = 287; break; } if (la.kind == 184) { - currentState = 56; + currentState = 55; break; } else { - goto case 56; + goto case 55; } } - case 292: { + case 288: { PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; - goto case 293; + goto case 289; } - case 293: { - if (la == null) { currentState = 293; break; } + case 289: { + if (la == null) { currentState = 289; break; } if (set[23].Get(la.kind)) { - stateStack.Push(294); - goto case 56; + stateStack.Push(290); + goto case 55; } else { - goto case 294; + goto case 290; } } - case 294: { + case 290: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 295: { - if (la == null) { currentState = 295; break; } + case 291: { + if (la == null) { currentState = 291; break; } if (la.kind == 108) { - goto case 133; + goto case 132; } else { if (la.kind == 124) { - goto case 130; + goto case 129; } else { if (la.kind == 231) { - goto case 104; + goto case 103; } else { goto case 6; } } } } - case 296: { - if (la == null) { currentState = 296; break; } + case 292: { + if (la == null) { currentState = 292; break; } if (la.kind == 108) { - goto case 133; + goto case 132; } else { if (la.kind == 124) { - goto case 130; + goto case 129; } else { if (la.kind == 231) { - goto case 104; + goto case 103; } else { if (la.kind == 197) { - goto case 116; + goto case 115; } else { if (la.kind == 210) { - goto case 112; + goto case 111; } else { if (la.kind == 127) { - goto case 128; + goto case 127; } else { if (la.kind == 186) { - goto case 117; + goto case 116; } else { if (la.kind == 218) { - goto case 108; + goto case 107; } else { goto case 6; } @@ -4980,166 +4941,166 @@ partial class ExpressionFinder { } } } - case 297: { - if (la == null) { currentState = 297; break; } + case 293: { + if (la == null) { currentState = 293; break; } if (set[6].Get(la.kind)) { - goto case 299; + goto case 295; } else { if (la.kind == 5) { - goto case 298; + goto case 294; } else { goto case 6; } } } - case 298: { - if (la == null) { currentState = 298; break; } + case 294: { + if (la == null) { currentState = 294; break; } currentState = stateStack.Pop(); break; } - case 299: { - if (la == null) { currentState = 299; break; } + case 295: { + if (la == null) { currentState = 295; break; } currentState = stateStack.Pop(); break; } - case 300: { - stateStack.Push(301); - goto case 263; + case 296: { + stateStack.Push(297); + goto case 259; } - case 301: { - if (la == null) { currentState = 301; break; } + case 297: { + if (la == null) { currentState = 297; break; } if (la.kind == 75) { - currentState = 305; + currentState = 301; break; } else { if (la.kind == 123) { - currentState = 304; + currentState = 300; break; } else { - goto case 302; + goto case 298; } } } - case 302: { - if (la == null) { currentState = 302; break; } + case 298: { + if (la == null) { currentState = 298; break; } Expect(113, la); // "End" - currentState = 303; + currentState = 299; break; } - case 303: { - if (la == null) { currentState = 303; break; } + case 299: { + if (la == null) { currentState = 299; break; } Expect(218, la); // "Try" currentState = stateStack.Pop(); break; } - case 304: { - stateStack.Push(302); - goto case 263; + case 300: { + stateStack.Push(298); + goto case 259; } - case 305: { + case 301: { SetIdentifierExpected(la); - goto case 306; + goto case 302; } - case 306: { - if (la == null) { currentState = 306; break; } + case 302: { + if (la == null) { currentState = 302; break; } if (set[6].Get(la.kind)) { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(309); - goto case 206; + stateStack.Push(305); + goto case 205; } else { - goto case 307; + goto case 303; } } - case 307: { - if (la == null) { currentState = 307; break; } + case 303: { + if (la == null) { currentState = 303; break; } if (la.kind == 229) { - currentState = 308; + currentState = 304; break; } else { - goto case 300; + goto case 296; } } - case 308: { - stateStack.Push(300); - goto case 56; + case 304: { + stateStack.Push(296); + goto case 55; } - case 309: { + case 305: { PopContext(); - goto case 310; + goto case 306; } - case 310: { - if (la == null) { currentState = 310; break; } + case 306: { + if (la == null) { currentState = 306; break; } if (la.kind == 63) { - currentState = 311; + currentState = 307; break; } else { - goto case 307; + goto case 303; } } - case 311: { + case 307: { PushContext(Context.Type, la, t); - stateStack.Push(312); + stateStack.Push(308); goto case 37; } - case 312: { + case 308: { PopContext(); - goto case 307; + goto case 303; } - case 313: { + case 309: { nextTokenIsPotentialStartOfExpression = true; - goto case 314; + goto case 310; } - case 314: { - if (la == null) { currentState = 314; break; } + case 310: { + if (la == null) { currentState = 310; break; } if (set[23].Get(la.kind)) { - goto case 56; + goto case 55; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 315: { - if (la == null) { currentState = 315; break; } + case 311: { + if (la == null) { currentState = 311; break; } if (la.kind == 163) { - goto case 121; + goto case 120; } else { - goto case 316; + goto case 312; } } - case 316: { - if (la == null) { currentState = 316; break; } + case 312: { + if (la == null) { currentState = 312; break; } if (la.kind == 5) { - goto case 298; + goto case 294; } else { if (set[6].Get(la.kind)) { - goto case 299; + goto case 295; } else { goto case 6; } } } - case 317: { - if (la == null) { currentState = 317; break; } + case 313: { + if (la == null) { currentState = 313; break; } Expect(118, la); // "Error" - currentState = 318; + currentState = 314; break; } - case 318: { + case 314: { nextTokenIsPotentialStartOfExpression = true; - goto case 319; + goto case 315; } - case 319: { - if (la == null) { currentState = 319; break; } + case 315: { + if (la == null) { currentState = 315; break; } if (set[23].Get(la.kind)) { - goto case 56; + goto case 55; } else { if (la.kind == 132) { - currentState = 316; + currentState = 312; break; } else { if (la.kind == 194) { - currentState = 320; + currentState = 316; break; } else { goto case 6; @@ -5147,109 +5108,109 @@ partial class ExpressionFinder { } } } - case 320: { - if (la == null) { currentState = 320; break; } + case 316: { + if (la == null) { currentState = 316; break; } Expect(163, la); // "Next" currentState = stateStack.Pop(); break; } - case 321: { + case 317: { nextTokenIsPotentialStartOfExpression = true; SetIdentifierExpected(la); - goto case 322; + goto case 318; } - case 322: { - if (la == null) { currentState = 322; break; } + case 318: { + if (la == null) { currentState = 318; break; } if (set[35].Get(la.kind)) { - stateStack.Push(338); - goto case 332; + stateStack.Push(334); + goto case 328; } else { if (la.kind == 110) { - currentState = 323; + currentState = 319; break; } else { goto case 6; } } } - case 323: { - stateStack.Push(324); - goto case 332; + case 319: { + stateStack.Push(320); + goto case 328; } - case 324: { - if (la == null) { currentState = 324; break; } + case 320: { + if (la == null) { currentState = 320; break; } Expect(138, la); // "In" - currentState = 325; + currentState = 321; break; } - case 325: { - stateStack.Push(326); - goto case 56; + case 321: { + stateStack.Push(322); + goto case 55; } - case 326: { - stateStack.Push(327); - goto case 263; + case 322: { + stateStack.Push(323); + goto case 259; } - case 327: { - if (la == null) { currentState = 327; break; } + case 323: { + if (la == null) { currentState = 323; break; } Expect(163, la); // "Next" - currentState = 328; + currentState = 324; break; } - case 328: { + case 324: { nextTokenIsPotentialStartOfExpression = true; - goto case 329; + goto case 325; } - case 329: { - if (la == null) { currentState = 329; break; } + case 325: { + if (la == null) { currentState = 325; break; } if (set[23].Get(la.kind)) { - goto case 330; + goto case 326; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 330: { - stateStack.Push(331); - goto case 56; + case 326: { + stateStack.Push(327); + goto case 55; } - case 331: { - if (la == null) { currentState = 331; break; } + case 327: { + if (la == null) { currentState = 327; break; } if (la.kind == 22) { - currentState = 330; + currentState = 326; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 332: { + case 328: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(333); - goto case 174; + stateStack.Push(329); + goto case 173; } - case 333: { + case 329: { PopContext(); - goto case 334; + goto case 330; } - case 334: { - if (la == null) { currentState = 334; break; } + case 330: { + if (la == null) { currentState = 330; break; } if (la.kind == 33) { - currentState = 335; + currentState = 331; break; } else { - goto case 335; + goto case 331; } } - case 335: { - if (la == null) { currentState = 335; break; } + case 331: { + if (la == null) { currentState = 331; break; } if (set[32].Get(la.kind)) { - stateStack.Push(335); - goto case 161; + stateStack.Push(331); + goto case 160; } else { if (la.kind == 63) { - currentState = 336; + currentState = 332; break; } else { currentState = stateStack.Pop(); @@ -5257,260 +5218,260 @@ partial class ExpressionFinder { } } } - case 336: { + case 332: { PushContext(Context.Type, la, t); - stateStack.Push(337); + stateStack.Push(333); goto case 37; } - case 337: { + case 333: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 338: { - if (la == null) { currentState = 338; break; } + case 334: { + if (la == null) { currentState = 334; break; } Expect(20, la); // "=" - currentState = 339; + currentState = 335; break; } - case 339: { - stateStack.Push(340); - goto case 56; + case 335: { + stateStack.Push(336); + goto case 55; } - case 340: { - if (la == null) { currentState = 340; break; } + case 336: { + if (la == null) { currentState = 336; break; } if (la.kind == 205) { - currentState = 347; + currentState = 343; break; } else { - goto case 341; + goto case 337; } } - case 341: { - stateStack.Push(342); - goto case 263; + case 337: { + stateStack.Push(338); + goto case 259; } - case 342: { - if (la == null) { currentState = 342; break; } + case 338: { + if (la == null) { currentState = 338; break; } Expect(163, la); // "Next" - currentState = 343; + currentState = 339; break; } - case 343: { + case 339: { nextTokenIsPotentialStartOfExpression = true; - goto case 344; + goto case 340; } - case 344: { - if (la == null) { currentState = 344; break; } + case 340: { + if (la == null) { currentState = 340; break; } if (set[23].Get(la.kind)) { - goto case 345; + goto case 341; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 345: { - stateStack.Push(346); - goto case 56; + case 341: { + stateStack.Push(342); + goto case 55; } - case 346: { - if (la == null) { currentState = 346; break; } + case 342: { + if (la == null) { currentState = 342; break; } if (la.kind == 22) { - currentState = 345; + currentState = 341; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 347: { - stateStack.Push(341); - goto case 56; + case 343: { + stateStack.Push(337); + goto case 55; } - case 348: { - if (la == null) { currentState = 348; break; } + case 344: { + if (la == null) { currentState = 344; break; } if (la.kind == 224 || la.kind == 231) { - currentState = 351; + currentState = 347; break; } else { if (la.kind == 1 || la.kind == 21) { - stateStack.Push(349); - goto case 263; + stateStack.Push(345); + goto case 259; } else { goto case 6; } } } - case 349: { - if (la == null) { currentState = 349; break; } + case 345: { + if (la == null) { currentState = 345; break; } Expect(152, la); // "Loop" - currentState = 350; + currentState = 346; break; } - case 350: { - if (la == null) { currentState = 350; break; } + case 346: { + if (la == null) { currentState = 346; break; } if (la.kind == 224 || la.kind == 231) { - currentState = 56; + currentState = 55; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 351: { - stateStack.Push(352); - goto case 56; + case 347: { + stateStack.Push(348); + goto case 55; } - case 352: { - stateStack.Push(353); - goto case 263; + case 348: { + stateStack.Push(349); + goto case 259; } - case 353: { - if (la == null) { currentState = 353; break; } + case 349: { + if (la == null) { currentState = 349; break; } Expect(152, la); // "Loop" currentState = stateStack.Pop(); break; } - case 354: { - stateStack.Push(355); - goto case 56; + case 350: { + stateStack.Push(351); + goto case 55; } - case 355: { - stateStack.Push(356); - goto case 263; + case 351: { + stateStack.Push(352); + goto case 259; } - case 356: { - if (la == null) { currentState = 356; break; } + case 352: { + if (la == null) { currentState = 352; break; } Expect(113, la); // "End" - currentState = 357; + currentState = 353; break; } - case 357: { - if (la == null) { currentState = 357; break; } + case 353: { + if (la == null) { currentState = 353; break; } Expect(231, la); // "While" currentState = stateStack.Pop(); break; } - case 358: { + case 354: { nextTokenIsPotentialStartOfExpression = true; - goto case 359; + goto case 355; } - case 359: { - if (la == null) { currentState = 359; break; } + case 355: { + if (la == null) { currentState = 355; break; } if (la.kind == 74) { - currentState = 360; + currentState = 356; break; } else { - goto case 360; + goto case 356; } } - case 360: { - stateStack.Push(361); - goto case 56; + case 356: { + stateStack.Push(357); + goto case 55; } - case 361: { - stateStack.Push(362); + case 357: { + stateStack.Push(358); goto case 23; } - case 362: { - if (la == null) { currentState = 362; break; } + case 358: { + if (la == null) { currentState = 358; break; } if (la.kind == 74) { - currentState = 364; + currentState = 360; break; } else { Expect(113, la); // "End" - currentState = 363; + currentState = 359; break; } } - case 363: { - if (la == null) { currentState = 363; break; } + case 359: { + if (la == null) { currentState = 359; break; } Expect(197, la); // "Select" currentState = stateStack.Pop(); break; } - case 364: { + case 360: { nextTokenIsPotentialStartOfExpression = true; - goto case 365; + goto case 361; } - case 365: { - if (la == null) { currentState = 365; break; } + case 361: { + if (la == null) { currentState = 361; break; } if (la.kind == 111) { - currentState = 366; + currentState = 362; break; } else { - if (set[68].Get(la.kind)) { - goto case 367; + if (set[67].Get(la.kind)) { + goto case 363; } else { Error(la); - goto case 366; + goto case 362; } } } - case 366: { - stateStack.Push(362); - goto case 263; + case 362: { + stateStack.Push(358); + goto case 259; } - case 367: { + case 363: { nextTokenIsPotentialStartOfExpression = true; - goto case 368; + goto case 364; } - case 368: { - if (la == null) { currentState = 368; break; } - if (set[142].Get(la.kind)) { + case 364: { + if (la == null) { currentState = 364; break; } + if (set[141].Get(la.kind)) { if (la.kind == 144) { - currentState = 370; + currentState = 366; break; } else { - goto case 370; + goto case 366; } } else { if (set[23].Get(la.kind)) { - stateStack.Push(369); - goto case 56; + stateStack.Push(365); + goto case 55; } else { Error(la); - goto case 369; + goto case 365; } } } - case 369: { - if (la == null) { currentState = 369; break; } + case 365: { + if (la == null) { currentState = 365; break; } if (la.kind == 22) { - currentState = 367; + currentState = 363; break; } else { - goto case 366; + goto case 362; } } - case 370: { - stateStack.Push(371); - goto case 372; + case 366: { + stateStack.Push(367); + goto case 368; } - case 371: { - stateStack.Push(369); - goto case 76; + case 367: { + stateStack.Push(365); + goto case 75; } - case 372: { - if (la == null) { currentState = 372; break; } + case 368: { + if (la == null) { currentState = 368; break; } if (la.kind == 20) { - goto case 74; + goto case 73; } else { if (la.kind == 41) { - goto case 73; + goto case 72; } else { if (la.kind == 40) { - goto case 72; + goto case 71; } else { if (la.kind == 39) { - currentState = 373; + currentState = 369; break; } else { if (la.kind == 42) { - goto case 69; + goto case 68; } else { if (la.kind == 43) { - goto case 70; + goto case 69; } else { goto case 6; } @@ -5520,109 +5481,109 @@ partial class ExpressionFinder { } } } - case 373: { + case 369: { wasNormalAttribute = false; currentState = stateStack.Pop(); goto switchlbl; } - case 374: { - stateStack.Push(375); - goto case 56; + case 370: { + stateStack.Push(371); + goto case 55; } - case 375: { - if (la == null) { currentState = 375; break; } + case 371: { + if (la == null) { currentState = 371; break; } if (la.kind == 214) { - currentState = 383; + currentState = 379; break; } else { - goto case 376; + goto case 372; } } - case 376: { - if (la == null) { currentState = 376; break; } + case 372: { + if (la == null) { currentState = 372; break; } if (la.kind == 1 || la.kind == 21) { - goto case 377; + goto case 373; } else { goto case 6; } } - case 377: { - stateStack.Push(378); - goto case 263; + case 373: { + stateStack.Push(374); + goto case 259; } - case 378: { - if (la == null) { currentState = 378; break; } + case 374: { + if (la == null) { currentState = 374; break; } if (la.kind == 111 || la.kind == 112) { if (la.kind == 111) { - currentState = 382; + currentState = 378; break; } else { if (la.kind == 112) { - currentState = 380; + currentState = 376; break; } else { Error(la); - goto case 377; + goto case 373; } } } else { Expect(113, la); // "End" - currentState = 379; + currentState = 375; break; } } - case 379: { - if (la == null) { currentState = 379; break; } + case 375: { + if (la == null) { currentState = 375; break; } Expect(135, la); // "If" currentState = stateStack.Pop(); break; } - case 380: { - stateStack.Push(381); - goto case 56; + case 376: { + stateStack.Push(377); + goto case 55; } - case 381: { - if (la == null) { currentState = 381; break; } + case 377: { + if (la == null) { currentState = 377; break; } if (la.kind == 214) { - currentState = 377; + currentState = 373; break; } else { - goto case 377; + goto case 373; } } - case 382: { - if (la == null) { currentState = 382; break; } + case 378: { + if (la == null) { currentState = 378; break; } if (la.kind == 135) { - currentState = 380; + currentState = 376; break; } else { - goto case 377; + goto case 373; } } - case 383: { + case 379: { nextTokenIsPotentialStartOfExpression = true; - goto case 384; + goto case 380; } - case 384: { - if (la == null) { currentState = 384; break; } - if (set[51].Get(la.kind)) { - goto case 385; + case 380: { + if (la == null) { currentState = 380; break; } + if (set[50].Get(la.kind)) { + goto case 381; } else { - goto case 376; + goto case 372; } } - case 385: { - stateStack.Push(386); - goto case 271; + case 381: { + stateStack.Push(382); + goto case 267; } - case 386: { - if (la == null) { currentState = 386; break; } + case 382: { + if (la == null) { currentState = 382; break; } if (la.kind == 21) { - currentState = 390; + currentState = 386; break; } else { if (la.kind == 111) { - currentState = 387; + currentState = 383; break; } else { currentState = stateStack.Pop(); @@ -5630,23 +5591,49 @@ partial class ExpressionFinder { } } } - case 387: { + case 383: { nextTokenIsPotentialStartOfExpression = true; - goto case 388; + goto case 384; } - case 388: { - if (la == null) { currentState = 388; break; } - if (set[51].Get(la.kind)) { - stateStack.Push(389); - goto case 271; + case 384: { + if (la == null) { currentState = 384; break; } + if (set[50].Get(la.kind)) { + stateStack.Push(385); + goto case 267; + } else { + goto case 385; + } + } + case 385: { + if (la == null) { currentState = 385; break; } + if (la.kind == 21) { + currentState = 383; + break; + } else { + currentState = stateStack.Pop(); + goto switchlbl; + } + } + case 386: { + nextTokenIsPotentialStartOfExpression = true; + goto case 387; + } + case 387: { + if (la == null) { currentState = 387; break; } + if (set[50].Get(la.kind)) { + goto case 381; } else { - goto case 389; + goto case 382; } } + case 388: { + stateStack.Push(389); + goto case 101; + } case 389: { if (la == null) { currentState = 389; break; } - if (la.kind == 21) { - currentState = 387; + if (la.kind == 37) { + currentState = 390; break; } else { currentState = stateStack.Pop(); @@ -5654,90 +5641,96 @@ partial class ExpressionFinder { } } case 390: { + PushContext(Context.Expression, la, t); nextTokenIsPotentialStartOfExpression = true; goto case 391; } case 391: { if (la == null) { currentState = 391; break; } - if (set[51].Get(la.kind)) { - goto case 385; + if (set[21].Get(la.kind)) { + stateStack.Push(392); + goto case 47; } else { - goto case 386; + goto case 392; } } case 392: { - stateStack.Push(393); - goto case 102; + PopContext(); + goto case 46; } case 393: { - if (la == null) { currentState = 393; break; } - if (la.kind == 37) { - currentState = 46; - break; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } + stateStack.Push(394); + goto case 55; } case 394: { - stateStack.Push(395); - goto case 56; - } - case 395: { - if (la == null) { currentState = 395; break; } + if (la == null) { currentState = 394; break; } Expect(22, la); // "," - currentState = 56; + currentState = 55; break; } + case 395: { + stateStack.Push(396); + goto case 55; + } case 396: { stateStack.Push(397); - goto case 56; + goto case 259; } case 397: { - stateStack.Push(398); - goto case 263; - } - case 398: { - if (la == null) { currentState = 398; break; } + if (la == null) { currentState = 397; break; } Expect(113, la); // "End" - currentState = 399; + currentState = 398; break; } - case 399: { - if (la == null) { currentState = 399; break; } + case 398: { + if (la == null) { currentState = 398; break; } if (la.kind == 233) { - goto case 103; + goto case 102; } else { if (la.kind == 211) { - goto case 111; + goto case 110; } else { goto case 6; } } } - case 400: { + case 399: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(401); - goto case 206; + stateStack.Push(400); + goto case 205; } - case 401: { + case 400: { PopContext(); - goto case 402; + goto case 401; + } + case 401: { + if (la == null) { currentState = 401; break; } + if (la.kind == 33) { + currentState = 402; + break; + } else { + goto case 402; + } } case 402: { if (la == null) { currentState = 402; break; } - if (la.kind == 33) { - currentState = 403; + if (la.kind == 37) { + currentState = 419; break; } else { - goto case 403; + if (la.kind == 63) { + currentState = 416; + break; + } else { + goto case 403; + } } } case 403: { if (la == null) { currentState = 403; break; } - if (la.kind == 37) { - currentState = 417; + if (la.kind == 20) { + currentState = 415; break; } else { goto case 404; @@ -5746,259 +5739,297 @@ partial class ExpressionFinder { case 404: { if (la == null) { currentState = 404; break; } if (la.kind == 22) { - currentState = 410; + currentState = 405; break; - } else { - if (la.kind == 63) { - currentState = 407; - break; - } else { - goto case 405; - } - } - } - case 405: { - if (la == null) { currentState = 405; break; } - if (la.kind == 20) { - goto case 406; } else { currentState = stateStack.Pop(); goto switchlbl; } } + case 405: { + PushContext(Context.Identifier, la, t); + SetIdentifierExpected(la); + stateStack.Push(406); + goto case 205; + } case 406: { - if (la == null) { currentState = 406; break; } - currentState = 56; - break; + PopContext(); + goto case 407; } case 407: { - PushContext(Context.Type, la, t); - goto case 408; + if (la == null) { currentState = 407; break; } + if (la.kind == 33) { + currentState = 408; + break; + } else { + goto case 408; + } } case 408: { if (la == null) { currentState = 408; break; } - if (la.kind == 162) { - stateStack.Push(409); - goto case 86; + if (la.kind == 37) { + currentState = 412; + break; } else { - if (set[16].Get(la.kind)) { - stateStack.Push(409); - goto case 37; + if (la.kind == 63) { + currentState = 409; + break; } else { - Error(la); - goto case 409; + goto case 403; } } } case 409: { - PopContext(); - goto case 405; + PushContext(Context.Type, la, t); + goto case 410; } case 410: { - PushContext(Context.Identifier, la, t); - SetIdentifierExpected(la); - stateStack.Push(411); - goto case 206; + if (la == null) { currentState = 410; break; } + if (la.kind == 162) { + stateStack.Push(411); + goto case 85; + } else { + if (set[16].Get(la.kind)) { + stateStack.Push(411); + goto case 37; + } else { + Error(la); + goto case 411; + } + } } case 411: { PopContext(); - goto case 412; + goto case 403; } case 412: { - if (la == null) { currentState = 412; break; } - if (la.kind == 33) { - currentState = 413; - break; - } else { - goto case 413; - } + nextTokenIsPotentialStartOfExpression = true; + goto case 413; } case 413: { if (la == null) { currentState = 413; break; } - if (la.kind == 37) { - currentState = 414; - break; - } else { - goto case 404; - } - } - case 414: { - nextTokenIsPotentialStartOfExpression = true; - goto case 415; - } - case 415: { - if (la == null) { currentState = 415; break; } if (set[23].Get(la.kind)) { - stateStack.Push(416); - goto case 56; + stateStack.Push(414); + goto case 55; } else { - goto case 416; + goto case 414; } } - case 416: { - if (la == null) { currentState = 416; break; } + case 414: { + if (la == null) { currentState = 414; break; } if (la.kind == 22) { - currentState = 414; + currentState = 412; break; } else { Expect(38, la); // ")" - currentState = 413; + currentState = 408; break; } } + case 415: { + stateStack.Push(404); + goto case 55; + } + case 416: { + PushContext(Context.Type, la, t); + goto case 417; + } case 417: { - nextTokenIsPotentialStartOfExpression = true; - goto case 418; + if (la == null) { currentState = 417; break; } + if (la.kind == 162) { + stateStack.Push(418); + goto case 85; + } else { + if (set[16].Get(la.kind)) { + stateStack.Push(418); + goto case 37; + } else { + Error(la); + goto case 418; + } + } } case 418: { - if (la == null) { currentState = 418; break; } + PopContext(); + goto case 403; + } + case 419: { + nextTokenIsPotentialStartOfExpression = true; + goto case 420; + } + case 420: { + if (la == null) { currentState = 420; break; } if (set[23].Get(la.kind)) { - stateStack.Push(419); - goto case 56; + stateStack.Push(421); + goto case 55; } else { - goto case 419; + goto case 421; } } - case 419: { - if (la == null) { currentState = 419; break; } + case 421: { + if (la == null) { currentState = 421; break; } if (la.kind == 22) { - currentState = 417; + currentState = 419; break; } else { Expect(38, la); // ")" - currentState = 403; + currentState = 402; break; } } - case 420: { + case 422: { PushContext(Context.Type, la, t); - stateStack.Push(421); + stateStack.Push(423); goto case 37; } - case 421: { + case 423: { PopContext(); - goto case 260; + goto case 256; } - case 422: { - stateStack.Push(423); + case 424: { + if (la == null) { currentState = 424; break; } + Expect(37, la); // "(" + currentState = 425; + break; + } + case 425: { + PushContext(Context.Default, la, t); + SetIdentifierExpected(la); + goto case 426; + } + case 426: { + if (la == null) { currentState = 426; break; } + if (set[77].Get(la.kind)) { + stateStack.Push(427); + goto case 428; + } else { + goto case 427; + } + } + case 427: { + PopContext(); + goto case 46; + } + case 428: { + stateStack.Push(429); PushContext(Context.Parameter, la, t); - goto case 424; + goto case 430; } - case 423: { - if (la == null) { currentState = 423; break; } + case 429: { + if (la == null) { currentState = 429; break; } if (la.kind == 22) { - currentState = 422; + currentState = 428; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 424: { + case 430: { SetIdentifierExpected(la); - goto case 425; + goto case 431; } - case 425: { - if (la == null) { currentState = 425; break; } + case 431: { + if (la == null) { currentState = 431; break; } if (la.kind == 40) { - stateStack.Push(424); - goto case 435; + stateStack.Push(430); + goto case 441; } else { - goto case 426; + goto case 432; } } - case 426: { + case 432: { SetIdentifierExpected(la); - goto case 427; + goto case 433; } - case 427: { - if (la == null) { currentState = 427; break; } - if (set[143].Get(la.kind)) { - currentState = 426; + case 433: { + if (la == null) { currentState = 433; break; } + if (set[142].Get(la.kind)) { + currentState = 432; break; } else { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(428); - goto case 206; + stateStack.Push(434); + goto case 205; } } - case 428: { + case 434: { PopContext(); - goto case 429; + goto case 435; } - case 429: { - if (la == null) { currentState = 429; break; } + case 435: { + if (la == null) { currentState = 435; break; } if (la.kind == 63) { - currentState = 433; + currentState = 439; break; } else { - goto case 430; + goto case 436; } } - case 430: { - if (la == null) { currentState = 430; break; } + case 436: { + if (la == null) { currentState = 436; break; } if (la.kind == 20) { - currentState = 432; + currentState = 438; break; } else { - goto case 431; + goto case 437; } } - case 431: { + case 437: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 432: { - stateStack.Push(431); - goto case 56; + case 438: { + stateStack.Push(437); + goto case 55; } - case 433: { + case 439: { PushContext(Context.Type, la, t); - stateStack.Push(434); + stateStack.Push(440); goto case 37; } - case 434: { + case 440: { PopContext(); - goto case 430; + goto case 436; } - case 435: { - if (la == null) { currentState = 435; break; } + case 441: { + if (la == null) { currentState = 441; break; } Expect(40, la); // "<" - currentState = 436; + currentState = 442; break; } - case 436: { + case 442: { wasNormalAttribute = true; PushContext(Context.Attribute, la, t); - goto case 437; + goto case 443; } - case 437: { - if (la == null) { currentState = 437; break; } + case 443: { + if (la == null) { currentState = 443; break; } if (la.kind == 65 || la.kind == 155) { - currentState = 441; + currentState = 447; break; } else { - goto case 438; + goto case 444; } } - case 438: { - if (la == null) { currentState = 438; break; } - if (set[144].Get(la.kind)) { - currentState = 438; + case 444: { + if (la == null) { currentState = 444; break; } + if (set[143].Get(la.kind)) { + currentState = 444; break; } else { Expect(39, la); // ">" - currentState = 439; + currentState = 445; break; } } - case 439: { + case 445: { PopContext(); - goto case 440; + goto case 446; } - case 440: { - if (la == null) { currentState = 440; break; } + case 446: { + if (la == null) { currentState = 446; break; } if (la.kind == 1) { goto case 25; } else { @@ -6006,537 +6037,535 @@ partial class ExpressionFinder { goto switchlbl; } } - case 441: { - if (la == null) { currentState = 441; break; } + case 447: { + if (la == null) { currentState = 447; break; } Expect(21, la); // ":" - currentState = 442; + currentState = 448; break; } - case 442: { + case 448: { wasNormalAttribute = false; - goto case 438; - } - case 443: { - if (la == null) { currentState = 443; break; } - Expect(37, la); // "(" - currentState = 444; - break; - } - case 444: { - SetIdentifierExpected(la); - goto case 445; - } - case 445: { - if (la == null) { currentState = 445; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(446); - goto case 422; - } else { - goto case 446; - } + goto case 444; } - case 446: { - if (la == null) { currentState = 446; break; } - Expect(38, la); // ")" - currentState = 447; - break; + case 449: { + stateStack.Push(450); + goto case 424; } - case 447: { + case 450: { nextTokenIsPotentialStartOfExpression = true; - goto case 448; + goto case 451; } - case 448: { - if (la == null) { currentState = 448; break; } - if (set[51].Get(la.kind)) { - goto case 271; + case 451: { + if (la == null) { currentState = 451; break; } + if (set[50].Get(la.kind)) { + goto case 267; } else { if (la.kind == 1 || la.kind == 21) { - stateStack.Push(449); - goto case 263; + stateStack.Push(452); + goto case 259; } else { goto case 6; } } } - case 449: { - if (la == null) { currentState = 449; break; } + case 452: { + if (la == null) { currentState = 452; break; } Expect(113, la); // "End" - currentState = 450; + currentState = 453; break; } - case 450: { - if (la == null) { currentState = 450; break; } + case 453: { + if (la == null) { currentState = 453; break; } Expect(210, la); // "Sub" currentState = stateStack.Pop(); break; } - case 451: { - if (la == null) { currentState = 451; break; } + case 454: { + if (la == null) { currentState = 454; break; } if (la.kind == 17 || la.kind == 18 || la.kind == 19) { - currentState = 464; + currentState = 467; break; } else { if (la.kind == 10) { - stateStack.Push(453); - goto case 455; + stateStack.Push(456); + goto case 458; } else { Error(la); - goto case 452; + goto case 455; } } } - case 452: { + case 455: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 453: { - if (la == null) { currentState = 453; break; } + case 456: { + if (la == null) { currentState = 456; break; } if (la.kind == 17) { - currentState = 454; + currentState = 457; break; } else { - goto case 452; + goto case 455; } } - case 454: { - if (la == null) { currentState = 454; break; } + case 457: { + if (la == null) { currentState = 457; break; } if (la.kind == 16) { - currentState = 453; + currentState = 456; break; } else { - goto case 453; + goto case 456; } } - case 455: { + case 458: { PushContext(Context.Xml, la, t); - goto case 456; + goto case 459; } - case 456: { - if (la == null) { currentState = 456; break; } + case 459: { + if (la == null) { currentState = 459; break; } Expect(10, la); // XmlOpenTag - currentState = 457; + currentState = 460; break; } - case 457: { - if (la == null) { currentState = 457; break; } - if (set[145].Get(la.kind)) { - if (set[146].Get(la.kind)) { - currentState = 457; + case 460: { + if (la == null) { currentState = 460; break; } + if (set[144].Get(la.kind)) { + if (set[145].Get(la.kind)) { + currentState = 460; break; } else { if (la.kind == 12) { - stateStack.Push(457); - goto case 461; + stateStack.Push(460); + goto case 464; } else { Error(la); - goto case 457; + goto case 460; } } } else { if (la.kind == 14) { - currentState = 458; + currentState = 461; break; } else { if (la.kind == 11) { - currentState = 459; + currentState = 462; break; } else { Error(la); - goto case 458; + goto case 461; } } } } - case 458: { + case 461: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 459: { - if (la == null) { currentState = 459; break; } - if (set[147].Get(la.kind)) { - if (set[148].Get(la.kind)) { - currentState = 459; + case 462: { + if (la == null) { currentState = 462; break; } + if (set[146].Get(la.kind)) { + if (set[147].Get(la.kind)) { + currentState = 462; break; } else { if (la.kind == 12) { - stateStack.Push(459); - goto case 461; + stateStack.Push(462); + goto case 464; } else { if (la.kind == 10) { - stateStack.Push(459); - goto case 455; + stateStack.Push(462); + goto case 458; } else { Error(la); - goto case 459; + goto case 462; } } } } else { Expect(15, la); // XmlOpenEndTag - currentState = 460; + currentState = 463; break; } } - case 460: { - if (la == null) { currentState = 460; break; } - if (set[149].Get(la.kind)) { - if (set[150].Get(la.kind)) { - currentState = 460; + case 463: { + if (la == null) { currentState = 463; break; } + if (set[148].Get(la.kind)) { + if (set[149].Get(la.kind)) { + currentState = 463; break; } else { if (la.kind == 12) { - stateStack.Push(460); - goto case 461; + stateStack.Push(463); + goto case 464; } else { Error(la); - goto case 460; + goto case 463; } } } else { Expect(11, la); // XmlCloseTag - currentState = 458; + currentState = 461; break; } } - case 461: { - if (la == null) { currentState = 461; break; } + case 464: { + if (la == null) { currentState = 464; break; } Expect(12, la); // XmlStartInlineVB - currentState = 462; + currentState = 465; break; } - case 462: { - stateStack.Push(463); - goto case 56; + case 465: { + stateStack.Push(466); + goto case 55; } - case 463: { - if (la == null) { currentState = 463; break; } + case 466: { + if (la == null) { currentState = 466; break; } Expect(13, la); // XmlEndInlineVB currentState = stateStack.Pop(); break; } - case 464: { - if (la == null) { currentState = 464; break; } + case 467: { + if (la == null) { currentState = 467; break; } if (la.kind == 16) { - currentState = 465; + currentState = 468; break; } else { - goto case 465; + goto case 468; } } - case 465: { - if (la == null) { currentState = 465; break; } + case 468: { + if (la == null) { currentState = 468; break; } if (la.kind == 17 || la.kind == 19) { - currentState = 464; + currentState = 467; break; } else { if (la.kind == 10) { - stateStack.Push(466); - goto case 455; + stateStack.Push(469); + goto case 458; } else { - goto case 452; + goto case 455; } } } - case 466: { - if (la == null) { currentState = 466; break; } + case 469: { + if (la == null) { currentState = 469; break; } if (la.kind == 17) { - currentState = 467; + currentState = 470; break; } else { - goto case 452; + goto case 455; } } - case 467: { - if (la == null) { currentState = 467; break; } + case 470: { + if (la == null) { currentState = 470; break; } if (la.kind == 16) { - currentState = 466; + currentState = 469; break; } else { - goto case 466; + goto case 469; } } - case 468: { - if (la == null) { currentState = 468; break; } + case 471: { + if (la == null) { currentState = 471; break; } Expect(37, la); // "(" - currentState = 469; + currentState = 472; break; } - case 469: { + case 472: { readXmlIdentifier = true; - stateStack.Push(470); - goto case 206; + stateStack.Push(473); + goto case 205; } - case 470: { - if (la == null) { currentState = 470; break; } + case 473: { + if (la == null) { currentState = 473; break; } Expect(38, la); // ")" - currentState = 176; + currentState = 175; break; } - case 471: { - if (la == null) { currentState = 471; break; } + case 474: { + if (la == null) { currentState = 474; break; } Expect(37, la); // "(" - currentState = 472; + currentState = 475; break; } - case 472: { + case 475: { PushContext(Context.Type, la, t); - stateStack.Push(473); + stateStack.Push(476); goto case 37; } - case 473: { + case 476: { PopContext(); - goto case 470; + goto case 473; } - case 474: { + case 477: { nextTokenIsStartOfImportsOrAccessExpression = true; wasQualifierTokenAtStart = true; - goto case 475; + goto case 478; } - case 475: { - if (la == null) { currentState = 475; break; } + case 478: { + if (la == null) { currentState = 478; break; } if (la.kind == 10) { - currentState = 476; - break; - } else { - goto case 476; - } - } - case 476: { - stateStack.Push(477); - goto case 102; - } - case 477: { - if (la == null) { currentState = 477; break; } - if (la.kind == 11) { - currentState = 176; + currentState = 479; break; } else { - goto case 176; + goto case 479; } } - case 478: { - activeArgument = 0; - goto case 479; - } case 479: { stateStack.Push(480); - goto case 56; + goto case 101; } case 480: { if (la == null) { currentState = 480; break; } - if (la.kind == 22) { - currentState = 481; + if (la.kind == 11) { + currentState = 175; break; } else { - goto case 470; + goto case 175; } } case 481: { - activeArgument++; - goto case 479; + activeArgument = 0; + goto case 482; } case 482: { stateStack.Push(483); - goto case 56; + goto case 55; } case 483: { if (la == null) { currentState = 483; break; } if (la.kind == 22) { currentState = 484; break; + } else { + goto case 473; + } + } + case 484: { + activeArgument++; + goto case 482; + } + case 485: { + stateStack.Push(486); + goto case 55; + } + case 486: { + if (la == null) { currentState = 486; break; } + if (la.kind == 22) { + currentState = 487; + break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 484: { + case 487: { activeArgument++; nextTokenIsPotentialStartOfExpression = true; - goto case 485; + goto case 488; } - case 485: { - if (la == null) { currentState = 485; break; } + case 488: { + if (la == null) { currentState = 488; break; } if (set[23].Get(la.kind)) { - goto case 482; + goto case 485; } else { - goto case 483; + goto case 486; } } - case 486: { - if (la == null) { currentState = 486; break; } + case 489: { + if (la == null) { currentState = 489; break; } if (set[16].Get(la.kind)) { - stateStack.Push(487); + PushContext(Context.Type, la, t); + stateStack.Push(493); goto case 37; } else { - goto case 487; + goto case 490; } } - case 487: { - if (la == null) { currentState = 487; break; } + case 490: { + if (la == null) { currentState = 490; break; } if (la.kind == 22) { - currentState = 486; + currentState = 491; break; } else { goto case 45; } } - case 488: { + case 491: { + if (la == null) { currentState = 491; break; } + if (set[16].Get(la.kind)) { + PushContext(Context.Type, la, t); + stateStack.Push(492); + goto case 37; + } else { + goto case 490; + } + } + case 492: { + PopContext(); + goto case 490; + } + case 493: { + PopContext(); + goto case 490; + } + case 494: { SetIdentifierExpected(la); - goto case 489; + goto case 495; } - case 489: { - if (la == null) { currentState = 489; break; } - if (set[151].Get(la.kind)) { + case 495: { + if (la == null) { currentState = 495; break; } + if (set[150].Get(la.kind)) { if (la.kind == 169) { - currentState = 491; + currentState = 497; break; } else { - if (set[78].Get(la.kind)) { - stateStack.Push(490); - goto case 422; + if (set[77].Get(la.kind)) { + stateStack.Push(496); + goto case 428; } else { Error(la); - goto case 490; + goto case 496; } } } else { - goto case 490; + goto case 496; } } - case 490: { - if (la == null) { currentState = 490; break; } + case 496: { + if (la == null) { currentState = 496; break; } Expect(38, la); // ")" currentState = 34; break; } - case 491: { - stateStack.Push(490); - goto case 492; + case 497: { + stateStack.Push(496); + goto case 498; } - case 492: { + case 498: { SetIdentifierExpected(la); - goto case 493; + goto case 499; } - case 493: { - if (la == null) { currentState = 493; break; } + case 499: { + if (la == null) { currentState = 499; break; } if (la.kind == 138 || la.kind == 178) { - currentState = 494; + currentState = 500; break; } else { - goto case 494; + goto case 500; } } - case 494: { + case 500: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(495); - goto case 509; + stateStack.Push(501); + goto case 515; } - case 495: { + case 501: { PopContext(); - goto case 496; + goto case 502; } - case 496: { - if (la == null) { currentState = 496; break; } + case 502: { + if (la == null) { currentState = 502; break; } if (la.kind == 63) { - currentState = 510; + currentState = 516; break; } else { - goto case 497; + goto case 503; } } - case 497: { - if (la == null) { currentState = 497; break; } + case 503: { + if (la == null) { currentState = 503; break; } if (la.kind == 22) { - currentState = 498; + currentState = 504; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 498: { + case 504: { SetIdentifierExpected(la); - goto case 499; + goto case 505; } - case 499: { - if (la == null) { currentState = 499; break; } + case 505: { + if (la == null) { currentState = 505; break; } if (la.kind == 138 || la.kind == 178) { - currentState = 500; + currentState = 506; break; } else { - goto case 500; + goto case 506; } } - case 500: { + case 506: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(501); - goto case 509; + stateStack.Push(507); + goto case 515; } - case 501: { + case 507: { PopContext(); - goto case 502; + goto case 508; } - case 502: { - if (la == null) { currentState = 502; break; } + case 508: { + if (la == null) { currentState = 508; break; } if (la.kind == 63) { - currentState = 503; + currentState = 509; break; } else { - goto case 497; + goto case 503; } } - case 503: { + case 509: { PushContext(Context.Type, la, t); - stateStack.Push(504); - goto case 505; + stateStack.Push(510); + goto case 511; } - case 504: { + case 510: { PopContext(); - goto case 497; + goto case 503; } - case 505: { - if (la == null) { currentState = 505; break; } - if (set[94].Get(la.kind)) { - goto case 508; + case 511: { + if (la == null) { currentState = 511; break; } + if (set[93].Get(la.kind)) { + goto case 514; } else { if (la.kind == 35) { - currentState = 506; + currentState = 512; break; } else { goto case 6; } } } - case 506: { - stateStack.Push(507); - goto case 508; + case 512: { + stateStack.Push(513); + goto case 514; } - case 507: { - if (la == null) { currentState = 507; break; } + case 513: { + if (la == null) { currentState = 513; break; } if (la.kind == 22) { - currentState = 506; + currentState = 512; break; } else { - goto case 83; + goto case 82; } } - case 508: { - if (la == null) { currentState = 508; break; } + case 514: { + if (la == null) { currentState = 514; break; } if (set[16].Get(la.kind)) { currentState = 38; break; } else { if (la.kind == 162) { - goto case 122; + goto case 121; } else { if (la.kind == 84) { - goto case 138; + goto case 137; } else { if (la.kind == 209) { - goto case 113; + goto case 112; } else { goto case 6; } @@ -6544,85 +6573,85 @@ partial class ExpressionFinder { } } } - case 509: { - if (la == null) { currentState = 509; break; } + case 515: { + if (la == null) { currentState = 515; break; } if (la.kind == 2) { - goto case 146; + goto case 145; } else { if (la.kind == 62) { - goto case 144; + goto case 143; } else { if (la.kind == 64) { - goto case 143; + goto case 142; } else { if (la.kind == 65) { - goto case 142; + goto case 141; } else { if (la.kind == 66) { - goto case 141; + goto case 140; } else { if (la.kind == 67) { - goto case 140; + goto case 139; } else { if (la.kind == 70) { - goto case 139; + goto case 138; } else { if (la.kind == 87) { - goto case 137; + goto case 136; } else { if (la.kind == 104) { - goto case 135; + goto case 134; } else { if (la.kind == 107) { - goto case 134; + goto case 133; } else { if (la.kind == 116) { - goto case 132; + goto case 131; } else { if (la.kind == 121) { - goto case 131; + goto case 130; } else { if (la.kind == 133) { - goto case 127; + goto case 126; } else { if (la.kind == 139) { - goto case 126; + goto case 125; } else { if (la.kind == 143) { - goto case 125; + goto case 124; } else { if (la.kind == 146) { - goto case 124; + goto case 123; } else { if (la.kind == 147) { - goto case 123; + goto case 122; } else { if (la.kind == 170) { - goto case 120; + goto case 119; } else { if (la.kind == 176) { - goto case 119; + goto case 118; } else { if (la.kind == 184) { - goto case 118; + goto case 117; } else { if (la.kind == 203) { - goto case 115; + goto case 114; } else { if (la.kind == 212) { - goto case 110; + goto case 109; } else { if (la.kind == 213) { - goto case 109; + goto case 108; } else { if (la.kind == 223) { - goto case 107; + goto case 106; } else { if (la.kind == 224) { - goto case 106; + goto case 105; } else { if (la.kind == 230) { - goto case 105; + goto case 104; } else { goto case 6; } @@ -6652,131 +6681,93 @@ partial class ExpressionFinder { } } } - case 510: { + case 516: { PushContext(Context.Type, la, t); - stateStack.Push(511); - goto case 505; + stateStack.Push(517); + goto case 511; } - case 511: { + case 517: { PopContext(); - goto case 497; + goto case 503; } - case 512: { + case 518: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(513); - goto case 206; + stateStack.Push(519); + goto case 205; } - case 513: { + case 519: { PopContext(); - goto case 514; + goto case 520; } - case 514: { - if (la == null) { currentState = 514; break; } + case 520: { + if (la == null) { currentState = 520; break; } if (la.kind == 37) { - currentState = 519; - break; + stateStack.Push(521); + goto case 424; } else { - goto case 515; + goto case 521; } } - case 515: { - if (la == null) { currentState = 515; break; } + case 521: { + if (la == null) { currentState = 521; break; } if (la.kind == 63) { - currentState = 516; + currentState = 522; break; } else { goto case 23; } } - case 516: { + case 522: { PushContext(Context.Type, la, t); - goto case 517; + goto case 523; } - case 517: { - if (la == null) { currentState = 517; break; } + case 523: { + if (la == null) { currentState = 523; break; } if (la.kind == 40) { - stateStack.Push(517); - goto case 435; + stateStack.Push(523); + goto case 441; } else { - stateStack.Push(518); + stateStack.Push(524); goto case 37; } } - case 518: { + case 524: { PopContext(); goto case 23; } - case 519: { - SetIdentifierExpected(la); - goto case 520; - } - case 520: { - if (la == null) { currentState = 520; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(521); - goto case 422; - } else { - goto case 521; - } - } - case 521: { - if (la == null) { currentState = 521; break; } - Expect(38, la); // ")" - currentState = 515; - break; - } - case 522: { + case 525: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(523); - goto case 206; + stateStack.Push(526); + goto case 205; } - case 523: { + case 526: { PopContext(); - goto case 524; + goto case 527; } - case 524: { - if (la == null) { currentState = 524; break; } + case 527: { + if (la == null) { currentState = 527; break; } if (la.kind == 37 || la.kind == 63) { if (la.kind == 63) { currentState = 529; break; } else { if (la.kind == 37) { - currentState = 526; - break; + stateStack.Push(23); + goto case 424; } else { - goto case 525; + goto case 528; } } } else { goto case 23; } } - case 525: { + case 528: { Error(la); goto case 23; } - case 526: { - SetIdentifierExpected(la); - goto case 527; - } - case 527: { - if (la == null) { currentState = 527; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(528); - goto case 422; - } else { - goto case 528; - } - } - case 528: { - if (la == null) { currentState = 528; break; } - Expect(38, la); // ")" - currentState = 23; - break; - } case 529: { PushContext(Context.Type, la, t); stateStack.Push(530); @@ -6800,7 +6791,7 @@ partial class ExpressionFinder { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); stateStack.Push(534); - goto case 206; + goto case 205; } case 534: { PopContext(); @@ -6825,7 +6816,7 @@ partial class ExpressionFinder { } case 538: { if (la == null) { currentState = 538; break; } - if (set[97].Get(la.kind)) { + if (set[96].Get(la.kind)) { goto case 542; } else { Expect(113, la); // "End" @@ -6856,12 +6847,12 @@ partial class ExpressionFinder { if (la == null) { currentState = 543; break; } if (la.kind == 40) { stateStack.Push(542); - goto case 435; + goto case 441; } else { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); stateStack.Push(544); - goto case 206; + goto case 205; } } case 544: { @@ -6879,7 +6870,7 @@ partial class ExpressionFinder { } case 546: { stateStack.Push(536); - goto case 56; + goto case 55; } case 547: { PushContext(Context.Type, la, t); @@ -6954,14 +6945,14 @@ partial class ExpressionFinder { } case 558: { if (la == null) { currentState = 558; break; } - if (set[151].Get(la.kind)) { + if (set[150].Get(la.kind)) { if (la.kind == 169) { currentState = 560; break; } else { - if (set[78].Get(la.kind)) { + if (set[77].Get(la.kind)) { stateStack.Push(559); - goto case 422; + goto case 428; } else { Error(la); goto case 559; @@ -6979,7 +6970,7 @@ partial class ExpressionFinder { } case 560: { stateStack.Push(559); - goto case 492; + goto case 498; } case 561: { PushContext(Context.TypeDeclaration, la, t); @@ -7009,7 +7000,7 @@ partial class ExpressionFinder { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); stateStack.Push(564); - goto case 206; + goto case 205; } case 564: { PopContext(); @@ -7018,7 +7009,7 @@ partial class ExpressionFinder { case 565: { if (la == null) { currentState = 565; break; } if (la.kind == 37) { - currentState = 729; + currentState = 715; break; } else { goto case 566; @@ -7037,7 +7028,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 568; break; } if (la.kind == 140) { isMissingModifier = false; - goto case 726; + goto case 712; } else { goto case 569; } @@ -7051,7 +7042,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 570; break; } if (la.kind == 136) { isMissingModifier = false; - goto case 720; + goto case 706; } else { goto case 571; } @@ -7063,7 +7054,7 @@ partial class ExpressionFinder { } case 572: { if (la == null) { currentState = 572; break; } - if (set[101].Get(la.kind)) { + if (set[100].Get(la.kind)) { goto case 577; } else { isMissingModifier = false; @@ -7114,7 +7105,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 578; break; } if (la.kind == 40) { stateStack.Push(577); - goto case 435; + goto case 441; } else { isMissingModifier = true; goto case 579; @@ -7126,8 +7117,8 @@ partial class ExpressionFinder { } case 580: { if (la == null) { currentState = 580; break; } - if (set[132].Get(la.kind)) { - currentState = 719; + if (set[131].Get(la.kind)) { + currentState = 705; break; } else { isMissingModifier = false; @@ -7153,7 +7144,7 @@ partial class ExpressionFinder { stateStack.Push(571); goto case 9; } else { - if (set[104].Get(la.kind)) { + if (set[103].Get(la.kind)) { stateStack.Push(571); PushContext(Context.Member, la, t); SetIdentifierExpected(la); @@ -7169,25 +7160,25 @@ partial class ExpressionFinder { } case 582: { if (la == null) { currentState = 582; break; } - if (set[122].Get(la.kind)) { + if (set[121].Get(la.kind)) { stateStack.Push(583); - goto case 704; + goto case 690; } else { if (la.kind == 127 || la.kind == 210) { stateStack.Push(583); - goto case 686; + goto case 672; } else { if (la.kind == 101) { stateStack.Push(583); - goto case 670; + goto case 659; } else { if (la.kind == 119) { stateStack.Push(583); - goto case 655; + goto case 647; } else { if (la.kind == 98) { stateStack.Push(583); - goto case 643; + goto case 635; } else { if (la.kind == 186) { stateStack.Push(583); @@ -7240,7 +7231,7 @@ partial class ExpressionFinder { } case 589: { stateStack.Push(590); - goto case 422; + goto case 428; } case 590: { if (la == null) { currentState = 590; break; } @@ -7259,7 +7250,7 @@ partial class ExpressionFinder { } case 592: { stateStack.Push(593); - goto case 263; + goto case 259; } case 593: { if (la == null) { currentState = 593; break; } @@ -7281,7 +7272,7 @@ partial class ExpressionFinder { if (la == null) { currentState = 596; break; } if (la.kind == 40) { stateStack.Push(596); - goto case 435; + goto case 441; } else { stateStack.Push(597); goto case 37; @@ -7301,7 +7292,7 @@ partial class ExpressionFinder { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); stateStack.Push(600); - goto case 206; + goto case 205; } case 600: { PopContext(); @@ -7310,8 +7301,8 @@ partial class ExpressionFinder { case 601: { if (la == null) { currentState = 601; break; } if (la.kind == 37) { - currentState = 640; - break; + stateStack.Push(602); + goto case 424; } else { goto case 602; } @@ -7319,7 +7310,7 @@ partial class ExpressionFinder { case 602: { if (la == null) { currentState = 602; break; } if (la.kind == 63) { - currentState = 638; + currentState = 632; break; } else { goto case 603; @@ -7328,7 +7319,7 @@ partial class ExpressionFinder { case 603: { if (la == null) { currentState = 603; break; } if (la.kind == 136) { - currentState = 633; + currentState = 627; break; } else { goto case 604; @@ -7337,7 +7328,7 @@ partial class ExpressionFinder { case 604: { if (la == null) { currentState = 604; break; } if (la.kind == 20) { - currentState = 632; + currentState = 626; break; } else { goto case 605; @@ -7355,15 +7346,15 @@ partial class ExpressionFinder { if (la == null) { currentState = 607; break; } if (la.kind == 40) { stateStack.Push(607); - goto case 435; + goto case 441; } else { goto case 608; } } case 608: { if (la == null) { currentState = 608; break; } - if (set[152].Get(la.kind)) { - currentState = 631; + if (set[151].Get(la.kind)) { + currentState = 625; break; } else { if (la.kind == 128 || la.kind == 198) { @@ -7393,15 +7384,15 @@ partial class ExpressionFinder { case 610: { if (la == null) { currentState = 610; break; } if (la.kind == 37) { - currentState = 628; - break; + stateStack.Push(611); + goto case 424; } else { goto case 611; } } case 611: { stateStack.Push(612); - goto case 263; + goto case 259; } case 612: { if (la == null) { currentState = 612; break; } @@ -7430,7 +7421,7 @@ partial class ExpressionFinder { } case 615: { if (la == null) { currentState = 615; break; } - if (set[110].Get(la.kind)) { + if (set[109].Get(la.kind)) { goto case 618; } else { goto case 616; @@ -7452,14 +7443,14 @@ partial class ExpressionFinder { if (la == null) { currentState = 618; break; } if (la.kind == 40) { stateStack.Push(618); - goto case 435; + goto case 441; } else { goto case 619; } } case 619: { if (la == null) { currentState = 619; break; } - if (set[152].Get(la.kind)) { + if (set[151].Get(la.kind)) { currentState = 619; break; } else { @@ -7480,15 +7471,15 @@ partial class ExpressionFinder { case 620: { if (la == null) { currentState = 620; break; } if (la.kind == 37) { - currentState = 625; - break; + stateStack.Push(621); + goto case 424; } else { goto case 621; } } case 621: { stateStack.Push(622); - goto case 263; + goto case 259; } case 622: { if (la == null) { currentState = 622; break; } @@ -7517,498 +7508,406 @@ partial class ExpressionFinder { } case 625: { SetIdentifierExpected(la); - goto case 626; + goto case 608; } case 626: { - if (la == null) { currentState = 626; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(627); - goto case 422; - } else { - goto case 627; - } + stateStack.Push(605); + goto case 55; } case 627: { - if (la == null) { currentState = 627; break; } - Expect(38, la); // ")" - currentState = 621; - break; + PushContext(Context.Type, la, t); + stateStack.Push(628); + goto case 37; } case 628: { - SetIdentifierExpected(la); + PopContext(); goto case 629; } case 629: { if (la == null) { currentState = 629; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(630); - goto case 422; - } else { - goto case 630; - } - } - case 630: { - if (la == null) { currentState = 630; break; } - Expect(38, la); // ")" - currentState = 611; - break; - } - case 631: { - SetIdentifierExpected(la); - goto case 608; - } - case 632: { - stateStack.Push(605); - goto case 56; - } - case 633: { - PushContext(Context.Type, la, t); - stateStack.Push(634); - goto case 37; - } - case 634: { - PopContext(); - goto case 635; - } - case 635: { - if (la == null) { currentState = 635; break; } if (la.kind == 22) { - currentState = 636; + currentState = 630; break; } else { goto case 604; } } - case 636: { + case 630: { PushContext(Context.Type, la, t); - stateStack.Push(637); + stateStack.Push(631); goto case 37; } - case 637: { + case 631: { PopContext(); - goto case 635; + goto case 629; } - case 638: { - if (la == null) { currentState = 638; break; } + case 632: { + PushContext(Context.Type, la, t); + goto case 633; + } + case 633: { + if (la == null) { currentState = 633; break; } if (la.kind == 40) { - stateStack.Push(638); - goto case 435; + stateStack.Push(633); + goto case 441; } else { if (la.kind == 162) { - stateStack.Push(603); - goto case 86; + stateStack.Push(634); + goto case 85; } else { if (set[16].Get(la.kind)) { - PushContext(Context.Type, la, t); - stateStack.Push(639); + stateStack.Push(634); goto case 37; } else { Error(la); - goto case 603; + goto case 634; } } } } - case 639: { + case 634: { PopContext(); goto case 603; } - case 640: { - SetIdentifierExpected(la); - goto case 641; - } - case 641: { - if (la == null) { currentState = 641; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(642); - goto case 422; - } else { - goto case 642; - } - } - case 642: { - if (la == null) { currentState = 642; break; } - Expect(38, la); // ")" - currentState = 602; - break; - } - case 643: { - if (la == null) { currentState = 643; break; } + case 635: { + if (la == null) { currentState = 635; break; } Expect(98, la); // "Custom" - currentState = 644; + currentState = 636; break; } - case 644: { - stateStack.Push(645); - goto case 655; + case 636: { + stateStack.Push(637); + goto case 647; } - case 645: { - if (la == null) { currentState = 645; break; } - if (set[115].Get(la.kind)) { - goto case 647; + case 637: { + if (la == null) { currentState = 637; break; } + if (set[114].Get(la.kind)) { + goto case 639; } else { Expect(113, la); // "End" - currentState = 646; + currentState = 638; break; } } - case 646: { - if (la == null) { currentState = 646; break; } + case 638: { + if (la == null) { currentState = 638; break; } Expect(119, la); // "Event" currentState = 23; break; } - case 647: { - if (la == null) { currentState = 647; break; } + case 639: { + if (la == null) { currentState = 639; break; } if (la.kind == 40) { - stateStack.Push(647); - goto case 435; + stateStack.Push(639); + goto case 441; } else { if (la.kind == 56) { - currentState = 648; + currentState = 640; break; } else { if (la.kind == 193) { - currentState = 648; + currentState = 640; break; } else { if (la.kind == 189) { - currentState = 648; + currentState = 640; break; } else { Error(la); - goto case 648; + goto case 640; } } } } } - case 648: { - if (la == null) { currentState = 648; break; } + case 640: { + if (la == null) { currentState = 640; break; } Expect(37, la); // "(" - currentState = 649; + currentState = 641; break; } - case 649: { - stateStack.Push(650); - goto case 422; + case 641: { + stateStack.Push(642); + goto case 428; } - case 650: { - if (la == null) { currentState = 650; break; } + case 642: { + if (la == null) { currentState = 642; break; } Expect(38, la); // ")" - currentState = 651; + currentState = 643; break; } - case 651: { - stateStack.Push(652); - goto case 263; + case 643: { + stateStack.Push(644); + goto case 259; } - case 652: { - if (la == null) { currentState = 652; break; } + case 644: { + if (la == null) { currentState = 644; break; } Expect(113, la); // "End" - currentState = 653; + currentState = 645; break; } - case 653: { - if (la == null) { currentState = 653; break; } + case 645: { + if (la == null) { currentState = 645; break; } if (la.kind == 56) { - currentState = 654; + currentState = 646; break; } else { if (la.kind == 193) { - currentState = 654; + currentState = 646; break; } else { if (la.kind == 189) { - currentState = 654; + currentState = 646; break; } else { Error(la); - goto case 654; + goto case 646; } } } } - case 654: { - stateStack.Push(645); + case 646: { + stateStack.Push(637); goto case 23; } - case 655: { - if (la == null) { currentState = 655; break; } + case 647: { + if (la == null) { currentState = 647; break; } Expect(119, la); // "Event" - currentState = 656; + currentState = 648; break; } - case 656: { + case 648: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(657); - goto case 206; + stateStack.Push(649); + goto case 205; } - case 657: { + case 649: { PopContext(); - goto case 658; + goto case 650; } - case 658: { - if (la == null) { currentState = 658; break; } + case 650: { + if (la == null) { currentState = 650; break; } if (la.kind == 63) { - currentState = 668; + currentState = 657; break; } else { - if (set[153].Get(la.kind)) { + if (set[152].Get(la.kind)) { if (la.kind == 37) { - currentState = 665; - break; + stateStack.Push(651); + goto case 424; } else { - goto case 659; + goto case 651; } } else { Error(la); - goto case 659; + goto case 651; } } } - case 659: { - if (la == null) { currentState = 659; break; } + case 651: { + if (la == null) { currentState = 651; break; } if (la.kind == 136) { - currentState = 660; + currentState = 652; break; } else { goto case 23; } } - case 660: { + case 652: { PushContext(Context.Type, la, t); - stateStack.Push(661); + stateStack.Push(653); goto case 37; } - case 661: { + case 653: { PopContext(); - goto case 662; + goto case 654; } - case 662: { - if (la == null) { currentState = 662; break; } + case 654: { + if (la == null) { currentState = 654; break; } if (la.kind == 22) { - currentState = 663; + currentState = 655; break; } else { goto case 23; } } - case 663: { + case 655: { PushContext(Context.Type, la, t); - stateStack.Push(664); + stateStack.Push(656); goto case 37; } - case 664: { + case 656: { PopContext(); - goto case 662; - } - case 665: { - SetIdentifierExpected(la); - goto case 666; + goto case 654; } - case 666: { - if (la == null) { currentState = 666; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(667); - goto case 422; - } else { - goto case 667; - } - } - case 667: { - if (la == null) { currentState = 667; break; } - Expect(38, la); // ")" - currentState = 659; - break; - } - case 668: { + case 657: { PushContext(Context.Type, la, t); - stateStack.Push(669); + stateStack.Push(658); goto case 37; } - case 669: { + case 658: { PopContext(); - goto case 659; + goto case 651; } - case 670: { - if (la == null) { currentState = 670; break; } + case 659: { + if (la == null) { currentState = 659; break; } Expect(101, la); // "Declare" - currentState = 671; + currentState = 660; break; } - case 671: { - if (la == null) { currentState = 671; break; } + case 660: { + if (la == null) { currentState = 660; break; } if (la.kind == 62 || la.kind == 66 || la.kind == 223) { - currentState = 672; + currentState = 661; break; } else { - goto case 672; + goto case 661; } } - case 672: { - if (la == null) { currentState = 672; break; } + case 661: { + if (la == null) { currentState = 661; break; } if (la.kind == 210) { - currentState = 673; + currentState = 662; break; } else { if (la.kind == 127) { - currentState = 673; + currentState = 662; break; } else { Error(la); - goto case 673; + goto case 662; } } } - case 673: { + case 662: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(674); - goto case 206; + stateStack.Push(663); + goto case 205; } - case 674: { + case 663: { PopContext(); - goto case 675; + goto case 664; } - case 675: { - if (la == null) { currentState = 675; break; } + case 664: { + if (la == null) { currentState = 664; break; } Expect(149, la); // "Lib" - currentState = 676; + currentState = 665; break; } - case 676: { - if (la == null) { currentState = 676; break; } + case 665: { + if (la == null) { currentState = 665; break; } Expect(3, la); // LiteralString - currentState = 677; + currentState = 666; break; } - case 677: { - if (la == null) { currentState = 677; break; } + case 666: { + if (la == null) { currentState = 666; break; } if (la.kind == 59) { - currentState = 685; + currentState = 671; break; } else { - goto case 678; + goto case 667; } } - case 678: { - if (la == null) { currentState = 678; break; } + case 667: { + if (la == null) { currentState = 667; break; } if (la.kind == 37) { - currentState = 682; - break; + stateStack.Push(668); + goto case 424; } else { - goto case 679; + goto case 668; } } - case 679: { - if (la == null) { currentState = 679; break; } + case 668: { + if (la == null) { currentState = 668; break; } if (la.kind == 63) { - currentState = 680; + currentState = 669; break; } else { goto case 23; } } - case 680: { + case 669: { PushContext(Context.Type, la, t); - stateStack.Push(681); + stateStack.Push(670); goto case 37; } - case 681: { + case 670: { PopContext(); goto case 23; } - case 682: { - SetIdentifierExpected(la); - goto case 683; - } - case 683: { - if (la == null) { currentState = 683; break; } - if (set[78].Get(la.kind)) { - stateStack.Push(684); - goto case 422; - } else { - goto case 684; - } - } - case 684: { - if (la == null) { currentState = 684; break; } - Expect(38, la); // ")" - currentState = 679; - break; - } - case 685: { - if (la == null) { currentState = 685; break; } + case 671: { + if (la == null) { currentState = 671; break; } Expect(3, la); // LiteralString - currentState = 678; + currentState = 667; break; } - case 686: { - if (la == null) { currentState = 686; break; } + case 672: { + if (la == null) { currentState = 672; break; } if (la.kind == 210) { - currentState = 687; + currentState = 673; break; } else { if (la.kind == 127) { - currentState = 687; + currentState = 673; break; } else { Error(la); - goto case 687; + goto case 673; } } } - case 687: { + case 673: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - goto case 688; + goto case 674; } - case 688: { - if (la == null) { currentState = 688; break; } - currentState = 689; + case 674: { + if (la == null) { currentState = 674; break; } + currentState = 675; break; } - case 689: { + case 675: { PopContext(); - goto case 690; + goto case 676; } - case 690: { - if (la == null) { currentState = 690; break; } + case 676: { + if (la == null) { currentState = 676; break; } if (la.kind == 37) { - currentState = 700; + currentState = 686; break; } else { if (la.kind == 63) { - currentState = 698; + currentState = 684; break; } else { - goto case 691; + goto case 677; } } } - case 691: { - if (la == null) { currentState = 691; break; } + case 677: { + if (la == null) { currentState = 677; break; } if (la.kind == 134 || la.kind == 136) { - currentState = 695; + currentState = 681; break; } else { - goto case 692; + goto case 678; } } - case 692: { - stateStack.Push(693); - goto case 263; + case 678: { + stateStack.Push(679); + goto case 259; } - case 693: { - if (la == null) { currentState = 693; break; } + case 679: { + if (la == null) { currentState = 679; break; } Expect(113, la); // "End" - currentState = 694; + currentState = 680; break; } - case 694: { - if (la == null) { currentState = 694; break; } + case 680: { + if (la == null) { currentState = 680; break; } if (la.kind == 210) { currentState = 23; break; @@ -8017,443 +7916,444 @@ partial class ExpressionFinder { currentState = 23; break; } else { - goto case 525; + goto case 528; } } } - case 695: { - if (la == null) { currentState = 695; break; } + case 681: { + if (la == null) { currentState = 681; break; } if (la.kind == 153 || la.kind == 158 || la.kind == 159) { - currentState = 697; + currentState = 683; break; } else { - goto case 696; + goto case 682; } } - case 696: { - stateStack.Push(692); + case 682: { + stateStack.Push(678); goto case 37; } - case 697: { - if (la == null) { currentState = 697; break; } + case 683: { + if (la == null) { currentState = 683; break; } Expect(26, la); // "." - currentState = 696; + currentState = 682; break; } - case 698: { + case 684: { PushContext(Context.Type, la, t); - stateStack.Push(699); + stateStack.Push(685); goto case 37; } - case 699: { + case 685: { PopContext(); - goto case 691; + goto case 677; } - case 700: { + case 686: { SetIdentifierExpected(la); - goto case 701; + goto case 687; } - case 701: { - if (la == null) { currentState = 701; break; } - if (set[151].Get(la.kind)) { + case 687: { + if (la == null) { currentState = 687; break; } + if (set[150].Get(la.kind)) { if (la.kind == 169) { - currentState = 703; + currentState = 689; break; } else { - if (set[78].Get(la.kind)) { - stateStack.Push(702); - goto case 422; + if (set[77].Get(la.kind)) { + stateStack.Push(688); + goto case 428; } else { Error(la); - goto case 702; + goto case 688; } } } else { - goto case 702; + goto case 688; } } - case 702: { - if (la == null) { currentState = 702; break; } + case 688: { + if (la == null) { currentState = 688; break; } Expect(38, la); // ")" - currentState = 690; + currentState = 676; break; } - case 703: { - stateStack.Push(702); - goto case 492; + case 689: { + stateStack.Push(688); + goto case 498; } - case 704: { - stateStack.Push(705); + case 690: { + stateStack.Push(691); SetIdentifierExpected(la); - goto case 706; + goto case 692; } - case 705: { - if (la == null) { currentState = 705; break; } + case 691: { + if (la == null) { currentState = 691; break; } if (la.kind == 22) { - currentState = 704; + currentState = 690; break; } else { goto case 23; } } - case 706: { - if (la == null) { currentState = 706; break; } + case 692: { + if (la == null) { currentState = 692; break; } if (la.kind == 88) { - currentState = 707; + currentState = 693; break; } else { - goto case 707; + goto case 693; } } - case 707: { + case 693: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - stateStack.Push(708); - goto case 718; + stateStack.Push(694); + goto case 704; } - case 708: { + case 694: { PopContext(); - goto case 709; + goto case 695; } - case 709: { - if (la == null) { currentState = 709; break; } + case 695: { + if (la == null) { currentState = 695; break; } if (la.kind == 33) { - currentState = 710; + currentState = 696; break; } else { - goto case 710; + goto case 696; } } - case 710: { - if (la == null) { currentState = 710; break; } + case 696: { + if (la == null) { currentState = 696; break; } if (la.kind == 37) { - currentState = 715; + currentState = 701; break; } else { if (la.kind == 63) { - currentState = 712; + currentState = 698; break; } else { - goto case 711; + goto case 697; } } } - case 711: { - if (la == null) { currentState = 711; break; } + case 697: { + if (la == null) { currentState = 697; break; } if (la.kind == 20) { - goto case 406; + currentState = 55; + break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 712: { + case 698: { PushContext(Context.Type, la, t); - goto case 713; + goto case 699; } - case 713: { - if (la == null) { currentState = 713; break; } + case 699: { + if (la == null) { currentState = 699; break; } if (la.kind == 162) { - stateStack.Push(714); - goto case 86; + stateStack.Push(700); + goto case 85; } else { if (set[16].Get(la.kind)) { - stateStack.Push(714); + stateStack.Push(700); goto case 37; } else { Error(la); - goto case 714; + goto case 700; } } } - case 714: { + case 700: { PopContext(); - goto case 711; + goto case 697; } - case 715: { + case 701: { nextTokenIsPotentialStartOfExpression = true; - goto case 716; + goto case 702; } - case 716: { - if (la == null) { currentState = 716; break; } + case 702: { + if (la == null) { currentState = 702; break; } if (set[23].Get(la.kind)) { - stateStack.Push(717); - goto case 56; + stateStack.Push(703); + goto case 55; } else { - goto case 717; + goto case 703; } } - case 717: { - if (la == null) { currentState = 717; break; } + case 703: { + if (la == null) { currentState = 703; break; } if (la.kind == 22) { - currentState = 715; + currentState = 701; break; } else { Expect(38, la); // ")" - currentState = 710; + currentState = 696; break; } } - case 718: { - if (la == null) { currentState = 718; break; } - if (set[137].Get(la.kind)) { + case 704: { + if (la == null) { currentState = 704; break; } + if (set[136].Get(la.kind)) { currentState = stateStack.Pop(); break; } else { if (la.kind == 58) { - goto case 145; + goto case 144; } else { if (la.kind == 126) { - goto case 129; + goto case 128; } else { goto case 6; } } } } - case 719: { + case 705: { isMissingModifier = false; goto case 579; } - case 720: { - if (la == null) { currentState = 720; break; } + case 706: { + if (la == null) { currentState = 706; break; } Expect(136, la); // "Implements" - currentState = 721; + currentState = 707; break; } - case 721: { + case 707: { PushContext(Context.Type, la, t); - stateStack.Push(722); + stateStack.Push(708); goto case 37; } - case 722: { + case 708: { PopContext(); - goto case 723; + goto case 709; } - case 723: { - if (la == null) { currentState = 723; break; } + case 709: { + if (la == null) { currentState = 709; break; } if (la.kind == 22) { - currentState = 724; + currentState = 710; break; } else { stateStack.Push(571); goto case 23; } } - case 724: { + case 710: { PushContext(Context.Type, la, t); - stateStack.Push(725); + stateStack.Push(711); goto case 37; } - case 725: { + case 711: { PopContext(); - goto case 723; + goto case 709; } - case 726: { - if (la == null) { currentState = 726; break; } + case 712: { + if (la == null) { currentState = 712; break; } Expect(140, la); // "Inherits" - currentState = 727; + currentState = 713; break; } - case 727: { + case 713: { PushContext(Context.Type, la, t); - stateStack.Push(728); + stateStack.Push(714); goto case 37; } - case 728: { + case 714: { PopContext(); stateStack.Push(569); goto case 23; } - case 729: { - if (la == null) { currentState = 729; break; } + case 715: { + if (la == null) { currentState = 715; break; } Expect(169, la); // "Of" - currentState = 730; + currentState = 716; break; } - case 730: { - stateStack.Push(731); - goto case 492; + case 716: { + stateStack.Push(717); + goto case 498; } - case 731: { - if (la == null) { currentState = 731; break; } + case 717: { + if (la == null) { currentState = 717; break; } Expect(38, la); // ")" currentState = 566; break; } - case 732: { + case 718: { isMissingModifier = false; goto case 28; } - case 733: { + case 719: { PushContext(Context.Type, la, t); - stateStack.Push(734); + stateStack.Push(720); goto case 37; } - case 734: { + case 720: { PopContext(); - goto case 735; + goto case 721; } - case 735: { - if (la == null) { currentState = 735; break; } + case 721: { + if (la == null) { currentState = 721; break; } if (la.kind == 22) { - currentState = 736; + currentState = 722; break; } else { stateStack.Push(17); goto case 23; } } - case 736: { + case 722: { PushContext(Context.Type, la, t); - stateStack.Push(737); + stateStack.Push(723); goto case 37; } - case 737: { + case 723: { PopContext(); - goto case 735; + goto case 721; } - case 738: { - if (la == null) { currentState = 738; break; } + case 724: { + if (la == null) { currentState = 724; break; } Expect(169, la); // "Of" - currentState = 739; + currentState = 725; break; } - case 739: { - stateStack.Push(740); - goto case 492; + case 725: { + stateStack.Push(726); + goto case 498; } - case 740: { - if (la == null) { currentState = 740; break; } + case 726: { + if (la == null) { currentState = 726; break; } Expect(38, la); // ")" currentState = 14; break; } - case 741: { + case 727: { PushContext(Context.Identifier, la, t); SetIdentifierExpected(la); - goto case 742; + goto case 728; } - case 742: { - if (la == null) { currentState = 742; break; } - if (set[50].Get(la.kind)) { - currentState = 742; + case 728: { + if (la == null) { currentState = 728; break; } + if (set[49].Get(la.kind)) { + currentState = 728; break; } else { PopContext(); - stateStack.Push(743); + stateStack.Push(729); goto case 23; } } - case 743: { - if (la == null) { currentState = 743; break; } + case 729: { + if (la == null) { currentState = 729; break; } if (set[3].Get(la.kind)) { - stateStack.Push(743); + stateStack.Push(729); goto case 5; } else { Expect(113, la); // "End" - currentState = 744; + currentState = 730; break; } } - case 744: { - if (la == null) { currentState = 744; break; } + case 730: { + if (la == null) { currentState = 730; break; } Expect(160, la); // "Namespace" currentState = 23; break; } - case 745: { - if (la == null) { currentState = 745; break; } + case 731: { + if (la == null) { currentState = 731; break; } Expect(137, la); // "Imports" - currentState = 746; + currentState = 732; break; } - case 746: { + case 732: { PushContext(Context.Importable, la, t); nextTokenIsStartOfImportsOrAccessExpression = true; - goto case 747; + goto case 733; } - case 747: { - if (la == null) { currentState = 747; break; } - if (set[154].Get(la.kind)) { - currentState = 753; + case 733: { + if (la == null) { currentState = 733; break; } + if (set[153].Get(la.kind)) { + currentState = 739; break; } else { if (la.kind == 10) { - currentState = 749; + currentState = 735; break; } else { Error(la); - goto case 748; + goto case 734; } } } - case 748: { + case 734: { PopContext(); goto case 23; } - case 749: { - stateStack.Push(750); - goto case 206; + case 735: { + stateStack.Push(736); + goto case 205; } - case 750: { - if (la == null) { currentState = 750; break; } + case 736: { + if (la == null) { currentState = 736; break; } Expect(20, la); // "=" - currentState = 751; + currentState = 737; break; } - case 751: { - if (la == null) { currentState = 751; break; } + case 737: { + if (la == null) { currentState = 737; break; } Expect(3, la); // LiteralString - currentState = 752; + currentState = 738; break; } - case 752: { - if (la == null) { currentState = 752; break; } + case 738: { + if (la == null) { currentState = 738; break; } Expect(11, la); // XmlCloseTag - currentState = 748; + currentState = 734; break; } - case 753: { - if (la == null) { currentState = 753; break; } + case 739: { + if (la == null) { currentState = 739; break; } if (la.kind == 37) { - stateStack.Push(753); + stateStack.Push(739); goto case 42; } else { if (la.kind == 20 || la.kind == 26) { - currentState = 754; + currentState = 740; break; } else { - goto case 748; + goto case 734; } } } - case 754: { - stateStack.Push(748); + case 740: { + stateStack.Push(734); goto case 37; } - case 755: { - if (la == null) { currentState = 755; break; } + case 741: { + if (la == null) { currentState = 741; break; } Expect(173, la); // "Option" - currentState = 756; + currentState = 742; break; } - case 756: { - if (la == null) { currentState = 756; break; } + case 742: { + if (la == null) { currentState = 742; break; } if (la.kind == 121 || la.kind == 139 || la.kind == 207) { - currentState = 758; + currentState = 744; break; } else { if (la.kind == 87) { - currentState = 757; + currentState = 743; break; } else { - goto case 525; + goto case 528; } } } - case 757: { - if (la == null) { currentState = 757; break; } + case 743: { + if (la == null) { currentState = 743; break; } if (la.kind == 213) { currentState = 23; break; @@ -8462,12 +8362,12 @@ partial class ExpressionFinder { currentState = 23; break; } else { - goto case 525; + goto case 528; } } } - case 758: { - if (la == null) { currentState = 758; break; } + case 744: { + if (la == null) { currentState = 744; break; } if (la.kind == 170 || la.kind == 171) { currentState = 23; break; @@ -8517,8 +8417,8 @@ partial class ExpressionFinder { new BitArray(new int[] {-940564478, 889192413, 65, 1074825472, 72844640, 231424, 22030368, 4704}), new BitArray(new int[] {4, -16777216, -1, -1, -1, -1, -1, 16383}), new BitArray(new int[] {-61995012, 1174405224, -51384097, -972018405, -1030969182, 17106740, -97186288, 8259}), - new BitArray(new int[] {-61995012, 1174405224, -51384097, -972018405, -1030969182, 17106228, -97186288, 8259}), new BitArray(new int[] {-61995012, 1174405160, -51384097, -972018405, -1030969182, 17106228, -97186288, 8259}), + new BitArray(new int[] {-61995012, 1174405224, -51384097, -972018405, -1030969182, 17106228, -97186288, 8259}), new BitArray(new int[] {-66189316, 1174405160, -51384097, -972018405, -1030969182, 17106228, -97186288, 8259}), new BitArray(new int[] {-1007673342, 889192405, 65, 1074825472, 72843296, 231424, 22030368, 4160}), new BitArray(new int[] {-1013972992, 822083461, 0, 0, 71499776, 163840, 16777216, 4096}), @@ -8542,7 +8442,6 @@ partial class ExpressionFinder { new BitArray(new int[] {65140738, 973078487, 51384096, 972018404, 1030969181, -17106229, 97186287, -8260}), new BitArray(new int[] {-66189316, 1174405160, -51384097, -972018405, -1030969182, 17106228, -97186288, 8387}), new BitArray(new int[] {0, 67108864, 0, 1073743872, 1343520, 65536, 1050656, 64}), - new BitArray(new int[] {4, 1140851008, 8388975, 1108347140, 821280, 21316608, -2144335872, 65}), new BitArray(new int[] {-64092162, -973078488, -51384097, -972018405, -1030969182, 17106228, -97186288, 8259}), new BitArray(new int[] {-64092162, 1191182376, -1048865, -546062565, -1014191950, -1593504452, -21144002, 8903}), new BitArray(new int[] {0, 0, 3072, 134447104, 16777216, 8, 0, 0}), @@ -8571,9 +8470,9 @@ partial class ExpressionFinder { new BitArray(new int[] {2097154, 32, 0, 32768, 0, 0, 0, 0}), new BitArray(new int[] {7340034, -2147483614, 0, 32768, 0, 0, 0, 0}), new BitArray(new int[] {7340034, -2147483616, 0, 32768, 0, 0, 0, 0}), - new BitArray(new int[] {7340034, -2147483648, 0, 32768, 0, 0, 0, 0}), - new BitArray(new int[] {3145730, 0, 0, 32768, 0, 0, 0, 0}), + new BitArray(new int[] {7340034, 0, 0, 32768, 0, 0, 0, 0}), new BitArray(new int[] {4, 1140850690, 8650975, 1108355356, 9218084, 17106180, -533656048, 67}), + new BitArray(new int[] {4, 1140851008, 8388975, 1108347140, 821280, 21316608, -2144335872, 65}), new BitArray(new int[] {4, 1140850944, 8388975, 1108347140, 821280, 21316608, -2144335872, 65}), new BitArray(new int[] {4, 1140850688, 8388975, 1108347140, 821280, 21316608, -2144335872, 65}), new BitArray(new int[] {5242880, -2147483584, 0, 0, 0, 0, 0, 0}), diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs index 6a55694995..d5f5a8c3b1 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs @@ -183,7 +183,7 @@ out u); void GlobalAttributeSection() { Expect(40); -#line 2817 "VBNET.ATG" +#line 2823 "VBNET.ATG" Location startPos = t.Location; if (la.kind == 65) { lexer.NextToken(); @@ -191,20 +191,20 @@ out u); lexer.NextToken(); } else SynErr(243); -#line 2819 "VBNET.ATG" +#line 2825 "VBNET.ATG" string attributeTarget = t.val != null ? t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture) : null; List attributes = new List(); ASTAttribute attribute; Expect(21); Attribute( -#line 2823 "VBNET.ATG" +#line 2829 "VBNET.ATG" out attribute); -#line 2823 "VBNET.ATG" +#line 2829 "VBNET.ATG" attributes.Add(attribute); while ( -#line 2824 "VBNET.ATG" +#line 2830 "VBNET.ATG" NotFinalComma()) { if (la.kind == 22) { lexer.NextToken(); @@ -216,10 +216,10 @@ NotFinalComma()) { Expect(21); } Attribute( -#line 2824 "VBNET.ATG" +#line 2830 "VBNET.ATG" out attribute); -#line 2824 "VBNET.ATG" +#line 2830 "VBNET.ATG" attributes.Add(attribute); } if (la.kind == 22) { @@ -228,7 +228,7 @@ out attribute); Expect(39); EndOfStmt(); -#line 2829 "VBNET.ATG" +#line 2835 "VBNET.ATG" AttributeSection section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, @@ -354,47 +354,47 @@ out aliasedType); } void Qualident( -#line 3617 "VBNET.ATG" +#line 3623 "VBNET.ATG" out string qualident) { -#line 3619 "VBNET.ATG" +#line 3625 "VBNET.ATG" string name; qualidentBuilder.Length = 0; Identifier(); -#line 3623 "VBNET.ATG" +#line 3629 "VBNET.ATG" qualidentBuilder.Append(t.val); while ( -#line 3624 "VBNET.ATG" +#line 3630 "VBNET.ATG" DotAndIdentOrKw()) { Expect(26); IdentifierOrKeyword( -#line 3624 "VBNET.ATG" +#line 3630 "VBNET.ATG" out name); -#line 3624 "VBNET.ATG" +#line 3630 "VBNET.ATG" qualidentBuilder.Append('.'); qualidentBuilder.Append(name); } -#line 3626 "VBNET.ATG" +#line 3632 "VBNET.ATG" qualident = qualidentBuilder.ToString(); } void TypeName( -#line 2688 "VBNET.ATG" +#line 2694 "VBNET.ATG" out TypeReference typeref) { -#line 2689 "VBNET.ATG" +#line 2695 "VBNET.ATG" ArrayList rank = null; Location startLocation = la.Location; NonArrayTypeName( -#line 2691 "VBNET.ATG" +#line 2697 "VBNET.ATG" out typeref, false); ArrayTypeModifiers( -#line 2692 "VBNET.ATG" +#line 2698 "VBNET.ATG" out rank); -#line 2694 "VBNET.ATG" +#line 2700 "VBNET.ATG" if (typeref != null) { if (rank != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); @@ -429,10 +429,10 @@ out rank); } void AttributeSection( -#line 2895 "VBNET.ATG" +#line 2901 "VBNET.ATG" out AttributeSection section) { -#line 2897 "VBNET.ATG" +#line 2903 "VBNET.ATG" string attributeTarget = ""; List attributes = new List(); ASTAttribute attribute; @@ -440,22 +440,22 @@ out AttributeSection section) { Expect(40); if ( -#line 2903 "VBNET.ATG" +#line 2909 "VBNET.ATG" IsLocalAttrTarget()) { if (la.kind == 119) { lexer.NextToken(); -#line 2904 "VBNET.ATG" +#line 2910 "VBNET.ATG" attributeTarget = "event"; } else if (la.kind == 195) { lexer.NextToken(); -#line 2905 "VBNET.ATG" +#line 2911 "VBNET.ATG" attributeTarget = "return"; } else { Identifier(); -#line 2908 "VBNET.ATG" +#line 2914 "VBNET.ATG" string val = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture); if (val != "field" || val != "method" || val != "module" || val != "param" || @@ -468,20 +468,20 @@ IsLocalAttrTarget()) { Expect(21); } Attribute( -#line 2918 "VBNET.ATG" +#line 2924 "VBNET.ATG" out attribute); -#line 2918 "VBNET.ATG" +#line 2924 "VBNET.ATG" attributes.Add(attribute); while ( -#line 2919 "VBNET.ATG" +#line 2925 "VBNET.ATG" NotFinalComma()) { Expect(22); Attribute( -#line 2919 "VBNET.ATG" +#line 2925 "VBNET.ATG" out attribute); -#line 2919 "VBNET.ATG" +#line 2925 "VBNET.ATG" attributes.Add(attribute); } if (la.kind == 22) { @@ -489,7 +489,7 @@ out attribute); } Expect(39); -#line 2923 "VBNET.ATG" +#line 2929 "VBNET.ATG" section = new AttributeSection { AttributeTarget = attributeTarget, Attributes = attributes, @@ -500,69 +500,69 @@ out attribute); } void TypeModifier( -#line 3702 "VBNET.ATG" +#line 3708 "VBNET.ATG" ModifierList m) { switch (la.kind) { case 188: { lexer.NextToken(); -#line 3703 "VBNET.ATG" +#line 3709 "VBNET.ATG" m.Add(Modifiers.Public, t.Location); break; } case 187: { lexer.NextToken(); -#line 3704 "VBNET.ATG" +#line 3710 "VBNET.ATG" m.Add(Modifiers.Protected, t.Location); break; } case 125: { lexer.NextToken(); -#line 3705 "VBNET.ATG" +#line 3711 "VBNET.ATG" m.Add(Modifiers.Internal, t.Location); break; } case 185: { lexer.NextToken(); -#line 3706 "VBNET.ATG" +#line 3712 "VBNET.ATG" m.Add(Modifiers.Private, t.Location); break; } case 200: { lexer.NextToken(); -#line 3707 "VBNET.ATG" +#line 3713 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); break; } case 199: { lexer.NextToken(); -#line 3708 "VBNET.ATG" +#line 3714 "VBNET.ATG" m.Add(Modifiers.New, t.Location); break; } case 156: { lexer.NextToken(); -#line 3709 "VBNET.ATG" +#line 3715 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 166: { lexer.NextToken(); -#line 3710 "VBNET.ATG" +#line 3716 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 183: { lexer.NextToken(); -#line 3711 "VBNET.ATG" +#line 3717 "VBNET.ATG" m.Add(Modifiers.Partial, t.Location); break; } @@ -1158,10 +1158,10 @@ m, attributes); } void NonArrayTypeName( -#line 2716 "VBNET.ATG" +#line 2722 "VBNET.ATG" out TypeReference typeref, bool canBeUnbound) { -#line 2718 "VBNET.ATG" +#line 2724 "VBNET.ATG" string name; typeref = null; bool isGlobal = false; @@ -1171,36 +1171,36 @@ out TypeReference typeref, bool canBeUnbound) { lexer.NextToken(); Expect(26); -#line 2723 "VBNET.ATG" +#line 2729 "VBNET.ATG" isGlobal = true; } QualIdentAndTypeArguments( -#line 2724 "VBNET.ATG" +#line 2730 "VBNET.ATG" out typeref, canBeUnbound); -#line 2725 "VBNET.ATG" +#line 2731 "VBNET.ATG" typeref.IsGlobal = isGlobal; while (la.kind == 26) { lexer.NextToken(); -#line 2726 "VBNET.ATG" +#line 2732 "VBNET.ATG" TypeReference nestedTypeRef; QualIdentAndTypeArguments( -#line 2727 "VBNET.ATG" +#line 2733 "VBNET.ATG" out nestedTypeRef, canBeUnbound); -#line 2728 "VBNET.ATG" +#line 2734 "VBNET.ATG" typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes); } } else if (la.kind == 168) { lexer.NextToken(); -#line 2731 "VBNET.ATG" +#line 2737 "VBNET.ATG" typeref = new TypeReference("System.Object", true); if (la.kind == 33) { lexer.NextToken(); -#line 2735 "VBNET.ATG" +#line 2741 "VBNET.ATG" List typeArguments = new List(1); if (typeref != null) typeArguments.Add(typeref); typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; @@ -1208,15 +1208,15 @@ out nestedTypeRef, canBeUnbound); } } else if (StartOf(12)) { PrimitiveTypeName( -#line 2741 "VBNET.ATG" +#line 2747 "VBNET.ATG" out name); -#line 2741 "VBNET.ATG" +#line 2747 "VBNET.ATG" typeref = new TypeReference(name, true); if (la.kind == 33) { lexer.NextToken(); -#line 2745 "VBNET.ATG" +#line 2751 "VBNET.ATG" List typeArguments = new List(1); if (typeref != null) typeArguments.Add(typeref); typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true }; @@ -1302,162 +1302,162 @@ TypeDeclaration newType) { } void FormalParameterList( -#line 2933 "VBNET.ATG" +#line 2939 "VBNET.ATG" List parameter) { -#line 2934 "VBNET.ATG" +#line 2940 "VBNET.ATG" ParameterDeclarationExpression p; FormalParameter( -#line 2936 "VBNET.ATG" +#line 2942 "VBNET.ATG" out p); -#line 2936 "VBNET.ATG" +#line 2942 "VBNET.ATG" if (p != null) parameter.Add(p); while (la.kind == 22) { lexer.NextToken(); FormalParameter( -#line 2938 "VBNET.ATG" +#line 2944 "VBNET.ATG" out p); -#line 2938 "VBNET.ATG" +#line 2944 "VBNET.ATG" if (p != null) parameter.Add(p); } } void MemberModifier( -#line 3714 "VBNET.ATG" +#line 3720 "VBNET.ATG" ModifierList m) { switch (la.kind) { case 156: { lexer.NextToken(); -#line 3715 "VBNET.ATG" +#line 3721 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 102: { lexer.NextToken(); -#line 3716 "VBNET.ATG" +#line 3722 "VBNET.ATG" m.Add(Modifiers.Default, t.Location); break; } case 125: { lexer.NextToken(); -#line 3717 "VBNET.ATG" +#line 3723 "VBNET.ATG" m.Add(Modifiers.Internal, t.Location); break; } case 199: { lexer.NextToken(); -#line 3718 "VBNET.ATG" +#line 3724 "VBNET.ATG" m.Add(Modifiers.New, t.Location); break; } case 181: { lexer.NextToken(); -#line 3719 "VBNET.ATG" +#line 3725 "VBNET.ATG" m.Add(Modifiers.Override, t.Location); break; } case 157: { lexer.NextToken(); -#line 3720 "VBNET.ATG" +#line 3726 "VBNET.ATG" m.Add(Modifiers.Abstract, t.Location); break; } case 185: { lexer.NextToken(); -#line 3721 "VBNET.ATG" +#line 3727 "VBNET.ATG" m.Add(Modifiers.Private, t.Location); break; } case 187: { lexer.NextToken(); -#line 3722 "VBNET.ATG" +#line 3728 "VBNET.ATG" m.Add(Modifiers.Protected, t.Location); break; } case 188: { lexer.NextToken(); -#line 3723 "VBNET.ATG" +#line 3729 "VBNET.ATG" m.Add(Modifiers.Public, t.Location); break; } case 166: { lexer.NextToken(); -#line 3724 "VBNET.ATG" +#line 3730 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 167: { lexer.NextToken(); -#line 3725 "VBNET.ATG" +#line 3731 "VBNET.ATG" m.Add(Modifiers.Sealed, t.Location); break; } case 200: { lexer.NextToken(); -#line 3726 "VBNET.ATG" +#line 3732 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); break; } case 180: { lexer.NextToken(); -#line 3727 "VBNET.ATG" +#line 3733 "VBNET.ATG" m.Add(Modifiers.Virtual, t.Location); break; } case 179: { lexer.NextToken(); -#line 3728 "VBNET.ATG" +#line 3734 "VBNET.ATG" m.Add(Modifiers.Overloads, t.Location); break; } case 190: { lexer.NextToken(); -#line 3729 "VBNET.ATG" +#line 3735 "VBNET.ATG" m.Add(Modifiers.ReadOnly, t.Location); break; } case 235: { lexer.NextToken(); -#line 3730 "VBNET.ATG" +#line 3736 "VBNET.ATG" m.Add(Modifiers.WriteOnly, t.Location); break; } case 234: { lexer.NextToken(); -#line 3731 "VBNET.ATG" +#line 3737 "VBNET.ATG" m.Add(Modifiers.WithEvents, t.Location); break; } case 105: { lexer.NextToken(); -#line 3732 "VBNET.ATG" +#line 3738 "VBNET.ATG" m.Add(Modifiers.Dim, t.Location); break; } case 183: { lexer.NextToken(); -#line 3733 "VBNET.ATG" +#line 3739 "VBNET.ATG" m.Add(Modifiers.Partial, t.Location); break; } @@ -2595,28 +2595,28 @@ out name); } void Block( -#line 2981 "VBNET.ATG" +#line 2987 "VBNET.ATG" out Statement stmt) { -#line 2984 "VBNET.ATG" +#line 2990 "VBNET.ATG" BlockStatement blockStmt = new BlockStatement(); /* in snippet parsing mode, t might be null */ if (t != null) blockStmt.StartLocation = t.EndLocation; BlockStart(blockStmt); while (StartOf(22) || -#line 2990 "VBNET.ATG" +#line 2996 "VBNET.ATG" IsEndStmtAhead()) { if ( -#line 2990 "VBNET.ATG" +#line 2996 "VBNET.ATG" IsEndStmtAhead()) { -#line 2991 "VBNET.ATG" +#line 2997 "VBNET.ATG" Token first = la; Expect(113); EndOfStmt(); -#line 2994 "VBNET.ATG" +#line 3000 "VBNET.ATG" AddChild(new EndStatement() { StartLocation = first.Location, EndLocation = first.EndLocation } @@ -2628,7 +2628,7 @@ IsEndStmtAhead()) { } } -#line 3003 "VBNET.ATG" +#line 3009 "VBNET.ATG" stmt = blockStmt; if (t != null) blockStmt.EndLocation = t.EndLocation; BlockEnd(); @@ -3393,10 +3393,10 @@ out OverloadableOperatorType operatorType) { } void FormalParameter( -#line 2942 "VBNET.ATG" +#line 2948 "VBNET.ATG" out ParameterDeclarationExpression p) { -#line 2944 "VBNET.ATG" +#line 2950 "VBNET.ATG" AttributeSection section; List attributes = new List(); TypeReference type = null; @@ -3408,36 +3408,36 @@ out ParameterDeclarationExpression p) { while (la.kind == 40) { AttributeSection( -#line 2954 "VBNET.ATG" +#line 2960 "VBNET.ATG" out section); -#line 2954 "VBNET.ATG" +#line 2960 "VBNET.ATG" attributes.Add(section); } while (StartOf(29)) { ParameterModifier( -#line 2955 "VBNET.ATG" +#line 2961 "VBNET.ATG" mod); } Identifier(); -#line 2956 "VBNET.ATG" +#line 2962 "VBNET.ATG" string parameterName = t.val; if ( -#line 2957 "VBNET.ATG" +#line 2963 "VBNET.ATG" IsDims()) { ArrayTypeModifiers( -#line 2957 "VBNET.ATG" +#line 2963 "VBNET.ATG" out arrayModifiers); } if (la.kind == 63) { lexer.NextToken(); TypeName( -#line 2958 "VBNET.ATG" +#line 2964 "VBNET.ATG" out type); } -#line 2960 "VBNET.ATG" +#line 2966 "VBNET.ATG" if(type != null) { if (arrayModifiers != null) { if (type.RankSpecifier != null) { @@ -3451,11 +3451,11 @@ out type); if (la.kind == 20) { lexer.NextToken(); Expr( -#line 2970 "VBNET.ATG" +#line 2976 "VBNET.ATG" out expr); } -#line 2972 "VBNET.ATG" +#line 2978 "VBNET.ATG" mod.Check(); p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr); p.Attributes = attributes; @@ -3539,31 +3539,31 @@ out stmt); } void PropertyAccessorAccessModifier( -#line 3736 "VBNET.ATG" +#line 3742 "VBNET.ATG" out Modifiers m) { -#line 3737 "VBNET.ATG" +#line 3743 "VBNET.ATG" m = Modifiers.None; while (StartOf(30)) { if (la.kind == 188) { lexer.NextToken(); -#line 3739 "VBNET.ATG" +#line 3745 "VBNET.ATG" m |= Modifiers.Public; } else if (la.kind == 187) { lexer.NextToken(); -#line 3740 "VBNET.ATG" +#line 3746 "VBNET.ATG" m |= Modifiers.Protected; } else if (la.kind == 125) { lexer.NextToken(); -#line 3741 "VBNET.ATG" +#line 3747 "VBNET.ATG" m |= Modifiers.Internal; } else { lexer.NextToken(); -#line 3742 "VBNET.ATG" +#line 3748 "VBNET.ATG" m |= Modifiers.Private; } } @@ -3584,14 +3584,14 @@ out arrayModifiers); } void ArrayNameModifier( -#line 2769 "VBNET.ATG" +#line 2775 "VBNET.ATG" out ArrayList arrayModifiers) { -#line 2771 "VBNET.ATG" +#line 2777 "VBNET.ATG" arrayModifiers = null; ArrayTypeModifiers( -#line 2773 "VBNET.ATG" +#line 2779 "VBNET.ATG" out arrayModifiers); } @@ -3703,33 +3703,33 @@ out eventName); } void IdentifierOrKeyword( -#line 3669 "VBNET.ATG" +#line 3675 "VBNET.ATG" out string name) { lexer.NextToken(); -#line 3671 "VBNET.ATG" +#line 3677 "VBNET.ATG" name = t.val; } void QueryExpr( -#line 2290 "VBNET.ATG" +#line 2296 "VBNET.ATG" out Expression expr) { -#line 2292 "VBNET.ATG" +#line 2298 "VBNET.ATG" QueryExpressionVB qexpr = new QueryExpressionVB(); qexpr.StartLocation = la.Location; expr = qexpr; FromOrAggregateQueryOperator( -#line 2296 "VBNET.ATG" +#line 2302 "VBNET.ATG" qexpr.Clauses); while (StartOf(31)) { QueryOperator( -#line 2297 "VBNET.ATG" +#line 2303 "VBNET.ATG" qexpr.Clauses); } -#line 2299 "VBNET.ATG" +#line 2305 "VBNET.ATG" qexpr.EndLocation = t.EndLocation; } @@ -4324,25 +4324,25 @@ out name); } void TypeArgumentList( -#line 2805 "VBNET.ATG" +#line 2811 "VBNET.ATG" List typeArguments) { -#line 2807 "VBNET.ATG" +#line 2813 "VBNET.ATG" TypeReference typeref; TypeName( -#line 2809 "VBNET.ATG" +#line 2815 "VBNET.ATG" out typeref); -#line 2809 "VBNET.ATG" +#line 2815 "VBNET.ATG" if (typeref != null) typeArguments.Add(typeref); while (la.kind == 22) { lexer.NextToken(); TypeName( -#line 2812 "VBNET.ATG" +#line 2818 "VBNET.ATG" out typeref); -#line 2812 "VBNET.ATG" +#line 2818 "VBNET.ATG" if (typeref != null) typeArguments.Add(typeref); } } @@ -4371,114 +4371,114 @@ out parameters); } void PrimitiveTypeName( -#line 3676 "VBNET.ATG" +#line 3682 "VBNET.ATG" out string type) { -#line 3677 "VBNET.ATG" +#line 3683 "VBNET.ATG" type = String.Empty; switch (la.kind) { case 68: { lexer.NextToken(); -#line 3678 "VBNET.ATG" +#line 3684 "VBNET.ATG" type = "System.Boolean"; break; } case 99: { lexer.NextToken(); -#line 3679 "VBNET.ATG" +#line 3685 "VBNET.ATG" type = "System.DateTime"; break; } case 82: { lexer.NextToken(); -#line 3680 "VBNET.ATG" +#line 3686 "VBNET.ATG" type = "System.Char"; break; } case 208: { lexer.NextToken(); -#line 3681 "VBNET.ATG" +#line 3687 "VBNET.ATG" type = "System.String"; break; } case 100: { lexer.NextToken(); -#line 3682 "VBNET.ATG" +#line 3688 "VBNET.ATG" type = "System.Decimal"; break; } case 71: { lexer.NextToken(); -#line 3683 "VBNET.ATG" +#line 3689 "VBNET.ATG" type = "System.Byte"; break; } case 201: { lexer.NextToken(); -#line 3684 "VBNET.ATG" +#line 3690 "VBNET.ATG" type = "System.Int16"; break; } case 141: { lexer.NextToken(); -#line 3685 "VBNET.ATG" +#line 3691 "VBNET.ATG" type = "System.Int32"; break; } case 151: { lexer.NextToken(); -#line 3686 "VBNET.ATG" +#line 3692 "VBNET.ATG" type = "System.Int64"; break; } case 202: { lexer.NextToken(); -#line 3687 "VBNET.ATG" +#line 3693 "VBNET.ATG" type = "System.Single"; break; } case 109: { lexer.NextToken(); -#line 3688 "VBNET.ATG" +#line 3694 "VBNET.ATG" type = "System.Double"; break; } case 221: { lexer.NextToken(); -#line 3689 "VBNET.ATG" +#line 3695 "VBNET.ATG" type = "System.UInt32"; break; } case 222: { lexer.NextToken(); -#line 3690 "VBNET.ATG" +#line 3696 "VBNET.ATG" type = "System.UInt64"; break; } case 225: { lexer.NextToken(); -#line 3691 "VBNET.ATG" +#line 3697 "VBNET.ATG" type = "System.UInt16"; break; } case 196: { lexer.NextToken(); -#line 3692 "VBNET.ATG" +#line 3698 "VBNET.ATG" type = "System.SByte"; break; } @@ -4611,19 +4611,19 @@ out TypeReference type) { } void GetTypeTypeName( -#line 2704 "VBNET.ATG" +#line 2710 "VBNET.ATG" out TypeReference typeref) { -#line 2705 "VBNET.ATG" +#line 2711 "VBNET.ATG" ArrayList rank = null; NonArrayTypeName( -#line 2707 "VBNET.ATG" +#line 2713 "VBNET.ATG" out typeref, true); ArrayTypeModifiers( -#line 2708 "VBNET.ATG" +#line 2714 "VBNET.ATG" out rank); -#line 2709 "VBNET.ATG" +#line 2715 "VBNET.ATG" if (rank != null && typeref != null) { typeref.RankSpecifier = (int[])rank.ToArray(typeof(int)); } @@ -4948,34 +4948,34 @@ out innerExpression); } void ArgumentList( -#line 2633 "VBNET.ATG" +#line 2639 "VBNET.ATG" out List arguments) { -#line 2635 "VBNET.ATG" +#line 2641 "VBNET.ATG" arguments = new List(); Expression expr = null; if (StartOf(24)) { Argument( -#line 2638 "VBNET.ATG" +#line 2644 "VBNET.ATG" out expr); } while (la.kind == 22) { lexer.NextToken(); -#line 2639 "VBNET.ATG" +#line 2645 "VBNET.ATG" arguments.Add(expr ?? Expression.Null); expr = null; if (StartOf(24)) { Argument( -#line 2640 "VBNET.ATG" +#line 2646 "VBNET.ATG" out expr); } -#line 2641 "VBNET.ATG" +#line 2647 "VBNET.ATG" if (expr == null) expr = Expression.Null; } -#line 2643 "VBNET.ATG" +#line 2649 "VBNET.ATG" if (expr != null) arguments.Add(expr); } @@ -5355,87 +5355,87 @@ out expr); } void NormalOrReDimArgumentList( -#line 2647 "VBNET.ATG" +#line 2653 "VBNET.ATG" out List arguments, out bool canBeNormal, out bool canBeRedim) { -#line 2649 "VBNET.ATG" +#line 2655 "VBNET.ATG" arguments = new List(); canBeNormal = true; canBeRedim = !IsNamedAssign(); Expression expr = null; if (StartOf(24)) { Argument( -#line 2654 "VBNET.ATG" +#line 2660 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); -#line 2655 "VBNET.ATG" +#line 2661 "VBNET.ATG" EnsureIsZero(expr); canBeNormal = false; Expr( -#line 2656 "VBNET.ATG" +#line 2662 "VBNET.ATG" out expr); } } while (la.kind == 22) { lexer.NextToken(); -#line 2659 "VBNET.ATG" +#line 2665 "VBNET.ATG" if (expr == null) canBeRedim = false; -#line 2660 "VBNET.ATG" +#line 2666 "VBNET.ATG" arguments.Add(expr ?? Expression.Null); expr = null; -#line 2661 "VBNET.ATG" +#line 2667 "VBNET.ATG" canBeRedim &= !IsNamedAssign(); if (StartOf(24)) { Argument( -#line 2662 "VBNET.ATG" +#line 2668 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); -#line 2663 "VBNET.ATG" +#line 2669 "VBNET.ATG" EnsureIsZero(expr); canBeNormal = false; Expr( -#line 2664 "VBNET.ATG" +#line 2670 "VBNET.ATG" out expr); } } -#line 2666 "VBNET.ATG" +#line 2672 "VBNET.ATG" if (expr == null) { canBeRedim = false; expr = Expression.Null; } } -#line 2668 "VBNET.ATG" +#line 2674 "VBNET.ATG" if (expr != null) arguments.Add(expr); else canBeRedim = false; } void ArrayTypeModifiers( -#line 2778 "VBNET.ATG" +#line 2784 "VBNET.ATG" out ArrayList arrayModifiers) { -#line 2780 "VBNET.ATG" +#line 2786 "VBNET.ATG" arrayModifiers = new ArrayList(); int i = 0; while ( -#line 2783 "VBNET.ATG" +#line 2789 "VBNET.ATG" IsDims()) { Expect(37); if (la.kind == 22 || la.kind == 38) { RankList( -#line 2785 "VBNET.ATG" +#line 2791 "VBNET.ATG" out i); } -#line 2787 "VBNET.ATG" +#line 2793 "VBNET.ATG" arrayModifiers.Add(i); Expect(38); } -#line 2792 "VBNET.ATG" +#line 2798 "VBNET.ATG" if(arrayModifiers.Count == 0) { arrayModifiers = null; } @@ -5443,10 +5443,10 @@ out i); } void MemberInitializer( -#line 2614 "VBNET.ATG" +#line 2620 "VBNET.ATG" out MemberInitializerExpression memberInitializer) { -#line 2616 "VBNET.ATG" +#line 2622 "VBNET.ATG" memberInitializer = new MemberInitializerExpression(); memberInitializer.StartLocation = la.Location; Expression initExpr = null; @@ -5456,19 +5456,19 @@ out MemberInitializerExpression memberInitializer) { if (la.kind == 147) { lexer.NextToken(); -#line 2622 "VBNET.ATG" +#line 2628 "VBNET.ATG" isKey = true; } Expect(26); IdentifierOrKeyword( -#line 2623 "VBNET.ATG" +#line 2629 "VBNET.ATG" out name); Expect(20); Expr( -#line 2623 "VBNET.ATG" +#line 2629 "VBNET.ATG" out initExpr); -#line 2625 "VBNET.ATG" +#line 2631 "VBNET.ATG" memberInitializer.Name = name; memberInitializer.Expression = initExpr; memberInitializer.IsKey = isKey; @@ -5506,37 +5506,40 @@ out inner); #line 2233 "VBNET.ATG" lambda.ExpressionBody = inner; lambda.EndLocation = t.EndLocation; // la.Location? + lambda.ExtendedEndLocation = la.Location; } else { EmbeddedStatement( -#line 2237 "VBNET.ATG" +#line 2238 "VBNET.ATG" out statement); -#line 2239 "VBNET.ATG" +#line 2240 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; } } else if (la.kind == 1) { lexer.NextToken(); Block( -#line 2245 "VBNET.ATG" +#line 2247 "VBNET.ATG" out statement); Expect(113); Expect(210); -#line 2248 "VBNET.ATG" +#line 2250 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; } else SynErr(296); } void FunctionLambdaExpression( -#line 2254 "VBNET.ATG" +#line 2257 "VBNET.ATG" out LambdaExpression lambda) { -#line 2256 "VBNET.ATG" +#line 2259 "VBNET.ATG" lambda = new LambdaExpression(); TypeReference typeRef = null; Expression inner = null; @@ -5548,7 +5551,7 @@ out LambdaExpression lambda) { lexer.NextToken(); if (StartOf(6)) { FormalParameterList( -#line 2263 "VBNET.ATG" +#line 2266 "VBNET.ATG" lambda.Parameters); } Expect(38); @@ -5556,52 +5559,55 @@ lambda.Parameters); if (la.kind == 63) { lexer.NextToken(); TypeName( -#line 2264 "VBNET.ATG" +#line 2267 "VBNET.ATG" out typeRef); -#line 2264 "VBNET.ATG" +#line 2267 "VBNET.ATG" lambda.ReturnType = typeRef; } if (StartOf(42)) { if (StartOf(24)) { Expr( -#line 2267 "VBNET.ATG" +#line 2270 "VBNET.ATG" out inner); -#line 2269 "VBNET.ATG" +#line 2272 "VBNET.ATG" lambda.ExpressionBody = inner; - lambda.EndLocation = t.EndLocation; // la.Location? + lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; } else { EmbeddedStatement( -#line 2273 "VBNET.ATG" +#line 2277 "VBNET.ATG" out statement); -#line 2275 "VBNET.ATG" +#line 2279 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; } } else if (la.kind == 1) { lexer.NextToken(); Block( -#line 2281 "VBNET.ATG" +#line 2286 "VBNET.ATG" out statement); Expect(113); Expect(127); -#line 2284 "VBNET.ATG" +#line 2289 "VBNET.ATG" lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; } else SynErr(297); } void EmbeddedStatement( -#line 3064 "VBNET.ATG" +#line 3070 "VBNET.ATG" out Statement statement) { -#line 3066 "VBNET.ATG" +#line 3072 "VBNET.ATG" Statement embeddedStatement = null; statement = null; Expression expr = null; @@ -5612,224 +5618,224 @@ out Statement statement) { if (la.kind == 120) { lexer.NextToken(); -#line 3074 "VBNET.ATG" +#line 3080 "VBNET.ATG" ExitType exitType = ExitType.None; switch (la.kind) { case 210: { lexer.NextToken(); -#line 3076 "VBNET.ATG" +#line 3082 "VBNET.ATG" exitType = ExitType.Sub; break; } case 127: { lexer.NextToken(); -#line 3078 "VBNET.ATG" +#line 3084 "VBNET.ATG" exitType = ExitType.Function; break; } case 186: { lexer.NextToken(); -#line 3080 "VBNET.ATG" +#line 3086 "VBNET.ATG" exitType = ExitType.Property; break; } case 108: { lexer.NextToken(); -#line 3082 "VBNET.ATG" +#line 3088 "VBNET.ATG" exitType = ExitType.Do; break; } case 124: { lexer.NextToken(); -#line 3084 "VBNET.ATG" +#line 3090 "VBNET.ATG" exitType = ExitType.For; break; } case 218: { lexer.NextToken(); -#line 3086 "VBNET.ATG" +#line 3092 "VBNET.ATG" exitType = ExitType.Try; break; } case 231: { lexer.NextToken(); -#line 3088 "VBNET.ATG" +#line 3094 "VBNET.ATG" exitType = ExitType.While; break; } case 197: { lexer.NextToken(); -#line 3090 "VBNET.ATG" +#line 3096 "VBNET.ATG" exitType = ExitType.Select; break; } default: SynErr(298); break; } -#line 3092 "VBNET.ATG" +#line 3098 "VBNET.ATG" statement = new ExitStatement(exitType); } else if (la.kind == 218) { TryStatement( -#line 3093 "VBNET.ATG" +#line 3099 "VBNET.ATG" out statement); } else if (la.kind == 89) { lexer.NextToken(); -#line 3094 "VBNET.ATG" +#line 3100 "VBNET.ATG" ContinueType continueType = ContinueType.None; if (la.kind == 108 || la.kind == 124 || la.kind == 231) { if (la.kind == 108) { lexer.NextToken(); -#line 3094 "VBNET.ATG" +#line 3100 "VBNET.ATG" continueType = ContinueType.Do; } else if (la.kind == 124) { lexer.NextToken(); -#line 3094 "VBNET.ATG" +#line 3100 "VBNET.ATG" continueType = ContinueType.For; } else { lexer.NextToken(); -#line 3094 "VBNET.ATG" +#line 3100 "VBNET.ATG" continueType = ContinueType.While; } } -#line 3094 "VBNET.ATG" +#line 3100 "VBNET.ATG" statement = new ContinueStatement(continueType); } else if (la.kind == 215) { lexer.NextToken(); if (StartOf(24)) { Expr( -#line 3096 "VBNET.ATG" +#line 3102 "VBNET.ATG" out expr); } -#line 3096 "VBNET.ATG" +#line 3102 "VBNET.ATG" statement = new ThrowStatement(expr); } else if (la.kind == 195) { lexer.NextToken(); if (StartOf(24)) { Expr( -#line 3098 "VBNET.ATG" +#line 3104 "VBNET.ATG" out expr); } -#line 3098 "VBNET.ATG" +#line 3104 "VBNET.ATG" statement = new ReturnStatement(expr); } else if (la.kind == 211) { lexer.NextToken(); Expr( -#line 3100 "VBNET.ATG" +#line 3106 "VBNET.ATG" out expr); EndOfStmt(); Block( -#line 3100 "VBNET.ATG" +#line 3106 "VBNET.ATG" out embeddedStatement); Expect(113); Expect(211); -#line 3101 "VBNET.ATG" +#line 3107 "VBNET.ATG" statement = new LockStatement(expr, embeddedStatement); } else if (la.kind == 189) { lexer.NextToken(); Identifier(); -#line 3103 "VBNET.ATG" +#line 3109 "VBNET.ATG" name = t.val; if (la.kind == 37) { lexer.NextToken(); if (StartOf(43)) { ArgumentList( -#line 3104 "VBNET.ATG" +#line 3110 "VBNET.ATG" out p); } Expect(38); } -#line 3106 "VBNET.ATG" +#line 3112 "VBNET.ATG" statement = new RaiseEventStatement(name, p); } else if (la.kind == 233) { WithStatement( -#line 3109 "VBNET.ATG" +#line 3115 "VBNET.ATG" out statement); } else if (la.kind == 56) { lexer.NextToken(); -#line 3111 "VBNET.ATG" +#line 3117 "VBNET.ATG" Expression handlerExpr = null; Expr( -#line 3112 "VBNET.ATG" +#line 3118 "VBNET.ATG" out expr); Expect(22); Expr( -#line 3112 "VBNET.ATG" +#line 3118 "VBNET.ATG" out handlerExpr); -#line 3114 "VBNET.ATG" +#line 3120 "VBNET.ATG" statement = new AddHandlerStatement(expr, handlerExpr); } else if (la.kind == 193) { lexer.NextToken(); -#line 3117 "VBNET.ATG" +#line 3123 "VBNET.ATG" Expression handlerExpr = null; Expr( -#line 3118 "VBNET.ATG" +#line 3124 "VBNET.ATG" out expr); Expect(22); Expr( -#line 3118 "VBNET.ATG" +#line 3124 "VBNET.ATG" out handlerExpr); -#line 3120 "VBNET.ATG" +#line 3126 "VBNET.ATG" statement = new RemoveHandlerStatement(expr, handlerExpr); } else if (la.kind == 231) { lexer.NextToken(); Expr( -#line 3123 "VBNET.ATG" +#line 3129 "VBNET.ATG" out expr); EndOfStmt(); Block( -#line 3124 "VBNET.ATG" +#line 3130 "VBNET.ATG" out embeddedStatement); Expect(113); Expect(231); -#line 3126 "VBNET.ATG" +#line 3132 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start); } else if (la.kind == 108) { lexer.NextToken(); -#line 3131 "VBNET.ATG" +#line 3137 "VBNET.ATG" ConditionType conditionType = ConditionType.None; if (la.kind == 224 || la.kind == 231) { WhileOrUntil( -#line 3134 "VBNET.ATG" +#line 3140 "VBNET.ATG" out conditionType); Expr( -#line 3134 "VBNET.ATG" +#line 3140 "VBNET.ATG" out expr); EndOfStmt(); Block( -#line 3135 "VBNET.ATG" +#line 3141 "VBNET.ATG" out embeddedStatement); Expect(152); -#line 3138 "VBNET.ATG" +#line 3144 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType == ConditionType.While ? ConditionType.DoWhile : conditionType, @@ -5838,26 +5844,26 @@ out embeddedStatement); } else if (la.kind == 1 || la.kind == 21) { EndOfStmt(); Block( -#line 3145 "VBNET.ATG" +#line 3151 "VBNET.ATG" out embeddedStatement); Expect(152); if (la.kind == 224 || la.kind == 231) { WhileOrUntil( -#line 3146 "VBNET.ATG" +#line 3152 "VBNET.ATG" out conditionType); Expr( -#line 3146 "VBNET.ATG" +#line 3152 "VBNET.ATG" out expr); } -#line 3148 "VBNET.ATG" +#line 3154 "VBNET.ATG" statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End); } else SynErr(299); } else if (la.kind == 124) { lexer.NextToken(); -#line 3153 "VBNET.ATG" +#line 3159 "VBNET.ATG" Expression group = null; TypeReference typeReference; string typeName; @@ -5865,24 +5871,24 @@ out expr); if (la.kind == 110) { lexer.NextToken(); LoopControlVariable( -#line 3159 "VBNET.ATG" +#line 3165 "VBNET.ATG" out typeReference, out typeName); Expect(138); Expr( -#line 3160 "VBNET.ATG" +#line 3166 "VBNET.ATG" out group); EndOfStmt(); Block( -#line 3161 "VBNET.ATG" +#line 3167 "VBNET.ATG" out embeddedStatement); Expect(163); if (StartOf(24)) { Expr( -#line 3162 "VBNET.ATG" +#line 3168 "VBNET.ATG" out expr); } -#line 3164 "VBNET.ATG" +#line 3170 "VBNET.ATG" statement = new ForeachStatement(typeReference, typeName, group, @@ -5894,7 +5900,7 @@ out expr); } else if (StartOf(44)) { -#line 3175 "VBNET.ATG" +#line 3181 "VBNET.ATG" Expression start = null; Expression end = null; Expression step = null; @@ -5903,59 +5909,59 @@ out expr); List nextExpressions = null; if ( -#line 3182 "VBNET.ATG" +#line 3188 "VBNET.ATG" IsLoopVariableDeclaration()) { LoopControlVariable( -#line 3183 "VBNET.ATG" +#line 3189 "VBNET.ATG" out typeReference, out typeName); } else { -#line 3185 "VBNET.ATG" +#line 3191 "VBNET.ATG" typeReference = null; typeName = null; SimpleExpr( -#line 3186 "VBNET.ATG" +#line 3192 "VBNET.ATG" out variableExpr); } Expect(20); Expr( -#line 3188 "VBNET.ATG" +#line 3194 "VBNET.ATG" out start); Expect(216); Expr( -#line 3188 "VBNET.ATG" +#line 3194 "VBNET.ATG" out end); if (la.kind == 205) { lexer.NextToken(); Expr( -#line 3188 "VBNET.ATG" +#line 3194 "VBNET.ATG" out step); } EndOfStmt(); Block( -#line 3189 "VBNET.ATG" +#line 3195 "VBNET.ATG" out embeddedStatement); Expect(163); if (StartOf(24)) { Expr( -#line 3192 "VBNET.ATG" +#line 3198 "VBNET.ATG" out nextExpr); -#line 3194 "VBNET.ATG" +#line 3200 "VBNET.ATG" nextExpressions = new List(); nextExpressions.Add(nextExpr); while (la.kind == 22) { lexer.NextToken(); Expr( -#line 3197 "VBNET.ATG" +#line 3203 "VBNET.ATG" out nextExpr); -#line 3197 "VBNET.ATG" +#line 3203 "VBNET.ATG" nextExpressions.Add(nextExpr); } } -#line 3200 "VBNET.ATG" +#line 3206 "VBNET.ATG" statement = new ForNextStatement { TypeReference = typeReference, VariableName = typeName, @@ -5971,27 +5977,27 @@ out nextExpr); } else if (la.kind == 118) { lexer.NextToken(); Expr( -#line 3213 "VBNET.ATG" +#line 3219 "VBNET.ATG" out expr); -#line 3213 "VBNET.ATG" +#line 3219 "VBNET.ATG" statement = new ErrorStatement(expr); } else if (la.kind == 191) { lexer.NextToken(); -#line 3215 "VBNET.ATG" +#line 3221 "VBNET.ATG" bool isPreserve = false; if (la.kind == 184) { lexer.NextToken(); -#line 3215 "VBNET.ATG" +#line 3221 "VBNET.ATG" isPreserve = true; } ReDimClause( -#line 3216 "VBNET.ATG" +#line 3222 "VBNET.ATG" out expr); -#line 3218 "VBNET.ATG" +#line 3224 "VBNET.ATG" ReDimStatement reDimStatement = new ReDimStatement(isPreserve); statement = reDimStatement; SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); @@ -5999,48 +6005,48 @@ out expr); while (la.kind == 22) { lexer.NextToken(); ReDimClause( -#line 3222 "VBNET.ATG" +#line 3228 "VBNET.ATG" out expr); -#line 3223 "VBNET.ATG" +#line 3229 "VBNET.ATG" SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression); } } else if (la.kind == 117) { lexer.NextToken(); Expr( -#line 3227 "VBNET.ATG" +#line 3233 "VBNET.ATG" out expr); -#line 3229 "VBNET.ATG" +#line 3235 "VBNET.ATG" EraseStatement eraseStatement = new EraseStatement(); if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr);} while (la.kind == 22) { lexer.NextToken(); Expr( -#line 3232 "VBNET.ATG" +#line 3238 "VBNET.ATG" out expr); -#line 3232 "VBNET.ATG" +#line 3238 "VBNET.ATG" if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr); } } -#line 3233 "VBNET.ATG" +#line 3239 "VBNET.ATG" statement = eraseStatement; } else if (la.kind == 206) { lexer.NextToken(); -#line 3235 "VBNET.ATG" +#line 3241 "VBNET.ATG" statement = new StopStatement(); } else if ( -#line 3237 "VBNET.ATG" +#line 3243 "VBNET.ATG" la.kind == Tokens.If) { Expect(135); -#line 3238 "VBNET.ATG" +#line 3244 "VBNET.ATG" Location ifStartLocation = t.Location; Expr( -#line 3238 "VBNET.ATG" +#line 3244 "VBNET.ATG" out expr); if (la.kind == 214) { lexer.NextToken(); @@ -6048,46 +6054,46 @@ out expr); if (la.kind == 1 || la.kind == 21) { EndOfStmt(); Block( -#line 3241 "VBNET.ATG" +#line 3247 "VBNET.ATG" out embeddedStatement); -#line 3243 "VBNET.ATG" +#line 3249 "VBNET.ATG" IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement); ifStatement.StartLocation = ifStartLocation; Location elseIfStart; while (la.kind == 112 || -#line 3249 "VBNET.ATG" +#line 3255 "VBNET.ATG" IsElseIf()) { if ( -#line 3249 "VBNET.ATG" +#line 3255 "VBNET.ATG" IsElseIf()) { Expect(111); -#line 3249 "VBNET.ATG" +#line 3255 "VBNET.ATG" elseIfStart = t.Location; Expect(135); } else { lexer.NextToken(); -#line 3250 "VBNET.ATG" +#line 3256 "VBNET.ATG" elseIfStart = t.Location; } -#line 3252 "VBNET.ATG" +#line 3258 "VBNET.ATG" Expression condition = null; Statement block = null; Expr( -#line 3253 "VBNET.ATG" +#line 3259 "VBNET.ATG" out condition); if (la.kind == 214) { lexer.NextToken(); } EndOfStmt(); Block( -#line 3254 "VBNET.ATG" +#line 3260 "VBNET.ATG" out block); -#line 3256 "VBNET.ATG" +#line 3262 "VBNET.ATG" ElseIfSection elseIfSection = new ElseIfSection(condition, block); elseIfSection.StartLocation = elseIfStart; elseIfSection.EndLocation = t.Location; @@ -6101,39 +6107,39 @@ out block); EndOfStmt(); } Block( -#line 3265 "VBNET.ATG" +#line 3271 "VBNET.ATG" out embeddedStatement); -#line 3267 "VBNET.ATG" +#line 3273 "VBNET.ATG" ifStatement.FalseStatement.Add(embeddedStatement); } Expect(113); Expect(135); -#line 3271 "VBNET.ATG" +#line 3277 "VBNET.ATG" ifStatement.EndLocation = t.Location; statement = ifStatement; } else if (StartOf(45)) { -#line 3276 "VBNET.ATG" +#line 3282 "VBNET.ATG" IfElseStatement ifStatement = new IfElseStatement(expr); ifStatement.StartLocation = ifStartLocation; SingleLineStatementList( -#line 3279 "VBNET.ATG" +#line 3285 "VBNET.ATG" ifStatement.TrueStatement); if (la.kind == 111) { lexer.NextToken(); if (StartOf(45)) { SingleLineStatementList( -#line 3282 "VBNET.ATG" +#line 3288 "VBNET.ATG" ifStatement.FalseStatement); } } -#line 3284 "VBNET.ATG" +#line 3290 "VBNET.ATG" ifStatement.EndLocation = t.Location; statement = ifStatement; } else SynErr(301); } else if (la.kind == 197) { @@ -6142,82 +6148,82 @@ ifStatement.FalseStatement); lexer.NextToken(); } Expr( -#line 3287 "VBNET.ATG" +#line 3293 "VBNET.ATG" out expr); EndOfStmt(); -#line 3288 "VBNET.ATG" +#line 3294 "VBNET.ATG" List selectSections = new List(); Statement block = null; while (la.kind == 74) { -#line 3292 "VBNET.ATG" +#line 3298 "VBNET.ATG" List caseClauses = null; Location caseLocation = la.Location; lexer.NextToken(); CaseClauses( -#line 3293 "VBNET.ATG" +#line 3299 "VBNET.ATG" out caseClauses); if ( -#line 3293 "VBNET.ATG" +#line 3299 "VBNET.ATG" IsNotStatementSeparator()) { lexer.NextToken(); } EndOfStmt(); -#line 3295 "VBNET.ATG" +#line 3301 "VBNET.ATG" SwitchSection selectSection = new SwitchSection(caseClauses); selectSection.StartLocation = caseLocation; Block( -#line 3298 "VBNET.ATG" +#line 3304 "VBNET.ATG" out block); -#line 3300 "VBNET.ATG" +#line 3306 "VBNET.ATG" selectSection.Children = block.Children; selectSection.EndLocation = t.EndLocation; selectSections.Add(selectSection); } -#line 3306 "VBNET.ATG" +#line 3312 "VBNET.ATG" statement = new SwitchStatement(expr, selectSections); Expect(113); Expect(197); } else if (la.kind == 171) { -#line 3309 "VBNET.ATG" +#line 3315 "VBNET.ATG" OnErrorStatement onErrorStatement = null; OnErrorStatement( -#line 3310 "VBNET.ATG" +#line 3316 "VBNET.ATG" out onErrorStatement); -#line 3310 "VBNET.ATG" +#line 3316 "VBNET.ATG" statement = onErrorStatement; } else if (la.kind == 132) { -#line 3311 "VBNET.ATG" +#line 3317 "VBNET.ATG" GotoStatement goToStatement = null; GotoStatement( -#line 3312 "VBNET.ATG" +#line 3318 "VBNET.ATG" out goToStatement); -#line 3312 "VBNET.ATG" +#line 3318 "VBNET.ATG" statement = goToStatement; } else if (la.kind == 194) { -#line 3313 "VBNET.ATG" +#line 3319 "VBNET.ATG" ResumeStatement resumeStatement = null; ResumeStatement( -#line 3314 "VBNET.ATG" +#line 3320 "VBNET.ATG" out resumeStatement); -#line 3314 "VBNET.ATG" +#line 3320 "VBNET.ATG" statement = resumeStatement; } else if (StartOf(44)) { -#line 3317 "VBNET.ATG" +#line 3323 "VBNET.ATG" Expression val = null; AssignmentOperatorType op; Location startLoc = la.Location; @@ -6226,28 +6232,28 @@ out resumeStatement); la.kind == Tokens.Not || la.kind == Tokens.Times; SimpleExpr( -#line 3324 "VBNET.ATG" +#line 3330 "VBNET.ATG" out expr); if (StartOf(46)) { AssignmentOperator( -#line 3326 "VBNET.ATG" +#line 3332 "VBNET.ATG" out op); Expr( -#line 3326 "VBNET.ATG" +#line 3332 "VBNET.ATG" out val); -#line 3328 "VBNET.ATG" +#line 3334 "VBNET.ATG" expr = new AssignmentExpression(expr, op, val); expr.StartLocation = startLoc; expr.EndLocation = t.EndLocation; } else if (StartOf(47)) { -#line 3332 "VBNET.ATG" +#line 3338 "VBNET.ATG" if (mustBeAssignment) Error("error in assignment."); } else SynErr(302); -#line 3335 "VBNET.ATG" +#line 3341 "VBNET.ATG" // a field reference expression that stands alone is a // invocation expression without parantheses and arguments if(expr is MemberReferenceExpression || expr is IdentifierExpression) { @@ -6261,58 +6267,58 @@ out val); } else if (la.kind == 73) { lexer.NextToken(); SimpleExpr( -#line 3345 "VBNET.ATG" +#line 3351 "VBNET.ATG" out expr); -#line 3345 "VBNET.ATG" +#line 3351 "VBNET.ATG" statement = new ExpressionStatement(expr); } else if (la.kind == 226) { lexer.NextToken(); -#line 3347 "VBNET.ATG" +#line 3353 "VBNET.ATG" Statement block; if ( -#line 3348 "VBNET.ATG" +#line 3354 "VBNET.ATG" Peek(1).kind == Tokens.As) { -#line 3349 "VBNET.ATG" +#line 3355 "VBNET.ATG" LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); VariableDeclarator( -#line 3350 "VBNET.ATG" +#line 3356 "VBNET.ATG" resourceAquisition.Variables); while (la.kind == 22) { lexer.NextToken(); VariableDeclarator( -#line 3352 "VBNET.ATG" +#line 3358 "VBNET.ATG" resourceAquisition.Variables); } Block( -#line 3354 "VBNET.ATG" +#line 3360 "VBNET.ATG" out block); -#line 3356 "VBNET.ATG" +#line 3362 "VBNET.ATG" statement = new UsingStatement(resourceAquisition, block); } else if (StartOf(24)) { Expr( -#line 3358 "VBNET.ATG" +#line 3364 "VBNET.ATG" out expr); Block( -#line 3359 "VBNET.ATG" +#line 3365 "VBNET.ATG" out block); -#line 3360 "VBNET.ATG" +#line 3366 "VBNET.ATG" statement = new UsingStatement(new ExpressionStatement(expr), block); } else SynErr(303); Expect(113); Expect(226); } else if (StartOf(48)) { LocalDeclarationStatement( -#line 3363 "VBNET.ATG" +#line 3369 "VBNET.ATG" out statement); } else SynErr(304); -#line 3366 "VBNET.ATG" +#line 3372 "VBNET.ATG" if (statement != null) { statement.StartLocation = startLocation; statement.EndLocation = t.EndLocation; @@ -6321,35 +6327,35 @@ out statement); } void FromOrAggregateQueryOperator( -#line 2303 "VBNET.ATG" +#line 2309 "VBNET.ATG" List middleClauses) { -#line 2305 "VBNET.ATG" +#line 2311 "VBNET.ATG" QueryExpressionFromClause fromClause = null; QueryExpressionAggregateClause aggregateClause = null; if (la.kind == 126) { FromQueryOperator( -#line 2308 "VBNET.ATG" +#line 2314 "VBNET.ATG" out fromClause); -#line 2309 "VBNET.ATG" +#line 2315 "VBNET.ATG" middleClauses.Add(fromClause); } else if (la.kind == 58) { AggregateQueryOperator( -#line 2310 "VBNET.ATG" +#line 2316 "VBNET.ATG" out aggregateClause); -#line 2311 "VBNET.ATG" +#line 2317 "VBNET.ATG" middleClauses.Add(aggregateClause); } else SynErr(305); } void QueryOperator( -#line 2314 "VBNET.ATG" +#line 2320 "VBNET.ATG" List middleClauses) { -#line 2316 "VBNET.ATG" +#line 2322 "VBNET.ATG" QueryExpressionJoinVBClause joinClause = null; QueryExpressionGroupVBClause groupByClause = null; QueryExpressionPartitionVBClause partitionClause = null; @@ -6359,94 +6365,94 @@ List middleClauses) { if (la.kind == 126) { FromQueryOperator( -#line 2323 "VBNET.ATG" +#line 2329 "VBNET.ATG" out fromClause); -#line 2324 "VBNET.ATG" +#line 2330 "VBNET.ATG" middleClauses.Add(fromClause); } else if (la.kind == 58) { AggregateQueryOperator( -#line 2325 "VBNET.ATG" +#line 2331 "VBNET.ATG" out aggregateClause); -#line 2326 "VBNET.ATG" +#line 2332 "VBNET.ATG" middleClauses.Add(aggregateClause); } else if (la.kind == 197) { SelectQueryOperator( -#line 2327 "VBNET.ATG" +#line 2333 "VBNET.ATG" middleClauses); } else if (la.kind == 107) { DistinctQueryOperator( -#line 2328 "VBNET.ATG" +#line 2334 "VBNET.ATG" middleClauses); } else if (la.kind == 230) { WhereQueryOperator( -#line 2329 "VBNET.ATG" +#line 2335 "VBNET.ATG" middleClauses); } else if (la.kind == 176) { OrderByQueryOperator( -#line 2330 "VBNET.ATG" +#line 2336 "VBNET.ATG" middleClauses); } else if (la.kind == 203 || la.kind == 212) { PartitionQueryOperator( -#line 2331 "VBNET.ATG" +#line 2337 "VBNET.ATG" out partitionClause); -#line 2332 "VBNET.ATG" +#line 2338 "VBNET.ATG" middleClauses.Add(partitionClause); } else if (la.kind == 148) { LetQueryOperator( -#line 2333 "VBNET.ATG" +#line 2339 "VBNET.ATG" middleClauses); } else if (la.kind == 146) { JoinQueryOperator( -#line 2334 "VBNET.ATG" +#line 2340 "VBNET.ATG" out joinClause); -#line 2335 "VBNET.ATG" +#line 2341 "VBNET.ATG" middleClauses.Add(joinClause); } else if ( -#line 2336 "VBNET.ATG" +#line 2342 "VBNET.ATG" la.kind == Tokens.Group && Peek(1).kind == Tokens.Join) { GroupJoinQueryOperator( -#line 2336 "VBNET.ATG" +#line 2342 "VBNET.ATG" out groupJoinClause); -#line 2337 "VBNET.ATG" +#line 2343 "VBNET.ATG" middleClauses.Add(groupJoinClause); } else if (la.kind == 133) { GroupByQueryOperator( -#line 2338 "VBNET.ATG" +#line 2344 "VBNET.ATG" out groupByClause); -#line 2339 "VBNET.ATG" +#line 2345 "VBNET.ATG" middleClauses.Add(groupByClause); } else SynErr(306); } void FromQueryOperator( -#line 2414 "VBNET.ATG" +#line 2420 "VBNET.ATG" out QueryExpressionFromClause fromClause) { -#line 2416 "VBNET.ATG" +#line 2422 "VBNET.ATG" fromClause = new QueryExpressionFromClause(); fromClause.StartLocation = la.Location; Expect(126); CollectionRangeVariableDeclarationList( -#line 2419 "VBNET.ATG" +#line 2425 "VBNET.ATG" fromClause.Sources); -#line 2421 "VBNET.ATG" +#line 2427 "VBNET.ATG" fromClause.EndLocation = t.EndLocation; } void AggregateQueryOperator( -#line 2483 "VBNET.ATG" +#line 2489 "VBNET.ATG" out QueryExpressionAggregateClause aggregateClause) { -#line 2485 "VBNET.ATG" +#line 2491 "VBNET.ATG" aggregateClause = new QueryExpressionAggregateClause(); aggregateClause.IntoVariables = new List(); aggregateClause.StartLocation = la.Location; @@ -6454,77 +6460,77 @@ out QueryExpressionAggregateClause aggregateClause) { Expect(58); CollectionRangeVariableDeclaration( -#line 2490 "VBNET.ATG" +#line 2496 "VBNET.ATG" out source); -#line 2492 "VBNET.ATG" +#line 2498 "VBNET.ATG" aggregateClause.Source = source; while (StartOf(31)) { QueryOperator( -#line 2495 "VBNET.ATG" +#line 2501 "VBNET.ATG" aggregateClause.MiddleClauses); } Expect(143); ExpressionRangeVariableDeclarationList( -#line 2497 "VBNET.ATG" +#line 2503 "VBNET.ATG" aggregateClause.IntoVariables); -#line 2499 "VBNET.ATG" +#line 2505 "VBNET.ATG" aggregateClause.EndLocation = t.EndLocation; } void SelectQueryOperator( -#line 2425 "VBNET.ATG" +#line 2431 "VBNET.ATG" List middleClauses) { -#line 2427 "VBNET.ATG" +#line 2433 "VBNET.ATG" QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause(); selectClause.StartLocation = la.Location; Expect(197); ExpressionRangeVariableDeclarationList( -#line 2430 "VBNET.ATG" +#line 2436 "VBNET.ATG" selectClause.Variables); -#line 2432 "VBNET.ATG" +#line 2438 "VBNET.ATG" selectClause.EndLocation = t.Location; middleClauses.Add(selectClause); } void DistinctQueryOperator( -#line 2437 "VBNET.ATG" +#line 2443 "VBNET.ATG" List middleClauses) { -#line 2439 "VBNET.ATG" +#line 2445 "VBNET.ATG" QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause(); distinctClause.StartLocation = la.Location; Expect(107); -#line 2444 "VBNET.ATG" +#line 2450 "VBNET.ATG" distinctClause.EndLocation = t.EndLocation; middleClauses.Add(distinctClause); } void WhereQueryOperator( -#line 2449 "VBNET.ATG" +#line 2455 "VBNET.ATG" List middleClauses) { -#line 2451 "VBNET.ATG" +#line 2457 "VBNET.ATG" QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause(); whereClause.StartLocation = la.Location; Expression operand = null; Expect(230); Expr( -#line 2455 "VBNET.ATG" +#line 2461 "VBNET.ATG" out operand); -#line 2457 "VBNET.ATG" +#line 2463 "VBNET.ATG" whereClause.Condition = operand; whereClause.EndLocation = t.EndLocation; @@ -6533,10 +6539,10 @@ out operand); } void OrderByQueryOperator( -#line 2342 "VBNET.ATG" +#line 2348 "VBNET.ATG" List middleClauses) { -#line 2344 "VBNET.ATG" +#line 2350 "VBNET.ATG" QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause(); orderClause.StartLocation = la.Location; List orderings = null; @@ -6544,10 +6550,10 @@ List middleClauses) { Expect(176); Expect(70); OrderExpressionList( -#line 2348 "VBNET.ATG" +#line 2354 "VBNET.ATG" out orderings); -#line 2350 "VBNET.ATG" +#line 2356 "VBNET.ATG" orderClause.Orderings = orderings; orderClause.EndLocation = t.EndLocation; middleClauses.Add(orderClause); @@ -6555,10 +6561,10 @@ out orderings); } void PartitionQueryOperator( -#line 2464 "VBNET.ATG" +#line 2470 "VBNET.ATG" out QueryExpressionPartitionVBClause partitionClause) { -#line 2466 "VBNET.ATG" +#line 2472 "VBNET.ATG" partitionClause = new QueryExpressionPartitionVBClause(); partitionClause.StartLocation = la.Location; Expression expr = null; @@ -6566,60 +6572,60 @@ out QueryExpressionPartitionVBClause partitionClause) { if (la.kind == 212) { lexer.NextToken(); -#line 2471 "VBNET.ATG" +#line 2477 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.Take; if (la.kind == 231) { lexer.NextToken(); -#line 2472 "VBNET.ATG" +#line 2478 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.TakeWhile; } } else if (la.kind == 203) { lexer.NextToken(); -#line 2473 "VBNET.ATG" +#line 2479 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.Skip; if (la.kind == 231) { lexer.NextToken(); -#line 2474 "VBNET.ATG" +#line 2480 "VBNET.ATG" partitionClause.PartitionType = QueryExpressionPartitionType.SkipWhile; } } else SynErr(307); Expr( -#line 2476 "VBNET.ATG" +#line 2482 "VBNET.ATG" out expr); -#line 2478 "VBNET.ATG" +#line 2484 "VBNET.ATG" partitionClause.Expression = expr; partitionClause.EndLocation = t.EndLocation; } void LetQueryOperator( -#line 2503 "VBNET.ATG" +#line 2509 "VBNET.ATG" List middleClauses) { -#line 2505 "VBNET.ATG" +#line 2511 "VBNET.ATG" QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause(); letClause.StartLocation = la.Location; Expect(148); ExpressionRangeVariableDeclarationList( -#line 2508 "VBNET.ATG" +#line 2514 "VBNET.ATG" letClause.Variables); -#line 2510 "VBNET.ATG" +#line 2516 "VBNET.ATG" letClause.EndLocation = t.EndLocation; middleClauses.Add(letClause); } void JoinQueryOperator( -#line 2547 "VBNET.ATG" +#line 2553 "VBNET.ATG" out QueryExpressionJoinVBClause joinClause) { -#line 2549 "VBNET.ATG" +#line 2555 "VBNET.ATG" joinClause = new QueryExpressionJoinVBClause(); joinClause.StartLocation = la.Location; CollectionRangeVariable joinVariable = null; @@ -6629,203 +6635,203 @@ out QueryExpressionJoinVBClause joinClause) { Expect(146); CollectionRangeVariableDeclaration( -#line 2556 "VBNET.ATG" +#line 2562 "VBNET.ATG" out joinVariable); -#line 2557 "VBNET.ATG" +#line 2563 "VBNET.ATG" joinClause.JoinVariable = joinVariable; if (la.kind == 146) { JoinQueryOperator( -#line 2559 "VBNET.ATG" +#line 2565 "VBNET.ATG" out subJoin); -#line 2560 "VBNET.ATG" +#line 2566 "VBNET.ATG" joinClause.SubJoin = subJoin; } Expect(171); JoinCondition( -#line 2563 "VBNET.ATG" +#line 2569 "VBNET.ATG" out condition); -#line 2564 "VBNET.ATG" +#line 2570 "VBNET.ATG" SafeAdd(joinClause, joinClause.Conditions, condition); while (la.kind == 60) { lexer.NextToken(); JoinCondition( -#line 2566 "VBNET.ATG" +#line 2572 "VBNET.ATG" out condition); -#line 2567 "VBNET.ATG" +#line 2573 "VBNET.ATG" SafeAdd(joinClause, joinClause.Conditions, condition); } -#line 2570 "VBNET.ATG" +#line 2576 "VBNET.ATG" joinClause.EndLocation = t.EndLocation; } void GroupJoinQueryOperator( -#line 2400 "VBNET.ATG" +#line 2406 "VBNET.ATG" out QueryExpressionGroupJoinVBClause groupJoinClause) { -#line 2402 "VBNET.ATG" +#line 2408 "VBNET.ATG" groupJoinClause = new QueryExpressionGroupJoinVBClause(); groupJoinClause.StartLocation = la.Location; QueryExpressionJoinVBClause joinClause = null; Expect(133); JoinQueryOperator( -#line 2406 "VBNET.ATG" +#line 2412 "VBNET.ATG" out joinClause); Expect(143); ExpressionRangeVariableDeclarationList( -#line 2407 "VBNET.ATG" +#line 2413 "VBNET.ATG" groupJoinClause.IntoVariables); -#line 2409 "VBNET.ATG" +#line 2415 "VBNET.ATG" groupJoinClause.JoinClause = joinClause; groupJoinClause.EndLocation = t.EndLocation; } void GroupByQueryOperator( -#line 2387 "VBNET.ATG" +#line 2393 "VBNET.ATG" out QueryExpressionGroupVBClause groupByClause) { -#line 2389 "VBNET.ATG" +#line 2395 "VBNET.ATG" groupByClause = new QueryExpressionGroupVBClause(); groupByClause.StartLocation = la.Location; Expect(133); ExpressionRangeVariableDeclarationList( -#line 2392 "VBNET.ATG" +#line 2398 "VBNET.ATG" groupByClause.GroupVariables); Expect(70); ExpressionRangeVariableDeclarationList( -#line 2393 "VBNET.ATG" +#line 2399 "VBNET.ATG" groupByClause.ByVariables); Expect(143); ExpressionRangeVariableDeclarationList( -#line 2394 "VBNET.ATG" +#line 2400 "VBNET.ATG" groupByClause.IntoVariables); -#line 2396 "VBNET.ATG" +#line 2402 "VBNET.ATG" groupByClause.EndLocation = t.EndLocation; } void OrderExpressionList( -#line 2356 "VBNET.ATG" +#line 2362 "VBNET.ATG" out List orderings) { -#line 2358 "VBNET.ATG" +#line 2364 "VBNET.ATG" orderings = new List(); QueryExpressionOrdering ordering = null; OrderExpression( -#line 2361 "VBNET.ATG" +#line 2367 "VBNET.ATG" out ordering); -#line 2362 "VBNET.ATG" +#line 2368 "VBNET.ATG" orderings.Add(ordering); while (la.kind == 22) { lexer.NextToken(); OrderExpression( -#line 2364 "VBNET.ATG" +#line 2370 "VBNET.ATG" out ordering); -#line 2365 "VBNET.ATG" +#line 2371 "VBNET.ATG" orderings.Add(ordering); } } void OrderExpression( -#line 2369 "VBNET.ATG" +#line 2375 "VBNET.ATG" out QueryExpressionOrdering ordering) { -#line 2371 "VBNET.ATG" +#line 2377 "VBNET.ATG" ordering = new QueryExpressionOrdering(); ordering.StartLocation = la.Location; ordering.Direction = QueryExpressionOrderingDirection.None; Expression orderExpr = null; Expr( -#line 2376 "VBNET.ATG" +#line 2382 "VBNET.ATG" out orderExpr); -#line 2378 "VBNET.ATG" +#line 2384 "VBNET.ATG" ordering.Criteria = orderExpr; if (la.kind == 64 || la.kind == 104) { if (la.kind == 64) { lexer.NextToken(); -#line 2381 "VBNET.ATG" +#line 2387 "VBNET.ATG" ordering.Direction = QueryExpressionOrderingDirection.Ascending; } else { lexer.NextToken(); -#line 2382 "VBNET.ATG" +#line 2388 "VBNET.ATG" ordering.Direction = QueryExpressionOrderingDirection.Descending; } } -#line 2384 "VBNET.ATG" +#line 2390 "VBNET.ATG" ordering.EndLocation = t.EndLocation; } void ExpressionRangeVariableDeclarationList( -#line 2515 "VBNET.ATG" +#line 2521 "VBNET.ATG" List variables) { -#line 2517 "VBNET.ATG" +#line 2523 "VBNET.ATG" ExpressionRangeVariable variable = null; ExpressionRangeVariableDeclaration( -#line 2519 "VBNET.ATG" +#line 2525 "VBNET.ATG" out variable); -#line 2520 "VBNET.ATG" +#line 2526 "VBNET.ATG" variables.Add(variable); while (la.kind == 22) { lexer.NextToken(); ExpressionRangeVariableDeclaration( -#line 2521 "VBNET.ATG" +#line 2527 "VBNET.ATG" out variable); -#line 2521 "VBNET.ATG" +#line 2527 "VBNET.ATG" variables.Add(variable); } } void CollectionRangeVariableDeclarationList( -#line 2574 "VBNET.ATG" +#line 2580 "VBNET.ATG" List rangeVariables) { -#line 2575 "VBNET.ATG" +#line 2581 "VBNET.ATG" CollectionRangeVariable variableDeclaration; CollectionRangeVariableDeclaration( -#line 2577 "VBNET.ATG" +#line 2583 "VBNET.ATG" out variableDeclaration); -#line 2578 "VBNET.ATG" +#line 2584 "VBNET.ATG" rangeVariables.Add(variableDeclaration); while (la.kind == 22) { lexer.NextToken(); CollectionRangeVariableDeclaration( -#line 2579 "VBNET.ATG" +#line 2585 "VBNET.ATG" out variableDeclaration); -#line 2579 "VBNET.ATG" +#line 2585 "VBNET.ATG" rangeVariables.Add(variableDeclaration); } } void CollectionRangeVariableDeclaration( -#line 2582 "VBNET.ATG" +#line 2588 "VBNET.ATG" out CollectionRangeVariable rangeVariable) { -#line 2584 "VBNET.ATG" +#line 2590 "VBNET.ATG" rangeVariable = new CollectionRangeVariable(); rangeVariable.StartLocation = la.Location; TypeReference typeName = null; @@ -6833,71 +6839,71 @@ out CollectionRangeVariable rangeVariable) { Identifier(); -#line 2589 "VBNET.ATG" +#line 2595 "VBNET.ATG" rangeVariable.Identifier = t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -#line 2590 "VBNET.ATG" +#line 2596 "VBNET.ATG" out typeName); -#line 2590 "VBNET.ATG" +#line 2596 "VBNET.ATG" rangeVariable.Type = typeName; } Expect(138); Expr( -#line 2591 "VBNET.ATG" +#line 2597 "VBNET.ATG" out inExpr); -#line 2593 "VBNET.ATG" +#line 2599 "VBNET.ATG" rangeVariable.Expression = inExpr; rangeVariable.EndLocation = t.EndLocation; } void ExpressionRangeVariableDeclaration( -#line 2524 "VBNET.ATG" +#line 2530 "VBNET.ATG" out ExpressionRangeVariable variable) { -#line 2526 "VBNET.ATG" +#line 2532 "VBNET.ATG" variable = new ExpressionRangeVariable(); variable.StartLocation = la.Location; Expression rhs = null; TypeReference typeName = null; if ( -#line 2532 "VBNET.ATG" +#line 2538 "VBNET.ATG" IsIdentifiedExpressionRange()) { Identifier(); -#line 2533 "VBNET.ATG" +#line 2539 "VBNET.ATG" variable.Identifier = t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -#line 2535 "VBNET.ATG" +#line 2541 "VBNET.ATG" out typeName); -#line 2536 "VBNET.ATG" +#line 2542 "VBNET.ATG" variable.Type = typeName; } Expect(20); } Expr( -#line 2540 "VBNET.ATG" +#line 2546 "VBNET.ATG" out rhs); -#line 2542 "VBNET.ATG" +#line 2548 "VBNET.ATG" variable.Expression = rhs; variable.EndLocation = t.EndLocation; } void JoinCondition( -#line 2598 "VBNET.ATG" +#line 2604 "VBNET.ATG" out QueryExpressionJoinConditionVB condition) { -#line 2600 "VBNET.ATG" +#line 2606 "VBNET.ATG" condition = new QueryExpressionJoinConditionVB(); condition.StartLocation = la.Location; @@ -6905,14 +6911,14 @@ out QueryExpressionJoinConditionVB condition) { Expression rhs = null; Expr( -#line 2606 "VBNET.ATG" +#line 2612 "VBNET.ATG" out lhs); Expect(116); Expr( -#line 2606 "VBNET.ATG" +#line 2612 "VBNET.ATG" out rhs); -#line 2608 "VBNET.ATG" +#line 2614 "VBNET.ATG" condition.LeftSide = lhs; condition.RightSide = rhs; condition.EndLocation = t.EndLocation; @@ -6920,69 +6926,69 @@ out rhs); } void Argument( -#line 2672 "VBNET.ATG" +#line 2678 "VBNET.ATG" out Expression argumentexpr) { -#line 2674 "VBNET.ATG" +#line 2680 "VBNET.ATG" Expression expr; argumentexpr = null; string name; Location startLocation = la.Location; if ( -#line 2679 "VBNET.ATG" +#line 2685 "VBNET.ATG" IsNamedAssign()) { Identifier(); -#line 2679 "VBNET.ATG" +#line 2685 "VBNET.ATG" name = t.val; Expect(55); Expr( -#line 2679 "VBNET.ATG" +#line 2685 "VBNET.ATG" out expr); -#line 2681 "VBNET.ATG" +#line 2687 "VBNET.ATG" argumentexpr = new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else if (StartOf(24)) { Expr( -#line 2684 "VBNET.ATG" +#line 2690 "VBNET.ATG" out argumentexpr); } else SynErr(308); } void QualIdentAndTypeArguments( -#line 2752 "VBNET.ATG" +#line 2758 "VBNET.ATG" out TypeReference typeref, bool canBeUnbound) { -#line 2753 "VBNET.ATG" +#line 2759 "VBNET.ATG" string name; typeref = null; Qualident( -#line 2755 "VBNET.ATG" +#line 2761 "VBNET.ATG" out name); -#line 2756 "VBNET.ATG" +#line 2762 "VBNET.ATG" typeref = new TypeReference(name); if ( -#line 2757 "VBNET.ATG" +#line 2763 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { lexer.NextToken(); Expect(169); if ( -#line 2759 "VBNET.ATG" +#line 2765 "VBNET.ATG" canBeUnbound && (la.kind == Tokens.CloseParenthesis || la.kind == Tokens.Comma)) { -#line 2760 "VBNET.ATG" +#line 2766 "VBNET.ATG" typeref.GenericTypes.Add(NullTypeReference.Instance); while (la.kind == 22) { lexer.NextToken(); -#line 2761 "VBNET.ATG" +#line 2767 "VBNET.ATG" typeref.GenericTypes.Add(NullTypeReference.Instance); } } else if (StartOf(8)) { TypeArgumentList( -#line 2762 "VBNET.ATG" +#line 2768 "VBNET.ATG" typeref.GenericTypes); } else SynErr(309); Expect(38); @@ -6990,24 +6996,24 @@ typeref.GenericTypes); } void RankList( -#line 2799 "VBNET.ATG" +#line 2805 "VBNET.ATG" out int i) { -#line 2800 "VBNET.ATG" +#line 2806 "VBNET.ATG" i = 0; while (la.kind == 22) { lexer.NextToken(); -#line 2801 "VBNET.ATG" +#line 2807 "VBNET.ATG" ++i; } } void Attribute( -#line 2840 "VBNET.ATG" +#line 2846 "VBNET.ATG" out ASTAttribute attribute) { -#line 2842 "VBNET.ATG" +#line 2848 "VBNET.ATG" string name; List positional = new List(); List named = new List(); @@ -7018,43 +7024,43 @@ out ASTAttribute attribute) { Expect(26); } Qualident( -#line 2848 "VBNET.ATG" +#line 2854 "VBNET.ATG" out name); if (la.kind == 37) { AttributeArguments( -#line 2849 "VBNET.ATG" +#line 2855 "VBNET.ATG" positional, named); } -#line 2851 "VBNET.ATG" +#line 2857 "VBNET.ATG" attribute = new ASTAttribute(name, positional, named) { StartLocation = startLocation, EndLocation = t.EndLocation }; } void AttributeArguments( -#line 2856 "VBNET.ATG" +#line 2862 "VBNET.ATG" List positional, List named) { -#line 2858 "VBNET.ATG" +#line 2864 "VBNET.ATG" bool nameFound = false; string name = ""; Expression expr; Expect(37); if ( -#line 2864 "VBNET.ATG" +#line 2870 "VBNET.ATG" IsNotClosingParenthesis()) { -#line 2865 "VBNET.ATG" +#line 2871 "VBNET.ATG" Location startLocation = la.Location; if ( -#line 2867 "VBNET.ATG" +#line 2873 "VBNET.ATG" IsNamedAssign()) { -#line 2867 "VBNET.ATG" +#line 2873 "VBNET.ATG" nameFound = true; IdentifierOrKeyword( -#line 2868 "VBNET.ATG" +#line 2874 "VBNET.ATG" out name); if (la.kind == 55) { lexer.NextToken(); @@ -7063,10 +7069,10 @@ out name); } else SynErr(310); } Expr( -#line 2870 "VBNET.ATG" +#line 2876 "VBNET.ATG" out expr); -#line 2872 "VBNET.ATG" +#line 2878 "VBNET.ATG" if (expr != null) { if (string.IsNullOrEmpty(name)) { positional.Add(expr); } else { named.Add(new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }); name = ""; } @@ -7075,13 +7081,13 @@ out expr); while (la.kind == 22) { lexer.NextToken(); if ( -#line 2880 "VBNET.ATG" +#line 2886 "VBNET.ATG" IsNamedAssign()) { -#line 2880 "VBNET.ATG" +#line 2886 "VBNET.ATG" nameFound = true; IdentifierOrKeyword( -#line 2881 "VBNET.ATG" +#line 2887 "VBNET.ATG" out name); if (la.kind == 55) { lexer.NextToken(); @@ -7090,14 +7096,14 @@ out name); } else SynErr(311); } else if (StartOf(24)) { -#line 2883 "VBNET.ATG" +#line 2889 "VBNET.ATG" if (nameFound) Error("no positional argument after named argument"); } else SynErr(312); Expr( -#line 2884 "VBNET.ATG" +#line 2890 "VBNET.ATG" out expr); -#line 2884 "VBNET.ATG" +#line 2890 "VBNET.ATG" if (expr != null) { if(name == "") positional.Add(expr); else { named.Add(new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }); name = ""; } } @@ -7108,34 +7114,34 @@ out expr); } void ParameterModifier( -#line 3695 "VBNET.ATG" +#line 3701 "VBNET.ATG" ParamModifierList m) { if (la.kind == 72) { lexer.NextToken(); -#line 3696 "VBNET.ATG" +#line 3702 "VBNET.ATG" m.Add(ParameterModifiers.In); } else if (la.kind == 69) { lexer.NextToken(); -#line 3697 "VBNET.ATG" +#line 3703 "VBNET.ATG" m.Add(ParameterModifiers.Ref); } else if (la.kind == 174) { lexer.NextToken(); -#line 3698 "VBNET.ATG" +#line 3704 "VBNET.ATG" m.Add(ParameterModifiers.Optional); } else if (la.kind == 182) { lexer.NextToken(); -#line 3699 "VBNET.ATG" +#line 3705 "VBNET.ATG" m.Add(ParameterModifiers.Params); } else SynErr(313); } void Statement() { -#line 3011 "VBNET.ATG" +#line 3017 "VBNET.ATG" Statement stmt = null; Location startPos = la.Location; string label = String.Empty; @@ -7143,27 +7149,27 @@ ParamModifierList m) { if (la.kind == 1 || la.kind == 21) { } else if ( -#line 3017 "VBNET.ATG" +#line 3023 "VBNET.ATG" IsLabel()) { LabelName( -#line 3017 "VBNET.ATG" +#line 3023 "VBNET.ATG" out label); -#line 3019 "VBNET.ATG" +#line 3025 "VBNET.ATG" AddChild(new LabelStatement(t.val)); Expect(21); Statement(); } else if (StartOf(49)) { EmbeddedStatement( -#line 3022 "VBNET.ATG" +#line 3028 "VBNET.ATG" out stmt); -#line 3022 "VBNET.ATG" +#line 3028 "VBNET.ATG" AddChild(stmt); } else SynErr(314); -#line 3025 "VBNET.ATG" +#line 3031 "VBNET.ATG" if (stmt != null) { stmt.StartLocation = startPos; stmt.EndLocation = t.Location; @@ -7172,30 +7178,30 @@ out stmt); } void LabelName( -#line 3465 "VBNET.ATG" +#line 3471 "VBNET.ATG" out string name) { -#line 3467 "VBNET.ATG" +#line 3473 "VBNET.ATG" name = String.Empty; if (StartOf(4)) { Identifier(); -#line 3469 "VBNET.ATG" +#line 3475 "VBNET.ATG" name = t.val; } else if (la.kind == 5) { lexer.NextToken(); -#line 3470 "VBNET.ATG" +#line 3476 "VBNET.ATG" name = t.val; } else SynErr(315); } void LocalDeclarationStatement( -#line 3033 "VBNET.ATG" +#line 3039 "VBNET.ATG" out Statement statement) { -#line 3035 "VBNET.ATG" +#line 3041 "VBNET.ATG" ModifierList m = new ModifierList(); LocalVariableDeclaration localVariableDeclaration; bool dimfound = false; @@ -7204,22 +7210,22 @@ out Statement statement) { if (la.kind == 88) { lexer.NextToken(); -#line 3041 "VBNET.ATG" +#line 3047 "VBNET.ATG" m.Add(Modifiers.Const, t.Location); } else if (la.kind == 204) { lexer.NextToken(); -#line 3042 "VBNET.ATG" +#line 3048 "VBNET.ATG" m.Add(Modifiers.Static, t.Location); } else { lexer.NextToken(); -#line 3043 "VBNET.ATG" +#line 3049 "VBNET.ATG" dimfound = true; } } -#line 3046 "VBNET.ATG" +#line 3052 "VBNET.ATG" if(dimfound && (m.Modifier & Modifiers.Const) != 0) { Error("Dim is not allowed on constants."); } @@ -7232,135 +7238,135 @@ out Statement statement) { localVariableDeclaration.StartLocation = t.Location; VariableDeclarator( -#line 3057 "VBNET.ATG" +#line 3063 "VBNET.ATG" localVariableDeclaration.Variables); while (la.kind == 22) { lexer.NextToken(); VariableDeclarator( -#line 3058 "VBNET.ATG" +#line 3064 "VBNET.ATG" localVariableDeclaration.Variables); } -#line 3060 "VBNET.ATG" +#line 3066 "VBNET.ATG" statement = localVariableDeclaration; } void TryStatement( -#line 3583 "VBNET.ATG" +#line 3589 "VBNET.ATG" out Statement tryStatement) { -#line 3585 "VBNET.ATG" +#line 3591 "VBNET.ATG" Statement blockStmt = null, finallyStmt = null;List catchClauses = null; Expect(218); EndOfStmt(); Block( -#line 3588 "VBNET.ATG" +#line 3594 "VBNET.ATG" out blockStmt); if (la.kind == 75 || la.kind == 113 || la.kind == 123) { CatchClauses( -#line 3589 "VBNET.ATG" +#line 3595 "VBNET.ATG" out catchClauses); } if (la.kind == 123) { lexer.NextToken(); EndOfStmt(); Block( -#line 3590 "VBNET.ATG" +#line 3596 "VBNET.ATG" out finallyStmt); } Expect(113); Expect(218); -#line 3593 "VBNET.ATG" +#line 3599 "VBNET.ATG" tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt); } void WithStatement( -#line 3563 "VBNET.ATG" +#line 3569 "VBNET.ATG" out Statement withStatement) { -#line 3565 "VBNET.ATG" +#line 3571 "VBNET.ATG" Statement blockStmt = null; Expression expr = null; Expect(233); -#line 3568 "VBNET.ATG" +#line 3574 "VBNET.ATG" Location start = t.Location; Expr( -#line 3569 "VBNET.ATG" +#line 3575 "VBNET.ATG" out expr); EndOfStmt(); -#line 3571 "VBNET.ATG" +#line 3577 "VBNET.ATG" withStatement = new WithStatement(expr); withStatement.StartLocation = start; Block( -#line 3574 "VBNET.ATG" +#line 3580 "VBNET.ATG" out blockStmt); -#line 3576 "VBNET.ATG" +#line 3582 "VBNET.ATG" ((WithStatement)withStatement).Body = (BlockStatement)blockStmt; Expect(113); Expect(233); -#line 3579 "VBNET.ATG" +#line 3585 "VBNET.ATG" withStatement.EndLocation = t.Location; } void WhileOrUntil( -#line 3556 "VBNET.ATG" +#line 3562 "VBNET.ATG" out ConditionType conditionType) { -#line 3557 "VBNET.ATG" +#line 3563 "VBNET.ATG" conditionType = ConditionType.None; if (la.kind == 231) { lexer.NextToken(); -#line 3558 "VBNET.ATG" +#line 3564 "VBNET.ATG" conditionType = ConditionType.While; } else if (la.kind == 224) { lexer.NextToken(); -#line 3559 "VBNET.ATG" +#line 3565 "VBNET.ATG" conditionType = ConditionType.Until; } else SynErr(316); } void LoopControlVariable( -#line 3387 "VBNET.ATG" +#line 3393 "VBNET.ATG" out TypeReference type, out string name) { -#line 3388 "VBNET.ATG" +#line 3394 "VBNET.ATG" ArrayList arrayModifiers = null; type = null; Qualident( -#line 3392 "VBNET.ATG" +#line 3398 "VBNET.ATG" out name); if ( -#line 3393 "VBNET.ATG" +#line 3399 "VBNET.ATG" IsDims()) { ArrayTypeModifiers( -#line 3393 "VBNET.ATG" +#line 3399 "VBNET.ATG" out arrayModifiers); } if (la.kind == 63) { lexer.NextToken(); TypeName( -#line 3394 "VBNET.ATG" +#line 3400 "VBNET.ATG" out type); -#line 3394 "VBNET.ATG" +#line 3400 "VBNET.ATG" if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); } } -#line 3396 "VBNET.ATG" +#line 3402 "VBNET.ATG" if (type != null) { if(type.RankSpecifier != null && arrayModifiers != null) { Error("array rank only allowed one time"); @@ -7372,34 +7378,34 @@ out type); } void ReDimClause( -#line 3474 "VBNET.ATG" +#line 3480 "VBNET.ATG" out Expression expr) { SimpleNonInvocationExpression( -#line 3476 "VBNET.ATG" +#line 3482 "VBNET.ATG" out expr); ReDimClauseInternal( -#line 3477 "VBNET.ATG" +#line 3483 "VBNET.ATG" ref expr); } void SingleLineStatementList( -#line 3373 "VBNET.ATG" +#line 3379 "VBNET.ATG" List list) { -#line 3374 "VBNET.ATG" +#line 3380 "VBNET.ATG" Statement embeddedStatement = null; if (la.kind == 113) { lexer.NextToken(); -#line 3376 "VBNET.ATG" +#line 3382 "VBNET.ATG" embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (StartOf(49)) { EmbeddedStatement( -#line 3377 "VBNET.ATG" +#line 3383 "VBNET.ATG" out embeddedStatement); } else SynErr(317); -#line 3378 "VBNET.ATG" +#line 3384 "VBNET.ATG" if (embeddedStatement != null) list.Add(embeddedStatement); while (la.kind == 21) { lexer.NextToken(); @@ -7409,49 +7415,49 @@ out embeddedStatement); if (la.kind == 113) { lexer.NextToken(); -#line 3380 "VBNET.ATG" +#line 3386 "VBNET.ATG" embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation }; } else if (StartOf(49)) { EmbeddedStatement( -#line 3381 "VBNET.ATG" +#line 3387 "VBNET.ATG" out embeddedStatement); } else SynErr(318); -#line 3382 "VBNET.ATG" +#line 3388 "VBNET.ATG" if (embeddedStatement != null) list.Add(embeddedStatement); } } void CaseClauses( -#line 3516 "VBNET.ATG" +#line 3522 "VBNET.ATG" out List caseClauses) { -#line 3518 "VBNET.ATG" +#line 3524 "VBNET.ATG" caseClauses = new List(); CaseLabel caseClause = null; CaseClause( -#line 3521 "VBNET.ATG" +#line 3527 "VBNET.ATG" out caseClause); -#line 3521 "VBNET.ATG" +#line 3527 "VBNET.ATG" if (caseClause != null) { caseClauses.Add(caseClause); } while (la.kind == 22) { lexer.NextToken(); CaseClause( -#line 3522 "VBNET.ATG" +#line 3528 "VBNET.ATG" out caseClause); -#line 3522 "VBNET.ATG" +#line 3528 "VBNET.ATG" if (caseClause != null) { caseClauses.Add(caseClause); } } } void OnErrorStatement( -#line 3407 "VBNET.ATG" +#line 3413 "VBNET.ATG" out OnErrorStatement stmt) { -#line 3409 "VBNET.ATG" +#line 3415 "VBNET.ATG" stmt = null; Location startLocation = la.Location; GotoStatement goToStatement = null; @@ -7459,13 +7465,13 @@ out OnErrorStatement stmt) { Expect(171); Expect(118); if ( -#line 3416 "VBNET.ATG" +#line 3422 "VBNET.ATG" IsNegativeLabelName()) { Expect(132); Expect(30); Expect(5); -#line 3418 "VBNET.ATG" +#line 3424 "VBNET.ATG" long intLabel = Int64.Parse(t.val); if(intLabel != 1) { Error("invalid label in on error statement."); @@ -7474,10 +7480,10 @@ IsNegativeLabelName()) { } else if (la.kind == 132) { GotoStatement( -#line 3424 "VBNET.ATG" +#line 3430 "VBNET.ATG" out goToStatement); -#line 3426 "VBNET.ATG" +#line 3432 "VBNET.ATG" string val = goToStatement.Label; // if value is numeric, make sure that is 0 @@ -7494,12 +7500,12 @@ out goToStatement); lexer.NextToken(); Expect(163); -#line 3440 "VBNET.ATG" +#line 3446 "VBNET.ATG" stmt = new OnErrorStatement(new ResumeStatement(true)); } else SynErr(319); -#line 3444 "VBNET.ATG" +#line 3450 "VBNET.ATG" if (stmt != null) { stmt.StartLocation = startLocation; stmt.EndLocation = t.EndLocation; @@ -7508,17 +7514,17 @@ out goToStatement); } void GotoStatement( -#line 3452 "VBNET.ATG" +#line 3458 "VBNET.ATG" out GotoStatement goToStatement) { -#line 3453 "VBNET.ATG" +#line 3459 "VBNET.ATG" string label = String.Empty; Location startLocation = la.Location; Expect(132); LabelName( -#line 3455 "VBNET.ATG" +#line 3461 "VBNET.ATG" out label); -#line 3457 "VBNET.ATG" +#line 3463 "VBNET.ATG" goToStatement = new GotoStatement(label) { StartLocation = startLocation, EndLocation = t.EndLocation @@ -7527,57 +7533,57 @@ out label); } void ResumeStatement( -#line 3505 "VBNET.ATG" +#line 3511 "VBNET.ATG" out ResumeStatement resumeStatement) { -#line 3507 "VBNET.ATG" +#line 3513 "VBNET.ATG" resumeStatement = null; string label = String.Empty; if ( -#line 3510 "VBNET.ATG" +#line 3516 "VBNET.ATG" IsResumeNext()) { Expect(194); Expect(163); -#line 3511 "VBNET.ATG" +#line 3517 "VBNET.ATG" resumeStatement = new ResumeStatement(true); } else if (la.kind == 194) { lexer.NextToken(); if (StartOf(50)) { LabelName( -#line 3512 "VBNET.ATG" +#line 3518 "VBNET.ATG" out label); } -#line 3512 "VBNET.ATG" +#line 3518 "VBNET.ATG" resumeStatement = new ResumeStatement(label); } else SynErr(320); } void ReDimClauseInternal( -#line 3480 "VBNET.ATG" +#line 3486 "VBNET.ATG" ref Expression expr) { -#line 3481 "VBNET.ATG" +#line 3487 "VBNET.ATG" List arguments; bool canBeNormal; bool canBeRedim; string name; Location startLocation = la.Location; while (la.kind == 26 || -#line 3484 "VBNET.ATG" +#line 3490 "VBNET.ATG" la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) { if (la.kind == 26) { lexer.NextToken(); IdentifierOrKeyword( -#line 3483 "VBNET.ATG" +#line 3489 "VBNET.ATG" out name); -#line 3483 "VBNET.ATG" +#line 3489 "VBNET.ATG" expr = new MemberReferenceExpression(expr, name) { StartLocation = startLocation, EndLocation = t.EndLocation }; } else { InvocationExpression( -#line 3485 "VBNET.ATG" +#line 3491 "VBNET.ATG" ref expr); -#line 3487 "VBNET.ATG" +#line 3493 "VBNET.ATG" expr.StartLocation = startLocation; expr.EndLocation = t.EndLocation; @@ -7585,11 +7591,11 @@ ref expr); } Expect(37); NormalOrReDimArgumentList( -#line 3492 "VBNET.ATG" +#line 3498 "VBNET.ATG" out arguments, out canBeNormal, out canBeRedim); Expect(38); -#line 3494 "VBNET.ATG" +#line 3500 "VBNET.ATG" expr = new InvocationExpression(expr, arguments); if (canBeRedim == false || canBeNormal && (la.kind == Tokens.Dot || la.kind == Tokens.OpenParenthesis)) { if (this.Errors.Count == 0) { @@ -7601,10 +7607,10 @@ out arguments, out canBeNormal, out canBeRedim); } void CaseClause( -#line 3526 "VBNET.ATG" +#line 3532 "VBNET.ATG" out CaseLabel caseClause) { -#line 3528 "VBNET.ATG" +#line 3534 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; @@ -7613,7 +7619,7 @@ out CaseLabel caseClause) { if (la.kind == 111) { lexer.NextToken(); -#line 3534 "VBNET.ATG" +#line 3540 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(51)) { if (la.kind == 144) { @@ -7623,76 +7629,76 @@ out CaseLabel caseClause) { case 40: { lexer.NextToken(); -#line 3538 "VBNET.ATG" +#line 3544 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 39: { lexer.NextToken(); -#line 3539 "VBNET.ATG" +#line 3545 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 43: { lexer.NextToken(); -#line 3540 "VBNET.ATG" +#line 3546 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 42: { lexer.NextToken(); -#line 3541 "VBNET.ATG" +#line 3547 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 20: { lexer.NextToken(); -#line 3542 "VBNET.ATG" +#line 3548 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 41: { lexer.NextToken(); -#line 3543 "VBNET.ATG" +#line 3549 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } default: SynErr(321); break; } Expr( -#line 3545 "VBNET.ATG" +#line 3551 "VBNET.ATG" out expr); -#line 3547 "VBNET.ATG" +#line 3553 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(24)) { Expr( -#line 3549 "VBNET.ATG" +#line 3555 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); Expr( -#line 3549 "VBNET.ATG" +#line 3555 "VBNET.ATG" out sexpr); } -#line 3551 "VBNET.ATG" +#line 3557 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); } else SynErr(322); } void CatchClauses( -#line 3598 "VBNET.ATG" +#line 3604 "VBNET.ATG" out List catchClauses) { -#line 3600 "VBNET.ATG" +#line 3606 "VBNET.ATG" catchClauses = new List(); TypeReference type = null; Statement blockStmt = null; @@ -7704,27 +7710,27 @@ out List catchClauses) { if (StartOf(4)) { Identifier(); -#line 3608 "VBNET.ATG" +#line 3614 "VBNET.ATG" name = t.val; if (la.kind == 63) { lexer.NextToken(); TypeName( -#line 3608 "VBNET.ATG" +#line 3614 "VBNET.ATG" out type); } } if (la.kind == 229) { lexer.NextToken(); Expr( -#line 3609 "VBNET.ATG" +#line 3615 "VBNET.ATG" out expr); } EndOfStmt(); Block( -#line 3611 "VBNET.ATG" +#line 3617 "VBNET.ATG" out blockStmt); -#line 3612 "VBNET.ATG" +#line 3618 "VBNET.ATG" catchClauses.Add(new CatchClause(type, name, blockStmt, expr)); } } diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG index 8b74b408c2..ed814fad0b 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG @@ -2232,12 +2232,14 @@ SubLambdaExpression (. lambda.ExpressionBody = inner; lambda.EndLocation = t.EndLocation; // la.Location? + lambda.ExtendedEndLocation = la.Location; .) | EmbeddedStatement (. lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; .) ) | @@ -2247,6 +2249,7 @@ SubLambdaExpression (. lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; .) ) . @@ -2267,13 +2270,15 @@ FunctionLambdaExpression Expr (. lambda.ExpressionBody = inner; - lambda.EndLocation = t.EndLocation; // la.Location? + lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; .) | EmbeddedStatement (. lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; .) ) | @@ -2283,6 +2288,7 @@ FunctionLambdaExpression (. lambda.StatementBody = statement; lambda.EndLocation = t.EndLocation; + lambda.ExtendedEndLocation = la.Location; .) ) . diff --git a/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs b/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs index be5313449f..8f88aa51f7 100644 --- a/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs +++ b/src/Libraries/NRefactory/Test/Lexer/VBNet/LexerContextTests.cs @@ -483,12 +483,14 @@ End Module", enter Expression 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 diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs b/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs index 94c858dd89..5f010b0b88 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs @@ -80,6 +80,11 @@ namespace ICSharpCode.SharpDevelop.Gui #if DEBUG if (e.KeyData == (Keys.Control | Keys.Shift | Keys.E)) { throw new ClownFishException(); + } else if (e.KeyData == (Keys.Control | Keys.Shift | Keys.G)) { + GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); + GC.WaitForPendingFinalizers(); + GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); + versionInfoTextBox.Text = GetVersionInformationString(); } #endif } diff --git a/src/Main/Base/Test/VBExpressionFinderTests.cs b/src/Main/Base/Test/VBExpressionFinderTests.cs index 330256b877..e4ac714eec 100644 --- a/src/Main/Base/Test/VBExpressionFinderTests.cs +++ b/src/Main/Base/Test/VBExpressionFinderTests.cs @@ -635,6 +635,36 @@ End Module", "FileReader()", ExpressionContext.ObjectCreation); End Module", "FileReader()", ExpressionContext.Default); } + [Test] + public void FunctionLambda() + { + FindFull(@"Module Test + Sub Main() + Dim f = Fun|ction(x, y) x + y + End Sub +End Module", "Function(x, y) x + y", ExpressionContext.Default); + } + + [Test] + public void SubLambda() + { + FindFull(@"Module Test + Sub Main() + Dim f = Su|b(x, y) Console.WriteLine(x + y) + End Sub +End Module", "Sub(x, y) Console.WriteLine(x + y)", ExpressionContext.Default); + } + + [Test] + public void NewExpression() + { + FindFull(@"Module Test + Sub Main() + Dim list = N|ew List(Of Integer) + End Sub +End Module", "New List(Of Integer)", ExpressionContext.Default); + } + #region Old Tests void OldTest(string expr, int offset) { diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/MemberLookupHelper.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/MemberLookupHelper.cs index a6d04977c9..f36fb8b44a 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/MemberLookupHelper.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/MemberLookupHelper.cs @@ -87,6 +87,7 @@ namespace ICSharpCode.SharpDevelop.Dom //Dictionary overrideDict = new Dictionary(); ParameterListComparer parameterListComparer = new ParameterListComparer(); + parameterListComparer.UseCachedHashes = true; HashSet handledMethods = new HashSet(parameterListComparer); Dictionary overrideMethodDict = new Dictionary(parameterListComparer); IMember nonMethodOverride = null; diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ParameterListComparer.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ParameterListComparer.cs index c4e2b15b58..0b504fda01 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ParameterListComparer.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ParameterListComparer.cs @@ -10,10 +10,32 @@ namespace ICSharpCode.SharpDevelop.Dom { public class ParameterListComparer : IEqualityComparer { + Dictionary cachedHashes; + + /// + /// Gets/Sets whether to cache hashcodes. This can improve performance for + /// algorithms that repeatedly request the hash of a parameter list. + /// + /// + /// This class is thread-safe only when not using cached hashes. + /// Also, cached hashes may cause a memory leak when the ParameterListComparer + /// instance is kept alive. + /// + public bool UseCachedHashes { + get { + return cachedHashes != null; + } + set { + cachedHashes = value ? new Dictionary() : null; + } + } + public bool Equals(IMethod x, IMethod y) { - if (GetHashCode(x) != GetHashCode(y)) - return false; + if (cachedHashes != null) { + if (GetHashCode(x) != GetHashCode(y)) + return false; + } var paramsX = x.Parameters; var paramsY = y.Parameters; if (paramsX.Count != paramsY.Count) @@ -31,12 +53,10 @@ namespace ICSharpCode.SharpDevelop.Dom return true; } - Dictionary cachedHashes = new Dictionary(); - public int GetHashCode(IMethod obj) { int hashCode; - if (cachedHashes.TryGetValue(obj, out hashCode)) + if (cachedHashes != null && cachedHashes.TryGetValue(obj, out hashCode)) return hashCode; hashCode = obj.TypeParameters.Count; unchecked { @@ -49,7 +69,8 @@ namespace ICSharpCode.SharpDevelop.Dom } } } - cachedHashes[obj] = hashCode; + if (cachedHashes != null) + cachedHashes[obj] = hashCode; return hashCode; } }