pub fn validate_grammar(rules: &[RuleDef]) -> Vec<ValidationError>
Validate a grammar and return any errors found