diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-20 10:38:03 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-20 10:38:03 +0000 |
| commit | e4119186fa03a12d8820bc3c03797ac33c71e258 (patch) | |
| tree | 87674c66ff9261fbdb9b75ea7507fdd0e5ec3c18 /examples-3.0/tutorial/semantics/Base.gf | |
| parent | c3bb8267e67f8d2238a95f3930d6d8e3a6f7d234 (diff) | |
tutorial semantics example works except one rul
Diffstat (limited to 'examples-3.0/tutorial/semantics/Base.gf')
| -rw-r--r-- | examples-3.0/tutorial/semantics/Base.gf | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/examples-3.0/tutorial/semantics/Base.gf b/examples-3.0/tutorial/semantics/Base.gf new file mode 100644 index 000000000..4586c3106 --- /dev/null +++ b/examples-3.0/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 ; +} |
