Release coccinelle-0.2.4rc2
[bpt/coccinelle.git] / parsing_c / visitor_c.mli
CommitLineData
34e49164
C
1open Ast_c
2
3type visitor_c = {
4 kexpr : (expression -> unit) * visitor_c -> expression -> unit;
5 kstatement : (statement -> unit) * visitor_c -> statement -> unit;
6 ktype : (fullType -> unit) * visitor_c -> fullType -> unit;
b1b2de81 7
34e49164 8 kdecl : (declaration -> unit) * visitor_c -> declaration -> unit;
951c7801
C
9 konedecl : (onedecl -> unit) * visitor_c -> onedecl -> unit;
10 kparam : (parameterType -> unit) * visitor_c -> parameterType -> unit;
34e49164 11 kdef : (definition -> unit) * visitor_c -> definition -> unit;
b1b2de81
C
12 kname : (name -> unit) * visitor_c -> name -> unit;
13
34e49164 14 kini : (initialiser -> unit) * visitor_c -> initialiser -> unit;
b1b2de81
C
15 kfield : (field -> unit) * visitor_c -> field -> unit;
16
485bce71 17 kcppdirective: (cpp_directive -> unit) * visitor_c -> cpp_directive -> unit;
b1b2de81 18 kdefineval : (define_val -> unit) * visitor_c -> define_val -> unit;
485bce71 19 kstatementseq: (statement_sequencable -> unit) * visitor_c -> statement_sequencable -> unit;
0708f913
C
20
21
ae4735db 22 knode:
34e49164
C
23 (Control_flow_c.node -> unit) * visitor_c -> Control_flow_c.node -> unit;
24 ktoplevel: (toplevel -> unit) * visitor_c -> toplevel -> unit;
b1b2de81 25
485bce71 26 kinfo : (info -> unit) * visitor_c -> info -> unit;
34e49164
C
27}
28
29val default_visitor_c : visitor_c
30
31val vk_expr : visitor_c -> expression -> unit
32val vk_statement : visitor_c -> statement -> unit
002099fc 33val vk_statement_sequencable : visitor_c -> statement_sequencable -> unit
34e49164
C
34val vk_type : visitor_c -> fullType -> unit
35val vk_decl : visitor_c -> declaration -> unit
91eba41f 36val vk_onedecl : visitor_c -> onedecl -> unit
34e49164 37val vk_ini : visitor_c -> initialiser -> unit
b1b2de81 38val vk_name : visitor_c -> name -> unit
34e49164
C
39val vk_def : visitor_c -> definition -> unit
40val vk_node : visitor_c -> Control_flow_c.node -> unit
41val vk_info : visitor_c -> info -> unit
485bce71
C
42val vk_toplevel : visitor_c -> toplevel -> unit
43val vk_program : visitor_c -> program -> unit
34e49164
C
44
45val vk_argument : visitor_c -> argument -> unit
faf9a90c 46val vk_argument_list : visitor_c -> argument wrap2 list -> unit
34e49164
C
47val vk_args_splitted : visitor_c -> (argument, il) Common.either list -> unit
48val vk_param : visitor_c -> parameterType -> unit
faf9a90c 49val vk_param_list : visitor_c -> parameterType wrap2 list -> unit
ae4735db 50val vk_params_splitted :
34e49164
C
51 visitor_c -> (parameterType, il) Common.either list -> unit
52
413ffc02 53val vk_struct_field : visitor_c -> field -> unit
485bce71
C
54val vk_struct_fields : visitor_c -> field list -> unit
55val vk_struct_fieldkinds : visitor_c -> fieldkind wrap list -> unit
34e49164
C
56
57val vk_cst : visitor_c -> ((constant, string) Common.either wrap) -> unit
58
ae4735db 59val vk_define_params_splitted :
34e49164
C
60 visitor_c -> (string Ast_c.wrap, il) Common.either list -> unit
61
62
63
b1b2de81 64(* ------------------------------------------------------------------------ *)
34e49164
C
65type 'a inout = 'a -> 'a
66type visitor_c_s = {
67 kexpr_s : expression inout * visitor_c_s -> expression inout;
68 kstatement_s : statement inout * visitor_c_s -> statement inout;
69 ktype_s : fullType inout * visitor_c_s -> fullType inout;
b1b2de81 70
34e49164
C
71 kdecl_s : declaration inout * visitor_c_s -> declaration inout;
72 kdef_s : definition inout * visitor_c_s -> definition inout;
b1b2de81
C
73 kname_s : name inout * visitor_c_s -> name inout;
74
485bce71 75 kini_s : initialiser inout * visitor_c_s -> initialiser inout;
b1b2de81 76
485bce71
C
77 kcppdirective_s : (cpp_directive inout * visitor_c_s) -> cpp_directive inout;
78 kdefineval_s : (define_val inout * visitor_c_s) -> define_val inout;
79 kstatementseq_s: (statement_sequencable inout * visitor_c_s) -> statement_sequencable inout;
ae4735db 80 kstatementseq_list_s:
485bce71 81 (statement_sequencable list inout * visitor_c_s) -> statement_sequencable list inout;
b1b2de81 82
ae4735db 83 knode_s :
34e49164 84 Control_flow_c.node inout * visitor_c_s -> Control_flow_c.node inout;
485bce71 85 ktoplevel_s : toplevel inout * visitor_c_s -> toplevel inout;
b1b2de81 86
34e49164
C
87 kinfo_s : info inout * visitor_c_s -> info inout;
88 }
89
90val default_visitor_c_s : visitor_c_s
91
92val vk_expr_s : visitor_c_s -> expression -> expression
93val vk_argument_s : visitor_c_s -> argument -> argument
94val vk_statement_s : visitor_c_s -> statement -> statement
485bce71 95val vk_statement_sequencable_s : visitor_c_s -> statement_sequencable -> statement_sequencable
34e49164
C
96val vk_type_s : visitor_c_s -> fullType -> fullType
97val vk_decl_s : visitor_c_s -> declaration -> declaration
98val vk_ini_s : visitor_c_s -> initialiser -> initialiser
99val vk_def_s : visitor_c_s -> definition -> definition
100val vk_toplevel_s : visitor_c_s -> toplevel -> toplevel
101val vk_info_s : visitor_c_s -> info -> info
91eba41f 102val vk_ii_s : visitor_c_s -> info list -> info list
34e49164 103val vk_node_s : visitor_c_s -> Control_flow_c.node -> Control_flow_c.node
485bce71 104val vk_program_s : visitor_c_s -> program -> program
34e49164 105
ae4735db
C
106val vk_arguments_s :
107 visitor_c_s ->
34e49164
C
108 argument wrap2 list -> argument wrap2 list
109
ae4735db
C
110val vk_args_splitted_s :
111 visitor_c_s ->
112 (argument, il) Common.either list ->
34e49164
C
113 (argument, il) Common.either list
114
ae4735db
C
115val vk_params_s :
116 visitor_c_s ->
34e49164
C
117 parameterType wrap2 list -> parameterType wrap2 list
118
ae4735db
C
119val vk_params_splitted_s :
120 visitor_c_s ->
121 (parameterType, il) Common.either list ->
34e49164
C
122 (parameterType, il) Common.either list
123
124
125
126val vk_param_s : visitor_c_s -> parameterType -> parameterType
127
ae4735db
C
128val vk_define_params_splitted_s :
129 visitor_c_s ->
130 (string Ast_c.wrap, il) Common.either list ->
34e49164
C
131 (string Ast_c.wrap, il) Common.either list
132
413ffc02 133val vk_struct_field_s : visitor_c_s -> field -> field
485bce71 134val vk_struct_fields_s : visitor_c_s -> field list -> field list
34e49164 135
ae4735db 136val vk_cst_s : visitor_c_s -> ((constant, string) Common.either wrap) inout