summaryrefslogtreecommitdiff
path: root/next-lib/src/romanian/ResRon.gf
blob: 08887f2c85a8d1a8d11edfe9759ce6aaafcbbf1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
--1 Romance auxiliary operations.
--

resource ResRon = ParamX ** open Prelude in {

flags optimize=all ;

  flags optimize=all ;

--2 Enumerated parameter types for morphology
--
-- These types are the ones found in school grammars.
-- Their parameter values are atomic.

param

  Gender = Masc | Fem ;

  NGender = NMasc | NFem | NNeut ;
 
  Mood   = Indic | Conjunct ;

  Direct = DDir | DInv ;

  NumF  = Formal | Informal ;
 
  Animacy = Animate | Inanimate ;
 
  param Size = sg | less20 | pl ;
 
 -- Case = Acc | Dat | Gen ;
 
-- Adjectives are inflected in number, gender, have specific form for enclitic determined
--article, and specific forms for Nominative-Accusative/Dative-Genitive/Voccative

  AForm = AF Gender Number Species ACase | AA ;

-- Gender is not morphologically determined for first and second person pronouns.

  PronGen = PGen Gender | PNoGen ;

-- Cardinal numerals have gender, ordinal numerals have full number as well.

  ACase = ANomAcc | AGenDat | AVoc ;
  Species  =  Def | Indef ;
  NCase = No | Da | Ac | Ge | Vo ;
  
   
  CardOrd = NCard Gender | NOrd Gender;







--3 Verbs 


-- the form we build on syntactical level, based on VForm
-- it represents the main verb forms in Romanian
 
param
  Temps1    = TPresn | TImparf | TPComp | TPSimple | TPPerfect | TFutur ;
  TSubj1    = TSPres | TSPast ;
 -- TPart1    = TGer | TPPasse Gender Number Species ACase;
  
  VerbForm    = TInf
           | TIndi Temps1 Number Person 
           | TCondi Number Person 
           | TSubjo TSubj1 Number Person
           | TImper NumPersI
           | TGer 
           | TPPasse Gender Number Species ACase ;

 -- the form we build on morphological level :
 
  Temps    = Presn | Imparf | PSimple | PPerfect ;
  TSubj    = SPres ;
  --TPart    = PPasse Gender Number Species ACase;
  
  VForm    = Inf
           | Indi Temps Number Person 
           | Subjo TSubj Number Person
           | Imper NumPersI
           | Ger
           | PPasse Gender Number Species ACase ;

-- form for compatibility with the other Romance languages, to be used in case that
-- Romanian will be integrated in the Romance category

param 
  VF =
     VInfin Bool
   | VFin   TMood Number Person 
   | VImper NumPersI 
   | VPart  Gender Number Species ACase
   | VGer
   ;

  TMood = 
     VPres  Mood
   | VImperf Mood   --# notpresent
   | VPasse  --# notpresent
   | VFut  --# notpresent
   | VCondit  --# notpresent
   ;

  NumPersI  = SgP2 | PlP1 | PlP2 ;

  VPForm =
     VPFinite TMood Anteriority
   | VPImperat
   | VPGerund
   | VPInfinit Anteriority Bool ;

  RTense =
     RPres 
   | RPast   --# notpresent
   | RPasse  --# notpresent
   | RFut    --# notpresent
   | RCond   --# notpresent
   ;

-- Agreement of adjectives, verb phrases, and relative pronouns.

oper
  AAgr : Type = {g : Gender ; n : Number} ;
  Agr  : Type = AAgr ** {p : Person} ;

param
  RAgr = RAg {g : Gender ; n : Number} | RNoAg ; --- AAgr


  oper
    genForms : Str -> Str -> Gender => Str = \bon,bonne ->
      table {
        Masc => bon ; 
        Fem => bonne
        } ; 

    aagrForms : (x1,_,_,x4 : Str) -> (AAgr => Str) = \tout,toute,tous,toutes ->
      table {
        {g = g ; n = Sg} => genForms tout toute ! g ;
        {g = g ; n = Pl} => genForms tous toutes ! g
        } ;

    Noun = {s : Number => Species => ACase => Str; g : NGender; a : Animacy} ;
    Adj = {s : AForm => Str} ;
 --   A  = {s : Degree => AForm => Str ; isPre : Bool} ;

  Compl : Type = {s : Str ; c : NCase ; isDir : Bool} ;

--  complAcc : Compl = {s = [] ; c = Acc ; isDir = True} ;
--  complGen : Compl = {s = [] ; c = Gen ; isDir = True} ;
--  complDat : Compl = {s = [] ; c = Dat ; isDir = True} ;






 
     
}