forked from GitHub/gf-core
testing grammar distr
This commit is contained in:
18
grammars/database/README
Normal file
18
grammars/database/README
Normal 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.
|
||||||
@@ -14,6 +14,7 @@ mkdir -pv gf-grammars/resource/italian
|
|||||||
mkdir -pv gf-grammars/resource/romance
|
mkdir -pv gf-grammars/resource/romance
|
||||||
mkdir -pv gf-grammars/resource/russian
|
mkdir -pv gf-grammars/resource/russian
|
||||||
mkdir -pv gf-grammars/resource/swedish
|
mkdir -pv gf-grammars/resource/swedish
|
||||||
|
mkdir -pv gf-grammars/database
|
||||||
|
|
||||||
cp -pv letter/README gf-grammars/letter/
|
cp -pv letter/README gf-grammars/letter/
|
||||||
cp -pv letter/mkLetter.gfs 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/*.gf gf-grammars/numerals/
|
||||||
cp -pv newnumerals/mkNumerals.gfs 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 prelude/*.gf gf-grammars/prelude/
|
||||||
|
|
||||||
cp -pv newresource/mkTest.gfs gf-grammars/resource/
|
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/russian/*.gf gf-grammars/resource/russian/
|
||||||
cp -pv newresource/swedish/*.gf gf-grammars/resource/swedish/
|
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
|
tar cvfz gf-grammars.tgz gf-grammars
|
||||||
|
|||||||
20
grammars/prelude/README
Normal file
20
grammars/prelude/README
Normal 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -10,6 +10,10 @@ cd ../resource
|
|||||||
gf <mkTest.gfs
|
gf <mkTest.gfs
|
||||||
gf <mkParadigms.gfs
|
gf <mkParadigms.gfs
|
||||||
jgf TestAll.gfcm
|
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 */*.gfc */*.gfr
|
||||||
rm -f ../prelude/*.gfc ../prelude/*.gfr
|
rm -f ../prelude/*.gfc ../prelude/*.gfr
|
||||||
rm -f TestAll.gfcm
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ testValidFlag st f x = case f of
|
|||||||
|
|
||||||
optionsOfCommand :: Command -> ([String],[String])
|
optionsOfCommand :: Command -> ([String],[String])
|
||||||
optionsOfCommand co = case co of
|
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"
|
"abs cnc res path"
|
||||||
CRemoveLanguage _ -> none
|
CRemoveLanguage _ -> none
|
||||||
CEmptyState -> none
|
CEmptyState -> none
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ i, import: i File
|
|||||||
-nocf don't build context-free grammar (thus no parser)
|
-nocf don't build context-free grammar (thus no parser)
|
||||||
-nocheckcirc don't eliminate circular rules from CF
|
-nocheckcirc don't eliminate circular rules from CF
|
||||||
-cflexer build an optimized parser with separate lexer trie
|
-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:
|
flags:
|
||||||
-abs set the name used for abstract syntax (with -old option)
|
-abs set the name used for abstract syntax (with -old option)
|
||||||
-cnc set the name used for concrete syntax (with -old option)
|
-cnc set the name used for concrete syntax (with -old option)
|
||||||
|
|||||||
Reference in New Issue
Block a user