I'm well aware token-based parsing (specifically when it comes to YAML) is not useful at all unless you are implementing a syntax highlighter. Let's say I had another use case though, would I want to use event-based parsing?
My next question is does libyaml provide a way to maintain this relationship in a tree?
I know event-based parsing does maintain the tree structure, features being sequences and mappings, which describe the input structure. If I'm remembering correctly then it should be pretty simple to build a list of struct input skimming over the event stream, something like this:
Hey all,
I'm well aware token-based parsing (specifically when it comes to YAML) is not useful at all unless you are implementing a syntax highlighter. Let's say I had another use case though, would I want to use event-based parsing?
My next question is does
libyaml
provide a way to maintain this relationship in a tree?I know event-based parsing does maintain the tree structure, features being sequences and mappings, which describe the input structure. If I'm remembering correctly then it should be pretty simple to build a list of
struct
input skimming over the event stream, something like this: