Expand description
Parser for Prolog-like terms with operator definitions.
This module defines the TermParser, which implements a shift-reduce SLR(1) parser
for Prolog-style terms tokenized by the TermLexer. It integrates with operator
definitions (OperDefs) to correctly resolve shift/reduce conflicts according to declared
precedence and associativity rules.
The parser constructs arena-allocated Term values (from the arena_terms crate)
representing atoms, numbers, compound terms, lists, tuples, and other structures.
§Components
TermLexer: ProducesTermTokens for the parser.OperDefs: Defines fixity, precedence, and associativity.TermParser: Performs syntax analysis using generated SLR tables.
Generated parsing tables and rules are produced by parlex-gen’s aslr tool.
Structs§
- AmbigID
- ParData
- StateID
- Term
Parser - Prolog-like term parser with operator precedence and associativity handling.
Enums§
Functions§
- parser_
oper_ defs - Constructs the default operator definitions used by the
TermParser.