diff --git a/lib/resource/french/SyntaxFre.gf b/lib/resource/french/SyntaxFre.gf index 292f6d08b..85f468b89 100644 --- a/lib/resource/french/SyntaxFre.gf +++ b/lib/resource/french/SyntaxFre.gf @@ -105,7 +105,7 @@ oper -- Exampe: 'to be or not to be'. - etreNetre : Bool -> VerbPres = \b -> + etreNetre : Bool -> Verb = \b -> {s = \\w => posNeg b (verbEtre.s ! w) []} ; ---- v reveals a BUG in refresh embedConj = elisQue ; @@ -175,8 +175,8 @@ oper intVerbPhrase = \qui, dort -> {s = table { DirQ => qui.s ! Nom ++ optStr (estCeQue Nom) ++ - dort.s ! qui.g ! VFin Ind qui.n P3 ; - IndirQ => "ce" ++ qui.s ! Nom ++ dort.s ! qui.g ! VFin Ind qui.n P3 + dort.s ! qui.g ! VFin presInd qui.n P3 ; + IndirQ => "ce" ++ qui.s ! Nom ++ dort.s ! qui.g ! VFin presInd qui.n P3 } } ; diff --git a/lib/resource/french/TypesFre.gf b/lib/resource/french/TypesFre.gf index 80fe5778d..7dcaaec64 100644 --- a/lib/resource/french/TypesFre.gf +++ b/lib/resource/french/TypesFre.gf @@ -141,13 +141,20 @@ oper -- Verbs: conversion from full verbs to present-tense verbs. - verbPres = \aller -> {s = table { + verbPres = \aller,a -> {s = table { VInfin => aller ! Inf ; - VFin Ind n p => aller ! Indic Pres n p ; - VFin Sub n p => aller ! Subjo SPres n p ; + VFin (VPres Ind) n p => aller ! Indic Pres n p ; + VFin (VPres Sub) n p => aller ! Subjo SPres n p ; + VFin (VImperf Ind) n p => aller ! Indic Imparf n p ; + VFin (VImperf Sub) n p => aller ! Subjo SImparf n p ; + VFin VPasse n p => aller ! Indic Passe n p ; + VFin VFut n p => aller ! Indic Futur n p ; + VFin VCondit n p => aller ! Cond n p ; VImper np => aller ! Imper np ; VPart g n => aller ! Part (PPasse g n) - }} ; + } ; + aux = a + } ; -- The full conjunction is a table on $VForm$: diff --git a/lib/resource/romance/SyntaxRomance.gf b/lib/resource/romance/SyntaxRomance.gf index 41e5bad0b..e8c60966a 100644 --- a/lib/resource/romance/SyntaxRomance.gf +++ b/lib/resource/romance/SyntaxRomance.gf @@ -389,19 +389,38 @@ oper -- So far we restrict the syntax to present-tense verbs, even though -- morphology has complete conjugations. - VerbPhrase = {s : Gender => VF => Str} ; - VerbGroup = {s : Bool => Gender => VF => Str} ; +param + VPForm = VPF Anteriority VForm ; + Anteriority = Simul | Anter ; + +oper + VerbPhrase = {s : Gender => VPForm => Str} ; + VerbGroup = {s : Bool => Gender => VPForm => Str} ; predVerbGroup : Bool -> VerbGroup -> VerbPhrase = \b,vg -> { s = vg.s ! b } ; - Verb = VerbPres ; + auxVerb : Verb -> Verb ; -- gives the copula + -- Predication is language-dependent in the negative case. - predVerb : VerbPres -> VerbGroup = \aller -> - {s = \\b,_,v => if_then_Str b (aller.s ! v) (negVerb (aller.s ! v))} ; + predVerb : Verb -> VerbGroup = \aller -> + {s = \\b,g => table { + VPF Simul v => if_then_Str b (aller.s ! v) (negVerb (aller.s ! v)) ; + VPF Anter v => + let + part = case aller.aux of { + AEsse => VPart g (nombreVerb v) ; + AHabere => VPart Masc Sg + } ; + allee = aller.s ! part ; + est = (auxVerb aller.aux).s ! v + in + if_then_Str b est (negVerb est) ++ allee + } + } ; negVerb : Str -> Str ; @@ -433,9 +452,9 @@ oper -- complement a verb with noun phrase and optional preposition - TransVerb : Type = VerbPres ** Complement ; + TransVerb : Type = Verb ** Complement ; - verbOfTransVerb : TransVerb -> VerbPres = \v -> {s = v.s} ; + verbOfTransVerb : TransVerb -> Verb = \v -> {s = v.s} ; complementOfTransVerb : TransVerb -> Complement = \v -> {s2 = v.s2 ; c = v.c} ; isNounPhraseClit : NounPhrase -> Bool = \n -> case n.c of { @@ -581,7 +600,7 @@ oper predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jean,dort -> {s = \\m => jean.s ! unstressed nominative ++ - dort.s ! pgen2gen jean.g ! VFin m jean.n jean.p + dort.s ! pgen2gen jean.g ! VFin (VPres m) jean.n jean.p } ; @@ -592,12 +611,12 @@ oper -- for positive and negative uses of the verb -- ("je crois qu'elle vient" -"je ne crois pas qu'elle vienne"), - SentenceVerb : Type = VerbPres ** {mp, mn : Mode} ; + SentenceVerb : Type = Verb ** {mp, mn : Mode} ; complSentVerb : SentenceVerb -> Sentence -> VerbGroup = \croire,jeanboit -> - {s = \\b,_,w => + {s = \\b,g,w => let {m = if_then_else Mode b croire.mp croire.mn} - in posNeg b (croire.s ! w) (embedConj ++ jeanboit.s ! m)} ; ----w + in (predVerb croire).s ! b ! g ! w ++ (embedConj ++ jeanboit.s ! m)} ; ----w verbSent : Verb -> Mode -> Mode -> SentenceVerb = \v,mp,mn -> v ** {mp = mp ; mn = mn} ; @@ -679,7 +698,8 @@ oper -- slash expressions ("que je vois", "dont je parle"). relVerbPhrase : RelPron -> VerbPhrase -> RelClause = \qui,dort -> - {s = \\m,g,n => allRelForms qui g n nominative ++ dort.s ! g ! VFin m n P3 + {s = \\m,g,n => + allRelForms qui g n nominative ++ dort.s ! g ! VFin (VPres m) n P3 } ; relSlash : RelPron -> SentenceSlashNounPhrase -> RelClause = \dont,jeparle -> diff --git a/lib/resource/romance/TypesRomance.gf b/lib/resource/romance/TypesRomance.gf index 6c4c90e1c..7cdddde5c 100644 --- a/lib/resource/romance/TypesRomance.gf +++ b/lib/resource/romance/TypesRomance.gf @@ -155,10 +155,18 @@ oper param VF = - VFin Mode Number Person + VInfin + | VFin TMode Number Person | VImper NumPersI | VPart Gender Number - | VInfin + ; + + TMode = + VPres Mode + | VImperf Mode + | VPasse + | VFut + | VCondit ; NumPersI = SgP2 | PlP1 | PlP2 ; @@ -171,6 +179,7 @@ oper _ => singular --- } ; + presInd = VPres Ind ; -- The imperative forms depend on number and person. vImper : Number -> Person -> VF = \n,p -> case of { @@ -182,7 +191,10 @@ oper Verbum : Type ; - VerbPres : Type = {s : VF => Str} ; + Verb : Type = {s : VF => Str ; aux : VAux} ; + + verbPres : Verbum -> VAux -> Verb ; + +param VAux = AEsse | AHabere ; - verbPres : Verbum -> VerbPres ; }