Commit adff59ab by POTTIER Francois

Update the documentation of [positions].

parent b532ecbd
* Ongoing work on positions.
- remove the function [positions] in the incremental API? or update its doc.
- on peut offrir un $symbolstartpos(i) qui calcule de la même
manière que Parsing.symbol_start_pos.
- tester que $startpos(i) est conforme à rhs_start_pos(i),
......
......@@ -2247,9 +2247,9 @@ constant time.
\end{verbatim}
The function \verb+positions+ returns the start and end positions of the
current lookahead token. It is legal to invoke this function only after at
least one token has been offered to the parser via \verb+offer+. In other
words, it is illegal to invoke it in an initial state.
current lookahead token. If invoked in an initial state, this function returns
a pair of twice the initial position that was passed as an argument
to \verb+main+.
%% val has_default_reduction
......
......@@ -696,7 +696,6 @@ module Make (T : TABLE) = struct
let positions { triple = (_, startp, endp); _ } =
startp, endp
(* TEMPORARY remove this function? *)
(* --------------------------------------------------------------------------- *)
......
......@@ -189,10 +189,9 @@ module type INCREMENTAL_ENGINE = sig
val stack: env -> stack
(* These are the start and end positions of the current lookahead token. It
is legal to invoke this function only after at least one token has been
offered to the parser via [offer]. In other words, it is illegal to
invoke it in an initial state. *)
(* These are the start and end positions of the current lookahead token. If
invoked in an initial state, this function returns a pair of twice the
initial position. *)
val positions: env -> Lexing.position * Lexing.position
......
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