Instaparse is a simple yet powerful parser generator for Clojure and ClojureScript that turns grammars written in EBNF or ABNF into executable parsers, with support for left recursion, ambiguous grammars, PEG-like lookahead, and various output formats. Instaparse supports most of the common notations for context-free grammars. For example, a popular alternative to * is to surround the term with curly braces {}, and a popular alternative to ? is to surround the term with square brackets []. Rules can be specified with =, :, :=, or ::=. Rules can optionally end with ;. Instaparse is very flexible in terms of how you use whitespace (as in Clojure, , is treated as whitespace) and you can liberally use parentheses for grouping.

Features

  • Grammar definitions in familiar EBNF or ABNF syntax
  • Handles left- and right-recursive and ambiguous grammars
  • Support for lookahead and negative lookahead (PEG-like extensions)
  • Multiple output formats including hiccup and enlive parse trees
  • Detailed error reporting and optional lazy parse results
  • "Total parsing" mode and combinator-based grammar building

Project Samples

Project Activity

See All Activity >

License

Eclipse Public License

Follow Instaparse

Instaparse Web Site

Other Useful Business Software
Stop vibe-debugging. Icon
Stop vibe-debugging.

Plug Claude into your app's actual errors.

AppSignal's MCP server hands Claude, Cursor, or Zed your real errors, traces, and the deploy that shipped them. AI writes the fix; you review the diff.
Free 30 days.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Instaparse!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Registered

2025-08-19