package stdcompat

  1. Overview
  2. Docs
Compatibility module for OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

20.1.tar.gz
sha512=c482cae49459704100812cb6caa8e8ffa60ffc2414a0ac4c3ec41bdd4203d8299c69be3ab2f7f8764b58b9173e43b89faf70036a19dc5674aa87108ff07c4c60

doc/stdcompat/Stdcompat/Lexing/index.html

Module Stdcompat.LexingSource

Sourcetype position = Lexing.position = {
  1. pos_fname : string;
  2. pos_lnum : int;
  3. pos_bol : int;
  4. pos_cnum : int;
}

Alias for Lexing.position

Sourcetype lexbuf = Lexing.lexbuf = {
  1. refill_buff : lexbuf -> unit;
  2. mutable lex_buffer : bytes;
  3. mutable lex_buffer_len : int;
  4. mutable lex_abs_pos : int;
  5. mutable lex_start_pos : int;
  6. mutable lex_curr_pos : int;
  7. mutable lex_last_pos : int;
  8. mutable lex_last_action : int;
  9. mutable lex_eof_reached : bool;
  10. mutable lex_mem : int array;
  11. mutable lex_start_p : position;
  12. mutable lex_curr_p : position;
}
  • since 4.02.0:

type lexbuf = refill_buff: lexbuf -> unit ; mutable lex_buffer: bytes ; 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 ; mutable lex_mem: int array ; mutable lex_start_p: position ; mutable lex_curr_p: position

  • since 3.07.0:

type lexbuf = refill_buff: 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 ; mutable lex_mem: int array ; mutable lex_start_p: position ; mutable lex_curr_p: position

Sourcetype lex_tables = {
  1. lex_base : string;
  2. lex_backtrk : string;
  3. lex_default : string;
  4. lex_trans : string;
  5. lex_check : string;
  6. lex_base_code : string;
  7. lex_backtrk_code : string;
  8. lex_default_code : string;
  9. lex_trans_code : string;
  10. lex_check_code : string;
  11. lex_code : string;
}
Sourceval set_position : lexbuf -> position -> unit
  • since 4.11.0: val set_position : lexbuf -> position -> unit
Sourceval set_filename : lexbuf -> string -> unit
  • since 4.11.0: val set_filename : lexbuf -> string -> unit
Sourceval from_channel : ?with_positions:bool -> in_channel -> lexbuf
  • since 4.08.0:

val from_channel : ?with_positions:bool -> in_channel -> lexbuf

Sourceval from_string : ?with_positions:bool -> string -> lexbuf
  • since 4.08.0: val from_string : ?with_positions:bool -> string -> lexbuf
Sourceval from_function : ?with_positions:bool -> (bytes -> int -> int) -> lexbuf
  • since 4.08.0:

val from_function : ?with_positions:bool -> (bytes -> int -> int) -> lexbuf

Sourceval with_positions : lexbuf -> bool
  • since 4.08.0: val with_positions : lexbuf -> bool
Sourceval new_line : lexbuf -> unit
  • since 3.11.0: val new_line : lexbuf -> unit
Sourceval dummy_pos : position
Sourceval lexeme : lexbuf -> string

Alias for Lexing.lexeme

Sourceval lexeme_char : lexbuf -> int -> char
Sourceval lexeme_start : lexbuf -> int
Sourceval lexeme_end : lexbuf -> int
Sourceval lexeme_start_p : lexbuf -> position
Sourceval lexeme_end_p : lexbuf -> position
Sourceval flush_input : lexbuf -> unit
Sourceval sub_lexeme : lexbuf -> int -> int -> string
Sourceval sub_lexeme_opt : lexbuf -> int -> int -> string option
Sourceval sub_lexeme_char : lexbuf -> int -> char
Sourceval sub_lexeme_char_opt : lexbuf -> int -> char option
Sourceval engine : lex_tables -> int -> lexbuf -> int

Alias for Lexing.engine

Sourceval new_engine : lex_tables -> int -> lexbuf -> int
OCaml

Innovation. Community. Security.