7 typedef enum _yll_option
{
8 YLL_INLINE_SEQ
= 1 << 0,
9 YLL_ADD_SPACE
= 1 << 1,
14 typedef void (*YllNext
)(struct _yll_emitter
*e
);
16 struct _yll_emitter_node
{
17 struct _yll_emitter_node
*next
;
22 struct _yll_anchor_node
{
23 struct _yll_emitter_node en
;
27 struct _yll_seq_node
{
28 struct _yll_emitter_node en
;
32 typedef struct _yll_emitter_node YllEmitterNode
;
33 typedef struct _yll_anchor_node YllAnchorNode
;
34 typedef struct _yll_seq_node YllSeqNode
;
39 YllEmitterNode
*stack
;
45 typedef struct _yll_emitter YllEmitter
;
47 typedef void (*YllOutputHandler
)(YllEmitter
*, char *, long);
49 YllEmitter
* yll_new_emitter();
50 void yll_emitter_handler(YllEmitter
*e
, YllOutputHandler hdlr
);
51 void yll_free_emitter(YllEmitter
*e
);
52 SYMID
yll_emitter_anchor(YllEmitter
*e
);
53 void yll_emitter_alias(YllEmitter
*e
, SYMID id
);
54 void yll_emitter_set_options(YllEmitter
*e
, YllOption flags
);
55 void yll_emitter_set_transfer(YllEmitter
*e
, const char *t
);
56 void yll_emitter_start_seq(YllEmitter
*e
);
57 void yll_emitter_end_seq(YllEmitter
*e
);
58 void yll_emitter_start_map(YllEmitter
*e
);
59 void yll_emitter_end_map(YllEmitter
*e
);
60 void yll_emitter_write_string(YllEmitter
*e
, const char *str
);
61 void yll_emitter_write_int(YllEmitter
*e
, int i
);
62 void yll_emitter_write_null(YllEmitter
*e
);