From 21414e6461c85ea20a9cf0d19bb2c5b3e4a989e9 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Fri, 16 Dec 2022 05:54:41 +0100 Subject: [PATCH] Make last equation of a node potentially not ending with a semi column Otherwise the following code: ``` -- count the number of top between two tick node counting (tick:bool; top:bool) returns (o: bool); var v: int; let o = if tick then v else 0 -> pre o + v; v = if top then 1 else 0 tel; ``` was involving the following error: ``` Syntax error at ``` --- src/parser.mly | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parser.mly b/src/parser.mly index 134a77d..f5b92d5 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -276,6 +276,7 @@ equations: | /* empty */ { [] } | equation SEMICOL equations { $1 :: $3 } + | equation OPTIONAL_SEMICOL { [$1] } ; equation: