Beta release.

This commit is contained in:
aarne
2004-04-02 12:23:48 +00:00
parent f53f35978f
commit 73c4fe8dda
4 changed files with 112 additions and 13 deletions

View File

@@ -1,11 +1,11 @@
#! /bin/sh
# change the value of GFHOME to the directory where you have the gf binary
GFHOME=/home/aarne/GF/bin
GFHOME=/home/aarne/GF2/bin
# /.../chalmers.se/fs/cab/cs/.users/markus/home/GF1
JGUILIB=$GFHOME/java/
GF=/usr/local/bin/gf
GF=$GFHOME/gf2
JGUI=GFEditor2
java -cp $JGUILIB $JGUI "$GF -java $*"

View File

@@ -10,7 +10,7 @@ Highlights, preliminary version
<p>
13/10/2003 - 25/11 - 24/3/2004
13/10/2003 - 25/11 - 2/4/2004
<p>
@@ -56,11 +56,14 @@ An accurate <a href="DocGF.ps.gz">language specification</a> is now available.
<li> Pattern variables can be used on lhs's of <tt>oper</tt> definitions.
<li> New Unicode transliterations (by Harad Hammarström).
<h4>New parser (forthcoming)</h4>
<h4>New shell commands</h4>
<li> <tt>pi</tt> = <tt>print_info</tt>: information on an identifier in scope.
<li> <tt>h</tt> = <tt>help</tt> now in long or short form,
and on individual commands.
<li> All commands have both long and short names (see help). Long names
are a handy way to make scripts more readable.
<li> By Peter Ljunglöf, based on MCFG
<li> Much more efficient for morphology and discontinuous constituents
<li> Treatment of cyclic rules
<h4>New editor features</h4>
@@ -75,6 +78,13 @@ An accurate <a href="DocGF.ps.gz">language specification</a> is now available.
<li> Lexican rules sorted out by option <tt>-cflexer</tt> for efficient
parsing with large lexica.
<h4>New parser (forthcoming)</h4>
<li> By Peter Ljunglöf, based on MCFG
<li> Much more efficient for morphology and discontinuous constituents
<li> Treatment of cyclic rules
<!-- NEW -->
@@ -119,17 +129,39 @@ There is some room for improvement.
Soundness checking of module depencencies and completeness is not
complete. This means that some errors may show up too late.
<p>
Latex and XML printing of grammars do not work yet.
<!-- NEW -->
<h2>How to use GF 1.* files</h2>
The import command <tt>i</tt> is given the option <tt>-old</tt>. E.g.
Backward compatibility with respect to old GF grammars has been
a central goal. All GF grammars, from version 0.9, should work in
the old way in GF2. The main exception is the <tt>package</tt> system
introduced in GF 1.2, which would interfere too much with the new
module system.
<p>
Very old GF grammars (from versions before 0.9), with the completely
different notation, do not work. They should be first converted to
GF1 by using GF version 1.2.
<p>
The import command <tt>i</tt> can be given the option <tt>-old</tt>. E.g.
<pre>
i -old tut1.Eng.g2
</pre>
This generates, internally, three modules:
But this is no more necessary: GF2 detects automatically if a grammar
is in the GF1 format.
<p>
Importing a set of GF2 files generates, internally, three modules:
<pre>
abstract tut1 = ...
resource ResEng = ...
@@ -137,6 +169,7 @@ This generates, internally, three modules:
</pre>
(The names are different if the file name has fewer parts.)
<p>
The option <tt>-o</tt> causes GF2 to write these modules into files.
@@ -179,6 +212,11 @@ with a variant where the last letter is replaced by <tt>Z</tt>, e.g.
<tt>instance</tt> is replaced by <tt>instancZ</tt>. This method is of course
unsafe and should be replaced by something better.
<p>
The <tt>package</tt> format of GF 1.2 is made obsolete
by the module system. It is not handled properly by GF2.
<!-- NEW -->
@@ -322,6 +360,18 @@ taken into account. Thus a module need not be read from a file if the
module is in the memory and the file has not been modified.
<p>
To force compilation:
<ul>
<li> The flag <i>-src</i> in the import command forces compilation from
source even if more recent object files exist. This is useful
when testing new versions of GF.
<li> The flag <i>-retain</i> in the import command forces reading in
<tt>gfr</tt> files in addition to <tt>gfc</tt> files. This is useful
when testing operations with the <tt>cc</tt> command.
</ul>
<!-- NEW -->
<!-- NEW -->

43
src/INSTALL Normal file
View File

@@ -0,0 +1,43 @@
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 GF2/grammars/basic
../../bin/gf2
-- 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, 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 GF2/grammars/letter
../../bin/gf2 <mkLetter.gfs
../../bin/jgf2 Letter.gfcm
Author: Aarne Ranta, 2/4/2004

View File

@@ -7,7 +7,13 @@ GHCINCLUDEGFT=-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iu
WINDOWSINCLUDE=-ifor-windows -iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -iparsing -iparsers
all:
make today ; make fud
make today ; make ghc
unix:
make nofud-links ; make ghc
windows:
make nofud-links ; make justwindows
install-java:
make javac ; cd ../bin ; ln -s ../src/java ; echo "PLEASE edit GFHOME in bin/jgf2"
ghc:
make nofud
fud:
@@ -15,9 +21,9 @@ fud:
gft:
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) -itranslate --make translate/GFT.hs -o gft ; strip gft ; mv gft ../bin/
nofud:
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) --make GF.hs -o gf2n ; strip gf2n ; mv gf2n ../bin/
windows:
$(GHMAKE) $(GHCFLAGS) $(WINDOWSINCLUDE) --make GF.hs -o gf2w ; strip gf2w.exe ; mv gf2w.exe ../bin/
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
justwindows:
$(GHMAKE) $(GHCFLAGS) $(WINDOWSINCLUDE) --make GF.hs -o gf2 ; strip gf2.exe ; mv gf2.exe ../bin/
nofud-links:
cd for-ghc-nofud ; rm -f *.hs ; ln -s ../for-ghc/Arch.hs ; ln -s ../for-hugs/ArchEdit.hs ; cd ..
batch: