diff --git a/compiler/heptagon/parsing/hept_parser.mly b/compiler/heptagon/parsing/hept_parser.mly index 043b7e7..9d30eda 100644 --- a/compiler/heptagon/parsing/hept_parser.mly +++ b/compiler/heptagon/parsing/hept_parser.mly @@ -341,10 +341,14 @@ escapes: ; switch_handler: - | constructor loc_vars DO equs + | constructor_or_bool loc_vars DO equs { { w_name = $1; w_block = mk_block $2 $4 } } ; +constructor_or_bool: + | BOOL { Name(if $1 then "true" else "false") } + | constructor { $1 } + switch_handlers: | switch_handler { [$1] }