package lib_parsing

  1. Overview
  2. Docs
Small library to help writing parsers

Install

Dune Dependency

Authors

Maintainers

Sources

semgrep-full-1.12.0.tar.gz
md5=d72b17df65c5cea30701cdf25f186bca
sha512=b135affadcdeb892352ec269a8761e41d2b34383ee839b83855f9604983eae324732b76f1b2b8b305dfc06f1f8863dd32afe83528bf605daa910a3fc107474c5

doc/lib_parsing/Parse_info/index.html

Module Parse_infoSource

Sourcetype token_location = {
  1. str : string;
  2. charpos : int;
  3. line : int;
  4. column : int;
  5. file : Common.filename;
}
Sourcetype 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
Sourcetype token_mutable = {
  1. token : token_origin;
  2. mutable transfo : transformation;
}
Sourceand transformation =
  1. | NoTransfo
  2. | Remove
  3. | AddBefore of add
  4. | AddAfter of add
  5. | Replace of add
  6. | AddArgsBefore of string list
Sourceand add =
  1. | AddStr of string
  2. | AddNewlineAndIdent
Sourceval pp_full_token_info : bool ref
Sourceval pp : Format.formatter -> t -> unit
Sourcetype 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
Sourceand esthet =
  1. | Comment
  2. | Newline
  3. | Space
Sourceexception Lexical_error of string * t
Sourceexception Parsing_error of t
Sourceexception Ast_builder_error of string * t
Sourceexception Other_error of string * t
Sourceval lexical_error : string -> Lexing.lexbuf -> unit
Sourceval register_exception_printer : unit -> unit
Sourceval tokinfo : Lexing.lexbuf -> t
Sourceval mk_info_of_loc : token_location -> t
Sourceval first_loc_of_file : Common.filename -> token_location
Sourceval tokinfo_str_pos : string -> int -> t
Sourceval rewrap_str : string -> t -> t
Sourceval tok_add_s : string -> t -> t
Sourceval combine_infos : t -> t list -> t
Sourceval split_info_at_pos : int -> t -> t * t
Sourceexception NoTokenLocation of string
Sourceval fake_token_location : token_location
Sourceval is_fake : t -> bool
Sourceval is_origintok : t -> bool
Sourceval has_origin_loc : t -> bool

Either an OriginTok or a FakeTokStr associated with a real location.

Sourceval unsafe_fake_info : string -> t
Sourceval unsafe_fake_bracket : 'a -> t * 'a * t
Sourceval unsafe_sc : t
Sourceval fake_info_loc : token_location -> string -> t
Sourceval fake_info : t -> string -> t
Sourceval fake_bracket_loc : token_location -> 'a -> t * 'a * t
Sourceval fake_bracket : t -> 'a -> t * 'a * t
Sourceval sc_loc : token_location -> t
Sourceval sc : t -> t
Sourceval unbracket : (t * 'a * t) -> 'a
Sourceval str_of_info : t -> string
Sourceval line_of_info : t -> int
Sourceval col_of_info : t -> int
Sourceval pos_of_info : t -> int
Sourceval file_of_info : t -> Common.filename
Sourceval string_of_info : t -> string
Sourceval token_location_of_info : t -> (token_location, string) result
Sourceval unsafe_token_location_of_info : t -> token_location
Sourceval get_original_token_location : token_origin -> token_location
Sourceval compare_pos : t -> t -> int
Sourceval min_max_ii_by_pos : t list -> t * t
Sourceval abstract_info : t
OCaml

Innovation. Community. Security.