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
POTTIER Francois
menhir
Commits
65dbcd3e
Commit
65dbcd3e
authored
Jul 07, 2015
by
POTTIER Francois
Browse files
Modified [EngineTypes] and [Engine] to clarify the role of the flag [log].
parent
ab0a7cf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/engine.ml
View file @
65dbcd3e
...
...
@@ -275,7 +275,8 @@ module Make (T : TABLE) = struct
(* Here, the lookahead token CAN be [error]. *)
and
initiate
env
=
Log
.
initiating_error_handling
()
;
if
log
then
Log
.
initiating_error_handling
()
;
let
env
=
{
env
with
error
=
true
}
in
HandlingError
env
...
...
@@ -304,14 +305,16 @@ module Make (T : TABLE) = struct
(* This state is capable of shifting the [error] token. *)
Log
.
handling_error
env
.
current
;
if
log
then
Log
.
handling_error
env
.
current
;
shift
env
please_discard
terminal
value
s'
and
error_reduce
env
prod
=
(* This state is capable of performing a reduction on [error]. *)
Log
.
handling_error
env
.
current
;
if
log
then
Log
.
handling_error
env
.
current
;
reduce
env
prod
(* Intentionally calling [reduce] instead of [announce_reduce].
It does not seem very useful, and it could be confusing, to
...
...
src/engineTypes.ml
View file @
65dbcd3e
...
...
@@ -228,10 +228,8 @@ module type TABLE = sig
(* The comments below indicate the conventional messages that correspond
to these hooks in the code-based back-end; see [CodeBackend]. *)
(* If the flag [log] is false, then the logging functions are guaranteed
to do nothing, so it is not necessary to call them. If [log] is true,
the logging functions may or may not have an effect. This flag is
logically superfluous, but saves time in the table-based back-end. *)
(* If the flag [log] is false, then the logging functions are not called.
If it is [true], then they are called. *)
val
log
:
bool
...
...
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