8 main(int argc, char *argv[])
17 printf("Usage: %s file.yaml\n", argv[0]);
20 file = fopen(argv[1], "rb");
23 assert(yaml_parser_initialize(&parser));
25 yaml_parser_set_input_file(&parser, file);
29 assert(yaml_parser_scan(&parser, &token));
31 done = (token.type == YAML_STREAM_END_TOKEN);
33 yaml_token_delete(&token);
38 yaml_parser_delete(&parser);
42 printf("Parsing the file '%s': %d tokens\n", argv[1], count);