summaryrefslogtreecommitdiff
path: root/gf-book/examples/chapter6/ClassesEng.gf
diff options
context:
space:
mode:
Diffstat (limited to 'gf-book/examples/chapter6/ClassesEng.gf')
-rw-r--r--gf-book/examples/chapter6/ClassesEng.gf29
1 files changed, 29 insertions, 0 deletions
diff --git a/gf-book/examples/chapter6/ClassesEng.gf b/gf-book/examples/chapter6/ClassesEng.gf
new file mode 100644
index 000000000..5bdf80c35
--- /dev/null
+++ b/gf-book/examples/chapter6/ClassesEng.gf
@@ -0,0 +1,29 @@
+--# -path=.:present
+
+concrete ClassesEng of Classes = open SyntaxEng, ParadigmsEng in {
+
+lincat
+ Command = Utt ;
+ Kind = CN ;
+ Class = {} ;
+ Instance = {} ;
+ Action = V2 ;
+ Device = NP ;
+
+lin
+ Act _ _ _ a d = mkUtt (mkImp a d) ;
+ The k = mkNP the_Det k ;
+
+ Light = mkCN (mkN "light") ;
+ Fan = mkCN (mkN "fan") ;
+ Switchable, Dimmable = <> ;
+
+ SwitchOn = mkV2 (partV (mkV "switch") "on") ;
+ SwitchOff = mkV2 (partV (mkV "switch") "off") ;
+ Dim = mkV2 (mkV "dim") ;
+
+ switchable_Light = <> ;
+ switchable_Fan = <> ;
+ dimmable_Light = <> ;
+
+}