Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Why3
why3
Commits
64ccfa7d
Commit
64ccfa7d
authored
Feb 27, 2011
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dot-syntax for application
parent
d51304ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
src/parser/parser.pre.mly
src/parser/parser.pre.mly
+23
-2
tests/test-jcf.why
tests/test-jcf.why
+4
-2
No files found.
src/parser/parser.pre.mly
View file @
64ccfa7d
...
...
@@ -598,6 +598,24 @@ lexpr_arg:
{
mk_pp
PPtrue
}
|
FALSE
{
mk_pp
PPfalse
}
|
OPPREF
lexpr_arg
{
mk_pp
(
PPapp
(
Qident
(
mk_id
(
prefix
$
1
)
(
loc_i
2
))
,
[
$
2
]))
}
|
lexpr_sub
{
$
1
}
;
lexpr_dot
:
|
lqualid_rich
{
mk_pp
(
PPvar
$
1
)
}
|
OPPREF
lexpr_dot
{
mk_pp
(
PPapp
(
Qident
(
mk_id
(
prefix
$
1
)
(
loc_i
2
))
,
[
$
2
]))
}
|
lexpr_sub
{
$
1
}
;
lexpr_sub
:
|
lexpr_dot
DOT
lqualid
{
mk_pp
(
PPapp
(
$
3
,
[
$
1
]))
}
|
LEFTPAR
lexpr
RIGHTPAR
{
$
2
}
|
LEFTPAR
RIGHTPAR
...
...
@@ -606,8 +624,6 @@ lexpr_arg:
{
mk_pp
(
PPtuple
(
$
2
::
$
4
))
}
|
LEFTREC
list1_field_value
opt_semicolon
RIGHTREC
{
mk_pp
(
PPrecord
(
List
.
rev
$
2
))
}
|
OPPREF
lexpr_arg
{
mk_pp
(
PPapp
(
Qident
(
mk_id
(
prefix
$
1
)
(
loc_i
2
))
,
[
$
2
]))
}
|
lexpr_arg
LEFTSQ
lexpr
RIGHTSQ
{
mk_pp
(
PPapp
(
Qident
(
mk_id
(
misfix
"[]"
)
(
loc
()
))
,
[
$
1
;
$
3
]))
}
|
lexpr_arg
LEFTSQ
lexpr
OP1
lexpr
RIGHTSQ
...
...
@@ -834,6 +850,11 @@ tqualid:
|
any_qualid
DOT
uident
{
Qdot
(
$
1
,
$
3
)
}
;
lqualid_rich
:
|
lident_rich
{
Qident
$
1
}
|
uqualid
DOT
lident_rich
{
Qdot
(
$
1
,
$
3
)
}
;
qualid
:
|
ident_rich
{
Qident
$
1
}
|
uqualid
DOT
ident_rich
{
Qdot
(
$
1
,
$
3
)
}
...
...
tests/test-jcf.why
View file @
64ccfa7d
...
...
@@ -7,9 +7,11 @@ theory Records
use import bool.Bool
use import int.Int
type t 'a 'b = {| a : 'a; b : list 'b; |}
namespace import R
type t 'a 'b = {| a : 'a; b : list 'b; |}
end
goal g1 : let t = {| b = Cons True Nil; a = 1;
|} in
a t
= 1
goal g1 : let t = {| b = Cons True Nil; a = 1; |} in
t.R.a
= 1
end
...
...
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