| 1 | /*
|
|---|
| 2 | * Copyright (c) 2010 Jiri Svoboda
|
|---|
| 3 | * All rights reserved.
|
|---|
| 4 | *
|
|---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
|---|
| 6 | * modification, are permitted provided that the following conditions
|
|---|
| 7 | * are met:
|
|---|
| 8 | *
|
|---|
| 9 | * - Redistributions of source code must retain the above copyright
|
|---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
|---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
|---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
|---|
| 13 | * documentation and/or other materials provided with the distribution.
|
|---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
|---|
| 15 | * derived from this software without specific prior written permission.
|
|---|
| 16 | *
|
|---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|---|
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|---|
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|---|
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|---|
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|---|
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|---|
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|---|
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 27 | */
|
|---|
| 28 |
|
|---|
| 29 | #ifndef STREE_H_
|
|---|
| 30 | #define STREE_H_
|
|---|
| 31 |
|
|---|
| 32 | #include "mytypes.h"
|
|---|
| 33 |
|
|---|
| 34 | stree_module_t *stree_module_new(void);
|
|---|
| 35 | stree_modm_t *stree_modm_new(modm_class_t mc);
|
|---|
| 36 | stree_csi_t *stree_csi_new(csi_class_t cc);
|
|---|
| 37 | stree_csimbr_t *stree_csimbr_new(csimbr_class_t cc);
|
|---|
| 38 | stree_ctor_t *stree_ctor_new(void);
|
|---|
| 39 | stree_deleg_t *stree_deleg_new(void);
|
|---|
| 40 | stree_enum_t *stree_enum_new(void);
|
|---|
| 41 | stree_embr_t *stree_embr_new(void);
|
|---|
| 42 | stree_fun_t *stree_fun_new(void);
|
|---|
| 43 | stree_var_t *stree_var_new(void);
|
|---|
| 44 | stree_prop_t *stree_prop_new(void);
|
|---|
| 45 | stree_targ_t *stree_targ_new(void);
|
|---|
| 46 |
|
|---|
| 47 | stree_symbol_attr_t *stree_symbol_attr_new(symbol_attr_class_t sac);
|
|---|
| 48 |
|
|---|
| 49 | stree_proc_t *stree_proc_new(void);
|
|---|
| 50 | stree_proc_arg_t *stree_proc_arg_new(void);
|
|---|
| 51 | stree_fun_sig_t *stree_fun_sig_new(void);
|
|---|
| 52 | stree_arg_attr_t *stree_arg_attr_new(arg_attr_class_t aac);
|
|---|
| 53 |
|
|---|
| 54 | stree_stat_t *stree_stat_new(stat_class_t sc);
|
|---|
| 55 | stree_vdecl_t *stree_vdecl_new(void);
|
|---|
| 56 | stree_if_t *stree_if_new(void);
|
|---|
| 57 | stree_while_t *stree_while_new(void);
|
|---|
| 58 | stree_for_t *stree_for_new(void);
|
|---|
| 59 | stree_raise_t *stree_raise_new(void);
|
|---|
| 60 | stree_break_t *stree_break_new(void);
|
|---|
| 61 | stree_return_t *stree_return_new(void);
|
|---|
| 62 | stree_wef_t *stree_wef_new(void);
|
|---|
| 63 | stree_exps_t *stree_exps_new(void);
|
|---|
| 64 |
|
|---|
| 65 | stree_except_t *stree_except_new(void);
|
|---|
| 66 | stree_if_clause_t *stree_if_clause_new(void);
|
|---|
| 67 | stree_block_t *stree_block_new(void);
|
|---|
| 68 |
|
|---|
| 69 | stree_expr_t *stree_expr_new(expr_class_t ec);
|
|---|
| 70 | stree_assign_t *stree_assign_new(assign_class_t ac);
|
|---|
| 71 | stree_binop_t *stree_binop_new(binop_class_t bc);
|
|---|
| 72 | stree_unop_t *stree_unop_new(unop_class_t uc);
|
|---|
| 73 | stree_new_t *stree_new_new(void);
|
|---|
| 74 | stree_access_t *stree_access_new(void);
|
|---|
| 75 | stree_call_t *stree_call_new(void);
|
|---|
| 76 | stree_index_t *stree_index_new(void);
|
|---|
| 77 | stree_as_t *stree_as_new(void);
|
|---|
| 78 | stree_box_t *stree_box_new(void);
|
|---|
| 79 | stree_nameref_t *stree_nameref_new(void);
|
|---|
| 80 |
|
|---|
| 81 | stree_ident_t *stree_ident_new(void);
|
|---|
| 82 | stree_literal_t *stree_literal_new(literal_class_t ltc);
|
|---|
| 83 | stree_self_ref_t *stree_self_ref_new(void);
|
|---|
| 84 |
|
|---|
| 85 | stree_texpr_t *stree_texpr_new(texpr_class_t tc);
|
|---|
| 86 | stree_taccess_t *stree_taccess_new(void);
|
|---|
| 87 | stree_tapply_t *stree_tapply_new(void);
|
|---|
| 88 | stree_tindex_t *stree_tindex_new(void);
|
|---|
| 89 | stree_tliteral_t *stree_tliteral_new(tliteral_class_t tlc);
|
|---|
| 90 | stree_tnameref_t *stree_tnameref_new(void);
|
|---|
| 91 |
|
|---|
| 92 | stree_symbol_t *stree_symbol_new(symbol_class_t sc);
|
|---|
| 93 | stree_program_t *stree_program_new(void);
|
|---|
| 94 |
|
|---|
| 95 | bool_t stree_symbol_has_attr(stree_symbol_t *symbol, symbol_attr_class_t sac);
|
|---|
| 96 | bool_t stree_arg_has_attr(stree_proc_arg_t *arg, arg_attr_class_t aac);
|
|---|
| 97 | bool_t stree_is_csi_derived_from_csi(stree_csi_t *a, stree_csi_t *b);
|
|---|
| 98 | bool_t stree_symbol_is_static(stree_symbol_t *symbol);
|
|---|
| 99 | stree_targ_t *stree_csi_find_targ(stree_csi_t *csi, stree_ident_t *ident);
|
|---|
| 100 | stree_embr_t *stree_enum_find_mbr(stree_enum_t *enum_d, stree_ident_t *ident);
|
|---|
| 101 | stree_ident_t *stree_csimbr_get_name(stree_csimbr_t *csimbr);
|
|---|
| 102 |
|
|---|
| 103 | #endif
|
|---|