From a5300ad062b82154f3f9533e143ea35515e6c39e Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 11 Nov 2008 10:28:32 +0000 Subject: tutorial complete with server and js --- examples/tutorial/old/semantics/Base.gf | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 examples/tutorial/old/semantics/Base.gf (limited to 'examples/tutorial/old/semantics/Base.gf') diff --git a/examples/tutorial/old/semantics/Base.gf b/examples/tutorial/old/semantics/Base.gf new file mode 100644 index 000000000..85868d7ac --- /dev/null +++ b/examples/tutorial/old/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 ; +} -- cgit v1.2.3