From 843230359b2157212c4e93b51994f0fde90d808b Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 31 Aug 2021 13:37:19 +0200 Subject: Added endign work in lexer --- src/lib/prononciation.mly | 48 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'src/lib/prononciation.mly') 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 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 } -- cgit v1.2.3