Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
1813aa31
Commit
1813aa31
authored
Jul 13, 2011
by
Guillaume Melquiond
Browse files
Add back support for all integer formats for metas.
parent
46499c01
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/parser/parser.mly
View file @
1813aa31
...
...
@@ -166,6 +166,15 @@ end
let
init
=
{
id
=
"Init"
;
id_lab
=
[]
;
id_loc
=
e
.
expr_loc
}
in
{
e
with
expr_desc
=
Emark
(
init
,
e
)
}
let
small_integer
i
=
try
match
i
with
|
Term
.
IConstDecimal
s
->
int_of_string
s
|
Term
.
IConstHexa
s
->
int_of_string
(
"0x"
^
s
)
|
Term
.
IConstOctal
s
->
int_of_string
(
"0o"
^
s
)
|
Term
.
IConstBinary
s
->
int_of_string
(
"0b"
^
s
)
with
Failure
_
->
raise
Parsing
.
Parse_error
%
}
/*
Tokens
*/
...
...
@@ -381,7 +390,7 @@ meta_arg:
|
PREDICATE
qualid
{
PMAps
$
2
}
|
PROP
qualid
{
PMApr
$
2
}
|
STRING
{
PMAstr
$
1
}
|
INTEGER
{
PMAint
(
match
$
1
with
Term
.
IConstDecimal
s
->
int_of_string
s
)
}
|
INTEGER
{
PMAint
(
small_integer
$
1
)
}
;
/*
Type
declarations
*/
...
...
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