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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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