Commit 35b593df authored by POTTIER Francois's avatar POTTIER Francois

Comments.

parent 981e2823
...@@ -53,7 +53,7 @@ module Make ...@@ -53,7 +53,7 @@ module Make
match Lazy.force (stack env) with match Lazy.force (stack env) with
| Nil -> | Nil ->
(* If we get here, then the stack is empty, which means the parser (* If we get here, then the stack is empty, which means the parser
is an initial state. This should not happen. *) is in an initial state. This should not happen. *)
invalid_arg "items_current" (* TEMPORARY it DOES happen! *) invalid_arg "items_current" (* TEMPORARY it DOES happen! *)
| Cons (Element (current, _, _, _), _) -> | Cons (Element (current, _, _, _), _) ->
(* Extract the current state out of the top stack element, and (* Extract the current state out of the top stack element, and
...@@ -154,7 +154,7 @@ module Make ...@@ -154,7 +154,7 @@ module Make
important because the position of the dummy token may end up in important because the position of the dummy token may end up in
the explanations that we produce. *) the explanations that we produce. *)
let investigate pos (result : _ result) = let investigate pos (result : _ result) : explanation list =
weed compare_explanations ( weed compare_explanations (
foreach_terminal_but_error (fun symbol explanations -> foreach_terminal_but_error (fun symbol explanations ->
match symbol with match symbol with
...@@ -227,4 +227,7 @@ module Make ...@@ -227,4 +227,7 @@ module Make
assert (match start with InputNeeded _ -> true | _ -> false); assert (match start with InputNeeded _ -> true | _ -> false);
loop (wrap lexer lexbuf) { checkpoint = start; current = start } loop (wrap lexer lexbuf) { checkpoint = start; current = start }
(* TEMPORARY could also publish a list of the terminal symbols that
do not cause an error *)
end 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