1
0
forked from GitHub/gf-rgl

generalized pt -transfer so that it goes into subtrees (naive implementation in TreeOperations; using PGF.Expr.match would be better); example given in 'h pt'

This commit is contained in:
aarne
2011-03-12 10:20:54 +00:00
parent c3f6d50fdb
commit e00f7f7ba3
2 changed files with 9 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ abstract Noun = Cat ** {
-- $Card$ consists of either digits or numeral words. -- $Card$ consists of either digits or numeral words.
data
NumDigits : Digits -> Card ; -- 51 NumDigits : Digits -> Card ; -- 51
NumNumeral : Numeral -> Card ; -- fifty-one NumNumeral : Numeral -> Card ; -- fifty-one
@@ -62,6 +63,7 @@ abstract Noun = Cat ** {
-- A $Card$ can be modified by certain adverbs. -- A $Card$ can be modified by certain adverbs.
fun
AdNum : AdN -> Card -> Card ; -- almost 51 AdNum : AdN -> Card -> Card ; -- almost 51
-- An $Ord$ consists of either digits or numeral words. -- An $Ord$ consists of either digits or numeral words.

View File

@@ -1,4 +1,9 @@
abstract NumeralTransfer = Numeral ** { abstract NumeralTransfer = Numeral, Noun ** {
fun digits2numeral : Card -> Card ;
def
digits2numeral (NumDigits d) = NumNumeral (digits2num d) ;
digits2numeral n = n ;
fun digits2num : Digits -> Numeral ; fun digits2num : Digits -> Numeral ;
def digits2num (IDig d1) = num (pot2as3 (pot1as2 (pot0as1 (dn10 d1)))) ; def digits2num (IDig d1) = num (pot2as3 (pot1as2 (pot0as1 (dn10 d1)))) ;
@@ -89,4 +94,4 @@ def nd n2 = D_2 ;
nd n8 = D_8 ; nd n8 = D_8 ;
nd n9 = D_9 ; nd n9 = D_9 ;
} }