fmt
This commit is contained in:
parent
da98682682
commit
8be119b71c
1 changed files with 6 additions and 16 deletions
|
@ -1,7 +1,6 @@
|
||||||
%{ (* -*- tuareg -*- *)
|
%{ (* -*- tuareg -*- *)
|
||||||
|
|
||||||
open HopixAST
|
open HopixAST
|
||||||
(* open Position *)
|
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -16,12 +15,9 @@
|
||||||
%token<char> CHAR
|
%token<char> CHAR
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%start<HopixAST.t> program
|
%start<HopixAST.t> program
|
||||||
|
|
||||||
/* TODO: Résoudre tout les shift/reduce conflits */
|
/* TODO: Résoudre tout les shift/reduce conflits */
|
||||||
|
|
||||||
%left LPAREN
|
%left LPAREN
|
||||||
%left let1
|
%left let1
|
||||||
|
|
||||||
|
@ -38,12 +34,9 @@
|
||||||
%left LBRACE
|
%left LBRACE
|
||||||
%left BACKSLASH
|
%left BACKSLASH
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%left EXCLA COLON
|
%left EXCLA COLON
|
||||||
|
|
||||||
/* priorités binop */
|
/* Priorités binop */
|
||||||
|
|
||||||
%left D_OR
|
%left D_OR
|
||||||
%left D_AND
|
%left D_AND
|
||||||
%left EQUAL_OP INF_EQUAL_OP INF_OP SUP_EQUAL_OP SUP_OP
|
%left EQUAL_OP INF_EQUAL_OP INF_OP SUP_EQUAL_OP SUP_OP
|
||||||
|
@ -334,16 +327,13 @@ expression:
|
||||||
}
|
}
|
||||||
/* Sequence - Séquencement *
|
/* Sequence - Séquencement *
|
||||||
* Pas sûr, voir s'il ne faut pas une troisième couche d'expression */
|
* Pas sûr, voir s'il ne faut pas une troisième couche d'expression */
|
||||||
|
|
||||||
| e=located(simple_expression)
|
| e=located(simple_expression)
|
||||||
SEMICOLON e_list=separated_nonempty_list(SEMICOLON, located(simple_expression)) {
|
SEMICOLON e_list=separated_nonempty_list(SEMICOLON, located(simple_expression)) {
|
||||||
Sequence(e :: e_list)
|
Sequence(e :: e_list)
|
||||||
}
|
}
|
||||||
/*
|
/* | e1=located(expression) SEMICOLON e2=located(expression) {
|
||||||
|e1=located(expression) SEMICOLON e2=located(expression){
|
|
||||||
Sequence([e1; e2])
|
Sequence([e1; e2])
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* Definition locale */
|
/* Definition locale */
|
||||||
| vd=vdefinition SEMICOLON e=located(expression) {
|
| vd=vdefinition SEMICOLON e=located(expression) {
|
||||||
Define(vd, e)
|
Define(vd, e)
|
||||||
|
|
Reference in a new issue