Struct panopticon_core::disassembler::State [] [src]

pub struct State<A: Architecture> {
    pub address: u64,
    pub tokens: Vec<A::Token>,
    pub groups: Vec<(String, u64)>,
    pub mnemonics: Vec<Mnemonic>,
    pub jumps: Vec<(u64, Rvalue, Guard)>,
    pub configuration: A::Configuration,
    // some fields omitted
}

Disassembler state. This struct passes data about matched tokes from the Disassembler to the semantic function. The function also uses the type to pass back recognized mnemonics and jumps. See [Disassembler].

Fields

Start of the token sequence

Matched tokens

Extracted capture groups

Mnemonics recognized in the token sequence

Jumps/branches originating from the recognized mnemonics

Current CPU state

Methods

impl<A: Architecture> State<A>
[src]

[src]

Create a new State for a token sequence starting at a.

[src]

Returns the value of capture group n.

Panics

Panics if no such capture group was defined.

[src]

Returns true if capture group n was defined.

[src]

Append a new mnemonic. The mnemonic starts after the end of the last, or the start of the matched token sequence if it is the first. The new mnemonic n will be len bytes in size. Arguments for the mnemonic are given in ops and formatted according to fmt. The function f is called with the current CPU state and expected to return the IL statementes that implement the mnemonic.

[src]

Append a new mnemonic Same a mnemonic but with f returning the mnemonic IL and the arguments.

[src]

Append a jump/branch from the end of the last mnemonic to v, guarded by g.

[src]

Append a jump/branch from origin to v, guarded by g.

Trait Implementations

impl<A: Architecture> From<State<A>> for Match<A>
[src]

[src]

Performs the conversion.

impl<A: Debug + Architecture> Debug for State<A> where
    A::Token: Debug,
    A::Configuration: Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<A: Clone + Architecture> Clone for State<A> where
    A::Token: Clone,
    A::Configuration: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more