summaryrefslogtreecommitdiff
path: root/examples-3.0/tutorial/smart/SmartI.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-17 13:16:15 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-17 13:16:15 +0000
commit23b8136af27b0baaa8fcb5272a613d5f2ee447fa (patch)
tree2e7cd2930b7e8b6b0d911c00ec2d279b882f4893 /examples-3.0/tutorial/smart/SmartI.gf
parent7c097669d2c3934622c57f6e2f4ddee8826953d3 (diff)
started examples-3.0 with examples that are tested to work
Diffstat (limited to 'examples-3.0/tutorial/smart/SmartI.gf')
-rw-r--r--examples-3.0/tutorial/smart/SmartI.gf50
1 files changed, 50 insertions, 0 deletions
diff --git a/examples-3.0/tutorial/smart/SmartI.gf b/examples-3.0/tutorial/smart/SmartI.gf
new file mode 100644
index 000000000..2b46ba0fe
--- /dev/null
+++ b/examples-3.0/tutorial/smart/SmartI.gf
@@ -0,0 +1,50 @@
+--# -path=.:present:prelude
+
+incomplete concrete SmartI of Smart = open Syntax, LexSmart, Prelude in {
+
+-- grammar Toy1 from the Regulus book
+
+flags startcat = Utterance ;
+
+lincat
+ Utterance = Utt ;
+ Command = Imp ;
+ Question = QS ;
+ Kind = N ;
+ Action = V2 ;
+ Device = NP ;
+ Location = N ;
+
+lin
+ UCommand c = mkUtt politeImpForm c ;
+ UQuestion q = mkUtt q ;
+
+ CAction _ act dev = mkImp act dev ;
+ QAction _ act st dev =
+ mkQS anteriorAnt (mkQCl (mkCl dev (passiveVP act))) ; ---- show empty proof
+
+ DKindOne k = mkNP defSgDet k ;
+ DKindMany k = mkNP defPlDet k ;
+ DLoc _ dev loc = mkNP dev (mkAdv in_Prep (mkNP defSgDet loc)) ;
+
+ light = light_N ;
+ fan = fan_N ;
+
+ switchOn _ _ = switchOn_V2 ;
+ switchOff _ _ = switchOff_V2 ;
+
+ dim _ _ = dim_V2 ;
+
+ kitchen = kitchen_N ;
+ livingRoom = livingRoom_N ;
+
+lin
+ switchable_light = ss [] ;
+ switchable_fan = ss [] ;
+ dimmable_light = ss [] ;
+
+ statelike_switchOn _ _ = ss [] ;
+ statelike_switchOff _ _ = ss [] ;
+
+
+}