flatzinc 0.1.0

A flatzinc parser
Documentation

flatzinc parser

A parser for the FlatZinc modelling language.

Compile

❯ cargo build --release

Usage

match flatzinc::model::<VerboseError<&str>>(&buf) {
    Ok((_, result)) => println!("{:#?}", result),
    Err(Err::Error(e)) | Err(Err::Failure(e)) => {
        println!("Failed to parse flatzinc!\n{}", convert_error(&buf, e))
    }
    Err(e) => println!("Failed to parse flatzinc: {:?}", e),
}

fz-parser

An example parser can be found in the examples/fz-parser.rs

To run the parser call:

❯ cargo run --example fz-parser -- -i jobshop.fzn

The binary can be found under target/release/examples/fz-parser

Other