diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-08-31 13:37:19 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-08-31 13:37:19 +0200 |
commit | 843230359b2157212c4e93b51994f0fde90d808b (patch) | |
tree | 1d22d4efb54f0e4c94564b8e8e1960a0a9fda8ef /src/lib/prononciation.mly | |
parent | 6ccbcc2cadae41574e33226b9072a08354880d28 (diff) |
Added endign work in lexer
Diffstat (limited to 'src/lib/prononciation.mly')
-rw-r--r-- | src/lib/prononciation.mly | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/src/lib/prononciation.mly b/src/lib/prononciation.mly index 09124a6..bd97632 100644 --- a/src/lib/prononciation.mly +++ b/src/lib/prononciation.mly @@ -10,9 +10,52 @@ open Tokens %} +%token AUX_ +%token ENT_ +%token IENT_ +%token Sep + +%token A +%token B +%token C +%token D +%token E +%token E_ACUTE +%token E_AGRAVE +%token F +%token G +%token H +%token I +%token J +%token K +%token L +%token M +%token N +%token O +%token OU +%token Q +%token P +%token R +%token S +%token SZ +%token T +%token U +%token V +%token W (* semi voyel w *) +%token X +%token Y (* semi voyel j *) +%token Z +%token Space +%token EOL + +%nonassoc Low +%left R +%right High + %start<Tokens.token list> main %% + voyel: | A { A } | E { E } @@ -85,7 +128,10 @@ letters: | Z { Z :: [] } ending: - | EOL %prec Low { EOL::[] } + | AUX_ { O::S::EOL::[]} + | IENT_ { I::T::EOL::[]} + | ENT_ { E::T::EOL::[]} + | EOL { EOL::[] } main: | append(flatten(letters*), ending) { $1 } |