> $ spatch -sp_file demos/regexp.cocci demos/regexp.c -o /tmp/re.c
> init_defs_builtins: /usr/local/share/coccinelle/standard.h
> Fatal error: exception Invalid_argument("equal: abstract value")
A patch for this is below.
julia
---
diff --git a/parsing_cocci/function_prototypes.ml
b/parsing_cocci/function_prototypes.ml
index 2f2225a..257e0ca 100644
--- a/parsing_cocci/function_prototypes.ml
+++ b/parsing_cocci/function_prototypes.ml
@@ -153,18 +153,19 @@ and strip =
ref [],-1) in
(* need a case for everything that has an unvisited component and can be in
- a function prototype *)
+ a function prototype. Also get rid of constraints because pcre
+ constraints cannot be compared. *)
let ident r k e =
donothing r k
(Ast0.rewrap e
(match Ast0.unwrap e with
Ast0.MetaId(nm,constraints,seed,pure) ->
- Ast0.MetaId(nm,constraints,seed,Ast0.Pure)
+ Ast0.MetaId(nm,Ast.IdNoConstraint,seed,Ast0.Pure)
| Ast0.MetaFunc(nm,constraints,pure) ->
- Ast0.MetaFunc(nm,constraints,Ast0.Pure)
+ Ast0.MetaFunc(nm,Ast.IdNoConstraint,Ast0.Pure)
| Ast0.MetaLocalFunc(nm,constraints,pure) ->
- Ast0.MetaLocalFunc(nm,constraints,Ast0.Pure)
+ Ast0.MetaLocalFunc(nm,Ast.IdNoConstraint,Ast0.Pure)
| e -> e)) in
let typeC r k e =
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)