diff options
author | Zack Weinberg <zack@codesourcery.com> | 2004-10-06 04:47:42 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2004-10-06 04:47:42 +0000 |
commit | d5706a1eea67117c5b76a33ec42ce96ad4ba399a (patch) | |
tree | 5a3ce60061200b7754e09f04fceb0b0f6076a700 /gcc/java | |
parent | 12cde21b1201cee86d4fd2c87aa8f40fb09b667e (diff) | |
download | gcc-d5706a1eea67117c5b76a33ec42ce96ad4ba399a.zip gcc-d5706a1eea67117c5b76a33ec42ce96ad4ba399a.tar.gz gcc-d5706a1eea67117c5b76a33ec42ce96ad4ba399a.tar.bz2 |
pretty-print.c: Include tree.h.
* pretty-print.c: Include tree.h.
(pp_base_prepare_to_format): New function, logic from
text_specifies_location.
(pp_base_format_text): Use gcc_assert.
* pretty-print.h (pp_prepare_to_format): New macro.
(pp_base_prepare_to_format): Prototype.
* diagnostic.c (text_specifies_location): Delete.
(bug_report_request): Delete.
(diagnostic_set_info): Don't call text_specifies_location.
(diagnostic_action_after_output): Put text from
bug_report_request inline here. Use gcc_unreachable.
(diagnostic_report_current_function): Fix comment.
(diagnostic_report_diagnostic): Clarify logic for error recursion.
Call pp_prepare_to_format before diagnostic_starter.
(trim_filename): Use IS_DIR_SEPARATOR.
(fatal_error, internal_error): Use gcc_unreachable.
(error_recursion): Call diagnostic_action_after_output to
issue the bug_report_request message and exit.
* Makefile.in (diagnostic.o, pretty-print.o): Update dependencies.
* c-parse.in: Add list of diagnostic messages to insulate
translation template from version of yacc/bison used to
compile the grammar.
java:
* parse.y, parse-scan.y: Add list of diagnostic messages to
insulate translation template from version of yacc/bison used
to compile the grammar.
treelang:
* parse.y: Add list of diagnostic messages to insulate
translation template from version of yacc/bison used to
compile the grammar.
po:
* gcc.pot: Regenerate.
From-SVN: r88590
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/java/parse-scan.y | 17 | ||||
-rw-r--r-- | gcc/java/parse.y | 17 |
3 files changed, 41 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 56ac57e..d28ee2c 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2004-10-05 Zack Weinberg <zack@codesourcery.com> + + * parse.y, parse-scan.y: Add list of diagnostic messages to + insulate translation template from version of yacc/bison used + to compile the grammar. + 2004-10-05 Ranjit Mathew <rmathew@hotmail.com> Prepare for %q, %< and %> in diagnostic message strings. @@ -230,7 +236,7 @@ Fix bootstrap. * gjavah.c (free_method_name_list): Fix function definition so it's a proper C prototype. - + 2004-09-21 Tom Tromey <tromey@redhat.com> PR java/17575: diff --git a/gcc/java/parse-scan.y b/gcc/java/parse-scan.y index e05fdb5..f3f5faa 100644 --- a/gcc/java/parse-scan.y +++ b/gcc/java/parse-scan.y @@ -1360,3 +1360,20 @@ yyerror (const char *msg ATTRIBUTE_UNUSED) fprintf (stderr, "%s: %d: %s\n", input_filename, input_line, msg); exit (1); } + +#ifdef __XGETTEXT__ +/* Depending on the version of Bison used to compile this grammar, + it may issue generic diagnostics spelled "syntax error" or + "parse error". To prevent this from changing the translation + template randomly, we list all the variants of this particular + diagnostic here. Translators: there is no fine distinction + between diagnostics with "syntax error" in them, and diagnostics + with "parse error" in them. It's okay to give them both the same + translation. */ +const char d1[] = N_("syntax error"); +const char d2[] = N_("parse error"); +const char d3[] = N_("syntax error; also virtual memory exhausted"); +const char d4[] = N_("parse error; also virtual memory exhausted"); +const char d5[] = N_("syntax error: cannot back up"); +const char d6[] = N_("parse error: cannot back up"); +#endif diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 5544cae..95bd93a 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -16409,5 +16409,22 @@ emit_test_initialization (void **entry_p, void *info) return true; } +#ifdef __XGETTEXT__ +/* Depending on the version of Bison used to compile this grammar, + it may issue generic diagnostics spelled "syntax error" or + "parse error". To prevent this from changing the translation + template randomly, we list all the variants of this particular + diagnostic here. Translators: there is no fine distinction + between diagnostics with "syntax error" in them, and diagnostics + with "parse error" in them. It's okay to give them both the same + translation. */ +const char d1[] = N_("syntax error"); +const char d2[] = N_("parse error"); +const char d3[] = N_("syntax error; also virtual memory exhausted"); +const char d4[] = N_("parse error; also virtual memory exhausted"); +const char d5[] = N_("syntax error: cannot back up"); +const char d6[] = N_("parse error: cannot back up"); +#endif + #include "gt-java-parse.h" #include "gtype-java.h" |