/*
This file is part of GCT.

GCT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.

GCT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
*/

/* 
 * $Header: /usr/export/home/marick/RCS/gct-tree.def,v 1.6 1992/06/17 13:56:56 marick Exp $
 * $Log: gct-tree.def,v $
Revision 1.6  1992/06/17  13:56:56  marick
Support compound statements within expressions (the GNU C ({...})
feature).  GCC's private include files sometimes use this (<varargs.h>
and <stdarg.h>, in particular).

Revision 1.5  1992/05/21  01:13:58  marick
Standard instrumentation now handles everything but weak mutation, so
DEF_GCT_STD_TREE has been updated.

Revision 1.4  1992/05/13  21:35:42  marick
Changes supporting the move of standard instrumentation into gct-strans.c.

 */

/*
 * DEF_GCT_WEAK_TREE contains the following entries:
 * 	The C name of a GCT node type.
 * 	The string name of same.
 * 	The routine to instrument it in place.
 * 	The routine to instrument it as an expression.
 * 	The routine to instrument it as an lvalue.
 *
 * DEF_GCT_STD_TREE contains similar information for "standard"
 * instrumentation -- that is, everything but operator and operand.
 * 	The C name of a GCT node type.
 * 	The routine to instrument it in place.
 *
 * Because the "WEAK" tree is historically first, it contains
 * the additional information.
 */

DEF_GCT_WEAK_TREE(GCT_PLUS, "GCT_PLUS", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_MINUS, "GCT_MINUS", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_TIMES, "GCT_TIMES", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_DIV, "GCT_DIV", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_MOD, "GCT_MOD", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_LSHIFT, "GCT_LSHIFT", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_RSHIFT, "GCT_RSHIFT", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_LESS, "GCT_LESS", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_GREATER, "GCT_GREATER", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_LESSEQ, "GCT_LESSEQ", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_GREATEREQ, "GCT_GREATEREQ", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_EQUALEQUAL, "GCT_EQUALEQUAL", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_NOTEQUAL, "GCT_NOTEQUAL", i_expr, exp_binary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BITAND, "GCT_BITAND", i_expr, exp_bitwise, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BITOR, "GCT_BITOR", i_expr, exp_bitwise, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BITXOR, "GCT_BITXOR", i_expr, exp_bitwise, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_ANDAND, "GCT_ANDAND", i_expr, exp_boolean, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_OROR, "GCT_OROR", i_expr, exp_boolean, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_SIMPLE_ASSIGN, "GCT_SIMPLE_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_PLUS_ASSIGN, "GCT_PLUS_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_MINUS_ASSIGN, "GCT_MINUS_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_TIMES_ASSIGN, "GCT_TIMES_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_DIV_ASSIGN, "GCT_DIV_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_MOD_ASSIGN, "GCT_MOD_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_LSHIFT_ASSIGN, "GCT_LSHIFT_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_RSHIFT_ASSIGN, "GCT_RSHIFT_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BITAND_ASSIGN, "GCT_BITAND_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BITOR_ASSIGN, "GCT_BITOR_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BITXOR_ASSIGN, "GCT_BITXOR_ASSIGN", i_expr, exp_assign, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_COMMA, "GCT_COMMA", i_expr, exp_comma, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_ADDR, "GCT_ADDR", i_expr, exp_incdec, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_NEGATE, "GCT_NEGATE", i_expr, exp_unary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_UNARY_PLUS, "GCT_UNARY_PLUS", i_expr, exp_unary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_PREINCREMENT, "GCT_PREINCREMENT", i_expr, exp_incdec, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_PREDECREMENT, "GCT_PREDECREMENT", i_expr, exp_incdec, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BIT_NOT, "GCT_BIT_NOT", i_expr, exp_unary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_TRUTH_NOT, "GCT_TRUTH_NOT", i_expr, exp_unary, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_DEREFERENCE, "GCT_DEREFERENCE", i_expr, exp_deref, lv_deref)
DEF_GCT_WEAK_TREE(GCT_SIZEOF, "GCT_SIZEOF", i_expr, exp_constant, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_ALIGNOF, "GCT_ALIGNOF", i_expr, exp_constant, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_TYPENAME, "GCT_TYPENAME", i_nothing, exp_nothing, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_CAST, "GCT_CAST", i_expr, exp_cast, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_QUEST, "GCT_QUEST", i_expr, exp_quest, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_IDENTIFIER, "GCT_IDENTIFIER", i_expr, exp_id, lv_id)
DEF_GCT_WEAK_TREE(GCT_CONSTANT, "GCT_CONSTANT", i_expr, exp_constant, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_OTHER, "GCT_OTHER", i_nothing, exp_nothing, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_FUNCALL, "GCT_FUNCALL", i_expr, exp_funcall, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_ARRAYREF, "GCT_ARRAYREF", i_expr, exp_arrayref, lv_arrayref)
DEF_GCT_WEAK_TREE(GCT_DOTREF, "GCT_DOTREF", i_expr, exp_dotref, lv_dotref)
DEF_GCT_WEAK_TREE(GCT_ARROWREF, "GCT_ARROWREF", i_expr, exp_arrowref, lv_arrowref)
DEF_GCT_WEAK_TREE(GCT_POSTINCREMENT, "GCT_POSTINCREMENT", i_expr, exp_incdec, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_POSTDECREMENT, "GCT_POSTDECREMENT", i_expr, exp_incdec, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_TYPECRUD, "GCT_TYPECRUD", i_nothing, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_DECLARATION, "GCT_DECLARATION", i_declaration, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_COMPOUND_STMT, "GCT_COMPOUND_STMT", i_compound_statement, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_COMPOUND_EXPR, "GCT_COMPOUND_EXPR", i_compound_statement, exp_compound_expr, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_SIMPLE_STMT, "GCT_SIMPLE_STMT", i_simple_statement, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_NULL_EXPR, "GCT_NULL_EXPR", i_nothing, exp_nothing, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_IF, "GCT_IF", i_if, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_WHILE, "GCT_WHILE", i_while, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_DO, "GCT_DO", i_do, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_FOR, "GCT_FOR", i_for, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_SWITCH, "GCT_SWITCH", i_switch, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_CASE, "GCT_CASE", i_case, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_DEFAULT, "GCT_DEFAULT", i_default, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_BREAK, "GCT_BREAK", i_nothing, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_CONTINUE, "GCT_CONTINUE", i_nothing, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_RETURN, "GCT_RETURN", i_return, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_ASM, "GCT_ASM", i_nothing, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_GOTO, "GCT_GOTO", i_nothing, exp_impossible, lv_impossible)
DEF_GCT_WEAK_TREE(GCT_LABEL, "GCT_LABEL", i_label, exp_impossible, lv_impossible)

#if defined(GCT_WANT_STD_DEFNS)

DEF_GCT_STD_TREE(GCT_PLUS, i_std_descend)
DEF_GCT_STD_TREE(GCT_MINUS, i_std_descend)
DEF_GCT_STD_TREE(GCT_TIMES, i_std_descend)
DEF_GCT_STD_TREE(GCT_DIV, i_std_descend)
DEF_GCT_STD_TREE(GCT_MOD, i_std_descend)
DEF_GCT_STD_TREE(GCT_LSHIFT, i_std_descend)
DEF_GCT_STD_TREE(GCT_RSHIFT, i_std_descend)
DEF_GCT_STD_TREE(GCT_LESS, i_std_relational)
DEF_GCT_STD_TREE(GCT_GREATER, i_std_relational)
DEF_GCT_STD_TREE(GCT_LESSEQ, i_std_relational)
DEF_GCT_STD_TREE(GCT_GREATEREQ, i_std_relational)
DEF_GCT_STD_TREE(GCT_EQUALEQUAL, i_std_relational)
DEF_GCT_STD_TREE(GCT_NOTEQUAL, i_std_relational)
DEF_GCT_STD_TREE(GCT_BITAND, i_std_descend)
DEF_GCT_STD_TREE(GCT_BITOR, i_std_descend)
DEF_GCT_STD_TREE(GCT_BITXOR, i_std_descend)
DEF_GCT_STD_TREE(GCT_ANDAND, i_std_boolean)
DEF_GCT_STD_TREE(GCT_OROR, i_std_boolean)
DEF_GCT_STD_TREE(GCT_SIMPLE_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_PLUS_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_MINUS_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_TIMES_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_DIV_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_MOD_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_LSHIFT_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_RSHIFT_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_BITAND_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_BITOR_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_BITXOR_ASSIGN, i_std_assign)
DEF_GCT_STD_TREE(GCT_COMMA, i_std_descend)
DEF_GCT_STD_TREE(GCT_ADDR, i_std_descend)
DEF_GCT_STD_TREE(GCT_NEGATE, i_std_descend)
DEF_GCT_STD_TREE(GCT_UNARY_PLUS, i_std_descend)
DEF_GCT_STD_TREE(GCT_PREINCREMENT, i_std_descend)
DEF_GCT_STD_TREE(GCT_PREDECREMENT, i_std_descend)
DEF_GCT_STD_TREE(GCT_BIT_NOT, i_std_descend)
DEF_GCT_STD_TREE(GCT_TRUTH_NOT, i_std_descend)
DEF_GCT_STD_TREE(GCT_DEREFERENCE, i_std_descend)
DEF_GCT_STD_TREE(GCT_SIZEOF, i_std_stop)
DEF_GCT_STD_TREE(GCT_ALIGNOF, i_std_stop)
DEF_GCT_STD_TREE(GCT_TYPENAME, i_std_stop)
DEF_GCT_STD_TREE(GCT_CAST, i_std_descend)
DEF_GCT_STD_TREE(GCT_QUEST, i_std_quest)
DEF_GCT_STD_TREE(GCT_IDENTIFIER, i_std_stop)
DEF_GCT_STD_TREE(GCT_CONSTANT, i_std_stop)
DEF_GCT_STD_TREE(GCT_OTHER, i_std_stop)
DEF_GCT_STD_TREE(GCT_FUNCALL, i_std_funcall)
DEF_GCT_STD_TREE(GCT_ARRAYREF, i_std_descend)
DEF_GCT_STD_TREE(GCT_DOTREF, i_std_descend)
DEF_GCT_STD_TREE(GCT_ARROWREF, i_std_descend)
DEF_GCT_STD_TREE(GCT_POSTINCREMENT, i_std_descend)
DEF_GCT_STD_TREE(GCT_POSTDECREMENT, i_std_descend)
DEF_GCT_STD_TREE(GCT_TYPECRUD, i_std_stop)
DEF_GCT_STD_TREE(GCT_DECLARATION, i_declaration)
DEF_GCT_STD_TREE(GCT_COMPOUND_STMT, i_compound_statement)
DEF_GCT_STD_TREE(GCT_COMPOUND_EXPR, i_compound_statement)
DEF_GCT_STD_TREE(GCT_SIMPLE_STMT, i_std_descend)
DEF_GCT_STD_TREE(GCT_NULL_EXPR, i_std_stop)
DEF_GCT_STD_TREE(GCT_IF, i_std_if)
DEF_GCT_STD_TREE(GCT_WHILE, i_std_while)
DEF_GCT_STD_TREE(GCT_DO, i_std_do)
DEF_GCT_STD_TREE(GCT_FOR, i_std_for)
DEF_GCT_STD_TREE(GCT_SWITCH, i_std_switch)
DEF_GCT_STD_TREE(GCT_CASE, i_std_case)
DEF_GCT_STD_TREE(GCT_DEFAULT, i_std_default)
DEF_GCT_STD_TREE(GCT_BREAK, i_std_stop)
DEF_GCT_STD_TREE(GCT_CONTINUE, i_std_stop)
DEF_GCT_STD_TREE(GCT_RETURN, i_std_return)
DEF_GCT_STD_TREE(GCT_ASM, i_std_stop)
DEF_GCT_STD_TREE(GCT_GOTO, i_std_stop)
DEF_GCT_STD_TREE(GCT_LABEL, i_std_descend)

#endif
