Files
comp-syntax-gu-mlt/grammar/functor/MiniLangFunctor.gf
Arianna Masciolini 5b905390b6 WIP lab 1
2025-03-25 12:11:40 +01:00

196 lines
5.3 KiB
Plaintext

incomplete concrete MiniLangFunctor of MiniLang =
open
Grammar,
Syntax,
Lexicon
in {
-- A functor implementation of MiniLang, using Grammar and Lexicon whenever the function is
-- directly from there, Syntax otherwise.
-- Both Grammar and Lexicon are in a single file for simplicity.
-----------------------------------------------------
---------------- Grammar part -----------------------
-----------------------------------------------------
lincat
Utt = Grammar.Utt ;
Pol = Grammar.Pol ;
Temp = Grammar.Temp ;
Imp = Grammar.Imp ;
S = Grammar.S ;
QS = Grammar.QS ;
Cl = Grammar.Cl ;
QCl = Grammar.QCl ;
VP = Grammar.VP ;
Comp = Grammar.Comp ;
AP = Grammar.AP ;
CN = Grammar.CN ;
NP = Grammar.NP ;
IP = Grammar.IP ;
Pron = Grammar.Pron ;
Det = Grammar.Det ;
Conj = Grammar.Conj ;
Prep = Grammar.Prep ;
V = Grammar.V ;
V2 = Grammar.V2 ;
VS = Grammar.VS ;
VV = Grammar.VV ;
A = Grammar.A ;
N = Grammar.N ;
PN = Grammar.PN ;
Adv = Grammar.Adv ;
IAdv = Grammar.IAdv ;
lin
UttS = Grammar.UttS ;
UttQS = Grammar.UttQS ;
UttNP = Grammar.UttNP ;
UttAdv = Grammar.UttAdv ;
UttIAdv = Grammar.UttIAdv ;
UttImpSg pol imp = Syntax.mkUtt pol imp ;
UseCl = Grammar.UseCl ;
UseQCl = Grammar.UseQCl ;
PredVP = Grammar.PredVP ;
QuestCl = Grammar.QuestCl ;
QuestVP = Grammar.QuestVP ;
ImpVP = Grammar.ImpVP ;
UseV = Grammar.UseV ;
ComplV2 v2 np = Syntax.mkVP v2 np ;
ComplVS = Grammar.ComplVS ;
ComplVV = Grammar.ComplVV ;
UseComp = Grammar.UseComp ;
CompAP = Grammar.CompAP ;
CompNP = Grammar.CompNP ;
CompAdv = Grammar.CompAdv ;
AdvVP = Grammar.AdvVP ;
DetCN = Grammar.DetCN ;
UsePN = Grammar.UsePN ;
UsePron = Grammar.UsePron ;
MassNP = Grammar.MassNP ;
a_Det = Syntax.a_Det ;
aPl_Det = Syntax.aPl_Det ;
the_Det = Syntax.the_Det ;
thePl_Det = Syntax.thePl_Det ;
UseN = Grammar.UseN ;
AdjCN = Grammar.AdjCN ;
PositA = Grammar.PositA ;
PrepNP = Grammar.PrepNP ;
CoordS conj a b = Syntax.mkS conj a b ;
PPos = Grammar.PPos ;
PNeg = Grammar.PNeg ;
TSim = Syntax.mkTemp Syntax.presentTense Syntax.simultaneousAnt ;
TAnt = Syntax.mkTemp Syntax.presentTense Syntax.anteriorAnt ;
and_Conj = Grammar.and_Conj ;
or_Conj = Grammar.or_Conj ;
every_Det = Grammar.every_Det ;
in_Prep = Grammar.in_Prep ;
on_Prep = Grammar.on_Prep ;
with_Prep = Grammar.with_Prep ;
i_Pron = Grammar.i_Pron ;
youSg_Pron = Grammar.youSg_Pron ;
he_Pron = Grammar.he_Pron ;
she_Pron = Grammar.she_Pron ;
we_Pron = Grammar.we_Pron ;
youPl_Pron = Grammar.youPl_Pron ;
they_Pron = Grammar.they_Pron ;
whoSg_IP = Grammar.whoSg_IP ;
where_IAdv = Grammar.where_IAdv ;
why_IAdv = Grammar.why_IAdv ;
have_V2 = Grammar.have_V2 ;
want_VV = Grammar.want_VV ;
------------------------------------
-- Lexicon part --------------------
------------------------------------
already_Adv = Lexicon.already_Adv ;
animal_N = Lexicon.animal_N ;
apple_N = Lexicon.apple_N ;
baby_N = Lexicon.baby_N ;
bad_A = Lexicon.bad_A ;
beer_N = Lexicon.beer_N ;
big_A = Lexicon.big_A ;
bike_N = Lexicon.bike_N ;
bird_N = Lexicon.bird_N ;
black_A = Lexicon.black_A ;
blood_N = Lexicon.blood_N ;
blue_A = Lexicon.blue_A ;
boat_N = Lexicon.boat_N ;
book_N = Lexicon.book_N ;
boy_N = Lexicon.boy_N ;
bread_N = Lexicon.bread_N ;
break_V2 = Lexicon.break_V2 ;
buy_V2 = Lexicon.buy_V2 ;
car_N = Lexicon.car_N ;
cat_N = Lexicon.cat_N ;
child_N = Lexicon.child_N ;
city_N = Lexicon.city_N ;
clean_A = Lexicon.clean_A ;
clever_A = Lexicon.clever_A ;
cloud_N = Lexicon.cloud_N ;
cold_A = Lexicon.cold_A ;
come_V = Lexicon.come_V ;
computer_N = Lexicon.computer_N ;
cow_N = Lexicon.cow_N ;
dirty_A = Lexicon.dirty_A ;
dog_N = Lexicon.dog_N ;
drink_V2 = Lexicon.drink_V2 ;
eat_V2 = Lexicon.eat_V2 ;
find_V2 = Lexicon.find_V2 ;
fire_N = Lexicon.fire_N ;
fish_N = Lexicon.fish_N ;
flower_N = Lexicon.flower_N ;
friend_N = Lexicon.friend_N ;
girl_N = Lexicon.girl_N ;
good_A = Lexicon.good_A ;
go_V = Lexicon.go_V ;
grammar_N = Lexicon.grammar_N ;
green_A = Lexicon.green_A ;
heavy_A = Lexicon.heavy_A ;
horse_N = Lexicon.horse_N ;
hot_A = Lexicon.hot_A ;
house_N = Lexicon.house_N ;
john_PN = Lexicon.john_PN ;
jump_V = Lexicon.jump_V ;
kill_V2 = Lexicon.kill_V2 ;
know_VS = Lexicon.know_VS ;
language_N = Lexicon.language_N ;
live_V = Lexicon.live_V ;
love_V2 = Lexicon.love_V2 ;
man_N = Lexicon.man_N ;
milk_N = Lexicon.milk_N ;
music_N = Lexicon.music_N ;
new_A = Lexicon.new_A ;
now_Adv = Lexicon.now_Adv ;
old_A = Lexicon.old_A ;
paris_PN = Lexicon.paris_PN ;
play_V = Lexicon.play_V ;
read_V2 = Lexicon.read_V2 ;
ready_A = Lexicon.ready_A ;
red_A = Lexicon.red_A ;
river_N = Lexicon.river_N ;
run_V = Lexicon.run_V ;
sea_N = Lexicon.sea_N ;
see_V2 = Lexicon.see_V2 ;
ship_N = Lexicon.ship_N ;
sleep_V = Lexicon.sleep_V ;
small_A = Lexicon.small_A ;
star_N = Lexicon.star_N ;
swim_V = Lexicon.swim_V ;
teach_V2 = Lexicon.teach_V2 ;
train_N = Lexicon.train_N ;
travel_V = Lexicon.travel_V ;
tree_N = Lexicon.tree_N ;
understand_V2 = Lexicon.understand_V2 ;
wait_V2 = Lexicon.wait_V2 ;
walk_V = Lexicon.walk_V ;
warm_A = Lexicon.warm_A ;
water_N = Lexicon.water_N ;
white_A = Lexicon.white_A ;
wine_N = Lexicon.wine_N ;
woman_N = Lexicon.woman_N ;
yellow_A = Lexicon.yellow_A ;
young_A = Lexicon.young_A ;
}