summaryrefslogtreecommitdiff
path: root/stdlib/lexing.mli
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/lexing.mli')
-rw-r--r--stdlib/lexing.mli9
1 files changed, 6 insertions, 3 deletions
diff --git a/stdlib/lexing.mli b/stdlib/lexing.mli
index 6008e127b7..a1a0690169 100644
--- a/stdlib/lexing.mli
+++ b/stdlib/lexing.mli
@@ -26,9 +26,12 @@ type position = {
(** A value of type [position] describes a point in a source file.
[pos_fname] is the file name; [pos_lnum] is the line number;
[pos_bol] is the offset of the beginning of the line (number
- of characters between the beginning of the file and the beginning
+ of characters between the beginning of the lexbuf 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).
+ characters between the beginning of the lexbuf and the position).
+ The difference between [pos_cnum] and [pos_bol] is the character
+ offset within the line (i.e. the column number, assuming each
+ character is one column wide).
See the documentation of type [lexbuf] for information about
how the lexing engine will manage positions.
@@ -149,7 +152,7 @@ val flush_input : lexbuf -> unit
(** {6 } *)
(** The following definitions are used by the generated scanners only.
- They are not intended to be used by user programs. *)
+ They are not intended to be used directly by user programs. *)
val sub_lexeme : lexbuf -> int -> int -> string
val sub_lexeme_opt : lexbuf -> int -> int -> string option