Crate anabaena

source ·

Structs

Qualifier for selecting a LRulesSet, where the neighbors of the token are known as constants, with some direct adjacency from the character being matched. This enables “Context-sensitive grammars”; where the context in question simply matches the exact characters neighboring the selected character.
Runs the production rules on only the indicies of the string returned by get_indicies().
Production rules that depend on surrounding characters when selecting for a specific character, ordered by gradually relaxing constraints.
A set of rules to apply when a token is matched, with a weight (u8) - the higher the weight compared to the rest of the options, the more likely it will be selected (i.e., this set of production rules satisfies a stochastic grammar).
An L-System consists of the current string of tokens, and the rules applied to it.
Qualifier for selecting a LRulesSet, where neighbors of the token must pass a Boolean predicate. This enables “Context-sensitive grammars”; where the context in question is more flexible than the ExactNeighbors version, and simply has to pass a predicate.
Runs the production rules on every character in the string, every iteration.
Runs the production rules on only the characters which had values generated last iteration.

Traits

Trait that represents contexts which can independently track the indicies of the tokens valid for generation in a particular L-System string.
Trait for qualifying phantom types for the L-System.
Implement this trait if you want to share an alternative mutable context throughout your production rules.
Trait for applying production rules bound by LRulesSet, generic in the mechanism by which a selected character is matched.
Trait for applying production rules bound by LRulesQualified, generic in the mechanism by which a selected character is matched.

Type Definitions

Exact match of tokens to a set of production rules via a function.
Exact match of tokens to a set of production rules via a function, also including the token’s index in the string being processed.
Exact match of tokens to a set of production rules via a HashMap.
Simple type that qualifies either a prefix or suffix of tokens T.