mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-13 23:09:31 -06:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
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!)
|
|
|
|
tar tgz 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. 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/gf2
|
|
|
|
4. For a quick test: start GF2, load a grammar and parse a string:
|
|
|
|
cd ../grammars/basic
|
|
../../bin/gf2 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)
|
|
|
|
5. 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/jgf2 by changing
|
|
the value of GFHOME to the location of your GF2/bin directory. Test the
|
|
GUI with some grammars:
|
|
|
|
cd ../grammars/letter
|
|
../../bin/gf2 <mkLetter.gfs
|
|
../../bin/jgf2 Letter.gfcm
|
|
|
|
When the window opens, push the Random button.
|
|
|
|
Author: Aarne Ranta, 2/4/2004
|