summaryrefslogtreecommitdiff
path: root/src/lib/parser.mly
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-09-08 10:09:26 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-09-08 10:09:26 +0200
commitd04dec688cc9159d4e3ad47890ae4b1f40c5ec3c (patch)
treefbcea4204d1fd1eaf251ff7e47d6952ec772b78f /src/lib/parser.mly
parent80b77d19cee0f3df4457005eead1128b90754a48 (diff)
Update diphtongue and semi-voyels
Diffstat (limited to 'src/lib/parser.mly')
-rw-r--r--src/lib/parser.mly27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/lib/parser.mly b/src/lib/parser.mly
index 9d44b1f..6c1722a 100644
--- a/src/lib/parser.mly
+++ b/src/lib/parser.mly
@@ -45,36 +45,27 @@ obstruent:
liquid:
| L { Sounds.l }
- | L L { Sounds.l }
| R { Sounds.r }
nasal:
| N { Sounds.n }
| M { Sounds.m }
- | G N { Sounds.gn }
-consonant:
- | occlusiv { $1 }
- | fricativ { $1 }
- | liquid { $1 }
- | nasal { $1 }
-semi_voyel:
- (* | Y { Sounds.semi_voyel_y } *)
- | W { Sounds.semi_voyel_w }
+initial_nasal:
+ | nasal { $1 }
+ | G N { Sounds.gn }
opening_consonant:
| occlusiv { $1, None }
| fricativ { $1, None }
- | nasal { $1, None }
+ | initial_nasal { $1, None }
| liquid { $1, None }
+
+opening_double:
| obstruent liquid { $1, Some $2 }
| occlusiv fricativ { $1, Some $2 }
-semi:
- | semi_voyel { $1, None }
-
-
(* Each voyel as two associated sounds, depending there is a followng sound or
not *)
voyels:
@@ -89,11 +80,11 @@ voyels:
| O { Sounds.o }
| U { Sounds.voyel_y }
| OU { Sounds.voyel_u }
+ (* This semi voyel can never be separated *)
+ | W voyels { Sounds.diphtongue Sounds.semi_voyel_w $2 }
voyels_semi:
| voyels { $1 }
- | W A { Sounds.diphtongue Sounds.semi_voyel_w Sounds.a}
- | W I { Sounds.diphtongue Sounds.semi_voyel_w Sounds.i}
| I voyels { Sounds.diphtongue Sounds.semi_voyel_y $2 }
| Y voyels { Sounds.diphtongue Sounds.semi_voyel_y $2 }
@@ -143,7 +134,7 @@ syllable:
v = voyels_semi
Sep?
{ (v, c) }
- | c = consonant_group(semi)
+ | c = consonant_group(opening_double)
v = voyels
Sep?
{ (v, Some c) }