Common parser engine GitHub issue

vibecode
{"vibecode": {
    "doc": "parser-engine",
    "role": "forward-direction note: v1 keeps parsers hand-rolled and small; if the count grows to ~4-5 distinct parsers, revisit options like bundling LPeg or building a shared engine",
    "key_concepts": ["hand_rolled_parsers", "lpeg_bundling_option", "common_engine_trigger",
        "schema_driven_alternative"],
    "status": "deferred"
}}

Context GitHub issue

In v1, each parser is hand-rolled:

The hand-rolled approach keeps each parser purpose-built and small. Schemas (the Uma model) cover the "user-defined markup language" case without requiring grammar authoring.

When to revisit GitHub issue

If we find ourselves accumulating hand-rolled parsers — say we add a few more parsers for new file formats, query languages, or domain-specific syntaxes — the duplication cost adds up. At some point a common parser engine pays for itself.

Trigger to reconsider: 4 or 5 distinct hand-rolled parsers in the framework, with the prospect of more.

Options if we revisit GitHub issue

Bundle LPeg GitHub issue

Roll our own PEG (or parser-combinator) engine in Caspian GitHub issue

Parser combinators GitHub issue

Constraint: don't displace the schema model GitHub issue

Whatever engine lands, Uma's schema-driven approach stays the user-facing way to define tag-based markup languages. Writing html5.json (or a sibling for another markup) must remain low-learning-curve. A parser engine is for the framework's own use, not a substitute for the schema config.

If a future engine could also be reachable as a %utils.peg.parse(grammar, string) or similar — for use cases where a real grammar is appropriate (mini-languages, DSLs, custom query syntaxes) — that's a bonus. But the schema-as- config story stays the headline.

Status GitHub issue

Not committed. Revisit when we have 4–5 hand-rolled parsers and can see the curve bending.

© 2026 Puck.uno