Expand description
Collection of tools for defining a group of Production rules on strings
of symbols.
§Creating systems
§Using System
- TODO Talk about
System::newandSystem::default. - TODO Talk about
System::of_family. - TODO define a system
A production that produces the empty string can be represented as so:
let production = system.parse_production("X -> ").unwrap();Context sensitive productions. todo More detail here
let production = system.parse_production("G < S -> S G").unwrap();
let string = parser::parse_prod_string("S G S").unwrap();
assert!(!production.matches(&string, 0)); // Does not match the first S
assert!( production.matches(&string, 2)); // Matches the last S- todo discuss stochastic rules
§Collections of Symbol and Production
TODO talk about collections of symbols and productions.
§Families
TODO talk about families
§Thread safety
TODO Talk about thread safety
§See also
Modules§
Structs§
- RunSettings
- Defines constraints on deriving strings from an
System. - System
- Represents an L-system. This is the base for running the production rules.
Functions§
- derive
- derive_
once - Runs one step of an iteration, using the given production rules.
- find_
matching - Given a vector of productions, this returns a reference to a production that matches the string at the given location.