Dear Eliseo,

> No luck :-(
> 
> New logs attached.

Yeah the situation has improved, actually.

The new problem has been resolved in coccinelle's development repository
but not yet released.

Could you please try to apply the attached patch to your code and let us
know the result?

Thanks,
Sébastien.
commit e90ded411a67fe4622f35d27a240561f84f29f01
Author: Sébastien Hinderer <[email protected]>
Date:   Wed Jan 14 14:08:02 2015 +0100

    Get rid of reinit production in SmPL parser.

diff --git a/parsing_cocci/parse_cocci.ml b/parsing_cocci/parse_cocci.ml
index 8e3eb04..65ace12 100644
--- a/parsing_cocci/parse_cocci.ml
+++ b/parsing_cocci/parse_cocci.ml
@@ -1463,10 +1463,12 @@ let pop2 l =
   l := List.tl !l;
   v
 
+(*
 let reinit _ =
   PC.reinit (function _ -> PC.TArobArob (* a handy token *))
     (Lexing.from_function
        (function buf -> function n -> raise (Common.Impossible 157)))
+*)
 
 let parse_one str parsefn file toks =
   let all_tokens = ref toks in
@@ -1481,7 +1483,7 @@ let parse_one str parsefn file toks =
     Lexing.from_function
       (function buf -> function n -> raise (Common.Impossible 158))
   in
-  reinit();
+  (* reinit(); *)
 
   try parsefn lexer_function lexbuf_fake
   with
diff --git a/parsing_cocci/parser_cocci_menhir.mly b/parsing_cocci/parser_cocci_menhir.mly
index 50d5e64..3a0b4de 100644
--- a/parsing_cocci/parser_cocci_menhir.mly
+++ b/parsing_cocci/parser_cocci_menhir.mly
@@ -203,8 +203,10 @@ and  logicalOp = function
 %left TPlus TMinus
 %left TMul TDmOp /* TDiv TMod TMin TMax */
 
+/*
 %start reinit
 %type <unit> reinit
+*/
 
 %start minus_main
 %type <Ast0_cocci.rule> minus_main
@@ -252,7 +254,6 @@ rule_name
 
 %%
 
-reinit: { }
 minus_main: minus_body EOF { $1 } | m=minus_body TArobArob { m }
 | m=minus_body TArob { m }
 plus_main: plus_body EOF { $1 } | p=plus_body TArobArob { p }
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to