From 6bbd4e423a7cda422a2e519453a41cef234506bd Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 16 May 2006 13:07:41 +0000 Subject: examples of dialogue system grammars --- examples/dialogue/DialogueGodis.gf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 examples/dialogue/DialogueGodis.gf (limited to 'examples/dialogue/DialogueGodis.gf') 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" ; + + +} + -- cgit v1.2.3