]>
Commit | Line | Data |
---|---|---|
377029eb | 1 | /* Language parser definitions for the GNU compiler for the Java(TM) language. |
f1717362 | 2 | Copyright (C) 1997-2016 Free Software Foundation, Inc. |
377029eb | 3 | Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) |
4 | ||
7d82ed5e | 5 | This file is part of GCC. |
377029eb | 6 | |
7d82ed5e | 7 | GCC is free software; you can redistribute it and/or modify |
377029eb | 8 | it under the terms of the GNU General Public License as published by |
e4b52719 | 9 | the Free Software Foundation; either version 3, or (at your option) |
377029eb | 10 | any later version. |
11 | ||
7d82ed5e | 12 | GCC is distributed in the hope that it will be useful, |
377029eb | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
e4b52719 | 18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. | |
377029eb | 20 | |
21 | Java and all Java-based marks are trademarks or registered trademarks | |
22 | of Sun Microsystems, Inc. in the United States and other countries. | |
23 | The Free Software Foundation is independent of Sun Microsystems, Inc. */ | |
24 | ||
2a281353 | 25 | #ifndef GCC_JAVA_PARSE_H |
26 | #define GCC_JAVA_PARSE_H | |
377029eb | 27 | |
377029eb | 28 | /* Extern global variable declarations */ |
377029eb | 29 | extern struct obstack temporary_obstack; |
377029eb | 30 | |
23b7f2e1 | 31 | #ifdef VERBOSE_SKELETON |
377029eb | 32 | #undef SOURCE_FRONTEND_DEBUG |
33 | #define SOURCE_FRONTEND_DEBUG(X) \ | |
34 | {if (!quiet_flag) {printf ("* "); printf X; putchar ('\n');} } | |
35 | #else | |
36 | #define SOURCE_FRONTEND_DEBUG(X) | |
37 | #endif | |
38 | ||
377029eb | 39 | /* Types classification, according to the JLS, section 4.2 */ |
f1f55166 | 40 | #define JFLOAT_TYPE_P(TYPE) (TYPE && TREE_CODE ((TYPE)) == REAL_TYPE) |
41 | #define JINTEGRAL_TYPE_P(TYPE) ((TYPE) \ | |
ea347d91 | 42 | && (TREE_CODE ((TYPE)) == INTEGER_TYPE)) |
f1f55166 | 43 | #define JNUMERIC_TYPE_P(TYPE) ((TYPE) \ |
44 | && (JFLOAT_TYPE_P ((TYPE)) \ | |
45 | || JINTEGRAL_TYPE_P ((TYPE)))) | |
46 | #define JPRIMITIVE_TYPE_P(TYPE) ((TYPE) \ | |
47 | && (JNUMERIC_TYPE_P ((TYPE)) \ | |
48 | || TREE_CODE ((TYPE)) == BOOLEAN_TYPE)) | |
377029eb | 49 | |
50 | /* Not defined in the LRM */ | |
f1f55166 | 51 | #define JSTRING_TYPE_P(TYPE) ((TYPE) \ |
52 | && ((TYPE) == string_type_node || \ | |
53 | (TREE_CODE (TYPE) == POINTER_TYPE && \ | |
54 | TREE_TYPE (TYPE) == string_type_node))) | |
f1f55166 | 55 | #define JREFERENCE_TYPE_P(TYPE) ((TYPE) \ |
56 | && (TREE_CODE (TYPE) == RECORD_TYPE \ | |
57 | || (TREE_CODE (TYPE) == POINTER_TYPE \ | |
58 | && TREE_CODE (TREE_TYPE (TYPE)) == \ | |
59 | RECORD_TYPE))) | |
377029eb | 60 | |
6852521a | 61 | int java_report_errors (void); |
67dd4de4 | 62 | extern tree do_resolve_class (tree, tree, tree, tree, tree); |
377029eb | 63 | |
64 | /* Always in use, no matter what you compile */ | |
6852521a | 65 | void java_push_parser_context (void); |
66 | void java_pop_parser_context (int); | |
6852521a | 67 | extern void java_parser_context_save_global (void); |
68 | extern void java_parser_context_restore_global (void); | |
2a281353 | 69 | |
70 | #endif /* ! GCC_JAVA_PARSE_H */ |