]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/java/parse.h
Update copyright years.
[thirdparty/gcc.git] / gcc / java / parse.h
CommitLineData
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 5This file is part of GCC.
377029eb 6
7d82ed5e 7GCC is free software; you can redistribute it and/or modify
377029eb 8it under the terms of the GNU General Public License as published by
e4b52719 9the Free Software Foundation; either version 3, or (at your option)
377029eb 10any later version.
11
7d82ed5e 12GCC is distributed in the hope that it will be useful,
377029eb 13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
e4b52719 18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>.
377029eb 20
21Java and all Java-based marks are trademarks or registered trademarks
22of Sun Microsystems, Inc. in the United States and other countries.
23The 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 29extern 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 61int java_report_errors (void);
67dd4de4 62extern tree do_resolve_class (tree, tree, tree, tree, tree);
377029eb 63
64/* Always in use, no matter what you compile */
6852521a 65void java_push_parser_context (void);
66void java_pop_parser_context (int);
6852521a 67extern void java_parser_context_save_global (void);
68extern void java_parser_context_restore_global (void);
2a281353 69
70#endif /* ! GCC_JAVA_PARSE_H */