summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <unknown>2004-08-03 15:21:01 +0000
committeraarne <unknown>2004-08-03 15:21:01 +0000
commit166a32b1e7b29263edb89a630a093fca38ca1909 (patch)
tree05326b4f39d9de084957b1f2c84201bb934245b3
parenta843c8e0ec91428fa138feedf73d80d6f936fb7e (diff)
testing grammar distr
-rw-r--r--grammars/database/README18
-rw-r--r--grammars/mkDistr.sh5
-rw-r--r--grammars/prelude/README20
-rw-r--r--grammars/tst.sh6
-rw-r--r--src/GF/Shell/ShellCommands.hs2
-rw-r--r--src/HelpFile2
6 files changed, 51 insertions, 2 deletions
diff --git a/grammars/database/README b/grammars/database/README
new file mode 100644
index 000000000..1c289731e
--- /dev/null
+++ b/grammars/database/README
@@ -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.
diff --git a/grammars/mkDistr.sh b/grammars/mkDistr.sh
index 21ec0c8fd..02806784a 100644
--- a/grammars/mkDistr.sh
+++ b/grammars/mkDistr.sh
@@ -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
diff --git a/grammars/prelude/README b/grammars/prelude/README
new file mode 100644
index 000000000..c499de763
--- /dev/null
+++ b/grammars/prelude/README
@@ -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.
+
+
+
diff --git a/grammars/tst.sh b/grammars/tst.sh
index b317bd1cd..d957fa263 100644
--- a/grammars/tst.sh
+++ b/grammars/tst.sh
@@ -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
+
diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs
index 09a550704..909bff386 100644
--- a/src/GF/Shell/ShellCommands.hs
+++ b/src/GF/Shell/ShellCommands.hs
@@ -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
diff --git a/src/HelpFile b/src/HelpFile
index 4ef71dafe..650870398 100644
--- a/src/HelpFile
+++ b/src/HelpFile
@@ -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)