Commit 2d5bc9a5 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Published several [compare] functions needed by [Coverage].

parent 7e608c59
......@@ -407,6 +407,9 @@ module Production = struct
type index =
int
let compare =
(-)
(* Create an array of productions. Record which productions are
associated with every nonterminal. A new production S' -> S
is created for every start symbol S. It is known as a
......
......@@ -11,6 +11,10 @@ module Nonterminal : sig
type t
(* Comparison. *)
val compare: t -> t -> int
(* The number of nonterminals. This includes the extra nonterminals
that are internally generated for the grammar's entry points. *)
......@@ -98,6 +102,7 @@ module Terminal : sig
(* Comparison. *)
val equal: t -> t -> bool
val compare: t -> t -> int
(* [lookup] maps an identifier to a terminal, or raises [Not_found]. *)
......@@ -240,6 +245,10 @@ module Production : sig
type index
(* Comparison. *)
val compare: index -> index -> int
(* Productions can be converted to integers and back. This is unsafe
and should be avoided as much as possible. This feature is
exploited, for efficiency, in the encoding of items. *)
......
Supports Markdown
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