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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
To make and install GF2 (Version 2-beta, 2/4/2004).
1. Unpack GF2 and go to the source directory (the place where this
INSTALL file is - so you have probably done this already!)
tar xvfz gf2-beta.tgz
cd GF2/src
2. Make sure you have GHC (Glasgow Haskell Compiler), version 5.02 or later.
In Windows, you also need Cygwin.
ghc --version
3. If you are building from CVS, run autoconf (in src/):
autoconf
4. Run configure
./configure
If you want to install the GF somewhere other than /usr/local, use
the --prefix flag. E.g.
./configure --prefix=/usr
To compile on Chalmers Solaris systems using VCS, use this configuration:
./configure CPPFLAGS="`lib__readline -I` `lib__ncurses -I`" LDFLAGS="`lib__readline -l` `lib__ncurses -l`"
5. Compile with make, either of
make unix -- for Linux, Solaris, Mac OSX
make windows -- for MS Windows
The binary is sent to the file GF2/bin/gf
6. For a quick test: start GF2, load a grammar and parse a string:
cd ../grammars/basic
../../bin/gf English.gf
-- when GF2 has started and shows the prompt >:
> p "every number is even or odd"
-- this is the response from GF2:
PredA1 (Every Number) (DisjA1 Even Odd)
7. If you want to run the Java GUI, go back to GF2/src and also do
make install-java
Then edit the file GF2/bin/jgf by changing
the value of GFHOME to the location of your GF2/bin directory. Test the
GUI with some grammars:
cd ../grammars/letter
../../bin/gf <mkLetter.gfs
../../bin/jgf Letter.gfcm
When the window opens, push the Random button.
Author: Aarne Ranta, 2/4/2004
|