Crate lexigram_lib Copy item path Source pub use lexigram_core ;alt build char_reader dfa file_utils fixed_sym_table grammar lexer lexergen lexi log parser parsergen rtsgen segmap segments alt Generates a production rule alternative. An alternative is made up of symbols separated by a comma.
Each symbol is either altflag branch Generates the key-value pairs corresponding to the Segments => int arguments, which can be
used to add values to BTreeMap<Segments, StateId> state transitions. btreemap Generates the code to initialize a BTreeMap . btreeset Generates the code to initialize a BTreeSet . gnode Generates a GrNode instance. hashmap Generates the code to initialize a HashMap . hashset Generates the code to initialize a HashSet . node Generates an ReNode instance. prule Generates a production rule. It is made up of alternatives separated by a semicolon. s Makes the string argument a String, by using String::from() (see String for details). seg Generates a Seg (tuple of u32 values) from one or two values (characters or integers). segments Generates a Segments initialization from Seg values. The macro only accepts literals, either characters or integers,
along with a few identifiers: sym Generates a Symbol instance. symbols term General Unit type used as generic parameter to indicate general, non-normalized form. LL1 ProdRuleSet<LL> aren’t left-recursive and are left-factorized.LR ProdRuleSet<LR> have no ambiguity.NameFixer Dictionary-based helper that adapts names to guarantee they’re unique. Normalized Unit type used as generic parameter to indicate normalized form. SymbolTable Stores the names of the terminal and nonterminal symbols when building a parser. LIB_PKG_NAME LIB_PKG_VERSION CharLen CollectJoin NameTransformer Transforms names into CamelCase or underscore_parts (lower or upper case) SourceSpacer Adds empty lines between blocks of text columns_to_str Takes lines of columns and outputs lines of strings in which the columns
are aligned. The minimum width of each column can be preset with the optional min_widths vector. AltId ID of a rule alternative. We use the same type as VarId because they’re very similar quantities. TokenId ID of a lexer token VarId ID of a nonterminal