summaryrefslogtreecommitdiff
path: root/testsuite/compiler/canonical/SentencesBul.gf
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@digitalgrammars.com>2021-06-30 12:41:56 +0200
committerJohn J. Camilleri <john@digitalgrammars.com>2021-06-30 12:41:56 +0200
commit0f5be0bbaa862d2ccdb649eb6dd9fc5e26814e8a (patch)
tree055e215af682bdde05f3e0b8e78e65e9d3e856d6 /testsuite/compiler/canonical/SentencesBul.gf
parent0a70eca6e2913c462c5c65361131f3ed341e539d (diff)
Add shell script in testsuite/compiler/canonical for replicating known issues
Ideally this is integrated into proper test suite, but that's too much overhead for now
Diffstat (limited to 'testsuite/compiler/canonical/SentencesBul.gf')
-rw-r--r--testsuite/compiler/canonical/SentencesBul.gf54
1 files changed, 54 insertions, 0 deletions
diff --git a/testsuite/compiler/canonical/SentencesBul.gf b/testsuite/compiler/canonical/SentencesBul.gf
new file mode 100644
index 000000000..b2968bc85
--- /dev/null
+++ b/testsuite/compiler/canonical/SentencesBul.gf
@@ -0,0 +1,54 @@
+concrete SentencesBul of Sentences =
+ NumeralBul ** SentencesI - [IMale, IFemale, YouFamMale, YouFamFemale, YouPolMale,
+ YouPolFemale, ACitizen, Citizenship, PCitizenship,
+ LangNat, CitiNat, CountryNat, PropCit,
+ Nationality, Country, LAnguage, PLanguage, PCountry
+ ] with
+ (Syntax = SyntaxBul),
+ (Symbolic = SymbolicBul),
+ (Lexicon = LexiconBul) ** open ExtraBul, (R = ResBul) in {
+
+lincat
+ Citizenship = {s1 : R.Gender => R.NForm => Str; -- there are two nouns for every citizenship - one for males and one for females
+ s2 : A -- furthermore, adjective for Property
+ } ;
+ Nationality = {s1 : R.Gender => R.NForm => Str; -- there are two nouns for every citizenship - one for males and one for females
+ s2 : A; -- furthermore, adjective for Property
+ s3 : PN -- country name
+ } ;
+ LAnguage = A ;
+ Country = PN ;
+
+lin IMale = mkPerson i_Pron ;
+ IFemale = mkPerson i8fem_Pron ;
+
+lin YouFamMale = mkPerson youSg_Pron ;
+ YouFamFemale = mkPerson youSg8fem_Pron ;
+ YouPolMale, YouPolFemale = mkPerson youPol_Pron ;
+
+lin ACitizen p cit =
+ let noun : N
+ = case p.name.gn of {
+ R.GSg g => lin N {s = \\nf => cit.s1 ! g ! nf;
+ rel = cit.s2.s; relType = R.AdjMod;
+ g = case g of {R.Masc=>R.AMasc R.Human; R.Fem=>R.AFem; R.Neut=>R.ANeut}
+ } ;
+ R.GPl => lin N {s = \\nf => cit.s1 ! R.Masc ! nf;
+ rel = cit.s2.s; relType = R.AdjMod;
+ g = R.AMasc R.Human
+ }
+ } ;
+ in mkCl p.name noun ;
+
+ PCitizenship cit =
+ mkPhrase (mkUtt (mkAP cit.s2)) ;
+
+ LangNat n = n.s2 ;
+ CitiNat n = n ;
+ CountryNat n = n.s3 ;
+ PropCit cit = cit.s2 ;
+
+ PLanguage x = mkPhrase (mkUtt (mkAP x)) ;
+ PCountry x = mkPhrase (mkUtt (mkNP x)) ;
+
+}