[][src]Enum gf::isa::RuleAction

pub enum RuleAction {
    ApplyBitVecOperator(BitVecOperator),
    ApplyRule(RuleId),
    CheckFeature(FeatureCheck),
    Dup(usize),
    EmitMorpheme(MorphemeId),
    EmitOperand(OperandModeId),
    Gather(u128),
    MatchPattern(BitPat),
    Pop(usize),
    Push(u128usize),
}

Encoding rule action.

Variants

ApplyBitVecOperator(BitVecOperator)

Apply a bit vector operation.

ApplyRule(RuleId)

Apply another rule.

The action succeeds iff the rule succeeds; the decoder state is modified as per the rule actions.

The arguments are taken from the top of the stack where stack slot i holds value for the ith argument of the rule.

CheckFeature(FeatureCheck)

Perform a feature check.

The action succeeds iff the feature check expression evaluates to true; the decoder state is unmodified.

Dup(usize)

Duplicate an item from a stack slot on top of the stack.

The action always succeeds; the stack is updated.

EmitMorpheme(MorphemeId)

Emit a morpheme.

The action always succeeds; the morpheme ID is inserted into the decoder state.

EmitOperand(OperandModeId)

Emit an operand.

The action always succeeds; the operand is inserted into the decoder state.

The attributes are taken from the top of the stack where stack slot i holds value for the ith argument of the rule. After the action the items are removed from the stack.

Gather(u128)

Gather bits selected by the mask from the value at the top of the stack, and push it onto the top of the stack, replacing the previous value.

The action succeeds iff the value at the top of the stack is long enough for the mask; the stack is updated. After the action the previous top item is replaced.

MatchPattern(BitPat)

Match value at the top of the stack against a pattern.

The action succeeds iff the pattern matches.

Pop(usize)

Remove items from top of the stack.

The action always succeeds; the stack is updated.

Push(u128usize)

Push a value onto the stack.

The action always succeeds; the stack is updated.

Trait Implementations

impl Clone for RuleAction[src]

impl Debug for RuleAction[src]

Auto Trait Implementations

impl Send for RuleAction

impl Sync for RuleAction

impl Unpin for RuleAction

impl UnwindSafe for RuleAction

impl RefUnwindSafe for RuleAction

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]