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
|
param
|
||||||
Prec = p4 | p3 | p2 | p1 | p0 ;
|
Prec = p4 | p3 | p2 | p1 | p0 ;
|
||||||
|
|
||||||
lintype
|
oper
|
||||||
PrecTerm = Prec => Str ;
|
PrecTerm : Type = Prec => Str ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
pss : PrecTerm -> {s : PrecTerm} = \s -> {s = s} ;
|
pss : PrecTerm -> {s : PrecTerm} = \s -> {s = s} ;
|
||||||
@@ -75,7 +75,7 @@ mkInfixR : Str -> Prec -> PrecTerm -> PrecTerm -> PrecTerm =
|
|||||||
-- alternative:
|
-- alternative:
|
||||||
-- precedence as inherent feature
|
-- precedence as inherent feature
|
||||||
|
|
||||||
lintype TermWithPrec = {s : Str ; p : Prec} ;
|
oper TermWithPrec : Type = {s : Str ; p : Prec} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkpPrec : Str -> Prec -> TermWithPrec =
|
mkpPrec : Str -> Prec -> TermWithPrec =
|
||||||
@@ -114,4 +114,4 @@ mkpInfixL : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
|
|||||||
mkpInfixR : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
|
mkpInfixR : Str -> Prec -> TermWithPrec -> TermWithPrec -> TermWithPrec =
|
||||||
\f -> \p -> \x -> \y ->
|
\f -> \p -> \x -> \y ->
|
||||||
mkpPrec (usePrec x (nextPrec ! p) ++ f ++ usePrec y p) p ;
|
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 = <>} ;
|
mk7A a b c d e f g = mkAdjective a b c d e f g ** {isComp = False ; lock_A = <>} ;
|
||||||
regA fin =
|
regA fin =
|
||||||
let fint : Str = case fin of {
|
let
|
||||||
ru + "nd" => ru + "nt" ;
|
fint : Str = case fin of {
|
||||||
se + "dd" => se + "tt" ;
|
ru + "nd" => ru + "nt" ;
|
||||||
pla + "tt" => pla + "tt" ;
|
se + "dd" => se + "tt" ;
|
||||||
gla + "d" => gla + "tt" ;
|
pla + "tt" => pla + "tt" ;
|
||||||
_ => fin + "t"
|
gla + "d" => gla + "tt" ;
|
||||||
}
|
_ => fin + "t"
|
||||||
|
} ;
|
||||||
|
fina : Str = case fin of {
|
||||||
|
unk@(? + ? + ? + _) + "e" + n@("l" | "n" | "r") => unk + n + "a" ;
|
||||||
|
_ => fin + "a"
|
||||||
|
}
|
||||||
in
|
in
|
||||||
mk3A fin fint (fin + "a") ;
|
mk3A fin fint fina ;
|
||||||
irregA ung yngre yngst =
|
irregA ung yngre yngst =
|
||||||
mk7A ung (ung + "t") (ung + "a") (ung + "a") yngre yngst (yngst+"a") ;
|
mk7A ung (ung + "t") (ung + "a") (ung + "a") yngre yngst (yngst+"a") ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user