Skip to content

API Reference

Classes

Name Description
DynString
YAMLLexer
YAMLToken
YAMLParser
block_scalar_options_s

Macros


CHUNK_SIZE

#define CHUNK_SIZE 4096

BUFFER_SIZE

#define BUFFER_SIZE (CHUNK_SIZE * 2)

Enumerations


YAMLTokenType

enum YAMLTokenType
Value Description
YAMLTokenStartStream
YAMLTokenStartOfDocument
YAMLTokenEndOfDocument
YAMLTokenDirective
YAMLTokenIndent
YAMLTokenDedent
YAMLTokenNewline
YAMLTokenScalar
YAMLTokenValueIndicator
YAMLTokenFlowMappingStart
YAMLTokenFlowMappingEnd
YAMLTokenFlowSequenceStart
YAMLTokenFlowSequenceEnd
YAMLTokenListDash
YAMLTokenFlowEntry
YAMLTokenAlias
YAMLTokenAnchor
YAMLTokenComplexKeyIndicator
YAMLTokenTag
YAMLTokenAT
YAMLTokenBacktick
YAMLTokenEndStream
YAMLTokenIllegal

YAMLLexerState

enum YAMLLexerState
Value Description
YAMLLexerStartStream
YAMLLexerStateNormal
YAMLLexerStateJustGotNewline
YAMLLexerStatePopDedent
YAMLLexerStateFoundEOFNeedToPopRemainingDedent
YAMLLexerStateCurlyFlow
YAMLLexerStateSequenceFlow

BlockScalarStyle

enum BlockScalarStyle
Value Description
BlockScalarStyleLiteral
BlockScalarStyleFolded

BlockScalarChomping

enum BlockScalarChomping
Value Description
BlockScalarStyleClip
BlockScalarStyleStrip
BlockScalarStyleKeep

YAMLParserInputMode

enum YAMLParserInputMode
Value Description
YAMLParserInputFile

Typedefs


YAMLValue

using YAMLValue = Item

YAML

using YAML = List

Functions


DynStringToCString

char * DynStringToCString(DynString * str)

DynStringFree

void DynStringFree(DynString * str)

DynStringPrint

void DynStringPrint(DynString * str)

DynStringAddCharAt

void DynStringAddCharAt(DynString * str, size_t idx, char c)

DynStringTrimEnd

void DynStringTrimEnd(DynString * str)

DynStringShiftLeft

void DynStringShiftLeft(DynString * str, size_t index)

DynStringDefaultInit

DynString * DynStringDefaultInit()

YAMLTokenInit

YAMLToken * YAMLTokenInit(enum YAMLTokenType, u_int32_t, u_int32_t, u_int32_t, char *)

YAMLTokenTypeToString

char * YAMLTokenTypeToString(enum YAMLTokenType)

YAMLTokenPrint

void YAMLTokenPrint(YAMLToken *)

YAMLLex

YAMLToken * YAMLLex(YAMLLexer * lexer)

YAMLTokenFree

void YAMLTokenFree(YAMLToken * token)

YAMLLexerInit

YAMLLexer * YAMLLexerInit(FILE * file_ptr)

YAMLLexerFree

void YAMLLexerFree(YAMLLexer * lexer)

YAMLParserInit

YAMLParser * YAMLParserInit(FILE * file_ptr)

YAMLParserFree

void YAMLParserFree(YAMLParser * parser)

YAMLInit

YAML * YAMLInit()

StringToYAML

YAML * StringToYAML(char *)

YAMLFromFile

YAML * YAMLFromFile(char * file_name)

YAMLFromSTDIN

YAML * YAMLFromSTDIN(size_t)

YAMLToString

char * YAMLToString(YAML *)

YAMLFree

void YAMLFree(YAML *)

YAMLPrint

void YAMLPrint(YAML *)

YAMLParse

YAML * YAMLParse(YAMLParser * parser)

DynString

struct DynString

Public Attributes

Return Name Description
char * value
size_t size

value

char * value

size

size_t size

YAMLLexer

struct YAMLLexer

Public Attributes

Return Name Description
FILE * file_ptr
char buffer
size_t cursor
size_t bytes_in_buffer
u_int32_t line
char current_char
bool eof_reached
enum YAMLLexerState state
List * flow_stack
List * indent_stack
u_int8_t this_indent_space_count
int space_count
struct YAMLLexer::block_scalar_options_s block_scalar_options

file_ptr

FILE * file_ptr

buffer

char buffer[BUFFER_SIZE]

cursor

size_t cursor

bytes_in_buffer

size_t bytes_in_buffer

line

u_int32_t line

current_char

char current_char

eof_reached

bool eof_reached

state

enum YAMLLexerState state

flow_stack

List * flow_stack

indent_stack

List * indent_stack

this_indent_space_count

u_int8_t this_indent_space_count

space_count

int space_count

block_scalar_options

struct YAMLLexer::block_scalar_options_s block_scalar_options

block_scalar_options_s

struct block_scalar_options_s

Public Attributes

Return Name Description
bool enabled
enum BlockScalarStyle style
enum BlockScalarChomping chomping
uint8_t explicit_indent

enabled

bool enabled

style

enum BlockScalarStyle style

chomping

enum BlockScalarChomping chomping

explicit_indent

uint8_t explicit_indent

YAMLToken

struct YAMLToken

Public Attributes

Return Name Description
enum YAMLTokenType type
u_int32_t start
u_int32_t end
u_int32_t line
char * literal

type

enum YAMLTokenType type

start

u_int32_t start

end

u_int32_t end

line

u_int32_t line

literal

char * literal

YAMLParser

struct YAMLParser

Public Attributes

Return Name Description
YAMLLexer * lexer
YAMLToken * current_token
YAMLToken * peek_token
char * error_message

lexer

YAMLLexer * lexer

current_token

YAMLToken * current_token

peek_token

YAMLToken * peek_token

error_message

char * error_message

block_scalar_options_s

struct block_scalar_options_s

Public Attributes

Return Name Description
bool enabled
enum BlockScalarStyle style
enum BlockScalarChomping chomping
uint8_t explicit_indent

enabled

bool enabled

style

enum BlockScalarStyle style

chomping

enum BlockScalarChomping chomping

explicit_indent

uint8_t explicit_indent