def __init__(self, insn, **_):
self.__insn = insn
return super().__init__()
def __init__(self, insn, **_):
self.__insn = insn
return super().__init__()
raise NotImplementedError
@contextlib.contextmanager
def record(self, record):
if record.name == self.__insn:
raise NotImplementedError
@contextlib.contextmanager
def record(self, record):
if record.name == self.__insn:
-class OpcodesVisitor(ConcreteInstructionVisitor):
- def handler(self, record):
+class OpcodesVisitor(InstructionVisitor):
+ def concrete_record(self, record):
-class OperandsVisitor(ConcreteInstructionVisitor):
- def handler(self, record):
+class OperandsVisitor(InstructionVisitor):
+ def concrete_record(self, record):
-class PCodeVisitor(ConcreteInstructionVisitor):
- def handler(self, record):
+class PCodeVisitor(InstructionVisitor):
+ def concrete_record(self, record):
for (command, (visitor, help)) in commands.items():
parser = main_subparser.add_parser(command, help=help)
for (command, (visitor, help)) in commands.items():
parser = main_subparser.add_parser(command, help=help)
parser.add_argument("insn", type=Instruction,
metavar="INSN", help="instruction")
parser.add_argument("insn", type=Instruction,
metavar="INSN", help="instruction")