1 /* This file is part of GCC.
3 GCC is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3, or (at your option)
8 GCC is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with GCC; see the file COPYING3. If not see
15 <http://www.gnu.org/licenses/>. */
17 #ifndef __GCC_PY_DOTIL_H_
18 #define __GCC_PY_DOTIL_H__
20 /* DOT tree codes... */
69 typedef struct GTY(()) gpy_tree_common_dot_t
{
76 } gpy_dot_tree_common
;
78 typedef struct GTY(()) gpy_tree_dot_t
{
79 opcode_t T
, FT
, opaT
, opbT
;
81 struct gpy_tree_dot_t
* field
;
83 struct gpy_tree_dot_t
* t
;
84 gpy_dot_tree_common
* tc
;
87 struct gpy_tree_dot_t
* t
;
88 gpy_dot_tree_common
* tc
;
90 struct gpy_tree_dot_t
* next
;
92 typedef gpy_dot_tree_t
* gpydot
;
94 #define DOT_TYPE(x) x->T
95 #define DOT_CHAIN(x) x->next
96 #define DOT_T_FIELD(x) x->FT
97 #define DOT_FIELD(x) x->field
99 #define DOT_lhs_T(x) x->opaT
100 #define DOT_rhs_T(x) x->opbT
102 #define DOT_lhs_TT(x) x->opa.t
103 #define DOT_rhs_TT(x) x->opb.t
104 #define DOT_lhs_TC(x) x->opa.tc
105 #define DOT_rhs_TC(x) x->opb.tc
107 #define NULL_DOT (gpy_dot_tree_t *)0
108 #define DOT_alloc (gpy_dot_tree_t *)xmalloc (sizeof (gpy_dot_tree_t))
109 #define DOT_CM_alloc (gpy_dot_tree_common *)xmalloc (sizeof (gpy_dot_tree_common))
111 #define DOT_IDENTIFIER_POINTER(x) \
112 DOT_lhs_TC(x)->o.string
114 extern gpy_dot_tree_t
* dot_build_class_decl (gpy_dot_tree_t
*, gpy_dot_tree_t
*);
115 extern gpy_dot_tree_t
* dot_build_func_decl (gpy_dot_tree_t
*, gpy_dot_tree_t
*,
117 extern gpy_dot_tree_t
* dot_build_conditional_struct (gpy_dot_tree_t
*, gpy_dot_tree_t
*,
120 extern gpy_dot_tree_t
* dot_build_decl1 (opcode_t
, gpy_dot_tree_t
*);
121 extern gpy_dot_tree_t
* dot_build_decl2 (opcode_t
, gpy_dot_tree_t
*, gpy_dot_tree_t
*);
123 extern gpy_dot_tree_t
* dot_build_integer (int);
124 extern gpy_dot_tree_t
* dot_build_string (char *);
125 extern gpy_dot_tree_t
* dot_build_identifier (const char *);
126 extern gpy_dot_tree_t
* dot_build_for (gpy_dot_tree_t
*, gpy_dot_tree_t
*, gpy_dot_tree_t
*);
128 #endif /* __GCC_PY_DOTIL_H_ */