#parser #peg #grammar #typing #parsing

oak

A typed parser generator syntax extension for Parsing Expression Grammar (PEG)

45 releases

Uses old Rust 2015

0.8.0 Jan 12, 2021
0.7.0 Jan 11, 2019
0.6.0 Nov 10, 2018
0.5.8 Jul 18, 2018
0.3.8 Nov 24, 2015

#27 in Parser tooling

Download history 46/week @ 2020-09-30 3/week @ 2020-10-07 9/week @ 2020-10-14 47/week @ 2020-10-21 52/week @ 2020-10-28 4/week @ 2020-11-04 4/week @ 2020-11-11 13/week @ 2020-11-18 50/week @ 2020-11-25 6/week @ 2020-12-02 48/week @ 2020-12-09 1/week @ 2020-12-16 3/week @ 2020-12-23 48/week @ 2020-12-30 11/week @ 2021-01-06 18/week @ 2021-01-13

96 downloads per month

Apache-2.0

165KB
4K SLoC

Oak

ptal on Travis CI

Compiled on the nightly channel of Rust. Use rustup for managing compiler channels. You can download and set up the exact same version of the compiler used with rustup override add 2021-01-06.

Please consult the Oak manual.

Features

  • Easy to install: PEG grammar description as a Rust procedural macro.
  • User-friendly: most of the types are automatically inferred from the parsing expressions.
  • Safe: Well-formedness analysis guarantees termination.
  • Modular: External parser rules can be called at any time.
  • Fast: Generation of both recognizer and parser functions for each rule.

Build local documentation

You might want to build the manual or code documentation from the repository because you need it to be synchronized with a specific version of Oak or simply for offline usage. Here how to do it!

Build the manual

You need the utility mdbook:

cargo install mdbook

Once installed, go inside oak/doc and execute mdbook build -o. The manual is generated inside a local folder named book and directly opened in your browser.

Build the code documentation

As a user of Oak, you will be interested by the runtime documentation.

cd oak/runtime
cargo doc

The documentation is then available in oak/runtime/target/doc.

To build the internal documentation of Oak, you can type this command at the root of the project:

cd oak
rustdoc --document-private-items --output=target/dev-doc src/liboak/lib.rs

The documentation will be available inside oak/target/dev-doc. It is useful to work on Oak :-)

Dependencies

~0.4–0.8MB
~21K SLoC