Struct brain::Instructions [] [src]

pub struct Instructions(_);

Methods

impl Instructions
[src]

Generate instructions from the given program syntax tree

Optimize the instructions based on the given optimization level

The number of instructions in this instructions set

Add instructions that move from a given offset to the other offset using the fewest instructions possible

Add an instruction to move one cell to the right

Add instructions that move n cells to the right

Add an instruction to move one cell to the left

Add instructions that move n cells to the left

Adds instructions that increment/decrement the current cell from the given value to the other given value

Add an instruction to increment the current cell once

Add instructions that increment the current cell n times

Add an instruction to decrement the current cell once

Add instructions that decrement the current cell n times

Adds instructions which set the cell at the current position to zero regardless of its current value

Adds instructions which set the next n cells (including the current one) to zero Example: zero_cells(3) will set the current cell and the next two to zero

Stores the given bytes in each location starting at the current cell The pointer ends up at the cell immediately after the last character written IMPORTANT: Assumes that the current cell and all consecutive cells to be written into are zero to begin with

Add an instruction that will write the current cell

Add instructions that will write the next n consecutive cells starting at the current cell

Add an instruction that will read a single byte into the current cell

Add instructions that will read input into the next n consecutive cells starting at the current cell

Add an instruction which will only jump forward to the matching jump backward instruction if the current cell is zero

Add an instruction which will only jump backward to the previous matching jump forward instruction if the current cell is not zero

Trait Implementations

impl Debug for Instructions
[src]

Formats the value using the given formatter.

impl PartialEq for Instructions
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Instructions
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Into<String> for Instructions
[src]

Performs the conversion.

impl IntoIterator for Instructions
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Index<usize> for Instructions
[src]

The returned type after indexing

The method for the indexing (container[index]) operation