Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
d153526b
Commit
d153526b
authored
Oct 06, 2015
by
MARCHE Claude
Browse files
fix compilation with latest version of menhir
parent
f1f78313
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/parser/parser.mly
View file @
d153526b
...
...
@@ -10,7 +10,7 @@
(********************************************************************)
%
{
module
Increment
al
=
struct
module
Increment
=
struct
let
stack
=
Stack
.
create
()
let
open_file
inc
=
Stack
.
push
inc
stack
let
close_file
()
=
ignore
(
Stack
.
pop
stack
)
...
...
@@ -224,43 +224,43 @@ end
open_file
:
(* Dummy token. Menhir does not accept epsilon. *)
|
EOF
{
Increment
al
.
open_file
}
|
EOF
{
Increment
.
open_file
}
logic_file
:
|
theory
*
EOF
{
Increment
al
.
close_file
()
}
|
theory
*
EOF
{
Increment
.
close_file
()
}
program_file
:
|
theory_or_module
*
EOF
{
Increment
al
.
close_file
()
}
|
theory_or_module
*
EOF
{
Increment
.
close_file
()
}
theory
:
|
theory_head
theory_decl
*
END
{
Increment
al
.
close_theory
()
}
|
theory_head
theory_decl
*
END
{
Increment
.
close_theory
()
}
theory_or_module
:
|
theory
{
()
}
|
module_head
module_decl
*
END
{
Increment
al
.
close_module
()
}
|
module_head
module_decl
*
END
{
Increment
.
close_module
()
}
theory_head
:
|
THEORY
labels
(
uident
)
{
Increment
al
.
open_theory
$
2
}
|
THEORY
labels
(
uident
)
{
Increment
.
open_theory
$
2
}
module_head
:
|
MODULE
labels
(
uident
)
{
Increment
al
.
open_module
$
2
}
|
MODULE
labels
(
uident
)
{
Increment
.
open_module
$
2
}
theory_decl
:
|
decl
{
Increment
al
.
new_decl
(
floc
$
startpos
$
endpos
)
$
1
}
|
use_clone
{
Increment
al
.
use_clone
(
floc
$
startpos
$
endpos
)
$
1
}
|
decl
{
Increment
.
new_decl
(
floc
$
startpos
$
endpos
)
$
1
}
|
use_clone
{
Increment
.
use_clone
(
floc
$
startpos
$
endpos
)
$
1
}
|
namespace_head
theory_decl
*
END
{
Increment
al
.
close_namespace
(
floc
$
startpos
(
$
1
)
$
endpos
(
$
1
))
$
1
}
{
Increment
.
close_namespace
(
floc
$
startpos
(
$
1
)
$
endpos
(
$
1
))
$
1
}
module_decl
:
|
decl
{
Increment
al
.
new_decl
(
floc
$
startpos
$
endpos
)
$
1
}
|
pdecl
{
Increment
al
.
new_pdecl
(
floc
$
startpos
$
endpos
)
$
1
}
|
use_clone
{
Increment
al
.
use_clone
(
floc
$
startpos
$
endpos
)
$
1
}
|
decl
{
Increment
.
new_decl
(
floc
$
startpos
$
endpos
)
$
1
}
|
pdecl
{
Increment
.
new_pdecl
(
floc
$
startpos
$
endpos
)
$
1
}
|
use_clone
{
Increment
.
use_clone
(
floc
$
startpos
$
endpos
)
$
1
}
|
namespace_head
module_decl
*
END
{
Increment
al
.
close_namespace
(
floc
$
startpos
(
$
1
)
$
endpos
(
$
1
))
$
1
}
{
Increment
.
close_namespace
(
floc
$
startpos
(
$
1
)
$
endpos
(
$
1
))
$
1
}
namespace_head
:
|
NAMESPACE
boption
(
IMPORT
)
uident
{
Increment
al
.
open_namespace
$
3
.
id_str
;
$
2
}
{
Increment
.
open_namespace
$
3
.
id_str
;
$
2
}
(* Use and clone *)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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