1 (* types that clutter the .mly file *)
2 (* for iso metavariables, true if they can only match nonmodified, unitary
7 Include
of string | Iso
of (string,string) Common.either
8 | Virt
of string list
(* virtual rules *)
11 line_type
* int * int * int * int (* starting spaces *) *
12 (string * Ast0_cocci.position_info
) list
(* code before *) *
13 (string * Ast0_cocci.position_info
) list
(* code after *) *
14 Ast0_cocci.meta_pos
(* position variable, minus only *)
16 (* ---------------------------------------------------------------------- *)
19 MINUS
| OPTMINUS
| UNIQUEMINUS
21 | CONTEXT
| UNIQUE
| OPT
23 type iconstraints
= Ast_cocci.idconstraint
24 type econstraints
= Ast0_cocci.constraints
25 type pconstraints
= Ast_cocci.meta_name list
27 val in_rule_name
: bool ref (* true if parsing the rule name *)
28 val in_meta
: bool ref (* true if parsing the metavariable decls *)
29 val in_iso
: bool ref (* true if parsing the isomorphisms *)
30 val in_generating
: bool ref(* true if generating a rule *)
31 val ignore_patch_or_match
: bool ref (* skip rules not satisfying virt *)
32 val in_prolog
: bool ref (* true if parsing the beginning of an SP *)
33 val saw_struct
: bool ref (* true if saw struct/union *)
34 val inheritable_positions
: string list
ref
36 val call_in_meta
: (unit -> 'a
) -> 'a
38 val all_metadecls
: (string, Ast_cocci.metavar list
) Hashtbl.t
40 val clear_meta
: (unit -> unit) ref
43 (Ast_cocci.meta_name
-> iconstraints
-> Ast0_cocci.pure
-> unit) ref
45 val add_fresh_id_meta
: (Ast_cocci.meta_name
-> unit) ref
47 val add_type_meta
: (Ast_cocci.meta_name
-> Ast0_cocci.pure
-> unit) ref
49 val add_init_meta
: (Ast_cocci.meta_name
-> Ast0_cocci.pure
-> unit) ref
51 val add_param_meta
: (Ast_cocci.meta_name
-> Ast0_cocci.pure
-> unit) ref
53 val add_paramlist_meta
:
54 (Ast_cocci.meta_name
-> Ast_cocci.meta_name
option -> Ast0_cocci.pure
->
58 (Type_cocci.typeC list
option -> Ast_cocci.meta_name
-> econstraints
->
59 Ast0_cocci.pure
-> unit) ref
62 (Ast_cocci.meta_name
-> econstraints
-> Ast0_cocci.pure
-> unit) ref
65 (Type_cocci.typeC list
option -> Ast_cocci.meta_name
-> econstraints
->
66 Ast0_cocci.pure
-> unit) ref
69 (Type_cocci.typeC list
option -> Ast_cocci.meta_name
->
70 econstraints
-> Ast0_cocci.pure
-> unit) ref
72 val add_local_idexp_meta
:
73 (Type_cocci.typeC list
option -> Ast_cocci.meta_name
->
74 econstraints
-> Ast0_cocci.pure
-> unit) ref
77 (Ast_cocci.meta_name
-> Ast_cocci.meta_name
option -> Ast0_cocci.pure
->
80 val add_stm_meta
: (Ast_cocci.meta_name
-> Ast0_cocci.pure
-> unit) ref
82 val add_stmlist_meta
: (Ast_cocci.meta_name
-> Ast0_cocci.pure
-> unit) ref
85 (Ast_cocci.meta_name
-> iconstraints
-> Ast0_cocci.pure
-> unit) ref
87 val add_local_func_meta
:
88 (Ast_cocci.meta_name
-> iconstraints
-> Ast0_cocci.pure
-> unit) ref
90 val add_declarer_meta
:
91 (Ast_cocci.meta_name
-> iconstraints
-> Ast0_cocci.pure
-> unit) ref
93 val add_iterator_meta
:
94 (Ast_cocci.meta_name
-> iconstraints
-> Ast0_cocci.pure
-> unit) ref
97 (Ast_cocci.meta_name
-> pconstraints
-> Ast_cocci.meta_collect
-> unit) ref
99 val add_type_name
: (string -> unit) ref
101 val add_declarer_name
: (string -> unit) ref
103 val add_iterator_name
: (string -> unit) ref
105 val init_rule
: (unit -> unit) ref
107 val install_bindings
: (string -> unit) ref