Appearance
JASE.Expressions
A tokenizer → parser → AST → evaluator pipeline for rules and expressions that must stay inspectable and testable.
Unlike embedding a full scripting language, JASE.Expressions gives you an explicit AST you can log, unit-test, and evaluate with a controlled symbol table.
When to use it
- Business rules stored as text that must be reviewable
- Calculated fields / gating logic without shipping a new binary for every tweak
- Hosts that need to inject variables and functions safely
Pipeline
mermaid
flowchart LR
text["Expression text"] --> tok["Tokenizer"]
tok --> parser["Parser"]
parser --> ast["AstNode"]
ast --> eval["ExpressionEvaluator"]| Stage | Type | Role |
|---|---|---|
| Tokenize | Tokenizer | Lexemes, aware of registered symbols |
| Parse | Parser | Precedence-aware AST |
| Evaluate | ExpressionEvaluator | Variables, functions, typed results |
Install
powershell
dotnet add package JASE.Expressions