A port of Utrecht University's ParseLib (from Haskell) to Frege, to allow usage of parser combinators with Java.
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
Buildfile
LICENSE
README.md

README.md

About ParseLib

ParseLib is a port of Utrecht University's Parser Combinators (from Haskell) to Frege, to allow the usage of parser combinator parsers in a JVM environment.

The current version is a port of the uu-tc package; more specifically it ports ParseLib.Simple as parselib.Simple, and ParseLib.Abstract as parselib.Standard. The reason for renaming abstract to standard is to avoid Java naming conflicts. The functionality in parselib.Standard is neatly wrapped up in all expected typeclasses. Furthermore, the names of several combinators have been adjusted to match those found in the newer uu-parsinglib package.

Control.Applicative

An implementation of Control.Alternative is provided with the package, as this typeclass is not present in Frege. It is imported internally in the parselib.Standard package, but not exported (for the obvious reasons). Therefore, one should import it as frege.control.Alternative.

Buildfile

To ease building the code, a small Buildfile has been included for use with the buildr build tool. A few of the usefull tasks are:

  • compile: compiles the Frege and Java code into ParseLib/target;
  • run: compiles and runs the examples found in ParseLib/src/fr/parselib/examples and ParseLib/src/java/parselib/examples.

Note: executing the compile-task should automatically download and run the Frege compiler.