xgettext: Perl: Recognize strings with embedded expressions.
* gettext-tools/src/x-perl.c (enum token_type_ty, token_ty,
struct token_stack_ty): Moved.
(struct perl_extractor): New type.
(fp, linebuf, linebuf_size, linesize, linepos, eaten_here, end_of_file,
last_comment_line, last_non_comment_line, nesting_depth, last_token_type,
token_stack): Remove variables.
(perl_extractor_init_rest): New function.
(phase1_getc): Add a 'struct perl_extractor *' parameter. Read from a string
if fp == NULL.
(phase1_ungetc, get_here_document, skip_pod, phase2_getc, phase2_ungetc,
extract_quotelike_pass1, extract_quotelike_pass1_utf8): Add a
'struct perl_extractor *' parameter.
(extract_perl_input): New declaration.
(extract_quotelike): Add a 'struct perl_extractor *' parameter.
(extract_triple_quotelike): Add a 'struct perl_extractor *' parameter. Remove
mlp parameter.
(extract_quotelike_pass3): Add a 'struct perl_extractor *' parameter.
(extract_variable): Add a 'struct perl_extractor *' parameter. Remove mlp
parameter.
(interpolate_keywords): Likewise. Rename states wait_quote → seen_lbrace,
dquote → lbrace_dquote, squote → lbrace_squote, barekey → lbrace_barekey. Add
handling of bracket-enclosed expressions in strings.
(x_perl_prelex, x_perl_lex): Add a 'struct perl_extractor *' parameter. Remove
mlp parameter.
(x_perl_unlex): Add a 'struct perl_extractor *' parameter.
(collect_message, extract_balanced): Add a 'struct perl_extractor *' parameter.
Remove mlp parameter.
(extract_perl_input): New function, extracted from extract_perl.
(extract_perl): Use it. Create a 'struct perl_extractor'.
* gettext-tools/tests/xgettext-perl-5: Add tests of strings with embedded
expressions.
* NEWS: Mention the change.