-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
35 lines (25 loc) · 898 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.