diff --git a/lib/prelude/Coordination.gf b/lib/prelude/Coordination.gf index 6ed4af791..85073da24 100644 --- a/lib/prelude/Coordination.gf +++ b/lib/prelude/Coordination.gf @@ -102,4 +102,17 @@ oper comma = "," ; +-- you can also do this to right-associative lists: + + consrStr : Str -> Str -> ListX -> ListX = \comma,x,xs -> + {s1 = x ++ comma ++ xs.s1 ; s2 = xs.s2 } ; + + consrSS : Str -> SS -> ListX -> ListX = \comma,x,xs -> + consrStr comma x.s xs ; + + consrTable : (P : Type) -> Str -> {s : P => Str} -> ListTable P -> ListTable P = + \P,c,x,xs -> + {s1 = table P {o => x.s ! o ++ c ++ xs.s1 ! o} ; s2 = xs.s2} ; + + } ; diff --git a/lib/resource-1.0/abstract/Cat.gf b/lib/resource-1.0/abstract/Cat.gf index f68f79b10..8cc264920 100644 --- a/lib/resource-1.0/abstract/Cat.gf +++ b/lib/resource-1.0/abstract/Cat.gf @@ -74,13 +74,6 @@ abstract Cat = { CAdv ; -- comparative adverb e.g. "more", "less" Subj ; -- subjunction, e.g. "if", "when" - SeqS ; -- sequence of sentences - SeqVP ; -- sequence of verb phrases - SeqAP ; -- sequence of adjectival phrases - SeqNP ; -- sequence of noun phrases - SeqAdv ; -- sequence of adverbs - Voc ; -- vocative or "please" - } diff --git a/lib/resource-1.0/abstract/Conjunction.gf b/lib/resource-1.0/abstract/Conjunction.gf index 0c8ea9559..cb817559b 100644 --- a/lib/resource-1.0/abstract/Conjunction.gf +++ b/lib/resource-1.0/abstract/Conjunction.gf @@ -2,26 +2,22 @@ abstract Conjunction = Cat ** { fun - ConjS : Conj -> SeqS -> S ; -- "John walks and Mary runs" - ConjAP : Conj -> SeqAP -> AP ; -- "even and prime" - ConjNP : Conj -> SeqNP -> NP ; -- "John or Mary" - ConjAdv : Conj -> SeqAdv -> Adv ; -- "quickly or slowly" + ConjS : Conj -> [S] -> S ; -- "John walks and Mary runs" + ConjAP : Conj -> [AP] -> AP ; -- "even and prime" + ConjNP : Conj -> [NP] -> NP ; -- "John or Mary" + ConjAdv : Conj -> [Adv] -> Adv ; -- "quickly or slowly" - DConjS : DConj -> SeqS -> S ; -- "either John walks or Mary runs" - DConjAP : DConj -> SeqAP -> AP ; -- "both even and prime" - DConjNP : DConj -> SeqNP -> NP ; -- "either John or Mary" - DConjAdv : DConj -> SeqAdv -> Adv ; -- "both badly and slowly" + DConjS : DConj -> [S] -> S ; -- "either John walks or Mary runs" + DConjAP : DConj -> [AP] -> AP ; -- "both even and prime" + DConjNP : DConj -> [NP] -> NP ; -- "either John or Mary" + DConjAdv : DConj -> [Adv] -> Adv ; -- "both badly and slowly" +-- These categories are internal to this module. --- these are rather uninteresting - - TwoS : S -> S -> SeqS ; - AddS : SeqS -> S -> SeqS ; - TwoAdv : Adv -> Adv -> SeqAdv ; - AddAdv : SeqAdv -> Adv -> SeqAdv ; - TwoNP : NP -> NP -> SeqNP ; - AddNP : SeqNP -> NP -> SeqNP ; - TwoAP : AP -> AP -> SeqAP ; - AddAP : SeqAP -> AP -> SeqAP ; + cat + [S]{2} ; + [Adv]{2} ; + [NP]{2} ; + [AP]{2} ; } diff --git a/lib/resource-1.0/doc/Resource-HOWTO.html b/lib/resource-1.0/doc/Resource-HOWTO.html index 20815c929..20a099074 100644 --- a/lib/resource-1.0/doc/Resource-HOWTO.html +++ b/lib/resource-1.0/doc/Resource-HOWTO.html @@ -20,10 +20,12 @@ will give some hints how to extend the API.
-Notice. This document concerns the API V. 1.0 which has not +Notice. This document concerns the API v. 1.0 which has not yet been released. You can find the beginnings of it -in GF/lib/resource-1.0/gf, but the locations of -files are not yet final. +in GF/lib/resource-1.0/. See the +resource-1.0/README for +details on how this differs from previous versions. +
cp ../english/*Eng.gf .
- rename -n 's/Eng/Dut/' *Eng.gf
+ rename 's/Eng/Dut/' *Eng.gf
+ sed -i 's/^/--/' *Dut.gf ++ This will give you a set of templates out of which the grammar will grow as you uncomment and modify the files rule by rule. +
+ gf TestDut.gf ++ +
+ pg -printer=missing ++ tells you what exactly is missing. +