summaryrefslogtreecommitdiff
path: root/grammars/numerals/Numerals.gf
diff options
context:
space:
mode:
authoraarne <unknown>2003-10-09 16:11:22 +0000
committeraarne <unknown>2003-10-09 16:11:22 +0000
commitce253baf15f9df5e95d0402ccddf5cc25c0736c0 (patch)
tree41936cc6df42f436974259bcc88e3c8f96144a29 /grammars/numerals/Numerals.gf
parent2ee936c7e23bd690b05b8362179911a2d176f150 (diff)
Experimenting with transfer.
Diffstat (limited to 'grammars/numerals/Numerals.gf')
-rw-r--r--grammars/numerals/Numerals.gf40
1 files changed, 40 insertions, 0 deletions
diff --git a/grammars/numerals/Numerals.gf b/grammars/numerals/Numerals.gf
new file mode 100644
index 000000000..c0e293059
--- /dev/null
+++ b/grammars/numerals/Numerals.gf
@@ -0,0 +1,40 @@
+-- numerals from 1 to 999999 in decimal notation. AR 1998 -- 2003
+
+abstract Numerals = {
+
+flags startcat=Numeral ;
+
+cat
+ Numeral ; -- 0..
+ Digit ; -- 2..9
+ Sub10 ; -- 1..9
+ Sub100 ; -- 1..99
+ Sub1000 ; -- 1..999
+ Sub1000000 ; -- 1..999999
+
+fun
+ num : Sub1000000 -> Numeral ;
+
+ n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
+
+ pot01 : Sub10 ; -- 1
+ pot0 : Digit -> Sub10 ; -- d * 1
+ pot110 : Sub100 ; -- 10
+ pot111 : Sub100 ; -- 11
+ pot1to19 : Digit -> Sub100 ; -- 10 + d
+ pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9
+ pot1 : Digit -> Sub100 ; -- d * 10
+ pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n
+ pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99
+ pot2 : Sub10 -> Sub1000 ; -- m * 100
+ pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n
+ pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999
+ pot3 : Sub1000 -> Sub1000000 ; -- m * 1000
+ pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n
+
+data
+ Numeral = num ;
+ Digit = n2 | n3 | n4 | n5 | n6 | n7 | n8 | n9 ;
+ Sub10 = pot01 | pot0 ;
+ Sub100 = pot110 | pot111 | pot1to19 | pot0as1 | pot1 | pot1plus ;
+}