1 /++ 2 This module was automatically generated from the following grammar: 3 4 #; This document describes TOML's syntax, using the ABNF format (defined in 5 #; RFC 5234 -- https://www.ietf.org/rfc/rfc5234.txt). 6 #; 7 #; All valid TOML documents will match this description, however certain 8 #; invalid documents would need to be rejected as per the semantics described 9 #; in the supporting text description. 10 11 #; It is possible to try this grammar interactively, using instaparse. 12 #; http://instaparse.mojombo.com/ 13 #; 14 #; To do so, in the lower right, click on Options and change `:input-format` to 15 #; ':abnf'. Then paste this entire ABNF document into the grammar entry box 16 #; (above the options). Then you can type or paste a sample TOML document into 17 #; the beige box on the left. Tada! 18 19 #; Overall Structure 20 21 22 TomlGrammar: 23 24 toml <- expression ( newline expression )* :eoi 25 26 expression <- ws table ws ( comment )? / ws keyval ws ( comment )? / ws ( comment )? 27 28 #; Whitespace 29 30 ws <- wschar* 31 wschar <- [ ] / [\t] # Space / Horizontal tab 32 33 #; Newline 34 35 newline <: [\n] / [\r] [\n] # LF / CRLF 36 37 #; Comment 38 39 comment_start_symbol <- [#] # # 40 non_ascii <- [\x80-\uD7FF] / [\uE000-\U0010FFFF] 41 non_eol <- [\t] / [ -~] / non_ascii 42 43 comment <- comment_start_symbol non_eol* 44 45 #; Key-Value pairs 46 47 keyval <- key keyval_sep val 48 49 key <- dotted_key / simple_key 50 simple_key <- quoted_key / unquoted_key 51 52 unquoted_key <- ( ALPHA / DIGIT / [-] / [_] )+ # A-Z / a-z / 0-9 / - / _ 53 quoted_key <- basic_string / literal_string 54 dotted_key <- simple_key ( dot_sep simple_key )+ 55 56 dot_sep <- ws [.] ws # . Period 57 keyval_sep <- ws [=] ws # = 58 59 val <- string_ / boolean / array / inline_table / date_time / float_ / integer 60 61 #; String 62 63 string_ <- ml_basic_string / basic_string / ml_literal_string / literal_string 64 65 #; Basic String 66 67 basic_string <- quotation_mark basic_char* quotation_mark 68 69 quotation_mark <- ["] # " 70 71 basic_char <- basic_unescaped / escaped 72 basic_unescaped <- wschar / [!] / [#-\[] / [\]-~] / non_ascii 73 escaped <- escape escape_seq_char 74 75 escape <- [\\] # \ 76 77 # %x22 " quotation mark U+0022 78 # %x5C \ reverse solidus U+005C 79 # %x62 b backspace U+0008 80 # %x66 f form feed U+000C 81 # %x6E n line feed U+000A 82 # %x72 r carriage return U+000D 83 # %x74 t tab U+0009 84 # %x75 4HEXDIG uXXXX U+XXXX 85 # %x55 8HEXDIG UXXXXXXXX U+XXXXXXXX 86 escape_seq_char <- ["] / [\\] / [b] / [f] / [n] / [r] / [t] / [u] HEXDIG HEXDIG HEXDIG HEXDIG / [U] HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG HEXDIG 87 88 #; Multiline Basic String 89 90 ml_basic_string <- ml_basic_string_delim ( newline )? ml_basic_body 91 ml_basic_string_delim 92 ml_basic_string_delim <- quotation_mark quotation_mark quotation_mark 93 ml_basic_body <- mlb_content* ( mlb_quotes mlb_content+ )* ( mlb_quotes )? 94 95 mlb_content <- mlb_char / newline / mlb_escaped_nl 96 mlb_char <- mlb_unescaped / escaped 97 mlb_quotes <- quotation_mark quotation_mark? !quotation_mark 98 mlb_unescaped <- wschar / [!] / [#-\[] / [\]-~] / non_ascii 99 mlb_escaped_nl <- escape ws newline ( wschar / newline )* 100 101 #; Literal String 102 103 literal_string <- apostrophe literal_char* apostrophe 104 105 apostrophe <- ['] # ' apostrophe 106 107 literal_char <- [\t] / [ -&] / [(-~] / non_ascii 108 109 #; Multiline Literal String 110 111 ml_literal_string <- ml_literal_string_delim ( newline )? ml_literal_body 112 ml_literal_string_delim 113 ml_literal_string_delim <- apostrophe apostrophe apostrophe 114 ml_literal_body <- mll_content* ( mll_quotes mll_content+ )* ( mll_quotes )? 115 116 mll_content <- mll_char / newline 117 mll_char <- [\t] / [ -&] / [(-~] / non_ascii 118 mll_quotes <- apostrophe apostrophe? !apostrophe 119 120 #; Integer 121 122 integer <- hex_int / oct_int / bin_int / dec_int 123 124 minus <- [-] # - 125 plus <- [+] # + 126 underscore <- [_] # _ 127 digit1_9 <- [1-9] # 1-9 128 digit0_7 <- [0-7] # 0-7 129 digit0_1 <- [0-1] # 0-1 130 131 hex_prefix <- "0x" # 0x 132 oct_prefix <- "0o" # 0o 133 bin_prefix <- "0b" # 0b 134 135 dec_int <- ( minus / plus )? unsigned_dec_int 136 unsigned_dec_int <- digit1_9 ( DIGIT / underscore DIGIT )+ / DIGIT 137 138 hex_int <- hex_prefix HEXDIG ( HEXDIG / underscore HEXDIG )* 139 oct_int <- oct_prefix digit0_7 ( digit0_7 / underscore digit0_7 )* 140 bin_int <- bin_prefix digit0_1 ( digit0_1 / underscore digit0_1 )* 141 142 #; Float 143 144 float_ <- float_int_part ( exp / frac ( exp )? ) / special_float 145 146 float_int_part <- dec_int 147 frac <- decimal_point zero_prefixable_int 148 decimal_point <- [.] # . 149 zero_prefixable_int <- DIGIT ( DIGIT / underscore DIGIT )* 150 151 exp <- "e" float_exp_part 152 float_exp_part <- ( minus / plus )? zero_prefixable_int 153 154 special_float <- ( minus / plus )? ( inf / nan ) 155 inf <- "inf" # inf 156 nan <- "nan" # nan 157 158 #; Boolean 159 160 boolean <- true_ / false_ 161 162 true_ <- "true" # true 163 false_ <- "false" # false 164 165 #; Date and Time (as defined in RFC 3339) 166 167 date_time <- offset_date_time / local_date_time / local_date / local_time 168 169 date_fullyear <- DIGIT DIGIT DIGIT DIGIT 170 date_month <- DIGIT DIGIT # 01-12 171 date_mday <- DIGIT DIGIT # 01-28, 01-29, 01-30, 01-31 based on month/year 172 time_delim <- "T" / [ ] # T, t, or space 173 time_hour <- DIGIT DIGIT # 00-23 174 time_minute <- DIGIT DIGIT # 00-59 175 time_second <- DIGIT DIGIT # 00-58, 00-59, 00-60 based on leap second rules 176 time_secfrac <- "." DIGIT+ 177 time_numoffset <- ( "+" / "-" ) time_hour ":" time_minute 178 time_offset <- "Z" / time_numoffset 179 180 partial_time <- time_hour ":" time_minute ":" time_second ( time_secfrac )? 181 full_date <- date_fullyear "-" date_month "-" date_mday 182 full_time <- partial_time time_offset 183 184 #; Offset Date-Time 185 186 offset_date_time <- full_date time_delim full_time 187 188 #; Local Date-Time 189 190 local_date_time <- full_date time_delim partial_time 191 192 #; Local Date 193 194 local_date <- full_date 195 196 #; Local Time 197 198 local_time <- partial_time 199 200 #; Array 201 202 array <- array_open ( array_values )? ws_comment_newline array_close 203 204 array_open <- [\[] # [ 205 array_close <- [\]] # ] 206 207 array_values <- ws_comment_newline val ws_comment_newline array_sep array_values / ws_comment_newline val ws_comment_newline ( array_sep )? 208 209 array_sep <- [,] # , Comma 210 211 ws_comment_newline <- ( wschar / ( comment )? newline )* 212 213 #; Table 214 215 table <- std_table / array_table 216 217 #; Standard Table 218 219 std_table <- std_table_open key std_table_close 220 221 std_table_open <- [\[] ws # [ Left square bracket 222 std_table_close <- ws [\]] # ] Right square bracket 223 224 #; Inline Table 225 226 inline_table <- inline_table_open ( inline_table_keyvals )? inline_table_close 227 228 inline_table_open <- [{] ws # { 229 inline_table_close <- ws [}] # } 230 inline_table_sep <- ws [,] ws # , Comma 231 232 inline_table_keyvals <- keyval ( inline_table_sep inline_table_keyvals )? 233 234 #; Array Table 235 236 array_table <- array_table_open key array_table_close 237 238 array_table_open <- "[[" ws # [[ Double left square bracket 239 array_table_close <- ws "]]" # ]] Double right square bracket 240 241 #; Built-in ABNF terms, reproduced here for clarity 242 243 ALPHA <- [A-Z] / [a-z] # A-Z / a-z 244 DIGIT <- [0-9] # 0-9 245 HEXDIG <- DIGIT / [A-Fa-f] 246 247 248 +/ 249 module toml_foolery.decode.peg_grammar; 250 251 public import pegged.peg; 252 import std.algorithm: startsWith; 253 import std.functional: toDelegate; 254 255 struct GenericTomlGrammar(TParseTree) 256 { 257 import std.functional : toDelegate; 258 import pegged.dynamic.grammar; 259 static import pegged.peg; 260 struct TomlGrammar 261 { 262 enum name = "TomlGrammar"; 263 static ParseTree delegate(ParseTree)[string] before; 264 static ParseTree delegate(ParseTree)[string] after; 265 static ParseTree delegate(ParseTree)[string] rules; 266 import std.typecons:Tuple, tuple; 267 static TParseTree[Tuple!(string, size_t)] memo; 268 static this() 269 { 270 rules["toml"] = toDelegate(&toml); 271 rules["expression"] = toDelegate(&expression); 272 rules["ws"] = toDelegate(&ws); 273 rules["wschar"] = toDelegate(&wschar); 274 rules["newline"] = toDelegate(&newline); 275 rules["comment_start_symbol"] = toDelegate(&comment_start_symbol); 276 rules["non_ascii"] = toDelegate(&non_ascii); 277 rules["non_eol"] = toDelegate(&non_eol); 278 rules["comment"] = toDelegate(&comment); 279 rules["keyval"] = toDelegate(&keyval); 280 rules["key"] = toDelegate(&key); 281 rules["simple_key"] = toDelegate(&simple_key); 282 rules["unquoted_key"] = toDelegate(&unquoted_key); 283 rules["quoted_key"] = toDelegate("ed_key); 284 rules["dotted_key"] = toDelegate(&dotted_key); 285 rules["dot_sep"] = toDelegate(&dot_sep); 286 rules["keyval_sep"] = toDelegate(&keyval_sep); 287 rules["val"] = toDelegate(&val); 288 rules["string_"] = toDelegate(&string_); 289 rules["basic_string"] = toDelegate(&basic_string); 290 rules["quotation_mark"] = toDelegate("ation_mark); 291 rules["basic_char"] = toDelegate(&basic_char); 292 rules["basic_unescaped"] = toDelegate(&basic_unescaped); 293 rules["escaped"] = toDelegate(&escaped); 294 rules["escape"] = toDelegate(&escape); 295 rules["escape_seq_char"] = toDelegate(&escape_seq_char); 296 rules["ml_basic_string"] = toDelegate(&ml_basic_string); 297 rules["ml_basic_string_delim"] = toDelegate(&ml_basic_string_delim); 298 rules["ml_basic_body"] = toDelegate(&ml_basic_body); 299 rules["mlb_content"] = toDelegate(&mlb_content); 300 rules["mlb_char"] = toDelegate(&mlb_char); 301 rules["mlb_quotes"] = toDelegate(&mlb_quotes); 302 rules["mlb_unescaped"] = toDelegate(&mlb_unescaped); 303 rules["mlb_escaped_nl"] = toDelegate(&mlb_escaped_nl); 304 rules["literal_string"] = toDelegate(&literal_string); 305 rules["apostrophe"] = toDelegate(&apostrophe); 306 rules["literal_char"] = toDelegate(&literal_char); 307 rules["ml_literal_string"] = toDelegate(&ml_literal_string); 308 rules["ml_literal_string_delim"] = toDelegate(&ml_literal_string_delim); 309 rules["ml_literal_body"] = toDelegate(&ml_literal_body); 310 rules["mll_content"] = toDelegate(&mll_content); 311 rules["mll_char"] = toDelegate(&mll_char); 312 rules["mll_quotes"] = toDelegate(&mll_quotes); 313 rules["integer"] = toDelegate(&integer); 314 rules["minus"] = toDelegate(&minus); 315 rules["plus"] = toDelegate(&plus); 316 rules["underscore"] = toDelegate(&underscore); 317 rules["digit1_9"] = toDelegate(&digit1_9); 318 rules["digit0_7"] = toDelegate(&digit0_7); 319 rules["digit0_1"] = toDelegate(&digit0_1); 320 rules["hex_prefix"] = toDelegate(&hex_prefix); 321 rules["oct_prefix"] = toDelegate(&oct_prefix); 322 rules["bin_prefix"] = toDelegate(&bin_prefix); 323 rules["dec_int"] = toDelegate(&dec_int); 324 rules["unsigned_dec_int"] = toDelegate(&unsigned_dec_int); 325 rules["hex_int"] = toDelegate(&hex_int); 326 rules["oct_int"] = toDelegate(&oct_int); 327 rules["bin_int"] = toDelegate(&bin_int); 328 rules["float_"] = toDelegate(&float_); 329 rules["float_int_part"] = toDelegate(&float_int_part); 330 rules["frac"] = toDelegate(&frac); 331 rules["decimal_point"] = toDelegate(&decimal_point); 332 rules["zero_prefixable_int"] = toDelegate(&zero_prefixable_int); 333 rules["exp"] = toDelegate(&exp); 334 rules["float_exp_part"] = toDelegate(&float_exp_part); 335 rules["special_float"] = toDelegate(&special_float); 336 rules["inf"] = toDelegate(&inf); 337 rules["nan"] = toDelegate(&nan); 338 rules["boolean"] = toDelegate(&boolean); 339 rules["true_"] = toDelegate(&true_); 340 rules["false_"] = toDelegate(&false_); 341 rules["date_time"] = toDelegate(&date_time); 342 rules["date_fullyear"] = toDelegate(&date_fullyear); 343 rules["date_month"] = toDelegate(&date_month); 344 rules["date_mday"] = toDelegate(&date_mday); 345 rules["time_delim"] = toDelegate(&time_delim); 346 rules["time_hour"] = toDelegate(&time_hour); 347 rules["time_minute"] = toDelegate(&time_minute); 348 rules["time_second"] = toDelegate(&time_second); 349 rules["time_secfrac"] = toDelegate(&time_secfrac); 350 rules["time_numoffset"] = toDelegate(&time_numoffset); 351 rules["time_offset"] = toDelegate(&time_offset); 352 rules["partial_time"] = toDelegate(&partial_time); 353 rules["full_date"] = toDelegate(&full_date); 354 rules["full_time"] = toDelegate(&full_time); 355 rules["offset_date_time"] = toDelegate(&offset_date_time); 356 rules["local_date_time"] = toDelegate(&local_date_time); 357 rules["local_date"] = toDelegate(&local_date); 358 rules["local_time"] = toDelegate(&local_time); 359 rules["array"] = toDelegate(&array); 360 rules["array_open"] = toDelegate(&array_open); 361 rules["array_close"] = toDelegate(&array_close); 362 rules["array_values"] = toDelegate(&array_values); 363 rules["array_sep"] = toDelegate(&array_sep); 364 rules["ws_comment_newline"] = toDelegate(&ws_comment_newline); 365 rules["table"] = toDelegate(&table); 366 rules["std_table"] = toDelegate(&std_table); 367 rules["std_table_open"] = toDelegate(&std_table_open); 368 rules["std_table_close"] = toDelegate(&std_table_close); 369 rules["inline_table"] = toDelegate(&inline_table); 370 rules["inline_table_open"] = toDelegate(&inline_table_open); 371 rules["inline_table_close"] = toDelegate(&inline_table_close); 372 rules["inline_table_sep"] = toDelegate(&inline_table_sep); 373 rules["inline_table_keyvals"] = toDelegate(&inline_table_keyvals); 374 rules["array_table"] = toDelegate(&array_table); 375 rules["array_table_open"] = toDelegate(&array_table_open); 376 rules["array_table_close"] = toDelegate(&array_table_close); 377 rules["ALPHA"] = toDelegate(&ALPHA); 378 rules["DIGIT"] = toDelegate(&DIGIT); 379 rules["HEXDIG"] = toDelegate(&HEXDIG); 380 rules["Spacing"] = toDelegate(&Spacing); 381 } 382 383 template hooked(alias r, string name) 384 { 385 static ParseTree hooked(ParseTree p) 386 { 387 ParseTree result; 388 389 if (name in before) 390 { 391 result = before[name](p); 392 if (result.successful) 393 return result; 394 } 395 396 result = r(p); 397 if (result.successful || name !in after) 398 return result; 399 400 result = after[name](p); 401 return result; 402 } 403 404 static ParseTree hooked(string input) 405 { 406 return hooked!(r, name)(ParseTree("",false,[],input)); 407 } 408 } 409 410 static void addRuleBefore(string parentRule, string ruleSyntax) 411 { 412 // enum name is the current grammar name 413 DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); 414 foreach(ruleName,rule; dg.rules) 415 if (ruleName != "Spacing") // Keep the local Spacing rule, do not overwrite it 416 rules[ruleName] = rule; 417 before[parentRule] = rules[dg.startingRule]; 418 } 419 420 static void addRuleAfter(string parentRule, string ruleSyntax) 421 { 422 // enum name is the current grammar named 423 DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); 424 foreach(ruleName,rule; dg.rules) 425 { 426 if (ruleName != "Spacing") 427 rules[ruleName] = rule; 428 } 429 after[parentRule] = rules[dg.startingRule]; 430 } 431 432 static bool isRule(string s) 433 { 434 import std.algorithm : startsWith; 435 return s.startsWith("TomlGrammar."); 436 } 437 mixin decimateTree; 438 439 alias spacing Spacing; 440 441 static TParseTree toml(TParseTree p) 442 { 443 if(__ctfe) 444 { 445 return pegged.peg.defined!(pegged.peg.and!(expression, pegged.peg.zeroOrMore!(pegged.peg.and!(newline, expression)), pegged.peg.discard!(eoi)), "TomlGrammar.toml")(p); 446 } 447 else 448 { 449 if (auto m = tuple(`toml`, p.end) in memo) 450 return *m; 451 else 452 { 453 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(expression, pegged.peg.zeroOrMore!(pegged.peg.and!(newline, expression)), pegged.peg.discard!(eoi)), "TomlGrammar.toml"), "toml")(p); 454 memo[tuple(`toml`, p.end)] = result; 455 return result; 456 } 457 } 458 } 459 460 static TParseTree toml(string s) 461 { 462 if(__ctfe) 463 { 464 return pegged.peg.defined!(pegged.peg.and!(expression, pegged.peg.zeroOrMore!(pegged.peg.and!(newline, expression)), pegged.peg.discard!(eoi)), "TomlGrammar.toml")(TParseTree("", false,[], s)); 465 } 466 else 467 { 468 forgetMemo(); 469 return hooked!(pegged.peg.defined!(pegged.peg.and!(expression, pegged.peg.zeroOrMore!(pegged.peg.and!(newline, expression)), pegged.peg.discard!(eoi)), "TomlGrammar.toml"), "toml")(TParseTree("", false,[], s)); 470 } 471 } 472 static string toml(GetName g) 473 { 474 return "TomlGrammar.toml"; 475 } 476 477 static TParseTree expression(TParseTree p) 478 { 479 if(__ctfe) 480 { 481 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws, table, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, keyval, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, pegged.peg.option!(comment))), "TomlGrammar.expression")(p); 482 } 483 else 484 { 485 if (auto m = tuple(`expression`, p.end) in memo) 486 return *m; 487 else 488 { 489 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws, table, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, keyval, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, pegged.peg.option!(comment))), "TomlGrammar.expression"), "expression")(p); 490 memo[tuple(`expression`, p.end)] = result; 491 return result; 492 } 493 } 494 } 495 496 static TParseTree expression(string s) 497 { 498 if(__ctfe) 499 { 500 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws, table, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, keyval, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, pegged.peg.option!(comment))), "TomlGrammar.expression")(TParseTree("", false,[], s)); 501 } 502 else 503 { 504 forgetMemo(); 505 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws, table, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, keyval, ws, pegged.peg.option!(comment)), pegged.peg.and!(ws, pegged.peg.option!(comment))), "TomlGrammar.expression"), "expression")(TParseTree("", false,[], s)); 506 } 507 } 508 static string expression(GetName g) 509 { 510 return "TomlGrammar.expression"; 511 } 512 513 static TParseTree ws(TParseTree p) 514 { 515 if(__ctfe) 516 { 517 return pegged.peg.defined!(pegged.peg.zeroOrMore!(wschar), "TomlGrammar.ws")(p); 518 } 519 else 520 { 521 if (auto m = tuple(`ws`, p.end) in memo) 522 return *m; 523 else 524 { 525 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(wschar), "TomlGrammar.ws"), "ws")(p); 526 memo[tuple(`ws`, p.end)] = result; 527 return result; 528 } 529 } 530 } 531 532 static TParseTree ws(string s) 533 { 534 if(__ctfe) 535 { 536 return pegged.peg.defined!(pegged.peg.zeroOrMore!(wschar), "TomlGrammar.ws")(TParseTree("", false,[], s)); 537 } 538 else 539 { 540 forgetMemo(); 541 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(wschar), "TomlGrammar.ws"), "ws")(TParseTree("", false,[], s)); 542 } 543 } 544 static string ws(GetName g) 545 { 546 return "TomlGrammar.ws"; 547 } 548 549 static TParseTree wschar(TParseTree p) 550 { 551 if(__ctfe) 552 { 553 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t")), "TomlGrammar.wschar")(p); 554 } 555 else 556 { 557 if (auto m = tuple(`wschar`, p.end) in memo) 558 return *m; 559 else 560 { 561 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t")), "TomlGrammar.wschar"), "wschar")(p); 562 memo[tuple(`wschar`, p.end)] = result; 563 return result; 564 } 565 } 566 } 567 568 static TParseTree wschar(string s) 569 { 570 if(__ctfe) 571 { 572 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t")), "TomlGrammar.wschar")(TParseTree("", false,[], s)); 573 } 574 else 575 { 576 forgetMemo(); 577 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t")), "TomlGrammar.wschar"), "wschar")(TParseTree("", false,[], s)); 578 } 579 } 580 static string wschar(GetName g) 581 { 582 return "TomlGrammar.wschar"; 583 } 584 585 static TParseTree newline(TParseTree p) 586 { 587 if(__ctfe) 588 { 589 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(pegged.peg.literal!("\n"), pegged.peg.and!(pegged.peg.literal!("\r"), pegged.peg.literal!("\n")))), "TomlGrammar.newline")(p); 590 } 591 else 592 { 593 if (auto m = tuple(`newline`, p.end) in memo) 594 return *m; 595 else 596 { 597 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(pegged.peg.literal!("\n"), pegged.peg.and!(pegged.peg.literal!("\r"), pegged.peg.literal!("\n")))), "TomlGrammar.newline"), "newline")(p); 598 memo[tuple(`newline`, p.end)] = result; 599 return result; 600 } 601 } 602 } 603 604 static TParseTree newline(string s) 605 { 606 if(__ctfe) 607 { 608 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(pegged.peg.literal!("\n"), pegged.peg.and!(pegged.peg.literal!("\r"), pegged.peg.literal!("\n")))), "TomlGrammar.newline")(TParseTree("", false,[], s)); 609 } 610 else 611 { 612 forgetMemo(); 613 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.or!(pegged.peg.literal!("\n"), pegged.peg.and!(pegged.peg.literal!("\r"), pegged.peg.literal!("\n")))), "TomlGrammar.newline"), "newline")(TParseTree("", false,[], s)); 614 } 615 } 616 static string newline(GetName g) 617 { 618 return "TomlGrammar.newline"; 619 } 620 621 static TParseTree comment_start_symbol(TParseTree p) 622 { 623 if(__ctfe) 624 { 625 return pegged.peg.defined!(pegged.peg.literal!("#"), "TomlGrammar.comment_start_symbol")(p); 626 } 627 else 628 { 629 if (auto m = tuple(`comment_start_symbol`, p.end) in memo) 630 return *m; 631 else 632 { 633 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("#"), "TomlGrammar.comment_start_symbol"), "comment_start_symbol")(p); 634 memo[tuple(`comment_start_symbol`, p.end)] = result; 635 return result; 636 } 637 } 638 } 639 640 static TParseTree comment_start_symbol(string s) 641 { 642 if(__ctfe) 643 { 644 return pegged.peg.defined!(pegged.peg.literal!("#"), "TomlGrammar.comment_start_symbol")(TParseTree("", false,[], s)); 645 } 646 else 647 { 648 forgetMemo(); 649 return hooked!(pegged.peg.defined!(pegged.peg.literal!("#"), "TomlGrammar.comment_start_symbol"), "comment_start_symbol")(TParseTree("", false,[], s)); 650 } 651 } 652 static string comment_start_symbol(GetName g) 653 { 654 return "TomlGrammar.comment_start_symbol"; 655 } 656 657 static TParseTree non_ascii(TParseTree p) 658 { 659 if(__ctfe) 660 { 661 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('\x80', '\uD7FF'), pegged.peg.charRange!('\uE000', '\U0010FFFF')), "TomlGrammar.non_ascii")(p); 662 } 663 else 664 { 665 if (auto m = tuple(`non_ascii`, p.end) in memo) 666 return *m; 667 else 668 { 669 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('\x80', '\uD7FF'), pegged.peg.charRange!('\uE000', '\U0010FFFF')), "TomlGrammar.non_ascii"), "non_ascii")(p); 670 memo[tuple(`non_ascii`, p.end)] = result; 671 return result; 672 } 673 } 674 } 675 676 static TParseTree non_ascii(string s) 677 { 678 if(__ctfe) 679 { 680 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('\x80', '\uD7FF'), pegged.peg.charRange!('\uE000', '\U0010FFFF')), "TomlGrammar.non_ascii")(TParseTree("", false,[], s)); 681 } 682 else 683 { 684 forgetMemo(); 685 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('\x80', '\uD7FF'), pegged.peg.charRange!('\uE000', '\U0010FFFF')), "TomlGrammar.non_ascii"), "non_ascii")(TParseTree("", false,[], s)); 686 } 687 } 688 static string non_ascii(GetName g) 689 { 690 return "TomlGrammar.non_ascii"; 691 } 692 693 static TParseTree non_eol(TParseTree p) 694 { 695 if(__ctfe) 696 { 697 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '~'), non_ascii), "TomlGrammar.non_eol")(p); 698 } 699 else 700 { 701 if (auto m = tuple(`non_eol`, p.end) in memo) 702 return *m; 703 else 704 { 705 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '~'), non_ascii), "TomlGrammar.non_eol"), "non_eol")(p); 706 memo[tuple(`non_eol`, p.end)] = result; 707 return result; 708 } 709 } 710 } 711 712 static TParseTree non_eol(string s) 713 { 714 if(__ctfe) 715 { 716 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '~'), non_ascii), "TomlGrammar.non_eol")(TParseTree("", false,[], s)); 717 } 718 else 719 { 720 forgetMemo(); 721 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '~'), non_ascii), "TomlGrammar.non_eol"), "non_eol")(TParseTree("", false,[], s)); 722 } 723 } 724 static string non_eol(GetName g) 725 { 726 return "TomlGrammar.non_eol"; 727 } 728 729 static TParseTree comment(TParseTree p) 730 { 731 if(__ctfe) 732 { 733 return pegged.peg.defined!(pegged.peg.and!(comment_start_symbol, pegged.peg.zeroOrMore!(non_eol)), "TomlGrammar.comment")(p); 734 } 735 else 736 { 737 if (auto m = tuple(`comment`, p.end) in memo) 738 return *m; 739 else 740 { 741 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(comment_start_symbol, pegged.peg.zeroOrMore!(non_eol)), "TomlGrammar.comment"), "comment")(p); 742 memo[tuple(`comment`, p.end)] = result; 743 return result; 744 } 745 } 746 } 747 748 static TParseTree comment(string s) 749 { 750 if(__ctfe) 751 { 752 return pegged.peg.defined!(pegged.peg.and!(comment_start_symbol, pegged.peg.zeroOrMore!(non_eol)), "TomlGrammar.comment")(TParseTree("", false,[], s)); 753 } 754 else 755 { 756 forgetMemo(); 757 return hooked!(pegged.peg.defined!(pegged.peg.and!(comment_start_symbol, pegged.peg.zeroOrMore!(non_eol)), "TomlGrammar.comment"), "comment")(TParseTree("", false,[], s)); 758 } 759 } 760 static string comment(GetName g) 761 { 762 return "TomlGrammar.comment"; 763 } 764 765 static TParseTree keyval(TParseTree p) 766 { 767 if(__ctfe) 768 { 769 return pegged.peg.defined!(pegged.peg.and!(key, keyval_sep, val), "TomlGrammar.keyval")(p); 770 } 771 else 772 { 773 if (auto m = tuple(`keyval`, p.end) in memo) 774 return *m; 775 else 776 { 777 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(key, keyval_sep, val), "TomlGrammar.keyval"), "keyval")(p); 778 memo[tuple(`keyval`, p.end)] = result; 779 return result; 780 } 781 } 782 } 783 784 static TParseTree keyval(string s) 785 { 786 if(__ctfe) 787 { 788 return pegged.peg.defined!(pegged.peg.and!(key, keyval_sep, val), "TomlGrammar.keyval")(TParseTree("", false,[], s)); 789 } 790 else 791 { 792 forgetMemo(); 793 return hooked!(pegged.peg.defined!(pegged.peg.and!(key, keyval_sep, val), "TomlGrammar.keyval"), "keyval")(TParseTree("", false,[], s)); 794 } 795 } 796 static string keyval(GetName g) 797 { 798 return "TomlGrammar.keyval"; 799 } 800 801 static TParseTree key(TParseTree p) 802 { 803 if(__ctfe) 804 { 805 return pegged.peg.defined!(pegged.peg.or!(dotted_key, simple_key), "TomlGrammar.key")(p); 806 } 807 else 808 { 809 if (auto m = tuple(`key`, p.end) in memo) 810 return *m; 811 else 812 { 813 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(dotted_key, simple_key), "TomlGrammar.key"), "key")(p); 814 memo[tuple(`key`, p.end)] = result; 815 return result; 816 } 817 } 818 } 819 820 static TParseTree key(string s) 821 { 822 if(__ctfe) 823 { 824 return pegged.peg.defined!(pegged.peg.or!(dotted_key, simple_key), "TomlGrammar.key")(TParseTree("", false,[], s)); 825 } 826 else 827 { 828 forgetMemo(); 829 return hooked!(pegged.peg.defined!(pegged.peg.or!(dotted_key, simple_key), "TomlGrammar.key"), "key")(TParseTree("", false,[], s)); 830 } 831 } 832 static string key(GetName g) 833 { 834 return "TomlGrammar.key"; 835 } 836 837 static TParseTree simple_key(TParseTree p) 838 { 839 if(__ctfe) 840 { 841 return pegged.peg.defined!(pegged.peg.or!(quoted_key, unquoted_key), "TomlGrammar.simple_key")(p); 842 } 843 else 844 { 845 if (auto m = tuple(`simple_key`, p.end) in memo) 846 return *m; 847 else 848 { 849 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(quoted_key, unquoted_key), "TomlGrammar.simple_key"), "simple_key")(p); 850 memo[tuple(`simple_key`, p.end)] = result; 851 return result; 852 } 853 } 854 } 855 856 static TParseTree simple_key(string s) 857 { 858 if(__ctfe) 859 { 860 return pegged.peg.defined!(pegged.peg.or!(quoted_key, unquoted_key), "TomlGrammar.simple_key")(TParseTree("", false,[], s)); 861 } 862 else 863 { 864 forgetMemo(); 865 return hooked!(pegged.peg.defined!(pegged.peg.or!(quoted_key, unquoted_key), "TomlGrammar.simple_key"), "simple_key")(TParseTree("", false,[], s)); 866 } 867 } 868 static string simple_key(GetName g) 869 { 870 return "TomlGrammar.simple_key"; 871 } 872 873 static TParseTree unquoted_key(TParseTree p) 874 { 875 if(__ctfe) 876 { 877 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(ALPHA, DIGIT, pegged.peg.literal!("-"), pegged.peg.literal!("_"))), "TomlGrammar.unquoted_key")(p); 878 } 879 else 880 { 881 if (auto m = tuple(`unquoted_key`, p.end) in memo) 882 return *m; 883 else 884 { 885 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(ALPHA, DIGIT, pegged.peg.literal!("-"), pegged.peg.literal!("_"))), "TomlGrammar.unquoted_key"), "unquoted_key")(p); 886 memo[tuple(`unquoted_key`, p.end)] = result; 887 return result; 888 } 889 } 890 } 891 892 static TParseTree unquoted_key(string s) 893 { 894 if(__ctfe) 895 { 896 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(ALPHA, DIGIT, pegged.peg.literal!("-"), pegged.peg.literal!("_"))), "TomlGrammar.unquoted_key")(TParseTree("", false,[], s)); 897 } 898 else 899 { 900 forgetMemo(); 901 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(ALPHA, DIGIT, pegged.peg.literal!("-"), pegged.peg.literal!("_"))), "TomlGrammar.unquoted_key"), "unquoted_key")(TParseTree("", false,[], s)); 902 } 903 } 904 static string unquoted_key(GetName g) 905 { 906 return "TomlGrammar.unquoted_key"; 907 } 908 909 static TParseTree quoted_key(TParseTree p) 910 { 911 if(__ctfe) 912 { 913 return pegged.peg.defined!(pegged.peg.or!(basic_string, literal_string), "TomlGrammar.quoted_key")(p); 914 } 915 else 916 { 917 if (auto m = tuple(`quoted_key`, p.end) in memo) 918 return *m; 919 else 920 { 921 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(basic_string, literal_string), "TomlGrammar.quoted_key"), "quoted_key")(p); 922 memo[tuple(`quoted_key`, p.end)] = result; 923 return result; 924 } 925 } 926 } 927 928 static TParseTree quoted_key(string s) 929 { 930 if(__ctfe) 931 { 932 return pegged.peg.defined!(pegged.peg.or!(basic_string, literal_string), "TomlGrammar.quoted_key")(TParseTree("", false,[], s)); 933 } 934 else 935 { 936 forgetMemo(); 937 return hooked!(pegged.peg.defined!(pegged.peg.or!(basic_string, literal_string), "TomlGrammar.quoted_key"), "quoted_key")(TParseTree("", false,[], s)); 938 } 939 } 940 static string quoted_key(GetName g) 941 { 942 return "TomlGrammar.quoted_key"; 943 } 944 945 static TParseTree dotted_key(TParseTree p) 946 { 947 if(__ctfe) 948 { 949 return pegged.peg.defined!(pegged.peg.and!(simple_key, pegged.peg.oneOrMore!(pegged.peg.and!(dot_sep, simple_key))), "TomlGrammar.dotted_key")(p); 950 } 951 else 952 { 953 if (auto m = tuple(`dotted_key`, p.end) in memo) 954 return *m; 955 else 956 { 957 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(simple_key, pegged.peg.oneOrMore!(pegged.peg.and!(dot_sep, simple_key))), "TomlGrammar.dotted_key"), "dotted_key")(p); 958 memo[tuple(`dotted_key`, p.end)] = result; 959 return result; 960 } 961 } 962 } 963 964 static TParseTree dotted_key(string s) 965 { 966 if(__ctfe) 967 { 968 return pegged.peg.defined!(pegged.peg.and!(simple_key, pegged.peg.oneOrMore!(pegged.peg.and!(dot_sep, simple_key))), "TomlGrammar.dotted_key")(TParseTree("", false,[], s)); 969 } 970 else 971 { 972 forgetMemo(); 973 return hooked!(pegged.peg.defined!(pegged.peg.and!(simple_key, pegged.peg.oneOrMore!(pegged.peg.and!(dot_sep, simple_key))), "TomlGrammar.dotted_key"), "dotted_key")(TParseTree("", false,[], s)); 974 } 975 } 976 static string dotted_key(GetName g) 977 { 978 return "TomlGrammar.dotted_key"; 979 } 980 981 static TParseTree dot_sep(TParseTree p) 982 { 983 if(__ctfe) 984 { 985 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("."), ws), "TomlGrammar.dot_sep")(p); 986 } 987 else 988 { 989 if (auto m = tuple(`dot_sep`, p.end) in memo) 990 return *m; 991 else 992 { 993 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("."), ws), "TomlGrammar.dot_sep"), "dot_sep")(p); 994 memo[tuple(`dot_sep`, p.end)] = result; 995 return result; 996 } 997 } 998 } 999 1000 static TParseTree dot_sep(string s) 1001 { 1002 if(__ctfe) 1003 { 1004 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("."), ws), "TomlGrammar.dot_sep")(TParseTree("", false,[], s)); 1005 } 1006 else 1007 { 1008 forgetMemo(); 1009 return hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("."), ws), "TomlGrammar.dot_sep"), "dot_sep")(TParseTree("", false,[], s)); 1010 } 1011 } 1012 static string dot_sep(GetName g) 1013 { 1014 return "TomlGrammar.dot_sep"; 1015 } 1016 1017 static TParseTree keyval_sep(TParseTree p) 1018 { 1019 if(__ctfe) 1020 { 1021 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("="), ws), "TomlGrammar.keyval_sep")(p); 1022 } 1023 else 1024 { 1025 if (auto m = tuple(`keyval_sep`, p.end) in memo) 1026 return *m; 1027 else 1028 { 1029 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("="), ws), "TomlGrammar.keyval_sep"), "keyval_sep")(p); 1030 memo[tuple(`keyval_sep`, p.end)] = result; 1031 return result; 1032 } 1033 } 1034 } 1035 1036 static TParseTree keyval_sep(string s) 1037 { 1038 if(__ctfe) 1039 { 1040 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("="), ws), "TomlGrammar.keyval_sep")(TParseTree("", false,[], s)); 1041 } 1042 else 1043 { 1044 forgetMemo(); 1045 return hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("="), ws), "TomlGrammar.keyval_sep"), "keyval_sep")(TParseTree("", false,[], s)); 1046 } 1047 } 1048 static string keyval_sep(GetName g) 1049 { 1050 return "TomlGrammar.keyval_sep"; 1051 } 1052 1053 static TParseTree val(TParseTree p) 1054 { 1055 if(__ctfe) 1056 { 1057 return pegged.peg.defined!(pegged.peg.or!(string_, boolean, array, inline_table, date_time, float_, integer), "TomlGrammar.val")(p); 1058 } 1059 else 1060 { 1061 if (auto m = tuple(`val`, p.end) in memo) 1062 return *m; 1063 else 1064 { 1065 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(string_, boolean, array, inline_table, date_time, float_, integer), "TomlGrammar.val"), "val")(p); 1066 memo[tuple(`val`, p.end)] = result; 1067 return result; 1068 } 1069 } 1070 } 1071 1072 static TParseTree val(string s) 1073 { 1074 if(__ctfe) 1075 { 1076 return pegged.peg.defined!(pegged.peg.or!(string_, boolean, array, inline_table, date_time, float_, integer), "TomlGrammar.val")(TParseTree("", false,[], s)); 1077 } 1078 else 1079 { 1080 forgetMemo(); 1081 return hooked!(pegged.peg.defined!(pegged.peg.or!(string_, boolean, array, inline_table, date_time, float_, integer), "TomlGrammar.val"), "val")(TParseTree("", false,[], s)); 1082 } 1083 } 1084 static string val(GetName g) 1085 { 1086 return "TomlGrammar.val"; 1087 } 1088 1089 static TParseTree string_(TParseTree p) 1090 { 1091 if(__ctfe) 1092 { 1093 return pegged.peg.defined!(pegged.peg.or!(ml_basic_string, basic_string, ml_literal_string, literal_string), "TomlGrammar.string_")(p); 1094 } 1095 else 1096 { 1097 if (auto m = tuple(`string_`, p.end) in memo) 1098 return *m; 1099 else 1100 { 1101 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(ml_basic_string, basic_string, ml_literal_string, literal_string), "TomlGrammar.string_"), "string_")(p); 1102 memo[tuple(`string_`, p.end)] = result; 1103 return result; 1104 } 1105 } 1106 } 1107 1108 static TParseTree string_(string s) 1109 { 1110 if(__ctfe) 1111 { 1112 return pegged.peg.defined!(pegged.peg.or!(ml_basic_string, basic_string, ml_literal_string, literal_string), "TomlGrammar.string_")(TParseTree("", false,[], s)); 1113 } 1114 else 1115 { 1116 forgetMemo(); 1117 return hooked!(pegged.peg.defined!(pegged.peg.or!(ml_basic_string, basic_string, ml_literal_string, literal_string), "TomlGrammar.string_"), "string_")(TParseTree("", false,[], s)); 1118 } 1119 } 1120 static string string_(GetName g) 1121 { 1122 return "TomlGrammar.string_"; 1123 } 1124 1125 static TParseTree basic_string(TParseTree p) 1126 { 1127 if(__ctfe) 1128 { 1129 return pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.zeroOrMore!(basic_char), quotation_mark), "TomlGrammar.basic_string")(p); 1130 } 1131 else 1132 { 1133 if (auto m = tuple(`basic_string`, p.end) in memo) 1134 return *m; 1135 else 1136 { 1137 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.zeroOrMore!(basic_char), quotation_mark), "TomlGrammar.basic_string"), "basic_string")(p); 1138 memo[tuple(`basic_string`, p.end)] = result; 1139 return result; 1140 } 1141 } 1142 } 1143 1144 static TParseTree basic_string(string s) 1145 { 1146 if(__ctfe) 1147 { 1148 return pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.zeroOrMore!(basic_char), quotation_mark), "TomlGrammar.basic_string")(TParseTree("", false,[], s)); 1149 } 1150 else 1151 { 1152 forgetMemo(); 1153 return hooked!(pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.zeroOrMore!(basic_char), quotation_mark), "TomlGrammar.basic_string"), "basic_string")(TParseTree("", false,[], s)); 1154 } 1155 } 1156 static string basic_string(GetName g) 1157 { 1158 return "TomlGrammar.basic_string"; 1159 } 1160 1161 static TParseTree quotation_mark(TParseTree p) 1162 { 1163 if(__ctfe) 1164 { 1165 return pegged.peg.defined!(pegged.peg.literal!(`"`), "TomlGrammar.quotation_mark")(p); 1166 } 1167 else 1168 { 1169 if (auto m = tuple(`quotation_mark`, p.end) in memo) 1170 return *m; 1171 else 1172 { 1173 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!(`"`), "TomlGrammar.quotation_mark"), "quotation_mark")(p); 1174 memo[tuple(`quotation_mark`, p.end)] = result; 1175 return result; 1176 } 1177 } 1178 } 1179 1180 static TParseTree quotation_mark(string s) 1181 { 1182 if(__ctfe) 1183 { 1184 return pegged.peg.defined!(pegged.peg.literal!(`"`), "TomlGrammar.quotation_mark")(TParseTree("", false,[], s)); 1185 } 1186 else 1187 { 1188 forgetMemo(); 1189 return hooked!(pegged.peg.defined!(pegged.peg.literal!(`"`), "TomlGrammar.quotation_mark"), "quotation_mark")(TParseTree("", false,[], s)); 1190 } 1191 } 1192 static string quotation_mark(GetName g) 1193 { 1194 return "TomlGrammar.quotation_mark"; 1195 } 1196 1197 static TParseTree basic_char(TParseTree p) 1198 { 1199 if(__ctfe) 1200 { 1201 return pegged.peg.defined!(pegged.peg.or!(basic_unescaped, escaped), "TomlGrammar.basic_char")(p); 1202 } 1203 else 1204 { 1205 if (auto m = tuple(`basic_char`, p.end) in memo) 1206 return *m; 1207 else 1208 { 1209 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(basic_unescaped, escaped), "TomlGrammar.basic_char"), "basic_char")(p); 1210 memo[tuple(`basic_char`, p.end)] = result; 1211 return result; 1212 } 1213 } 1214 } 1215 1216 static TParseTree basic_char(string s) 1217 { 1218 if(__ctfe) 1219 { 1220 return pegged.peg.defined!(pegged.peg.or!(basic_unescaped, escaped), "TomlGrammar.basic_char")(TParseTree("", false,[], s)); 1221 } 1222 else 1223 { 1224 forgetMemo(); 1225 return hooked!(pegged.peg.defined!(pegged.peg.or!(basic_unescaped, escaped), "TomlGrammar.basic_char"), "basic_char")(TParseTree("", false,[], s)); 1226 } 1227 } 1228 static string basic_char(GetName g) 1229 { 1230 return "TomlGrammar.basic_char"; 1231 } 1232 1233 static TParseTree basic_unescaped(TParseTree p) 1234 { 1235 if(__ctfe) 1236 { 1237 return pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.basic_unescaped")(p); 1238 } 1239 else 1240 { 1241 if (auto m = tuple(`basic_unescaped`, p.end) in memo) 1242 return *m; 1243 else 1244 { 1245 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.basic_unescaped"), "basic_unescaped")(p); 1246 memo[tuple(`basic_unescaped`, p.end)] = result; 1247 return result; 1248 } 1249 } 1250 } 1251 1252 static TParseTree basic_unescaped(string s) 1253 { 1254 if(__ctfe) 1255 { 1256 return pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.basic_unescaped")(TParseTree("", false,[], s)); 1257 } 1258 else 1259 { 1260 forgetMemo(); 1261 return hooked!(pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.basic_unescaped"), "basic_unescaped")(TParseTree("", false,[], s)); 1262 } 1263 } 1264 static string basic_unescaped(GetName g) 1265 { 1266 return "TomlGrammar.basic_unescaped"; 1267 } 1268 1269 static TParseTree escaped(TParseTree p) 1270 { 1271 if(__ctfe) 1272 { 1273 return pegged.peg.defined!(pegged.peg.and!(escape, escape_seq_char), "TomlGrammar.escaped")(p); 1274 } 1275 else 1276 { 1277 if (auto m = tuple(`escaped`, p.end) in memo) 1278 return *m; 1279 else 1280 { 1281 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(escape, escape_seq_char), "TomlGrammar.escaped"), "escaped")(p); 1282 memo[tuple(`escaped`, p.end)] = result; 1283 return result; 1284 } 1285 } 1286 } 1287 1288 static TParseTree escaped(string s) 1289 { 1290 if(__ctfe) 1291 { 1292 return pegged.peg.defined!(pegged.peg.and!(escape, escape_seq_char), "TomlGrammar.escaped")(TParseTree("", false,[], s)); 1293 } 1294 else 1295 { 1296 forgetMemo(); 1297 return hooked!(pegged.peg.defined!(pegged.peg.and!(escape, escape_seq_char), "TomlGrammar.escaped"), "escaped")(TParseTree("", false,[], s)); 1298 } 1299 } 1300 static string escaped(GetName g) 1301 { 1302 return "TomlGrammar.escaped"; 1303 } 1304 1305 static TParseTree escape(TParseTree p) 1306 { 1307 if(__ctfe) 1308 { 1309 return pegged.peg.defined!(pegged.peg.literal!(`\`), "TomlGrammar.escape")(p); 1310 } 1311 else 1312 { 1313 if (auto m = tuple(`escape`, p.end) in memo) 1314 return *m; 1315 else 1316 { 1317 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!(`\`), "TomlGrammar.escape"), "escape")(p); 1318 memo[tuple(`escape`, p.end)] = result; 1319 return result; 1320 } 1321 } 1322 } 1323 1324 static TParseTree escape(string s) 1325 { 1326 if(__ctfe) 1327 { 1328 return pegged.peg.defined!(pegged.peg.literal!(`\`), "TomlGrammar.escape")(TParseTree("", false,[], s)); 1329 } 1330 else 1331 { 1332 forgetMemo(); 1333 return hooked!(pegged.peg.defined!(pegged.peg.literal!(`\`), "TomlGrammar.escape"), "escape")(TParseTree("", false,[], s)); 1334 } 1335 } 1336 static string escape(GetName g) 1337 { 1338 return "TomlGrammar.escape"; 1339 } 1340 1341 static TParseTree escape_seq_char(TParseTree p) 1342 { 1343 if(__ctfe) 1344 { 1345 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(`"`), pegged.peg.literal!(`\`), pegged.peg.literal!("b"), pegged.peg.literal!("f"), pegged.peg.literal!("n"), pegged.peg.literal!("r"), pegged.peg.literal!("t"), pegged.peg.and!(pegged.peg.literal!("u"), HEXDIG, HEXDIG, HEXDIG, HEXDIG), pegged.peg.and!(pegged.peg.literal!("U"), HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG)), "TomlGrammar.escape_seq_char")(p); 1346 } 1347 else 1348 { 1349 if (auto m = tuple(`escape_seq_char`, p.end) in memo) 1350 return *m; 1351 else 1352 { 1353 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(`"`), pegged.peg.literal!(`\`), pegged.peg.literal!("b"), pegged.peg.literal!("f"), pegged.peg.literal!("n"), pegged.peg.literal!("r"), pegged.peg.literal!("t"), pegged.peg.and!(pegged.peg.literal!("u"), HEXDIG, HEXDIG, HEXDIG, HEXDIG), pegged.peg.and!(pegged.peg.literal!("U"), HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG)), "TomlGrammar.escape_seq_char"), "escape_seq_char")(p); 1354 memo[tuple(`escape_seq_char`, p.end)] = result; 1355 return result; 1356 } 1357 } 1358 } 1359 1360 static TParseTree escape_seq_char(string s) 1361 { 1362 if(__ctfe) 1363 { 1364 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(`"`), pegged.peg.literal!(`\`), pegged.peg.literal!("b"), pegged.peg.literal!("f"), pegged.peg.literal!("n"), pegged.peg.literal!("r"), pegged.peg.literal!("t"), pegged.peg.and!(pegged.peg.literal!("u"), HEXDIG, HEXDIG, HEXDIG, HEXDIG), pegged.peg.and!(pegged.peg.literal!("U"), HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG)), "TomlGrammar.escape_seq_char")(TParseTree("", false,[], s)); 1365 } 1366 else 1367 { 1368 forgetMemo(); 1369 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!(`"`), pegged.peg.literal!(`\`), pegged.peg.literal!("b"), pegged.peg.literal!("f"), pegged.peg.literal!("n"), pegged.peg.literal!("r"), pegged.peg.literal!("t"), pegged.peg.and!(pegged.peg.literal!("u"), HEXDIG, HEXDIG, HEXDIG, HEXDIG), pegged.peg.and!(pegged.peg.literal!("U"), HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG, HEXDIG)), "TomlGrammar.escape_seq_char"), "escape_seq_char")(TParseTree("", false,[], s)); 1370 } 1371 } 1372 static string escape_seq_char(GetName g) 1373 { 1374 return "TomlGrammar.escape_seq_char"; 1375 } 1376 1377 static TParseTree ml_basic_string(TParseTree p) 1378 { 1379 if(__ctfe) 1380 { 1381 return pegged.peg.defined!(pegged.peg.and!(ml_basic_string_delim, pegged.peg.option!(newline), ml_basic_body, ml_basic_string_delim), "TomlGrammar.ml_basic_string")(p); 1382 } 1383 else 1384 { 1385 if (auto m = tuple(`ml_basic_string`, p.end) in memo) 1386 return *m; 1387 else 1388 { 1389 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ml_basic_string_delim, pegged.peg.option!(newline), ml_basic_body, ml_basic_string_delim), "TomlGrammar.ml_basic_string"), "ml_basic_string")(p); 1390 memo[tuple(`ml_basic_string`, p.end)] = result; 1391 return result; 1392 } 1393 } 1394 } 1395 1396 static TParseTree ml_basic_string(string s) 1397 { 1398 if(__ctfe) 1399 { 1400 return pegged.peg.defined!(pegged.peg.and!(ml_basic_string_delim, pegged.peg.option!(newline), ml_basic_body, ml_basic_string_delim), "TomlGrammar.ml_basic_string")(TParseTree("", false,[], s)); 1401 } 1402 else 1403 { 1404 forgetMemo(); 1405 return hooked!(pegged.peg.defined!(pegged.peg.and!(ml_basic_string_delim, pegged.peg.option!(newline), ml_basic_body, ml_basic_string_delim), "TomlGrammar.ml_basic_string"), "ml_basic_string")(TParseTree("", false,[], s)); 1406 } 1407 } 1408 static string ml_basic_string(GetName g) 1409 { 1410 return "TomlGrammar.ml_basic_string"; 1411 } 1412 1413 static TParseTree ml_basic_string_delim(TParseTree p) 1414 { 1415 if(__ctfe) 1416 { 1417 return pegged.peg.defined!(pegged.peg.and!(quotation_mark, quotation_mark, quotation_mark), "TomlGrammar.ml_basic_string_delim")(p); 1418 } 1419 else 1420 { 1421 if (auto m = tuple(`ml_basic_string_delim`, p.end) in memo) 1422 return *m; 1423 else 1424 { 1425 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(quotation_mark, quotation_mark, quotation_mark), "TomlGrammar.ml_basic_string_delim"), "ml_basic_string_delim")(p); 1426 memo[tuple(`ml_basic_string_delim`, p.end)] = result; 1427 return result; 1428 } 1429 } 1430 } 1431 1432 static TParseTree ml_basic_string_delim(string s) 1433 { 1434 if(__ctfe) 1435 { 1436 return pegged.peg.defined!(pegged.peg.and!(quotation_mark, quotation_mark, quotation_mark), "TomlGrammar.ml_basic_string_delim")(TParseTree("", false,[], s)); 1437 } 1438 else 1439 { 1440 forgetMemo(); 1441 return hooked!(pegged.peg.defined!(pegged.peg.and!(quotation_mark, quotation_mark, quotation_mark), "TomlGrammar.ml_basic_string_delim"), "ml_basic_string_delim")(TParseTree("", false,[], s)); 1442 } 1443 } 1444 static string ml_basic_string_delim(GetName g) 1445 { 1446 return "TomlGrammar.ml_basic_string_delim"; 1447 } 1448 1449 static TParseTree ml_basic_body(TParseTree p) 1450 { 1451 if(__ctfe) 1452 { 1453 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mlb_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mlb_quotes, pegged.peg.oneOrMore!(mlb_content))), pegged.peg.option!(mlb_quotes)), "TomlGrammar.ml_basic_body")(p); 1454 } 1455 else 1456 { 1457 if (auto m = tuple(`ml_basic_body`, p.end) in memo) 1458 return *m; 1459 else 1460 { 1461 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mlb_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mlb_quotes, pegged.peg.oneOrMore!(mlb_content))), pegged.peg.option!(mlb_quotes)), "TomlGrammar.ml_basic_body"), "ml_basic_body")(p); 1462 memo[tuple(`ml_basic_body`, p.end)] = result; 1463 return result; 1464 } 1465 } 1466 } 1467 1468 static TParseTree ml_basic_body(string s) 1469 { 1470 if(__ctfe) 1471 { 1472 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mlb_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mlb_quotes, pegged.peg.oneOrMore!(mlb_content))), pegged.peg.option!(mlb_quotes)), "TomlGrammar.ml_basic_body")(TParseTree("", false,[], s)); 1473 } 1474 else 1475 { 1476 forgetMemo(); 1477 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mlb_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mlb_quotes, pegged.peg.oneOrMore!(mlb_content))), pegged.peg.option!(mlb_quotes)), "TomlGrammar.ml_basic_body"), "ml_basic_body")(TParseTree("", false,[], s)); 1478 } 1479 } 1480 static string ml_basic_body(GetName g) 1481 { 1482 return "TomlGrammar.ml_basic_body"; 1483 } 1484 1485 static TParseTree mlb_content(TParseTree p) 1486 { 1487 if(__ctfe) 1488 { 1489 return pegged.peg.defined!(pegged.peg.or!(mlb_char, newline, mlb_escaped_nl), "TomlGrammar.mlb_content")(p); 1490 } 1491 else 1492 { 1493 if (auto m = tuple(`mlb_content`, p.end) in memo) 1494 return *m; 1495 else 1496 { 1497 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(mlb_char, newline, mlb_escaped_nl), "TomlGrammar.mlb_content"), "mlb_content")(p); 1498 memo[tuple(`mlb_content`, p.end)] = result; 1499 return result; 1500 } 1501 } 1502 } 1503 1504 static TParseTree mlb_content(string s) 1505 { 1506 if(__ctfe) 1507 { 1508 return pegged.peg.defined!(pegged.peg.or!(mlb_char, newline, mlb_escaped_nl), "TomlGrammar.mlb_content")(TParseTree("", false,[], s)); 1509 } 1510 else 1511 { 1512 forgetMemo(); 1513 return hooked!(pegged.peg.defined!(pegged.peg.or!(mlb_char, newline, mlb_escaped_nl), "TomlGrammar.mlb_content"), "mlb_content")(TParseTree("", false,[], s)); 1514 } 1515 } 1516 static string mlb_content(GetName g) 1517 { 1518 return "TomlGrammar.mlb_content"; 1519 } 1520 1521 static TParseTree mlb_char(TParseTree p) 1522 { 1523 if(__ctfe) 1524 { 1525 return pegged.peg.defined!(pegged.peg.or!(mlb_unescaped, escaped), "TomlGrammar.mlb_char")(p); 1526 } 1527 else 1528 { 1529 if (auto m = tuple(`mlb_char`, p.end) in memo) 1530 return *m; 1531 else 1532 { 1533 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(mlb_unescaped, escaped), "TomlGrammar.mlb_char"), "mlb_char")(p); 1534 memo[tuple(`mlb_char`, p.end)] = result; 1535 return result; 1536 } 1537 } 1538 } 1539 1540 static TParseTree mlb_char(string s) 1541 { 1542 if(__ctfe) 1543 { 1544 return pegged.peg.defined!(pegged.peg.or!(mlb_unescaped, escaped), "TomlGrammar.mlb_char")(TParseTree("", false,[], s)); 1545 } 1546 else 1547 { 1548 forgetMemo(); 1549 return hooked!(pegged.peg.defined!(pegged.peg.or!(mlb_unescaped, escaped), "TomlGrammar.mlb_char"), "mlb_char")(TParseTree("", false,[], s)); 1550 } 1551 } 1552 static string mlb_char(GetName g) 1553 { 1554 return "TomlGrammar.mlb_char"; 1555 } 1556 1557 static TParseTree mlb_quotes(TParseTree p) 1558 { 1559 if(__ctfe) 1560 { 1561 return pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.option!(quotation_mark), pegged.peg.negLookahead!(quotation_mark)), "TomlGrammar.mlb_quotes")(p); 1562 } 1563 else 1564 { 1565 if (auto m = tuple(`mlb_quotes`, p.end) in memo) 1566 return *m; 1567 else 1568 { 1569 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.option!(quotation_mark), pegged.peg.negLookahead!(quotation_mark)), "TomlGrammar.mlb_quotes"), "mlb_quotes")(p); 1570 memo[tuple(`mlb_quotes`, p.end)] = result; 1571 return result; 1572 } 1573 } 1574 } 1575 1576 static TParseTree mlb_quotes(string s) 1577 { 1578 if(__ctfe) 1579 { 1580 return pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.option!(quotation_mark), pegged.peg.negLookahead!(quotation_mark)), "TomlGrammar.mlb_quotes")(TParseTree("", false,[], s)); 1581 } 1582 else 1583 { 1584 forgetMemo(); 1585 return hooked!(pegged.peg.defined!(pegged.peg.and!(quotation_mark, pegged.peg.option!(quotation_mark), pegged.peg.negLookahead!(quotation_mark)), "TomlGrammar.mlb_quotes"), "mlb_quotes")(TParseTree("", false,[], s)); 1586 } 1587 } 1588 static string mlb_quotes(GetName g) 1589 { 1590 return "TomlGrammar.mlb_quotes"; 1591 } 1592 1593 static TParseTree mlb_unescaped(TParseTree p) 1594 { 1595 if(__ctfe) 1596 { 1597 return pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.mlb_unescaped")(p); 1598 } 1599 else 1600 { 1601 if (auto m = tuple(`mlb_unescaped`, p.end) in memo) 1602 return *m; 1603 else 1604 { 1605 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.mlb_unescaped"), "mlb_unescaped")(p); 1606 memo[tuple(`mlb_unescaped`, p.end)] = result; 1607 return result; 1608 } 1609 } 1610 } 1611 1612 static TParseTree mlb_unescaped(string s) 1613 { 1614 if(__ctfe) 1615 { 1616 return pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.mlb_unescaped")(TParseTree("", false,[], s)); 1617 } 1618 else 1619 { 1620 forgetMemo(); 1621 return hooked!(pegged.peg.defined!(pegged.peg.or!(wschar, pegged.peg.literal!("!"), pegged.peg.charRange!('#', '['), pegged.peg.charRange!(']', '~'), non_ascii), "TomlGrammar.mlb_unescaped"), "mlb_unescaped")(TParseTree("", false,[], s)); 1622 } 1623 } 1624 static string mlb_unescaped(GetName g) 1625 { 1626 return "TomlGrammar.mlb_unescaped"; 1627 } 1628 1629 static TParseTree mlb_escaped_nl(TParseTree p) 1630 { 1631 if(__ctfe) 1632 { 1633 return pegged.peg.defined!(pegged.peg.and!(escape, ws, newline, pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, newline))), "TomlGrammar.mlb_escaped_nl")(p); 1634 } 1635 else 1636 { 1637 if (auto m = tuple(`mlb_escaped_nl`, p.end) in memo) 1638 return *m; 1639 else 1640 { 1641 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(escape, ws, newline, pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, newline))), "TomlGrammar.mlb_escaped_nl"), "mlb_escaped_nl")(p); 1642 memo[tuple(`mlb_escaped_nl`, p.end)] = result; 1643 return result; 1644 } 1645 } 1646 } 1647 1648 static TParseTree mlb_escaped_nl(string s) 1649 { 1650 if(__ctfe) 1651 { 1652 return pegged.peg.defined!(pegged.peg.and!(escape, ws, newline, pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, newline))), "TomlGrammar.mlb_escaped_nl")(TParseTree("", false,[], s)); 1653 } 1654 else 1655 { 1656 forgetMemo(); 1657 return hooked!(pegged.peg.defined!(pegged.peg.and!(escape, ws, newline, pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, newline))), "TomlGrammar.mlb_escaped_nl"), "mlb_escaped_nl")(TParseTree("", false,[], s)); 1658 } 1659 } 1660 static string mlb_escaped_nl(GetName g) 1661 { 1662 return "TomlGrammar.mlb_escaped_nl"; 1663 } 1664 1665 static TParseTree literal_string(TParseTree p) 1666 { 1667 if(__ctfe) 1668 { 1669 return pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.zeroOrMore!(literal_char), apostrophe), "TomlGrammar.literal_string")(p); 1670 } 1671 else 1672 { 1673 if (auto m = tuple(`literal_string`, p.end) in memo) 1674 return *m; 1675 else 1676 { 1677 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.zeroOrMore!(literal_char), apostrophe), "TomlGrammar.literal_string"), "literal_string")(p); 1678 memo[tuple(`literal_string`, p.end)] = result; 1679 return result; 1680 } 1681 } 1682 } 1683 1684 static TParseTree literal_string(string s) 1685 { 1686 if(__ctfe) 1687 { 1688 return pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.zeroOrMore!(literal_char), apostrophe), "TomlGrammar.literal_string")(TParseTree("", false,[], s)); 1689 } 1690 else 1691 { 1692 forgetMemo(); 1693 return hooked!(pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.zeroOrMore!(literal_char), apostrophe), "TomlGrammar.literal_string"), "literal_string")(TParseTree("", false,[], s)); 1694 } 1695 } 1696 static string literal_string(GetName g) 1697 { 1698 return "TomlGrammar.literal_string"; 1699 } 1700 1701 static TParseTree apostrophe(TParseTree p) 1702 { 1703 if(__ctfe) 1704 { 1705 return pegged.peg.defined!(pegged.peg.literal!("'"), "TomlGrammar.apostrophe")(p); 1706 } 1707 else 1708 { 1709 if (auto m = tuple(`apostrophe`, p.end) in memo) 1710 return *m; 1711 else 1712 { 1713 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("'"), "TomlGrammar.apostrophe"), "apostrophe")(p); 1714 memo[tuple(`apostrophe`, p.end)] = result; 1715 return result; 1716 } 1717 } 1718 } 1719 1720 static TParseTree apostrophe(string s) 1721 { 1722 if(__ctfe) 1723 { 1724 return pegged.peg.defined!(pegged.peg.literal!("'"), "TomlGrammar.apostrophe")(TParseTree("", false,[], s)); 1725 } 1726 else 1727 { 1728 forgetMemo(); 1729 return hooked!(pegged.peg.defined!(pegged.peg.literal!("'"), "TomlGrammar.apostrophe"), "apostrophe")(TParseTree("", false,[], s)); 1730 } 1731 } 1732 static string apostrophe(GetName g) 1733 { 1734 return "TomlGrammar.apostrophe"; 1735 } 1736 1737 static TParseTree literal_char(TParseTree p) 1738 { 1739 if(__ctfe) 1740 { 1741 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.literal_char")(p); 1742 } 1743 else 1744 { 1745 if (auto m = tuple(`literal_char`, p.end) in memo) 1746 return *m; 1747 else 1748 { 1749 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.literal_char"), "literal_char")(p); 1750 memo[tuple(`literal_char`, p.end)] = result; 1751 return result; 1752 } 1753 } 1754 } 1755 1756 static TParseTree literal_char(string s) 1757 { 1758 if(__ctfe) 1759 { 1760 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.literal_char")(TParseTree("", false,[], s)); 1761 } 1762 else 1763 { 1764 forgetMemo(); 1765 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.literal_char"), "literal_char")(TParseTree("", false,[], s)); 1766 } 1767 } 1768 static string literal_char(GetName g) 1769 { 1770 return "TomlGrammar.literal_char"; 1771 } 1772 1773 static TParseTree ml_literal_string(TParseTree p) 1774 { 1775 if(__ctfe) 1776 { 1777 return pegged.peg.defined!(pegged.peg.and!(ml_literal_string_delim, pegged.peg.option!(newline), ml_literal_body, ml_literal_string_delim), "TomlGrammar.ml_literal_string")(p); 1778 } 1779 else 1780 { 1781 if (auto m = tuple(`ml_literal_string`, p.end) in memo) 1782 return *m; 1783 else 1784 { 1785 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ml_literal_string_delim, pegged.peg.option!(newline), ml_literal_body, ml_literal_string_delim), "TomlGrammar.ml_literal_string"), "ml_literal_string")(p); 1786 memo[tuple(`ml_literal_string`, p.end)] = result; 1787 return result; 1788 } 1789 } 1790 } 1791 1792 static TParseTree ml_literal_string(string s) 1793 { 1794 if(__ctfe) 1795 { 1796 return pegged.peg.defined!(pegged.peg.and!(ml_literal_string_delim, pegged.peg.option!(newline), ml_literal_body, ml_literal_string_delim), "TomlGrammar.ml_literal_string")(TParseTree("", false,[], s)); 1797 } 1798 else 1799 { 1800 forgetMemo(); 1801 return hooked!(pegged.peg.defined!(pegged.peg.and!(ml_literal_string_delim, pegged.peg.option!(newline), ml_literal_body, ml_literal_string_delim), "TomlGrammar.ml_literal_string"), "ml_literal_string")(TParseTree("", false,[], s)); 1802 } 1803 } 1804 static string ml_literal_string(GetName g) 1805 { 1806 return "TomlGrammar.ml_literal_string"; 1807 } 1808 1809 static TParseTree ml_literal_string_delim(TParseTree p) 1810 { 1811 if(__ctfe) 1812 { 1813 return pegged.peg.defined!(pegged.peg.and!(apostrophe, apostrophe, apostrophe), "TomlGrammar.ml_literal_string_delim")(p); 1814 } 1815 else 1816 { 1817 if (auto m = tuple(`ml_literal_string_delim`, p.end) in memo) 1818 return *m; 1819 else 1820 { 1821 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(apostrophe, apostrophe, apostrophe), "TomlGrammar.ml_literal_string_delim"), "ml_literal_string_delim")(p); 1822 memo[tuple(`ml_literal_string_delim`, p.end)] = result; 1823 return result; 1824 } 1825 } 1826 } 1827 1828 static TParseTree ml_literal_string_delim(string s) 1829 { 1830 if(__ctfe) 1831 { 1832 return pegged.peg.defined!(pegged.peg.and!(apostrophe, apostrophe, apostrophe), "TomlGrammar.ml_literal_string_delim")(TParseTree("", false,[], s)); 1833 } 1834 else 1835 { 1836 forgetMemo(); 1837 return hooked!(pegged.peg.defined!(pegged.peg.and!(apostrophe, apostrophe, apostrophe), "TomlGrammar.ml_literal_string_delim"), "ml_literal_string_delim")(TParseTree("", false,[], s)); 1838 } 1839 } 1840 static string ml_literal_string_delim(GetName g) 1841 { 1842 return "TomlGrammar.ml_literal_string_delim"; 1843 } 1844 1845 static TParseTree ml_literal_body(TParseTree p) 1846 { 1847 if(__ctfe) 1848 { 1849 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mll_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mll_quotes, pegged.peg.oneOrMore!(mll_content))), pegged.peg.option!(mll_quotes)), "TomlGrammar.ml_literal_body")(p); 1850 } 1851 else 1852 { 1853 if (auto m = tuple(`ml_literal_body`, p.end) in memo) 1854 return *m; 1855 else 1856 { 1857 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mll_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mll_quotes, pegged.peg.oneOrMore!(mll_content))), pegged.peg.option!(mll_quotes)), "TomlGrammar.ml_literal_body"), "ml_literal_body")(p); 1858 memo[tuple(`ml_literal_body`, p.end)] = result; 1859 return result; 1860 } 1861 } 1862 } 1863 1864 static TParseTree ml_literal_body(string s) 1865 { 1866 if(__ctfe) 1867 { 1868 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mll_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mll_quotes, pegged.peg.oneOrMore!(mll_content))), pegged.peg.option!(mll_quotes)), "TomlGrammar.ml_literal_body")(TParseTree("", false,[], s)); 1869 } 1870 else 1871 { 1872 forgetMemo(); 1873 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(mll_content), pegged.peg.zeroOrMore!(pegged.peg.and!(mll_quotes, pegged.peg.oneOrMore!(mll_content))), pegged.peg.option!(mll_quotes)), "TomlGrammar.ml_literal_body"), "ml_literal_body")(TParseTree("", false,[], s)); 1874 } 1875 } 1876 static string ml_literal_body(GetName g) 1877 { 1878 return "TomlGrammar.ml_literal_body"; 1879 } 1880 1881 static TParseTree mll_content(TParseTree p) 1882 { 1883 if(__ctfe) 1884 { 1885 return pegged.peg.defined!(pegged.peg.or!(mll_char, newline), "TomlGrammar.mll_content")(p); 1886 } 1887 else 1888 { 1889 if (auto m = tuple(`mll_content`, p.end) in memo) 1890 return *m; 1891 else 1892 { 1893 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(mll_char, newline), "TomlGrammar.mll_content"), "mll_content")(p); 1894 memo[tuple(`mll_content`, p.end)] = result; 1895 return result; 1896 } 1897 } 1898 } 1899 1900 static TParseTree mll_content(string s) 1901 { 1902 if(__ctfe) 1903 { 1904 return pegged.peg.defined!(pegged.peg.or!(mll_char, newline), "TomlGrammar.mll_content")(TParseTree("", false,[], s)); 1905 } 1906 else 1907 { 1908 forgetMemo(); 1909 return hooked!(pegged.peg.defined!(pegged.peg.or!(mll_char, newline), "TomlGrammar.mll_content"), "mll_content")(TParseTree("", false,[], s)); 1910 } 1911 } 1912 static string mll_content(GetName g) 1913 { 1914 return "TomlGrammar.mll_content"; 1915 } 1916 1917 static TParseTree mll_char(TParseTree p) 1918 { 1919 if(__ctfe) 1920 { 1921 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.mll_char")(p); 1922 } 1923 else 1924 { 1925 if (auto m = tuple(`mll_char`, p.end) in memo) 1926 return *m; 1927 else 1928 { 1929 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.mll_char"), "mll_char")(p); 1930 memo[tuple(`mll_char`, p.end)] = result; 1931 return result; 1932 } 1933 } 1934 } 1935 1936 static TParseTree mll_char(string s) 1937 { 1938 if(__ctfe) 1939 { 1940 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.mll_char")(TParseTree("", false,[], s)); 1941 } 1942 else 1943 { 1944 forgetMemo(); 1945 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("\t"), pegged.peg.charRange!(' ', '&'), pegged.peg.charRange!('(', '~'), non_ascii), "TomlGrammar.mll_char"), "mll_char")(TParseTree("", false,[], s)); 1946 } 1947 } 1948 static string mll_char(GetName g) 1949 { 1950 return "TomlGrammar.mll_char"; 1951 } 1952 1953 static TParseTree mll_quotes(TParseTree p) 1954 { 1955 if(__ctfe) 1956 { 1957 return pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.option!(apostrophe), pegged.peg.negLookahead!(apostrophe)), "TomlGrammar.mll_quotes")(p); 1958 } 1959 else 1960 { 1961 if (auto m = tuple(`mll_quotes`, p.end) in memo) 1962 return *m; 1963 else 1964 { 1965 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.option!(apostrophe), pegged.peg.negLookahead!(apostrophe)), "TomlGrammar.mll_quotes"), "mll_quotes")(p); 1966 memo[tuple(`mll_quotes`, p.end)] = result; 1967 return result; 1968 } 1969 } 1970 } 1971 1972 static TParseTree mll_quotes(string s) 1973 { 1974 if(__ctfe) 1975 { 1976 return pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.option!(apostrophe), pegged.peg.negLookahead!(apostrophe)), "TomlGrammar.mll_quotes")(TParseTree("", false,[], s)); 1977 } 1978 else 1979 { 1980 forgetMemo(); 1981 return hooked!(pegged.peg.defined!(pegged.peg.and!(apostrophe, pegged.peg.option!(apostrophe), pegged.peg.negLookahead!(apostrophe)), "TomlGrammar.mll_quotes"), "mll_quotes")(TParseTree("", false,[], s)); 1982 } 1983 } 1984 static string mll_quotes(GetName g) 1985 { 1986 return "TomlGrammar.mll_quotes"; 1987 } 1988 1989 static TParseTree integer(TParseTree p) 1990 { 1991 if(__ctfe) 1992 { 1993 return pegged.peg.defined!(pegged.peg.or!(hex_int, oct_int, bin_int, dec_int), "TomlGrammar.integer")(p); 1994 } 1995 else 1996 { 1997 if (auto m = tuple(`integer`, p.end) in memo) 1998 return *m; 1999 else 2000 { 2001 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(hex_int, oct_int, bin_int, dec_int), "TomlGrammar.integer"), "integer")(p); 2002 memo[tuple(`integer`, p.end)] = result; 2003 return result; 2004 } 2005 } 2006 } 2007 2008 static TParseTree integer(string s) 2009 { 2010 if(__ctfe) 2011 { 2012 return pegged.peg.defined!(pegged.peg.or!(hex_int, oct_int, bin_int, dec_int), "TomlGrammar.integer")(TParseTree("", false,[], s)); 2013 } 2014 else 2015 { 2016 forgetMemo(); 2017 return hooked!(pegged.peg.defined!(pegged.peg.or!(hex_int, oct_int, bin_int, dec_int), "TomlGrammar.integer"), "integer")(TParseTree("", false,[], s)); 2018 } 2019 } 2020 static string integer(GetName g) 2021 { 2022 return "TomlGrammar.integer"; 2023 } 2024 2025 static TParseTree minus(TParseTree p) 2026 { 2027 if(__ctfe) 2028 { 2029 return pegged.peg.defined!(pegged.peg.literal!("-"), "TomlGrammar.minus")(p); 2030 } 2031 else 2032 { 2033 if (auto m = tuple(`minus`, p.end) in memo) 2034 return *m; 2035 else 2036 { 2037 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("-"), "TomlGrammar.minus"), "minus")(p); 2038 memo[tuple(`minus`, p.end)] = result; 2039 return result; 2040 } 2041 } 2042 } 2043 2044 static TParseTree minus(string s) 2045 { 2046 if(__ctfe) 2047 { 2048 return pegged.peg.defined!(pegged.peg.literal!("-"), "TomlGrammar.minus")(TParseTree("", false,[], s)); 2049 } 2050 else 2051 { 2052 forgetMemo(); 2053 return hooked!(pegged.peg.defined!(pegged.peg.literal!("-"), "TomlGrammar.minus"), "minus")(TParseTree("", false,[], s)); 2054 } 2055 } 2056 static string minus(GetName g) 2057 { 2058 return "TomlGrammar.minus"; 2059 } 2060 2061 static TParseTree plus(TParseTree p) 2062 { 2063 if(__ctfe) 2064 { 2065 return pegged.peg.defined!(pegged.peg.literal!("+"), "TomlGrammar.plus")(p); 2066 } 2067 else 2068 { 2069 if (auto m = tuple(`plus`, p.end) in memo) 2070 return *m; 2071 else 2072 { 2073 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("+"), "TomlGrammar.plus"), "plus")(p); 2074 memo[tuple(`plus`, p.end)] = result; 2075 return result; 2076 } 2077 } 2078 } 2079 2080 static TParseTree plus(string s) 2081 { 2082 if(__ctfe) 2083 { 2084 return pegged.peg.defined!(pegged.peg.literal!("+"), "TomlGrammar.plus")(TParseTree("", false,[], s)); 2085 } 2086 else 2087 { 2088 forgetMemo(); 2089 return hooked!(pegged.peg.defined!(pegged.peg.literal!("+"), "TomlGrammar.plus"), "plus")(TParseTree("", false,[], s)); 2090 } 2091 } 2092 static string plus(GetName g) 2093 { 2094 return "TomlGrammar.plus"; 2095 } 2096 2097 static TParseTree underscore(TParseTree p) 2098 { 2099 if(__ctfe) 2100 { 2101 return pegged.peg.defined!(pegged.peg.literal!("_"), "TomlGrammar.underscore")(p); 2102 } 2103 else 2104 { 2105 if (auto m = tuple(`underscore`, p.end) in memo) 2106 return *m; 2107 else 2108 { 2109 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("_"), "TomlGrammar.underscore"), "underscore")(p); 2110 memo[tuple(`underscore`, p.end)] = result; 2111 return result; 2112 } 2113 } 2114 } 2115 2116 static TParseTree underscore(string s) 2117 { 2118 if(__ctfe) 2119 { 2120 return pegged.peg.defined!(pegged.peg.literal!("_"), "TomlGrammar.underscore")(TParseTree("", false,[], s)); 2121 } 2122 else 2123 { 2124 forgetMemo(); 2125 return hooked!(pegged.peg.defined!(pegged.peg.literal!("_"), "TomlGrammar.underscore"), "underscore")(TParseTree("", false,[], s)); 2126 } 2127 } 2128 static string underscore(GetName g) 2129 { 2130 return "TomlGrammar.underscore"; 2131 } 2132 2133 static TParseTree digit1_9(TParseTree p) 2134 { 2135 if(__ctfe) 2136 { 2137 return pegged.peg.defined!(pegged.peg.charRange!('1', '9'), "TomlGrammar.digit1_9")(p); 2138 } 2139 else 2140 { 2141 if (auto m = tuple(`digit1_9`, p.end) in memo) 2142 return *m; 2143 else 2144 { 2145 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('1', '9'), "TomlGrammar.digit1_9"), "digit1_9")(p); 2146 memo[tuple(`digit1_9`, p.end)] = result; 2147 return result; 2148 } 2149 } 2150 } 2151 2152 static TParseTree digit1_9(string s) 2153 { 2154 if(__ctfe) 2155 { 2156 return pegged.peg.defined!(pegged.peg.charRange!('1', '9'), "TomlGrammar.digit1_9")(TParseTree("", false,[], s)); 2157 } 2158 else 2159 { 2160 forgetMemo(); 2161 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('1', '9'), "TomlGrammar.digit1_9"), "digit1_9")(TParseTree("", false,[], s)); 2162 } 2163 } 2164 static string digit1_9(GetName g) 2165 { 2166 return "TomlGrammar.digit1_9"; 2167 } 2168 2169 static TParseTree digit0_7(TParseTree p) 2170 { 2171 if(__ctfe) 2172 { 2173 return pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "TomlGrammar.digit0_7")(p); 2174 } 2175 else 2176 { 2177 if (auto m = tuple(`digit0_7`, p.end) in memo) 2178 return *m; 2179 else 2180 { 2181 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "TomlGrammar.digit0_7"), "digit0_7")(p); 2182 memo[tuple(`digit0_7`, p.end)] = result; 2183 return result; 2184 } 2185 } 2186 } 2187 2188 static TParseTree digit0_7(string s) 2189 { 2190 if(__ctfe) 2191 { 2192 return pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "TomlGrammar.digit0_7")(TParseTree("", false,[], s)); 2193 } 2194 else 2195 { 2196 forgetMemo(); 2197 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '7'), "TomlGrammar.digit0_7"), "digit0_7")(TParseTree("", false,[], s)); 2198 } 2199 } 2200 static string digit0_7(GetName g) 2201 { 2202 return "TomlGrammar.digit0_7"; 2203 } 2204 2205 static TParseTree digit0_1(TParseTree p) 2206 { 2207 if(__ctfe) 2208 { 2209 return pegged.peg.defined!(pegged.peg.charRange!('0', '1'), "TomlGrammar.digit0_1")(p); 2210 } 2211 else 2212 { 2213 if (auto m = tuple(`digit0_1`, p.end) in memo) 2214 return *m; 2215 else 2216 { 2217 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '1'), "TomlGrammar.digit0_1"), "digit0_1")(p); 2218 memo[tuple(`digit0_1`, p.end)] = result; 2219 return result; 2220 } 2221 } 2222 } 2223 2224 static TParseTree digit0_1(string s) 2225 { 2226 if(__ctfe) 2227 { 2228 return pegged.peg.defined!(pegged.peg.charRange!('0', '1'), "TomlGrammar.digit0_1")(TParseTree("", false,[], s)); 2229 } 2230 else 2231 { 2232 forgetMemo(); 2233 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '1'), "TomlGrammar.digit0_1"), "digit0_1")(TParseTree("", false,[], s)); 2234 } 2235 } 2236 static string digit0_1(GetName g) 2237 { 2238 return "TomlGrammar.digit0_1"; 2239 } 2240 2241 static TParseTree hex_prefix(TParseTree p) 2242 { 2243 if(__ctfe) 2244 { 2245 return pegged.peg.defined!(pegged.peg.literal!("0x"), "TomlGrammar.hex_prefix")(p); 2246 } 2247 else 2248 { 2249 if (auto m = tuple(`hex_prefix`, p.end) in memo) 2250 return *m; 2251 else 2252 { 2253 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("0x"), "TomlGrammar.hex_prefix"), "hex_prefix")(p); 2254 memo[tuple(`hex_prefix`, p.end)] = result; 2255 return result; 2256 } 2257 } 2258 } 2259 2260 static TParseTree hex_prefix(string s) 2261 { 2262 if(__ctfe) 2263 { 2264 return pegged.peg.defined!(pegged.peg.literal!("0x"), "TomlGrammar.hex_prefix")(TParseTree("", false,[], s)); 2265 } 2266 else 2267 { 2268 forgetMemo(); 2269 return hooked!(pegged.peg.defined!(pegged.peg.literal!("0x"), "TomlGrammar.hex_prefix"), "hex_prefix")(TParseTree("", false,[], s)); 2270 } 2271 } 2272 static string hex_prefix(GetName g) 2273 { 2274 return "TomlGrammar.hex_prefix"; 2275 } 2276 2277 static TParseTree oct_prefix(TParseTree p) 2278 { 2279 if(__ctfe) 2280 { 2281 return pegged.peg.defined!(pegged.peg.literal!("0o"), "TomlGrammar.oct_prefix")(p); 2282 } 2283 else 2284 { 2285 if (auto m = tuple(`oct_prefix`, p.end) in memo) 2286 return *m; 2287 else 2288 { 2289 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("0o"), "TomlGrammar.oct_prefix"), "oct_prefix")(p); 2290 memo[tuple(`oct_prefix`, p.end)] = result; 2291 return result; 2292 } 2293 } 2294 } 2295 2296 static TParseTree oct_prefix(string s) 2297 { 2298 if(__ctfe) 2299 { 2300 return pegged.peg.defined!(pegged.peg.literal!("0o"), "TomlGrammar.oct_prefix")(TParseTree("", false,[], s)); 2301 } 2302 else 2303 { 2304 forgetMemo(); 2305 return hooked!(pegged.peg.defined!(pegged.peg.literal!("0o"), "TomlGrammar.oct_prefix"), "oct_prefix")(TParseTree("", false,[], s)); 2306 } 2307 } 2308 static string oct_prefix(GetName g) 2309 { 2310 return "TomlGrammar.oct_prefix"; 2311 } 2312 2313 static TParseTree bin_prefix(TParseTree p) 2314 { 2315 if(__ctfe) 2316 { 2317 return pegged.peg.defined!(pegged.peg.literal!("0b"), "TomlGrammar.bin_prefix")(p); 2318 } 2319 else 2320 { 2321 if (auto m = tuple(`bin_prefix`, p.end) in memo) 2322 return *m; 2323 else 2324 { 2325 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("0b"), "TomlGrammar.bin_prefix"), "bin_prefix")(p); 2326 memo[tuple(`bin_prefix`, p.end)] = result; 2327 return result; 2328 } 2329 } 2330 } 2331 2332 static TParseTree bin_prefix(string s) 2333 { 2334 if(__ctfe) 2335 { 2336 return pegged.peg.defined!(pegged.peg.literal!("0b"), "TomlGrammar.bin_prefix")(TParseTree("", false,[], s)); 2337 } 2338 else 2339 { 2340 forgetMemo(); 2341 return hooked!(pegged.peg.defined!(pegged.peg.literal!("0b"), "TomlGrammar.bin_prefix"), "bin_prefix")(TParseTree("", false,[], s)); 2342 } 2343 } 2344 static string bin_prefix(GetName g) 2345 { 2346 return "TomlGrammar.bin_prefix"; 2347 } 2348 2349 static TParseTree dec_int(TParseTree p) 2350 { 2351 if(__ctfe) 2352 { 2353 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), unsigned_dec_int), "TomlGrammar.dec_int")(p); 2354 } 2355 else 2356 { 2357 if (auto m = tuple(`dec_int`, p.end) in memo) 2358 return *m; 2359 else 2360 { 2361 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), unsigned_dec_int), "TomlGrammar.dec_int"), "dec_int")(p); 2362 memo[tuple(`dec_int`, p.end)] = result; 2363 return result; 2364 } 2365 } 2366 } 2367 2368 static TParseTree dec_int(string s) 2369 { 2370 if(__ctfe) 2371 { 2372 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), unsigned_dec_int), "TomlGrammar.dec_int")(TParseTree("", false,[], s)); 2373 } 2374 else 2375 { 2376 forgetMemo(); 2377 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), unsigned_dec_int), "TomlGrammar.dec_int"), "dec_int")(TParseTree("", false,[], s)); 2378 } 2379 } 2380 static string dec_int(GetName g) 2381 { 2382 return "TomlGrammar.dec_int"; 2383 } 2384 2385 static TParseTree unsigned_dec_int(TParseTree p) 2386 { 2387 if(__ctfe) 2388 { 2389 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(digit1_9, pegged.peg.oneOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), DIGIT), "TomlGrammar.unsigned_dec_int")(p); 2390 } 2391 else 2392 { 2393 if (auto m = tuple(`unsigned_dec_int`, p.end) in memo) 2394 return *m; 2395 else 2396 { 2397 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(digit1_9, pegged.peg.oneOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), DIGIT), "TomlGrammar.unsigned_dec_int"), "unsigned_dec_int")(p); 2398 memo[tuple(`unsigned_dec_int`, p.end)] = result; 2399 return result; 2400 } 2401 } 2402 } 2403 2404 static TParseTree unsigned_dec_int(string s) 2405 { 2406 if(__ctfe) 2407 { 2408 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(digit1_9, pegged.peg.oneOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), DIGIT), "TomlGrammar.unsigned_dec_int")(TParseTree("", false,[], s)); 2409 } 2410 else 2411 { 2412 forgetMemo(); 2413 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(digit1_9, pegged.peg.oneOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), DIGIT), "TomlGrammar.unsigned_dec_int"), "unsigned_dec_int")(TParseTree("", false,[], s)); 2414 } 2415 } 2416 static string unsigned_dec_int(GetName g) 2417 { 2418 return "TomlGrammar.unsigned_dec_int"; 2419 } 2420 2421 static TParseTree hex_int(TParseTree p) 2422 { 2423 if(__ctfe) 2424 { 2425 return pegged.peg.defined!(pegged.peg.and!(hex_prefix, HEXDIG, pegged.peg.zeroOrMore!(pegged.peg.or!(HEXDIG, pegged.peg.and!(underscore, HEXDIG)))), "TomlGrammar.hex_int")(p); 2426 } 2427 else 2428 { 2429 if (auto m = tuple(`hex_int`, p.end) in memo) 2430 return *m; 2431 else 2432 { 2433 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(hex_prefix, HEXDIG, pegged.peg.zeroOrMore!(pegged.peg.or!(HEXDIG, pegged.peg.and!(underscore, HEXDIG)))), "TomlGrammar.hex_int"), "hex_int")(p); 2434 memo[tuple(`hex_int`, p.end)] = result; 2435 return result; 2436 } 2437 } 2438 } 2439 2440 static TParseTree hex_int(string s) 2441 { 2442 if(__ctfe) 2443 { 2444 return pegged.peg.defined!(pegged.peg.and!(hex_prefix, HEXDIG, pegged.peg.zeroOrMore!(pegged.peg.or!(HEXDIG, pegged.peg.and!(underscore, HEXDIG)))), "TomlGrammar.hex_int")(TParseTree("", false,[], s)); 2445 } 2446 else 2447 { 2448 forgetMemo(); 2449 return hooked!(pegged.peg.defined!(pegged.peg.and!(hex_prefix, HEXDIG, pegged.peg.zeroOrMore!(pegged.peg.or!(HEXDIG, pegged.peg.and!(underscore, HEXDIG)))), "TomlGrammar.hex_int"), "hex_int")(TParseTree("", false,[], s)); 2450 } 2451 } 2452 static string hex_int(GetName g) 2453 { 2454 return "TomlGrammar.hex_int"; 2455 } 2456 2457 static TParseTree oct_int(TParseTree p) 2458 { 2459 if(__ctfe) 2460 { 2461 return pegged.peg.defined!(pegged.peg.and!(oct_prefix, digit0_7, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_7, pegged.peg.and!(underscore, digit0_7)))), "TomlGrammar.oct_int")(p); 2462 } 2463 else 2464 { 2465 if (auto m = tuple(`oct_int`, p.end) in memo) 2466 return *m; 2467 else 2468 { 2469 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(oct_prefix, digit0_7, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_7, pegged.peg.and!(underscore, digit0_7)))), "TomlGrammar.oct_int"), "oct_int")(p); 2470 memo[tuple(`oct_int`, p.end)] = result; 2471 return result; 2472 } 2473 } 2474 } 2475 2476 static TParseTree oct_int(string s) 2477 { 2478 if(__ctfe) 2479 { 2480 return pegged.peg.defined!(pegged.peg.and!(oct_prefix, digit0_7, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_7, pegged.peg.and!(underscore, digit0_7)))), "TomlGrammar.oct_int")(TParseTree("", false,[], s)); 2481 } 2482 else 2483 { 2484 forgetMemo(); 2485 return hooked!(pegged.peg.defined!(pegged.peg.and!(oct_prefix, digit0_7, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_7, pegged.peg.and!(underscore, digit0_7)))), "TomlGrammar.oct_int"), "oct_int")(TParseTree("", false,[], s)); 2486 } 2487 } 2488 static string oct_int(GetName g) 2489 { 2490 return "TomlGrammar.oct_int"; 2491 } 2492 2493 static TParseTree bin_int(TParseTree p) 2494 { 2495 if(__ctfe) 2496 { 2497 return pegged.peg.defined!(pegged.peg.and!(bin_prefix, digit0_1, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_1, pegged.peg.and!(underscore, digit0_1)))), "TomlGrammar.bin_int")(p); 2498 } 2499 else 2500 { 2501 if (auto m = tuple(`bin_int`, p.end) in memo) 2502 return *m; 2503 else 2504 { 2505 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(bin_prefix, digit0_1, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_1, pegged.peg.and!(underscore, digit0_1)))), "TomlGrammar.bin_int"), "bin_int")(p); 2506 memo[tuple(`bin_int`, p.end)] = result; 2507 return result; 2508 } 2509 } 2510 } 2511 2512 static TParseTree bin_int(string s) 2513 { 2514 if(__ctfe) 2515 { 2516 return pegged.peg.defined!(pegged.peg.and!(bin_prefix, digit0_1, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_1, pegged.peg.and!(underscore, digit0_1)))), "TomlGrammar.bin_int")(TParseTree("", false,[], s)); 2517 } 2518 else 2519 { 2520 forgetMemo(); 2521 return hooked!(pegged.peg.defined!(pegged.peg.and!(bin_prefix, digit0_1, pegged.peg.zeroOrMore!(pegged.peg.or!(digit0_1, pegged.peg.and!(underscore, digit0_1)))), "TomlGrammar.bin_int"), "bin_int")(TParseTree("", false,[], s)); 2522 } 2523 } 2524 static string bin_int(GetName g) 2525 { 2526 return "TomlGrammar.bin_int"; 2527 } 2528 2529 static TParseTree float_(TParseTree p) 2530 { 2531 if(__ctfe) 2532 { 2533 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(float_int_part, pegged.peg.or!(exp, pegged.peg.and!(frac, pegged.peg.option!(exp)))), special_float), "TomlGrammar.float_")(p); 2534 } 2535 else 2536 { 2537 if (auto m = tuple(`float_`, p.end) in memo) 2538 return *m; 2539 else 2540 { 2541 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(float_int_part, pegged.peg.or!(exp, pegged.peg.and!(frac, pegged.peg.option!(exp)))), special_float), "TomlGrammar.float_"), "float_")(p); 2542 memo[tuple(`float_`, p.end)] = result; 2543 return result; 2544 } 2545 } 2546 } 2547 2548 static TParseTree float_(string s) 2549 { 2550 if(__ctfe) 2551 { 2552 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(float_int_part, pegged.peg.or!(exp, pegged.peg.and!(frac, pegged.peg.option!(exp)))), special_float), "TomlGrammar.float_")(TParseTree("", false,[], s)); 2553 } 2554 else 2555 { 2556 forgetMemo(); 2557 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(float_int_part, pegged.peg.or!(exp, pegged.peg.and!(frac, pegged.peg.option!(exp)))), special_float), "TomlGrammar.float_"), "float_")(TParseTree("", false,[], s)); 2558 } 2559 } 2560 static string float_(GetName g) 2561 { 2562 return "TomlGrammar.float_"; 2563 } 2564 2565 static TParseTree float_int_part(TParseTree p) 2566 { 2567 if(__ctfe) 2568 { 2569 return pegged.peg.defined!(dec_int, "TomlGrammar.float_int_part")(p); 2570 } 2571 else 2572 { 2573 if (auto m = tuple(`float_int_part`, p.end) in memo) 2574 return *m; 2575 else 2576 { 2577 TParseTree result = hooked!(pegged.peg.defined!(dec_int, "TomlGrammar.float_int_part"), "float_int_part")(p); 2578 memo[tuple(`float_int_part`, p.end)] = result; 2579 return result; 2580 } 2581 } 2582 } 2583 2584 static TParseTree float_int_part(string s) 2585 { 2586 if(__ctfe) 2587 { 2588 return pegged.peg.defined!(dec_int, "TomlGrammar.float_int_part")(TParseTree("", false,[], s)); 2589 } 2590 else 2591 { 2592 forgetMemo(); 2593 return hooked!(pegged.peg.defined!(dec_int, "TomlGrammar.float_int_part"), "float_int_part")(TParseTree("", false,[], s)); 2594 } 2595 } 2596 static string float_int_part(GetName g) 2597 { 2598 return "TomlGrammar.float_int_part"; 2599 } 2600 2601 static TParseTree frac(TParseTree p) 2602 { 2603 if(__ctfe) 2604 { 2605 return pegged.peg.defined!(pegged.peg.and!(decimal_point, zero_prefixable_int), "TomlGrammar.frac")(p); 2606 } 2607 else 2608 { 2609 if (auto m = tuple(`frac`, p.end) in memo) 2610 return *m; 2611 else 2612 { 2613 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(decimal_point, zero_prefixable_int), "TomlGrammar.frac"), "frac")(p); 2614 memo[tuple(`frac`, p.end)] = result; 2615 return result; 2616 } 2617 } 2618 } 2619 2620 static TParseTree frac(string s) 2621 { 2622 if(__ctfe) 2623 { 2624 return pegged.peg.defined!(pegged.peg.and!(decimal_point, zero_prefixable_int), "TomlGrammar.frac")(TParseTree("", false,[], s)); 2625 } 2626 else 2627 { 2628 forgetMemo(); 2629 return hooked!(pegged.peg.defined!(pegged.peg.and!(decimal_point, zero_prefixable_int), "TomlGrammar.frac"), "frac")(TParseTree("", false,[], s)); 2630 } 2631 } 2632 static string frac(GetName g) 2633 { 2634 return "TomlGrammar.frac"; 2635 } 2636 2637 static TParseTree decimal_point(TParseTree p) 2638 { 2639 if(__ctfe) 2640 { 2641 return pegged.peg.defined!(pegged.peg.literal!("."), "TomlGrammar.decimal_point")(p); 2642 } 2643 else 2644 { 2645 if (auto m = tuple(`decimal_point`, p.end) in memo) 2646 return *m; 2647 else 2648 { 2649 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("."), "TomlGrammar.decimal_point"), "decimal_point")(p); 2650 memo[tuple(`decimal_point`, p.end)] = result; 2651 return result; 2652 } 2653 } 2654 } 2655 2656 static TParseTree decimal_point(string s) 2657 { 2658 if(__ctfe) 2659 { 2660 return pegged.peg.defined!(pegged.peg.literal!("."), "TomlGrammar.decimal_point")(TParseTree("", false,[], s)); 2661 } 2662 else 2663 { 2664 forgetMemo(); 2665 return hooked!(pegged.peg.defined!(pegged.peg.literal!("."), "TomlGrammar.decimal_point"), "decimal_point")(TParseTree("", false,[], s)); 2666 } 2667 } 2668 static string decimal_point(GetName g) 2669 { 2670 return "TomlGrammar.decimal_point"; 2671 } 2672 2673 static TParseTree zero_prefixable_int(TParseTree p) 2674 { 2675 if(__ctfe) 2676 { 2677 return pegged.peg.defined!(pegged.peg.and!(DIGIT, pegged.peg.zeroOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), "TomlGrammar.zero_prefixable_int")(p); 2678 } 2679 else 2680 { 2681 if (auto m = tuple(`zero_prefixable_int`, p.end) in memo) 2682 return *m; 2683 else 2684 { 2685 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, pegged.peg.zeroOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), "TomlGrammar.zero_prefixable_int"), "zero_prefixable_int")(p); 2686 memo[tuple(`zero_prefixable_int`, p.end)] = result; 2687 return result; 2688 } 2689 } 2690 } 2691 2692 static TParseTree zero_prefixable_int(string s) 2693 { 2694 if(__ctfe) 2695 { 2696 return pegged.peg.defined!(pegged.peg.and!(DIGIT, pegged.peg.zeroOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), "TomlGrammar.zero_prefixable_int")(TParseTree("", false,[], s)); 2697 } 2698 else 2699 { 2700 forgetMemo(); 2701 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, pegged.peg.zeroOrMore!(pegged.peg.or!(DIGIT, pegged.peg.and!(underscore, DIGIT)))), "TomlGrammar.zero_prefixable_int"), "zero_prefixable_int")(TParseTree("", false,[], s)); 2702 } 2703 } 2704 static string zero_prefixable_int(GetName g) 2705 { 2706 return "TomlGrammar.zero_prefixable_int"; 2707 } 2708 2709 static TParseTree exp(TParseTree p) 2710 { 2711 if(__ctfe) 2712 { 2713 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("e"), float_exp_part), "TomlGrammar.exp")(p); 2714 } 2715 else 2716 { 2717 if (auto m = tuple(`exp`, p.end) in memo) 2718 return *m; 2719 else 2720 { 2721 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("e"), float_exp_part), "TomlGrammar.exp"), "exp")(p); 2722 memo[tuple(`exp`, p.end)] = result; 2723 return result; 2724 } 2725 } 2726 } 2727 2728 static TParseTree exp(string s) 2729 { 2730 if(__ctfe) 2731 { 2732 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("e"), float_exp_part), "TomlGrammar.exp")(TParseTree("", false,[], s)); 2733 } 2734 else 2735 { 2736 forgetMemo(); 2737 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("e"), float_exp_part), "TomlGrammar.exp"), "exp")(TParseTree("", false,[], s)); 2738 } 2739 } 2740 static string exp(GetName g) 2741 { 2742 return "TomlGrammar.exp"; 2743 } 2744 2745 static TParseTree float_exp_part(TParseTree p) 2746 { 2747 if(__ctfe) 2748 { 2749 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), zero_prefixable_int), "TomlGrammar.float_exp_part")(p); 2750 } 2751 else 2752 { 2753 if (auto m = tuple(`float_exp_part`, p.end) in memo) 2754 return *m; 2755 else 2756 { 2757 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), zero_prefixable_int), "TomlGrammar.float_exp_part"), "float_exp_part")(p); 2758 memo[tuple(`float_exp_part`, p.end)] = result; 2759 return result; 2760 } 2761 } 2762 } 2763 2764 static TParseTree float_exp_part(string s) 2765 { 2766 if(__ctfe) 2767 { 2768 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), zero_prefixable_int), "TomlGrammar.float_exp_part")(TParseTree("", false,[], s)); 2769 } 2770 else 2771 { 2772 forgetMemo(); 2773 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), zero_prefixable_int), "TomlGrammar.float_exp_part"), "float_exp_part")(TParseTree("", false,[], s)); 2774 } 2775 } 2776 static string float_exp_part(GetName g) 2777 { 2778 return "TomlGrammar.float_exp_part"; 2779 } 2780 2781 static TParseTree special_float(TParseTree p) 2782 { 2783 if(__ctfe) 2784 { 2785 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), pegged.peg.or!(inf, nan)), "TomlGrammar.special_float")(p); 2786 } 2787 else 2788 { 2789 if (auto m = tuple(`special_float`, p.end) in memo) 2790 return *m; 2791 else 2792 { 2793 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), pegged.peg.or!(inf, nan)), "TomlGrammar.special_float"), "special_float")(p); 2794 memo[tuple(`special_float`, p.end)] = result; 2795 return result; 2796 } 2797 } 2798 } 2799 2800 static TParseTree special_float(string s) 2801 { 2802 if(__ctfe) 2803 { 2804 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), pegged.peg.or!(inf, nan)), "TomlGrammar.special_float")(TParseTree("", false,[], s)); 2805 } 2806 else 2807 { 2808 forgetMemo(); 2809 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(pegged.peg.or!(minus, plus)), pegged.peg.or!(inf, nan)), "TomlGrammar.special_float"), "special_float")(TParseTree("", false,[], s)); 2810 } 2811 } 2812 static string special_float(GetName g) 2813 { 2814 return "TomlGrammar.special_float"; 2815 } 2816 2817 static TParseTree inf(TParseTree p) 2818 { 2819 if(__ctfe) 2820 { 2821 return pegged.peg.defined!(pegged.peg.literal!("inf"), "TomlGrammar.inf")(p); 2822 } 2823 else 2824 { 2825 if (auto m = tuple(`inf`, p.end) in memo) 2826 return *m; 2827 else 2828 { 2829 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("inf"), "TomlGrammar.inf"), "inf")(p); 2830 memo[tuple(`inf`, p.end)] = result; 2831 return result; 2832 } 2833 } 2834 } 2835 2836 static TParseTree inf(string s) 2837 { 2838 if(__ctfe) 2839 { 2840 return pegged.peg.defined!(pegged.peg.literal!("inf"), "TomlGrammar.inf")(TParseTree("", false,[], s)); 2841 } 2842 else 2843 { 2844 forgetMemo(); 2845 return hooked!(pegged.peg.defined!(pegged.peg.literal!("inf"), "TomlGrammar.inf"), "inf")(TParseTree("", false,[], s)); 2846 } 2847 } 2848 static string inf(GetName g) 2849 { 2850 return "TomlGrammar.inf"; 2851 } 2852 2853 static TParseTree nan(TParseTree p) 2854 { 2855 if(__ctfe) 2856 { 2857 return pegged.peg.defined!(pegged.peg.literal!("nan"), "TomlGrammar.nan")(p); 2858 } 2859 else 2860 { 2861 if (auto m = tuple(`nan`, p.end) in memo) 2862 return *m; 2863 else 2864 { 2865 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("nan"), "TomlGrammar.nan"), "nan")(p); 2866 memo[tuple(`nan`, p.end)] = result; 2867 return result; 2868 } 2869 } 2870 } 2871 2872 static TParseTree nan(string s) 2873 { 2874 if(__ctfe) 2875 { 2876 return pegged.peg.defined!(pegged.peg.literal!("nan"), "TomlGrammar.nan")(TParseTree("", false,[], s)); 2877 } 2878 else 2879 { 2880 forgetMemo(); 2881 return hooked!(pegged.peg.defined!(pegged.peg.literal!("nan"), "TomlGrammar.nan"), "nan")(TParseTree("", false,[], s)); 2882 } 2883 } 2884 static string nan(GetName g) 2885 { 2886 return "TomlGrammar.nan"; 2887 } 2888 2889 static TParseTree boolean(TParseTree p) 2890 { 2891 if(__ctfe) 2892 { 2893 return pegged.peg.defined!(pegged.peg.or!(true_, false_), "TomlGrammar.boolean")(p); 2894 } 2895 else 2896 { 2897 if (auto m = tuple(`boolean`, p.end) in memo) 2898 return *m; 2899 else 2900 { 2901 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(true_, false_), "TomlGrammar.boolean"), "boolean")(p); 2902 memo[tuple(`boolean`, p.end)] = result; 2903 return result; 2904 } 2905 } 2906 } 2907 2908 static TParseTree boolean(string s) 2909 { 2910 if(__ctfe) 2911 { 2912 return pegged.peg.defined!(pegged.peg.or!(true_, false_), "TomlGrammar.boolean")(TParseTree("", false,[], s)); 2913 } 2914 else 2915 { 2916 forgetMemo(); 2917 return hooked!(pegged.peg.defined!(pegged.peg.or!(true_, false_), "TomlGrammar.boolean"), "boolean")(TParseTree("", false,[], s)); 2918 } 2919 } 2920 static string boolean(GetName g) 2921 { 2922 return "TomlGrammar.boolean"; 2923 } 2924 2925 static TParseTree true_(TParseTree p) 2926 { 2927 if(__ctfe) 2928 { 2929 return pegged.peg.defined!(pegged.peg.literal!("true"), "TomlGrammar.true_")(p); 2930 } 2931 else 2932 { 2933 if (auto m = tuple(`true_`, p.end) in memo) 2934 return *m; 2935 else 2936 { 2937 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("true"), "TomlGrammar.true_"), "true_")(p); 2938 memo[tuple(`true_`, p.end)] = result; 2939 return result; 2940 } 2941 } 2942 } 2943 2944 static TParseTree true_(string s) 2945 { 2946 if(__ctfe) 2947 { 2948 return pegged.peg.defined!(pegged.peg.literal!("true"), "TomlGrammar.true_")(TParseTree("", false,[], s)); 2949 } 2950 else 2951 { 2952 forgetMemo(); 2953 return hooked!(pegged.peg.defined!(pegged.peg.literal!("true"), "TomlGrammar.true_"), "true_")(TParseTree("", false,[], s)); 2954 } 2955 } 2956 static string true_(GetName g) 2957 { 2958 return "TomlGrammar.true_"; 2959 } 2960 2961 static TParseTree false_(TParseTree p) 2962 { 2963 if(__ctfe) 2964 { 2965 return pegged.peg.defined!(pegged.peg.literal!("false"), "TomlGrammar.false_")(p); 2966 } 2967 else 2968 { 2969 if (auto m = tuple(`false_`, p.end) in memo) 2970 return *m; 2971 else 2972 { 2973 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("false"), "TomlGrammar.false_"), "false_")(p); 2974 memo[tuple(`false_`, p.end)] = result; 2975 return result; 2976 } 2977 } 2978 } 2979 2980 static TParseTree false_(string s) 2981 { 2982 if(__ctfe) 2983 { 2984 return pegged.peg.defined!(pegged.peg.literal!("false"), "TomlGrammar.false_")(TParseTree("", false,[], s)); 2985 } 2986 else 2987 { 2988 forgetMemo(); 2989 return hooked!(pegged.peg.defined!(pegged.peg.literal!("false"), "TomlGrammar.false_"), "false_")(TParseTree("", false,[], s)); 2990 } 2991 } 2992 static string false_(GetName g) 2993 { 2994 return "TomlGrammar.false_"; 2995 } 2996 2997 static TParseTree date_time(TParseTree p) 2998 { 2999 if(__ctfe) 3000 { 3001 return pegged.peg.defined!(pegged.peg.or!(offset_date_time, local_date_time, local_date, local_time), "TomlGrammar.date_time")(p); 3002 } 3003 else 3004 { 3005 if (auto m = tuple(`date_time`, p.end) in memo) 3006 return *m; 3007 else 3008 { 3009 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(offset_date_time, local_date_time, local_date, local_time), "TomlGrammar.date_time"), "date_time")(p); 3010 memo[tuple(`date_time`, p.end)] = result; 3011 return result; 3012 } 3013 } 3014 } 3015 3016 static TParseTree date_time(string s) 3017 { 3018 if(__ctfe) 3019 { 3020 return pegged.peg.defined!(pegged.peg.or!(offset_date_time, local_date_time, local_date, local_time), "TomlGrammar.date_time")(TParseTree("", false,[], s)); 3021 } 3022 else 3023 { 3024 forgetMemo(); 3025 return hooked!(pegged.peg.defined!(pegged.peg.or!(offset_date_time, local_date_time, local_date, local_time), "TomlGrammar.date_time"), "date_time")(TParseTree("", false,[], s)); 3026 } 3027 } 3028 static string date_time(GetName g) 3029 { 3030 return "TomlGrammar.date_time"; 3031 } 3032 3033 static TParseTree date_fullyear(TParseTree p) 3034 { 3035 if(__ctfe) 3036 { 3037 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT, DIGIT, DIGIT), "TomlGrammar.date_fullyear")(p); 3038 } 3039 else 3040 { 3041 if (auto m = tuple(`date_fullyear`, p.end) in memo) 3042 return *m; 3043 else 3044 { 3045 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT, DIGIT, DIGIT), "TomlGrammar.date_fullyear"), "date_fullyear")(p); 3046 memo[tuple(`date_fullyear`, p.end)] = result; 3047 return result; 3048 } 3049 } 3050 } 3051 3052 static TParseTree date_fullyear(string s) 3053 { 3054 if(__ctfe) 3055 { 3056 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT, DIGIT, DIGIT), "TomlGrammar.date_fullyear")(TParseTree("", false,[], s)); 3057 } 3058 else 3059 { 3060 forgetMemo(); 3061 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT, DIGIT, DIGIT), "TomlGrammar.date_fullyear"), "date_fullyear")(TParseTree("", false,[], s)); 3062 } 3063 } 3064 static string date_fullyear(GetName g) 3065 { 3066 return "TomlGrammar.date_fullyear"; 3067 } 3068 3069 static TParseTree date_month(TParseTree p) 3070 { 3071 if(__ctfe) 3072 { 3073 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_month")(p); 3074 } 3075 else 3076 { 3077 if (auto m = tuple(`date_month`, p.end) in memo) 3078 return *m; 3079 else 3080 { 3081 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_month"), "date_month")(p); 3082 memo[tuple(`date_month`, p.end)] = result; 3083 return result; 3084 } 3085 } 3086 } 3087 3088 static TParseTree date_month(string s) 3089 { 3090 if(__ctfe) 3091 { 3092 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_month")(TParseTree("", false,[], s)); 3093 } 3094 else 3095 { 3096 forgetMemo(); 3097 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_month"), "date_month")(TParseTree("", false,[], s)); 3098 } 3099 } 3100 static string date_month(GetName g) 3101 { 3102 return "TomlGrammar.date_month"; 3103 } 3104 3105 static TParseTree date_mday(TParseTree p) 3106 { 3107 if(__ctfe) 3108 { 3109 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_mday")(p); 3110 } 3111 else 3112 { 3113 if (auto m = tuple(`date_mday`, p.end) in memo) 3114 return *m; 3115 else 3116 { 3117 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_mday"), "date_mday")(p); 3118 memo[tuple(`date_mday`, p.end)] = result; 3119 return result; 3120 } 3121 } 3122 } 3123 3124 static TParseTree date_mday(string s) 3125 { 3126 if(__ctfe) 3127 { 3128 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_mday")(TParseTree("", false,[], s)); 3129 } 3130 else 3131 { 3132 forgetMemo(); 3133 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.date_mday"), "date_mday")(TParseTree("", false,[], s)); 3134 } 3135 } 3136 static string date_mday(GetName g) 3137 { 3138 return "TomlGrammar.date_mday"; 3139 } 3140 3141 static TParseTree time_delim(TParseTree p) 3142 { 3143 if(__ctfe) 3144 { 3145 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("T"), pegged.peg.literal!(" ")), "TomlGrammar.time_delim")(p); 3146 } 3147 else 3148 { 3149 if (auto m = tuple(`time_delim`, p.end) in memo) 3150 return *m; 3151 else 3152 { 3153 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("T"), pegged.peg.literal!(" ")), "TomlGrammar.time_delim"), "time_delim")(p); 3154 memo[tuple(`time_delim`, p.end)] = result; 3155 return result; 3156 } 3157 } 3158 } 3159 3160 static TParseTree time_delim(string s) 3161 { 3162 if(__ctfe) 3163 { 3164 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("T"), pegged.peg.literal!(" ")), "TomlGrammar.time_delim")(TParseTree("", false,[], s)); 3165 } 3166 else 3167 { 3168 forgetMemo(); 3169 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("T"), pegged.peg.literal!(" ")), "TomlGrammar.time_delim"), "time_delim")(TParseTree("", false,[], s)); 3170 } 3171 } 3172 static string time_delim(GetName g) 3173 { 3174 return "TomlGrammar.time_delim"; 3175 } 3176 3177 static TParseTree time_hour(TParseTree p) 3178 { 3179 if(__ctfe) 3180 { 3181 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_hour")(p); 3182 } 3183 else 3184 { 3185 if (auto m = tuple(`time_hour`, p.end) in memo) 3186 return *m; 3187 else 3188 { 3189 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_hour"), "time_hour")(p); 3190 memo[tuple(`time_hour`, p.end)] = result; 3191 return result; 3192 } 3193 } 3194 } 3195 3196 static TParseTree time_hour(string s) 3197 { 3198 if(__ctfe) 3199 { 3200 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_hour")(TParseTree("", false,[], s)); 3201 } 3202 else 3203 { 3204 forgetMemo(); 3205 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_hour"), "time_hour")(TParseTree("", false,[], s)); 3206 } 3207 } 3208 static string time_hour(GetName g) 3209 { 3210 return "TomlGrammar.time_hour"; 3211 } 3212 3213 static TParseTree time_minute(TParseTree p) 3214 { 3215 if(__ctfe) 3216 { 3217 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_minute")(p); 3218 } 3219 else 3220 { 3221 if (auto m = tuple(`time_minute`, p.end) in memo) 3222 return *m; 3223 else 3224 { 3225 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_minute"), "time_minute")(p); 3226 memo[tuple(`time_minute`, p.end)] = result; 3227 return result; 3228 } 3229 } 3230 } 3231 3232 static TParseTree time_minute(string s) 3233 { 3234 if(__ctfe) 3235 { 3236 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_minute")(TParseTree("", false,[], s)); 3237 } 3238 else 3239 { 3240 forgetMemo(); 3241 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_minute"), "time_minute")(TParseTree("", false,[], s)); 3242 } 3243 } 3244 static string time_minute(GetName g) 3245 { 3246 return "TomlGrammar.time_minute"; 3247 } 3248 3249 static TParseTree time_second(TParseTree p) 3250 { 3251 if(__ctfe) 3252 { 3253 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_second")(p); 3254 } 3255 else 3256 { 3257 if (auto m = tuple(`time_second`, p.end) in memo) 3258 return *m; 3259 else 3260 { 3261 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_second"), "time_second")(p); 3262 memo[tuple(`time_second`, p.end)] = result; 3263 return result; 3264 } 3265 } 3266 } 3267 3268 static TParseTree time_second(string s) 3269 { 3270 if(__ctfe) 3271 { 3272 return pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_second")(TParseTree("", false,[], s)); 3273 } 3274 else 3275 { 3276 forgetMemo(); 3277 return hooked!(pegged.peg.defined!(pegged.peg.and!(DIGIT, DIGIT), "TomlGrammar.time_second"), "time_second")(TParseTree("", false,[], s)); 3278 } 3279 } 3280 static string time_second(GetName g) 3281 { 3282 return "TomlGrammar.time_second"; 3283 } 3284 3285 static TParseTree time_secfrac(TParseTree p) 3286 { 3287 if(__ctfe) 3288 { 3289 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("."), pegged.peg.oneOrMore!(DIGIT)), "TomlGrammar.time_secfrac")(p); 3290 } 3291 else 3292 { 3293 if (auto m = tuple(`time_secfrac`, p.end) in memo) 3294 return *m; 3295 else 3296 { 3297 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("."), pegged.peg.oneOrMore!(DIGIT)), "TomlGrammar.time_secfrac"), "time_secfrac")(p); 3298 memo[tuple(`time_secfrac`, p.end)] = result; 3299 return result; 3300 } 3301 } 3302 } 3303 3304 static TParseTree time_secfrac(string s) 3305 { 3306 if(__ctfe) 3307 { 3308 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("."), pegged.peg.oneOrMore!(DIGIT)), "TomlGrammar.time_secfrac")(TParseTree("", false,[], s)); 3309 } 3310 else 3311 { 3312 forgetMemo(); 3313 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("."), pegged.peg.oneOrMore!(DIGIT)), "TomlGrammar.time_secfrac"), "time_secfrac")(TParseTree("", false,[], s)); 3314 } 3315 } 3316 static string time_secfrac(GetName g) 3317 { 3318 return "TomlGrammar.time_secfrac"; 3319 } 3320 3321 static TParseTree time_numoffset(TParseTree p) 3322 { 3323 if(__ctfe) 3324 { 3325 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.keywords!("+", "-"), time_hour, pegged.peg.literal!(":"), time_minute), "TomlGrammar.time_numoffset")(p); 3326 } 3327 else 3328 { 3329 if (auto m = tuple(`time_numoffset`, p.end) in memo) 3330 return *m; 3331 else 3332 { 3333 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.keywords!("+", "-"), time_hour, pegged.peg.literal!(":"), time_minute), "TomlGrammar.time_numoffset"), "time_numoffset")(p); 3334 memo[tuple(`time_numoffset`, p.end)] = result; 3335 return result; 3336 } 3337 } 3338 } 3339 3340 static TParseTree time_numoffset(string s) 3341 { 3342 if(__ctfe) 3343 { 3344 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.keywords!("+", "-"), time_hour, pegged.peg.literal!(":"), time_minute), "TomlGrammar.time_numoffset")(TParseTree("", false,[], s)); 3345 } 3346 else 3347 { 3348 forgetMemo(); 3349 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.keywords!("+", "-"), time_hour, pegged.peg.literal!(":"), time_minute), "TomlGrammar.time_numoffset"), "time_numoffset")(TParseTree("", false,[], s)); 3350 } 3351 } 3352 static string time_numoffset(GetName g) 3353 { 3354 return "TomlGrammar.time_numoffset"; 3355 } 3356 3357 static TParseTree time_offset(TParseTree p) 3358 { 3359 if(__ctfe) 3360 { 3361 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("Z"), time_numoffset), "TomlGrammar.time_offset")(p); 3362 } 3363 else 3364 { 3365 if (auto m = tuple(`time_offset`, p.end) in memo) 3366 return *m; 3367 else 3368 { 3369 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("Z"), time_numoffset), "TomlGrammar.time_offset"), "time_offset")(p); 3370 memo[tuple(`time_offset`, p.end)] = result; 3371 return result; 3372 } 3373 } 3374 } 3375 3376 static TParseTree time_offset(string s) 3377 { 3378 if(__ctfe) 3379 { 3380 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("Z"), time_numoffset), "TomlGrammar.time_offset")(TParseTree("", false,[], s)); 3381 } 3382 else 3383 { 3384 forgetMemo(); 3385 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("Z"), time_numoffset), "TomlGrammar.time_offset"), "time_offset")(TParseTree("", false,[], s)); 3386 } 3387 } 3388 static string time_offset(GetName g) 3389 { 3390 return "TomlGrammar.time_offset"; 3391 } 3392 3393 static TParseTree partial_time(TParseTree p) 3394 { 3395 if(__ctfe) 3396 { 3397 return pegged.peg.defined!(pegged.peg.and!(time_hour, pegged.peg.literal!(":"), time_minute, pegged.peg.literal!(":"), time_second, pegged.peg.option!(time_secfrac)), "TomlGrammar.partial_time")(p); 3398 } 3399 else 3400 { 3401 if (auto m = tuple(`partial_time`, p.end) in memo) 3402 return *m; 3403 else 3404 { 3405 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(time_hour, pegged.peg.literal!(":"), time_minute, pegged.peg.literal!(":"), time_second, pegged.peg.option!(time_secfrac)), "TomlGrammar.partial_time"), "partial_time")(p); 3406 memo[tuple(`partial_time`, p.end)] = result; 3407 return result; 3408 } 3409 } 3410 } 3411 3412 static TParseTree partial_time(string s) 3413 { 3414 if(__ctfe) 3415 { 3416 return pegged.peg.defined!(pegged.peg.and!(time_hour, pegged.peg.literal!(":"), time_minute, pegged.peg.literal!(":"), time_second, pegged.peg.option!(time_secfrac)), "TomlGrammar.partial_time")(TParseTree("", false,[], s)); 3417 } 3418 else 3419 { 3420 forgetMemo(); 3421 return hooked!(pegged.peg.defined!(pegged.peg.and!(time_hour, pegged.peg.literal!(":"), time_minute, pegged.peg.literal!(":"), time_second, pegged.peg.option!(time_secfrac)), "TomlGrammar.partial_time"), "partial_time")(TParseTree("", false,[], s)); 3422 } 3423 } 3424 static string partial_time(GetName g) 3425 { 3426 return "TomlGrammar.partial_time"; 3427 } 3428 3429 static TParseTree full_date(TParseTree p) 3430 { 3431 if(__ctfe) 3432 { 3433 return pegged.peg.defined!(pegged.peg.and!(date_fullyear, pegged.peg.literal!("-"), date_month, pegged.peg.literal!("-"), date_mday), "TomlGrammar.full_date")(p); 3434 } 3435 else 3436 { 3437 if (auto m = tuple(`full_date`, p.end) in memo) 3438 return *m; 3439 else 3440 { 3441 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(date_fullyear, pegged.peg.literal!("-"), date_month, pegged.peg.literal!("-"), date_mday), "TomlGrammar.full_date"), "full_date")(p); 3442 memo[tuple(`full_date`, p.end)] = result; 3443 return result; 3444 } 3445 } 3446 } 3447 3448 static TParseTree full_date(string s) 3449 { 3450 if(__ctfe) 3451 { 3452 return pegged.peg.defined!(pegged.peg.and!(date_fullyear, pegged.peg.literal!("-"), date_month, pegged.peg.literal!("-"), date_mday), "TomlGrammar.full_date")(TParseTree("", false,[], s)); 3453 } 3454 else 3455 { 3456 forgetMemo(); 3457 return hooked!(pegged.peg.defined!(pegged.peg.and!(date_fullyear, pegged.peg.literal!("-"), date_month, pegged.peg.literal!("-"), date_mday), "TomlGrammar.full_date"), "full_date")(TParseTree("", false,[], s)); 3458 } 3459 } 3460 static string full_date(GetName g) 3461 { 3462 return "TomlGrammar.full_date"; 3463 } 3464 3465 static TParseTree full_time(TParseTree p) 3466 { 3467 if(__ctfe) 3468 { 3469 return pegged.peg.defined!(pegged.peg.and!(partial_time, time_offset), "TomlGrammar.full_time")(p); 3470 } 3471 else 3472 { 3473 if (auto m = tuple(`full_time`, p.end) in memo) 3474 return *m; 3475 else 3476 { 3477 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(partial_time, time_offset), "TomlGrammar.full_time"), "full_time")(p); 3478 memo[tuple(`full_time`, p.end)] = result; 3479 return result; 3480 } 3481 } 3482 } 3483 3484 static TParseTree full_time(string s) 3485 { 3486 if(__ctfe) 3487 { 3488 return pegged.peg.defined!(pegged.peg.and!(partial_time, time_offset), "TomlGrammar.full_time")(TParseTree("", false,[], s)); 3489 } 3490 else 3491 { 3492 forgetMemo(); 3493 return hooked!(pegged.peg.defined!(pegged.peg.and!(partial_time, time_offset), "TomlGrammar.full_time"), "full_time")(TParseTree("", false,[], s)); 3494 } 3495 } 3496 static string full_time(GetName g) 3497 { 3498 return "TomlGrammar.full_time"; 3499 } 3500 3501 static TParseTree offset_date_time(TParseTree p) 3502 { 3503 if(__ctfe) 3504 { 3505 return pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, full_time), "TomlGrammar.offset_date_time")(p); 3506 } 3507 else 3508 { 3509 if (auto m = tuple(`offset_date_time`, p.end) in memo) 3510 return *m; 3511 else 3512 { 3513 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, full_time), "TomlGrammar.offset_date_time"), "offset_date_time")(p); 3514 memo[tuple(`offset_date_time`, p.end)] = result; 3515 return result; 3516 } 3517 } 3518 } 3519 3520 static TParseTree offset_date_time(string s) 3521 { 3522 if(__ctfe) 3523 { 3524 return pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, full_time), "TomlGrammar.offset_date_time")(TParseTree("", false,[], s)); 3525 } 3526 else 3527 { 3528 forgetMemo(); 3529 return hooked!(pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, full_time), "TomlGrammar.offset_date_time"), "offset_date_time")(TParseTree("", false,[], s)); 3530 } 3531 } 3532 static string offset_date_time(GetName g) 3533 { 3534 return "TomlGrammar.offset_date_time"; 3535 } 3536 3537 static TParseTree local_date_time(TParseTree p) 3538 { 3539 if(__ctfe) 3540 { 3541 return pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, partial_time), "TomlGrammar.local_date_time")(p); 3542 } 3543 else 3544 { 3545 if (auto m = tuple(`local_date_time`, p.end) in memo) 3546 return *m; 3547 else 3548 { 3549 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, partial_time), "TomlGrammar.local_date_time"), "local_date_time")(p); 3550 memo[tuple(`local_date_time`, p.end)] = result; 3551 return result; 3552 } 3553 } 3554 } 3555 3556 static TParseTree local_date_time(string s) 3557 { 3558 if(__ctfe) 3559 { 3560 return pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, partial_time), "TomlGrammar.local_date_time")(TParseTree("", false,[], s)); 3561 } 3562 else 3563 { 3564 forgetMemo(); 3565 return hooked!(pegged.peg.defined!(pegged.peg.and!(full_date, time_delim, partial_time), "TomlGrammar.local_date_time"), "local_date_time")(TParseTree("", false,[], s)); 3566 } 3567 } 3568 static string local_date_time(GetName g) 3569 { 3570 return "TomlGrammar.local_date_time"; 3571 } 3572 3573 static TParseTree local_date(TParseTree p) 3574 { 3575 if(__ctfe) 3576 { 3577 return pegged.peg.defined!(full_date, "TomlGrammar.local_date")(p); 3578 } 3579 else 3580 { 3581 if (auto m = tuple(`local_date`, p.end) in memo) 3582 return *m; 3583 else 3584 { 3585 TParseTree result = hooked!(pegged.peg.defined!(full_date, "TomlGrammar.local_date"), "local_date")(p); 3586 memo[tuple(`local_date`, p.end)] = result; 3587 return result; 3588 } 3589 } 3590 } 3591 3592 static TParseTree local_date(string s) 3593 { 3594 if(__ctfe) 3595 { 3596 return pegged.peg.defined!(full_date, "TomlGrammar.local_date")(TParseTree("", false,[], s)); 3597 } 3598 else 3599 { 3600 forgetMemo(); 3601 return hooked!(pegged.peg.defined!(full_date, "TomlGrammar.local_date"), "local_date")(TParseTree("", false,[], s)); 3602 } 3603 } 3604 static string local_date(GetName g) 3605 { 3606 return "TomlGrammar.local_date"; 3607 } 3608 3609 static TParseTree local_time(TParseTree p) 3610 { 3611 if(__ctfe) 3612 { 3613 return pegged.peg.defined!(partial_time, "TomlGrammar.local_time")(p); 3614 } 3615 else 3616 { 3617 if (auto m = tuple(`local_time`, p.end) in memo) 3618 return *m; 3619 else 3620 { 3621 TParseTree result = hooked!(pegged.peg.defined!(partial_time, "TomlGrammar.local_time"), "local_time")(p); 3622 memo[tuple(`local_time`, p.end)] = result; 3623 return result; 3624 } 3625 } 3626 } 3627 3628 static TParseTree local_time(string s) 3629 { 3630 if(__ctfe) 3631 { 3632 return pegged.peg.defined!(partial_time, "TomlGrammar.local_time")(TParseTree("", false,[], s)); 3633 } 3634 else 3635 { 3636 forgetMemo(); 3637 return hooked!(pegged.peg.defined!(partial_time, "TomlGrammar.local_time"), "local_time")(TParseTree("", false,[], s)); 3638 } 3639 } 3640 static string local_time(GetName g) 3641 { 3642 return "TomlGrammar.local_time"; 3643 } 3644 3645 static TParseTree array(TParseTree p) 3646 { 3647 if(__ctfe) 3648 { 3649 return pegged.peg.defined!(pegged.peg.and!(array_open, pegged.peg.option!(array_values), ws_comment_newline, array_close), "TomlGrammar.array")(p); 3650 } 3651 else 3652 { 3653 if (auto m = tuple(`array`, p.end) in memo) 3654 return *m; 3655 else 3656 { 3657 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(array_open, pegged.peg.option!(array_values), ws_comment_newline, array_close), "TomlGrammar.array"), "array")(p); 3658 memo[tuple(`array`, p.end)] = result; 3659 return result; 3660 } 3661 } 3662 } 3663 3664 static TParseTree array(string s) 3665 { 3666 if(__ctfe) 3667 { 3668 return pegged.peg.defined!(pegged.peg.and!(array_open, pegged.peg.option!(array_values), ws_comment_newline, array_close), "TomlGrammar.array")(TParseTree("", false,[], s)); 3669 } 3670 else 3671 { 3672 forgetMemo(); 3673 return hooked!(pegged.peg.defined!(pegged.peg.and!(array_open, pegged.peg.option!(array_values), ws_comment_newline, array_close), "TomlGrammar.array"), "array")(TParseTree("", false,[], s)); 3674 } 3675 } 3676 static string array(GetName g) 3677 { 3678 return "TomlGrammar.array"; 3679 } 3680 3681 static TParseTree array_open(TParseTree p) 3682 { 3683 if(__ctfe) 3684 { 3685 return pegged.peg.defined!(pegged.peg.literal!("["), "TomlGrammar.array_open")(p); 3686 } 3687 else 3688 { 3689 if (auto m = tuple(`array_open`, p.end) in memo) 3690 return *m; 3691 else 3692 { 3693 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("["), "TomlGrammar.array_open"), "array_open")(p); 3694 memo[tuple(`array_open`, p.end)] = result; 3695 return result; 3696 } 3697 } 3698 } 3699 3700 static TParseTree array_open(string s) 3701 { 3702 if(__ctfe) 3703 { 3704 return pegged.peg.defined!(pegged.peg.literal!("["), "TomlGrammar.array_open")(TParseTree("", false,[], s)); 3705 } 3706 else 3707 { 3708 forgetMemo(); 3709 return hooked!(pegged.peg.defined!(pegged.peg.literal!("["), "TomlGrammar.array_open"), "array_open")(TParseTree("", false,[], s)); 3710 } 3711 } 3712 static string array_open(GetName g) 3713 { 3714 return "TomlGrammar.array_open"; 3715 } 3716 3717 static TParseTree array_close(TParseTree p) 3718 { 3719 if(__ctfe) 3720 { 3721 return pegged.peg.defined!(pegged.peg.literal!("]"), "TomlGrammar.array_close")(p); 3722 } 3723 else 3724 { 3725 if (auto m = tuple(`array_close`, p.end) in memo) 3726 return *m; 3727 else 3728 { 3729 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("]"), "TomlGrammar.array_close"), "array_close")(p); 3730 memo[tuple(`array_close`, p.end)] = result; 3731 return result; 3732 } 3733 } 3734 } 3735 3736 static TParseTree array_close(string s) 3737 { 3738 if(__ctfe) 3739 { 3740 return pegged.peg.defined!(pegged.peg.literal!("]"), "TomlGrammar.array_close")(TParseTree("", false,[], s)); 3741 } 3742 else 3743 { 3744 forgetMemo(); 3745 return hooked!(pegged.peg.defined!(pegged.peg.literal!("]"), "TomlGrammar.array_close"), "array_close")(TParseTree("", false,[], s)); 3746 } 3747 } 3748 static string array_close(GetName g) 3749 { 3750 return "TomlGrammar.array_close"; 3751 } 3752 3753 static TParseTree array_values(TParseTree p) 3754 { 3755 if(__ctfe) 3756 { 3757 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, array_sep, array_values), pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, pegged.peg.option!(array_sep))), "TomlGrammar.array_values")(p); 3758 } 3759 else 3760 { 3761 if (auto m = tuple(`array_values`, p.end) in memo) 3762 return *m; 3763 else 3764 { 3765 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, array_sep, array_values), pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, pegged.peg.option!(array_sep))), "TomlGrammar.array_values"), "array_values")(p); 3766 memo[tuple(`array_values`, p.end)] = result; 3767 return result; 3768 } 3769 } 3770 } 3771 3772 static TParseTree array_values(string s) 3773 { 3774 if(__ctfe) 3775 { 3776 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, array_sep, array_values), pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, pegged.peg.option!(array_sep))), "TomlGrammar.array_values")(TParseTree("", false,[], s)); 3777 } 3778 else 3779 { 3780 forgetMemo(); 3781 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, array_sep, array_values), pegged.peg.and!(ws_comment_newline, val, ws_comment_newline, pegged.peg.option!(array_sep))), "TomlGrammar.array_values"), "array_values")(TParseTree("", false,[], s)); 3782 } 3783 } 3784 static string array_values(GetName g) 3785 { 3786 return "TomlGrammar.array_values"; 3787 } 3788 3789 static TParseTree array_sep(TParseTree p) 3790 { 3791 if(__ctfe) 3792 { 3793 return pegged.peg.defined!(pegged.peg.literal!(","), "TomlGrammar.array_sep")(p); 3794 } 3795 else 3796 { 3797 if (auto m = tuple(`array_sep`, p.end) in memo) 3798 return *m; 3799 else 3800 { 3801 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!(","), "TomlGrammar.array_sep"), "array_sep")(p); 3802 memo[tuple(`array_sep`, p.end)] = result; 3803 return result; 3804 } 3805 } 3806 } 3807 3808 static TParseTree array_sep(string s) 3809 { 3810 if(__ctfe) 3811 { 3812 return pegged.peg.defined!(pegged.peg.literal!(","), "TomlGrammar.array_sep")(TParseTree("", false,[], s)); 3813 } 3814 else 3815 { 3816 forgetMemo(); 3817 return hooked!(pegged.peg.defined!(pegged.peg.literal!(","), "TomlGrammar.array_sep"), "array_sep")(TParseTree("", false,[], s)); 3818 } 3819 } 3820 static string array_sep(GetName g) 3821 { 3822 return "TomlGrammar.array_sep"; 3823 } 3824 3825 static TParseTree ws_comment_newline(TParseTree p) 3826 { 3827 if(__ctfe) 3828 { 3829 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, pegged.peg.and!(pegged.peg.option!(comment), newline))), "TomlGrammar.ws_comment_newline")(p); 3830 } 3831 else 3832 { 3833 if (auto m = tuple(`ws_comment_newline`, p.end) in memo) 3834 return *m; 3835 else 3836 { 3837 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, pegged.peg.and!(pegged.peg.option!(comment), newline))), "TomlGrammar.ws_comment_newline"), "ws_comment_newline")(p); 3838 memo[tuple(`ws_comment_newline`, p.end)] = result; 3839 return result; 3840 } 3841 } 3842 } 3843 3844 static TParseTree ws_comment_newline(string s) 3845 { 3846 if(__ctfe) 3847 { 3848 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, pegged.peg.and!(pegged.peg.option!(comment), newline))), "TomlGrammar.ws_comment_newline")(TParseTree("", false,[], s)); 3849 } 3850 else 3851 { 3852 forgetMemo(); 3853 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(wschar, pegged.peg.and!(pegged.peg.option!(comment), newline))), "TomlGrammar.ws_comment_newline"), "ws_comment_newline")(TParseTree("", false,[], s)); 3854 } 3855 } 3856 static string ws_comment_newline(GetName g) 3857 { 3858 return "TomlGrammar.ws_comment_newline"; 3859 } 3860 3861 static TParseTree table(TParseTree p) 3862 { 3863 if(__ctfe) 3864 { 3865 return pegged.peg.defined!(pegged.peg.or!(std_table, array_table), "TomlGrammar.table")(p); 3866 } 3867 else 3868 { 3869 if (auto m = tuple(`table`, p.end) in memo) 3870 return *m; 3871 else 3872 { 3873 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(std_table, array_table), "TomlGrammar.table"), "table")(p); 3874 memo[tuple(`table`, p.end)] = result; 3875 return result; 3876 } 3877 } 3878 } 3879 3880 static TParseTree table(string s) 3881 { 3882 if(__ctfe) 3883 { 3884 return pegged.peg.defined!(pegged.peg.or!(std_table, array_table), "TomlGrammar.table")(TParseTree("", false,[], s)); 3885 } 3886 else 3887 { 3888 forgetMemo(); 3889 return hooked!(pegged.peg.defined!(pegged.peg.or!(std_table, array_table), "TomlGrammar.table"), "table")(TParseTree("", false,[], s)); 3890 } 3891 } 3892 static string table(GetName g) 3893 { 3894 return "TomlGrammar.table"; 3895 } 3896 3897 static TParseTree std_table(TParseTree p) 3898 { 3899 if(__ctfe) 3900 { 3901 return pegged.peg.defined!(pegged.peg.and!(std_table_open, key, std_table_close), "TomlGrammar.std_table")(p); 3902 } 3903 else 3904 { 3905 if (auto m = tuple(`std_table`, p.end) in memo) 3906 return *m; 3907 else 3908 { 3909 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(std_table_open, key, std_table_close), "TomlGrammar.std_table"), "std_table")(p); 3910 memo[tuple(`std_table`, p.end)] = result; 3911 return result; 3912 } 3913 } 3914 } 3915 3916 static TParseTree std_table(string s) 3917 { 3918 if(__ctfe) 3919 { 3920 return pegged.peg.defined!(pegged.peg.and!(std_table_open, key, std_table_close), "TomlGrammar.std_table")(TParseTree("", false,[], s)); 3921 } 3922 else 3923 { 3924 forgetMemo(); 3925 return hooked!(pegged.peg.defined!(pegged.peg.and!(std_table_open, key, std_table_close), "TomlGrammar.std_table"), "std_table")(TParseTree("", false,[], s)); 3926 } 3927 } 3928 static string std_table(GetName g) 3929 { 3930 return "TomlGrammar.std_table"; 3931 } 3932 3933 static TParseTree std_table_open(TParseTree p) 3934 { 3935 if(__ctfe) 3936 { 3937 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("["), ws), "TomlGrammar.std_table_open")(p); 3938 } 3939 else 3940 { 3941 if (auto m = tuple(`std_table_open`, p.end) in memo) 3942 return *m; 3943 else 3944 { 3945 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("["), ws), "TomlGrammar.std_table_open"), "std_table_open")(p); 3946 memo[tuple(`std_table_open`, p.end)] = result; 3947 return result; 3948 } 3949 } 3950 } 3951 3952 static TParseTree std_table_open(string s) 3953 { 3954 if(__ctfe) 3955 { 3956 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("["), ws), "TomlGrammar.std_table_open")(TParseTree("", false,[], s)); 3957 } 3958 else 3959 { 3960 forgetMemo(); 3961 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("["), ws), "TomlGrammar.std_table_open"), "std_table_open")(TParseTree("", false,[], s)); 3962 } 3963 } 3964 static string std_table_open(GetName g) 3965 { 3966 return "TomlGrammar.std_table_open"; 3967 } 3968 3969 static TParseTree std_table_close(TParseTree p) 3970 { 3971 if(__ctfe) 3972 { 3973 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]")), "TomlGrammar.std_table_close")(p); 3974 } 3975 else 3976 { 3977 if (auto m = tuple(`std_table_close`, p.end) in memo) 3978 return *m; 3979 else 3980 { 3981 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]")), "TomlGrammar.std_table_close"), "std_table_close")(p); 3982 memo[tuple(`std_table_close`, p.end)] = result; 3983 return result; 3984 } 3985 } 3986 } 3987 3988 static TParseTree std_table_close(string s) 3989 { 3990 if(__ctfe) 3991 { 3992 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]")), "TomlGrammar.std_table_close")(TParseTree("", false,[], s)); 3993 } 3994 else 3995 { 3996 forgetMemo(); 3997 return hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]")), "TomlGrammar.std_table_close"), "std_table_close")(TParseTree("", false,[], s)); 3998 } 3999 } 4000 static string std_table_close(GetName g) 4001 { 4002 return "TomlGrammar.std_table_close"; 4003 } 4004 4005 static TParseTree inline_table(TParseTree p) 4006 { 4007 if(__ctfe) 4008 { 4009 return pegged.peg.defined!(pegged.peg.and!(inline_table_open, pegged.peg.option!(inline_table_keyvals), inline_table_close), "TomlGrammar.inline_table")(p); 4010 } 4011 else 4012 { 4013 if (auto m = tuple(`inline_table`, p.end) in memo) 4014 return *m; 4015 else 4016 { 4017 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(inline_table_open, pegged.peg.option!(inline_table_keyvals), inline_table_close), "TomlGrammar.inline_table"), "inline_table")(p); 4018 memo[tuple(`inline_table`, p.end)] = result; 4019 return result; 4020 } 4021 } 4022 } 4023 4024 static TParseTree inline_table(string s) 4025 { 4026 if(__ctfe) 4027 { 4028 return pegged.peg.defined!(pegged.peg.and!(inline_table_open, pegged.peg.option!(inline_table_keyvals), inline_table_close), "TomlGrammar.inline_table")(TParseTree("", false,[], s)); 4029 } 4030 else 4031 { 4032 forgetMemo(); 4033 return hooked!(pegged.peg.defined!(pegged.peg.and!(inline_table_open, pegged.peg.option!(inline_table_keyvals), inline_table_close), "TomlGrammar.inline_table"), "inline_table")(TParseTree("", false,[], s)); 4034 } 4035 } 4036 static string inline_table(GetName g) 4037 { 4038 return "TomlGrammar.inline_table"; 4039 } 4040 4041 static TParseTree inline_table_open(TParseTree p) 4042 { 4043 if(__ctfe) 4044 { 4045 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("{"), ws), "TomlGrammar.inline_table_open")(p); 4046 } 4047 else 4048 { 4049 if (auto m = tuple(`inline_table_open`, p.end) in memo) 4050 return *m; 4051 else 4052 { 4053 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("{"), ws), "TomlGrammar.inline_table_open"), "inline_table_open")(p); 4054 memo[tuple(`inline_table_open`, p.end)] = result; 4055 return result; 4056 } 4057 } 4058 } 4059 4060 static TParseTree inline_table_open(string s) 4061 { 4062 if(__ctfe) 4063 { 4064 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("{"), ws), "TomlGrammar.inline_table_open")(TParseTree("", false,[], s)); 4065 } 4066 else 4067 { 4068 forgetMemo(); 4069 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("{"), ws), "TomlGrammar.inline_table_open"), "inline_table_open")(TParseTree("", false,[], s)); 4070 } 4071 } 4072 static string inline_table_open(GetName g) 4073 { 4074 return "TomlGrammar.inline_table_open"; 4075 } 4076 4077 static TParseTree inline_table_close(TParseTree p) 4078 { 4079 if(__ctfe) 4080 { 4081 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("}")), "TomlGrammar.inline_table_close")(p); 4082 } 4083 else 4084 { 4085 if (auto m = tuple(`inline_table_close`, p.end) in memo) 4086 return *m; 4087 else 4088 { 4089 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("}")), "TomlGrammar.inline_table_close"), "inline_table_close")(p); 4090 memo[tuple(`inline_table_close`, p.end)] = result; 4091 return result; 4092 } 4093 } 4094 } 4095 4096 static TParseTree inline_table_close(string s) 4097 { 4098 if(__ctfe) 4099 { 4100 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("}")), "TomlGrammar.inline_table_close")(TParseTree("", false,[], s)); 4101 } 4102 else 4103 { 4104 forgetMemo(); 4105 return hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("}")), "TomlGrammar.inline_table_close"), "inline_table_close")(TParseTree("", false,[], s)); 4106 } 4107 } 4108 static string inline_table_close(GetName g) 4109 { 4110 return "TomlGrammar.inline_table_close"; 4111 } 4112 4113 static TParseTree inline_table_sep(TParseTree p) 4114 { 4115 if(__ctfe) 4116 { 4117 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!(","), ws), "TomlGrammar.inline_table_sep")(p); 4118 } 4119 else 4120 { 4121 if (auto m = tuple(`inline_table_sep`, p.end) in memo) 4122 return *m; 4123 else 4124 { 4125 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!(","), ws), "TomlGrammar.inline_table_sep"), "inline_table_sep")(p); 4126 memo[tuple(`inline_table_sep`, p.end)] = result; 4127 return result; 4128 } 4129 } 4130 } 4131 4132 static TParseTree inline_table_sep(string s) 4133 { 4134 if(__ctfe) 4135 { 4136 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!(","), ws), "TomlGrammar.inline_table_sep")(TParseTree("", false,[], s)); 4137 } 4138 else 4139 { 4140 forgetMemo(); 4141 return hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!(","), ws), "TomlGrammar.inline_table_sep"), "inline_table_sep")(TParseTree("", false,[], s)); 4142 } 4143 } 4144 static string inline_table_sep(GetName g) 4145 { 4146 return "TomlGrammar.inline_table_sep"; 4147 } 4148 4149 static TParseTree inline_table_keyvals(TParseTree p) 4150 { 4151 if(__ctfe) 4152 { 4153 return pegged.peg.defined!(pegged.peg.and!(keyval, pegged.peg.option!(pegged.peg.and!(inline_table_sep, inline_table_keyvals))), "TomlGrammar.inline_table_keyvals")(p); 4154 } 4155 else 4156 { 4157 if (auto m = tuple(`inline_table_keyvals`, p.end) in memo) 4158 return *m; 4159 else 4160 { 4161 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(keyval, pegged.peg.option!(pegged.peg.and!(inline_table_sep, inline_table_keyvals))), "TomlGrammar.inline_table_keyvals"), "inline_table_keyvals")(p); 4162 memo[tuple(`inline_table_keyvals`, p.end)] = result; 4163 return result; 4164 } 4165 } 4166 } 4167 4168 static TParseTree inline_table_keyvals(string s) 4169 { 4170 if(__ctfe) 4171 { 4172 return pegged.peg.defined!(pegged.peg.and!(keyval, pegged.peg.option!(pegged.peg.and!(inline_table_sep, inline_table_keyvals))), "TomlGrammar.inline_table_keyvals")(TParseTree("", false,[], s)); 4173 } 4174 else 4175 { 4176 forgetMemo(); 4177 return hooked!(pegged.peg.defined!(pegged.peg.and!(keyval, pegged.peg.option!(pegged.peg.and!(inline_table_sep, inline_table_keyvals))), "TomlGrammar.inline_table_keyvals"), "inline_table_keyvals")(TParseTree("", false,[], s)); 4178 } 4179 } 4180 static string inline_table_keyvals(GetName g) 4181 { 4182 return "TomlGrammar.inline_table_keyvals"; 4183 } 4184 4185 static TParseTree array_table(TParseTree p) 4186 { 4187 if(__ctfe) 4188 { 4189 return pegged.peg.defined!(pegged.peg.and!(array_table_open, key, array_table_close), "TomlGrammar.array_table")(p); 4190 } 4191 else 4192 { 4193 if (auto m = tuple(`array_table`, p.end) in memo) 4194 return *m; 4195 else 4196 { 4197 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(array_table_open, key, array_table_close), "TomlGrammar.array_table"), "array_table")(p); 4198 memo[tuple(`array_table`, p.end)] = result; 4199 return result; 4200 } 4201 } 4202 } 4203 4204 static TParseTree array_table(string s) 4205 { 4206 if(__ctfe) 4207 { 4208 return pegged.peg.defined!(pegged.peg.and!(array_table_open, key, array_table_close), "TomlGrammar.array_table")(TParseTree("", false,[], s)); 4209 } 4210 else 4211 { 4212 forgetMemo(); 4213 return hooked!(pegged.peg.defined!(pegged.peg.and!(array_table_open, key, array_table_close), "TomlGrammar.array_table"), "array_table")(TParseTree("", false,[], s)); 4214 } 4215 } 4216 static string array_table(GetName g) 4217 { 4218 return "TomlGrammar.array_table"; 4219 } 4220 4221 static TParseTree array_table_open(TParseTree p) 4222 { 4223 if(__ctfe) 4224 { 4225 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("[["), ws), "TomlGrammar.array_table_open")(p); 4226 } 4227 else 4228 { 4229 if (auto m = tuple(`array_table_open`, p.end) in memo) 4230 return *m; 4231 else 4232 { 4233 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("[["), ws), "TomlGrammar.array_table_open"), "array_table_open")(p); 4234 memo[tuple(`array_table_open`, p.end)] = result; 4235 return result; 4236 } 4237 } 4238 } 4239 4240 static TParseTree array_table_open(string s) 4241 { 4242 if(__ctfe) 4243 { 4244 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("[["), ws), "TomlGrammar.array_table_open")(TParseTree("", false,[], s)); 4245 } 4246 else 4247 { 4248 forgetMemo(); 4249 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("[["), ws), "TomlGrammar.array_table_open"), "array_table_open")(TParseTree("", false,[], s)); 4250 } 4251 } 4252 static string array_table_open(GetName g) 4253 { 4254 return "TomlGrammar.array_table_open"; 4255 } 4256 4257 static TParseTree array_table_close(TParseTree p) 4258 { 4259 if(__ctfe) 4260 { 4261 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]]")), "TomlGrammar.array_table_close")(p); 4262 } 4263 else 4264 { 4265 if (auto m = tuple(`array_table_close`, p.end) in memo) 4266 return *m; 4267 else 4268 { 4269 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]]")), "TomlGrammar.array_table_close"), "array_table_close")(p); 4270 memo[tuple(`array_table_close`, p.end)] = result; 4271 return result; 4272 } 4273 } 4274 } 4275 4276 static TParseTree array_table_close(string s) 4277 { 4278 if(__ctfe) 4279 { 4280 return pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]]")), "TomlGrammar.array_table_close")(TParseTree("", false,[], s)); 4281 } 4282 else 4283 { 4284 forgetMemo(); 4285 return hooked!(pegged.peg.defined!(pegged.peg.and!(ws, pegged.peg.literal!("]]")), "TomlGrammar.array_table_close"), "array_table_close")(TParseTree("", false,[], s)); 4286 } 4287 } 4288 static string array_table_close(GetName g) 4289 { 4290 return "TomlGrammar.array_table_close"; 4291 } 4292 4293 static TParseTree ALPHA(TParseTree p) 4294 { 4295 if(__ctfe) 4296 { 4297 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "TomlGrammar.ALPHA")(p); 4298 } 4299 else 4300 { 4301 if (auto m = tuple(`ALPHA`, p.end) in memo) 4302 return *m; 4303 else 4304 { 4305 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "TomlGrammar.ALPHA"), "ALPHA")(p); 4306 memo[tuple(`ALPHA`, p.end)] = result; 4307 return result; 4308 } 4309 } 4310 } 4311 4312 static TParseTree ALPHA(string s) 4313 { 4314 if(__ctfe) 4315 { 4316 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "TomlGrammar.ALPHA")(TParseTree("", false,[], s)); 4317 } 4318 else 4319 { 4320 forgetMemo(); 4321 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), "TomlGrammar.ALPHA"), "ALPHA")(TParseTree("", false,[], s)); 4322 } 4323 } 4324 static string ALPHA(GetName g) 4325 { 4326 return "TomlGrammar.ALPHA"; 4327 } 4328 4329 static TParseTree DIGIT(TParseTree p) 4330 { 4331 if(__ctfe) 4332 { 4333 return pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "TomlGrammar.DIGIT")(p); 4334 } 4335 else 4336 { 4337 if (auto m = tuple(`DIGIT`, p.end) in memo) 4338 return *m; 4339 else 4340 { 4341 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "TomlGrammar.DIGIT"), "DIGIT")(p); 4342 memo[tuple(`DIGIT`, p.end)] = result; 4343 return result; 4344 } 4345 } 4346 } 4347 4348 static TParseTree DIGIT(string s) 4349 { 4350 if(__ctfe) 4351 { 4352 return pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "TomlGrammar.DIGIT")(TParseTree("", false,[], s)); 4353 } 4354 else 4355 { 4356 forgetMemo(); 4357 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "TomlGrammar.DIGIT"), "DIGIT")(TParseTree("", false,[], s)); 4358 } 4359 } 4360 static string DIGIT(GetName g) 4361 { 4362 return "TomlGrammar.DIGIT"; 4363 } 4364 4365 static TParseTree HEXDIG(TParseTree p) 4366 { 4367 if(__ctfe) 4368 { 4369 return pegged.peg.defined!(pegged.peg.or!(DIGIT, pegged.peg.or!(pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f'))), "TomlGrammar.HEXDIG")(p); 4370 } 4371 else 4372 { 4373 if (auto m = tuple(`HEXDIG`, p.end) in memo) 4374 return *m; 4375 else 4376 { 4377 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(DIGIT, pegged.peg.or!(pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f'))), "TomlGrammar.HEXDIG"), "HEXDIG")(p); 4378 memo[tuple(`HEXDIG`, p.end)] = result; 4379 return result; 4380 } 4381 } 4382 } 4383 4384 static TParseTree HEXDIG(string s) 4385 { 4386 if(__ctfe) 4387 { 4388 return pegged.peg.defined!(pegged.peg.or!(DIGIT, pegged.peg.or!(pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f'))), "TomlGrammar.HEXDIG")(TParseTree("", false,[], s)); 4389 } 4390 else 4391 { 4392 forgetMemo(); 4393 return hooked!(pegged.peg.defined!(pegged.peg.or!(DIGIT, pegged.peg.or!(pegged.peg.charRange!('A', 'F'), pegged.peg.charRange!('a', 'f'))), "TomlGrammar.HEXDIG"), "HEXDIG")(TParseTree("", false,[], s)); 4394 } 4395 } 4396 static string HEXDIG(GetName g) 4397 { 4398 return "TomlGrammar.HEXDIG"; 4399 } 4400 4401 static TParseTree opCall(TParseTree p) 4402 { 4403 TParseTree result = decimateTree(toml(p)); 4404 result.children = [result]; 4405 result.name = "TomlGrammar"; 4406 return result; 4407 } 4408 4409 static TParseTree opCall(string input) 4410 { 4411 if(__ctfe) 4412 { 4413 return TomlGrammar(TParseTree(``, false, [], input, 0, 0)); 4414 } 4415 else 4416 { 4417 forgetMemo(); 4418 return TomlGrammar(TParseTree(``, false, [], input, 0, 0)); 4419 } 4420 } 4421 static string opCall(GetName g) 4422 { 4423 return "TomlGrammar"; 4424 } 4425 4426 4427 static void forgetMemo() 4428 { 4429 memo = null; 4430 } 4431 } 4432 } 4433 4434 alias GenericTomlGrammar!(ParseTree).TomlGrammar TomlGrammar; 4435