Skip to content

Commit

Permalink
#661 more error catchs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme FERET committed May 10, 2023
1 parent ce4ba60 commit d512a87
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/grammar/kparser4.mly
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,12 @@ idin:
| ID annot LAR error
{ raise (ExceptionDefn.Syntax_Error
(add_pos 3 "Malformed intervention instruction, I was \
expecting 'ID <- alg_expression'")) };
expecting 'ID <- alg_expression'")) }
| ID error
{ raise (ExceptionDefn.Syntax_Error
(add_pos 2 "Malformed intervention instruction, I was \
expecting 'ID <- alg_expression'")) };
;

effect_or_idin:
| effect {$1}
Expand Down Expand Up @@ -683,7 +688,7 @@ perturbation_declaration:
| perturbation_alarm DO annot effect_list perturbation_post
{ let (e,_,_) = $4 in let (post,_,_) = $5 in ($1,None,e,post) }

| perturbation_alarm bool_expr DO annot partial_effect_list_at_least_one_idin perturbation_post_closed
| perturbation_alarm bool_expr DO annot partial_effect_list_at_least_one_idin perturbation_post_closed
{ let (pre,_,_) = $2 in
let (e,_,_) = $5 in
let (post,_,_) = $6 in
Expand Down

0 comments on commit d512a87

Please sign in to comment.