arena_terms_parser/lib.rs
1//! Copyright (c) 2005–2025 IKH Software, Inc.
2//!
3//! Released under the terms of the GNU Lesser General Public License, version 3.0,
4//! or (at your option) any later version (LGPL-3.0-or-later).
5//!
6//! # Arena Terms Parser
7//!
8//! Parser for arena-backed Prolog-like terms.
9//!
10//! This crate provides a parser for reading and interpreting Prolog-style terms
11//! into the compact, bump-allocated arena representation provided by the
12//! [`arena_terms`] crate. It is built on top of the [`parlex`] core library and uses
13//! lexer and parser code generated by the [`parlex-gen`] tools **Alex** (lexer)
14//! and **ASLR** (parser).
15//!
16//! # Overview
17//! The parser is designed for performance and memory efficiency, making it
18//! suitable for large-scale term manipulation, logic engines, and symbolic
19//! computation. It supports the full range of Prolog term constructs, including
20//! atoms, numbers, lists, and compound structures, while maintaining tight
21//! control over allocation through arena-based storage.
22//!
23//! # Modules
24//! - [`lexer`]: Performs tokenization and value extraction (atoms, numbers, dates, etc.).
25//! - [`oper`]: Defines operator fixity, precedence, and associativity rules.
26//! - [`parser`]: Implements an SLR parser that constructs `arena_terms::Term` values.
27//!
28//! # Dependencies
29//! - [`arena_terms`]: Provides the arena-backed term data structures.
30//! - [`parlex`]: Core support library for lexing and parsing.
31//! - [`parlex-gen`]: Code generation utilities for **Alex** and **ASLR**.
32//!
33//! # Crates.io
34//! Available on [crates.io](https://crates.io/crates/arena-terms-parser).
35pub mod lexer;
36pub mod oper;
37pub mod parser;