Changeset 237
- Timestamp:
- 08/11/06 16:28:24 (2 years ago)
- Files:
-
- trunk/enki/EnkiParser.d (modified) (71 diffs)
- trunk/enki/Expression.d (modified) (5 diffs)
- trunk/enki/Rule.d (modified) (1 diff)
- trunk/enki/bootstrap.d (modified) (1 diff)
- trunk/enki/enki.bnf (modified) (5 diffs)
- trunk/enki/enki_bn.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/enki/EnkiParser.d
r236 r237 43 43 44 44 WS 45 ::= ws| SlashSlashComment| SlashStarComment;45 ::= ws [ ( SlashSlashComment | SlashStarComment) ws]; 46 46 47 47 */ … … 54 54 {//Expression 55 55 uint start2 = position; 56 if((parse_ws().success) || (parse_SlashSlashComment().success) || (parse_SlashStarComment().success)){ 57 clearErrors(); 58 goto match1; 59 }else{ 60 setError("Expected Whitespace, SlashSlashComment or SlashStarComment."); 61 position = start2; 62 goto mismatch2; 63 } 56 if(!(parse_ws().success)){ 57 goto mismatch4; 58 } 59 {//OptionalExpr 60 {//Expression 61 uint start4 = position; 62 {//Expression 63 uint start5 = position; 64 if((parse_SlashSlashComment().success) || (parse_SlashStarComment().success)){ 65 clearErrors(); 66 }else{ 67 setError("Expected SlashSlashComment or SlashStarComment."); 68 position = start5; 69 goto mismatch6; 70 } 71 } 72 if(!(parse_ws().success)){ 73 goto mismatch6; 74 } 75 goto match5; 76 mismatch6: 77 {/*do nothing*/} 78 position = start4; 79 {/*do nothing*/} 80 match5: 81 clearErrors(); 82 {/*do nothing*/} 83 } 84 } 85 goto match3; 86 mismatch4: 87 setError("Expected Whitespace."); 88 position = start2; 89 goto mismatch2; 90 match3: 91 clearErrors(); 92 goto match1; 64 93 } 65 94 match1: … … 75 104 Syntax 76 105 = void createSyntax(SyntaxLine[] lines) 77 ::= WS { ( Rule:~lines | Comment:~lines | Directive:~lines ) WS}eoi;106 ::= WS { ( Rule:~lines | Comment:~lines | Directive:~lines) WS}eoi; 78 107 79 108 */ 80 109 public ResultT!(String) parse_Syntax(){ 81 110 debug writefln("parse_Syntax()"); 82 uint start 3= position;111 uint start6 = position; 83 112 SyntaxLine[] bind_lines; 84 113 85 114 86 115 {//Expression 87 uint start 4= position;88 if(!(parse_WS().success)){ 89 goto mismatch 6;116 uint start7 = position; 117 if(!(parse_WS().success)){ 118 goto mismatch10; 90 119 } 91 120 {//ZeroOrMoreExpr 92 uint start 5= position;121 uint start8 = position; 93 122 uint termPos; 94 loop 7:123 loop11: 95 124 termPos = position; 96 125 if(parse_eoi().success){ 97 goto loopend 8;98 } 99 {//Expression 100 uint start 6= position;126 goto loopend12; 127 } 128 {//Expression 129 uint start9 = position; 101 130 {//Expression 102 uint start 7= position;131 uint start10 = position; 103 132 if((parse_Rule().assignCat!(SyntaxLine[])(bind_lines)) || (parse_Comment().assignCat!(SyntaxLine[])(bind_lines)) || (parse_Directive().assignCat!(SyntaxLine[])(bind_lines))){ 104 133 clearErrors(); 105 134 }else{ 106 135 setError("Expected Rule, Comment or Directive."); 107 position = start 7;108 goto mismatch1 0;136 position = start10; 137 goto mismatch14; 109 138 } 110 139 } 111 140 if(!(parse_WS().success)){ 112 goto mismatch1 0;113 } 114 goto match 9;115 mismatch1 0:141 goto mismatch14; 142 } 143 goto match13; 144 mismatch14: 116 145 {/*do nothing*/} 117 position = start 6;118 goto mismatch 6;119 match 9:146 position = start9; 147 goto mismatch10; 148 match13: 120 149 clearErrors(); 121 goto loop 7;122 } 123 loopend 8:150 goto loop11; 151 } 152 loopend12: 124 153 {/*do nothing*/} 125 154 } 126 goto match 5;127 mismatch 6:155 goto match9; 156 mismatch10: 128 157 setError("Expected WS."); 129 position = start 4;130 goto mismatch 4;131 match 5:132 clearErrors(); 133 goto match 3;134 } 135 match 3:158 position = start7; 159 goto mismatch8; 160 match9: 161 clearErrors(); 162 goto match7; 163 } 164 match7: 136 165 debug writefln("parse_Syntax() PASS"); 137 166 createSyntax(bind_lines); 138 return ResultT!(String)(sliceData(start 3,position));139 mismatch 4:140 position = start 3;167 return ResultT!(String)(sliceData(start6,position)); 168 mismatch8: 169 position = start6; 141 170 return ResultT!(String)(); 142 171 } … … 146 175 Rule 147 176 = new Rule(String name,RulePredicate pred,Expression expr,RuleDecl decl) 148 ::= WS Identifier:name WS [ RuleDecl:decl WS] [ RulePredicate:pred ] WS "::=" WS Expression:exprWS ";";177 ::= WS Identifier:name WS [ RuleDecl:decl WS] [ RulePredicate:pred] WS "::=" WS Expression:expr WS ";"; 149 178 150 179 */ 151 180 public ResultT!(Rule) parse_Rule(){ 152 181 debug writefln("parse_Rule()"); 153 uint start 8= position;182 uint start11 = position; 154 183 String bind_name; 155 184 RulePredicate bind_pred; … … 159 188 160 189 {//Expression 161 uint start 9= position;162 if(!(parse_WS().success)){ 163 goto mismatch1 4;190 uint start12 = position; 191 if(!(parse_WS().success)){ 192 goto mismatch18; 164 193 } 165 194 if(!(parse_Identifier().assign!(String)(bind_name))){ 166 goto mismatch1 4;167 } 168 if(!(parse_WS().success)){ 169 goto mismatch1 4;195 goto mismatch18; 196 } 197 if(!(parse_WS().success)){ 198 goto mismatch18; 170 199 } 171 200 {//OptionalExpr 172 201 {//Expression 173 uint start1 1= position;202 uint start14 = position; 174 203 if((parse_RuleDecl().assign!(RuleDecl)(bind_decl) && parse_WS().success)){ 175 204 clearErrors(); 176 205 }else{ 177 position = start1 1;206 position = start14; 178 207 } 179 208 } … … 181 210 {//OptionalExpr 182 211 {//Expression 183 uint start1 3= position;212 uint start16 = position; 184 213 if((parse_RulePredicate().assign!(RulePredicate)(bind_pred))){ 185 214 clearErrors(); 186 215 }else{ 187 position = start1 3;188 } 189 } 190 } 191 if(!(parse_WS().success)){ 192 goto mismatch1 4;216 position = start16; 217 } 218 } 219 } 220 if(!(parse_WS().success)){ 221 goto mismatch18; 193 222 } 194 223 if(!(terminal("::=").success)){ 195 goto mismatch1 4;196 } 197 if(!(parse_WS().success)){ 198 goto mismatch1 4;224 goto mismatch18; 225 } 226 if(!(parse_WS().success)){ 227 goto mismatch18; 199 228 } 200 229 if(!(parse_Expression().assign!(Expression)(bind_expr))){ 201 goto mismatch1 4;202 } 203 if(!(parse_WS().success)){ 204 goto mismatch1 4;230 goto mismatch18; 231 } 232 if(!(parse_WS().success)){ 233 goto mismatch18; 205 234 } 206 235 if(!(terminal(";").success)){ 207 goto mismatch1 4;208 } 209 goto match1 3;210 mismatch1 4:236 goto mismatch18; 237 } 238 goto match17; 239 mismatch18: 211 240 setError("Expected WS."); 212 position = start 9;213 goto mismatch1 2;214 match1 3:215 clearErrors(); 216 goto match1 1;217 } 218 match1 1:241 position = start12; 242 goto mismatch16; 243 match17: 244 clearErrors(); 245 goto match15; 246 } 247 match15: 219 248 debug writefln("parse_Rule() PASS"); 220 249 ResultT!(Rule) passed = ResultT!(Rule)(new Rule(bind_name,bind_pred,bind_expr,bind_decl)); 221 250 return passed; 222 mismatch1 2:223 position = start 8;251 mismatch16: 252 position = start11; 224 253 ResultT!(Rule) failed = ResultT!(Rule)(); 225 254 return failed; … … 230 259 RuleDecl 231 260 = new RuleDecl(Param[] params) 232 ::= ParamsExpr:params;261 ::= ParamsExpr:params; 233 262 234 263 */ 235 264 public ResultT!(RuleDecl) parse_RuleDecl(){ 236 265 debug writefln("parse_RuleDecl()"); 237 uint start1 4= position;266 uint start17 = position; 238 267 Param[] bind_params; 239 268 240 269 241 270 {//Expression 242 uint start1 5= position;271 uint start18 = position; 243 272 if((parse_ParamsExpr().assign!(Param[])(bind_params))){ 244 273 clearErrors(); 245 goto match1 5;274 goto match19; 246 275 }else{ 247 276 setError("Expected ParamsExpr."); 248 position = start1 5;249 goto mismatch 16;250 } 251 } 252 match1 5:277 position = start18; 278 goto mismatch20; 279 } 280 } 281 match19: 253 282 debug writefln("parse_RuleDecl() PASS"); 254 283 ResultT!(RuleDecl) passed = ResultT!(RuleDecl)(new RuleDecl(bind_params)); 255 284 return passed; 256 mismatch 16:257 position = start1 4;285 mismatch20: 286 position = start17; 258 287 ResultT!(RuleDecl) failed = ResultT!(RuleDecl)(); 259 288 return failed; … … 264 293 RulePredicate 265 294 = RulePredicate pred 266 ::= "=" WS ( ClassPredicate:pred | FunctionPredicate:pred | BindingPredicate:pred );295 ::= "=" WS ( ClassPredicate:pred | FunctionPredicate:pred | BindingPredicate:pred); 267 296 268 297 */ 269 298 public ResultT!(RulePredicate) parse_RulePredicate(){ 270 299 debug writefln("parse_RulePredicate()"); 271 uint start1 6= position;300 uint start19 = position; 272 301 RulePredicate bind_pred; 273 302 274 303 275 304 {//Expression 276 uint start 17= position;305 uint start20 = position; 277 306 if(!(terminal("=").success)){ 278 goto mismatch2 0;279 } 280 if(!(parse_WS().success)){ 281 goto mismatch2 0;307 goto mismatch24; 308 } 309 if(!(parse_WS().success)){ 310 goto mismatch24; 282 311 } 283 312 {//Expression 284 uint start 18= position;313 uint start21 = position; 285 314 if((parse_ClassPredicate().assign!(RulePredicate)(bind_pred)) || (parse_FunctionPredicate().assign!(RulePredicate)(bind_pred)) || (parse_BindingPredicate().assign!(RulePredicate)(bind_pred))){ 286 315 clearErrors(); 287 316 }else{ 288 317 setError("Expected ClassPredicate, FunctionPredicate or BindingPredicate."); 289 position = start 18;290 goto mismatch2 0;291 } 292 } 293 goto match 19;294 mismatch2 0:318 position = start21; 319 goto mismatch24; 320 } 321 } 322 goto match23; 323 mismatch24: 295 324 {/*do nothing*/} 296 position = start 17;297 goto mismatch 18;298 match 19:299 clearErrors(); 300 goto match 17;301 } 302 match 17:325 position = start20; 326 goto mismatch22; 327 match23: 328 clearErrors(); 329 goto match21; 330 } 331 match21: 303 332 debug writefln("parse_RulePredicate() PASS"); 304 333 return ResultT!(RulePredicate)(bind_pred); 305 mismatch 18:306 position = start1 6;334 mismatch22: 335 position = start19; 307 336 return ResultT!(RulePredicate)(); 308 337 } … … 312 341 ClassPredicate 313 342 = new ClassPredicate(String name,Param[] params) 314 ::= "new" WS Identifier:name WS ParamsExpr:params;343 ::= "new" WS Identifier:name WS ParamsExpr:params; 315 344 316 345 */ 317 346 public ResultT!(ClassPredicate) parse_ClassPredicate(){ 318 347 debug writefln("parse_ClassPredicate()"); 319 uint start 19= position;348 uint start22 = position; 320 349 String bind_name; 321 350 Param[] bind_params; … … 323 352 324 353 {//Expression 325 uint start2 0= position;354 uint start23 = position; 326 355 if((terminal("new").success && parse_WS().success && parse_Identifier().assign!(String)(bind_name) && parse_WS().success && parse_ParamsExpr().assign!(Param[])(bind_params))){ 327 clearErrors();328 goto match21;329 }else{330 position = start20;331 goto mismatch22;332 }333 }334 match21:335 debug writefln("parse_ClassPredicate() PASS");336 ResultT!(ClassPredicate) passed = ResultT!(ClassPredicate)(new ClassPredicate(bind_name,bind_params));337 return passed;338 mismatch22:339 position = start19;340 ResultT!(ClassPredicate) failed = ResultT!(ClassPredicate)();341 return failed;342 }343 344 /*345 346 FunctionPredicate347 = new FunctionPredicate(Param decl,Param[] params)348 ::= ExplicitParam:decl WS ParamsExpr:params ;349 350 */351 public ResultT!(FunctionPredicate) parse_FunctionPredicate(){352 debug writefln("parse_FunctionPredicate()");353 uint start21 = position;354 Param bind_decl;355 Param[] bind_params;356 357 358 {//Expression359 uint start22 = position;360 if((parse_ExplicitParam().assign!(Param)(bind_decl) && parse_WS().success && parse_ParamsExpr().assign!(Param[])(bind_params))){361 clearErrors();362 goto match23;363 }else{364 setError("Expected ExplicitParam.");365 position = start22;366 goto mismatch24;367 }368 }369 match23:370 debug writefln("parse_FunctionPredicate() PASS");371 ResultT!(FunctionPredicate) passed = ResultT!(FunctionPredicate)(new FunctionPredicate(bind_decl,bind_params));372 return passed;373 mismatch24:374 position = start21;375 ResultT!(FunctionPredicate) failed = ResultT!(FunctionPredicate)();376 return failed;377 }378 379 /*380 381 BindingPredicate382 = new BindingPredicate(Param param)383 ::= Param:param ;384 385 */386 public ResultT!(BindingPredicate) parse_BindingPredicate(){387 debug writefln("parse_BindingPredicate()");388 uint start23 = position;389 Param bind_param;390 391 392 {//Expression393 uint start24 = position;394 if((parse_Param().assign!(Param)(bind_param))){395 356 clearErrors(); 396 357 goto match25; 397 358 }else{ 359 position = start23; 360 goto mismatch26; 361 } 362 } 363 match25: 364 debug writefln("parse_ClassPredicate() PASS"); 365 ResultT!(ClassPredicate) passed = ResultT!(ClassPredicate)(new ClassPredicate(bind_name,bind_params)); 366 return passed; 367 mismatch26: 368 position = start22; 369 ResultT!(ClassPredicate) failed = ResultT!(ClassPredicate)(); 370 return failed; 371 } 372 373 /* 374 375 FunctionPredicate 376 = new FunctionPredicate(Param decl,Param[] params) 377 ::= ExplicitParam:decl WS ParamsExpr:params; 378 379 */ 380 public ResultT!(FunctionPredicate) parse_FunctionPredicate(){ 381 debug writefln("parse_FunctionPredicate()"); 382 uint start24 = position; 383 Param bind_decl; 384 Param[] bind_params; 385 386 387 {//Expression 388 uint start25 = position; 389 if((parse_ExplicitParam().assign!(Param)(bind_decl) && parse_WS().success && parse_ParamsExpr().assign!(Param[])(bind_params))){ 390 clearErrors(); 391 goto match27; 392 }else{ 393 setError("Expected ExplicitParam."); 394 position = start25; 395 goto mismatch28; 396 } 397 } 398 match27: 399 debug writefln("parse_FunctionPredicate() PASS"); 400 ResultT!(FunctionPredicate) passed = ResultT!(FunctionPredicate)(new FunctionPredicate(bind_decl,bind_params)); 401 return passed; 402 mismatch28: 403 position = start24; 404 ResultT!(FunctionPredicate) failed = ResultT!(FunctionPredicate)(); 405 return failed; 406 } 407 408 /* 409 410 BindingPredicate 411 = new BindingPredicate(Param param) 412 ::= Param:param; 413 414 */ 415 public ResultT!(BindingPredicate) parse_BindingPredicate(){ 416 debug writefln("parse_BindingPredicate()"); 417 uint start26 = position; 418 Param bind_param; 419 420 421 {//Expression 422 uint start27 = position; 423 if((parse_Param().assign!(Param)(bind_param))){ 424 clearErrors(); 425 goto match29; 426 }else{ 398 427 setError("Expected Param."); 399 position = start2 4;400 goto mismatch 26;401 } 402 } 403 match2 5:428 position = start27; 429 goto mismatch30; 430 } 431 } 432 match29: 404 433 debug writefln("parse_BindingPredicate() PASS"); 405 434 ResultT!(BindingPredicate) passed = ResultT!(BindingPredicate)(new BindingPredicate(bind_param)); 406 435 return passed; 407 mismatch 26:408 position = start2 3;436 mismatch30: 437 position = start26; 409 438 ResultT!(BindingPredicate) failed = ResultT!(BindingPredicate)(); 410 439 return failed; … … 415 444 ParamsExpr 416 445 = Param[] params 417 ::= "(" WS [ Param:~params WS { "," WS Param:~params WS} ]")";446 ::= "(" WS [ Param:~params WS { "," WS Param:~params WS}] ")"; 418 447 419 448 */ 420 449 public ResultT!(Param[]) parse_ParamsExpr(){ 421 450 debug writefln("parse_ParamsExpr()"); 422 uint start2 5= position;451 uint start28 = position; 423 452 Param[] bind_params; 424 453 425 454 426 455 {//Expression 427 uint start2 6= position;456 uint start29 = position; 428 457 if(!(terminal("(").success)){ 429 goto mismatch3 0;430 } 431 if(!(parse_WS().success)){ 432 goto mismatch3 0;458 goto mismatch34; 459 } 460 if(!(parse_WS().success)){ 461 goto mismatch34; 433 462 } 434 463 {//OptionalExpr 435 464 {//Expression 436 uint start 28= position;465 uint start31 = position; 437 466 if(!(parse_Param().assignCat!(Param[])(bind_params))){ 438 goto mismatch3 2;467 goto mismatch36; 439 468 } 440 469 if(!(parse_WS().success)){ 441 goto mismatch3 2;470 goto mismatch36; 442 471 } 443 472 {//ZeroOrMoreExpr 444 473 uint termPos; 445 loop3 3:474 loop37: 446 475 termPos = position; 447 476 {//Expression 448 uint start3 0= position;477 uint start33 = position; 449 478 if((terminal(",").success && parse_WS().success && parse_Param().assignCat!(Param[])(bind_params) && parse_WS().success)){ 450 479 clearErrors(); 451 goto loop3 3;480 goto loop37; 452 481 }else{ 453 position = start3 0;454 goto loopend3 4;482 position = start33; 483 goto loopend38; 455 484 } 456 485 } 457 loopend3 4:486 loopend38: 458 487 {/*do nothing*/} 459 488 } 460 goto match3 1;461 mismatch3 2:489 goto match35; 490 mismatch36: 462 491 {/*do nothing*/} 463 position = start 28;492 position = start31; 464 493 {/*do nothing*/} 465 match3 1:494 match35: 466 495 clearErrors(); 467 496 {/*do nothing*/} … … 469 498 } 470 499 if(!(terminal(")").success)){ 471 goto mismatch3 0;472 } 473 goto match 29;474 mismatch3 0:500 goto mismatch34; 501 } 502 goto match33; 503 mismatch34: 475 504 {/*do nothing*/} 476 position = start2 6;477 goto mismatch 28;478 match 29:479 clearErrors(); 480 goto match 27;481 } 482 match 27:505 position = start29; 506 goto mismatch32; 507 match33: 508 clearErrors(); 509 goto match31; 510 } 511 match31: 483 512 debug writefln("parse_ParamsExpr() PASS"); 484 513 return ResultT!(Param[])(bind_params); 485 mismatch 28:486 position = start2 5;514 mismatch32: 515 position = start28; 487 516 return ResultT!(Param[])(); 488 517 } … … 492 521 Param 493 522 = Param param 494 ::= ExplicitParam:param | WeakParam:param;523 ::= ExplicitParam:param | WeakParam:param; 495 524 496 525 */ 497 526 public ResultT!(Param) parse_Param(){ 498 527 debug writefln("parse_Param()"); 499 uint start3 1= position;528 uint start34 = position; 500 529 Param bind_param; 501 530 502 531 503 532 {//Expression 504 uint start3 2= position;533 uint start35 = position; 505 534 if((parse_ExplicitParam().assign!(Param)(bind_param)) || (parse_WeakParam().assign!(Param)(bind_param))){ 506 535 clearErrors(); 507 goto match3 5;536 goto match39; 508 537 }else{ 509 538 setError("Expected ExplicitParam or WeakParam."); 510 position = start3 2;511 goto mismatch 36;512 } 513 } 514 match3 5:539 position = start35; 540 goto mismatch40; 541 } 542 } 543 match39: 515 544 debug writefln("parse_Param() PASS"); 516 545 return ResultT!(Param)(bind_param); 517 mismatch 36:518 position = start3 1;546 mismatch40: 547 position = start34; 519 548 return ResultT!(Param)(); 520 549 } … … 524 553 WeakParam 525 554 = new Param(String name) 526 ::= Identifier:name;555 ::= Identifier:name; 527 556 528 557 */ 529 558 public ResultT!(Param) parse_WeakParam(){ 530 559 debug writefln("parse_WeakParam()"); 531 uint start3 3= position;560 uint start36 = position; 532 561 String bind_name; 533 562 534 563 535 564 {//Expression 536 uint start3 4= position;565 uint start37 = position; 537 566 if((parse_Identifier().assign!(String)(bind_name))){ 538 567 clearErrors(); 539 goto match 37;568 goto match41; 540 569 }else{ 541 570 setError("Expected Identifier."); 542 position = start3 4;543 goto mismatch 38;544 } 545 } 546 match 37:571 position = start37; 572 goto mismatch42; 573 } 574 } 575 match41: 547 576 debug writefln("parse_WeakParam() PASS"); 548 577 ResultT!(Param) passed = ResultT!(Param)(new Param(bind_name)); 549 578 return passed; 550 mismatch 38:551 position = start3 3;579 mismatch42: 580 position = start36; 552 581 ResultT!(Param) failed = ResultT!(Param)(); 553 582 return failed; … … 558 587 ExplicitParam 559 588 = new Param(bool isArray,String type,String name) 560 ::= Identifier:type WS [ "[]":isArray Brackets WS] Identifier:name;589 ::= Identifier:type WS [ "[]":isArray Brackets WS] Identifier:name; 561 590 562 591 */ 563 592 public ResultT!(Param) parse_ExplicitParam(){ 564 593 debug writefln("parse_ExplicitParam()"); 565 uint start3 5= position;594 uint start38 = position; 566 595 bool bind_isArray; 567 596 String bind_type; … … 570 599 571 600 {//Expression 572 uint start3 6= position;601 uint start39 = position; 573 602 if(!(parse_Identifier().assign!(String)(bind_type))){ 574 goto mismatch4 2;575 } 576 if(!(parse_WS().success)){ 577 goto mismatch4 2;603 goto mismatch46; 604 } 605 if(!(parse_WS().success)){ 606 goto mismatch46; 578 607 } 579 608 {//OptionalExpr 580 609 {//Expression 581 uint start 38= position;610 uint start41 = position; 582 611 if((terminal("[]").assign!(bool)(bind_isArray) && parse_Brackets().success && parse_WS().success)){ 583 612 clearErrors(); 584 613 }else{ 585 position = start 38;614 position = start41; 586 615 } 587 616 } 588 617 } 589 618 if(!(parse_Identifier().assign!(String)(bind_name))){ 590 goto mismatch4 2;591 } 592 goto match4 1;593 mismatch4 2:619 goto mismatch46; 620 } 621 goto match45; 622 mismatch46: 594 623 setError("Expected Identifier."); 595 position = start3 6;596 goto mismatch4 0;597 match4 1:598 clearErrors(); 599 goto match 39;600 } 601 match 39:624 position = start39; 625 goto mismatch44; 626 match45: 627 clearErrors(); 628 goto match43; 629 } 630 match43: 602 631 debug writefln("parse_ExplicitParam() PASS"); 603 632 ResultT!(Param) passed = ResultT!(Param)(new Param(bind_isArray,bind_type,bind_name)); 604 633 return passed; 605 mismatch4 0:606 position = start3 5;634 mismatch44: 635 position = start38; 607 636 ResultT!(Param) failed = ResultT!(Param)(); 608 637 return failed; … … 612 641 613 642 Brackets 614 ::= [ "[]" Brackets];643 ::= [ "[]" Brackets]; 615 644 616 645 */ 617 646 public ResultT!(bool) parse_Brackets(){ 618 647 debug writefln("parse_Brackets()"); 619 uint start 39= position;648 uint start42 = position; 620 649 //no declarations 621 650 622 651 623 652 {//Expression 624 uint start4 0= position;653 uint start43 = position; 625 654 {//OptionalExpr 626 655 {//Expression 627 uint start4 2= position;656 uint start45 = position; 628 657 if((terminal("[]").success && parse_Brackets().success)){ 629 658 clearErrors(); 630 659 }else{ 631 position = start4 2;632 } 633 } 634 } 635 goto match4 5;636 mismatch 46:660 position = start45; 661 } 662 } 663 } 664 goto match49; 665 mismatch50: 637 666 {/*do nothing*/} 638 position = start4 0;639 goto mismatch4 4;640 match4 5:641 clearErrors(); 642 goto match4 3;643 } 644 match4 3:667 position = start43; 668 goto mismatch48; 669 match49: 670 clearErrors(); 671 goto match47; 672 } 673 match47: 645 674 debug writefln("parse_Brackets() PASS"); 646 675 return ResultT!(bool)(true);
