Function clingo::parse_program_with_logger
[−]
[src]
pub fn parse_program_with_logger<T: AstStatementHandler, L: Logger>(
program: &str,
handler: &mut T,
logger: &mut L,
message_limit: u32
) -> Result<(), Error>
Parse the given program and return an abstract syntax tree for each statement via a callback.
Arguments
program
- the program in gringo syntaxhandler
- implementating the traitAstStatementHandler
logger
- implementing the traitLogger
to report messages during parsingmessage_limit
- the maximum number of times the logger is called
Errors
NulError
- ifprogram
contains a nul byteErrorType::Runtime
if parsing failsErrorType::BadAlloc