Commit 041eb8e1 authored by POTTIER Francois's avatar POTTIER Francois

Add a fourth argument to [InspectionTableInterpreter.Make].

The fourth argument is the engine; for now, reduced to just the type [env].
This will allow us to describe the type of [feed].
parent 66cc0860
......@@ -48,6 +48,7 @@ module Make
with type terminal = int
and type nonterminal = int
and type semantic_value = Obj.t)
(E : sig type env = (ET.state, ET.semantic_value, ET.token) EngineTypes.env end)
= struct
(* Including [IT] is an easy way of inheriting the definitions of the types
......@@ -227,7 +228,7 @@ module Make
open EngineTypes
let _feed_nonterminal nt startp semv endp env =
let _feed_nonterminal nt startp semv endp (env : E.env) =
let source : ET.state = env.current in
match ET.maybe_goto_nt source nt with
| None ->
......
......@@ -38,6 +38,7 @@ module Make
with type terminal = int
and type nonterminal = int
and type semantic_value = Obj.t)
(E : sig type env = (ET.state, ET.semantic_value, ET.token) EngineTypes.env end)
: IncrementalEngine.INSPECTION
with type 'a terminal := 'a IT.terminal
......
......@@ -1067,7 +1067,7 @@ let program =
SIInclude (MVar symbols) ::
(* Apply the functor [InspectionTableInterpreter.Make], which expects
three arguments. *)
four arguments. *)
SIInclude (mapp (MVar make_inspection) [
(* Argument 1, of type [TableFormat.TABLES]. *)
MVar tables;
......@@ -1096,6 +1096,8 @@ let program =
);
(* Argument 3, of type [EngineTypes.TABLE]. *)
MVar et;
(* Argument 4, of type [EngineTypes.ENGINE with ...]. *)
MVar ti;
]) ::
[]
......
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