From a1d641ea4abee328f33604c3979b1af1451bd712 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 13 Dec 2013 12:50:09 +0000 Subject: [PATCH] completed DocumentationFre, also added Cl examples to V's --- lib/src/abstract/Documentation.gf | 11 +++++-- lib/src/french/DocumentationFre.gf | 46 +++++++++++++++++++----------- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/lib/src/abstract/Documentation.gf b/lib/src/abstract/Documentation.gf index 4b108ec0b..8b1de2ae5 100644 --- a/lib/src/abstract/Documentation.gf +++ b/lib/src/abstract/Documentation.gf @@ -75,6 +75,9 @@ fun superlative_Parameter : Parameter ; predicative_Parameter : Parameter ; + subject_Parameter : Parameter ; + object_Parameter : Parameter ; + person1_Parameter : Parameter ; person2_Parameter : Parameter ; person3_Parameter : Parameter ; @@ -88,12 +91,14 @@ fun InflectionA : A -> Inflection ; InflectionV : V -> Inflection ; InflectionV2 : V2 -> Inflection ; + InflectionVV : VV -> Inflection ; -- generic grammar terms - formGr_N : N ; -- inflectional form - shortGr_A : A ; -- short form of e.g. a Fin infinitive, or short vowel (may have to be split) - longGr_A : A ; -- long form of e.g. a Fin infinitive, or long vowel (may have to be split) + exampleGr_N : N ; -- example of a rule, category, etc + formGr_N : N ; -- inflectional form + shortGr_A : A ; -- short form of e.g. a Fin infinitive, or short vowel (may have to be split) + longGr_A : A ; -- long form of e.g. a Fin infinitive, or long vowel (may have to be split) } \ No newline at end of file diff --git a/lib/src/french/DocumentationFre.gf b/lib/src/french/DocumentationFre.gf index f263a5430..5e3366914 100644 --- a/lib/src/french/DocumentationFre.gf +++ b/lib/src/french/DocumentationFre.gf @@ -5,6 +5,8 @@ concrete DocumentationFre of Documentation = CatFre ** open CommonRomance, ParadigmsFre, (G = GrammarFre), + (S = SyntaxFre), + (L = LexiconFre), Prelude, HTML in { @@ -61,9 +63,17 @@ lin oper tdf : Str -> Str = \s -> td (intag "i" s) ; heading : N -> Str = \n -> (nounHeading n).s ; + + nounGender : N -> Parameter = \n -> case n.g of { + Masc => masculine_Parameter ; + Fem => feminine_Parameter + } ; + lin InflectionN noun = { - s = heading1 (heading noun_Category) ++ frameTable ( + s = heading1 (heading noun_Category) ++ + heading (nounGender noun) ++ + frameTable ( tr (th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++ tr (tdf (noun.s ! Sg) ++ tdf (noun.s ! Pl)) ) @@ -78,7 +88,12 @@ lin ) } ; - InflectionV, InflectionV2 = \verb -> + InflectionV v = inflectionVerb (S.mkUtt (S.mkCl S.she_NP (lin V v))).s v ; + InflectionV2 v = inflectionVerb (S.mkUtt (S.mkCl S.she_NP (lin V2 v) S.something_NP)).s (lin V v) ; + InflectionVV v = inflectionVerb (S.mkUtt (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))).s (lin V v) ; + +oper + inflectionVerb : Str -> V -> {s : Str} = \ex,verb -> let vfin : VF -> Str = \f -> verb.s ! f ; @@ -112,6 +127,7 @@ lin in { s = heading1 (heading verb_Category) + ++ paragraph (intag "b" "exemple :" ++ intag "i" ex) ++ ttable gforms (tr (intagAttr "th" "colspan=2 rowspan=2" "" ++ intagAttr "th" "colspan=2" (heading present_Parameter) @@ -124,21 +140,17 @@ lin ++ ttable gforms2 --# notpresent (tr (intagAttr "th" "colspan=2" "" ++ th "passé simple" ++ --# notpresent th (heading future_Parameter) ++ th (heading conditional_Parameter))) --# notpresent - ; + + ++ paragraph (frameTable ( + tr (intagAttr "th" "colspan=2" (heading infinitive_Parameter) ++ (tdf (vfin (VInfin False)))) ++ + tr (intagAttr "th" "rowspan=3" (heading imperative_Parameter) ++ th "sg.2.p" ++ (tdf (vfin (VImper SgP2)))) ++ + tr ( th "pl.1.p" ++ (tdf (vfin (VImper PlP1)))) ++ + tr ( th "pl.2.p" ++ (tdf (vfin (VImper PlP2)))) ++ + tr (intagAttr "th" "rowspan=2" (heading participle_Parameter) ++ + th (heading past_Parameter) ++ (tdf (vfin (VPart Masc Sg)))) ++ + tr ( th (heading present_Parameter) ++ (tdf (vfin VGer))) + ) + ) } ; - -{- - paragraph ( - frameTable ( - tr (th (heading imperative_Parameter ++ "Sg.2") ++ tdf (vfin (VImper Sg))) ++ - tr (th (heading imperative_Parameter ++ "Pl.2") ++ tdf (vfin (VImper Pl))) ++ - tr (th (heading infinitive_Parameter) ++ tdf (verb.s ! (VInf False))) ++ - tr (th (heading present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! (VPresPart APred))) ++ - tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! (VPastPart APred))) ++ - tr (th (heading aux_verb_Parameter) ++ td (intag "i" (case verb.aux of {VHaben => "haben" ; VSein => "sein"}))) - )) - } ; --} - } \ No newline at end of file