From 88cf84613e2272c5296c3a3bcad37329a3ed46d0 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 9 Apr 2014 14:01:06 +0000 Subject: [PATCH] more passives in App. Import changes are now produced with MkApp.hs, which copies the exclude list from App.gf to the concrete syntax files. --- examples/app/App.gf | 5 ++--- examples/app/AppBul.gf | 6 +++--- examples/app/AppChi.gf | 6 +++--- examples/app/AppEng.gf | 6 +++--- examples/app/AppFin.gf | 6 +++--- examples/app/AppFre.gf | 6 +++--- examples/app/AppGer.gf | 6 +++--- examples/app/AppHin.gf | 6 +++--- examples/app/AppIta.gf | 6 +++--- examples/app/AppSpa.gf | 6 +++--- examples/app/AppSwe.gf | 6 +++--- examples/app/MkApp.hs | 19 +++++++++++++++++++ 12 files changed, 51 insertions(+), 33 deletions(-) create mode 100644 examples/app/MkApp.hs diff --git a/examples/app/App.gf b/examples/app/App.gf index faaefb93c..c9ee9430b 100644 --- a/examples/app/App.gf +++ b/examples/app/App.gf @@ -4,7 +4,7 @@ abstract App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -22,9 +22,8 @@ abstract App = -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,Phrasebook diff --git a/examples/app/AppBul.gf b/examples/app/AppBul.gf index 868807777..943f405cc 100644 --- a/examples/app/AppBul.gf +++ b/examples/app/AppBul.gf @@ -7,7 +7,7 @@ concrete AppBul of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppBul of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookBul - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A] diff --git a/examples/app/AppChi.gf b/examples/app/AppChi.gf index 1367d839f..0870366c9 100644 --- a/examples/app/AppChi.gf +++ b/examples/app/AppChi.gf @@ -7,7 +7,7 @@ concrete AppChi of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppChi of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookChi - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A, at_Prep] diff --git a/examples/app/AppEng.gf b/examples/app/AppEng.gf index b3dc9f807..06d0b81a8 100644 --- a/examples/app/AppEng.gf +++ b/examples/app/AppEng.gf @@ -7,7 +7,7 @@ concrete AppEng of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppEng of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookEng - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv] diff --git a/examples/app/AppFin.gf b/examples/app/AppFin.gf index bb3c193a7..d0b9e01ba 100644 --- a/examples/app/AppFin.gf +++ b/examples/app/AppFin.gf @@ -7,7 +7,7 @@ concrete AppFin of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppFin of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookFin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A] diff --git a/examples/app/AppFre.gf b/examples/app/AppFre.gf index 3bbf68070..3b50030db 100644 --- a/examples/app/AppFre.gf +++ b/examples/app/AppFre.gf @@ -7,7 +7,7 @@ concrete AppFre of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppFre of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] diff --git a/examples/app/AppGer.gf b/examples/app/AppGer.gf index 71db7a3ce..595555916 100644 --- a/examples/app/AppGer.gf +++ b/examples/app/AppGer.gf @@ -7,7 +7,7 @@ concrete AppGer of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppGer of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookGer - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A] diff --git a/examples/app/AppHin.gf b/examples/app/AppHin.gf index f50255683..26b130f45 100644 --- a/examples/app/AppHin.gf +++ b/examples/app/AppHin.gf @@ -7,7 +7,7 @@ concrete AppHin of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppHin of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookHin - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A] diff --git a/examples/app/AppIta.gf b/examples/app/AppIta.gf index 9df6a8a00..1ca642a4b 100644 --- a/examples/app/AppIta.gf +++ b/examples/app/AppIta.gf @@ -7,7 +7,7 @@ concrete AppIta of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppIta of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookIta - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_A, closed_A] diff --git a/examples/app/AppSpa.gf b/examples/app/AppSpa.gf index b1d147977..01f049a3a 100644 --- a/examples/app/AppSpa.gf +++ b/examples/app/AppSpa.gf @@ -7,7 +7,7 @@ concrete AppSpa of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -21,12 +21,12 @@ concrete AppSpa of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookSpa - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, cheap_A,expensive_A, open_A, closed_A] diff --git a/examples/app/AppSwe.gf b/examples/app/AppSwe.gf index 6a8f2dc2b..74166fb03 100644 --- a/examples/app/AppSwe.gf +++ b/examples/app/AppSwe.gf @@ -6,7 +6,7 @@ concrete AppSwe of App = ComplVS, ComplVQ, ComplVA, Slash2V3, Slash3V3, SlashV2V, SlashV2S, SlashV2Q, SlashV2A, SlashVV, SlashV2VNP, - ReflVP, + PassVP, ReflVP, AdvVPSlash, AdVVPSlash, VPSlashPrep, -- Sentence PredSCVP, @@ -20,12 +20,12 @@ concrete AppSwe of App = ExistNPAdv, ExistIPAdv, ImpP3, SelfAdvVP, SelfAdVVP, SelfNP, + -- Construction hungry_VP, thirsty_VP, has_age_VP, have_name_Cl, married_Cl, what_name_QCl, how_old_QCl, how_far_QCl, weather_adjCl, is_right_VP, is_wrong_VP, n_units_AP, bottle_of_CN, cup_of_CN, glass_of_CN, - where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP, + where_go_QCl, where_come_from_QCl, go_here_VP, come_here_VP, come_from_here_VP, go_there_VP, come_there_VP, come_from_there_VP -- Extensions - PassVPSlash, PassAgentVPSlash ] ,PhrasebookSwe - [PSentence, PQuestion, PGreetingMale, PGreetingFemale, GObjectPlease, open_Adv, closed_A, open_A] diff --git a/examples/app/MkApp.hs b/examples/app/MkApp.hs new file mode 100644 index 000000000..02bc89f96 --- /dev/null +++ b/examples/app/MkApp.hs @@ -0,0 +1,19 @@ +-- update the import list of every language + +langs = words "Bul Chi Eng Fin Fre Ger Hin Ita Spa Swe" +appCnc lang = "App" ++ lang ++ ".gf" + +appAbs = "App.gf" + +main = do + imports <- readFile appAbs >>= return . getImports + mapM_ (\f -> readFile f >>= writeFile ("tmp/" ++ f) . (putImports imports)) (map appCnc langs) + +getImports = takeWhile (/= ']') . tail . dropWhile (/='[') + +putImports i s = + let + (s1,_:s2) = span (/='[') s + (_, s3) = span (/=']') s2 + in s1 ++ "[" ++ i ++ s3 +