summaryrefslogtreecommitdiff
path: root/old-examples/tutorial/semantics/Base.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-25 16:54:35 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-25 16:54:35 +0000
commite9e80fc389365e24d4300d7d5390c7d833a96c50 (patch)
treef0b58473adaa670bd8fc52ada419d8cad470ee03 /old-examples/tutorial/semantics/Base.gf
parentb96b36f43de3e2f8b58d5f539daa6f6d47f25870 (diff)
changed names of resource-1.3; added a note on homepage on release
Diffstat (limited to 'old-examples/tutorial/semantics/Base.gf')
-rw-r--r--old-examples/tutorial/semantics/Base.gf60
1 files changed, 60 insertions, 0 deletions
diff --git a/old-examples/tutorial/semantics/Base.gf b/old-examples/tutorial/semantics/Base.gf
new file mode 100644
index 000000000..4586c3106
--- /dev/null
+++ b/old-examples/tutorial/semantics/Base.gf
@@ -0,0 +1,60 @@
+-- abstract syntax of a query language
+
+abstract Base = {
+
+cat
+ S ;
+ NP ;
+ PN ;
+ CN ;
+ AP ;
+ A2 ;
+ Conj ;
+fun
+
+-- sentence syntax
+ PredAP : NP -> AP -> S ;
+
+ ComplA2 : A2 -> NP -> AP ;
+
+ ModCN : AP -> CN -> CN ;
+
+ ConjAP : Conj -> AP -> AP -> AP ;
+ ConjNP : Conj -> NP -> NP -> NP ;
+
+ UsePN : PN -> NP ;
+ Every : CN -> NP ;
+ Some : CN -> NP ;
+
+ And, Or : Conj ;
+
+-- lexicon
+
+ UseInt : Int -> PN ;
+
+ Number : CN ;
+ Even, Odd, Prime : AP ;
+ Equal, Greater, Smaller, Divisible : A2 ;
+
+ Sum, Product, GCD : ListPN -> PN ;
+
+-- adding questions
+
+cat
+ Question ;
+ Answer ;
+ ListPN ;
+fun
+ WhatIs : PN -> Question ;
+ WhichAre : CN -> AP -> Question ;
+ QuestS : S -> Question ;
+
+ Yes : Answer ;
+ No : Answer ;
+ Value : NP -> Answer ;
+
+ None : NP ;
+ Many : ListPN -> NP ;
+ BasePN : PN -> PN -> ListPN ;
+ ConsPN : PN -> ListPN -> ListPN ;
+}