Modernize coding style: Avoid 'continue;' statements where possible.

* gettext-tools/src/cldr-plurals.c (extract_rules): Use if/else instead of
'continue;'.
* gettext-tools/src/msgfmt.c (msgfmt_operand_list_add_from_directory): Likewise.
* gettext-tools/src/read-po-lex.c (po_gram_lex): Likewise.
* gettext-tools/src/sentence.c (sentence_end): Likewise.
* gettext-tools/src/x-awk.c (extract_parenthesized): Use 'break;' instead of
'continue;'.
* gettext-tools/src/x-c.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-csharp.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-java.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-javascript.c (extract_balanced): Likewise.
* gettext-tools/src/x-lua.c (extract_balanced): Likewise.
* gettext-tools/src/x-modula2.c (extract_parenthesized): Likewise.
* gettext-tools/src/x-php.c (extract_balanced): Likewise.
* gettext-tools/src/x-python.c (extract_balanced): Likewise.
* gettext-tools/src/x-vala.c (extract_balanced): Likewise.
* gettext-tools/src/x-ycp.c (extract_parenthesized): Likewise.
This commit is contained in:
Bruno Haible 2025-12-11 10:38:17 +01:00
parent 387a2e083a
commit abb256e01e
15 changed files with 151 additions and 159 deletions

View File

@ -90,61 +90,60 @@ extract_rules (FILE *fp,
xmlNodePtr n2; xmlNodePtr n2;
bool found = false; bool found = false;
if (n->type != XML_ELEMENT_NODE if (n->type == XML_ELEMENT_NODE
|| !xmlStrEqual (n->name, BAD_CAST "pluralRules")) && xmlStrEqual (n->name, BAD_CAST "pluralRules"))
continue;
if (!xmlHasProp (n, BAD_CAST "locales"))
{ {
error_at_line (0, 0, if (!xmlHasProp (n, BAD_CAST "locales"))
logical_filename,
xmlGetLineNo (n),
_("The element <%s> does not have attribute <%s>"),
"pluralRules", "locales");
continue;
}
cp = locales = xmlGetProp (n, BAD_CAST "locales");
while (*cp != '\0')
{
while (c_isspace (*cp))
cp++;
if (xmlStrncmp (cp, BAD_CAST locale, locale_length) == 0
&& (*(cp + locale_length) == '\0'
|| c_isspace (*(cp + locale_length))))
{
found = true;
break;
}
while (*cp && !c_isspace (*cp))
cp++;
}
xmlFree (locales);
if (!found)
continue;
for (n2 = n->children; n2; n2 = n2->next)
{
if (n2->type != XML_ELEMENT_NODE
|| !xmlStrEqual (n2->name, BAD_CAST "pluralRule"))
continue;
if (!xmlHasProp (n2, BAD_CAST "count"))
{ {
error_at_line (0, 0, error_at_line (0, 0,
logical_filename, logical_filename,
xmlGetLineNo (n2), xmlGetLineNo (n),
_("The element <%s> does not have attribute <%s>"), _("The element <%s> does not have attribute <%s>"),
"pluralRule", "count"); "pluralRules", "locales");
break;
} }
else
{
cp = locales = xmlGetProp (n, BAD_CAST "locales");
while (*cp != '\0')
{
while (c_isspace (*cp))
cp++;
if (xmlStrncmp (cp, BAD_CAST locale, locale_length) == 0
&& (*(cp + locale_length) == '\0'
|| c_isspace (*(cp + locale_length))))
{
found = true;
break;
}
while (*cp && !c_isspace (*cp))
cp++;
}
xmlFree (locales);
xmlChar *count = xmlGetProp (n2, BAD_CAST "count"); if (found)
xmlChar *content = xmlNodeGetContent (n2); for (n2 = n->children; n2; n2 = n2->next)
sb_xappendf (&buffer, "%s: %s; ", count, content); {
xmlFree (count); if (n2->type == XML_ELEMENT_NODE
xmlFree (content); && xmlStrEqual (n2->name, BAD_CAST "pluralRule"))
{
if (!xmlHasProp (n2, BAD_CAST "count"))
{
error_at_line (0, 0,
logical_filename,
xmlGetLineNo (n2),
_("The element <%s> does not have attribute <%s>"),
"pluralRule", "count");
break;
}
xmlChar *count = xmlGetProp (n2, BAD_CAST "count");
xmlChar *content = xmlNodeGetContent (n2);
sb_xappendf (&buffer, "%s: %s; ", count, content);
xmlFree (count);
xmlFree (content);
}
}
}
} }
} }

