Skip to main content

rusty_lr/
lib.rs

1//! # rusty_lr
2//! ***A Bison-like, parser generator for Rust supporting IELR(1), LALR(1) parser tables, with deterministic LR and
3//! non-deterministic LR (GLR) parsing strategies.***
4//!
5//! RustyLR is a parser generator that converts context-free grammars into IELR(1)/LALR(1) tables with deterministic LR and non-deterministic GLR parsing strategies. It supports custom reduce action in Rust, with beautiful diagnostics.
6//! Highly inspired by tools like *bison*, it uses a similar syntax while integrating seamlessly with Rust's ecosystem.
7//! It constructs optimized state machine, ensuring efficient and reliable parsing.
8//!
9//! ## Features
10//!  - **Custom Reduce Actions:** Define custom actions in Rust, allowing you to build into custom data structures easily.
11//!  - **Automatic Optimization:**: Reduces parser table size and improves performance by grouping terminals with identical behavior across parser states.
12//!  - **Multiple Parsing Strategies:** Supports minimal-LR(1), LALR(1) parser table, and GLR parsing strategy.
13//!  - **Detailed Diagnostics:** Detect grammar conflicts, verbose conflicts resolving stages, and optimization stages.
14//!  - **Location Tracking:** Track the location of every tokens in the parse tree, useful for error reporting and debugging.
15//!
16// re-exports
17
18pub use rusty_lr_core::*;
19pub use rusty_lr_derive::*;
20
21/// tools for build.rs
22#[cfg(feature = "build")]
23pub mod build {
24    pub use rusty_lr_buildscript::*;
25}