package lib_parsing

  1. Overview
  2. Docs
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 yyback : int -> Stdlib.Lexing.lexbuf -> unit
val tokenize_all_and_adjust_pos : Common.filename -> (Stdlib.Lexing.lexbuf -> 'tok) -> ((Parse_info.t -> Parse_info.t) -> 'tok -> 'tok) -> ('tok -> bool) -> 'tok list
val mk_lexer_for_yacc : 'tok list -> ('tok -> bool) -> 'tok tokens_state * (Stdlib.Lexing.lexbuf -> 'tok) * Stdlib.Lexing.lexbuf
val full_charpos_to_pos_large : Common.filename -> int -> int * int
val complete_token_location_large : Common.filename -> (int -> int * int) -> Parse_info.token_location -> Parse_info.token_location

Fix the location info in a token.

See adjust_info_wrt_base.

val get_token_end_info : Parse_info.token_location -> int * int * int

adjust_info_wrt_base base_loc tok, where tok represents a location * relative to base_loc, returns the same tok but with an absolute * token_location. This is useful for fixing parse info after * Common2.with_tmp_file. E.g. if base_loc points to line 3, and * tok points to line 2 (interpreted line 2 starting in line 3), then * the adjusted token will point to line 4.

val error_message : Common.filename -> (string * int) -> string
val error_message_info : Parse_info.t -> string
val print_bad : int -> (int * int) -> string array -> unit
OCaml

Innovation. Community. Security.