[−][src]Function liblet::production::productions
pub fn productions(string: &str) -> Vec<Production>
Convenience function for creating a collection of productions from a raw string.
It returns the productions directly,
as opposed to the Result
returned from the production from_string method.
Panics
Panics if some error occurred during productions creation (see production from_string method for further details)
Examples
use liblet::production::productions; let p = productions(" A -> B C B -> b "); assert_eq!(p.len(), 2);