summaryrefslogtreecommitdiff
path: root/src/lib/parser.mly
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-09-03 17:37:03 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-09-03 17:37:03 +0200
commit123c8bc693063cfc880709c7dfa700a177a66adb (patch)
tree5dd508c4ac5876fe80a661a4281b6fdaf3d064a9 /src/lib/parser.mly
parent48dc04c3b9afe19207d15b873452129d9c2b3b4c (diff)
Ended refactoring
Diffstat (limited to 'src/lib/parser.mly')
-rw-r--r--src/lib/parser.mly77
1 files changed, 38 insertions, 39 deletions
diff --git a/src/lib/parser.mly b/src/lib/parser.mly
index 251f359..a207329 100644
--- a/src/lib/parser.mly
+++ b/src/lib/parser.mly
@@ -7,52 +7,51 @@ See [1] for the theory behind the analysis
*)
-%parameter<T:Sounds.Sig.T>
%{
- module P = Process.M(T)
+ module P = Process
%}
-%start<T.t List.t> main
+%start<Sounds.t List.t> main
%%
occlusiv:
- | P { T.p }
- | B { T.b }
+ | P { Sounds.p }
+ | B { Sounds.b }
- | T { T.t }
- | D { T.d }
+ | T { Sounds.t }
+ | D { Sounds.d }
- | K { T.k }
- | G { T.g }
+ | K { Sounds.k }
+ | G { Sounds.g }
fricativ:
- | S { T.s }
- | SZ { T.sz }
- | Z { T.z }
+ | S { Sounds.s }
+ | SZ { Sounds.sz }
+ | Z { Sounds.z }
- | F { T.f }
- | V { T.v }
+ | F { Sounds.f }
+ | V { Sounds.v }
- | X { T.ch }
- | J { T.j }
+ | X { Sounds.ch }
+ | J { Sounds.j }
obstruent:
| occlusiv { $1 }
| fricativ { $1 }
liquid:
- | L { T.l }
- | L L { T.l }
- | R { T.r }
+ | L { Sounds.l }
+ | L L { Sounds.l }
+ | R { Sounds.r }
nasal:
- | N { T.n }
- | M { T.m }
+ | N { Sounds.n }
+ | M { Sounds.m }
consonant:
| occlusiv { $1 }
@@ -61,8 +60,8 @@ consonant:
| nasal { $1 }
semi_voyel:
- | Y { T.semi_voyel_y }
- | W { T.semi_voyel_w }
+ | Y { Sounds.semi_voyel_y }
+ | W { Sounds.semi_voyel_w }
opening_consonant:
| occlusiv { $1, None }
@@ -78,25 +77,25 @@ opening_consonant:
(* Each voyel as two associated sounds, depending there is a followng sound or
not *)
voyels:
- | A { T.a , T.a }
- | A I { T.voyel_ai , T.voyel_ai }
- | E I { T.e `Opened , T.e `Opened }
- | I { T.i , T.i }
- | E { T.e `Opened , T.schwa () }
- | E_ACUTE E? { T.e `Closed , T.e `Closed }
- | E_AGRAVE { T.e `Opened , T.e `Opened }
- | E U { T.eu , T.eu }
- | O { T.o , T.o }
- | 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.i}
- | I E { T.diphtongue T.i (T.e `Opened), T.diphtongue T.i (T.e `Opened)}
+ | A { Sounds.a , Sounds.a }
+ | A I { Sounds.voyel_ai , Sounds.voyel_ai }
+ | E I { Sounds.e `Opened , Sounds.e `Opened }
+ | I { Sounds.i , Sounds.i }
+ | E { Sounds.e `Opened , Sounds.schwa () }
+ | E_ACUTE E? { Sounds.e `Closed , Sounds.e `Closed }
+ | E_AGRAVE { Sounds.e `Opened , Sounds.e `Opened }
+ | E U { Sounds.eu , Sounds.eu }
+ | O { Sounds.o , Sounds.o }
+ | U { Sounds.voyel_y , Sounds.voyel_y }
+ | OU { Sounds.voyel_u , Sounds.voyel_u }
+ | W A { Sounds.diphtongue Sounds.semi_voyel_w Sounds.a, Sounds.diphtongue Sounds.semi_voyel_w Sounds.a}
+ | W I { Sounds.diphtongue Sounds.semi_voyel_w Sounds.i, Sounds.diphtongue Sounds.semi_voyel_w Sounds.i}
+ | I E { Sounds.diphtongue Sounds.i (Sounds.e `Opened), Sounds.diphtongue Sounds.i (Sounds.e `Opened)}
ending_consonant:
- | B { Some (T.b ) }
+ | B { Some (Sounds.b ) }
| T { None }
- | K { Some (T.k)}
+ | K { Some (Sounds.k)}
| liquid { Some $1 }
| nasal { Some $1 }