From 9d2410de6ba639af72dc2be6e69b496beb787e39 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 31 May 2007 18:46:29 +0000 Subject: [PATCH] syntax interfaces --- resource-1.0/api/Constructors.gf | 26 +++++++++++++------------- resource-1.0/api/Syntax.gf | 4 ++++ resource-1.0/api/SyntaxEng.gf | 4 ++++ resource-1.0/api/SyntaxFin.gf | 4 ++++ resource-1.0/api/SyntaxFre.gf | 4 ++++ resource-1.0/api/SyntaxGer.gf | 4 ++++ resource-1.0/api/SyntaxSwe.gf | 4 ++++ resource-1.0/english/ParadigmsEng.gf | 12 +++--------- 8 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 resource-1.0/api/Syntax.gf create mode 100644 resource-1.0/api/SyntaxEng.gf create mode 100644 resource-1.0/api/SyntaxFin.gf create mode 100644 resource-1.0/api/SyntaxFre.gf create mode 100644 resource-1.0/api/SyntaxGer.gf create mode 100644 resource-1.0/api/SyntaxSwe.gf diff --git a/resource-1.0/api/Constructors.gf b/resource-1.0/api/Constructors.gf index 36599a3e..0820baa9 100644 --- a/resource-1.0/api/Constructors.gf +++ b/resource-1.0/api/Constructors.gf @@ -71,19 +71,19 @@ incomplete resource Constructors = open Grammar in { --2 Sentences, and clauses mkS : overload { - mkS : Cl -> S ; -- John walks - mkS : Tense -> Cl -> S ; -- John walked - mkS : Ant -> Cl -> S ; -- John has walked - mkS : Pol -> Cl -> S ; -- John doesn't walk - mkS : Tense -> Ant -> Cl -> S ; -- John had walked - mkS : Tense -> Pol -> Cl -> S ; -- John didn't walk - mkS : Ant -> Pol -> Cl -> S ; -- John hasn't walked - mkS : Tense -> Ant -> Pol -> Cl -> S ; -- John wouldn't have walked - mkS : Conj -> S -> S -> S ; -- John walks and Mary talks - mkS : DConj -> S -> S -> S ; -- either I leave or you come - mkS : Conj -> ListS -> S ; -- John walks, Mary talks, and Bob runs - mkS : DConj -> ListS -> S ; -- either I leave, you come, or he runs - mkS : Adv -> S -> S -- today, I will sleep + mkS : Cl -> S ; -- John walks + mkS : Tense -> Cl -> S ; -- John walked + mkS : Ant -> Cl -> S ; -- John has walked + mkS : Pol -> Cl -> S ; -- John doesn't walk + mkS : Tense -> Ant -> Cl -> S ; -- John had walked + mkS : Tense -> Pol -> Cl -> S ; -- John didn't walk + mkS : Ant -> Pol -> Cl -> S ; -- John hasn't walked + mkS : Tense -> Ant -> Pol -> Cl -> S ; -- John wouldn't have walked + mkS : Conj -> S -> S -> S ; -- John walks and Mary talks + mkS : DConj -> S -> S -> S ; -- either I leave or you come + mkS : Conj -> ListS -> S ; -- John walks, Mary talks, and Bob runs + mkS : DConj -> ListS -> S ; -- either I leave, you come, or he runs + mkS : Adv -> S -> S -- today, I will sleep } ; mkCl : overload { diff --git a/resource-1.0/api/Syntax.gf b/resource-1.0/api/Syntax.gf new file mode 100644 index 00000000..c8c3ab78 --- /dev/null +++ b/resource-1.0/api/Syntax.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +interface Syntax = Constructors, Cat, Structural ** {} ; + diff --git a/resource-1.0/api/SyntaxEng.gf b/resource-1.0/api/SyntaxEng.gf new file mode 100644 index 00000000..15144f5f --- /dev/null +++ b/resource-1.0/api/SyntaxEng.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxEng of Syntax = ConstructorsEng, CatEng, StructuralEng ** {} ; + diff --git a/resource-1.0/api/SyntaxFin.gf b/resource-1.0/api/SyntaxFin.gf new file mode 100644 index 00000000..07ebbc3d --- /dev/null +++ b/resource-1.0/api/SyntaxFin.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxFin of Syntax = ConstructorsFin, CatFin, StructuralFin ** {} ; + diff --git a/resource-1.0/api/SyntaxFre.gf b/resource-1.0/api/SyntaxFre.gf new file mode 100644 index 00000000..dcc076ac --- /dev/null +++ b/resource-1.0/api/SyntaxFre.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxFre of Syntax = ConstructorsFre, CatFre, StructuralFre ** {} ; + diff --git a/resource-1.0/api/SyntaxGer.gf b/resource-1.0/api/SyntaxGer.gf new file mode 100644 index 00000000..d444c7bf --- /dev/null +++ b/resource-1.0/api/SyntaxGer.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxGer of Syntax = ConstructorsGer, CatGer, StructuralGer ** {} ; + diff --git a/resource-1.0/api/SyntaxSwe.gf b/resource-1.0/api/SyntaxSwe.gf new file mode 100644 index 00000000..96c30e4d --- /dev/null +++ b/resource-1.0/api/SyntaxSwe.gf @@ -0,0 +1,4 @@ +--# -path=.:alltenses:prelude + +instance SyntaxSwe of Syntax = ConstructorsSwe, CatSwe, StructuralSwe ** {} ; + diff --git a/resource-1.0/english/ParadigmsEng.gf b/resource-1.0/english/ParadigmsEng.gf index bca681ba..cf28cedf 100644 --- a/resource-1.0/english/ParadigmsEng.gf +++ b/resource-1.0/english/ParadigmsEng.gf @@ -127,10 +127,6 @@ oper nounPN : N -> PN ; --- To form a noun phrase that can also be plural and have an irregular --- genitive, you can use the worst-case function. - - mkNP : Str -> Str -> Number -> Gender -> NP ; --2 Adjectives @@ -271,12 +267,12 @@ oper mkAV : A -> AV ; mkA2V : A -> Prep -> A2V ; --- Notice: categories $V2S, V2V, V2A, V2Q$ are in v 1.0 treated +-- Notice: categories $V2S, V2V, V2Q$ are in v 1.0 treated -- just as synonyms of $V2$, and the second argument is given -- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$. -- $V0$ is just $V$. - V0, V2S, V2V, V2A, V2Q : Type ; + V0, V2S, V2V, V2Q : Type ; AS, A2S, AV, A2V : Type ; --. @@ -354,8 +350,6 @@ oper regPN n = regGenPN n human ; regGenPN n g = nameReg n g ** {lock_PN = <>} ; nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ; - mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ; - lock_NP = <>} ; mk2A a b = mkAdjective a a a b ** {lock_A = <>} ; regA a = regAdjective a ** {lock_A = <>} ; @@ -462,7 +456,7 @@ oper mkVQ v = v ** {lock_VQ = <>} ; V0 : Type = V ; - V2S, V2V, V2Q, V2A : Type = V2 ; + V2S, V2V, V2Q : Type = V2 ; AS, A2S, AV : Type = A ; A2V : Type = A2 ;