From 424e65d66c63d412e1daa930c3cd282e2b4b0914 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Mon, 7 Jan 2019 09:51:10 -0200 Subject: [PATCH 1/2] (Romance) abstract tense/anteriority choice of verb/auxiliary to oper in Diff - in preparation for changing the choices in DiffPor --- src/romance/DiffRomance.gf | 17 ++++++++++++++++- src/romance/ResRomance.gf | 13 +------------ src/romance/SentenceRomance.gf | 13 +------------ 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/src/romance/DiffRomance.gf b/src/romance/DiffRomance.gf index e9d0c055f..22021c0d8 100644 --- a/src/romance/DiffRomance.gf +++ b/src/romance/DiffRomance.gf @@ -169,5 +169,20 @@ oper contractInf : Bool -> Bool -> Bool = \_,_ -> False ; -- only True in Ita, by orB -} + chooseTA : RTense -> Anteriority + -> (VF => Str) -> (VF => Str) + -> Number -> Person -> Mood -> Str -> Str * Str ; + chooseTA t a verb vaux n p m part = case of { + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => + } ; +} ; diff --git a/src/romance/ResRomance.gf b/src/romance/ResRomance.gf index bd0ab912b..ad38ed321 100644 --- a/src/romance/ResRomance.gf +++ b/src/romance/ResRomance.gf @@ -228,18 +228,7 @@ oper ---- } ; - vps : Str * Str = case of { - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => - } ; + vps : Str * Str = chooseTA te a verb vaux num per m part ; fin = vps.p1 ; inf = vps.p2 ; diff --git a/src/romance/SentenceRomance.gf b/src/romance/SentenceRomance.gf index 8ade9cc91..a2ac17c21 100644 --- a/src/romance/SentenceRomance.gf +++ b/src/romance/SentenceRomance.gf @@ -113,19 +113,8 @@ incomplete concrete SentenceRomance of Sentence = ---- VPAgrClit g n => verb ! VPart g n ---- } ; - vpss : Str * Str = case of { + vpss : Str * Str = chooseTA te a verb vaux num per m part ; - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => ; --# notpresent - => - } ; fin = vpss.p1 ; inf = vpss.p2 ; hypt = verbHyphen vp.s ; -- in French, -t- in some cases, otherwise - ; empty in other langs From 8013362e48f578880c545cdc1e0e8f3b6cfaf5e9 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Mon, 7 Jan 2019 10:30:31 -0200 Subject: [PATCH 2/2] (Por) use chooseTA - pick imperfect tense when verb form is present anterior - pick perfect tense when verb form is past simultaneous --- src/portuguese/DiffPor.gf | 23 ++++++++++++++++++++--- src/spanish/LangSpa.gf | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/portuguese/DiffPor.gf b/src/portuguese/DiffPor.gf index d2e80ee4c..1f6082189 100644 --- a/src/portuguese/DiffPor.gf +++ b/src/portuguese/DiffPor.gf @@ -1,6 +1,6 @@ --# -path=.:../romance:../abstract:../common:../prelude -instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in { +instance DiffPor of DiffRomance - [chooseTA,partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in { flags optimize=noexpand ; coding=utf8 ; @@ -199,6 +199,23 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo vpAgrClit : Agr -> VPAgr = \a -> vpAgrNone ; + oper + chooseTA : RTense -> Anteriority + -> (VF => Str) -> (VF => Str) + -> Number -> Person -> Mood -> Str -> Str * Str ; + chooseTA t a verb vaux n p m part = case of { + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => ; --# notpresent + => + } ; + -- oper's opers oper argPron : Gender -> Number -> Person -> Case -> Str = @@ -216,8 +233,8 @@ instance DiffPor of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo \g,n,p -> case < : Gender * Number * Person> of { <_,Sg,P1> => cases "me" "mim" ; <_,Sg,P2> => cases "te" "ti" ; - <_,Pl,P1> => cases "nos" "nós" ; --- nosotros - <_,Pl,P2> => cases "vos" "vós" ; --- vosotros + <_,Pl,P1> => cases "nos" "nós" ; + <_,Pl,P2> => cases "vos" "vós" ; => cases3 "a" "sua" "ela" ; <_, Sg,P3> => cases3 "o" "seu" "ele" ; => cases3 "as" "suas" "elas" ; diff --git a/src/spanish/LangSpa.gf b/src/spanish/LangSpa.gf index 1c3abf3f6..1e3c5c0d5 100644 --- a/src/spanish/LangSpa.gf +++ b/src/spanish/LangSpa.gf @@ -1,4 +1,4 @@ ---# -path=.:../romance:../abstract:../common:../api +--# -path=.:../romance:../abstract:../common:../api:../prelude concrete LangSpa of Lang = GrammarSpa,