$ ./configure CC="gcc --coverage" CPPFLAGS=-Wall
Why in the source directory?
Because in a VPATH build, there are more files that create trouble in
- steps 4 and 5 (po-gram-gen.[yc], cldr-plurals.[yc], and more).
+ steps 4 and 5 (read-po-gram.[yc], cldr-plurals.[yc], and more).
2. Compile:
$ make
- where to look for i18n files,
- which file types are to be considered by i18n,
- which files are explicitly not i18n (e.g. generated files like
- src/po-gram-gen.c)
+ src/read-po-gram.c)
- Generating sr@latin PO file automatically from sr.po.
../src/write-catalog.c \
../src/write-po.c \
../src/po-charset.c \
- ../src/po-lex.c \
- ../src/po-gram-gen.c \
../src/read-catalog-special.c \
../src/read-catalog-abstract.c \
../src/read-catalog.c \
../src/read-po.c \
+ ../src/read-po-lex.c \
+ ../src/read-po-gram.c \
../src/plural-table.c \
../src/format-c.c \
../src/format-c++-brace.c \
#include "xalloc.h"
#include "read-catalog.h"
#include "read-po.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "write-catalog.h"
#include "write-po.h"
#include "xerror.h"
# List of files which contain translatable strings.
-# Copyright (C) 1995-2023 Free Software Foundation, Inc.
+# Copyright (C) 1995-2024 Free Software Foundation, Inc.
# This file is free software, distributed under GNU GPL v3+.
# For updating this file, look at the result of:
src/msguniq.c
src/open-catalog.c
src/po-charset.c
-src/po-gram-gen.y
-src/po-lex.c
src/po-xerror.c
src/read-catalog.c
src/read-csharp.c
src/read-desktop.c
src/read-java.c
src/read-mo.c
+src/read-po-gram.y
+src/read-po-lex.c
src/read-properties.c
src/read-resources.c
src/read-stringtable.c
| po-charset.c
| Charset handling while reading PO files.
|
-| po-lex.h
-| po-lex.c
-| Lexical analysis of PO files.
-|
| read-catalog-special.h
| read-catalog-special.c
| Parsing of special comments (#, comments).
|
| read-catalog-abstract.h
-| po-gram.h
-| po-gram-gen.y
+| read-po-internal.h
+| read-po-lex.h
+| read-po-lex.c
+| read-po-gram.y
| read-po.h
| read-po.c
| read-properties.h
| .strings files.
| read-catalog-abstract.h
| General parser structure.
-| po-gram.h
-| po-gram-gen.y
-| Parsing of PO files, based on po-lex.{h,c}.
+| read-po-internal.h
+| read-po-lex.h
+| read-po-lex.c
+| Lexical analysis of PO files.
+| read-po-gram.y
+| Parsing of PO files, based on read-po-lex.{h,c}.
| read-po.h
| read-po.c
| Parsing of PO files.
endif
noinst_HEADERS = \
- pos.h message.h po-error.h po-xerror.h po-gram.h po-charset.h \
- po-lex.h open-catalog.h read-catalog-special.h \
+ pos.h message.h po-error.h po-xerror.h read-po-internal.h po-charset.h \
+ read-po-lex.h open-catalog.h read-catalog-special.h \
read-catalog-abstract.h read-catalog.h read-catalog-file.h \
read-po.h read-properties.h read-stringtable.h \
str-list.h \
write-catalog.h write-po.h write-properties.h write-stringtable.h \
- dir-list.h file-list.h po-gram-gen.h cldr-plural.h \
+ dir-list.h file-list.h read-po-gram.h cldr-plural.h \
cldr-plural-exp.h locating-rule.h its.h search-path.h \
msgl-charset.h msgl-equal.h msgl-iconv.h msgl-ascii.h msgl-ofn.h msgl-cat.h \
msgl-header.h msgl-english.h msgl-check.h msgl-fsearch.h msgfmt.h msgunfmt.h \
# All programs must read PO files. (msgunfmt also, for read-java.c,
# read-csharp.c and read-resources.c.)
# message.c -> str-list.c.
-# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> str-list.c.
-# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> po-charset.c.
-# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> message.c -> str-list.c.
+# (read-catalog-abstract.c <--> read-po-gram.y <--> read-po-lex.c) -> str-list.c.
+# (read-catalog-abstract.c <--> read-po-gram.y <--> read-po-lex.c) -> po-charset.c.
+# (read-catalog-abstract.c <--> read-po-gram.y <--> read-po-lex.c) -> message.c -> str-list.c.
# read-catalog-file.c -> open-catalog.c -> dir-list.c -> str-list.c.
COMMON_SOURCE = message.c pos.c po-error.c po-xerror.c \
-read-catalog-abstract.c po-lex.c po-gram-gen.y po-charset.c \
+read-catalog-abstract.c read-po-lex.c read-po-gram.y po-charset.c \
read-po.c read-properties.c read-stringtable.c open-catalog.c \
dir-list.c str-list.c
# taken from libunistring, when the configure option --with-libunistring-prefix
# was given.
# Need @LTLIBINTL@ because many source files use gettext().
-# Need @LTLIBICONV@ because po-charset.c, po-lex.c, msgl-iconv.c, write-po.c
-# use iconv().
+# Need @LTLIBICONV@ because po-charset.c, read-po-lex.c, msgl-iconv.c,
+# write-po.c use iconv().
libgettextsrc_la_LDFLAGS = \
-release @VERSION@ \
../gnulib-lib/libgettextlib.la $(LTLIBUNISTRING) $(LT_LIBTEXTSTYLE) @LTLIBINTL@ @LTLIBICONV@ -lc -no-undefined
# postprocess the generated files and we don't want that unpostprocessed files
# remain in place if the user interrupts the build through Ctrl-C.
-po-gram-gen.c po-gram-gen.h: po-gram-gen.y
- $(AM_V_YACC)$(BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/po-gram-gen.y \
+read-po-gram.c read-po-gram.h: read-po-gram.y
+ $(AM_V_YACC)$(BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/read-po-gram.y \
&& test ':' = '$(BISON)' || { \
- sed -e 's|".*/po-gram-gen\.y"|"po-gram-gen.y"|' \
- -e 's|"po-gram-gen\.tab\.c"|"po-gram-gen.c"|' \
- -e 's|"po-gram-gen\.tab\.h"|"po-gram-gen.h"|' \
- < po-gram-gen.tab.c > po-gram-gen.c-tmp \
- && sed -e 's|".*/po-gram-gen\.y"|"po-gram-gen.y"|' \
- -e 's|"po-gram-gen\.tab\.h"|"po-gram-gen.h"|' \
- < po-gram-gen.tab.h > po-gram-gen.h-tmp \
- && rm -f po-gram-gen.tab.c po-gram-gen.tab.h \
- && mv po-gram-gen.c-tmp $(srcdir)/po-gram-gen.c \
- && mv po-gram-gen.h-tmp $(srcdir)/po-gram-gen.h; \
+ sed -e 's|".*/read-po-gram\.y"|"read-po-gram.y"|' \
+ -e 's|"read-po-gram\.tab\.c"|"read-po-gram.c"|' \
+ -e 's|"read-po-gram\.tab\.h"|"read-po-gram.h"|' \
+ < read-po-gram.tab.c > read-po-gram.c-tmp \
+ && sed -e 's|".*/read-po-gram\.y"|"read-po-gram.y"|' \
+ -e 's|"read-po-gram\.tab\.h"|"read-po-gram.h"|' \
+ < read-po-gram.tab.h > read-po-gram.h-tmp \
+ && rm -f read-po-gram.tab.c read-po-gram.tab.h \
+ && mv read-po-gram.c-tmp $(srcdir)/read-po-gram.c \
+ && mv read-po-gram.h-tmp $(srcdir)/read-po-gram.h; \
}
-BUILT_SOURCES += po-gram-gen.c po-gram-gen.h
-MOSTLYCLEANFILES += po-gram-gen.tab.c po-gram-gen.tab.h po-gram-gen.c-tmp po-gram-gen.h-tmp
-MAINTAINERCLEANFILES += po-gram-gen.c po-gram-gen.h
-EXTRA_DIST += po-gram-gen.c po-gram-gen.h
+BUILT_SOURCES += read-po-gram.c read-po-gram.h
+MOSTLYCLEANFILES += read-po-gram.tab.c read-po-gram.tab.h read-po-gram.c-tmp read-po-gram.h-tmp
+MAINTAINERCLEANFILES += read-po-gram.c read-po-gram.h
+EXTRA_DIST += read-po-gram.c read-po-gram.h
cldr-plural.c cldr-plural.h: cldr-plural.y
# This Makefile contains rules which don't work with parallel make,
-# namely those which build textstyle.h, po-gram-gen.c, cldr-plural.c.
+# namely those which build textstyle.h, read-po-gram.c, cldr-plural.c.
# See <https://lists.gnu.org/archive/html/bug-make/2019-05/msg00011.html>.
# So, turn off parallel execution in this Makefile.
.NOTPARALLEL:
#include "message.h"
#include "read-catalog-file.h"
#include "read-po.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "xmalloca.h"
#include "open-catalog.h"
#include "read-catalog-file.h"
#include "read-po.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "read-desktop.h"
po_gram_error_at_line (name_pos,
_("'domain %s' directive ignored"), name);
- /* NAME was allocated in po-gram-gen.y but is not used anywhere. */
+ /* NAME was allocated in read-po-gram.y but is not used anywhere. */
free (name);
}
}
#include "message.h"
#include "read-catalog-file.h"
#include "read-po.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "write-catalog.h"
/* ========================================================================= */
-/* Callbacks used by po-gram-gen.y, read-properties.c, read-stringtable.c,
+/* Callbacks used by read-po-gram.y, read-properties.c, read-stringtable.c,
indirectly from catalog_reader_parse. */
catalog_reader_free (abstract_catalog_reader_ty *catr);
-/* Callbacks used by po-gram-gen.y, read-properties.c, read-stringtable.c,
+/* Callbacks used by read-po-gram.y, read-properties.c, read-stringtable.c,
indirectly from catalog_reader_parse. */
/* This callback is called whenever a domain directive has been seen.
It invokes the 'directive_domain' method. */
#include <string.h>
#include "po-charset.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "po-xerror.h"
#include "xalloc.h"
#include "read-catalog-special.h"
po_gram_error_at_line (name_pos,
_("this file may not contain domain directives"));
- /* NAME was allocated in po-gram-gen.y but is not used anywhere. */
+ /* NAME was allocated in read-po-gram.y but is not used anywhere. */
free (name);
}
}
_("this is the location of the first definition"));
}
/* We don't need the just constructed entries' parameter string
- (allocated in po-gram-gen.y). */
+ (allocated in read-po-gram.y). */
free (msgid);
if (msgid_plural != NULL)
free (msgid_plural);
#endif
/* Specification. */
-#include "po-gram.h"
+#include "read-po-internal.h"
#include <stdbool.h>
#include <stdio.h>
#include <error.h>
#include "str-list.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "po-charset.h"
#include "xalloc.h"
#include "gettext.h"
/* ----- Output variables ----- */
- /* ----- Local variables of po-lex.c ----- */
+ /* ----- Local variables of read-po-lex.c ----- */
/* The PO file's encoding, as specified in the header entry. */
const char *po_lex_charset;
bool po_lex_obsolete;
bool po_lex_previous;
- /* ----- Local variables of po-gram-gen.y ----- */
+ /* ----- Local variables of read-po-gram.y ----- */
long plural_counter;
};
#endif
/* Specification. */
-#include "po-lex.h"
+#include "read-po-lex.h"
#include <errno.h>
#include <limits.h>
#include "pos.h"
#include "message.h"
#include "str-list.h"
-#include "po-gram.h"
-#include "po-gram-gen.h"
+#include "read-po-internal.h"
+#include "read-po-gram.h"
#define _(str) gettext(str)
/* Return the next token in the PO file. The return codes are defined
- in "po-gram-gen2.h". Associated data is put in 'po_gram_lval'. */
+ in "read-po-gram.h". Associated data is put in 'po_gram_lval'. */
int
po_gram_lex (union PO_GRAM_STYPE *lval, struct po_parser_state *ps)
{
struct po_parser_state;
-/* Global variables from po-lex.c. */
+/* Global variables from read-po-lex.c. */
/* Number of parse errors within a PO file that cause the program to
terminate. Cf. error_message_count, declared in <error.h>. */
extern void lex_end (struct po_parser_state *ps);
/* Return the next token in the PO file. The return codes are defined
- in "po-gram-gen.h". Associated data is put in '*lval'. */
+ in "read-po-gram.h". Associated data is put in '*lval'. */
union PO_GRAM_STYPE;
extern int po_gram_lex (union PO_GRAM_STYPE *lval, struct po_parser_state *ps);
/* Specification. */
#include "read-po.h"
-#include "po-lex.h"
-#include "po-gram.h"
+#include "read-po-lex.h"
+#include "read-po-internal.h"
/* Read a .po / .pot file from a stream, and dispatch to the various
#include "open-catalog.h"
#include "read-catalog-abstract.h"
#include "read-po.h"
-#include "po-lex.h"
+#include "read-po-lex.h"
#include "message.h"
#include "pos.h"
#include "po-charset.h"