mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
demo restaurant info
This commit is contained in:
8
examples/restaurant/LexRestaurant.gf
Normal file
8
examples/restaurant/LexRestaurant.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
interface LexRestaurant = open Syntax in {
|
||||
|
||||
oper
|
||||
restaurant_N : N ;
|
||||
cheap_A : A ;
|
||||
italian_A, thai_A, swedish_A, french_A : A ;
|
||||
konkanok_PN : PN ;
|
||||
}
|
||||
12
examples/restaurant/LexRestaurantEng.gf
Normal file
12
examples/restaurant/LexRestaurantEng.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
instance LexRestaurantEng of LexRestaurant = open SyntaxEng, ParadigmsEng in {
|
||||
|
||||
oper
|
||||
restaurant_N = mkN "restaurant" ;
|
||||
cheap_A = mkA "cheap" ;
|
||||
italian_A = mkA "Italian" ;
|
||||
thai_A = mkA "Thai" ;
|
||||
swedish_A = mkA "Swedish" ;
|
||||
french_A = mkA "French" ;
|
||||
|
||||
konkanok_PN = mkPN "Konkanok" ;
|
||||
}
|
||||
12
examples/restaurant/LexRestaurantFin.gf
Normal file
12
examples/restaurant/LexRestaurantFin.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
instance LexRestaurantFin of LexRestaurant = open SyntaxFin, ParadigmsFin in {
|
||||
|
||||
oper
|
||||
restaurant_N = mkN "ravintola" ;
|
||||
cheap_A = mkA "halpa" ;
|
||||
italian_A = mkA "italialainen" ;
|
||||
thai_A = mkA "thaimaalainen" ;
|
||||
swedish_A = mkA "ruotsalainen" ;
|
||||
french_A = mkA "ranskalainen" ;
|
||||
|
||||
konkanok_PN = mkPN "Konkanok" ;
|
||||
}
|
||||
12
examples/restaurant/LexRestaurantGer.gf
Normal file
12
examples/restaurant/LexRestaurantGer.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
instance LexRestaurantGer of LexRestaurant = open SyntaxGer, ParadigmsGer in {
|
||||
|
||||
oper
|
||||
restaurant_N = mkN "Restaurant" "Restaurants" neuter ;
|
||||
cheap_A = mkA "billig" ;
|
||||
italian_A = mkA "italienisch" ;
|
||||
thai_A = mkA "thailändisch" ;
|
||||
swedish_A = mkA "schwedisch" ;
|
||||
french_A = mkA "französisch" ;
|
||||
|
||||
konkanok_PN = mkPN "Konkanok" ;
|
||||
}
|
||||
12
examples/restaurant/LexRestaurantSwe.gf
Normal file
12
examples/restaurant/LexRestaurantSwe.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
instance LexRestaurantSwe of LexRestaurant = open SyntaxSwe, ParadigmsSwe in {
|
||||
|
||||
oper
|
||||
restaurant_N = mkN "restaurang" ;
|
||||
cheap_A = mkA "billig" ;
|
||||
italian_A = mkA "italiensk" ;
|
||||
thai_A = mkA "thailändsk" ;
|
||||
swedish_A = mkA "svensk" ;
|
||||
french_A = mkA "fransk" ;
|
||||
|
||||
konkanok_PN = mkPN "Konkanok" ;
|
||||
}
|
||||
19
examples/restaurant/Restaurant.gf
Normal file
19
examples/restaurant/Restaurant.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
abstract Restaurant = {
|
||||
|
||||
flags startcat = Descr ;
|
||||
|
||||
cat
|
||||
Descr ;
|
||||
Name ;
|
||||
Nationality ;
|
||||
PriceLevel ;
|
||||
|
||||
fun
|
||||
MkDescr : Name -> PriceLevel -> Nationality -> Descr ;
|
||||
|
||||
Cheap : PriceLevel ;
|
||||
Italian, Thai, Swedish, French : Nationality ;
|
||||
Konkanok : Name ;
|
||||
|
||||
|
||||
}
|
||||
5
examples/restaurant/RestaurantEng.gf
Normal file
5
examples/restaurant/RestaurantEng.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete RestaurantEng of Restaurant = RestaurantI with
|
||||
(Syntax = SyntaxEng),
|
||||
(LexRestaurant = LexRestaurantEng) ;
|
||||
5
examples/restaurant/RestaurantFin.gf
Normal file
5
examples/restaurant/RestaurantFin.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete RestaurantFin of Restaurant = RestaurantI with
|
||||
(Syntax = SyntaxFin),
|
||||
(LexRestaurant = LexRestaurantFin) ;
|
||||
5
examples/restaurant/RestaurantGer.gf
Normal file
5
examples/restaurant/RestaurantGer.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete RestaurantGer of Restaurant = RestaurantI with
|
||||
(Syntax = SyntaxGer),
|
||||
(LexRestaurant = LexRestaurantGer) ;
|
||||
21
examples/restaurant/RestaurantI.gf
Normal file
21
examples/restaurant/RestaurantI.gf
Normal file
@@ -0,0 +1,21 @@
|
||||
incomplete concrete RestaurantI of Restaurant = open Syntax, LexRestaurant in {
|
||||
|
||||
lincat
|
||||
Descr = Phr ;
|
||||
Name = NP ;
|
||||
Nationality = A ;
|
||||
PriceLevel = A ;
|
||||
|
||||
lin
|
||||
MkDescr name price nat =
|
||||
mkPhr (mkCl name (mkNP indefSgDet (mkCN price (mkCN nat (mkCN restaurant_N))))) ;
|
||||
|
||||
Cheap = cheap_A ;
|
||||
Italian = italian_A ;
|
||||
Thai = thai_A ;
|
||||
Swedish = swedish_A ;
|
||||
French = french_A ;
|
||||
Konkanok = mkNP konkanok_PN ;
|
||||
|
||||
|
||||
}
|
||||
5
examples/restaurant/RestaurantSwe.gf
Normal file
5
examples/restaurant/RestaurantSwe.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete RestaurantSwe of Restaurant = RestaurantI with
|
||||
(Syntax = SyntaxSwe),
|
||||
(LexRestaurant = LexRestaurantSwe) ;
|
||||
Reference in New Issue
Block a user