pub fn parse_and_optimize( grammar: &str, ) -> Result<(Vec<&'_ str>, Vec<OptimizedRule>), Vec<Error<Rule>>>
Parses, validates, processes and optimizes the provided grammar.