> OK, so we have an example that works.
Probably not only for a simple parsing test.
> What doesn't work that you are asking about?
We got different development views around applications of SmPL disjunctions
for source code replacements.
* Which open issues will still be reconsidered here?
*
On Thu, 14 Nov 2019, Markus Elfring wrote:
> >> @replacement@
> >> binary operator bo = { +, * };
> >> expression x, y;
> >> @@
> >> +compute(
> >> x
> >> -bo
> >> +,
> >> y
> >> + )
> >
> > I can't figure out what this is an example of?
>
> It shows just
>> @replacement@
>> binary operator bo = { +, * };
>> expression x, y;
>> @@
>> +compute(
>> x
>> -bo
>> +,
>> y
>> + )
>
> I can't figure out what this is an example of?
It shows just a possible transformation specification where a SmPL constraint
is applie
On Thu, 14 Nov 2019, Markus Elfring wrote:
> I am looking for possibilities to reduce undesirable code duplication
> also for applications of the semantic patch language.
> How much common code can be put into SmPL constraints for this purpose
> (when the usage of SmPL disjunctions shows limita
I am looking for possibilities to reduce undesirable code duplication
also for applications of the semantic patch language.
How much common code can be put into SmPL constraints for this purpose
(when the usage of SmPL disjunctions shows limitations so far)?
Example:
@replacement@
binary operator
On Tue, 12 Nov 2019, Markus Elfring wrote:
> Hello,
>
> The following change specification gets accepted by the Coccinelle software.
>
> @replacement@
> expression x, y;
> @@
> (
> -x + y
> +compute(x, y)
> |
> -x * y
> +compute(x, y)
> )
>
>
> I would appreciate if the specification of duplicat
Hello,
The following change specification gets accepted by the Coccinelle software.
@replacement@
expression x, y;
@@
(
-x + y
+compute(x, y)
|
-x * y
+compute(x, y)
)
I would appreciate if the specification of duplicate SmPL code
can be avoided also for such an use case.
Thus I have tried furt
Hello,
The following change specification gets accepted by the Coccinelle software.
@replacement@
expression x, y;
@@
(
-x + y
+compute(x, y)
|
-x * y
+compute(x, y)
)
I would appreciate if the specification of duplicate SmPL code
can be avoided also for such an use case.
Thus I have tried furt