Commit 754eefd7 by POTTIER Francois

Document [equal].

parent f3b9933b
......@@ -2548,6 +2548,22 @@ than or equal to the number of elements in the stack, \verb+None+ is returned.
\verb+get+ is implemented using \verb+pop_many+ and \verb+top+: its time
complexity is $O(i)$.
%% val equal
\begin{verbatim}
val equal: 'a env -> 'a env -> bool
\end{verbatim}
\verb+equal env1 env2+ tells whether the parser configurations \verb+env1+ and
\verb+env2+ are equal in the sense that the automaton's current state is the
same in \verb+env1+ and \verb+env2+ and the stack is \emph{physically} the
same in \verb+env1+ and \verb+env2+. If \verb+equal env1 env2+ is \verb+true+,
then the sequence of the stack elements, as observed via \verb+pop+ and
\verb+top+, must be the same in \verb+env1+ and \verb+env2+. Also, if
\verb+equal env1 env2+ holds, then the checkpoints \verb+input_needed env1+
and \verb+input_needed env2+ must be equivalent. The function \verb+equal+ has
time complexity $O(1)$.
%% val positions
\begin{verbatim}
......
......@@ -293,11 +293,11 @@ module type INCREMENTAL_ENGINE = sig
(* [equal env1 env2] tells whether the parser configurations [env1] and
[env2] are equal in the sense that the automaton's current state is the
same in [env1] and [env2] and the stack is *physically* the same in
[env1] and [env2]. If [equal env1 env2] is [true], then the list of stack
elements, as observed via [pop] and [top], must be the same in [env1] and
[env2]. Also, if [equal env1 env2], then the checkpoints [input_needed
env1] and [input_needed env2] are equivalent. The function [equal] has
time complexity O(1). *)
[env1] and [env2]. If [equal env1 env2] is [true], then the sequence of
the stack elements, as observed via [pop] and [top], must be the same in
[env1] and [env2]. Also, if [equal env1 env2] holds, then the checkpoints
[input_needed env1] and [input_needed env2] must be equivalent. The
function [equal] has time complexity O(1). *)
val equal: 'a env -> 'a env -> bool
......
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