1
0
forked from GitHub/gf-core
Files
gf-core/doc/tutorial/smarthouse/SmartEng.gf
2007-07-06 15:37:32 +00:00

20 lines
383 B
Plaintext

--# -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" ;
}