/++ This module was automatically generated from the following grammar: assemblyFile: list <- line+ EOF line <- :WS? (comment / instruction) comment <- :';' ~((!'\n' .)*) EOL / EOL label_list <- (label :WS? / comment? :WS?)* label <- ~(!operation ([a-zA-Z_] [a-zA-Z0-9_]*)) :WS? ':'? operation <- opcode :'.' modifier BOUND / opcode BOUND opcode <~ 'dat'i / 'mov'i / 'add'i / 'sub'i / 'mul'i / 'div'i / 'mod'i / 'jmp'i / 'jmz'i / 'jmn'i / 'djn'i / 'cmp'i / 'slt'i / 'spl'i / 'sne'i / 'seq'i / 'org'i / 'equ'i / 'end'i / 'for'i / 'rof'i pseudo_opcode <- 'org'i / 'equ'i / 'end'i / 'for'i / 'rof'i modifier <- 'ab'i / 'ba'i / 'a'i / 'b'i / 'f'i / 'x'i / 'i'i / eps mode <- '#' / '$' / '@' / '<' / '>' / '{' / '}' / '*' / eps expr <- [-+] :WS? expr / '(' :WS? expr :WS? ')' :WS? tail / term :WS? tail tail <- '%' :WS? expr / '/' :WS? expr / '*' :WS? expr / '-' :WS? expr / '+' :WS? expr / '&' :WS? expr / eps term <- label / number / expr assign <- label :WS? '=' :WS? expr number <~ [0-9]+ WS <- [ \t]+ EOL <- :'\n' / EOF EOF <- !. BOUND <- WS / EOL / EOF instruction <- label_list :WS? operation :WS? mode :WS? (assign / expr) :WS? ',' :WS? mode :WS? (expr / assign) :WS? comment / label_list :WS? operation :WS? mode :WS? (assign / expr) :WS? comment / label_list :WS? pseudo_opcode :WS? comment +/ module grammar; public import pegged.peg; import std.algorithm: startsWith; import std.functional: toDelegate; struct GenericassemblyFile(TParseTree) { import pegged.dynamic.grammar; struct assemblyFile { enum name = "assemblyFile"; static ParseTree delegate(ParseTree)[string] before; static ParseTree delegate(ParseTree)[string] after; static ParseTree delegate(ParseTree)[string] rules; static this() { rules["list"] = toDelegate(&list); rules["line"] = toDelegate(&line); rules["comment"] = toDelegate(&comment); rules["label_list"] = toDelegate(&label_list); rules["label"] = toDelegate(&label); rules["operation"] = toDelegate(&operation); rules["opcode"] = toDelegate(&opcode); rules["pseudo_opcode"] = toDelegate(&pseudo_opcode); rules["modifier"] = toDelegate(&modifier); rules["mode"] = toDelegate(&mode); rules["expr"] = toDelegate(&expr); rules["tail"] = toDelegate(&tail); rules["term"] = toDelegate(&term); rules["assign"] = toDelegate(&assign); rules["number"] = toDelegate(&number); rules["WS"] = toDelegate(&WS); rules["EOL"] = toDelegate(&EOL); rules["EOF"] = toDelegate(&EOF); rules["BOUND"] = toDelegate(&BOUND); rules["instruction"] = toDelegate(&instruction); rules["Spacing"] = toDelegate(&Spacing); } template hooked(alias r, string name) { static ParseTree hooked(ParseTree p) { ParseTree result; if (name in before) { result = before[name](p); if (result.successful) return result; } result = r(p); if (result.successful || name !in after) return result; result = after[name](p); return result; } static ParseTree hooked(string input) { return hooked!(r, name)(ParseTree("",false,[],input)); } } static void addRuleBefore(string parentRule, string ruleSyntax) { // enum name is the current grammar name DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); foreach(ruleName,rule; dg.rules) if (ruleName != "Spacing") // Keep the local Spacing rule, do not overwrite it rules[ruleName] = rule; before[parentRule] = rules[dg.startingRule]; } static void addRuleAfter(string parentRule, string ruleSyntax) { // enum name is the current grammar named DynamicGrammar dg = pegged.dynamic.grammar.grammar(name ~ ": " ~ ruleSyntax, rules); foreach(name,rule; dg.rules) { if (name != "Spacing") rules[name] = rule; } after[parentRule] = rules[dg.startingRule]; } static bool isRule(string s) { return s.startsWith("assemblyFile."); } import std.typecons:Tuple, tuple; static TParseTree[Tuple!(string, size_t)] memo; static bool blockMemo = false; mixin decimateTree; alias spacing Spacing; static TParseTree list(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(line), EOF), "assemblyFile.list")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(line), EOF), "assemblyFile.list"), "list")(p); else { if (auto m = tuple(`list`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(line), EOF), "assemblyFile.list"), "list")(p); memo[tuple(`list`, p.end)] = result; return result; } } } } static TParseTree list(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(line), EOF), "assemblyFile.list")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.oneOrMore!(line), EOF), "assemblyFile.list"), "list")(TParseTree("", false,[], s)); } } static string list(GetName g) { return "assemblyFile.list"; } static TParseTree line(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(comment, instruction)), "assemblyFile.line")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(comment, instruction)), "assemblyFile.line"), "line")(p); else { if (auto m = tuple(`line`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(comment, instruction)), "assemblyFile.line"), "line")(p); memo[tuple(`line`, p.end)] = result; return result; } } } } static TParseTree line(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(comment, instruction)), "assemblyFile.line")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(comment, instruction)), "assemblyFile.line"), "line")(TParseTree("", false,[], s)); } } static string line(GetName g) { return "assemblyFile.line"; } static TParseTree comment(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("\n")), pegged.peg.any))), EOL), EOL), "assemblyFile.comment")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("\n")), pegged.peg.any))), EOL), EOL), "assemblyFile.comment"), "comment")(p); else { if (auto m = tuple(`comment`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("\n")), pegged.peg.any))), EOL), EOL), "assemblyFile.comment"), "comment")(p); memo[tuple(`comment`, p.end)] = result; return result; } } } } static TParseTree comment(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("\n")), pegged.peg.any))), EOL), EOL), "assemblyFile.comment")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.discard!(pegged.peg.literal!(";")), pegged.peg.fuse!(pegged.peg.zeroOrMore!(pegged.peg.and!(pegged.peg.negLookahead!(pegged.peg.literal!("\n")), pegged.peg.any))), EOL), EOL), "assemblyFile.comment"), "comment")(TParseTree("", false,[], s)); } } static string comment(GetName g) { return "assemblyFile.comment"; } static TParseTree label_list(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS))), pegged.peg.and!(pegged.peg.option!(comment), pegged.peg.discard!(pegged.peg.option!(WS))))), "assemblyFile.label_list")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS))), pegged.peg.and!(pegged.peg.option!(comment), pegged.peg.discard!(pegged.peg.option!(WS))))), "assemblyFile.label_list"), "label_list")(p); else { if (auto m = tuple(`label_list`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS))), pegged.peg.and!(pegged.peg.option!(comment), pegged.peg.discard!(pegged.peg.option!(WS))))), "assemblyFile.label_list"), "label_list")(p); memo[tuple(`label_list`, p.end)] = result; return result; } } } } static TParseTree label_list(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS))), pegged.peg.and!(pegged.peg.option!(comment), pegged.peg.discard!(pegged.peg.option!(WS))))), "assemblyFile.label_list")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS))), pegged.peg.and!(pegged.peg.option!(comment), pegged.peg.discard!(pegged.peg.option!(WS))))), "assemblyFile.label_list"), "label_list")(TParseTree("", false,[], s)); } } static string label_list(GetName g) { return "assemblyFile.label_list"; } static TParseTree label(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(operation), pegged.peg.and!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.literal!("_")), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("_")))))), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.option!(pegged.peg.literal!(":"))), "assemblyFile.label")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(operation), pegged.peg.and!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.literal!("_")), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("_")))))), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.option!(pegged.peg.literal!(":"))), "assemblyFile.label"), "label")(p); else { if (auto m = tuple(`label`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(operation), pegged.peg.and!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.literal!("_")), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("_")))))), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.option!(pegged.peg.literal!(":"))), "assemblyFile.label"), "label")(p); memo[tuple(`label`, p.end)] = result; return result; } } } } static TParseTree label(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(operation), pegged.peg.and!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.literal!("_")), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("_")))))), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.option!(pegged.peg.literal!(":"))), "assemblyFile.label")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.and!(pegged.peg.fuse!(pegged.peg.and!(pegged.peg.negLookahead!(operation), pegged.peg.and!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.literal!("_")), pegged.peg.zeroOrMore!(pegged.peg.or!(pegged.peg.charRange!('a', 'z'), pegged.peg.charRange!('A', 'Z'), pegged.peg.charRange!('0', '9'), pegged.peg.literal!("_")))))), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.option!(pegged.peg.literal!(":"))), "assemblyFile.label"), "label")(TParseTree("", false,[], s)); } } static string label(GetName g) { return "assemblyFile.label"; } static TParseTree operation(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(opcode, pegged.peg.discard!(pegged.peg.literal!(".")), modifier, BOUND), pegged.peg.and!(opcode, BOUND)), "assemblyFile.operation")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(opcode, pegged.peg.discard!(pegged.peg.literal!(".")), modifier, BOUND), pegged.peg.and!(opcode, BOUND)), "assemblyFile.operation"), "operation")(p); else { if (auto m = tuple(`operation`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(opcode, pegged.peg.discard!(pegged.peg.literal!(".")), modifier, BOUND), pegged.peg.and!(opcode, BOUND)), "assemblyFile.operation"), "operation")(p); memo[tuple(`operation`, p.end)] = result; return result; } } } } static TParseTree operation(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(opcode, pegged.peg.discard!(pegged.peg.literal!(".")), modifier, BOUND), pegged.peg.and!(opcode, BOUND)), "assemblyFile.operation")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(opcode, pegged.peg.discard!(pegged.peg.literal!(".")), modifier, BOUND), pegged.peg.and!(opcode, BOUND)), "assemblyFile.operation"), "operation")(TParseTree("", false,[], s)); } } static string operation(GetName g) { return "assemblyFile.operation"; } static TParseTree opcode(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("dat"), pegged.peg.caseInsensitiveLiteral!("mov"), pegged.peg.caseInsensitiveLiteral!("add"), pegged.peg.caseInsensitiveLiteral!("sub"), pegged.peg.caseInsensitiveLiteral!("mul"), pegged.peg.caseInsensitiveLiteral!("div"), pegged.peg.caseInsensitiveLiteral!("mod"), pegged.peg.caseInsensitiveLiteral!("jmp"), pegged.peg.caseInsensitiveLiteral!("jmz"), pegged.peg.caseInsensitiveLiteral!("jmn"), pegged.peg.caseInsensitiveLiteral!("djn"), pegged.peg.caseInsensitiveLiteral!("cmp"), pegged.peg.caseInsensitiveLiteral!("slt"), pegged.peg.caseInsensitiveLiteral!("spl"), pegged.peg.caseInsensitiveLiteral!("sne"), pegged.peg.caseInsensitiveLiteral!("seq"), pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof"))), "assemblyFile.opcode")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("dat"), pegged.peg.caseInsensitiveLiteral!("mov"), pegged.peg.caseInsensitiveLiteral!("add"), pegged.peg.caseInsensitiveLiteral!("sub"), pegged.peg.caseInsensitiveLiteral!("mul"), pegged.peg.caseInsensitiveLiteral!("div"), pegged.peg.caseInsensitiveLiteral!("mod"), pegged.peg.caseInsensitiveLiteral!("jmp"), pegged.peg.caseInsensitiveLiteral!("jmz"), pegged.peg.caseInsensitiveLiteral!("jmn"), pegged.peg.caseInsensitiveLiteral!("djn"), pegged.peg.caseInsensitiveLiteral!("cmp"), pegged.peg.caseInsensitiveLiteral!("slt"), pegged.peg.caseInsensitiveLiteral!("spl"), pegged.peg.caseInsensitiveLiteral!("sne"), pegged.peg.caseInsensitiveLiteral!("seq"), pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof"))), "assemblyFile.opcode"), "opcode")(p); else { if (auto m = tuple(`opcode`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("dat"), pegged.peg.caseInsensitiveLiteral!("mov"), pegged.peg.caseInsensitiveLiteral!("add"), pegged.peg.caseInsensitiveLiteral!("sub"), pegged.peg.caseInsensitiveLiteral!("mul"), pegged.peg.caseInsensitiveLiteral!("div"), pegged.peg.caseInsensitiveLiteral!("mod"), pegged.peg.caseInsensitiveLiteral!("jmp"), pegged.peg.caseInsensitiveLiteral!("jmz"), pegged.peg.caseInsensitiveLiteral!("jmn"), pegged.peg.caseInsensitiveLiteral!("djn"), pegged.peg.caseInsensitiveLiteral!("cmp"), pegged.peg.caseInsensitiveLiteral!("slt"), pegged.peg.caseInsensitiveLiteral!("spl"), pegged.peg.caseInsensitiveLiteral!("sne"), pegged.peg.caseInsensitiveLiteral!("seq"), pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof"))), "assemblyFile.opcode"), "opcode")(p); memo[tuple(`opcode`, p.end)] = result; return result; } } } } static TParseTree opcode(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("dat"), pegged.peg.caseInsensitiveLiteral!("mov"), pegged.peg.caseInsensitiveLiteral!("add"), pegged.peg.caseInsensitiveLiteral!("sub"), pegged.peg.caseInsensitiveLiteral!("mul"), pegged.peg.caseInsensitiveLiteral!("div"), pegged.peg.caseInsensitiveLiteral!("mod"), pegged.peg.caseInsensitiveLiteral!("jmp"), pegged.peg.caseInsensitiveLiteral!("jmz"), pegged.peg.caseInsensitiveLiteral!("jmn"), pegged.peg.caseInsensitiveLiteral!("djn"), pegged.peg.caseInsensitiveLiteral!("cmp"), pegged.peg.caseInsensitiveLiteral!("slt"), pegged.peg.caseInsensitiveLiteral!("spl"), pegged.peg.caseInsensitiveLiteral!("sne"), pegged.peg.caseInsensitiveLiteral!("seq"), pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof"))), "assemblyFile.opcode")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("dat"), pegged.peg.caseInsensitiveLiteral!("mov"), pegged.peg.caseInsensitiveLiteral!("add"), pegged.peg.caseInsensitiveLiteral!("sub"), pegged.peg.caseInsensitiveLiteral!("mul"), pegged.peg.caseInsensitiveLiteral!("div"), pegged.peg.caseInsensitiveLiteral!("mod"), pegged.peg.caseInsensitiveLiteral!("jmp"), pegged.peg.caseInsensitiveLiteral!("jmz"), pegged.peg.caseInsensitiveLiteral!("jmn"), pegged.peg.caseInsensitiveLiteral!("djn"), pegged.peg.caseInsensitiveLiteral!("cmp"), pegged.peg.caseInsensitiveLiteral!("slt"), pegged.peg.caseInsensitiveLiteral!("spl"), pegged.peg.caseInsensitiveLiteral!("sne"), pegged.peg.caseInsensitiveLiteral!("seq"), pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof"))), "assemblyFile.opcode"), "opcode")(TParseTree("", false,[], s)); } } static string opcode(GetName g) { return "assemblyFile.opcode"; } static TParseTree pseudo_opcode(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof")), "assemblyFile.pseudo_opcode")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof")), "assemblyFile.pseudo_opcode"), "pseudo_opcode")(p); else { if (auto m = tuple(`pseudo_opcode`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof")), "assemblyFile.pseudo_opcode"), "pseudo_opcode")(p); memo[tuple(`pseudo_opcode`, p.end)] = result; return result; } } } } static TParseTree pseudo_opcode(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof")), "assemblyFile.pseudo_opcode")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("org"), pegged.peg.caseInsensitiveLiteral!("equ"), pegged.peg.caseInsensitiveLiteral!("end"), pegged.peg.caseInsensitiveLiteral!("for"), pegged.peg.caseInsensitiveLiteral!("rof")), "assemblyFile.pseudo_opcode"), "pseudo_opcode")(TParseTree("", false,[], s)); } } static string pseudo_opcode(GetName g) { return "assemblyFile.pseudo_opcode"; } static TParseTree modifier(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("ab"), pegged.peg.caseInsensitiveLiteral!("ba"), pegged.peg.caseInsensitiveLiteral!("a"), pegged.peg.caseInsensitiveLiteral!("b"), pegged.peg.caseInsensitiveLiteral!("f"), pegged.peg.caseInsensitiveLiteral!("x"), pegged.peg.caseInsensitiveLiteral!("i"), eps), "assemblyFile.modifier")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("ab"), pegged.peg.caseInsensitiveLiteral!("ba"), pegged.peg.caseInsensitiveLiteral!("a"), pegged.peg.caseInsensitiveLiteral!("b"), pegged.peg.caseInsensitiveLiteral!("f"), pegged.peg.caseInsensitiveLiteral!("x"), pegged.peg.caseInsensitiveLiteral!("i"), eps), "assemblyFile.modifier"), "modifier")(p); else { if (auto m = tuple(`modifier`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("ab"), pegged.peg.caseInsensitiveLiteral!("ba"), pegged.peg.caseInsensitiveLiteral!("a"), pegged.peg.caseInsensitiveLiteral!("b"), pegged.peg.caseInsensitiveLiteral!("f"), pegged.peg.caseInsensitiveLiteral!("x"), pegged.peg.caseInsensitiveLiteral!("i"), eps), "assemblyFile.modifier"), "modifier")(p); memo[tuple(`modifier`, p.end)] = result; return result; } } } } static TParseTree modifier(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("ab"), pegged.peg.caseInsensitiveLiteral!("ba"), pegged.peg.caseInsensitiveLiteral!("a"), pegged.peg.caseInsensitiveLiteral!("b"), pegged.peg.caseInsensitiveLiteral!("f"), pegged.peg.caseInsensitiveLiteral!("x"), pegged.peg.caseInsensitiveLiteral!("i"), eps), "assemblyFile.modifier")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.caseInsensitiveLiteral!("ab"), pegged.peg.caseInsensitiveLiteral!("ba"), pegged.peg.caseInsensitiveLiteral!("a"), pegged.peg.caseInsensitiveLiteral!("b"), pegged.peg.caseInsensitiveLiteral!("f"), pegged.peg.caseInsensitiveLiteral!("x"), pegged.peg.caseInsensitiveLiteral!("i"), eps), "assemblyFile.modifier"), "modifier")(TParseTree("", false,[], s)); } } static string modifier(GetName g) { return "assemblyFile.modifier"; } static TParseTree mode(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(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!("*"), eps), "assemblyFile.mode")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(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!("*"), eps), "assemblyFile.mode"), "mode")(p); else { if (auto m = tuple(`mode`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(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!("*"), eps), "assemblyFile.mode"), "mode")(p); memo[tuple(`mode`, p.end)] = result; return result; } } } } static TParseTree mode(string s) { if(__ctfe) { return pegged.peg.defined!(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!("*"), eps), "assemblyFile.mode")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(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!("*"), eps), "assemblyFile.mode"), "mode")(TParseTree("", false,[], s)); } } static string mode(GetName g) { return "assemblyFile.mode"; } static TParseTree expr(TParseTree p) { if(__ctfe) { assert(false, "expr is left-recursive, which is not supported at compile-time. Consider using asModule()."); return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("+")), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("("), pegged.peg.discard!(pegged.peg.option!(WS)), expr, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(")"), pegged.peg.discard!(pegged.peg.option!(WS)), tail), pegged.peg.and!(term, pegged.peg.discard!(pegged.peg.option!(WS)), tail)), "assemblyFile.expr")(p); } else { static TParseTree[size_t /*position*/] seed; if (auto s = p.end in seed) return *s; auto current = fail(p); seed[p.end] = current; blockMemo = true; while (true) { auto result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("+")), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("("), pegged.peg.discard!(pegged.peg.option!(WS)), expr, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(")"), pegged.peg.discard!(pegged.peg.option!(WS)), tail), pegged.peg.and!(term, pegged.peg.discard!(pegged.peg.option!(WS)), tail)), "assemblyFile.expr"), "expr")(p); if (result.end > current.end) { current = result; seed[p.end] = current; } else { seed.remove(p.end); blockMemo = false; return current; } } } } static TParseTree expr(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("+")), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("("), pegged.peg.discard!(pegged.peg.option!(WS)), expr, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(")"), pegged.peg.discard!(pegged.peg.option!(WS)), tail), pegged.peg.and!(term, pegged.peg.discard!(pegged.peg.option!(WS)), tail)), "assemblyFile.expr")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.or!(pegged.peg.literal!("-"), pegged.peg.literal!("+")), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("("), pegged.peg.discard!(pegged.peg.option!(WS)), expr, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(")"), pegged.peg.discard!(pegged.peg.option!(WS)), tail), pegged.peg.and!(term, pegged.peg.discard!(pegged.peg.option!(WS)), tail)), "assemblyFile.expr"), "expr")(TParseTree("", false,[], s)); } } static string expr(GetName g) { return "assemblyFile.expr"; } static TParseTree tail(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("%"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("/"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("*"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("+"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), eps), "assemblyFile.tail")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("%"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("/"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("*"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("+"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), eps), "assemblyFile.tail"), "tail")(p); else { if (auto m = tuple(`tail`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("%"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("/"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("*"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("+"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), eps), "assemblyFile.tail"), "tail")(p); memo[tuple(`tail`, p.end)] = result; return result; } } } } static TParseTree tail(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("%"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("/"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("*"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("+"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), eps), "assemblyFile.tail")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(pegged.peg.literal!("%"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("/"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("*"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("-"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("+"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), pegged.peg.and!(pegged.peg.literal!("&"), pegged.peg.discard!(pegged.peg.option!(WS)), expr), eps), "assemblyFile.tail"), "tail")(TParseTree("", false,[], s)); } } static string tail(GetName g) { return "assemblyFile.tail"; } static TParseTree term(TParseTree p) { if(__ctfe) { assert(false, "term is left-recursive, which is not supported at compile-time. Consider using asModule()."); return pegged.peg.defined!(pegged.peg.or!(label, number, expr), "assemblyFile.term")(p); } else { static TParseTree[size_t /*position*/] seed; if (auto s = p.end in seed) return *s; auto current = fail(p); seed[p.end] = current; blockMemo = true; while (true) { auto result = hooked!(pegged.peg.defined!(pegged.peg.or!(label, number, expr), "assemblyFile.term"), "term")(p); if (result.end > current.end) { current = result; seed[p.end] = current; } else { seed.remove(p.end); blockMemo = false; return current; } } } } static TParseTree term(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(label, number, expr), "assemblyFile.term")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(label, number, expr), "assemblyFile.term"), "term")(TParseTree("", false,[], s)); } } static string term(GetName g) { return "assemblyFile.term"; } static TParseTree assign(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!("="), pegged.peg.discard!(pegged.peg.option!(WS)), expr), "assemblyFile.assign")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!("="), pegged.peg.discard!(pegged.peg.option!(WS)), expr), "assemblyFile.assign"), "assign")(p); else { if (auto m = tuple(`assign`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!("="), pegged.peg.discard!(pegged.peg.option!(WS)), expr), "assemblyFile.assign"), "assign")(p); memo[tuple(`assign`, p.end)] = result; return result; } } } } static TParseTree assign(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!("="), pegged.peg.discard!(pegged.peg.option!(WS)), expr), "assemblyFile.assign")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.and!(label, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!("="), pegged.peg.discard!(pegged.peg.option!(WS)), expr), "assemblyFile.assign"), "assign")(TParseTree("", false,[], s)); } } static string assign(GetName g) { return "assemblyFile.assign"; } static TParseTree number(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "assemblyFile.number")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "assemblyFile.number"), "number")(p); else { if (auto m = tuple(`number`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "assemblyFile.number"), "number")(p); memo[tuple(`number`, p.end)] = result; return result; } } } } static TParseTree number(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "assemblyFile.number")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.fuse!(pegged.peg.oneOrMore!(pegged.peg.charRange!('0', '9'))), "assemblyFile.number"), "number")(TParseTree("", false,[], s)); } } static string number(GetName g) { return "assemblyFile.number"; } static TParseTree WS(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"))), "assemblyFile.WS")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"))), "assemblyFile.WS"), "WS")(p); else { if (auto m = tuple(`WS`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"))), "assemblyFile.WS"), "WS")(p); memo[tuple(`WS`, p.end)] = result; return result; } } } } static TParseTree WS(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"))), "assemblyFile.WS")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.oneOrMore!(pegged.peg.or!(pegged.peg.literal!(" "), pegged.peg.literal!("\t"))), "assemblyFile.WS"), "WS")(TParseTree("", false,[], s)); } } static string WS(GetName g) { return "assemblyFile.WS"; } static TParseTree EOL(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.discard!(pegged.peg.literal!("\n")), EOF), "assemblyFile.EOL")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.discard!(pegged.peg.literal!("\n")), EOF), "assemblyFile.EOL"), "EOL")(p); else { if (auto m = tuple(`EOL`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.discard!(pegged.peg.literal!("\n")), EOF), "assemblyFile.EOL"), "EOL")(p); memo[tuple(`EOL`, p.end)] = result; return result; } } } } static TParseTree EOL(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.discard!(pegged.peg.literal!("\n")), EOF), "assemblyFile.EOL")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.discard!(pegged.peg.literal!("\n")), EOF), "assemblyFile.EOL"), "EOL")(TParseTree("", false,[], s)); } } static string EOL(GetName g) { return "assemblyFile.EOL"; } static TParseTree EOF(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.negLookahead!(pegged.peg.any), "assemblyFile.EOF")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.negLookahead!(pegged.peg.any), "assemblyFile.EOF"), "EOF")(p); else { if (auto m = tuple(`EOF`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.negLookahead!(pegged.peg.any), "assemblyFile.EOF"), "EOF")(p); memo[tuple(`EOF`, p.end)] = result; return result; } } } } static TParseTree EOF(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.negLookahead!(pegged.peg.any), "assemblyFile.EOF")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.negLookahead!(pegged.peg.any), "assemblyFile.EOF"), "EOF")(TParseTree("", false,[], s)); } } static string EOF(GetName g) { return "assemblyFile.EOF"; } static TParseTree BOUND(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(WS, EOL, EOF), "assemblyFile.BOUND")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(WS, EOL, EOF), "assemblyFile.BOUND"), "BOUND")(p); else { if (auto m = tuple(`BOUND`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(WS, EOL, EOF), "assemblyFile.BOUND"), "BOUND")(p); memo[tuple(`BOUND`, p.end)] = result; return result; } } } } static TParseTree BOUND(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(WS, EOL, EOF), "assemblyFile.BOUND")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(WS, EOL, EOF), "assemblyFile.BOUND"), "BOUND")(TParseTree("", false,[], s)); } } static string BOUND(GetName g) { return "assemblyFile.BOUND"; } static TParseTree instruction(TParseTree p) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(","), pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(expr, assign), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), pseudo_opcode, pegged.peg.discard!(pegged.peg.option!(WS)), comment)), "assemblyFile.instruction")(p); } else { if (blockMemo) return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(","), pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(expr, assign), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), pseudo_opcode, pegged.peg.discard!(pegged.peg.option!(WS)), comment)), "assemblyFile.instruction"), "instruction")(p); else { if (auto m = tuple(`instruction`, p.end) in memo) return *m; else { TParseTree result = hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(","), pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(expr, assign), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), pseudo_opcode, pegged.peg.discard!(pegged.peg.option!(WS)), comment)), "assemblyFile.instruction"), "instruction")(p); memo[tuple(`instruction`, p.end)] = result; return result; } } } } static TParseTree instruction(string s) { if(__ctfe) { return pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(","), pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(expr, assign), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), pseudo_opcode, pegged.peg.discard!(pegged.peg.option!(WS)), comment)), "assemblyFile.instruction")(TParseTree("", false,[], s)); } else { memo = null; return hooked!(pegged.peg.defined!(pegged.peg.or!(pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.literal!(","), pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(expr, assign), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), operation, pegged.peg.discard!(pegged.peg.option!(WS)), mode, pegged.peg.discard!(pegged.peg.option!(WS)), pegged.peg.or!(assign, expr), pegged.peg.discard!(pegged.peg.option!(WS)), comment), pegged.peg.and!(label_list, pegged.peg.discard!(pegged.peg.option!(WS)), pseudo_opcode, pegged.peg.discard!(pegged.peg.option!(WS)), comment)), "assemblyFile.instruction"), "instruction")(TParseTree("", false,[], s)); } } static string instruction(GetName g) { return "assemblyFile.instruction"; } static TParseTree opCall(TParseTree p) { TParseTree result = decimateTree(list(p)); result.children = [result]; result.name = "assemblyFile"; return result; } static TParseTree opCall(string input) { if(__ctfe) { return assemblyFile(TParseTree(``, false, [], input, 0, 0)); } else { memo = null; return assemblyFile(TParseTree(``, false, [], input, 0, 0)); } } static string opCall(GetName g) { return "assemblyFile"; } } } alias GenericassemblyFile!(ParseTree).assemblyFile assemblyFile;