Fixes to num size and other fixes

This commit is contained in:
Roman Suzi
2020-07-25 19:32:57 +03:00
parent 74485ab138
commit 3fc6efec77
10 changed files with 67 additions and 46 deletions

View File

@@ -1183,13 +1183,6 @@ oper
Num2_4 => "тысячи" ; -- NumAll ?
_ => "тысяч"
} ;
sizeNumCase : (Number => Case => Str) -> NumSize -> Str
= \nt,size -> case size of {
Num1 => nt ! Sg ! Nom ;
Num2_4 => nt ! Sg ! Gen ; --?
Num5 => nt ! Pl ! Gen ;
NumAll => nt ! Pl ! Nom
} ;
---------------
-- Adverbs -- Наречия
@@ -1215,10 +1208,20 @@ oper
= \ns -> case ns of {Num1 => Sg ; NumAll | Num2_4 | Num5 => Pl} ;
-- The following two used in tandem to form the word, controlled by numeral
numSizeNum : NumSize -> Number
= \ns -> case ns of {Num1 | Num2_4 => Sg ; Num5 | NumAll => Pl} ;
numSizeCase : NumSize -> Case
= \ns -> case ns of {Num1 | NumAll => Nom ; Num2_4 | Num5 => Gen} ;
numSizeNum : Case -> NumSize -> Number
= \cas,ns -> case <cas,ns> of {
<Nom|Acc,Num2_4> => Sg ;
<_,Num1> => Sg ;
_ => Pl
} ;
numSizeCase : Case -> NumSize -> Case
= \cas,ns -> case <cas,ns> of {
<Nom,Num1 | NumAll> => Nom ;
<Nom,Num2_4 | Num5> => Gen ;
<Acc,Num1 | NumAll> => Nom ;
<Acc,Num2_4 | Num5> => Gen ;
_ => cas
} ;
oper -- TODO:
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;