Expand description
Copyright (c) 2005–2025 IKH Software, Inc.
Released under the terms of the GNU Lesser General Public License, version 3.0 or (at your option) any later version (LGPL-3.0-or-later).
Runtime support library for lexers and parsers generated by
parlex-gen.
parlex defines the generic traits and core data structures that
generated lexers and parsers use at runtime. You typically depend on
this crate alongside the code produced by the alex (lexer) and aslr
(parser) generators from parlex-gen. See the crate README for a feature
overview, usage, and docs.rs links.
- Generic traits for lexical analysis and parsing
- Core data structures used by generated code
- Foundation for building custom lexers and parsers
For more background and examples, see the parlex README on GitHub and
docs.rs.
§Crates.io
Published at crates.io/crates/parlex.
Structs§
- Lexer
Ctx - Core lexer execution context.
- Lexer
Stats - Statistics collected by the lexer during processing.
- Parser
Ctx - Core parser execution context.
- Parser
Stats - Statistics collected during the parsing process.
Enums§
- Parser
Action - Parser action used by the parsing automaton.
Traits§
- Lexer
- Defines the core lexer interface responsible for processing input streams and producing tokens.
- Lexer
Data - Defines the data and configuration used by a lexer. Provides access to lexer modes, rules, DFA data, and lookup utilities.
- Lexer
Mode - A trait representing a lexer mode used during lexical analysis. Each mode can be converted into an index and defines a total count of modes.
- Lexer
Rule - A trait representing a lexer rule used for token matching. Each rule can be converted into an index and defines a total count of rules along with a designated end rule.
- Parser
- Defines the core parser interface responsible for driving the parsing process.
- Parser
AmbigID - A trait representing an identifier for an ambiguity in the grammar.
- Parser
Data - Defines the data and configuration used by a parser. Provides access to parser states, productions, ambiguities, and lookup tables.
- Parser
ProdID - A trait representing an identifier for a grammar production rule.
- Parser
StateID - A trait representing an identifier for a parser state.
- Parser
TokenID - A trait representing an identifier for a terminal or nonterminal token in the grammar.
- Token
- A trait representing a token in lexical analysis or parsing.