syn-grammar 0.8.0

A parser generator for Rust that compiles EBNF-like grammars into syn::parse::Parse implementations.
Documentation
#![doc = include_str!("../README.md")]

// src/lib.rs

// 1. Export runtime modules
// The code generated by the macro refers to `syn_grammar::rt`.
// Therefore, this module must be publicly available.
pub mod rt {
    pub use super::token_filter;
    pub use grammar_kit::*;
}

/// Utilities for testing parsers.
pub use grammar_kit::testing;

// 3. Re-export the macro
// This allows the user to write: `use syn_grammar::grammar;`
pub use syn_grammar_macros::grammar;

#[doc(hidden)]
pub use syn_grammar_macros::include_grammar;

#[doc(hidden)]
pub mod builtins;
pub mod token_filter;

// Export portable types
pub mod types {
    pub use syn_grammar_model::model::types::*;
}
pub use types::{Identifier, StringLiteral};