summaryrefslogtreecommitdiff
path: root/doc/tutorial/resource/LexIta.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-19 16:31:40 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-19 16:31:40 +0000
commitbfbe2e3d47e5f1904846609c80058f0561d76ede (patch)
treee41e9d1f35e48afa7049b0d05362d10df7078ae6 /doc/tutorial/resource/LexIta.gf
parent7878cd5e0ad8d8097a1f7a6b9885b4825fc47686 (diff)
resource examples
Diffstat (limited to 'doc/tutorial/resource/LexIta.gf')
-rw-r--r--doc/tutorial/resource/LexIta.gf46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/tutorial/resource/LexIta.gf b/doc/tutorial/resource/LexIta.gf
new file mode 100644
index 000000000..0b8940e1e
--- /dev/null
+++ b/doc/tutorial/resource/LexIta.gf
@@ -0,0 +1,46 @@
+--# -path=.:prelude
+
+resource LexIta = open SyntaxIta, MorphoIta, Prelude in {
+
+ oper
+
+ -- constructors for genders
+
+ Gender : Type ;
+ masculine, feminine : Gender ;
+
+ -- constructors for open lexicon
+
+ mkN : Gender -> (vino,vini : Str) -> CN ;
+ regN : (vino : Str) -> CN ;
+ femN : CN -> CN ;
+
+ mkA : (nero,nera,neri,nere : Str) -> AP ;
+ regA : (nero : Str) -> AP ;
+
+ mkV : (ama,amano : Str) -> V ;
+ regV : (amare : Str) -> V ;
+
+ mkV2 : (aspettare : V) -> (a : Str) -> V2 ;
+ dirV2 : (mangiare : V) -> V2 ;
+
+ --------------------------------------------
+ -- definitions, hidden from users
+
+ Gender = MorphoIta.Gender ;
+ masculine = Masc ;
+ feminine = Fem ;
+
+ mkN g x y = mkNoun g x y ** {lock_CN = <>} ;
+ regN x = regNoun x ** {lock_CN = <>} ;
+
+ mkA x y z u = mkAdjective x y z u ** {lock_AP = <>} ;
+ regA x = regAdjective x ** {lock_AP = <>} ;
+
+ mkV x y = mkVerb x y ** {lock_V = <>} ;
+ regV x = regVerb x ** {lock_V = <>} ;
+
+ mkV2 x p = x ** {c = p ; lock_V2 = <>} ;
+ dirV2 x = mkV2 x [] ;
+
+}