/jparsec

A combinators parser library for Java

Primary LanguageJava

jparsec

This is code repository for jParsec 3.0 development branch. For current version see Codehaus site

Build Status

What is jparsec?

Jparsec is a recursive-descent parser combinator framework written for Java. It constructs parsers in native Java language only.

Why yet another parser framework?

Jparsec stands out for its combinator nature. It is no parser generator like Yacc or Antlr. No extra grammar file is required. Grammar is written in native Java language, which also means you can utilize all the utilities in the Java community to get your parser fancy.

What does "jparsec" stand for?

Jparsec is an implementation of Haskell Parsec on the Java platform.

Feature highlights.

  • Operator precedence grammar,
  • Accurate error location and customizable error message,
  • Rich set of pre-defined reusable combinator functions,
  • Declarative API that resembles BNF.

Documentation

Look at the wiki for documentation on implementing parsers with jparsec.

Talking about jparsec

  • JUGSummerCamp 2013: Directory parsing-made-easy contains material for the talk (slides + sample code)