From 037707520ebc434710431848656d1f293ca2841a Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 20 Jun 2010 13:23:53 +0000 Subject: [PATCH] - added ThrowStatement and TryStatement - added more unit tests - fixed bugs in XML mode detection in Case clauses git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@5976 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../VBNet/Experimental/ExpressionFinder.atg | 26 +- .../Src/Parser/VBNet/Experimental/Parser.cs | 1719 +++++++++-------- .../VBNet/Experimental/Test/ParserTests.cs | 2 +- .../Experimental/Test/XmlModeLexerTests.cs | 167 ++ 4 files changed, 1135 insertions(+), 779 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 d33106a030..98b59e698c 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg @@ -521,6 +521,8 @@ Statement = | DoLoopStatement | ForStatement | ErrorHandlingStatement + | ThrowStatement + | TryStatement | InvocationStatement . @@ -564,10 +566,10 @@ MultilineIfRemainder = SelectStatement = "Select" [ "Case" ] Expression StatementTerminator { - "Case" ( + "Case" (. nextTokenIsPotentialStartOfXmlMode = true; .) ( "Else" | ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression ) - { "," ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression ) } + { "," (. nextTokenIsPotentialStartOfXmlMode = true; .) ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression ) } ) StatementTerminatorAndBlock } @@ -622,6 +624,26 @@ ErrorHandlingStatement = | "Resume" ( "Next" | LiteralInteger | Identifier ) . +ThrowStatement = + "Throw" (. nextTokenIsPotentialStartOfXmlMode = true; .) [ Expression ] +. + +TryStatement = + "Try" + StatementTerminatorAndBlock + { + "Catch" + [ Identifier [ "As" TypeName ] ] + [ "When" Expression ] + StatementTerminatorAndBlock + } + [ + "Finally" + StatementTerminatorAndBlock + ] + "End" "Try" +. + 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 23c44c68d2..b1332b9b3e 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs @@ -52,7 +52,7 @@ int currentState = 0; if (t == null) { currentState = 1; break; } if (t.kind == 172) { stateStack.Push(1); - goto case 300; + goto case 322; } else { goto case 2; } @@ -61,7 +61,7 @@ int currentState = 0; if (t == null) { currentState = 2; break; } if (t.kind == 136) { stateStack.Push(2); - goto case 297; + goto case 319; } else { goto case 3; } @@ -70,7 +70,7 @@ int currentState = 0; if (t == null) { currentState = 3; break; } if (t.kind == 39) { stateStack.Push(3); - goto case 230; + goto case 252; } else { goto case 4; } @@ -89,7 +89,7 @@ int currentState = 0; case 5: { if (t == null) { currentState = 5; break; } if (t.kind == 159) { - goto case 293; + goto case 315; } else { if (set[1, t.kind]) { goto case 7; @@ -107,7 +107,7 @@ int currentState = 0; if (t == null) { currentState = 7; break; } if (t.kind == 39) { stateStack.Push(7); - goto case 230; + goto case 252; } else { goto case 8; } @@ -119,7 +119,7 @@ int currentState = 0; break; } else { if (t.kind == 83 || t.kind == 154) { - goto case 292; + goto case 314; } else { Error(t); goto case 9; @@ -129,7 +129,7 @@ int currentState = 0; case 9: { if (t == null) { currentState = 9; break; } if (set[3, t.kind]) { - goto case 292; + goto case 314; } else { stateStack.Push(10); goto case 15; @@ -190,7 +190,7 @@ int currentState = 0; if (t == null) { currentState = 18; break; } if (t.kind == 39) { stateStack.Push(18); - goto case 230; + goto case 252; } else { goto case 19; } @@ -203,23 +203,23 @@ int currentState = 0; } else { if (set[6, t.kind]) { stateStack.Push(20); - goto case 285; + goto case 307; } else { if (t.kind == 126 || t.kind == 208) { stateStack.Push(20); - goto case 273; + goto case 295; } else { if (t.kind == 100) { stateStack.Push(20); - goto case 262; + goto case 284; } else { if (t.kind == 118) { stateStack.Push(20); - goto case 252; + goto case 274; } else { if (t.kind == 97) { stateStack.Push(20); - goto case 240; + goto case 262; } else { if (t.kind == 171) { stateStack.Push(20); @@ -259,7 +259,7 @@ int currentState = 0; } case 24: { stateStack.Push(25); - goto case 235; + goto case 257; } case 25: { if (t == null) { currentState = 25; break; } @@ -270,7 +270,7 @@ int currentState = 0; case 26: { if (t == null) { currentState = 26; break; } if (t.kind == 62) { - currentState = 229; + currentState = 251; break; } else { goto case 27; @@ -321,39 +321,47 @@ int currentState = 0; case 34: { if (t == null) { currentState = 34; break; } if (t.kind == 87 || t.kind == 104 || t.kind == 202) { - goto case 212; + goto case 234; } else { if (t.kind == 209 || t.kind == 231) { - goto case 207; + goto case 229; } else { if (t.kind == 55 || t.kind == 191) { - goto case 204; + goto case 226; } else { if (t.kind == 187) { - goto case 201; + goto case 223; } else { if (t.kind == 134) { - goto case 183; + goto case 204; } else { if (t.kind == 195) { - goto case 170; + goto case 189; } else { if (t.kind == 229) { - goto case 165; + goto case 184; } else { if (t.kind == 107) { - goto case 156; + goto case 175; } else { if (t.kind == 123) { - goto case 129; + goto case 148; } else { if (t.kind == 117 || t.kind == 170 || t.kind == 192) { - goto case 121; + goto case 140; } else { - if (set[9, t.kind]) { - goto case 35; + if (t.kind == 213) { + goto case 137; } else { - goto case 6; + if (t.kind == 216) { + goto case 126; + } else { + if (set[9, t.kind]) { + goto case 35; + } else { + goto case 6; + } + } } } } @@ -369,7 +377,7 @@ int currentState = 0; case 35: { if (t == null) { currentState = 35; break; } if (t.kind == 72) { - goto case 120; + goto case 125; } else { goto case 36; } @@ -467,11 +475,11 @@ int currentState = 0; break; } else { if (set[13, t.kind]) { - stateStack.Push(90); - goto case 99; + stateStack.Push(95); + goto case 104; } else { if (t.kind == 218) { - currentState = 87; + currentState = 92; break; } else { if (t.kind == 161) { @@ -607,14 +615,14 @@ int currentState = 0; case 69: { if (t == null) { currentState = 69; break; } if (t.kind == 129) { - goto case 83; + goto case 88; } else { if (set[16, t.kind]) { stateStack.Push(70); - goto case 84; + goto case 89; } else { if (set[17, t.kind]) { - goto case 83; + goto case 88; } else { Error(t); goto case 70; @@ -663,7 +671,7 @@ int currentState = 0; case 75: { if (t == null) { currentState = 75; break; } if (t.kind == 168) { - goto case 80; + goto case 85; } else { if (set[18, t.kind]) { goto case 76; @@ -675,7 +683,7 @@ int currentState = 0; } case 76: { if (t == null) { currentState = 76; break; } - if (set[15, t.kind]) { + if (set[19, t.kind]) { goto case 77; } else { goto case 45; @@ -686,173 +694,216 @@ int currentState = 0; goto case 78; } case 78: { - stateStack.Push(79); - goto case 37; + if (t == null) { currentState = 78; break; } + if (set[15, t.kind]) { + goto case 82; + } else { + if (t.kind == 23) { + goto case 79; + } else { + goto case 6; + } + } } case 79: { if (t == null) { currentState = 79; break; } + currentState = 80; + break; + } + case 80: { + if (t == null) { currentState = 80; break; } + if (set[15, t.kind]) { + stateStack.Push(81); + goto case 37; + } else { + goto case 81; + } + } + case 81: { + if (t == null) { currentState = 81; break; } + if (t.kind == 23) { + goto case 79; + } else { + currentState = stateStack.Pop(); + goto switchlbl; + } + } + case 82: { + stateStack.Push(83); + goto case 37; + } + case 83: { + if (t == null) { currentState = 83; break; } if (t.kind == 23) { - currentState = 78; + currentState = 84; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 80: { - if (t == null) { currentState = 80; break; } - currentState = 81; + case 84: { + if (t == null) { currentState = 84; break; } + if (set[15, t.kind]) { + goto case 82; + } else { + goto case 83; + } + } + case 85: { + if (t == null) { currentState = 85; break; } + currentState = 86; break; } - case 81: { - if (t == null) { currentState = 81; break; } + case 86: { + if (t == null) { currentState = 86; break; } if (set[14, t.kind]) { - stateStack.Push(82); + stateStack.Push(87); goto case 69; } else { - goto case 82; + goto case 87; } } - case 82: { - if (t == null) { currentState = 82; break; } + case 87: { + if (t == null) { currentState = 87; break; } if (t.kind == 23) { - goto case 80; + goto case 85; } else { goto case 45; } } - case 83: { - if (t == null) { currentState = 83; break; } + case 88: { + if (t == null) { currentState = 88; break; } currentState = 70; break; } - case 84: { + case 89: { PushContext(Context.IdentifierExpected, t); - goto case 85; + goto case 90; } - case 85: { - if (t == null) { currentState = 85; break; } + case 90: { + if (t == null) { currentState = 90; break; } if (set[16, t.kind]) { - currentState = 86; + currentState = 91; break; } else { Error(t); - goto case 86; + goto case 91; } } - case 86: { + case 91: { PopContext(); currentState = stateStack.Pop(); goto switchlbl; } - case 87: { - stateStack.Push(88); + case 92: { + stateStack.Push(93); goto case 50; } - case 88: { - if (t == null) { currentState = 88; break; } + case 93: { + if (t == null) { currentState = 93; break; } Expect(143, t); // "Is" - currentState = 89; + currentState = 94; break; } - case 89: { + case 94: { goto case 69; } - case 90: { - if (t == null) { currentState = 90; break; } + case 95: { + if (t == null) { currentState = 95; break; } if (t.kind == 27 || t.kind == 28 || t.kind == 36) { - stateStack.Push(90); - goto case 91; + stateStack.Push(95); + goto case 96; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 91: { - if (t == null) { currentState = 91; break; } + case 96: { + if (t == null) { currentState = 96; break; } if (t.kind == 36) { - currentState = 94; + currentState = 99; break; } else { if (t.kind == 27 || t.kind == 28) { - goto case 92; + goto case 97; } else { goto case 6; } } } - case 92: { - if (t == null) { currentState = 92; break; } - currentState = 93; + case 97: { + if (t == null) { currentState = 97; break; } + currentState = 98; break; } - case 93: { + case 98: { goto case 16; } - case 94: { + case 99: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 95; + goto case 100; } - case 95: { - if (t == null) { currentState = 95; break; } + case 100: { + if (t == null) { currentState = 100; break; } if (t.kind == 168) { - goto case 96; + goto case 101; } else { - if (set[15, t.kind]) { + if (set[19, t.kind]) { goto case 77; } else { goto case 6; } } } - case 96: { - if (t == null) { currentState = 96; break; } - currentState = 97; + case 101: { + if (t == null) { currentState = 101; break; } + currentState = 102; break; } - case 97: { - stateStack.Push(98); + case 102: { + stateStack.Push(103); goto case 69; } - case 98: { - if (t == null) { currentState = 98; break; } + case 103: { + if (t == null) { currentState = 103; break; } if (t.kind == 23) { - goto case 96; + goto case 101; } else { goto case 45; } } - case 99: { + case 104: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 100; + goto case 105; } - case 100: { - if (t == null) { currentState = 100; break; } - if (set[19, t.kind]) { + case 105: { + if (t == null) { currentState = 105; break; } + if (set[20, t.kind]) { goto case 16; } else { if (t.kind == 36) { goto case 46; } else { if (set[16, t.kind]) { - goto case 119; + goto case 124; } else { if (t.kind == 27 || t.kind == 28) { - goto case 92; + goto case 97; } else { if (t.kind == 128) { - currentState = 118; + currentState = 123; break; } else { if (t.kind == 235) { - currentState = 116; + currentState = 121; break; } else { if (t.kind == 10 || t.kind == 17) { - goto case 108; + goto case 113; } else { - if (set[20, t.kind]) { - goto case 101; + if (set[21, t.kind]) { + goto case 106; } else { goto case 6; } @@ -864,73 +915,73 @@ int currentState = 0; } } } - case 101: { - if (t == null) { currentState = 101; break; } - if (set[21, t.kind]) { - goto case 106; + case 106: { + if (t == null) { currentState = 106; break; } + if (set[22, t.kind]) { + goto case 111; } else { if (t.kind == 93 || t.kind == 105 || t.kind == 217) { - currentState = 102; + currentState = 107; break; } else { goto case 6; } } } - case 102: { - if (t == null) { currentState = 102; break; } + case 107: { + if (t == null) { currentState = 107; break; } Expect(36, t); // "(" - currentState = 103; + currentState = 108; break; } - case 103: { - stateStack.Push(104); + case 108: { + stateStack.Push(109); goto case 37; } - case 104: { - if (t == null) { currentState = 104; break; } + case 109: { + if (t == null) { currentState = 109; break; } Expect(23, t); // "," - currentState = 105; + currentState = 110; break; } - case 105: { + case 110: { stateStack.Push(45); goto case 69; } - case 106: { - if (t == null) { currentState = 106; break; } - if (set[21, t.kind]) { - currentState = 107; + case 111: { + if (t == null) { currentState = 111; break; } + if (set[22, t.kind]) { + currentState = 112; break; } else { Error(t); - goto case 107; + goto case 112; } } - case 107: { - if (t == null) { currentState = 107; break; } + case 112: { + if (t == null) { currentState = 112; break; } Expect(36, t); // "(" currentState = 47; break; } - case 108: { + case 113: { PushContext(Context.Xml, t); - goto case 109; + goto case 114; } - case 109: { - if (t == null) { currentState = 109; break; } + case 114: { + if (t == null) { currentState = 114; break; } if (t.kind == 17) { - currentState = 109; + currentState = 114; break; } else { - stateStack.Push(110); - goto case 111; + stateStack.Push(115); + goto case 116; } } - case 110: { - if (t == null) { currentState = 110; break; } + case 115: { + if (t == null) { currentState = 115; break; } if (t.kind == 17) { - currentState = 110; + currentState = 115; break; } else { PopContext(); @@ -938,58 +989,58 @@ int currentState = 0; goto switchlbl; } } - case 111: { - if (t == null) { currentState = 111; break; } + case 116: { + if (t == null) { currentState = 116; break; } Expect(10, t); // XmlOpenTag - currentState = 112; + currentState = 117; break; } - case 112: { - if (t == null) { currentState = 112; break; } - if (set[22, t.kind]) { - currentState = 112; + case 117: { + if (t == null) { currentState = 117; break; } + if (set[23, t.kind]) { + currentState = 117; break; } else { if (t.kind == 14) { goto case 16; } else { if (t.kind == 11) { - goto case 113; + goto case 118; } else { goto case 6; } } } } - case 113: { - if (t == null) { currentState = 113; break; } - currentState = 114; + case 118: { + if (t == null) { currentState = 118; break; } + currentState = 119; break; } - case 114: { - if (t == null) { currentState = 114; break; } - if (set[23, t.kind]) { - if (set[24, t.kind]) { - goto case 113; + case 119: { + if (t == null) { currentState = 119; break; } + if (set[24, t.kind]) { + if (set[25, t.kind]) { + goto case 118; } else { if (t.kind == 10) { - stateStack.Push(114); - goto case 111; + stateStack.Push(119); + goto case 116; } else { Error(t); - goto case 114; + goto case 119; } } } else { Expect(15, t); // XmlOpenEndTag - currentState = 115; + currentState = 120; break; } } - case 115: { - if (t == null) { currentState = 115; break; } - if (set[25, t.kind]) { - currentState = 115; + case 120: { + if (t == null) { currentState = 120; break; } + if (set[26, t.kind]) { + currentState = 120; break; } else { Expect(11, t); // XmlCloseTag @@ -997,156 +1048,109 @@ int currentState = 0; break; } } - case 116: { - if (t == null) { currentState = 116; break; } + case 121: { + if (t == null) { currentState = 121; break; } Expect(36, t); // "(" - currentState = 117; + currentState = 122; break; } - case 117: { + case 122: { readXmlIdentifier = true; stateStack.Push(45); - goto case 84; - } - case 118: { - if (t == null) { currentState = 118; break; } - Expect(36, t); // "(" - currentState = 105; - break; - } - case 119: { - goto case 84; - } - case 120: { - if (t == null) { currentState = 120; break; } - currentState = 36; - break; - } - case 121: { - if (t == null) { currentState = 121; break; } - if (t.kind == 117 || t.kind == 170) { - if (t.kind == 170) { - currentState = 124; - break; - } else { - goto case 124; - } - } else { - if (t.kind == 192) { - currentState = 122; - break; - } else { - goto case 6; - } - } - } - case 122: { - if (t == null) { currentState = 122; break; } - if (t.kind == 5 || t.kind == 162) { - goto case 16; - } else { - goto case 123; - } + goto case 89; } case 123: { if (t == null) { currentState = 123; break; } - if (set[16, t.kind]) { - goto case 119; - } else { - goto case 6; - } + Expect(36, t); // "(" + currentState = 110; + break; } case 124: { - if (t == null) { currentState = 124; break; } - Expect(117, t); // "Error" - currentState = 125; - break; + goto case 89; } case 125: { - nextTokenIsPotentialStartOfXmlMode = true; - goto case 126; + if (t == null) { currentState = 125; break; } + currentState = 36; + break; } case 126: { if (t == null) { currentState = 126; break; } - if (set[15, t.kind]) { - goto case 36; - } else { - if (t.kind == 131) { - currentState = 128; - break; - } else { - if (t.kind == 192) { - currentState = 127; - break; - } else { - goto case 6; - } - } - } + Expect(216, t); // "Try" + currentState = 127; + break; } case 127: { - if (t == null) { currentState = 127; break; } - Expect(162, t); // "Next" - currentState = stateStack.Pop(); - break; + stateStack.Push(128); + goto case 31; } case 128: { if (t == null) { currentState = 128; break; } - if (t.kind == 5) { - goto case 16; + if (t.kind == 74) { + currentState = 132; + break; } else { - goto case 123; + if (t.kind == 122) { + currentState = 131; + break; + } else { + goto case 129; + } } } case 129: { if (t == null) { currentState = 129; break; } - Expect(123, t); // "For" + Expect(112, t); // "End" currentState = 130; break; } case 130: { - nextTokenIsPotentialStartOfXmlMode = true; - goto case 131; - } + if (t == null) { currentState = 130; break; } + Expect(216, t); // "Try" + currentState = stateStack.Pop(); + break; + } case 131: { - if (t == null) { currentState = 131; break; } - if (set[13, t.kind]) { - goto case 145; - } else { - if (t.kind == 109) { - goto case 132; - } else { - goto case 6; - } - } + stateStack.Push(129); + goto case 31; } case 132: { if (t == null) { currentState = 132; break; } - Expect(109, t); // "Each" - currentState = 133; - break; + if (set[16, t.kind]) { + stateStack.Push(135); + goto case 89; + } else { + goto case 133; + } } case 133: { - stateStack.Push(134); - goto case 142; + if (t == null) { currentState = 133; break; } + if (t.kind == 227) { + currentState = 134; + break; + } else { + goto case 127; + } } case 134: { - if (t == null) { currentState = 134; break; } - Expect(137, t); // "In" - currentState = 135; - break; + stateStack.Push(127); + goto case 37; } case 135: { - stateStack.Push(136); - goto case 37; + if (t == null) { currentState = 135; break; } + if (t.kind == 62) { + currentState = 136; + break; + } else { + goto case 133; + } } case 136: { - stateStack.Push(137); - goto case 31; + stateStack.Push(133); + goto case 69; } case 137: { if (t == null) { currentState = 137; break; } - Expect(162, t); // "Next" + Expect(213, t); // "Throw" currentState = 138; break; } @@ -1157,445 +1161,607 @@ int currentState = 0; case 139: { if (t == null) { currentState = 139; break; } if (set[15, t.kind]) { - goto case 140; + goto case 36; } else { currentState = stateStack.Pop(); goto switchlbl; } } case 140: { - stateStack.Push(141); - goto case 37; + if (t == null) { currentState = 140; break; } + if (t.kind == 117 || t.kind == 170) { + if (t.kind == 170) { + currentState = 143; + break; + } else { + goto case 143; + } + } else { + if (t.kind == 192) { + currentState = 141; + break; + } else { + goto case 6; + } + } } case 141: { if (t == null) { currentState = 141; break; } + if (t.kind == 5 || t.kind == 162) { + goto case 16; + } else { + goto case 142; + } + } + case 142: { + if (t == null) { currentState = 142; break; } + if (set[16, t.kind]) { + goto case 124; + } else { + goto case 6; + } + } + case 143: { + if (t == null) { currentState = 143; break; } + Expect(117, t); // "Error" + currentState = 144; + break; + } + case 144: { + nextTokenIsPotentialStartOfXmlMode = true; + goto case 145; + } + case 145: { + if (t == null) { currentState = 145; break; } + if (set[15, t.kind]) { + goto case 36; + } else { + if (t.kind == 131) { + currentState = 147; + break; + } else { + if (t.kind == 192) { + currentState = 146; + break; + } else { + goto case 6; + } + } + } + } + case 146: { + if (t == null) { currentState = 146; break; } + Expect(162, t); // "Next" + currentState = stateStack.Pop(); + break; + } + case 147: { + if (t == null) { currentState = 147; break; } + if (t.kind == 5) { + goto case 16; + } else { + goto case 142; + } + } + case 148: { + if (t == null) { currentState = 148; break; } + Expect(123, t); // "For" + currentState = 149; + break; + } + case 149: { + nextTokenIsPotentialStartOfXmlMode = true; + goto case 150; + } + case 150: { + if (t == null) { currentState = 150; break; } + if (set[13, t.kind]) { + goto case 164; + } else { + if (t.kind == 109) { + goto case 151; + } else { + goto case 6; + } + } + } + case 151: { + if (t == null) { currentState = 151; break; } + Expect(109, t); // "Each" + currentState = 152; + break; + } + case 152: { + stateStack.Push(153); + goto case 161; + } + case 153: { + if (t == null) { currentState = 153; break; } + Expect(137, t); // "In" + currentState = 154; + break; + } + case 154: { + stateStack.Push(155); + goto case 37; + } + case 155: { + stateStack.Push(156); + goto case 31; + } + case 156: { + if (t == null) { currentState = 156; break; } + Expect(162, t); // "Next" + currentState = 157; + break; + } + case 157: { + nextTokenIsPotentialStartOfXmlMode = true; + goto case 158; + } + case 158: { + if (t == null) { currentState = 158; break; } + if (set[15, t.kind]) { + goto case 159; + } else { + currentState = stateStack.Pop(); + goto switchlbl; + } + } + case 159: { + stateStack.Push(160); + goto case 37; + } + case 160: { + if (t == null) { currentState = 160; break; } if (t.kind == 23) { - currentState = 140; + currentState = 159; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 142: { - stateStack.Push(143); - goto case 99; + case 161: { + stateStack.Push(162); + goto case 104; } - case 143: { - if (t == null) { currentState = 143; break; } + case 162: { + if (t == null) { currentState = 162; break; } if (t.kind == 32) { - currentState = 144; + currentState = 163; break; } else { - goto case 144; + goto case 163; } } - case 144: { - if (t == null) { currentState = 144; break; } + case 163: { + if (t == null) { currentState = 163; break; } if (t.kind == 27 || t.kind == 28 || t.kind == 36) { - stateStack.Push(144); - goto case 91; + stateStack.Push(163); + goto case 96; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 145: { - stateStack.Push(146); - goto case 142; + case 164: { + stateStack.Push(165); + goto case 161; } - case 146: { - if (t == null) { currentState = 146; break; } + case 165: { + if (t == null) { currentState = 165; break; } Expect(21, t); // "=" - currentState = 147; + currentState = 166; break; } - case 147: { - stateStack.Push(148); + case 166: { + stateStack.Push(167); goto case 37; } - case 148: { - if (t == null) { currentState = 148; break; } + case 167: { + if (t == null) { currentState = 167; break; } if (t.kind == 203) { - currentState = 155; + currentState = 174; break; } else { - goto case 149; + goto case 168; } } - case 149: { - stateStack.Push(150); + case 168: { + stateStack.Push(169); goto case 31; } - case 150: { - if (t == null) { currentState = 150; break; } + case 169: { + if (t == null) { currentState = 169; break; } Expect(162, t); // "Next" - currentState = 151; + currentState = 170; break; } - case 151: { + case 170: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 152; + goto case 171; } - case 152: { - if (t == null) { currentState = 152; break; } + case 171: { + if (t == null) { currentState = 171; break; } if (set[15, t.kind]) { - goto case 153; + goto case 172; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 153: { - stateStack.Push(154); + case 172: { + stateStack.Push(173); goto case 37; } - case 154: { - if (t == null) { currentState = 154; break; } + case 173: { + if (t == null) { currentState = 173; break; } if (t.kind == 23) { - currentState = 153; + currentState = 172; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 155: { - stateStack.Push(149); + case 174: { + stateStack.Push(168); goto case 37; } - case 156: { - if (t == null) { currentState = 156; break; } + case 175: { + if (t == null) { currentState = 175; break; } Expect(107, t); // "Do" - currentState = 157; + currentState = 176; break; } - case 157: { - if (t == null) { currentState = 157; break; } + case 176: { + if (t == null) { currentState = 176; break; } if (t.kind == 222 || t.kind == 229) { - goto case 161; + goto case 180; } else { if (t.kind == 1 || t.kind == 22) { - goto case 158; + goto case 177; } else { goto case 6; } } } - case 158: { - stateStack.Push(159); + case 177: { + stateStack.Push(178); goto case 31; } - case 159: { - if (t == null) { currentState = 159; break; } + case 178: { + if (t == null) { currentState = 178; break; } Expect(151, t); // "Loop" - currentState = 160; + currentState = 179; break; } - case 160: { - if (t == null) { currentState = 160; break; } + case 179: { + if (t == null) { currentState = 179; break; } if (t.kind == 222 || t.kind == 229) { - goto case 120; + goto case 125; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 161: { - if (t == null) { currentState = 161; break; } + case 180: { + if (t == null) { currentState = 180; break; } if (t.kind == 222 || t.kind == 229) { - currentState = 162; + currentState = 181; break; } else { Error(t); - goto case 162; + goto case 181; } } - case 162: { - stateStack.Push(163); + case 181: { + stateStack.Push(182); goto case 37; } - case 163: { - stateStack.Push(164); + case 182: { + stateStack.Push(183); goto case 31; } - case 164: { - if (t == null) { currentState = 164; break; } + case 183: { + if (t == null) { currentState = 183; break; } Expect(151, t); // "Loop" currentState = stateStack.Pop(); break; } - case 165: { - if (t == null) { currentState = 165; break; } + case 184: { + if (t == null) { currentState = 184; break; } Expect(229, t); // "While" - currentState = 166; + currentState = 185; break; } - case 166: { - stateStack.Push(167); + case 185: { + stateStack.Push(186); goto case 37; } - case 167: { - stateStack.Push(168); + case 186: { + stateStack.Push(187); goto case 31; } - case 168: { - if (t == null) { currentState = 168; break; } + case 187: { + if (t == null) { currentState = 187; break; } Expect(112, t); // "End" - currentState = 169; + currentState = 188; break; } - case 169: { - if (t == null) { currentState = 169; break; } + case 188: { + if (t == null) { currentState = 188; break; } Expect(229, t); // "While" currentState = stateStack.Pop(); break; } - case 170: { - if (t == null) { currentState = 170; break; } + case 189: { + if (t == null) { currentState = 189; break; } Expect(195, t); // "Select" - currentState = 171; + currentState = 190; break; } - case 171: { - if (t == null) { currentState = 171; break; } + case 190: { + if (t == null) { currentState = 190; break; } if (t.kind == 73) { - currentState = 172; + currentState = 191; break; } else { - goto case 172; + goto case 191; } } - case 172: { - stateStack.Push(173); + case 191: { + stateStack.Push(192); goto case 37; } - case 173: { - stateStack.Push(174); + case 192: { + stateStack.Push(193); goto case 15; } - case 174: { - if (t == null) { currentState = 174; break; } + case 193: { + if (t == null) { currentState = 193; break; } if (t.kind == 73) { - currentState = 176; + currentState = 195; break; } else { Expect(112, t); // "End" - currentState = 175; + currentState = 194; break; } } - case 175: { - if (t == null) { currentState = 175; break; } + case 194: { + if (t == null) { currentState = 194; break; } Expect(195, t); // "Select" currentState = stateStack.Pop(); break; } - case 176: { - if (t == null) { currentState = 176; break; } + case 195: { + nextTokenIsPotentialStartOfXmlMode = true; + goto case 196; + } + case 196: { + if (t == null) { currentState = 196; break; } if (t.kind == 110) { - currentState = 177; + currentState = 197; break; } else { - if (set[26, t.kind]) { - goto case 178; + if (set[27, t.kind]) { + goto case 198; } else { Error(t); - goto case 177; + goto case 197; } } } - case 177: { - stateStack.Push(174); + case 197: { + stateStack.Push(193); goto case 31; } - case 178: { - if (t == null) { currentState = 178; break; } - if (set[27, t.kind]) { + case 198: { + if (t == null) { currentState = 198; break; } + if (set[28, t.kind]) { if (t.kind == 143) { - currentState = 180; + currentState = 201; break; } else { - goto case 180; + goto case 201; } } else { if (set[15, t.kind]) { - stateStack.Push(179); + stateStack.Push(199); goto case 37; } else { Error(t); - goto case 179; + goto case 199; } } } - case 179: { - if (t == null) { currentState = 179; break; } + case 199: { + if (t == null) { currentState = 199; break; } if (t.kind == 23) { - currentState = 178; + currentState = 200; break; } else { - goto case 177; + goto case 197; } } - case 180: { - stateStack.Push(181); - goto case 182; + case 200: { + nextTokenIsPotentialStartOfXmlMode = true; + goto case 198; } - case 181: { - stateStack.Push(179); + case 201: { + stateStack.Push(202); + goto case 203; + } + case 202: { + stateStack.Push(199); goto case 50; } - case 182: { - if (t == null) { currentState = 182; break; } - if (set[28, t.kind]) { + case 203: { + if (t == null) { currentState = 203; break; } + if (set[29, t.kind]) { goto case 16; } else { goto case 6; } } - case 183: { - if (t == null) { currentState = 183; break; } + case 204: { + if (t == null) { currentState = 204; break; } Expect(134, t); // "If" - currentState = 184; + currentState = 205; break; } - case 184: { - stateStack.Push(185); + case 205: { + stateStack.Push(206); goto case 37; } - case 185: { - if (t == null) { currentState = 185; break; } + case 206: { + if (t == null) { currentState = 206; break; } if (t.kind == 212) { - currentState = 194; + currentState = 215; break; } else { - goto case 186; + goto case 207; } } - case 186: { - if (t == null) { currentState = 186; break; } + case 207: { + if (t == null) { currentState = 207; break; } if (t.kind == 1 || t.kind == 22) { - goto case 187; + goto case 208; } else { goto case 6; } } - case 187: { - stateStack.Push(188); + case 208: { + stateStack.Push(209); goto case 31; } - case 188: { - if (t == null) { currentState = 188; break; } + case 209: { + if (t == null) { currentState = 209; break; } if (t.kind == 110 || t.kind == 111) { if (t.kind == 110) { - currentState = 193; + currentState = 214; break; } else { if (t.kind == 111) { - goto case 190; + goto case 211; } else { Error(t); - goto case 187; + goto case 208; } } } else { Expect(112, t); // "End" - currentState = 189; + currentState = 210; break; } } - case 189: { - if (t == null) { currentState = 189; break; } + case 210: { + if (t == null) { currentState = 210; break; } Expect(134, t); // "If" currentState = stateStack.Pop(); break; } - case 190: { - if (t == null) { currentState = 190; break; } - currentState = 191; + case 211: { + if (t == null) { currentState = 211; break; } + currentState = 212; break; } - case 191: { - stateStack.Push(192); + case 212: { + stateStack.Push(213); goto case 37; } - case 192: { - if (t == null) { currentState = 192; break; } + case 213: { + if (t == null) { currentState = 213; break; } if (t.kind == 212) { - currentState = 187; + currentState = 208; break; } else { - goto case 187; + goto case 208; } } - case 193: { - if (t == null) { currentState = 193; break; } + case 214: { + if (t == null) { currentState = 214; break; } if (t.kind == 134) { - goto case 190; + goto case 211; } else { - goto case 187; + goto case 208; } } - case 194: { - if (t == null) { currentState = 194; break; } + case 215: { + if (t == null) { currentState = 215; break; } if (set[8, t.kind]) { - goto case 195; + goto case 216; } else { - goto case 186; + goto case 207; } } - case 195: { - stateStack.Push(196); + case 216: { + stateStack.Push(217); goto case 34; } - case 196: { - if (t == null) { currentState = 196; break; } + case 217: { + if (t == null) { currentState = 217; break; } if (t.kind == 22) { - currentState = 195; + currentState = 222; break; } else { if (t.kind == 110) { - goto case 198; + goto case 219; } else { - goto case 197; + goto case 218; } } } - case 197: { - if (t == null) { currentState = 197; break; } + case 218: { + if (t == null) { currentState = 218; break; } Expect(1, t); // EOL currentState = stateStack.Pop(); break; } - case 198: { - if (t == null) { currentState = 198; break; } - currentState = 199; + case 219: { + if (t == null) { currentState = 219; break; } + currentState = 220; break; } - case 199: { - stateStack.Push(200); - goto case 34; + case 220: { + if (t == null) { currentState = 220; break; } + if (set[8, t.kind]) { + stateStack.Push(221); + goto case 34; + } else { + goto case 221; + } } - case 200: { - if (t == null) { currentState = 200; break; } + case 221: { + if (t == null) { currentState = 221; break; } if (t.kind == 22) { - goto case 198; + goto case 219; } else { - goto case 197; + goto case 218; } } - case 201: { - if (t == null) { currentState = 201; break; } + case 222: { + if (t == null) { currentState = 222; break; } + if (set[8, t.kind]) { + goto case 216; + } else { + goto case 217; + } + } + case 223: { + if (t == null) { currentState = 223; break; } Expect(187, t); // "RaiseEvent" - currentState = 202; + currentState = 224; break; } - case 202: { - stateStack.Push(203); + case 224: { + stateStack.Push(225); goto case 16; } - case 203: { - if (t == null) { currentState = 203; break; } + case 225: { + if (t == null) { currentState = 225; break; } if (t.kind == 36) { currentState = 76; break; @@ -1604,219 +1770,219 @@ int currentState = 0; goto switchlbl; } } - case 204: { - if (t == null) { currentState = 204; break; } + case 226: { + if (t == null) { currentState = 226; break; } if (t.kind == 55 || t.kind == 191) { - currentState = 205; + currentState = 227; break; } else { Error(t); - goto case 205; + goto case 227; } } - case 205: { - stateStack.Push(206); + case 227: { + stateStack.Push(228); goto case 37; } - case 206: { - if (t == null) { currentState = 206; break; } + case 228: { + if (t == null) { currentState = 228; break; } Expect(23, t); // "," currentState = 36; break; } - case 207: { - if (t == null) { currentState = 207; break; } + case 229: { + if (t == null) { currentState = 229; break; } if (t.kind == 209 || t.kind == 231) { - currentState = 208; + currentState = 230; break; } else { Error(t); - goto case 208; + goto case 230; } } - case 208: { - stateStack.Push(209); + case 230: { + stateStack.Push(231); goto case 37; } - case 209: { - stateStack.Push(210); + case 231: { + stateStack.Push(232); goto case 31; } - case 210: { - if (t == null) { currentState = 210; break; } + case 232: { + if (t == null) { currentState = 232; break; } Expect(112, t); // "End" - currentState = 211; + currentState = 233; break; } - case 211: { - if (t == null) { currentState = 211; break; } + case 233: { + if (t == null) { currentState = 233; break; } if (t.kind == 209 || t.kind == 231) { goto case 16; } else { goto case 6; } } - case 212: { - if (t == null) { currentState = 212; break; } + case 234: { + if (t == null) { currentState = 234; break; } if (t.kind == 87 || t.kind == 104 || t.kind == 202) { - currentState = 213; + currentState = 235; break; } else { Error(t); - goto case 213; + goto case 235; } } - case 213: { - stateStack.Push(214); - goto case 84; + case 235: { + stateStack.Push(236); + goto case 89; } - case 214: { - if (t == null) { currentState = 214; break; } + case 236: { + if (t == null) { currentState = 236; break; } if (t.kind == 32) { - currentState = 215; + currentState = 237; break; } else { - goto case 215; + goto case 237; } } - case 215: { - if (t == null) { currentState = 215; break; } + case 237: { + if (t == null) { currentState = 237; break; } if (t.kind == 36) { - goto case 227; + goto case 249; } else { - goto case 216; + goto case 238; } } - case 216: { - if (t == null) { currentState = 216; break; } + case 238: { + if (t == null) { currentState = 238; break; } if (t.kind == 23) { - currentState = 221; + currentState = 243; break; } else { if (t.kind == 62) { - currentState = 218; + currentState = 240; break; } else { - goto case 217; + goto case 239; } } } - case 217: { - if (t == null) { currentState = 217; break; } + case 239: { + if (t == null) { currentState = 239; break; } if (t.kind == 21) { - goto case 120; + goto case 125; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 218: { - if (t == null) { currentState = 218; break; } + case 240: { + if (t == null) { currentState = 240; break; } if (t.kind == 161) { - goto case 220; + goto case 242; } else { - goto case 219; + goto case 241; } } - case 219: { - stateStack.Push(217); + case 241: { + stateStack.Push(239); goto case 69; } - case 220: { - if (t == null) { currentState = 220; break; } - currentState = 219; + case 242: { + if (t == null) { currentState = 242; break; } + currentState = 241; break; } - case 221: { - stateStack.Push(222); - goto case 84; + case 243: { + stateStack.Push(244); + goto case 89; } - case 222: { - if (t == null) { currentState = 222; break; } + case 244: { + if (t == null) { currentState = 244; break; } if (t.kind == 32) { - currentState = 223; + currentState = 245; break; } else { - goto case 223; + goto case 245; } } - case 223: { - if (t == null) { currentState = 223; break; } + case 245: { + if (t == null) { currentState = 245; break; } if (t.kind == 36) { - goto case 224; + goto case 246; } else { - goto case 216; + goto case 238; } } - case 224: { - if (t == null) { currentState = 224; break; } - currentState = 225; + case 246: { + if (t == null) { currentState = 246; break; } + currentState = 247; break; } - case 225: { - if (t == null) { currentState = 225; break; } + case 247: { + if (t == null) { currentState = 247; break; } if (t.kind == 23) { - goto case 224; + goto case 246; } else { - goto case 226; + goto case 248; } } - case 226: { - if (t == null) { currentState = 226; break; } + case 248: { + if (t == null) { currentState = 248; break; } Expect(37, t); // ")" - currentState = 216; + currentState = 238; break; } - case 227: { - if (t == null) { currentState = 227; break; } - currentState = 228; + case 249: { + if (t == null) { currentState = 249; break; } + currentState = 250; break; } - case 228: { - if (t == null) { currentState = 228; break; } + case 250: { + if (t == null) { currentState = 250; break; } if (t.kind == 23) { - goto case 227; + goto case 249; } else { - goto case 226; + goto case 248; } } - case 229: { - if (t == null) { currentState = 229; break; } + case 251: { + if (t == null) { currentState = 251; break; } if (t.kind == 39) { - stateStack.Push(229); - goto case 230; + stateStack.Push(251); + goto case 252; } else { stateStack.Push(27); goto case 69; } } - case 230: { - if (t == null) { currentState = 230; break; } + case 252: { + if (t == null) { currentState = 252; break; } Expect(39, t); // "<" - currentState = 231; + currentState = 253; break; } - case 231: { + case 253: { PushContext(Context.Attribute, t); - goto case 232; + goto case 254; } - case 232: { - if (t == null) { currentState = 232; break; } - if (set[29, t.kind]) { - currentState = 232; + case 254: { + if (t == null) { currentState = 254; break; } + if (set[30, t.kind]) { + currentState = 254; break; } else { Expect(38, t); // ">" - currentState = 233; + currentState = 255; break; } } - case 233: { + case 255: { PopContext(); - goto case 234; + goto case 256; } - case 234: { - if (t == null) { currentState = 234; break; } + case 256: { + if (t == null) { currentState = 256; break; } if (t.kind == 1) { goto case 16; } else { @@ -1824,334 +1990,334 @@ int currentState = 0; goto switchlbl; } } - case 235: { - stateStack.Push(236); - goto case 237; + case 257: { + stateStack.Push(258); + goto case 259; } - case 236: { - if (t == null) { currentState = 236; break; } + case 258: { + if (t == null) { currentState = 258; break; } if (t.kind == 23) { - currentState = 235; + currentState = 257; break; } else { currentState = stateStack.Pop(); goto switchlbl; } } - case 237: { - if (t == null) { currentState = 237; break; } + case 259: { + if (t == null) { currentState = 259; break; } if (t.kind == 39) { - stateStack.Push(237); - goto case 230; + stateStack.Push(259); + goto case 252; } else { - goto case 238; + goto case 260; } } - case 238: { - if (t == null) { currentState = 238; break; } - if (set[30, t.kind]) { - currentState = 238; + case 260: { + if (t == null) { currentState = 260; break; } + if (set[31, t.kind]) { + currentState = 260; break; } else { - stateStack.Push(239); - goto case 84; + stateStack.Push(261); + goto case 89; } } - case 239: { - if (t == null) { currentState = 239; break; } + case 261: { + if (t == null) { currentState = 261; break; } if (t.kind == 62) { - goto case 220; + goto case 242; } else { - goto case 217; + goto case 239; } } - case 240: { - if (t == null) { currentState = 240; break; } + case 262: { + if (t == null) { currentState = 262; break; } Expect(97, t); // "Custom" - currentState = 241; + currentState = 263; break; } - case 241: { - stateStack.Push(242); - goto case 252; + case 263: { + stateStack.Push(264); + goto case 274; } - case 242: { - if (t == null) { currentState = 242; break; } - if (set[31, t.kind]) { - goto case 244; + case 264: { + if (t == null) { currentState = 264; break; } + if (set[32, t.kind]) { + goto case 266; } else { Expect(112, t); // "End" - currentState = 243; + currentState = 265; break; } } - case 243: { - if (t == null) { currentState = 243; break; } + case 265: { + if (t == null) { currentState = 265; break; } Expect(118, t); // "Event" currentState = 30; break; } - case 244: { - if (t == null) { currentState = 244; break; } + case 266: { + if (t == null) { currentState = 266; break; } if (t.kind == 39) { - stateStack.Push(244); - goto case 230; + stateStack.Push(266); + goto case 252; } else { if (t.kind == 55 || t.kind == 187 || t.kind == 191) { - currentState = 245; + currentState = 267; break; } else { Error(t); - goto case 245; + goto case 267; } } } - case 245: { - if (t == null) { currentState = 245; break; } + case 267: { + if (t == null) { currentState = 267; break; } Expect(36, t); // "(" - currentState = 246; + currentState = 268; break; } - case 246: { - stateStack.Push(247); - goto case 235; + case 268: { + stateStack.Push(269); + goto case 257; } - case 247: { - if (t == null) { currentState = 247; break; } + case 269: { + if (t == null) { currentState = 269; break; } Expect(37, t); // ")" - currentState = 248; + currentState = 270; break; } - case 248: { - stateStack.Push(249); + case 270: { + stateStack.Push(271); goto case 31; } - case 249: { - if (t == null) { currentState = 249; break; } + case 271: { + if (t == null) { currentState = 271; break; } Expect(112, t); // "End" - currentState = 250; + currentState = 272; break; } - case 250: { - if (t == null) { currentState = 250; break; } + case 272: { + if (t == null) { currentState = 272; break; } if (t.kind == 55 || t.kind == 187 || t.kind == 191) { - currentState = 251; + currentState = 273; break; } else { Error(t); - goto case 251; + goto case 273; } } - case 251: { - stateStack.Push(242); + case 273: { + stateStack.Push(264); goto case 15; } - case 252: { - if (t == null) { currentState = 252; break; } + case 274: { + if (t == null) { currentState = 274; break; } Expect(118, t); // "Event" - currentState = 253; + currentState = 275; break; } - case 253: { - stateStack.Push(254); - goto case 84; + case 275: { + stateStack.Push(276); + goto case 89; } - case 254: { - if (t == null) { currentState = 254; break; } + case 276: { + if (t == null) { currentState = 276; break; } if (t.kind == 62) { - currentState = 261; + currentState = 283; break; } else { - if (set[32, t.kind]) { + if (set[33, t.kind]) { if (t.kind == 36) { - currentState = 259; + currentState = 281; break; } else { - goto case 255; + goto case 277; } } else { Error(t); - goto case 255; + goto case 277; } } } - case 255: { - if (t == null) { currentState = 255; break; } + case 277: { + if (t == null) { currentState = 277; break; } if (t.kind == 135) { - goto case 256; + goto case 278; } else { goto case 30; } } - case 256: { - if (t == null) { currentState = 256; break; } - currentState = 257; + case 278: { + if (t == null) { currentState = 278; break; } + currentState = 279; break; } - case 257: { - stateStack.Push(258); + case 279: { + stateStack.Push(280); goto case 69; } - case 258: { - if (t == null) { currentState = 258; break; } + case 280: { + if (t == null) { currentState = 280; break; } if (t.kind == 23) { - goto case 256; + goto case 278; } else { goto case 30; } } - case 259: { - if (t == null) { currentState = 259; break; } - if (set[33, t.kind]) { - stateStack.Push(260); - goto case 235; + case 281: { + if (t == null) { currentState = 281; break; } + if (set[34, t.kind]) { + stateStack.Push(282); + goto case 257; } else { - goto case 260; + goto case 282; } } - case 260: { - if (t == null) { currentState = 260; break; } + case 282: { + if (t == null) { currentState = 282; break; } Expect(37, t); // ")" - currentState = 255; + currentState = 277; break; } - case 261: { - stateStack.Push(255); + case 283: { + stateStack.Push(277); goto case 69; } - case 262: { - if (t == null) { currentState = 262; break; } + case 284: { + if (t == null) { currentState = 284; break; } Expect(100, t); // "Declare" - currentState = 263; + currentState = 285; break; } - case 263: { - if (t == null) { currentState = 263; break; } + case 285: { + if (t == null) { currentState = 285; break; } if (t.kind == 61 || t.kind == 65 || t.kind == 221) { - currentState = 264; + currentState = 286; break; } else { - goto case 264; + goto case 286; } } - case 264: { - if (t == null) { currentState = 264; break; } + case 286: { + if (t == null) { currentState = 286; break; } if (t.kind == 126 || t.kind == 208) { - currentState = 265; + currentState = 287; break; } else { Error(t); - goto case 265; + goto case 287; } } - case 265: { - stateStack.Push(266); - goto case 84; + case 287: { + stateStack.Push(288); + goto case 89; } - case 266: { - if (t == null) { currentState = 266; break; } + case 288: { + if (t == null) { currentState = 288; break; } Expect(148, t); // "Lib" - currentState = 267; + currentState = 289; break; } - case 267: { - if (t == null) { currentState = 267; break; } + case 289: { + if (t == null) { currentState = 289; break; } Expect(3, t); // LiteralString - currentState = 268; + currentState = 290; break; } - case 268: { - if (t == null) { currentState = 268; break; } + case 290: { + if (t == null) { currentState = 290; break; } if (t.kind == 58) { - currentState = 272; + currentState = 294; break; } else { - goto case 269; + goto case 291; } } - case 269: { - if (t == null) { currentState = 269; break; } + case 291: { + if (t == null) { currentState = 291; break; } if (t.kind == 36) { - currentState = 270; + currentState = 292; break; } else { goto case 30; } } - case 270: { - if (t == null) { currentState = 270; break; } - if (set[33, t.kind]) { - stateStack.Push(271); - goto case 235; + case 292: { + if (t == null) { currentState = 292; break; } + if (set[34, t.kind]) { + stateStack.Push(293); + goto case 257; } else { - goto case 271; + goto case 293; } } - case 271: { - if (t == null) { currentState = 271; break; } + case 293: { + if (t == null) { currentState = 293; break; } Expect(37, t); // ")" currentState = 30; break; } - case 272: { - if (t == null) { currentState = 272; break; } + case 294: { + if (t == null) { currentState = 294; break; } Expect(3, t); // LiteralString - currentState = 269; + currentState = 291; break; } - case 273: { - if (t == null) { currentState = 273; break; } + case 295: { + if (t == null) { currentState = 295; break; } if (t.kind == 126 || t.kind == 208) { - currentState = 274; + currentState = 296; break; } else { Error(t); - goto case 274; + goto case 296; } } - case 274: { + case 296: { PushContext(Context.IdentifierExpected, t); - goto case 275; + goto case 297; } - case 275: { - if (t == null) { currentState = 275; break; } - currentState = 276; + case 297: { + if (t == null) { currentState = 297; break; } + currentState = 298; break; } - case 276: { + case 298: { PopContext(); - goto case 277; + goto case 299; } - case 277: { - if (t == null) { currentState = 277; break; } + case 299: { + if (t == null) { currentState = 299; break; } if (t.kind == 36) { - currentState = 283; + currentState = 305; break; } else { - goto case 278; + goto case 300; } } - case 278: { - if (t == null) { currentState = 278; break; } + case 300: { + if (t == null) { currentState = 300; break; } if (t.kind == 62) { - currentState = 282; + currentState = 304; break; } else { - goto case 279; + goto case 301; } } - case 279: { - stateStack.Push(280); + case 301: { + stateStack.Push(302); goto case 31; } - case 280: { - if (t == null) { currentState = 280; break; } + case 302: { + if (t == null) { currentState = 302; break; } Expect(112, t); // "End" - currentState = 281; + currentState = 303; break; } - case 281: { - if (t == null) { currentState = 281; break; } + case 303: { + if (t == null) { currentState = 303; break; } if (t.kind == 126 || t.kind == 208) { currentState = 30; break; @@ -2160,139 +2326,139 @@ int currentState = 0; goto case 30; } } - case 282: { - stateStack.Push(279); + case 304: { + stateStack.Push(301); goto case 69; } - case 283: { - if (t == null) { currentState = 283; break; } - if (set[33, t.kind]) { - stateStack.Push(284); - goto case 235; + case 305: { + if (t == null) { currentState = 305; break; } + if (set[34, t.kind]) { + stateStack.Push(306); + goto case 257; } else { - goto case 284; + goto case 306; } } - case 284: { - if (t == null) { currentState = 284; break; } + case 306: { + if (t == null) { currentState = 306; break; } Expect(37, t); // ")" - currentState = 278; + currentState = 300; break; } - case 285: { - if (t == null) { currentState = 285; break; } + case 307: { + if (t == null) { currentState = 307; break; } if (t.kind == 87) { - currentState = 286; + currentState = 308; break; } else { - goto case 286; + goto case 308; } } - case 286: { - stateStack.Push(287); - goto case 291; + case 308: { + stateStack.Push(309); + goto case 313; } - case 287: { - if (t == null) { currentState = 287; break; } + case 309: { + if (t == null) { currentState = 309; break; } if (t.kind == 62) { - currentState = 290; + currentState = 312; break; } else { - goto case 288; + goto case 310; } } - case 288: { - if (t == null) { currentState = 288; break; } + case 310: { + if (t == null) { currentState = 310; break; } if (t.kind == 21) { - currentState = 289; + currentState = 311; break; } else { goto case 30; } } - case 289: { + case 311: { stateStack.Push(30); goto case 37; } - case 290: { - stateStack.Push(288); + case 312: { + stateStack.Push(310); goto case 69; } - case 291: { - if (t == null) { currentState = 291; break; } - if (set[34, t.kind]) { + case 313: { + if (t == null) { currentState = 313; break; } + if (set[35, t.kind]) { goto case 16; } else { goto case 6; } } - case 292: { - if (t == null) { currentState = 292; break; } + case 314: { + if (t == null) { currentState = 314; break; } currentState = 9; break; } - case 293: { - if (t == null) { currentState = 293; break; } + case 315: { + if (t == null) { currentState = 315; break; } Expect(159, t); // "Namespace" - currentState = 294; + currentState = 316; break; } - case 294: { - if (t == null) { currentState = 294; break; } + case 316: { + if (t == null) { currentState = 316; break; } if (set[3, t.kind]) { - currentState = 294; + currentState = 316; break; } else { - stateStack.Push(295); + stateStack.Push(317); goto case 15; } } - case 295: { - if (t == null) { currentState = 295; break; } - if (set[35, t.kind]) { - stateStack.Push(295); + case 317: { + if (t == null) { currentState = 317; break; } + if (set[36, t.kind]) { + stateStack.Push(317); goto case 5; } else { Expect(112, t); // "End" - currentState = 296; + currentState = 318; break; } } - case 296: { - if (t == null) { currentState = 296; break; } + case 318: { + if (t == null) { currentState = 318; break; } Expect(159, t); // "Namespace" currentState = 30; break; } - case 297: { - if (t == null) { currentState = 297; break; } + case 319: { + if (t == null) { currentState = 319; break; } Expect(136, t); // "Imports" - currentState = 298; + currentState = 320; break; } - case 298: { + case 320: { nextTokenIsPotentialStartOfXmlMode = true; - goto case 299; + goto case 321; } - case 299: { - if (t == null) { currentState = 299; break; } + case 321: { + if (t == null) { currentState = 321; break; } if (set[3, t.kind]) { - currentState = 299; + currentState = 321; break; } else { goto case 30; } } - case 300: { - if (t == null) { currentState = 300; break; } + case 322: { + if (t == null) { currentState = 322; break; } Expect(172, t); // "Option" - currentState = 301; + currentState = 323; break; } - case 301: { - if (t == null) { currentState = 301; break; } + case 323: { + if (t == null) { currentState = 323; break; } if (set[3, t.kind]) { - currentState = 301; + currentState = 323; break; } else { goto case 30; @@ -2316,8 +2482,8 @@ 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,x,x,T, x,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,x,x,T, x,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, 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,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}, @@ -2327,7 +2493,8 @@ int currentState = 0; {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,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,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,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,x, x,x,x,x, x,x,x,x, x,T,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,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,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,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,T,T, 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, x,x,x,x, x,x,T,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,T,x, x,x,x,T, T,x,x,x, x,x,T,x, x,x,x,x, x,x,x,x, x,x,x,T, T,x,x,T, 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,T,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,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,T, x,x,x,T, T,T,T,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, 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,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,T, 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,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,x,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,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,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, x,x,x,x, x,x,x,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,T, T,T,T,T, T,x,T,x, T,T,x,x, x,T,T,T, T,T,T,T, T,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,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,T, T,T,T,T, T,x,T,x, T,T,x,x, x,T,T,T, T,x,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}, diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs index 2fd14c330f..5030a407e6 100644 --- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs +++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Test/ParserTests.cs @@ -14,7 +14,7 @@ using VB = ICSharpCode.NRefactory.Parser.VB; using ICSharpCode.NRefactory.Parser.VBNet.Experimental; using NUnit.Framework; -namespace VBParserExperiment.Tests +namespace VBParserExperiment { [TestFixture] public class ParserTests 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 fbb8025b02..70e131fabb 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 @@ -496,6 +496,173 @@ Next "; CheckFoot(lexer); } + + [Test] + public void WhileLoopStatement() + { + string statement = @"While +End While"; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.While, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.End, Tokens.While + ); + + CheckFoot(lexer); + } + + [Test] + public void WhileLoopStatement2() + { + string statement = @"Do While +Loop"; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Do, Tokens.While, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.Loop + ); + + CheckFoot(lexer); + } + + [Test] + public void WhileLoopStatement3() + { + string statement = @"Do +Loop While "; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Do, Tokens.EOL, + Tokens.Loop, Tokens.While, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement + ); + + CheckFoot(lexer); + } + + [Test] + public void UntilLoopStatement() + { + string statement = @"Do Until +Loop"; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Do, Tokens.Until, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.Loop + ); + + CheckFoot(lexer); + } + + [Test] + public void UntilLoopStatement2() + { + string statement = @"Do +Loop Until "; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Do, Tokens.EOL, + Tokens.Loop, Tokens.Until, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement + ); + + CheckFoot(lexer); + } + + [Test] + public void IfStatementLarge() + { + string statement = @"If Then +Else If Then +ElseIf Then +Else +End If"; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.If, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.Then, Tokens.EOL, + Tokens.Else, Tokens.If, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.Then, Tokens.EOL, + Tokens.ElseIf, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTag, Tokens.XmlOpenEndTag, Tokens.Identifier, Tokens.XmlCloseTag, Tokens.Then, Tokens.EOL, + Tokens.Else, Tokens.EOL, + Tokens.End, Tokens.If + ); + + CheckFoot(lexer); + } + + [Test] + public void SelectStatement() + { + string statement = @"Select Case + Case , + Case Else +End Select"; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Select, Tokens.Case, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.Case, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.Comma, + Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.Case, Tokens.Else, Tokens.EOL, + Tokens.End, Tokens.Select + ); + + CheckFoot(lexer); + } + + [Test] + public void TryStatement() + { + string statement = @"Try + Catch x + Catch y As Exception + Catch When + Finally +End Try"; + + ILexer lexer = GenerateLexer(new StringReader(TestStatement(statement))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Try, Tokens.EOL, + Tokens.Catch, Tokens.Identifier, Tokens.EOL, + Tokens.Catch, Tokens.Identifier, Tokens.As, Tokens.Identifier, Tokens.EOL, + Tokens.Catch, Tokens.When, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL, + Tokens.Finally, Tokens.EOL, + Tokens.End, Tokens.Try + ); + + CheckFoot(lexer); + } + + [Test] + public void ThrowStatement() + { + ILexer lexer = GenerateLexer(new StringReader(TestStatement("Throw "))); + + CheckHead(lexer); + + CheckTokens(lexer, Tokens.Throw, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement); + + CheckFoot(lexer); + } #endregion #region Helpers