From 166a32b1e7b29263edb89a630a093fca38ca1909 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 3 Aug 2004 15:21:01 +0000 Subject: [PATCH] testing grammar distr --- grammars/database/README | 18 ++++++++++++++++++ grammars/mkDistr.sh | 5 +++++ grammars/prelude/README | 20 ++++++++++++++++++++ grammars/tst.sh | 6 +++++- src/GF/Shell/ShellCommands.hs | 2 +- src/HelpFile | 2 ++ 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 grammars/database/README create mode 100644 grammars/prelude/README 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 ([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)