Skip to main content

Crate adze_ir

Crate adze_ir 

Source
Expand description

Grammar Intermediate Representation for Adze This module provides GLR-aware data structures for representing grammars

Re-exports§

pub use error::IrError;
pub use error::Result as IrResult;
pub use optimizer::GrammarOptimizer;
pub use optimizer::OptimizationStats;
pub use optimizer::optimize_grammar;
pub use validation::GrammarValidator;
pub use validation::ValidationError;
pub use validation::ValidationResult;
pub use validation::ValidationWarning;
pub use symbol_registry::SymbolInfo;
pub use symbol_registry::SymbolRegistry;

Modules§

builder
Builder API for programmatically constructing grammars Builder API for programmatically constructing grammars
debug_macros
Debug macros for development Debug macros for inspecting grammar IR at build time.
error
Error types and Result alias for IR operations. Error types for grammar IR operations.
optimizer
Grammar optimization utilities Grammar optimization passes that simplify and normalize rules.
symbol_registry
Symbol registry for managing grammar symbols Deterministic symbol ID assignment via an ordered registry.
validation
Grammar validation utilities Grammar validation checking for undefined, unreachable, and non-productive symbols.

Macros§

emit_ir
Emit IR for debugging purposes

Structs§

AliasSequence
Alias sequence for node renaming
ConflictDeclaration
Conflict declaration for GLR handling
ExternalToken
External token declaration
FieldId
Field identifier
Grammar
Core grammar representation supporting all Tree-sitter features including GLR
Precedence
Precedence declaration
ProductionId
Production identifier
Rule
Grammar rule supporting GLR multiple actions per state
RuleId
Rule identifier
StateId
State identifier
SymbolId
Symbol identifier
SymbolMetadata
Metadata for a symbol in the language
Token
Token with fragile flag for lexical vs parse conflicts

Enums§

Associativity
Associativity for conflict resolution
ConflictResolution
How to resolve conflicts
GrammarError
Grammar processing errors
PrecedenceKind
Precedence supporting both static and dynamic precedence (PREC_DYNAMIC)
Symbol
Grammar symbol types
TokenPattern
Token pattern representation