Expand description
Module with functionalities for grammar analysis
Re-exports§
pub use compiled_terminal::CompiledTerminal;
pub use errors::GrammarAnalysisError;
pub use errors::RecursiveNonTerminal;
pub use errors::RelatedHint;
pub use left_recursion::detect_left_recursive_non_terminals;
pub use k_tuple::KTuple;
pub use k_tuple::KTupleBuilder;
pub use k_tuples::KTuples;
pub use k_tuples::KTuplesBuilder;
pub use first::first_k;
pub use first::FirstSet;
pub use follow::follow_k;
pub use follow::FollowSet;
pub use k_decision::calculate_k;
pub use k_decision::calculate_k_tuples;
pub use k_decision::calculate_lookahead_dfas;
pub use k_decision::decidable;
pub use k_decision::explain_conflicts;
pub use k_decision::FirstCache;
pub use k_decision::FollowCache;
pub use lalr1_parse_table::calculate_lalr1_parse_table;
pub use lalr1_parse_table::LR1State;
pub use lalr1_parse_table::LRAction;
pub use lalr1_parse_table::LRConflict;
pub use lalr1_parse_table::LRConflictError;
pub use lalr1_parse_table::LRParseTable;
pub use lookahead_dfa::LookaheadDFA;
pub use productivity::non_productive_non_terminals;
pub use reachability::all_non_terminals_reachable;
pub use reachability::nt_producing_productions;
pub use reachability::nt_reachability;
pub use reachability::reachable_from_non_terminal;
pub use reachability::reachable_from_production;
pub use reachability::reachable_non_terminals;
pub use reachability::unreachable_non_terminals;
Modules§
- Module with the compiled lookahead DFA
- Module with the compiled terminal
- Error types used by this module
- Module with FIRST set calculations
- Module with FOLLOW set calculations
- Module with conflict calculations
- Module with the KTuple type
- Module with the KTuples type
- Module with calculations for the LALR(1) parse table LALR(1) parse table construction for the given grammar configuration. The LALR(1) parse table is constructed using the
lalr
crate. The LALR(1) parse table is then converted into a representation without a reference to the creating grammar. The reference to the creating grammar is not needed for the actual parsing process. Moreover, it inhibits the use of the parse table in other contexts. This is the first reason why we duplicate thelalr
types here. The second reason is that we don’t handle the eof action in the same way as thelalr
crate. Thelalr
crate uses a separate field for the eof action, while we include the eof action in the actions field for the terminal EOI. - Module with check for left-recursions
- Module with types for production selection
- Module with productivity calculations Grammar flow analysis Productivity of non-terminals
- Module with reachability calculations