On Wed, May 29, 2019 at 2:33 PM Timur Tabi <[email protected]> wrote:
> minus: parse error:
>   File "/home/ttabi/boardobj.cocci", line 14, column 1, charpos = 135
>   around = '|',
>   whole content =  |

I did some reading of the documentation and came up with this.  I
think it's in improvement, but it still doesn't work.

@@
identifier func;
fresh identifier label = func ## "_exit";
type T;
expression x;
statement S;
@@
func(...) {
<+...
 x =
(
 (T)
 \(MACRO1\|MACRO2\|MACRO3\)
|
 \(MACRO1\|MACRO2\|MACRO3\)
)
 (...);
(
 if (x == NULL) S
|
+if (x == NULL)
+{
+    status = ERROR;
+    goto label;
+}
)
...+>
}

This gives me:
21: no available token to attach to

So it looks like the "\(MACRO1\|MACRO2\|MACRO3\)" isn't correct, but I
don't see what's wrong with it.
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to