Re: [Cocci] Easier search for assignment targets with SmPL

2017-05-23 Thread SF Markus Elfring
>> Can it become safer and more convenient to handle assignments here?
> 
> I have no idea what you are asking for.

I wonder about such a kind of feedback.


> In any case, an expression metavariable already matches a variable.

This information can be appropriate in some source code situations.

Do you care for any more “special use cases”?


> I don't know what a designated initializer is.

I find this aspect strange when it was already discussed several times.
http://en.cppreference.com/w/c/language/struct_initialization

How would you prefer to handle various software development challenges around
specifications for variable definitions?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Easier search for assignment targets with SmPL

2017-05-23 Thread Julia Lawall


On Tue, 23 May 2017, SF Markus Elfring wrote:

> >  var = action(...);
>
> This specification looks also simple for the semantic patch language
> at first glance.
> I tried to express that a specific value is assigned to something.
> But this “something” could be a different item depending on the position
> in the source code.
>
> 1. Variable
> 2. Expression
> 3. Element for a designated initialiser
>
> I would appreciate if I do not need to repeat specifications for these cases
> in SmPL code. How do you think about the possibility to support the desired
> source code search by an additional metavariable type there?
> Can it become safer and more convenient to handle assignments here?

I have no idea what you are asking for.  In any case, an expression
metavariable already matches a variable.  I don't know what a designated
initializer is.

julia

>
> Regards,
> Markus
> ___
> Cocci mailing list
> Cocci@systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Easier search for assignment targets with SmPL

2017-05-23 Thread SF Markus Elfring
>  var = action(...);

This specification looks also simple for the semantic patch language
at first glance.
I tried to express that a specific value is assigned to something.
But this “something” could be a different item depending on the position
in the source code.

1. Variable
2. Expression
3. Element for a designated initialiser

I would appreciate if I do not need to repeat specifications for these cases
in SmPL code. How do you think about the possibility to support the desired
source code search by an additional metavariable type there?
Can it become safer and more convenient to handle assignments here?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci