diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-07-06 15:37:32 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-07-06 15:37:32 +0000 |
| commit | bb423658aa79e5cfdb5a89ec6af2f522a5bdb0cc (patch) | |
| tree | 0ae7a8de2a9e3d8db030118650817008de2bcb41 /doc/tutorial/smarthouse/SmartEng.gf | |
| parent | bece5b29740dbf0bb5a60f2cb3f10129e102d238 (diff) | |
new tutorial almost finished
Diffstat (limited to 'doc/tutorial/smarthouse/SmartEng.gf')
| -rw-r--r-- | doc/tutorial/smarthouse/SmartEng.gf | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/tutorial/smarthouse/SmartEng.gf b/doc/tutorial/smarthouse/SmartEng.gf new file mode 100644 index 000000000..0f59cd1e0 --- /dev/null +++ b/doc/tutorial/smarthouse/SmartEng.gf @@ -0,0 +1,19 @@ +--# -path=.:prelude + +concrete SmartEng of Smart = open Prelude in { + +-- part of grammar Toy1 from the Regulus book + +lincat + Command, Kind, Action, Device = SS ; +lin + CAction _ act dev = ss (act.s ++ dev.s) ; + DKindOne k = ss ("the" ++ k.s) ; + + light = ss "light" ; + fan = ss "fan" ; + switchOn _ = ss ["switch on"] ; + switchOff _ = ss ["switch off"] ; + dim = ss "dim" ; +} + |
