summaryrefslogtreecommitdiff
path: root/examples/dialogue/DialogueGodis.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-05-16 13:07:41 +0000
committeraarne <aarne@cs.chalmers.se>2006-05-16 13:07:41 +0000
commit6bbd4e423a7cda422a2e519453a41cef234506bd (patch)
treeedbc7cbd1071446c703af376d3e3dab5c321267c /examples/dialogue/DialogueGodis.gf
parente1ea20277cb19ef73e7380898942e4bb77cbd183 (diff)
examples of dialogue system grammars
Diffstat (limited to 'examples/dialogue/DialogueGodis.gf')
-rw-r--r--examples/dialogue/DialogueGodis.gf34
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/dialogue/DialogueGodis.gf b/examples/dialogue/DialogueGodis.gf
new file mode 100644
index 000000000..fd39b5cc3
--- /dev/null
+++ b/examples/dialogue/DialogueGodis.gf
@@ -0,0 +1,34 @@
+--# -path=.:prelude
+
+concrete DialogueGodis of Dialogue = open ResGodis, Prelude in {
+
+ flags lexer=codelit ; unlexer=code ;
+
+ lincat
+ Move = SS ;
+ Action = SS ;
+ Kind = SS ;
+ Object = SS ;
+ Oper0 = SS ;
+ Oper1 = SS ;
+ Oper2 = SS ;
+
+ lin
+ MRequest a = a ;
+ MAnswer a = a ; --- ??
+
+ MQuery k = ss (bracket (app1 "query" k.s)) ; ---
+
+ AOper0 op = ss (bracket (request op.s)) ;
+ AOper1 k op x = ss (req_ans op.s k.s x.s) ;
+ AOper2 k m op x y =
+ ss (bracket (request op.s ++ "," ++
+ answer (app1 k.s x.s) ++ "," ++ answer (app1 m.s y.s))) ;
+
+ OAll = apps "all" ;
+ OIndef = apps "indef" ;
+ ODef = apps "def" ;
+
+
+}
+