View File

@ -1641,14 +1641,15 @@ msgfmt_operand_list_add_from_directory (msgfmt_operand_list_ty *operands,
ngettext ("found %d fatal error", "found %d fatal errors", ngettext ("found %d fatal error", "found %d fatal errors",
nerrors), nerrors),
nerrors); nerrors);
continue;
} }
else
{
/* Convert the messages to Unicode. */
iconv_message_list (mlp, NULL, po_charset_utf8, NULL,
textmode_xerror_handler);
/* Convert the messages to Unicode. */ msgfmt_operand_list_append (operands, language, mlp);
iconv_message_list (mlp, NULL, po_charset_utf8, NULL, }
textmode_xerror_handler);
msgfmt_operand_list_append (operands, language, mlp);
} }
string_list_destroy (&languages); string_list_destroy (&languages);

View File

@ -1217,14 +1217,13 @@ po_gram_lex (union PO_GRAM_STYPE *lval, struct po_parser_state *ps)
if (mb_iseq (mbc, '"')) if (mb_iseq (mbc, '"'))
break; break;
if (mb_iseq (mbc, '\\')) if (mb_iseq (mbc, '\\'))
buf[bufpos++] = control_sequence (ps);
else
{ {
buf[bufpos++] = control_sequence (ps); /* Add mbc to the accumulator. */
continue; memcpy_small (&buf[bufpos], mb_ptr (mbc), mb_len (mbc));
bufpos += mb_len (mbc);
} }
/* Add mbc to the accumulator. */
memcpy_small (&buf[bufpos], mb_ptr (mbc), mb_len (mbc));
bufpos += mb_len (mbc);
} }
buf[bufpos] = '\0'; buf[bufpos] = '\0';

View File

@ -80,10 +80,8 @@ sentence_end (const char *string, ucs4_t *ending_charp)
} }
str += length; str += length;
continue;
} }
else if (state == 1)
if (state == 1)
{ {
switch (uc) switch (uc)
{ {
@ -118,10 +116,8 @@ sentence_end (const char *string, ucs4_t *ending_charp)
} }
str += length; str += length;
continue;
} }
else if (state == 2)
if (state == 2)
{ {
switch (uc) switch (uc)
{ {
@ -155,10 +151,8 @@ sentence_end (const char *string, ucs4_t *ending_charp)
} }
str += length; str += length;
continue;
} }
else if (state == 4)
if (state == 4)
{ {
switch (uc) switch (uc)
{ {
@ -183,7 +177,6 @@ sentence_end (const char *string, ucs4_t *ending_charp)
} }
str += length; str += length;
continue;
} }
} }

View File

