[−][src]Crate cfg
Library for manipulations on context-free grammars. Most transformations are abstracted over grammar representations.
Re-exports
pub use binarized::BinarizedCfg; |
pub use rule::GrammarRule; |
Modules
binarized | Binarized rules are rules that have at most two symbols on the right-hand side. A binarized grammar contains only such rules. |
classification | Classification of rules and grammars. |
earley | |
history | Any data carried alongside a grammar rule can be its history. Rule histories may contain more than semantic actions. |
precedence | Precedenced rules are built with the builder pattern. |
prediction | Prediction for predictive parsers. |
remap | Remaps symbols and removes unused symbols. |
rule | This module defines grammar rules. Each rule in a context-free grammar consists of a single symbol on its left-hand side and an array of symbols on its right-hand side. In this library, each rule carries additional value called "history." |
sequence | Sequences are similar to regex repetitions with numbering. |
symbol | A type that can represent symbols in a context-free grammar. Symbols are distinguished by their IDs. |
Structs
Cfg | Basic representation of context-free grammars. |
Symbol | A common grammar symbol type. |
Traits
ContextFree | Trait for context-free grammars. |
ContextFreeMut | Allows access to a ContextFreeRef through mutable references. |
ContextFreeRef | This trait is currently needed to make the associated |