summaryrefslogtreecommitdiff
path: root/gcc/java/gen-table.pl
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-24 02:14:49 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-24 02:14:49 +0000
commit7e3e53bc047a1695b044e163a639556d768b8717 (patch)
treed282aebf536e61a47d7f1fade565cbb3e83027e2 /gcc/java/gen-table.pl
parent1284b439665ea3f9c925b46f41cb8822c36a625e (diff)
downloadgcc-7e3e53bc047a1695b044e163a639556d768b8717.tar.gz
* lang-options.h: Added -Wdeprecated.
* gcj.texi (Warnings): Document -Wdeprecated. * java-tree.h (flag_deprecated): Declare. * lang.c (lang_W_options): Added deprecated. (flag_deprecated): New global. * chartables.h: Rebuilt. * gen-table.pl (process_one): Look at whitespace. (print_tables): Define LETTER_SPACE, LETTER_MASK. * parse.h (CLEAR_DEPRECATED): New macro. (CHECK_DEPRECATED_NO_RESET): New macro. * jcf-parse.c (handle_deprecated): New function. (HANDLE_DEPRECATED_ATTRIBUTE): New define. * jcf-reader.c (get_attribute): Handle Deprecated attribute. * parse.y (resolve_type_during_patch): Check deprecation. (jdep_resolve_class): Likewise. (process_imports): Likewise. (resolve_expression_name): Likewise. (check_deprecation): Strip arrays from decl. Check flag_deprecated. (patch_method_invocation): Also check the particular constructor for deprecation. (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop. * jcf-write.c (append_deprecated_attribute): New function. (generate_classfile): Generate deprecated attribute when appropriate. * lex.c (java_parse_doc_section): Return type now void. Rewrote. (java_lex) [case '*']: Simplify logic. (java_start_char_p): Use LETTER_MASK. (java_part_char_p): Likewise. (java_space_char_p): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63350 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/gen-table.pl')
-rw-r--r--gcc/java/gen-table.pl36
1 files changed, 22 insertions, 14 deletions
diff --git a/gcc/java/gen-table.pl b/gcc/java/gen-table.pl
index 98d003ca60b..df06687f4d4 100644
--- a/gcc/java/gen-table.pl
+++ b/gcc/java/gen-table.pl
@@ -1,6 +1,6 @@
#! /usr/bin/perl
-# Copyright (C) 2000, 2001 Free Software Foundation
+# Copyright (C) 2000, 2001, 2003 Free Software Foundation
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -130,7 +130,7 @@ sub process_one
{
my ($code, @fields) = @_;
- my $value = '';
+ my @value = ();
my $type = $fields[$CATEGORY];
# See if the character is a valid identifier start.
@@ -138,7 +138,7 @@ sub process_one
|| $type eq 'Pc' # Connecting punctuation
|| $type eq 'Sc') # Currency symbol
{
- $value = 'LETTER_START';
+ push (@value, 'LETTER_START');
}
# See if the character is a valid identifier member.
@@ -159,23 +159,29 @@ sub process_one
&& $code <= 0x206f)
|| $code == 0xfeff) # ZWNBSP
{
- if ($value eq '')
- {
- $value = 'LETTER_PART';
- }
- else
- {
- $value = 'LETTER_PART | ' . $value;
- }
+ push (@value, 'LETTER_PART');
+ }
+
+ if (($type =~ /Z./
+ # Java treats some values specially as non-spaces.
+ && $code != 0x00a0
+ && $code != 0x2007
+ && $code != 0x202f)
+ # And for our purposes there are some that should be specially
+ # treated as spaces.
+ || $code == 0x000b
+ || ($code >= 0x001c && $code <= 0x001f))
+ {
+ push (@value, 'LETTER_SPACE');
}
- if ($value eq '')
+ if (! @value)
{
$value = '0';
}
else
{
- $value = '(' . $value . ')';
+ $value = '(' . join (' | ', @value) . ')';
}
$map[$code] = $value;
@@ -196,7 +202,9 @@ sub print_tables
print OUT "#define GCC_CHARTABLES_H\n\n";
print OUT "#define LETTER_START 1\n";
- print OUT "#define LETTER_PART 2\n\n";
+ print OUT "#define LETTER_PART 2\n";
+ print OUT "#define LETTER_SPACE 4\n\n";
+ print OUT "#define LETTER_MASK 7\n\n";
for ($count = 0; $count <= $last; $count += 256)
{