sipha-memo
Memoization support for packrat parsing in sipha.
Overview
sipha-memo provides memoization tables for caching parse results at specific positions, enabling packrat parsing which can handle left-recursive grammars and improve performance for ambiguous grammars.
Features
- MemoTable: Cache for parse results keyed by (rule_id, position) pairs
- MemoEntry: Cached parse results (success or failure)
- Enable/disable memoization at runtime
- Efficient lookup and storage
Quick Start
Add sipha-memo to your Cargo.toml:
[]
= "0.1.1"
Example
use ;
use ;
use RawNodeId;
let mut memo: = new;
memo.store_success;
if let Some = memo.get
License
This project is licensed under the MIT License - see the LICENSE file for details.