Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Examples for the Haskell binding to the ANTLR parser generator C runtime library.
branch: master

This branch is even with markwright:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/tapl
.gitignore
LICENSE
README
Setup.hs
antlrc-examples.cabal

README

Providing a build system for examples using ANTLR, libantlr3c and
the Haskell antlrc runtime binding is difficult due to the following
issues:

(1) There is no ANTLR 3.2 or 3.3 ebuild for Gentoo Linux, and hence no
standard location for the ANTLR jar files.

(2) There is no standard antlr command to run the ANTLR parser generator tool
provided by ANTLR:

http://www.antlr.org/jira/browse/ANTLR-369

(3) It seems difficult to find a portable method to build a C program that calls Haskell.

I provide some example makefiles, however they would need to be modified
for your system.

src/tapl/arith
--------------

I wrote this Haskell/C/ANTLR example based on the arith example from the book
Types and Programming Languages by Benjamin Pierce chapter 4.

(ghc7) argus% ./arith test.f
"true"
"false"
"0"
"1"
"false"
(ghc7) argus% 

src/tapl/fullarith
------------------

This example is incomplete.
Something went wrong with that request. Please try again.