Function llg_validate_grammar
pub unsafe extern "C" fn llg_validate_grammar(
init: &LlgConstraintInit,
constraint_type: *const i8,
data: *const i8,
error_string: *mut i8,
error_string_len: usize,
warning_string: *mut i8,
warning_string_len: usize,
) -> i32
Expand description
Check if given grammar is valid. This about twice as fast as creating a matcher (which also validates). See llg_new_matcher() for the grammar format. Returns 0 on success and -1 on error and 1 on warning. The error message is written to error_string. The error_string is NUL-terminated. Same for warning_string.
ยงSafety
This function should only be called from C code.