8sa1-gcc/gcc/java/keyword.gperf
Kaveh R. Ghazi be245ac0a0 gjavah.c (print_name, [...]): Add static prototype.
* gjavah.c (print_name, print_base_classname, utf8_cmp,
	cxx_keyword_subst, generate_access, name_is_method_p,
	get_field_name, print_field_name, super_class_name, print_include,
	decode_signature_piece, print_class_decls, usage, help,
	java_no_argument, version, add_namelet, print_namelet): Add static
	prototype.
	(print_base_classname, utf8_cmp, cxx_keyword_subst,
	name_is_method_p): Constify a char*.
	(get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
	Provide a final else clause in an if-else-if.
	(print_field_info): Add missing final arg in function call to
	`print_field_name'.
	(print_method_info, decompile_method, decode_signature_piece,
	print_c_decl, print_full_cxx_name, print_stub,
	print_mangled_classname, super_class_name, print_include,
	add_namelet, add_class_decl, print_class_decls, process_file,
	help): Constify a char*.

	* jcf-write.c (jcf_handler, push_constant1, push_constant2,
	push_int_const, find_constant_wide, find_constant_index,
	push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
	emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
	emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
	emit_if, emit_goto, emit_jsr, call_cleanups,
	make_class_file_name): Add static prototypes.
	(generate_bytecode_return, generate_bytecode_insns): Pass a
	NULL_PTR, not a NULL_TREE.

	* jv-scan.c: Include "jcf.h".
	(main): Declare using DEFUN macro.

	* jvspec.c (find_spec_file, lang_specific_pre_link,
	lang_specific_driver): Add prototypes.
	(find_spec_file): Constify a char*.

	* keyword.gperf (hash, java_keyword): Add prototypes.

	* lang.c (lang_print_error): Add static prototype.
	(lang_init): Prefer memcpy over bcopy to avoid casts.

	* lex.c (yylex): Add static prototype.

	* parse-scan.y: Include "lex.c" earlier.

	* parse.h: Remove redundant declaration for `yylex'.

	* parse.y (java_decl_equiv, binop_compound_p, search_loop,
	labeled_block_contains_loop_p): Add static prototypes.
	(not_accessible_p): Make static to match prototype.

	* verify.c (start_pc_cmp): Don't needlessly cast away const.

From-SVN: r28862
1999-08-25 13:59:28 +00:00

89 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
# true, false and null aren't keyword. But we match them easily this way
true, TRUE_TK
false, FALSE_TK
null, NULL_TK