Function llg_validate_grammar

pub unsafe extern "C" fn llg_validate_grammar(
    init: &LlgConstraintInit,
    constraint_type: *const i8,
    data: *const i8,
    message: *mut i8,
    message_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 or warning is written to message, which is message_len bytes long. It’s always NUL-terminated.

§Safety

This function should only be called from C code.