A cooklang parser, implemented in Rust for Rust and Python, following the EBNF of the language
The rust parser is implemented using a parser combinator: nom. Precise data structure are defined for the different element of the language : Metadata
, Ingredient
, Cookware
and Timer
.
The python parser is a binding of the rust parser using PyO3
Both pass the canonical tests.
To run the test in rust, run:
cd cooklang-rs
cargo test
To run the test in python, first install the package using
maturin develop
then run
python -m unittest discover -s ./tests