[Haskell-cafe] ANNOUNCE: Haskell binding to the ANTLR parser generator C runtime library

Mark Wright markwright at internode.on.net
Mon Jan 17 15:56:31 CET 2011


I'm pleased to announce the release of a Haskell binding to the
ANTLR LL(*) parser generator C runtime library.

The book on ANTLR is "The Definitive ANTLR Reference: Building Domain-Specific Languages"
by Terence Parr:


ANTLR is a very powerful parser generator.  It has support for predicated
parsing, where dis-ambiguating semantic predicates can be used to look
up information in the symbol table to handle context sensitive programming

The lexing and parsing handled in C.  The C parser actions call
Haskell code to do things such as:

- enter data into the symbol table

- look up data in the symbol table to implement dis-ambiguating semantic
  predicates for parsing context sensitive programming languages.

- create Abstract Symbol Table entries.

The ANTLR parser generator site is at:


The Haskell binding to the ANTLR parser generator C runtime library is at:


An example based on the implementation of arithmetic expressions example
from "Types and Programming Languages" by Benjamin Pierce, chapter 4, is
on github:


Building the example is somewhat challenging.  I provide a Makefile,
however it is specific to my system and will need to be customised.

Documentation for the ANTLR C runtime library is at:


Documentation for the ANTLR parser generator is at:


Thanks, Mark

More information about the Haskell-Cafe mailing list