1
0
forked from GitHub/gf-rgl

(Dut) If VPSlash has a preposition, insert object into Adv slot

This commit is contained in:
Inari Listenmaa
2018-04-23 15:00:50 +02:00
parent c8c6077cf7
commit 6ca9fbe55b

View File

@@ -36,20 +36,25 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
(predVGen False BetweenObjs (v2v v)) ** {c2 = v.c2} ; (predVGen False BetweenObjs (v2v v)) ** {c2 = v.c2} ;
ComplSlash vp np = ComplSlash vp np =
let obj : Agr => Str = \\_ => appPrep vp.c2.p1 np ; let hasInf = vp.inf.p2 ;
hasPrep = vp.c2.p2 ;
obj : Str = appPrep vp.c2.p1 np ;
-- If there is an infinitive, put the old object before it. -- If the verb has a preposition, insert the new object as an Adv.
-- If not, just keep the old vp. insertArg = case hasPrep of {
vp': VP = case vp.inf.p2 of { True => insertAdv obj ;
True => let emptyObjVP : VP = vp ** {n0, n2 = \\_ => [] } ; False => insertObjNP np.isPron vp.negPos (\\_ => obj) } ;
infCompl = vp.n0 ! np.a ++ vp.n2 ! np.a ;
in insertInf infCompl emptyObjVP ;
False => vp } ;
negPos = case vp.c2.p2 of { -- if the verb has a preposition or not -- If there is an infinitive, put old object before the infinitive
True => BeforeObjs ; -- and choose its agreement based on the new object.
False => vp.negPos } ; -- Otherwise, keep the old VP.
in insertObjNP np.isPron negPos obj vp' ; newVP : VP = case hasInf of {
True => let emptyObjVP : VP = vp ** {n0, n2 = \\_ => [] } ;
infCompl = vp.n0 ! np.a ++ vp.n2 ! np.a ;
in insertInf infCompl emptyObjVP ;
_ => vp } ;
in insertArg newVP ;
SlashVV v vp = SlashVV v vp =
insertInfVP v.isAux vp (predVGen v.isAux vp.negPos v) ** {c2 = vp.c2} ; insertInfVP v.isAux vp (predVGen v.isAux vp.negPos v) ** {c2 = vp.c2} ;