mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 10:49:33 -06:00
Also include some syntax stuff adapted from Angelo Zammit's dissertation.
These sections in the code are marked with [AZ]
The old verbs implementation can still be found at this point in the GitHub repo:
7b3f4a049d
44 lines
926 B
Plaintext
44 lines
926 B
Plaintext
-- SentenceMlt.gf: clauses and sentences
|
|
--
|
|
-- Maltese Resource Grammar Library
|
|
-- John J. Camilleri, 2012
|
|
-- Licensed under LGPL
|
|
|
|
--# -path=.:abstract:common:prelude
|
|
|
|
concrete SentenceMlt of Sentence = CatMlt ** open
|
|
Prelude,
|
|
ResMlt,
|
|
ParamX,
|
|
CommonX in {
|
|
|
|
flags optimize=all_subs ;
|
|
|
|
lin
|
|
-- NP -> VP -> Cl
|
|
-- John walks
|
|
PredVP np vp = {
|
|
s = \\tense,ant,pol => (s ++ v ++ o)
|
|
where {
|
|
s = case np.isPron of {
|
|
True => [] ; -- omit subject pronouns
|
|
False => np.s ! Nom
|
|
} ;
|
|
v = joinVParts (vp.s ! VPIndicat tense (toVAgr np.a) ! ant ! pol) ;
|
|
o = vp.s2 ! np.a ;
|
|
-- s = if_then_Str np.isPron [] (np.s ! Nom) ; -- omit subject pronouns
|
|
-- v = joinVParts (vp.s ! VPIndicat tense (toVAgr np.a) ! ant ! pol) ;
|
|
-- o = vp.s2 ! np.a ;
|
|
} ;
|
|
} ;
|
|
|
|
-- Cl
|
|
-- Imp
|
|
-- QS
|
|
-- RS
|
|
-- S
|
|
-- SC
|
|
-- SSlash
|
|
|
|
}
|