package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type token_location = {
  1. str : string;
  2. charpos : int;
  3. line : int;
  4. column : int;
  5. file : Common.filename;
}
type token_origin =
  1. | OriginTok of token_location
  2. | FakeTokStr of string * (token_location * int) option
  3. | ExpandedTok of token_location * token_location * int
  4. | Ab
type token_mutable = {
  1. token : token_origin;
  2. mutable transfo : transformation;
}
and transformation =
  1. | NoTransfo
  2. | Remove
  3. | AddBefore of add
  4. | AddAfter of add
  5. | Replace of add
  6. | AddArgsBefore of string list
and add =
  1. | AddStr of string
  2. | AddNewlineAndIdent
type t = token_mutable
type info_ = t
type token_kind =
  1. | LPar
  2. | RPar
  3. | LBrace
  4. | RBrace
  5. | LBracket
  6. | RBracket
  7. | LAngle
  8. | RAngle
  9. | Esthet of esthet
  10. | Eof
  11. | Other
and esthet =
  1. | Comment
  2. | Newline
  3. | Space
exception Lexical_error of string * t
exception Parsing_error of t
exception Ast_builder_error of string * t
exception Other_error of string * t
val lexical_error : string -> Lexing.lexbuf -> unit
val fake_token_location : token_location
val fake_info : string -> t
val first_loc_of_file : Common.filename -> token_location
val str_of_info : t -> string
val line_of_info : t -> int
val col_of_info : t -> int
val pos_of_info : t -> int
val file_of_info : t -> Common.filename
val string_of_info : t -> string
val is_origintok : t -> bool
val token_location_of_info : t -> token_location
val get_original_token_location : token_origin -> token_location
val compare_pos : t -> t -> int
val min_max_ii_by_pos : t list -> t * t
type parsing_stat = {
  1. filename : Common.filename;
  2. mutable correct : int;
  3. mutable bad : int;
  4. mutable have_timeout : bool;
  5. mutable commentized : int;
  6. mutable problematic_lines : (string list * int) list;
}
val default_stat : Common.filename -> parsing_stat
val print_parsing_stat_list : ?verbose:bool -> parsing_stat list -> unit
val print_recurring_problematic_tokens : parsing_stat list -> unit
type 'tok tokens_state = {
  1. mutable rest : 'tok list;
  2. mutable current : 'tok;
  3. mutable passed : 'tok list;
}
val mk_tokens_state : 'tok list -> 'tok tokens_state
val tokinfo_str_pos : string -> int -> t
val tokinfo : Lexing.lexbuf -> t
val lexbuf_to_strpos : Lexing.lexbuf -> string * int
val yyback : int -> Lexing.lexbuf -> unit
val rewrap_str : string -> t -> t
val tok_add_s : string -> t -> t
val full_charpos_to_pos_large : Common.filename -> int -> int * int
val complete_token_location_large : Common.filename -> (int -> int * int) -> token_location -> token_location
val error_message : Common.filename -> (string * int) -> string
val error_message_info : t -> string
val print_bad : int -> (int * int) -> string array -> unit
type changen = unit -> in_channel * int * Common.filename
val file_wrap_changen : (changen -> 'a) -> Common.filename -> 'a
val full_charpos_to_pos_large_from_changen : changen -> int -> int * int
OCaml

Innovation. Community. Security.