Module parser

Module parser 

Source
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

Generated parsing tables and rules are produced by parlex-gen’s aslr tool.

Structs§

AmbigID
ParData
StateID
TermParser
Prolog-like term parser with operator precedence and associativity handling.

Enums§

ProdID
TokenID

Functions§

parser_oper_defs
Constructs the default operator definitions used by the TermParser.

Type Aliases§

Action