| 1 |
(* |
| 2 |
* This file is part of Coccinelle, licensed under the terms of the GPL v2. |
| 3 |
* See copyright.txt in the Coccinelle source code for more information. |
| 4 |
* The Coccinelle source code can be obtained at http://coccinelle.lip6.fr |
| 5 |
*) |
| 6 |
|
| 7 |
(* Generates rule headers like |
| 8 |
* |
| 9 |
* @rulename depends on ...@ |
| 10 |
* metavariable mv; |
| 11 |
* position p; |
| 12 |
* @@ |
| 13 |
* |
| 14 |
*) |
| 15 |
|
| 16 |
(* ------------------------------------------------------------------------- *) |
| 17 |
(* RULE HEADER FUNCTIONS *) |
| 18 |
|
| 19 |
type t |
| 20 |
|
| 21 |
(* Generates rule header. *) |
| 22 |
val generate : |
| 23 |
rule_name:string -> |
| 24 |
isos:string list -> |
| 25 |
drop_isos:string list -> |
| 26 |
deps: Ast_cocci.dependency -> |
| 27 |
exists:Ast_cocci.exists -> |
| 28 |
meta_vars: Meta_variable.t list -> |
| 29 |
meta_pos: Meta_variable.t list -> |
| 30 |
t |
| 31 |
|
| 32 |
(* print the full header, metavariables and all *) |
| 33 |
val print : out_channel -> t -> unit |
| 34 |
|
| 35 |
(* print only the first line @rulename depends on ...@ *) |
| 36 |
val print_declaration : out_channel -> t -> unit |