https://github.com/ptal/oak
A typed parser generator embedded in Rust code for Parsing Expression Grammars
https://github.com/ptal/oak
Last synced: 3 months ago
JSON representation
A typed parser generator embedded in Rust code for Parsing Expression Grammars
- Host: GitHub
- URL: https://github.com/ptal/oak
- Owner: ptal
- License: apache-2.0
- Created: 2014-07-06T17:04:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-01-12T21:09:19.000Z (about 5 years ago)
- Last Synced: 2024-10-08T08:52:12.040Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 932 KB
- Stars: 142
- Watchers: 12
- Forks: 14
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-cn - ptal/oak
- awesome-rust - ptal/oak
- awesome-rust - ptal/oak
- awesome-rust-cn - ptal/oak
- awesome-rust-zh - ptal/oak - 一个类型化的 PEG 解析器生成(编译器插件) (库 / 解析)
- awesome-compilers - Oak - A typed PEG parser generator (compiler plugin). (Rust / Other dialects and variants)
- fucking-awesome-rust - ptal/oak - A typed PEG parser generator (compiler plugin) (Libraries / Parsing)
- awesome-rust - ptal/oak - A typed PEG parser generator (compiler plugin) (Libraries / Parsing)
- awesome-bookmarks - ptal/oak - A typed parser generator embedded in Rust code for Parsing Expression Grammars (Rust / Parsers)
- awesome-rust - ptal/oak
- awesome-rust-with-stars - ptal/oak - 02-25 | (Libraries / Parsing)
README
# Oak
[![ptal on Travis CI][travis-image]][travis]
[travis-image]: https://travis-ci.org/ptal/oak.png
[travis]: https://travis-ci.org/ptal/oak
Compiled on the nightly channel of Rust. Use [rustup](http://www.rustup.rs) 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](https://ptal.github.io/oak/index.html).
## 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](https://rust-lang.github.io/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 :-)