1 |
38 |
julius |
/* TREELANG Compiler definitions for interfacing to treetree.c
|
2 |
|
|
(compiler back end interface).
|
3 |
|
|
|
4 |
|
|
Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002, 2003,
|
5 |
|
|
2004, 2005, 2007 Free Software Foundation, Inc.
|
6 |
|
|
|
7 |
|
|
This program is free software; you can redistribute it and/or modify it
|
8 |
|
|
under the terms of the GNU General Public License as published by the
|
9 |
|
|
Free Software Foundation; either version 3, or (at your option) any
|
10 |
|
|
later version.
|
11 |
|
|
|
12 |
|
|
This program is distributed in the hope that it will be useful,
|
13 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
|
|
GNU General Public License for more details.
|
16 |
|
|
|
17 |
|
|
You should have received a copy of the GNU General Public License
|
18 |
|
|
along with this program; see the file COPYING3. If not see
|
19 |
|
|
<http://www.gnu.org/licenses/>.
|
20 |
|
|
|
21 |
|
|
In other words, you are welcome to use, share and improve this program.
|
22 |
|
|
You are forbidden to forbid anyone else to use, share and improve
|
23 |
|
|
what you give them. Help stamp out software-hoarding!
|
24 |
|
|
|
25 |
|
|
---------------------------------------------------------------------------
|
26 |
|
|
|
27 |
|
|
Written by Tim Josling 1999, 2000, 2001, based in part on other
|
28 |
|
|
parts of the GCC compiler. */
|
29 |
|
|
|
30 |
|
|
tree tree_code_init_parameters (void);
|
31 |
|
|
tree tree_code_add_parameter (tree list, tree proto_exp, tree exp);
|
32 |
|
|
tree tree_code_get_integer_value (unsigned char *chars, unsigned int length);
|
33 |
|
|
void tree_code_generate_return (tree type, tree exp);
|
34 |
|
|
void tree_ggc_storage_always_used (void *m);
|
35 |
|
|
tree tree_code_get_expression (unsigned int exp_type, tree type, tree op1,
|
36 |
|
|
tree op2, tree op3, location_t loc);
|
37 |
|
|
tree tree_code_get_numeric_type (unsigned int size1, unsigned int sign1);
|
38 |
|
|
void tree_code_create_function_initial (tree prev_saved,
|
39 |
|
|
location_t loc);
|
40 |
|
|
void tree_code_create_function_wrapup (location_t loc);
|
41 |
|
|
tree tree_code_create_function_prototype (unsigned char* chars,
|
42 |
|
|
unsigned int storage_class,
|
43 |
|
|
unsigned int ret_type,
|
44 |
|
|
struct prod_token_parm_item* parms,
|
45 |
|
|
location_t loc);
|
46 |
|
|
tree tree_code_create_variable (unsigned int storage_class,
|
47 |
|
|
unsigned char* chars,
|
48 |
|
|
unsigned int length,
|
49 |
|
|
unsigned int expression_type,
|
50 |
|
|
tree init,
|
51 |
|
|
location_t loc);
|
52 |
|
|
void tree_code_output_expression_statement (tree code,
|
53 |
|
|
location_t loc);
|
54 |
|
|
void tree_code_if_start (tree exp, location_t loc);
|
55 |
|
|
void tree_code_if_else (location_t loc);
|
56 |
|
|
void tree_code_if_end (location_t loc);
|
57 |
|
|
tree tree_code_get_type (int type_num);
|
58 |
|
|
void treelang_init_decl_processing (void);
|
59 |
|
|
void treelang_finish (void);
|
60 |
|
|
bool treelang_init (void);
|
61 |
|
|
unsigned int treelang_init_options (unsigned int, const char **);
|
62 |
|
|
int treelang_handle_option (size_t scode, const char *arg, int value);
|
63 |
|
|
void treelang_parse_file (int debug_flag);
|
64 |
|
|
void push_var_level (void);
|
65 |
|
|
void pop_var_level (void);
|
66 |
|
|
const char* get_string (const char *s, size_t l);
|