4 * Basic parsing data structures. Statements and symbols.
6 * Copyright (C) 2003 Linus Torvalds, all rights reserved.
11 enum expression_type
{
28 struct expression
*unop
;
29 struct statement
*statement
;
30 struct symbol
*symbol
;
32 struct expression
*left
, *right
;
35 struct expression
*deref
;
39 struct symbol
*cast_type
;
40 struct expression
*cast_expression
;
42 struct conditional_expr
{
43 struct expression
*conditional
, *cond_true
, *cond_false
;
45 struct statement_struct
{
46 struct symbol_list
*syms
;
47 struct statement_list
*stmts
;
73 struct statement
*next
;
77 struct statement
*label_statement
;
79 struct expression
*expression
;
81 struct expression
*if_conditional
;
82 struct statement
*if_true
;
83 struct statement
*if_false
;
85 struct compound_struct
{
86 struct symbol_list
*syms
;
87 struct statement_list
*stmts
;
89 struct labeled_struct
{
90 struct token
*label_identifier
;
91 struct statement
*label_statement
;
94 struct expression
*case_expression
;
95 struct expression
*case_to
;
96 struct statement
*case_statement
;
98 struct switch_struct
{
99 struct expression
*switch_expression
;
100 struct statement
*switch_statement
;
102 struct iteration_struct
{
103 struct expression
*e1
, *e2
, *e3
;
104 struct statement
*iterate
;
107 struct token
*goto_label
;
108 struct expression
*goto_expression
;
113 extern struct token
*parse_expression(struct token
*, struct expression
**);
114 extern struct token
*statement_list(struct token
*, struct statement_list
**);
116 extern void show_statement(struct statement
*);
117 extern void show_statement_list(struct statement_list
*, const char *);
118 extern void show_expression(struct expression
*);
119 extern void translation_unit(struct token
*, struct symbol_list
**);