summaryrefslogtreecommitdiff
path: root/frontend/parser.mly
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ansys.com>2014-06-11 17:49:07 +0200
committerAlex Auvolat <alex.auvolat@ansys.com>2014-06-11 17:49:07 +0200
commitc8e565c22e149e70ae45cbe5b9afda5dd5685f43 (patch)
tree9c6d40dd23c27f1b7b6cd3cdc86abfbe80832e4d /frontend/parser.mly
parentaefe04b278d37c5f1248ef631eeb08dbbb4da653 (diff)
downloadscade-analyzer-c8e565c22e149e70ae45cbe5b9afda5dd5685f43.tar.gz
scade-analyzer-c8e565c22e149e70ae45cbe5b9afda5dd5685f43.zip
Parse type groups.
Diffstat (limited to 'frontend/parser.mly')
-rw-r--r--frontend/parser.mly10
1 files changed, 6 insertions, 4 deletions
diff --git a/frontend/parser.mly b/frontend/parser.mly
index 2c1ac25..51974d1 100644
--- a/frontend/parser.mly
+++ b/frontend/parser.mly
@@ -104,14 +104,16 @@ expr:
(* Equations (can be asserts, automata, ...) *)
eqn:
-| i=ext(IDENT) EQUAL e=ext(expr) { AST_assign(i, e) }
+| i=separated_list(COMMA, ext(IDENT)) EQUAL e=ext(expr)
+ { AST_assign(i, e) }
| ASSUME i=ext(IDENT) COLON e=ext(expr) { AST_assume(i, e) }
| GUARANTEE i=ext(IDENT) COLON e=ext(expr) { AST_guarantee(i, e) }
typ:
-| INT { AST_TINT }
-| BOOL { AST_TBOOL }
-| REAL { AST_TREAL }
+| INT { AST_TINT }
+| BOOL { AST_TBOOL }
+| REAL { AST_TREAL }
+| LPAREN l=separated_list(COMMA, typ) RPAREN { AST_TGROUP(l) }
(* Declarations *)
dbody: