mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-07-03 04:28:33 -06:00
Latvian: code refactoring (an intermediate step) and few bugfixes
This commit is contained in:
+18
-28
@@ -1,59 +1,49 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
--# -path=.:abstract:common:prelude
|
||||
|
||||
concrete IdiomLav of Idiom = CatLav ** open
|
||||
Prelude,
|
||||
ResLav,
|
||||
VerbLav,
|
||||
ParadigmsVerbsLav
|
||||
ParadigmsLav,
|
||||
ResLav,
|
||||
Prelude
|
||||
in {
|
||||
|
||||
flags
|
||||
|
||||
coding = utf8 ;
|
||||
optimize = all_subs ;
|
||||
|
||||
lin
|
||||
|
||||
ImpersCl vp =
|
||||
let agr = AgP3 Sg Masc Pos
|
||||
let agr = AgrP3 Sg Masc
|
||||
in {
|
||||
s = \\mood,pol =>
|
||||
buildVerb vp.v mood pol agr Pos vp.objNeg ++ -- Verb
|
||||
buildVerb vp.v mood pol agr Pos vp.agr.focus ++ -- Verb
|
||||
vp.compl ! agr -- Object(s), complements, adverbial modifiers
|
||||
} ;
|
||||
|
||||
GenericCl vp =
|
||||
let agr = AgP3 Sg Masc Pos
|
||||
let agr = AgrP3 Sg Masc
|
||||
in {
|
||||
s = \\mood,pol =>
|
||||
buildVerb vp.v mood pol agr Pos vp.objNeg ++
|
||||
buildVerb vp.v mood pol agr Pos vp.agr.focus ++
|
||||
vp.compl ! agr
|
||||
} ;
|
||||
|
||||
ExistNP np =
|
||||
let
|
||||
v = lin V mkVerb_Irreg_Be ;
|
||||
agr = np.a
|
||||
in {
|
||||
s = \\mood,pol =>
|
||||
buildVerb v mood pol agr (fromAgr np.a).pol Pos ++
|
||||
np.s ! Nom
|
||||
} ;
|
||||
ExistNP np = {
|
||||
s = \\mood,pol => buildVerb (mkV "būt") mood pol np.agr np.pol Pos ++ np.s ! Nom
|
||||
} ;
|
||||
|
||||
ExistIP ip =
|
||||
let
|
||||
v = lin V mkVerb_Irreg_Be ;
|
||||
agr = AgP3 ip.n Masc Pos
|
||||
in {
|
||||
s = \\mood,pol =>
|
||||
ip.s ! Nom ++
|
||||
buildVerb v mood pol agr Pos Pos
|
||||
} ;
|
||||
ExistIP ip = {
|
||||
s = \\mood,pol => ip.s ! Nom ++ buildVerb (mkV "būt") mood pol (AgrP3 ip.num Masc) Pos Pos
|
||||
} ;
|
||||
|
||||
-- FIXME: needs restriction so that only VMood Indicative _ _ Present is allowed;
|
||||
-- can't do that on VP level...
|
||||
ProgrVP v = v ;
|
||||
|
||||
ImpPl1 vp =
|
||||
let agr = AgP1 Pl Masc
|
||||
let agr = AgrP1 Pl Masc
|
||||
in {
|
||||
s =
|
||||
vp.v.s ! Pos ! (VInd P1 Pl Pres) ++ -- Verb
|
||||
@@ -63,7 +53,7 @@ lin
|
||||
;
|
||||
|
||||
ImpP3 np vp = {
|
||||
s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a (fromAgr np.a).pol vp.objNeg ++ vp.compl ! np.a ;
|
||||
s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.agr np.pol vp.agr.focus ++ vp.compl ! np.agr ;
|
||||
} ;
|
||||
|
||||
-- FIXME: placeholder
|
||||
|
||||
Reference in New Issue
Block a user