Module yamerl_parser

yamerl_parser implements a YAML parser.

Copyright © 2012-2014 Yakaz, 2016-2021 Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>

Authors: Jean-Sébastien Pédron (jean-sebastien.pedron@dumbbell.fr).

Description

yamerl_parser implements a YAML parser. It is not meant to be used directly. Instead, you should use yamerl_constr.

The yamerl application must be started to use the parser.

Data Types

yamerl_parser()

yamerl_parser() = #yamerl_parser{}

Function Index

file/1Equivalent to file(Filename, []).
file/2Parses a YAML document from a regular file.
get_token_fun/1Returns the constructor callback function.
last_chunk/2Equivalent to next_chunk(Parser, Chunk, true).
new/1Equivalent to new(Source, []).
new/2Creates and returns a new YAML parser state.
next_chunk/2Equivalent to next_chunk(Parser, Chunk, false).
next_chunk/3Feeds the parser with the next chunk from the YAML stream.
set_token_fun/2Sets the constructor callback function.
string/1Equivalent to string(String, []).
string/2Parses a YAML document from an in-memory YAML string.

Function Details

file/1

file(Filename) -> Parser | no_return()

Equivalent to file(Filename, []).

file/2

file(Filename, Options) -> Parser | no_return()

Parses a YAML document from a regular file.

get_token_fun/1

get_token_fun(Yamerl_parser) -> any()

Returns the constructor callback function

last_chunk/2

last_chunk(Parser, Chunk) -> Ret | no_return()

Equivalent to next_chunk(Parser, Chunk, true).

new/1

new(Source) -> Parser | no_return()

Equivalent to new(Source, []).

new/2

new(Source, Options) -> Parser | no_return()

Creates and returns a new YAML parser state.

next_chunk/2

next_chunk(Parser, Chunk) -> Ret | no_return()

Equivalent to next_chunk(Parser, Chunk, false).

next_chunk/3

next_chunk(Parser, Chunk, Last_Chunk) -> Ret | no_return()

Feeds the parser with the next chunk from the YAML stream.

set_token_fun/2

set_token_fun(Parser, Fun) -> any()

Sets the constructor callback function

string/1

string(String) -> Parser | no_return()

Equivalent to string(String, []).

string/2

string(String, Options) -> Parser | no_return()

Parses a YAML document from an in-memory YAML string.


Generated by EDoc