Commit 2da1a416 authored by POTTIER Francois's avatar POTTIER Francois

Name the output signature of [Lr1construction.Run].

parent 6c296588
Pipeline #96420 passed with stages
in 25 seconds
(******************************************************************************)
(* *)
(* Menhir *)
(* *)
(* François Pottier, Inria Paris *)
(* Yann Régis-Gianas, PPS, Université Paris Diderot *)
(* *)
(* Copyright Inria. All rights reserved. This file is distributed under the *)
(* terms of the GNU General Public License version 2, as described in the *)
(* file LICENSE. *)
(* *)
(******************************************************************************)
open Grammar
(* The output signature of several LR(1) automaton construction algorithms. *)
module type LR1_AUTOMATON = sig
(* An abstract type of nodes, that is, states in the LR(1) automaton. *)
type node
(* The number of nodes. *)
val n: int
(* Nodes are numbered from 0 to [n-1]. *)
val number: node -> int
val node: int -> node
(* To each start production corresponds an entry node. *)
val entry : node ProductionMap.t
(* Each node carries outgoing transitions towards other nodes. *)
val transitions: node -> node SymbolMap.t
(* Each node represents an LR(1) state, that is, a set of LR(1) items. *)
val state: node -> Lr0.lr1state
end
...@@ -19,33 +19,6 @@ ...@@ -19,33 +19,6 @@
in order to resolve conflicts. As a result, every node is reachable from in order to resolve conflicts. As a result, every node is reachable from
some entry node. *) some entry node. *)
open Grammar open LR1Sigs
module Run () : sig module Run () : LR1_AUTOMATON
(* An abstract type of nodes, that is, states in the LR(1) automaton. *)
type node
(* The number of nodes. *)
val n: int
(* Nodes are numbered from 0 to [n-1]. *)
val number: node -> int
val node: int -> node
(* Each node represents an LR(1) state, that is, a set of LR(1) items. *)
val state: node -> Lr0.lr1state
(* To each start production corresponds an entry node. *)
val entry : node ProductionMap.t
(* Each node carries outgoing transitions towards other nodes. *)
val transitions: node -> node SymbolMap.t
end
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