Raxol.Terminal.Parser.State.Manager (Raxol v0.5.0)

View Source

Manages the state of the terminal parser, including escape sequences, control sequences, and parser modes.

Summary

Functions

Clears all string buffers.

Gets the APC buffer content.

Gets the DCS buffer content.

Gets the current intermediate characters.

Gets the OSC buffer content.

Gets the current parameters.

Gets the PM buffer content.

Gets the SOS buffer content.

Gets the current parser state.

Gets the string buffer content.

Gets the string flags.

Gets the string parser state.

Gets the string terminator.

Checks if the parser is in ignore mode.

Creates a new parser state manager instance.

Processes a single character and updates the parser state accordingly.

Resets the parser state manager to its initial state.

Sets the APC buffer content.

Sets the DCS buffer content.

Sets the ignore mode.

Sets the intermediate characters.

Sets the OSC buffer content.

Sets the parameters.

Sets the PM buffer content.

Sets the SOS buffer content.

Sets the parser state.

Sets the string buffer content.

Sets the string flags.

Sets the string parser state.

Sets the string terminator.

Types

intermediate()

@type intermediate() :: [non_neg_integer()]

params()

@type params() :: [non_neg_integer()]

parser_state()

@type parser_state() ::
  :ground
  | :escape
  | :csi_entry
  | :csi_param
  | :csi_intermediate
  | :csi_ignore
  | :osc_string
  | :dcs_entry
  | :dcs_param
  | :dcs_intermediate
  | :dcs_passthrough
  | :apc_string
  | :pm_string
  | :sos_string
  | :string

string_flags()

@type string_flags() :: %{required(String.t()) => boolean()}

t()

@type t() :: %Raxol.Terminal.Parser.State.Manager{
  apc_buffer: String.t(),
  dcs_buffer: String.t(),
  ignore: boolean(),
  intermediate: intermediate(),
  osc_buffer: String.t(),
  params: params(),
  pm_buffer: String.t(),
  sos_buffer: String.t(),
  state: parser_state(),
  string_buffer: String.t(),
  string_flags: string_flags(),
  string_parser_state: parser_state() | nil,
  string_terminator: non_neg_integer() | nil
}

Functions

clear_string_buffers(manager)

Clears all string buffers.

get_apc_buffer(manager)

Gets the APC buffer content.

get_dcs_buffer(manager)

Gets the DCS buffer content.

get_intermediate(manager)

Gets the current intermediate characters.

get_osc_buffer(manager)

Gets the OSC buffer content.

get_params(manager)

Gets the current parameters.

get_pm_buffer(manager)

Gets the PM buffer content.

get_sos_buffer(manager)

Gets the SOS buffer content.

get_state(manager)

Gets the current parser state.

get_string_buffer(manager)

Gets the string buffer content.

get_string_flags(manager)

Gets the string flags.

get_string_parser_state(manager)

Gets the string parser state.

get_string_terminator(manager)

Gets the string terminator.

ignore?(manager)

Checks if the parser is in ignore mode.

new()

Creates a new parser state manager instance.

process_char(manager, char)

Processes a single character and updates the parser state accordingly.

reset(manager)

Resets the parser state manager to its initial state.

set_apc_buffer(manager, content)

Sets the APC buffer content.

set_dcs_buffer(manager, content)

Sets the DCS buffer content.

set_ignore(manager, ignore)

Sets the ignore mode.

set_intermediate(manager, intermediate)

Sets the intermediate characters.

set_osc_buffer(manager, content)

Sets the OSC buffer content.

set_params(manager, params)

Sets the parameters.

set_pm_buffer(manager, content)

Sets the PM buffer content.

set_sos_buffer(manager, content)

Sets the SOS buffer content.

set_state(manager, state)

Sets the parser state.

set_string_buffer(manager, content)

Sets the string buffer content.

set_string_flags(manager, flags)

Sets the string flags.

set_string_parser_state(manager, state)

Sets the string parser state.

set_string_terminator(manager, terminator)

Sets the string terminator.