diff --git a/lib/resource/english/CatEng.gf b/lib/resource/english/CatEng.gf index 685fad9ea..2a8e948c6 100644 --- a/lib/resource/english/CatEng.gf +++ b/lib/resource/english/CatEng.gf @@ -34,13 +34,7 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in { -- Verb - VP = { - s : ResEng.Tense => Anteriority => CPolarity => Order => Agr => {fin, inf : Str} ; - prp : Str ; -- present participle - inf : Str ; -- infinitive - ad : Str ; - s2 : Agr => Str - } ; + VP = ResEng.VP ; Comp = {s : Agr => Str} ; diff --git a/lib/resource/english/IdiomEng.gf b/lib/resource/english/IdiomEng.gf index 35ef4ba46..da889ded4 100644 --- a/lib/resource/english/IdiomEng.gf +++ b/lib/resource/english/IdiomEng.gf @@ -22,7 +22,7 @@ concrete IdiomEng of Idiom = CatEng ** open Prelude, ResEng in { mkQuestion (ss (ip.s ! Nom)) (mkClause "there" (agrP3 ip.n) (predAux auxBe)) ; - ProgrVP vp = insertObj (\\a => vp.ad ++ vp.prp ++ vp.s2 ! a) (predAux auxBe) ; + ProgrVP vp = insertObj (\\a => vp.prp ++ vp.s2 ! a) (predAux auxBe) ; ImpPl1 vp = {s = "let's" ++ infVP True vp {n = Pl ; p = P1}} ; diff --git a/lib/resource/english/ResEng.gf b/lib/resource/english/ResEng.gf index e27ae5095..ae8ee0c41 100644 --- a/lib/resource/english/ResEng.gf +++ b/lib/resource/english/ResEng.gf @@ -181,13 +181,13 @@ resource ResEng = ParamX ** open Prelude in { } ; VerbForms : Type = - Tense => Anteriority => CPolarity => Order => Agr => {fin, inf : Str} ; + Tense => Anteriority => CPolarity => Order => Agr => + {aux, adv, fin, inf : Str} ; -- would, hardly, sleeps, slept VP : Type = { s : VerbForms ; prp : Str ; -- present participle inf : Str ; -- the infinitive form ; VerbForms would be the logical place - ad : Str ; -- sentential adverb s2 : Agr => Str -- complement } ; @@ -200,11 +200,11 @@ resource ResEng = ParamX ** open Prelude in { part = verb.s ! VPPart ; in case of { - => vf fin [] ; + => vff fin [] ; => vf (does agr) inf ; => vf (have agr) part ; --# notpresent => vfn c (have agr) (havent agr) part ; --# notpresent - => vf (verb.s ! VPast) [] ; --# notpresent + => vff (verb.s ! VPast) [] ; --# notpresent => vf "did" inf ; --# notpresent => vfn c "did" "didn't" inf ; --# notpresent => vf "had" part ; --# notpresent @@ -221,7 +221,6 @@ resource ResEng = ParamX ** open Prelude in { } ; prp = verb.s ! VPresPart ; inf = verb.s ! VInf ; - ad = [] ; s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) [] } ; @@ -257,16 +256,19 @@ resource ResEng = ParamX ** open Prelude in { } ; prp = verb.prpart ; inf = verb.inf ; - ad = [] ; s2 = \\_ => [] } ; - vf : Str -> Str -> {fin, inf : Str} = \x,y -> vfn True x x y ; + vff : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> + {aux = [] ; adv = [] ; fin = x ; inf = y} ; - vfn : Bool -> Str -> Str -> Str -> {fin, inf : Str} = \contr,x,y,z -> + vf : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> vfn True x x y ; + + vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} = + \contr,x,y,z -> case contr of { - True => {fin = y ; inf = z} ; - False => {fin = x ; inf = "not" ++ z} + True => {aux = y ; adv = [] ; fin = [] ; inf = z} ; + False => {aux = x ; adv = "not" ; fin = [] ; inf = z} } ; insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { @@ -279,11 +281,12 @@ resource ResEng = ParamX ** open Prelude in { --- The adverb should be before the finite verb. - insertAdV : Str -> VP -> VP = \adv,vp -> { - s = vp.s ; + insertAdV : Str -> VP -> VP = \ad,vp -> { + s = \\t,ant,cb,ord,agr => + let vps = vp.s ! t ! ant ! cb ! ord ! agr in + {aux = vps.aux ; adv = vps.adv ++ ad ; fin = vps.fin ; inf = vps.inf} ; prp = vp.prp ; inf = vp.inf ; - ad = vp.ad ++ adv ; s2 = \\a => vp.s2 ! a } ; @@ -313,7 +316,7 @@ resource ResEng = ParamX ** open Prelude in { agrVerb (verb.s ! VPres) (verb.s ! VInf) ; infVP : Bool -> VP -> Agr -> Str = \isAux,vp,a -> - vp.ad ++ if_then_Str isAux [] "to" ++ + if_then_Str isAux [] "to" ++ vp.inf ++ vp.s2 ! a ; agrVerb : Str -> Str -> Agr -> Str = \has,have,agr -> @@ -378,8 +381,8 @@ resource ResEng = ParamX ** open Prelude in { compl = vp.s2 ! agr in case o of { - ODir => subj ++ verb.fin ++ vp.ad ++ verb.inf ++ compl ; - OQuest => verb.fin ++ subj ++ vp.ad ++ verb.inf ++ compl + ODir => subj ++ verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ++ compl ; + OQuest => verb.aux ++ subj ++ verb.adv ++ verb.fin ++ verb.inf ++ compl } } ;