From e3fb17b1246d98803e9023924732b91c46faaf30 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 20 Jun 2010 15:54:46 +0000 Subject: [PATCH] - added BranchStatements and more unit tests - End-statements need a hack in InformToken git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@5977 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../VBNet/Experimental/ExpressionFinder.atg | 10 + .../Src/Parser/VBNet/Experimental/Parser.cs | 1433 +++++++++-------- .../VBNet/Experimental/PushParser.frame | 23 +- .../Experimental/Test/XmlModeLexerTests.cs | 49 + 4 files changed, 839 insertions(+), 676 deletions(-) diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg index 98b59e698c..deb15812d1 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg @@ -523,6 +523,7 @@ Statement = | ErrorHandlingStatement | ThrowStatement | TryStatement + | BranchStatement | InvocationStatement . @@ -644,6 +645,15 @@ TryStatement = "End" "Try" . +BranchStatement = + "GoTo" ( Identifier | LiteralInteger ) + | "Exit" ( "Do" | "For" | "While" | "Select" | "Sub" | "Function" | "Property" | "Try" ) + | "Continue" ( "Do" | "For" | "While" ) + | "Stop" + /*| "End" HACK End-Statements are not passed to EF-Parser from Lexer */ + | "Return" (. nextTokenIsPotentialStartOfXmlMode = true; .) [ Expression ] +. + InvocationStatement = [ "Call" ] Expression . diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs index b1332b9b3e..7ebc95e609 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs @@ -38,8 +38,27 @@ int currentState = 0; void Error(Token t) { } - + + Token consumedEndToken; + public void InformToken(Token t) + { + if (consumedEndToken != null) { + if (t.kind == Tokens.EOL || t.kind == Tokens.Colon) { + consumedEndToken = null; + return; // ignore End statement + } + InformTokenInternal(consumedEndToken); + consumedEndToken = null; + } + if (t.kind == Tokens.End) { + consumedEndToken = t; + } else { + InformTokenInternal(t); + } + } + + void InformTokenInternal(Token t) { nextTokenIsPotentialStartOfXmlMode = false; ApplyToken(t); @@ -52,7 +71,7 @@ int currentState = 0; if (t == null) { currentState = 1; break; } if (t.kind == 172) { stateStack.Push(1); - goto case 322; + goto case 327; } else { goto case 2; } @@ -61,7 +80,7 @@ int currentState = 0; if (t == null) { currentState = 2; break; } if (t.kind == 136) { stateStack.Push(2); - goto case 319; + goto case 324; } else { goto case 3; } @@ -70,7 +89,7 @@ int currentState = 0; if (t == null) { currentState = 3; break; } if (t.kind == 39) { stateStack.Push(3); - goto case 252; + goto case 257; } else { goto case 4; } @@ -89,7 +108,7 @@ int currentState = 0; case 5: { if (t == null) { currentState = 5; break; } if (t.kind == 159) { - goto case 315; + goto case 320; } else { if (set[1, t.kind]) { goto case 7; @@ -107,7 +126,7 @@ int currentState = 0; if (t == null) { currentState = 7; break; } if (t.kind == 39) { stateStack.Push(7); - goto case 252; + goto case 257; } else { goto case 8; } @@ -119,7 +138,7 @@ int currentState = 0; break; } else { if (t.kind == 83 || t.kind == 154) { - goto case 314; + goto case 319; } else { Error(t); goto case 9; @@ -129,7 +148,7 @@ int currentState = 0; case 9: { if (t == null) { currentState = 9; break; } if (set[3, t.kind]) { - goto case 314; + goto case 319; } else { stateStack.Push(10); goto case 15; @@ -190,7 +209,7 @@ int currentState = 0; if (t == null) { currentState = 18; break; } if (t.kind == 39) { stateStack.Push(18); - goto case 252; + goto case 257; } else { goto case 19; } @@ -203,23 +222,23 @@ int currentState = 0; } else { if (set[6, t.kind]) { stateStack.Push(20); - goto case 307; + goto case 312; } else { if (t.kind == 126 || t.kind == 208) { stateStack.Push(20); - goto case 295; + goto case 300; } else { if (t.kind == 100) { stateStack.Push(20); - goto case 284; + goto case 289; } else { if (t.kind == 118) { stateStack.Push(20); - goto case 274; + goto case 279; } else { if (t.kind == 97) { stateStack.Push(20); - goto case 262; + goto case 267; } else { if (t.kind == 171) { stateStack.Push(20); @@ -259,7 +278,7 @@ int currentState = 0; } case 24: { stateStack.Push(25); - goto case 257; + goto case 262; } case 25: { if (t == null) { currentState = 25; break; } @@ -270,7 +289,7 @@ int currentState = 0; case 26: { if (t == null) { currentState = 26; break; } if (t.kind == 62) { - currentState = 251; + currentState = 256; break; } else { goto case 27; @@ -321,45 +340,49 @@ int currentState = 0; case 34: { if (t == null) { currentState = 34; break; } if (t.kind == 87 || t.kind == 104 || t.kind == 202) { - goto case 234; + goto case 239; } else { if (t.kind == 209 || t.kind == 231) { - goto case 229; + goto case 234; } else { if (t.kind == 55 || t.kind == 191) { - goto case 226; + goto case 231; } else { if (t.kind == 187) { - goto case 223; + goto case 228; } else { if (t.kind == 134) { - goto case 204; + goto case 209; } else { if (t.kind == 195) { - goto case 189; + goto case 194; } else { if (t.kind == 229) { - goto case 184; + goto case 189; } else { if (t.kind == 107) { - goto case 175; + goto case 180; } else { if (t.kind == 123) { - goto case 148; + goto case 153; } else { if (t.kind == 117 || t.kind == 170 || t.kind == 192) { - goto case 140; + goto case 145; } else { if (t.kind == 213) { - goto case 137; + goto case 143; } else { if (t.kind == 216) { - goto case 126; + goto case 132; } else { if (set[9, t.kind]) { - goto case 35; + goto case 126; } else { - goto case 6; + if (set[10, t.kind]) { + goto case 35; + } else { + goto case 6; + } } } } @@ -391,7 +414,7 @@ int currentState = 0; } case 38: { if (t == null) { currentState = 38; break; } - if (set[10, t.kind]) { + if (set[11, t.kind]) { goto case 48; } else { if (t.kind == 134) { @@ -456,7 +479,7 @@ int currentState = 0; } case 49: { if (t == null) { currentState = 49; break; } - if (set[11, t.kind]) { + if (set[12, t.kind]) { currentState = 48; break; } else { @@ -470,11 +493,11 @@ int currentState = 0; } case 51: { if (t == null) { currentState = 51; break; } - if (set[12, t.kind]) { + if (set[13, t.kind]) { currentState = 51; break; } else { - if (set[13, t.kind]) { + if (set[14, t.kind]) { stateStack.Push(95); goto case 104; } else { @@ -499,7 +522,7 @@ int currentState = 0; } case 53: { if (t == null) { currentState = 53; break; } - if (set[14, t.kind]) { + if (set[15, t.kind]) { stateStack.Push(64); goto case 69; } else { @@ -590,7 +613,7 @@ int currentState = 0; } case 67: { if (t == null) { currentState = 67; break; } - if (set[15, t.kind]) { + if (set[16, t.kind]) { stateStack.Push(68); goto case 37; } else { @@ -617,11 +640,11 @@ int currentState = 0; if (t.kind == 129) { goto case 88; } else { - if (set[16, t.kind]) { + if (set[17, t.kind]) { stateStack.Push(70); goto case 89; } else { - if (set[17, t.kind]) { + if (set[18, t.kind]) { goto case 88; } else { Error(t); @@ -673,7 +696,7 @@ int currentState = 0; if (t.kind == 168) { goto case 85; } else { - if (set[18, t.kind]) { + if (set[19, t.kind]) { goto case 76; } else { Error(t); @@ -683,7 +706,7 @@ int currentState = 0; } case 76: { if (t == null) { currentState = 76; break; } - if (set[19, t.kind]) { + if (set[20, t.kind]) { goto case 77; } else { goto case 45; @@ -695,7 +718,7 @@ int currentState = 0; } case 78: { if (t == null) { currentState = 78; break; } - if (set[15, t.kind]) { + if (set[16, t.kind]) { goto case 82; } else { if (t.kind == 23) { @@ -712,7 +735,7 @@ int currentState = 0; } case 80: { if (t == null) { currentState = 80; break; } - if (set[15, t.kind]) { + if (set[16, t.kind]) { stateStack.Push(81); goto case 37; } else { @@ -744,7 +767,7 @@ int currentState = 0; } case 84: { if (t == null) { currentState = 84; break; } - if (set[15, t.kind]) { + if (set[16, t.kind]) { goto case 82; } else { goto case 83; @@ -757,7 +780,7 @@ int currentState = 0; } case 86: { if (t == null) { currentState = 86; break; } - if (set[14, t.kind]) { + if (set[15, t.kind]) { stateStack.Push(87); goto case 69; } else { @@ -783,7 +806,7 @@ int currentState = 0; } case 90: { if (t == null) { currentState = 90; break; } - if (set[16, t.kind]) { + if (set[17, t.kind]) { currentState = 91; break; } else { @@ -849,7 +872,7 @@ int currentState = 0; if (t.kind == 168) { goto case 101; } else { - if (set[19, t.kind]) { + if (set[20, t.kind]) { goto case 77; } else { goto case 6; @@ -879,13 +902,13 @@ int currentState = 0; } case 105: { if (t == null) { currentState = 105; break; } - if (set[20, t.kind]) { + if (set[21, t.kind]) { goto case 16; } else { if (t.kind == 36) { goto case 46; } else { - if (set[16, t.kind]) { + if (set[17, t.kind]) { goto case 124; } else { if (t.kind == 27 || t.kind == 28) { @@ -902,7 +925,7 @@ int currentState = 0; if (t.kind == 10 || t.kind == 17) { goto case 113; } else { - if (set[21, t.kind]) { + if (set[22, t.kind]) { goto case 106; } else { goto case 6; @@ -917,7 +940,7 @@ int currentState = 0; } case 106: { if (t == null) { currentState = 106; break; } - if (set[22, t.kind]) { + if (set[23, t.kind]) { goto case 111; } else { if (t.kind == 93 || t.kind == 105 || t.kind == 217) { @@ -950,7 +973,7 @@ int currentState = 0; } case 111: { if (t == null) { currentState = 111; break; } - if (set[22, t.kind]) { + if (set[23, t.kind]) { currentState = 112; break; } else { @@ -997,7 +1020,7 @@ int currentState = 0; } case 117: { if (t == null) { currentState = 117; break; } - if (set[23, t.kind]) { + if (set[24, t.kind]) { currentState = 117; break; } else { @@ -1019,8 +1042,8 @@ int currentState = 0; } case 119: { if (t == null) { currentState = 119; break; } - if (set[24, t.kind]) { - if (set[25, t.kind]) { + if (set[25, t.kind]) { + if (set[26, t.kind]) { goto case 118; } else { if (t.kind == 10) { @@ -1039,7 +1062,7 @@ int currentState = 0; } case 120: { if (t == null) { currentState = 120; break; } - if (set[26, t.kind]) { + if (set[27, t.kind]) { currentState = 120; break; } else { @@ -1075,153 +1098,213 @@ int currentState = 0; } case 126: { if (t == null) { currentState = 126; break; } - Expect(216, t); // "Try" - currentState = 127; - break; + if (t.kind == 131) { + currentState = 131; + break; + } else { + if (t.kind == 119) { + currentState = 130; + break; + } else { + if (t.kind == 88) { + currentState = 129; + break; + } else { + if (t.kind == 204) { + goto case 16; + } else { + if (t.kind == 193) { + currentState = 127; + break; + } else { + goto case 6; + } + } + } + } + } } case 127: { - stateStack.Push(128); - goto case 31; + nextTokenIsPotentialStartOfXmlMode = true; + goto case 128; } case 128: { if (t == null) { currentState = 128; break; } + if (set[16, t.kind]) { + goto case 36; + } else { + currentState = stateStack.Pop(); + goto switchlbl; + } + } + case 129: { + if (t == null) { currentState = 129; break; } + if (t.kind == 107 || t.kind == 123 || t.kind == 229) { + goto case 16; + } else { + goto case 6; + } + } + case 130: { + if (t == null) { currentState = 130; break; } + if (set[28, t.kind]) { + goto case 16; + } else { + goto case 6; + } + } + case 131: { + if (t == null) { currentState = 131; break; } + if (set[17, t.kind]) { + goto case 124; + } else { + if (t.kind == 5) { + goto case 16; + } else { + goto case 6; + } + } + } + case 132: { + if (t == null) { currentState = 132; break; } + Expect(216, t); // "Try" + currentState = 133; + break; + } + case 133: { + stateStack.Push(134); + goto case 31; + } + case 134: { + if (t == null) { currentState = 134; break; } if (t.kind == 74) { - currentState = 132; + currentState = 138; break; } else { if (t.kind == 122) { - currentState = 131; + currentState = 137; break; } else { - goto case 129; + goto case 135; } } } - case 129: { - if (t == null) { currentState = 129; break; } + case 135: { + if (t == null) { currentState = 135; break; } Expect(112, t); // "End" - currentState = 130; + currentState = 136; break; } - case 130: { - if (t == null) { currentState = 130; break; } + case 136: { + if (t == null) { currentState = 136; break; } Expect(216, t); // "Try" currentState = stateStack.Pop(); break; } - case 131: { - stateStack.Push(129); + case 137: { + stateStack.Push(135); goto case 31; } - case 132: { - if (t == null) { currentState = 132; break; } - if (set[16, t.kind]) { - stateStack.Push(135); + case 138: { + if (t == null) { currentState = 138; break; } + if (set[17, t.kind]) { + stateStack.Push(141); goto case 89; } else { - goto case 133; + goto case 139; } } - case 133: { - if (t == null) { currentState = 133; break; } + case 139: { + if (t == null) { currentState = 139; break; } if (t.kind == 227) { - currentState = 134; + currentState = 140; break; } else { - goto case 127; + goto case 133; } } - case 134: { - stateStack.Push(127); + case 140: { + stateStack.Push(133); goto case 37; } - case 135: { - if (t == null) { currentState = 135; break; } + case 141: { + if (t == null) { currentState = 141; break; } if (t.kind == 62) { - currentState = 136; + currentState = 142; break; } else { - goto case 133; + goto case 139; } } - case 136: { - stateStack.Push(133); + case 142: { + stateStack.Push(139); goto case 69; } - case 137: { - if (t == null) { currentState = 137; break; } + case 143: { + if (t == null) { currentState = 143; break; } Expect(213, t); // "Throw" - currentState = 138; + currentState = 144; break; } - case 138: { + case 144: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 139; - } - case 139: { - if (t == null) { currentState = 139; break; } - if (set[15, t.kind]) { - goto case 36; - } else { - currentState = stateStack.Pop(); - goto switchlbl; - } + goto case 128; } - case 140: { - if (t == null) { currentState = 140; break; } + case 145: { + if (t == null) { currentState = 145; break; } if (t.kind == 117 || t.kind == 170) { if (t.kind == 170) { - currentState = 143; + currentState = 148; break; } else { - goto case 143; + goto case 148; } } else { if (t.kind == 192) { - currentState = 141; + currentState = 146; break; } else { goto case 6; } } } - case 141: { - if (t == null) { currentState = 141; break; } + case 146: { + if (t == null) { currentState = 146; break; } if (t.kind == 5 || t.kind == 162) { goto case 16; } else { - goto case 142; + goto case 147; } } - case 142: { - if (t == null) { currentState = 142; break; } - if (set[16, t.kind]) { + case 147: { + if (t == null) { currentState = 147; break; } + if (set[17, t.kind]) { goto case 124; } else { goto case 6; } } - case 143: { - if (t == null) { currentState = 143; break; } + case 148: { + if (t == null) { currentState = 148; break; } Expect(117, t); // "Error" - currentState = 144; + currentState = 149; break; } - case 144: { + case 149: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 145; + goto case 150; } - case 145: { - if (t == null) { currentState = 145; break; } - if (set[15, t.kind]) { + case 150: { + if (t == null) { currentState = 150; break; } + if (set[16, t.kind]) { goto case 36; } else { if (t.kind == 131) { - currentState = 147; + currentState = 152; break; } else { if (t.kind == 192) { - currentState = 146; + currentState = 151; break; } else { goto case 6; @@ -1229,216 +1312,216 @@ int currentState = 0; } } } - case 146: { - if (t == null) { currentState = 146; break; } + case 151: { + if (t == null) { currentState = 151; break; } Expect(162, t); // "Next" currentState = stateStack.Pop(); break; } - case 147: { - if (t == null) { currentState = 147; break; } + case 152: { + if (t == null) { currentState = 152; break; } if (t.kind == 5) { goto case 16; } else { - goto case 142; + goto case 147; } } - case 148: { - if (t == null) { currentState = 148; break; } + case 153: { + if (t == null) { currentState = 153; break; } Expect(123, t); // "For" - currentState = 149; + currentState = 154; break; } - case 149: { + case 154: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 150; + goto case 155; } - case 150: { - if (t == null) { currentState = 150; break; } - if (set[13, t.kind]) { - goto case 164; + case 155: { + if (t == null) { currentState = 155; break; } + if (set[14, t.kind]) { + goto case 169; } else { if (t.kind == 109) { - goto case 151; + goto case 156; } else { goto case 6; } } } - case 151: { - if (t == null) { currentState = 151; break; } + case 156: { + if (t == null) { currentState = 156; break; } Expect(109, t); // "Each" - currentState = 152; + currentState = 157; break; } - case 152: { - stateStack.Push(153); - goto case 161; + case 157: { + stateStack.Push(158); + goto case 166; } - case 153: { - if (t == null) { currentState = 153; break; } + case 158: { + if (t == null) { currentState = 158; break; } Expect(137, t); // "In" - currentState = 154; + currentState = 159; break; } - case 154: { - stateStack.Push(155); + case 159: { + stateStack.Push(160); goto case 37; } - case 155: { - stateStack.Push(156); + case 160: { + stateStack.Push(161); goto case 31; } - case 156: { - if (t == null) { currentState = 156; break; } + case 161: { + if (t == null) { currentState = 161; break; } Expect(162, t); // "Next" - currentState = 157; + currentState = 162; break; } - case 157: { + case 162: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 158; + goto case 163; } - case 158: { - if (t == null) { currentState = 158; break; } - if (set[15, t.kind]) { - goto case 159; + case 163: { + if (t == null) { currentState = 163; break; } + if (set[16, t.kind]) { + goto case 164; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 159: { - stateStack.Push(160); + case 164: { + stateStack.Push(165); goto case 37; } - case 160: { - if (t == null) { currentState = 160; break; } + case 165: { + if (t == null) { currentState = 165; break; } if (t.kind == 23) { - currentState = 159; + currentState = 164; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 161: { - stateStack.Push(162); + case 166: { + stateStack.Push(167); goto case 104; } - case 162: { - if (t == null) { currentState = 162; break; } + case 167: { + if (t == null) { currentState = 167; break; } if (t.kind == 32) { - currentState = 163; + currentState = 168; break; } else { - goto case 163; + goto case 168; } } - case 163: { - if (t == null) { currentState = 163; break; } + case 168: { + if (t == null) { currentState = 168; break; } if (t.kind == 27 || t.kind == 28 || t.kind == 36) { - stateStack.Push(163); + stateStack.Push(168); goto case 96; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 164: { - stateStack.Push(165); - goto case 161; + case 169: { + stateStack.Push(170); + goto case 166; } - case 165: { - if (t == null) { currentState = 165; break; } + case 170: { + if (t == null) { currentState = 170; break; } Expect(21, t); // "=" - currentState = 166; + currentState = 171; break; } - case 166: { - stateStack.Push(167); + case 171: { + stateStack.Push(172); goto case 37; } - case 167: { - if (t == null) { currentState = 167; break; } + case 172: { + if (t == null) { currentState = 172; break; } if (t.kind == 203) { - currentState = 174; + currentState = 179; break; } else { - goto case 168; + goto case 173; } } - case 168: { - stateStack.Push(169); + case 173: { + stateStack.Push(174); goto case 31; } - case 169: { - if (t == null) { currentState = 169; break; } + case 174: { + if (t == null) { currentState = 174; break; } Expect(162, t); // "Next" - currentState = 170; + currentState = 175; break; } - case 170: { + case 175: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 171; + goto case 176; } - case 171: { - if (t == null) { currentState = 171; break; } - if (set[15, t.kind]) { - goto case 172; + case 176: { + if (t == null) { currentState = 176; break; } + if (set[16, t.kind]) { + goto case 177; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 172: { - stateStack.Push(173); + case 177: { + stateStack.Push(178); goto case 37; } - case 173: { - if (t == null) { currentState = 173; break; } + case 178: { + if (t == null) { currentState = 178; break; } if (t.kind == 23) { - currentState = 172; + currentState = 177; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 174: { - stateStack.Push(168); + case 179: { + stateStack.Push(173); goto case 37; } - case 175: { - if (t == null) { currentState = 175; break; } + case 180: { + if (t == null) { currentState = 180; break; } Expect(107, t); // "Do" - currentState = 176; + currentState = 181; break; } - case 176: { - if (t == null) { currentState = 176; break; } + case 181: { + if (t == null) { currentState = 181; break; } if (t.kind == 222 || t.kind == 229) { - goto case 180; + goto case 185; } else { if (t.kind == 1 || t.kind == 22) { - goto case 177; + goto case 182; } else { goto case 6; } } } - case 177: { - stateStack.Push(178); + case 182: { + stateStack.Push(183); goto case 31; } - case 178: { - if (t == null) { currentState = 178; break; } + case 183: { + if (t == null) { currentState = 183; break; } Expect(151, t); // "Loop" - currentState = 179; + currentState = 184; break; } - case 179: { - if (t == null) { currentState = 179; break; } + case 184: { + if (t == null) { currentState = 184; break; } if (t.kind == 222 || t.kind == 229) { goto case 125; } else { @@ -1446,322 +1529,322 @@ int currentState = 0; goto switchlbl; } } - case 180: { - if (t == null) { currentState = 180; break; } + case 185: { + if (t == null) { currentState = 185; break; } if (t.kind == 222 || t.kind == 229) { - currentState = 181; + currentState = 186; break; } else { Error(t); - goto case 181; + goto case 186; } } - case 181: { - stateStack.Push(182); + case 186: { + stateStack.Push(187); goto case 37; } - case 182: { - stateStack.Push(183); + case 187: { + stateStack.Push(188); goto case 31; } - case 183: { - if (t == null) { currentState = 183; break; } + case 188: { + if (t == null) { currentState = 188; break; } Expect(151, t); // "Loop" currentState = stateStack.Pop(); break; } - case 184: { - if (t == null) { currentState = 184; break; } + case 189: { + if (t == null) { currentState = 189; break; } Expect(229, t); // "While" - currentState = 185; + currentState = 190; break; } - case 185: { - stateStack.Push(186); + case 190: { + stateStack.Push(191); goto case 37; } - case 186: { - stateStack.Push(187); + case 191: { + stateStack.Push(192); goto case 31; } - case 187: { - if (t == null) { currentState = 187; break; } + case 192: { + if (t == null) { currentState = 192; break; } Expect(112, t); // "End" - currentState = 188; + currentState = 193; break; } - case 188: { - if (t == null) { currentState = 188; break; } + case 193: { + if (t == null) { currentState = 193; break; } Expect(229, t); // "While" currentState = stateStack.Pop(); break; } - case 189: { - if (t == null) { currentState = 189; break; } + case 194: { + if (t == null) { currentState = 194; break; } Expect(195, t); // "Select" - currentState = 190; + currentState = 195; break; } - case 190: { - if (t == null) { currentState = 190; break; } + case 195: { + if (t == null) { currentState = 195; break; } if (t.kind == 73) { - currentState = 191; + currentState = 196; break; } else { - goto case 191; + goto case 196; } } - case 191: { - stateStack.Push(192); + case 196: { + stateStack.Push(197); goto case 37; } - case 192: { - stateStack.Push(193); + case 197: { + stateStack.Push(198); goto case 15; } - case 193: { - if (t == null) { currentState = 193; break; } + case 198: { + if (t == null) { currentState = 198; break; } if (t.kind == 73) { - currentState = 195; + currentState = 200; break; } else { Expect(112, t); // "End" - currentState = 194; + currentState = 199; break; } } - case 194: { - if (t == null) { currentState = 194; break; } + case 199: { + if (t == null) { currentState = 199; break; } Expect(195, t); // "Select" currentState = stateStack.Pop(); break; } - case 195: { + case 200: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 196; + goto case 201; } - case 196: { - if (t == null) { currentState = 196; break; } + case 201: { + if (t == null) { currentState = 201; break; } if (t.kind == 110) { - currentState = 197; + currentState = 202; break; } else { - if (set[27, t.kind]) { - goto case 198; + if (set[29, t.kind]) { + goto case 203; } else { Error(t); - goto case 197; + goto case 202; } } } - case 197: { - stateStack.Push(193); + case 202: { + stateStack.Push(198); goto case 31; } - case 198: { - if (t == null) { currentState = 198; break; } - if (set[28, t.kind]) { + case 203: { + if (t == null) { currentState = 203; break; } + if (set[30, t.kind]) { if (t.kind == 143) { - currentState = 201; + currentState = 206; break; } else { - goto case 201; + goto case 206; } } else { - if (set[15, t.kind]) { - stateStack.Push(199); + if (set[16, t.kind]) { + stateStack.Push(204); goto case 37; } else { Error(t); - goto case 199; + goto case 204; } } } - case 199: { - if (t == null) { currentState = 199; break; } + case 204: { + if (t == null) { currentState = 204; break; } if (t.kind == 23) { - currentState = 200; + currentState = 205; break; } else { - goto case 197; + goto case 202; } } - case 200: { + case 205: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 198; - } - case 201: { - stateStack.Push(202); goto case 203; } - case 202: { - stateStack.Push(199); + case 206: { + stateStack.Push(207); + goto case 208; + } + case 207: { + stateStack.Push(204); goto case 50; } - case 203: { - if (t == null) { currentState = 203; break; } - if (set[29, t.kind]) { + case 208: { + if (t == null) { currentState = 208; break; } + if (set[31, t.kind]) { goto case 16; } else { goto case 6; } } - case 204: { - if (t == null) { currentState = 204; break; } + case 209: { + if (t == null) { currentState = 209; break; } Expect(134, t); // "If" - currentState = 205; + currentState = 210; break; } - case 205: { - stateStack.Push(206); + case 210: { + stateStack.Push(211); goto case 37; } - case 206: { - if (t == null) { currentState = 206; break; } + case 211: { + if (t == null) { currentState = 211; break; } if (t.kind == 212) { - currentState = 215; + currentState = 220; break; } else { - goto case 207; + goto case 212; } } - case 207: { - if (t == null) { currentState = 207; break; } + case 212: { + if (t == null) { currentState = 212; break; } if (t.kind == 1 || t.kind == 22) { - goto case 208; + goto case 213; } else { goto case 6; } } - case 208: { - stateStack.Push(209); + case 213: { + stateStack.Push(214); goto case 31; } - case 209: { - if (t == null) { currentState = 209; break; } + case 214: { + if (t == null) { currentState = 214; break; } if (t.kind == 110 || t.kind == 111) { if (t.kind == 110) { - currentState = 214; + currentState = 219; break; } else { if (t.kind == 111) { - goto case 211; + goto case 216; } else { Error(t); - goto case 208; + goto case 213; } } } else { Expect(112, t); // "End" - currentState = 210; + currentState = 215; break; } } - case 210: { - if (t == null) { currentState = 210; break; } + case 215: { + if (t == null) { currentState = 215; break; } Expect(134, t); // "If" currentState = stateStack.Pop(); break; } - case 211: { - if (t == null) { currentState = 211; break; } - currentState = 212; + case 216: { + if (t == null) { currentState = 216; break; } + currentState = 217; break; } - case 212: { - stateStack.Push(213); + case 217: { + stateStack.Push(218); goto case 37; } - case 213: { - if (t == null) { currentState = 213; break; } + case 218: { + if (t == null) { currentState = 218; break; } if (t.kind == 212) { - currentState = 208; + currentState = 213; break; } else { - goto case 208; + goto case 213; } } - case 214: { - if (t == null) { currentState = 214; break; } + case 219: { + if (t == null) { currentState = 219; break; } if (t.kind == 134) { - goto case 211; + goto case 216; } else { - goto case 208; + goto case 213; } } - case 215: { - if (t == null) { currentState = 215; break; } + case 220: { + if (t == null) { currentState = 220; break; } if (set[8, t.kind]) { - goto case 216; + goto case 221; } else { - goto case 207; + goto case 212; } } - case 216: { - stateStack.Push(217); + case 221: { + stateStack.Push(222); goto case 34; } - case 217: { - if (t == null) { currentState = 217; break; } + case 222: { + if (t == null) { currentState = 222; break; } if (t.kind == 22) { - currentState = 222; + currentState = 227; break; } else { if (t.kind == 110) { - goto case 219; + goto case 224; } else { - goto case 218; + goto case 223; } } } - case 218: { - if (t == null) { currentState = 218; break; } + case 223: { + if (t == null) { currentState = 223; break; } Expect(1, t); // EOL currentState = stateStack.Pop(); break; } - case 219: { - if (t == null) { currentState = 219; break; } - currentState = 220; + case 224: { + if (t == null) { currentState = 224; break; } + currentState = 225; break; } - case 220: { - if (t == null) { currentState = 220; break; } + case 225: { + if (t == null) { currentState = 225; break; } if (set[8, t.kind]) { - stateStack.Push(221); + stateStack.Push(226); goto case 34; } else { - goto case 221; + goto case 226; } } - case 221: { - if (t == null) { currentState = 221; break; } + case 226: { + if (t == null) { currentState = 226; break; } if (t.kind == 22) { - goto case 219; + goto case 224; } else { - goto case 218; + goto case 223; } } - case 222: { - if (t == null) { currentState = 222; break; } + case 227: { + if (t == null) { currentState = 227; break; } if (set[8, t.kind]) { - goto case 216; + goto case 221; } else { - goto case 217; + goto case 222; } } - case 223: { - if (t == null) { currentState = 223; break; } + case 228: { + if (t == null) { currentState = 228; break; } Expect(187, t); // "RaiseEvent" - currentState = 224; + currentState = 229; break; } - case 224: { - stateStack.Push(225); + case 229: { + stateStack.Push(230); goto case 16; } - case 225: { - if (t == null) { currentState = 225; break; } + case 230: { + if (t == null) { currentState = 230; break; } if (t.kind == 36) { currentState = 76; break; @@ -1770,105 +1853,105 @@ int currentState = 0; goto switchlbl; } } - case 226: { - if (t == null) { currentState = 226; break; } + case 231: { + if (t == null) { currentState = 231; break; } if (t.kind == 55 || t.kind == 191) { - currentState = 227; + currentState = 232; break; } else { Error(t); - goto case 227; + goto case 232; } } - case 227: { - stateStack.Push(228); + case 232: { + stateStack.Push(233); goto case 37; } - case 228: { - if (t == null) { currentState = 228; break; } + case 233: { + if (t == null) { currentState = 233; break; } Expect(23, t); // "," currentState = 36; break; } - case 229: { - if (t == null) { currentState = 229; break; } + case 234: { + if (t == null) { currentState = 234; break; } if (t.kind == 209 || t.kind == 231) { - currentState = 230; + currentState = 235; break; } else { Error(t); - goto case 230; + goto case 235; } } - case 230: { - stateStack.Push(231); + case 235: { + stateStack.Push(236); goto case 37; } - case 231: { - stateStack.Push(232); + case 236: { + stateStack.Push(237); goto case 31; } - case 232: { - if (t == null) { currentState = 232; break; } + case 237: { + if (t == null) { currentState = 237; break; } Expect(112, t); // "End" - currentState = 233; + currentState = 238; break; } - case 233: { - if (t == null) { currentState = 233; break; } + case 238: { + if (t == null) { currentState = 238; break; } if (t.kind == 209 || t.kind == 231) { goto case 16; } else { goto case 6; } } - case 234: { - if (t == null) { currentState = 234; break; } + case 239: { + if (t == null) { currentState = 239; break; } if (t.kind == 87 || t.kind == 104 || t.kind == 202) { - currentState = 235; + currentState = 240; break; } else { Error(t); - goto case 235; + goto case 240; } } - case 235: { - stateStack.Push(236); + case 240: { + stateStack.Push(241); goto case 89; } - case 236: { - if (t == null) { currentState = 236; break; } + case 241: { + if (t == null) { currentState = 241; break; } if (t.kind == 32) { - currentState = 237; + currentState = 242; break; } else { - goto case 237; + goto case 242; } } - case 237: { - if (t == null) { currentState = 237; break; } + case 242: { + if (t == null) { currentState = 242; break; } if (t.kind == 36) { - goto case 249; + goto case 254; } else { - goto case 238; + goto case 243; } } - case 238: { - if (t == null) { currentState = 238; break; } + case 243: { + if (t == null) { currentState = 243; break; } if (t.kind == 23) { - currentState = 243; + currentState = 248; break; } else { if (t.kind == 62) { - currentState = 240; + currentState = 245; break; } else { - goto case 239; + goto case 244; } } } - case 239: { - if (t == null) { currentState = 239; break; } + case 244: { + if (t == null) { currentState = 244; break; } if (t.kind == 21) { goto case 125; } else { @@ -1876,113 +1959,113 @@ int currentState = 0; goto switchlbl; } } - case 240: { - if (t == null) { currentState = 240; break; } + case 245: { + if (t == null) { currentState = 245; break; } if (t.kind == 161) { - goto case 242; + goto case 247; } else { - goto case 241; + goto case 246; } } - case 241: { - stateStack.Push(239); + case 246: { + stateStack.Push(244); goto case 69; } - case 242: { - if (t == null) { currentState = 242; break; } - currentState = 241; + case 247: { + if (t == null) { currentState = 247; break; } + currentState = 246; break; } - case 243: { - stateStack.Push(244); + case 248: { + stateStack.Push(249); goto case 89; } - case 244: { - if (t == null) { currentState = 244; break; } + case 249: { + if (t == null) { currentState = 249; break; } if (t.kind == 32) { - currentState = 245; + currentState = 250; break; } else { - goto case 245; + goto case 250; } } - case 245: { - if (t == null) { currentState = 245; break; } + case 250: { + if (t == null) { currentState = 250; break; } if (t.kind == 36) { - goto case 246; + goto case 251; } else { - goto case 238; + goto case 243; } } - case 246: { - if (t == null) { currentState = 246; break; } - currentState = 247; + case 251: { + if (t == null) { currentState = 251; break; } + currentState = 252; break; } - case 247: { - if (t == null) { currentState = 247; break; } + case 252: { + if (t == null) { currentState = 252; break; } if (t.kind == 23) { - goto case 246; + goto case 251; } else { - goto case 248; + goto case 253; } } - case 248: { - if (t == null) { currentState = 248; break; } + case 253: { + if (t == null) { currentState = 253; break; } Expect(37, t); // ")" - currentState = 238; + currentState = 243; break; } - case 249: { - if (t == null) { currentState = 249; break; } - currentState = 250; + case 254: { + if (t == null) { currentState = 254; break; } + currentState = 255; break; } - case 250: { - if (t == null) { currentState = 250; break; } + case 255: { + if (t == null) { currentState = 255; break; } if (t.kind == 23) { - goto case 249; + goto case 254; } else { - goto case 248; + goto case 253; } } - case 251: { - if (t == null) { currentState = 251; break; } + case 256: { + if (t == null) { currentState = 256; break; } if (t.kind == 39) { - stateStack.Push(251); - goto case 252; + stateStack.Push(256); + goto case 257; } else { stateStack.Push(27); goto case 69; } } - case 252: { - if (t == null) { currentState = 252; break; } + case 257: { + if (t == null) { currentState = 257; break; } Expect(39, t); // "<" - currentState = 253; + currentState = 258; break; } - case 253: { + case 258: { PushContext(Context.Attribute, t); - goto case 254; + goto case 259; } - case 254: { - if (t == null) { currentState = 254; break; } - if (set[30, t.kind]) { - currentState = 254; + case 259: { + if (t == null) { currentState = 259; break; } + if (set[32, t.kind]) { + currentState = 259; break; } else { Expect(38, t); // ">" - currentState = 255; + currentState = 260; break; } } - case 255: { + case 260: { PopContext(); - goto case 256; + goto case 261; } - case 256: { - if (t == null) { currentState = 256; break; } + case 261: { + if (t == null) { currentState = 261; break; } if (t.kind == 1) { goto case 16; } else { @@ -1990,334 +2073,334 @@ int currentState = 0; goto switchlbl; } } - case 257: { - stateStack.Push(258); - goto case 259; + case 262: { + stateStack.Push(263); + goto case 264; } - case 258: { - if (t == null) { currentState = 258; break; } + case 263: { + if (t == null) { currentState = 263; break; } if (t.kind == 23) { - currentState = 257; + currentState = 262; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 259: { - if (t == null) { currentState = 259; break; } + case 264: { + if (t == null) { currentState = 264; break; } if (t.kind == 39) { - stateStack.Push(259); - goto case 252; + stateStack.Push(264); + goto case 257; } else { - goto case 260; + goto case 265; } } - case 260: { - if (t == null) { currentState = 260; break; } - if (set[31, t.kind]) { - currentState = 260; + case 265: { + if (t == null) { currentState = 265; break; } + if (set[33, t.kind]) { + currentState = 265; break; } else { - stateStack.Push(261); + stateStack.Push(266); goto case 89; } } - case 261: { - if (t == null) { currentState = 261; break; } + case 266: { + if (t == null) { currentState = 266; break; } if (t.kind == 62) { - goto case 242; + goto case 247; } else { - goto case 239; + goto case 244; } } - case 262: { - if (t == null) { currentState = 262; break; } + case 267: { + if (t == null) { currentState = 267; break; } Expect(97, t); // "Custom" - currentState = 263; + currentState = 268; break; } - case 263: { - stateStack.Push(264); - goto case 274; + case 268: { + stateStack.Push(269); + goto case 279; } - case 264: { - if (t == null) { currentState = 264; break; } - if (set[32, t.kind]) { - goto case 266; + case 269: { + if (t == null) { currentState = 269; break; } + if (set[34, t.kind]) { + goto case 271; } else { Expect(112, t); // "End" - currentState = 265; + currentState = 270; break; } } - case 265: { - if (t == null) { currentState = 265; break; } + case 270: { + if (t == null) { currentState = 270; break; } Expect(118, t); // "Event" currentState = 30; break; } - case 266: { - if (t == null) { currentState = 266; break; } + case 271: { + if (t == null) { currentState = 271; break; } if (t.kind == 39) { - stateStack.Push(266); - goto case 252; + stateStack.Push(271); + goto case 257; } else { if (t.kind == 55 || t.kind == 187 || t.kind == 191) { - currentState = 267; + currentState = 272; break; } else { Error(t); - goto case 267; + goto case 272; } } } - case 267: { - if (t == null) { currentState = 267; break; } + case 272: { + if (t == null) { currentState = 272; break; } Expect(36, t); // "(" - currentState = 268; + currentState = 273; break; } - case 268: { - stateStack.Push(269); - goto case 257; + case 273: { + stateStack.Push(274); + goto case 262; } - case 269: { - if (t == null) { currentState = 269; break; } + case 274: { + if (t == null) { currentState = 274; break; } Expect(37, t); // ")" - currentState = 270; + currentState = 275; break; } - case 270: { - stateStack.Push(271); + case 275: { + stateStack.Push(276); goto case 31; } - case 271: { - if (t == null) { currentState = 271; break; } + case 276: { + if (t == null) { currentState = 276; break; } Expect(112, t); // "End" - currentState = 272; + currentState = 277; break; } - case 272: { - if (t == null) { currentState = 272; break; } + case 277: { + if (t == null) { currentState = 277; break; } if (t.kind == 55 || t.kind == 187 || t.kind == 191) { - currentState = 273; + currentState = 278; break; } else { Error(t); - goto case 273; + goto case 278; } } - case 273: { - stateStack.Push(264); + case 278: { + stateStack.Push(269); goto case 15; } - case 274: { - if (t == null) { currentState = 274; break; } + case 279: { + if (t == null) { currentState = 279; break; } Expect(118, t); // "Event" - currentState = 275; + currentState = 280; break; } - case 275: { - stateStack.Push(276); + case 280: { + stateStack.Push(281); goto case 89; } - case 276: { - if (t == null) { currentState = 276; break; } + case 281: { + if (t == null) { currentState = 281; break; } if (t.kind == 62) { - currentState = 283; + currentState = 288; break; } else { - if (set[33, t.kind]) { + if (set[35, t.kind]) { if (t.kind == 36) { - currentState = 281; + currentState = 286; break; } else { - goto case 277; + goto case 282; } } else { Error(t); - goto case 277; + goto case 282; } } } - case 277: { - if (t == null) { currentState = 277; break; } + case 282: { + if (t == null) { currentState = 282; break; } if (t.kind == 135) { - goto case 278; + goto case 283; } else { goto case 30; } } - case 278: { - if (t == null) { currentState = 278; break; } - currentState = 279; + case 283: { + if (t == null) { currentState = 283; break; } + currentState = 284; break; } - case 279: { - stateStack.Push(280); + case 284: { + stateStack.Push(285); goto case 69; } - case 280: { - if (t == null) { currentState = 280; break; } + case 285: { + if (t == null) { currentState = 285; break; } if (t.kind == 23) { - goto case 278; + goto case 283; } else { goto case 30; } } - case 281: { - if (t == null) { currentState = 281; break; } - if (set[34, t.kind]) { - stateStack.Push(282); - goto case 257; + case 286: { + if (t == null) { currentState = 286; break; } + if (set[36, t.kind]) { + stateStack.Push(287); + goto case 262; } else { - goto case 282; + goto case 287; } } - case 282: { - if (t == null) { currentState = 282; break; } + case 287: { + if (t == null) { currentState = 287; break; } Expect(37, t); // ")" - currentState = 277; + currentState = 282; break; } - case 283: { - stateStack.Push(277); + case 288: { + stateStack.Push(282); goto case 69; } - case 284: { - if (t == null) { currentState = 284; break; } + case 289: { + if (t == null) { currentState = 289; break; } Expect(100, t); // "Declare" - currentState = 285; + currentState = 290; break; } - case 285: { - if (t == null) { currentState = 285; break; } + case 290: { + if (t == null) { currentState = 290; break; } if (t.kind == 61 || t.kind == 65 || t.kind == 221) { - currentState = 286; + currentState = 291; break; } else { - goto case 286; + goto case 291; } } - case 286: { - if (t == null) { currentState = 286; break; } + case 291: { + if (t == null) { currentState = 291; break; } if (t.kind == 126 || t.kind == 208) { - currentState = 287; + currentState = 292; break; } else { Error(t); - goto case 287; + goto case 292; } } - case 287: { - stateStack.Push(288); + case 292: { + stateStack.Push(293); goto case 89; } - case 288: { - if (t == null) { currentState = 288; break; } + case 293: { + if (t == null) { currentState = 293; break; } Expect(148, t); // "Lib" - currentState = 289; + currentState = 294; break; } - case 289: { - if (t == null) { currentState = 289; break; } + case 294: { + if (t == null) { currentState = 294; break; } Expect(3, t); // LiteralString - currentState = 290; + currentState = 295; break; } - case 290: { - if (t == null) { currentState = 290; break; } + case 295: { + if (t == null) { currentState = 295; break; } if (t.kind == 58) { - currentState = 294; + currentState = 299; break; } else { - goto case 291; + goto case 296; } } - case 291: { - if (t == null) { currentState = 291; break; } + case 296: { + if (t == null) { currentState = 296; break; } if (t.kind == 36) { - currentState = 292; + currentState = 297; break; } else { goto case 30; } } - case 292: { - if (t == null) { currentState = 292; break; } - if (set[34, t.kind]) { - stateStack.Push(293); - goto case 257; + case 297: { + if (t == null) { currentState = 297; break; } + if (set[36, t.kind]) { + stateStack.Push(298); + goto case 262; } else { - goto case 293; + goto case 298; } } - case 293: { - if (t == null) { currentState = 293; break; } + case 298: { + if (t == null) { currentState = 298; break; } Expect(37, t); // ")" currentState = 30; break; } - case 294: { - if (t == null) { currentState = 294; break; } + case 299: { + if (t == null) { currentState = 299; break; } Expect(3, t); // LiteralString - currentState = 291; + currentState = 296; break; } - case 295: { - if (t == null) { currentState = 295; break; } + case 300: { + if (t == null) { currentState = 300; break; } if (t.kind == 126 || t.kind == 208) { - currentState = 296; + currentState = 301; break; } else { Error(t); - goto case 296; + goto case 301; } } - case 296: { + case 301: { PushContext(Context.IdentifierExpected, t); - goto case 297; + goto case 302; } - case 297: { - if (t == null) { currentState = 297; break; } - currentState = 298; + case 302: { + if (t == null) { currentState = 302; break; } + currentState = 303; break; } - case 298: { + case 303: { PopContext(); - goto case 299; + goto case 304; } - case 299: { - if (t == null) { currentState = 299; break; } + case 304: { + if (t == null) { currentState = 304; break; } if (t.kind == 36) { - currentState = 305; + currentState = 310; break; } else { - goto case 300; + goto case 305; } } - case 300: { - if (t == null) { currentState = 300; break; } + case 305: { + if (t == null) { currentState = 305; break; } if (t.kind == 62) { - currentState = 304; + currentState = 309; break; } else { - goto case 301; + goto case 306; } } - case 301: { - stateStack.Push(302); + case 306: { + stateStack.Push(307); goto case 31; } - case 302: { - if (t == null) { currentState = 302; break; } + case 307: { + if (t == null) { currentState = 307; break; } Expect(112, t); // "End" - currentState = 303; + currentState = 308; break; } - case 303: { - if (t == null) { currentState = 303; break; } + case 308: { + if (t == null) { currentState = 308; break; } if (t.kind == 126 || t.kind == 208) { currentState = 30; break; @@ -2326,139 +2409,139 @@ int currentState = 0; goto case 30; } } - case 304: { - stateStack.Push(301); + case 309: { + stateStack.Push(306); goto case 69; } - case 305: { - if (t == null) { currentState = 305; break; } - if (set[34, t.kind]) { - stateStack.Push(306); - goto case 257; + case 310: { + if (t == null) { currentState = 310; break; } + if (set[36, t.kind]) { + stateStack.Push(311); + goto case 262; } else { - goto case 306; + goto case 311; } } - case 306: { - if (t == null) { currentState = 306; break; } + case 311: { + if (t == null) { currentState = 311; break; } Expect(37, t); // ")" - currentState = 300; + currentState = 305; break; } - case 307: { - if (t == null) { currentState = 307; break; } + case 312: { + if (t == null) { currentState = 312; break; } if (t.kind == 87) { - currentState = 308; + currentState = 313; break; } else { - goto case 308; + goto case 313; } } - case 308: { - stateStack.Push(309); - goto case 313; + case 313: { + stateStack.Push(314); + goto case 318; } - case 309: { - if (t == null) { currentState = 309; break; } + case 314: { + if (t == null) { currentState = 314; break; } if (t.kind == 62) { - currentState = 312; + currentState = 317; break; } else { - goto case 310; + goto case 315; } } - case 310: { - if (t == null) { currentState = 310; break; } + case 315: { + if (t == null) { currentState = 315; break; } if (t.kind == 21) { - currentState = 311; + currentState = 316; break; } else { goto case 30; } } - case 311: { + case 316: { stateStack.Push(30); goto case 37; } - case 312: { - stateStack.Push(310); + case 317: { + stateStack.Push(315); goto case 69; } - case 313: { - if (t == null) { currentState = 313; break; } - if (set[35, t.kind]) { + case 318: { + if (t == null) { currentState = 318; break; } + if (set[37, t.kind]) { goto case 16; } else { goto case 6; } } - case 314: { - if (t == null) { currentState = 314; break; } + case 319: { + if (t == null) { currentState = 319; break; } currentState = 9; break; } - case 315: { - if (t == null) { currentState = 315; break; } + case 320: { + if (t == null) { currentState = 320; break; } Expect(159, t); // "Namespace" - currentState = 316; + currentState = 321; break; } - case 316: { - if (t == null) { currentState = 316; break; } + case 321: { + if (t == null) { currentState = 321; break; } if (set[3, t.kind]) { - currentState = 316; + currentState = 321; break; } else { - stateStack.Push(317); + stateStack.Push(322); goto case 15; } } - case 317: { - if (t == null) { currentState = 317; break; } - if (set[36, t.kind]) { - stateStack.Push(317); + case 322: { + if (t == null) { currentState = 322; break; } + if (set[38, t.kind]) { + stateStack.Push(322); goto case 5; } else { Expect(112, t); // "End" - currentState = 318; + currentState = 323; break; } } - case 318: { - if (t == null) { currentState = 318; break; } + case 323: { + if (t == null) { currentState = 323; break; } Expect(159, t); // "Namespace" currentState = 30; break; } - case 319: { - if (t == null) { currentState = 319; break; } + case 324: { + if (t == null) { currentState = 324; break; } Expect(136, t); // "Imports" - currentState = 320; + currentState = 325; break; } - case 320: { + case 325: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 321; + goto case 326; } - case 321: { - if (t == null) { currentState = 321; break; } + case 326: { + if (t == null) { currentState = 326; break; } if (set[3, t.kind]) { - currentState = 321; + currentState = 326; break; } else { goto case 30; } } - case 322: { - if (t == null) { currentState = 322; break; } + case 327: { + if (t == null) { currentState = 327; break; } Expect(172, t); // "Option" - currentState = 323; + currentState = 328; break; } - case 323: { - if (t == null) { currentState = 323; break; } + case 328: { + if (t == null) { currentState = 328; break; } if (set[3, t.kind]) { - currentState = 323; + currentState = 328; break; } else { goto case 30; @@ -2471,7 +2554,7 @@ int currentState = 0; public void Advance() { Console.WriteLine("Advance"); - InformToken(null); + InformTokenInternal(null); } static readonly bool[,] set = { @@ -2482,8 +2565,9 @@ int currentState = 0; {x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,T,x,x, T,x,x,T, T,x,T,x, x,x,x,x, x,x,x,T, x,x,T,x, T,x,x,x, T,T,T,x, x,x,x,x, T,x,x,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, x,x,T,x, x,T,x,T, x,x,x,T, x,T,T,T, x,T,T,T, x,T,T,x, x,x,x,x, x,x,x,x, x,T,T,x, x,T,x,x, x,x,x,x, T,x,T,T, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, T,x,T,x, T,x,x,x, x,x}, {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, T,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,T,T,T, x,T,x,T, x,T,T,x, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x}, {x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,x,x,x, x,T,x,x, x,x,x,x, T,x,x,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,x,x,x, x,x,x,x, x,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x}, - {x,T,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, T,x,x,T, T,T,T,T, T,x,T,x, T,T,T,T, x,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,T, x,T,x,x, T,T,x,T, x,T,x,x, T,x,x,x, T,x,T,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,T,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, T,x,x,T, x,x,x,x, x,T,T,x, x,x,x,x, x,T,T,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,x, T,T,x,T, x,x,x,T, x,x}, - {x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, T,x,x,T, T,T,T,T, T,x,T,x, T,T,T,T, x,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,T, x,T,x,x, T,T,x,T, x,T,x,x, T,x,x,x, T,x,T,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,T,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, T,x,x,T, x,x,x,x, x,T,T,x, x,x,x,x, x,T,T,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,x, T,T,x,T, x,x,x,T, x,x}, + {x,T,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,x,T,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, T,x,x,T, T,T,T,T, T,x,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,T, x,T,x,T, T,T,x,T, x,T,x,x, T,x,x,T, T,x,T,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,T,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, T,T,x,T, x,x,x,x, x,T,T,x, T,x,x,x, x,T,T,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,x, T,T,x,T, x,x,x,T, x,x}, + {x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, T,x,x,T, T,T,T,T, T,x,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, T,T,T,T, x,x,x,x, x,x,x,T, x,T,x,T, T,T,x,T, x,T,x,x, T,x,x,T, T,x,T,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,T,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,T, x,x,x,T, T,T,x,T, x,x,x,x, x,T,T,x, T,x,x,x, x,T,T,T, x,T,x,T, T,T,T,x, x,T,T,x, x,x,x,x, T,T,x,T, x,x,x,T, x,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x}, {x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, T,x,x,T, T,T,T,T, T,x,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, x,T,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,x,x,x, T,x,T,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,x,x,T, x,T,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,x,x,T, x,x}, {x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,T, T,T,T,T, T,x,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, x,T,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,x,x,x, T,x,x,x, x,x,T,x, x,x,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,x,x,T, x,T,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,x,x,T, x,x}, {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, T,T,T,x, x,T,T,T, x,T,x,x, x,x,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x, x,x,x,T, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,x, x,T,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,x, x,x}, @@ -2502,6 +2586,7 @@ int currentState = 0; {x,T,T,T, T,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x}, {x,T,T,T, T,T,T,T, T,T,x,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x}, {x,T,T,T, T,T,T,T, T,T,T,x, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,T,T,T, T,x}, + {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, T,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x}, {x,x,T,T, T,T,T,T, T,T,T,x, x,x,x,x, x,T,x,x, x,T,x,x, x,x,x,T, T,T,T,x, x,x,x,x, T,x,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, T,T,x,x, x,T,x,T, T,T,T,x, x,T,x,x, x,x,x,T, T,T,T,T, T,x,T,x, T,T,T,x, x,T,T,T, T,T,T,T, T,T,x,x, x,x,x,T, x,T,T,x, x,x,x,x, x,x,x,T, x,x,x,x, T,T,x,x, x,T,x,x, T,x,x,x, T,x,T,x, x,x,T,x, x,x,T,T, x,T,T,x, x,x,x,x, T,x,x,x, x,T,T,x, x,T,x,T, T,x,x,x, x,T,x,x, x,x,x,T, x,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,T,T, x,x,x,T, x,T,T,x, x,T,T,x, x,x,x,x, T,x,x,x, x,x,x,T, x,x}, {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x}, {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,T,T, T,T,T,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x}, diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame index 0c03d49511..5ce382eabd 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/PushParser.frame @@ -51,8 +51,27 @@ partial class ExpressionFinder { void Error(Token t) { } - + + Token consumedEndToken; + public void InformToken(Token t) + { + if (consumedEndToken != null) { + if (t.kind == Tokens.EOL || t.kind == Tokens.Colon) { + consumedEndToken = null; + return; // ignore End statement + } + InformTokenInternal(consumedEndToken); + consumedEndToken = null; + } + if (t.kind == Tokens.End) { + consumedEndToken = t; + } else { + InformTokenInternal(t); + } + } + + void InformTokenInternal(Token t) { nextTokenIsPotentialStartOfXmlMode = false; ApplyToken(t); @@ -62,7 +81,7 @@ partial class ExpressionFinder { public void Advance() { Console.WriteLine("Advance"); - InformToken(null); + InformTokenInternal(null); } static readonly bool[,] set = { diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/XmlModeLexerTests.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/XmlModeLexerTests.cs index 70e131fabb..6c19192db8 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/XmlModeLexerTests.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/XmlModeLexerTests.cs @@ -663,6 +663,55 @@ End Try"; CheckFoot(lexer); } + + [Test] + public void BranchStatements() + { + string statement = @"GoTo 5 +GoTo LabelName +Exit Do +Exit For +Exit While +Exit Select +Exit Sub +Exit Function +Exit Property +Exit Try +Continue Do +Continue For +Continue While +Stop +End +Return +Return 5 +Return "; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.GoTo, Tokens.LiteralInteger, Tokens.EOL, + Tokens.GoTo, Tokens.Identifier, Tokens.EOL, + Tokens.Exit, Tokens.Do, Tokens.EOL, + Tokens.Exit, Tokens.For, Tokens.EOL, + Tokens.Exit, Tokens.While, Tokens.EOL, + Tokens.Exit, Tokens.Select, Tokens.EOL, + Tokens.Exit, Tokens.Sub, Tokens.EOL, + Tokens.Exit, Tokens.Function, Tokens.EOL, + Tokens.Exit, Tokens.Property, Tokens.EOL, + Tokens.Exit, Tokens.Try, Tokens.EOL, + Tokens.Continue, Tokens.Do, Tokens.EOL, + Tokens.Continue, Tokens.For, Tokens.EOL, + Tokens.Continue, Tokens.While, Tokens.EOL, + Tokens.Stop, Tokens.EOL, + Tokens.End, Tokens.EOL, + Tokens.Return, Tokens.EOL, + Tokens.Return, Tokens.LiteralInteger, Tokens.EOL, + Tokens.Return, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement + ); + + CheckFoot(lexer); + } #endregion #region Helpers