Internal bits used by the generated automaton, not part of the public API
module Public : sig ... end
module Error : sig ... end
val context : (_, _) Public.state ‑> context
val set_automaton_state : ('u, 's) Public.state ‑> Base.int ‑> Base.unit
val advance : ('u, 's) Public.state ‑> Base.unit
Advance the position counters. advance_eol
is for when we read a newline
character.
val advance_eol : ('u, 's) Public.state ‑> Base.unit
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_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