A typed parser generator embedded in Rust code for Parsing Expression Grammars (PEGs).
Oak is a typed parser generator for Parsing Expression Grammars (PEGs) that is embedded directly in Rust code using a procedural macro. It allows developers to define grammars inline within their Rust projects, providing type-safe parsing with automatic type inference from parsing expressions.
Rust developers who need to implement parsers for custom languages, file formats, or domain-specific languages within their Rust applications.
Developers choose Oak for its seamless integration with Rust code, automatic type inference, and safety guarantees through termination analysis, making parser development more reliable and ergonomic.
A typed parser generator embedded in Rust code for Parsing Expression Grammars
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Most types are automatically inferred from parsing expressions, reducing boilerplate and enhancing type safety directly in Rust code, as highlighted in the README's user-friendly features.
Well-formedness analysis ensures parsers will terminate, preventing infinite loops and increasing reliability, which is a core safety feature mentioned in the philosophy.
Uses procedural macros to define grammars inline within Rust projects, allowing for tight coupling with existing codebases and compile-time checks, as it's embedded directly in Rust code.
External parser rules can be called at any time, facilitating code reuse and modular grammar development, a feature emphasized in the README.
Requires the nightly channel of Rust, which can be unstable and inconvenient for projects needing long-term support or stable releases, as specified in the build instructions.
Compared to established alternatives like nom or pest, Oak has fewer community resources, examples, and integrations, which might hinder adoption and troubleshooting.
Building local documentation requires additional tools like mdbook and separate commands, as detailed in the README, which adds overhead for quick onboarding.