From: Kirill Simonov Date: Thu, 31 Jul 2008 20:41:02 +0000 (+0000) Subject: Fixed grammar in error messages (from YAML::XS::LibYAML). X-Git-Tag: upstream/0.1.2^2~8 X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/commitdiff_plain/6be8109b82eb483032ef336ef9bd2972590e0113 Fixed grammar in error messages (from YAML::XS::LibYAML). --- diff --git a/src/parser.c b/src/parser.c index 81122f6..4d4d3b7 100644 --- a/src/parser.c +++ b/src/parser.c @@ -319,7 +319,7 @@ yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event) if (token->type != YAML_STREAM_START_TOKEN) { return yaml_parser_set_parser_error(parser, - "did not found expected ", token->start_mark); + "did not find expected ", token->start_mark); } parser->state = YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE; @@ -393,7 +393,7 @@ yaml_parser_parse_document_start(yaml_parser_t *parser, yaml_event_t *event, if (!token) goto error; if (token->type != YAML_DOCUMENT_START_TOKEN) { yaml_parser_set_parser_error(parser, - "did not found expected ", token->start_mark); + "did not find expected ", token->start_mark); goto error; } if (!PUSH(parser, parser->states, YAML_PARSE_DOCUMENT_END_STATE)) @@ -701,7 +701,7 @@ yaml_parser_parse_node(yaml_parser_t *parser, yaml_event_t *event, yaml_parser_set_parser_error_context(parser, (block ? "while parsing a block node" : "while parsing a flow node"), start_mark, - "did not found expected node content", token->start_mark); + "did not find expected node content", token->start_mark); goto error; } } @@ -771,7 +771,7 @@ yaml_parser_parse_block_sequence_entry(yaml_parser_t *parser, { return yaml_parser_set_parser_error_context(parser, "while parsing a block collection", POP(parser, parser->marks), - "did not found expected '-' indicator", token->start_mark); + "did not find expected '-' indicator", token->start_mark); } } @@ -881,7 +881,7 @@ yaml_parser_parse_block_mapping_key(yaml_parser_t *parser, { return yaml_parser_set_parser_error_context(parser, "while parsing a block mapping", POP(parser, parser->marks), - "did not found expected key", token->start_mark); + "did not find expected key", token->start_mark); } } @@ -975,7 +975,7 @@ yaml_parser_parse_flow_sequence_entry(yaml_parser_t *parser, else { return yaml_parser_set_parser_error_context(parser, "while parsing a flow sequence", POP(parser, parser->marks), - "did not found expected ',' or ']'", token->start_mark); + "did not find expected ',' or ']'", token->start_mark); } } @@ -1127,7 +1127,7 @@ yaml_parser_parse_flow_mapping_key(yaml_parser_t *parser, else { return yaml_parser_set_parser_error_context(parser, "while parsing a flow mapping", POP(parser, parser->marks), - "did not found expected ',' or '}'", token->start_mark); + "did not find expected ',' or '}'", token->start_mark); } } diff --git a/src/scanner.c b/src/scanner.c index 4792dfd..f96a9f4 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1078,7 +1078,7 @@ yaml_parser_stale_simple_keys(yaml_parser_t *parser) if (simple_key->required) { return yaml_parser_set_scanner_error(parser, "while scanning a simple key", simple_key->mark, - "could not found expected ':'"); + "could not find expected ':'"); } simple_key->possible = 0; @@ -1147,7 +1147,7 @@ yaml_parser_remove_simple_key(yaml_parser_t *parser) if (simple_key->required) { return yaml_parser_set_scanner_error(parser, "while scanning a simple key", simple_key->mark, - "could not found expected ':'"); + "could not find expected ':'"); } } @@ -2072,7 +2072,7 @@ yaml_parser_scan_directive(yaml_parser_t *parser, yaml_token_t *token) if (!IS_BREAKZ(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not found expected comment or line break"); + start_mark, "did not find expected comment or line break"); goto error; } @@ -2126,7 +2126,7 @@ yaml_parser_scan_directive_name(yaml_parser_t *parser, if (string.start == string.pointer) { yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "cannot found expected directive name"); + start_mark, "could not find expected directive name"); goto error; } @@ -2472,7 +2472,7 @@ yaml_parser_scan_tag(yaml_parser_t *parser, yaml_token_t *token) if (!IS_BLANKZ(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not found expected whitespace or line break"); + start_mark, "did not find expected whitespace or line break"); goto error; } @@ -2826,7 +2826,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token, if (!IS_BREAKZ(parser->buffer)) { yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not found expected comment or line break"); + start_mark, "did not find expected comment or line break"); goto error; }