From a0383dbf1375f408d0ce5b616fcc0014984e5ee3 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Fri, 16 Dec 2022 05:57:25 +0100 Subject: [PATCH] Make last equation of a node potentially not ending with a semi column be correctly parsed 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: