Commit adff59ab authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Update the documentation of [positions].

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