Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
81
Issues
81
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
847b605d
Commit
847b605d
authored
Jun 27, 2018
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WhyML: admit empty loop bodies (while c do done)
parent
d82e52b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
255 additions
and
249 deletions
+255
-249
src/parser/handcrafted.messages
src/parser/handcrafted.messages
+249
-247
src/parser/parser.mly
src/parser/parser.mly
+6
-2
No files found.
src/parser/handcrafted.messages
View file @
847b605d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/parser/parser.mly
View file @
847b605d
...
...
@@ -916,13 +916,13 @@ single_expr_:
Eoptexn
(
id
,
Ity
.
MaskVisible
,
e
)
|
d
->
d
in
Elabel
(
id
,
over_loop
e
)
}
|
WHILE
seq_expr
DO
loop_annotation
seq_expr
DONE
|
WHILE
seq_expr
DO
loop_annotation
loop_body
DONE
{
let
id_b
=
mk_id
break_id
$
startpos
(
$
3
)
$
endpos
(
$
3
)
in
let
id_c
=
mk_id
continue_id
$
startpos
(
$
3
)
$
endpos
(
$
3
)
in
let
e
=
{
$
5
with
expr_desc
=
Eoptexn
(
id_c
,
Ity
.
MaskVisible
,
$
5
)
}
in
let
e
=
mk_expr
(
Ewhile
(
$
2
,
fst
$
4
,
snd
$
4
,
e
))
$
startpos
$
endpos
in
Eoptexn
(
id_b
,
Ity
.
MaskVisible
,
e
)
}
|
FOR
lident_nq
EQUAL
seq_expr
for_direction
seq_expr
DO
invariant
*
seq_expr
DONE
|
FOR
lident_nq
EQUAL
seq_expr
for_direction
seq_expr
DO
invariant
*
loop_body
DONE
{
let
id_b
=
mk_id
break_id
$
startpos
(
$
7
)
$
endpos
(
$
7
)
in
let
id_c
=
mk_id
continue_id
$
startpos
(
$
7
)
$
endpos
(
$
7
)
in
let
e
=
{
$
9
with
expr_desc
=
Eoptexn
(
id_c
,
Ity
.
MaskVisible
,
$
9
)
}
in
...
...
@@ -1010,6 +1010,10 @@ expr_sub:
|
expr_arg
LEFTSQ
DOTDOT
expr
RIGHTSQ
{
Eidapp
(
below_op
$
startpos
(
$
2
)
$
endpos
(
$
2
)
,
[
$
1
;
$
4
])
}
loop_body
:
|
(* epsilon *)
{
mk_expr
(
Etuple
[]
)
$
startpos
$
endpos
}
|
seq_expr
{
$
1
}
loop_annotation
:
|
(* epsilon *)
{
[]
,
[]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment