pest-to-marser

Convert Pest grammars to Marser Rust parsers

Like Rule::expr in Pest. Empty = last rule.
Loading…

Paste a Pest grammar, get a runnable Marser parser in Rust — in your browser, no install.

Output is a starter grammar.rs (or a full Cargo project zip) you can extend with real AST types.

  1. Try an example or open / drag a .pest file onto the left editor
  2. Edit the grammar — Rust on the right updates live
  3. Set entry rule, then copy, download, or share a link

Drag-and-drop a .pest file onto the left pane. Share link copies a URL with your grammar and entry rule embedded. Download project gives a zip with Cargo.toml, main.rs, and README.

Pest grammar
Marser Rust output
?
Errors
Supported features & limitations (v1)

Supported

  • Sequences, choices, repetition (*, +, ?, bounds)
  • Modifiers (@, $, !, _)
  • WHITESPACE / COMMENT implicit skipping
  • Lookahead (&, !), case-insensitive strings
  • ASCII builtins, right recursion via recursive

Not yet (v1)

  • Stack ops (PUSH, POP, PEEK, …)
  • Left recursion
  • Pest Pair trees, spans, or typed AST output
  • Output is () everywhere — extend with Marser capture! / bind!