Build Status Latest Version Rust Documentation

flatzinc

A parser for the FlatZinc modelling language version 2.4.3.

Compile

text ❯ cargo build --release

Usage

In your Cargo.toml

toml [dependencies] flatzinc = "0.1"

In your code:

```rust use nom::error::{convert_error, VerboseError}; use nom::Err; use flatzinc

match flatzinc::model::>(&buf) { Ok((, result)) => println!("{:#?}", result), Err(Err::Error(e)) | Err(Err::Failure(e)) => { println!("Failed to parse flatzinc!\n{}", converterror(&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:

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

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

FAQ