summaryrefslogtreecommitdiff
path: root/grammars/numerals/old/tibetan.gf
blob: a10a658cb0848800c4c3bcb1b9604ecb6df854af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
include numerals.Abs.gf ;

param DForm = unit | ten | teen ;

-- Have no idea about the orthography, taken from Univ. History of Numbers
-- Georges Ifrah p. 26


lincat Digit = {s : DForm => Str} ;
lincat Sub10 = {s : DForm => Str} ;

oper mkNum : Str -> Lin Digit = 
  \gnyis ->  
  {s = table {unit => gnyis ; teen => "bcu" ++ gnyis ; ten => gnyis ++ "bcu" }} ;

-- lin n1 mkNum "gcig" ;
lin n2 = mkNum "gnyis" ; 
lin n3 = mkNum "gsum" ;
lin n4 = mkNum "bzhi" ;
lin n5 = mkNum "lnga" ;
lin n6 = mkNum "drug" ;
lin n7 = mkNum "bdun" ;
lin n8 = mkNum "brgyad" ; 
lin n9 = mkNum "dgu" ;

oper ss : Str -> {s : Str} = \s -> {s = s} ;

lin pot01 = {s = table {f => "gcig"}} ;
lin pot0 d = {s = table {f => d.s ! f}} ;
lin pot110 = ss "bcu" ; 
lin pot111 = ss ("bcu" ++ "gcig");
lin pot1to19 d = {s = d.s ! teen } ;
lin pot0as1 n = {s = n.s ! unit } ;
lin pot1 d = {s = d.s ! ten } ;
lin pot1plus d e = {s = d.s ! ten ++ e.s ! unit} ;
lin pot1as2 n = n ;
lin pot2 d = {s = d.s ! unit ++ "brgya"} ;
lin pot2plus d e = {s = d.s ! unit ++ "brgya" ++ e.s} ;

lin pot2as3 n = n ;
lin pot3 n = {s = n.s ++ "thousand"} ;
lin pot3plus n m = {s = n.s ++ "thousand" ++ m.s} ;

-- Don't know the word for thousand