X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/1059e1cc0c2ecfa237406949aa26155b6a5b9154..66f23d4fabf89ad09adbd4dfc15ac6b5b2b7da83:/interpretor/parser.mly diff --git a/interpretor/parser.mly b/interpretor/parser.mly deleted file mode 100644 index 9e9b151..0000000 --- a/interpretor/parser.mly +++ /dev/null @@ -1,26 +0,0 @@ -%{ - open Types -%} - -%token CONST -%token IDENT -%token LPAR RPAR SEQ SPLIT MERGE PAR REC EOF POINT -%right SPLIT MERGE -%right SEQ -%right PAR -%left REC -%left POINT -%start main -%type main -%% -main: faust_exp EOF { $1 }; -faust_exp: CONST { Const(N (int_of_string $1)) } - | CONST POINT { Const(R (float_of_string $1)) } - | CONST POINT CONST { Const(R (float_of_string ($1 ^ "." ^ $3))) } - | IDENT { Ident($1) } - | LPAR faust_exp RPAR { $2 } - | faust_exp PAR faust_exp { Par($1,$3) } - | faust_exp SPLIT faust_exp { Split($1,$3) } - | faust_exp MERGE faust_exp { Merge($1,$3) } - | faust_exp SEQ faust_exp { Seq($1,$3) } - | faust_exp REC faust_exp { Rec($1,$3) };