aboutsummaryrefslogtreecommitdiff
path: root/gramlib/plexing.ml
blob: 7b8618fd2002b5def66c5710bb3d960af88402bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(* camlp5r *)
(* plexing.ml,v *)
(* Copyright (c) INRIA 2007-2017 *)

type pattern = string * string

exception Error of string

type location_function = int -> Loc.t
type 'te lexer_func = char Stream.t -> 'te Stream.t * location_function

type 'te lexer =
  { tok_func : 'te lexer_func;
    tok_using : pattern -> unit;
    tok_removing : pattern -> unit;
    mutable tok_match : pattern -> 'te -> string;
    tok_text : pattern -> string;
    mutable tok_comm : Loc.t list option }