diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-02 18:32:06 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-02 18:32:06 +0200 |
commit | 6af889039d232381b13f1f07a694abcfaff2535e (patch) | |
tree | 64551164636f4999474c3a746d99607e21568bc2 /src/lib | |
parent | 85030705d986696f4ec134f55bb40e3b32c95309 (diff) |
Added some tests
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/lexer.mll | 1 | ||||
-rw-r--r-- | src/lib/prononciation.mly | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/lexer.mll b/src/lib/lexer.mll index a5cee10..27533cd 100644 --- a/src/lib/lexer.mll +++ b/src/lib/lexer.mll @@ -32,6 +32,7 @@ rule letter = parse | "nn" { N } | 'o' { O } | 'p' { P } +| "ph" { F } | 'q' { Q } | 'r' { R } | 'u' { U } diff --git a/src/lib/prononciation.mly b/src/lib/prononciation.mly index c6c828e..be153cb 100644 --- a/src/lib/prononciation.mly +++ b/src/lib/prononciation.mly @@ -27,8 +27,6 @@ %token C %token D %token<Accent.t> E -%token E_ACUTE -%token E_AGRAVE %token F %token G %token H @@ -61,8 +59,8 @@ %% -voyel: - | A { A } +voyel + : A { A } | E { letter_e $1 } | I { I } | O { O } @@ -72,8 +70,8 @@ voyel: | U { U } -letters: - | voyel { $1 :: [] } +letters + : voyel { $1 :: [] } | Space { Space :: [] } | Sep { Sep :: [] } @@ -91,6 +89,7 @@ letters: | G { G :: [] } | G I { J :: I :: [] } | G E { J :: letter_e $2 :: [] } + | G E voyel { J :: $3 :: [] } | G U { G :: U :: [] } | G U I { G :: I :: [] } | G U E { G :: letter_e $3 :: [] } @@ -112,7 +111,6 @@ letters: | O I N { W :: I :: N :: [] } | P { P :: [] } - | P H { F :: [] } | Q { K :: [] } | Q U { K :: [] } |