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).
§Arena Terms Parser
Parser for arena-backed Prolog-like terms.
This crate provides a parser for reading and interpreting Prolog-style terms
into the compact, bump-allocated arena representation provided by the
arena_terms crate. It is built on top of the parlex runtime and uses
lexer and parser code generated by the [parlex-gen] tools Alex (lexer)
and ASLR (parser).
§Overview
The parser is designed for performance and memory efficiency, making it suitable for large-scale term manipulation, logic engines, and symbolic computation. It supports the full range of Prolog term constructs, including atoms, numbers, lists, and compound structures, while maintaining tight control over allocation through arena-based storage.
§Modules
lexer: Performs tokenization and value extraction (atoms, numbers, dates, etc.).oper: Defines operator fixity, precedence, and associativity rules.parser: Implements an SLR parser that constructsarena_terms::Termvalues.
§Dependencies
arena_terms: Provides the arena-backed term data structures.parlex: Runtime support for lexing and parsing.- [
parlex-gen]: Code generation utilities for Alex and ASLR.
§Crates.io
Available on crates.io.