mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
more syntax
This commit is contained in:
@@ -1,4 +1,19 @@
|
||||
concrete AdjectiveHye of Adjective = CatHye ** {
|
||||
concrete AdjectiveHye of Adjective = CatHye ** open ResHye, Prelude in {
|
||||
lin
|
||||
PositA a = a ;
|
||||
AdAP ada ap = {
|
||||
s = \\sp,c,num => ada.s ++ ap.s ! sp ! c ! num;
|
||||
isPre = ap.isPre
|
||||
} ;
|
||||
PositA a = {
|
||||
s = \\sp,c,num =>
|
||||
case <sp,c> of {
|
||||
<Def,Nom> => a.def_nom ! num ;
|
||||
<Def,Dat> => a.def_dat ! num ;
|
||||
<Poss P1,_> => a.poss1 ! c ! num ;
|
||||
<Poss P2,_> => a.poss2 ! c ! num ;
|
||||
_ => a.s ! c ! num
|
||||
} ;
|
||||
isPre = True
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
6
src/armenian/AdverbHye.gf
Normal file
6
src/armenian/AdverbHye.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
concrete AdverbHye of Adverb = CatHye ** open Prelude,ResHye in {
|
||||
lin PrepNP p np = {s = case p.isPre of {
|
||||
False => np.s ! p.c ++ p.s;
|
||||
True => p.s ++ np.s ! p.c
|
||||
}} ;
|
||||
}
|
||||
@@ -2,12 +2,17 @@ concrete CatHye of Cat = CommonX ** open Prelude,ResHye in {
|
||||
lincat A = Adj ;
|
||||
lincat A2 = Adj ** {c2 : Compl} ;
|
||||
lincat ACard = {s : Str} ;
|
||||
lincat AP = Adj ;
|
||||
lincat CN = {s : Species => Case => Number => Str;
|
||||
poss1 : Case => Number => Str;
|
||||
poss2 : Case => Number => Str} ;
|
||||
lincat AP = {s : Species => Case => Number => Str; isPre : Bool} ;
|
||||
lincat CN = {s : Species => Case => Number => Str} ;
|
||||
lincat Card = {s : Str} ;
|
||||
lincat Cl = {s : Str} ;
|
||||
lincat Cl = {s : Str;
|
||||
conditional : Aspect => Number => Str;
|
||||
converb : {imperfective : Str; futCon1 : Str;
|
||||
futCon2 : Str; negative : Str;
|
||||
perfective : Str; simultaneous : Str};
|
||||
passive : Str; past : Person => Number => Str;
|
||||
participle : PartType => Str;
|
||||
subjunctive : Aspect => Number => Str} ;
|
||||
lincat ClSlash = {s : Str} ;
|
||||
lincat Comp = {s : Str} ;
|
||||
lincat Conj = {s : Str} ;
|
||||
@@ -31,7 +36,7 @@ concrete CatHye of Cat = CommonX ** open Prelude,ResHye in {
|
||||
lincat Ord = {s : Str} ;
|
||||
lincat PN = {s : Str} ;
|
||||
lincat Predet = {s : Str} ;
|
||||
lincat Prep = Compl ;
|
||||
lincat Prep = Compl ** {isPre : Bool} ;
|
||||
lincat Pron = {s : Str; empty : Str; a : Agr} ;
|
||||
lincat QCl = {s : Str} ;
|
||||
lincat QS = {s : Str} ;
|
||||
@@ -47,23 +52,12 @@ concrete CatHye of Cat = CommonX ** open Prelude,ResHye in {
|
||||
lincat VV,VS,VQ,VA = Verb ;
|
||||
lincat V2 = Verb ** {c2 : Compl} ;
|
||||
lincat V3,V2A,V2S,V2Q,V2V = Verb ** {c2,c3 : Compl} ;
|
||||
lincat VP = {s : Case => Number => Str;
|
||||
conditional : Aspect => Person => Number => Case => Number => Str;
|
||||
converb : {imperfective : Case => Number => Str;
|
||||
futCon1 : Case => Number => Str; FutCon2 : Case => Number => Str;
|
||||
negative : Case => Number => Str;
|
||||
perfective : Case => Number => Str;
|
||||
simultaneous : Case => Number => Str};
|
||||
imperative : Number => Number => Str;
|
||||
passive : Case => Number => Str;
|
||||
past : Person => Number => Case => Number => Str;
|
||||
participle : PartType => Case => Number => Str;
|
||||
subjunctive : Aspect => Person => Number => Case => Number => Str} ;
|
||||
lincat VPSlash = {s : Str; causative : Str;
|
||||
conditional : Aspect => Person => Number => Str;
|
||||
converb : {imperfective : Str; futCon1 : Str; futCon2 : Str;
|
||||
negative : Str; perfective : Str; simultaneous : Str};
|
||||
imperative : Number => Str; passive : Str;
|
||||
past : Person => Number => Str; participle : PartType => Str;
|
||||
subjunctive : Aspect => Person => Number => Str; lock_V : {}} ;
|
||||
lincat VP = {s : Str;
|
||||
conditional : Aspect => Person => Number => Str;
|
||||
converb : {imperfective : Str; futCon1 : Str; futCon2 : Str;
|
||||
negative : Str; perfective : Str; simultaneous : Str};
|
||||
imperative : Number => Str; passive : Str;
|
||||
past : Person => Number => Str; participle : PartType => Str;
|
||||
subjunctive : Aspect => Person => Number => Str} ;
|
||||
lincat VPSlash = Verb ** {c2 : Compl} ;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ concrete GrammarHye of Grammar =
|
||||
TenseX,
|
||||
PhraseHye,
|
||||
NounHye,
|
||||
VerbHye,
|
||||
AdjectiveHye,
|
||||
AdverbHye,
|
||||
SentenceHye,
|
||||
StructuralHye ** {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
concrete NounHye of Noun = CatHye ** open ResHye in {
|
||||
lin AdjCN ap cn = {
|
||||
s = \\sp,c,n =>
|
||||
case ap.isPre of {
|
||||
True => ap.s ! Indef ! Nom ! Sg ++ cn.s ! sp ! c ! n;
|
||||
False => cn.s ! sp ! c ! n ++ ap.s ! Indef ! Nom ! Sg
|
||||
}
|
||||
} ;
|
||||
lin AdvCN cn adv = {
|
||||
s = \\sp,c,num => cn.s ! sp ! c ! num ++ adv.s ;
|
||||
poss1 = \\c,num => cn.poss1 ! c ! num ++ adv.s ;
|
||||
poss2 = \\c,num => cn.poss2 ! c ! num ++ adv.s
|
||||
s = \\sp,c,num => adv.s ++ cn.s ! sp ! c ! num
|
||||
} ;
|
||||
lin DefArt = {s = []; sp = Def} ;
|
||||
lin DetCN det cn = {s = \\c => det.s ++ cn.s ! det.sp ! c ! det.n;
|
||||
@@ -12,7 +17,7 @@ concrete NounHye of Noun = CatHye ** open ResHye in {
|
||||
lin NumPl = {s = []; n = Pl} ;
|
||||
lin NumSg = {s = []; n = Sg} ;
|
||||
lin PossPron pron = {s = pron.empty; sp = Poss pron.a.p} ;
|
||||
lin UseN n = n ** {
|
||||
lin UseN n = {
|
||||
s = \\sp,c,num =>
|
||||
case <sp,c> of {
|
||||
<Def,Nom> => n.def_nom ! num ;
|
||||
|
||||
@@ -468,7 +468,7 @@ oper
|
||||
mkInterj : Str -> Interj = \s -> lin Interj {s=s} ;
|
||||
mkMU : Str -> MU = \s -> lin MU {s=s; isPre=False} ;
|
||||
|
||||
mkPrep : Str -> Prep = \s -> lin Prep {s=s; c=Dat} ;
|
||||
mkPrep : Str -> Prep = \s -> lin Prep {s=s; c=Dat; isPre=False} ;
|
||||
|
||||
singular : Number = Sg ;
|
||||
plural : Number = Pl ;
|
||||
|
||||
14
src/armenian/SentenceHye.gf
Normal file
14
src/armenian/SentenceHye.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
concrete SentenceHye of Sentence = CatHye ** open Prelude,ResHye in {
|
||||
lin PredVP np vp = {s = np.s ! Nom ++ vp.s;
|
||||
conditional = \\a,n => np.s ! Nom ++ vp.conditional ! a ! P3 ! n;
|
||||
converb = {imperfective = np.s ! Nom ++ vp.converb.imperfective;
|
||||
futCon1 = np.s ! Nom ++ vp.converb.futCon1;
|
||||
futCon2 = np.s ! Nom ++ vp.converb.futCon2;
|
||||
negative = np.s ! Nom ++ vp.converb.negative;
|
||||
perfective = np.s ! Nom ++ vp.converb.perfective;
|
||||
simultaneous = np.s ! Nom ++ vp.converb.simultaneous};
|
||||
passive = np.s ! Nom ++ vp.passive;
|
||||
past = \\_,n => np.s ! Nom ++ vp.past ! P3 ! n;
|
||||
participle = \\p => np.s ! Nom ++ vp.participle ! p;
|
||||
subjunctive = \\a,n => np.s ! Nom ++ vp.subjunctive ! a ! P3 ! n} ;
|
||||
}
|
||||
34
src/armenian/VerbHye.gf
Normal file
34
src/armenian/VerbHye.gf
Normal file
@@ -0,0 +1,34 @@
|
||||
concrete VerbHye of Verb = CatHye ** open Prelude,ResHye in {
|
||||
lin AdvVP vp adv = {s = adv.s ++ vp.s;
|
||||
conditional = \\a,p,n => adv.s ++ vp.conditional ! a ! p ! n;
|
||||
converb = {imperfective = adv.s ++ vp.converb.imperfective;
|
||||
futCon1 = adv.s ++ vp.converb.futCon1;
|
||||
futCon2 = adv.s ++ vp.converb.futCon2;
|
||||
negative = adv.s ++ vp.converb.negative;
|
||||
perfective = adv.s ++ vp.converb.perfective;
|
||||
simultaneous = adv.s ++ vp.converb.simultaneous};
|
||||
imperative = \\n => vp.imperative ! n ++ adv.s;
|
||||
passive = adv.s ++ vp.passive;
|
||||
past = \\p,n => adv.s ++ vp.past ! p ! n;
|
||||
participle = \\p => adv.s ++ vp.participle ! p;
|
||||
subjunctive = \\a,p,n => adv.s ++ vp.subjunctive ! a ! p ! n} ;
|
||||
lin ComplSlash vp np = {s = vp.s ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
conditional = \\a,p,n => vp.conditional ! a ! p ! n
|
||||
++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
converb = {imperfective = vp.converb.imperfective
|
||||
++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
futCon1 = vp.converb.futCon1 ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
futCon2 = vp.converb.futCon2 ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
negative = vp.converb.negative ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
perfective = vp.converb.perfective
|
||||
++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
simultaneous = vp.converb.simultaneous
|
||||
++ vp.c2.s ++ np.s ! vp.c2.c};
|
||||
imperative = \\n => vp.imperative ! n ++ vp.c2.s ++ np.s ! Nom;
|
||||
passive = vp.passive ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
past = \\p,n => vp.past ! p ! n ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
participle = \\p => vp.participle ! p ++ vp.c2.s ++ np.s ! vp.c2.c;
|
||||
subjunctive = \\a,p,n => vp.subjunctive ! a ! p ! n
|
||||
++ vp.c2.s ++ np.s ! vp.c2.c} ;
|
||||
lin SlashV2a v = v ;
|
||||
}
|
||||
Reference in New Issue
Block a user