public virtual Parser <ISyntaxNode> RegLit(string mnemonic)
 {
     return(from mnem in UpperOrLowerStr(mnemonic)
            from ws in Parse.WhiteSpace
            from args in DoubleArg(Register, HexLiteral.Or(SquareBracketExpression))
            select new InstructionNode(mnem, mnemonic + "_reg_lit", args));
 }
 public virtual Parser <ISyntaxNode> SingleLit(string mnemonic)
 {
     return(from mnem in UpperOrLowerStr(mnemonic)
            from ws in Parse.WhiteSpace
            from lit in HexLiteral.Or(RegPtrinternal)
            from os in Parse.WhiteSpace.Optional()
            select new InstructionNode(mnem, mnem + "_lit", lit));
 }
 public virtual Parser <ISyntaxNode> LitMem(string mnemonic)
 {
     return(from mnem in UpperOrLowerStr(mnemonic)
            from ws in Parse.WhiteSpace
            from args in DoubleArg(
                HexLiteral.Or(
                    RegPtrinternal),
                Address.Or(RegPtrinternal))
            select new InstructionNode(mnem, mnemonic + "_lit_mem", args));
 }
 public virtual Parser <ISyntaxNode> LitOffReg(string mnemonic)
 {
     return(from mnem in UpperOrLowerStr(mnemonic)
            from ws in Parse.WhiteSpace
            from lit in HexLiteral.Or(RegPtrinternal)
            from sep in InstructionSeperator
            from r1 in Parse.Char('&').Then((arg) => Register)
            from sep2 in InstructionSeperator
            from r2 in Register
            from osss in Parse.WhiteSpace.Optional()
            select new InstructionNode(mnem, mnemonic + "_lit_off_reg", lit, r1, r2));
 }