summaryrefslogtreecommitdiff
path: root/examples/tutorial/syntax/GrammarIta.gf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorial/syntax/GrammarIta.gf')
-rw-r--r--examples/tutorial/syntax/GrammarIta.gf14
1 files changed, 13 insertions, 1 deletions
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"} ;
+
}