/* xgettext C/C++/ObjectiveC backend.
- Copyright (C) 1995-1998, 2000-2009, 2012-2015, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2009, 2012-2015, 2018-2020 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
logical_file_name = xstrdup (logical_filename);
line_number = 1;
- newline_count = 0;
+ phase1_pushback_length = 0;
+ phase2_pushback_length = 0;
+ phase3_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
+ newline_count = 0;
+
+ phase5_pushback_length = 0;
+ phase6_pushback_length = 0;
flag_context_list_table = flag_table;
/* xgettext C# backend.
- Copyright (C) 2003-2009, 2011, 2014, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003-2009, 2011, 2014, 2018-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+
lexical_context = lc_outside;
+ phase2_pushback_length = 0;
+
logical_line_number = 1;
+
+ phase3_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
+ phase5_pushback_length = 0;
+ phase6_pushback_length = 0;
+ phase7_pushback_length = 0;
+
flag_context_list_table = flag_table;
init_keywords ();
/* xgettext Java backend.
- Copyright (C) 2003, 2005-2009, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005-2009, 2018-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+ phase2_pushback_length = 0;
+ phase3_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
+ phase5_pushback_length = 0;
+ phase6_pushback_length = 0;
phase6_last = token_type_eof;
flag_context_list_table = flag_table;
/* xgettext JavaScript backend.
- Copyright (C) 2002-2003, 2005-2009, 2013-2014, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2009, 2013-2014, 2018-2020 Free Software Foundation, Inc.
This file was written by Andreas Stricker <andy@knitter.ch>, 2010
It's based on x-python from Bruno Haible.
/* Tracking whether the current line is a continuation line or contains a
non-blank character. */
-static bool continuation_or_nonblank_line = false;
+static bool continuation_or_nonblank_line;
/* Phase 3: Outside strings, replace backslash-newline with nothing and a
static token_ty phase5_pushback[2];
static int phase5_pushback_length;
-static token_type_ty last_token_type = token_type_other;
+static token_type_ty last_token_type;
static void
phase5_scan_regexp (void)
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+
lexical_context = lc_outside;
+ phase2_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
- template_literal_depth = 0;
- new_brace_depth_level ();
- xml_element_depth = 0;
- inside_embedded_js_in_xml = false;
-
xgettext_current_file_source_encoding =
(xgettext_global_source_encoding != NULL ? xgettext_global_source_encoding :
po_charset_ascii);
continuation_or_nonblank_line = false;
+ phase5_pushback_length = 0;
+ last_token_type = token_type_other;
+
+ template_literal_depth = 0;
+ new_brace_depth_level ();
+ xml_element_depth = 0;
+ inside_embedded_js_in_xml = false;
+
flag_context_list_table = flag_table;
init_keywords ();
/* xgettext Lua backend.
- Copyright (C) 2012-2013, 2016, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2012-2013, 2016, 2018-2020 Free Software Foundation, Inc.
This file was written by Ľubomír Remák <lubomirr@lubomirr.eu>, 2012.
static unsigned char phase1_pushback[2];
static int phase1_pushback_length;
-static int first_character = 1;
+static bool first_character;
static int
phase1_getc ()
if (first_character)
{
- first_character = 0;
+ first_character = false;
/* Ignore shebang line. No pushback required in this case. */
if (c == '#')
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+ first_character = true;
+
last_comment_line = -1;
last_non_comment_line = -1;
+ phase3_pushback_length = 0;
+
+ phase4_last = token_type_eof;
+ phase4_pushback_length = 0;
+
flag_context_list_table = flag_table;
init_keywords ();
/* xgettext Perl backend.
- Copyright (C) 2002-2010, 2013, 2016, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2010, 2013, 2016, 2018-2020 Free Software Foundation, Inc.
This file was written by Guido Flohr <guido@imperia.net>, 2002-2010.
/* The current line buffer. */
static char *linebuf;
+/* The size of the input buffer. */
+static size_t linebuf_size;
/* The size of the current line. */
static int linesize;
/* The position in the current line. */
static int linepos;
-/* The size of the input buffer. */
-static size_t linebuf_size;
-
/* Number of lines eaten for here documents. */
static int eaten_here;
logical_file_name = xstrdup (logical_filename);
line_number = 0;
+ linesize = 0;
+ linepos = 0;
+ eaten_here = 0;
+ end_of_file = false;
+
last_comment_line = -1;
last_non_comment_line = -1;
flag_context_list_table = flag_table;
- init_keywords ();
+ /* Safe assumption. */
+ last_token_type = token_type_semicolon;
token_stack.items = NULL;
token_stack.nitems = 0;
token_stack.nitems_max = 0;
- linesize = 0;
- linepos = 0;
- eaten_here = 0;
- end_of_file = false;
- /* Safe assumption. */
- last_token_type = token_type_semicolon;
+ init_keywords ();
/* Eat tokens until eof is seen. When extract_balanced returns
due to an unbalanced closing brace, just restart it. */
/* xgettext PHP backend.
- Copyright (C) 2001-2003, 2005-2010, 2014, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010, 2014, 2018-2020 Free Software Foundation, Inc.
This file was written by Bruno Haible <bruno@clisp.org>, 2002.
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+#if 0
+ phase2_pushback_length = 0;
+#endif
+
last_comment_line = -1;
last_non_comment_line = -1;
+ phase3_pushback_length = 0;
+ phase4_pushback_length = 0;
+
phase5_last = token_type_eof;
flag_context_list_table = flag_table;
/* xgettext Python backend.
- Copyright (C) 2002-2003, 2005-2011, 2013-2014, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2011, 2013-2014, 2018-2020 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
/* Tracking whether the current line is a continuation line or contains a
non-blank character. */
-static bool continuation_or_nonblank_line = false;
+static bool continuation_or_nonblank_line;
/* Phase 3: Outside strings, replace backslash-newline with nothing and a
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+
lexical_context = lc_outside;
+ phase2_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
open_pbb = 0;
+ phase5_pushback_length = 0;
+
flag_context_list_table = flag_table;
init_keywords ();
/* xgettext sh backend.
- Copyright (C) 2003, 2005-2009, 2014, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005-2009, 2014, 2018-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
open_doublequote = false;
open_singlequote = false;
+ phase2_pushback_length = 0;
+
flag_context_list_table = flag_table;
init_keywords ();
/* xgettext Smalltalk backend.
- Copyright (C) 2002-2003, 2005-2009, 2011, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2009, 2011, 2018-2020 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
last_comment_line = -1;
last_non_comment_line = -1;
+ phase2_pushback_length = 0;
+ phase3_pushback_length = 0;
+
/* Eat tokens until eof is seen. */
{
/* 0 when no "NLS" has been seen.
/* xgettext Tcl backend.
- Copyright (C) 2002-2003, 2005-2009, 2013, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2009, 2013, 2018-2020 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2002.
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+ phase2_pushback_length = 0;
+
/* Initially, no brace is open. */
brace_depth = 1000000;
/* xgettext Vala backend.
- Copyright (C) 2013-2014, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2013-2014, 2018-2020 Free Software Foundation, Inc.
This file was written by Daiki Ueno <ueno@gnu.org>, 2013.
static int phase3_pushback_length;
-static token_type_ty last_token_type = token_type_other;
+static token_type_ty last_token_type;
static void
phase3_scan_regex ()
logical_file_name = xstrdup (logical_filename);
line_number = 1;
+ phase1_pushback_length = 0;
+
last_comment_line = -1;
last_non_comment_line = -1;
+ phase3_pushback_length = 0;
+ last_token_type = token_type_other;
+
flag_context_list_table = flag_table;
init_keywords ();
/* xgettext YCP backend.
- Copyright (C) 2001-2003, 2005-2009, 2011, 2018-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2009, 2011, 2018-2020 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>, 2001.
last_comment_line = -1;
last_non_comment_line = -1;
+ phase2_pushback_length = 0;
+ phase5_pushback_length = 0;
+ phase8_pushback_length = 0;
+
flag_context_list_table = flag_table;
/* Eat tokens until eof is seen. When extract_parenthesized returns