Commit b00eac64 by POTTIER Francois

Incremental API: rename [has_default_reduction] to [env_has_default_reduction].

parent 91b6b188
......@@ -27,8 +27,10 @@
* Improved the syntax error message that is displayed when a `.mly` file
is incorrect: the previous and next token are shown.
* Possibly incompatible change in the incremental API: the type `'a env`
becomes parameterized.
* Incompatible change in the incremental API: the type `env` becomes `'a env`.
* Incompatible change in the incremental API: the function
`has_default_reduction` is renamed `env_has_default_reduction`.
* The type `stack` and the function `stack` in the incremental API are
deprecated. The new functions `top` and `pop` can be used instead to
......
......@@ -2529,10 +2529,10 @@ to \verb+main+.
%% val has_default_reduction
\begin{verbatim}
val has_default_reduction: 'a env -> bool
val env_has_default_reduction: 'a env -> bool
\end{verbatim}
The function \verb+has_default_reduction+
The function \verb+env_has_default_reduction+
tells whether the parser is about to perform a default reduction.
In particular, when applied to an environment \verb+env+ taken from a result of
the form \verb+AboutToReduce (env, prod)+, it tells whether the reduction
......
......@@ -741,7 +741,7 @@ module Make (T : TABLE) = struct
(* We can make this a function of states, or a function of environments. For
now, the latter appears simpler. *)
let has_default_reduction env : bool =
let env_has_default_reduction env : bool =
T.default_reduction
env.current
(fun _env _prod -> true)
......
......@@ -312,7 +312,7 @@ module type INCREMENTAL_ENGINE = sig
the form [AboutToReduce (env, prod)], this tells whether the reduction
that is about to take place is a default reduction. *)
val has_default_reduction: 'a env -> bool
val env_has_default_reduction: 'a env -> bool
end
......
......@@ -362,7 +362,7 @@ let check_error_path log nt input =
Furthermore, if a spurious reduction has taken place already,
then this is also a spurious reduction. *)
let spurious =
if looking_at_last_token() && not (E.has_default_reduction env)
if looking_at_last_token() && not (E.env_has_default_reduction env)
|| spurious <> []
then
(current env, prod) :: spurious
......
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