summaryrefslogtreecommitdiff
path: root/next-lib/src/russian
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-11-26 21:21:23 +0000
committerkrasimir <krasimir@chalmers.se>2008-11-26 21:21:23 +0000
commitc9c07f8e6897723c5b642c329e81d761cb6a9f70 (patch)
treebbf67746a72fd3015537f6583759a7ea06857a98 /next-lib/src/russian
parentb6c9aedd873348b59e5215572b3540824ec3abef (diff)
initial Slavic grammar, shared between Bulgarian and Russian
Diffstat (limited to 'next-lib/src/russian')
-rw-r--r--next-lib/src/russian/CatRus.gf6
-rw-r--r--next-lib/src/russian/DiffRus.gf9
-rw-r--r--next-lib/src/russian/LangRus.gf2
-rw-r--r--next-lib/src/russian/NounRus.gf9
-rw-r--r--next-lib/src/russian/ParadigmsRus.gf4
-rw-r--r--next-lib/src/russian/ResRus.gf6
6 files changed, 18 insertions, 18 deletions
diff --git a/next-lib/src/russian/CatRus.gf b/next-lib/src/russian/CatRus.gf
index 8b364388e..97c7522ee 100644
--- a/next-lib/src/russian/CatRus.gf
+++ b/next-lib/src/russian/CatRus.gf
@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../../prelude
-concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
+concrete CatRus of Cat = CommonX ** CatSlavic with (ResSlavic = ResRus) ** open ResRus, Prelude, (R = ParamX) in {
flags optimize=all_subs ; coding=utf8 ;
@@ -44,7 +44,6 @@ concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
-- Noun
- CN = {s : NForm => Str; g : Gender; anim : Animacy} ;
NP = { s : PronForm => Str ; n : Number ; p : Person ;
g: PronGen ; anim : Animacy ; pron: Bool} ;
Pron = { s : PronForm => Str ; n : Number ; p : Person ;
@@ -89,9 +88,6 @@ concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
A2 = A ** Complement ;
-- Substantives moreover have an inherent gender.
- N = {s : NForm => Str; g : Gender; anim : Animacy} ;
- N2 = {s : NForm => Str; g : Gender; anim : Animacy} ** Complement ;
- N3 = {s : NForm => Str; g : Gender; anim : Animacy} ** Complement ** {s3 : Str; c2: Case} ;
PN = {s : Case => Str ; g : Gender ; anim : Animacy} ;
diff --git a/next-lib/src/russian/DiffRus.gf b/next-lib/src/russian/DiffRus.gf
new file mode 100644
index 000000000..a29690e86
--- /dev/null
+++ b/next-lib/src/russian/DiffRus.gf
@@ -0,0 +1,9 @@
+instance DiffRus of DiffSlavic = open CommonSlavic, Prelude in {
+
+ param
+ PrepKind = PrepOther | PrepVNa;
+ Case = Nom | Gen | Dat | Acc | Inst | Prepos PrepKind ;
+
+ NForm = NF Number Case ;
+
+} \ No newline at end of file
diff --git a/next-lib/src/russian/LangRus.gf b/next-lib/src/russian/LangRus.gf
index c3126dcfe..00a515c58 100644
--- a/next-lib/src/russian/LangRus.gf
+++ b/next-lib/src/russian/LangRus.gf
@@ -1,4 +1,4 @@
---# -path=.:../abstract:../common:prelude
+--# -path=.:../abstract:../common:../slavic:prelude
concrete LangRus of Lang =
GrammarRus,
diff --git a/next-lib/src/russian/NounRus.gf b/next-lib/src/russian/NounRus.gf
index 834f140c1..2e86d33ab 100644
--- a/next-lib/src/russian/NounRus.gf
+++ b/next-lib/src/russian/NounRus.gf
@@ -166,8 +166,8 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
ComplN2 f x = {
s = \\nf => case x.pron of {
True => x.s ! (case nf of {NF n c => mkPronForm c No (Poss (gNum f.g n))}) ++ f.s ! nf ;
- False => f.s ! nf ++ f.s2 ++
- x.s ! (case nf of {NF n c => mkPronForm f.c Yes (Poss (gNum f.g n))})
+ False => f.s ! nf ++ f.c2.s ++
+ x.s ! (case nf of {NF n c => mkPronForm f.c2.c Yes (Poss (gNum f.g n))})
};
g = f.g ;
anim = f.anim
@@ -177,11 +177,10 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
-- There application starts by filling the first place.
ComplN3 f x = {
- s = \\nf => f.s ! nf ++ f.s2 ++ x.s ! (PF f.c Yes NonPoss) ;
+ s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! (PF f.c2.c Yes NonPoss) ;
g = f.g ;
anim = f.anim ;
- s2 = f.s3 ;
- c = f.c2
+ c2 = f.c3 ;
} ;
diff --git a/next-lib/src/russian/ParadigmsRus.gf b/next-lib/src/russian/ParadigmsRus.gf
index 677a92639..17171cfdf 100644
--- a/next-lib/src/russian/ParadigmsRus.gf
+++ b/next-lib/src/russian/ParadigmsRus.gf
@@ -352,11 +352,11 @@ foreign = Foreign; -- +++ MG_UR: added +++
mkN2 : N -> Prep -> N2 = mkFun;
} ;
- mkFun : N -> Prep -> N2 = \f,p -> (UseN f) ** {s2 = p.s ; c = p.c}** {lock_N2 = <>} ;
+ mkFun : N -> Prep -> N2 = \f,p -> UseN f ** {c2 = p ; lock_N2 = <>} ;
nullPrep : Prep = {s = []; c= Gen; lock_Prep=<>} ;
- mkN3 f p r = (UseN f) ** {s2 = p.s ; c=p.c; s3=r.s ; c2=r.c; lock_N3 = <>} ;
+ mkN3 f p2 p3 = (UseN f) ** {c2 = p2; c3 = p3; lock_N3 = <>} ;
mkPN = \ivan, g, anim ->
diff --git a/next-lib/src/russian/ResRus.gf b/next-lib/src/russian/ResRus.gf
index 9203f0bd7..78e6cb81f 100644
--- a/next-lib/src/russian/ResRus.gf
+++ b/next-lib/src/russian/ResRus.gf
@@ -7,7 +7,7 @@
-- implement $Test$, it moreover contains regular lexical
-- patterns needed for $Lex$.
-resource ResRus = ParamX ** open Prelude in {
+instance ResRus of ResSlavic = ParamX, DiffRus, CommonSlavic ** open Prelude in {
flags coding=utf8 ; optimize=all ;
@@ -18,10 +18,6 @@ flags coding=utf8 ; optimize=all ;
-- Some parameters, such as $Number$, are inherited from $ParamX$.
param
- Gender = Masc | Fem | Neut ;
- Case = Nom | Gen | Dat | Acc | Inst | Prepos PrepKind ;
- PrepKind = PrepOther | PrepVNa;
- Animacy = Animate | Inanimate ;
Voice = Act | Pass ;
Aspect = Imperfective | Perfective ;
RusTense = Present | PastRus | Future ;