Interpreter
Defines a grammar for a simple language and an interpreter that evaluates sentences in it.
Why we need this / what value this brings
Lets you represent and evaluate rule-like expressions as data instead of hardcoding them in conditional logic.
When to use this
You have a small, well-defined grammar (search filters, pricing rules, permission expressions) that's evaluated repeatedly and benefits from being data-driven rather than code-driven.
How to use or implement this
Model each grammar rule as a class with an interpret() method, composing simple expressions into more complex ones — for anything beyond a small grammar, use an existing parser/rules-engine library instead of hand-rolling one.
Research questions
- Search/filter query building (Search module) or availability rule evaluation (Availability module) may already be doing something interpreter-shaped informally — worth checking whether formalizing it would help or just add ceremony.
Empty folder — drop notes, links, and findings here as you research.