Release coccinelle-0.2.0rc1
[bpt/coccinelle.git] / parsing_cocci / visitor_ast.mli
1 type 'a combiner =
2 {combiner_ident : Ast_cocci.ident -> 'a;
3 combiner_expression : Ast_cocci.expression -> 'a;
4 combiner_fullType : Ast_cocci.fullType -> 'a;
5 combiner_typeC : Ast_cocci.typeC -> 'a;
6 combiner_declaration : Ast_cocci.declaration -> 'a;
7 combiner_initialiser : Ast_cocci.initialiser -> 'a;
8 combiner_parameter : Ast_cocci.parameterTypeDef -> 'a;
9 combiner_parameter_list : Ast_cocci.parameter_list -> 'a;
10 combiner_rule_elem : Ast_cocci.rule_elem -> 'a;
11 combiner_statement : Ast_cocci.statement -> 'a;
12 combiner_case_line : Ast_cocci.case_line -> 'a;
13 combiner_top_level : Ast_cocci.top_level -> 'a;
14 combiner_anything : Ast_cocci.anything -> 'a;
15 combiner_expression_dots :
16 Ast_cocci.expression Ast_cocci.dots -> 'a;
17 combiner_statement_dots :
18 Ast_cocci.statement Ast_cocci.dots -> 'a;
19 combiner_declaration_dots :
20 Ast_cocci.declaration Ast_cocci.dots -> 'a}
21
22 type ('mc,'a) cmcode = 'a combiner -> 'mc Ast_cocci.mcode -> 'a
23 type ('cd,'a) ccode = 'a combiner -> ('cd -> 'a) -> 'cd -> 'a
24
25 val combiner :
26 ('a -> 'a -> 'a) -> 'a ->
27 (((string*string),'a) cmcode) ->
28 ((string,'a) cmcode) ->
29 ((Ast_cocci.constant,'a) cmcode) ->
30 ((Ast_cocci.assignOp,'a) cmcode) ->
31 ((Ast_cocci.fixOp,'a) cmcode) ->
32 ((Ast_cocci.unaryOp,'a) cmcode) ->
33 ((Ast_cocci.binaryOp,'a) cmcode) ->
34 ((Ast_cocci.const_vol,'a) cmcode) ->
35 ((Ast_cocci.sign,'a) cmcode) ->
36 ((Ast_cocci.structUnion,'a) cmcode) ->
37 ((Ast_cocci.storage,'a) cmcode) ->
38 ((Ast_cocci.inc_file,'a) cmcode) ->
39 ((Ast_cocci.expression Ast_cocci.dots,'a) ccode) ->
40 ((Ast_cocci.parameterTypeDef Ast_cocci.dots,'a) ccode) ->
41 ((Ast_cocci.statement Ast_cocci.dots,'a) ccode) ->
42 ((Ast_cocci.declaration Ast_cocci.dots,'a) ccode) ->
43 ((Ast_cocci.ident,'a) ccode) ->
44 ((Ast_cocci.expression,'a) ccode) ->
45 ((Ast_cocci.fullType,'a) ccode) ->
46 ((Ast_cocci.typeC,'a) ccode) ->
47 ((Ast_cocci.initialiser,'a) ccode) ->
48 ((Ast_cocci.parameterTypeDef,'a) ccode) ->
49 ((Ast_cocci.declaration,'a) ccode) ->
50 ((Ast_cocci.rule_elem,'a) ccode) ->
51 ((Ast_cocci.statement,'a) ccode) ->
52 ((Ast_cocci.case_line,'a) ccode) ->
53 ((Ast_cocci.top_level,'a) ccode) ->
54 ((Ast_cocci.anything,'a) ccode) ->
55 'a combiner
56
57 type 'a inout = 'a -> 'a (* for specifying the type of rebuilder *)
58
59 type rebuilder =
60 {rebuilder_ident : Ast_cocci.ident inout;
61 rebuilder_expression : Ast_cocci.expression inout;
62 rebuilder_fullType : Ast_cocci.fullType inout;
63 rebuilder_typeC : Ast_cocci.typeC inout;
64 rebuilder_declaration : Ast_cocci.declaration inout;
65 rebuilder_initialiser : Ast_cocci.initialiser inout;
66 rebuilder_parameter : Ast_cocci.parameterTypeDef inout;
67 rebuilder_parameter_list : Ast_cocci.parameter_list inout;
68 rebuilder_statement : Ast_cocci.statement inout;
69 rebuilder_case_line : Ast_cocci.case_line inout;
70 rebuilder_rule_elem : Ast_cocci.rule_elem inout;
71 rebuilder_top_level : Ast_cocci.top_level inout;
72 rebuilder_expression_dots : Ast_cocci.expression Ast_cocci.dots inout;
73 rebuilder_statement_dots : Ast_cocci.statement Ast_cocci.dots inout;
74 rebuilder_declaration_dots : Ast_cocci.declaration Ast_cocci.dots inout;
75 rebuilder_define_param_dots: Ast_cocci.define_param Ast_cocci.dots inout;
76 rebuilder_define_param : Ast_cocci.define_param inout;
77 rebuilder_define_parameters : Ast_cocci.define_parameters inout;
78 rebuilder_anything : Ast_cocci.anything inout}
79
80 type 'mc rmcode = 'mc Ast_cocci.mcode inout
81 type 'cd rcode = rebuilder -> ('cd inout) -> 'cd inout
82
83 val rebuilder :
84 ((string*string) rmcode) ->
85 (string rmcode) ->
86 (Ast_cocci.constant rmcode) ->
87 (Ast_cocci.assignOp rmcode) ->
88 (Ast_cocci.fixOp rmcode) ->
89 (Ast_cocci.unaryOp rmcode) ->
90 (Ast_cocci.binaryOp rmcode) ->
91 (Ast_cocci.const_vol rmcode) ->
92 (Ast_cocci.sign rmcode) ->
93 (Ast_cocci.structUnion rmcode) ->
94 (Ast_cocci.storage rmcode) ->
95 (Ast_cocci.inc_file rmcode) ->
96 (Ast_cocci.expression Ast_cocci.dots rcode) ->
97 (Ast_cocci.parameterTypeDef Ast_cocci.dots rcode) ->
98 (Ast_cocci.statement Ast_cocci.dots rcode) ->
99 (Ast_cocci.declaration Ast_cocci.dots rcode) ->
100 (Ast_cocci.ident rcode) ->
101 (Ast_cocci.expression rcode) ->
102 (Ast_cocci.fullType rcode) ->
103 (Ast_cocci.typeC rcode) ->
104 (Ast_cocci.initialiser rcode) ->
105 (Ast_cocci.parameterTypeDef rcode) ->
106 (Ast_cocci.declaration rcode) ->
107 (Ast_cocci.rule_elem rcode) ->
108 (Ast_cocci.statement rcode) ->
109 (Ast_cocci.case_line rcode) ->
110 (Ast_cocci.top_level rcode) ->
111 (Ast_cocci.anything rcode) ->
112 rebuilder