| 317 | */ |
| 318 | |
| 319 | static int |
| 320 | yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event) |
| 321 | { |
| 322 | yaml_token_t *token; |
| 323 | |
| 324 | token = PEEK_TOKEN(parser); |
| 325 | if (!token) return 0; |
| 326 | |
| 327 | if (token->type != YAML_STREAM_START_TOKEN) { |
| 328 | return yaml_parser_set_parser_error(parser, |
| 329 | "did not find expected <stream-start>", token->start_mark); |
| 330 | } |
| 331 | |
| 332 | parser->state = YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE; |
| 333 | STREAM_START_EVENT_INIT(*event, token->data.stream_start.encoding, |
| 334 | token->start_mark, token->start_mark); |
| 335 | SKIP_TOKEN(parser); |
| 336 | |
| 337 | return 1; |
| 338 | } |
| 339 | |
| 340 | /* |
| 341 | * Parse the productions: |
no test coverage detected