From 84e502d7a9fb5a74a45c1fcc669c6b9bb714e2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Wed, 4 Jul 2012 17:26:38 +0200 Subject: [PATCH] Made val optional for functions external val node f is a little bit too long --- compiler/heptagon/parsing/hept_parser.mly | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/heptagon/parsing/hept_parser.mly b/compiler/heptagon/parsing/hept_parser.mly index 85ec42c..8160fee 100644 --- a/compiler/heptagon/parsing/hept_parser.mly +++ b/compiler/heptagon/parsing/hept_parser.mly @@ -702,10 +702,14 @@ extern: | EXTERNAL { true } | /*empty*/ { false } +val_or_empty: + | VAL { () } + | /*empty*/ { () } + interface_desc: | type_dec { Itypedef $1 } | const_dec { Iconstdef $1 } - | e=extern u=unsafe VAL n=node_or_fun f=ident pc=node_params LPAREN i=params_signature RPAREN + | e=extern u=unsafe val_or_empty n=node_or_fun f=ident pc=node_params LPAREN i=params_signature RPAREN returns LPAREN o=params_signature RPAREN { Isignature({ sig_name = f; sig_inputs = i;