From 524d8bb787ff3d334145854453e02a21ada0cf1e Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 27 Sep 2014 11:17:52 +0000 Subject: [PATCH] fixed a bug causing too much gluing of Ita,Spa nominal forms with their complements; should only apply to clitic pronouns. And an even worse bug in Fre, due to the use of course-of-value tables in DiffFre (instead of full explicit tables). After the present participle was added to Romance verbs, these tables lacked one form, but this was not reported by the type checker. The result was garbled linearizations and, in some cases, run-time errors in the PGF interpreter. Something to fix in the concrete syntax type checker of course. --- src/french/DiffFre.gf | 4 ++-- src/romance/ResRomance.gf | 16 ++++++---------- src/translator/ExtensionsFre.gf | 8 ++++---- src/translator/ExtensionsIta.gf | 8 ++++---- src/translator/ExtensionsSpa.gf | 8 ++++---- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/french/DiffFre.gf b/src/french/DiffFre.gf index 831c5e3f..e920ebdb 100644 --- a/src/french/DiffFre.gf +++ b/src/french/DiffFre.gf @@ -245,7 +245,7 @@ instance DiffFre of DiffRomance - [ "fus";"fus";"fut";"fûmes";"fûtes";"furent";--# notpresent "serai";"seras";"sera";"serons";"serez";"seront";--# notpresent "serais";"serais";"serait";"serions";"seriez";"seraient";--# notpresent -"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant"]; vtyp=VTyp VHabere False ; p = []} ; +"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant";"étant"]; vtyp=VTyp VHabere False ; p = []} ; avoir_V : Verb = {s=table VF ["avoir";"avoir";"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait" ;"ayons";"ayez";"aient"; @@ -254,7 +254,7 @@ instance DiffFre of DiffRomance - [ "eus";"eus";"eut";"eûmes";"eûtes";"eurent";--# notpresent "aurai";"auras";"aura";"aurons";"aurez";"auront";--# notpresent "aurais";"aurais";"aurait";"aurions";"auriez";"auraient";--# notpresent -"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant"];vtyp=VTyp VHabere True ; p = []} ; ---- a-t-il eut-il +"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant";"ayant"];vtyp=VTyp VHabere True ; p = []} ; ---- a-t-il eut-il datClit = "y" ; genClit = "en" ; diff --git a/src/romance/ResRomance.gf b/src/romance/ResRomance.gf index 7c369201..dbc43ba8 100644 --- a/src/romance/ResRomance.gf +++ b/src/romance/ResRomance.gf @@ -276,18 +276,14 @@ oper --- have a "-" with possibly a special verb form with "t": --- "comment fera-t-il" vs. "comment fera Pierre" - infVP : VP -> Agr -> Str = \vp -> + infVP : VP -> Agr -> Str = nominalVP VInfin ; + + gerVP : VP -> Agr -> Str = nominalVP (\_ -> VGer) ; + + nominalVP : (Bool -> VF) -> VP -> Agr -> Str = \vf,vp,agr -> let iform = orB vp.clit3.hasClit (isVRefl vp.s.vtyp) ; - vf = VInfin iform ; - in - nominalVP vf iform vp ; - - gerVP : VP -> Agr -> Str = nominalVP VGer True ; - - nominalVP : VF -> Bool -> VP -> Agr -> Str = \vf,iform,vp,agr -> - let - inf = vp.s.s ! vf ; + inf = vp.s.s ! vf iform ; neg = vp.neg ! RPos ; --- Neg not in API obj = vp.s.p ++ vp.comp ! agr ++ vp.ext ! RPos ; ---- pol refl = case isVRefl vp.s.vtyp of { diff --git a/src/translator/ExtensionsFre.gf b/src/translator/ExtensionsFre.gf index 1cbc9191..acd047b4 100644 --- a/src/translator/ExtensionsFre.gf +++ b/src/translator/ExtensionsFre.gf @@ -77,16 +77,16 @@ lin PresPartAP vp = { s = table { - AF g n => nominalVP VPresPart True vp (agrP3 g n) ; - _ => nominalVP VPresPart True vp (agrP3 Masc Sg) ---- the adverb form + AF g n => nominalVP (\_ -> VPresPart) vp (agrP3 g n) ; + _ => nominalVP (\_ -> VPresPart) vp (agrP3 Masc Sg) ---- the adverb form } ; isPre = False } ; PastPartAP vp = { s = table { - AF g n => nominalVP (VPart g n) True vp (agrP3 g n) ; - _ => nominalVP (VPart Masc Sg) True vp (agrP3 Masc Sg) ---- the adverb form + AF g n => nominalVP (\_ -> VPart g n) vp (agrP3 g n) ; + _ => nominalVP (\_ -> VPart Masc Sg) vp (agrP3 Masc Sg) ---- the adverb form } ; isPre = False } ; diff --git a/src/translator/ExtensionsIta.gf b/src/translator/ExtensionsIta.gf index 38f5b705..0a180b42 100644 --- a/src/translator/ExtensionsIta.gf +++ b/src/translator/ExtensionsIta.gf @@ -76,16 +76,16 @@ lin PresPartAP vp = { s = table { - AF g n => nominalVP VPresPart True vp (agrP3 g n) ; - _ => nominalVP VPresPart True vp (agrP3 Masc Sg) ---- the adverb form + AF g n => nominalVP (\_ -> VPresPart) vp (agrP3 g n) ; + _ => nominalVP (\_ -> VPresPart) vp (agrP3 Masc Sg) ---- the adverb form } ; isPre = False } ; PastPartAP vp = { s = table { - AF g n => nominalVP (VPart g n) True vp (agrP3 g n) ; - _ => nominalVP (VPart Masc Sg) True vp (agrP3 Masc Sg) ---- the adverb form + AF g n => nominalVP (\_ -> VPart g n) vp (agrP3 g n) ; + _ => nominalVP (\_ -> VPart Masc Sg) vp (agrP3 Masc Sg) ---- the adverb form } ; isPre = False } ; diff --git a/src/translator/ExtensionsSpa.gf b/src/translator/ExtensionsSpa.gf index eccbd87b..df7b005f 100644 --- a/src/translator/ExtensionsSpa.gf +++ b/src/translator/ExtensionsSpa.gf @@ -77,16 +77,16 @@ lin PresPartAP vp = { s = table { - AF g n => nominalVP VPresPart True vp (agrP3 g n) ; - _ => nominalVP VPresPart True vp (agrP3 Masc Sg) ---- the adverb form + AF g n => nominalVP (\_ -> VPresPart) vp (agrP3 g n) ; + _ => nominalVP (\_ -> VPresPart) vp (agrP3 Masc Sg) ---- the adverb form } ; isPre = False } ; PastPartAP vp = { s = table { - AF g n => nominalVP (VPart g n) True vp (agrP3 g n) ; - _ => nominalVP (VPart Masc Sg) True vp (agrP3 Masc Sg) ---- the adverb form + AF g n => nominalVP (\_ -> VPart g n) vp (agrP3 g n) ; + _ => nominalVP (\_ -> VPart Masc Sg) vp (agrP3 Masc Sg) ---- the adverb form } ; isPre = False } ;