diff options
| author | krasimir <krasimir@chalmers.se> | 2010-06-06 11:06:44 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-06-06 11:06:44 +0000 |
| commit | 455d9558417a759fae3ccbe5cde5c9f5064a08d2 (patch) | |
| tree | 29da2938fa553f993624fc4fcf781d742a8ae4e9 /examples/SUMO/BasicEng.gf | |
| parent | ae79d4e4b2632b7b9ee9e5a24455d0ca41dc4387 (diff) | |
changes in SUMO: formatting and fixes for lots of lots of small problems
Diffstat (limited to 'examples/SUMO/BasicEng.gf')
| -rw-r--r-- | examples/SUMO/BasicEng.gf | 165 |
1 files changed, 84 insertions, 81 deletions
diff --git a/examples/SUMO/BasicEng.gf b/examples/SUMO/BasicEng.gf index 41f483e8c..8f25d2012 100644 --- a/examples/SUMO/BasicEng.gf +++ b/examples/SUMO/BasicEng.gf @@ -1,96 +1,99 @@ --# -path=.:englishExtended:abstract:common:
-concrete BasicEng of Basic = CatEng - [Text] ** open DictLangEng, ParadigmsEng, ResEng, Coordination, Prelude, ParamBasic, NounEng in{
+concrete BasicEng of Basic = CatEng - [Text] ** open DictLangEng, ParadigmsEng, ResEng, Coordination, Prelude, ParamBasic, NounEng in {
+
lincat
- Class = CN ;
- El = NP ;
- Ind = NP ;
- Var = PN ;
- SubClass = {} ;
- SubClassC = {} ;
- Inherits = {} ;
- Desc = CN ;
- Formula = PolSentence;
- [El] = [NP];
- [Class] = [CN];
- Stmt = StmtS ;
- lin
-BaseClass = {s1,s2 = \\_,_ => "";
- g = Neutr;
- lock_ListCN=<>};
-ConsClass xs x = ConsCN xs x ;
+ Class = CN ;
+ El = NP ;
+ Ind = NP ;
+ Var = PN ;
+ SubClass = {} ;
+ SubClassC = {} ;
+ Inherits = {} ;
+ Desc = CN ;
+ Formula = PolSentence;
+ [El] = [NP];
+ [Class] = [CN];
+ Stmt = StmtS ;
+
+lin
+ BaseClass = {s1,s2 = \\_,_ => "";
+ g = Neutr;
+ lock_ListCN=<>};
+ ConsClass xs x = ConsCN xs x ;
-
-BaseEl c = {s1,s2 = \\_ => "";
- a = agrP3 Sg;
- lock_ListNP=<>};
+ BaseEl c = {s1,s2 = \\_ => "";
+ a = agrP3 Sg;
+ lock_ListNP=<>};
-ConsEl c xs x = ConsNP xs x ;
+ ConsEl c xs x = ConsNP xs x ;
-
-and f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "and" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
-or f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "or" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
-not f1 = {s = \\f,c => case c of
- {Neg => f1.s ! f ! Pos ;
- Pos => f1.s ! Indep ! Neg };
- flag = f1.flag;
- lock_PolSentence = <>};
-impl f1 f2 = {s = \\f,c => "if" ++ f1.s ! Indep ! c ++ "then" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
+ and f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "and" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
+ or f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "or" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
+ not f1 = {s = \\f,c => case c of {
+ Neg => f1.s ! f ! Pos ;
+ Pos => f1.s ! Indep ! Neg
+ };
+ flag = f1.flag;
+ lock_PolSentence = <>
+ };
+ impl f1 f2 = {s = \\f,c => "if" ++ f1.s ! Indep ! c ++ "then" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
-equiv f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "is" ++ "equivalent" ++ "to" ++ f2.s ! Indep ! c; flag = NothingS;
- lock_PolSentence = <>};
+ equiv f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "is" ++ "equivalent" ++ "to" ++ f2.s ! Indep ! c; flag = NothingS;
+ lock_PolSentence = <>};
-el c1 c2 i e = e;
-var c1 c2 i e = UsePN e;
+ el c1 c2 i e = e;
+ var c1 c2 i e = UsePN e;
-exists C f = let np = DetCN (DetQuant IndefArt NumSg) C
- in
- {s = \\form,c => case <form, f.flag> of
- { <Indep, ExistS _> => "there" ++ "exists" ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
- <Attrib, ExistS One> => "and" ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
- <Attrib, ExistS _> => "," ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
- <Indep,_> => "there" ++ "exists" ++ np.s ! Nom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c ;
- _ => "and" ++ np.s ! Nom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c };
- flag = case f.flag of
- {ExistS _ => ExistS Many;
- _ => ExistS One };
- lock_PolSentence=<>};
+ exists C f = let np = DetCN (DetQuant IndefArt NumSg) C
+ in { s = \\form,c => case <form, f.flag> of {
+ <Indep, ExistS _> => "there" ++ "exists" ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
+ <Attrib, ExistS One> => "and" ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
+ <Attrib, ExistS _> => "," ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
+ <Indep,_> => "there" ++ "exists" ++ np.s ! Nom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c ;
+ _ => "and" ++ np.s ! Nom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c
+ };
+ flag = case f.flag of {
+ ExistS _ => ExistS Many;
+ _ => ExistS One
+ };
+ lock_PolSentence=<>
+ };
-forall C f = {s = \\form, c => case <form,f.flag> of
- {<Indep,ForallS _> => "for" ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
- <Attrib,ForallS One> => "," ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
- <Attrib, ForallS _> => "," ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
- <Indep,ExistS _> => "for" ++"every"++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Indep ! c ;
- <Indep,_> => "for" ++"every"++ C.s ! Sg ! Nom ++ f.$0 ++ "we"++"have" ++ "that" ++ f.s ! Indep ! c ;
- <Attrib,ExistS _> => "and" ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Indep ! c;
- _ => "and" ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ "we" ++ "have" ++ "that" ++f.s ! Indep ! c };
- flag = case f.flag of
- {ForallS _ => ForallS Many;
- _ => ForallS One };
- lock_PolSentence=<>};
+ forall C f = { s = \\form, c => case <form,f.flag> of {
+ <Indep,ForallS _> => "for" ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
+ <Attrib,ForallS One> => "," ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
+ <Attrib, ForallS _> => "," ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
+ <Indep,ExistS _> => "for" ++"every"++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Indep ! c ;
+ <Indep,_> => "for" ++"every"++ C.s ! Sg ! Nom ++ f.$0 ++ "we"++"have" ++ "that" ++ f.s ! Indep ! c ;
+ <Attrib,ExistS _> => "and" ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ f.s ! Indep ! c;
+ _ => "and" ++ "every" ++ C.s ! Sg ! Nom ++ f.$0 ++ "we" ++ "have" ++ "that" ++f.s ! Indep ! c };
+ flag = case f.flag of {
+ ForallS _ => ForallS Many;
+ _ => ForallS One
+ };
+ lock_PolSentence=<>
+ };
-both c1 c2 = {s = \\c,n => c1.s ! c ! n ++ "and" ++ c2.s ! c ! n;
- g = c2.g; lock_CN = <>};
-
-
-either c1 c2 = {s = \\c,n => c1.s ! c ! n ++ "or" ++ c2.s ! c ! n;
- g = c2.g; lock_CN = <>};
+ both c1 c2 = { s = \\c,n => c1.s ! c ! n ++ "and" ++ c2.s ! c ! n;
+ g = c2.g; lock_CN = <>
+ };
-desc c1 c2 i = c2 ;
-descClass c dc = c;
-desc2desc c1 c2 i d = d;
+ either c1 c2 = { s = \\c,n => c1.s ! c ! n ++ "or" ++ c2.s ! c ! n;
+ g = c2.g; lock_CN = <>
+ };
-subClassStm c1 c2 sc = ss (c1. s ! Sg ! Nom ++ "is" ++ "a" ++ "subclass" ++ "of" ++ c2.s ! Sg ! Nom) ;
-instStm c i = ss (i.s ! Nom ++ "is" ++ "an" ++ "instance" ++ "of" ++ c.s ! Sg ! Nom) ;
-formStm f = ss (f.s ! Indep ! Pos) ;
-subClassCStm c1 c2 constr sc= ss (c1.s ! Sg ! Nom ++ "is" ++ "a" ++ "subclass" ++ "of" ++ c2.s ! Sg ! Nom ++ "where" ++ constr.s ! Indep ! Pos) ;
+ desc c1 c2 i = c2 ;
+ descClass c dc = c;
+ desc2desc c1 c2 i d = d;
--- lindef
+ subClassStm c1 c2 sc = lin StmtS (ss (c1. s ! Sg ! Nom ++ "is a subclass of" ++ c2.s ! Sg ! Nom)) ;
+ instStm c i = lin StmtS (ss (i.s ! Nom ++ "is an instance of" ++ c.s ! Sg ! Nom)) ;
+ formStm f = lin StmtS (ss (f.s ! Indep ! Pos)) ;
+ subClassCStm c1 c2 constr sc= lin StmtS (ss (c1.s ! Sg ! Nom ++ "is a subclass of" ++ c2.s ! Sg ! Nom ++ "where" ++ constr.s ! Indep ! Pos)) ;
-lindef Ind = \x -> {s = \\_ => x; a = agrP3 Sg; lock_NP = <>} ;
-
-lindef El = \x -> {s = \\_ => x; a = agrP3 Sg; lock_NP = <>} ;
-
-lindef Class = \x -> {s = \\_,_ => x; g = Neutr; lock_CN =<>};
+lindef
+ Ind = \x -> {s = \\_ => x; a = agrP3 Sg; lock_NP = <>} ;
+ El = \x -> {s = \\_ => x; a = agrP3 Sg; lock_NP = <>} ;
+ Class = \x -> {s = \\_,_ => x; g = Neutr; lock_CN =<>};
-
- };
\ No newline at end of file +};
|
