Commit 1cac020a authored by POTTIER Francois's avatar POTTIER Francois

Removed [Lr1.may_reduce].

parent d43b14f8
......@@ -938,8 +938,8 @@ let () =
(* For each production, compute where (that is, in which states) this
production can be reduced. This computation is done AFTER default conflict
resolution (see below). It is an error to call any of the accessor
functions before default conflict resolution has taken place. *)
resolution (see below). It is an error to call the accessor function
[production_where] before default conflict resolution has taken place. *)
let production_where : NodeSet.t ProductionMap.t option ref =
ref None
......@@ -975,9 +975,6 @@ let production_where (prod : Production.index) : NodeSet.t =
(* The production [prod] is never reduced. *)
NodeSet.empty
let may_reduce node prod =
NodeSet.mem node (production_where prod)
(* ------------------------------------------------------------------------ *)
(* When requested by the code generator, apply default conflict
resolution to ensure that the automaton is deterministic. *)
......
......@@ -177,15 +177,10 @@ val default_conflict_resolution: unit -> unit
val extra_reductions: unit -> unit
(* ------------------------------------------------------------------------- *)
(* Information about which productions are reduced and where. It is an error
to call one of these functions before default conflict resolution has taken
place. *)
(* Information about which productions are reduced and where. *)
(* [production_where prod] is the set of all states [s] where production
[prod] might be reduced. *)
[prod] might be reduced. It is an error to call this functios before
default conflict resolution has taken place. *)
val production_where: Production.index -> NodeSet.t
(* [may_reduce s prod] tells whether state [s] may reduce production [prod]. *)
val may_reduce: node -> Production.index -> bool
......@@ -194,8 +194,8 @@ module T = struct
next = !stack
}
let may_reduce =
Lr1.may_reduce
let may_reduce node prod =
Lr1.NodeSet.mem node (Lr1.production_where prod)
(* The logging functions that follow are called only if [log] is [true]. *)
......
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