summaryrefslogtreecommitdiff
path: root/src/lib/parser.mly
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-08-28 20:01:54 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-08-28 20:01:54 +0200
commit3b8c136ebdba7f4b5b4d6baad08d0a75c3b2dc86 (patch)
tree62341b36574a0ded0d4fe38ea9ec16036f27dfd4 /src/lib/parser.mly
parent26faec7a69051f639b50c8e8741f0823c6be52a2 (diff)
Update
Diffstat (limited to 'src/lib/parser.mly')
-rw-r--r--src/lib/parser.mly58
1 files changed, 38 insertions, 20 deletions
diff --git a/src/lib/parser.mly b/src/lib/parser.mly
index f12e2cc..68809fc 100644
--- a/src/lib/parser.mly
+++ b/src/lib/parser.mly
@@ -31,21 +31,22 @@ occlusiv:
| G { T.g }
fricativ:
- | S { T.s () }
- | SZ { T.sz () }
- | Z { T.z () }
+ | S { T.s }
+ | SZ { T.sz }
+ | Z { T.z }
| F { T.f }
+ | V { T.v }
- | X { T.ch () }
+ | X { T.ch }
obstruent:
| occlusiv { $1 }
| fricativ { $1 }
liquid:
- | L { T.l () }
- | R { T.r () }
+ | L { T.l }
+ | R { T.r }
nasal:
| N { T.n }
@@ -58,7 +59,7 @@ consonant:
| nasal { $1 }
semi_voyel:
- | Y { T.none }
+ | Y { T.semi_voyel_y }
| W { T.semi_voyel_w }
opening_consonant:
@@ -83,10 +84,11 @@ voyels:
| E_AGRAVE { T.e `Opened , T.e `Opened }
| E U { T.eu `Opened , T.eu `Opened }
| O { T.o `Opened , T.o `Opened }
- | U { T.u , T.u }
- | OU { T.u' , T.u' }
+ | U { T.voyel_y , T.voyel_y }
+ | OU { T.voyel_u , T.voyel_u }
| W A { T.diphtongue T.semi_voyel_w T.a, T.diphtongue T.semi_voyel_w T.a}
| W I { T.diphtongue T.semi_voyel_w T.i, T.diphtongue T.semi_voyel_w T.a}
+ | I E { T.diphtongue T.i (T.e `Opened), T.diphtongue T.i (T.e `Opened)}
nasal_voyels:
| A N { T.a' () , T.a' () }
@@ -94,24 +96,40 @@ nasal_voyels:
ending_consonant:
| B { Some (T.b ) }
- | S { Some (T.s ()) }
| T { None }
- | R { Some (T.r ()) }
+ | liquid { Some $1 }
| nasal { Some $1 }
consonant_group:
- | opening_consonant
+ | f = fricativ
+ o = opening_consonant
{
{ ending = None
- ; opening = [ fst $1 ]
- ; following = snd $1 }
+ ; opening = f::(fst o)::[]
+ ; following = snd o }
}
- | ending_consonant
- opening_consonant
+ | o = opening_consonant
{
- { ending = Some $1
- ; opening = [ fst $2 ]
- ; following = snd $2 }
+ { ending = None
+ ; opening = [ fst o ]
+ ; following = snd o }
+ }
+ | e = ending_consonant
+ Sep?
+ o = opening_consonant
+ {
+ { ending = Some e
+ ; opening = [ fst o ]
+ ; following = snd o }
+ }
+ | e = ending_consonant
+ Sep?
+ f = fricativ
+ o = opening_consonant
+ {
+ { ending = Some e
+ ; opening = f::[ fst o ]
+ ; following = snd o }
}
syllable:
@@ -128,7 +146,7 @@ syllables:
word:
- | syllables consonant_group? EOL { P.rebuild $2 $1 }
+ | Sep? syllables consonant_group? EOL { P.rebuild $3 $2 }
main:
| word { $1 }