From 790e1f9ef2209605caac27c34b462f5dab69912d 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. --- lib/src/french/DiffFre.gf | 4 ++-- lib/src/romance/ResRomance.gf | 16 ++++++---------- lib/src/translator/ExtensionsFre.gf | 8 ++++---- lib/src/translator/ExtensionsIta.gf | 8 ++++---- lib/src/translator/ExtensionsSpa.gf | 8 ++++---- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/lib/src/french/DiffFre.gf b/lib/src/french/DiffFre.gf index 831c5e3f3..e920ebdb1 100644 --- a/lib/src/french/DiffFre.gf +++ b/lib/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/lib/src/romance/ResRomance.gf b/lib/src/romance/ResRomance.gf index 7c3692014..dbc43ba8a 100644 --- a/lib/src/romance/ResRomance.gf +++ b/lib/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/lib/src/translator/ExtensionsFre.gf b/lib/src/translator/ExtensionsFre.gf index 1cbc91913..acd047b4b 100644 --- a/lib/src/translator/ExtensionsFre.gf +++ b/lib/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/lib/src/translator/ExtensionsIta.gf b/lib/src/translator/ExtensionsIta.gf index 38f5b7057..0a180b421 100644 --- a/lib/src/translator/ExtensionsIta.gf +++ b/lib/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/lib/src/translator/ExtensionsSpa.gf b/lib/src/translator/ExtensionsSpa.gf index eccbd87bf..df7b005f6 100644 --- a/lib/src/translator/ExtensionsSpa.gf +++ b/lib/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 } ;