forked from GitHub/gf-rgl
(Hun) Put digraphs and trigraphs into a pattern, use them in dMajom
This commit is contained in:
@@ -103,11 +103,10 @@ oper
|
|||||||
-- it has to be called something else, and then you
|
-- it has to be called something else, and then you
|
||||||
-- can get "tako" and "ny" with p1, p2.
|
-- can get "tako" and "ny" with p1, p2.
|
||||||
let tako_ny : Str*Str = case majom of {
|
let tako_ny : Str*Str = case majom of {
|
||||||
x + trigraph@("dzs") => <x,trigraph> ;
|
x + dzs@#trigraph => <x,dzs> ;
|
||||||
x + digraph@("cs"|"dz"|"gy"|"ly"|"ny"|"sz"|"ty"|"zs")
|
x + zs@#digraph => <x,zs> ;
|
||||||
=> <x,digraph> ;
|
|
||||||
-- ? pattern matches exactly 1 character
|
-- ? pattern matches exactly 1 character
|
||||||
x + unigraph@? => <x,unigraph> } ;
|
x + s@? => <x,s> } ;
|
||||||
tako = tako_ny.p1 ;
|
tako = tako_ny.p1 ;
|
||||||
ny = tako_ny.p2 ;
|
ny = tako_ny.p2 ;
|
||||||
|
|
||||||
@@ -159,6 +158,11 @@ oper
|
|||||||
-- Vowels as a pattern.
|
-- Vowels as a pattern.
|
||||||
v : pattern Str = #("a" | "e" | "i" | "o" | "u" | "ö" | "ü" |
|
v : pattern Str = #("a" | "e" | "i" | "o" | "u" | "ö" | "ü" |
|
||||||
"á" | "é" | "í" | "ó" | "ú" | "ő" | "ű") ;
|
"á" | "é" | "í" | "ó" | "ú" | "ő" | "ű") ;
|
||||||
|
-- Digraphs
|
||||||
|
digraph : pattern Str = #("cs"|"dz"|"gy"|"ly"|"ny"|"sz"|"ty"|"zs") ;
|
||||||
|
|
||||||
|
-- Trigraphs
|
||||||
|
trigraph : pattern Str = #("dzs") ;
|
||||||
|
|
||||||
-- Function to test if a string ends in a vowel
|
-- Function to test if a string ends in a vowel
|
||||||
vowFinal : Str -> Bool = \str ->
|
vowFinal : Str -> Bool = \str ->
|
||||||
|
|||||||
Reference in New Issue
Block a user