[][src]Crate tptp

A crate for reading files in the TPTP format. Supplies TPTP nom parsers for maximum flexibility.

Quickstart

use tptp::parsers::tptp_input_or_eof;

fn example(bytes: &[u8]) {
    let mut position = bytes;
    loop {
        // choose how to perform error handling
        let result: nom::IResult<_, _, ()> = tptp_input_or_eof(position);
        let (next, statement) = result.expect("parse error");

        // EOF
        if statement.is_none() {
            break;
        }
        else {
            // process `statement` as you see fit
        }
        position = next;
    }
}

Modules

parsers

nom parsers corresponding to TPTP BNF

resolve

Resolve include directives

syntax

Parsed TPTP structures