Commit 48f613df authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Fix an incorrect comment.

parent 074c6643
...@@ -86,8 +86,7 @@ module type INCREMENTAL_ENGINE = sig ...@@ -86,8 +86,7 @@ module type INCREMENTAL_ENGINE = sig
(* [loop supplier checkpoint] begins parsing from [checkpoint], reading (* [loop supplier checkpoint] begins parsing from [checkpoint], reading
tokens from [supplier]. It continues parsing until it reaches a tokens from [supplier]. It continues parsing until it reaches a
checkpoint of the form [Accepted v] or [Rejected]. In the former case, it checkpoint of the form [Accepted v] or [Rejected]. In the former case, it
returns [v]. In the latter case, it raises [Error]. This is how the returns [v]. In the latter case, it raises the exception [Error]. *)
monolithic API is implemented on top of the incremental API. *)
val loop: supplier -> 'a checkpoint -> 'a val loop: supplier -> 'a checkpoint -> 'a
...@@ -95,13 +94,13 @@ module type INCREMENTAL_ENGINE = sig ...@@ -95,13 +94,13 @@ module type INCREMENTAL_ENGINE = sig
[checkpoint], reading tokens from [supplier]. It continues parsing until [checkpoint], reading tokens from [supplier]. It continues parsing until
it reaches a checkpoint of the form [Accepted v] or [HandlingError env] it reaches a checkpoint of the form [Accepted v] or [HandlingError env]
(or [Rejected], but that should not happen, as [HandlingError _] will be (or [Rejected], but that should not happen, as [HandlingError _] will be
observed first). In the former case, it returns [v]. In the latter case, observed first). In the former case, it calls [succeed v]. In the latter
it calls [fail] with this checkpoint. It cannot raise [Error]. case, it calls [fail] with this checkpoint. It cannot raise [Error].
This means that Menhir's traditional error-handling procedure (which pops This means that Menhir's traditional error-handling procedure (which pops
the stack until a state that can act on the [error] token is found) does the stack until a state that can act on the [error] token is found) does
not get a chance to run. Instead, the user can implement her own error not get a chance to run. Instead, the user can implement her own error
handling code, in the [fail] function. *) handling code, in the [fail] continuation. *)
val loop_handle: val loop_handle:
('a -> 'answer) -> ('a -> 'answer) ->
......
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