blob: 4127588fee8b1996526434fd24d970f3a94c3aa8 [file] [log] [blame]
%{
/* Keyword definition for the GNU compiler for the Java(TM) language.
Copyright (C) 1997, 1998, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
This file is part of GCC.
GCC 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.
GCC 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 GCC; 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 *const name; const int token; };
#ifdef __GNUC__
__inline
#endif
static unsigned int hash (const char *, unsigned int);
#ifdef __GNUC__
__inline
#endif
const struct java_keyword *java_keyword (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
assert, ASSERT_TK