Function clingo_sys::clingo_ast_parse_string
source · pub unsafe extern "C" fn clingo_ast_parse_string(
program: *const c_char,
callback: clingo_ast_callback_t,
callback_data: *mut c_void,
control: *mut clingo_control_t,
logger: clingo_logger_t,
logger_data: *mut c_void,
message_limit: c_uint
) -> bool
Expand description
! Parse the given program and return an abstract syntax tree for each statement via a callback. ! ! @note The control object can be set to a NULL to disable reading input in aspif format. ! ! @param[in] program the program in gringo syntax ! @param[in] callback the callback reporting statements ! @param[in] callback_data user data for the callback ! @param[in] control object to add ground statements to ! @param[in] logger callback to report messages during parsing ! @param[in] logger_data user data for the logger ! @param[in] message_limit the maximum number of times the logger is called ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime if parsing fails ! - ::clingo_error_bad_alloc