1 /++ 2 This module was automatically generated from the following grammar: 3 4 DClass: 5 6 Module < DCFile 7 8 9 10 ###################### 11 12 ## Parser Utilities ## 13 14 ###################### 15 16 17 18 List(Elem, Sep) < Elem (Sep Elem)* 19 20 21 22 ###################### 23 24 ## Lexical Elements ## 25 26 ###################### 27 28 29 30 Spacing <- :(' ' / '\t' / '\r' / '\n' / '\r\n' / comment)* 31 32 33 34 # Letters and Digits 35 36 letter <- [A-Za-z] 37 38 decDigit <- [0-9] 39 40 octDigit <- [0-7] 41 42 hexDigit <- [0-9A-Fa-f] 43 44 binDigit <- "0" / "1" 45 46 47 48 #Operators 49 50 operator < "%" / "*" / "+" / "-" / "/" 51 52 53 54 #Delimiters 55 56 delimiter < "(" / ")" / "{" / "}" / "[" / "]" / "," / ";" / "=" / ":" / operator 57 58 59 60 #Number Literals 61 62 numLiteral < intLiteral / floatLiteral 63 64 65 66 #Integers 67 68 intLiteral <- 69 70 / ;decLiteral 71 72 / ;octLiteral 73 74 / ;hexLiteral 75 76 / ;binLiteral 77 78 79 80 decLiteral <~ ([1-9] decDigit*) / "0" 81 82 octLiteral <~ ^"0" octDigit* 83 84 hexLiteral <~ ^"0" [Xx] hexDigit* 85 86 binLiteral <~ ^"0" [Bb] binDigit* 87 88 89 90 #Floats 91 92 floatLiteral <~ (decimals / (decimals "." decimals) / ("." decimals)) "f"? 93 94 decimals <~ decDigit+ 95 96 97 98 #Text Literals 99 100 charLiteral <- :quote (escapeSequence / nonSingleQuote) :quote 101 102 stringLiteral <- :doublequote stringCharacters :doublequote 103 104 stringCharacters <~ (escapeSequence / nonDoubleQuote)* 105 106 nonSingleQuote <- (!quote .)* 107 108 nonDoubleQuote <- (!doublequote .)* 109 110 escapeSequence <- ^"\\" (~("x" hexDigit+) / .) 111 112 113 114 # Identifiers 115 116 Identifier < ;identifier 117 118 119 120 #Keywords 121 122 keyword < "dclass" / "struct" / "keyword" 123 124 125 126 #Data Types 127 128 dataType < ;charType / ;intType / ;floatType / ;sizedType 129 130 charType <- ;"char" 131 132 intType <- 133 134 / ;"int8" 135 136 / ;"int16" 137 138 / ;"int32" 139 140 / ;"int64" 141 142 / ;"uint8" 143 144 / ;"uint16" 145 146 / ;"uint32" 147 148 / ;"uint64" 149 150 floatType <- ;"float64" 151 152 sizedType <- ;"string" / ;"blob" 153 154 155 156 # Comments 157 158 comment <: lineComment / blockComment 159 160 lineComment <: (("//" !'#') (!endOfLine .)* endOfLine) 161 162 blockComment <: ("/*" (blockComment / (!("/*"/"*/") .))* "*/") 163 164 165 166 ############# 167 168 ## Grammar ## 169 170 ############# 171 172 173 174 # DC File 175 176 177 178 DCFile < (ImportDecl / ParseDirective / TypeDecl / :comment)+ eoi 179 180 181 182 # Special parse directives: e.g: 183 184 # //# typeid = 01 185 186 ParseDirective < "//#" Identifier "=" (QualifiedIdentifier / numLiteral) ";" 187 188 189 190 ImportDecl < "from" QualifiedIdentifier "import" ImportList 191 192 QualifiedIdentifier <~ Identifier ("." Identifier)* 193 194 ImportList < Identifier ("/" Identifier)* 195 196 197 198 TypeDecl < (KeywordType / StructType / ClassType / AliasType) ";" 199 200 201 202 # Alias Types 203 204 AliasType < "typedef" (dataType / Identifier) Identifier 205 206 207 208 # Keywords 209 210 KeywordType < "keyword" Identifier 211 212 KeywordList < Identifier+ 213 214 215 216 # Struct Type 217 218 StructType < "struct" Identifier "{" (Parameter ";")+ "}" 219 220 221 222 # Class Type 223 224 ClassType < InterfaceMarker? "dclass" Identifier (":" IdentifierList)? "{" (FieldDecl ";")* "}" 225 226 227 228 InterfaceMarker < "//@interface" 229 230 231 232 IdentifierList < Identifier ("," Identifier)* 233 234 235 236 # Field Types 237 238 FieldDecl < (MolecularField / AtomicField / ParameterField) 239 240 241 242 MolecularField < Identifier ":" MolecularFieldMembers 243 244 AtomicField < Identifier "(" ParameterList? ")" KeywordList? 245 246 ParameterField < Parameter KeywordList? 247 248 249 250 MolecularFieldMembers < (Identifier) ("," (Identifier))* 251 252 253 254 # Parameter Types 255 256 ParameterList < Parameter ("," Parameter)* 257 258 Parameter < 259 260 / ArrayParameter 261 262 / CharParameter 263 264 / IntParameter 265 266 / FloatParameter 267 268 / SizedParameter 269 270 / StructParameter 271 272 273 274 # Char Parameter 275 276 CharParameter < :charType Identifier? ("=" charLiteral)? 277 278 279 280 # Integer Parameter 281 282 IntParameter < intType IntRange? IntTransform? Identifier? ("=" IntConstant)? 283 284 IntConstant < intLiteral / "{" intLiteral IntTransform "}" 285 286 IntTransform < operator intLiteral (( "(" IntTransform ")" ) / IntTransform)* 287 288 IntRange < "(" intLiteral "-" intLiteral ")" 289 290 291 292 # Float Parameter 293 294 FloatParameter < floatType FloatRange? FloatTransform? Identifier? ("=" FloatConstant)? 295 296 FloatConstant < floatLiteral / ( "{" floatLiteral FloatTransform "}" ) 297 298 FloatTransform < operator floatLiteral (FloatTransform / ( "(" FloatTransform ")" ))* 299 300 FloatRange < "(" floatLiteral "-" floatLiteral ")" 301 302 303 304 # Sized Parameter 305 306 SizedParameter < sizedType SizeConstraint? Identifier? ("=" stringLiteral)? 307 308 SizeConstraint < "(" intLiteral ("-" intLiteral)? ")" 309 310 311 312 # Struct Parameter 313 314 StructParameter < Identifier Identifier? 315 316 317 318 # Array Parameter 319 320 ArrayParameter < (dataType / Identifier) Identifier? ArrayRange 321 322 ArrayRange < 323 324 / "[" "]" 325 326 / "[" intLiteral ("-" intLiteral)? "]" 327 328 +/ 329 module bamboo.parser; 330 331 public import pegged.peg; 332 import std.algorithm: startsWith; 333 import std.functional: toDelegate; 334 335 struct GenericDClass(TParseTree) 336 { 337 import std.functional : toDelegate; 338 import pegged.dynamic.grammar; 339 static import pegged.peg; 340 struct DClass 341 { 342 enum name = "DClass"; 343 static ParseTree delegate(ParseTree)[string] before; 344 static ParseTree delegate(ParseTree)[string] after; 345 static ParseTree delegate(ParseTree)[string] rules; 346 import std.typecons:Tuple, tuple; 347 static TParseTree[Tuple!(string, size_t)] memo; 348 static this() 349 { 350 rules["Module"] = toDelegate(&Module); 351 rules["Spacing"] = toDelegate(&Spacing); 352 } 353 354 template hooked(alias r, string name) 355 { 356 static ParseTree hooked(ParseTree p) 357 { 358 ParseTree result; 359 360 if (name in before) 361 { 362 result = before[name](p); 363 if (result.successful) 364 return result; 365 } 366 367 result = r(p); 368 if (result.successful || name !in after) 369 return result; 370 371 result = after[name](p); 372 return result; 373 } 374 375 static ParseTree hooked(string input) 376 { 377 return hooked!(r, name)(ParseTree("",false,[],input)); 378 } 379 } 380 381 static void addRuleBefore(string parentRule, string ruleSyntax) 382 { 383 // enum name is the current grammar name 384 DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); 385 foreach(ruleName,rule; dg.rules) 386 if (ruleName != "Spacing") // Keep the local Spacing rule, do not overwrite it 387 rules[ruleName] = rule; 388 before[parentRule] = rules[dg.startingRule]; 389 } 390 391 static void addRuleAfter(string parentRule, string ruleSyntax) 392 { 393 // enum name is the current grammar named 394 DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); 395 foreach(name,rule; dg.rules) 396 { 397 if (name != "Spacing") 398 rules[name] = rule; 399 } 400 after[parentRule] = rules[dg.startingRule]; 401 } 402 403 static bool isRule(string s) 404 { 405 import std.algorithm : startsWith; 406 return s.startsWith("DClass."); 407 } 408 mixin decimateTree; 409 410 static TParseTree Module(TParseTree p) 411 { 412 if(__ctfe) 413 { 414 return pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, DCFile, Spacing), "DClass.Module")(p); 415 } 416 else 417 { 418 if (auto m = tuple(`Module`, p.end) in memo) 419 return *m; 420 else 421 { 422 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, DCFile, Spacing), "DClass.Module"), "Module")(p); 423 memo[tuple(`Module`, p.end)] = result; 424 return result; 425 } 426 } 427 } 428 429 static TParseTree Module(string s) 430 { 431 if(__ctfe) 432 { 433 return pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, DCFile, Spacing), "DClass.Module")(TParseTree("", false,[], s)); 434 } 435 else 436 { 437 forgetMemo(); 438 return hooked!(pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, DCFile, Spacing), "DClass.Module"), "Module")(TParseTree("", false,[], s)); 439 } 440 } 441 static string Module(GetName g) 442 { 443 return "DClass.Module"; 444 } 445 446 template List(alias Elem, alias Sep) 447 { 448 static TParseTree List(TParseTree p) 449 { 450 if(__ctfe) 451 { 452 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Elem, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Sep, Spacing), pegged.peg.wrapAround!(Spacing, Elem, Spacing)), Spacing))), "DClass.List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")")(p); 453 } 454 else 455 { 456 if (auto m = tuple("List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")", p.end) in memo) 457 return *m; 458 else 459 { 460 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Elem, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Sep, Spacing), pegged.peg.wrapAround!(Spacing, Elem, Spacing)), Spacing))), "DClass.List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")"), "List_2")(p); 461 memo[tuple("List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")", p.end)] = result; 462 return result; 463 } 464 } 465 } 466 467 static TParseTree List(string s) 468 { 469 if(__ctfe) 470 { 471 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Elem, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Sep, Spacing), pegged.peg.wrapAround!(Spacing, Elem, Spacing)), Spacing))), "DClass.List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")")(TParseTree("", false,[], s)); 472 } 473 else 474 { 475 forgetMemo(); 476 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Elem, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Sep, Spacing), pegged.peg.wrapAround!(Spacing, Elem, Spacing)), Spacing))), "DClass.List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")"), "List_2")(TParseTree("", false,[], s)); 477 } 478 } 479 static string List(GetName g) 480 { 481 return "DClass.List!(" ~ pegged.peg.getName!(Elem)() ~ ", " ~ pegged.peg.getName!(Sep) ~ ")"; 482 } 483 484 } 485 static TParseTree Spacing(TParseTree p) 486 { 487 if(__ctfe) 488 { 489 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"), pegged.peg.literal!("\r"), pegged.peg.literal!("\n"), pegged.peg.literal!("\r\n"), comment))), "DClass.Spacing")(p); 490 } 491 else 492 { 493 if (auto m = tuple(`Spacing`, p.end) in memo) 494 return *m; 495 else 496 { 497 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"), pegged.peg.literal!("\r"), pegged.peg.literal!("\n"), pegged.peg.literal!("\r\n"), comment))), "DClass.Spacing"), "Spacing")(p); 498 memo[tuple(`Spacing`, p.end)] = result; 499 return result; 500 } 501 } 502 } 503 504 static TParseTree Spacing(string s) 505 { 506 if(__ctfe) 507 { 508 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"), pegged.peg.literal!("\r"), pegged.peg.literal!("\n"), pegged.peg.literal!("\r\n"), comment))), "DClass.Spacing")(TParseTree("", false,[], s)); 509 } 510 else 511 { 512 forgetMemo(); 513 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"), pegged.peg.literal!("\r"), pegged.peg.literal!("\n"), pegged.peg.literal!("\r\n"), comment))), "DClass.Spacing"), "Spacing")(TParseTree("", false,[], s)); 514 } 515 } 516 static string Spacing(GetName g) 517 { 518 return "DClass.Spacing"; 519 } 520 521 static TParseTree letter(TParseTree p) 522 { 523 if(__ctfe) 524 { 525 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "DClass.letter")(p); 526 } 527 else 528 { 529 if (auto m = tuple(`letter`, p.end) in memo) 530 return *m; 531 else 532 { 533 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "DClass.letter"), "letter")(p); 534 memo[tuple(`letter`, p.end)] = result; 535 return result; 536 } 537 } 538 } 539 540 static TParseTree letter(string s) 541 { 542 if(__ctfe) 543 { 544 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "DClass.letter")(TParseTree("", false,[], s)); 545 } 546 else 547 { 548 forgetMemo(); 549 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "DClass.letter"), "letter")(TParseTree("", false,[], s)); 550 } 551 } 552 static string letter(GetName g) 553 { 554 return "DClass.letter"; 555 } 556 557 static TParseTree decDigit(TParseTree p) 558 { 559 if(__ctfe) 560 { 561 return pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "DClass.decDigit")(p); 562 } 563 else 564 { 565 if (auto m = tuple(`decDigit`, p.end) in memo) 566 return *m; 567 else 568 { 569 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "DClass.decDigit"), "decDigit")(p); 570 memo[tuple(`decDigit`, p.end)] = result; 571 return result; 572 } 573 } 574 } 575 576 static TParseTree decDigit(string s) 577 { 578 if(__ctfe) 579 { 580 return pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "DClass.decDigit")(TParseTree("", false,[], s)); 581 } 582 else 583 { 584 forgetMemo(); 585 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "DClass.decDigit"), "decDigit")(TParseTree("", false,[], s)); 586 } 587 } 588 static string decDigit(GetName g) 589 { 590 return "DClass.decDigit"; 591 } 592 593 static TParseTree octDigit(TParseTree p) 594 { 595 if(__ctfe) 596 { 597 return pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "DClass.octDigit")(p); 598 } 599 else 600 { 601 if (auto m = tuple(`octDigit`, p.end) in memo) 602 return *m; 603 else 604 { 605 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "DClass.octDigit"), "octDigit")(p); 606 memo[tuple(`octDigit`, p.end)] = result; 607 return result; 608 } 609 } 610 } 611 612 static TParseTree octDigit(string s) 613 { 614 if(__ctfe) 615 { 616 return pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "DClass.octDigit")(TParseTree("", false,[], s)); 617 } 618 else 619 { 620 forgetMemo(); 621 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "DClass.octDigit"), "octDigit")(TParseTree("", false,[], s)); 622 } 623 } 624 static string octDigit(GetName g) 625 { 626 return "DClass.octDigit"; 627 } 628 629 static TParseTree hexDigit(TParseTree p) 630 { 631 if(__ctfe) 632 { 633 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f')), "DClass.hexDigit")(p); 634 } 635 else 636 { 637 if (auto m = tuple(`hexDigit`, p.end) in memo) 638 return *m; 639 else 640 { 641 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f')), "DClass.hexDigit"), "hexDigit")(p); 642 memo[tuple(`hexDigit`, p.end)] = result; 643 return result; 644 } 645 } 646 } 647 648 static TParseTree hexDigit(string s) 649 { 650 if(__ctfe) 651 { 652 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f')), "DClass.hexDigit")(TParseTree("", false,[], s)); 653 } 654 else 655 { 656 forgetMemo(); 657 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f')), "DClass.hexDigit"), "hexDigit")(TParseTree("", false,[], s)); 658 } 659 } 660 static string hexDigit(GetName g) 661 { 662 return "DClass.hexDigit"; 663 } 664 665 static TParseTree binDigit(TParseTree p) 666 { 667 if(__ctfe) 668 { 669 return pegged.peg.defined!(pegged.peg.keywords!("0", "1"), "DClass.binDigit")(p); 670 } 671 else 672 { 673 if (auto m = tuple(`binDigit`, p.end) in memo) 674 return *m; 675 else 676 { 677 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!("0", "1"), "DClass.binDigit"), "binDigit")(p); 678 memo[tuple(`binDigit`, p.end)] = result; 679 return result; 680 } 681 } 682 } 683 684 static TParseTree binDigit(string s) 685 { 686 if(__ctfe) 687 { 688 return pegged.peg.defined!(pegged.peg.keywords!("0", "1"), "DClass.binDigit")(TParseTree("", false,[], s)); 689 } 690 else 691 { 692 forgetMemo(); 693 return hooked!(pegged.peg.defined!(pegged.peg.keywords!("0", "1"), "DClass.binDigit"), "binDigit")(TParseTree("", false,[], s)); 694 } 695 } 696 static string binDigit(GetName g) 697 { 698 return "DClass.binDigit"; 699 } 700 701 static TParseTree operator(TParseTree p) 702 { 703 if(__ctfe) 704 { 705 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("%"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("*"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("+"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing)), "DClass.operator")(p); 706 } 707 else 708 { 709 if (auto m = tuple(`operator`, p.end) in memo) 710 return *m; 711 else 712 { 713 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("%"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("*"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("+"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing)), "DClass.operator"), "operator")(p); 714 memo[tuple(`operator`, p.end)] = result; 715 return result; 716 } 717 } 718 } 719 720 static TParseTree operator(string s) 721 { 722 if(__ctfe) 723 { 724 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("%"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("*"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("+"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing)), "DClass.operator")(TParseTree("", false,[], s)); 725 } 726 else 727 { 728 forgetMemo(); 729 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("%"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("*"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("+"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing)), "DClass.operator"), "operator")(TParseTree("", false,[], s)); 730 } 731 } 732 static string operator(GetName g) 733 { 734 return "DClass.operator"; 735 } 736 737 static TParseTree delimiter(TParseTree p) 738 { 739 if(__ctfe) 740 { 741 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, operator, Spacing)), "DClass.delimiter")(p); 742 } 743 else 744 { 745 if (auto m = tuple(`delimiter`, p.end) in memo) 746 return *m; 747 else 748 { 749 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, operator, Spacing)), "DClass.delimiter"), "delimiter")(p); 750 memo[tuple(`delimiter`, p.end)] = result; 751 return result; 752 } 753 } 754 } 755 756 static TParseTree delimiter(string s) 757 { 758 if(__ctfe) 759 { 760 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, operator, Spacing)), "DClass.delimiter")(TParseTree("", false,[], s)); 761 } 762 else 763 { 764 forgetMemo(); 765 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, operator, Spacing)), "DClass.delimiter"), "delimiter")(TParseTree("", false,[], s)); 766 } 767 } 768 static string delimiter(GetName g) 769 { 770 return "DClass.delimiter"; 771 } 772 773 static TParseTree numLiteral(TParseTree p) 774 { 775 if(__ctfe) 776 { 777 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing)), "DClass.numLiteral")(p); 778 } 779 else 780 { 781 if (auto m = tuple(`numLiteral`, p.end) in memo) 782 return *m; 783 else 784 { 785 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing)), "DClass.numLiteral"), "numLiteral")(p); 786 memo[tuple(`numLiteral`, p.end)] = result; 787 return result; 788 } 789 } 790 } 791 792 static TParseTree numLiteral(string s) 793 { 794 if(__ctfe) 795 { 796 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing)), "DClass.numLiteral")(TParseTree("", false,[], s)); 797 } 798 else 799 { 800 forgetMemo(); 801 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing)), "DClass.numLiteral"), "numLiteral")(TParseTree("", false,[], s)); 802 } 803 } 804 static string numLiteral(GetName g) 805 { 806 return "DClass.numLiteral"; 807 } 808 809 static TParseTree intLiteral(TParseTree p) 810 { 811 if(__ctfe) 812 { 813 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(decLiteral), pegged.peg.drop!(octLiteral), pegged.peg.drop!(hexLiteral), pegged.peg.drop!(binLiteral)), "DClass.intLiteral")(p); 814 } 815 else 816 { 817 if (auto m = tuple(`intLiteral`, p.end) in memo) 818 return *m; 819 else 820 { 821 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(decLiteral), pegged.peg.drop!(octLiteral), pegged.peg.drop!(hexLiteral), pegged.peg.drop!(binLiteral)), "DClass.intLiteral"), "intLiteral")(p); 822 memo[tuple(`intLiteral`, p.end)] = result; 823 return result; 824 } 825 } 826 } 827 828 static TParseTree intLiteral(string s) 829 { 830 if(__ctfe) 831 { 832 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(decLiteral), pegged.peg.drop!(octLiteral), pegged.peg.drop!(hexLiteral), pegged.peg.drop!(binLiteral)), "DClass.intLiteral")(TParseTree("", false,[], s)); 833 } 834 else 835 { 836 forgetMemo(); 837 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(decLiteral), pegged.peg.drop!(octLiteral), pegged.peg.drop!(hexLiteral), pegged.peg.drop!(binLiteral)), "DClass.intLiteral"), "intLiteral")(TParseTree("", false,[], s)); 838 } 839 } 840 static string intLiteral(GetName g) 841 { 842 return "DClass.intLiteral"; 843 } 844 845 static TParseTree decLiteral(TParseTree p) 846 { 847 if(__ctfe) 848 { 849 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.charRange!('1', '9'), pegged.peg.zeroOrMore!(decDigit)), pegged.peg.literal!("0"))), "DClass.decLiteral")(p); 850 } 851 else 852 { 853 if (auto m = tuple(`decLiteral`, p.end) in memo) 854 return *m; 855 else 856 { 857 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.charRange!('1', '9'), pegged.peg.zeroOrMore!(decDigit)), pegged.peg.literal!("0"))), "DClass.decLiteral"), "decLiteral")(p); 858 memo[tuple(`decLiteral`, p.end)] = result; 859 return result; 860 } 861 } 862 } 863 864 static TParseTree decLiteral(string s) 865 { 866 if(__ctfe) 867 { 868 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.charRange!('1', '9'), pegged.peg.zeroOrMore!(decDigit)), pegged.peg.literal!("0"))), "DClass.decLiteral")(TParseTree("", false,[], s)); 869 } 870 else 871 { 872 forgetMemo(); 873 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.charRange!('1', '9'), pegged.peg.zeroOrMore!(decDigit)), pegged.peg.literal!("0"))), "DClass.decLiteral"), "decLiteral")(TParseTree("", false,[], s)); 874 } 875 } 876 static string decLiteral(GetName g) 877 { 878 return "DClass.decLiteral"; 879 } 880 881 static TParseTree octLiteral(TParseTree p) 882 { 883 if(__ctfe) 884 { 885 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.zeroOrMore!(octDigit))), "DClass.octLiteral")(p); 886 } 887 else 888 { 889 if (auto m = tuple(`octLiteral`, p.end) in memo) 890 return *m; 891 else 892 { 893 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.zeroOrMore!(octDigit))), "DClass.octLiteral"), "octLiteral")(p); 894 memo[tuple(`octLiteral`, p.end)] = result; 895 return result; 896 } 897 } 898 } 899 900 static TParseTree octLiteral(string s) 901 { 902 if(__ctfe) 903 { 904 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.zeroOrMore!(octDigit))), "DClass.octLiteral")(TParseTree("", false,[], s)); 905 } 906 else 907 { 908 forgetMemo(); 909 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.zeroOrMore!(octDigit))), "DClass.octLiteral"), "octLiteral")(TParseTree("", false,[], s)); 910 } 911 } 912 static string octLiteral(GetName g) 913 { 914 return "DClass.octLiteral"; 915 } 916 917 static TParseTree hexLiteral(TParseTree p) 918 { 919 if(__ctfe) 920 { 921 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.zeroOrMore!(hexDigit))), "DClass.hexLiteral")(p); 922 } 923 else 924 { 925 if (auto m = tuple(`hexLiteral`, p.end) in memo) 926 return *m; 927 else 928 { 929 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.zeroOrMore!(hexDigit))), "DClass.hexLiteral"), "hexLiteral")(p); 930 memo[tuple(`hexLiteral`, p.end)] = result; 931 return result; 932 } 933 } 934 } 935 936 static TParseTree hexLiteral(string s) 937 { 938 if(__ctfe) 939 { 940 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.zeroOrMore!(hexDigit))), "DClass.hexLiteral")(TParseTree("", false,[], s)); 941 } 942 else 943 { 944 forgetMemo(); 945 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.zeroOrMore!(hexDigit))), "DClass.hexLiteral"), "hexLiteral")(TParseTree("", false,[], s)); 946 } 947 } 948 static string hexLiteral(GetName g) 949 { 950 return "DClass.hexLiteral"; 951 } 952 953 static TParseTree binLiteral(TParseTree p) 954 { 955 if(__ctfe) 956 { 957 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("B"), pegged.peg.literal!("b")), pegged.peg.zeroOrMore!(binDigit))), "DClass.binLiteral")(p); 958 } 959 else 960 { 961 if (auto m = tuple(`binLiteral`, p.end) in memo) 962 return *m; 963 else 964 { 965 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("B"), pegged.peg.literal!("b")), pegged.peg.zeroOrMore!(binDigit))), "DClass.binLiteral"), "binLiteral")(p); 966 memo[tuple(`binLiteral`, p.end)] = result; 967 return result; 968 } 969 } 970 } 971 972 static TParseTree binLiteral(string s) 973 { 974 if(__ctfe) 975 { 976 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("B"), pegged.peg.literal!("b")), pegged.peg.zeroOrMore!(binDigit))), "DClass.binLiteral")(TParseTree("", false,[], s)); 977 } 978 else 979 { 980 forgetMemo(); 981 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("0")), pegged.peg.or!(pegged.peg.literal!("B"), pegged.peg.literal!("b")), pegged.peg.zeroOrMore!(binDigit))), "DClass.binLiteral"), "binLiteral")(TParseTree("", false,[], s)); 982 } 983 } 984 static string binLiteral(GetName g) 985 { 986 return "DClass.binLiteral"; 987 } 988 989 static TParseTree floatLiteral(TParseTree p) 990 { 991 if(__ctfe) 992 { 993 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.or!(decimals, pegged.peg.and!(decimals, pegged.peg.literal!("."), decimals), pegged.peg.and!(pegged.peg.literal!("."), decimals)), pegged.peg.option!(pegged.peg.literal!("f")))), "DClass.floatLiteral")(p); 994 } 995 else 996 { 997 if (auto m = tuple(`floatLiteral`, p.end) in memo) 998 return *m; 999 else 1000 { 1001 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.or!(decimals, pegged.peg.and!(decimals, pegged.peg.literal!("."), decimals), pegged.peg.and!(pegged.peg.literal!("."), decimals)), pegged.peg.option!(pegged.peg.literal!("f")))), "DClass.floatLiteral"), "floatLiteral")(p); 1002 memo[tuple(`floatLiteral`, p.end)] = result; 1003 return result; 1004 } 1005 } 1006 } 1007 1008 static TParseTree floatLiteral(string s) 1009 { 1010 if(__ctfe) 1011 { 1012 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.or!(decimals, pegged.peg.and!(decimals, pegged.peg.literal!("."), decimals), pegged.peg.and!(pegged.peg.literal!("."), decimals)), pegged.peg.option!(pegged.peg.literal!("f")))), "DClass.floatLiteral")(TParseTree("", false,[], s)); 1013 } 1014 else 1015 { 1016 forgetMemo(); 1017 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.or!(decimals, pegged.peg.and!(decimals, pegged.peg.literal!("."), decimals), pegged.peg.and!(pegged.peg.literal!("."), decimals)), pegged.peg.option!(pegged.peg.literal!("f")))), "DClass.floatLiteral"), "floatLiteral")(TParseTree("", false,[], s)); 1018 } 1019 } 1020 static string floatLiteral(GetName g) 1021 { 1022 return "DClass.floatLiteral"; 1023 } 1024 1025 static TParseTree decimals(TParseTree p) 1026 { 1027 if(__ctfe) 1028 { 1029 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(decDigit)), "DClass.decimals")(p); 1030 } 1031 else 1032 { 1033 if (auto m = tuple(`decimals`, p.end) in memo) 1034 return *m; 1035 else 1036 { 1037 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(decDigit)), "DClass.decimals"), "decimals")(p); 1038 memo[tuple(`decimals`, p.end)] = result; 1039 return result; 1040 } 1041 } 1042 } 1043 1044 static TParseTree decimals(string s) 1045 { 1046 if(__ctfe) 1047 { 1048 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(decDigit)), "DClass.decimals")(TParseTree("", false,[], s)); 1049 } 1050 else 1051 { 1052 forgetMemo(); 1053 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(decDigit)), "DClass.decimals"), "decimals")(TParseTree("", false,[], s)); 1054 } 1055 } 1056 static string decimals(GetName g) 1057 { 1058 return "DClass.decimals"; 1059 } 1060 1061 static TParseTree charLiteral(TParseTree p) 1062 { 1063 if(__ctfe) 1064 { 1065 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.or!(escapeSequence, nonSingleQuote), pegged.peg.discard!(quote)), "DClass.charLiteral")(p); 1066 } 1067 else 1068 { 1069 if (auto m = tuple(`charLiteral`, p.end) in memo) 1070 return *m; 1071 else 1072 { 1073 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.or!(escapeSequence, nonSingleQuote), pegged.peg.discard!(quote)), "DClass.charLiteral"), "charLiteral")(p); 1074 memo[tuple(`charLiteral`, p.end)] = result; 1075 return result; 1076 } 1077 } 1078 } 1079 1080 static TParseTree charLiteral(string s) 1081 { 1082 if(__ctfe) 1083 { 1084 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.or!(escapeSequence, nonSingleQuote), pegged.peg.discard!(quote)), "DClass.charLiteral")(TParseTree("", false,[], s)); 1085 } 1086 else 1087 { 1088 forgetMemo(); 1089 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.or!(escapeSequence, nonSingleQuote), pegged.peg.discard!(quote)), "DClass.charLiteral"), "charLiteral")(TParseTree("", false,[], s)); 1090 } 1091 } 1092 static string charLiteral(GetName g) 1093 { 1094 return "DClass.charLiteral"; 1095 } 1096 1097 static TParseTree stringLiteral(TParseTree p) 1098 { 1099 if(__ctfe) 1100 { 1101 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), stringCharacters, pegged.peg.discard!(doublequote)), "DClass.stringLiteral")(p); 1102 } 1103 else 1104 { 1105 if (auto m = tuple(`stringLiteral`, p.end) in memo) 1106 return *m; 1107 else 1108 { 1109 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), stringCharacters, pegged.peg.discard!(doublequote)), "DClass.stringLiteral"), "stringLiteral")(p); 1110 memo[tuple(`stringLiteral`, p.end)] = result; 1111 return result; 1112 } 1113 } 1114 } 1115 1116 static TParseTree stringLiteral(string s) 1117 { 1118 if(__ctfe) 1119 { 1120 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), stringCharacters, pegged.peg.discard!(doublequote)), "DClass.stringLiteral")(TParseTree("", false,[], s)); 1121 } 1122 else 1123 { 1124 forgetMemo(); 1125 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), stringCharacters, pegged.peg.discard!(doublequote)), "DClass.stringLiteral"), "stringLiteral")(TParseTree("", false,[], s)); 1126 } 1127 } 1128 static string stringLiteral(GetName g) 1129 { 1130 return "DClass.stringLiteral"; 1131 } 1132 1133 static TParseTree stringCharacters(TParseTree p) 1134 { 1135 if(__ctfe) 1136 { 1137 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(escapeSequence, nonDoubleQuote))), "DClass.stringCharacters")(p); 1138 } 1139 else 1140 { 1141 if (auto m = tuple(`stringCharacters`, p.end) in memo) 1142 return *m; 1143 else 1144 { 1145 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(escapeSequence, nonDoubleQuote))), "DClass.stringCharacters"), "stringCharacters")(p); 1146 memo[tuple(`stringCharacters`, p.end)] = result; 1147 return result; 1148 } 1149 } 1150 } 1151 1152 static TParseTree stringCharacters(string s) 1153 { 1154 if(__ctfe) 1155 { 1156 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(escapeSequence, nonDoubleQuote))), "DClass.stringCharacters")(TParseTree("", false,[], s)); 1157 } 1158 else 1159 { 1160 forgetMemo(); 1161 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(escapeSequence, nonDoubleQuote))), "DClass.stringCharacters"), "stringCharacters")(TParseTree("", false,[], s)); 1162 } 1163 } 1164 static string stringCharacters(GetName g) 1165 { 1166 return "DClass.stringCharacters"; 1167 } 1168 1169 static TParseTree nonSingleQuote(TParseTree p) 1170 { 1171 if(__ctfe) 1172 { 1173 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), "DClass.nonSingleQuote")(p); 1174 } 1175 else 1176 { 1177 if (auto m = tuple(`nonSingleQuote`, p.end) in memo) 1178 return *m; 1179 else 1180 { 1181 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), "DClass.nonSingleQuote"), "nonSingleQuote")(p); 1182 memo[tuple(`nonSingleQuote`, p.end)] = result; 1183 return result; 1184 } 1185 } 1186 } 1187 1188 static TParseTree nonSingleQuote(string s) 1189 { 1190 if(__ctfe) 1191 { 1192 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), "DClass.nonSingleQuote")(TParseTree("", false,[], s)); 1193 } 1194 else 1195 { 1196 forgetMemo(); 1197 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), "DClass.nonSingleQuote"), "nonSingleQuote")(TParseTree("", false,[], s)); 1198 } 1199 } 1200 static string nonSingleQuote(GetName g) 1201 { 1202 return "DClass.nonSingleQuote"; 1203 } 1204 1205 static TParseTree nonDoubleQuote(TParseTree p) 1206 { 1207 if(__ctfe) 1208 { 1209 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), "DClass.nonDoubleQuote")(p); 1210 } 1211 else 1212 { 1213 if (auto m = tuple(`nonDoubleQuote`, p.end) in memo) 1214 return *m; 1215 else 1216 { 1217 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), "DClass.nonDoubleQuote"), "nonDoubleQuote")(p); 1218 memo[tuple(`nonDoubleQuote`, p.end)] = result; 1219 return result; 1220 } 1221 } 1222 } 1223 1224 static TParseTree nonDoubleQuote(string s) 1225 { 1226 if(__ctfe) 1227 { 1228 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), "DClass.nonDoubleQuote")(TParseTree("", false,[], s)); 1229 } 1230 else 1231 { 1232 forgetMemo(); 1233 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), "DClass.nonDoubleQuote"), "nonDoubleQuote")(TParseTree("", false,[], s)); 1234 } 1235 } 1236 static string nonDoubleQuote(GetName g) 1237 { 1238 return "DClass.nonDoubleQuote"; 1239 } 1240 1241 static TParseTree escapeSequence(TParseTree p) 1242 { 1243 if(__ctfe) 1244 { 1245 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("\\")), pegged.peg.or!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("x"), pegged.peg.oneOrMore!(hexDigit))), pegged.peg.any)), "DClass.escapeSequence")(p); 1246 } 1247 else 1248 { 1249 if (auto m = tuple(`escapeSequence`, p.end) in memo) 1250 return *m; 1251 else 1252 { 1253 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("\\")), pegged.peg.or!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("x"), pegged.peg.oneOrMore!(hexDigit))), pegged.peg.any)), "DClass.escapeSequence"), "escapeSequence")(p); 1254 memo[tuple(`escapeSequence`, p.end)] = result; 1255 return result; 1256 } 1257 } 1258 } 1259 1260 static TParseTree escapeSequence(string s) 1261 { 1262 if(__ctfe) 1263 { 1264 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("\\")), pegged.peg.or!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("x"), pegged.peg.oneOrMore!(hexDigit))), pegged.peg.any)), "DClass.escapeSequence")(TParseTree("", false,[], s)); 1265 } 1266 else 1267 { 1268 forgetMemo(); 1269 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.keep!(pegged.peg.literal!("\\")), pegged.peg.or!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("x"), pegged.peg.oneOrMore!(hexDigit))), pegged.peg.any)), "DClass.escapeSequence"), "escapeSequence")(TParseTree("", false,[], s)); 1270 } 1271 } 1272 static string escapeSequence(GetName g) 1273 { 1274 return "DClass.escapeSequence"; 1275 } 1276 1277 static TParseTree Identifier(TParseTree p) 1278 { 1279 if(__ctfe) 1280 { 1281 return pegged.peg.defined!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, identifier, Spacing)), "DClass.Identifier")(p); 1282 } 1283 else 1284 { 1285 if (auto m = tuple(`Identifier`, p.end) in memo) 1286 return *m; 1287 else 1288 { 1289 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, identifier, Spacing)), "DClass.Identifier"), "Identifier")(p); 1290 memo[tuple(`Identifier`, p.end)] = result; 1291 return result; 1292 } 1293 } 1294 } 1295 1296 static TParseTree Identifier(string s) 1297 { 1298 if(__ctfe) 1299 { 1300 return pegged.peg.defined!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, identifier, Spacing)), "DClass.Identifier")(TParseTree("", false,[], s)); 1301 } 1302 else 1303 { 1304 forgetMemo(); 1305 return hooked!(pegged.peg.defined!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, identifier, Spacing)), "DClass.Identifier"), "Identifier")(TParseTree("", false,[], s)); 1306 } 1307 } 1308 static string Identifier(GetName g) 1309 { 1310 return "DClass.Identifier"; 1311 } 1312 1313 static TParseTree keyword(TParseTree p) 1314 { 1315 if(__ctfe) 1316 { 1317 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing)), "DClass.keyword")(p); 1318 } 1319 else 1320 { 1321 if (auto m = tuple(`keyword`, p.end) in memo) 1322 return *m; 1323 else 1324 { 1325 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing)), "DClass.keyword"), "keyword")(p); 1326 memo[tuple(`keyword`, p.end)] = result; 1327 return result; 1328 } 1329 } 1330 } 1331 1332 static TParseTree keyword(string s) 1333 { 1334 if(__ctfe) 1335 { 1336 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing)), "DClass.keyword")(TParseTree("", false,[], s)); 1337 } 1338 else 1339 { 1340 forgetMemo(); 1341 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing)), "DClass.keyword"), "keyword")(TParseTree("", false,[], s)); 1342 } 1343 } 1344 static string keyword(GetName g) 1345 { 1346 return "DClass.keyword"; 1347 } 1348 1349 static TParseTree dataType(TParseTree p) 1350 { 1351 if(__ctfe) 1352 { 1353 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, intType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, floatType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing))), "DClass.dataType")(p); 1354 } 1355 else 1356 { 1357 if (auto m = tuple(`dataType`, p.end) in memo) 1358 return *m; 1359 else 1360 { 1361 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, intType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, floatType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing))), "DClass.dataType"), "dataType")(p); 1362 memo[tuple(`dataType`, p.end)] = result; 1363 return result; 1364 } 1365 } 1366 } 1367 1368 static TParseTree dataType(string s) 1369 { 1370 if(__ctfe) 1371 { 1372 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, intType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, floatType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing))), "DClass.dataType")(TParseTree("", false,[], s)); 1373 } 1374 else 1375 { 1376 forgetMemo(); 1377 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, intType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, floatType, Spacing)), pegged.peg.drop!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing))), "DClass.dataType"), "dataType")(TParseTree("", false,[], s)); 1378 } 1379 } 1380 static string dataType(GetName g) 1381 { 1382 return "DClass.dataType"; 1383 } 1384 1385 static TParseTree charType(TParseTree p) 1386 { 1387 if(__ctfe) 1388 { 1389 return pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("char")), "DClass.charType")(p); 1390 } 1391 else 1392 { 1393 if (auto m = tuple(`charType`, p.end) in memo) 1394 return *m; 1395 else 1396 { 1397 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("char")), "DClass.charType"), "charType")(p); 1398 memo[tuple(`charType`, p.end)] = result; 1399 return result; 1400 } 1401 } 1402 } 1403 1404 static TParseTree charType(string s) 1405 { 1406 if(__ctfe) 1407 { 1408 return pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("char")), "DClass.charType")(TParseTree("", false,[], s)); 1409 } 1410 else 1411 { 1412 forgetMemo(); 1413 return hooked!(pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("char")), "DClass.charType"), "charType")(TParseTree("", false,[], s)); 1414 } 1415 } 1416 static string charType(GetName g) 1417 { 1418 return "DClass.charType"; 1419 } 1420 1421 static TParseTree intType(TParseTree p) 1422 { 1423 if(__ctfe) 1424 { 1425 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("int8")), pegged.peg.drop!(pegged.peg.literal!("int16")), pegged.peg.drop!(pegged.peg.literal!("int32")), pegged.peg.drop!(pegged.peg.literal!("int64")), pegged.peg.drop!(pegged.peg.literal!("uint8")), pegged.peg.drop!(pegged.peg.literal!("uint16")), pegged.peg.drop!(pegged.peg.literal!("uint32")), pegged.peg.drop!(pegged.peg.literal!("uint64"))), "DClass.intType")(p); 1426 } 1427 else 1428 { 1429 if (auto m = tuple(`intType`, p.end) in memo) 1430 return *m; 1431 else 1432 { 1433 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("int8")), pegged.peg.drop!(pegged.peg.literal!("int16")), pegged.peg.drop!(pegged.peg.literal!("int32")), pegged.peg.drop!(pegged.peg.literal!("int64")), pegged.peg.drop!(pegged.peg.literal!("uint8")), pegged.peg.drop!(pegged.peg.literal!("uint16")), pegged.peg.drop!(pegged.peg.literal!("uint32")), pegged.peg.drop!(pegged.peg.literal!("uint64"))), "DClass.intType"), "intType")(p); 1434 memo[tuple(`intType`, p.end)] = result; 1435 return result; 1436 } 1437 } 1438 } 1439 1440 static TParseTree intType(string s) 1441 { 1442 if(__ctfe) 1443 { 1444 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("int8")), pegged.peg.drop!(pegged.peg.literal!("int16")), pegged.peg.drop!(pegged.peg.literal!("int32")), pegged.peg.drop!(pegged.peg.literal!("int64")), pegged.peg.drop!(pegged.peg.literal!("uint8")), pegged.peg.drop!(pegged.peg.literal!("uint16")), pegged.peg.drop!(pegged.peg.literal!("uint32")), pegged.peg.drop!(pegged.peg.literal!("uint64"))), "DClass.intType")(TParseTree("", false,[], s)); 1445 } 1446 else 1447 { 1448 forgetMemo(); 1449 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("int8")), pegged.peg.drop!(pegged.peg.literal!("int16")), pegged.peg.drop!(pegged.peg.literal!("int32")), pegged.peg.drop!(pegged.peg.literal!("int64")), pegged.peg.drop!(pegged.peg.literal!("uint8")), pegged.peg.drop!(pegged.peg.literal!("uint16")), pegged.peg.drop!(pegged.peg.literal!("uint32")), pegged.peg.drop!(pegged.peg.literal!("uint64"))), "DClass.intType"), "intType")(TParseTree("", false,[], s)); 1450 } 1451 } 1452 static string intType(GetName g) 1453 { 1454 return "DClass.intType"; 1455 } 1456 1457 static TParseTree floatType(TParseTree p) 1458 { 1459 if(__ctfe) 1460 { 1461 return pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("float64")), "DClass.floatType")(p); 1462 } 1463 else 1464 { 1465 if (auto m = tuple(`floatType`, p.end) in memo) 1466 return *m; 1467 else 1468 { 1469 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("float64")), "DClass.floatType"), "floatType")(p); 1470 memo[tuple(`floatType`, p.end)] = result; 1471 return result; 1472 } 1473 } 1474 } 1475 1476 static TParseTree floatType(string s) 1477 { 1478 if(__ctfe) 1479 { 1480 return pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("float64")), "DClass.floatType")(TParseTree("", false,[], s)); 1481 } 1482 else 1483 { 1484 forgetMemo(); 1485 return hooked!(pegged.peg.defined!(pegged.peg.drop!(pegged.peg.literal!("float64")), "DClass.floatType"), "floatType")(TParseTree("", false,[], s)); 1486 } 1487 } 1488 static string floatType(GetName g) 1489 { 1490 return "DClass.floatType"; 1491 } 1492 1493 static TParseTree sizedType(TParseTree p) 1494 { 1495 if(__ctfe) 1496 { 1497 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("string")), pegged.peg.drop!(pegged.peg.literal!("blob"))), "DClass.sizedType")(p); 1498 } 1499 else 1500 { 1501 if (auto m = tuple(`sizedType`, p.end) in memo) 1502 return *m; 1503 else 1504 { 1505 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("string")), pegged.peg.drop!(pegged.peg.literal!("blob"))), "DClass.sizedType"), "sizedType")(p); 1506 memo[tuple(`sizedType`, p.end)] = result; 1507 return result; 1508 } 1509 } 1510 } 1511 1512 static TParseTree sizedType(string s) 1513 { 1514 if(__ctfe) 1515 { 1516 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("string")), pegged.peg.drop!(pegged.peg.literal!("blob"))), "DClass.sizedType")(TParseTree("", false,[], s)); 1517 } 1518 else 1519 { 1520 forgetMemo(); 1521 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.drop!(pegged.peg.literal!("string")), pegged.peg.drop!(pegged.peg.literal!("blob"))), "DClass.sizedType"), "sizedType")(TParseTree("", false,[], s)); 1522 } 1523 } 1524 static string sizedType(GetName g) 1525 { 1526 return "DClass.sizedType"; 1527 } 1528 1529 static TParseTree comment(TParseTree p) 1530 { 1531 if(__ctfe) 1532 { 1533 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(lineComment, blockComment)), "DClass.comment")(p); 1534 } 1535 else 1536 { 1537 if (auto m = tuple(`comment`, p.end) in memo) 1538 return *m; 1539 else 1540 { 1541 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(lineComment, blockComment)), "DClass.comment"), "comment")(p); 1542 memo[tuple(`comment`, p.end)] = result; 1543 return result; 1544 } 1545 } 1546 } 1547 1548 static TParseTree comment(string s) 1549 { 1550 if(__ctfe) 1551 { 1552 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(lineComment, blockComment)), "DClass.comment")(TParseTree("", false,[], s)); 1553 } 1554 else 1555 { 1556 forgetMemo(); 1557 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(lineComment, blockComment)), "DClass.comment"), "comment")(TParseTree("", false,[], s)); 1558 } 1559 } 1560 static string comment(GetName g) 1561 { 1562 return "DClass.comment"; 1563 } 1564 1565 static TParseTree lineComment(TParseTree p) 1566 { 1567 if(__ctfe) 1568 { 1569 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.and!(pegged.peg.literal!("//"), pegged.peg.negLookahead!(pegged.peg.literal!("#"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(endOfLine), pegged.peg.any)), endOfLine)), "DClass.lineComment")(p); 1570 } 1571 else 1572 { 1573 if (auto m = tuple(`lineComment`, p.end) in memo) 1574 return *m; 1575 else 1576 { 1577 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.and!(pegged.peg.literal!("//"), pegged.peg.negLookahead!(pegged.peg.literal!("#"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(endOfLine), pegged.peg.any)), endOfLine)), "DClass.lineComment"), "lineComment")(p); 1578 memo[tuple(`lineComment`, p.end)] = result; 1579 return result; 1580 } 1581 } 1582 } 1583 1584 static TParseTree lineComment(string s) 1585 { 1586 if(__ctfe) 1587 { 1588 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.and!(pegged.peg.literal!("//"), pegged.peg.negLookahead!(pegged.peg.literal!("#"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(endOfLine), pegged.peg.any)), endOfLine)), "DClass.lineComment")(TParseTree("", false,[], s)); 1589 } 1590 else 1591 { 1592 forgetMemo(); 1593 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.and!(pegged.peg.literal!("//"), pegged.peg.negLookahead!(pegged.peg.literal!("#"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(endOfLine), pegged.peg.any)), endOfLine)), "DClass.lineComment"), "lineComment")(TParseTree("", false,[], s)); 1594 } 1595 } 1596 static string lineComment(GetName g) 1597 { 1598 return "DClass.lineComment"; 1599 } 1600 1601 static TParseTree blockComment(TParseTree p) 1602 { 1603 if(__ctfe) 1604 { 1605 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.literal!("/*"), pegged.peg.zeroOrMore!(pegged.peg.or!(blockComment, pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.keywords!("/*", "*/")), pegged.peg.any))), pegged.peg.literal!("*/"))), "DClass.blockComment")(p); 1606 } 1607 else 1608 { 1609 if (auto m = tuple(`blockComment`, p.end) in memo) 1610 return *m; 1611 else 1612 { 1613 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.literal!("/*"), pegged.peg.zeroOrMore!(pegged.peg.or!(blockComment, pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.keywords!("/*", "*/")), pegged.peg.any))), pegged.peg.literal!("*/"))), "DClass.blockComment"), "blockComment")(p); 1614 memo[tuple(`blockComment`, p.end)] = result; 1615 return result; 1616 } 1617 } 1618 } 1619 1620 static TParseTree blockComment(string s) 1621 { 1622 if(__ctfe) 1623 { 1624 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.literal!("/*"), pegged.peg.zeroOrMore!(pegged.peg.or!(blockComment, pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.keywords!("/*", "*/")), pegged.peg.any))), pegged.peg.literal!("*/"))), "DClass.blockComment")(TParseTree("", false,[], s)); 1625 } 1626 else 1627 { 1628 forgetMemo(); 1629 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.literal!("/*"), pegged.peg.zeroOrMore!(pegged.peg.or!(blockComment, pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.keywords!("/*", "*/")), pegged.peg.any))), pegged.peg.literal!("*/"))), "DClass.blockComment"), "blockComment")(TParseTree("", false,[], s)); 1630 } 1631 } 1632 static string blockComment(GetName g) 1633 { 1634 return "DClass.blockComment"; 1635 } 1636 1637 static TParseTree DCFile(TParseTree p) 1638 { 1639 if(__ctfe) 1640 { 1641 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ImportDecl, Spacing), pegged.peg.wrapAround!(Spacing, ParseDirective, Spacing), pegged.peg.wrapAround!(Spacing, TypeDecl, Spacing), pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, comment, Spacing))), Spacing)), pegged.peg.wrapAround!(Spacing, eoi, Spacing)), "DClass.DCFile")(p); 1642 } 1643 else 1644 { 1645 if (auto m = tuple(`DCFile`, p.end) in memo) 1646 return *m; 1647 else 1648 { 1649 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ImportDecl, Spacing), pegged.peg.wrapAround!(Spacing, ParseDirective, Spacing), pegged.peg.wrapAround!(Spacing, TypeDecl, Spacing), pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, comment, Spacing))), Spacing)), pegged.peg.wrapAround!(Spacing, eoi, Spacing)), "DClass.DCFile"), "DCFile")(p); 1650 memo[tuple(`DCFile`, p.end)] = result; 1651 return result; 1652 } 1653 } 1654 } 1655 1656 static TParseTree DCFile(string s) 1657 { 1658 if(__ctfe) 1659 { 1660 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ImportDecl, Spacing), pegged.peg.wrapAround!(Spacing, ParseDirective, Spacing), pegged.peg.wrapAround!(Spacing, TypeDecl, Spacing), pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, comment, Spacing))), Spacing)), pegged.peg.wrapAround!(Spacing, eoi, Spacing)), "DClass.DCFile")(TParseTree("", false,[], s)); 1661 } 1662 else 1663 { 1664 forgetMemo(); 1665 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ImportDecl, Spacing), pegged.peg.wrapAround!(Spacing, ParseDirective, Spacing), pegged.peg.wrapAround!(Spacing, TypeDecl, Spacing), pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, comment, Spacing))), Spacing)), pegged.peg.wrapAround!(Spacing, eoi, Spacing)), "DClass.DCFile"), "DCFile")(TParseTree("", false,[], s)); 1666 } 1667 } 1668 static string DCFile(GetName g) 1669 { 1670 return "DClass.DCFile"; 1671 } 1672 1673 static TParseTree ParseDirective(TParseTree p) 1674 { 1675 if(__ctfe) 1676 { 1677 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//#"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, numLiteral, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.ParseDirective")(p); 1678 } 1679 else 1680 { 1681 if (auto m = tuple(`ParseDirective`, p.end) in memo) 1682 return *m; 1683 else 1684 { 1685 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//#"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, numLiteral, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.ParseDirective"), "ParseDirective")(p); 1686 memo[tuple(`ParseDirective`, p.end)] = result; 1687 return result; 1688 } 1689 } 1690 } 1691 1692 static TParseTree ParseDirective(string s) 1693 { 1694 if(__ctfe) 1695 { 1696 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//#"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, numLiteral, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.ParseDirective")(TParseTree("", false,[], s)); 1697 } 1698 else 1699 { 1700 forgetMemo(); 1701 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//#"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, numLiteral, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.ParseDirective"), "ParseDirective")(TParseTree("", false,[], s)); 1702 } 1703 } 1704 static string ParseDirective(GetName g) 1705 { 1706 return "DClass.ParseDirective"; 1707 } 1708 1709 static TParseTree ImportDecl(TParseTree p) 1710 { 1711 if(__ctfe) 1712 { 1713 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("from"), Spacing), pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("import"), Spacing), pegged.peg.wrapAround!(Spacing, ImportList, Spacing)), "DClass.ImportDecl")(p); 1714 } 1715 else 1716 { 1717 if (auto m = tuple(`ImportDecl`, p.end) in memo) 1718 return *m; 1719 else 1720 { 1721 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("from"), Spacing), pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("import"), Spacing), pegged.peg.wrapAround!(Spacing, ImportList, Spacing)), "DClass.ImportDecl"), "ImportDecl")(p); 1722 memo[tuple(`ImportDecl`, p.end)] = result; 1723 return result; 1724 } 1725 } 1726 } 1727 1728 static TParseTree ImportDecl(string s) 1729 { 1730 if(__ctfe) 1731 { 1732 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("from"), Spacing), pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("import"), Spacing), pegged.peg.wrapAround!(Spacing, ImportList, Spacing)), "DClass.ImportDecl")(TParseTree("", false,[], s)); 1733 } 1734 else 1735 { 1736 forgetMemo(); 1737 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("from"), Spacing), pegged.peg.wrapAround!(Spacing, QualifiedIdentifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("import"), Spacing), pegged.peg.wrapAround!(Spacing, ImportList, Spacing)), "DClass.ImportDecl"), "ImportDecl")(TParseTree("", false,[], s)); 1738 } 1739 } 1740 static string ImportDecl(GetName g) 1741 { 1742 return "DClass.ImportDecl"; 1743 } 1744 1745 static TParseTree QualifiedIdentifier(TParseTree p) 1746 { 1747 if(__ctfe) 1748 { 1749 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Identifier, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.literal!("."), Identifier)))), "DClass.QualifiedIdentifier")(p); 1750 } 1751 else 1752 { 1753 if (auto m = tuple(`QualifiedIdentifier`, p.end) in memo) 1754 return *m; 1755 else 1756 { 1757 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Identifier, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.literal!("."), Identifier)))), "DClass.QualifiedIdentifier"), "QualifiedIdentifier")(p); 1758 memo[tuple(`QualifiedIdentifier`, p.end)] = result; 1759 return result; 1760 } 1761 } 1762 } 1763 1764 static TParseTree QualifiedIdentifier(string s) 1765 { 1766 if(__ctfe) 1767 { 1768 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Identifier, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.literal!("."), Identifier)))), "DClass.QualifiedIdentifier")(TParseTree("", false,[], s)); 1769 } 1770 else 1771 { 1772 forgetMemo(); 1773 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Identifier, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.literal!("."), Identifier)))), "DClass.QualifiedIdentifier"), "QualifiedIdentifier")(TParseTree("", false,[], s)); 1774 } 1775 } 1776 static string QualifiedIdentifier(GetName g) 1777 { 1778 return "DClass.QualifiedIdentifier"; 1779 } 1780 1781 static TParseTree ImportList(TParseTree p) 1782 { 1783 if(__ctfe) 1784 { 1785 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.ImportList")(p); 1786 } 1787 else 1788 { 1789 if (auto m = tuple(`ImportList`, p.end) in memo) 1790 return *m; 1791 else 1792 { 1793 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.ImportList"), "ImportList")(p); 1794 memo[tuple(`ImportList`, p.end)] = result; 1795 return result; 1796 } 1797 } 1798 } 1799 1800 static TParseTree ImportList(string s) 1801 { 1802 if(__ctfe) 1803 { 1804 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.ImportList")(TParseTree("", false,[], s)); 1805 } 1806 else 1807 { 1808 forgetMemo(); 1809 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("/"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.ImportList"), "ImportList")(TParseTree("", false,[], s)); 1810 } 1811 } 1812 static string ImportList(GetName g) 1813 { 1814 return "DClass.ImportList"; 1815 } 1816 1817 static TParseTree TypeDecl(TParseTree p) 1818 { 1819 if(__ctfe) 1820 { 1821 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, KeywordType, Spacing), pegged.peg.wrapAround!(Spacing, StructType, Spacing), pegged.peg.wrapAround!(Spacing, ClassType, Spacing), pegged.peg.wrapAround!(Spacing, AliasType, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.TypeDecl")(p); 1822 } 1823 else 1824 { 1825 if (auto m = tuple(`TypeDecl`, p.end) in memo) 1826 return *m; 1827 else 1828 { 1829 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, KeywordType, Spacing), pegged.peg.wrapAround!(Spacing, StructType, Spacing), pegged.peg.wrapAround!(Spacing, ClassType, Spacing), pegged.peg.wrapAround!(Spacing, AliasType, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.TypeDecl"), "TypeDecl")(p); 1830 memo[tuple(`TypeDecl`, p.end)] = result; 1831 return result; 1832 } 1833 } 1834 } 1835 1836 static TParseTree TypeDecl(string s) 1837 { 1838 if(__ctfe) 1839 { 1840 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, KeywordType, Spacing), pegged.peg.wrapAround!(Spacing, StructType, Spacing), pegged.peg.wrapAround!(Spacing, ClassType, Spacing), pegged.peg.wrapAround!(Spacing, AliasType, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.TypeDecl")(TParseTree("", false,[], s)); 1841 } 1842 else 1843 { 1844 forgetMemo(); 1845 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, KeywordType, Spacing), pegged.peg.wrapAround!(Spacing, StructType, Spacing), pegged.peg.wrapAround!(Spacing, ClassType, Spacing), pegged.peg.wrapAround!(Spacing, AliasType, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), "DClass.TypeDecl"), "TypeDecl")(TParseTree("", false,[], s)); 1846 } 1847 } 1848 static string TypeDecl(GetName g) 1849 { 1850 return "DClass.TypeDecl"; 1851 } 1852 1853 static TParseTree AliasType(TParseTree p) 1854 { 1855 if(__ctfe) 1856 { 1857 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("typedef"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.AliasType")(p); 1858 } 1859 else 1860 { 1861 if (auto m = tuple(`AliasType`, p.end) in memo) 1862 return *m; 1863 else 1864 { 1865 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("typedef"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.AliasType"), "AliasType")(p); 1866 memo[tuple(`AliasType`, p.end)] = result; 1867 return result; 1868 } 1869 } 1870 } 1871 1872 static TParseTree AliasType(string s) 1873 { 1874 if(__ctfe) 1875 { 1876 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("typedef"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.AliasType")(TParseTree("", false,[], s)); 1877 } 1878 else 1879 { 1880 forgetMemo(); 1881 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("typedef"), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.AliasType"), "AliasType")(TParseTree("", false,[], s)); 1882 } 1883 } 1884 static string AliasType(GetName g) 1885 { 1886 return "DClass.AliasType"; 1887 } 1888 1889 static TParseTree KeywordType(TParseTree p) 1890 { 1891 if(__ctfe) 1892 { 1893 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordType")(p); 1894 } 1895 else 1896 { 1897 if (auto m = tuple(`KeywordType`, p.end) in memo) 1898 return *m; 1899 else 1900 { 1901 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordType"), "KeywordType")(p); 1902 memo[tuple(`KeywordType`, p.end)] = result; 1903 return result; 1904 } 1905 } 1906 } 1907 1908 static TParseTree KeywordType(string s) 1909 { 1910 if(__ctfe) 1911 { 1912 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordType")(TParseTree("", false,[], s)); 1913 } 1914 else 1915 { 1916 forgetMemo(); 1917 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("keyword"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordType"), "KeywordType")(TParseTree("", false,[], s)); 1918 } 1919 } 1920 static string KeywordType(GetName g) 1921 { 1922 return "DClass.KeywordType"; 1923 } 1924 1925 static TParseTree KeywordList(TParseTree p) 1926 { 1927 if(__ctfe) 1928 { 1929 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordList")(p); 1930 } 1931 else 1932 { 1933 if (auto m = tuple(`KeywordList`, p.end) in memo) 1934 return *m; 1935 else 1936 { 1937 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordList"), "KeywordList")(p); 1938 memo[tuple(`KeywordList`, p.end)] = result; 1939 return result; 1940 } 1941 } 1942 } 1943 1944 static TParseTree KeywordList(string s) 1945 { 1946 if(__ctfe) 1947 { 1948 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordList")(TParseTree("", false,[], s)); 1949 } 1950 else 1951 { 1952 forgetMemo(); 1953 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), "DClass.KeywordList"), "KeywordList")(TParseTree("", false,[], s)); 1954 } 1955 } 1956 static string KeywordList(GetName g) 1957 { 1958 return "DClass.KeywordList"; 1959 } 1960 1961 static TParseTree StructType(TParseTree p) 1962 { 1963 if(__ctfe) 1964 { 1965 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.StructType")(p); 1966 } 1967 else 1968 { 1969 if (auto m = tuple(`StructType`, p.end) in memo) 1970 return *m; 1971 else 1972 { 1973 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.StructType"), "StructType")(p); 1974 memo[tuple(`StructType`, p.end)] = result; 1975 return result; 1976 } 1977 } 1978 } 1979 1980 static TParseTree StructType(string s) 1981 { 1982 if(__ctfe) 1983 { 1984 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.StructType")(TParseTree("", false,[], s)); 1985 } 1986 else 1987 { 1988 forgetMemo(); 1989 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("struct"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.oneOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.StructType"), "StructType")(TParseTree("", false,[], s)); 1990 } 1991 } 1992 static string StructType(GetName g) 1993 { 1994 return "DClass.StructType"; 1995 } 1996 1997 static TParseTree ClassType(TParseTree p) 1998 { 1999 if(__ctfe) 2000 { 2001 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.wrapAround!(Spacing, InterfaceMarker, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, IdentifierList, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, FieldDecl, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.ClassType")(p); 2002 } 2003 else 2004 { 2005 if (auto m = tuple(`ClassType`, p.end) in memo) 2006 return *m; 2007 else 2008 { 2009 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.wrapAround!(Spacing, InterfaceMarker, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, IdentifierList, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, FieldDecl, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.ClassType"), "ClassType")(p); 2010 memo[tuple(`ClassType`, p.end)] = result; 2011 return result; 2012 } 2013 } 2014 } 2015 2016 static TParseTree ClassType(string s) 2017 { 2018 if(__ctfe) 2019 { 2020 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.wrapAround!(Spacing, InterfaceMarker, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, IdentifierList, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, FieldDecl, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.ClassType")(TParseTree("", false,[], s)); 2021 } 2022 else 2023 { 2024 forgetMemo(); 2025 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.wrapAround!(Spacing, InterfaceMarker, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("dclass"), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, IdentifierList, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, FieldDecl, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(";"), Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), "DClass.ClassType"), "ClassType")(TParseTree("", false,[], s)); 2026 } 2027 } 2028 static string ClassType(GetName g) 2029 { 2030 return "DClass.ClassType"; 2031 } 2032 2033 static TParseTree InterfaceMarker(TParseTree p) 2034 { 2035 if(__ctfe) 2036 { 2037 return pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//@interface"), Spacing), "DClass.InterfaceMarker")(p); 2038 } 2039 else 2040 { 2041 if (auto m = tuple(`InterfaceMarker`, p.end) in memo) 2042 return *m; 2043 else 2044 { 2045 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//@interface"), Spacing), "DClass.InterfaceMarker"), "InterfaceMarker")(p); 2046 memo[tuple(`InterfaceMarker`, p.end)] = result; 2047 return result; 2048 } 2049 } 2050 } 2051 2052 static TParseTree InterfaceMarker(string s) 2053 { 2054 if(__ctfe) 2055 { 2056 return pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//@interface"), Spacing), "DClass.InterfaceMarker")(TParseTree("", false,[], s)); 2057 } 2058 else 2059 { 2060 forgetMemo(); 2061 return hooked!(pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("//@interface"), Spacing), "DClass.InterfaceMarker"), "InterfaceMarker")(TParseTree("", false,[], s)); 2062 } 2063 } 2064 static string InterfaceMarker(GetName g) 2065 { 2066 return "DClass.InterfaceMarker"; 2067 } 2068 2069 static TParseTree IdentifierList(TParseTree p) 2070 { 2071 if(__ctfe) 2072 { 2073 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.IdentifierList")(p); 2074 } 2075 else 2076 { 2077 if (auto m = tuple(`IdentifierList`, p.end) in memo) 2078 return *m; 2079 else 2080 { 2081 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.IdentifierList"), "IdentifierList")(p); 2082 memo[tuple(`IdentifierList`, p.end)] = result; 2083 return result; 2084 } 2085 } 2086 } 2087 2088 static TParseTree IdentifierList(string s) 2089 { 2090 if(__ctfe) 2091 { 2092 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.IdentifierList")(TParseTree("", false,[], s)); 2093 } 2094 else 2095 { 2096 forgetMemo(); 2097 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing))), "DClass.IdentifierList"), "IdentifierList")(TParseTree("", false,[], s)); 2098 } 2099 } 2100 static string IdentifierList(GetName g) 2101 { 2102 return "DClass.IdentifierList"; 2103 } 2104 2105 static TParseTree FieldDecl(TParseTree p) 2106 { 2107 if(__ctfe) 2108 { 2109 return pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, MolecularField, Spacing), pegged.peg.wrapAround!(Spacing, AtomicField, Spacing), pegged.peg.wrapAround!(Spacing, ParameterField, Spacing)), Spacing), "DClass.FieldDecl")(p); 2110 } 2111 else 2112 { 2113 if (auto m = tuple(`FieldDecl`, p.end) in memo) 2114 return *m; 2115 else 2116 { 2117 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, MolecularField, Spacing), pegged.peg.wrapAround!(Spacing, AtomicField, Spacing), pegged.peg.wrapAround!(Spacing, ParameterField, Spacing)), Spacing), "DClass.FieldDecl"), "FieldDecl")(p); 2118 memo[tuple(`FieldDecl`, p.end)] = result; 2119 return result; 2120 } 2121 } 2122 } 2123 2124 static TParseTree FieldDecl(string s) 2125 { 2126 if(__ctfe) 2127 { 2128 return pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, MolecularField, Spacing), pegged.peg.wrapAround!(Spacing, AtomicField, Spacing), pegged.peg.wrapAround!(Spacing, ParameterField, Spacing)), Spacing), "DClass.FieldDecl")(TParseTree("", false,[], s)); 2129 } 2130 else 2131 { 2132 forgetMemo(); 2133 return hooked!(pegged.peg.defined!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, MolecularField, Spacing), pegged.peg.wrapAround!(Spacing, AtomicField, Spacing), pegged.peg.wrapAround!(Spacing, ParameterField, Spacing)), Spacing), "DClass.FieldDecl"), "FieldDecl")(TParseTree("", false,[], s)); 2134 } 2135 } 2136 static string FieldDecl(GetName g) 2137 { 2138 return "DClass.FieldDecl"; 2139 } 2140 2141 static TParseTree MolecularField(TParseTree p) 2142 { 2143 if(__ctfe) 2144 { 2145 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, MolecularFieldMembers, Spacing)), "DClass.MolecularField")(p); 2146 } 2147 else 2148 { 2149 if (auto m = tuple(`MolecularField`, p.end) in memo) 2150 return *m; 2151 else 2152 { 2153 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, MolecularFieldMembers, Spacing)), "DClass.MolecularField"), "MolecularField")(p); 2154 memo[tuple(`MolecularField`, p.end)] = result; 2155 return result; 2156 } 2157 } 2158 } 2159 2160 static TParseTree MolecularField(string s) 2161 { 2162 if(__ctfe) 2163 { 2164 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, MolecularFieldMembers, Spacing)), "DClass.MolecularField")(TParseTree("", false,[], s)); 2165 } 2166 else 2167 { 2168 forgetMemo(); 2169 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(":"), Spacing), pegged.peg.wrapAround!(Spacing, MolecularFieldMembers, Spacing)), "DClass.MolecularField"), "MolecularField")(TParseTree("", false,[], s)); 2170 } 2171 } 2172 static string MolecularField(GetName g) 2173 { 2174 return "DClass.MolecularField"; 2175 } 2176 2177 static TParseTree AtomicField(TParseTree p) 2178 { 2179 if(__ctfe) 2180 { 2181 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, ParameterList, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.AtomicField")(p); 2182 } 2183 else 2184 { 2185 if (auto m = tuple(`AtomicField`, p.end) in memo) 2186 return *m; 2187 else 2188 { 2189 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, ParameterList, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.AtomicField"), "AtomicField")(p); 2190 memo[tuple(`AtomicField`, p.end)] = result; 2191 return result; 2192 } 2193 } 2194 } 2195 2196 static TParseTree AtomicField(string s) 2197 { 2198 if(__ctfe) 2199 { 2200 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, ParameterList, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.AtomicField")(TParseTree("", false,[], s)); 2201 } 2202 else 2203 { 2204 forgetMemo(); 2205 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, ParameterList, Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.AtomicField"), "AtomicField")(TParseTree("", false,[], s)); 2206 } 2207 } 2208 static string AtomicField(GetName g) 2209 { 2210 return "DClass.AtomicField"; 2211 } 2212 2213 static TParseTree ParameterField(TParseTree p) 2214 { 2215 if(__ctfe) 2216 { 2217 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.ParameterField")(p); 2218 } 2219 else 2220 { 2221 if (auto m = tuple(`ParameterField`, p.end) in memo) 2222 return *m; 2223 else 2224 { 2225 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.ParameterField"), "ParameterField")(p); 2226 memo[tuple(`ParameterField`, p.end)] = result; 2227 return result; 2228 } 2229 } 2230 } 2231 2232 static TParseTree ParameterField(string s) 2233 { 2234 if(__ctfe) 2235 { 2236 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.ParameterField")(TParseTree("", false,[], s)); 2237 } 2238 else 2239 { 2240 forgetMemo(); 2241 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, KeywordList, Spacing))), "DClass.ParameterField"), "ParameterField")(TParseTree("", false,[], s)); 2242 } 2243 } 2244 static string ParameterField(GetName g) 2245 { 2246 return "DClass.ParameterField"; 2247 } 2248 2249 static TParseTree MolecularFieldMembers(TParseTree p) 2250 { 2251 if(__ctfe) 2252 { 2253 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing)), Spacing))), "DClass.MolecularFieldMembers")(p); 2254 } 2255 else 2256 { 2257 if (auto m = tuple(`MolecularFieldMembers`, p.end) in memo) 2258 return *m; 2259 else 2260 { 2261 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing)), Spacing))), "DClass.MolecularFieldMembers"), "MolecularFieldMembers")(p); 2262 memo[tuple(`MolecularFieldMembers`, p.end)] = result; 2263 return result; 2264 } 2265 } 2266 } 2267 2268 static TParseTree MolecularFieldMembers(string s) 2269 { 2270 if(__ctfe) 2271 { 2272 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing)), Spacing))), "DClass.MolecularFieldMembers")(TParseTree("", false,[], s)); 2273 } 2274 else 2275 { 2276 forgetMemo(); 2277 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.wrapAround!(Spacing, Identifier, Spacing), Spacing)), Spacing))), "DClass.MolecularFieldMembers"), "MolecularFieldMembers")(TParseTree("", false,[], s)); 2278 } 2279 } 2280 static string MolecularFieldMembers(GetName g) 2281 { 2282 return "DClass.MolecularFieldMembers"; 2283 } 2284 2285 static TParseTree ParameterList(TParseTree p) 2286 { 2287 if(__ctfe) 2288 { 2289 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Parameter, Spacing)), Spacing))), "DClass.ParameterList")(p); 2290 } 2291 else 2292 { 2293 if (auto m = tuple(`ParameterList`, p.end) in memo) 2294 return *m; 2295 else 2296 { 2297 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Parameter, Spacing)), Spacing))), "DClass.ParameterList"), "ParameterList")(p); 2298 memo[tuple(`ParameterList`, p.end)] = result; 2299 return result; 2300 } 2301 } 2302 } 2303 2304 static TParseTree ParameterList(string s) 2305 { 2306 if(__ctfe) 2307 { 2308 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Parameter, Spacing)), Spacing))), "DClass.ParameterList")(TParseTree("", false,[], s)); 2309 } 2310 else 2311 { 2312 forgetMemo(); 2313 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Parameter, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(","), Spacing), pegged.peg.wrapAround!(Spacing, Parameter, Spacing)), Spacing))), "DClass.ParameterList"), "ParameterList")(TParseTree("", false,[], s)); 2314 } 2315 } 2316 static string ParameterList(GetName g) 2317 { 2318 return "DClass.ParameterList"; 2319 } 2320 2321 static TParseTree Parameter(TParseTree p) 2322 { 2323 if(__ctfe) 2324 { 2325 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ArrayParameter, Spacing), pegged.peg.wrapAround!(Spacing, CharParameter, Spacing), pegged.peg.wrapAround!(Spacing, IntParameter, Spacing), pegged.peg.wrapAround!(Spacing, FloatParameter, Spacing), pegged.peg.wrapAround!(Spacing, SizedParameter, Spacing), pegged.peg.wrapAround!(Spacing, StructParameter, Spacing)), "DClass.Parameter")(p); 2326 } 2327 else 2328 { 2329 if (auto m = tuple(`Parameter`, p.end) in memo) 2330 return *m; 2331 else 2332 { 2333 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ArrayParameter, Spacing), pegged.peg.wrapAround!(Spacing, CharParameter, Spacing), pegged.peg.wrapAround!(Spacing, IntParameter, Spacing), pegged.peg.wrapAround!(Spacing, FloatParameter, Spacing), pegged.peg.wrapAround!(Spacing, SizedParameter, Spacing), pegged.peg.wrapAround!(Spacing, StructParameter, Spacing)), "DClass.Parameter"), "Parameter")(p); 2334 memo[tuple(`Parameter`, p.end)] = result; 2335 return result; 2336 } 2337 } 2338 } 2339 2340 static TParseTree Parameter(string s) 2341 { 2342 if(__ctfe) 2343 { 2344 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ArrayParameter, Spacing), pegged.peg.wrapAround!(Spacing, CharParameter, Spacing), pegged.peg.wrapAround!(Spacing, IntParameter, Spacing), pegged.peg.wrapAround!(Spacing, FloatParameter, Spacing), pegged.peg.wrapAround!(Spacing, SizedParameter, Spacing), pegged.peg.wrapAround!(Spacing, StructParameter, Spacing)), "DClass.Parameter")(TParseTree("", false,[], s)); 2345 } 2346 else 2347 { 2348 forgetMemo(); 2349 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, ArrayParameter, Spacing), pegged.peg.wrapAround!(Spacing, CharParameter, Spacing), pegged.peg.wrapAround!(Spacing, IntParameter, Spacing), pegged.peg.wrapAround!(Spacing, FloatParameter, Spacing), pegged.peg.wrapAround!(Spacing, SizedParameter, Spacing), pegged.peg.wrapAround!(Spacing, StructParameter, Spacing)), "DClass.Parameter"), "Parameter")(TParseTree("", false,[], s)); 2350 } 2351 } 2352 static string Parameter(GetName g) 2353 { 2354 return "DClass.Parameter"; 2355 } 2356 2357 static TParseTree CharParameter(TParseTree p) 2358 { 2359 if(__ctfe) 2360 { 2361 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, charLiteral, Spacing)), Spacing))), "DClass.CharParameter")(p); 2362 } 2363 else 2364 { 2365 if (auto m = tuple(`CharParameter`, p.end) in memo) 2366 return *m; 2367 else 2368 { 2369 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, charLiteral, Spacing)), Spacing))), "DClass.CharParameter"), "CharParameter")(p); 2370 memo[tuple(`CharParameter`, p.end)] = result; 2371 return result; 2372 } 2373 } 2374 } 2375 2376 static TParseTree CharParameter(string s) 2377 { 2378 if(__ctfe) 2379 { 2380 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, charLiteral, Spacing)), Spacing))), "DClass.CharParameter")(TParseTree("", false,[], s)); 2381 } 2382 else 2383 { 2384 forgetMemo(); 2385 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.wrapAround!(Spacing, charType, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, charLiteral, Spacing)), Spacing))), "DClass.CharParameter"), "CharParameter")(TParseTree("", false,[], s)); 2386 } 2387 } 2388 static string CharParameter(GetName g) 2389 { 2390 return "DClass.CharParameter"; 2391 } 2392 2393 static TParseTree IntParameter(TParseTree p) 2394 { 2395 if(__ctfe) 2396 { 2397 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, intType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, IntConstant, Spacing)), Spacing))), "DClass.IntParameter")(p); 2398 } 2399 else 2400 { 2401 if (auto m = tuple(`IntParameter`, p.end) in memo) 2402 return *m; 2403 else 2404 { 2405 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, intType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, IntConstant, Spacing)), Spacing))), "DClass.IntParameter"), "IntParameter")(p); 2406 memo[tuple(`IntParameter`, p.end)] = result; 2407 return result; 2408 } 2409 } 2410 } 2411 2412 static TParseTree IntParameter(string s) 2413 { 2414 if(__ctfe) 2415 { 2416 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, intType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, IntConstant, Spacing)), Spacing))), "DClass.IntParameter")(TParseTree("", false,[], s)); 2417 } 2418 else 2419 { 2420 forgetMemo(); 2421 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, intType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, IntConstant, Spacing)), Spacing))), "DClass.IntParameter"), "IntParameter")(TParseTree("", false,[], s)); 2422 } 2423 } 2424 static string IntParameter(GetName g) 2425 { 2426 return "DClass.IntParameter"; 2427 } 2428 2429 static TParseTree IntConstant(TParseTree p) 2430 { 2431 if(__ctfe) 2432 { 2433 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing))), "DClass.IntConstant")(p); 2434 } 2435 else 2436 { 2437 if (auto m = tuple(`IntConstant`, p.end) in memo) 2438 return *m; 2439 else 2440 { 2441 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing))), "DClass.IntConstant"), "IntConstant")(p); 2442 memo[tuple(`IntConstant`, p.end)] = result; 2443 return result; 2444 } 2445 } 2446 } 2447 2448 static TParseTree IntConstant(string s) 2449 { 2450 if(__ctfe) 2451 { 2452 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing))), "DClass.IntConstant")(TParseTree("", false,[], s)); 2453 } 2454 else 2455 { 2456 forgetMemo(); 2457 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing))), "DClass.IntConstant"), "IntConstant")(TParseTree("", false,[], s)); 2458 } 2459 } 2460 static string IntConstant(GetName g) 2461 { 2462 return "DClass.IntConstant"; 2463 } 2464 2465 static TParseTree IntTransform(TParseTree p) 2466 { 2467 if(__ctfe) 2468 { 2469 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), Spacing))), "DClass.IntTransform")(p); 2470 } 2471 else 2472 { 2473 if (auto m = tuple(`IntTransform`, p.end) in memo) 2474 return *m; 2475 else 2476 { 2477 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), Spacing))), "DClass.IntTransform"), "IntTransform")(p); 2478 memo[tuple(`IntTransform`, p.end)] = result; 2479 return result; 2480 } 2481 } 2482 } 2483 2484 static TParseTree IntTransform(string s) 2485 { 2486 if(__ctfe) 2487 { 2488 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), Spacing))), "DClass.IntTransform")(TParseTree("", false,[], s)); 2489 } 2490 else 2491 { 2492 forgetMemo(); 2493 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing), pegged.peg.wrapAround!(Spacing, IntTransform, Spacing)), Spacing))), "DClass.IntTransform"), "IntTransform")(TParseTree("", false,[], s)); 2494 } 2495 } 2496 static string IntTransform(GetName g) 2497 { 2498 return "DClass.IntTransform"; 2499 } 2500 2501 static TParseTree IntRange(TParseTree p) 2502 { 2503 if(__ctfe) 2504 { 2505 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.IntRange")(p); 2506 } 2507 else 2508 { 2509 if (auto m = tuple(`IntRange`, p.end) in memo) 2510 return *m; 2511 else 2512 { 2513 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.IntRange"), "IntRange")(p); 2514 memo[tuple(`IntRange`, p.end)] = result; 2515 return result; 2516 } 2517 } 2518 } 2519 2520 static TParseTree IntRange(string s) 2521 { 2522 if(__ctfe) 2523 { 2524 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.IntRange")(TParseTree("", false,[], s)); 2525 } 2526 else 2527 { 2528 forgetMemo(); 2529 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.IntRange"), "IntRange")(TParseTree("", false,[], s)); 2530 } 2531 } 2532 static string IntRange(GetName g) 2533 { 2534 return "DClass.IntRange"; 2535 } 2536 2537 static TParseTree FloatParameter(TParseTree p) 2538 { 2539 if(__ctfe) 2540 { 2541 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, floatType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, FloatConstant, Spacing)), Spacing))), "DClass.FloatParameter")(p); 2542 } 2543 else 2544 { 2545 if (auto m = tuple(`FloatParameter`, p.end) in memo) 2546 return *m; 2547 else 2548 { 2549 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, floatType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, FloatConstant, Spacing)), Spacing))), "DClass.FloatParameter"), "FloatParameter")(p); 2550 memo[tuple(`FloatParameter`, p.end)] = result; 2551 return result; 2552 } 2553 } 2554 } 2555 2556 static TParseTree FloatParameter(string s) 2557 { 2558 if(__ctfe) 2559 { 2560 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, floatType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, FloatConstant, Spacing)), Spacing))), "DClass.FloatParameter")(TParseTree("", false,[], s)); 2561 } 2562 else 2563 { 2564 forgetMemo(); 2565 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, floatType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatRange, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, FloatConstant, Spacing)), Spacing))), "DClass.FloatParameter"), "FloatParameter")(TParseTree("", false,[], s)); 2566 } 2567 } 2568 static string FloatParameter(GetName g) 2569 { 2570 return "DClass.FloatParameter"; 2571 } 2572 2573 static TParseTree FloatConstant(TParseTree p) 2574 { 2575 if(__ctfe) 2576 { 2577 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), Spacing)), "DClass.FloatConstant")(p); 2578 } 2579 else 2580 { 2581 if (auto m = tuple(`FloatConstant`, p.end) in memo) 2582 return *m; 2583 else 2584 { 2585 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), Spacing)), "DClass.FloatConstant"), "FloatConstant")(p); 2586 memo[tuple(`FloatConstant`, p.end)] = result; 2587 return result; 2588 } 2589 } 2590 } 2591 2592 static TParseTree FloatConstant(string s) 2593 { 2594 if(__ctfe) 2595 { 2596 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), Spacing)), "DClass.FloatConstant")(TParseTree("", false,[], s)); 2597 } 2598 else 2599 { 2600 forgetMemo(); 2601 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("{"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("}"), Spacing)), Spacing)), "DClass.FloatConstant"), "FloatConstant")(TParseTree("", false,[], s)); 2602 } 2603 } 2604 static string FloatConstant(GetName g) 2605 { 2606 return "DClass.FloatConstant"; 2607 } 2608 2609 static TParseTree FloatTransform(TParseTree p) 2610 { 2611 if(__ctfe) 2612 { 2613 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing)), Spacing))), "DClass.FloatTransform")(p); 2614 } 2615 else 2616 { 2617 if (auto m = tuple(`FloatTransform`, p.end) in memo) 2618 return *m; 2619 else 2620 { 2621 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing)), Spacing))), "DClass.FloatTransform"), "FloatTransform")(p); 2622 memo[tuple(`FloatTransform`, p.end)] = result; 2623 return result; 2624 } 2625 } 2626 } 2627 2628 static TParseTree FloatTransform(string s) 2629 { 2630 if(__ctfe) 2631 { 2632 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing)), Spacing))), "DClass.FloatTransform")(TParseTree("", false,[], s)); 2633 } 2634 else 2635 { 2636 forgetMemo(); 2637 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, operator, Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.zeroOrMore!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, FloatTransform, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), Spacing)), Spacing))), "DClass.FloatTransform"), "FloatTransform")(TParseTree("", false,[], s)); 2638 } 2639 } 2640 static string FloatTransform(GetName g) 2641 { 2642 return "DClass.FloatTransform"; 2643 } 2644 2645 static TParseTree FloatRange(TParseTree p) 2646 { 2647 if(__ctfe) 2648 { 2649 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.FloatRange")(p); 2650 } 2651 else 2652 { 2653 if (auto m = tuple(`FloatRange`, p.end) in memo) 2654 return *m; 2655 else 2656 { 2657 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.FloatRange"), "FloatRange")(p); 2658 memo[tuple(`FloatRange`, p.end)] = result; 2659 return result; 2660 } 2661 } 2662 } 2663 2664 static TParseTree FloatRange(string s) 2665 { 2666 if(__ctfe) 2667 { 2668 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.FloatRange")(TParseTree("", false,[], s)); 2669 } 2670 else 2671 { 2672 forgetMemo(); 2673 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, floatLiteral, Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.FloatRange"), "FloatRange")(TParseTree("", false,[], s)); 2674 } 2675 } 2676 static string FloatRange(GetName g) 2677 { 2678 return "DClass.FloatRange"; 2679 } 2680 2681 static TParseTree SizedParameter(TParseTree p) 2682 { 2683 if(__ctfe) 2684 { 2685 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, SizeConstraint, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, stringLiteral, Spacing)), Spacing))), "DClass.SizedParameter")(p); 2686 } 2687 else 2688 { 2689 if (auto m = tuple(`SizedParameter`, p.end) in memo) 2690 return *m; 2691 else 2692 { 2693 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, SizeConstraint, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, stringLiteral, Spacing)), Spacing))), "DClass.SizedParameter"), "SizedParameter")(p); 2694 memo[tuple(`SizedParameter`, p.end)] = result; 2695 return result; 2696 } 2697 } 2698 } 2699 2700 static TParseTree SizedParameter(string s) 2701 { 2702 if(__ctfe) 2703 { 2704 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, SizeConstraint, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, stringLiteral, Spacing)), Spacing))), "DClass.SizedParameter")(TParseTree("", false,[], s)); 2705 } 2706 else 2707 { 2708 forgetMemo(); 2709 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, sizedType, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, SizeConstraint, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("="), Spacing), pegged.peg.wrapAround!(Spacing, stringLiteral, Spacing)), Spacing))), "DClass.SizedParameter"), "SizedParameter")(TParseTree("", false,[], s)); 2710 } 2711 } 2712 static string SizedParameter(GetName g) 2713 { 2714 return "DClass.SizedParameter"; 2715 } 2716 2717 static TParseTree SizeConstraint(TParseTree p) 2718 { 2719 if(__ctfe) 2720 { 2721 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.SizeConstraint")(p); 2722 } 2723 else 2724 { 2725 if (auto m = tuple(`SizeConstraint`, p.end) in memo) 2726 return *m; 2727 else 2728 { 2729 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.SizeConstraint"), "SizeConstraint")(p); 2730 memo[tuple(`SizeConstraint`, p.end)] = result; 2731 return result; 2732 } 2733 } 2734 } 2735 2736 static TParseTree SizeConstraint(string s) 2737 { 2738 if(__ctfe) 2739 { 2740 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.SizeConstraint")(TParseTree("", false,[], s)); 2741 } 2742 else 2743 { 2744 forgetMemo(); 2745 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("("), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!(")"), Spacing)), "DClass.SizeConstraint"), "SizeConstraint")(TParseTree("", false,[], s)); 2746 } 2747 } 2748 static string SizeConstraint(GetName g) 2749 { 2750 return "DClass.SizeConstraint"; 2751 } 2752 2753 static TParseTree StructParameter(TParseTree p) 2754 { 2755 if(__ctfe) 2756 { 2757 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing))), "DClass.StructParameter")(p); 2758 } 2759 else 2760 { 2761 if (auto m = tuple(`StructParameter`, p.end) in memo) 2762 return *m; 2763 else 2764 { 2765 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing))), "DClass.StructParameter"), "StructParameter")(p); 2766 memo[tuple(`StructParameter`, p.end)] = result; 2767 return result; 2768 } 2769 } 2770 } 2771 2772 static TParseTree StructParameter(string s) 2773 { 2774 if(__ctfe) 2775 { 2776 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing))), "DClass.StructParameter")(TParseTree("", false,[], s)); 2777 } 2778 else 2779 { 2780 forgetMemo(); 2781 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing))), "DClass.StructParameter"), "StructParameter")(TParseTree("", false,[], s)); 2782 } 2783 } 2784 static string StructParameter(GetName g) 2785 { 2786 return "DClass.StructParameter"; 2787 } 2788 2789 static TParseTree ArrayParameter(TParseTree p) 2790 { 2791 if(__ctfe) 2792 { 2793 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.wrapAround!(Spacing, ArrayRange, Spacing)), "DClass.ArrayParameter")(p); 2794 } 2795 else 2796 { 2797 if (auto m = tuple(`ArrayParameter`, p.end) in memo) 2798 return *m; 2799 else 2800 { 2801 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.wrapAround!(Spacing, ArrayRange, Spacing)), "DClass.ArrayParameter"), "ArrayParameter")(p); 2802 memo[tuple(`ArrayParameter`, p.end)] = result; 2803 return result; 2804 } 2805 } 2806 } 2807 2808 static TParseTree ArrayParameter(string s) 2809 { 2810 if(__ctfe) 2811 { 2812 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.wrapAround!(Spacing, ArrayRange, Spacing)), "DClass.ArrayParameter")(TParseTree("", false,[], s)); 2813 } 2814 else 2815 { 2816 forgetMemo(); 2817 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.or!(pegged.peg.wrapAround!(Spacing, dataType, Spacing), pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, Identifier, Spacing)), pegged.peg.wrapAround!(Spacing, ArrayRange, Spacing)), "DClass.ArrayParameter"), "ArrayParameter")(TParseTree("", false,[], s)); 2818 } 2819 } 2820 static string ArrayParameter(GetName g) 2821 { 2822 return "DClass.ArrayParameter"; 2823 } 2824 2825 static TParseTree ArrayRange(TParseTree p) 2826 { 2827 if(__ctfe) 2828 { 2829 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing)), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing))), "DClass.ArrayRange")(p); 2830 } 2831 else 2832 { 2833 if (auto m = tuple(`ArrayRange`, p.end) in memo) 2834 return *m; 2835 else 2836 { 2837 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing)), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing))), "DClass.ArrayRange"), "ArrayRange")(p); 2838 memo[tuple(`ArrayRange`, p.end)] = result; 2839 return result; 2840 } 2841 } 2842 } 2843 2844 static TParseTree ArrayRange(string s) 2845 { 2846 if(__ctfe) 2847 { 2848 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing)), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing))), "DClass.ArrayRange")(TParseTree("", false,[], s)); 2849 } 2850 else 2851 { 2852 forgetMemo(); 2853 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing)), pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("["), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing), pegged.peg.option!(pegged.peg.wrapAround!(Spacing, pegged.peg.and!(pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("-"), Spacing), pegged.peg.wrapAround!(Spacing, intLiteral, Spacing)), Spacing)), pegged.peg.wrapAround!(Spacing, pegged.peg.literal!("]"), Spacing))), "DClass.ArrayRange"), "ArrayRange")(TParseTree("", false,[], s)); 2854 } 2855 } 2856 static string ArrayRange(GetName g) 2857 { 2858 return "DClass.ArrayRange"; 2859 } 2860 2861 static TParseTree opCall(TParseTree p) 2862 { 2863 TParseTree result = decimateTree(Module(p)); 2864 result.children = [result]; 2865 result.name = "DClass"; 2866 return result; 2867 } 2868 2869 static TParseTree opCall(string input) 2870 { 2871 if(__ctfe) 2872 { 2873 return DClass(TParseTree(``, false, [], input, 0, 0)); 2874 } 2875 else 2876 { 2877 forgetMemo(); 2878 return DClass(TParseTree(``, false, [], input, 0, 0)); 2879 } 2880 } 2881 static string opCall(GetName g) 2882 { 2883 return "DClass"; 2884 } 2885 2886 2887 static void forgetMemo() 2888 { 2889 memo = null; 2890 } 2891 } 2892 } 2893 2894 alias GenericDClass!(ParseTree).DClass DClass; 2895