Commit ff364c74 authored by POTTIER Francois's avatar POTTIER Francois

Add an argument of type [EngineTypes.TABLE] to the functor

[InspectionTableInterpreter.Make]. This should make it easier
to add new functionality to this functor (which constructs the
inspection API).
parent 38fa4a52
......@@ -44,6 +44,7 @@ module Make
(TT : TableFormat.TABLES)
(IT : InspectionTableFormat.TABLES
with type 'a lr1state = int)
(ET : EngineTypes.TABLE)
= struct
(* Including [IT] is an easy way of inheriting the definitions of the types
......
......@@ -34,10 +34,10 @@ module Make
(B : TableFormat.TABLES)
(T : InspectionTableFormat.TABLES
with type 'a lr1state = int)
(ET : EngineTypes.TABLE)
: IncrementalEngine.INSPECTION
with type 'a terminal := 'a T.terminal
and type 'a nonterminal := 'a T.nonterminal
and type 'a lr1state := 'a T.lr1state
and type production := int
......@@ -1066,10 +1066,13 @@ let program =
SIInclude (MVar symbols) ::
(* Apply the functor [InspectionTableInterpreter.Make], which expects
three arguments. *)
SIInclude (mapp (MVar make_inspection) [
(* Argument 1, of type [TableFormat.TABLES]. *)
MVar tables;
(* Argument 2, of type [InspectionTableFormat.TABLES]. *)
MStruct (
(* This module must satisfy [InspectionTableFormat.TABLES]. *)
(* [lr1state] *)
SIInclude (MVar ti) ::
(* [terminal], [nonterminal]. *)
......@@ -1091,6 +1094,8 @@ let program =
) ::
[]
);
(* Argument 3, of type [EngineTypes.TABLE]. *)
MVar et;
]) ::
[]
......
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