mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-27 05:22:50 -06:00
resource examples
This commit is contained in:
34
doc/tutorial/resource/LexEng.gf
Normal file
34
doc/tutorial/resource/LexEng.gf
Normal file
@@ -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 [] ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user