Docs.rs
  • cfg-0.9.0
    • cfg 0.9.0
    • Permalink
    • Docs.rs crate page
    • Apache-2.0 OR MIT
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • pczarn
    • emberian
    • Dependencies
      • bit-matrix ^0.8 normal
      • bit-vec ^0.7 normal
      • cfg-classify ^0.0.1 normal optional
      • cfg-earley ^0.0.1 normal optional
      • cfg-generate ^0.0.1 normal optional
      • cfg-grammar ^0.0.1 normal
      • cfg-predict ^0.0.1 normal optional
      • cfg-sequence ^0.0.1 normal optional
      • cfg-symbol ^0.0.1 normal
      • rand ^0.8 normal optional
    • Versions
    • 0% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate cfg

cfg0.9.0

  • All Items

Crate Items

  • Re-exports
  • Modules
  • Structs
  • Enums
  • Traits
  • Type Aliases

Crates

  • cfg

Crate cfg

Source

Re-exports§

pub use cfg_classify as classify;
pub use cfg_earley as earley;
pub use cfg_generate as generate;
pub use cfg_predict as predict;
pub use cfg_sequence as sequence;

Modules§

binarized_cfg
Binarized rules are rules that have at most two symbols on the right-hand side. A binarized grammar contains only such rules.
cfg
history
precedenced_rule
Precedenced rules are built with the builder pattern.
rhs_closure
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.”
rule_container
symbol

Structs§

BinarizedCfg
Representation for grammars where right-hand sides of all rules have at most two symbols.
Cfg
Basic representation of context-free grammars.
Symbol
A common grammar symbol type.
SymbolSource
A source of numeric symbols.

Enums§

HistoryNode

Traits§

AsRuleRef
Trait for rules of a context-free grammar.
RuleContainer
Trait for rule and symbol containers.

Type Aliases§

HistoryId

Results

Settings
Help
    struct
    cfg::Cfg
    Basic representation of context-free grammars.
    module
    cfg::cfg
    extern crate
    cfg
    struct
    cfg::rule::cfg_rule::CfgRule
    Typical grammar rule representation.
    module
    cfg::rule::cfg_rule
    struct
    cfg::BinarizedCfg
    Representation for grammars where right-hand sides of all …
    module
    cfg::binarized_cfg
    Binarized rules are rules that have at most two symbols on …
    method
    cfg::Cfg::clone
    &Cfg -> Cfg
    method
    cfg::Cfg::binarize
    &Cfg -> BinarizedCfg
    Returns a binarized grammar which is weakly equivalent to …
    method
    cfg::Cfg::num_syms
    &Cfg -> usize
    Returns the number of symbols in use.
    method
    cfg::Cfg::next_sym
    &mut Cfg -> Symbol
    Generates a new unique symbol.
    method
    cfg::Cfg::sym_source
    &Cfg -> &SymbolSource
    method
    cfg::Cfg::history_graph
    &Cfg -> &HistoryGraph
    method
    cfg::Cfg::sym
    &mut Cfg -> [Symbol]
    Returns generated symbols.
    method
    cfg::Cfg::rules
    &Cfg -> <Iterator<Item=RuleRef>>
    method
    cfg::Cfg::add_rule
    &mut Cfg, RuleRef -> ()
    method
    cfg::Cfg::sym_source_mut
    &mut Cfg -> &mut SymbolSource
    method
    cfg::Cfg::add_history_node
    &mut Cfg, HistoryNode -> NonZero<usize>
    method
    cfg::Cfg::retain
    &mut Cfg, F -> ()
    method
    cfg::Cfg::new
    -> Cfg
    Creates an empty context-free grammar.
    method
    cfg::Cfg::default
    -> Cfg
    method
    cfg::Cfg::with_sym_source
    SymbolSource -> Cfg
    Creates an empty context-free grammar with the given …
    method
    cfg::Cfg::clone
    &Cfg -> Cfg