4 * Basic parsing data structures. Statements and symbols.
6 * Copyright (C) 2003 Transmeta Corp, all rights reserved.
28 enum statement_type type
;
30 struct statement
*next
;
34 struct statement
*label_statement
;
36 struct expression
*expression
;
38 struct expression
*if_conditional
;
39 struct statement
*if_true
;
40 struct statement
*if_false
;
42 struct compound_struct
{
43 struct symbol_list
*syms
;
44 struct statement_list
*stmts
;
46 struct labeled_struct
{
47 struct symbol
*label_identifier
;
48 struct statement
*label_statement
;
51 struct expression
*case_expression
;
52 struct expression
*case_to
;
53 struct statement
*case_statement
;
55 struct switch_struct
{
56 struct expression
*switch_expression
;
57 struct statement
*switch_statement
;
59 struct iterator_struct
{
60 struct statement
*iterator_pre_statement
;
61 struct expression
*iterator_pre_condition
;
63 struct statement
*iterator_statement
;
65 struct statement
*iterator_post_statement
;
66 struct expression
*iterator_post_condition
;
69 struct symbol
*goto_label
;
70 struct expression
*goto_expression
;
75 extern struct token
*parse_expression(struct token
*, struct expression
**);
76 extern struct token
*statement_list(struct token
*, struct statement_list
**);
78 extern void show_statement(struct statement
*);
79 extern void show_statement_list(struct statement_list
*, const char *);
80 extern void show_expression(struct expression
*);
81 extern void translation_unit(struct token
*, struct symbol_list
**);
83 extern struct symbol
*ctype_integer(unsigned int spec
);
84 extern struct symbol
*ctype_fp(unsigned int spec
);