summaryrefslogtreecommitdiff
path: root/src/lib/parser.mly
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-08-27 13:15:35 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-08-27 13:15:35 +0200
commit65d5990607e9542aa847ec7cb684afd3ffdedb8f (patch)
tree47a26877c88e303915bc9545a22b004d8dd8089b /src/lib/parser.mly
parentdf92da631e9a10a099a72ba846f90adf99d180df (diff)
Update
Diffstat (limited to 'src/lib/parser.mly')
-rw-r--r--src/lib/parser.mly33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/lib/parser.mly b/src/lib/parser.mly
index b4b7817..2a94839 100644
--- a/src/lib/parser.mly
+++ b/src/lib/parser.mly
@@ -25,7 +25,7 @@ occlusiv:
| B { T.b }
| T { T.t }
- | D { T.none }
+ | D { T.d }
| K { T.k }
| G { T.none }
@@ -48,7 +48,18 @@ liquid:
| R { T.r () }
nasal:
- | N { T.n () }
+ | N { T.n }
+ | M { T.m }
+
+consonant:
+ | occlusiv { $1 }
+ | fricativ { $1 }
+ | liquid { $1 }
+ | nasal { $1 }
+
+semi_voyel:
+ | Y { T.none }
+ | W { T.semi_voyel_w }
opening_consonant:
| occlusiv { $1, None }
@@ -57,35 +68,33 @@ opening_consonant:
| liquid { $1, None }
| obstruent liquid { $1, Some $2 }
| occlusiv fricativ { $1, Some $2 }
+ | consonant semi_voyel{ $1, Some $2 }
+ | semi_voyel { $1, None }
+
(* Each voyel as two associated sounds, depending there is a followng sound or
not *)
voyels:
| A { T.a `Opened , T.a `Opened }
- | A I { T.e `Opened, T.e `Opened }
+ | A I { T.e `Opened , T.e `Opened }
| I { T.i `Opened , T.i `Opened }
- | E { T.schwa () , T.schwa () }
+ | E { T.e `Opened , T.schwa () }
| E_ACUTE E? { T.e `Closed , T.e `Closed }
| E U { T.eu `Opened , T.eu `Opened }
| O { T.o `Opened , T.o `Opened }
- | A_NASAL { T.nasal (T.a `Opened), T.nasal (T.a `Opened) }
+ | U { T.u , T.u }
nasal_voyels:
| A N { T.a' () , T.a' () }
%prec Low
ending_consonant:
+ | B { Some (T.b ) }
| S { Some (T.s ()) }
| T { None }
| R { Some (T.r ()) }
| nasal { Some $1 }
-ending_word:
- | X { Some (T.muted (T.s ())) }
- | S { Some (T.muted (T.s ())) }
- | R { Some (T.muted (T.r ())) }
- | T { Some (T.muted T.t) }
-
consonant_group:
| opening_consonant
{
@@ -113,7 +122,7 @@ syllables:
word:
- | syllables ending_word? EOL { P.rebuild $2 $1 }
+ | syllables consonant_group? EOL { P.rebuild $2 $1 }
main:
| word { $1 }