[antlr-interest] Haskell binding to the ANTLR parser generator C runtime library
Mark Wright
markwright at internode.on.net
Tue Jan 18 04:28:11 PST 2011
Hi,
I'm pleased to announce the release of a Haskell binding to the
ANTLR LL(*) parser generator C runtime library.
The lexing and parsing is 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 Haskell binding to the ANTLR parser generator C runtime library is at:
http://hackage.haskell.org/package/antlrc
https://github.com/markwright/antlrc
An example based on the implementation of arithmetic expressions example
from "Types and Programming Languages" by Benjamin Pierce, chapter 4, is
on github:
https://github.com/markwright/antlrc-examples/tree/master/src/tapl/arith
Building the example is somewhat challenging. I provide a Makefile,
however it is specific to my system and will need to be customized.
Documentation for the ANTLR C runtime library is at:
http://www.antlr.org/wiki/display/ANTLR3/ANTLR3+Code+Generation+-+C
Thanks, Mark
More information about the antlr-interest
mailing list