Skip to content

Commit

Permalink
Fix shift/reduce conflict in parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Alasdair committed Sep 4, 2023
1 parent 658460e commit e993261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ exp:
{ mk_exp (E_internal_plet ($2,$4,$6)) $startpos $endpos }
| InternalReturn exp
{ mk_exp (E_internal_return($2)) $startpos $endpos }
| InternalAssume typ In exp
| InternalAssume atomic_typ In exp
{ mk_exp (E_internal_assume($2,$4)) $startpos $endpos }

/* The following implements all nine levels of user-defined precedence for
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pretty_print_sail.ml
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ let rec doc_exp (E_aux (e_aux, (_, uannot)) as exp) =
| E_internal_return exp -> string "internal_return" ^^ parens (doc_exp exp)
| E_app (id, [exp]) when Id.compare (mk_id "pow2") id == 0 ->
separate space [string "2"; string "^"; doc_atomic_exp exp]
| E_internal_assume (nc, exp) -> doc_let_style_general "internal_assume" (doc_nc nc) None exp
| E_internal_assume (nc, exp) -> doc_let_style_general "internal_assume" (parens (doc_nc nc)) None exp
| _ -> doc_atomic_exp exp

and doc_let_style keyword lhs rhs body = doc_let_style_general keyword lhs (Some rhs) body
Expand Down

0 comments on commit e993261

Please sign in to comment.