summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2006-09-12 10:38:18 +0000
committerDamien Doligez <damien.doligez-inria.fr>2006-09-12 10:38:18 +0000
commitef3f35d7d644d691ca94b260bff72e10c3cf40d2 (patch)
tree4cf74146e412700674f5a1f102b93580351c24f6
parent74f1b4a576c47527b0e298bd0db9dcdea3a644b1 (diff)
amelioration de la doc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7603 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--stdlib/lexing.mli11
1 files changed, 8 insertions, 3 deletions
diff --git a/stdlib/lexing.mli b/stdlib/lexing.mli
index ffa85f796..7bf47ea49 100644
--- a/stdlib/lexing.mli
+++ b/stdlib/lexing.mli
@@ -29,6 +29,9 @@ type position = {
of characters between the beginning of the file and the beginning
of the line); [pos_cnum] is the offset of the position (number of
characters between the beginning of the file and the position).
+
+ See the documentation of type [lexbuf] for information about
+ how the lexing engine will manage positions.
*)
val dummy_pos : position;;
@@ -59,11 +62,13 @@ type lexbuf =
The lexer buffer holds the current state of the scanner, plus
a function to refill the buffer from the input.
- Note that the lexing engine will only manage the [pos_cnum] field
+ Note that the lexing engine will only change the [pos_cnum] field
of [lex_curr_p] by updating it with the number of characters read
- since the start of the [lexbuf]. For the other fields to be
+ since the start of the [lexbuf]. The other fields are copied
+ without change by the lexing engine. In order to keep them
accurate, they must be initialised before the first use of the
- lexbuf, and updated by the lexer actions.
+ lexbuf, and updated by the relevant lexer actions (i.e. at each
+ end of line).
*)
val from_channel : in_channel -> lexbuf