[][src]Function emulator::parse::read_reachable_program

pub fn read_reachable_program<R: Read>(
    reader: R
) -> Result<Vec<(u8, Instruction)>>

Parse 2i programs in string representation and return only the reachable instructions.

Instructions are considered reachable if there is a chain of instructions starting from the first one at address 0 to it. This also considers conditional jumps.

For details on the syntax of the string representation see read_program.