From 59052fd1b6e5b6ed76494aaf5ca8d6597a85d952 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 17 Oct 2007 19:08:09 +0000 Subject: added coordination to tutorial grammar example. --- examples/tutorial/syntax/GrammarIta.gf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'examples/tutorial/syntax/GrammarIta.gf') diff --git a/examples/tutorial/syntax/GrammarIta.gf b/examples/tutorial/syntax/GrammarIta.gf index 98a935379..e24372e39 100644 --- a/examples/tutorial/syntax/GrammarIta.gf +++ b/examples/tutorial/syntax/GrammarIta.gf @@ -18,6 +18,7 @@ concrete GrammarIta of Grammar = open Prelude, MorphoIta in { A = Adjective ; V = Verb ; V2 = Verb2 ; + Conj = {s : Str} ; Pol = {s : Str ; p : Bool} ; @@ -36,12 +37,16 @@ concrete GrammarIta of Grammar = open Prelude, MorphoIta in { ComplAP ap = {s = \\b,g,n => posneg b ++ copula n ++ ap.s ! g ! n} ; DetCN det cn = {s = det.s ! cn.g ++ cn.s ! det.n ; g = cn.g ; n = det.n} ; - IDetCN det cn = {s = det.s ! cn.g ++ cn.s ! det.n ; g = cn.g ; n = det.n} ; ModCN ap cn = {s = \\n => cn.s ! n ++ ap.s ! cn.g ! n ; g = cn.g} ; AdAP ada ap = {s = \\n,g => ada.s ++ ap.s ! n ! g} ; + IDetCN det cn = {s = det.s ! cn.g ++ cn.s ! det.n ; g = cn.g ; n = det.n} ; + + ConjS c a b = {s = a.s ++ c.s ++ b.s} ; + ConjNP c a b = {s = a.s ++ c.s ++ b.s ; n = Pl ; g = conjGender a.g b.g} ; + UseN n = n ; UseA a = a ; UseV v = {s = \\b,_,n => posneg b ++ v.s ! n} ; @@ -58,6 +63,7 @@ concrete GrammarIta of Grammar = open Prelude, MorphoIta in { two_Det = {s = \\_ => "due" ; n = Pl} ; very_AdA = {s = "molto"} ; which_IDet = {s = \\_ => "quale" ; n = Sg} ; + and_Conj = {s = "e"} ; PPos = {s = [] ; p = True} ; PNeg = {s = [] ; p = False} ; @@ -95,7 +101,13 @@ concrete GrammarIta of Grammar = open Prelude, MorphoIta in { Fem => pre {"una" ; "un'" / vowel} } ; + conjGender : Gender -> Gender -> Gender = \g,h -> case g of { + Masc => Masc ; + _ => h + } ; + sImpuro : Strs = strs {"sb" ; "sp" ; "sy" ; "z"} ; vowel : Strs = strs {"a" ; "e" ; "i" ; "o" ; "u"} ; + } -- cgit v1.2.3