summaryrefslogtreecommitdiff
path: root/examples/tutorial/smart/SmartEng.gf
diff options
context:
space:
mode:
authorjohn.j.camilleri <john.j.camilleri@chalmers.se>2013-09-16 07:17:27 +0000
committerjohn.j.camilleri <john.j.camilleri@chalmers.se>2013-09-16 07:17:27 +0000
commitf5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 (patch)
tree946c9e8542b8e8271b6b529a95c0400fa6613cb4 /examples/tutorial/smart/SmartEng.gf
parent8e1c6cca407c82fc09569d80c231b8d256735989 (diff)
Remove contribs and examples
Everything has now been moved to a separate repository at https://github.com/GrammaticalFramework/gf-contrib The contents of the examples folder are build during SetupWeb
Diffstat (limited to 'examples/tutorial/smart/SmartEng.gf')
-rw-r--r--examples/tutorial/smart/SmartEng.gf78
1 files changed, 0 insertions, 78 deletions
diff --git a/examples/tutorial/smart/SmartEng.gf b/examples/tutorial/smart/SmartEng.gf
deleted file mode 100644
index 6c00fc7ff..000000000
--- a/examples/tutorial/smart/SmartEng.gf
+++ /dev/null
@@ -1,78 +0,0 @@
---# -path=.:prelude
-
-concrete SmartEng of Smart = open Prelude in {
-
--- grammar Toy1 from the Regulus book
-
-flags startcat = Utterance ;
-
-param
- Number = Sg | Pl ;
- VForm = VImp | VPart ;
-
-lincat
- Utterance = SS ;
- Command = SS ;
- Question = SS ;
- Kind = {s : Number => Str} ;
- Action = {s : VForm => Str ; part : Str} ;
- Device = {s : Str ; n : Number} ;
- Location = SS ;
- Switchable = {} ;
- Dimmable = {} ;
- Statelike = {} ;
-
-lin
- UCommand c = c ;
- UQuestion q = q ;
-
- CAction _ act dev = ss (act.s ! VImp ++ bothWays act.part dev.s) ;
- QAction _ act _ dev = ss (be dev.n ++ dev.s ++ act.s ! VPart ++ act.part) ;
-
- DKindOne k = {
- s = "the" ++ k.s ! Sg ;
- n = Sg
- } ;
- DKindMany k = {
- s = "the" ++ k.s ! Pl ;
- n = Pl
- } ;
- DLoc _ dev loc = {
- s = dev.s ++ "in" ++ "the" ++ loc.s ;
- n = dev.n
- } ;
-
- light = mkNoun "light" ;
- fan = mkNoun "fan" ;
-
- switchOn _ _ = mkVerb "switch" "switched" "on" ;
- switchOff _ _ = mkVerb "switch" "switched" "off" ;
-
- dim _ _ = mkVerb "dim" "dimmed" [] ;
-
- kitchen = ss "kitchen" ;
- livingRoom = ss ["living room"] ;
-
-oper
- mkNoun : Str -> {s : Number => Str} = \dog -> {
- s = table {
- Sg => dog ;
- Pl => dog + "s"
- }
- } ;
-
- mkVerb : (_,_,_ : Str) -> {s : VForm => Str ; part : Str} = \go,gone,away -> {
- s = table {
- VImp => go ;
- VPart => gone
- } ;
- part = away
- } ;
-
- be : Number -> Str = \n -> case n of {
- Sg => "is" ;
- Pl => "are"
- } ;
-
-}
-