From 397dade94691b09c6c12cbb0120883ea7f8ac548 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 24 Oct 2023 21:58:58 +0200 Subject: [PATCH] fmt --- flap/src/hopix/hopixParser.mly | 47 ++++++++++++++-------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/flap/src/hopix/hopixParser.mly b/flap/src/hopix/hopixParser.mly index 819edec..2d35785 100644 --- a/flap/src/hopix/hopixParser.mly +++ b/flap/src/hopix/hopixParser.mly @@ -22,18 +22,18 @@ %left let1 -%left FUN +/* %left FUN */ %left STRING -%left INT CID CHAR WHILE +%left INT CID CHAR /* WHILE */ %left ID -%right REF DO -%left LET MATCH IF FOR +/* %right REF DO */ +/* %left LET MATCH IF FOR */ %right ARROW %right SEMICOLON %left DOT %left ASSIGN %left LBRACE -%left BACKSLASH +/* %left BACKSLASH */ %left EXCLA COLON @@ -44,7 +44,7 @@ %left PLUS MINUS %left SLASH STAR -%left ref1 +/* %left ref1 */ %left fun1 %left app1 @@ -291,11 +291,9 @@ simple_expression: TypeAnnotation(e, t) } /* Tagged Value - Construction d'une donnée */ -/* -| const=located(constructor) tl=option(type_list) el=optionlist(expr_list) { +/* | const=located(constructor) tl=option(type_list) el=optionlist(expr_list) { Tagged(const, tl, el) - } - */ + } */ /* Tuple n = 0 - Construction d'un 0-uplet */ | LPAREN RPAREN { @@ -315,7 +313,7 @@ simple_expression: } /* Lecture de variable * !expr */ -| EXCLA e=located(simple_expression){ +| EXCLA e=located(simple_expression) { Read(e) } @@ -357,18 +355,15 @@ expression: e } /* Field - Projection d’un champ */ -/* -| e=located(expression) DOT l=located(label_identifier) tl=option(type_list) { +/* | e=located(expression) DOT l=located(label_identifier) tl=option(type_list) { Field(e, l, tl) - } + } */ /* Sequence - Séquencement * * Pas sûr, voir s'il ne faut pas une troisième couche d'expression */ - - /* -| e=located(mid_expression) +/* | e=located(mid_expression) SEMICOLON e_list=separated_nonempty_list(SEMICOLON, located(mid_expression)) { Sequence(e :: e_list) - }*/ + } */ | e=located(expression) SEMICOLON e2=located(expression){ Sequence([e;e2]) @@ -385,10 +380,9 @@ expression: Fun(FunctionDefinition(p, e)) } /* Application */ -/* -| e1=located(expression) e2=located(expression) %prec app1 { +/* | e1=located(expression) e2=located(expression) %prec app1 { Apply(e1, e2) - } + } */ /* Operateurs binaires - Application infixe */ | e1=located(expression) b=binop e2=located(expression) { @@ -466,17 +460,14 @@ expression: } /* Parenthésage * Pas sûr mais je vois pas sinon */ - - /* -| LPAREN e=expression RPAREN { +/* | LPAREN e=expression RPAREN { e - }*/ + } */ /* Annotation de type * (e : ty) */ - /* -| LPAREN e=located(expression) COLON t=located(ty) RPAREN { +/* | LPAREN e=located(expression) COLON t=located(ty) RPAREN { TypeAnnotation(e, t) - } + } */ /******************************** BASIC TYPES *********************************/