pub enum RuleBody {
    Or(Or),
    Sequence(Sequence),
}
Expand description

The body of a rule. The body can be just a Sequence (of symbols) or an Or. The latter is equivalent to a set of rules with the same head, each with a sequence as the body.

When a rule is applied, a NonTerminal Symbol is replaced with the RuleBody. If the body is an Or, one of the sequences of the Or has to be chosen.

Variants

Or(Or)

Sequence(Sequence)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.