::vowel:: = aáâæeéèêëiîïoôœuùûüAÁÂÆEÉÈÊËIÎÏOÔŒUÙÛÜ
::front_vowel:: = eéèêëiîïyEÉÈÊËIÎÏY
::consonant:: = b|ç|c|ch|d|f|g|j|k|l|m|n|p|r|s|t|v|w|z

j -> ʒ / _
i -> j / _ [::vowel::]

% Rules to be completed (with tilde)
a[mn] -> ẫ / _ #|x|(::consonant::)(::consonant::)
ai[mn] -> ễ / _ #|x|(::consonant::)(::consonant::)
e[mn] -> ẫ / _ #|x|(::consonant::)(::consonant::)
ein|im|in|ym|yn -> aî̃ / _ #|x|(::consonant::)(::consonant::)
eun|un -> œ̃ / _ #|x|(::consonant::)(::consonant::)
ien -> iễ / _ #|x|(::consonant::)(::consonant::)
om|on -> õ / _ #|x|(::consonant::)(::consonant::)
uin|um -> uẽ / _ #|x|(::consonant::)(::consonant::)
oin -> ouễ / _ #|x|(::consonant::)(::consonant::)

% Treatment of <l>
il -> j / [::vowel::] _
ill -> j / [::vowel::] _

e -> ɛ / _ x|(::consonant::)(::consonant::)
x -> ks / _ (p|t|k|f|s|ch)

% Treatment of <c> and <s>
sc -> s / _ [::front_vowel::]
c -> s / _ [::front_vowel::]

% Intervocalic voicing of <s>
s -> z / [::vowel::] _ [::vowel::]

% High vowels become glides before vowels
ou -> w / _ [::vowel::]
u -> ɥ / _ [::vowel::]

% Context where <y> is realized as a vowel
y -> i / . _
y -> i / _ [^::vowel::]

% "Deletion" of <ent> word finally
ent -> 0 / _ #

% "Deletion" of <es> word finally
es -> 0 / _ #

% Treatment of <er>
er -> é / _
g -> ʒ / _ [::front_vowel::]
e -> 0 / [::vowel::].+ _ #

% A strange rule
ct -> 0 / _ (am|an|aen|aim|ain|aon|em|en|ein|eun|ien|im|in|oin|om|on|uin|uin|um|un|ym|yn)#

% A less strange rule
ng -> n / ei _ #

% These rules can be excised if we assume liason:
d -> 0 / [::vowel::n] _ #
dd -> 0 / [::vowel::n] _ #
g -> 0 / [::vowel::] _ #
p -> 0 / [::vowel::m] _ #
pp -> 0 / [::vowel::m] _ #
t -> 0 / [::vowel::n] _ #
tt -> 0 / [::vowel::n] _ #
x -> 0 / [::vowel::] _ #
s -> 0 / [::vowel::n] _ #
ent -> 0 / . _ #
