%{ (** This module transform the words into a semi-prononciation elements. The letters should be quite close with the associate phonem, but some modification can occur. *) open Tokens %} %start main %% initial_voyel: | A { A } | E { E } | I { I } | O { O } | U { U } | E_ACUTE { E_ACUTE } voyel: | initial_voyel { $1 } letters: | { [] } | letters voyel { $2 :: $1 } | letters Space { Space :: $1 } | letters Sep { Sep :: $1 } | letters B { B :: $1 } | letters C %prec Low { K :: $1 } | letters C H { X :: $1 } | letters C I { I :: S :: $1 } | letters C E { E :: S :: $1 } | letters C U I { I :: K :: $1 } | letters C U E { E :: K :: $1 } | letters D { D :: $1 } | letters F { F :: $1 } | letters G %prec Low { G :: $1 } | letters G I { I :: J :: $1 } | letters G E { E :: J :: $1 } | letters G U I { I :: G :: $1 } | letters G U E { E :: G :: $1 } | letters J { J :: $1 } | letters K { K :: $1 } | letters L { L :: $1 } | letters M { M :: $1 } | letters N { N :: $1 } | letters P { P :: $1 } | letters P H { F :: $1 } | letters Q U { K :: $1 } | letters R { R :: $1 } | letters S S { S :: $1 } | letters S { SZ :: $1 } | letters T { T :: $1 } | letters V { V :: $1 } | letters W { V :: $1 } | letters X { S :: K :: $1 } | letters Y { I :: $1 } | letters Z { Z :: $1 } main: letters EOL { EOL::$1 }