summaryrefslogtreecommitdiff
path: root/examples/nlg/LogicCnc.gf
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2011-08-30 17:29:13 +0000
committerkr.angelov <kr.angelov@gmail.com>2011-08-30 17:29:13 +0000
commit2001788b0242a0c945655c503262ccf104bcc3bd (patch)
tree73f196a046b70d58aeb2d1dc4d0ddb814e06cacb /examples/nlg/LogicCnc.gf
parentfe2fad8f8d5bc2c97e3ae4b19d52975c6e2dfe6f (diff)
few more fixes in the NLG grammar
Diffstat (limited to 'examples/nlg/LogicCnc.gf')
-rw-r--r--examples/nlg/LogicCnc.gf23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/nlg/LogicCnc.gf b/examples/nlg/LogicCnc.gf
new file mode 100644
index 000000000..b9a2013c9
--- /dev/null
+++ b/examples/nlg/LogicCnc.gf
@@ -0,0 +1,23 @@
+--# -path=present
+concrete LogicCnc of Logic = {
+
+lincat
+ Ind = {s : Str};
+ Prop = {s:Str};
+
+lin
+ john = {s="john"};
+ mary = {s="mary"};
+ boy x = {s="boy"++"("++x.s++")"};
+ smart x = {s="smart"++"("++x.s++")"};
+ love x y = {s="love"++"("++x.s++","++y.s++")"};
+ leave x = {s="leave"++"("++x.s++")"};
+ and x y = {s=x.s++"&&"++y.s};
+ or x y = {s=x.s++"||"++y.s};
+ impl x y = {s=x.s++"=>"++y.s};
+ forall f = {s="forall"++f.$0++"."++"("++f.s++")"};
+ exists f = {s="exists"++f.$0++"."++"("++f.s++")"};
+ not p = {s="not"++"("++p.s++")"};
+ eq x y = {s=x.s++"="++y.s};
+
+}