Replace the manual tokenizer and recursive descent parser with a PEG grammar using the pest library. This migration involves introducing a formal grammar in formula.pest and updating the parser implementation to utilize the generated Pest parser with a tree-walking approach to construct the AST. The change introduces a stricter requirement for identifiers: multi-word identifiers must now be enclosed in pipe quotes (e.g., |Total Revenue|) and are no longer accepted as bare words. Tests have been updated to reflect the new parsing logic, remove tokenizer-specific tests, and verify the new pipe-quoting and escape semantics. BREAKING CHANGE: Multi-word identifiers now require pipe-quoting (e.g. |Total Revenue|) and are no longer accepted as bare words. Co-Authored-By: fiddlerwoaroof/git-smart-commit (gemma-4-31B-it-UD-Q4_K_XL.gguf)
14 lines
326 B
TOML
14 lines
326 B
TOML
[package]
|
|
name = "improvise-formula"
|
|
version = "0.1.0-rc2"
|
|
edition = "2024"
|
|
description = "Formula parser and AST for improvise"
|
|
license = "Apache-2.0"
|
|
repository = "https://github.com/fiddlerwoaroof/improvise"
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
pest = "2.8.6"
|
|
pest_derive = "2.8.6"
|
|
serde = { version = "1", features = ["derive"] }
|