d828bc4251
* 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
90 lines
2.3 KiB
Plaintext
90 lines
2.3 KiB
Plaintext
%{
|
|
/* Keyword definition for the GNU compiler for the Java(TM) language.
|
|
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
|
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
|
|
|
|
This file is part of GNU CC.
|
|
|
|
GNU CC is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
any later version.
|
|
|
|
GNU CC is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GNU CC; see the file COPYING. If not, write to
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA.
|
|
|
|
Java and all Java-based marks are trademarks or registered trademarks
|
|
of Sun Microsystems, Inc. in the United States and other countries.
|
|
The Free Software Foundation is independent of Sun Microsystems, Inc. */
|
|
|
|
%}
|
|
struct java_keyword { const char *name; int token; };
|
|
#ifdef __GNUC__
|
|
__inline
|
|
#endif
|
|
static unsigned int hash PARAMS ((const char *, unsigned int));
|
|
#ifdef __GNUC__
|
|
__inline
|
|
#endif
|
|
struct java_keyword *java_keyword PARAMS ((const char *, unsigned int));
|
|
%%
|
|
abstract, ABSTRACT_TK
|
|
default, DEFAULT_TK
|
|
if, IF_TK
|
|
private, PRIVATE_TK
|
|
throw, THROW_TK
|
|
boolean, BOOLEAN_TK
|
|
do, DO_TK
|
|
implements, IMPLEMENTS_TK
|
|
protected, PROTECTED_TK
|
|
throws, THROWS_TK
|
|
break, BREAK_TK
|
|
double, DOUBLE_TK
|
|
import, IMPORT_TK
|
|
public, PUBLIC_TK
|
|
transient, TRANSIENT_TK
|
|
byte, BYTE_TK
|
|
else, ELSE_TK
|
|
instanceof, INSTANCEOF_TK
|
|
return, RETURN_TK
|
|
try, TRY_TK
|
|
case, CASE_TK
|
|
extends, EXTENDS_TK
|
|
int, INT_TK
|
|
short, SHORT_TK
|
|
void, VOID_TK
|
|
catch, CATCH_TK
|
|
final, FINAL_TK
|
|
interface, INTERFACE_TK
|
|
static, STATIC_TK
|
|
volatile, VOLATILE_TK
|
|
char, CHAR_TK
|
|
finally, FINALLY_TK
|
|
long, LONG_TK
|
|
super, SUPER_TK
|
|
while, WHILE_TK
|
|
class, CLASS_TK
|
|
float, FLOAT_TK
|
|
native, NATIVE_TK
|
|
switch, SWITCH_TK
|
|
const, CONST_TK
|
|
for, FOR_TK
|
|
new, NEW_TK
|
|
synchronized, SYNCHRONIZED_TK
|
|
continue, CONTINUE_TK
|
|
goto, GOTO_TK
|
|
package, PACKAGE_TK
|
|
this, THIS_TK
|
|
strictfp, STRICT_TK
|
|
# true, false and null aren't keyword. But we match them easily this way
|
|
true, TRUE_TK
|
|
false, FALSE_TK
|
|
null, NULL_TK
|