lex.c (yylex): Added STRICT_TK case.
* lex.c (yylex): Added STRICT_TK case. * parse.y (STRICT_TK): Added. * parse-scan.y (STRICT_TK): Added. * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and `;'. Use 4, not 3, with -k option. Correctly rename resulting file. * keyword.h: Rebuilt. * keyword.gperf (strictfp): Added. From-SVN: r37594
This commit is contained in:
parent
4e7842a01e
commit
d828bc4251
@ -1,3 +1,14 @@
|
|||||||
|
2000-11-20 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* lex.c (yylex): Added STRICT_TK case.
|
||||||
|
* parse.y (STRICT_TK): Added.
|
||||||
|
* parse-scan.y (STRICT_TK): Added.
|
||||||
|
* Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
|
||||||
|
`;'. Use 4, not 3, with -k option. Correctly rename resulting
|
||||||
|
file.
|
||||||
|
* keyword.h: Rebuilt.
|
||||||
|
* keyword.gperf (strictfp): Added.
|
||||||
|
|
||||||
2000-11-20 Tom Tromey <tromey@cygnus.com>
|
2000-11-20 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
* lex.c (yylex): Recognize floating point constants with leading
|
* lex.c (yylex): Recognize floating point constants with leading
|
||||||
|
@ -89,12 +89,12 @@ $(srcdir)/java/parse-scan.c: $(srcdir)/java/parse-scan.y
|
|||||||
|
|
||||||
$(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf
|
$(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf
|
||||||
(cd $(srcdir)/java || exit 1; \
|
(cd $(srcdir)/java || exit 1; \
|
||||||
gperf -L C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$$ \
|
gperf -L C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$$ \
|
||||||
keyword.gperf > k$$$$.h || {
|
keyword.gperf > k$$$$.h || { \
|
||||||
echo "Please update gperf from ftp://ftp.gnu.org/pub/gnu/gperf/" >&2; \
|
echo "Please update gperf from ftp://ftp.gnu.org/pub/gnu/gperf/" >&2; \
|
||||||
rm -f k$$$$.h; \
|
rm -f k$$$$.h; \
|
||||||
exit 1; } \
|
exit 1; } ; \
|
||||||
mv -f k$$$$.h keyword.gperf)
|
mv -f k$$$$.h keyword.h)
|
||||||
|
|
||||||
# Executables built by this Makefile:
|
# Executables built by this Makefile:
|
||||||
JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
|
JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
|
||||||
|
@ -82,6 +82,7 @@ continue, CONTINUE_TK
|
|||||||
goto, GOTO_TK
|
goto, GOTO_TK
|
||||||
package, PACKAGE_TK
|
package, PACKAGE_TK
|
||||||
this, THIS_TK
|
this, THIS_TK
|
||||||
|
strictfp, STRICT_TK
|
||||||
# true, false and null aren't keyword. But we match them easily this way
|
# true, false and null aren't keyword. But we match them easily this way
|
||||||
true, TRUE_TK
|
true, TRUE_TK
|
||||||
false, FALSE_TK
|
false, FALSE_TK
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* C code produced by gperf version 2.7.1 (19981006 egcs) */
|
/* C code produced by gperf version 2.7 */
|
||||||
/* Command-line: gperf -L C -F , 0 -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$ keyword.gperf */
|
/* Command-line: gperf -L C -F , 0 -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$ keyword.gperf */
|
||||||
/* Keyword definition for the GNU compiler for the Java(TM) language.
|
/* Keyword definition for the GNU compiler for the Java(TM) language.
|
||||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||||
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
||||||
@ -35,12 +35,12 @@ __inline
|
|||||||
#endif
|
#endif
|
||||||
struct java_keyword *java_keyword PARAMS ((const char *, unsigned int));
|
struct java_keyword *java_keyword PARAMS ((const char *, unsigned int));
|
||||||
|
|
||||||
#define TOTAL_KEYWORDS 50
|
#define TOTAL_KEYWORDS 51
|
||||||
#define MIN_WORD_LENGTH 2
|
#define MIN_WORD_LENGTH 2
|
||||||
#define MAX_WORD_LENGTH 12
|
#define MAX_WORD_LENGTH 12
|
||||||
#define MIN_HASH_VALUE 6
|
#define MIN_HASH_VALUE 7
|
||||||
#define MAX_HASH_VALUE 86
|
#define MAX_HASH_VALUE 95
|
||||||
/* maximum key range = 81, duplicates = 0 */
|
/* maximum key range = 89, duplicates = 0 */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__inline
|
__inline
|
||||||
@ -52,40 +52,41 @@ hash (str, len)
|
|||||||
{
|
{
|
||||||
static unsigned char asso_values[] =
|
static unsigned char asso_values[] =
|
||||||
{
|
{
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 18, 37, 38,
|
96, 96, 96, 96, 96, 96, 96, 9, 17, 3,
|
||||||
27, 1, 30, 3, 12, 8, 87, 2, 11, 87,
|
1, 1, 20, 13, 15, 29, 96, 21, 1, 96,
|
||||||
8, 1, 5, 87, 24, 1, 1, 30, 2, 36,
|
35, 39, 1, 96, 15, 6, 2, 1, 41, 17,
|
||||||
87, 1, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 7, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
|
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
|
||||||
87, 87, 87, 87, 87, 87
|
96, 96, 96, 96, 96, 96
|
||||||
};
|
};
|
||||||
register int hval = len;
|
register int hval = len;
|
||||||
|
|
||||||
switch (hval)
|
switch (hval)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
case 4:
|
||||||
|
hval += asso_values[(unsigned char)str[3]];
|
||||||
case 3:
|
case 3:
|
||||||
hval += asso_values[(unsigned char)str[2]];
|
|
||||||
case 2:
|
case 2:
|
||||||
case 1:
|
case 1:
|
||||||
hval += asso_values[(unsigned char)str[0]];
|
hval += asso_values[(unsigned char)str[0]];
|
||||||
@ -104,70 +105,71 @@ java_keyword (str, len)
|
|||||||
{
|
{
|
||||||
static struct java_keyword wordlist[] =
|
static struct java_keyword wordlist[] =
|
||||||
{
|
{
|
||||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||||
{"try", TRY_TK},
|
|
||||||
{"else", ELSE_TK},
|
{"else", ELSE_TK},
|
||||||
{"short", SHORT_TK},
|
|
||||||
{"goto", GOTO_TK},
|
|
||||||
{"extends", EXTENDS_TK},
|
|
||||||
{"", 0}, {"", 0},
|
|
||||||
{"int", INT_TK},
|
|
||||||
{"this", THIS_TK},
|
|
||||||
{"", 0},
|
|
||||||
{"native", NATIVE_TK},
|
|
||||||
{"", 0}, {"", 0},
|
|
||||||
{"interface", INTERFACE_TK},
|
|
||||||
{"import", IMPORT_TK},
|
|
||||||
{"private", PRIVATE_TK},
|
|
||||||
{"volatile", VOLATILE_TK},
|
|
||||||
{"", 0},
|
|
||||||
{"implements", IMPLEMENTS_TK},
|
|
||||||
{"", 0},
|
|
||||||
{"long", LONG_TK},
|
|
||||||
{"switch", SWITCH_TK},
|
|
||||||
{"abstract", ABSTRACT_TK},
|
|
||||||
{"transient", TRANSIENT_TK},
|
|
||||||
{"do", DO_TK},
|
|
||||||
{"", 0},
|
|
||||||
{"throws", THROWS_TK},
|
|
||||||
{"", 0},
|
|
||||||
{"null", NULL_TK},
|
|
||||||
{"super", SUPER_TK},
|
|
||||||
{"true", TRUE_TK},
|
{"true", TRUE_TK},
|
||||||
{"float", FLOAT_TK},
|
|
||||||
{"", 0},
|
|
||||||
{"return", RETURN_TK},
|
|
||||||
{"if", IF_TK},
|
|
||||||
{"void", VOID_TK},
|
|
||||||
{"protected", PROTECTED_TK},
|
|
||||||
{"byte", BYTE_TK},
|
|
||||||
{"case", CASE_TK},
|
{"case", CASE_TK},
|
||||||
{"break", BREAK_TK},
|
{"", 0},
|
||||||
{"finally", FINALLY_TK},
|
{"public", PUBLIC_TK},
|
||||||
{"false", FALSE_TK},
|
{"try", TRY_TK},
|
||||||
{"synchronized", SYNCHRONIZED_TK},
|
{"protected", PROTECTED_TK},
|
||||||
{"instanceof", INSTANCEOF_TK},
|
|
||||||
{"while", WHILE_TK},
|
|
||||||
{"package", PACKAGE_TK},
|
|
||||||
{"const", CONST_TK},
|
|
||||||
{"boolean", BOOLEAN_TK},
|
|
||||||
{"final", FINAL_TK},
|
|
||||||
{"continue", CONTINUE_TK},
|
{"continue", CONTINUE_TK},
|
||||||
{"catch", CATCH_TK},
|
{"extends", EXTENDS_TK},
|
||||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
{"const", CONST_TK},
|
||||||
{"class", CLASS_TK},
|
|
||||||
{"static", STATIC_TK},
|
{"static", STATIC_TK},
|
||||||
{"double", DOUBLE_TK},
|
{"this", THIS_TK},
|
||||||
{"default", DEFAULT_TK},
|
{"default", DEFAULT_TK},
|
||||||
{"throw", THROW_TK},
|
{"class", CLASS_TK},
|
||||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
{"abstract", ABSTRACT_TK},
|
||||||
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
{"synchronized", SYNCHRONIZED_TK},
|
||||||
|
{"byte", BYTE_TK},
|
||||||
|
{"while", WHILE_TK},
|
||||||
|
{"double", DOUBLE_TK},
|
||||||
|
{"catch", CATCH_TK},
|
||||||
|
{"super", SUPER_TK},
|
||||||
|
{"short", SHORT_TK},
|
||||||
|
{"switch", SWITCH_TK},
|
||||||
|
{"package", PACKAGE_TK},
|
||||||
|
{"long", LONG_TK},
|
||||||
|
{"false", FALSE_TK},
|
||||||
|
{"", 0},
|
||||||
|
{"int", INT_TK},
|
||||||
|
{"final", FINAL_TK},
|
||||||
|
{"float", FLOAT_TK},
|
||||||
|
{"char", CHAR_TK},
|
||||||
{"for", FOR_TK},
|
{"for", FOR_TK},
|
||||||
{"", 0},
|
{"", 0},
|
||||||
{"new", NEW_TK},
|
{"interface", INTERFACE_TK},
|
||||||
{"char", CHAR_TK},
|
{"null", NULL_TK},
|
||||||
|
{"do", DO_TK},
|
||||||
|
{"finally", FINALLY_TK},
|
||||||
|
{"strictfp", STRICT_TK},
|
||||||
{"", 0},
|
{"", 0},
|
||||||
{"public", PUBLIC_TK}
|
{"implements", IMPLEMENTS_TK},
|
||||||
|
{"void", VOID_TK},
|
||||||
|
{"transient", TRANSIENT_TK},
|
||||||
|
{"", 0},
|
||||||
|
{"private", PRIVATE_TK},
|
||||||
|
{"if", IF_TK},
|
||||||
|
{"break", BREAK_TK},
|
||||||
|
{"throws", THROWS_TK},
|
||||||
|
{"", 0},
|
||||||
|
{"new", NEW_TK},
|
||||||
|
{"", 0},
|
||||||
|
{"return", RETURN_TK},
|
||||||
|
{"", 0},
|
||||||
|
{"volatile", VOLATILE_TK},
|
||||||
|
{"boolean", BOOLEAN_TK},
|
||||||
|
{"instanceof", INSTANCEOF_TK},
|
||||||
|
{"", 0},
|
||||||
|
{"throw", THROW_TK},
|
||||||
|
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||||
|
{"native", NATIVE_TK},
|
||||||
|
{"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||||
|
{"import", IMPORT_TK},
|
||||||
|
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||||
|
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
|
||||||
|
{"goto", GOTO_TK}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
|
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
|
||||||
|
@ -1495,7 +1495,7 @@ java_lex (java_lval)
|
|||||||
case PUBLIC_TK: case PROTECTED_TK: case STATIC_TK:
|
case PUBLIC_TK: case PROTECTED_TK: case STATIC_TK:
|
||||||
case ABSTRACT_TK: case FINAL_TK: case NATIVE_TK:
|
case ABSTRACT_TK: case FINAL_TK: case NATIVE_TK:
|
||||||
case SYNCHRONIZED_TK: case TRANSIENT_TK: case VOLATILE_TK:
|
case SYNCHRONIZED_TK: case TRANSIENT_TK: case VOLATILE_TK:
|
||||||
case PRIVATE_TK:
|
case PRIVATE_TK: case STRICT_TK:
|
||||||
SET_MODIFIER_CTX (kw->token);
|
SET_MODIFIER_CTX (kw->token);
|
||||||
return MODIFIER_TK;
|
return MODIFIER_TK;
|
||||||
case FLOAT_TK:
|
case FLOAT_TK:
|
||||||
|
@ -140,6 +140,7 @@ static void pop_class_context PARAMS ((void));
|
|||||||
%token STATIC_TK FINAL_TK SYNCHRONIZED_TK
|
%token STATIC_TK FINAL_TK SYNCHRONIZED_TK
|
||||||
%token VOLATILE_TK TRANSIENT_TK NATIVE_TK
|
%token VOLATILE_TK TRANSIENT_TK NATIVE_TK
|
||||||
%token PAD_TK ABSTRACT_TK MODIFIER_TK
|
%token PAD_TK ABSTRACT_TK MODIFIER_TK
|
||||||
|
%token STRICT_TK
|
||||||
|
|
||||||
/* Keep those two in order, too */
|
/* Keep those two in order, too */
|
||||||
%token DECR_TK INCR_TK
|
%token DECR_TK INCR_TK
|
||||||
|
@ -463,6 +463,7 @@ static tree currently_caught_type_list;
|
|||||||
%token STATIC_TK FINAL_TK SYNCHRONIZED_TK
|
%token STATIC_TK FINAL_TK SYNCHRONIZED_TK
|
||||||
%token VOLATILE_TK TRANSIENT_TK NATIVE_TK
|
%token VOLATILE_TK TRANSIENT_TK NATIVE_TK
|
||||||
%token PAD_TK ABSTRACT_TK MODIFIER_TK
|
%token PAD_TK ABSTRACT_TK MODIFIER_TK
|
||||||
|
%token STRICT_TK
|
||||||
|
|
||||||
/* Keep those two in order, too */
|
/* Keep those two in order, too */
|
||||||
%token DECR_TK INCR_TK
|
%token DECR_TK INCR_TK
|
||||||
|
Loading…
Reference in New Issue
Block a user