Not currently logged in. Login now.

Libraries for Category 'Parsers'

AmotoenAmotoen is a Clojure library that supports PEG style definitions of grammars that can produce parsers.
StoutStout is a porter stemmer implemention using a snowball-like syntax for defining rules. Rules are of the form

{:c? condition :s1 "abc" :s2 "efg" :a action}

reading if condition is met, replace s1 with s2 and execute action.
dj-pegA Ring inspired (aka functional and composable) parsing expression grammar (PEG) library.
zetta-parserzetta-parser provides an easy to use Parser combinator library that allows you to parse strings easily by composing simple parsers together to create more powerful ones.

Basic parsers can be found in zetta.parser.seq, this parsers will work with mostly any type of items you find on a stream, some others such as string and number expect to process a stream of characters.
fnparseFnParse is a library for creating functional parsers in the Clojure programming language. It presents an easy, functional way to create parsers from EBNF rules and
was inspired by the paper Using Functional Parsing to Achieve Quality in Software Maintenance (
parsleyParsley generates total and truly incremental parsers.

Total: a Parsley parser yields a parse-tree for any input string.

Truly incremental: a Parsley parser can operate as a text buffer, in best cases recomputing the parse-tree after a sequence of edits happens in logarithmic time (worst case: it behaves like a restartable parser).

Parsley parsers have no separate lexer, this allows for better compositionality of grammars.
analyzeClojure's analysis compilation phase holds rich information about Clojure forms, like type/reflection information.

analyze provides an interface to this phase, callable a la carte. The output is similar to ClojureScript's analyzer.
blindA complete clojure reader implemented in clojure itself.
lexingtonlexington is aimed at simplifying the creation of extensible and combinable lexers. Written in Clojure it offers a customizable infrastructure and (so far) some predefined helper utilities. Still a work in progress.
parse-ezParse-EZ is a parser library for Clojure programmers. It allows easy mixing of declarative and imperative styles and does not require any special constructs, macros, monads, etc. to write custom parsers. All the parsing is implemented using regular Clojure functions.

The library provides a number of parse functions and combinators and comes with a built-in customizable infix expression parser and evaluator. It allows the programmer to concisely specify the structure of input text using Clojure functions and easily build parse trees without having to step out of Clojure. Whether you are writing a parser for some well structured data or for data scraping or prototyping a new language, you can make use of this library to quickly create a parser.
KernParser combinators for all kids of text: data formats, code, program input. Configurable lexer parsers handle whitespace and comments, common literal values, and convenience functions. There's support for infix arithmetic expressions and internationalization.

InstaparseInstaparse aims to be the simplest way to create a parser in Clojure. Type in your grammar using standard notation for context-free grammars; instaparse generates an executable parser from your specification.

No Grammar Left Behind: Handles *any* context-free grammar: left-recursive, right-recursive, ambiguous, whatever. Also has PEG-like extensions.

Outputs trees in either hiccup or enlive format.

Performant and feature-rich. See github site for details.
instaparseInstaparse aims to be the simplest way to build parsers in Clojure.

- Turns standard EBNF notation for context-free grammars into an executable parser that takes a string as an input and produces a parse tree for that string.
- No Grammar Left Behind: Works for any context-free grammar, including left-recursive, right-recursive, and ambiguous grammars.
- Extends the power of context-free grammars with PEG-like syntax for lookahead and negative lookahead.
- Supports both of Clojure's most popular tree formats (hiccup and enlive) as an output target.
- Detailed reporting of parse errors.
- Optionally produces lazy sequence of all parses (especially useful for diagnosing and debugging ambiguous grammars).
- "Total parsing" mode where leftover string is embedded in the parse tree.
- Optional combinator library for building grammars programmatically.
- Performant.
binaryThis library is a high performance binary parser combinator. It enables reading and writing arbitrary binary data from Java's io streams.