@ -792,7 +792,7 @@ extract_parenthesized (message_list_ty *mlp,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH) if (++nesting_depth > MAX_NESTING_DEPTH)
@ -811,7 +811,7 @@ extract_parenthesized (message_list_ty *mlp,
next_is_argument = false; next_is_argument = false;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -828,7 +828,7 @@ extract_parenthesized (message_list_ty *mlp,
next_is_argument = false; next_is_argument = false;
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string: case token_type_string:
{ {
@ -855,7 +855,7 @@ extract_parenthesized (message_list_ty *mlp,
next_is_argument = false; next_is_argument = false;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_i18nstring: case token_type_i18nstring:
{ {
@ -870,7 +870,7 @@ extract_parenthesized (message_list_ty *mlp,
next_is_argument = false; next_is_argument = false;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_semicolon: case token_type_semicolon:
/* An argument list ends, and a new statement begins. */ /* An argument list ends, and a new statement begins. */
@ -889,7 +889,7 @@ extract_parenthesized (message_list_ty *mlp,
flag_context_list_iterator_advance ( flag_context_list_iterator_advance (
&context_iter)); &context_iter));
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -900,7 +900,7 @@ extract_parenthesized (message_list_ty *mlp,
next_is_argument = false; next_is_argument = false;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -2335,7 +2335,7 @@ extract_parenthesized (message_list_ty *mlp,
token.string, token_string_len + 1)); token.string, token_string_len + 1));
} }
free (token.string); free (token.string);
continue; break;
case xgettext_token_type_lparen: case xgettext_token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH) if (++nesting_depth > MAX_NESTING_DEPTH)
@ -2354,7 +2354,7 @@ extract_parenthesized (message_list_ty *mlp,
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
selectorcall_context_iter = null_context_list_iterator; selectorcall_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case xgettext_token_type_rparen: case xgettext_token_type_rparen:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -2371,7 +2371,7 @@ extract_parenthesized (message_list_ty *mlp,
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
selectorcall_context_iter = passthrough_context_list_iterator; selectorcall_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case xgettext_token_type_colon: case xgettext_token_type_colon:
if (objc_extensions) if (objc_extensions)
@ -2390,7 +2390,7 @@ extract_parenthesized (message_list_ty *mlp,
selectorcall_context_iter = null_context_list_iterator; selectorcall_context_iter = null_context_list_iterator;
} }
state = 0; state = 0;
continue; break;
case xgettext_token_type_string_literal: case xgettext_token_type_string_literal:
{ {
@ -2413,13 +2413,13 @@ extract_parenthesized (message_list_ty *mlp,
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
selectorcall_context_iter = null_context_list_iterator; selectorcall_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case xgettext_token_type_other: case xgettext_token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
selectorcall_context_iter = null_context_list_iterator; selectorcall_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case xgettext_token_type_eof: case xgettext_token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);

View File

@ -2016,7 +2016,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
next_context_iter = flag_context_list_iterator (context_list); next_context_iter = flag_context_list_iterator (context_list);
free (sum); free (sum);
continue; break;
} }
case token_type_lparen: case token_type_lparen:
@ -2036,7 +2036,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
paren_nesting_depth--; paren_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
if (terminator == token_type_rparen) if (terminator == token_type_rparen)
@ -2051,7 +2051,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
_("')' found where '}' was expected")); _("')' found where '}' was expected"));
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbrace: case token_type_lbrace:
if (++brace_nesting_depth > MAX_NESTING_DEPTH) if (++brace_nesting_depth > MAX_NESTING_DEPTH)
@ -2070,7 +2070,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
brace_nesting_depth--; brace_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rbrace: case token_type_rbrace:
if (terminator == token_type_rbrace) if (terminator == token_type_rbrace)
@ -2085,7 +2085,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
_("'}' found where ')' was expected")); _("'}' found where ')' was expected"));
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -2096,7 +2096,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string_literal: case token_type_string_literal:
case token_type_template: case token_type_template:
@ -2123,7 +2123,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
drop_reference (token.comment); drop_reference (token.comment);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -2139,7 +2139,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -1801,7 +1801,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
} }
free (sum); free (sum);
continue; break;
} }
case token_type_lparen: case token_type_lparen:
@ -1841,7 +1841,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
if (terminator == token_type_rparen) if (terminator == token_type_rparen)
@ -1856,7 +1856,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
_("')' found where '}' was expected")); _("')' found where '}' was expected"));
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbrace: case token_type_lbrace:
if (++brace_nesting_depth > MAX_NESTING_DEPTH) if (++brace_nesting_depth > MAX_NESTING_DEPTH)
@ -1875,7 +1875,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
brace_nesting_depth--; brace_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rbrace: case token_type_rbrace:
if (terminator == token_type_rbrace) if (terminator == token_type_rbrace)
@ -1890,7 +1890,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
_("'}' found where ')' was expected")); _("'}' found where ')' was expected"));
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -1899,7 +1899,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_conditional: case token_type_conditional:
/* In an expression A ? B : C, each of A, B, C is a distinct /* In an expression A ? B : C, each of A, B, C is a distinct
@ -1912,7 +1912,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_colon: case token_type_colon:
/* In an expression A ? B : C, each of A, B, C is a distinct /* In an expression A ? B : C, each of A, B, C is a distinct
@ -1921,7 +1921,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_assign: case token_type_assign:
/* In an expression A = B, A and B are distinct sub-regions. /* In an expression A = B, A and B are distinct sub-regions.
@ -1931,7 +1931,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_plus: case token_type_plus:
case token_type_operator: case token_type_operator:
@ -1947,7 +1947,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
inner_region->inherit_from_parent_region = false; inner_region->inherit_from_parent_region = false;
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string_literal: case token_type_string_literal:
{ {
@ -1973,7 +1973,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
drop_reference (token.comment); drop_reference (token.comment);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_semicolon: case token_type_semicolon:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -1984,7 +1984,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
} }
else else
return false; return false;
@ -1999,7 +1999,7 @@ extract_parenthesized (message_list_ty *mlp, token_type_ty terminator,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -1896,7 +1896,7 @@ extract_balanced (message_list_ty *mlp,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++paren_nesting_depth > MAX_NESTING_DEPTH) if (++paren_nesting_depth > MAX_NESTING_DEPTH)
@ -1915,7 +1915,7 @@ extract_balanced (message_list_ty *mlp,
paren_nesting_depth--; paren_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
if (delim == token_type_rparen || delim == token_type_eof) if (delim == token_type_rparen || delim == token_type_eof)
@ -1926,7 +1926,7 @@ extract_balanced (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -1937,7 +1937,7 @@ extract_balanced (message_list_ty *mlp,
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbracket: case token_type_lbracket:
if (++bracket_nesting_depth > MAX_NESTING_DEPTH) if (++bracket_nesting_depth > MAX_NESTING_DEPTH)
@ -1956,7 +1956,7 @@ extract_balanced (message_list_ty *mlp,
bracket_nesting_depth--; bracket_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rbracket: case token_type_rbracket:
if (delim == token_type_rbracket || delim == token_type_eof) if (delim == token_type_rbracket || delim == token_type_eof)
@ -1967,7 +1967,7 @@ extract_balanced (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbrace: case token_type_lbrace:
if (++brace_nesting_depth > MAX_NESTING_DEPTH) if (++brace_nesting_depth > MAX_NESTING_DEPTH)
@ -1986,7 +1986,7 @@ extract_balanced (message_list_ty *mlp,
brace_nesting_depth--; brace_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rbrace: case token_type_rbrace:
if (delim == token_type_rbrace || delim == token_type_eof) if (delim == token_type_rbrace || delim == token_type_eof)
@ -1997,7 +1997,7 @@ extract_balanced (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string: case token_type_string:
case token_type_template: case token_type_template:
@ -2067,7 +2067,7 @@ extract_balanced (message_list_ty *mlp,
drop_reference (token.comment); drop_reference (token.comment);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_xml_element_start: case token_type_xml_element_start:
if (++xml_element_nesting_depth > MAX_NESTING_DEPTH) if (++xml_element_nesting_depth > MAX_NESTING_DEPTH)
@ -2086,7 +2086,7 @@ extract_balanced (message_list_ty *mlp,
xml_element_nesting_depth--; xml_element_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_xml_element_end: case token_type_xml_element_end:
if (delim == token_type_xml_element_end || delim == token_type_eof) if (delim == token_type_xml_element_end || delim == token_type_eof)
@ -2097,7 +2097,7 @@ extract_balanced (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -2118,7 +2118,7 @@ extract_balanced (message_list_ty *mlp,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -1069,7 +1069,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++paren_nesting_depth > MAX_NESTING_DEPTH) if (++paren_nesting_depth > MAX_NESTING_DEPTH)
@ -1100,7 +1100,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbracket: case token_type_lbracket:
if (++bracket_nesting_depth > MAX_NESTING_DEPTH) if (++bracket_nesting_depth > MAX_NESTING_DEPTH)
@ -1131,7 +1131,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -1142,7 +1142,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -1187,7 +1187,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
drop_reference (token.comment); drop_reference (token.comment);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_dot: case token_type_dot:
case token_type_doubledot: case token_type_doubledot:
@ -1197,7 +1197,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -683,7 +683,7 @@ extract_parenthesized (message_list_ty *mlp,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH) if (++nesting_depth > MAX_NESTING_DEPTH)
@ -701,7 +701,7 @@ extract_parenthesized (message_list_ty *mlp,
nesting_depth--; nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -717,7 +717,7 @@ extract_parenthesized (message_list_ty *mlp,
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string_literal: case token_type_string_literal:
{ {
@ -743,7 +743,7 @@ extract_parenthesized (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -755,7 +755,7 @@ extract_parenthesized (message_list_ty *mlp,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -1757,7 +1757,7 @@ extract_balanced (struct php_extractor *xp,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++(xp->paren_nesting_depth) > MAX_NESTING_DEPTH) if (++(xp->paren_nesting_depth) > MAX_NESTING_DEPTH)
@ -1776,7 +1776,7 @@ extract_balanced (struct php_extractor *xp,
xp->paren_nesting_depth--; xp->paren_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
if (delim == token_type_rparen || delim == token_type_eof) if (delim == token_type_rparen || delim == token_type_eof)
@ -1787,7 +1787,7 @@ extract_balanced (struct php_extractor *xp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -1798,7 +1798,7 @@ extract_balanced (struct php_extractor *xp,
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbracket: case token_type_lbracket:
if (++(xp->bracket_nesting_depth) > MAX_NESTING_DEPTH) if (++(xp->bracket_nesting_depth) > MAX_NESTING_DEPTH)
@ -1817,7 +1817,7 @@ extract_balanced (struct php_extractor *xp,
xp->bracket_nesting_depth--; xp->bracket_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rbracket: case token_type_rbracket:
if (delim == token_type_rbracket || delim == token_type_eof) if (delim == token_type_rbracket || delim == token_type_eof)
@ -1828,7 +1828,7 @@ extract_balanced (struct php_extractor *xp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string_literal: case token_type_string_literal:
{ {
@ -1854,7 +1854,7 @@ extract_balanced (struct php_extractor *xp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_dot: case token_type_dot:
case token_type_operator1: case token_type_operator1:
@ -1862,7 +1862,7 @@ extract_balanced (struct php_extractor *xp,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);

View File

@ -1764,7 +1764,7 @@ extract_balanced (message_list_ty *mlp,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++paren_nesting_depth > MAX_NESTING_DEPTH) if (++paren_nesting_depth > MAX_NESTING_DEPTH)
@ -1783,7 +1783,7 @@ extract_balanced (message_list_ty *mlp,
paren_nesting_depth--; paren_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
if (delim == token_type_rparen || delim == token_type_eof) if (delim == token_type_rparen || delim == token_type_eof)
@ -1794,7 +1794,7 @@ extract_balanced (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -1805,7 +1805,7 @@ extract_balanced (message_list_ty *mlp,
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_lbracket: case token_type_lbracket:
if (++bracket_nesting_depth > MAX_NESTING_DEPTH) if (++bracket_nesting_depth > MAX_NESTING_DEPTH)
@ -1824,7 +1824,7 @@ extract_balanced (message_list_ty *mlp,
bracket_nesting_depth--; bracket_nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rbracket: case token_type_rbracket:
if (delim == token_type_rbracket || delim == token_type_eof) if (delim == token_type_rbracket || delim == token_type_eof)
@ -1835,7 +1835,7 @@ extract_balanced (message_list_ty *mlp,
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string: case token_type_string:
case token_type_498: case token_type_498:
@ -1862,7 +1862,7 @@ extract_balanced (message_list_ty *mlp,
drop_reference (token.comment); drop_reference (token.comment);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -1876,7 +1876,7 @@ extract_balanced (message_list_ty *mlp,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -1410,7 +1410,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
flag_context_list_table, flag_context_list_table,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free (token.string); free (token.string);
continue; break;
case token_type_lparen: case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH) if (++nesting_depth > MAX_NESTING_DEPTH)
@ -1463,7 +1463,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_comma: case token_type_comma:
arg++; arg++;
@ -1472,7 +1472,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_question: case token_type_question:
/* In an expression A ? B : C, each of A, B, C is a distinct /* In an expression A ? B : C, each of A, B, C is a distinct
@ -1485,7 +1485,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_colon: case token_type_colon:
/* In an expression A ? B : C, each of A, B, C is a distinct /* In an expression A ? B : C, each of A, B, C is a distinct
@ -1494,7 +1494,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_assign: case token_type_assign:
/* In an expression A = B, A and B are distinct sub-regions. /* In an expression A = B, A and B are distinct sub-regions.
@ -1504,7 +1504,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
inner_region = new_sub_region (outer_region, curr_context); inner_region = new_sub_region (outer_region, curr_context);
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_plus: case token_type_plus:
case token_type_arithmetic_operator: case token_type_arithmetic_operator:
@ -1523,7 +1523,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
inner_region->inherit_from_parent_region = false; inner_region->inherit_from_parent_region = false;
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_semicolon: case token_type_semicolon:
arglist_parser_done (argparser, arg); arglist_parser_done (argparser, arg);
@ -1574,12 +1574,12 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
drop_reference (token.comment); drop_reference (token.comment);
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_return: case token_type_return:
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_character_constant: case token_type_character_constant:
case token_type_lbrace: case token_type_lbrace:
@ -1590,7 +1590,7 @@ extract_balanced (message_list_ty *mlp, token_type_ty delim,
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
default: default:
abort (); abort ();

View File

@ -669,7 +669,7 @@ extract_parenthesized (message_list_ty *mlp,
nesting_depth--; nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_string_literal: case token_type_string_literal:
if (state == 1) if (state == 1)
@ -719,7 +719,7 @@ extract_parenthesized (message_list_ty *mlp,
state = 0; state = 0;
} }
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
continue; break;
case token_type_symbol: case token_type_symbol:
next_context_iter = next_context_iter =
@ -729,7 +729,7 @@ extract_parenthesized (message_list_ty *mlp,
token.string, strlen (token.string))); token.string, strlen (token.string)));
free_token (&token); free_token (&token);
state = 0; state = 0;
continue; break;
case token_type_lparen: case token_type_lparen:
if (++nesting_depth > MAX_NESTING_DEPTH) if (++nesting_depth > MAX_NESTING_DEPTH)
@ -745,7 +745,7 @@ extract_parenthesized (message_list_ty *mlp,
nesting_depth--; nesting_depth--;
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_rparen: case token_type_rparen:
unref_region (inner_region); unref_region (inner_region);
@ -762,12 +762,12 @@ extract_parenthesized (message_list_ty *mlp,
flag_context_list_iterator_advance ( flag_context_list_iterator_advance (
&context_iter)); &context_iter));
next_context_iter = passthrough_context_list_iterator; next_context_iter = passthrough_context_list_iterator;
continue; break;
case token_type_other: case token_type_other:
next_context_iter = null_context_list_iterator; next_context_iter = null_context_list_iterator;
state = 0; state = 0;
continue; break;
case token_type_eof: case token_type_eof:
unref_region (inner_region); unref_region (inner_region);