forked from GitHub/gf-core
fixes in FoodsUrd and DemoRon compilation
This commit is contained in:
@@ -1,31 +1,53 @@
|
|||||||
concrete FoodsUrd of Foods = {
|
-- (c) 2009 Shafqat Virk under LGPL
|
||||||
flags coding = utf8 ;
|
|
||||||
param Number = Sg | Pl ;
|
concrete FoodsUrd of Foods = {
|
||||||
|
|
||||||
oper coupla : Number -> Str =\n -> case n of {Sg => "ہے" ; Pl => "ہیں"};
|
flags coding=utf8 ;
|
||||||
|
|
||||||
|
|
||||||
lincat
|
param Number = Sg | Pl ;
|
||||||
Comment, Quality = {s : Str} ;
|
param Gender = Masc | Fem;
|
||||||
Item = {s: Str ; n: Number};
|
|
||||||
Kind = {s: Number => Str};
|
oper coupla : Number -> Str =\n -> case n of {Sg => "ہے" ; Pl => "ہیں"};
|
||||||
|
|
||||||
lin
|
|
||||||
Pred item quality = {s = item.s ++ quality.s ++ coupla item.n} ;
|
lincat
|
||||||
This kind = {s = "یھ" ++ kind.s ! Sg; n= Sg} ;
|
Comment = {s : Str} ;
|
||||||
These kind = {s = "یھ" ++ kind.s ! Pl; n = Pl} ;
|
Item = {s: Str ; n: Number ; g:Gender};
|
||||||
That kind = {s = "وہ" ++ kind.s ! Sg; n= Sg} ;
|
Kind = {s: Number => Str ; g:Gender};
|
||||||
Those kind = {s = "وہ" ++ kind.s ! Pl; n=Pl} ;
|
Quality = {s: Gender => Number => Str};
|
||||||
Mod quality kind = {s = \\n => quality.s ++ kind.s ! n} ;
|
|
||||||
Wine = {s = table { Sg => "شراب" ; Pl => "شرابیں"} };
|
lin
|
||||||
Cheese = {s = table { Sg => "پنیر" ; Pl => "پنیریں"} };
|
Pred item quality = {s = item.s ++ quality.s ! item.g ! item.n ++ coupla item.n} ;
|
||||||
Fish = {s = table { Sg => "مچھلی" ; Pl => "مچھلیاں"} };
|
This kind = {s = "یھ" ++ kind.s ! Sg; n= Sg ; g = kind.g } ;
|
||||||
Pizza = {s = table { Sg => "پیزہ" ; Pl => "پیزے"} };
|
These kind = {s = "یھ" ++ kind.s ! Pl; n = Pl ; g = kind.g} ;
|
||||||
Very quality = {s = "بہت" ++ quality.s} ;
|
That kind = {s = "وہ" ++ kind.s ! Sg; n= Sg ; g = kind.g} ;
|
||||||
Fresh = {s = "تازہ"} ;
|
Those kind = {s = "وہ" ++ kind.s ! Pl; n=Pl ; g = kind.g} ;
|
||||||
Warm = {s = "گرم"} ;
|
Mod quality kind = {s = \\n => quality.s ! kind.g ! n ++ kind.s ! n ; g = kind.g};
|
||||||
Italian = {s = "اٹا لوی"} ;
|
Wine = {s = table { Sg => "شراب" ; Pl => "شرابیں"} ; g = Fem};
|
||||||
Expensive = {s = "مہنگا"} ;
|
Cheese = {s = table { Sg => "پنیر" ; Pl => "پنیریں"} ; g = Fem};
|
||||||
Delicious = {s = "مزیدار"} ;
|
Fish = {s = table { Sg => "مچھلی" ; Pl => "مچھلیاں"} ; g = Fem};
|
||||||
Boring = {s = "فضول"} ;
|
Pizza = {s = table { Sg => "پیزہ" ; Pl => "پیزے"} ; g = Masc};
|
||||||
}
|
Very quality = {s = \\g,n => "بہت" ++ quality.s ! g ! n} ;
|
||||||
|
Fresh = regAdj "تازہ" ;
|
||||||
|
Warm = regAdj "گرم" ;
|
||||||
|
Italian = regAdj "اٹا لوی" ;
|
||||||
|
Expensive = regAdj "مہنگا" ;
|
||||||
|
Delicious = regAdj "مزیدار" ;
|
||||||
|
Boring = regAdj "فضول" ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
regAdj : Str -> {s: Gender => Number => Str} = \a -> case a of {
|
||||||
|
x + "ا" => mkAdj a (x+"ے") (x+"ی");
|
||||||
|
_ => mkAdj a a a
|
||||||
|
};
|
||||||
|
mkAdj : Str -> Str -> Str -> {s: Gender => Number => Str} = \s,p,f -> {
|
||||||
|
s = table {
|
||||||
|
Masc => table {
|
||||||
|
Sg => s;
|
||||||
|
Pl => p
|
||||||
|
};
|
||||||
|
Fem => \\_ => f
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user