summaryrefslogtreecommitdiffstats
path: root/camlp4/ocaml_src/lib/plexer.mli
diff options
context:
space:
mode:
Diffstat (limited to 'camlp4/ocaml_src/lib/plexer.mli')
-rw-r--r--camlp4/ocaml_src/lib/plexer.mli23
1 files changed, 17 insertions, 6 deletions
diff --git a/camlp4/ocaml_src/lib/plexer.mli b/camlp4/ocaml_src/lib/plexer.mli
index 31c5be4d5..d682f83ae 100644
--- a/camlp4/ocaml_src/lib/plexer.mli
+++ b/camlp4/ocaml_src/lib/plexer.mli
@@ -12,10 +12,10 @@
(* This file has been generated by program: do not edit! *)
-(* Module [Plexer]: a lexical analyzer *)
+(** A lexical analyzer. *)
val gmake : unit -> Token.t Token.glexer;;
- (* Some lexer provided. See the module [Token]. The tokens returned
+ (** Some lexer provided. See the module [Token]. The tokens returned
follow the Objective Caml and the Revised syntax lexing rules.
The meaning of the tokens are:
@@ -35,20 +35,31 @@ val gmake : unit -> Token.t Token.glexer;;
same names than the first string (constructor name) of the tokens
expressions above.
+ Warning: the string associated with the constructor [STRING] is
+ the string found in the source without any interpretation. In
+ particular, the backslashes are not interpreted. For example, if
+ the input is ["\n"] the string is *not* a string with one
+ element containing the character "return", but a string of two
+ elements: the backslash and the character ["n"]. To interpret
+ a string use the function [Token.eval_string]. Same thing for
+ the constructor [CHAR]: to get the character, don't get the
+ first character of the string, but use the function
+ [Token.eval_char].
+
The lexer do not use global (mutable) variables: instantiations
of [Plexer.gmake ()] do not perturb each other. *)
val dollar_for_antiquotation : bool ref;;
- (* When True (default), the next call to [Plexer.make ()] returns a
+ (** When True (default), the next call to [Plexer.make ()] returns a
lexer where the dollar sign is used for antiquotations. If False,
the dollar sign can be used as token. *)
val no_quotations : bool ref;;
- (* When True, all lexers built by [Plexer.make ()] do not lex the
+ (** When True, all lexers built by [Plexer.make ()] do not lex the
quotation syntax any more. Default is False (quotations are
lexed). *)
-(*--*)
+(**/**)
-(* deprecated since version 3.04+6; use rather function gmake *)
+(* deprecated since version 3.05; use rather function gmake *)
val make : unit -> Token.lexer;;