xgettext: PHP: Recognize strings with embedded expressions.
* gettext-tools/src/x-php.c (enum token_type_ty, struct token_ty): Moved.
(struct php_extractor): New type.
(fp, phase1_pushback, phase1_pushback_length, phase2_pushback,
phase2_pushback_length, buffer, bufmax, buflen, last_comment_line,
last_non_comment_line, phase3_pushback, phase3_pushback_length,
phase4_pushback, phase4_pushback_length, phase5_last, paren_nesting_depth,
bracket_nesting_depth): Remove variables.
(php_extractor_init_rest): New function.
(extract_php_input): New declaration.
(phase1_getc): Add a 'struct php_extractor *' parameter. Read from a string
if fp == NULL.
(phase1_ungetc, skip_html, comment_start, comment_add, comment_line_end,
phase3_getc, phase3_ungetc): Add a 'struct php_extractor *' parameter.
(phase4_get): Likewise. Add handling of embedded expressions in strings.
(phase4_unget, x_php_lex): Add a 'struct php_extractor *' parameter.
(extract_balanced): Add a 'struct php_extractor *' parameter. Remove mlp
parameter.
(extract_php_input): New function, extracted from extract_php.
(extract_php): Use it. Create a 'struct php_extractor'.
* gettext-tools/tests/xgettext-php-1: Add tests of strings with embedded
expressions.
* NEWS: Mention the change.