Handbook
Glossary
init-parser ( str -- parser event )
Vocabulary
yaml
.
private
Inputs
str
an
object
Outputs
parser
an
object
event
an
object
Definition
USING:
alien.data
classes.struct
io.encodings.string
io.encodings.utf8
kernel
libc
sequences
yaml.ffi
;
IN:
yaml.private
::
init-parser
( str -- parser event )
yaml_parser_t
(malloc-struct)
&free
:>
parser parser
yaml_parser_initialize
yaml-initialize-assert-ok
parser
&yaml_parser_delete
drop
str
utf8
encode
[
malloc-byte-array
&free
]
[
length
]
bi
:>
( input length ) parser input length
yaml_parser_set_input_string
yaml_event_t
(malloc-struct)
&free
:>
event parser event
;