On Sun, 17 Jun 2018, SF Markus Elfring wrote:
> > You can't just put ... at random places.
>
> I hope that this software aspect can be adjusted somehow.
No.
>
> > If you are in an expression, ... must replace a single expression.
>
> Can it be optional at the end?
I don't know what "it" refers to, but the answer is surely no.
>
> >> 2. I have observed that no source code is found if I omit the
> >> metavariables “T”
> >> and “X” (omission of the assignment target) in a SmPL script variant.
> >
> > Since I don't know anythign about the code you are applying it to,
>
> Please look once more at the constructed example.
>
> int main(void)
> {
> unsigned int a = 2, b = 4;
> unsigned long c = a << 2 << b;
> }
>
>
> > and I don't know the exact definition of the semantic patch,
>
> Can the following SmPL search approach trigger further software development
> considerations?
>
> @display@
> constant C;
> expression A, B;
> @@
> A
> <<
> *C
> <<
> B ...;
>
>
> This SmPL script variant does not present the error message “minus:
> parse error”.
That's true. You have an expression followed by ... followed by an empty
statement. It will match things like:
foo = x << 12 << b;
test();
test();
;
It doesn't match your sample program.
julia_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci