1 /++ 2 This module was automatically generated from the following grammar: 3 4 # Markdown grammar. 5 # Taken from the PEG grammar at 6 # https://github.com/jgm/peg-markdown 7 # And simplified somewhat. 8 Markdown: 9 Doc <- BOM? TitleBlock? (%Block)* 10 #### Pandoc Extension #### Partially implemented 11 TitleBlock <- :"%" TitleText 12 :"%" Date 13 :"%" Authors 14 TitleText <~ Line (:Spacechar Line)* 15 Date <- ;Line 16 Authors <- Author ((:";" (:Newline :Spacechar)? / :Newline :Spacechar) Author)* 17 Author <- (!";" !Newline %Inlines)+ 18 Block <- BlankLine* 19 ( BlockQuote 20 / FootnoteDefinition #### Pandoc Extension 21 / CodeBlock 22 / Verbatim 23 / Note 24 / Reference 25 / HorizontalRule 26 / Heading 27 / Table #### Pandoc Extension 28 / DefinitionList #### Pandoc Extension 29 / OrderedList 30 / BulletList 31 / HtmlBlock 32 / StyleBlock 33 / Para 34 / %Inlines ) 35 Para <- :NonindentSpace %Inlines BlankLine+ 36 #Plain <~ %Inlines 37 Heading <- SetextHeading / AtxHeading 38 SetextHeading <- SetextHeading1 / SetextHeading2 39 SetextHeading1 <~ &(Line SetextBottom1) 40 ( !Endline Inline )+ Sp? :Newline 41 :SetextBottom1 42 SetextHeading2 <~ &(Line SetextBottom2) 43 ( !Endline Inline)+ Sp? :Newline 44 :SetextBottom2 45 SetextBottom1 <~ "===" "="* Newline 46 SetextBottom2 <~ "---" "-"* Newline 47 AtxHeading <- AtxStart ~(Sp? AtxInline+ Sp? ("#"* Sp)? Newline) 48 AtxInline <- !Newline !(Sp? "#"* Sp Newline) Inline 49 AtxStart <- ( "######" / "#####" / "####" / "###" / "##" / "#" ) 50 #### Pandoc Extension #### 51 # A semantic function must find the columns, based on the dashes 52 Table <- SimpleTable # For further extension (multiline tables and grid tables) 53 SimpleTable <- TableHeaders 54 TableLine+ 55 :(BlankLine / "-"+ Newline BlankLine) 56 TableCaption? 57 TableHeaders <- ;Line? 58 ~("-"+) ~(Spacechar+) ~("-"+) (~(Spacechar+) ~("-"+))* :Newline 59 # ;Line makes all the inlines disappear. Is that wanted or not? 60 TableLine <- !(BlankLine / "-"+ Newline BlankLine) ;Line 61 TableCaption <- :"Table:" ;Line 62 / :":" ;Line 63 BlockQuote <- ( ">" " "? Line ( !">" !BlankLine Line )* BlankLine* )+ 64 NonblankIndentedLine <~ !BlankLine IndentedLine 65 VerbatimChunk <- BlankLine* NonblankIndentedLine+ 66 Verbatim <~ VerbatimChunk+ 67 HorizontalRule <- NonindentSpace 68 ( "*" Sp "*" Sp "*" (Sp "*")* 69 / "-" Sp "-" Sp "-" (Sp "-")* 70 / "_" Sp "_" Sp "_" (Sp "_")*) 71 Sp Newline BlankLine+ 72 BulletList <- &Bullet (%BulletListTight / %BulletListLoose) 73 BulletListTight <- (%BulletListItemTight)+ :BlankLine* !Bullet 74 BulletListItemTight <- Bullet ListBlock 75 (!BlankLine ListContinuationBlock)* 76 #!ListContinuationBlock 77 BulletListLoose <- (%BulletListItem :BlankLine*)+ 78 BulletListItem <- Bullet ListBlock ListContinuationBlock* 79 Bullet <: !HorizontalRule NonindentSpace ("+" / "*" / "-") Spacechar+ 80 OrderedList <- &Enumerator (OrderedListTight / OrderedListLoose) 81 OrderedListTight <- (%OrderedListItemTight)+ :BlankLine* !Enumerator 82 OrderedListItemTight <- Enumerator ListBlock 83 (!BlankLine ListContinuationBlock)* 84 #!ListContinuationBlock # Is it necessary? 85 OrderedListLoose <- (%OrderedListItem :BlankLine*)+ 86 OrderedListItem <- Enumerator ListBlock ListContinuationBlock* 87 Enumerator <: NonindentSpace ~[0-9]+ "." Spacechar+ 88 ListBlock <- !BlankLine %Inlines ListBlockLine* 89 ListContinuationBlock <- BlankLine* (Indent ListBlock)+ 90 ListBlockLine <- !BlankLine !( Indent? (Bullet / Enumerator)) !HorizontalRule Indent? %Inlines 91 DefinitionList <- Term :(BlankLine?) Definition+ 92 Term <- (!Newline .)+ :Newline 93 Definition <- ( Spacechar Spacechar :(":"/"~") Spacechar Spacechar 94 / Spacechar :(":"/"~") Spacechar Spacechar Spacechar 95 / :(":"/"~") Spacechar Spacechar Spacechar Spacechar) 96 Inlines :Newline 97 IndentedLine* 98 # Parsers for different kinds of block-level HTML content. 99 # This is repetitive due to constraints of PEG grammar. 100 HtmlBlockOpen(Type) <- :"<" :Spnl Type :Spnl HtmlAttribute* :">" :(Spnl*) 101 HtmlBlockClose(Type) <- :"<" :Spnl :"/" Type :Spnl :">" :(Spnl*) 102 HtmlBlockT(Type) <- ;HtmlBlockOpen(Type) 103 (%HtmlBlockInTags / NonHtml)* 104 ;HtmlBlockClose(Type) 105 # Hack. This should use a HtmlBlockClose(every possibility) 106 NonHtml <- (!("<" Spnl "/") Inline)* 107 HtmlBlockInTags <- HtmlBlockT("address" / "ADDRESS") 108 / HtmlBlockT("blockquote" / "BLOCKQUOTE") 109 / HtmlBlockT("center" / "CENTER") 110 / HtmlBlockT("dir" / "DIR") 111 / HtmlBlockT("div" / "DIV") 112 / HtmlBlockT("dl" / "DL") 113 / HtmlBlockT("fieldset" / "FIELDSET") 114 / HtmlBlockT("form" / "FORM") 115 / HtmlBlockT("h1" / "H1") 116 / HtmlBlockT("h2" / "H2") 117 / HtmlBlockT("h3" / "H3") 118 / HtmlBlockT("h4" / "H4") 119 / HtmlBlockT("h5" / "H5") 120 / HtmlBlockT("h6" / "H6") 121 / HtmlBlockT("menu" / "MENU") 122 / HtmlBlockT("noframes" / "NOFRAMES") 123 / HtmlBlockT("noscript" / "NOSCRIPT") 124 / HtmlBlockT("ol" / "OL") 125 / HtmlBlockT("p" / "P") 126 / HtmlBlockT("pre" / "PRE") 127 / HtmlBlockT("table" / "TABLE") 128 / HtmlBlockT("ul" / "UL") 129 / HtmlBlockT("dd" / "DD") 130 / HtmlBlockT("dt" / "DT") 131 / HtmlBlockT("frameset" / "FRAMESET") 132 / HtmlBlockT("li" / "LI") 133 / HtmlBlockT("tbody" / "TBODY") 134 / HtmlBlockT("td" / "TD") 135 / HtmlBlockT("tfoot" / "TFOOT") 136 / HtmlBlockT("th" / "TH") 137 / HtmlBlockT("thead" / "THEAD") 138 / HtmlBlockT("tr" / "TR") 139 / HtmlBlockT("script" / "SCRIPT") 140 HtmlBlock <- (%HtmlBlockInTags / HtmlComment / HtmlBlockSelfClosing) BlankLine+ 141 HtmlBlockSelfClosing <- "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" 142 HtmlBlockType <- "address" / "blockquote" / "center" / "dir" / "div" / "dl" / "fieldset" / "form" / "h1" / "h2" / "h3" / 143 "h4" / "h5" / "h6" / "hr" / "isindex" / "menu" / "noframes" / "noscript" / "ol" / "p" / "pre" / "table" / 144 "ul" / "dd" / "dt" / "frameset" / "li" / "tbody" / "td" / "tfoot" / "th" / "thead" / "tr" / "script" / 145 "ADDRESS" / "BLOCKQUOTE" / "CENTER" / "DIR" / "DIV" / "DL" / "FIELDSET" / "FORM" / "H1" / "H2" / "H3" / 146 "H4" / "H5" / "H6" / "HR" / "ISINDEX" / "MENU" / "NOFRAMES" / "NOSCRIPT" / "OL" / "P" / "PRE" / "TABLE" / 147 "UL" / "DD" / "DT" / "FRAMESET" / "LI" / "TBODY" / "TD" / "TFOOT" / "TH" / "THEAD" / "TR" / "SCRIPT" 148 StyleOpen <- "<" Spnl ("style" / "STYLE") Spnl HtmlAttribute* ">" 149 StyleClose <- "<" Spnl "/" ("style" / "STYLE") Spnl ">" 150 InStyleTags <- StyleOpen (!StyleClose .)* StyleClose 151 StyleBlock <- InStyleTags BlankLine* 152 Inlines <- (!Endline %Inline )+ Endline? 153 Inline <- Str 154 / Endline 155 / UlOrStarLine 156 / Space 157 / Strong 158 / Emph 159 / Strikeout #### Pandoc Extension 160 / Superscript #### Pandoc Extension 161 / Subscript #### Pandoc Extension 162 / Math #### Pandoc Extension 163 / FootnoteReference #### Pandoc Extension 164 / Image 165 / Link 166 / NoteReference 167 / InlineNote 168 / Code 169 / RawHtml 170 / Entity 171 / EscapedChar 172 / Smart 173 / Symbol 174 Space <~ Spacechar+ 175 Str <~ NormalChar+ StrChunk* 176 StrChunk <~ (NormalChar / "_"+ &Alphanumeric)+ / AposChunk 177 AposChunk <- quote &Alphanumeric 178 EscapedChar <- backslash (backquote / backslash / [-/_*{}[\]()#+.!><]) 179 Entity <- HexEntity / DecEntity / CharEntity 180 Endline <~ LineBreak / TerminalEndline / NormalEndline 181 NormalEndline <- Sp Newline !BlankLine !">" !AtxStart 182 !(Line ("<-<-<-" "<-"* / "---" "-"*) Newline) 183 TerminalEndline <- Sp Newline eoi 184 LineBreak <~ " " NormalEndline 185 Symbol <~ SpecialChar 186 UlOrStarLine <~ UlLine / StarLine 187 StarLine <- "****" "*"* / Spacechar "*"+ &Spacechar 188 UlLine <- "____" "_"* / Spacechar "_"+ &Spacechar 189 Emph <~ EmphStar / EmphUl 190 OneStarOpen <- !StarLine "*" !Spacechar !Newline 191 OneStarClose <- !Spacechar !Newline Inline :"*" 192 EmphStar <- :OneStarOpen 193 ( !OneStarClose Inline )* 194 OneStarClose 195 OneUlOpen <- !UlLine "_" !Spacechar !Newline 196 OneUlClose <- !Spacechar !Newline Inline :"_" !Alphanumeric 197 EmphUl <- :OneUlOpen 198 ( !OneUlClose Inline )* 199 OneUlClose 200 Strong <~ StrongStar / StrongUl 201 TwoStarOpen <- !StarLine "**" !Spacechar !Newline 202 TwoStarClose <- !Spacechar !Newline Inline :"**" 203 StrongStar <- :TwoStarOpen 204 ( !TwoStarClose Inline )* 205 TwoStarClose 206 TwoUlOpen <- !UlLine "__" !Spacechar !Newline 207 TwoUlClose <- !Spacechar !Newline Inline :"__" !Alphanumeric 208 StrongUl <- :TwoUlOpen 209 ( !TwoUlClose Inline )* 210 :TwoUlClose 211 #### Pandoc Extension #### 212 Strikeout <- :"~~" Inline :"~~" 213 #### Pandoc Extension #### 214 Superscript <- :"^" Inline :"^" 215 #### Pandoc Extension #### 216 Subscript <- :"~" Inline :"~" 217 #### Pandoc Extension #### 218 Math <- :"$" !Spacechar (!(Spacechar "$") .)* :"$" 219 Image <- "!" ( ExplicitLink / ReferenceLink ) 220 Link <- ExplicitLink / ReferenceLink / AutoLink 221 ReferenceLink <- ReferenceLinkDouble / ReferenceLinkSingle 222 ReferenceLinkDouble <- Label Spnl !"[]" Label 223 ReferenceLinkSingle <- Label (Spnl "[]")? 224 ExplicitLink <- Label Spnl :"(" Sp Source Spnl Title? Sp :")" 225 Source <- HeaderIdentifier #### Pandoc extension #### 226 / :"<" SourceContents :">" 227 / SourceContents 228 HeaderIdentifier <~ :"#" [a-z][-_.a-z0-9]* 229 SourceContents <~ ( ( !"(" !")" !">" Nonspacechar )+ / :"(" SourceContents :")")* 230 Title <~ (TitleSingle / TitleDouble) 231 TitleSingle <- :quote ( !( quote Sp ( ")" / Newline ) ) . )* :quote 232 TitleDouble <- :doublequote ( !( doublequote Sp ( ")" / Newline ) ) . )* :doublequote 233 AutoLink <- AutoLinkUrl / AutoLinkEmail 234 AutoLinkUrl <- :"<" ~([A-Za-z]+ "://" ( !Newline !">" . )+) :">" 235 AutoLinkEmail <- :"<" ( "mailto:" )? ~([-A-Za-z0-9+_./!%~$]+ "@" ( !Newline !">" . )+) :">" 236 Reference <- NonindentSpace !"[]" Label ":" Spnl RefSrc RefTitle BlankLine+ 237 Label <~ :"[" (!"]" Inline )* :"]" 238 RefSrc <- Nonspacechar+ 239 RefTitle <- RefTitleSingle / RefTitleDouble / RefTitleParens / EmptyTitle 240 EmptyTitle <- eps 241 RefTitleSingle <- Spnl quote ( !( quote Sp Newline / Newline ) . )* quote 242 RefTitleDouble <- Spnl doublequote ( !(doublequote Sp Newline / Newline) . )* doublequote 243 RefTitleParens <- Spnl "(" ( !(")" Sp Newline / Newline) .)* ")" 244 References <- ( Reference / SkipBlock )* 245 Ticks1 <- backquote !backquote 246 Ticks2 <- backquote backquote !backquote 247 Ticks3 <- backquote backquote backquote !backquote 248 Ticks4 <- backquote backquote backquote backquote !backquote 249 Ticks5 <- backquote backquote backquote backquote backquote !backquote 250 Tildes <- "~~~" "~"* 251 ### Standard extension. Covers both Github Markdown and Pandoc Markdown 252 CodeBlock <- ( :Ticks5 CodeOptions? :Newline ~(!Ticks5 .)+ :Ticks5 :Newline 253 / :Ticks4 CodeOptions? :Newline ~(!Ticks4 .)+ :Ticks4 :Newline 254 / :Ticks3 CodeOptions? :Newline ~(!Ticks3 .)+ :Ticks3 :Newline 255 / :Tildes CodeOptions? :Newline ~(!Tildes .)+ :Tildes :Newline) 256 Code <- ( :Ticks1 ~(!Ticks1 .)+ :Ticks1 CodeOptions? 257 / :Ticks2 ~(!Ticks2 .)+ :Ticks2 CodeOptions?) 258 CodeOptions <- :"{" :Sp (;Option :Sp)* :Sp :"}" 259 / ;Option 260 Option <~ "."? identifier (:"=" (digit+ / identifier))? 261 #### Pandoc Extension #### Partially implemented (multiline footnotes) 262 FootnoteReference <- :"[^" FootnoteName :"]" !":" 263 FootnoteDefinition <- :"[^" FootnoteName :"]:" Line (BlankLine / Indent Line)* 264 FootnoteName <- (digit+ / identifier) 265 RawHtml <- HtmlComment / HtmlBlockT("script" / "SCRIPT") / HtmlTag 266 BlankLine <~ Sp Newline 267 Quoted <- doublequote (!doublequote .)* doublequote / quote (!quote .)* quote 268 HtmlAttribute <- (AlphanumericAscii / "-")+ Spnl ("=" Spnl (Quoted / (!">" Nonspacechar)+))? Spnl 269 HtmlComment <- "<!--" (!"-->" .)* "-->" 270 HtmlTag <- "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" 271 Spacechar <- " " / "\t" 272 Nonspacechar <- !Spacechar !Newline . 273 Newline <- endOfLine 274 Sp <- Spacechar* 275 Spnl <- Sp (Newline Sp)? 276 SpecialChar <- "*" / "_" / backquote / "&" / "[" / "]" / "(" / ")" / "<" / "!" / "#" / backslash / quote / doublequote / ExtendedSpecialChar 277 NormalChar <- !( SpecialChar / Spacechar / Newline ) . 278 NonAlphanumeric <- !Alphanumeric . #[\001-\057] / [\072-\100] / [\133-\140] / [\173-\177] 279 Alphanumeric <- [0-9A-Za-z] / "\200" / "\201" / "\202" / "\203" / "\204" 280 / "\205" / "\206" / "\207" / "\210" / "\211" / "\212" 281 / "\213" / "\214" / "\215" / "\216" / "\217" / "\220" 282 / "\221" / "\222" / "\223" / "\224" / "\225" / "\226" 283 / "\227" / "\230" / "\231" / "\232" / "\233" / "\234" 284 / "\235" / "\236" / "\237" / "\240" / "\241" / "\242" 285 / "\243" / "\244" / "\245" / "\246" / "\247" / "\250" 286 / "\251" / "\252" / "\253" / "\254" / "\255" / "\256" 287 / "\257" / "\260" / "\261" / "\262" / "\263" / "\264" 288 / "\265" / "\266" / "\267" / "\270" / "\271" / "\272" 289 / "\273" / "\274" / "\275" / "\276" / "\277" / "\300" 290 / "\301" / "\302" / "\303" / "\304" / "\305" / "\306" 291 / "\307" / "\310" / "\311" / "\312" / "\313" / "\314" 292 / "\315" / "\316" / "\317" / "\320" / "\321" / "\322" 293 / "\323" / "\324" / "\325" / "\326" / "\327" / "\330" 294 / "\331" / "\332" / "\333" / "\334" / "\335" / "\336" 295 / "\337" / "\340" / "\341" / "\342" / "\343" / "\344" 296 / "\345" / "\346" / "\347" / "\350" / "\351" / "\352" 297 / "\353" / "\354" / "\355" / "\356" / "\357" / "\360" 298 / "\361" / "\362" / "\363" / "\364" / "\365" / "\366" 299 / "\367" / "\370" / "\371" / "\372" / "\373" / "\374" 300 / "\375" / "\376" / "\377" 301 AlphanumericAscii <- [A-Za-z0-9] 302 Digit <- [0-9] 303 BOM <- "\357\273\277" 304 HexEntity <- "&" "#" [Xx] [0-9a-fA-F]+ 305 DecEntity <- "&" "#" [0-9]+ 306 CharEntity <- "&" [A-Za-z0-9]+ 307 NonindentSpace <: (" " / " " / " ")? 308 Indent <- "\t" / " " 309 IndentedLine <- :Indent Line 310 OptionallyIndentedLine <- Indent? Line 311 Line <~ (!Newline .)* :Newline 312 / .+ :eoi 313 SkipBlock <- HtmlBlock 314 / ( !"#" !SetextBottom1 !SetextBottom2 !BlankLine Line )+ BlankLine* 315 / BlankLine+ 316 / Line 317 ExtendedSpecialChar <- "." / "-" / quote / doublequote / "^" 318 Smart <- Ellipsis / Dash / SingleQuoted / DoubleQuoted / Apostrophe 319 Apostrophe <- quote 320 Ellipsis <- "..." / ". . ." 321 Dash <- EmDash / EnDash 322 EnDash <- "-" &Digit 323 EmDash <- "---" / "--" 324 SingleQuoteStart <- quote !(Spacechar / Newline) 325 SingleQuoteEnd <- quote !Alphanumeric 326 SingleQuoted <- SingleQuoteStart ( !SingleQuoteEnd Inline )+ SingleQuoteEnd 327 DoubleQuoteStart <- doublequote 328 DoubleQuoteEnd <- doublequote 329 DoubleQuoted <- DoubleQuoteStart ( !DoubleQuoteEnd Inline )+ DoubleQuoteEnd 330 NoteReference <- RawNoteReference 331 RawNoteReference <~ :"[^" ( !Newline !"]" . )+ :"]" !":" 332 Note <- :NonindentSpace RawNoteReference :":" :Sp 333 RawNoteBlock 334 ( &Indent RawNoteBlock )* 335 InlineNote <- :"^[" ( !"]" Inline)+ :"]" 336 Notes <- (Note / SkipBlock)* 337 RawNoteBlock <- ( !BlankLine OptionallyIndentedLine )+ BlankLine* 338 339 340 +/ 341 module coregrammars.gen.md; 342 343 public import pegged.peg; 344 import std.algorithm: startsWith; 345 import std.functional: toDelegate; 346 347 struct GenericMarkdown(TParseTree) 348 { 349 import std.functional : toDelegate; 350 import pegged.dynamic.grammar; 351 static import pegged.peg; 352 struct Markdown 353 { 354 enum name = "Markdown"; 355 static ParseTree delegate(ParseTree)[string] before; 356 static ParseTree delegate(ParseTree)[string] after; 357 static ParseTree delegate(ParseTree)[string] rules; 358 import std.typecons:Tuple, tuple; 359 static TParseTree[Tuple!(string, size_t)] memo; 360 static this() 361 { 362 rules["Doc"] = toDelegate(&Doc); 363 rules["TitleBlock"] = toDelegate(&TitleBlock); 364 rules["TitleText"] = toDelegate(&TitleText); 365 rules["Date"] = toDelegate(&Date); 366 rules["Authors"] = toDelegate(&Authors); 367 rules["Author"] = toDelegate(&Author); 368 rules["Block"] = toDelegate(&Block); 369 rules["Para"] = toDelegate(&Para); 370 rules["Heading"] = toDelegate(&Heading); 371 rules["SetextHeading"] = toDelegate(&SetextHeading); 372 rules["SetextHeading1"] = toDelegate(&SetextHeading1); 373 rules["SetextHeading2"] = toDelegate(&SetextHeading2); 374 rules["SetextBottom1"] = toDelegate(&SetextBottom1); 375 rules["SetextBottom2"] = toDelegate(&SetextBottom2); 376 rules["AtxHeading"] = toDelegate(&AtxHeading); 377 rules["AtxInline"] = toDelegate(&AtxInline); 378 rules["AtxStart"] = toDelegate(&AtxStart); 379 rules["Table"] = toDelegate(&Table); 380 rules["SimpleTable"] = toDelegate(&SimpleTable); 381 rules["TableHeaders"] = toDelegate(&TableHeaders); 382 rules["TableLine"] = toDelegate(&TableLine); 383 rules["TableCaption"] = toDelegate(&TableCaption); 384 rules["BlockQuote"] = toDelegate(&BlockQuote); 385 rules["NonblankIndentedLine"] = toDelegate(&NonblankIndentedLine); 386 rules["VerbatimChunk"] = toDelegate(&VerbatimChunk); 387 rules["Verbatim"] = toDelegate(&Verbatim); 388 rules["HorizontalRule"] = toDelegate(&HorizontalRule); 389 rules["BulletList"] = toDelegate(&BulletList); 390 rules["BulletListTight"] = toDelegate(&BulletListTight); 391 rules["BulletListItemTight"] = toDelegate(&BulletListItemTight); 392 rules["BulletListLoose"] = toDelegate(&BulletListLoose); 393 rules["BulletListItem"] = toDelegate(&BulletListItem); 394 rules["Bullet"] = toDelegate(&Bullet); 395 rules["OrderedList"] = toDelegate(&OrderedList); 396 rules["OrderedListTight"] = toDelegate(&OrderedListTight); 397 rules["OrderedListItemTight"] = toDelegate(&OrderedListItemTight); 398 rules["OrderedListLoose"] = toDelegate(&OrderedListLoose); 399 rules["OrderedListItem"] = toDelegate(&OrderedListItem); 400 rules["Enumerator"] = toDelegate(&Enumerator); 401 rules["ListBlock"] = toDelegate(&ListBlock); 402 rules["ListContinuationBlock"] = toDelegate(&ListContinuationBlock); 403 rules["ListBlockLine"] = toDelegate(&ListBlockLine); 404 rules["DefinitionList"] = toDelegate(&DefinitionList); 405 rules["Term"] = toDelegate(&Term); 406 rules["Definition"] = toDelegate(&Definition); 407 rules["NonHtml"] = toDelegate(&NonHtml); 408 rules["HtmlBlockInTags"] = toDelegate(&HtmlBlockInTags); 409 rules["HtmlBlock"] = toDelegate(&HtmlBlock); 410 rules["HtmlBlockSelfClosing"] = toDelegate(&HtmlBlockSelfClosing); 411 rules["HtmlBlockType"] = toDelegate(&HtmlBlockType); 412 rules["StyleOpen"] = toDelegate(&StyleOpen); 413 rules["StyleClose"] = toDelegate(&StyleClose); 414 rules["InStyleTags"] = toDelegate(&InStyleTags); 415 rules["StyleBlock"] = toDelegate(&StyleBlock); 416 rules["Inlines"] = toDelegate(&Inlines); 417 rules["Inline"] = toDelegate(&Inline); 418 rules["Space"] = toDelegate(&Space); 419 rules["Str"] = toDelegate(&Str); 420 rules["StrChunk"] = toDelegate(&StrChunk); 421 rules["AposChunk"] = toDelegate(&AposChunk); 422 rules["EscapedChar"] = toDelegate(&EscapedChar); 423 rules["Entity"] = toDelegate(&Entity); 424 rules["Endline"] = toDelegate(&Endline); 425 rules["NormalEndline"] = toDelegate(&NormalEndline); 426 rules["TerminalEndline"] = toDelegate(&TerminalEndline); 427 rules["LineBreak"] = toDelegate(&LineBreak); 428 rules["Symbol"] = toDelegate(&Symbol); 429 rules["UlOrStarLine"] = toDelegate(&UlOrStarLine); 430 rules["StarLine"] = toDelegate(&StarLine); 431 rules["UlLine"] = toDelegate(&UlLine); 432 rules["Emph"] = toDelegate(&Emph); 433 rules["OneStarOpen"] = toDelegate(&OneStarOpen); 434 rules["OneStarClose"] = toDelegate(&OneStarClose); 435 rules["EmphStar"] = toDelegate(&EmphStar); 436 rules["OneUlOpen"] = toDelegate(&OneUlOpen); 437 rules["OneUlClose"] = toDelegate(&OneUlClose); 438 rules["EmphUl"] = toDelegate(&EmphUl); 439 rules["Strong"] = toDelegate(&Strong); 440 rules["TwoStarOpen"] = toDelegate(&TwoStarOpen); 441 rules["TwoStarClose"] = toDelegate(&TwoStarClose); 442 rules["StrongStar"] = toDelegate(&StrongStar); 443 rules["TwoUlOpen"] = toDelegate(&TwoUlOpen); 444 rules["TwoUlClose"] = toDelegate(&TwoUlClose); 445 rules["StrongUl"] = toDelegate(&StrongUl); 446 rules["Strikeout"] = toDelegate(&Strikeout); 447 rules["Superscript"] = toDelegate(&Superscript); 448 rules["Subscript"] = toDelegate(&Subscript); 449 rules["Math"] = toDelegate(&Math); 450 rules["Image"] = toDelegate(&Image); 451 rules["Link"] = toDelegate(&Link); 452 rules["ReferenceLink"] = toDelegate(&ReferenceLink); 453 rules["ReferenceLinkDouble"] = toDelegate(&ReferenceLinkDouble); 454 rules["ReferenceLinkSingle"] = toDelegate(&ReferenceLinkSingle); 455 rules["ExplicitLink"] = toDelegate(&ExplicitLink); 456 rules["Source"] = toDelegate(&Source); 457 rules["HeaderIdentifier"] = toDelegate(&HeaderIdentifier); 458 rules["SourceContents"] = toDelegate(&SourceContents); 459 rules["Title"] = toDelegate(&Title); 460 rules["TitleSingle"] = toDelegate(&TitleSingle); 461 rules["TitleDouble"] = toDelegate(&TitleDouble); 462 rules["AutoLink"] = toDelegate(&AutoLink); 463 rules["AutoLinkUrl"] = toDelegate(&AutoLinkUrl); 464 rules["AutoLinkEmail"] = toDelegate(&AutoLinkEmail); 465 rules["Reference"] = toDelegate(&Reference); 466 rules["Label"] = toDelegate(&Label); 467 rules["RefSrc"] = toDelegate(&RefSrc); 468 rules["RefTitle"] = toDelegate(&RefTitle); 469 rules["EmptyTitle"] = toDelegate(&EmptyTitle); 470 rules["RefTitleSingle"] = toDelegate(&RefTitleSingle); 471 rules["RefTitleDouble"] = toDelegate(&RefTitleDouble); 472 rules["RefTitleParens"] = toDelegate(&RefTitleParens); 473 rules["References"] = toDelegate(&References); 474 rules["Ticks1"] = toDelegate(&Ticks1); 475 rules["Ticks2"] = toDelegate(&Ticks2); 476 rules["Ticks3"] = toDelegate(&Ticks3); 477 rules["Ticks4"] = toDelegate(&Ticks4); 478 rules["Ticks5"] = toDelegate(&Ticks5); 479 rules["Tildes"] = toDelegate(&Tildes); 480 rules["CodeBlock"] = toDelegate(&CodeBlock); 481 rules["Code"] = toDelegate(&Code); 482 rules["CodeOptions"] = toDelegate(&CodeOptions); 483 rules["Option"] = toDelegate(&Option); 484 rules["FootnoteReference"] = toDelegate(&FootnoteReference); 485 rules["FootnoteDefinition"] = toDelegate(&FootnoteDefinition); 486 rules["FootnoteName"] = toDelegate(&FootnoteName); 487 rules["RawHtml"] = toDelegate(&RawHtml); 488 rules["BlankLine"] = toDelegate(&BlankLine); 489 rules["Quoted"] = toDelegate(&Quoted); 490 rules["HtmlAttribute"] = toDelegate(&HtmlAttribute); 491 rules["HtmlComment"] = toDelegate(&HtmlComment); 492 rules["HtmlTag"] = toDelegate(&HtmlTag); 493 rules["Spacechar"] = toDelegate(&Spacechar); 494 rules["Nonspacechar"] = toDelegate(&Nonspacechar); 495 rules["Newline"] = toDelegate(&Newline); 496 rules["Sp"] = toDelegate(&Sp); 497 rules["Spnl"] = toDelegate(&Spnl); 498 rules["SpecialChar"] = toDelegate(&SpecialChar); 499 rules["NormalChar"] = toDelegate(&NormalChar); 500 rules["NonAlphanumeric"] = toDelegate(&NonAlphanumeric); 501 rules["Alphanumeric"] = toDelegate(&Alphanumeric); 502 rules["AlphanumericAscii"] = toDelegate(&AlphanumericAscii); 503 rules["Digit"] = toDelegate(&Digit); 504 rules["BOM"] = toDelegate(&BOM); 505 rules["HexEntity"] = toDelegate(&HexEntity); 506 rules["DecEntity"] = toDelegate(&DecEntity); 507 rules["CharEntity"] = toDelegate(&CharEntity); 508 rules["NonindentSpace"] = toDelegate(&NonindentSpace); 509 rules["Indent"] = toDelegate(&Indent); 510 rules["IndentedLine"] = toDelegate(&IndentedLine); 511 rules["OptionallyIndentedLine"] = toDelegate(&OptionallyIndentedLine); 512 rules["Line"] = toDelegate(&Line); 513 rules["SkipBlock"] = toDelegate(&SkipBlock); 514 rules["ExtendedSpecialChar"] = toDelegate(&ExtendedSpecialChar); 515 rules["Smart"] = toDelegate(&Smart); 516 rules["Apostrophe"] = toDelegate(&Apostrophe); 517 rules["Ellipsis"] = toDelegate(&Ellipsis); 518 rules["Dash"] = toDelegate(&Dash); 519 rules["EnDash"] = toDelegate(&EnDash); 520 rules["EmDash"] = toDelegate(&EmDash); 521 rules["SingleQuoteStart"] = toDelegate(&SingleQuoteStart); 522 rules["SingleQuoteEnd"] = toDelegate(&SingleQuoteEnd); 523 rules["SingleQuoted"] = toDelegate(&SingleQuoted); 524 rules["DoubleQuoteStart"] = toDelegate(&DoubleQuoteStart); 525 rules["DoubleQuoteEnd"] = toDelegate(&DoubleQuoteEnd); 526 rules["DoubleQuoted"] = toDelegate(&DoubleQuoted); 527 rules["NoteReference"] = toDelegate(&NoteReference); 528 rules["RawNoteReference"] = toDelegate(&RawNoteReference); 529 rules["Note"] = toDelegate(&Note); 530 rules["InlineNote"] = toDelegate(&InlineNote); 531 rules["Notes"] = toDelegate(&Notes); 532 rules["RawNoteBlock"] = toDelegate(&RawNoteBlock); 533 rules["Spacing"] = toDelegate(&Spacing); 534 } 535 536 template hooked(alias r, string name) 537 { 538 static ParseTree hooked(ParseTree p) 539 { 540 ParseTree result; 541 542 if (name in before) 543 { 544 result = before[name](p); 545 if (result.successful) 546 return result; 547 } 548 549 result = r(p); 550 if (result.successful || name !in after) 551 return result; 552 553 result = after[name](p); 554 return result; 555 } 556 557 static ParseTree hooked(string input) 558 { 559 return hooked!(r, name)(ParseTree("",false,[],input)); 560 } 561 } 562 563 static void addRuleBefore(string parentRule, string ruleSyntax) 564 { 565 // enum name is the current grammar name 566 DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); 567 foreach(ruleName,rule; dg.rules) 568 if (ruleName != "Spacing") // Keep the local Spacing rule, do not overwrite it 569 rules[ruleName] = rule; 570 before[parentRule] = rules[dg.startingRule]; 571 } 572 573 static void addRuleAfter(string parentRule, string ruleSyntax) 574 { 575 // enum name is the current grammar named 576 DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); 577 foreach(ruleName,rule; dg.rules) 578 { 579 if (ruleName != "Spacing") 580 rules[ruleName] = rule; 581 } 582 after[parentRule] = rules[dg.startingRule]; 583 } 584 585 static bool isRule(string s) 586 { 587 import std.algorithm : startsWith; 588 return s.startsWith("Markdown."); 589 } 590 mixin decimateTree; 591 592 alias spacing Spacing; 593 594 static TParseTree Doc(TParseTree p) 595 { 596 if(__ctfe) 597 { 598 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(BOM), pegged.peg.option!(TitleBlock), pegged.peg.zeroOrMore!(pegged.peg.propagate!(Block))), "Markdown.Doc")(p); 599 } 600 else 601 { 602 if (auto m = tuple(`Doc`, p.end) in memo) 603 return *m; 604 else 605 { 606 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(BOM), pegged.peg.option!(TitleBlock), pegged.peg.zeroOrMore!(pegged.peg.propagate!(Block))), "Markdown.Doc"), "Doc")(p); 607 memo[tuple(`Doc`, p.end)] = result; 608 return result; 609 } 610 } 611 } 612 613 static TParseTree Doc(string s) 614 { 615 if(__ctfe) 616 { 617 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(BOM), pegged.peg.option!(TitleBlock), pegged.peg.zeroOrMore!(pegged.peg.propagate!(Block))), "Markdown.Doc")(TParseTree("", false,[], s)); 618 } 619 else 620 { 621 forgetMemo(); 622 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(BOM), pegged.peg.option!(TitleBlock), pegged.peg.zeroOrMore!(pegged.peg.propagate!(Block))), "Markdown.Doc"), "Doc")(TParseTree("", false,[], s)); 623 } 624 } 625 static string Doc(GetName g) 626 { 627 return "Markdown.Doc"; 628 } 629 630 static TParseTree TitleBlock(TParseTree p) 631 { 632 if(__ctfe) 633 { 634 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("%")), TitleText, pegged.peg.discard!(pegged.peg.literal!("%")), Date, pegged.peg.discard!(pegged.peg.literal!("%")), Authors), "Markdown.TitleBlock")(p); 635 } 636 else 637 { 638 if (auto m = tuple(`TitleBlock`, p.end) in memo) 639 return *m; 640 else 641 { 642 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("%")), TitleText, pegged.peg.discard!(pegged.peg.literal!("%")), Date, pegged.peg.discard!(pegged.peg.literal!("%")), Authors), "Markdown.TitleBlock"), "TitleBlock")(p); 643 memo[tuple(`TitleBlock`, p.end)] = result; 644 return result; 645 } 646 } 647 } 648 649 static TParseTree TitleBlock(string s) 650 { 651 if(__ctfe) 652 { 653 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("%")), TitleText, pegged.peg.discard!(pegged.peg.literal!("%")), Date, pegged.peg.discard!(pegged.peg.literal!("%")), Authors), "Markdown.TitleBlock")(TParseTree("", false,[], s)); 654 } 655 else 656 { 657 forgetMemo(); 658 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("%")), TitleText, pegged.peg.discard!(pegged.peg.literal!("%")), Date, pegged.peg.discard!(pegged.peg.literal!("%")), Authors), "Markdown.TitleBlock"), "TitleBlock")(TParseTree("", false,[], s)); 659 } 660 } 661 static string TitleBlock(GetName g) 662 { 663 return "Markdown.TitleBlock"; 664 } 665 666 static TParseTree TitleText(TParseTree p) 667 { 668 if(__ctfe) 669 { 670 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.discard!(Spacechar), Line)))), "Markdown.TitleText")(p); 671 } 672 else 673 { 674 if (auto m = tuple(`TitleText`, p.end) in memo) 675 return *m; 676 else 677 { 678 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.discard!(Spacechar), Line)))), "Markdown.TitleText"), "TitleText")(p); 679 memo[tuple(`TitleText`, p.end)] = result; 680 return result; 681 } 682 } 683 } 684 685 static TParseTree TitleText(string s) 686 { 687 if(__ctfe) 688 { 689 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.discard!(Spacechar), Line)))), "Markdown.TitleText")(TParseTree("", false,[], s)); 690 } 691 else 692 { 693 forgetMemo(); 694 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.discard!(Spacechar), Line)))), "Markdown.TitleText"), "TitleText")(TParseTree("", false,[], s)); 695 } 696 } 697 static string TitleText(GetName g) 698 { 699 return "Markdown.TitleText"; 700 } 701 702 static TParseTree Date(TParseTree p) 703 { 704 if(__ctfe) 705 { 706 return pegged.peg.defined!(pegged.peg.drop!(Line), "Markdown.Date")(p); 707 } 708 else 709 { 710 if (auto m = tuple(`Date`, p.end) in memo) 711 return *m; 712 else 713 { 714 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.drop!(Line), "Markdown.Date"), "Date")(p); 715 memo[tuple(`Date`, p.end)] = result; 716 return result; 717 } 718 } 719 } 720 721 static TParseTree Date(string s) 722 { 723 if(__ctfe) 724 { 725 return pegged.peg.defined!(pegged.peg.drop!(Line), "Markdown.Date")(TParseTree("", false,[], s)); 726 } 727 else 728 { 729 forgetMemo(); 730 return hooked!(pegged.peg.defined!(pegged.peg.drop!(Line), "Markdown.Date"), "Date")(TParseTree("", false,[], s)); 731 } 732 } 733 static string Date(GetName g) 734 { 735 return "Markdown.Date"; 736 } 737 738 static TParseTree Authors(TParseTree p) 739 { 740 if(__ctfe) 741 { 742 return pegged.peg.defined!(pegged.peg.and!(Author, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar)))), pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar))), Author))), "Markdown.Authors")(p); 743 } 744 else 745 { 746 if (auto m = tuple(`Authors`, p.end) in memo) 747 return *m; 748 else 749 { 750 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Author, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar)))), pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar))), Author))), "Markdown.Authors"), "Authors")(p); 751 memo[tuple(`Authors`, p.end)] = result; 752 return result; 753 } 754 } 755 } 756 757 static TParseTree Authors(string s) 758 { 759 if(__ctfe) 760 { 761 return pegged.peg.defined!(pegged.peg.and!(Author, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar)))), pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar))), Author))), "Markdown.Authors")(TParseTree("", false,[], s)); 762 } 763 else 764 { 765 forgetMemo(); 766 return hooked!(pegged.peg.defined!(pegged.peg.and!(Author, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar)))), pegged.peg.and!(pegged.peg.discard!(Newline), pegged.peg.discard!(Spacechar))), Author))), "Markdown.Authors"), "Authors")(TParseTree("", false,[], s)); 767 } 768 } 769 static string Authors(GetName g) 770 { 771 return "Markdown.Authors"; 772 } 773 774 static TParseTree Author(TParseTree p) 775 { 776 if(__ctfe) 777 { 778 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(";")), pegged.peg.negLookahead!(Newline), pegged.peg.propagate!(Inlines))), "Markdown.Author")(p); 779 } 780 else 781 { 782 if (auto m = tuple(`Author`, p.end) in memo) 783 return *m; 784 else 785 { 786 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(";")), pegged.peg.negLookahead!(Newline), pegged.peg.propagate!(Inlines))), "Markdown.Author"), "Author")(p); 787 memo[tuple(`Author`, p.end)] = result; 788 return result; 789 } 790 } 791 } 792 793 static TParseTree Author(string s) 794 { 795 if(__ctfe) 796 { 797 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(";")), pegged.peg.negLookahead!(Newline), pegged.peg.propagate!(Inlines))), "Markdown.Author")(TParseTree("", false,[], s)); 798 } 799 else 800 { 801 forgetMemo(); 802 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(";")), pegged.peg.negLookahead!(Newline), pegged.peg.propagate!(Inlines))), "Markdown.Author"), "Author")(TParseTree("", false,[], s)); 803 } 804 } 805 static string Author(GetName g) 806 { 807 return "Markdown.Author"; 808 } 809 810 static TParseTree Block(TParseTree p) 811 { 812 if(__ctfe) 813 { 814 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.or!(BlockQuote, FootnoteDefinition, CodeBlock, Verbatim, Note, Reference, HorizontalRule, Heading, Table, DefinitionList, OrderedList, BulletList, HtmlBlock, StyleBlock, Para, pegged.peg.propagate!(Inlines))), "Markdown.Block")(p); 815 } 816 else 817 { 818 if (auto m = tuple(`Block`, p.end) in memo) 819 return *m; 820 else 821 { 822 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.or!(BlockQuote, FootnoteDefinition, CodeBlock, Verbatim, Note, Reference, HorizontalRule, Heading, Table, DefinitionList, OrderedList, BulletList, HtmlBlock, StyleBlock, Para, pegged.peg.propagate!(Inlines))), "Markdown.Block"), "Block")(p); 823 memo[tuple(`Block`, p.end)] = result; 824 return result; 825 } 826 } 827 } 828 829 static TParseTree Block(string s) 830 { 831 if(__ctfe) 832 { 833 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.or!(BlockQuote, FootnoteDefinition, CodeBlock, Verbatim, Note, Reference, HorizontalRule, Heading, Table, DefinitionList, OrderedList, BulletList, HtmlBlock, StyleBlock, Para, pegged.peg.propagate!(Inlines))), "Markdown.Block")(TParseTree("", false,[], s)); 834 } 835 else 836 { 837 forgetMemo(); 838 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.or!(BlockQuote, FootnoteDefinition, CodeBlock, Verbatim, Note, Reference, HorizontalRule, Heading, Table, DefinitionList, OrderedList, BulletList, HtmlBlock, StyleBlock, Para, pegged.peg.propagate!(Inlines))), "Markdown.Block"), "Block")(TParseTree("", false,[], s)); 839 } 840 } 841 static string Block(GetName g) 842 { 843 return "Markdown.Block"; 844 } 845 846 static TParseTree Para(TParseTree p) 847 { 848 if(__ctfe) 849 { 850 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), pegged.peg.propagate!(Inlines), pegged.peg.oneOrMore!(BlankLine)), "Markdown.Para")(p); 851 } 852 else 853 { 854 if (auto m = tuple(`Para`, p.end) in memo) 855 return *m; 856 else 857 { 858 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), pegged.peg.propagate!(Inlines), pegged.peg.oneOrMore!(BlankLine)), "Markdown.Para"), "Para")(p); 859 memo[tuple(`Para`, p.end)] = result; 860 return result; 861 } 862 } 863 } 864 865 static TParseTree Para(string s) 866 { 867 if(__ctfe) 868 { 869 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), pegged.peg.propagate!(Inlines), pegged.peg.oneOrMore!(BlankLine)), "Markdown.Para")(TParseTree("", false,[], s)); 870 } 871 else 872 { 873 forgetMemo(); 874 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), pegged.peg.propagate!(Inlines), pegged.peg.oneOrMore!(BlankLine)), "Markdown.Para"), "Para")(TParseTree("", false,[], s)); 875 } 876 } 877 static string Para(GetName g) 878 { 879 return "Markdown.Para"; 880 } 881 882 static TParseTree Heading(TParseTree p) 883 { 884 if(__ctfe) 885 { 886 return pegged.peg.defined!(pegged.peg.or!(SetextHeading, AtxHeading), "Markdown.Heading")(p); 887 } 888 else 889 { 890 if (auto m = tuple(`Heading`, p.end) in memo) 891 return *m; 892 else 893 { 894 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(SetextHeading, AtxHeading), "Markdown.Heading"), "Heading")(p); 895 memo[tuple(`Heading`, p.end)] = result; 896 return result; 897 } 898 } 899 } 900 901 static TParseTree Heading(string s) 902 { 903 if(__ctfe) 904 { 905 return pegged.peg.defined!(pegged.peg.or!(SetextHeading, AtxHeading), "Markdown.Heading")(TParseTree("", false,[], s)); 906 } 907 else 908 { 909 forgetMemo(); 910 return hooked!(pegged.peg.defined!(pegged.peg.or!(SetextHeading, AtxHeading), "Markdown.Heading"), "Heading")(TParseTree("", false,[], s)); 911 } 912 } 913 static string Heading(GetName g) 914 { 915 return "Markdown.Heading"; 916 } 917 918 static TParseTree SetextHeading(TParseTree p) 919 { 920 if(__ctfe) 921 { 922 return pegged.peg.defined!(pegged.peg.or!(SetextHeading1, SetextHeading2), "Markdown.SetextHeading")(p); 923 } 924 else 925 { 926 if (auto m = tuple(`SetextHeading`, p.end) in memo) 927 return *m; 928 else 929 { 930 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(SetextHeading1, SetextHeading2), "Markdown.SetextHeading"), "SetextHeading")(p); 931 memo[tuple(`SetextHeading`, p.end)] = result; 932 return result; 933 } 934 } 935 } 936 937 static TParseTree SetextHeading(string s) 938 { 939 if(__ctfe) 940 { 941 return pegged.peg.defined!(pegged.peg.or!(SetextHeading1, SetextHeading2), "Markdown.SetextHeading")(TParseTree("", false,[], s)); 942 } 943 else 944 { 945 forgetMemo(); 946 return hooked!(pegged.peg.defined!(pegged.peg.or!(SetextHeading1, SetextHeading2), "Markdown.SetextHeading"), "SetextHeading")(TParseTree("", false,[], s)); 947 } 948 } 949 static string SetextHeading(GetName g) 950 { 951 return "Markdown.SetextHeading"; 952 } 953 954 static TParseTree SetextHeading1(TParseTree p) 955 { 956 if(__ctfe) 957 { 958 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom1)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom1))), "Markdown.SetextHeading1")(p); 959 } 960 else 961 { 962 if (auto m = tuple(`SetextHeading1`, p.end) in memo) 963 return *m; 964 else 965 { 966 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom1)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom1))), "Markdown.SetextHeading1"), "SetextHeading1")(p); 967 memo[tuple(`SetextHeading1`, p.end)] = result; 968 return result; 969 } 970 } 971 } 972 973 static TParseTree SetextHeading1(string s) 974 { 975 if(__ctfe) 976 { 977 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom1)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom1))), "Markdown.SetextHeading1")(TParseTree("", false,[], s)); 978 } 979 else 980 { 981 forgetMemo(); 982 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom1)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom1))), "Markdown.SetextHeading1"), "SetextHeading1")(TParseTree("", false,[], s)); 983 } 984 } 985 static string SetextHeading1(GetName g) 986 { 987 return "Markdown.SetextHeading1"; 988 } 989 990 static TParseTree SetextHeading2(TParseTree p) 991 { 992 if(__ctfe) 993 { 994 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom2)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom2))), "Markdown.SetextHeading2")(p); 995 } 996 else 997 { 998 if (auto m = tuple(`SetextHeading2`, p.end) in memo) 999 return *m; 1000 else 1001 { 1002 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom2)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom2))), "Markdown.SetextHeading2"), "SetextHeading2")(p); 1003 memo[tuple(`SetextHeading2`, p.end)] = result; 1004 return result; 1005 } 1006 } 1007 } 1008 1009 static TParseTree SetextHeading2(string s) 1010 { 1011 if(__ctfe) 1012 { 1013 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom2)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom2))), "Markdown.SetextHeading2")(TParseTree("", false,[], s)); 1014 } 1015 else 1016 { 1017 forgetMemo(); 1018 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.posLookahead!(pegged.peg.and!(Line, SetextBottom2)), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), Inline)), pegged.peg.option!(Sp), pegged.peg.discard!(Newline), pegged.peg.discard!(SetextBottom2))), "Markdown.SetextHeading2"), "SetextHeading2")(TParseTree("", false,[], s)); 1019 } 1020 } 1021 static string SetextHeading2(GetName g) 1022 { 1023 return "Markdown.SetextHeading2"; 1024 } 1025 1026 static TParseTree SetextBottom1(TParseTree p) 1027 { 1028 if(__ctfe) 1029 { 1030 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("==="), pegged.peg.zeroOrMore!(pegged.peg.literal!("=")), Newline)), "Markdown.SetextBottom1")(p); 1031 } 1032 else 1033 { 1034 if (auto m = tuple(`SetextBottom1`, p.end) in memo) 1035 return *m; 1036 else 1037 { 1038 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("==="), pegged.peg.zeroOrMore!(pegged.peg.literal!("=")), Newline)), "Markdown.SetextBottom1"), "SetextBottom1")(p); 1039 memo[tuple(`SetextBottom1`, p.end)] = result; 1040 return result; 1041 } 1042 } 1043 } 1044 1045 static TParseTree SetextBottom1(string s) 1046 { 1047 if(__ctfe) 1048 { 1049 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("==="), pegged.peg.zeroOrMore!(pegged.peg.literal!("=")), Newline)), "Markdown.SetextBottom1")(TParseTree("", false,[], s)); 1050 } 1051 else 1052 { 1053 forgetMemo(); 1054 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("==="), pegged.peg.zeroOrMore!(pegged.peg.literal!("=")), Newline)), "Markdown.SetextBottom1"), "SetextBottom1")(TParseTree("", false,[], s)); 1055 } 1056 } 1057 static string SetextBottom1(GetName g) 1058 { 1059 return "Markdown.SetextBottom1"; 1060 } 1061 1062 static TParseTree SetextBottom2(TParseTree p) 1063 { 1064 if(__ctfe) 1065 { 1066 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")), Newline)), "Markdown.SetextBottom2")(p); 1067 } 1068 else 1069 { 1070 if (auto m = tuple(`SetextBottom2`, p.end) in memo) 1071 return *m; 1072 else 1073 { 1074 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")), Newline)), "Markdown.SetextBottom2"), "SetextBottom2")(p); 1075 memo[tuple(`SetextBottom2`, p.end)] = result; 1076 return result; 1077 } 1078 } 1079 } 1080 1081 static TParseTree SetextBottom2(string s) 1082 { 1083 if(__ctfe) 1084 { 1085 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")), Newline)), "Markdown.SetextBottom2")(TParseTree("", false,[], s)); 1086 } 1087 else 1088 { 1089 forgetMemo(); 1090 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")), Newline)), "Markdown.SetextBottom2"), "SetextBottom2")(TParseTree("", false,[], s)); 1091 } 1092 } 1093 static string SetextBottom2(GetName g) 1094 { 1095 return "Markdown.SetextBottom2"; 1096 } 1097 1098 static TParseTree AtxHeading(TParseTree p) 1099 { 1100 if(__ctfe) 1101 { 1102 return pegged.peg.defined!(pegged.peg.and!(AtxStart, pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.oneOrMore!(AtxInline), pegged.peg.option!(Sp), pegged.peg.option!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp)), Newline))), "Markdown.AtxHeading")(p); 1103 } 1104 else 1105 { 1106 if (auto m = tuple(`AtxHeading`, p.end) in memo) 1107 return *m; 1108 else 1109 { 1110 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(AtxStart, pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.oneOrMore!(AtxInline), pegged.peg.option!(Sp), pegged.peg.option!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp)), Newline))), "Markdown.AtxHeading"), "AtxHeading")(p); 1111 memo[tuple(`AtxHeading`, p.end)] = result; 1112 return result; 1113 } 1114 } 1115 } 1116 1117 static TParseTree AtxHeading(string s) 1118 { 1119 if(__ctfe) 1120 { 1121 return pegged.peg.defined!(pegged.peg.and!(AtxStart, pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.oneOrMore!(AtxInline), pegged.peg.option!(Sp), pegged.peg.option!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp)), Newline))), "Markdown.AtxHeading")(TParseTree("", false,[], s)); 1122 } 1123 else 1124 { 1125 forgetMemo(); 1126 return hooked!(pegged.peg.defined!(pegged.peg.and!(AtxStart, pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.oneOrMore!(AtxInline), pegged.peg.option!(Sp), pegged.peg.option!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp)), Newline))), "Markdown.AtxHeading"), "AtxHeading")(TParseTree("", false,[], s)); 1127 } 1128 } 1129 static string AtxHeading(GetName g) 1130 { 1131 return "Markdown.AtxHeading"; 1132 } 1133 1134 static TParseTree AtxInline(TParseTree p) 1135 { 1136 if(__ctfe) 1137 { 1138 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp, Newline)), Inline), "Markdown.AtxInline")(p); 1139 } 1140 else 1141 { 1142 if (auto m = tuple(`AtxInline`, p.end) in memo) 1143 return *m; 1144 else 1145 { 1146 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp, Newline)), Inline), "Markdown.AtxInline"), "AtxInline")(p); 1147 memo[tuple(`AtxInline`, p.end)] = result; 1148 return result; 1149 } 1150 } 1151 } 1152 1153 static TParseTree AtxInline(string s) 1154 { 1155 if(__ctfe) 1156 { 1157 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp, Newline)), Inline), "Markdown.AtxInline")(TParseTree("", false,[], s)); 1158 } 1159 else 1160 { 1161 forgetMemo(); 1162 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Sp), pegged.peg.zeroOrMore!(pegged.peg.literal!("#")), Sp, Newline)), Inline), "Markdown.AtxInline"), "AtxInline")(TParseTree("", false,[], s)); 1163 } 1164 } 1165 static string AtxInline(GetName g) 1166 { 1167 return "Markdown.AtxInline"; 1168 } 1169 1170 static TParseTree AtxStart(TParseTree p) 1171 { 1172 if(__ctfe) 1173 { 1174 return pegged.peg.defined!(pegged.peg.keywords!("######", "#####", "####", "###", "##", "#"), "Markdown.AtxStart")(p); 1175 } 1176 else 1177 { 1178 if (auto m = tuple(`AtxStart`, p.end) in memo) 1179 return *m; 1180 else 1181 { 1182 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!("######", "#####", "####", "###", "##", "#"), "Markdown.AtxStart"), "AtxStart")(p); 1183 memo[tuple(`AtxStart`, p.end)] = result; 1184 return result; 1185 } 1186 } 1187 } 1188 1189 static TParseTree AtxStart(string s) 1190 { 1191 if(__ctfe) 1192 { 1193 return pegged.peg.defined!(pegged.peg.keywords!("######", "#####", "####", "###", "##", "#"), "Markdown.AtxStart")(TParseTree("", false,[], s)); 1194 } 1195 else 1196 { 1197 forgetMemo(); 1198 return hooked!(pegged.peg.defined!(pegged.peg.keywords!("######", "#####", "####", "###", "##", "#"), "Markdown.AtxStart"), "AtxStart")(TParseTree("", false,[], s)); 1199 } 1200 } 1201 static string AtxStart(GetName g) 1202 { 1203 return "Markdown.AtxStart"; 1204 } 1205 1206 static TParseTree Table(TParseTree p) 1207 { 1208 if(__ctfe) 1209 { 1210 return pegged.peg.defined!(SimpleTable, "Markdown.Table")(p); 1211 } 1212 else 1213 { 1214 if (auto m = tuple(`Table`, p.end) in memo) 1215 return *m; 1216 else 1217 { 1218 TParseTree result = hooked!(pegged.peg.defined!(SimpleTable, "Markdown.Table"), "Table")(p); 1219 memo[tuple(`Table`, p.end)] = result; 1220 return result; 1221 } 1222 } 1223 } 1224 1225 static TParseTree Table(string s) 1226 { 1227 if(__ctfe) 1228 { 1229 return pegged.peg.defined!(SimpleTable, "Markdown.Table")(TParseTree("", false,[], s)); 1230 } 1231 else 1232 { 1233 forgetMemo(); 1234 return hooked!(pegged.peg.defined!(SimpleTable, "Markdown.Table"), "Table")(TParseTree("", false,[], s)); 1235 } 1236 } 1237 static string Table(GetName g) 1238 { 1239 return "Markdown.Table"; 1240 } 1241 1242 static TParseTree SimpleTable(TParseTree p) 1243 { 1244 if(__ctfe) 1245 { 1246 return pegged.peg.defined!(pegged.peg.and!(TableHeaders, pegged.peg.oneOrMore!(TableLine), pegged.peg.discard!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.option!(TableCaption)), "Markdown.SimpleTable")(p); 1247 } 1248 else 1249 { 1250 if (auto m = tuple(`SimpleTable`, p.end) in memo) 1251 return *m; 1252 else 1253 { 1254 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(TableHeaders, pegged.peg.oneOrMore!(TableLine), pegged.peg.discard!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.option!(TableCaption)), "Markdown.SimpleTable"), "SimpleTable")(p); 1255 memo[tuple(`SimpleTable`, p.end)] = result; 1256 return result; 1257 } 1258 } 1259 } 1260 1261 static TParseTree SimpleTable(string s) 1262 { 1263 if(__ctfe) 1264 { 1265 return pegged.peg.defined!(pegged.peg.and!(TableHeaders, pegged.peg.oneOrMore!(TableLine), pegged.peg.discard!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.option!(TableCaption)), "Markdown.SimpleTable")(TParseTree("", false,[], s)); 1266 } 1267 else 1268 { 1269 forgetMemo(); 1270 return hooked!(pegged.peg.defined!(pegged.peg.and!(TableHeaders, pegged.peg.oneOrMore!(TableLine), pegged.peg.discard!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.option!(TableCaption)), "Markdown.SimpleTable"), "SimpleTable")(TParseTree("", false,[], s)); 1271 } 1272 } 1273 static string SimpleTable(GetName g) 1274 { 1275 return "Markdown.SimpleTable"; 1276 } 1277 1278 static TParseTree TableHeaders(TParseTree p) 1279 { 1280 if(__ctfe) 1281 { 1282 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(pegged.peg.option!(Line)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))))), pegged.peg.discard!(Newline)), "Markdown.TableHeaders")(p); 1283 } 1284 else 1285 { 1286 if (auto m = tuple(`TableHeaders`, p.end) in memo) 1287 return *m; 1288 else 1289 { 1290 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(pegged.peg.option!(Line)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))))), pegged.peg.discard!(Newline)), "Markdown.TableHeaders"), "TableHeaders")(p); 1291 memo[tuple(`TableHeaders`, p.end)] = result; 1292 return result; 1293 } 1294 } 1295 } 1296 1297 static TParseTree TableHeaders(string s) 1298 { 1299 if(__ctfe) 1300 { 1301 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(pegged.peg.option!(Line)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))))), pegged.peg.discard!(Newline)), "Markdown.TableHeaders")(TParseTree("", false,[], s)); 1302 } 1303 else 1304 { 1305 forgetMemo(); 1306 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(pegged.peg.option!(Line)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.literal!("-"))))), pegged.peg.discard!(Newline)), "Markdown.TableHeaders"), "TableHeaders")(TParseTree("", false,[], s)); 1307 } 1308 } 1309 static string TableHeaders(GetName g) 1310 { 1311 return "Markdown.TableHeaders"; 1312 } 1313 1314 static TParseTree TableLine(TParseTree p) 1315 { 1316 if(__ctfe) 1317 { 1318 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.drop!(Line)), "Markdown.TableLine")(p); 1319 } 1320 else 1321 { 1322 if (auto m = tuple(`TableLine`, p.end) in memo) 1323 return *m; 1324 else 1325 { 1326 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.drop!(Line)), "Markdown.TableLine"), "TableLine")(p); 1327 memo[tuple(`TableLine`, p.end)] = result; 1328 return result; 1329 } 1330 } 1331 } 1332 1333 static TParseTree TableLine(string s) 1334 { 1335 if(__ctfe) 1336 { 1337 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.drop!(Line)), "Markdown.TableLine")(TParseTree("", false,[], s)); 1338 } 1339 else 1340 { 1341 forgetMemo(); 1342 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(BlankLine, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("-")), Newline, BlankLine))), pegged.peg.drop!(Line)), "Markdown.TableLine"), "TableLine")(TParseTree("", false,[], s)); 1343 } 1344 } 1345 static string TableLine(GetName g) 1346 { 1347 return "Markdown.TableLine"; 1348 } 1349 1350 static TParseTree TableCaption(TParseTree p) 1351 { 1352 if(__ctfe) 1353 { 1354 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("Table:")), pegged.peg.drop!(Line)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.drop!(Line))), "Markdown.TableCaption")(p); 1355 } 1356 else 1357 { 1358 if (auto m = tuple(`TableCaption`, p.end) in memo) 1359 return *m; 1360 else 1361 { 1362 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("Table:")), pegged.peg.drop!(Line)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.drop!(Line))), "Markdown.TableCaption"), "TableCaption")(p); 1363 memo[tuple(`TableCaption`, p.end)] = result; 1364 return result; 1365 } 1366 } 1367 } 1368 1369 static TParseTree TableCaption(string s) 1370 { 1371 if(__ctfe) 1372 { 1373 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("Table:")), pegged.peg.drop!(Line)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.drop!(Line))), "Markdown.TableCaption")(TParseTree("", false,[], s)); 1374 } 1375 else 1376 { 1377 forgetMemo(); 1378 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("Table:")), pegged.peg.drop!(Line)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.drop!(Line))), "Markdown.TableCaption"), "TableCaption")(TParseTree("", false,[], s)); 1379 } 1380 } 1381 static string TableCaption(GetName g) 1382 { 1383 return "Markdown.TableCaption"; 1384 } 1385 1386 static TParseTree BlockQuote(TParseTree p) 1387 { 1388 if(__ctfe) 1389 { 1390 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.literal!(">"), pegged.peg.option!(pegged.peg.literal!(" ")), Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine))), "Markdown.BlockQuote")(p); 1391 } 1392 else 1393 { 1394 if (auto m = tuple(`BlockQuote`, p.end) in memo) 1395 return *m; 1396 else 1397 { 1398 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.literal!(">"), pegged.peg.option!(pegged.peg.literal!(" ")), Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine))), "Markdown.BlockQuote"), "BlockQuote")(p); 1399 memo[tuple(`BlockQuote`, p.end)] = result; 1400 return result; 1401 } 1402 } 1403 } 1404 1405 static TParseTree BlockQuote(string s) 1406 { 1407 if(__ctfe) 1408 { 1409 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.literal!(">"), pegged.peg.option!(pegged.peg.literal!(" ")), Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine))), "Markdown.BlockQuote")(TParseTree("", false,[], s)); 1410 } 1411 else 1412 { 1413 forgetMemo(); 1414 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.literal!(">"), pegged.peg.option!(pegged.peg.literal!(" ")), Line, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine))), "Markdown.BlockQuote"), "BlockQuote")(TParseTree("", false,[], s)); 1415 } 1416 } 1417 static string BlockQuote(GetName g) 1418 { 1419 return "Markdown.BlockQuote"; 1420 } 1421 1422 static TParseTree NonblankIndentedLine(TParseTree p) 1423 { 1424 if(__ctfe) 1425 { 1426 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), IndentedLine)), "Markdown.NonblankIndentedLine")(p); 1427 } 1428 else 1429 { 1430 if (auto m = tuple(`NonblankIndentedLine`, p.end) in memo) 1431 return *m; 1432 else 1433 { 1434 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), IndentedLine)), "Markdown.NonblankIndentedLine"), "NonblankIndentedLine")(p); 1435 memo[tuple(`NonblankIndentedLine`, p.end)] = result; 1436 return result; 1437 } 1438 } 1439 } 1440 1441 static TParseTree NonblankIndentedLine(string s) 1442 { 1443 if(__ctfe) 1444 { 1445 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), IndentedLine)), "Markdown.NonblankIndentedLine")(TParseTree("", false,[], s)); 1446 } 1447 else 1448 { 1449 forgetMemo(); 1450 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), IndentedLine)), "Markdown.NonblankIndentedLine"), "NonblankIndentedLine")(TParseTree("", false,[], s)); 1451 } 1452 } 1453 static string NonblankIndentedLine(GetName g) 1454 { 1455 return "Markdown.NonblankIndentedLine"; 1456 } 1457 1458 static TParseTree VerbatimChunk(TParseTree p) 1459 { 1460 if(__ctfe) 1461 { 1462 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(NonblankIndentedLine)), "Markdown.VerbatimChunk")(p); 1463 } 1464 else 1465 { 1466 if (auto m = tuple(`VerbatimChunk`, p.end) in memo) 1467 return *m; 1468 else 1469 { 1470 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(NonblankIndentedLine)), "Markdown.VerbatimChunk"), "VerbatimChunk")(p); 1471 memo[tuple(`VerbatimChunk`, p.end)] = result; 1472 return result; 1473 } 1474 } 1475 } 1476 1477 static TParseTree VerbatimChunk(string s) 1478 { 1479 if(__ctfe) 1480 { 1481 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(NonblankIndentedLine)), "Markdown.VerbatimChunk")(TParseTree("", false,[], s)); 1482 } 1483 else 1484 { 1485 forgetMemo(); 1486 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(NonblankIndentedLine)), "Markdown.VerbatimChunk"), "VerbatimChunk")(TParseTree("", false,[], s)); 1487 } 1488 } 1489 static string VerbatimChunk(GetName g) 1490 { 1491 return "Markdown.VerbatimChunk"; 1492 } 1493 1494 static TParseTree Verbatim(TParseTree p) 1495 { 1496 if(__ctfe) 1497 { 1498 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(VerbatimChunk)), "Markdown.Verbatim")(p); 1499 } 1500 else 1501 { 1502 if (auto m = tuple(`Verbatim`, p.end) in memo) 1503 return *m; 1504 else 1505 { 1506 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(VerbatimChunk)), "Markdown.Verbatim"), "Verbatim")(p); 1507 memo[tuple(`Verbatim`, p.end)] = result; 1508 return result; 1509 } 1510 } 1511 } 1512 1513 static TParseTree Verbatim(string s) 1514 { 1515 if(__ctfe) 1516 { 1517 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(VerbatimChunk)), "Markdown.Verbatim")(TParseTree("", false,[], s)); 1518 } 1519 else 1520 { 1521 forgetMemo(); 1522 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(VerbatimChunk)), "Markdown.Verbatim"), "Verbatim")(TParseTree("", false,[], s)); 1523 } 1524 } 1525 static string Verbatim(GetName g) 1526 { 1527 return "Markdown.Verbatim"; 1528 } 1529 1530 static TParseTree HorizontalRule(TParseTree p) 1531 { 1532 if(__ctfe) 1533 { 1534 return pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("*")))), pegged.peg.and!(pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("-")))), pegged.peg.and!(pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("_"))))), Sp, Newline, pegged.peg.oneOrMore!(BlankLine)), "Markdown.HorizontalRule")(p); 1535 } 1536 else 1537 { 1538 if (auto m = tuple(`HorizontalRule`, p.end) in memo) 1539 return *m; 1540 else 1541 { 1542 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("*")))), pegged.peg.and!(pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("-")))), pegged.peg.and!(pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("_"))))), Sp, Newline, pegged.peg.oneOrMore!(BlankLine)), "Markdown.HorizontalRule"), "HorizontalRule")(p); 1543 memo[tuple(`HorizontalRule`, p.end)] = result; 1544 return result; 1545 } 1546 } 1547 } 1548 1549 static TParseTree HorizontalRule(string s) 1550 { 1551 if(__ctfe) 1552 { 1553 return pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("*")))), pegged.peg.and!(pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("-")))), pegged.peg.and!(pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("_"))))), Sp, Newline, pegged.peg.oneOrMore!(BlankLine)), "Markdown.HorizontalRule")(TParseTree("", false,[], s)); 1554 } 1555 else 1556 { 1557 forgetMemo(); 1558 return hooked!(pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), Sp, pegged.peg.literal!("*"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("*")))), pegged.peg.and!(pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), Sp, pegged.peg.literal!("-"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("-")))), pegged.peg.and!(pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), Sp, pegged.peg.literal!("_"), pegged.peg.zeroOrMore!(pegged.peg.and!(Sp, pegged.peg.literal!("_"))))), Sp, Newline, pegged.peg.oneOrMore!(BlankLine)), "Markdown.HorizontalRule"), "HorizontalRule")(TParseTree("", false,[], s)); 1559 } 1560 } 1561 static string HorizontalRule(GetName g) 1562 { 1563 return "Markdown.HorizontalRule"; 1564 } 1565 1566 static TParseTree BulletList(TParseTree p) 1567 { 1568 if(__ctfe) 1569 { 1570 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Bullet), pegged.peg.or!(pegged.peg.propagate!(BulletListTight), pegged.peg.propagate!(BulletListLoose))), "Markdown.BulletList")(p); 1571 } 1572 else 1573 { 1574 if (auto m = tuple(`BulletList`, p.end) in memo) 1575 return *m; 1576 else 1577 { 1578 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Bullet), pegged.peg.or!(pegged.peg.propagate!(BulletListTight), pegged.peg.propagate!(BulletListLoose))), "Markdown.BulletList"), "BulletList")(p); 1579 memo[tuple(`BulletList`, p.end)] = result; 1580 return result; 1581 } 1582 } 1583 } 1584 1585 static TParseTree BulletList(string s) 1586 { 1587 if(__ctfe) 1588 { 1589 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Bullet), pegged.peg.or!(pegged.peg.propagate!(BulletListTight), pegged.peg.propagate!(BulletListLoose))), "Markdown.BulletList")(TParseTree("", false,[], s)); 1590 } 1591 else 1592 { 1593 forgetMemo(); 1594 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Bullet), pegged.peg.or!(pegged.peg.propagate!(BulletListTight), pegged.peg.propagate!(BulletListLoose))), "Markdown.BulletList"), "BulletList")(TParseTree("", false,[], s)); 1595 } 1596 } 1597 static string BulletList(GetName g) 1598 { 1599 return "Markdown.BulletList"; 1600 } 1601 1602 static TParseTree BulletListTight(TParseTree p) 1603 { 1604 if(__ctfe) 1605 { 1606 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(BulletListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Bullet)), "Markdown.BulletListTight")(p); 1607 } 1608 else 1609 { 1610 if (auto m = tuple(`BulletListTight`, p.end) in memo) 1611 return *m; 1612 else 1613 { 1614 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(BulletListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Bullet)), "Markdown.BulletListTight"), "BulletListTight")(p); 1615 memo[tuple(`BulletListTight`, p.end)] = result; 1616 return result; 1617 } 1618 } 1619 } 1620 1621 static TParseTree BulletListTight(string s) 1622 { 1623 if(__ctfe) 1624 { 1625 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(BulletListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Bullet)), "Markdown.BulletListTight")(TParseTree("", false,[], s)); 1626 } 1627 else 1628 { 1629 forgetMemo(); 1630 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(BulletListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Bullet)), "Markdown.BulletListTight"), "BulletListTight")(TParseTree("", false,[], s)); 1631 } 1632 } 1633 static string BulletListTight(GetName g) 1634 { 1635 return "Markdown.BulletListTight"; 1636 } 1637 1638 static TParseTree BulletListItemTight(TParseTree p) 1639 { 1640 if(__ctfe) 1641 { 1642 return pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.BulletListItemTight")(p); 1643 } 1644 else 1645 { 1646 if (auto m = tuple(`BulletListItemTight`, p.end) in memo) 1647 return *m; 1648 else 1649 { 1650 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.BulletListItemTight"), "BulletListItemTight")(p); 1651 memo[tuple(`BulletListItemTight`, p.end)] = result; 1652 return result; 1653 } 1654 } 1655 } 1656 1657 static TParseTree BulletListItemTight(string s) 1658 { 1659 if(__ctfe) 1660 { 1661 return pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.BulletListItemTight")(TParseTree("", false,[], s)); 1662 } 1663 else 1664 { 1665 forgetMemo(); 1666 return hooked!(pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.BulletListItemTight"), "BulletListItemTight")(TParseTree("", false,[], s)); 1667 } 1668 } 1669 static string BulletListItemTight(GetName g) 1670 { 1671 return "Markdown.BulletListItemTight"; 1672 } 1673 1674 static TParseTree BulletListLoose(TParseTree p) 1675 { 1676 if(__ctfe) 1677 { 1678 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(BulletListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.BulletListLoose")(p); 1679 } 1680 else 1681 { 1682 if (auto m = tuple(`BulletListLoose`, p.end) in memo) 1683 return *m; 1684 else 1685 { 1686 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(BulletListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.BulletListLoose"), "BulletListLoose")(p); 1687 memo[tuple(`BulletListLoose`, p.end)] = result; 1688 return result; 1689 } 1690 } 1691 } 1692 1693 static TParseTree BulletListLoose(string s) 1694 { 1695 if(__ctfe) 1696 { 1697 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(BulletListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.BulletListLoose")(TParseTree("", false,[], s)); 1698 } 1699 else 1700 { 1701 forgetMemo(); 1702 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(BulletListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.BulletListLoose"), "BulletListLoose")(TParseTree("", false,[], s)); 1703 } 1704 } 1705 static string BulletListLoose(GetName g) 1706 { 1707 return "Markdown.BulletListLoose"; 1708 } 1709 1710 static TParseTree BulletListItem(TParseTree p) 1711 { 1712 if(__ctfe) 1713 { 1714 return pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.BulletListItem")(p); 1715 } 1716 else 1717 { 1718 if (auto m = tuple(`BulletListItem`, p.end) in memo) 1719 return *m; 1720 else 1721 { 1722 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.BulletListItem"), "BulletListItem")(p); 1723 memo[tuple(`BulletListItem`, p.end)] = result; 1724 return result; 1725 } 1726 } 1727 } 1728 1729 static TParseTree BulletListItem(string s) 1730 { 1731 if(__ctfe) 1732 { 1733 return pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.BulletListItem")(TParseTree("", false,[], s)); 1734 } 1735 else 1736 { 1737 forgetMemo(); 1738 return hooked!(pegged.peg.defined!(pegged.peg.and!(Bullet, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.BulletListItem"), "BulletListItem")(TParseTree("", false,[], s)); 1739 } 1740 } 1741 static string BulletListItem(GetName g) 1742 { 1743 return "Markdown.BulletListItem"; 1744 } 1745 1746 static TParseTree Bullet(TParseTree p) 1747 { 1748 if(__ctfe) 1749 { 1750 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.negLookahead!(HorizontalRule), NonindentSpace, pegged.peg.keywords!("+", "*", "-"), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Bullet")(p); 1751 } 1752 else 1753 { 1754 if (auto m = tuple(`Bullet`, p.end) in memo) 1755 return *m; 1756 else 1757 { 1758 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.negLookahead!(HorizontalRule), NonindentSpace, pegged.peg.keywords!("+", "*", "-"), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Bullet"), "Bullet")(p); 1759 memo[tuple(`Bullet`, p.end)] = result; 1760 return result; 1761 } 1762 } 1763 } 1764 1765 static TParseTree Bullet(string s) 1766 { 1767 if(__ctfe) 1768 { 1769 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.negLookahead!(HorizontalRule), NonindentSpace, pegged.peg.keywords!("+", "*", "-"), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Bullet")(TParseTree("", false,[], s)); 1770 } 1771 else 1772 { 1773 forgetMemo(); 1774 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(pegged.peg.negLookahead!(HorizontalRule), NonindentSpace, pegged.peg.keywords!("+", "*", "-"), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Bullet"), "Bullet")(TParseTree("", false,[], s)); 1775 } 1776 } 1777 static string Bullet(GetName g) 1778 { 1779 return "Markdown.Bullet"; 1780 } 1781 1782 static TParseTree OrderedList(TParseTree p) 1783 { 1784 if(__ctfe) 1785 { 1786 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Enumerator), pegged.peg.or!(OrderedListTight, OrderedListLoose)), "Markdown.OrderedList")(p); 1787 } 1788 else 1789 { 1790 if (auto m = tuple(`OrderedList`, p.end) in memo) 1791 return *m; 1792 else 1793 { 1794 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Enumerator), pegged.peg.or!(OrderedListTight, OrderedListLoose)), "Markdown.OrderedList"), "OrderedList")(p); 1795 memo[tuple(`OrderedList`, p.end)] = result; 1796 return result; 1797 } 1798 } 1799 } 1800 1801 static TParseTree OrderedList(string s) 1802 { 1803 if(__ctfe) 1804 { 1805 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Enumerator), pegged.peg.or!(OrderedListTight, OrderedListLoose)), "Markdown.OrderedList")(TParseTree("", false,[], s)); 1806 } 1807 else 1808 { 1809 forgetMemo(); 1810 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.posLookahead!(Enumerator), pegged.peg.or!(OrderedListTight, OrderedListLoose)), "Markdown.OrderedList"), "OrderedList")(TParseTree("", false,[], s)); 1811 } 1812 } 1813 static string OrderedList(GetName g) 1814 { 1815 return "Markdown.OrderedList"; 1816 } 1817 1818 static TParseTree OrderedListTight(TParseTree p) 1819 { 1820 if(__ctfe) 1821 { 1822 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(OrderedListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Enumerator)), "Markdown.OrderedListTight")(p); 1823 } 1824 else 1825 { 1826 if (auto m = tuple(`OrderedListTight`, p.end) in memo) 1827 return *m; 1828 else 1829 { 1830 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(OrderedListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Enumerator)), "Markdown.OrderedListTight"), "OrderedListTight")(p); 1831 memo[tuple(`OrderedListTight`, p.end)] = result; 1832 return result; 1833 } 1834 } 1835 } 1836 1837 static TParseTree OrderedListTight(string s) 1838 { 1839 if(__ctfe) 1840 { 1841 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(OrderedListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Enumerator)), "Markdown.OrderedListTight")(TParseTree("", false,[], s)); 1842 } 1843 else 1844 { 1845 forgetMemo(); 1846 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.propagate!(OrderedListItemTight)), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.negLookahead!(Enumerator)), "Markdown.OrderedListTight"), "OrderedListTight")(TParseTree("", false,[], s)); 1847 } 1848 } 1849 static string OrderedListTight(GetName g) 1850 { 1851 return "Markdown.OrderedListTight"; 1852 } 1853 1854 static TParseTree OrderedListItemTight(TParseTree p) 1855 { 1856 if(__ctfe) 1857 { 1858 return pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.OrderedListItemTight")(p); 1859 } 1860 else 1861 { 1862 if (auto m = tuple(`OrderedListItemTight`, p.end) in memo) 1863 return *m; 1864 else 1865 { 1866 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.OrderedListItemTight"), "OrderedListItemTight")(p); 1867 memo[tuple(`OrderedListItemTight`, p.end)] = result; 1868 return result; 1869 } 1870 } 1871 } 1872 1873 static TParseTree OrderedListItemTight(string s) 1874 { 1875 if(__ctfe) 1876 { 1877 return pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.OrderedListItemTight")(TParseTree("", false,[], s)); 1878 } 1879 else 1880 { 1881 forgetMemo(); 1882 return hooked!(pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), ListContinuationBlock))), "Markdown.OrderedListItemTight"), "OrderedListItemTight")(TParseTree("", false,[], s)); 1883 } 1884 } 1885 static string OrderedListItemTight(GetName g) 1886 { 1887 return "Markdown.OrderedListItemTight"; 1888 } 1889 1890 static TParseTree OrderedListLoose(TParseTree p) 1891 { 1892 if(__ctfe) 1893 { 1894 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(OrderedListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.OrderedListLoose")(p); 1895 } 1896 else 1897 { 1898 if (auto m = tuple(`OrderedListLoose`, p.end) in memo) 1899 return *m; 1900 else 1901 { 1902 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(OrderedListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.OrderedListLoose"), "OrderedListLoose")(p); 1903 memo[tuple(`OrderedListLoose`, p.end)] = result; 1904 return result; 1905 } 1906 } 1907 } 1908 1909 static TParseTree OrderedListLoose(string s) 1910 { 1911 if(__ctfe) 1912 { 1913 return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(OrderedListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.OrderedListLoose")(TParseTree("", false,[], s)); 1914 } 1915 else 1916 { 1917 forgetMemo(); 1918 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.propagate!(OrderedListItem), pegged.peg.discard!(pegged.peg.zeroOrMore!(BlankLine)))), "Markdown.OrderedListLoose"), "OrderedListLoose")(TParseTree("", false,[], s)); 1919 } 1920 } 1921 static string OrderedListLoose(GetName g) 1922 { 1923 return "Markdown.OrderedListLoose"; 1924 } 1925 1926 static TParseTree OrderedListItem(TParseTree p) 1927 { 1928 if(__ctfe) 1929 { 1930 return pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.OrderedListItem")(p); 1931 } 1932 else 1933 { 1934 if (auto m = tuple(`OrderedListItem`, p.end) in memo) 1935 return *m; 1936 else 1937 { 1938 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.OrderedListItem"), "OrderedListItem")(p); 1939 memo[tuple(`OrderedListItem`, p.end)] = result; 1940 return result; 1941 } 1942 } 1943 } 1944 1945 static TParseTree OrderedListItem(string s) 1946 { 1947 if(__ctfe) 1948 { 1949 return pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.OrderedListItem")(TParseTree("", false,[], s)); 1950 } 1951 else 1952 { 1953 forgetMemo(); 1954 return hooked!(pegged.peg.defined!(pegged.peg.and!(Enumerator, ListBlock, pegged.peg.zeroOrMore!(ListContinuationBlock)), "Markdown.OrderedListItem"), "OrderedListItem")(TParseTree("", false,[], s)); 1955 } 1956 } 1957 static string OrderedListItem(GetName g) 1958 { 1959 return "Markdown.OrderedListItem"; 1960 } 1961 1962 static TParseTree Enumerator(TParseTree p) 1963 { 1964 if(__ctfe) 1965 { 1966 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(NonindentSpace, pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), pegged.peg.literal!("."), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Enumerator")(p); 1967 } 1968 else 1969 { 1970 if (auto m = tuple(`Enumerator`, p.end) in memo) 1971 return *m; 1972 else 1973 { 1974 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(NonindentSpace, pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), pegged.peg.literal!("."), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Enumerator"), "Enumerator")(p); 1975 memo[tuple(`Enumerator`, p.end)] = result; 1976 return result; 1977 } 1978 } 1979 } 1980 1981 static TParseTree Enumerator(string s) 1982 { 1983 if(__ctfe) 1984 { 1985 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(NonindentSpace, pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), pegged.peg.literal!("."), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Enumerator")(TParseTree("", false,[], s)); 1986 } 1987 else 1988 { 1989 forgetMemo(); 1990 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.and!(NonindentSpace, pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), pegged.peg.literal!("."), pegged.peg.oneOrMore!(Spacechar))), "Markdown.Enumerator"), "Enumerator")(TParseTree("", false,[], s)); 1991 } 1992 } 1993 static string Enumerator(GetName g) 1994 { 1995 return "Markdown.Enumerator"; 1996 } 1997 1998 static TParseTree ListBlock(TParseTree p) 1999 { 2000 if(__ctfe) 2001 { 2002 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.propagate!(Inlines), pegged.peg.zeroOrMore!(ListBlockLine)), "Markdown.ListBlock")(p); 2003 } 2004 else 2005 { 2006 if (auto m = tuple(`ListBlock`, p.end) in memo) 2007 return *m; 2008 else 2009 { 2010 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.propagate!(Inlines), pegged.peg.zeroOrMore!(ListBlockLine)), "Markdown.ListBlock"), "ListBlock")(p); 2011 memo[tuple(`ListBlock`, p.end)] = result; 2012 return result; 2013 } 2014 } 2015 } 2016 2017 static TParseTree ListBlock(string s) 2018 { 2019 if(__ctfe) 2020 { 2021 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.propagate!(Inlines), pegged.peg.zeroOrMore!(ListBlockLine)), "Markdown.ListBlock")(TParseTree("", false,[], s)); 2022 } 2023 else 2024 { 2025 forgetMemo(); 2026 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.propagate!(Inlines), pegged.peg.zeroOrMore!(ListBlockLine)), "Markdown.ListBlock"), "ListBlock")(TParseTree("", false,[], s)); 2027 } 2028 } 2029 static string ListBlock(GetName g) 2030 { 2031 return "Markdown.ListBlock"; 2032 } 2033 2034 static TParseTree ListContinuationBlock(TParseTree p) 2035 { 2036 if(__ctfe) 2037 { 2038 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(pegged.peg.and!(Indent, ListBlock))), "Markdown.ListContinuationBlock")(p); 2039 } 2040 else 2041 { 2042 if (auto m = tuple(`ListContinuationBlock`, p.end) in memo) 2043 return *m; 2044 else 2045 { 2046 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(pegged.peg.and!(Indent, ListBlock))), "Markdown.ListContinuationBlock"), "ListContinuationBlock")(p); 2047 memo[tuple(`ListContinuationBlock`, p.end)] = result; 2048 return result; 2049 } 2050 } 2051 } 2052 2053 static TParseTree ListContinuationBlock(string s) 2054 { 2055 if(__ctfe) 2056 { 2057 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(pegged.peg.and!(Indent, ListBlock))), "Markdown.ListContinuationBlock")(TParseTree("", false,[], s)); 2058 } 2059 else 2060 { 2061 forgetMemo(); 2062 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.zeroOrMore!(BlankLine), pegged.peg.oneOrMore!(pegged.peg.and!(Indent, ListBlock))), "Markdown.ListContinuationBlock"), "ListContinuationBlock")(TParseTree("", false,[], s)); 2063 } 2064 } 2065 static string ListContinuationBlock(GetName g) 2066 { 2067 return "Markdown.ListContinuationBlock"; 2068 } 2069 2070 static TParseTree ListBlockLine(TParseTree p) 2071 { 2072 if(__ctfe) 2073 { 2074 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Indent), pegged.peg.or!(Bullet, Enumerator))), pegged.peg.negLookahead!(HorizontalRule), pegged.peg.option!(Indent), pegged.peg.propagate!(Inlines)), "Markdown.ListBlockLine")(p); 2075 } 2076 else 2077 { 2078 if (auto m = tuple(`ListBlockLine`, p.end) in memo) 2079 return *m; 2080 else 2081 { 2082 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Indent), pegged.peg.or!(Bullet, Enumerator))), pegged.peg.negLookahead!(HorizontalRule), pegged.peg.option!(Indent), pegged.peg.propagate!(Inlines)), "Markdown.ListBlockLine"), "ListBlockLine")(p); 2083 memo[tuple(`ListBlockLine`, p.end)] = result; 2084 return result; 2085 } 2086 } 2087 } 2088 2089 static TParseTree ListBlockLine(string s) 2090 { 2091 if(__ctfe) 2092 { 2093 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Indent), pegged.peg.or!(Bullet, Enumerator))), pegged.peg.negLookahead!(HorizontalRule), pegged.peg.option!(Indent), pegged.peg.propagate!(Inlines)), "Markdown.ListBlockLine")(TParseTree("", false,[], s)); 2094 } 2095 else 2096 { 2097 forgetMemo(); 2098 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.option!(Indent), pegged.peg.or!(Bullet, Enumerator))), pegged.peg.negLookahead!(HorizontalRule), pegged.peg.option!(Indent), pegged.peg.propagate!(Inlines)), "Markdown.ListBlockLine"), "ListBlockLine")(TParseTree("", false,[], s)); 2099 } 2100 } 2101 static string ListBlockLine(GetName g) 2102 { 2103 return "Markdown.ListBlockLine"; 2104 } 2105 2106 static TParseTree DefinitionList(TParseTree p) 2107 { 2108 if(__ctfe) 2109 { 2110 return pegged.peg.defined!(pegged.peg.and!(Term, pegged.peg.discard!(pegged.peg.option!(BlankLine)), pegged.peg.oneOrMore!(Definition)), "Markdown.DefinitionList")(p); 2111 } 2112 else 2113 { 2114 if (auto m = tuple(`DefinitionList`, p.end) in memo) 2115 return *m; 2116 else 2117 { 2118 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Term, pegged.peg.discard!(pegged.peg.option!(BlankLine)), pegged.peg.oneOrMore!(Definition)), "Markdown.DefinitionList"), "DefinitionList")(p); 2119 memo[tuple(`DefinitionList`, p.end)] = result; 2120 return result; 2121 } 2122 } 2123 } 2124 2125 static TParseTree DefinitionList(string s) 2126 { 2127 if(__ctfe) 2128 { 2129 return pegged.peg.defined!(pegged.peg.and!(Term, pegged.peg.discard!(pegged.peg.option!(BlankLine)), pegged.peg.oneOrMore!(Definition)), "Markdown.DefinitionList")(TParseTree("", false,[], s)); 2130 } 2131 else 2132 { 2133 forgetMemo(); 2134 return hooked!(pegged.peg.defined!(pegged.peg.and!(Term, pegged.peg.discard!(pegged.peg.option!(BlankLine)), pegged.peg.oneOrMore!(Definition)), "Markdown.DefinitionList"), "DefinitionList")(TParseTree("", false,[], s)); 2135 } 2136 } 2137 static string DefinitionList(GetName g) 2138 { 2139 return "Markdown.DefinitionList"; 2140 } 2141 2142 static TParseTree Term(TParseTree p) 2143 { 2144 if(__ctfe) 2145 { 2146 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), "Markdown.Term")(p); 2147 } 2148 else 2149 { 2150 if (auto m = tuple(`Term`, p.end) in memo) 2151 return *m; 2152 else 2153 { 2154 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), "Markdown.Term"), "Term")(p); 2155 memo[tuple(`Term`, p.end)] = result; 2156 return result; 2157 } 2158 } 2159 } 2160 2161 static TParseTree Term(string s) 2162 { 2163 if(__ctfe) 2164 { 2165 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), "Markdown.Term")(TParseTree("", false,[], s)); 2166 } 2167 else 2168 { 2169 forgetMemo(); 2170 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), "Markdown.Term"), "Term")(TParseTree("", false,[], s)); 2171 } 2172 } 2173 static string Term(GetName g) 2174 { 2175 return "Markdown.Term"; 2176 } 2177 2178 static TParseTree Definition(TParseTree p) 2179 { 2180 if(__ctfe) 2181 { 2182 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(Spacechar, Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar), pegged.peg.and!(Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar), pegged.peg.and!(pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar, Spacechar)), Inlines, pegged.peg.discard!(Newline), pegged.peg.zeroOrMore!(IndentedLine)), "Markdown.Definition")(p); 2183 } 2184 else 2185 { 2186 if (auto m = tuple(`Definition`, p.end) in memo) 2187 return *m; 2188 else 2189 { 2190 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(Spacechar, Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar), pegged.peg.and!(Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar), pegged.peg.and!(pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar, Spacechar)), Inlines, pegged.peg.discard!(Newline), pegged.peg.zeroOrMore!(IndentedLine)), "Markdown.Definition"), "Definition")(p); 2191 memo[tuple(`Definition`, p.end)] = result; 2192 return result; 2193 } 2194 } 2195 } 2196 2197 static TParseTree Definition(string s) 2198 { 2199 if(__ctfe) 2200 { 2201 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(Spacechar, Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar), pegged.peg.and!(Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar), pegged.peg.and!(pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar, Spacechar)), Inlines, pegged.peg.discard!(Newline), pegged.peg.zeroOrMore!(IndentedLine)), "Markdown.Definition")(TParseTree("", false,[], s)); 2202 } 2203 else 2204 { 2205 forgetMemo(); 2206 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.and!(Spacechar, Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar), pegged.peg.and!(Spacechar, pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar), pegged.peg.and!(pegged.peg.discard!(pegged.peg.keywords!(":", "~")), Spacechar, Spacechar, Spacechar, Spacechar)), Inlines, pegged.peg.discard!(Newline), pegged.peg.zeroOrMore!(IndentedLine)), "Markdown.Definition"), "Definition")(TParseTree("", false,[], s)); 2207 } 2208 } 2209 static string Definition(GetName g) 2210 { 2211 return "Markdown.Definition"; 2212 } 2213 2214 template HtmlBlockOpen(alias Type) 2215 { 2216 static TParseTree HtmlBlockOpen(TParseTree p) 2217 { 2218 if(__ctfe) 2219 { 2220 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), Type, pegged.peg.discard!(Spnl), pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")")(p); 2221 } 2222 else 2223 { 2224 if (auto m = tuple("HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")", p.end) in memo) 2225 return *m; 2226 else 2227 { 2228 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), Type, pegged.peg.discard!(Spnl), pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")"), "HtmlBlockOpen_1")(p); 2229 memo[tuple("HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")", p.end)] = result; 2230 return result; 2231 } 2232 } 2233 } 2234 2235 static TParseTree HtmlBlockOpen(string s) 2236 { 2237 if(__ctfe) 2238 { 2239 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), Type, pegged.peg.discard!(Spnl), pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")")(TParseTree("", false,[], s)); 2240 } 2241 else 2242 { 2243 forgetMemo(); 2244 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), Type, pegged.peg.discard!(Spnl), pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")"), "HtmlBlockOpen_1")(TParseTree("", false,[], s)); 2245 } 2246 } 2247 static string HtmlBlockOpen(GetName g) 2248 { 2249 return "Markdown.HtmlBlockOpen!(" ~ pegged.peg.getName!(Type) ~ ")"; 2250 } 2251 2252 } 2253 template HtmlBlockClose(alias Type) 2254 { 2255 static TParseTree HtmlBlockClose(TParseTree p) 2256 { 2257 if(__ctfe) 2258 { 2259 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!("/")), Type, pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")")(p); 2260 } 2261 else 2262 { 2263 if (auto m = tuple("HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")", p.end) in memo) 2264 return *m; 2265 else 2266 { 2267 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!("/")), Type, pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")"), "HtmlBlockClose_1")(p); 2268 memo[tuple("HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")", p.end)] = result; 2269 return result; 2270 } 2271 } 2272 } 2273 2274 static TParseTree HtmlBlockClose(string s) 2275 { 2276 if(__ctfe) 2277 { 2278 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!("/")), Type, pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")")(TParseTree("", false,[], s)); 2279 } 2280 else 2281 { 2282 forgetMemo(); 2283 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!("/")), Type, pegged.peg.discard!(Spnl), pegged.peg.discard!(pegged.peg.literal!(">")), pegged.peg.discard!(pegged.peg.zeroOrMore!(Spnl))), "Markdown.HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")"), "HtmlBlockClose_1")(TParseTree("", false,[], s)); 2284 } 2285 } 2286 static string HtmlBlockClose(GetName g) 2287 { 2288 return "Markdown.HtmlBlockClose!(" ~ pegged.peg.getName!(Type) ~ ")"; 2289 } 2290 2291 } 2292 template HtmlBlockT(alias Type) 2293 { 2294 static TParseTree HtmlBlockT(TParseTree p) 2295 { 2296 if(__ctfe) 2297 { 2298 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(HtmlBlockOpen!(Type)), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), NonHtml)), pegged.peg.drop!(HtmlBlockClose!(Type))), "Markdown.HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")")(p); 2299 } 2300 else 2301 { 2302 if (auto m = tuple("HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")", p.end) in memo) 2303 return *m; 2304 else 2305 { 2306 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(HtmlBlockOpen!(Type)), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), NonHtml)), pegged.peg.drop!(HtmlBlockClose!(Type))), "Markdown.HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")"), "HtmlBlockT_1")(p); 2307 memo[tuple("HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")", p.end)] = result; 2308 return result; 2309 } 2310 } 2311 } 2312 2313 static TParseTree HtmlBlockT(string s) 2314 { 2315 if(__ctfe) 2316 { 2317 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(HtmlBlockOpen!(Type)), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), NonHtml)), pegged.peg.drop!(HtmlBlockClose!(Type))), "Markdown.HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")")(TParseTree("", false,[], s)); 2318 } 2319 else 2320 { 2321 forgetMemo(); 2322 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.drop!(HtmlBlockOpen!(Type)), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), NonHtml)), pegged.peg.drop!(HtmlBlockClose!(Type))), "Markdown.HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")"), "HtmlBlockT_1")(TParseTree("", false,[], s)); 2323 } 2324 } 2325 static string HtmlBlockT(GetName g) 2326 { 2327 return "Markdown.HtmlBlockT!(" ~ pegged.peg.getName!(Type) ~ ")"; 2328 } 2329 2330 } 2331 static TParseTree NonHtml(TParseTree p) 2332 { 2333 if(__ctfe) 2334 { 2335 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"))), Inline)), "Markdown.NonHtml")(p); 2336 } 2337 else 2338 { 2339 if (auto m = tuple(`NonHtml`, p.end) in memo) 2340 return *m; 2341 else 2342 { 2343 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"))), Inline)), "Markdown.NonHtml"), "NonHtml")(p); 2344 memo[tuple(`NonHtml`, p.end)] = result; 2345 return result; 2346 } 2347 } 2348 } 2349 2350 static TParseTree NonHtml(string s) 2351 { 2352 if(__ctfe) 2353 { 2354 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"))), Inline)), "Markdown.NonHtml")(TParseTree("", false,[], s)); 2355 } 2356 else 2357 { 2358 forgetMemo(); 2359 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"))), Inline)), "Markdown.NonHtml"), "NonHtml")(TParseTree("", false,[], s)); 2360 } 2361 } 2362 static string NonHtml(GetName g) 2363 { 2364 return "Markdown.NonHtml"; 2365 } 2366 2367 static TParseTree HtmlBlockInTags(TParseTree p) 2368 { 2369 if(__ctfe) 2370 { 2371 return pegged.peg.defined!(pegged.peg.or!(HtmlBlockT!(pegged.peg.keywords!("address", "ADDRESS")), HtmlBlockT!(pegged.peg.keywords!("blockquote", "BLOCKQUOTE")), HtmlBlockT!(pegged.peg.keywords!("center", "CENTER")), HtmlBlockT!(pegged.peg.keywords!("dir", "DIR")), HtmlBlockT!(pegged.peg.keywords!("div", "DIV")), HtmlBlockT!(pegged.peg.keywords!("dl", "DL")), HtmlBlockT!(pegged.peg.keywords!("fieldset", "FIELDSET")), HtmlBlockT!(pegged.peg.keywords!("form", "FORM")), HtmlBlockT!(pegged.peg.keywords!("h1", "H1")), HtmlBlockT!(pegged.peg.keywords!("h2", "H2")), HtmlBlockT!(pegged.peg.keywords!("h3", "H3")), HtmlBlockT!(pegged.peg.keywords!("h4", "H4")), HtmlBlockT!(pegged.peg.keywords!("h5", "H5")), HtmlBlockT!(pegged.peg.keywords!("h6", "H6")), HtmlBlockT!(pegged.peg.keywords!("menu", "MENU")), HtmlBlockT!(pegged.peg.keywords!("noframes", "NOFRAMES")), HtmlBlockT!(pegged.peg.keywords!("noscript", "NOSCRIPT")), HtmlBlockT!(pegged.peg.keywords!("ol", "OL")), HtmlBlockT!(pegged.peg.keywords!("p", "P")), HtmlBlockT!(pegged.peg.keywords!("pre", "PRE")), HtmlBlockT!(pegged.peg.keywords!("table", "TABLE")), HtmlBlockT!(pegged.peg.keywords!("ul", "UL")), HtmlBlockT!(pegged.peg.keywords!("dd", "DD")), HtmlBlockT!(pegged.peg.keywords!("dt", "DT")), HtmlBlockT!(pegged.peg.keywords!("frameset", "FRAMESET")), HtmlBlockT!(pegged.peg.keywords!("li", "LI")), HtmlBlockT!(pegged.peg.keywords!("tbody", "TBODY")), HtmlBlockT!(pegged.peg.keywords!("td", "TD")), HtmlBlockT!(pegged.peg.keywords!("tfoot", "TFOOT")), HtmlBlockT!(pegged.peg.keywords!("th", "TH")), HtmlBlockT!(pegged.peg.keywords!("thead", "THEAD")), HtmlBlockT!(pegged.peg.keywords!("tr", "TR")), HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT"))), "Markdown.HtmlBlockInTags")(p); 2372 } 2373 else 2374 { 2375 if (auto m = tuple(`HtmlBlockInTags`, p.end) in memo) 2376 return *m; 2377 else 2378 { 2379 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(HtmlBlockT!(pegged.peg.keywords!("address", "ADDRESS")), HtmlBlockT!(pegged.peg.keywords!("blockquote", "BLOCKQUOTE")), HtmlBlockT!(pegged.peg.keywords!("center", "CENTER")), HtmlBlockT!(pegged.peg.keywords!("dir", "DIR")), HtmlBlockT!(pegged.peg.keywords!("div", "DIV")), HtmlBlockT!(pegged.peg.keywords!("dl", "DL")), HtmlBlockT!(pegged.peg.keywords!("fieldset", "FIELDSET")), HtmlBlockT!(pegged.peg.keywords!("form", "FORM")), HtmlBlockT!(pegged.peg.keywords!("h1", "H1")), HtmlBlockT!(pegged.peg.keywords!("h2", "H2")), HtmlBlockT!(pegged.peg.keywords!("h3", "H3")), HtmlBlockT!(pegged.peg.keywords!("h4", "H4")), HtmlBlockT!(pegged.peg.keywords!("h5", "H5")), HtmlBlockT!(pegged.peg.keywords!("h6", "H6")), HtmlBlockT!(pegged.peg.keywords!("menu", "MENU")), HtmlBlockT!(pegged.peg.keywords!("noframes", "NOFRAMES")), HtmlBlockT!(pegged.peg.keywords!("noscript", "NOSCRIPT")), HtmlBlockT!(pegged.peg.keywords!("ol", "OL")), HtmlBlockT!(pegged.peg.keywords!("p", "P")), HtmlBlockT!(pegged.peg.keywords!("pre", "PRE")), HtmlBlockT!(pegged.peg.keywords!("table", "TABLE")), HtmlBlockT!(pegged.peg.keywords!("ul", "UL")), HtmlBlockT!(pegged.peg.keywords!("dd", "DD")), HtmlBlockT!(pegged.peg.keywords!("dt", "DT")), HtmlBlockT!(pegged.peg.keywords!("frameset", "FRAMESET")), HtmlBlockT!(pegged.peg.keywords!("li", "LI")), HtmlBlockT!(pegged.peg.keywords!("tbody", "TBODY")), HtmlBlockT!(pegged.peg.keywords!("td", "TD")), HtmlBlockT!(pegged.peg.keywords!("tfoot", "TFOOT")), HtmlBlockT!(pegged.peg.keywords!("th", "TH")), HtmlBlockT!(pegged.peg.keywords!("thead", "THEAD")), HtmlBlockT!(pegged.peg.keywords!("tr", "TR")), HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT"))), "Markdown.HtmlBlockInTags"), "HtmlBlockInTags")(p); 2380 memo[tuple(`HtmlBlockInTags`, p.end)] = result; 2381 return result; 2382 } 2383 } 2384 } 2385 2386 static TParseTree HtmlBlockInTags(string s) 2387 { 2388 if(__ctfe) 2389 { 2390 return pegged.peg.defined!(pegged.peg.or!(HtmlBlockT!(pegged.peg.keywords!("address", "ADDRESS")), HtmlBlockT!(pegged.peg.keywords!("blockquote", "BLOCKQUOTE")), HtmlBlockT!(pegged.peg.keywords!("center", "CENTER")), HtmlBlockT!(pegged.peg.keywords!("dir", "DIR")), HtmlBlockT!(pegged.peg.keywords!("div", "DIV")), HtmlBlockT!(pegged.peg.keywords!("dl", "DL")), HtmlBlockT!(pegged.peg.keywords!("fieldset", "FIELDSET")), HtmlBlockT!(pegged.peg.keywords!("form", "FORM")), HtmlBlockT!(pegged.peg.keywords!("h1", "H1")), HtmlBlockT!(pegged.peg.keywords!("h2", "H2")), HtmlBlockT!(pegged.peg.keywords!("h3", "H3")), HtmlBlockT!(pegged.peg.keywords!("h4", "H4")), HtmlBlockT!(pegged.peg.keywords!("h5", "H5")), HtmlBlockT!(pegged.peg.keywords!("h6", "H6")), HtmlBlockT!(pegged.peg.keywords!("menu", "MENU")), HtmlBlockT!(pegged.peg.keywords!("noframes", "NOFRAMES")), HtmlBlockT!(pegged.peg.keywords!("noscript", "NOSCRIPT")), HtmlBlockT!(pegged.peg.keywords!("ol", "OL")), HtmlBlockT!(pegged.peg.keywords!("p", "P")), HtmlBlockT!(pegged.peg.keywords!("pre", "PRE")), HtmlBlockT!(pegged.peg.keywords!("table", "TABLE")), HtmlBlockT!(pegged.peg.keywords!("ul", "UL")), HtmlBlockT!(pegged.peg.keywords!("dd", "DD")), HtmlBlockT!(pegged.peg.keywords!("dt", "DT")), HtmlBlockT!(pegged.peg.keywords!("frameset", "FRAMESET")), HtmlBlockT!(pegged.peg.keywords!("li", "LI")), HtmlBlockT!(pegged.peg.keywords!("tbody", "TBODY")), HtmlBlockT!(pegged.peg.keywords!("td", "TD")), HtmlBlockT!(pegged.peg.keywords!("tfoot", "TFOOT")), HtmlBlockT!(pegged.peg.keywords!("th", "TH")), HtmlBlockT!(pegged.peg.keywords!("thead", "THEAD")), HtmlBlockT!(pegged.peg.keywords!("tr", "TR")), HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT"))), "Markdown.HtmlBlockInTags")(TParseTree("", false,[], s)); 2391 } 2392 else 2393 { 2394 forgetMemo(); 2395 return hooked!(pegged.peg.defined!(pegged.peg.or!(HtmlBlockT!(pegged.peg.keywords!("address", "ADDRESS")), HtmlBlockT!(pegged.peg.keywords!("blockquote", "BLOCKQUOTE")), HtmlBlockT!(pegged.peg.keywords!("center", "CENTER")), HtmlBlockT!(pegged.peg.keywords!("dir", "DIR")), HtmlBlockT!(pegged.peg.keywords!("div", "DIV")), HtmlBlockT!(pegged.peg.keywords!("dl", "DL")), HtmlBlockT!(pegged.peg.keywords!("fieldset", "FIELDSET")), HtmlBlockT!(pegged.peg.keywords!("form", "FORM")), HtmlBlockT!(pegged.peg.keywords!("h1", "H1")), HtmlBlockT!(pegged.peg.keywords!("h2", "H2")), HtmlBlockT!(pegged.peg.keywords!("h3", "H3")), HtmlBlockT!(pegged.peg.keywords!("h4", "H4")), HtmlBlockT!(pegged.peg.keywords!("h5", "H5")), HtmlBlockT!(pegged.peg.keywords!("h6", "H6")), HtmlBlockT!(pegged.peg.keywords!("menu", "MENU")), HtmlBlockT!(pegged.peg.keywords!("noframes", "NOFRAMES")), HtmlBlockT!(pegged.peg.keywords!("noscript", "NOSCRIPT")), HtmlBlockT!(pegged.peg.keywords!("ol", "OL")), HtmlBlockT!(pegged.peg.keywords!("p", "P")), HtmlBlockT!(pegged.peg.keywords!("pre", "PRE")), HtmlBlockT!(pegged.peg.keywords!("table", "TABLE")), HtmlBlockT!(pegged.peg.keywords!("ul", "UL")), HtmlBlockT!(pegged.peg.keywords!("dd", "DD")), HtmlBlockT!(pegged.peg.keywords!("dt", "DT")), HtmlBlockT!(pegged.peg.keywords!("frameset", "FRAMESET")), HtmlBlockT!(pegged.peg.keywords!("li", "LI")), HtmlBlockT!(pegged.peg.keywords!("tbody", "TBODY")), HtmlBlockT!(pegged.peg.keywords!("td", "TD")), HtmlBlockT!(pegged.peg.keywords!("tfoot", "TFOOT")), HtmlBlockT!(pegged.peg.keywords!("th", "TH")), HtmlBlockT!(pegged.peg.keywords!("thead", "THEAD")), HtmlBlockT!(pegged.peg.keywords!("tr", "TR")), HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT"))), "Markdown.HtmlBlockInTags"), "HtmlBlockInTags")(TParseTree("", false,[], s)); 2396 } 2397 } 2398 static string HtmlBlockInTags(GetName g) 2399 { 2400 return "Markdown.HtmlBlockInTags"; 2401 } 2402 2403 static TParseTree HtmlBlock(TParseTree p) 2404 { 2405 if(__ctfe) 2406 { 2407 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), HtmlComment, HtmlBlockSelfClosing), pegged.peg.oneOrMore!(BlankLine)), "Markdown.HtmlBlock")(p); 2408 } 2409 else 2410 { 2411 if (auto m = tuple(`HtmlBlock`, p.end) in memo) 2412 return *m; 2413 else 2414 { 2415 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), HtmlComment, HtmlBlockSelfClosing), pegged.peg.oneOrMore!(BlankLine)), "Markdown.HtmlBlock"), "HtmlBlock")(p); 2416 memo[tuple(`HtmlBlock`, p.end)] = result; 2417 return result; 2418 } 2419 } 2420 } 2421 2422 static TParseTree HtmlBlock(string s) 2423 { 2424 if(__ctfe) 2425 { 2426 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), HtmlComment, HtmlBlockSelfClosing), pegged.peg.oneOrMore!(BlankLine)), "Markdown.HtmlBlock")(TParseTree("", false,[], s)); 2427 } 2428 else 2429 { 2430 forgetMemo(); 2431 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.or!(pegged.peg.propagate!(HtmlBlockInTags), HtmlComment, HtmlBlockSelfClosing), pegged.peg.oneOrMore!(BlankLine)), "Markdown.HtmlBlock"), "HtmlBlock")(TParseTree("", false,[], s)); 2432 } 2433 } 2434 static string HtmlBlock(GetName g) 2435 { 2436 return "Markdown.HtmlBlock"; 2437 } 2438 2439 static TParseTree HtmlBlockSelfClosing(TParseTree p) 2440 { 2441 if(__ctfe) 2442 { 2443 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, HtmlBlockType, Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!("/"), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlBlockSelfClosing")(p); 2444 } 2445 else 2446 { 2447 if (auto m = tuple(`HtmlBlockSelfClosing`, p.end) in memo) 2448 return *m; 2449 else 2450 { 2451 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, HtmlBlockType, Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!("/"), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlBlockSelfClosing"), "HtmlBlockSelfClosing")(p); 2452 memo[tuple(`HtmlBlockSelfClosing`, p.end)] = result; 2453 return result; 2454 } 2455 } 2456 } 2457 2458 static TParseTree HtmlBlockSelfClosing(string s) 2459 { 2460 if(__ctfe) 2461 { 2462 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, HtmlBlockType, Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!("/"), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlBlockSelfClosing")(TParseTree("", false,[], s)); 2463 } 2464 else 2465 { 2466 forgetMemo(); 2467 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, HtmlBlockType, Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!("/"), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlBlockSelfClosing"), "HtmlBlockSelfClosing")(TParseTree("", false,[], s)); 2468 } 2469 } 2470 static string HtmlBlockSelfClosing(GetName g) 2471 { 2472 return "Markdown.HtmlBlockSelfClosing"; 2473 } 2474 2475 static TParseTree HtmlBlockType(TParseTree p) 2476 { 2477 if(__ctfe) 2478 { 2479 return pegged.peg.defined!(pegged.peg.keywords!("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul", "dd", "dt", "frameset", "li", "tbody", "td", "tfoot", "th", "thead", "tr", "script", "ADDRESS", "BLOCKQUOTE", "CENTER", "DIR", "DIV", "DL", "FIELDSET", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HR", "ISINDEX", "MENU", "NOFRAMES", "NOSCRIPT", "OL", "P", "PRE", "TABLE", "UL", "DD", "DT", "FRAMESET", "LI", "TBODY", "TD", "TFOOT", "TH", "THEAD", "TR", "SCRIPT"), "Markdown.HtmlBlockType")(p); 2480 } 2481 else 2482 { 2483 if (auto m = tuple(`HtmlBlockType`, p.end) in memo) 2484 return *m; 2485 else 2486 { 2487 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul", "dd", "dt", "frameset", "li", "tbody", "td", "tfoot", "th", "thead", "tr", "script", "ADDRESS", "BLOCKQUOTE", "CENTER", "DIR", "DIV", "DL", "FIELDSET", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HR", "ISINDEX", "MENU", "NOFRAMES", "NOSCRIPT", "OL", "P", "PRE", "TABLE", "UL", "DD", "DT", "FRAMESET", "LI", "TBODY", "TD", "TFOOT", "TH", "THEAD", "TR", "SCRIPT"), "Markdown.HtmlBlockType"), "HtmlBlockType")(p); 2488 memo[tuple(`HtmlBlockType`, p.end)] = result; 2489 return result; 2490 } 2491 } 2492 } 2493 2494 static TParseTree HtmlBlockType(string s) 2495 { 2496 if(__ctfe) 2497 { 2498 return pegged.peg.defined!(pegged.peg.keywords!("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul", "dd", "dt", "frameset", "li", "tbody", "td", "tfoot", "th", "thead", "tr", "script", "ADDRESS", "BLOCKQUOTE", "CENTER", "DIR", "DIV", "DL", "FIELDSET", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HR", "ISINDEX", "MENU", "NOFRAMES", "NOSCRIPT", "OL", "P", "PRE", "TABLE", "UL", "DD", "DT", "FRAMESET", "LI", "TBODY", "TD", "TFOOT", "TH", "THEAD", "TR", "SCRIPT"), "Markdown.HtmlBlockType")(TParseTree("", false,[], s)); 2499 } 2500 else 2501 { 2502 forgetMemo(); 2503 return hooked!(pegged.peg.defined!(pegged.peg.keywords!("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "isindex", "menu", "noframes", "noscript", "ol", "p", "pre", "table", "ul", "dd", "dt", "frameset", "li", "tbody", "td", "tfoot", "th", "thead", "tr", "script", "ADDRESS", "BLOCKQUOTE", "CENTER", "DIR", "DIV", "DL", "FIELDSET", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HR", "ISINDEX", "MENU", "NOFRAMES", "NOSCRIPT", "OL", "P", "PRE", "TABLE", "UL", "DD", "DT", "FRAMESET", "LI", "TBODY", "TD", "TFOOT", "TH", "THEAD", "TR", "SCRIPT"), "Markdown.HtmlBlockType"), "HtmlBlockType")(TParseTree("", false,[], s)); 2504 } 2505 } 2506 static string HtmlBlockType(GetName g) 2507 { 2508 return "Markdown.HtmlBlockType"; 2509 } 2510 2511 static TParseTree StyleOpen(TParseTree p) 2512 { 2513 if(__ctfe) 2514 { 2515 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!(">")), "Markdown.StyleOpen")(p); 2516 } 2517 else 2518 { 2519 if (auto m = tuple(`StyleOpen`, p.end) in memo) 2520 return *m; 2521 else 2522 { 2523 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!(">")), "Markdown.StyleOpen"), "StyleOpen")(p); 2524 memo[tuple(`StyleOpen`, p.end)] = result; 2525 return result; 2526 } 2527 } 2528 } 2529 2530 static TParseTree StyleOpen(string s) 2531 { 2532 if(__ctfe) 2533 { 2534 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!(">")), "Markdown.StyleOpen")(TParseTree("", false,[], s)); 2535 } 2536 else 2537 { 2538 forgetMemo(); 2539 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.literal!(">")), "Markdown.StyleOpen"), "StyleOpen")(TParseTree("", false,[], s)); 2540 } 2541 } 2542 static string StyleOpen(GetName g) 2543 { 2544 return "Markdown.StyleOpen"; 2545 } 2546 2547 static TParseTree StyleClose(TParseTree p) 2548 { 2549 if(__ctfe) 2550 { 2551 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"), pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.literal!(">")), "Markdown.StyleClose")(p); 2552 } 2553 else 2554 { 2555 if (auto m = tuple(`StyleClose`, p.end) in memo) 2556 return *m; 2557 else 2558 { 2559 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"), pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.literal!(">")), "Markdown.StyleClose"), "StyleClose")(p); 2560 memo[tuple(`StyleClose`, p.end)] = result; 2561 return result; 2562 } 2563 } 2564 } 2565 2566 static TParseTree StyleClose(string s) 2567 { 2568 if(__ctfe) 2569 { 2570 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"), pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.literal!(">")), "Markdown.StyleClose")(TParseTree("", false,[], s)); 2571 } 2572 else 2573 { 2574 forgetMemo(); 2575 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.literal!("/"), pegged.peg.keywords!("style", "STYLE"), Spnl, pegged.peg.literal!(">")), "Markdown.StyleClose"), "StyleClose")(TParseTree("", false,[], s)); 2576 } 2577 } 2578 static string StyleClose(GetName g) 2579 { 2580 return "Markdown.StyleClose"; 2581 } 2582 2583 static TParseTree InStyleTags(TParseTree p) 2584 { 2585 if(__ctfe) 2586 { 2587 return pegged.peg.defined!(pegged.peg.and!(StyleOpen, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(StyleClose), pegged.peg.any)), StyleClose), "Markdown.InStyleTags")(p); 2588 } 2589 else 2590 { 2591 if (auto m = tuple(`InStyleTags`, p.end) in memo) 2592 return *m; 2593 else 2594 { 2595 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(StyleOpen, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(StyleClose), pegged.peg.any)), StyleClose), "Markdown.InStyleTags"), "InStyleTags")(p); 2596 memo[tuple(`InStyleTags`, p.end)] = result; 2597 return result; 2598 } 2599 } 2600 } 2601 2602 static TParseTree InStyleTags(string s) 2603 { 2604 if(__ctfe) 2605 { 2606 return pegged.peg.defined!(pegged.peg.and!(StyleOpen, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(StyleClose), pegged.peg.any)), StyleClose), "Markdown.InStyleTags")(TParseTree("", false,[], s)); 2607 } 2608 else 2609 { 2610 forgetMemo(); 2611 return hooked!(pegged.peg.defined!(pegged.peg.and!(StyleOpen, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(StyleClose), pegged.peg.any)), StyleClose), "Markdown.InStyleTags"), "InStyleTags")(TParseTree("", false,[], s)); 2612 } 2613 } 2614 static string InStyleTags(GetName g) 2615 { 2616 return "Markdown.InStyleTags"; 2617 } 2618 2619 static TParseTree StyleBlock(TParseTree p) 2620 { 2621 if(__ctfe) 2622 { 2623 return pegged.peg.defined!(pegged.peg.and!(InStyleTags, pegged.peg.zeroOrMore!(BlankLine)), "Markdown.StyleBlock")(p); 2624 } 2625 else 2626 { 2627 if (auto m = tuple(`StyleBlock`, p.end) in memo) 2628 return *m; 2629 else 2630 { 2631 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(InStyleTags, pegged.peg.zeroOrMore!(BlankLine)), "Markdown.StyleBlock"), "StyleBlock")(p); 2632 memo[tuple(`StyleBlock`, p.end)] = result; 2633 return result; 2634 } 2635 } 2636 } 2637 2638 static TParseTree StyleBlock(string s) 2639 { 2640 if(__ctfe) 2641 { 2642 return pegged.peg.defined!(pegged.peg.and!(InStyleTags, pegged.peg.zeroOrMore!(BlankLine)), "Markdown.StyleBlock")(TParseTree("", false,[], s)); 2643 } 2644 else 2645 { 2646 forgetMemo(); 2647 return hooked!(pegged.peg.defined!(pegged.peg.and!(InStyleTags, pegged.peg.zeroOrMore!(BlankLine)), "Markdown.StyleBlock"), "StyleBlock")(TParseTree("", false,[], s)); 2648 } 2649 } 2650 static string StyleBlock(GetName g) 2651 { 2652 return "Markdown.StyleBlock"; 2653 } 2654 2655 static TParseTree Inlines(TParseTree p) 2656 { 2657 if(__ctfe) 2658 { 2659 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), pegged.peg.propagate!(Inline))), pegged.peg.option!(Endline)), "Markdown.Inlines")(p); 2660 } 2661 else 2662 { 2663 if (auto m = tuple(`Inlines`, p.end) in memo) 2664 return *m; 2665 else 2666 { 2667 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), pegged.peg.propagate!(Inline))), pegged.peg.option!(Endline)), "Markdown.Inlines"), "Inlines")(p); 2668 memo[tuple(`Inlines`, p.end)] = result; 2669 return result; 2670 } 2671 } 2672 } 2673 2674 static TParseTree Inlines(string s) 2675 { 2676 if(__ctfe) 2677 { 2678 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), pegged.peg.propagate!(Inline))), pegged.peg.option!(Endline)), "Markdown.Inlines")(TParseTree("", false,[], s)); 2679 } 2680 else 2681 { 2682 forgetMemo(); 2683 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Endline), pegged.peg.propagate!(Inline))), pegged.peg.option!(Endline)), "Markdown.Inlines"), "Inlines")(TParseTree("", false,[], s)); 2684 } 2685 } 2686 static string Inlines(GetName g) 2687 { 2688 return "Markdown.Inlines"; 2689 } 2690 2691 static TParseTree Inline(TParseTree p) 2692 { 2693 if(__ctfe) 2694 { 2695 return pegged.peg.defined!(pegged.peg.or!(Str, Endline, UlOrStarLine, Space, Strong, Emph, Strikeout, Superscript, Subscript, Math, FootnoteReference, Image, Link, NoteReference, InlineNote, Code, RawHtml, Entity, EscapedChar, Smart, Symbol), "Markdown.Inline")(p); 2696 } 2697 else 2698 { 2699 if (auto m = tuple(`Inline`, p.end) in memo) 2700 return *m; 2701 else 2702 { 2703 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(Str, Endline, UlOrStarLine, Space, Strong, Emph, Strikeout, Superscript, Subscript, Math, FootnoteReference, Image, Link, NoteReference, InlineNote, Code, RawHtml, Entity, EscapedChar, Smart, Symbol), "Markdown.Inline"), "Inline")(p); 2704 memo[tuple(`Inline`, p.end)] = result; 2705 return result; 2706 } 2707 } 2708 } 2709 2710 static TParseTree Inline(string s) 2711 { 2712 if(__ctfe) 2713 { 2714 return pegged.peg.defined!(pegged.peg.or!(Str, Endline, UlOrStarLine, Space, Strong, Emph, Strikeout, Superscript, Subscript, Math, FootnoteReference, Image, Link, NoteReference, InlineNote, Code, RawHtml, Entity, EscapedChar, Smart, Symbol), "Markdown.Inline")(TParseTree("", false,[], s)); 2715 } 2716 else 2717 { 2718 forgetMemo(); 2719 return hooked!(pegged.peg.defined!(pegged.peg.or!(Str, Endline, UlOrStarLine, Space, Strong, Emph, Strikeout, Superscript, Subscript, Math, FootnoteReference, Image, Link, NoteReference, InlineNote, Code, RawHtml, Entity, EscapedChar, Smart, Symbol), "Markdown.Inline"), "Inline")(TParseTree("", false,[], s)); 2720 } 2721 } 2722 static string Inline(GetName g) 2723 { 2724 return "Markdown.Inline"; 2725 } 2726 2727 static TParseTree Space(TParseTree p) 2728 { 2729 if(__ctfe) 2730 { 2731 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), "Markdown.Space")(p); 2732 } 2733 else 2734 { 2735 if (auto m = tuple(`Space`, p.end) in memo) 2736 return *m; 2737 else 2738 { 2739 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), "Markdown.Space"), "Space")(p); 2740 memo[tuple(`Space`, p.end)] = result; 2741 return result; 2742 } 2743 } 2744 } 2745 2746 static TParseTree Space(string s) 2747 { 2748 if(__ctfe) 2749 { 2750 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), "Markdown.Space")(TParseTree("", false,[], s)); 2751 } 2752 else 2753 { 2754 forgetMemo(); 2755 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(Spacechar)), "Markdown.Space"), "Space")(TParseTree("", false,[], s)); 2756 } 2757 } 2758 static string Space(GetName g) 2759 { 2760 return "Markdown.Space"; 2761 } 2762 2763 static TParseTree Str(TParseTree p) 2764 { 2765 if(__ctfe) 2766 { 2767 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(NormalChar), pegged.peg.zeroOrMore!(StrChunk))), "Markdown.Str")(p); 2768 } 2769 else 2770 { 2771 if (auto m = tuple(`Str`, p.end) in memo) 2772 return *m; 2773 else 2774 { 2775 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(NormalChar), pegged.peg.zeroOrMore!(StrChunk))), "Markdown.Str"), "Str")(p); 2776 memo[tuple(`Str`, p.end)] = result; 2777 return result; 2778 } 2779 } 2780 } 2781 2782 static TParseTree Str(string s) 2783 { 2784 if(__ctfe) 2785 { 2786 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(NormalChar), pegged.peg.zeroOrMore!(StrChunk))), "Markdown.Str")(TParseTree("", false,[], s)); 2787 } 2788 else 2789 { 2790 forgetMemo(); 2791 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(NormalChar), pegged.peg.zeroOrMore!(StrChunk))), "Markdown.Str"), "Str")(TParseTree("", false,[], s)); 2792 } 2793 } 2794 static string Str(GetName g) 2795 { 2796 return "Markdown.Str"; 2797 } 2798 2799 static TParseTree StrChunk(TParseTree p) 2800 { 2801 if(__ctfe) 2802 { 2803 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.or!(NormalChar, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Alphanumeric)))), AposChunk)), "Markdown.StrChunk")(p); 2804 } 2805 else 2806 { 2807 if (auto m = tuple(`StrChunk`, p.end) in memo) 2808 return *m; 2809 else 2810 { 2811 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.or!(NormalChar, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Alphanumeric)))), AposChunk)), "Markdown.StrChunk"), "StrChunk")(p); 2812 memo[tuple(`StrChunk`, p.end)] = result; 2813 return result; 2814 } 2815 } 2816 } 2817 2818 static TParseTree StrChunk(string s) 2819 { 2820 if(__ctfe) 2821 { 2822 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.or!(NormalChar, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Alphanumeric)))), AposChunk)), "Markdown.StrChunk")(TParseTree("", false,[], s)); 2823 } 2824 else 2825 { 2826 forgetMemo(); 2827 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.or!(NormalChar, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Alphanumeric)))), AposChunk)), "Markdown.StrChunk"), "StrChunk")(TParseTree("", false,[], s)); 2828 } 2829 } 2830 static string StrChunk(GetName g) 2831 { 2832 return "Markdown.StrChunk"; 2833 } 2834 2835 static TParseTree AposChunk(TParseTree p) 2836 { 2837 if(__ctfe) 2838 { 2839 return pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.posLookahead!(Alphanumeric)), "Markdown.AposChunk")(p); 2840 } 2841 else 2842 { 2843 if (auto m = tuple(`AposChunk`, p.end) in memo) 2844 return *m; 2845 else 2846 { 2847 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.posLookahead!(Alphanumeric)), "Markdown.AposChunk"), "AposChunk")(p); 2848 memo[tuple(`AposChunk`, p.end)] = result; 2849 return result; 2850 } 2851 } 2852 } 2853 2854 static TParseTree AposChunk(string s) 2855 { 2856 if(__ctfe) 2857 { 2858 return pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.posLookahead!(Alphanumeric)), "Markdown.AposChunk")(TParseTree("", false,[], s)); 2859 } 2860 else 2861 { 2862 forgetMemo(); 2863 return hooked!(pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.posLookahead!(Alphanumeric)), "Markdown.AposChunk"), "AposChunk")(TParseTree("", false,[], s)); 2864 } 2865 } 2866 static string AposChunk(GetName g) 2867 { 2868 return "Markdown.AposChunk"; 2869 } 2870 2871 static TParseTree EscapedChar(TParseTree p) 2872 { 2873 if(__ctfe) 2874 { 2875 return pegged.peg.defined!(pegged.peg.and!(backslash, pegged.peg.or!(backquote, backslash, pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("/"), pegged.peg.literal!("_"), pegged.peg.literal!("*"), pegged.peg.literal!("{"), pegged.peg.literal!("}"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("#"), pegged.peg.literal!("+"), pegged.peg.literal!("."), pegged.peg.literal!("!"), pegged.peg.literal!(">"), pegged.peg.literal!("<")))), "Markdown.EscapedChar")(p); 2876 } 2877 else 2878 { 2879 if (auto m = tuple(`EscapedChar`, p.end) in memo) 2880 return *m; 2881 else 2882 { 2883 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(backslash, pegged.peg.or!(backquote, backslash, pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("/"), pegged.peg.literal!("_"), pegged.peg.literal!("*"), pegged.peg.literal!("{"), pegged.peg.literal!("}"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("#"), pegged.peg.literal!("+"), pegged.peg.literal!("."), pegged.peg.literal!("!"), pegged.peg.literal!(">"), pegged.peg.literal!("<")))), "Markdown.EscapedChar"), "EscapedChar")(p); 2884 memo[tuple(`EscapedChar`, p.end)] = result; 2885 return result; 2886 } 2887 } 2888 } 2889 2890 static TParseTree EscapedChar(string s) 2891 { 2892 if(__ctfe) 2893 { 2894 return pegged.peg.defined!(pegged.peg.and!(backslash, pegged.peg.or!(backquote, backslash, pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("/"), pegged.peg.literal!("_"), pegged.peg.literal!("*"), pegged.peg.literal!("{"), pegged.peg.literal!("}"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("#"), pegged.peg.literal!("+"), pegged.peg.literal!("."), pegged.peg.literal!("!"), pegged.peg.literal!(">"), pegged.peg.literal!("<")))), "Markdown.EscapedChar")(TParseTree("", false,[], s)); 2895 } 2896 else 2897 { 2898 forgetMemo(); 2899 return hooked!(pegged.peg.defined!(pegged.peg.and!(backslash, pegged.peg.or!(backquote, backslash, pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("/"), pegged.peg.literal!("_"), pegged.peg.literal!("*"), pegged.peg.literal!("{"), pegged.peg.literal!("}"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("#"), pegged.peg.literal!("+"), pegged.peg.literal!("."), pegged.peg.literal!("!"), pegged.peg.literal!(">"), pegged.peg.literal!("<")))), "Markdown.EscapedChar"), "EscapedChar")(TParseTree("", false,[], s)); 2900 } 2901 } 2902 static string EscapedChar(GetName g) 2903 { 2904 return "Markdown.EscapedChar"; 2905 } 2906 2907 static TParseTree Entity(TParseTree p) 2908 { 2909 if(__ctfe) 2910 { 2911 return pegged.peg.defined!(pegged.peg.or!(HexEntity, DecEntity, CharEntity), "Markdown.Entity")(p); 2912 } 2913 else 2914 { 2915 if (auto m = tuple(`Entity`, p.end) in memo) 2916 return *m; 2917 else 2918 { 2919 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(HexEntity, DecEntity, CharEntity), "Markdown.Entity"), "Entity")(p); 2920 memo[tuple(`Entity`, p.end)] = result; 2921 return result; 2922 } 2923 } 2924 } 2925 2926 static TParseTree Entity(string s) 2927 { 2928 if(__ctfe) 2929 { 2930 return pegged.peg.defined!(pegged.peg.or!(HexEntity, DecEntity, CharEntity), "Markdown.Entity")(TParseTree("", false,[], s)); 2931 } 2932 else 2933 { 2934 forgetMemo(); 2935 return hooked!(pegged.peg.defined!(pegged.peg.or!(HexEntity, DecEntity, CharEntity), "Markdown.Entity"), "Entity")(TParseTree("", false,[], s)); 2936 } 2937 } 2938 static string Entity(GetName g) 2939 { 2940 return "Markdown.Entity"; 2941 } 2942 2943 static TParseTree Endline(TParseTree p) 2944 { 2945 if(__ctfe) 2946 { 2947 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(LineBreak, TerminalEndline, NormalEndline)), "Markdown.Endline")(p); 2948 } 2949 else 2950 { 2951 if (auto m = tuple(`Endline`, p.end) in memo) 2952 return *m; 2953 else 2954 { 2955 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(LineBreak, TerminalEndline, NormalEndline)), "Markdown.Endline"), "Endline")(p); 2956 memo[tuple(`Endline`, p.end)] = result; 2957 return result; 2958 } 2959 } 2960 } 2961 2962 static TParseTree Endline(string s) 2963 { 2964 if(__ctfe) 2965 { 2966 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(LineBreak, TerminalEndline, NormalEndline)), "Markdown.Endline")(TParseTree("", false,[], s)); 2967 } 2968 else 2969 { 2970 forgetMemo(); 2971 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(LineBreak, TerminalEndline, NormalEndline)), "Markdown.Endline"), "Endline")(TParseTree("", false,[], s)); 2972 } 2973 } 2974 static string Endline(GetName g) 2975 { 2976 return "Markdown.Endline"; 2977 } 2978 2979 static TParseTree NormalEndline(TParseTree p) 2980 { 2981 if(__ctfe) 2982 { 2983 return pegged.peg.defined!(pegged.peg.and!(Sp, Newline, pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(AtxStart), pegged.peg.negLookahead!(pegged.peg.and!(Line, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("<-<-<-"), pegged.peg.zeroOrMore!(pegged.peg.literal!("<-"))), pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")))), Newline))), "Markdown.NormalEndline")(p); 2984 } 2985 else 2986 { 2987 if (auto m = tuple(`NormalEndline`, p.end) in memo) 2988 return *m; 2989 else 2990 { 2991 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Sp, Newline, pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(AtxStart), pegged.peg.negLookahead!(pegged.peg.and!(Line, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("<-<-<-"), pegged.peg.zeroOrMore!(pegged.peg.literal!("<-"))), pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")))), Newline))), "Markdown.NormalEndline"), "NormalEndline")(p); 2992 memo[tuple(`NormalEndline`, p.end)] = result; 2993 return result; 2994 } 2995 } 2996 } 2997 2998 static TParseTree NormalEndline(string s) 2999 { 3000 if(__ctfe) 3001 { 3002 return pegged.peg.defined!(pegged.peg.and!(Sp, Newline, pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(AtxStart), pegged.peg.negLookahead!(pegged.peg.and!(Line, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("<-<-<-"), pegged.peg.zeroOrMore!(pegged.peg.literal!("<-"))), pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")))), Newline))), "Markdown.NormalEndline")(TParseTree("", false,[], s)); 3003 } 3004 else 3005 { 3006 forgetMemo(); 3007 return hooked!(pegged.peg.defined!(pegged.peg.and!(Sp, Newline, pegged.peg.negLookahead!(BlankLine), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.negLookahead!(AtxStart), pegged.peg.negLookahead!(pegged.peg.and!(Line, pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("<-<-<-"), pegged.peg.zeroOrMore!(pegged.peg.literal!("<-"))), pegged.peg.and!(pegged.peg.literal!("---"), pegged.peg.zeroOrMore!(pegged.peg.literal!("-")))), Newline))), "Markdown.NormalEndline"), "NormalEndline")(TParseTree("", false,[], s)); 3008 } 3009 } 3010 static string NormalEndline(GetName g) 3011 { 3012 return "Markdown.NormalEndline"; 3013 } 3014 3015 static TParseTree TerminalEndline(TParseTree p) 3016 { 3017 if(__ctfe) 3018 { 3019 return pegged.peg.defined!(pegged.peg.and!(Sp, Newline, eoi), "Markdown.TerminalEndline")(p); 3020 } 3021 else 3022 { 3023 if (auto m = tuple(`TerminalEndline`, p.end) in memo) 3024 return *m; 3025 else 3026 { 3027 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Sp, Newline, eoi), "Markdown.TerminalEndline"), "TerminalEndline")(p); 3028 memo[tuple(`TerminalEndline`, p.end)] = result; 3029 return result; 3030 } 3031 } 3032 } 3033 3034 static TParseTree TerminalEndline(string s) 3035 { 3036 if(__ctfe) 3037 { 3038 return pegged.peg.defined!(pegged.peg.and!(Sp, Newline, eoi), "Markdown.TerminalEndline")(TParseTree("", false,[], s)); 3039 } 3040 else 3041 { 3042 forgetMemo(); 3043 return hooked!(pegged.peg.defined!(pegged.peg.and!(Sp, Newline, eoi), "Markdown.TerminalEndline"), "TerminalEndline")(TParseTree("", false,[], s)); 3044 } 3045 } 3046 static string TerminalEndline(GetName g) 3047 { 3048 return "Markdown.TerminalEndline"; 3049 } 3050 3051 static TParseTree LineBreak(TParseTree p) 3052 { 3053 if(__ctfe) 3054 { 3055 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!(" "), NormalEndline)), "Markdown.LineBreak")(p); 3056 } 3057 else 3058 { 3059 if (auto m = tuple(`LineBreak`, p.end) in memo) 3060 return *m; 3061 else 3062 { 3063 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!(" "), NormalEndline)), "Markdown.LineBreak"), "LineBreak")(p); 3064 memo[tuple(`LineBreak`, p.end)] = result; 3065 return result; 3066 } 3067 } 3068 } 3069 3070 static TParseTree LineBreak(string s) 3071 { 3072 if(__ctfe) 3073 { 3074 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!(" "), NormalEndline)), "Markdown.LineBreak")(TParseTree("", false,[], s)); 3075 } 3076 else 3077 { 3078 forgetMemo(); 3079 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.literal!(" "), NormalEndline)), "Markdown.LineBreak"), "LineBreak")(TParseTree("", false,[], s)); 3080 } 3081 } 3082 static string LineBreak(GetName g) 3083 { 3084 return "Markdown.LineBreak"; 3085 } 3086 3087 static TParseTree Symbol(TParseTree p) 3088 { 3089 if(__ctfe) 3090 { 3091 return pegged.peg.defined!(pegged.peg.fuse!(SpecialChar), "Markdown.Symbol")(p); 3092 } 3093 else 3094 { 3095 if (auto m = tuple(`Symbol`, p.end) in memo) 3096 return *m; 3097 else 3098 { 3099 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(SpecialChar), "Markdown.Symbol"), "Symbol")(p); 3100 memo[tuple(`Symbol`, p.end)] = result; 3101 return result; 3102 } 3103 } 3104 } 3105 3106 static TParseTree Symbol(string s) 3107 { 3108 if(__ctfe) 3109 { 3110 return pegged.peg.defined!(pegged.peg.fuse!(SpecialChar), "Markdown.Symbol")(TParseTree("", false,[], s)); 3111 } 3112 else 3113 { 3114 forgetMemo(); 3115 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(SpecialChar), "Markdown.Symbol"), "Symbol")(TParseTree("", false,[], s)); 3116 } 3117 } 3118 static string Symbol(GetName g) 3119 { 3120 return "Markdown.Symbol"; 3121 } 3122 3123 static TParseTree UlOrStarLine(TParseTree p) 3124 { 3125 if(__ctfe) 3126 { 3127 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(UlLine, StarLine)), "Markdown.UlOrStarLine")(p); 3128 } 3129 else 3130 { 3131 if (auto m = tuple(`UlOrStarLine`, p.end) in memo) 3132 return *m; 3133 else 3134 { 3135 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(UlLine, StarLine)), "Markdown.UlOrStarLine"), "UlOrStarLine")(p); 3136 memo[tuple(`UlOrStarLine`, p.end)] = result; 3137 return result; 3138 } 3139 } 3140 } 3141 3142 static TParseTree UlOrStarLine(string s) 3143 { 3144 if(__ctfe) 3145 { 3146 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(UlLine, StarLine)), "Markdown.UlOrStarLine")(TParseTree("", false,[], s)); 3147 } 3148 else 3149 { 3150 forgetMemo(); 3151 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(UlLine, StarLine)), "Markdown.UlOrStarLine"), "UlOrStarLine")(TParseTree("", false,[], s)); 3152 } 3153 } 3154 static string UlOrStarLine(GetName g) 3155 { 3156 return "Markdown.UlOrStarLine"; 3157 } 3158 3159 static TParseTree StarLine(TParseTree p) 3160 { 3161 if(__ctfe) 3162 { 3163 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("****"), pegged.peg.zeroOrMore!(pegged.peg.literal!("*"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("*")), pegged.peg.posLookahead!(Spacechar))), "Markdown.StarLine")(p); 3164 } 3165 else 3166 { 3167 if (auto m = tuple(`StarLine`, p.end) in memo) 3168 return *m; 3169 else 3170 { 3171 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("****"), pegged.peg.zeroOrMore!(pegged.peg.literal!("*"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("*")), pegged.peg.posLookahead!(Spacechar))), "Markdown.StarLine"), "StarLine")(p); 3172 memo[tuple(`StarLine`, p.end)] = result; 3173 return result; 3174 } 3175 } 3176 } 3177 3178 static TParseTree StarLine(string s) 3179 { 3180 if(__ctfe) 3181 { 3182 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("****"), pegged.peg.zeroOrMore!(pegged.peg.literal!("*"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("*")), pegged.peg.posLookahead!(Spacechar))), "Markdown.StarLine")(TParseTree("", false,[], s)); 3183 } 3184 else 3185 { 3186 forgetMemo(); 3187 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("****"), pegged.peg.zeroOrMore!(pegged.peg.literal!("*"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("*")), pegged.peg.posLookahead!(Spacechar))), "Markdown.StarLine"), "StarLine")(TParseTree("", false,[], s)); 3188 } 3189 } 3190 static string StarLine(GetName g) 3191 { 3192 return "Markdown.StarLine"; 3193 } 3194 3195 static TParseTree UlLine(TParseTree p) 3196 { 3197 if(__ctfe) 3198 { 3199 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("____"), pegged.peg.zeroOrMore!(pegged.peg.literal!("_"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Spacechar))), "Markdown.UlLine")(p); 3200 } 3201 else 3202 { 3203 if (auto m = tuple(`UlLine`, p.end) in memo) 3204 return *m; 3205 else 3206 { 3207 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("____"), pegged.peg.zeroOrMore!(pegged.peg.literal!("_"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Spacechar))), "Markdown.UlLine"), "UlLine")(p); 3208 memo[tuple(`UlLine`, p.end)] = result; 3209 return result; 3210 } 3211 } 3212 } 3213 3214 static TParseTree UlLine(string s) 3215 { 3216 if(__ctfe) 3217 { 3218 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("____"), pegged.peg.zeroOrMore!(pegged.peg.literal!("_"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Spacechar))), "Markdown.UlLine")(TParseTree("", false,[], s)); 3219 } 3220 else 3221 { 3222 forgetMemo(); 3223 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("____"), pegged.peg.zeroOrMore!(pegged.peg.literal!("_"))), pegged.peg.and!(Spacechar, pegged.peg.oneOrMore!(pegged.peg.literal!("_")), pegged.peg.posLookahead!(Spacechar))), "Markdown.UlLine"), "UlLine")(TParseTree("", false,[], s)); 3224 } 3225 } 3226 static string UlLine(GetName g) 3227 { 3228 return "Markdown.UlLine"; 3229 } 3230 3231 static TParseTree Emph(TParseTree p) 3232 { 3233 if(__ctfe) 3234 { 3235 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(EmphStar, EmphUl)), "Markdown.Emph")(p); 3236 } 3237 else 3238 { 3239 if (auto m = tuple(`Emph`, p.end) in memo) 3240 return *m; 3241 else 3242 { 3243 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(EmphStar, EmphUl)), "Markdown.Emph"), "Emph")(p); 3244 memo[tuple(`Emph`, p.end)] = result; 3245 return result; 3246 } 3247 } 3248 } 3249 3250 static TParseTree Emph(string s) 3251 { 3252 if(__ctfe) 3253 { 3254 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(EmphStar, EmphUl)), "Markdown.Emph")(TParseTree("", false,[], s)); 3255 } 3256 else 3257 { 3258 forgetMemo(); 3259 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(EmphStar, EmphUl)), "Markdown.Emph"), "Emph")(TParseTree("", false,[], s)); 3260 } 3261 } 3262 static string Emph(GetName g) 3263 { 3264 return "Markdown.Emph"; 3265 } 3266 3267 static TParseTree OneStarOpen(TParseTree p) 3268 { 3269 if(__ctfe) 3270 { 3271 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("*"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneStarOpen")(p); 3272 } 3273 else 3274 { 3275 if (auto m = tuple(`OneStarOpen`, p.end) in memo) 3276 return *m; 3277 else 3278 { 3279 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("*"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneStarOpen"), "OneStarOpen")(p); 3280 memo[tuple(`OneStarOpen`, p.end)] = result; 3281 return result; 3282 } 3283 } 3284 } 3285 3286 static TParseTree OneStarOpen(string s) 3287 { 3288 if(__ctfe) 3289 { 3290 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("*"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneStarOpen")(TParseTree("", false,[], s)); 3291 } 3292 else 3293 { 3294 forgetMemo(); 3295 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("*"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneStarOpen"), "OneStarOpen")(TParseTree("", false,[], s)); 3296 } 3297 } 3298 static string OneStarOpen(GetName g) 3299 { 3300 return "Markdown.OneStarOpen"; 3301 } 3302 3303 static TParseTree OneStarClose(TParseTree p) 3304 { 3305 if(__ctfe) 3306 { 3307 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("*"))), "Markdown.OneStarClose")(p); 3308 } 3309 else 3310 { 3311 if (auto m = tuple(`OneStarClose`, p.end) in memo) 3312 return *m; 3313 else 3314 { 3315 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("*"))), "Markdown.OneStarClose"), "OneStarClose")(p); 3316 memo[tuple(`OneStarClose`, p.end)] = result; 3317 return result; 3318 } 3319 } 3320 } 3321 3322 static TParseTree OneStarClose(string s) 3323 { 3324 if(__ctfe) 3325 { 3326 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("*"))), "Markdown.OneStarClose")(TParseTree("", false,[], s)); 3327 } 3328 else 3329 { 3330 forgetMemo(); 3331 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("*"))), "Markdown.OneStarClose"), "OneStarClose")(TParseTree("", false,[], s)); 3332 } 3333 } 3334 static string OneStarClose(GetName g) 3335 { 3336 return "Markdown.OneStarClose"; 3337 } 3338 3339 static TParseTree EmphStar(TParseTree p) 3340 { 3341 if(__ctfe) 3342 { 3343 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneStarClose), Inline)), OneStarClose), "Markdown.EmphStar")(p); 3344 } 3345 else 3346 { 3347 if (auto m = tuple(`EmphStar`, p.end) in memo) 3348 return *m; 3349 else 3350 { 3351 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneStarClose), Inline)), OneStarClose), "Markdown.EmphStar"), "EmphStar")(p); 3352 memo[tuple(`EmphStar`, p.end)] = result; 3353 return result; 3354 } 3355 } 3356 } 3357 3358 static TParseTree EmphStar(string s) 3359 { 3360 if(__ctfe) 3361 { 3362 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneStarClose), Inline)), OneStarClose), "Markdown.EmphStar")(TParseTree("", false,[], s)); 3363 } 3364 else 3365 { 3366 forgetMemo(); 3367 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneStarClose), Inline)), OneStarClose), "Markdown.EmphStar"), "EmphStar")(TParseTree("", false,[], s)); 3368 } 3369 } 3370 static string EmphStar(GetName g) 3371 { 3372 return "Markdown.EmphStar"; 3373 } 3374 3375 static TParseTree OneUlOpen(TParseTree p) 3376 { 3377 if(__ctfe) 3378 { 3379 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("_"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneUlOpen")(p); 3380 } 3381 else 3382 { 3383 if (auto m = tuple(`OneUlOpen`, p.end) in memo) 3384 return *m; 3385 else 3386 { 3387 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("_"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneUlOpen"), "OneUlOpen")(p); 3388 memo[tuple(`OneUlOpen`, p.end)] = result; 3389 return result; 3390 } 3391 } 3392 } 3393 3394 static TParseTree OneUlOpen(string s) 3395 { 3396 if(__ctfe) 3397 { 3398 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("_"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneUlOpen")(TParseTree("", false,[], s)); 3399 } 3400 else 3401 { 3402 forgetMemo(); 3403 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("_"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.OneUlOpen"), "OneUlOpen")(TParseTree("", false,[], s)); 3404 } 3405 } 3406 static string OneUlOpen(GetName g) 3407 { 3408 return "Markdown.OneUlOpen"; 3409 } 3410 3411 static TParseTree OneUlClose(TParseTree p) 3412 { 3413 if(__ctfe) 3414 { 3415 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("_")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.OneUlClose")(p); 3416 } 3417 else 3418 { 3419 if (auto m = tuple(`OneUlClose`, p.end) in memo) 3420 return *m; 3421 else 3422 { 3423 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("_")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.OneUlClose"), "OneUlClose")(p); 3424 memo[tuple(`OneUlClose`, p.end)] = result; 3425 return result; 3426 } 3427 } 3428 } 3429 3430 static TParseTree OneUlClose(string s) 3431 { 3432 if(__ctfe) 3433 { 3434 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("_")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.OneUlClose")(TParseTree("", false,[], s)); 3435 } 3436 else 3437 { 3438 forgetMemo(); 3439 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("_")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.OneUlClose"), "OneUlClose")(TParseTree("", false,[], s)); 3440 } 3441 } 3442 static string OneUlClose(GetName g) 3443 { 3444 return "Markdown.OneUlClose"; 3445 } 3446 3447 static TParseTree EmphUl(TParseTree p) 3448 { 3449 if(__ctfe) 3450 { 3451 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneUlClose), Inline)), OneUlClose), "Markdown.EmphUl")(p); 3452 } 3453 else 3454 { 3455 if (auto m = tuple(`EmphUl`, p.end) in memo) 3456 return *m; 3457 else 3458 { 3459 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneUlClose), Inline)), OneUlClose), "Markdown.EmphUl"), "EmphUl")(p); 3460 memo[tuple(`EmphUl`, p.end)] = result; 3461 return result; 3462 } 3463 } 3464 } 3465 3466 static TParseTree EmphUl(string s) 3467 { 3468 if(__ctfe) 3469 { 3470 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneUlClose), Inline)), OneUlClose), "Markdown.EmphUl")(TParseTree("", false,[], s)); 3471 } 3472 else 3473 { 3474 forgetMemo(); 3475 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(OneUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(OneUlClose), Inline)), OneUlClose), "Markdown.EmphUl"), "EmphUl")(TParseTree("", false,[], s)); 3476 } 3477 } 3478 static string EmphUl(GetName g) 3479 { 3480 return "Markdown.EmphUl"; 3481 } 3482 3483 static TParseTree Strong(TParseTree p) 3484 { 3485 if(__ctfe) 3486 { 3487 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(StrongStar, StrongUl)), "Markdown.Strong")(p); 3488 } 3489 else 3490 { 3491 if (auto m = tuple(`Strong`, p.end) in memo) 3492 return *m; 3493 else 3494 { 3495 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(StrongStar, StrongUl)), "Markdown.Strong"), "Strong")(p); 3496 memo[tuple(`Strong`, p.end)] = result; 3497 return result; 3498 } 3499 } 3500 } 3501 3502 static TParseTree Strong(string s) 3503 { 3504 if(__ctfe) 3505 { 3506 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(StrongStar, StrongUl)), "Markdown.Strong")(TParseTree("", false,[], s)); 3507 } 3508 else 3509 { 3510 forgetMemo(); 3511 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(StrongStar, StrongUl)), "Markdown.Strong"), "Strong")(TParseTree("", false,[], s)); 3512 } 3513 } 3514 static string Strong(GetName g) 3515 { 3516 return "Markdown.Strong"; 3517 } 3518 3519 static TParseTree TwoStarOpen(TParseTree p) 3520 { 3521 if(__ctfe) 3522 { 3523 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("**"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoStarOpen")(p); 3524 } 3525 else 3526 { 3527 if (auto m = tuple(`TwoStarOpen`, p.end) in memo) 3528 return *m; 3529 else 3530 { 3531 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("**"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoStarOpen"), "TwoStarOpen")(p); 3532 memo[tuple(`TwoStarOpen`, p.end)] = result; 3533 return result; 3534 } 3535 } 3536 } 3537 3538 static TParseTree TwoStarOpen(string s) 3539 { 3540 if(__ctfe) 3541 { 3542 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("**"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoStarOpen")(TParseTree("", false,[], s)); 3543 } 3544 else 3545 { 3546 forgetMemo(); 3547 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(StarLine), pegged.peg.literal!("**"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoStarOpen"), "TwoStarOpen")(TParseTree("", false,[], s)); 3548 } 3549 } 3550 static string TwoStarOpen(GetName g) 3551 { 3552 return "Markdown.TwoStarOpen"; 3553 } 3554 3555 static TParseTree TwoStarClose(TParseTree p) 3556 { 3557 if(__ctfe) 3558 { 3559 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("**"))), "Markdown.TwoStarClose")(p); 3560 } 3561 else 3562 { 3563 if (auto m = tuple(`TwoStarClose`, p.end) in memo) 3564 return *m; 3565 else 3566 { 3567 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("**"))), "Markdown.TwoStarClose"), "TwoStarClose")(p); 3568 memo[tuple(`TwoStarClose`, p.end)] = result; 3569 return result; 3570 } 3571 } 3572 } 3573 3574 static TParseTree TwoStarClose(string s) 3575 { 3576 if(__ctfe) 3577 { 3578 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("**"))), "Markdown.TwoStarClose")(TParseTree("", false,[], s)); 3579 } 3580 else 3581 { 3582 forgetMemo(); 3583 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("**"))), "Markdown.TwoStarClose"), "TwoStarClose")(TParseTree("", false,[], s)); 3584 } 3585 } 3586 static string TwoStarClose(GetName g) 3587 { 3588 return "Markdown.TwoStarClose"; 3589 } 3590 3591 static TParseTree StrongStar(TParseTree p) 3592 { 3593 if(__ctfe) 3594 { 3595 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoStarClose), Inline)), TwoStarClose), "Markdown.StrongStar")(p); 3596 } 3597 else 3598 { 3599 if (auto m = tuple(`StrongStar`, p.end) in memo) 3600 return *m; 3601 else 3602 { 3603 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoStarClose), Inline)), TwoStarClose), "Markdown.StrongStar"), "StrongStar")(p); 3604 memo[tuple(`StrongStar`, p.end)] = result; 3605 return result; 3606 } 3607 } 3608 } 3609 3610 static TParseTree StrongStar(string s) 3611 { 3612 if(__ctfe) 3613 { 3614 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoStarClose), Inline)), TwoStarClose), "Markdown.StrongStar")(TParseTree("", false,[], s)); 3615 } 3616 else 3617 { 3618 forgetMemo(); 3619 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoStarOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoStarClose), Inline)), TwoStarClose), "Markdown.StrongStar"), "StrongStar")(TParseTree("", false,[], s)); 3620 } 3621 } 3622 static string StrongStar(GetName g) 3623 { 3624 return "Markdown.StrongStar"; 3625 } 3626 3627 static TParseTree TwoUlOpen(TParseTree p) 3628 { 3629 if(__ctfe) 3630 { 3631 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("__"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoUlOpen")(p); 3632 } 3633 else 3634 { 3635 if (auto m = tuple(`TwoUlOpen`, p.end) in memo) 3636 return *m; 3637 else 3638 { 3639 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("__"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoUlOpen"), "TwoUlOpen")(p); 3640 memo[tuple(`TwoUlOpen`, p.end)] = result; 3641 return result; 3642 } 3643 } 3644 } 3645 3646 static TParseTree TwoUlOpen(string s) 3647 { 3648 if(__ctfe) 3649 { 3650 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("__"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoUlOpen")(TParseTree("", false,[], s)); 3651 } 3652 else 3653 { 3654 forgetMemo(); 3655 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(UlLine), pegged.peg.literal!("__"), pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline)), "Markdown.TwoUlOpen"), "TwoUlOpen")(TParseTree("", false,[], s)); 3656 } 3657 } 3658 static string TwoUlOpen(GetName g) 3659 { 3660 return "Markdown.TwoUlOpen"; 3661 } 3662 3663 static TParseTree TwoUlClose(TParseTree p) 3664 { 3665 if(__ctfe) 3666 { 3667 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("__")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.TwoUlClose")(p); 3668 } 3669 else 3670 { 3671 if (auto m = tuple(`TwoUlClose`, p.end) in memo) 3672 return *m; 3673 else 3674 { 3675 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("__")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.TwoUlClose"), "TwoUlClose")(p); 3676 memo[tuple(`TwoUlClose`, p.end)] = result; 3677 return result; 3678 } 3679 } 3680 } 3681 3682 static TParseTree TwoUlClose(string s) 3683 { 3684 if(__ctfe) 3685 { 3686 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("__")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.TwoUlClose")(TParseTree("", false,[], s)); 3687 } 3688 else 3689 { 3690 forgetMemo(); 3691 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), Inline, pegged.peg.discard!(pegged.peg.literal!("__")), pegged.peg.negLookahead!(Alphanumeric)), "Markdown.TwoUlClose"), "TwoUlClose")(TParseTree("", false,[], s)); 3692 } 3693 } 3694 static string TwoUlClose(GetName g) 3695 { 3696 return "Markdown.TwoUlClose"; 3697 } 3698 3699 static TParseTree StrongUl(TParseTree p) 3700 { 3701 if(__ctfe) 3702 { 3703 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoUlClose), Inline)), pegged.peg.discard!(TwoUlClose)), "Markdown.StrongUl")(p); 3704 } 3705 else 3706 { 3707 if (auto m = tuple(`StrongUl`, p.end) in memo) 3708 return *m; 3709 else 3710 { 3711 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoUlClose), Inline)), pegged.peg.discard!(TwoUlClose)), "Markdown.StrongUl"), "StrongUl")(p); 3712 memo[tuple(`StrongUl`, p.end)] = result; 3713 return result; 3714 } 3715 } 3716 } 3717 3718 static TParseTree StrongUl(string s) 3719 { 3720 if(__ctfe) 3721 { 3722 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoUlClose), Inline)), pegged.peg.discard!(TwoUlClose)), "Markdown.StrongUl")(TParseTree("", false,[], s)); 3723 } 3724 else 3725 { 3726 forgetMemo(); 3727 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(TwoUlOpen), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(TwoUlClose), Inline)), pegged.peg.discard!(TwoUlClose)), "Markdown.StrongUl"), "StrongUl")(TParseTree("", false,[], s)); 3728 } 3729 } 3730 static string StrongUl(GetName g) 3731 { 3732 return "Markdown.StrongUl"; 3733 } 3734 3735 static TParseTree Strikeout(TParseTree p) 3736 { 3737 if(__ctfe) 3738 { 3739 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~~"))), "Markdown.Strikeout")(p); 3740 } 3741 else 3742 { 3743 if (auto m = tuple(`Strikeout`, p.end) in memo) 3744 return *m; 3745 else 3746 { 3747 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~~"))), "Markdown.Strikeout"), "Strikeout")(p); 3748 memo[tuple(`Strikeout`, p.end)] = result; 3749 return result; 3750 } 3751 } 3752 } 3753 3754 static TParseTree Strikeout(string s) 3755 { 3756 if(__ctfe) 3757 { 3758 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~~"))), "Markdown.Strikeout")(TParseTree("", false,[], s)); 3759 } 3760 else 3761 { 3762 forgetMemo(); 3763 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~~"))), "Markdown.Strikeout"), "Strikeout")(TParseTree("", false,[], s)); 3764 } 3765 } 3766 static string Strikeout(GetName g) 3767 { 3768 return "Markdown.Strikeout"; 3769 } 3770 3771 static TParseTree Superscript(TParseTree p) 3772 { 3773 if(__ctfe) 3774 { 3775 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^")), Inline, pegged.peg.discard!(pegged.peg.literal!("^"))), "Markdown.Superscript")(p); 3776 } 3777 else 3778 { 3779 if (auto m = tuple(`Superscript`, p.end) in memo) 3780 return *m; 3781 else 3782 { 3783 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^")), Inline, pegged.peg.discard!(pegged.peg.literal!("^"))), "Markdown.Superscript"), "Superscript")(p); 3784 memo[tuple(`Superscript`, p.end)] = result; 3785 return result; 3786 } 3787 } 3788 } 3789 3790 static TParseTree Superscript(string s) 3791 { 3792 if(__ctfe) 3793 { 3794 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^")), Inline, pegged.peg.discard!(pegged.peg.literal!("^"))), "Markdown.Superscript")(TParseTree("", false,[], s)); 3795 } 3796 else 3797 { 3798 forgetMemo(); 3799 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^")), Inline, pegged.peg.discard!(pegged.peg.literal!("^"))), "Markdown.Superscript"), "Superscript")(TParseTree("", false,[], s)); 3800 } 3801 } 3802 static string Superscript(GetName g) 3803 { 3804 return "Markdown.Superscript"; 3805 } 3806 3807 static TParseTree Subscript(TParseTree p) 3808 { 3809 if(__ctfe) 3810 { 3811 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~"))), "Markdown.Subscript")(p); 3812 } 3813 else 3814 { 3815 if (auto m = tuple(`Subscript`, p.end) in memo) 3816 return *m; 3817 else 3818 { 3819 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~"))), "Markdown.Subscript"), "Subscript")(p); 3820 memo[tuple(`Subscript`, p.end)] = result; 3821 return result; 3822 } 3823 } 3824 } 3825 3826 static TParseTree Subscript(string s) 3827 { 3828 if(__ctfe) 3829 { 3830 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~"))), "Markdown.Subscript")(TParseTree("", false,[], s)); 3831 } 3832 else 3833 { 3834 forgetMemo(); 3835 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("~")), Inline, pegged.peg.discard!(pegged.peg.literal!("~"))), "Markdown.Subscript"), "Subscript")(TParseTree("", false,[], s)); 3836 } 3837 } 3838 static string Subscript(GetName g) 3839 { 3840 return "Markdown.Subscript"; 3841 } 3842 3843 static TParseTree Math(TParseTree p) 3844 { 3845 if(__ctfe) 3846 { 3847 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("$")), pegged.peg.negLookahead!(Spacechar), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(Spacechar, pegged.peg.literal!("$"))), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("$"))), "Markdown.Math")(p); 3848 } 3849 else 3850 { 3851 if (auto m = tuple(`Math`, p.end) in memo) 3852 return *m; 3853 else 3854 { 3855 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("$")), pegged.peg.negLookahead!(Spacechar), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(Spacechar, pegged.peg.literal!("$"))), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("$"))), "Markdown.Math"), "Math")(p); 3856 memo[tuple(`Math`, p.end)] = result; 3857 return result; 3858 } 3859 } 3860 } 3861 3862 static TParseTree Math(string s) 3863 { 3864 if(__ctfe) 3865 { 3866 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("$")), pegged.peg.negLookahead!(Spacechar), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(Spacechar, pegged.peg.literal!("$"))), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("$"))), "Markdown.Math")(TParseTree("", false,[], s)); 3867 } 3868 else 3869 { 3870 forgetMemo(); 3871 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("$")), pegged.peg.negLookahead!(Spacechar), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(Spacechar, pegged.peg.literal!("$"))), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("$"))), "Markdown.Math"), "Math")(TParseTree("", false,[], s)); 3872 } 3873 } 3874 static string Math(GetName g) 3875 { 3876 return "Markdown.Math"; 3877 } 3878 3879 static TParseTree Image(TParseTree p) 3880 { 3881 if(__ctfe) 3882 { 3883 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("!"), pegged.peg.or!(ExplicitLink, ReferenceLink)), "Markdown.Image")(p); 3884 } 3885 else 3886 { 3887 if (auto m = tuple(`Image`, p.end) in memo) 3888 return *m; 3889 else 3890 { 3891 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("!"), pegged.peg.or!(ExplicitLink, ReferenceLink)), "Markdown.Image"), "Image")(p); 3892 memo[tuple(`Image`, p.end)] = result; 3893 return result; 3894 } 3895 } 3896 } 3897 3898 static TParseTree Image(string s) 3899 { 3900 if(__ctfe) 3901 { 3902 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("!"), pegged.peg.or!(ExplicitLink, ReferenceLink)), "Markdown.Image")(TParseTree("", false,[], s)); 3903 } 3904 else 3905 { 3906 forgetMemo(); 3907 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("!"), pegged.peg.or!(ExplicitLink, ReferenceLink)), "Markdown.Image"), "Image")(TParseTree("", false,[], s)); 3908 } 3909 } 3910 static string Image(GetName g) 3911 { 3912 return "Markdown.Image"; 3913 } 3914 3915 static TParseTree Link(TParseTree p) 3916 { 3917 if(__ctfe) 3918 { 3919 return pegged.peg.defined!(pegged.peg.or!(ExplicitLink, ReferenceLink, AutoLink), "Markdown.Link")(p); 3920 } 3921 else 3922 { 3923 if (auto m = tuple(`Link`, p.end) in memo) 3924 return *m; 3925 else 3926 { 3927 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(ExplicitLink, ReferenceLink, AutoLink), "Markdown.Link"), "Link")(p); 3928 memo[tuple(`Link`, p.end)] = result; 3929 return result; 3930 } 3931 } 3932 } 3933 3934 static TParseTree Link(string s) 3935 { 3936 if(__ctfe) 3937 { 3938 return pegged.peg.defined!(pegged.peg.or!(ExplicitLink, ReferenceLink, AutoLink), "Markdown.Link")(TParseTree("", false,[], s)); 3939 } 3940 else 3941 { 3942 forgetMemo(); 3943 return hooked!(pegged.peg.defined!(pegged.peg.or!(ExplicitLink, ReferenceLink, AutoLink), "Markdown.Link"), "Link")(TParseTree("", false,[], s)); 3944 } 3945 } 3946 static string Link(GetName g) 3947 { 3948 return "Markdown.Link"; 3949 } 3950 3951 static TParseTree ReferenceLink(TParseTree p) 3952 { 3953 if(__ctfe) 3954 { 3955 return pegged.peg.defined!(pegged.peg.or!(ReferenceLinkDouble, ReferenceLinkSingle), "Markdown.ReferenceLink")(p); 3956 } 3957 else 3958 { 3959 if (auto m = tuple(`ReferenceLink`, p.end) in memo) 3960 return *m; 3961 else 3962 { 3963 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(ReferenceLinkDouble, ReferenceLinkSingle), "Markdown.ReferenceLink"), "ReferenceLink")(p); 3964 memo[tuple(`ReferenceLink`, p.end)] = result; 3965 return result; 3966 } 3967 } 3968 } 3969 3970 static TParseTree ReferenceLink(string s) 3971 { 3972 if(__ctfe) 3973 { 3974 return pegged.peg.defined!(pegged.peg.or!(ReferenceLinkDouble, ReferenceLinkSingle), "Markdown.ReferenceLink")(TParseTree("", false,[], s)); 3975 } 3976 else 3977 { 3978 forgetMemo(); 3979 return hooked!(pegged.peg.defined!(pegged.peg.or!(ReferenceLinkDouble, ReferenceLinkSingle), "Markdown.ReferenceLink"), "ReferenceLink")(TParseTree("", false,[], s)); 3980 } 3981 } 3982 static string ReferenceLink(GetName g) 3983 { 3984 return "Markdown.ReferenceLink"; 3985 } 3986 3987 static TParseTree ReferenceLinkDouble(TParseTree p) 3988 { 3989 if(__ctfe) 3990 { 3991 return pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label), "Markdown.ReferenceLinkDouble")(p); 3992 } 3993 else 3994 { 3995 if (auto m = tuple(`ReferenceLinkDouble`, p.end) in memo) 3996 return *m; 3997 else 3998 { 3999 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label), "Markdown.ReferenceLinkDouble"), "ReferenceLinkDouble")(p); 4000 memo[tuple(`ReferenceLinkDouble`, p.end)] = result; 4001 return result; 4002 } 4003 } 4004 } 4005 4006 static TParseTree ReferenceLinkDouble(string s) 4007 { 4008 if(__ctfe) 4009 { 4010 return pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label), "Markdown.ReferenceLinkDouble")(TParseTree("", false,[], s)); 4011 } 4012 else 4013 { 4014 forgetMemo(); 4015 return hooked!(pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label), "Markdown.ReferenceLinkDouble"), "ReferenceLinkDouble")(TParseTree("", false,[], s)); 4016 } 4017 } 4018 static string ReferenceLinkDouble(GetName g) 4019 { 4020 return "Markdown.ReferenceLinkDouble"; 4021 } 4022 4023 static TParseTree ReferenceLinkSingle(TParseTree p) 4024 { 4025 if(__ctfe) 4026 { 4027 return pegged.peg.defined!(pegged.peg.and!(Label, pegged.peg.option!(pegged.peg.and!(Spnl, pegged.peg.literal!("[]")))), "Markdown.ReferenceLinkSingle")(p); 4028 } 4029 else 4030 { 4031 if (auto m = tuple(`ReferenceLinkSingle`, p.end) in memo) 4032 return *m; 4033 else 4034 { 4035 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Label, pegged.peg.option!(pegged.peg.and!(Spnl, pegged.peg.literal!("[]")))), "Markdown.ReferenceLinkSingle"), "ReferenceLinkSingle")(p); 4036 memo[tuple(`ReferenceLinkSingle`, p.end)] = result; 4037 return result; 4038 } 4039 } 4040 } 4041 4042 static TParseTree ReferenceLinkSingle(string s) 4043 { 4044 if(__ctfe) 4045 { 4046 return pegged.peg.defined!(pegged.peg.and!(Label, pegged.peg.option!(pegged.peg.and!(Spnl, pegged.peg.literal!("[]")))), "Markdown.ReferenceLinkSingle")(TParseTree("", false,[], s)); 4047 } 4048 else 4049 { 4050 forgetMemo(); 4051 return hooked!(pegged.peg.defined!(pegged.peg.and!(Label, pegged.peg.option!(pegged.peg.and!(Spnl, pegged.peg.literal!("[]")))), "Markdown.ReferenceLinkSingle"), "ReferenceLinkSingle")(TParseTree("", false,[], s)); 4052 } 4053 } 4054 static string ReferenceLinkSingle(GetName g) 4055 { 4056 return "Markdown.ReferenceLinkSingle"; 4057 } 4058 4059 static TParseTree ExplicitLink(TParseTree p) 4060 { 4061 if(__ctfe) 4062 { 4063 return pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.discard!(pegged.peg.literal!("(")), Sp, Source, Spnl, pegged.peg.option!(Title), Sp, pegged.peg.discard!(pegged.peg.literal!(")"))), "Markdown.ExplicitLink")(p); 4064 } 4065 else 4066 { 4067 if (auto m = tuple(`ExplicitLink`, p.end) in memo) 4068 return *m; 4069 else 4070 { 4071 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.discard!(pegged.peg.literal!("(")), Sp, Source, Spnl, pegged.peg.option!(Title), Sp, pegged.peg.discard!(pegged.peg.literal!(")"))), "Markdown.ExplicitLink"), "ExplicitLink")(p); 4072 memo[tuple(`ExplicitLink`, p.end)] = result; 4073 return result; 4074 } 4075 } 4076 } 4077 4078 static TParseTree ExplicitLink(string s) 4079 { 4080 if(__ctfe) 4081 { 4082 return pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.discard!(pegged.peg.literal!("(")), Sp, Source, Spnl, pegged.peg.option!(Title), Sp, pegged.peg.discard!(pegged.peg.literal!(")"))), "Markdown.ExplicitLink")(TParseTree("", false,[], s)); 4083 } 4084 else 4085 { 4086 forgetMemo(); 4087 return hooked!(pegged.peg.defined!(pegged.peg.and!(Label, Spnl, pegged.peg.discard!(pegged.peg.literal!("(")), Sp, Source, Spnl, pegged.peg.option!(Title), Sp, pegged.peg.discard!(pegged.peg.literal!(")"))), "Markdown.ExplicitLink"), "ExplicitLink")(TParseTree("", false,[], s)); 4088 } 4089 } 4090 static string ExplicitLink(GetName g) 4091 { 4092 return "Markdown.ExplicitLink"; 4093 } 4094 4095 static TParseTree Source(TParseTree p) 4096 { 4097 if(__ctfe) 4098 { 4099 return pegged.peg.defined!(pegged.peg.or!(HeaderIdentifier, pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(">"))), SourceContents), "Markdown.Source")(p); 4100 } 4101 else 4102 { 4103 if (auto m = tuple(`Source`, p.end) in memo) 4104 return *m; 4105 else 4106 { 4107 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(HeaderIdentifier, pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(">"))), SourceContents), "Markdown.Source"), "Source")(p); 4108 memo[tuple(`Source`, p.end)] = result; 4109 return result; 4110 } 4111 } 4112 } 4113 4114 static TParseTree Source(string s) 4115 { 4116 if(__ctfe) 4117 { 4118 return pegged.peg.defined!(pegged.peg.or!(HeaderIdentifier, pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(">"))), SourceContents), "Markdown.Source")(TParseTree("", false,[], s)); 4119 } 4120 else 4121 { 4122 forgetMemo(); 4123 return hooked!(pegged.peg.defined!(pegged.peg.or!(HeaderIdentifier, pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(">"))), SourceContents), "Markdown.Source"), "Source")(TParseTree("", false,[], s)); 4124 } 4125 } 4126 static string Source(GetName g) 4127 { 4128 return "Markdown.Source"; 4129 } 4130 4131 static TParseTree HeaderIdentifier(TParseTree p) 4132 { 4133 if(__ctfe) 4134 { 4135 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("#")), pegged.peg.charRange!('a', 'z'), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'))))), "Markdown.HeaderIdentifier")(p); 4136 } 4137 else 4138 { 4139 if (auto m = tuple(`HeaderIdentifier`, p.end) in memo) 4140 return *m; 4141 else 4142 { 4143 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("#")), pegged.peg.charRange!('a', 'z'), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'))))), "Markdown.HeaderIdentifier"), "HeaderIdentifier")(p); 4144 memo[tuple(`HeaderIdentifier`, p.end)] = result; 4145 return result; 4146 } 4147 } 4148 } 4149 4150 static TParseTree HeaderIdentifier(string s) 4151 { 4152 if(__ctfe) 4153 { 4154 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("#")), pegged.peg.charRange!('a', 'z'), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'))))), "Markdown.HeaderIdentifier")(TParseTree("", false,[], s)); 4155 } 4156 else 4157 { 4158 forgetMemo(); 4159 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("#")), pegged.peg.charRange!('a', 'z'), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'))))), "Markdown.HeaderIdentifier"), "HeaderIdentifier")(TParseTree("", false,[], s)); 4160 } 4161 } 4162 static string HeaderIdentifier(GetName g) 4163 { 4164 return "Markdown.HeaderIdentifier"; 4165 } 4166 4167 static TParseTree SourceContents(TParseTree p) 4168 { 4169 if(__ctfe) 4170 { 4171 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("(")), pegged.peg.negLookahead!(pegged.peg.literal!(")")), pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("(")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(")")))))), "Markdown.SourceContents")(p); 4172 } 4173 else 4174 { 4175 if (auto m = tuple(`SourceContents`, p.end) in memo) 4176 return *m; 4177 else 4178 { 4179 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("(")), pegged.peg.negLookahead!(pegged.peg.literal!(")")), pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("(")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(")")))))), "Markdown.SourceContents"), "SourceContents")(p); 4180 memo[tuple(`SourceContents`, p.end)] = result; 4181 return result; 4182 } 4183 } 4184 } 4185 4186 static TParseTree SourceContents(string s) 4187 { 4188 if(__ctfe) 4189 { 4190 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("(")), pegged.peg.negLookahead!(pegged.peg.literal!(")")), pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("(")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(")")))))), "Markdown.SourceContents")(TParseTree("", false,[], s)); 4191 } 4192 else 4193 { 4194 forgetMemo(); 4195 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("(")), pegged.peg.negLookahead!(pegged.peg.literal!(")")), pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar)), pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("(")), SourceContents, pegged.peg.discard!(pegged.peg.literal!(")")))))), "Markdown.SourceContents"), "SourceContents")(TParseTree("", false,[], s)); 4196 } 4197 } 4198 static string SourceContents(GetName g) 4199 { 4200 return "Markdown.SourceContents"; 4201 } 4202 4203 static TParseTree Title(TParseTree p) 4204 { 4205 if(__ctfe) 4206 { 4207 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(TitleSingle, TitleDouble)), "Markdown.Title")(p); 4208 } 4209 else 4210 { 4211 if (auto m = tuple(`Title`, p.end) in memo) 4212 return *m; 4213 else 4214 { 4215 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(TitleSingle, TitleDouble)), "Markdown.Title"), "Title")(p); 4216 memo[tuple(`Title`, p.end)] = result; 4217 return result; 4218 } 4219 } 4220 } 4221 4222 static TParseTree Title(string s) 4223 { 4224 if(__ctfe) 4225 { 4226 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(TitleSingle, TitleDouble)), "Markdown.Title")(TParseTree("", false,[], s)); 4227 } 4228 else 4229 { 4230 forgetMemo(); 4231 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(TitleSingle, TitleDouble)), "Markdown.Title"), "Title")(TParseTree("", false,[], s)); 4232 } 4233 } 4234 static string Title(GetName g) 4235 { 4236 return "Markdown.Title"; 4237 } 4238 4239 static TParseTree TitleSingle(TParseTree p) 4240 { 4241 if(__ctfe) 4242 { 4243 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(quote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(quote)), "Markdown.TitleSingle")(p); 4244 } 4245 else 4246 { 4247 if (auto m = tuple(`TitleSingle`, p.end) in memo) 4248 return *m; 4249 else 4250 { 4251 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(quote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(quote)), "Markdown.TitleSingle"), "TitleSingle")(p); 4252 memo[tuple(`TitleSingle`, p.end)] = result; 4253 return result; 4254 } 4255 } 4256 } 4257 4258 static TParseTree TitleSingle(string s) 4259 { 4260 if(__ctfe) 4261 { 4262 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(quote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(quote)), "Markdown.TitleSingle")(TParseTree("", false,[], s)); 4263 } 4264 else 4265 { 4266 forgetMemo(); 4267 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(quote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(quote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(quote)), "Markdown.TitleSingle"), "TitleSingle")(TParseTree("", false,[], s)); 4268 } 4269 } 4270 static string TitleSingle(GetName g) 4271 { 4272 return "Markdown.TitleSingle"; 4273 } 4274 4275 static TParseTree TitleDouble(TParseTree p) 4276 { 4277 if(__ctfe) 4278 { 4279 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(doublequote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(doublequote)), "Markdown.TitleDouble")(p); 4280 } 4281 else 4282 { 4283 if (auto m = tuple(`TitleDouble`, p.end) in memo) 4284 return *m; 4285 else 4286 { 4287 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(doublequote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(doublequote)), "Markdown.TitleDouble"), "TitleDouble")(p); 4288 memo[tuple(`TitleDouble`, p.end)] = result; 4289 return result; 4290 } 4291 } 4292 } 4293 4294 static TParseTree TitleDouble(string s) 4295 { 4296 if(__ctfe) 4297 { 4298 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(doublequote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(doublequote)), "Markdown.TitleDouble")(TParseTree("", false,[], s)); 4299 } 4300 else 4301 { 4302 forgetMemo(); 4303 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(doublequote), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.and!(doublequote, Sp, pegged.peg.or!(pegged.peg.literal!(")"), Newline))), pegged.peg.any)), pegged.peg.discard!(doublequote)), "Markdown.TitleDouble"), "TitleDouble")(TParseTree("", false,[], s)); 4304 } 4305 } 4306 static string TitleDouble(GetName g) 4307 { 4308 return "Markdown.TitleDouble"; 4309 } 4310 4311 static TParseTree AutoLink(TParseTree p) 4312 { 4313 if(__ctfe) 4314 { 4315 return pegged.peg.defined!(pegged.peg.or!(AutoLinkUrl, AutoLinkEmail), "Markdown.AutoLink")(p); 4316 } 4317 else 4318 { 4319 if (auto m = tuple(`AutoLink`, p.end) in memo) 4320 return *m; 4321 else 4322 { 4323 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(AutoLinkUrl, AutoLinkEmail), "Markdown.AutoLink"), "AutoLink")(p); 4324 memo[tuple(`AutoLink`, p.end)] = result; 4325 return result; 4326 } 4327 } 4328 } 4329 4330 static TParseTree AutoLink(string s) 4331 { 4332 if(__ctfe) 4333 { 4334 return pegged.peg.defined!(pegged.peg.or!(AutoLinkUrl, AutoLinkEmail), "Markdown.AutoLink")(TParseTree("", false,[], s)); 4335 } 4336 else 4337 { 4338 forgetMemo(); 4339 return hooked!(pegged.peg.defined!(pegged.peg.or!(AutoLinkUrl, AutoLinkEmail), "Markdown.AutoLink"), "AutoLink")(TParseTree("", false,[], s)); 4340 } 4341 } 4342 static string AutoLink(GetName g) 4343 { 4344 return "Markdown.AutoLink"; 4345 } 4346 4347 static TParseTree AutoLinkUrl(TParseTree p) 4348 { 4349 if(__ctfe) 4350 { 4351 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'))), pegged.peg.literal!("://"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkUrl")(p); 4352 } 4353 else 4354 { 4355 if (auto m = tuple(`AutoLinkUrl`, p.end) in memo) 4356 return *m; 4357 else 4358 { 4359 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'))), pegged.peg.literal!("://"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkUrl"), "AutoLinkUrl")(p); 4360 memo[tuple(`AutoLinkUrl`, p.end)] = result; 4361 return result; 4362 } 4363 } 4364 } 4365 4366 static TParseTree AutoLinkUrl(string s) 4367 { 4368 if(__ctfe) 4369 { 4370 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'))), pegged.peg.literal!("://"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkUrl")(TParseTree("", false,[], s)); 4371 } 4372 else 4373 { 4374 forgetMemo(); 4375 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'))), pegged.peg.literal!("://"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkUrl"), "AutoLinkUrl")(TParseTree("", false,[], s)); 4376 } 4377 } 4378 static string AutoLinkUrl(GetName g) 4379 { 4380 return "Markdown.AutoLinkUrl"; 4381 } 4382 4383 static TParseTree AutoLinkEmail(TParseTree p) 4384 { 4385 if(__ctfe) 4386 { 4387 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.option!(pegged.peg.literal!("mailto:")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("+"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.literal!("/"), pegged.peg.literal!("!"), pegged.peg.literal!("%"), pegged.peg.literal!("~"), pegged.peg.literal!("$"))), pegged.peg.literal!("@"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkEmail")(p); 4388 } 4389 else 4390 { 4391 if (auto m = tuple(`AutoLinkEmail`, p.end) in memo) 4392 return *m; 4393 else 4394 { 4395 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.option!(pegged.peg.literal!("mailto:")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("+"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.literal!("/"), pegged.peg.literal!("!"), pegged.peg.literal!("%"), pegged.peg.literal!("~"), pegged.peg.literal!("$"))), pegged.peg.literal!("@"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkEmail"), "AutoLinkEmail")(p); 4396 memo[tuple(`AutoLinkEmail`, p.end)] = result; 4397 return result; 4398 } 4399 } 4400 } 4401 4402 static TParseTree AutoLinkEmail(string s) 4403 { 4404 if(__ctfe) 4405 { 4406 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.option!(pegged.peg.literal!("mailto:")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("+"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.literal!("/"), pegged.peg.literal!("!"), pegged.peg.literal!("%"), pegged.peg.literal!("~"), pegged.peg.literal!("$"))), pegged.peg.literal!("@"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkEmail")(TParseTree("", false,[], s)); 4407 } 4408 else 4409 { 4410 forgetMemo(); 4411 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("<")), pegged.peg.option!(pegged.peg.literal!("mailto:")), pegged.peg.fuse!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("+"), pegged.peg.literal!("_"), pegged.peg.literal!("."), pegged.peg.literal!("/"), pegged.peg.literal!("!"), pegged.peg.literal!("%"), pegged.peg.literal!("~"), pegged.peg.literal!("$"))), pegged.peg.literal!("@"), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!(">")), pegged.peg.any)))), pegged.peg.discard!(pegged.peg.literal!(">"))), "Markdown.AutoLinkEmail"), "AutoLinkEmail")(TParseTree("", false,[], s)); 4412 } 4413 } 4414 static string AutoLinkEmail(GetName g) 4415 { 4416 return "Markdown.AutoLinkEmail"; 4417 } 4418 4419 static TParseTree Reference(TParseTree p) 4420 { 4421 if(__ctfe) 4422 { 4423 return pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label, pegged.peg.literal!(":"), Spnl, RefSrc, RefTitle, pegged.peg.oneOrMore!(BlankLine)), "Markdown.Reference")(p); 4424 } 4425 else 4426 { 4427 if (auto m = tuple(`Reference`, p.end) in memo) 4428 return *m; 4429 else 4430 { 4431 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label, pegged.peg.literal!(":"), Spnl, RefSrc, RefTitle, pegged.peg.oneOrMore!(BlankLine)), "Markdown.Reference"), "Reference")(p); 4432 memo[tuple(`Reference`, p.end)] = result; 4433 return result; 4434 } 4435 } 4436 } 4437 4438 static TParseTree Reference(string s) 4439 { 4440 if(__ctfe) 4441 { 4442 return pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label, pegged.peg.literal!(":"), Spnl, RefSrc, RefTitle, pegged.peg.oneOrMore!(BlankLine)), "Markdown.Reference")(TParseTree("", false,[], s)); 4443 } 4444 else 4445 { 4446 forgetMemo(); 4447 return hooked!(pegged.peg.defined!(pegged.peg.and!(NonindentSpace, pegged.peg.negLookahead!(pegged.peg.literal!("[]")), Label, pegged.peg.literal!(":"), Spnl, RefSrc, RefTitle, pegged.peg.oneOrMore!(BlankLine)), "Markdown.Reference"), "Reference")(TParseTree("", false,[], s)); 4448 } 4449 } 4450 static string Reference(GetName g) 4451 { 4452 return "Markdown.Reference"; 4453 } 4454 4455 static TParseTree Label(TParseTree p) 4456 { 4457 if(__ctfe) 4458 { 4459 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[")), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]")))), "Markdown.Label")(p); 4460 } 4461 else 4462 { 4463 if (auto m = tuple(`Label`, p.end) in memo) 4464 return *m; 4465 else 4466 { 4467 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[")), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]")))), "Markdown.Label"), "Label")(p); 4468 memo[tuple(`Label`, p.end)] = result; 4469 return result; 4470 } 4471 } 4472 } 4473 4474 static TParseTree Label(string s) 4475 { 4476 if(__ctfe) 4477 { 4478 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[")), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]")))), "Markdown.Label")(TParseTree("", false,[], s)); 4479 } 4480 else 4481 { 4482 forgetMemo(); 4483 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[")), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]")))), "Markdown.Label"), "Label")(TParseTree("", false,[], s)); 4484 } 4485 } 4486 static string Label(GetName g) 4487 { 4488 return "Markdown.Label"; 4489 } 4490 4491 static TParseTree RefSrc(TParseTree p) 4492 { 4493 if(__ctfe) 4494 { 4495 return pegged.peg.defined!(pegged.peg.oneOrMore!(Nonspacechar), "Markdown.RefSrc")(p); 4496 } 4497 else 4498 { 4499 if (auto m = tuple(`RefSrc`, p.end) in memo) 4500 return *m; 4501 else 4502 { 4503 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(Nonspacechar), "Markdown.RefSrc"), "RefSrc")(p); 4504 memo[tuple(`RefSrc`, p.end)] = result; 4505 return result; 4506 } 4507 } 4508 } 4509 4510 static TParseTree RefSrc(string s) 4511 { 4512 if(__ctfe) 4513 { 4514 return pegged.peg.defined!(pegged.peg.oneOrMore!(Nonspacechar), "Markdown.RefSrc")(TParseTree("", false,[], s)); 4515 } 4516 else 4517 { 4518 forgetMemo(); 4519 return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(Nonspacechar), "Markdown.RefSrc"), "RefSrc")(TParseTree("", false,[], s)); 4520 } 4521 } 4522 static string RefSrc(GetName g) 4523 { 4524 return "Markdown.RefSrc"; 4525 } 4526 4527 static TParseTree RefTitle(TParseTree p) 4528 { 4529 if(__ctfe) 4530 { 4531 return pegged.peg.defined!(pegged.peg.or!(RefTitleSingle, RefTitleDouble, RefTitleParens, EmptyTitle), "Markdown.RefTitle")(p); 4532 } 4533 else 4534 { 4535 if (auto m = tuple(`RefTitle`, p.end) in memo) 4536 return *m; 4537 else 4538 { 4539 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(RefTitleSingle, RefTitleDouble, RefTitleParens, EmptyTitle), "Markdown.RefTitle"), "RefTitle")(p); 4540 memo[tuple(`RefTitle`, p.end)] = result; 4541 return result; 4542 } 4543 } 4544 } 4545 4546 static TParseTree RefTitle(string s) 4547 { 4548 if(__ctfe) 4549 { 4550 return pegged.peg.defined!(pegged.peg.or!(RefTitleSingle, RefTitleDouble, RefTitleParens, EmptyTitle), "Markdown.RefTitle")(TParseTree("", false,[], s)); 4551 } 4552 else 4553 { 4554 forgetMemo(); 4555 return hooked!(pegged.peg.defined!(pegged.peg.or!(RefTitleSingle, RefTitleDouble, RefTitleParens, EmptyTitle), "Markdown.RefTitle"), "RefTitle")(TParseTree("", false,[], s)); 4556 } 4557 } 4558 static string RefTitle(GetName g) 4559 { 4560 return "Markdown.RefTitle"; 4561 } 4562 4563 static TParseTree EmptyTitle(TParseTree p) 4564 { 4565 if(__ctfe) 4566 { 4567 return pegged.peg.defined!(eps, "Markdown.EmptyTitle")(p); 4568 } 4569 else 4570 { 4571 if (auto m = tuple(`EmptyTitle`, p.end) in memo) 4572 return *m; 4573 else 4574 { 4575 TParseTree result = hooked!(pegged.peg.defined!(eps, "Markdown.EmptyTitle"), "EmptyTitle")(p); 4576 memo[tuple(`EmptyTitle`, p.end)] = result; 4577 return result; 4578 } 4579 } 4580 } 4581 4582 static TParseTree EmptyTitle(string s) 4583 { 4584 if(__ctfe) 4585 { 4586 return pegged.peg.defined!(eps, "Markdown.EmptyTitle")(TParseTree("", false,[], s)); 4587 } 4588 else 4589 { 4590 forgetMemo(); 4591 return hooked!(pegged.peg.defined!(eps, "Markdown.EmptyTitle"), "EmptyTitle")(TParseTree("", false,[], s)); 4592 } 4593 } 4594 static string EmptyTitle(GetName g) 4595 { 4596 return "Markdown.EmptyTitle"; 4597 } 4598 4599 static TParseTree RefTitleSingle(TParseTree p) 4600 { 4601 if(__ctfe) 4602 { 4603 return pegged.peg.defined!(pegged.peg.and!(Spnl, quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(quote, Sp, Newline), Newline)), pegged.peg.any)), quote), "Markdown.RefTitleSingle")(p); 4604 } 4605 else 4606 { 4607 if (auto m = tuple(`RefTitleSingle`, p.end) in memo) 4608 return *m; 4609 else 4610 { 4611 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Spnl, quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(quote, Sp, Newline), Newline)), pegged.peg.any)), quote), "Markdown.RefTitleSingle"), "RefTitleSingle")(p); 4612 memo[tuple(`RefTitleSingle`, p.end)] = result; 4613 return result; 4614 } 4615 } 4616 } 4617 4618 static TParseTree RefTitleSingle(string s) 4619 { 4620 if(__ctfe) 4621 { 4622 return pegged.peg.defined!(pegged.peg.and!(Spnl, quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(quote, Sp, Newline), Newline)), pegged.peg.any)), quote), "Markdown.RefTitleSingle")(TParseTree("", false,[], s)); 4623 } 4624 else 4625 { 4626 forgetMemo(); 4627 return hooked!(pegged.peg.defined!(pegged.peg.and!(Spnl, quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(quote, Sp, Newline), Newline)), pegged.peg.any)), quote), "Markdown.RefTitleSingle"), "RefTitleSingle")(TParseTree("", false,[], s)); 4628 } 4629 } 4630 static string RefTitleSingle(GetName g) 4631 { 4632 return "Markdown.RefTitleSingle"; 4633 } 4634 4635 static TParseTree RefTitleDouble(TParseTree p) 4636 { 4637 if(__ctfe) 4638 { 4639 return pegged.peg.defined!(pegged.peg.and!(Spnl, doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(doublequote, Sp, Newline), Newline)), pegged.peg.any)), doublequote), "Markdown.RefTitleDouble")(p); 4640 } 4641 else 4642 { 4643 if (auto m = tuple(`RefTitleDouble`, p.end) in memo) 4644 return *m; 4645 else 4646 { 4647 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Spnl, doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(doublequote, Sp, Newline), Newline)), pegged.peg.any)), doublequote), "Markdown.RefTitleDouble"), "RefTitleDouble")(p); 4648 memo[tuple(`RefTitleDouble`, p.end)] = result; 4649 return result; 4650 } 4651 } 4652 } 4653 4654 static TParseTree RefTitleDouble(string s) 4655 { 4656 if(__ctfe) 4657 { 4658 return pegged.peg.defined!(pegged.peg.and!(Spnl, doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(doublequote, Sp, Newline), Newline)), pegged.peg.any)), doublequote), "Markdown.RefTitleDouble")(TParseTree("", false,[], s)); 4659 } 4660 else 4661 { 4662 forgetMemo(); 4663 return hooked!(pegged.peg.defined!(pegged.peg.and!(Spnl, doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(doublequote, Sp, Newline), Newline)), pegged.peg.any)), doublequote), "Markdown.RefTitleDouble"), "RefTitleDouble")(TParseTree("", false,[], s)); 4664 } 4665 } 4666 static string RefTitleDouble(GetName g) 4667 { 4668 return "Markdown.RefTitleDouble"; 4669 } 4670 4671 static TParseTree RefTitleParens(TParseTree p) 4672 { 4673 if(__ctfe) 4674 { 4675 return pegged.peg.defined!(pegged.peg.and!(Spnl, pegged.peg.literal!("("), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!(")"), Sp, Newline), Newline)), pegged.peg.any)), pegged.peg.literal!(")")), "Markdown.RefTitleParens")(p); 4676 } 4677 else 4678 { 4679 if (auto m = tuple(`RefTitleParens`, p.end) in memo) 4680 return *m; 4681 else 4682 { 4683 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Spnl, pegged.peg.literal!("("), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!(")"), Sp, Newline), Newline)), pegged.peg.any)), pegged.peg.literal!(")")), "Markdown.RefTitleParens"), "RefTitleParens")(p); 4684 memo[tuple(`RefTitleParens`, p.end)] = result; 4685 return result; 4686 } 4687 } 4688 } 4689 4690 static TParseTree RefTitleParens(string s) 4691 { 4692 if(__ctfe) 4693 { 4694 return pegged.peg.defined!(pegged.peg.and!(Spnl, pegged.peg.literal!("("), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!(")"), Sp, Newline), Newline)), pegged.peg.any)), pegged.peg.literal!(")")), "Markdown.RefTitleParens")(TParseTree("", false,[], s)); 4695 } 4696 else 4697 { 4698 forgetMemo(); 4699 return hooked!(pegged.peg.defined!(pegged.peg.and!(Spnl, pegged.peg.literal!("("), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!(")"), Sp, Newline), Newline)), pegged.peg.any)), pegged.peg.literal!(")")), "Markdown.RefTitleParens"), "RefTitleParens")(TParseTree("", false,[], s)); 4700 } 4701 } 4702 static string RefTitleParens(GetName g) 4703 { 4704 return "Markdown.RefTitleParens"; 4705 } 4706 4707 static TParseTree References(TParseTree p) 4708 { 4709 if(__ctfe) 4710 { 4711 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Reference, SkipBlock)), "Markdown.References")(p); 4712 } 4713 else 4714 { 4715 if (auto m = tuple(`References`, p.end) in memo) 4716 return *m; 4717 else 4718 { 4719 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Reference, SkipBlock)), "Markdown.References"), "References")(p); 4720 memo[tuple(`References`, p.end)] = result; 4721 return result; 4722 } 4723 } 4724 } 4725 4726 static TParseTree References(string s) 4727 { 4728 if(__ctfe) 4729 { 4730 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Reference, SkipBlock)), "Markdown.References")(TParseTree("", false,[], s)); 4731 } 4732 else 4733 { 4734 forgetMemo(); 4735 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Reference, SkipBlock)), "Markdown.References"), "References")(TParseTree("", false,[], s)); 4736 } 4737 } 4738 static string References(GetName g) 4739 { 4740 return "Markdown.References"; 4741 } 4742 4743 static TParseTree Ticks1(TParseTree p) 4744 { 4745 if(__ctfe) 4746 { 4747 return pegged.peg.defined!(pegged.peg.and!(backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks1")(p); 4748 } 4749 else 4750 { 4751 if (auto m = tuple(`Ticks1`, p.end) in memo) 4752 return *m; 4753 else 4754 { 4755 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks1"), "Ticks1")(p); 4756 memo[tuple(`Ticks1`, p.end)] = result; 4757 return result; 4758 } 4759 } 4760 } 4761 4762 static TParseTree Ticks1(string s) 4763 { 4764 if(__ctfe) 4765 { 4766 return pegged.peg.defined!(pegged.peg.and!(backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks1")(TParseTree("", false,[], s)); 4767 } 4768 else 4769 { 4770 forgetMemo(); 4771 return hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks1"), "Ticks1")(TParseTree("", false,[], s)); 4772 } 4773 } 4774 static string Ticks1(GetName g) 4775 { 4776 return "Markdown.Ticks1"; 4777 } 4778 4779 static TParseTree Ticks2(TParseTree p) 4780 { 4781 if(__ctfe) 4782 { 4783 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks2")(p); 4784 } 4785 else 4786 { 4787 if (auto m = tuple(`Ticks2`, p.end) in memo) 4788 return *m; 4789 else 4790 { 4791 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks2"), "Ticks2")(p); 4792 memo[tuple(`Ticks2`, p.end)] = result; 4793 return result; 4794 } 4795 } 4796 } 4797 4798 static TParseTree Ticks2(string s) 4799 { 4800 if(__ctfe) 4801 { 4802 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks2")(TParseTree("", false,[], s)); 4803 } 4804 else 4805 { 4806 forgetMemo(); 4807 return hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks2"), "Ticks2")(TParseTree("", false,[], s)); 4808 } 4809 } 4810 static string Ticks2(GetName g) 4811 { 4812 return "Markdown.Ticks2"; 4813 } 4814 4815 static TParseTree Ticks3(TParseTree p) 4816 { 4817 if(__ctfe) 4818 { 4819 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks3")(p); 4820 } 4821 else 4822 { 4823 if (auto m = tuple(`Ticks3`, p.end) in memo) 4824 return *m; 4825 else 4826 { 4827 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks3"), "Ticks3")(p); 4828 memo[tuple(`Ticks3`, p.end)] = result; 4829 return result; 4830 } 4831 } 4832 } 4833 4834 static TParseTree Ticks3(string s) 4835 { 4836 if(__ctfe) 4837 { 4838 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks3")(TParseTree("", false,[], s)); 4839 } 4840 else 4841 { 4842 forgetMemo(); 4843 return hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks3"), "Ticks3")(TParseTree("", false,[], s)); 4844 } 4845 } 4846 static string Ticks3(GetName g) 4847 { 4848 return "Markdown.Ticks3"; 4849 } 4850 4851 static TParseTree Ticks4(TParseTree p) 4852 { 4853 if(__ctfe) 4854 { 4855 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks4")(p); 4856 } 4857 else 4858 { 4859 if (auto m = tuple(`Ticks4`, p.end) in memo) 4860 return *m; 4861 else 4862 { 4863 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks4"), "Ticks4")(p); 4864 memo[tuple(`Ticks4`, p.end)] = result; 4865 return result; 4866 } 4867 } 4868 } 4869 4870 static TParseTree Ticks4(string s) 4871 { 4872 if(__ctfe) 4873 { 4874 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks4")(TParseTree("", false,[], s)); 4875 } 4876 else 4877 { 4878 forgetMemo(); 4879 return hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks4"), "Ticks4")(TParseTree("", false,[], s)); 4880 } 4881 } 4882 static string Ticks4(GetName g) 4883 { 4884 return "Markdown.Ticks4"; 4885 } 4886 4887 static TParseTree Ticks5(TParseTree p) 4888 { 4889 if(__ctfe) 4890 { 4891 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks5")(p); 4892 } 4893 else 4894 { 4895 if (auto m = tuple(`Ticks5`, p.end) in memo) 4896 return *m; 4897 else 4898 { 4899 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks5"), "Ticks5")(p); 4900 memo[tuple(`Ticks5`, p.end)] = result; 4901 return result; 4902 } 4903 } 4904 } 4905 4906 static TParseTree Ticks5(string s) 4907 { 4908 if(__ctfe) 4909 { 4910 return pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks5")(TParseTree("", false,[], s)); 4911 } 4912 else 4913 { 4914 forgetMemo(); 4915 return hooked!(pegged.peg.defined!(pegged.peg.and!(backquote, backquote, backquote, backquote, backquote, pegged.peg.negLookahead!(backquote)), "Markdown.Ticks5"), "Ticks5")(TParseTree("", false,[], s)); 4916 } 4917 } 4918 static string Ticks5(GetName g) 4919 { 4920 return "Markdown.Ticks5"; 4921 } 4922 4923 static TParseTree Tildes(TParseTree p) 4924 { 4925 if(__ctfe) 4926 { 4927 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("~~~"), pegged.peg.zeroOrMore!(pegged.peg.literal!("~"))), "Markdown.Tildes")(p); 4928 } 4929 else 4930 { 4931 if (auto m = tuple(`Tildes`, p.end) in memo) 4932 return *m; 4933 else 4934 { 4935 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("~~~"), pegged.peg.zeroOrMore!(pegged.peg.literal!("~"))), "Markdown.Tildes"), "Tildes")(p); 4936 memo[tuple(`Tildes`, p.end)] = result; 4937 return result; 4938 } 4939 } 4940 } 4941 4942 static TParseTree Tildes(string s) 4943 { 4944 if(__ctfe) 4945 { 4946 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("~~~"), pegged.peg.zeroOrMore!(pegged.peg.literal!("~"))), "Markdown.Tildes")(TParseTree("", false,[], s)); 4947 } 4948 else 4949 { 4950 forgetMemo(); 4951 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("~~~"), pegged.peg.zeroOrMore!(pegged.peg.literal!("~"))), "Markdown.Tildes"), "Tildes")(TParseTree("", false,[], s)); 4952 } 4953 } 4954 static string Tildes(GetName g) 4955 { 4956 return "Markdown.Tildes"; 4957 } 4958 4959 static TParseTree CodeBlock(TParseTree p) 4960 { 4961 if(__ctfe) 4962 { 4963 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks5), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks5), pegged.peg.any))), pegged.peg.discard!(Ticks5), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks4), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks4), pegged.peg.any))), pegged.peg.discard!(Ticks4), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks3), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks3), pegged.peg.any))), pegged.peg.discard!(Ticks3), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Tildes), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Tildes), pegged.peg.any))), pegged.peg.discard!(Tildes), pegged.peg.discard!(Newline))), "Markdown.CodeBlock")(p); 4964 } 4965 else 4966 { 4967 if (auto m = tuple(`CodeBlock`, p.end) in memo) 4968 return *m; 4969 else 4970 { 4971 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks5), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks5), pegged.peg.any))), pegged.peg.discard!(Ticks5), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks4), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks4), pegged.peg.any))), pegged.peg.discard!(Ticks4), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks3), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks3), pegged.peg.any))), pegged.peg.discard!(Ticks3), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Tildes), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Tildes), pegged.peg.any))), pegged.peg.discard!(Tildes), pegged.peg.discard!(Newline))), "Markdown.CodeBlock"), "CodeBlock")(p); 4972 memo[tuple(`CodeBlock`, p.end)] = result; 4973 return result; 4974 } 4975 } 4976 } 4977 4978 static TParseTree CodeBlock(string s) 4979 { 4980 if(__ctfe) 4981 { 4982 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks5), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks5), pegged.peg.any))), pegged.peg.discard!(Ticks5), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks4), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks4), pegged.peg.any))), pegged.peg.discard!(Ticks4), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks3), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks3), pegged.peg.any))), pegged.peg.discard!(Ticks3), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Tildes), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Tildes), pegged.peg.any))), pegged.peg.discard!(Tildes), pegged.peg.discard!(Newline))), "Markdown.CodeBlock")(TParseTree("", false,[], s)); 4983 } 4984 else 4985 { 4986 forgetMemo(); 4987 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks5), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks5), pegged.peg.any))), pegged.peg.discard!(Ticks5), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks4), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks4), pegged.peg.any))), pegged.peg.discard!(Ticks4), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Ticks3), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks3), pegged.peg.any))), pegged.peg.discard!(Ticks3), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.discard!(Tildes), pegged.peg.option!(CodeOptions), pegged.peg.discard!(Newline), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Tildes), pegged.peg.any))), pegged.peg.discard!(Tildes), pegged.peg.discard!(Newline))), "Markdown.CodeBlock"), "CodeBlock")(TParseTree("", false,[], s)); 4988 } 4989 } 4990 static string CodeBlock(GetName g) 4991 { 4992 return "Markdown.CodeBlock"; 4993 } 4994 4995 static TParseTree Code(TParseTree p) 4996 { 4997 if(__ctfe) 4998 { 4999 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks1), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks1), pegged.peg.any))), pegged.peg.discard!(Ticks1), pegged.peg.option!(CodeOptions)), pegged.peg.and!(pegged.peg.discard!(Ticks2), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks2), pegged.peg.any))), pegged.peg.discard!(Ticks2), pegged.peg.option!(CodeOptions))), "Markdown.Code")(p); 5000 } 5001 else 5002 { 5003 if (auto m = tuple(`Code`, p.end) in memo) 5004 return *m; 5005 else 5006 { 5007 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks1), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks1), pegged.peg.any))), pegged.peg.discard!(Ticks1), pegged.peg.option!(CodeOptions)), pegged.peg.and!(pegged.peg.discard!(Ticks2), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks2), pegged.peg.any))), pegged.peg.discard!(Ticks2), pegged.peg.option!(CodeOptions))), "Markdown.Code"), "Code")(p); 5008 memo[tuple(`Code`, p.end)] = result; 5009 return result; 5010 } 5011 } 5012 } 5013 5014 static TParseTree Code(string s) 5015 { 5016 if(__ctfe) 5017 { 5018 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks1), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks1), pegged.peg.any))), pegged.peg.discard!(Ticks1), pegged.peg.option!(CodeOptions)), pegged.peg.and!(pegged.peg.discard!(Ticks2), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks2), pegged.peg.any))), pegged.peg.discard!(Ticks2), pegged.peg.option!(CodeOptions))), "Markdown.Code")(TParseTree("", false,[], s)); 5019 } 5020 else 5021 { 5022 forgetMemo(); 5023 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(Ticks1), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks1), pegged.peg.any))), pegged.peg.discard!(Ticks1), pegged.peg.option!(CodeOptions)), pegged.peg.and!(pegged.peg.discard!(Ticks2), pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Ticks2), pegged.peg.any))), pegged.peg.discard!(Ticks2), pegged.peg.option!(CodeOptions))), "Markdown.Code"), "Code")(TParseTree("", false,[], s)); 5024 } 5025 } 5026 static string Code(GetName g) 5027 { 5028 return "Markdown.Code"; 5029 } 5030 5031 static TParseTree CodeOptions(TParseTree p) 5032 { 5033 if(__ctfe) 5034 { 5035 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("{")), pegged.peg.discard!(Sp), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.drop!(Option), pegged.peg.discard!(Sp))), pegged.peg.discard!(Sp), pegged.peg.discard!(pegged.peg.literal!("}"))), pegged.peg.drop!(Option)), "Markdown.CodeOptions")(p); 5036 } 5037 else 5038 { 5039 if (auto m = tuple(`CodeOptions`, p.end) in memo) 5040 return *m; 5041 else 5042 { 5043 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("{")), pegged.peg.discard!(Sp), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.drop!(Option), pegged.peg.discard!(Sp))), pegged.peg.discard!(Sp), pegged.peg.discard!(pegged.peg.literal!("}"))), pegged.peg.drop!(Option)), "Markdown.CodeOptions"), "CodeOptions")(p); 5044 memo[tuple(`CodeOptions`, p.end)] = result; 5045 return result; 5046 } 5047 } 5048 } 5049 5050 static TParseTree CodeOptions(string s) 5051 { 5052 if(__ctfe) 5053 { 5054 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("{")), pegged.peg.discard!(Sp), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.drop!(Option), pegged.peg.discard!(Sp))), pegged.peg.discard!(Sp), pegged.peg.discard!(pegged.peg.literal!("}"))), pegged.peg.drop!(Option)), "Markdown.CodeOptions")(TParseTree("", false,[], s)); 5055 } 5056 else 5057 { 5058 forgetMemo(); 5059 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("{")), pegged.peg.discard!(Sp), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.drop!(Option), pegged.peg.discard!(Sp))), pegged.peg.discard!(Sp), pegged.peg.discard!(pegged.peg.literal!("}"))), pegged.peg.drop!(Option)), "Markdown.CodeOptions"), "CodeOptions")(TParseTree("", false,[], s)); 5060 } 5061 } 5062 static string CodeOptions(GetName g) 5063 { 5064 return "Markdown.CodeOptions"; 5065 } 5066 5067 static TParseTree Option(TParseTree p) 5068 { 5069 if(__ctfe) 5070 { 5071 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(pegged.peg.literal!(".")), identifier, pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("=")), pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier))))), "Markdown.Option")(p); 5072 } 5073 else 5074 { 5075 if (auto m = tuple(`Option`, p.end) in memo) 5076 return *m; 5077 else 5078 { 5079 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(pegged.peg.literal!(".")), identifier, pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("=")), pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier))))), "Markdown.Option"), "Option")(p); 5080 memo[tuple(`Option`, p.end)] = result; 5081 return result; 5082 } 5083 } 5084 } 5085 5086 static TParseTree Option(string s) 5087 { 5088 if(__ctfe) 5089 { 5090 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(pegged.peg.literal!(".")), identifier, pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("=")), pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier))))), "Markdown.Option")(TParseTree("", false,[], s)); 5091 } 5092 else 5093 { 5094 forgetMemo(); 5095 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.option!(pegged.peg.literal!(".")), identifier, pegged.peg.option!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("=")), pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier))))), "Markdown.Option"), "Option")(TParseTree("", false,[], s)); 5096 } 5097 } 5098 static string Option(GetName g) 5099 { 5100 return "Markdown.Option"; 5101 } 5102 5103 static TParseTree FootnoteReference(TParseTree p) 5104 { 5105 if(__ctfe) 5106 { 5107 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":"))), "Markdown.FootnoteReference")(p); 5108 } 5109 else 5110 { 5111 if (auto m = tuple(`FootnoteReference`, p.end) in memo) 5112 return *m; 5113 else 5114 { 5115 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":"))), "Markdown.FootnoteReference"), "FootnoteReference")(p); 5116 memo[tuple(`FootnoteReference`, p.end)] = result; 5117 return result; 5118 } 5119 } 5120 } 5121 5122 static TParseTree FootnoteReference(string s) 5123 { 5124 if(__ctfe) 5125 { 5126 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":"))), "Markdown.FootnoteReference")(TParseTree("", false,[], s)); 5127 } 5128 else 5129 { 5130 forgetMemo(); 5131 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":"))), "Markdown.FootnoteReference"), "FootnoteReference")(TParseTree("", false,[], s)); 5132 } 5133 } 5134 static string FootnoteReference(GetName g) 5135 { 5136 return "Markdown.FootnoteReference"; 5137 } 5138 5139 static TParseTree FootnoteDefinition(TParseTree p) 5140 { 5141 if(__ctfe) 5142 { 5143 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]:")), Line, pegged.peg.zeroOrMore!(pegged.peg.or!(BlankLine, pegged.peg.and!(Indent, Line)))), "Markdown.FootnoteDefinition")(p); 5144 } 5145 else 5146 { 5147 if (auto m = tuple(`FootnoteDefinition`, p.end) in memo) 5148 return *m; 5149 else 5150 { 5151 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]:")), Line, pegged.peg.zeroOrMore!(pegged.peg.or!(BlankLine, pegged.peg.and!(Indent, Line)))), "Markdown.FootnoteDefinition"), "FootnoteDefinition")(p); 5152 memo[tuple(`FootnoteDefinition`, p.end)] = result; 5153 return result; 5154 } 5155 } 5156 } 5157 5158 static TParseTree FootnoteDefinition(string s) 5159 { 5160 if(__ctfe) 5161 { 5162 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]:")), Line, pegged.peg.zeroOrMore!(pegged.peg.or!(BlankLine, pegged.peg.and!(Indent, Line)))), "Markdown.FootnoteDefinition")(TParseTree("", false,[], s)); 5163 } 5164 else 5165 { 5166 forgetMemo(); 5167 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), FootnoteName, pegged.peg.discard!(pegged.peg.literal!("]:")), Line, pegged.peg.zeroOrMore!(pegged.peg.or!(BlankLine, pegged.peg.and!(Indent, Line)))), "Markdown.FootnoteDefinition"), "FootnoteDefinition")(TParseTree("", false,[], s)); 5168 } 5169 } 5170 static string FootnoteDefinition(GetName g) 5171 { 5172 return "Markdown.FootnoteDefinition"; 5173 } 5174 5175 static TParseTree FootnoteName(TParseTree p) 5176 { 5177 if(__ctfe) 5178 { 5179 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier), "Markdown.FootnoteName")(p); 5180 } 5181 else 5182 { 5183 if (auto m = tuple(`FootnoteName`, p.end) in memo) 5184 return *m; 5185 else 5186 { 5187 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier), "Markdown.FootnoteName"), "FootnoteName")(p); 5188 memo[tuple(`FootnoteName`, p.end)] = result; 5189 return result; 5190 } 5191 } 5192 } 5193 5194 static TParseTree FootnoteName(string s) 5195 { 5196 if(__ctfe) 5197 { 5198 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier), "Markdown.FootnoteName")(TParseTree("", false,[], s)); 5199 } 5200 else 5201 { 5202 forgetMemo(); 5203 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.oneOrMore!(digit), identifier), "Markdown.FootnoteName"), "FootnoteName")(TParseTree("", false,[], s)); 5204 } 5205 } 5206 static string FootnoteName(GetName g) 5207 { 5208 return "Markdown.FootnoteName"; 5209 } 5210 5211 static TParseTree RawHtml(TParseTree p) 5212 { 5213 if(__ctfe) 5214 { 5215 return pegged.peg.defined!(pegged.peg.or!(HtmlComment, HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT")), HtmlTag), "Markdown.RawHtml")(p); 5216 } 5217 else 5218 { 5219 if (auto m = tuple(`RawHtml`, p.end) in memo) 5220 return *m; 5221 else 5222 { 5223 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(HtmlComment, HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT")), HtmlTag), "Markdown.RawHtml"), "RawHtml")(p); 5224 memo[tuple(`RawHtml`, p.end)] = result; 5225 return result; 5226 } 5227 } 5228 } 5229 5230 static TParseTree RawHtml(string s) 5231 { 5232 if(__ctfe) 5233 { 5234 return pegged.peg.defined!(pegged.peg.or!(HtmlComment, HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT")), HtmlTag), "Markdown.RawHtml")(TParseTree("", false,[], s)); 5235 } 5236 else 5237 { 5238 forgetMemo(); 5239 return hooked!(pegged.peg.defined!(pegged.peg.or!(HtmlComment, HtmlBlockT!(pegged.peg.keywords!("script", "SCRIPT")), HtmlTag), "Markdown.RawHtml"), "RawHtml")(TParseTree("", false,[], s)); 5240 } 5241 } 5242 static string RawHtml(GetName g) 5243 { 5244 return "Markdown.RawHtml"; 5245 } 5246 5247 static TParseTree BlankLine(TParseTree p) 5248 { 5249 if(__ctfe) 5250 { 5251 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Sp, Newline)), "Markdown.BlankLine")(p); 5252 } 5253 else 5254 { 5255 if (auto m = tuple(`BlankLine`, p.end) in memo) 5256 return *m; 5257 else 5258 { 5259 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Sp, Newline)), "Markdown.BlankLine"), "BlankLine")(p); 5260 memo[tuple(`BlankLine`, p.end)] = result; 5261 return result; 5262 } 5263 } 5264 } 5265 5266 static TParseTree BlankLine(string s) 5267 { 5268 if(__ctfe) 5269 { 5270 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Sp, Newline)), "Markdown.BlankLine")(TParseTree("", false,[], s)); 5271 } 5272 else 5273 { 5274 forgetMemo(); 5275 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(Sp, Newline)), "Markdown.BlankLine"), "BlankLine")(TParseTree("", false,[], s)); 5276 } 5277 } 5278 static string BlankLine(GetName g) 5279 { 5280 return "Markdown.BlankLine"; 5281 } 5282 5283 static TParseTree Quoted(TParseTree p) 5284 { 5285 if(__ctfe) 5286 { 5287 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), doublequote), pegged.peg.and!(quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), quote)), "Markdown.Quoted")(p); 5288 } 5289 else 5290 { 5291 if (auto m = tuple(`Quoted`, p.end) in memo) 5292 return *m; 5293 else 5294 { 5295 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), doublequote), pegged.peg.and!(quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), quote)), "Markdown.Quoted"), "Quoted")(p); 5296 memo[tuple(`Quoted`, p.end)] = result; 5297 return result; 5298 } 5299 } 5300 } 5301 5302 static TParseTree Quoted(string s) 5303 { 5304 if(__ctfe) 5305 { 5306 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), doublequote), pegged.peg.and!(quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), quote)), "Markdown.Quoted")(TParseTree("", false,[], s)); 5307 } 5308 else 5309 { 5310 forgetMemo(); 5311 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(doublequote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(doublequote), pegged.peg.any)), doublequote), pegged.peg.and!(quote, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(quote), pegged.peg.any)), quote)), "Markdown.Quoted"), "Quoted")(TParseTree("", false,[], s)); 5312 } 5313 } 5314 static string Quoted(GetName g) 5315 { 5316 return "Markdown.Quoted"; 5317 } 5318 5319 static TParseTree HtmlAttribute(TParseTree p) 5320 { 5321 if(__ctfe) 5322 { 5323 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(AlphanumericAscii, pegged.peg.literal!("-"))), Spnl, pegged.peg.option!(pegged.peg.and!(pegged.peg.literal!("="), Spnl, pegged.peg.or!(Quoted, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar))))), Spnl), "Markdown.HtmlAttribute")(p); 5324 } 5325 else 5326 { 5327 if (auto m = tuple(`HtmlAttribute`, p.end) in memo) 5328 return *m; 5329 else 5330 { 5331 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(AlphanumericAscii, pegged.peg.literal!("-"))), Spnl, pegged.peg.option!(pegged.peg.and!(pegged.peg.literal!("="), Spnl, pegged.peg.or!(Quoted, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar))))), Spnl), "Markdown.HtmlAttribute"), "HtmlAttribute")(p); 5332 memo[tuple(`HtmlAttribute`, p.end)] = result; 5333 return result; 5334 } 5335 } 5336 } 5337 5338 static TParseTree HtmlAttribute(string s) 5339 { 5340 if(__ctfe) 5341 { 5342 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(AlphanumericAscii, pegged.peg.literal!("-"))), Spnl, pegged.peg.option!(pegged.peg.and!(pegged.peg.literal!("="), Spnl, pegged.peg.or!(Quoted, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar))))), Spnl), "Markdown.HtmlAttribute")(TParseTree("", false,[], s)); 5343 } 5344 else 5345 { 5346 forgetMemo(); 5347 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.or!(AlphanumericAscii, pegged.peg.literal!("-"))), Spnl, pegged.peg.option!(pegged.peg.and!(pegged.peg.literal!("="), Spnl, pegged.peg.or!(Quoted, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!(">")), Nonspacechar))))), Spnl), "Markdown.HtmlAttribute"), "HtmlAttribute")(TParseTree("", false,[], s)); 5348 } 5349 } 5350 static string HtmlAttribute(GetName g) 5351 { 5352 return "Markdown.HtmlAttribute"; 5353 } 5354 5355 static TParseTree HtmlComment(TParseTree p) 5356 { 5357 if(__ctfe) 5358 { 5359 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<!--"), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("-->")), pegged.peg.any)), pegged.peg.literal!("-->")), "Markdown.HtmlComment")(p); 5360 } 5361 else 5362 { 5363 if (auto m = tuple(`HtmlComment`, p.end) in memo) 5364 return *m; 5365 else 5366 { 5367 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<!--"), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("-->")), pegged.peg.any)), pegged.peg.literal!("-->")), "Markdown.HtmlComment"), "HtmlComment")(p); 5368 memo[tuple(`HtmlComment`, p.end)] = result; 5369 return result; 5370 } 5371 } 5372 } 5373 5374 static TParseTree HtmlComment(string s) 5375 { 5376 if(__ctfe) 5377 { 5378 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<!--"), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("-->")), pegged.peg.any)), pegged.peg.literal!("-->")), "Markdown.HtmlComment")(TParseTree("", false,[], s)); 5379 } 5380 else 5381 { 5382 forgetMemo(); 5383 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<!--"), pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("-->")), pegged.peg.any)), pegged.peg.literal!("-->")), "Markdown.HtmlComment"), "HtmlComment")(TParseTree("", false,[], s)); 5384 } 5385 } 5386 static string HtmlComment(GetName g) 5387 { 5388 return "Markdown.HtmlComment"; 5389 } 5390 5391 static TParseTree HtmlTag(TParseTree p) 5392 { 5393 if(__ctfe) 5394 { 5395 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.option!(pegged.peg.literal!("/")), pegged.peg.oneOrMore!(AlphanumericAscii), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.option!(pegged.peg.literal!("/")), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlTag")(p); 5396 } 5397 else 5398 { 5399 if (auto m = tuple(`HtmlTag`, p.end) in memo) 5400 return *m; 5401 else 5402 { 5403 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.option!(pegged.peg.literal!("/")), pegged.peg.oneOrMore!(AlphanumericAscii), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.option!(pegged.peg.literal!("/")), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlTag"), "HtmlTag")(p); 5404 memo[tuple(`HtmlTag`, p.end)] = result; 5405 return result; 5406 } 5407 } 5408 } 5409 5410 static TParseTree HtmlTag(string s) 5411 { 5412 if(__ctfe) 5413 { 5414 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.option!(pegged.peg.literal!("/")), pegged.peg.oneOrMore!(AlphanumericAscii), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.option!(pegged.peg.literal!("/")), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlTag")(TParseTree("", false,[], s)); 5415 } 5416 else 5417 { 5418 forgetMemo(); 5419 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("<"), Spnl, pegged.peg.option!(pegged.peg.literal!("/")), pegged.peg.oneOrMore!(AlphanumericAscii), Spnl, pegged.peg.zeroOrMore!(HtmlAttribute), pegged.peg.option!(pegged.peg.literal!("/")), Spnl, pegged.peg.literal!(">")), "Markdown.HtmlTag"), "HtmlTag")(TParseTree("", false,[], s)); 5420 } 5421 } 5422 static string HtmlTag(GetName g) 5423 { 5424 return "Markdown.HtmlTag"; 5425 } 5426 5427 static TParseTree Spacechar(TParseTree p) 5428 { 5429 if(__ctfe) 5430 { 5431 return pegged.peg.defined!(pegged.peg.keywords!(" ", "\t"), "Markdown.Spacechar")(p); 5432 } 5433 else 5434 { 5435 if (auto m = tuple(`Spacechar`, p.end) in memo) 5436 return *m; 5437 else 5438 { 5439 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!(" ", "\t"), "Markdown.Spacechar"), "Spacechar")(p); 5440 memo[tuple(`Spacechar`, p.end)] = result; 5441 return result; 5442 } 5443 } 5444 } 5445 5446 static TParseTree Spacechar(string s) 5447 { 5448 if(__ctfe) 5449 { 5450 return pegged.peg.defined!(pegged.peg.keywords!(" ", "\t"), "Markdown.Spacechar")(TParseTree("", false,[], s)); 5451 } 5452 else 5453 { 5454 forgetMemo(); 5455 return hooked!(pegged.peg.defined!(pegged.peg.keywords!(" ", "\t"), "Markdown.Spacechar"), "Spacechar")(TParseTree("", false,[], s)); 5456 } 5457 } 5458 static string Spacechar(GetName g) 5459 { 5460 return "Markdown.Spacechar"; 5461 } 5462 5463 static TParseTree Nonspacechar(TParseTree p) 5464 { 5465 if(__ctfe) 5466 { 5467 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), pegged.peg.any), "Markdown.Nonspacechar")(p); 5468 } 5469 else 5470 { 5471 if (auto m = tuple(`Nonspacechar`, p.end) in memo) 5472 return *m; 5473 else 5474 { 5475 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), pegged.peg.any), "Markdown.Nonspacechar"), "Nonspacechar")(p); 5476 memo[tuple(`Nonspacechar`, p.end)] = result; 5477 return result; 5478 } 5479 } 5480 } 5481 5482 static TParseTree Nonspacechar(string s) 5483 { 5484 if(__ctfe) 5485 { 5486 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), pegged.peg.any), "Markdown.Nonspacechar")(TParseTree("", false,[], s)); 5487 } 5488 else 5489 { 5490 forgetMemo(); 5491 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Spacechar), pegged.peg.negLookahead!(Newline), pegged.peg.any), "Markdown.Nonspacechar"), "Nonspacechar")(TParseTree("", false,[], s)); 5492 } 5493 } 5494 static string Nonspacechar(GetName g) 5495 { 5496 return "Markdown.Nonspacechar"; 5497 } 5498 5499 static TParseTree Newline(TParseTree p) 5500 { 5501 if(__ctfe) 5502 { 5503 return pegged.peg.defined!(endOfLine, "Markdown.Newline")(p); 5504 } 5505 else 5506 { 5507 if (auto m = tuple(`Newline`, p.end) in memo) 5508 return *m; 5509 else 5510 { 5511 TParseTree result = hooked!(pegged.peg.defined!(endOfLine, "Markdown.Newline"), "Newline")(p); 5512 memo[tuple(`Newline`, p.end)] = result; 5513 return result; 5514 } 5515 } 5516 } 5517 5518 static TParseTree Newline(string s) 5519 { 5520 if(__ctfe) 5521 { 5522 return pegged.peg.defined!(endOfLine, "Markdown.Newline")(TParseTree("", false,[], s)); 5523 } 5524 else 5525 { 5526 forgetMemo(); 5527 return hooked!(pegged.peg.defined!(endOfLine, "Markdown.Newline"), "Newline")(TParseTree("", false,[], s)); 5528 } 5529 } 5530 static string Newline(GetName g) 5531 { 5532 return "Markdown.Newline"; 5533 } 5534 5535 static TParseTree Sp(TParseTree p) 5536 { 5537 if(__ctfe) 5538 { 5539 return pegged.peg.defined!(pegged.peg.zeroOrMore!(Spacechar), "Markdown.Sp")(p); 5540 } 5541 else 5542 { 5543 if (auto m = tuple(`Sp`, p.end) in memo) 5544 return *m; 5545 else 5546 { 5547 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(Spacechar), "Markdown.Sp"), "Sp")(p); 5548 memo[tuple(`Sp`, p.end)] = result; 5549 return result; 5550 } 5551 } 5552 } 5553 5554 static TParseTree Sp(string s) 5555 { 5556 if(__ctfe) 5557 { 5558 return pegged.peg.defined!(pegged.peg.zeroOrMore!(Spacechar), "Markdown.Sp")(TParseTree("", false,[], s)); 5559 } 5560 else 5561 { 5562 forgetMemo(); 5563 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(Spacechar), "Markdown.Sp"), "Sp")(TParseTree("", false,[], s)); 5564 } 5565 } 5566 static string Sp(GetName g) 5567 { 5568 return "Markdown.Sp"; 5569 } 5570 5571 static TParseTree Spnl(TParseTree p) 5572 { 5573 if(__ctfe) 5574 { 5575 return pegged.peg.defined!(pegged.peg.and!(Sp, pegged.peg.option!(pegged.peg.and!(Newline, Sp))), "Markdown.Spnl")(p); 5576 } 5577 else 5578 { 5579 if (auto m = tuple(`Spnl`, p.end) in memo) 5580 return *m; 5581 else 5582 { 5583 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(Sp, pegged.peg.option!(pegged.peg.and!(Newline, Sp))), "Markdown.Spnl"), "Spnl")(p); 5584 memo[tuple(`Spnl`, p.end)] = result; 5585 return result; 5586 } 5587 } 5588 } 5589 5590 static TParseTree Spnl(string s) 5591 { 5592 if(__ctfe) 5593 { 5594 return pegged.peg.defined!(pegged.peg.and!(Sp, pegged.peg.option!(pegged.peg.and!(Newline, Sp))), "Markdown.Spnl")(TParseTree("", false,[], s)); 5595 } 5596 else 5597 { 5598 forgetMemo(); 5599 return hooked!(pegged.peg.defined!(pegged.peg.and!(Sp, pegged.peg.option!(pegged.peg.and!(Newline, Sp))), "Markdown.Spnl"), "Spnl")(TParseTree("", false,[], s)); 5600 } 5601 } 5602 static string Spnl(GetName g) 5603 { 5604 return "Markdown.Spnl"; 5605 } 5606 5607 static TParseTree SpecialChar(TParseTree p) 5608 { 5609 if(__ctfe) 5610 { 5611 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("*"), pegged.peg.literal!("_"), backquote, pegged.peg.literal!("&"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("<"), pegged.peg.literal!("!"), pegged.peg.literal!("#"), backslash, quote, doublequote, ExtendedSpecialChar), "Markdown.SpecialChar")(p); 5612 } 5613 else 5614 { 5615 if (auto m = tuple(`SpecialChar`, p.end) in memo) 5616 return *m; 5617 else 5618 { 5619 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("*"), pegged.peg.literal!("_"), backquote, pegged.peg.literal!("&"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("<"), pegged.peg.literal!("!"), pegged.peg.literal!("#"), backslash, quote, doublequote, ExtendedSpecialChar), "Markdown.SpecialChar"), "SpecialChar")(p); 5620 memo[tuple(`SpecialChar`, p.end)] = result; 5621 return result; 5622 } 5623 } 5624 } 5625 5626 static TParseTree SpecialChar(string s) 5627 { 5628 if(__ctfe) 5629 { 5630 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("*"), pegged.peg.literal!("_"), backquote, pegged.peg.literal!("&"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("<"), pegged.peg.literal!("!"), pegged.peg.literal!("#"), backslash, quote, doublequote, ExtendedSpecialChar), "Markdown.SpecialChar")(TParseTree("", false,[], s)); 5631 } 5632 else 5633 { 5634 forgetMemo(); 5635 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("*"), pegged.peg.literal!("_"), backquote, pegged.peg.literal!("&"), pegged.peg.literal!("["), pegged.peg.literal!("]"), pegged.peg.literal!("("), pegged.peg.literal!(")"), pegged.peg.literal!("<"), pegged.peg.literal!("!"), pegged.peg.literal!("#"), backslash, quote, doublequote, ExtendedSpecialChar), "Markdown.SpecialChar"), "SpecialChar")(TParseTree("", false,[], s)); 5636 } 5637 } 5638 static string SpecialChar(GetName g) 5639 { 5640 return "Markdown.SpecialChar"; 5641 } 5642 5643 static TParseTree NormalChar(TParseTree p) 5644 { 5645 if(__ctfe) 5646 { 5647 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(SpecialChar, Spacechar, Newline)), pegged.peg.any), "Markdown.NormalChar")(p); 5648 } 5649 else 5650 { 5651 if (auto m = tuple(`NormalChar`, p.end) in memo) 5652 return *m; 5653 else 5654 { 5655 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(SpecialChar, Spacechar, Newline)), pegged.peg.any), "Markdown.NormalChar"), "NormalChar")(p); 5656 memo[tuple(`NormalChar`, p.end)] = result; 5657 return result; 5658 } 5659 } 5660 } 5661 5662 static TParseTree NormalChar(string s) 5663 { 5664 if(__ctfe) 5665 { 5666 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(SpecialChar, Spacechar, Newline)), pegged.peg.any), "Markdown.NormalChar")(TParseTree("", false,[], s)); 5667 } 5668 else 5669 { 5670 forgetMemo(); 5671 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.or!(SpecialChar, Spacechar, Newline)), pegged.peg.any), "Markdown.NormalChar"), "NormalChar")(TParseTree("", false,[], s)); 5672 } 5673 } 5674 static string NormalChar(GetName g) 5675 { 5676 return "Markdown.NormalChar"; 5677 } 5678 5679 static TParseTree NonAlphanumeric(TParseTree p) 5680 { 5681 if(__ctfe) 5682 { 5683 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Alphanumeric), pegged.peg.any), "Markdown.NonAlphanumeric")(p); 5684 } 5685 else 5686 { 5687 if (auto m = tuple(`NonAlphanumeric`, p.end) in memo) 5688 return *m; 5689 else 5690 { 5691 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Alphanumeric), pegged.peg.any), "Markdown.NonAlphanumeric"), "NonAlphanumeric")(p); 5692 memo[tuple(`NonAlphanumeric`, p.end)] = result; 5693 return result; 5694 } 5695 } 5696 } 5697 5698 static TParseTree NonAlphanumeric(string s) 5699 { 5700 if(__ctfe) 5701 { 5702 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Alphanumeric), pegged.peg.any), "Markdown.NonAlphanumeric")(TParseTree("", false,[], s)); 5703 } 5704 else 5705 { 5706 forgetMemo(); 5707 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.negLookahead!(Alphanumeric), pegged.peg.any), "Markdown.NonAlphanumeric"), "NonAlphanumeric")(TParseTree("", false,[], s)); 5708 } 5709 } 5710 static string NonAlphanumeric(GetName g) 5711 { 5712 return "Markdown.NonAlphanumeric"; 5713 } 5714 5715 static TParseTree Alphanumeric(TParseTree p) 5716 { 5717 if(__ctfe) 5718 { 5719 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), pegged.peg.literal!("\200"), pegged.peg.literal!("\201"), pegged.peg.literal!("\202"), pegged.peg.literal!("\203"), pegged.peg.literal!("\204"), pegged.peg.literal!("\205"), pegged.peg.literal!("\206"), pegged.peg.literal!("\207"), pegged.peg.literal!("\210"), pegged.peg.literal!("\211"), pegged.peg.literal!("\212"), pegged.peg.literal!("\213"), pegged.peg.literal!("\214"), pegged.peg.literal!("\215"), pegged.peg.literal!("\216"), pegged.peg.literal!("\217"), pegged.peg.literal!("\220"), pegged.peg.literal!("\221"), pegged.peg.literal!("\222"), pegged.peg.literal!("\223"), pegged.peg.literal!("\224"), pegged.peg.literal!("\225"), pegged.peg.literal!("\226"), pegged.peg.literal!("\227"), pegged.peg.literal!("\230"), pegged.peg.literal!("\231"), pegged.peg.literal!("\232"), pegged.peg.literal!("\233"), pegged.peg.literal!("\234"), pegged.peg.literal!("\235"), pegged.peg.literal!("\236"), pegged.peg.literal!("\237"), pegged.peg.literal!("\240"), pegged.peg.literal!("\241"), pegged.peg.literal!("\242"), pegged.peg.literal!("\243"), pegged.peg.literal!("\244"), pegged.peg.literal!("\245"), pegged.peg.literal!("\246"), pegged.peg.literal!("\247"), pegged.peg.literal!("\250"), pegged.peg.literal!("\251"), pegged.peg.literal!("\252"), pegged.peg.literal!("\253"), pegged.peg.literal!("\254"), pegged.peg.literal!("\255"), pegged.peg.literal!("\256"), pegged.peg.literal!("\257"), pegged.peg.literal!("\260"), pegged.peg.literal!("\261"), pegged.peg.literal!("\262"), pegged.peg.literal!("\263"), pegged.peg.literal!("\264"), pegged.peg.literal!("\265"), pegged.peg.literal!("\266"), pegged.peg.literal!("\267"), pegged.peg.literal!("\270"), pegged.peg.literal!("\271"), pegged.peg.literal!("\272"), pegged.peg.literal!("\273"), pegged.peg.literal!("\274"), pegged.peg.literal!("\275"), pegged.peg.literal!("\276"), pegged.peg.literal!("\277"), pegged.peg.literal!("\300"), pegged.peg.literal!("\301"), pegged.peg.literal!("\302"), pegged.peg.literal!("\303"), pegged.peg.literal!("\304"), pegged.peg.literal!("\305"), pegged.peg.literal!("\306"), pegged.peg.literal!("\307"), pegged.peg.literal!("\310"), pegged.peg.literal!("\311"), pegged.peg.literal!("\312"), pegged.peg.literal!("\313"), pegged.peg.literal!("\314"), pegged.peg.literal!("\315"), pegged.peg.literal!("\316"), pegged.peg.literal!("\317"), pegged.peg.literal!("\320"), pegged.peg.literal!("\321"), pegged.peg.literal!("\322"), pegged.peg.literal!("\323"), pegged.peg.literal!("\324"), pegged.peg.literal!("\325"), pegged.peg.literal!("\326"), pegged.peg.literal!("\327"), pegged.peg.literal!("\330"), pegged.peg.literal!("\331"), pegged.peg.literal!("\332"), pegged.peg.literal!("\333"), pegged.peg.literal!("\334"), pegged.peg.literal!("\335"), pegged.peg.literal!("\336"), pegged.peg.literal!("\337"), pegged.peg.literal!("\340"), pegged.peg.literal!("\341"), pegged.peg.literal!("\342"), pegged.peg.literal!("\343"), pegged.peg.literal!("\344"), pegged.peg.literal!("\345"), pegged.peg.literal!("\346"), pegged.peg.literal!("\347"), pegged.peg.literal!("\350"), pegged.peg.literal!("\351"), pegged.peg.literal!("\352"), pegged.peg.literal!("\353"), pegged.peg.literal!("\354"), pegged.peg.literal!("\355"), pegged.peg.literal!("\356"), pegged.peg.literal!("\357"), pegged.peg.literal!("\360"), pegged.peg.literal!("\361"), pegged.peg.literal!("\362"), pegged.peg.literal!("\363"), pegged.peg.literal!("\364"), pegged.peg.literal!("\365"), pegged.peg.literal!("\366"), pegged.peg.literal!("\367"), pegged.peg.literal!("\370"), pegged.peg.literal!("\371"), pegged.peg.literal!("\372"), pegged.peg.literal!("\373"), pegged.peg.literal!("\374"), pegged.peg.literal!("\375"), pegged.peg.literal!("\376"), pegged.peg.literal!("\377")), "Markdown.Alphanumeric")(p); 5720 } 5721 else 5722 { 5723 if (auto m = tuple(`Alphanumeric`, p.end) in memo) 5724 return *m; 5725 else 5726 { 5727 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), pegged.peg.literal!("\200"), pegged.peg.literal!("\201"), pegged.peg.literal!("\202"), pegged.peg.literal!("\203"), pegged.peg.literal!("\204"), pegged.peg.literal!("\205"), pegged.peg.literal!("\206"), pegged.peg.literal!("\207"), pegged.peg.literal!("\210"), pegged.peg.literal!("\211"), pegged.peg.literal!("\212"), pegged.peg.literal!("\213"), pegged.peg.literal!("\214"), pegged.peg.literal!("\215"), pegged.peg.literal!("\216"), pegged.peg.literal!("\217"), pegged.peg.literal!("\220"), pegged.peg.literal!("\221"), pegged.peg.literal!("\222"), pegged.peg.literal!("\223"), pegged.peg.literal!("\224"), pegged.peg.literal!("\225"), pegged.peg.literal!("\226"), pegged.peg.literal!("\227"), pegged.peg.literal!("\230"), pegged.peg.literal!("\231"), pegged.peg.literal!("\232"), pegged.peg.literal!("\233"), pegged.peg.literal!("\234"), pegged.peg.literal!("\235"), pegged.peg.literal!("\236"), pegged.peg.literal!("\237"), pegged.peg.literal!("\240"), pegged.peg.literal!("\241"), pegged.peg.literal!("\242"), pegged.peg.literal!("\243"), pegged.peg.literal!("\244"), pegged.peg.literal!("\245"), pegged.peg.literal!("\246"), pegged.peg.literal!("\247"), pegged.peg.literal!("\250"), pegged.peg.literal!("\251"), pegged.peg.literal!("\252"), pegged.peg.literal!("\253"), pegged.peg.literal!("\254"), pegged.peg.literal!("\255"), pegged.peg.literal!("\256"), pegged.peg.literal!("\257"), pegged.peg.literal!("\260"), pegged.peg.literal!("\261"), pegged.peg.literal!("\262"), pegged.peg.literal!("\263"), pegged.peg.literal!("\264"), pegged.peg.literal!("\265"), pegged.peg.literal!("\266"), pegged.peg.literal!("\267"), pegged.peg.literal!("\270"), pegged.peg.literal!("\271"), pegged.peg.literal!("\272"), pegged.peg.literal!("\273"), pegged.peg.literal!("\274"), pegged.peg.literal!("\275"), pegged.peg.literal!("\276"), pegged.peg.literal!("\277"), pegged.peg.literal!("\300"), pegged.peg.literal!("\301"), pegged.peg.literal!("\302"), pegged.peg.literal!("\303"), pegged.peg.literal!("\304"), pegged.peg.literal!("\305"), pegged.peg.literal!("\306"), pegged.peg.literal!("\307"), pegged.peg.literal!("\310"), pegged.peg.literal!("\311"), pegged.peg.literal!("\312"), pegged.peg.literal!("\313"), pegged.peg.literal!("\314"), pegged.peg.literal!("\315"), pegged.peg.literal!("\316"), pegged.peg.literal!("\317"), pegged.peg.literal!("\320"), pegged.peg.literal!("\321"), pegged.peg.literal!("\322"), pegged.peg.literal!("\323"), pegged.peg.literal!("\324"), pegged.peg.literal!("\325"), pegged.peg.literal!("\326"), pegged.peg.literal!("\327"), pegged.peg.literal!("\330"), pegged.peg.literal!("\331"), pegged.peg.literal!("\332"), pegged.peg.literal!("\333"), pegged.peg.literal!("\334"), pegged.peg.literal!("\335"), pegged.peg.literal!("\336"), pegged.peg.literal!("\337"), pegged.peg.literal!("\340"), pegged.peg.literal!("\341"), pegged.peg.literal!("\342"), pegged.peg.literal!("\343"), pegged.peg.literal!("\344"), pegged.peg.literal!("\345"), pegged.peg.literal!("\346"), pegged.peg.literal!("\347"), pegged.peg.literal!("\350"), pegged.peg.literal!("\351"), pegged.peg.literal!("\352"), pegged.peg.literal!("\353"), pegged.peg.literal!("\354"), pegged.peg.literal!("\355"), pegged.peg.literal!("\356"), pegged.peg.literal!("\357"), pegged.peg.literal!("\360"), pegged.peg.literal!("\361"), pegged.peg.literal!("\362"), pegged.peg.literal!("\363"), pegged.peg.literal!("\364"), pegged.peg.literal!("\365"), pegged.peg.literal!("\366"), pegged.peg.literal!("\367"), pegged.peg.literal!("\370"), pegged.peg.literal!("\371"), pegged.peg.literal!("\372"), pegged.peg.literal!("\373"), pegged.peg.literal!("\374"), pegged.peg.literal!("\375"), pegged.peg.literal!("\376"), pegged.peg.literal!("\377")), "Markdown.Alphanumeric"), "Alphanumeric")(p); 5728 memo[tuple(`Alphanumeric`, p.end)] = result; 5729 return result; 5730 } 5731 } 5732 } 5733 5734 static TParseTree Alphanumeric(string s) 5735 { 5736 if(__ctfe) 5737 { 5738 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), pegged.peg.literal!("\200"), pegged.peg.literal!("\201"), pegged.peg.literal!("\202"), pegged.peg.literal!("\203"), pegged.peg.literal!("\204"), pegged.peg.literal!("\205"), pegged.peg.literal!("\206"), pegged.peg.literal!("\207"), pegged.peg.literal!("\210"), pegged.peg.literal!("\211"), pegged.peg.literal!("\212"), pegged.peg.literal!("\213"), pegged.peg.literal!("\214"), pegged.peg.literal!("\215"), pegged.peg.literal!("\216"), pegged.peg.literal!("\217"), pegged.peg.literal!("\220"), pegged.peg.literal!("\221"), pegged.peg.literal!("\222"), pegged.peg.literal!("\223"), pegged.peg.literal!("\224"), pegged.peg.literal!("\225"), pegged.peg.literal!("\226"), pegged.peg.literal!("\227"), pegged.peg.literal!("\230"), pegged.peg.literal!("\231"), pegged.peg.literal!("\232"), pegged.peg.literal!("\233"), pegged.peg.literal!("\234"), pegged.peg.literal!("\235"), pegged.peg.literal!("\236"), pegged.peg.literal!("\237"), pegged.peg.literal!("\240"), pegged.peg.literal!("\241"), pegged.peg.literal!("\242"), pegged.peg.literal!("\243"), pegged.peg.literal!("\244"), pegged.peg.literal!("\245"), pegged.peg.literal!("\246"), pegged.peg.literal!("\247"), pegged.peg.literal!("\250"), pegged.peg.literal!("\251"), pegged.peg.literal!("\252"), pegged.peg.literal!("\253"), pegged.peg.literal!("\254"), pegged.peg.literal!("\255"), pegged.peg.literal!("\256"), pegged.peg.literal!("\257"), pegged.peg.literal!("\260"), pegged.peg.literal!("\261"), pegged.peg.literal!("\262"), pegged.peg.literal!("\263"), pegged.peg.literal!("\264"), pegged.peg.literal!("\265"), pegged.peg.literal!("\266"), pegged.peg.literal!("\267"), pegged.peg.literal!("\270"), pegged.peg.literal!("\271"), pegged.peg.literal!("\272"), pegged.peg.literal!("\273"), pegged.peg.literal!("\274"), pegged.peg.literal!("\275"), pegged.peg.literal!("\276"), pegged.peg.literal!("\277"), pegged.peg.literal!("\300"), pegged.peg.literal!("\301"), pegged.peg.literal!("\302"), pegged.peg.literal!("\303"), pegged.peg.literal!("\304"), pegged.peg.literal!("\305"), pegged.peg.literal!("\306"), pegged.peg.literal!("\307"), pegged.peg.literal!("\310"), pegged.peg.literal!("\311"), pegged.peg.literal!("\312"), pegged.peg.literal!("\313"), pegged.peg.literal!("\314"), pegged.peg.literal!("\315"), pegged.peg.literal!("\316"), pegged.peg.literal!("\317"), pegged.peg.literal!("\320"), pegged.peg.literal!("\321"), pegged.peg.literal!("\322"), pegged.peg.literal!("\323"), pegged.peg.literal!("\324"), pegged.peg.literal!("\325"), pegged.peg.literal!("\326"), pegged.peg.literal!("\327"), pegged.peg.literal!("\330"), pegged.peg.literal!("\331"), pegged.peg.literal!("\332"), pegged.peg.literal!("\333"), pegged.peg.literal!("\334"), pegged.peg.literal!("\335"), pegged.peg.literal!("\336"), pegged.peg.literal!("\337"), pegged.peg.literal!("\340"), pegged.peg.literal!("\341"), pegged.peg.literal!("\342"), pegged.peg.literal!("\343"), pegged.peg.literal!("\344"), pegged.peg.literal!("\345"), pegged.peg.literal!("\346"), pegged.peg.literal!("\347"), pegged.peg.literal!("\350"), pegged.peg.literal!("\351"), pegged.peg.literal!("\352"), pegged.peg.literal!("\353"), pegged.peg.literal!("\354"), pegged.peg.literal!("\355"), pegged.peg.literal!("\356"), pegged.peg.literal!("\357"), pegged.peg.literal!("\360"), pegged.peg.literal!("\361"), pegged.peg.literal!("\362"), pegged.peg.literal!("\363"), pegged.peg.literal!("\364"), pegged.peg.literal!("\365"), pegged.peg.literal!("\366"), pegged.peg.literal!("\367"), pegged.peg.literal!("\370"), pegged.peg.literal!("\371"), pegged.peg.literal!("\372"), pegged.peg.literal!("\373"), pegged.peg.literal!("\374"), pegged.peg.literal!("\375"), pegged.peg.literal!("\376"), pegged.peg.literal!("\377")), "Markdown.Alphanumeric")(TParseTree("", false,[], s)); 5739 } 5740 else 5741 { 5742 forgetMemo(); 5743 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z')), pegged.peg.literal!("\200"), pegged.peg.literal!("\201"), pegged.peg.literal!("\202"), pegged.peg.literal!("\203"), pegged.peg.literal!("\204"), pegged.peg.literal!("\205"), pegged.peg.literal!("\206"), pegged.peg.literal!("\207"), pegged.peg.literal!("\210"), pegged.peg.literal!("\211"), pegged.peg.literal!("\212"), pegged.peg.literal!("\213"), pegged.peg.literal!("\214"), pegged.peg.literal!("\215"), pegged.peg.literal!("\216"), pegged.peg.literal!("\217"), pegged.peg.literal!("\220"), pegged.peg.literal!("\221"), pegged.peg.literal!("\222"), pegged.peg.literal!("\223"), pegged.peg.literal!("\224"), pegged.peg.literal!("\225"), pegged.peg.literal!("\226"), pegged.peg.literal!("\227"), pegged.peg.literal!("\230"), pegged.peg.literal!("\231"), pegged.peg.literal!("\232"), pegged.peg.literal!("\233"), pegged.peg.literal!("\234"), pegged.peg.literal!("\235"), pegged.peg.literal!("\236"), pegged.peg.literal!("\237"), pegged.peg.literal!("\240"), pegged.peg.literal!("\241"), pegged.peg.literal!("\242"), pegged.peg.literal!("\243"), pegged.peg.literal!("\244"), pegged.peg.literal!("\245"), pegged.peg.literal!("\246"), pegged.peg.literal!("\247"), pegged.peg.literal!("\250"), pegged.peg.literal!("\251"), pegged.peg.literal!("\252"), pegged.peg.literal!("\253"), pegged.peg.literal!("\254"), pegged.peg.literal!("\255"), pegged.peg.literal!("\256"), pegged.peg.literal!("\257"), pegged.peg.literal!("\260"), pegged.peg.literal!("\261"), pegged.peg.literal!("\262"), pegged.peg.literal!("\263"), pegged.peg.literal!("\264"), pegged.peg.literal!("\265"), pegged.peg.literal!("\266"), pegged.peg.literal!("\267"), pegged.peg.literal!("\270"), pegged.peg.literal!("\271"), pegged.peg.literal!("\272"), pegged.peg.literal!("\273"), pegged.peg.literal!("\274"), pegged.peg.literal!("\275"), pegged.peg.literal!("\276"), pegged.peg.literal!("\277"), pegged.peg.literal!("\300"), pegged.peg.literal!("\301"), pegged.peg.literal!("\302"), pegged.peg.literal!("\303"), pegged.peg.literal!("\304"), pegged.peg.literal!("\305"), pegged.peg.literal!("\306"), pegged.peg.literal!("\307"), pegged.peg.literal!("\310"), pegged.peg.literal!("\311"), pegged.peg.literal!("\312"), pegged.peg.literal!("\313"), pegged.peg.literal!("\314"), pegged.peg.literal!("\315"), pegged.peg.literal!("\316"), pegged.peg.literal!("\317"), pegged.peg.literal!("\320"), pegged.peg.literal!("\321"), pegged.peg.literal!("\322"), pegged.peg.literal!("\323"), pegged.peg.literal!("\324"), pegged.peg.literal!("\325"), pegged.peg.literal!("\326"), pegged.peg.literal!("\327"), pegged.peg.literal!("\330"), pegged.peg.literal!("\331"), pegged.peg.literal!("\332"), pegged.peg.literal!("\333"), pegged.peg.literal!("\334"), pegged.peg.literal!("\335"), pegged.peg.literal!("\336"), pegged.peg.literal!("\337"), pegged.peg.literal!("\340"), pegged.peg.literal!("\341"), pegged.peg.literal!("\342"), pegged.peg.literal!("\343"), pegged.peg.literal!("\344"), pegged.peg.literal!("\345"), pegged.peg.literal!("\346"), pegged.peg.literal!("\347"), pegged.peg.literal!("\350"), pegged.peg.literal!("\351"), pegged.peg.literal!("\352"), pegged.peg.literal!("\353"), pegged.peg.literal!("\354"), pegged.peg.literal!("\355"), pegged.peg.literal!("\356"), pegged.peg.literal!("\357"), pegged.peg.literal!("\360"), pegged.peg.literal!("\361"), pegged.peg.literal!("\362"), pegged.peg.literal!("\363"), pegged.peg.literal!("\364"), pegged.peg.literal!("\365"), pegged.peg.literal!("\366"), pegged.peg.literal!("\367"), pegged.peg.literal!("\370"), pegged.peg.literal!("\371"), pegged.peg.literal!("\372"), pegged.peg.literal!("\373"), pegged.peg.literal!("\374"), pegged.peg.literal!("\375"), pegged.peg.literal!("\376"), pegged.peg.literal!("\377")), "Markdown.Alphanumeric"), "Alphanumeric")(TParseTree("", false,[], s)); 5744 } 5745 } 5746 static string Alphanumeric(GetName g) 5747 { 5748 return "Markdown.Alphanumeric"; 5749 } 5750 5751 static TParseTree AlphanumericAscii(TParseTree p) 5752 { 5753 if(__ctfe) 5754 { 5755 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')), "Markdown.AlphanumericAscii")(p); 5756 } 5757 else 5758 { 5759 if (auto m = tuple(`AlphanumericAscii`, p.end) in memo) 5760 return *m; 5761 else 5762 { 5763 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')), "Markdown.AlphanumericAscii"), "AlphanumericAscii")(p); 5764 memo[tuple(`AlphanumericAscii`, p.end)] = result; 5765 return result; 5766 } 5767 } 5768 } 5769 5770 static TParseTree AlphanumericAscii(string s) 5771 { 5772 if(__ctfe) 5773 { 5774 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')), "Markdown.AlphanumericAscii")(TParseTree("", false,[], s)); 5775 } 5776 else 5777 { 5778 forgetMemo(); 5779 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')), "Markdown.AlphanumericAscii"), "AlphanumericAscii")(TParseTree("", false,[], s)); 5780 } 5781 } 5782 static string AlphanumericAscii(GetName g) 5783 { 5784 return "Markdown.AlphanumericAscii"; 5785 } 5786 5787 static TParseTree Digit(TParseTree p) 5788 { 5789 if(__ctfe) 5790 { 5791 return pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "Markdown.Digit")(p); 5792 } 5793 else 5794 { 5795 if (auto m = tuple(`Digit`, p.end) in memo) 5796 return *m; 5797 else 5798 { 5799 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "Markdown.Digit"), "Digit")(p); 5800 memo[tuple(`Digit`, p.end)] = result; 5801 return result; 5802 } 5803 } 5804 } 5805 5806 static TParseTree Digit(string s) 5807 { 5808 if(__ctfe) 5809 { 5810 return pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "Markdown.Digit")(TParseTree("", false,[], s)); 5811 } 5812 else 5813 { 5814 forgetMemo(); 5815 return hooked!(pegged.peg.defined!(pegged.peg.charRange!('0', '9'), "Markdown.Digit"), "Digit")(TParseTree("", false,[], s)); 5816 } 5817 } 5818 static string Digit(GetName g) 5819 { 5820 return "Markdown.Digit"; 5821 } 5822 5823 static TParseTree BOM(TParseTree p) 5824 { 5825 if(__ctfe) 5826 { 5827 return pegged.peg.defined!(pegged.peg.literal!("\357\273\277"), "Markdown.BOM")(p); 5828 } 5829 else 5830 { 5831 if (auto m = tuple(`BOM`, p.end) in memo) 5832 return *m; 5833 else 5834 { 5835 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.literal!("\357\273\277"), "Markdown.BOM"), "BOM")(p); 5836 memo[tuple(`BOM`, p.end)] = result; 5837 return result; 5838 } 5839 } 5840 } 5841 5842 static TParseTree BOM(string s) 5843 { 5844 if(__ctfe) 5845 { 5846 return pegged.peg.defined!(pegged.peg.literal!("\357\273\277"), "Markdown.BOM")(TParseTree("", false,[], s)); 5847 } 5848 else 5849 { 5850 forgetMemo(); 5851 return hooked!(pegged.peg.defined!(pegged.peg.literal!("\357\273\277"), "Markdown.BOM"), "BOM")(TParseTree("", false,[], s)); 5852 } 5853 } 5854 static string BOM(GetName g) 5855 { 5856 return "Markdown.BOM"; 5857 } 5858 5859 static TParseTree HexEntity(TParseTree p) 5860 { 5861 if(__ctfe) 5862 { 5863 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('a', 'f'), pegged.peg.charRange!('A', 'F')))), "Markdown.HexEntity")(p); 5864 } 5865 else 5866 { 5867 if (auto m = tuple(`HexEntity`, p.end) in memo) 5868 return *m; 5869 else 5870 { 5871 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('a', 'f'), pegged.peg.charRange!('A', 'F')))), "Markdown.HexEntity"), "HexEntity")(p); 5872 memo[tuple(`HexEntity`, p.end)] = result; 5873 return result; 5874 } 5875 } 5876 } 5877 5878 static TParseTree HexEntity(string s) 5879 { 5880 if(__ctfe) 5881 { 5882 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('a', 'f'), pegged.peg.charRange!('A', 'F')))), "Markdown.HexEntity")(TParseTree("", false,[], s)); 5883 } 5884 else 5885 { 5886 forgetMemo(); 5887 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.or!(pegged.peg.literal!("X"), pegged.peg.literal!("x")), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('0', '9'), pegged.peg.charRange!('a', 'f'), pegged.peg.charRange!('A', 'F')))), "Markdown.HexEntity"), "HexEntity")(TParseTree("", false,[], s)); 5888 } 5889 } 5890 static string HexEntity(GetName g) 5891 { 5892 return "Markdown.HexEntity"; 5893 } 5894 5895 static TParseTree DecEntity(TParseTree p) 5896 { 5897 if(__ctfe) 5898 { 5899 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "Markdown.DecEntity")(p); 5900 } 5901 else 5902 { 5903 if (auto m = tuple(`DecEntity`, p.end) in memo) 5904 return *m; 5905 else 5906 { 5907 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "Markdown.DecEntity"), "DecEntity")(p); 5908 memo[tuple(`DecEntity`, p.end)] = result; 5909 return result; 5910 } 5911 } 5912 } 5913 5914 static TParseTree DecEntity(string s) 5915 { 5916 if(__ctfe) 5917 { 5918 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "Markdown.DecEntity")(TParseTree("", false,[], s)); 5919 } 5920 else 5921 { 5922 forgetMemo(); 5923 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.literal!("#"), pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "Markdown.DecEntity"), "DecEntity")(TParseTree("", false,[], s)); 5924 } 5925 } 5926 static string DecEntity(GetName g) 5927 { 5928 return "Markdown.DecEntity"; 5929 } 5930 5931 static TParseTree CharEntity(TParseTree p) 5932 { 5933 if(__ctfe) 5934 { 5935 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')))), "Markdown.CharEntity")(p); 5936 } 5937 else 5938 { 5939 if (auto m = tuple(`CharEntity`, p.end) in memo) 5940 return *m; 5941 else 5942 { 5943 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')))), "Markdown.CharEntity"), "CharEntity")(p); 5944 memo[tuple(`CharEntity`, p.end)] = result; 5945 return result; 5946 } 5947 } 5948 } 5949 5950 static TParseTree CharEntity(string s) 5951 { 5952 if(__ctfe) 5953 { 5954 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')))), "Markdown.CharEntity")(TParseTree("", false,[], s)); 5955 } 5956 else 5957 { 5958 forgetMemo(); 5959 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('0', '9')))), "Markdown.CharEntity"), "CharEntity")(TParseTree("", false,[], s)); 5960 } 5961 } 5962 static string CharEntity(GetName g) 5963 { 5964 return "Markdown.CharEntity"; 5965 } 5966 5967 static TParseTree NonindentSpace(TParseTree p) 5968 { 5969 if(__ctfe) 5970 { 5971 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.option!(pegged.peg.keywords!(" ", " ", " "))), "Markdown.NonindentSpace")(p); 5972 } 5973 else 5974 { 5975 if (auto m = tuple(`NonindentSpace`, p.end) in memo) 5976 return *m; 5977 else 5978 { 5979 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.option!(pegged.peg.keywords!(" ", " ", " "))), "Markdown.NonindentSpace"), "NonindentSpace")(p); 5980 memo[tuple(`NonindentSpace`, p.end)] = result; 5981 return result; 5982 } 5983 } 5984 } 5985 5986 static TParseTree NonindentSpace(string s) 5987 { 5988 if(__ctfe) 5989 { 5990 return pegged.peg.defined!(pegged.peg.discard!(pegged.peg.option!(pegged.peg.keywords!(" ", " ", " "))), "Markdown.NonindentSpace")(TParseTree("", false,[], s)); 5991 } 5992 else 5993 { 5994 forgetMemo(); 5995 return hooked!(pegged.peg.defined!(pegged.peg.discard!(pegged.peg.option!(pegged.peg.keywords!(" ", " ", " "))), "Markdown.NonindentSpace"), "NonindentSpace")(TParseTree("", false,[], s)); 5996 } 5997 } 5998 static string NonindentSpace(GetName g) 5999 { 6000 return "Markdown.NonindentSpace"; 6001 } 6002 6003 static TParseTree Indent(TParseTree p) 6004 { 6005 if(__ctfe) 6006 { 6007 return pegged.peg.defined!(pegged.peg.keywords!("\t", " "), "Markdown.Indent")(p); 6008 } 6009 else 6010 { 6011 if (auto m = tuple(`Indent`, p.end) in memo) 6012 return *m; 6013 else 6014 { 6015 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!("\t", " "), "Markdown.Indent"), "Indent")(p); 6016 memo[tuple(`Indent`, p.end)] = result; 6017 return result; 6018 } 6019 } 6020 } 6021 6022 static TParseTree Indent(string s) 6023 { 6024 if(__ctfe) 6025 { 6026 return pegged.peg.defined!(pegged.peg.keywords!("\t", " "), "Markdown.Indent")(TParseTree("", false,[], s)); 6027 } 6028 else 6029 { 6030 forgetMemo(); 6031 return hooked!(pegged.peg.defined!(pegged.peg.keywords!("\t", " "), "Markdown.Indent"), "Indent")(TParseTree("", false,[], s)); 6032 } 6033 } 6034 static string Indent(GetName g) 6035 { 6036 return "Markdown.Indent"; 6037 } 6038 6039 static TParseTree IndentedLine(TParseTree p) 6040 { 6041 if(__ctfe) 6042 { 6043 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(Indent), Line), "Markdown.IndentedLine")(p); 6044 } 6045 else 6046 { 6047 if (auto m = tuple(`IndentedLine`, p.end) in memo) 6048 return *m; 6049 else 6050 { 6051 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(Indent), Line), "Markdown.IndentedLine"), "IndentedLine")(p); 6052 memo[tuple(`IndentedLine`, p.end)] = result; 6053 return result; 6054 } 6055 } 6056 } 6057 6058 static TParseTree IndentedLine(string s) 6059 { 6060 if(__ctfe) 6061 { 6062 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(Indent), Line), "Markdown.IndentedLine")(TParseTree("", false,[], s)); 6063 } 6064 else 6065 { 6066 forgetMemo(); 6067 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(Indent), Line), "Markdown.IndentedLine"), "IndentedLine")(TParseTree("", false,[], s)); 6068 } 6069 } 6070 static string IndentedLine(GetName g) 6071 { 6072 return "Markdown.IndentedLine"; 6073 } 6074 6075 static TParseTree OptionallyIndentedLine(TParseTree p) 6076 { 6077 if(__ctfe) 6078 { 6079 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(Indent), Line), "Markdown.OptionallyIndentedLine")(p); 6080 } 6081 else 6082 { 6083 if (auto m = tuple(`OptionallyIndentedLine`, p.end) in memo) 6084 return *m; 6085 else 6086 { 6087 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(Indent), Line), "Markdown.OptionallyIndentedLine"), "OptionallyIndentedLine")(p); 6088 memo[tuple(`OptionallyIndentedLine`, p.end)] = result; 6089 return result; 6090 } 6091 } 6092 } 6093 6094 static TParseTree OptionallyIndentedLine(string s) 6095 { 6096 if(__ctfe) 6097 { 6098 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(Indent), Line), "Markdown.OptionallyIndentedLine")(TParseTree("", false,[], s)); 6099 } 6100 else 6101 { 6102 forgetMemo(); 6103 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.option!(Indent), Line), "Markdown.OptionallyIndentedLine"), "OptionallyIndentedLine")(TParseTree("", false,[], s)); 6104 } 6105 } 6106 static string OptionallyIndentedLine(GetName g) 6107 { 6108 return "Markdown.OptionallyIndentedLine"; 6109 } 6110 6111 static TParseTree Line(TParseTree p) 6112 { 6113 if(__ctfe) 6114 { 6115 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.any), pegged.peg.discard!(eoi)))), "Markdown.Line")(p); 6116 } 6117 else 6118 { 6119 if (auto m = tuple(`Line`, p.end) in memo) 6120 return *m; 6121 else 6122 { 6123 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.any), pegged.peg.discard!(eoi)))), "Markdown.Line"), "Line")(p); 6124 memo[tuple(`Line`, p.end)] = result; 6125 return result; 6126 } 6127 } 6128 } 6129 6130 static TParseTree Line(string s) 6131 { 6132 if(__ctfe) 6133 { 6134 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.any), pegged.peg.discard!(eoi)))), "Markdown.Line")(TParseTree("", false,[], s)); 6135 } 6136 else 6137 { 6138 forgetMemo(); 6139 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.and!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.any)), pegged.peg.discard!(Newline)), pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.any), pegged.peg.discard!(eoi)))), "Markdown.Line"), "Line")(TParseTree("", false,[], s)); 6140 } 6141 } 6142 static string Line(GetName g) 6143 { 6144 return "Markdown.Line"; 6145 } 6146 6147 static TParseTree SkipBlock(TParseTree p) 6148 { 6149 if(__ctfe) 6150 { 6151 return pegged.peg.defined!(pegged.peg.or!(HtmlBlock, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("#")), pegged.peg.negLookahead!(SetextBottom1), pegged.peg.negLookahead!(SetextBottom2), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.oneOrMore!(BlankLine), Line), "Markdown.SkipBlock")(p); 6152 } 6153 else 6154 { 6155 if (auto m = tuple(`SkipBlock`, p.end) in memo) 6156 return *m; 6157 else 6158 { 6159 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(HtmlBlock, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("#")), pegged.peg.negLookahead!(SetextBottom1), pegged.peg.negLookahead!(SetextBottom2), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.oneOrMore!(BlankLine), Line), "Markdown.SkipBlock"), "SkipBlock")(p); 6160 memo[tuple(`SkipBlock`, p.end)] = result; 6161 return result; 6162 } 6163 } 6164 } 6165 6166 static TParseTree SkipBlock(string s) 6167 { 6168 if(__ctfe) 6169 { 6170 return pegged.peg.defined!(pegged.peg.or!(HtmlBlock, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("#")), pegged.peg.negLookahead!(SetextBottom1), pegged.peg.negLookahead!(SetextBottom2), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.oneOrMore!(BlankLine), Line), "Markdown.SkipBlock")(TParseTree("", false,[], s)); 6171 } 6172 else 6173 { 6174 forgetMemo(); 6175 return hooked!(pegged.peg.defined!(pegged.peg.or!(HtmlBlock, pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("#")), pegged.peg.negLookahead!(SetextBottom1), pegged.peg.negLookahead!(SetextBottom2), pegged.peg.negLookahead!(BlankLine), Line)), pegged.peg.zeroOrMore!(BlankLine)), pegged.peg.oneOrMore!(BlankLine), Line), "Markdown.SkipBlock"), "SkipBlock")(TParseTree("", false,[], s)); 6176 } 6177 } 6178 static string SkipBlock(GetName g) 6179 { 6180 return "Markdown.SkipBlock"; 6181 } 6182 6183 static TParseTree ExtendedSpecialChar(TParseTree p) 6184 { 6185 if(__ctfe) 6186 { 6187 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("."), pegged.peg.literal!("-"), quote, doublequote, pegged.peg.literal!("^")), "Markdown.ExtendedSpecialChar")(p); 6188 } 6189 else 6190 { 6191 if (auto m = tuple(`ExtendedSpecialChar`, p.end) in memo) 6192 return *m; 6193 else 6194 { 6195 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("."), pegged.peg.literal!("-"), quote, doublequote, pegged.peg.literal!("^")), "Markdown.ExtendedSpecialChar"), "ExtendedSpecialChar")(p); 6196 memo[tuple(`ExtendedSpecialChar`, p.end)] = result; 6197 return result; 6198 } 6199 } 6200 } 6201 6202 static TParseTree ExtendedSpecialChar(string s) 6203 { 6204 if(__ctfe) 6205 { 6206 return pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("."), pegged.peg.literal!("-"), quote, doublequote, pegged.peg.literal!("^")), "Markdown.ExtendedSpecialChar")(TParseTree("", false,[], s)); 6207 } 6208 else 6209 { 6210 forgetMemo(); 6211 return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.literal!("."), pegged.peg.literal!("-"), quote, doublequote, pegged.peg.literal!("^")), "Markdown.ExtendedSpecialChar"), "ExtendedSpecialChar")(TParseTree("", false,[], s)); 6212 } 6213 } 6214 static string ExtendedSpecialChar(GetName g) 6215 { 6216 return "Markdown.ExtendedSpecialChar"; 6217 } 6218 6219 static TParseTree Smart(TParseTree p) 6220 { 6221 if(__ctfe) 6222 { 6223 return pegged.peg.defined!(pegged.peg.or!(Ellipsis, Dash, SingleQuoted, DoubleQuoted, Apostrophe), "Markdown.Smart")(p); 6224 } 6225 else 6226 { 6227 if (auto m = tuple(`Smart`, p.end) in memo) 6228 return *m; 6229 else 6230 { 6231 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(Ellipsis, Dash, SingleQuoted, DoubleQuoted, Apostrophe), "Markdown.Smart"), "Smart")(p); 6232 memo[tuple(`Smart`, p.end)] = result; 6233 return result; 6234 } 6235 } 6236 } 6237 6238 static TParseTree Smart(string s) 6239 { 6240 if(__ctfe) 6241 { 6242 return pegged.peg.defined!(pegged.peg.or!(Ellipsis, Dash, SingleQuoted, DoubleQuoted, Apostrophe), "Markdown.Smart")(TParseTree("", false,[], s)); 6243 } 6244 else 6245 { 6246 forgetMemo(); 6247 return hooked!(pegged.peg.defined!(pegged.peg.or!(Ellipsis, Dash, SingleQuoted, DoubleQuoted, Apostrophe), "Markdown.Smart"), "Smart")(TParseTree("", false,[], s)); 6248 } 6249 } 6250 static string Smart(GetName g) 6251 { 6252 return "Markdown.Smart"; 6253 } 6254 6255 static TParseTree Apostrophe(TParseTree p) 6256 { 6257 if(__ctfe) 6258 { 6259 return pegged.peg.defined!(quote, "Markdown.Apostrophe")(p); 6260 } 6261 else 6262 { 6263 if (auto m = tuple(`Apostrophe`, p.end) in memo) 6264 return *m; 6265 else 6266 { 6267 TParseTree result = hooked!(pegged.peg.defined!(quote, "Markdown.Apostrophe"), "Apostrophe")(p); 6268 memo[tuple(`Apostrophe`, p.end)] = result; 6269 return result; 6270 } 6271 } 6272 } 6273 6274 static TParseTree Apostrophe(string s) 6275 { 6276 if(__ctfe) 6277 { 6278 return pegged.peg.defined!(quote, "Markdown.Apostrophe")(TParseTree("", false,[], s)); 6279 } 6280 else 6281 { 6282 forgetMemo(); 6283 return hooked!(pegged.peg.defined!(quote, "Markdown.Apostrophe"), "Apostrophe")(TParseTree("", false,[], s)); 6284 } 6285 } 6286 static string Apostrophe(GetName g) 6287 { 6288 return "Markdown.Apostrophe"; 6289 } 6290 6291 static TParseTree Ellipsis(TParseTree p) 6292 { 6293 if(__ctfe) 6294 { 6295 return pegged.peg.defined!(pegged.peg.keywords!("...", ". . ."), "Markdown.Ellipsis")(p); 6296 } 6297 else 6298 { 6299 if (auto m = tuple(`Ellipsis`, p.end) in memo) 6300 return *m; 6301 else 6302 { 6303 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!("...", ". . ."), "Markdown.Ellipsis"), "Ellipsis")(p); 6304 memo[tuple(`Ellipsis`, p.end)] = result; 6305 return result; 6306 } 6307 } 6308 } 6309 6310 static TParseTree Ellipsis(string s) 6311 { 6312 if(__ctfe) 6313 { 6314 return pegged.peg.defined!(pegged.peg.keywords!("...", ". . ."), "Markdown.Ellipsis")(TParseTree("", false,[], s)); 6315 } 6316 else 6317 { 6318 forgetMemo(); 6319 return hooked!(pegged.peg.defined!(pegged.peg.keywords!("...", ". . ."), "Markdown.Ellipsis"), "Ellipsis")(TParseTree("", false,[], s)); 6320 } 6321 } 6322 static string Ellipsis(GetName g) 6323 { 6324 return "Markdown.Ellipsis"; 6325 } 6326 6327 static TParseTree Dash(TParseTree p) 6328 { 6329 if(__ctfe) 6330 { 6331 return pegged.peg.defined!(pegged.peg.or!(EmDash, EnDash), "Markdown.Dash")(p); 6332 } 6333 else 6334 { 6335 if (auto m = tuple(`Dash`, p.end) in memo) 6336 return *m; 6337 else 6338 { 6339 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(EmDash, EnDash), "Markdown.Dash"), "Dash")(p); 6340 memo[tuple(`Dash`, p.end)] = result; 6341 return result; 6342 } 6343 } 6344 } 6345 6346 static TParseTree Dash(string s) 6347 { 6348 if(__ctfe) 6349 { 6350 return pegged.peg.defined!(pegged.peg.or!(EmDash, EnDash), "Markdown.Dash")(TParseTree("", false,[], s)); 6351 } 6352 else 6353 { 6354 forgetMemo(); 6355 return hooked!(pegged.peg.defined!(pegged.peg.or!(EmDash, EnDash), "Markdown.Dash"), "Dash")(TParseTree("", false,[], s)); 6356 } 6357 } 6358 static string Dash(GetName g) 6359 { 6360 return "Markdown.Dash"; 6361 } 6362 6363 static TParseTree EnDash(TParseTree p) 6364 { 6365 if(__ctfe) 6366 { 6367 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.posLookahead!(Digit)), "Markdown.EnDash")(p); 6368 } 6369 else 6370 { 6371 if (auto m = tuple(`EnDash`, p.end) in memo) 6372 return *m; 6373 else 6374 { 6375 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.posLookahead!(Digit)), "Markdown.EnDash"), "EnDash")(p); 6376 memo[tuple(`EnDash`, p.end)] = result; 6377 return result; 6378 } 6379 } 6380 } 6381 6382 static TParseTree EnDash(string s) 6383 { 6384 if(__ctfe) 6385 { 6386 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.posLookahead!(Digit)), "Markdown.EnDash")(TParseTree("", false,[], s)); 6387 } 6388 else 6389 { 6390 forgetMemo(); 6391 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.posLookahead!(Digit)), "Markdown.EnDash"), "EnDash")(TParseTree("", false,[], s)); 6392 } 6393 } 6394 static string EnDash(GetName g) 6395 { 6396 return "Markdown.EnDash"; 6397 } 6398 6399 static TParseTree EmDash(TParseTree p) 6400 { 6401 if(__ctfe) 6402 { 6403 return pegged.peg.defined!(pegged.peg.keywords!("---", "--"), "Markdown.EmDash")(p); 6404 } 6405 else 6406 { 6407 if (auto m = tuple(`EmDash`, p.end) in memo) 6408 return *m; 6409 else 6410 { 6411 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.keywords!("---", "--"), "Markdown.EmDash"), "EmDash")(p); 6412 memo[tuple(`EmDash`, p.end)] = result; 6413 return result; 6414 } 6415 } 6416 } 6417 6418 static TParseTree EmDash(string s) 6419 { 6420 if(__ctfe) 6421 { 6422 return pegged.peg.defined!(pegged.peg.keywords!("---", "--"), "Markdown.EmDash")(TParseTree("", false,[], s)); 6423 } 6424 else 6425 { 6426 forgetMemo(); 6427 return hooked!(pegged.peg.defined!(pegged.peg.keywords!("---", "--"), "Markdown.EmDash"), "EmDash")(TParseTree("", false,[], s)); 6428 } 6429 } 6430 static string EmDash(GetName g) 6431 { 6432 return "Markdown.EmDash"; 6433 } 6434 6435 static TParseTree SingleQuoteStart(TParseTree p) 6436 { 6437 if(__ctfe) 6438 { 6439 return pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(pegged.peg.or!(Spacechar, Newline))), "Markdown.SingleQuoteStart")(p); 6440 } 6441 else 6442 { 6443 if (auto m = tuple(`SingleQuoteStart`, p.end) in memo) 6444 return *m; 6445 else 6446 { 6447 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(pegged.peg.or!(Spacechar, Newline))), "Markdown.SingleQuoteStart"), "SingleQuoteStart")(p); 6448 memo[tuple(`SingleQuoteStart`, p.end)] = result; 6449 return result; 6450 } 6451 } 6452 } 6453 6454 static TParseTree SingleQuoteStart(string s) 6455 { 6456 if(__ctfe) 6457 { 6458 return pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(pegged.peg.or!(Spacechar, Newline))), "Markdown.SingleQuoteStart")(TParseTree("", false,[], s)); 6459 } 6460 else 6461 { 6462 forgetMemo(); 6463 return hooked!(pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(pegged.peg.or!(Spacechar, Newline))), "Markdown.SingleQuoteStart"), "SingleQuoteStart")(TParseTree("", false,[], s)); 6464 } 6465 } 6466 static string SingleQuoteStart(GetName g) 6467 { 6468 return "Markdown.SingleQuoteStart"; 6469 } 6470 6471 static TParseTree SingleQuoteEnd(TParseTree p) 6472 { 6473 if(__ctfe) 6474 { 6475 return pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(Alphanumeric)), "Markdown.SingleQuoteEnd")(p); 6476 } 6477 else 6478 { 6479 if (auto m = tuple(`SingleQuoteEnd`, p.end) in memo) 6480 return *m; 6481 else 6482 { 6483 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(Alphanumeric)), "Markdown.SingleQuoteEnd"), "SingleQuoteEnd")(p); 6484 memo[tuple(`SingleQuoteEnd`, p.end)] = result; 6485 return result; 6486 } 6487 } 6488 } 6489 6490 static TParseTree SingleQuoteEnd(string s) 6491 { 6492 if(__ctfe) 6493 { 6494 return pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(Alphanumeric)), "Markdown.SingleQuoteEnd")(TParseTree("", false,[], s)); 6495 } 6496 else 6497 { 6498 forgetMemo(); 6499 return hooked!(pegged.peg.defined!(pegged.peg.and!(quote, pegged.peg.negLookahead!(Alphanumeric)), "Markdown.SingleQuoteEnd"), "SingleQuoteEnd")(TParseTree("", false,[], s)); 6500 } 6501 } 6502 static string SingleQuoteEnd(GetName g) 6503 { 6504 return "Markdown.SingleQuoteEnd"; 6505 } 6506 6507 static TParseTree SingleQuoted(TParseTree p) 6508 { 6509 if(__ctfe) 6510 { 6511 return pegged.peg.defined!(pegged.peg.and!(SingleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(SingleQuoteEnd), Inline)), SingleQuoteEnd), "Markdown.SingleQuoted")(p); 6512 } 6513 else 6514 { 6515 if (auto m = tuple(`SingleQuoted`, p.end) in memo) 6516 return *m; 6517 else 6518 { 6519 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(SingleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(SingleQuoteEnd), Inline)), SingleQuoteEnd), "Markdown.SingleQuoted"), "SingleQuoted")(p); 6520 memo[tuple(`SingleQuoted`, p.end)] = result; 6521 return result; 6522 } 6523 } 6524 } 6525 6526 static TParseTree SingleQuoted(string s) 6527 { 6528 if(__ctfe) 6529 { 6530 return pegged.peg.defined!(pegged.peg.and!(SingleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(SingleQuoteEnd), Inline)), SingleQuoteEnd), "Markdown.SingleQuoted")(TParseTree("", false,[], s)); 6531 } 6532 else 6533 { 6534 forgetMemo(); 6535 return hooked!(pegged.peg.defined!(pegged.peg.and!(SingleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(SingleQuoteEnd), Inline)), SingleQuoteEnd), "Markdown.SingleQuoted"), "SingleQuoted")(TParseTree("", false,[], s)); 6536 } 6537 } 6538 static string SingleQuoted(GetName g) 6539 { 6540 return "Markdown.SingleQuoted"; 6541 } 6542 6543 static TParseTree DoubleQuoteStart(TParseTree p) 6544 { 6545 if(__ctfe) 6546 { 6547 return pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteStart")(p); 6548 } 6549 else 6550 { 6551 if (auto m = tuple(`DoubleQuoteStart`, p.end) in memo) 6552 return *m; 6553 else 6554 { 6555 TParseTree result = hooked!(pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteStart"), "DoubleQuoteStart")(p); 6556 memo[tuple(`DoubleQuoteStart`, p.end)] = result; 6557 return result; 6558 } 6559 } 6560 } 6561 6562 static TParseTree DoubleQuoteStart(string s) 6563 { 6564 if(__ctfe) 6565 { 6566 return pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteStart")(TParseTree("", false,[], s)); 6567 } 6568 else 6569 { 6570 forgetMemo(); 6571 return hooked!(pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteStart"), "DoubleQuoteStart")(TParseTree("", false,[], s)); 6572 } 6573 } 6574 static string DoubleQuoteStart(GetName g) 6575 { 6576 return "Markdown.DoubleQuoteStart"; 6577 } 6578 6579 static TParseTree DoubleQuoteEnd(TParseTree p) 6580 { 6581 if(__ctfe) 6582 { 6583 return pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteEnd")(p); 6584 } 6585 else 6586 { 6587 if (auto m = tuple(`DoubleQuoteEnd`, p.end) in memo) 6588 return *m; 6589 else 6590 { 6591 TParseTree result = hooked!(pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteEnd"), "DoubleQuoteEnd")(p); 6592 memo[tuple(`DoubleQuoteEnd`, p.end)] = result; 6593 return result; 6594 } 6595 } 6596 } 6597 6598 static TParseTree DoubleQuoteEnd(string s) 6599 { 6600 if(__ctfe) 6601 { 6602 return pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteEnd")(TParseTree("", false,[], s)); 6603 } 6604 else 6605 { 6606 forgetMemo(); 6607 return hooked!(pegged.peg.defined!(doublequote, "Markdown.DoubleQuoteEnd"), "DoubleQuoteEnd")(TParseTree("", false,[], s)); 6608 } 6609 } 6610 static string DoubleQuoteEnd(GetName g) 6611 { 6612 return "Markdown.DoubleQuoteEnd"; 6613 } 6614 6615 static TParseTree DoubleQuoted(TParseTree p) 6616 { 6617 if(__ctfe) 6618 { 6619 return pegged.peg.defined!(pegged.peg.and!(DoubleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(DoubleQuoteEnd), Inline)), DoubleQuoteEnd), "Markdown.DoubleQuoted")(p); 6620 } 6621 else 6622 { 6623 if (auto m = tuple(`DoubleQuoted`, p.end) in memo) 6624 return *m; 6625 else 6626 { 6627 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(DoubleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(DoubleQuoteEnd), Inline)), DoubleQuoteEnd), "Markdown.DoubleQuoted"), "DoubleQuoted")(p); 6628 memo[tuple(`DoubleQuoted`, p.end)] = result; 6629 return result; 6630 } 6631 } 6632 } 6633 6634 static TParseTree DoubleQuoted(string s) 6635 { 6636 if(__ctfe) 6637 { 6638 return pegged.peg.defined!(pegged.peg.and!(DoubleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(DoubleQuoteEnd), Inline)), DoubleQuoteEnd), "Markdown.DoubleQuoted")(TParseTree("", false,[], s)); 6639 } 6640 else 6641 { 6642 forgetMemo(); 6643 return hooked!(pegged.peg.defined!(pegged.peg.and!(DoubleQuoteStart, pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(DoubleQuoteEnd), Inline)), DoubleQuoteEnd), "Markdown.DoubleQuoted"), "DoubleQuoted")(TParseTree("", false,[], s)); 6644 } 6645 } 6646 static string DoubleQuoted(GetName g) 6647 { 6648 return "Markdown.DoubleQuoted"; 6649 } 6650 6651 static TParseTree NoteReference(TParseTree p) 6652 { 6653 if(__ctfe) 6654 { 6655 return pegged.peg.defined!(RawNoteReference, "Markdown.NoteReference")(p); 6656 } 6657 else 6658 { 6659 if (auto m = tuple(`NoteReference`, p.end) in memo) 6660 return *m; 6661 else 6662 { 6663 TParseTree result = hooked!(pegged.peg.defined!(RawNoteReference, "Markdown.NoteReference"), "NoteReference")(p); 6664 memo[tuple(`NoteReference`, p.end)] = result; 6665 return result; 6666 } 6667 } 6668 } 6669 6670 static TParseTree NoteReference(string s) 6671 { 6672 if(__ctfe) 6673 { 6674 return pegged.peg.defined!(RawNoteReference, "Markdown.NoteReference")(TParseTree("", false,[], s)); 6675 } 6676 else 6677 { 6678 forgetMemo(); 6679 return hooked!(pegged.peg.defined!(RawNoteReference, "Markdown.NoteReference"), "NoteReference")(TParseTree("", false,[], s)); 6680 } 6681 } 6682 static string NoteReference(GetName g) 6683 { 6684 return "Markdown.NoteReference"; 6685 } 6686 6687 static TParseTree RawNoteReference(TParseTree p) 6688 { 6689 if(__ctfe) 6690 { 6691 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!("]")), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":")))), "Markdown.RawNoteReference")(p); 6692 } 6693 else 6694 { 6695 if (auto m = tuple(`RawNoteReference`, p.end) in memo) 6696 return *m; 6697 else 6698 { 6699 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!("]")), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":")))), "Markdown.RawNoteReference"), "RawNoteReference")(p); 6700 memo[tuple(`RawNoteReference`, p.end)] = result; 6701 return result; 6702 } 6703 } 6704 } 6705 6706 static TParseTree RawNoteReference(string s) 6707 { 6708 if(__ctfe) 6709 { 6710 return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!("]")), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":")))), "Markdown.RawNoteReference")(TParseTree("", false,[], s)); 6711 } 6712 else 6713 { 6714 forgetMemo(); 6715 return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("[^")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(Newline), pegged.peg.negLookahead!(pegged.peg.literal!("]")), pegged.peg.any)), pegged.peg.discard!(pegged.peg.literal!("]")), pegged.peg.negLookahead!(pegged.peg.literal!(":")))), "Markdown.RawNoteReference"), "RawNoteReference")(TParseTree("", false,[], s)); 6716 } 6717 } 6718 static string RawNoteReference(GetName g) 6719 { 6720 return "Markdown.RawNoteReference"; 6721 } 6722 6723 static TParseTree Note(TParseTree p) 6724 { 6725 if(__ctfe) 6726 { 6727 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), RawNoteReference, pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.discard!(Sp), RawNoteBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.posLookahead!(Indent), RawNoteBlock))), "Markdown.Note")(p); 6728 } 6729 else 6730 { 6731 if (auto m = tuple(`Note`, p.end) in memo) 6732 return *m; 6733 else 6734 { 6735 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), RawNoteReference, pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.discard!(Sp), RawNoteBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.posLookahead!(Indent), RawNoteBlock))), "Markdown.Note"), "Note")(p); 6736 memo[tuple(`Note`, p.end)] = result; 6737 return result; 6738 } 6739 } 6740 } 6741 6742 static TParseTree Note(string s) 6743 { 6744 if(__ctfe) 6745 { 6746 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), RawNoteReference, pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.discard!(Sp), RawNoteBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.posLookahead!(Indent), RawNoteBlock))), "Markdown.Note")(TParseTree("", false,[], s)); 6747 } 6748 else 6749 { 6750 forgetMemo(); 6751 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(NonindentSpace), RawNoteReference, pegged.peg.discard!(pegged.peg.literal!(":")), pegged.peg.discard!(Sp), RawNoteBlock, pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.posLookahead!(Indent), RawNoteBlock))), "Markdown.Note"), "Note")(TParseTree("", false,[], s)); 6752 } 6753 } 6754 static string Note(GetName g) 6755 { 6756 return "Markdown.Note"; 6757 } 6758 6759 static TParseTree InlineNote(TParseTree p) 6760 { 6761 if(__ctfe) 6762 { 6763 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^[")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]"))), "Markdown.InlineNote")(p); 6764 } 6765 else 6766 { 6767 if (auto m = tuple(`InlineNote`, p.end) in memo) 6768 return *m; 6769 else 6770 { 6771 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^[")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]"))), "Markdown.InlineNote"), "InlineNote")(p); 6772 memo[tuple(`InlineNote`, p.end)] = result; 6773 return result; 6774 } 6775 } 6776 } 6777 6778 static TParseTree InlineNote(string s) 6779 { 6780 if(__ctfe) 6781 { 6782 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^[")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]"))), "Markdown.InlineNote")(TParseTree("", false,[], s)); 6783 } 6784 else 6785 { 6786 forgetMemo(); 6787 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!("^[")), pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("]")), Inline)), pegged.peg.discard!(pegged.peg.literal!("]"))), "Markdown.InlineNote"), "InlineNote")(TParseTree("", false,[], s)); 6788 } 6789 } 6790 static string InlineNote(GetName g) 6791 { 6792 return "Markdown.InlineNote"; 6793 } 6794 6795 static TParseTree Notes(TParseTree p) 6796 { 6797 if(__ctfe) 6798 { 6799 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Note, SkipBlock)), "Markdown.Notes")(p); 6800 } 6801 else 6802 { 6803 if (auto m = tuple(`Notes`, p.end) in memo) 6804 return *m; 6805 else 6806 { 6807 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Note, SkipBlock)), "Markdown.Notes"), "Notes")(p); 6808 memo[tuple(`Notes`, p.end)] = result; 6809 return result; 6810 } 6811 } 6812 } 6813 6814 static TParseTree Notes(string s) 6815 { 6816 if(__ctfe) 6817 { 6818 return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Note, SkipBlock)), "Markdown.Notes")(TParseTree("", false,[], s)); 6819 } 6820 else 6821 { 6822 forgetMemo(); 6823 return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(Note, SkipBlock)), "Markdown.Notes"), "Notes")(TParseTree("", false,[], s)); 6824 } 6825 } 6826 static string Notes(GetName g) 6827 { 6828 return "Markdown.Notes"; 6829 } 6830 6831 static TParseTree RawNoteBlock(TParseTree p) 6832 { 6833 if(__ctfe) 6834 { 6835 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), OptionallyIndentedLine)), pegged.peg.zeroOrMore!(BlankLine)), "Markdown.RawNoteBlock")(p); 6836 } 6837 else 6838 { 6839 if (auto m = tuple(`RawNoteBlock`, p.end) in memo) 6840 return *m; 6841 else 6842 { 6843 TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), OptionallyIndentedLine)), pegged.peg.zeroOrMore!(BlankLine)), "Markdown.RawNoteBlock"), "RawNoteBlock")(p); 6844 memo[tuple(`RawNoteBlock`, p.end)] = result; 6845 return result; 6846 } 6847 } 6848 } 6849 6850 static TParseTree RawNoteBlock(string s) 6851 { 6852 if(__ctfe) 6853 { 6854 return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), OptionallyIndentedLine)), pegged.peg.zeroOrMore!(BlankLine)), "Markdown.RawNoteBlock")(TParseTree("", false,[], s)); 6855 } 6856 else 6857 { 6858 forgetMemo(); 6859 return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(BlankLine), OptionallyIndentedLine)), pegged.peg.zeroOrMore!(BlankLine)), "Markdown.RawNoteBlock"), "RawNoteBlock")(TParseTree("", false,[], s)); 6860 } 6861 } 6862 static string RawNoteBlock(GetName g) 6863 { 6864 return "Markdown.RawNoteBlock"; 6865 } 6866 6867 static TParseTree opCall(TParseTree p) 6868 { 6869 TParseTree result = decimateTree(Doc(p)); 6870 result.children = [result]; 6871 result.name = "Markdown"; 6872 return result; 6873 } 6874 6875 static TParseTree opCall(string input) 6876 { 6877 if(__ctfe) 6878 { 6879 return Markdown(TParseTree(``, false, [], input, 0, 0)); 6880 } 6881 else 6882 { 6883 forgetMemo(); 6884 return Markdown(TParseTree(``, false, [], input, 0, 0)); 6885 } 6886 } 6887 static string opCall(GetName g) 6888 { 6889 return "Markdown"; 6890 } 6891 6892 6893 static void forgetMemo() 6894 { 6895 memo = null; 6896 } 6897 } 6898 } 6899 6900 alias GenericMarkdown!(ParseTree).Markdown Markdown; 6901