testing grammar distr

This commit is contained in:
aarne
2004-08-03 15:21:01 +00:00
parent a843c8e0ec
commit 166a32b1e7
6 changed files with 51 additions and 2 deletions

18
grammars/database/README Normal file
View File

@@ -0,0 +1,18 @@
Project starting to redo the old-gf database query grammars, this time
using resource grammars.
The base grammars DatabaseX are built as instantiations of the
parametrized module DatabaseI. They are therefore easy to add
for any language supporting the resource interface Resource,
following the model of DatabaseEng and DatabaseSwe.
The restaurant vocabulary is so far only available for
English and Swedish. The rest should be easy to modify from
corresponging grammars in the GF 1 grammar package. This time,
however, only the ParadigmsX modules should be used to define the
lexical entries.
Copyright (c) 2004 Aarne Ranta
under GNU General Public License (GPL).
Document last updated August 3, 2004.

View File

@@ -14,6 +14,7 @@ mkdir -pv gf-grammars/resource/italian
mkdir -pv gf-grammars/resource/romance
mkdir -pv gf-grammars/resource/russian
mkdir -pv gf-grammars/resource/swedish
mkdir -pv gf-grammars/database
cp -pv letter/README gf-grammars/letter/
cp -pv letter/mkLetter.gfs gf-grammars/letter/
@@ -25,6 +26,7 @@ cp -pv newnumerals/README gf-grammars/numerals/
cp -pv newnumerals/*.gf gf-grammars/numerals/
cp -pv newnumerals/mkNumerals.gfs gf-grammars/numerals/
cp -pv prelude/README gf-grammars/prelude/
cp -pv prelude/*.gf gf-grammars/prelude/
cp -pv newresource/mkTest.gfs gf-grammars/resource/
@@ -40,4 +42,7 @@ cp -pv newresource/romance/*.gf gf-grammars/resource/romance/
cp -pv newresource/russian/*.gf gf-grammars/resource/russian/
cp -pv newresource/swedish/*.gf gf-grammars/resource/swedish/
cp -pv database/README gf-grammars/database/
cp -pv database/*.gf gf-grammars/database/
tar cvfz gf-grammars.tgz gf-grammars

20
grammars/prelude/README Normal file
View File

@@ -0,0 +1,20 @@
Generic (i.e. language-independent) resources.
Coordination -- building lists; used in resource/*/
HTML -- printing with HTML formatting
Latex -- printing with Latex formatting
Precedence -- precedence levels and the use of parentheses
Predef -- type signatures of predefined opers
PredefAbs -- type signatures of predefined cats
Prelude -- useful string operations
Predef and PredefAbs no longer have to be imported explicitly
in GF 2.0.
Copyright (c) 2004 Aarne Ranta
under GNU General Public License (GPL).
Document last updated August 3, 2004.

View File

@@ -10,6 +10,10 @@ cd ../resource
gf <mkTest.gfs
gf <mkParadigms.gfs
jgf TestAll.gfcm
rm -f TestAll.gfcm
cd ../database
echo "gr -number=8 | l" | gf -path=.:../resource/abstract:../resource/english:../resource/swedish:../prelude -noemit RestaurantEng.gf RestaurantSwe.gf
cd ../resource
rm -f */*.gfc */*.gfr
rm -f ../prelude/*.gfc ../prelude/*.gfr
rm -f TestAll.gfcm

View File

@@ -129,7 +129,7 @@ testValidFlag st f x = case f of
optionsOfCommand :: Command -> ([String],[String])
optionsOfCommand co = case co of
CImport _ -> both "old v s opt src retain nocf nocheckcirc cflexer"
CImport _ -> both "old v s opt src retain nocf nocheckcirc cflexer noemit o"
"abs cnc res path"
CRemoveLanguage _ -> none
CEmptyState -> none

View File

@@ -31,6 +31,8 @@ i, import: i File
-nocf don't build context-free grammar (thus no parser)
-nocheckcirc don't eliminate circular rules from CF
-cflexer build an optimized parser with separate lexer trie
-noemit do not emit code (default with old grammar format)
-o do emit code (default with new grammar format)
flags:
-abs set the name used for abstract syntax (with -old option)
-cnc set the name used for concrete syntax (with -old option)