Meon - declarative parsing engine with no AST

meon — declarative flat-parsing engine (SoA, no AST)

I started this as a simple Markdown parser. Then I got curious about making it faster, and that curiosity turned into a bigger architectural question: instead of building a tree/AST, what if the parser output flat arrays — one Vec per element kind (headings, bold spans, links, etc.), all as zero-copy byte-offset spans into the source?

That idea grew into a small engine: you describe a grammar once via define_parser! and get a generated parser with no runtime dispatch. The Markdown parser became just one concrete grammar built on top of it. I later added a JSON grammar to prove the engine isn't Markdown-specific.

This project ended up as the basis of my coursework (3rd year, university), so it's had a fair amount of design iteration — but it's also grown past a toy project, and I'd like a critical outside look before I consider it more "done."

Repo structure (workspace, 4 crates):

  • meon — the core engine + define_parser! macro runtime
  • meon-macros — the proc-macro itself
  • meon-md — Markdown grammar (reference implementation)
  • meon-json — JSON grammar (reference implementation, proves the engine generalizes)

Also included: criterion benchmarks (comparisons against pulldown-cmark/serde_json where relevant) and a cargo-fuzz harness.

Repo: GitHub - vgnapuga/meon: Declarative flat parsing engine. No AST - only SoA tables, zero-copy spans and SIMD/SWAR · GitHub

1 Like