X-Git-Url: http://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/88e711986b3855c3d5ecf43845f20e0fafef4e5c..c491d8eea333ab3273dc415c7d7af192e1d0b682:/parsing_cocci/ast0_cocci.mli diff --git a/parsing_cocci/ast0_cocci.mli b/parsing_cocci/ast0_cocci.mli index 31b3e47..5d54968 100644 --- a/parsing_cocci/ast0_cocci.mli +++ b/parsing_cocci/ast0_cocci.mli @@ -175,7 +175,9 @@ and base_typeC = string mcode (* ) *) | Array of typeC * string mcode (* [ *) * expression option * string mcode (* ] *) - | EnumName of string mcode (*enum*) * ident (* name *) + | EnumName of string mcode (*enum*) * ident option (* name *) + | EnumDef of typeC (* either StructUnionName or metavar *) * + string mcode (* { *) * expression dots * string mcode (* } *) | StructUnionName of Ast_cocci.structUnion mcode * ident option (* name *) | StructUnionDef of typeC (* either StructUnionName or metavar *) * string mcode (* { *) * declaration dots * string mcode (* } *) @@ -194,7 +196,9 @@ and typeC = base_typeC wrap split out into multiple declarations of a single variable each. *) and base_declaration = - Init of Ast_cocci.storage mcode option * typeC * ident * + MetaDecl of Ast_cocci.meta_name mcode * pure + | MetaField of Ast_cocci.meta_name mcode * pure (* structure fields *) + | Init of Ast_cocci.storage mcode option * typeC * ident * string mcode (*=*) * initialiser * string mcode (*;*) | UnInit of Ast_cocci.storage mcode option * typeC * ident * string mcode (* ; *) @@ -216,7 +220,8 @@ and declaration = base_declaration wrap and base_initialiser = MetaInit of Ast_cocci.meta_name mcode * pure | InitExpr of expression - | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*) + | InitList of string mcode (*{*) * initialiser_list * string mcode (*}*) * + bool (* true if ordered, false if unordered *) | InitGccExt of designator list (* name *) * string mcode (*=*) * initialiser (* gccext: *) @@ -399,7 +404,8 @@ and parsed_rule = | ScriptRule of string (* name *) * string * Ast_cocci.dependency * (Ast_cocci.script_meta_name * - Ast_cocci.meta_name * Ast_cocci.metavar) list * + Ast_cocci.meta_name * Ast_cocci.metavar) list (*inherited vars*) * + Ast_cocci.meta_name list (*script vars*) * string | InitialScriptRule of string (* name *) * string (*language*) * Ast_cocci.dependency * string (*code*) @@ -493,6 +499,7 @@ val fresh_index : unit -> int val set_mcode_data : 'a -> 'a mcode -> 'a mcode val make_mcode : 'a -> 'a mcode val make_mcode_info : 'a -> info -> 'a mcode +val make_minus_mcode : 'a -> 'a mcode val ast0_type_to_type : typeC -> Type_cocci.typeC val reverse_type : Type_cocci.typeC -> base_typeC