summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-09-02 18:32:06 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-09-02 18:32:06 +0200
commit6af889039d232381b13f1f07a694abcfaff2535e (patch)
tree64551164636f4999474c3a746d99607e21568bc2 /src
parent85030705d986696f4ec134f55bb40e3b32c95309 (diff)
Added some tests
Diffstat (limited to 'src')
-rw-r--r--src/lib/lexer.mll1
-rw-r--r--src/lib/prononciation.mly12
-rw-r--r--src/test/test.ml4
3 files changed, 10 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 :: [] }
diff --git a/src/test/test.ml b/src/test/test.ml
index c7f45d5..8c49b5c 100644
--- a/src/test/test.ml
+++ b/src/test/test.ml
@@ -55,6 +55,7 @@ let tests =
; "astiqué", "astike"
; "autruche", "otRyS°"
; "besoin", "b°zw5"
+ ; "bisoux", "bizu(s)"
; "casait", "kazE(t)"
; "cassait", "kasE(t)"
; "célibat", "seLiba(t)"
@@ -64,6 +65,7 @@ let tests =
; "co|incidant", "ko5sid@(t)"
; "croire", "kR[wa]R°"
; "ébrouas", "ebRua(s)"
+ ; "em|magasinais","@magazinE(s)"
; "famille", "famij°"
; "loin", "Lw5"
; "groin", "gR[w5]"
@@ -71,10 +73,12 @@ let tests =
; "joues", "Zu°(s)"
; "libellule", "LibELyL°"
; "main", "m5"
+ ; "ménageais", "menaZE(s)"
; "neige", "nEZ°"
; "pacha", "paSa"
; "péché", "peSe"
; "persai", "pERsE"
+ ; "personne", "pERson°"
; "plan", "pL@"
; "plat", "pLa(t)"
; "platte", "pLat°"