summaryrefslogtreecommitdiff
path: root/examples/numerals/mapuche.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-08-04 18:26:48 +0000
committeraarne <aarne@cs.chalmers.se>2008-08-04 18:26:48 +0000
commita9893f45724299e6cc773bbb2fa2cf315fe85206 (patch)
treeb5c6222b2422a3db7bf4dd676aa4872adf22daf4 /examples/numerals/mapuche.gf
parenta401820e3718a936cc926c457d29ec145e189be5 (diff)
ported numerals to GF3 and encoded in UTF8; some problematic ones in todo
Diffstat (limited to 'examples/numerals/mapuche.gf')
-rw-r--r--examples/numerals/mapuche.gf48
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/numerals/mapuche.gf b/examples/numerals/mapuche.gf
new file mode 100644
index 000000000..9334301ab
--- /dev/null
+++ b/examples/numerals/mapuche.gf
@@ -0,0 +1,48 @@
+concrete mapuche of Numerals = {
+-- include numerals.Abs.gf ;
+
+param Size = sg | pl ;
+
+oper All = {s : Str ; size : Size};
+
+lincat Numeral = { s : Str } ;
+lincat Digit = All ;
+lincat Sub10 = All ;
+lincat Sub100 = All ;
+lincat Sub1000 = All ;
+lincat Sub1000000 = { s : Str } ;
+
+oper mkNum : Str -> All = \tri ->
+ { s = tri ; size = pl};
+
+lin num x = {s = x.s } ;
+
+lin n2 = mkNum "epu" ;
+lin n3 = mkNum "külá" ;
+lin n4 = mkNum "meli" ;
+lin n5 = mkNum "kechu" ;
+lin n6 = mkNum "kayu" ;
+lin n7 = mkNum "reqle" ;
+lin n8 = mkNum "pura" ;
+lin n9 = mkNum "aylla" ;
+
+oper ss : Str -> All = \s1 -> {s = s1 ; size = pl } ;
+
+lin pot01 = { s = "kiñe" ; size = sg};
+lin pot0 d = d ;
+lin pot110 = ss "mari" ;
+lin pot111 = ss ("mari" ++ "kiñe") ;
+lin pot1to19 d = ss ("mari" ++ d.s );
+lin pot0as1 n = n ;
+lin pot1 d = ss (d.s ++ "mari" );
+lin pot1plus d e = ss (d.s ++ "mari" ++ e.s ) ;
+lin pot1as2 n = n ;
+lin pot2 d = ss (((selsg d.s) ! d.size) ++ "pataka" ) ;
+lin pot2plus d e = ss (((selsg d.s) ! d.size) ++ "pataka" ++ e.s) ;
+lin pot2as3 n = {s = n.s };
+lin pot3 n = {s = (selsg n.s) ! n.size ++ "warangka" } ;
+lin pot3plus n m = {s = (selsg n.s) ! n.size ++ "warangka" ++ m.s} ;
+
+oper selsg : Str -> Size => Str = \s -> table {sg => [] ; pl => s } ;
+
+}