summaryrefslogtreecommitdiff
path: root/examples/phrasebook/SentencesRon.gf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/phrasebook/SentencesRon.gf')
-rw-r--r--examples/phrasebook/SentencesRon.gf25
1 files changed, 23 insertions, 2 deletions
diff --git a/examples/phrasebook/SentencesRon.gf b/examples/phrasebook/SentencesRon.gf
index 94c94d9eb..a60cd9e1a 100644
--- a/examples/phrasebook/SentencesRon.gf
+++ b/examples/phrasebook/SentencesRon.gf
@@ -1,7 +1,7 @@
concrete SentencesRon of Sentences = NumeralRon ** SentencesI - [
IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale,
- ThePlace
+ ThePlace, Nationality, CitiNat, Citizenship, ACitizen, PCitizenship, PropCit
]
with
(Syntax = SyntaxRon),
@@ -9,6 +9,24 @@ concrete SentencesRon of Sentences = NumeralRon ** SentencesI - [
(Lexicon = LexiconRon) **
open SyntaxRon, ExtraRon in {
+oper
+ NPNationalityRon : Type = {lang : NP ; country : NP ; propObj : A; propPers : A};
+ CitizenshipRon : Type = {pers : A; prop : A};
+
+
+ mkNPNationalityRon : NP -> NP -> A -> A -> NPNationalityRon = \la,co,pro, prp ->
+ {lang = la ;
+ country = co ;
+ propObj = pro ;
+ propPers = prp
+ } ;
+
+ mkCitizenshipRon : A -> A -> CitizenshipRon = \aobj, apers -> {pers = apers; prop = aobj};
+
+
+lincat
+ Nationality = NPNationalityRon ;
+ Citizenship = CitizenshipRon ;
lin
IFemale = {name = mkNP i8fem_Pron ; isPron = True ; poss = mkQuant i_Pron} ;
@@ -22,7 +40,10 @@ lin
at = if_then_else Adv kind.at.needIndef (mkAdv kind.at name) (mkAdv kind.at (mkNP kind.name));
to = if_then_else Adv kind.at.needIndef (mkAdv kind.to name) (mkAdv kind.at (mkNP kind.name))
} ;
-
+CitiNat n = {pers = n.propPers; prop = n.propObj} ;
+ACitizen p n = mkCl p.name n.pers ;
+PCitizenship x = mkPhrase (mkUtt (mkAP x.prop)) ;
+PropCit p = p.prop ;
}