diff --git a/lab1/grammar/abstract/MicroLang.gf b/lab1/grammar/abstract/MicroLang.gf index 0ee73b8..7fa2e8d 100644 --- a/lab1/grammar/abstract/MicroLang.gf +++ b/lab1/grammar/abstract/MicroLang.gf @@ -49,6 +49,11 @@ abstract MicroLang = { aPl_Det : Det ; -- indefinite plural ---s the_Det : Det ; -- definite singular ---s thePl_Det : Det ; -- definite plural ---s + this_Det : Det ; + thisPl_Det: Det ; + that_Det : Det ; + thatPl_Det: Det ; + UseN : N -> CN ; -- house AdjCN : AP -> CN -> CN ; -- big house @@ -162,4 +167,4 @@ fun yellow_A : A ; young_A : A ; -} \ No newline at end of file +} diff --git a/lab1/grammar/english/MicroLangEng.gf b/lab1/grammar/english/MicroLangEng.gf index e004e34..6182890 100644 --- a/lab1/grammar/english/MicroLangEng.gf +++ b/lab1/grammar/english/MicroLangEng.gf @@ -30,7 +30,7 @@ concrete MicroLangEng of MicroLang = open MicroResEng, Prelude in { PredVPS np vp = { s = np.s ! Nom ++ vp.verb.s ! agr2vform np.a ++ vp.compl } ; - + UseV v = { verb = v ; compl = [] ; @@ -62,6 +62,10 @@ concrete MicroLangEng of MicroLang = open MicroResEng, Prelude in { aPl_Det = {s = "" ; n = Pl} ; the_Det = {s = "the" ; n = Sg} ; thePl_Det = {s = "the" ; n = Pl} ; + this_Det = {s = "this"; n = Sg} ; + thisPl_Det = {s = "these"; n = Pl} ; + that_Det = {s = "that"; n = Sg} ; + thatPl_Det = {s = "those"; n = Pl} ; UseN n = n ; diff --git a/lab1/grammar/korean/MicroLangKor.gf b/lab1/grammar/korean/MicroLangKor.gf index f7619e8..c283951 100644 --- a/lab1/grammar/korean/MicroLangKor.gf +++ b/lab1/grammar/korean/MicroLangKor.gf @@ -23,6 +23,22 @@ concrete MicroLangKor of MicroLang = open MicroResKor, Prelude in { N = Noun ; Adv = {s : Str} ; + lin + UttS s = s ; + UttNP np = {s = np.s} ; + UseV v = {verb = v ; compl = []} ; + ComplV2 v2 np = {verb = v2 ; compl = np.s}; + UseN n = n ; + DetCN det cn = {s = det.s ++ cn.s} ; + a_Det = {s = []} ; + aPl_Det = {s = []} ; + the_Det = {s = []} ; + thePl_Det = {s = []} ; + this_Det = {s = "이"} ; + thisPl_Det = {s = "이"} ; + that_Det = {s = "그"} ; + thatPl_Det = {s = "그"} ; + ----------------------------------------------------- ---------------- Lexicon part ----------------------- ----------------------------------------------------- @@ -88,7 +104,7 @@ lin music_N = mkN "음악" ; -- lin now_Adv = mkAdv "지금" ; -- lin old_A = mkA "낡안" ; -- lin paris_PN = mkPN "Paris" ; --- lin play_V = mkV "play" ; +lin play_V = mkV "놀" ; -- lin read_V2 = mkV2 (mkV "read" "read" "read") ; -- lin ready_A = mkA "ready" ; -- lin red_A = mkA "red" ; @@ -97,7 +113,7 @@ lin river_N = mkN "river" ; lin sea_N = mkN "바다" ; -- lin see_V2 = mkV2 (mkV "see" "saw" "seen") ; lin ship_N = mkN "ship" ; --- lin sleep_V = mkV "sleep" "slept" "slept" ; +lin sleep_V = mkV "자" ; -- lin small_A = mkA "작은" ; lin star_N = mkN "별" ; -- lin swim_V = mkV "swim" "swam" "swum" ; @@ -137,4 +153,11 @@ oper mkPrep : Str -> Prep = \s -> lin Prep {s = s} ; + mkV = overload { + mkV : Str -> V = \stem -> lin V { + stem = stem ; + reg = Regular ; + t = Action + }; + } ; } diff --git a/lab1/grammar/korean/MicroResKor.gf b/lab1/grammar/korean/MicroResKor.gf index c51e372..9ed5279 100644 --- a/lab1/grammar/korean/MicroResKor.gf +++ b/lab1/grammar/korean/MicroResKor.gf @@ -10,6 +10,6 @@ resource MicroResKor = open Prelude in { stem : Str ; t : VerbType } ; - Verb2 : Type = { v : Verb } ; + Verb2 : Type = Verb ; Adjective : Type = Verb ; }