Module Parsexp__.Parser_automaton_internal

Internal bits used by the generated automaton, not part of the public API

module Public : sig ... end
module Error : sig ... end
type context =
| Sexp_comment
| Sexp
val context : (__Public.state ‑> context
val set_automaton_state : ('u'sPublic.state ‑> Base.int ‑> Base.unit
val advance : ('u'sPublic.state ‑> Base.unit

Advance the position counters. advance_eol is for when we read a newline character.

val advance_eol : ('u'sPublic.state ‑> Base.unit
val block_comment_depth : ('u'sPublic.state ‑> Base.int

Number of opened #|

type ('u, 's) action = ('u'sPublic.state ‑> Base.char ‑> 's ‑> 's
type ('u, 's) epsilon_action = ('u'sPublic.state ‑> 's ‑> 's
val add_atom_char : (__action

Add a character to the atom buffer. add_quoted_atom_char does the same for quoted atoms

val add_quoted_atom_char : (__action
val add_escaped : (__action

Add a character that just follows a '\\' and the '\\' itself if necessary.

val add_dec_escape_char : (__action

escaped_value <- escaped_value * 10 + (char - '0')

These functions make the assumption that char is between '0' and '9'. add_dec_escape_char also assumes the result doesn't overflow. The automaton definition must make sure this is the case.

add_last_dec_escape_char also adds the resulting character to the atom buffer.

val add_last_dec_escape_char : (__action
val comment_add_last_dec_escape_char : (__action

Same but for quoted strings inside comments. Useful because it can fail.

val add_hex_escape_char : (__action

Same as add_dec_escape_char but for hexadicemal escape sequences

val add_last_hex_escape_char : (__action
val start_sexp_comment : (__action

Ignore one more full sexp to come

val add_first_char : (__action

Add the first char of an unquoted atom.

val start_quoted_string : (__action
val add_token_char : (__action

Takes note of a control character in quoted atoms or the uninterpreted characters of comments, for which there is no corresponding add_* call (a backslash and the x in "\xff" or any character in a line comment). This does not get called for the opening (start_quoted_string) or closing (push_quoted_atom) quotes themselves.

val opening : (__action
val closing : (__action
val push_quoted_atom : (__action
val start_block_comment : (__action
val end_block_comment : (__action
val start_line_comment : (__action
val end_line_comment : (__epsilon_action
val eps_push_atom : (__epsilon_action
val eps_add_first_char_hash : (__epsilon_action
val eps_eoi_check : (__epsilon_action
val eps_add_escaped_cr : (__epsilon_action