sig
  type lexbuf = {
    refill_buff : Lexing.lexbuf -> unit;
    mutable lex_buffer : string;
    mutable lex_buffer_len : int;
    mutable lex_abs_pos : int;
    mutable lex_start_pos : int;
    mutable lex_curr_pos : int;
    mutable lex_last_pos : int;
    mutable lex_last_action : int;
    mutable lex_eof_reached : bool;
  } 
  val from_channel : Pervasives.in_channel -> Lexing.lexbuf
  val from_string : string -> Lexing.lexbuf
  val from_function : (buf:string -> len:int -> int) -> Lexing.lexbuf
  val lexeme : Lexing.lexbuf -> string
  val lexeme_char : Lexing.lexbuf -> int -> char
  val lexeme_start : Lexing.lexbuf -> int
  val lexeme_end : Lexing.lexbuf -> int
  type lex_tables = {
    lex_base : string;
    lex_backtrk : string;
    lex_default : string;
    lex_trans : string;
    lex_check : string;
  } 
  external engine : Lexing.lex_tables -> int -> Lexing.lexbuf -> int
    = "lex_engine"
end