Module Tezos_micheline.Micheline_parser

type 'a parsing_result = 'a * Tezos_error_monad.Error_monad.error list
val compare : ( 'a -> 'a -> int ) -> 'a parsing_result -> 'a parsing_result -> int
type point = {
point : int;
byte : int;
line : int;
column : int;
}
val point_zero : point
type location = {
start : point;
stop : point;
}
val location_zero : location
val point_encoding : point Data_encoding.encoding
val location_encoding : location Data_encoding.encoding
type token_value =
| String of string
| Bytes of string
| Int of string
| Ident of string
| Annot of string
| Comment of string
| Eol_comment of string
| Semi
| Open_paren
| Close_paren
| Open_brace
| Close_brace
type token = {
token : token_value;
loc : location;
}
val tokenize : string -> token list parsing_result
type node = ( location, string ) Micheline.node
val min_point : node list -> point

Beginning of a sequence of consecutive primitives

val max_point : node list -> point

End of a sequence of consecutive primitives

val max_annot_length : int
type Tezos_error_monad.Error_monad.error +=
| Invalid_utf8_sequence of point * string
type Tezos_error_monad.Error_monad.error +=
| Unexpected_character of point * string
type Tezos_error_monad.Error_monad.error +=
| Undefined_escape_sequence of point * string
type Tezos_error_monad.Error_monad.error +=
| Missing_break_after_number of point
type Tezos_error_monad.Error_monad.error +=
| Unterminated_string of location
type Tezos_error_monad.Error_monad.error +=
| Unterminated_integer of location
type Tezos_error_monad.Error_monad.error +=
| Invalid_hex_bytes of location
type Tezos_error_monad.Error_monad.error +=
| Unterminated_comment of location
type Tezos_error_monad.Error_monad.error +=
| Annotation_length of location
val parse_toplevel : ?check:bool -> token list -> node list parsing_result
val parse_expression : ?check:bool -> token list -> node parsing_result
val print_location : Stdlib.Format.formatter -> location -> unit
val print_point : Stdlib.Format.formatter -> point -> unit