+/* A set of macros to push/pop/access the currently parsed class. */
+#define GET_CPC_LIST() ctxp->current_parsed_class
+
+/* Currently class being parsed is an inner class if an enclosing
+ class has been already pushed. This truth value is only valid prior
+ an inner class is pushed. After, use FIXME. */
+#define CPC_INNER_P() GET_CPC_LIST ()
+
+/* The TYPE_DECL node of the class currently being parsed. */
+#define GET_CPC() TREE_VALUE (GET_CPC_LIST ())
+
+/* Get the currently parsed class unqualified IDENTIFIER_NODE. */
+#define GET_CPC_UN() TREE_PURPOSE (GET_CPC_LIST ())
+
+/* Get a parsed class unqualified IDENTIFIER_NODE from its CPC node. */
+#define GET_CPC_UN_NODE(N) TREE_PURPOSE (N)
+
+/* Get the currently parsed class DECL_TYPE from its CPC node. */
+#define GET_CPC_DECL_NODE(N) TREE_VALUE (N)
+
+/* The currently parsed enclosing currently parsed TREE_LIST node. */
+#define GET_ENCLOSING_CPC() TREE_CHAIN (GET_CPC_LIST ())
+
+/* Get the next enclosing context. */
+#define GET_NEXT_ENCLOSING_CPC(C) TREE_CHAIN (C)
+
+/* The DECL_TYPE node of the enclosing currently parsed
+ class. NULL_TREE if the currently parsed class isn't an inner
+ class. */
+#define GET_ENCLOSING_CPC_CONTEXT() (GET_ENCLOSING_CPC () ? \
+ TREE_VALUE (GET_ENCLOSING_CPC ()) : \
+ NULL_TREE)
+
+/* Make sure that innerclass T sits in an appropriate enclosing
+ context. */
+#define INNER_ENCLOSING_SCOPE_CHECK(T) \
+ (INNER_CLASS_TYPE_P ((T)) && !ANONYMOUS_CLASS_P ((T)) \
+ && ((current_this \
+ /* We have a this and it's not the right one */ \
+ && (DECL_CONTEXT (TYPE_NAME ((T))) \
+ != TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this)))) \
+ && !inherits_from_p (TREE_TYPE (TREE_TYPE (current_this)), \
+ TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T)))) \
+ && !common_enclosing_instance_p (TREE_TYPE (TREE_TYPE (current_this)),\
+ (T)) \
+ && INNER_CLASS_TYPE_P (TREE_TYPE (TREE_TYPE (current_this))) \
+ && !inherits_from_p \
+ (TREE_TYPE (DECL_CONTEXT \
+ (TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this))))),\
+ TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T))))) \
+ /* We don't have a this, which is OK if the current function is \
+ static. */ \
+ || (!current_this \
+ && current_function_decl \
+ && ! METHOD_STATIC (current_function_decl))))
+
+/* Push macro. First argument to PUSH_CPC is a DECL_TYPE, second
+ argument is the unqualified currently parsed class name. */
+#define PUSH_CPC(C,R) { \
+ ctxp->current_parsed_class = \
+ tree_cons ((R), (C), GET_CPC_LIST ()); \
+ }
+
+/* In case of an error, push an error. */
+#define PUSH_ERROR() PUSH_CPC (error_mark_node, error_mark_node)
+
+/* Pop macro. Before we pop, we link the current inner class decl (if any)
+ to its enclosing class. */
+#define POP_CPC() { \
+ link_nested_class_to_enclosing (); \
+ ctxp->current_parsed_class = \
+ TREE_CHAIN (GET_CPC_LIST ()); \
+ }
+
+#define DEBUG_CPC() \
+ do \
+ { \
+ tree tmp = ctxp->current_parsed_class; \
+ while (tmp) \
+ { \
+ fprintf (stderr, "%s ", \
+ IDENTIFIER_POINTER (TREE_PURPOSE (tmp))); \
+ tmp = TREE_CHAIN (tmp); \
+ } \
+ } \
+ while (0);
+
+/* Access to the various initializer statement lists */
+#define CPC_INITIALIZER_LIST(C) ((C)->non_static_initialized)
+#define CPC_STATIC_INITIALIZER_LIST(C) ((C)->static_initialized)
+#define CPC_INSTANCE_INITIALIZER_LIST(C) ((C)->instance_initializers)
+
+/* Access to the various initializer statements */
+#define CPC_INITIALIZER_STMT(C) (TREE_PURPOSE (CPC_INITIALIZER_LIST (C)))
+#define CPC_STATIC_INITIALIZER_STMT(C) \
+ (TREE_PURPOSE (CPC_STATIC_INITIALIZER_LIST (C)))
+#define CPC_INSTANCE_INITIALIZER_STMT(C) \
+ (TREE_PURPOSE (CPC_INSTANCE_INITIALIZER_LIST (C)))
+
+/* Set various initializer statements */
+#define SET_CPC_INITIALIZER_STMT(C,S) \
+ if (CPC_INITIALIZER_LIST (C)) \
+ TREE_PURPOSE (CPC_INITIALIZER_LIST (C)) = (S);
+#define SET_CPC_STATIC_INITIALIZER_STMT(C,S) \
+ if (CPC_STATIC_INITIALIZER_LIST (C)) \
+ TREE_PURPOSE (CPC_STATIC_INITIALIZER_LIST (C)) = (S);
+#define SET_CPC_INSTANCE_INITIALIZER_STMT(C,S) \
+ if (CPC_INSTANCE_INITIALIZER_LIST(C)) \
+ TREE_PURPOSE (CPC_INSTANCE_INITIALIZER_LIST (C)) = (S);
+
+/* This is used by the lexer to communicate with the parser. It is
+ set on an integer constant if the radix is NOT 10, so that the parser
+ can correctly diagnose a numeric overflow. */
+#define JAVA_NOT_RADIX10_FLAG(NODE) TREE_LANG_FLAG_0(NODE)
+