From bfbe2e3d47e5f1904846609c80058f0561d76ede Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 19 Dec 2005 16:31:40 +0000 Subject: resource examples --- doc/tutorial/resource/LexEng.gf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/tutorial/resource/LexEng.gf (limited to 'doc/tutorial/resource/LexEng.gf') diff --git a/doc/tutorial/resource/LexEng.gf b/doc/tutorial/resource/LexEng.gf new file mode 100644 index 000000000..c939aac9f --- /dev/null +++ b/doc/tutorial/resource/LexEng.gf @@ -0,0 +1,34 @@ +--# -path=.:prelude + +resource LexEng = open SyntaxEng, MorphoEng, Prelude in { + + oper + + -- constructors for open lexicon + + mkN : (man,men : Str) -> CN ; + regN : (car : Str) -> CN ; + + mkA : (hot : Str) -> AP ; + + mkV : (go,goes : Str) -> V ; + regV : (walk : Str) -> V ; + + mkV2 : (look : V) -> (at : Str) -> V2 ; + dirV2 : (eat : V) -> V2 ; + + -------------------------------------------- + -- definitions, hidden from users + + mkN x y = mkNoun x y ** {lock_CN = <>} ; + regN x = regNoun x ** {lock_CN = <>} ; + + mkA x = ss 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 [] ; + +} -- cgit v1.2.3