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