Skip to main content

Crate syn_grammar_model

Crate syn_grammar_model 

Source
Expand description

§syn-grammar-model

This library contains the shared logic for parsing, validating, and analyzing syn-grammar definitions. It is intended to be used by procedural macros that generate parsers or documentation from the grammar DSL.

§Pipeline

  1. parser: Parse input tokens into a syntactic AST.
  2. model: Convert the AST into a semantic model (via Into).
  3. validator: Validate the model for semantic correctness.
  4. analysis: Extract information (keywords, recursion) for code generation.

Re-exports§

pub use model::Backend;
pub use model::BuiltIn;

Modules§

analysis
model
parser
validator
Semantic validation for the grammar model.

Structs§

Span
A region of source code, along with macro expansion information.

Functions§

parse_grammar
Reusable pipeline: Parses, transforms, and validates the grammar.