Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
6563739a
Commit
6563739a
authored
Apr 05, 2017
by
POTTIER Francois
Browse files
Merge branch 'master' of gitlab.inria.fr:fpottier/menhir
parents
e518bc58
69511635
Changes
4
Hide whitespace changes
Inline
Side-by-side
TODO
View file @
6563739a
...
...
@@ -27,6 +27,13 @@
- Change of LICENSE. Clarify the status of test/.
- Send CompCert pull request.
* The table back-end should not use Invariant.prodstack,
and should produce code for all semantic actions, regardless
of whether they are ever reduced.
* The table back-end should not use Invariant at all?
And we should be able to save time by not running Invariant.
* Move more of ErrorReports from CompCert to MenhirLib.
In [show], might want to apply [shorten] to the output of [f].
...
...
src/Engine.ml
View file @
6563739a
...
...
@@ -714,6 +714,12 @@ module Make (T : TABLE) = struct
current states via their numbers (this seems cleaner than using OCaml's
polymorphic equality). *)
(* The two fields that are not compared by [equal], namely [error] and
[triple], are overwritten by the function [discard], which handles
[InputNeeded] checkpoints. Thus, if [equal env1 env2] holds, then the
checkpoints [input_needed env1] and [input_needed env2] are
equivalent: they lead the parser to behave in the same way. *)
let
equal
env1
env2
=
env1
.
stack
==
env2
.
stack
&&
number
env1
.
current
=
number
env2
.
current
...
...
src/IncrementalEngine.ml
View file @
6563739a
...
...
@@ -290,11 +290,13 @@ module type INCREMENTAL_ENGINE = sig
val
current_state_number
:
'
a
env
->
int
(* [equal env1 env2] tells whether the parser configurations [env1] and
[env2] are equal in the sense that the automaton's current state is
the same in [env1] and [env2] and the stack is *physically* the same
in [env1] and [env2]. If [equal env1 env2] is [true], then the list
of stack elements, as observed via [pop] and [top], must be the same
in [env1] and [env2]. The function [equal] has time complexity O(1). *)
[env2] are equal in the sense that the automaton's current state is the
same in [env1] and [env2] and the stack is *physically* the same in
[env1] and [env2]. If [equal env1 env2] is [true], then the list of stack
elements, as observed via [pop] and [top], must be the same in [env1] and
[env2]. Also, if [equal env1 env2], then the checkpoints [input_needed
env1] and [input_needed env2] are equivalent. The function [equal] has
time complexity O(1). *)
val
equal
:
'
a
env
->
'
a
env
->
bool
...
...
src/tableBackend.ml
View file @
6563739a
...
...
@@ -143,7 +143,7 @@ let define_and_measure (x, e) =
(* Code generation for semantic actions. *)
(* The functions [reducecellparams] and [reducebody] are ad
p
ated from
(* The functions [reducecellparams] and [reducebody] are ada
p
ted from
[CodeBackend]. *)
(* Things are slightly more regular here than in the code-based
...
...
Write
Preview
Supports
Markdown
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