forked from GitHub/gf-core
adapt Precedence.gf to new syntax; bug fix in Swedish mkA
This commit is contained in:
@@ -7,8 +7,8 @@ resource Precedence = open Prelude in {
|
||||
param
|
||||
Prec = p4 | p3 | p2 | p1 | p0 ;
|
||||
|
||||
lintype
|
||||
PrecTerm = Prec => Str ;
|
||||
oper
|
||||
PrecTerm : Type = Prec => Str ;
|
||||
|
||||
oper
|
||||
pss : PrecTerm -> {s : PrecTerm} = \s -> {s = s} ;
|
||||
@@ -75,7 +75,7 @@ mkInfixR : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm =
|
||||
-- alternative:
|
||||
-- precedence as inherent feature
|
||||
|
||||
lintype TermWithPrec = {s : Str ; p : Prec} ;
|
||||
oper TermWithPrec : Type = {s : Str ; p : Prec} ;
|
||||
|
||||
oper
|
||||
mkpPrec : Str -> Prec -> TermWithPrec =
|
||||
@@ -114,4 +114,4 @@ mkpInfixL : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
|
||||
mkpInfixR : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
|
||||
\f -> \p -> \x -> \y ->
|
||||
mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y p) p ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
@@ -457,15 +457,20 @@ oper
|
||||
|
||||
mk7A a b c d e f g = mkAdjective a b c d e f g ** {isComp = False ; lock_A = <>} ;
|
||||
regA fin =
|
||||
let fint : Str = case fin of {
|
||||
ru + "nd" => ru + "nt" ;
|
||||
se + "dd" => se + "tt" ;
|
||||
pla + "tt" => pla + "tt" ;
|
||||
gla + "d" => gla + "tt" ;
|
||||
_ => fin + "t"
|
||||
}
|
||||
let
|
||||
fint : Str = case fin of {
|
||||
ru + "nd" => ru + "nt" ;
|
||||
se + "dd" => se + "tt" ;
|
||||
pla + "tt" => pla + "tt" ;
|
||||
gla + "d" => gla + "tt" ;
|
||||
_ => fin + "t"
|
||||
} ;
|
||||
fina : Str = case fin of {
|
||||
unk@(? + ? + ? + _) + "e" + n@("l" | "n" | "r") => unk + n + "a" ;
|
||||
_ => fin + "a"
|
||||
}
|
||||
in
|
||||
mk3A fin fint (fin + "a") ;
|
||||
mk3A fin fint fina ;
|
||||
irregA ung yngre yngst =
|
||||
mk7A ung (ung + "t") (ung + "a") (ung + "a") yngre yngst (yngst+"a") ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user