From dfc00778598d6d92851f4a38def4eb8f6cbe58c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Wed, 2 Nov 2011 23:53:20 +0100 Subject: [PATCH] permits to use = instead of returns --- compiler/heptagon/parsing/hept_parser.mly | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/heptagon/parsing/hept_parser.mly b/compiler/heptagon/parsing/hept_parser.mly index d726cd7..12fd71c 100644 --- a/compiler/heptagon/parsing/hept_parser.mly +++ b/compiler/heptagon/parsing/hept_parser.mly @@ -166,9 +166,12 @@ label_ty: IDENT COLON ty_ident { $1, $3 } ; +returns: RETURNS | EQUAL {} +; + node_dec: | n=node_or_fun f=ident pc=node_params LPAREN i=in_params RPAREN - RETURNS LPAREN o=out_params RPAREN + returns LPAREN o=out_params RPAREN c=contract b=block(LET) TEL {{ n_name = f; n_stateful = n; @@ -656,7 +659,7 @@ interface_desc: | type_dec { Itypedef $1 } | const_dec { Iconstdef $1 } | VAL n=node_or_fun f=ident pc=node_params LPAREN i=params_signature RPAREN - RETURNS LPAREN o=params_signature RPAREN + returns LPAREN o=params_signature RPAREN { Isignature({ sig_name = f; sig_inputs = i; sig_stateful = n;