def parse_instruction(string, location, tokens):
    prefix = tokens.get("prefix", None)
    mnemonic = tokens.get("mnemonic")
    operands = [op for op in tokens.get("operands", [])]

    infer_operands_size(operands)

    instr = X86Instruction(
        prefix,
        mnemonic,
        operands,
        arch_info.architecture_mode
    )

    return instr

# Grammar Rules
# ============================================================================ #
Parse an x86 instruction.
dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86parser.py/parse_instruction