forked from GitHub/gf-core
Merge pull request #118 from GrammaticalFramework/canonical
Fixes to canonical compilation
This commit is contained in:
1
testsuite/canonical/.gitignore
vendored
Normal file
1
testsuite/canonical/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
canonical/
|
||||
102
testsuite/canonical/gold/FoodsFin.gf
Normal file
102
testsuite/canonical/gold/FoodsFin.gf
Normal file
@@ -0,0 +1,102 @@
|
||||
concrete FoodsFin of Foods = {
|
||||
param ParamX_Number = ParamX_Sg | ParamX_Pl;
|
||||
param Prelude_Bool = Prelude_False | Prelude_True;
|
||||
param ResFin_Agr = ResFin_Ag ParamX_Number ParamX_Person | ResFin_AgPol;
|
||||
param ParamX_Person = ParamX_P1 | ParamX_P2 | ParamX_P3;
|
||||
param ResFin_Harmony = ResFin_Back | ResFin_Front;
|
||||
param ResFin_NForm =
|
||||
ResFin_NCase ParamX_Number ResFin_Case | ResFin_NComit | ResFin_NInstruct |
|
||||
ResFin_NPossNom ParamX_Number | ResFin_NPossGen ParamX_Number |
|
||||
ResFin_NPossTransl ParamX_Number | ResFin_NPossIllat ParamX_Number |
|
||||
ResFin_NCompound;
|
||||
param ResFin_Case =
|
||||
ResFin_Nom | ResFin_Gen | ResFin_Part | ResFin_Transl | ResFin_Ess |
|
||||
ResFin_Iness | ResFin_Elat | ResFin_Illat | ResFin_Adess | ResFin_Ablat |
|
||||
ResFin_Allat | ResFin_Abess;
|
||||
param ResFin_NPForm = ResFin_NPCase ResFin_Case | ResFin_NPAcc | ResFin_NPSep;
|
||||
lincat Comment = {s : Str};
|
||||
Item =
|
||||
{s : ResFin_NPForm => Str; a : ResFin_Agr; isNeg : Prelude_Bool;
|
||||
isPron : Prelude_Bool};
|
||||
Kind =
|
||||
{s : ResFin_NForm => Str; h : ResFin_Harmony;
|
||||
postmod : ParamX_Number => Str};
|
||||
Quality =
|
||||
{s : Prelude_Bool => ResFin_NForm => Str; hasPrefix : Prelude_Bool;
|
||||
p : Str};
|
||||
lin Expensive =
|
||||
{s =
|
||||
table {Prelude_False =>
|
||||
table {ResFin_NCase ParamX_Sg ResFin_Nom => "kallis";
|
||||
ResFin_NCase ParamX_Sg ResFin_Gen => "kalliin";
|
||||
ResFin_NCase ParamX_Sg ResFin_Part => "kallista";
|
||||
ResFin_NCase ParamX_Sg ResFin_Transl => "kalliiksi";
|
||||
ResFin_NCase ParamX_Sg ResFin_Ess => "kalliina";
|
||||
ResFin_NCase ParamX_Sg ResFin_Iness => "kalliissa";
|
||||
ResFin_NCase ParamX_Sg ResFin_Elat => "kalliista";
|
||||
ResFin_NCase ParamX_Sg ResFin_Illat => "kalliiseen";
|
||||
ResFin_NCase ParamX_Sg ResFin_Adess => "kalliilla";
|
||||
ResFin_NCase ParamX_Sg ResFin_Ablat => "kalliilta";
|
||||
ResFin_NCase ParamX_Sg ResFin_Allat => "kalliille";
|
||||
ResFin_NCase ParamX_Sg ResFin_Abess => "kalliitta";
|
||||
ResFin_NCase ParamX_Pl ResFin_Nom => "kalliit";
|
||||
ResFin_NCase ParamX_Pl ResFin_Gen => "kalliiden";
|
||||
ResFin_NCase ParamX_Pl ResFin_Part => "kalliita";
|
||||
ResFin_NCase ParamX_Pl ResFin_Transl => "kalliiksi";
|
||||
ResFin_NCase ParamX_Pl ResFin_Ess => "kalliina";
|
||||
ResFin_NCase ParamX_Pl ResFin_Iness => "kalliissa";
|
||||
ResFin_NCase ParamX_Pl ResFin_Elat => "kalliista";
|
||||
ResFin_NCase ParamX_Pl ResFin_Illat => "kalliisiin";
|
||||
ResFin_NCase ParamX_Pl ResFin_Adess => "kalliilla";
|
||||
ResFin_NCase ParamX_Pl ResFin_Ablat => "kalliilta";
|
||||
ResFin_NCase ParamX_Pl ResFin_Allat => "kalliille";
|
||||
ResFin_NCase ParamX_Pl ResFin_Abess => "kalliitta";
|
||||
ResFin_NComit => "kalliine";
|
||||
ResFin_NInstruct => "kalliin";
|
||||
ResFin_NPossNom ParamX_Sg => "kallii";
|
||||
ResFin_NPossNom ParamX_Pl => "kallii";
|
||||
ResFin_NPossGen ParamX_Sg => "kallii";
|
||||
ResFin_NPossGen ParamX_Pl => "kalliide";
|
||||
ResFin_NPossTransl ParamX_Sg => "kalliikse";
|
||||
ResFin_NPossTransl ParamX_Pl => "kalliikse";
|
||||
ResFin_NPossIllat ParamX_Sg => "kalliisee";
|
||||
ResFin_NPossIllat ParamX_Pl => "kalliisii";
|
||||
ResFin_NCompound => "kallis"};
|
||||
Prelude_True =>
|
||||
table {ResFin_NCase ParamX_Sg ResFin_Nom => "kallis";
|
||||
ResFin_NCase ParamX_Sg ResFin_Gen => "kalliin";
|
||||
ResFin_NCase ParamX_Sg ResFin_Part => "kallista";
|
||||
ResFin_NCase ParamX_Sg ResFin_Transl => "kalliiksi";
|
||||
ResFin_NCase ParamX_Sg ResFin_Ess => "kalliina";
|
||||
ResFin_NCase ParamX_Sg ResFin_Iness => "kalliissa";
|
||||
ResFin_NCase ParamX_Sg ResFin_Elat => "kalliista";
|
||||
ResFin_NCase ParamX_Sg ResFin_Illat => "kalliiseen";
|
||||
ResFin_NCase ParamX_Sg ResFin_Adess => "kalliilla";
|
||||
ResFin_NCase ParamX_Sg ResFin_Ablat => "kalliilta";
|
||||
ResFin_NCase ParamX_Sg ResFin_Allat => "kalliille";
|
||||
ResFin_NCase ParamX_Sg ResFin_Abess => "kalliitta";
|
||||
ResFin_NCase ParamX_Pl ResFin_Nom => "kalliit";
|
||||
ResFin_NCase ParamX_Pl ResFin_Gen => "kalliiden";
|
||||
ResFin_NCase ParamX_Pl ResFin_Part => "kalliita";
|
||||
ResFin_NCase ParamX_Pl ResFin_Transl => "kalliiksi";
|
||||
ResFin_NCase ParamX_Pl ResFin_Ess => "kalliina";
|
||||
ResFin_NCase ParamX_Pl ResFin_Iness => "kalliissa";
|
||||
ResFin_NCase ParamX_Pl ResFin_Elat => "kalliista";
|
||||
ResFin_NCase ParamX_Pl ResFin_Illat => "kalliisiin";
|
||||
ResFin_NCase ParamX_Pl ResFin_Adess => "kalliilla";
|
||||
ResFin_NCase ParamX_Pl ResFin_Ablat => "kalliilta";
|
||||
ResFin_NCase ParamX_Pl ResFin_Allat => "kalliille";
|
||||
ResFin_NCase ParamX_Pl ResFin_Abess => "kalliitta";
|
||||
ResFin_NComit => "kalliine";
|
||||
ResFin_NInstruct => "kalliin";
|
||||
ResFin_NPossNom ParamX_Sg => "kallii";
|
||||
ResFin_NPossNom ParamX_Pl => "kallii";
|
||||
ResFin_NPossGen ParamX_Sg => "kallii";
|
||||
ResFin_NPossGen ParamX_Pl => "kalliide";
|
||||
ResFin_NPossTransl ParamX_Sg => "kalliikse";
|
||||
ResFin_NPossTransl ParamX_Pl => "kalliikse";
|
||||
ResFin_NPossIllat ParamX_Sg => "kalliisee";
|
||||
ResFin_NPossIllat ParamX_Pl => "kalliisii";
|
||||
ResFin_NCompound => "kallis"}};
|
||||
hasPrefix = Prelude_False; p = ""};
|
||||
}
|
||||
29
testsuite/canonical/gold/PhrasebookBul.gf
Normal file
29
testsuite/canonical/gold/PhrasebookBul.gf
Normal file
@@ -0,0 +1,29 @@
|
||||
concrete PhrasebookBul of Phrasebook = {
|
||||
param Prelude_Bool = Prelude_False | Prelude_True;
|
||||
param ResBul_AGender = ResBul_AMasc ResBul_Animacy | ResBul_AFem | ResBul_ANeut;
|
||||
param ResBul_Animacy = ResBul_Human | ResBul_NonHuman;
|
||||
param ResBul_Case = ResBul_Acc | ResBul_Dat | ResBul_WithPrep | ResBul_CPrep;
|
||||
param ResBul_NForm =
|
||||
ResBul_NF ParamX_Number ResBul_Species | ResBul_NFSgDefNom |
|
||||
ResBul_NFPlCount | ResBul_NFVocative;
|
||||
param ParamX_Number = ParamX_Sg | ParamX_Pl;
|
||||
param ResBul_Species = ResBul_Indef | ResBul_Def;
|
||||
lincat PlaceKind =
|
||||
{at : {s : Str; c : ResBul_Case}; isPl : Prelude_Bool;
|
||||
name : {s : ResBul_NForm => Str; g : ResBul_AGender};
|
||||
to : {s : Str; c : ResBul_Case}};
|
||||
VerbPhrase = {s : Str};
|
||||
lin Airport =
|
||||
{at = {s = "на"; c = ResBul_Acc}; isPl = Prelude_False;
|
||||
name =
|
||||
{s =
|
||||
table {ResBul_NF ParamX_Sg ResBul_Indef => "летище";
|
||||
ResBul_NF ParamX_Sg ResBul_Def => "летището";
|
||||
ResBul_NF ParamX_Pl ResBul_Indef => "летища";
|
||||
ResBul_NF ParamX_Pl ResBul_Def => "летищата";
|
||||
ResBul_NFSgDefNom => "летището";
|
||||
ResBul_NFPlCount => "летища";
|
||||
ResBul_NFVocative => "летище"};
|
||||
g = ResBul_ANeut};
|
||||
to = {s = "до"; c = ResBul_CPrep}};
|
||||
}
|
||||
251
testsuite/canonical/gold/PhrasebookGer.gf
Normal file
251
testsuite/canonical/gold/PhrasebookGer.gf
Normal file
@@ -0,0 +1,251 @@
|
||||
concrete PhrasebookGer of Phrasebook = {
|
||||
param Prelude_Bool = Prelude_False | Prelude_True;
|
||||
param ResGer_Agr = ResGer_Ag ResGer_Gender ParamX_Number ParamX_Person;
|
||||
param ParamX_Number = ParamX_Sg | ParamX_Pl;
|
||||
param ParamX_Person = ParamX_P1 | ParamX_P2 | ParamX_P3;
|
||||
param ResGer_Gender = ResGer_Masc | ResGer_Fem | ResGer_Neutr;
|
||||
param ResGer_Control = ResGer_SubjC | ResGer_ObjC | ResGer_NoC;
|
||||
param ResGer_PCase = ResGer_NPC ResGer_Case | ResGer_NPP ResGer_CPrep;
|
||||
param ResGer_CPrep =
|
||||
ResGer_CAnDat | ResGer_CInAcc | ResGer_CInDat | ResGer_CZuDat |
|
||||
ResGer_CVonDat;
|
||||
param ResGer_Case = ResGer_Nom | ResGer_Acc | ResGer_Dat | ResGer_Gen;
|
||||
param ResGer_VAux = ResGer_VHaben | ResGer_VSein;
|
||||
param ResGer_VForm =
|
||||
ResGer_VInf Prelude_Bool | ResGer_VFin Prelude_Bool ResGer_VFormFin |
|
||||
ResGer_VImper ParamX_Number | ResGer_VPresPart ResGer_AForm |
|
||||
ResGer_VPastPart ResGer_AForm;
|
||||
param ResGer_AForm = ResGer_APred | ResGer_AMod ResGer_GenNum ResGer_Case;
|
||||
param ResGer_GenNum = ResGer_GSg ResGer_Gender | ResGer_GPl;
|
||||
param ResGer_VFormFin =
|
||||
ResGer_VPresInd ParamX_Number ParamX_Person |
|
||||
ResGer_VPresSubj ParamX_Number ParamX_Person;
|
||||
param ResGer_VType = ResGer_VAct | ResGer_VRefl ResGer_Case;
|
||||
lincat PlaceKind = {s : Str};
|
||||
VerbPhrase =
|
||||
{s :
|
||||
{s : ResGer_VForm => Str; aux : ResGer_VAux; particle : Str;
|
||||
prefix : Str; vtype : ResGer_VType};
|
||||
a1 : Str; a2 : Str; adj : Str; ext : Str;
|
||||
inf : {s : Str; ctrl : ResGer_Control; isAux : Prelude_Bool};
|
||||
infExt : Str; isAux : Prelude_Bool;
|
||||
nn :
|
||||
ResGer_Agr =>
|
||||
{p1 : Str; p2 : Str; p3 : Str; p4 : Str; p5 : Str; p6 : Str};
|
||||
subjc :
|
||||
{s : Str; c : ResGer_PCase; isPrep : Prelude_Bool; s2 : Str}};
|
||||
lin VRead =
|
||||
{s =
|
||||
{s =
|
||||
table {ResGer_VInf Prelude_False => "lesen";
|
||||
ResGer_VInf Prelude_True => "zu" ++ "lesen";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresInd ParamX_Sg ParamX_P1) =>
|
||||
"lese";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresInd ParamX_Sg ParamX_P2) =>
|
||||
"liest";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresInd ParamX_Sg ParamX_P3) =>
|
||||
"liest";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresInd ParamX_Pl ParamX_P1) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresInd ParamX_Pl ParamX_P2) =>
|
||||
"lest";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresInd ParamX_Pl ParamX_P3) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresSubj ParamX_Sg ParamX_P1) =>
|
||||
"lese";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresSubj ParamX_Sg ParamX_P2) =>
|
||||
"lesest";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresSubj ParamX_Sg ParamX_P3) =>
|
||||
"lese";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresSubj ParamX_Pl ParamX_P1) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresSubj ParamX_Pl ParamX_P2) =>
|
||||
"leset";
|
||||
ResGer_VFin Prelude_False
|
||||
(ResGer_VPresSubj ParamX_Pl ParamX_P3) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresInd ParamX_Sg ParamX_P1) =>
|
||||
"lese";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresInd ParamX_Sg ParamX_P2) =>
|
||||
"liest";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresInd ParamX_Sg ParamX_P3) =>
|
||||
"liest";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresInd ParamX_Pl ParamX_P1) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresInd ParamX_Pl ParamX_P2) =>
|
||||
"lest";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresInd ParamX_Pl ParamX_P3) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresSubj ParamX_Sg ParamX_P1) =>
|
||||
"lese";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresSubj ParamX_Sg ParamX_P2) =>
|
||||
"lesest";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresSubj ParamX_Sg ParamX_P3) =>
|
||||
"lese";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresSubj ParamX_Pl ParamX_P1) =>
|
||||
"lesen";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresSubj ParamX_Pl ParamX_P2) =>
|
||||
"leset";
|
||||
ResGer_VFin Prelude_True
|
||||
(ResGer_VPresSubj ParamX_Pl ParamX_P3) =>
|
||||
"lesen";
|
||||
ResGer_VImper ParamX_Sg => "les";
|
||||
ResGer_VImper ParamX_Pl => "lest";
|
||||
ResGer_VPresPart ResGer_APred => "lesend";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Nom) =>
|
||||
"lesender";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Acc) =>
|
||||
"lesenden";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Dat) =>
|
||||
"lesendem";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Gen) =>
|
||||
"lesenden";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Nom) =>
|
||||
"lesende";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Acc) =>
|
||||
"lesende";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Dat) =>
|
||||
"lesender";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Gen) =>
|
||||
"lesender";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Nom) =>
|
||||
"lesendes";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Acc) =>
|
||||
"lesendes";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Dat) =>
|
||||
"lesendem";
|
||||
ResGer_VPresPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Gen) =>
|
||||
"lesenden";
|
||||
ResGer_VPresPart (ResGer_AMod ResGer_GPl ResGer_Nom) =>
|
||||
"lesende";
|
||||
ResGer_VPresPart (ResGer_AMod ResGer_GPl ResGer_Acc) =>
|
||||
"lesende";
|
||||
ResGer_VPresPart (ResGer_AMod ResGer_GPl ResGer_Dat) =>
|
||||
"lesenden";
|
||||
ResGer_VPresPart (ResGer_AMod ResGer_GPl ResGer_Gen) =>
|
||||
"lesender";
|
||||
ResGer_VPastPart ResGer_APred => "gelesen";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Nom) =>
|
||||
"gelesener";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Acc) =>
|
||||
"gelesenen";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Dat) =>
|
||||
"gelesenem";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Masc)
|
||||
ResGer_Gen) =>
|
||||
"gelesenen";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Nom) =>
|
||||
"gelesene";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Acc) =>
|
||||
"gelesene";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Dat) =>
|
||||
"gelesener";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Fem)
|
||||
ResGer_Gen) =>
|
||||
"gelesener";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Nom) =>
|
||||
"gelesenes";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Acc) =>
|
||||
"gelesenes";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Dat) =>
|
||||
"gelesenem";
|
||||
ResGer_VPastPart (ResGer_AMod (ResGer_GSg ResGer_Neutr)
|
||||
ResGer_Gen) =>
|
||||
"gelesenen";
|
||||
ResGer_VPastPart (ResGer_AMod ResGer_GPl ResGer_Nom) =>
|
||||
"gelesene";
|
||||
ResGer_VPastPart (ResGer_AMod ResGer_GPl ResGer_Acc) =>
|
||||
"gelesene";
|
||||
ResGer_VPastPart (ResGer_AMod ResGer_GPl ResGer_Dat) =>
|
||||
"gelesenen";
|
||||
ResGer_VPastPart (ResGer_AMod ResGer_GPl ResGer_Gen) =>
|
||||
"gelesener"};
|
||||
aux = ResGer_VHaben; particle = ""; prefix = "";
|
||||
vtype = ResGer_VAct};
|
||||
a1 = ""; a2 = ""; adj = ""; ext = "";
|
||||
inf = {s = ""; ctrl = ResGer_NoC; isAux = Prelude_True}; infExt = "";
|
||||
isAux = Prelude_False;
|
||||
nn =
|
||||
table {ResGer_Ag ResGer_Masc ParamX_Sg ParamX_P1 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Masc ParamX_Sg ParamX_P2 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Masc ParamX_Sg ParamX_P3 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Masc ParamX_Pl ParamX_P1 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Masc ParamX_Pl ParamX_P2 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Masc ParamX_Pl ParamX_P3 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Fem ParamX_Sg ParamX_P1 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Fem ParamX_Sg ParamX_P2 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Fem ParamX_Sg ParamX_P3 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Fem ParamX_Pl ParamX_P1 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Fem ParamX_Pl ParamX_P2 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Fem ParamX_Pl ParamX_P3 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Neutr ParamX_Sg ParamX_P1 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Neutr ParamX_Sg ParamX_P2 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Neutr ParamX_Sg ParamX_P3 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Neutr ParamX_Pl ParamX_P1 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Neutr ParamX_Pl ParamX_P2 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""};
|
||||
ResGer_Ag ResGer_Neutr ParamX_Pl ParamX_P3 =>
|
||||
{p1 = ""; p2 = ""; p3 = ""; p4 = ""; p5 = ""; p6 = ""}};
|
||||
subjc =
|
||||
{s = ""; c = ResGer_NPC ResGer_Nom; isPrep = Prelude_False;
|
||||
s2 = ""}};
|
||||
}
|
||||
16
testsuite/canonical/grammars/Foods.gf
Normal file
16
testsuite/canonical/grammars/Foods.gf
Normal file
@@ -0,0 +1,16 @@
|
||||
-- (c) 2009 Aarne Ranta under LGPL
|
||||
|
||||
abstract Foods = {
|
||||
flags startcat = Comment ;
|
||||
cat
|
||||
Comment ; Item ; Kind ; Quality ;
|
||||
fun
|
||||
-- Pred : Item -> Quality -> Comment ;
|
||||
-- This, That, These, Those : Kind -> Item ;
|
||||
-- Mod : Quality -> Kind -> Kind ;
|
||||
-- Wine, Cheese, Fish, Pizza : Kind ;
|
||||
-- Very : Quality -> Quality ;
|
||||
-- Fresh, Warm, Italian,
|
||||
-- Expensive, Delicious, Boring : Quality ;
|
||||
Expensive: Quality;
|
||||
}
|
||||
6
testsuite/canonical/grammars/FoodsFin.gf
Normal file
6
testsuite/canonical/grammars/FoodsFin.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
-- (c) 2009 Aarne Ranta under LGPL
|
||||
|
||||
concrete FoodsFin of Foods = FoodsI with
|
||||
(Syntax = SyntaxFin),
|
||||
(LexFoods = LexFoodsFin) ;
|
||||
29
testsuite/canonical/grammars/FoodsI.gf
Normal file
29
testsuite/canonical/grammars/FoodsI.gf
Normal file
@@ -0,0 +1,29 @@
|
||||
-- (c) 2009 Aarne Ranta under LGPL
|
||||
|
||||
incomplete concrete FoodsI of Foods =
|
||||
open Syntax, LexFoods in {
|
||||
lincat
|
||||
Comment = Utt ;
|
||||
Item = NP ;
|
||||
Kind = CN ;
|
||||
Quality = AP ;
|
||||
lin
|
||||
Pred item quality = mkUtt (mkCl item quality) ;
|
||||
This kind = mkNP this_Det kind ;
|
||||
That kind = mkNP that_Det kind ;
|
||||
These kind = mkNP these_Det kind ;
|
||||
Those kind = mkNP those_Det kind ;
|
||||
Mod quality kind = mkCN quality kind ;
|
||||
Very quality = mkAP very_AdA quality ;
|
||||
|
||||
Wine = mkCN wine_N ;
|
||||
Pizza = mkCN pizza_N ;
|
||||
Cheese = mkCN cheese_N ;
|
||||
Fish = mkCN fish_N ;
|
||||
Fresh = mkAP fresh_A ;
|
||||
Warm = mkAP warm_A ;
|
||||
Italian = mkAP italian_A ;
|
||||
Expensive = mkAP expensive_A ;
|
||||
Delicious = mkAP delicious_A ;
|
||||
Boring = mkAP boring_A ;
|
||||
}
|
||||
15
testsuite/canonical/grammars/LexFoods.gf
Normal file
15
testsuite/canonical/grammars/LexFoods.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- (c) 2009 Aarne Ranta under LGPL
|
||||
|
||||
interface LexFoods = open Syntax in {
|
||||
oper
|
||||
wine_N : N ;
|
||||
pizza_N : N ;
|
||||
cheese_N : N ;
|
||||
fish_N : N ;
|
||||
fresh_A : A ;
|
||||
warm_A : A ;
|
||||
italian_A : A ;
|
||||
expensive_A : A ;
|
||||
delicious_A : A ;
|
||||
boring_A : A ;
|
||||
}
|
||||
21
testsuite/canonical/grammars/LexFoodsFin.gf
Normal file
21
testsuite/canonical/grammars/LexFoodsFin.gf
Normal file
@@ -0,0 +1,21 @@
|
||||
-- (c) 2009 Aarne Ranta under LGPL
|
||||
--# -coding=latin1
|
||||
|
||||
instance LexFoodsFin of LexFoods =
|
||||
open SyntaxFin, ParadigmsFin in {
|
||||
oper
|
||||
wine_N = mkN "viini" ;
|
||||
pizza_N = mkN "pizza" ;
|
||||
cheese_N = mkN "juusto" ;
|
||||
fish_N = mkN "kala" ;
|
||||
fresh_A = mkA "tuore" ;
|
||||
warm_A = mkA
|
||||
(mkN "l<>mmin" "l<>mpim<69>n" "l<>mmint<6E>" "l<>mpim<69>n<EFBFBD>" "l<>mpim<69><6D>n"
|
||||
"l<>mpimin<69>" "l<>mpimi<6D>" "l<>mpimien" "l<>mpimiss<73>" "l<>mpimiin"
|
||||
)
|
||||
"l<>mpim<69>mpi" "l<>mpimin" ;
|
||||
italian_A = mkA "italialainen" ;
|
||||
expensive_A = mkA "kallis" ;
|
||||
delicious_A = mkA "herkullinen" ;
|
||||
boring_A = mkA "tyls<6C>" ;
|
||||
}
|
||||
9
testsuite/canonical/grammars/Phrasebook.gf
Normal file
9
testsuite/canonical/grammars/Phrasebook.gf
Normal file
@@ -0,0 +1,9 @@
|
||||
abstract Phrasebook = {
|
||||
|
||||
cat PlaceKind ;
|
||||
fun Airport : PlaceKind ;
|
||||
|
||||
cat VerbPhrase ;
|
||||
fun VRead : VerbPhrase ;
|
||||
|
||||
}
|
||||
31
testsuite/canonical/grammars/PhrasebookBul.gf
Normal file
31
testsuite/canonical/grammars/PhrasebookBul.gf
Normal file
@@ -0,0 +1,31 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete PhrasebookBul of Phrasebook =
|
||||
open
|
||||
SyntaxBul,
|
||||
(R = ResBul),
|
||||
ParadigmsBul,
|
||||
Prelude in {
|
||||
|
||||
lincat
|
||||
PlaceKind = CNPlace ;
|
||||
|
||||
oper
|
||||
CNPlace : Type = {name : CN ; at : Prep ; to : Prep; isPl : Bool} ;
|
||||
|
||||
mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \n,p ->
|
||||
mkCNPlace (mkCN n) p to_Prep ;
|
||||
|
||||
mkCNPlace : CN -> Prep -> Prep -> CNPlace = \p,i,t -> {
|
||||
name = p ;
|
||||
at = i ;
|
||||
to = t ;
|
||||
isPl = False
|
||||
} ;
|
||||
|
||||
na_Prep = mkPrep "на" R.Acc ;
|
||||
|
||||
lin
|
||||
Airport = mkPlace (mkN066 "летище") na_Prep ;
|
||||
|
||||
}
|
||||
14
testsuite/canonical/grammars/PhrasebookGer.gf
Normal file
14
testsuite/canonical/grammars/PhrasebookGer.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
--# -path=.:present
|
||||
|
||||
concrete PhrasebookGer of Phrasebook =
|
||||
open
|
||||
SyntaxGer,
|
||||
LexiconGer in {
|
||||
|
||||
lincat
|
||||
VerbPhrase = VP ;
|
||||
|
||||
lin
|
||||
VRead = mkVP <lin V read_V2 : V> ;
|
||||
|
||||
}
|
||||
36
testsuite/canonical/run-on-grammar.sh
Executable file
36
testsuite/canonical/run-on-grammar.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# For a given grammar, compile into canonical format,
|
||||
# then ensure that the canonical format itself is compilable.
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Please specify concrete modules to test with, e.g.:"
|
||||
echo "./run-on-grammar.sh ../../../gf-contrib/foods/FoodsEng.gf ../../../gf-contrib/foods/FoodsFin.gf"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
FAILURES=0
|
||||
|
||||
for CNC_PATH in "$@"; do
|
||||
CNC_FILE=$(basename "$CNC_PATH")
|
||||
stack run -- --batch --output-format=canonical_gf "$CNC_PATH"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to compile into canonical"
|
||||
FAILURES=$((FAILURES+1))
|
||||
continue
|
||||
fi
|
||||
|
||||
stack run -- --batch "canonical/$CNC_FILE"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to compile canonical"
|
||||
FAILURES=$((FAILURES+1))
|
||||
fi
|
||||
done
|
||||
|
||||
# Summary
|
||||
if [ $FAILURES -ne 0 ]; then
|
||||
echo "Failures: $FAILURES"
|
||||
exit 1
|
||||
else
|
||||
echo "All tests passed"
|
||||
fi
|
||||
54
testsuite/canonical/run.sh
Executable file
54
testsuite/canonical/run.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
FAILURES=0
|
||||
|
||||
# https://github.com/GrammaticalFramework/gf-core/issues/100
|
||||
stack run -- --batch --output-format=canonical_gf grammars/PhrasebookBul.gf
|
||||
stack run -- --batch canonical/PhrasebookBul.gf
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Canonical grammar doesn't compile: FAIL"
|
||||
FAILURES=$((FAILURES+1))
|
||||
else
|
||||
# echo "Canonical grammar compiles: OK"
|
||||
diff canonical/PhrasebookBul.gf gold/PhrasebookBul.gf
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Canonical grammar doesn't match gold version: FAIL"
|
||||
FAILURES=$((FAILURES+1))
|
||||
else
|
||||
echo "Canonical grammar matches gold version: OK"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# https://github.com/GrammaticalFramework/gf-core/issues/101
|
||||
stack run -- --batch --output-format=canonical_gf grammars/PhrasebookGer.gf
|
||||
diff canonical/PhrasebookGer.gf gold/PhrasebookGer.gf
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Canonical grammar doesn't match gold version: FAIL"
|
||||
FAILURES=$((FAILURES+1))
|
||||
else
|
||||
echo "Canonical grammar matches gold version: OK"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# https://github.com/GrammaticalFramework/gf-core/issues/102
|
||||
stack run -- --batch --output-format=canonical_gf grammars/FoodsFin.gf
|
||||
diff canonical/FoodsFin.gf gold/FoodsFin.gf
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Canonical grammar doesn't match gold version: FAIL"
|
||||
FAILURES=$((FAILURES+1))
|
||||
else
|
||||
echo "Canonical grammar matches gold version: OK"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# Summary
|
||||
if [ $FAILURES -ne 0 ]; then
|
||||
echo "Failures: $FAILURES"
|
||||
exit 1
|
||||
else
|
||||
echo "All tests passed"
|
||||
fi
|
||||
Reference in New Issue
Block a user