aboutsummaryrefslogtreecommitdiff
path: root/gramlib/plexing.mli
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2018-11-06 13:14:57 +0100
committerEmilio Jesus Gallego Arias2018-11-06 13:14:57 +0100
commited9c869d5fbc860e6525b2d8a5259a4d4b778180 (patch)
tree5d831c27de277882569d59d79bd271384489052e /gramlib/plexing.mli
parent1aa71f100ddd5e3651a7d6e4adf0ebba5ae5fdee (diff)
parent909c215de105cc5965398656348d5486d57c1b87 (diff)
Merge PR #8915: More cleanup of vendored camlp5
Diffstat (limited to 'gramlib/plexing.mli')
-rw-r--r--gramlib/plexing.mli71
1 files changed, 0 insertions, 71 deletions
diff --git a/gramlib/plexing.mli b/gramlib/plexing.mli
index 6b5f718bc3..96b432a8ad 100644
--- a/gramlib/plexing.mli
+++ b/gramlib/plexing.mli
@@ -35,74 +35,3 @@ and 'te lexer_func = char Stream.t -> 'te Stream.t * location_function
and location_function = int -> Ploc.t
(** The type of a function giving the location of a token in the
source from the token number in the stream (starting from zero). *)
-
-val lexer_text : pattern -> string
- (** A simple [tok_text] function. *)
-
-val default_match : pattern -> string * string -> string
- (** A simple [tok_match] function, appling to the token type
- [(string * string)] *)
-
-(** Lexers from parsers or ocamllex
-
- The functions below create lexer functions either from a [char stream]
- parser or for an [ocamllex] function. With the returned function [f],
- it is possible to get a simple lexer (of the type [Plexing.glexer] above):
- {[
- { Plexing.tok_func = f;
- Plexing.tok_using = (fun _ -> ());
- Plexing.tok_removing = (fun _ -> ());
- Plexing.tok_match = Plexing.default_match;
- Plexing.tok_text = Plexing.lexer_text;
- Plexing.tok_comm = None }
- ]}
- Note that a better [tok_using] function should check the used tokens
- and raise [Plexing.Error] for incorrect ones. The other functions
- [tok_removing], [tok_match] and [tok_text] may have other implementations
- as well. *)
-
-val lexer_func_of_parser :
- (char Stream.t * int ref * int ref -> 'te * Ploc.t) -> 'te lexer_func
- (** A lexer function from a lexer written as a char stream parser
- returning the next token and its location. The two references
- with the char stream contain the current line number and the
- position of the beginning of the current line. *)
-val lexer_func_of_ocamllex : (Lexing.lexbuf -> 'te) -> 'te lexer_func
- (** A lexer function from a lexer created by [ocamllex] *)
-
-(** Function to build a stream and a location function *)
-
-val make_stream_and_location :
- (unit -> 'te * Ploc.t) -> 'te Stream.t * location_function
- (** General function *)
-
-(** Useful functions and values *)
-
-val eval_char : string -> char
-val eval_string : Ploc.t -> string -> string
- (** Convert a char or a string token, where the backslashes had not
- been interpreted into a real char or string; raise [Failure] if
- bad backslash sequence found; [Plexing.eval_char (Char.escaped c)]
- would return [c] and [Plexing.eval_string (String.escaped s)] would
- return [s] *)
-
-val restore_lexing_info : (int * int) option ref
-val input_file : string ref
-val line_nb : int ref ref
-val bol_pos : int ref ref
- (** Special variables used to reinitialize line numbers and position
- of beginning of line with their correct current values when a parser
- is called several times with the same character stream. Necessary
- for directives (e.g. #load or #use) which interrupt the parsing.
- Without usage of these variables, locations after the directives
- can be wrong. *)
-
-(** The lexing buffer used by streams lexers *)
-
-module Lexbuf :
- sig
- type t
- val empty : t
- val add : char -> t -> t
- val get : t -> string
- end