alba

Alba compiler
IN THIS PACKAGE
Module type Fmlib . Character_parser . PARSER
type state

State type

type parser

Parser Type

val needs_more : parser -> bool

Does the parser need more tokens (i.e. either put_character or put_end)?

val has_ended : parser -> bool

Has the parser terminated (opposite of needs_more p)?

val has_succeeded : parser -> bool

Has the parser succeeded

val has_failed : parser -> bool

Has the parser failed

val position : parser -> Position.t

The current position.

val line : parser -> int

The current line.

val column : parser -> int

The current column.

val state : parser -> state

The state of the parser.

val error_tabs : parser -> int list
val put_character : parser -> char -> parser

put_character p c feeds the parser p with the character token c. Only possible if needs_more p is valid.

val put_end : parser -> parser

put_end p signals to the parser p the end of stream. Only possible if needs_more p is valid.