Commit 65dbcd3e authored by POTTIER Francois's avatar POTTIER Francois

Modified [EngineTypes] and [Engine] to clarify the role of the flag [log].

parent ab0a7cf5
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment