00001 /* 00002 * Copyright (c) 2011 Jiri Svoboda 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * - Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * - Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * - The name of the author may not be used to endorse or promote products 00015 * derived from this software without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00018 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00019 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00020 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00022 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00024 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00025 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00026 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 */ 00028 00029 #ifndef STREE_H_ 00030 #define STREE_H_ 00031 00032 #include "mytypes.h" 00033 00034 stree_module_t *stree_module_new(void); 00035 stree_modm_t *stree_modm_new(modm_class_t mc); 00036 stree_csi_t *stree_csi_new(csi_class_t cc); 00037 stree_csimbr_t *stree_csimbr_new(csimbr_class_t cc); 00038 stree_ctor_t *stree_ctor_new(void); 00039 stree_deleg_t *stree_deleg_new(void); 00040 stree_enum_t *stree_enum_new(void); 00041 stree_embr_t *stree_embr_new(void); 00042 stree_fun_t *stree_fun_new(void); 00043 stree_var_t *stree_var_new(void); 00044 stree_prop_t *stree_prop_new(void); 00045 stree_targ_t *stree_targ_new(void); 00046 00047 stree_symbol_attr_t *stree_symbol_attr_new(symbol_attr_class_t sac); 00048 00049 stree_proc_t *stree_proc_new(void); 00050 stree_proc_arg_t *stree_proc_arg_new(void); 00051 stree_fun_sig_t *stree_fun_sig_new(void); 00052 stree_arg_attr_t *stree_arg_attr_new(arg_attr_class_t aac); 00053 00054 stree_stat_t *stree_stat_new(stat_class_t sc); 00055 stree_vdecl_t *stree_vdecl_new(void); 00056 stree_if_t *stree_if_new(void); 00057 stree_switch_t *stree_switch_new(void); 00058 stree_while_t *stree_while_new(void); 00059 stree_for_t *stree_for_new(void); 00060 stree_raise_t *stree_raise_new(void); 00061 stree_break_t *stree_break_new(void); 00062 stree_return_t *stree_return_new(void); 00063 stree_wef_t *stree_wef_new(void); 00064 stree_exps_t *stree_exps_new(void); 00065 00066 stree_except_t *stree_except_new(void); 00067 stree_if_clause_t *stree_if_clause_new(void); 00068 stree_when_t *stree_when_new(void); 00069 stree_block_t *stree_block_new(void); 00070 00071 stree_expr_t *stree_expr_new(expr_class_t ec); 00072 stree_assign_t *stree_assign_new(assign_class_t ac); 00073 stree_binop_t *stree_binop_new(binop_class_t bc); 00074 stree_unop_t *stree_unop_new(unop_class_t uc); 00075 stree_new_t *stree_new_new(void); 00076 stree_access_t *stree_access_new(void); 00077 stree_call_t *stree_call_new(void); 00078 stree_index_t *stree_index_new(void); 00079 stree_as_t *stree_as_new(void); 00080 stree_box_t *stree_box_new(void); 00081 stree_nameref_t *stree_nameref_new(void); 00082 00083 stree_ident_t *stree_ident_new(void); 00084 stree_literal_t *stree_literal_new(literal_class_t ltc); 00085 stree_self_ref_t *stree_self_ref_new(void); 00086 00087 stree_texpr_t *stree_texpr_new(texpr_class_t tc); 00088 stree_taccess_t *stree_taccess_new(void); 00089 stree_tapply_t *stree_tapply_new(void); 00090 stree_tindex_t *stree_tindex_new(void); 00091 stree_tliteral_t *stree_tliteral_new(tliteral_class_t tlc); 00092 stree_tnameref_t *stree_tnameref_new(void); 00093 00094 stree_symbol_t *stree_symbol_new(symbol_class_t sc); 00095 stree_program_t *stree_program_new(void); 00096 00097 bool_t stree_symbol_has_attr(stree_symbol_t *symbol, symbol_attr_class_t sac); 00098 bool_t stree_arg_has_attr(stree_proc_arg_t *arg, arg_attr_class_t aac); 00099 bool_t stree_is_csi_derived_from_csi(stree_csi_t *a, stree_csi_t *b); 00100 bool_t stree_symbol_is_static(stree_symbol_t *symbol); 00101 stree_targ_t *stree_csi_find_targ(stree_csi_t *csi, stree_ident_t *ident); 00102 stree_embr_t *stree_enum_find_mbr(stree_enum_t *enum_d, stree_ident_t *ident); 00103 stree_ident_t *stree_csimbr_get_name(stree_csimbr_t *csimbr); 00104 00105 #endif