From 498e2ad3f2d55bc42b4506848d67adfedf89946e Mon Sep 17 00:00:00 2001 From: apbianco Date: Wed, 13 Jan 1999 04:01:43 +0000 Subject: Wed Jan 13 01:24:54 1999 Alexandre Petit-Bianco * class.c (maybe_layout_super_class): Fixed returned value. * lex.c: Added 1999 to the copyright. (java_init_lex): Initialize java_lang_imported. * lex.h: Added 1999 to the copyright. * parse.h: Added 1999 to the copyright. (REGISTER_IMPORT): Fixed typo in trailing macro. (CURRENT_OSB): New macro. (struct parser_ctxt): New fields osb_depth, osb_limit. * parse.y (java_lang_id): New global variable. (type_import_on_demand_declaration): Don't import java.lang.* twice. (array_creation_expression:): Use CURRENT_OSB. (dims:): Uses a stack to keep track of array dimensions. (cast_expression:): Use CURRENT_OSB. (find_expr_with_wfl): Return NULL if node found doesn't meet the conditions. (register_fields): Fixed typos in comment. (check_method_redefinition): Fixed comment indentation. (java_check_regular_methods): Set saved found wfl to NULL after having reinstalled it in the previously found DECL_NAME. Fix an array dimension counting bug and some random other ones. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24648 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/parse.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc/java/parse.h') diff --git a/gcc/java/parse.h b/gcc/java/parse.h index 88f2dcb00d5..4cebd5b8659 100644 --- a/gcc/java/parse.h +++ b/gcc/java/parse.h @@ -569,7 +569,7 @@ static jdeplist *reverse_jdep_list (); ctxp->deprecated = 0; \ } -/* Register an impor */ +/* Register an import */ #define REGISTER_IMPORT(WHOLE, NAME) \ { \ IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P ((NAME)) = 1; \ @@ -577,6 +577,9 @@ static jdeplist *reverse_jdep_list (); TREE_CHAIN (node) = ctxp->import_list; \ ctxp->import_list = node; \ } + +/* Macro to access the osb (opening square bracket) count */ +#define CURRENT_OSB(C) (C)->osb_number [(C)->osb_depth] /* Parser context data structure. */ struct parser_ctxt { @@ -592,7 +595,9 @@ struct parser_ctxt { int first_ccb_indent1; /* First { at ident level 1 */ int last_ccb_indent1; /* Last } at ident level 1 */ int parser_ccb_indent; /* Keep track of {} indent, parser */ - int osb_number; /* Keep track of ['s */ + int osb_depth; /* Current depth of [ in an expression */ + int osb_limit; /* Limit of this depth */ + int *osb_number; /* Keep track of ['s */ int minus_seen; /* Integral literal overflow */ int lineno; /* Current lineno */ int java_error_flag; /* Report error when true */ -- cgit v1.2.3