Skip to content

markwright/antlrc-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Examples for the Haskell binding to the ANTLR parser generator C runtime library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published