sig
  exception Duplicate_macro of string
  class comment_control :
    object
      val mutable nesting_level : int
      val mutable text : string
      method append : string -> unit
      method decr : unit
      method get_comment : string
      method get_nesting_level : int
      method incr : unit
      method set_text : string -> unit
    end
  type condition_t =
      [ `Processing | `Skip_to_else | `Skip_to_endif | `Subscan ]
  type location = {
    mutable buf_pos : int;
    mutable last_buf_pos : int;
    mutable line_no : int;
    mutable original_line_no : int;
  }
  class file_control :
    string ->
    string ->
    string list ->
    object
      val mutable condition : Flx_lexstate.condition_t list
      val filename : string
      val mutable loc : Flx_lexstate.location
      val macros : (string, string list * Flx_parse.token list) Hashtbl.t
      method condition_stack_length : int
      method get_absolute : string -> string
      method get_buf_pos : int
      method get_condition : Flx_lexstate.condition_t
      method get_incdirs : string list
      method get_loc : Flx_lexstate.location
      method get_macro :
        string -> (string list * Flx_parse.token list) option
      method get_macros :
        (string, string list * Flx_parse.token list) Hashtbl.t
      method get_physical_srcref : Lexing.lexbuf -> Flx_ast.srcref
      method get_relative : string -> string
      method get_srcref : Lexing.lexbuf -> Flx_ast.srcref
      method incr : int -> unit
      method incr_lex_counters : Lexing.lexbuf -> unit
      method pop_condition : unit
      method push_condition : Flx_lexstate.condition_t -> unit
      method set_buf_pos : int -> unit
      method set_condition : Flx_lexstate.condition_t -> unit
      method set_filename : string -> unit
      method set_line : int -> Lexing.lexbuf -> unit
      method set_loc : Flx_lexstate.location -> unit
      method store_macro :
        string -> string list -> Flx_parse.token list -> unit
      method undef_macro : string -> unit
    end
  class lexer_state :
    string ->
    string ->
    string list ->
    (string -> Flx_ast.expr_t -> Flx_ast.expr_t) ->
    object
      val mutable brackets : ((string * string) * string) list
      val comment_ctrl : Flx_lexstate.comment_control
      val expand_expr : string -> Flx_ast.expr_t -> Flx_ast.expr_t
      val file_ctrl : Flx_lexstate.file_control
      val mutable include_files : string list
      val mutable keywords :
        (string * (Flx_ast.srcref * string -> Flx_parse.token)) list array
      val nonterminals :
        (string, (Flx_parse.token list * Flx_ast.ast_term_t) list) Hashtbl.t
      val mutable symbols :
        (string * (Flx_ast.srcref * string -> Flx_parse.token)) list array
      method add_brackets : string -> string -> string -> unit
      method add_include_file : string -> unit
      method add_infix_keyword : int -> string -> string -> unit
      method add_infix_symbol : int -> string -> string -> unit
      method add_keyword : string -> unit
      method add_macros : Flx_lexstate.lexer_state -> unit
      method add_nonterminal :
        string ->
        Flx_ast.range_srcref ->
        Flx_parse.token list -> Flx_ast.ast_term_t -> unit
      method add_statement_keyword :
        string ->
        Flx_ast.range_srcref ->
        Flx_parse.token list -> Flx_ast.ast_term_t -> unit
      method adjust_keyword_array : int -> unit
      method adjust_symbol_array : int -> unit
      method append_comment : string -> unit
      method comment_level : int
      method condition_stack_length : int
      method decode : (string -> string) -> string -> string
      method decr_comment : unit
      method get_absolute : string -> string
      method get_brackets : ((string * string) * string) list
      method get_comment : string
      method get_condition : Flx_lexstate.condition_t
      method get_expand_expr : string -> Flx_ast.expr_t -> Flx_ast.expr_t
      method get_incdirs : string list
      method get_include_files : string list
      method get_keywords :
        (string * (Flx_ast.srcref * string -> Flx_parse.token)) list array
      method get_loc : Flx_lexstate.location
      method get_macro :
        string -> (string list * Flx_parse.token list) option
      method get_macros :
        (string, string list * Flx_parse.token list) Hashtbl.t
      method get_nonterminals :
        (string, (Flx_parse.token list * Flx_ast.ast_term_t) list) Hashtbl.t
      method get_physical_srcref : Lexing.lexbuf -> Flx_ast.srcref
      method get_relative : string -> string
      method get_srcref : Lexing.lexbuf -> Flx_ast.srcref
      method get_symbols :
        (string * (Flx_ast.srcref * string -> Flx_parse.token)) list array
      method inbody : unit
      method incr_comment : unit
      method is_at_line_start : bool
      method newline : Lexing.lexbuf -> unit
      method pop_condition : unit
      method push_condition : Flx_lexstate.condition_t -> unit
      method set_comment : string -> unit
      method set_condition : Flx_lexstate.condition_t -> unit
      method set_filename : string -> unit
      method set_line : int -> Lexing.lexbuf -> unit
      method set_loc : Flx_lexstate.location -> unit
      method store_macro :
        string -> string list -> Flx_parse.token list -> unit
      method string_of_srcref : Lexing.lexbuf -> string
      method tokenise_symbols :
        Lexing.lexbuf -> string -> Flx_parse.token list
      method undef_macro : string -> unit
    end
end