17 #error Must only define YAMLBYTE_UTF8 or YAMLBYTE_UTF16
24 #error Must define YAMLBYTE_UTF8 or YAMLBYTE_UTF16
29 #define YAMLBYTE_FINISH ((yamlbyte_char_t) 0)
30 #define YAMLBYTE_DOCUMENT ((yamlbyte_char_t)'D')
31 #define YAMLBYTE_DIRECTIVE ((yamlbyte_char_t)'V')
32 #define YAMLBYTE_PAUSE ((yamlbyte_char_t)'P')
33 #define YAMLBYTE_MAPPING ((yamlbyte_char_t)'M')
34 #define YAMLBYTE_SEQUENCE ((yamlbyte_char_t)'Q')
35 #define YAMLBYTE_END_BRANCH ((yamlbyte_char_t)'E')
36 #define YAMLBYTE_SCALAR ((yamlbyte_char_t)'S')
37 #define YAMLBYTE_CONTINUE ((yamlbyte_char_t)'C')
38 #define YAMLBYTE_NEWLINE ((yamlbyte_char_t)'N')
39 #define YAMLBYTE_NULLCHAR ((yamlbyte_char_t)'Z')
40 #define YAMLBYTE_ANCHOR ((yamlbyte_char_t)'A')
41 #define YAMLBYTE_ALIAS ((yamlbyte_char_t)'R')
42 #define YAMLBYTE_TRANSFER ((yamlbyte_char_t)'T')
44 #define YAMLBYTE_COMMENT ((yamlbyte_char_t)'c')
45 #define YAMLBYTE_INDENT ((yamlbyte_char_t)'i')
46 #define YAMLBYTE_STYLE ((yamlbyte_char_t)'s')
48 #define YAMLBYTE_LINE_NUMBER ((yamlbyte_char_t)'#')
49 #define YAMLBYTE_WHOLE_SCALAR ((yamlbyte_char_t)'<')
50 #define YAMLBYTE_NOTICE ((yamlbyte_char_t)'!')
51 #define YAMLBYTE_SPAN ((yamlbyte_char_t)')')
52 #define YAMLBYTE_ALLOC ((yamlbyte_char_t)'@')
55 #define YAMLBYTE_FLOW ((yamlbyte_char_t)'>')
56 #define YAMLBYTE_LITERAL ((yamlbyte_char_t)'|')
57 #define YAMLBYTE_BLOCK ((yamlbyte_char_t)'b')
58 #define YAMLBYTE_PLAIN ((yamlbyte_char_t)'p')
59 #define YAMLBYTE_INLINE_MAPPING ((yamlbyte_char_t)'{')
60 #define YAMLBYTE_INLINE_SEQUENCE ((yamlbyte_char_t)'[')
61 #define YAMLBYTE_SINGLE_QUOTED ((yamlbyte_char_t)39)
62 #define YAMLBYTE_DOUBLE_QUOTED ((yamlbyte_char_t)'"')
152 #define YAMLBYTE_PULL2PUSH(pull,producer,push,consumer,result) \
154 yamlbyte_pullbuff_t _pull = (pull); \
155 yamlbyte_pushbuff_t _push = (push); \
156 yamlbyte_result_t _result = YAMLBYTE_OK; \
157 yamlbyte_producer_t _producer = (producer); \
158 yamlbyte_consumer_t _consumer = (consumer); \
160 yamlbyte_buff_t buff = NULL; \
161 _result = _pull(_producer,&buff); \
162 if(YAMLBYTE_OK != result || NULL == buff) \
164 _result = _push(_consumer,buff); \
165 if(YAMLBYTE_OK != result) \
168 (result) = _result; \
struct yaml_instruction * yamlbyte_inst_t
const yamlbyte_char_t * yamlbyte_buff_t
yamlbyte_result_t(* yamlbyte_pull_t)(yamlbyte_producer_t self, yamlbyte_inst_t *inst)
yamlbyte_result_t(* yamlbyte_push_t)(yamlbyte_consumer_t self, yamlbyte_inst_t inst)
unsigned char yamlbyte_utf8_t
void * yamlbyte_consumer_t
void * yamlbyte_producer_t
yamlbyte_result_t(* yamlbyte_pushbuff_t)(yamlbyte_consumer_t self, yamlbyte_buff_t buff)
unsigned short yamlbyte_utf16_t
yamlbyte_result_t(* yamlbyte_pullbuff_t)(yamlbyte_producer_t self, yamlbyte_buff_t *buff)