Re: [Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Markus Elfring
> Why do you want to remove the semicolon? I have shown a transformation example where a function parameter should be replaced by a previous function call. Thus a semicolon should be intentionally be deleted. > If you want to find the call somewhere in the next statement, you can say > > ( > S

Re: [Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Markus Elfring
>> I have shown a transformation example where a function parameter should be >> replaced >> by a previous function call. >> Thus a semicolon should be intentionally be deleted. > > That makes no sense. This transformation part is working as expected (under constraints) already. > You can't

Re: [Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Markus Elfring
>>> You can't have an expression directly following a statement. >>> Only statements follow other statements. >> >> This information is reasonable. >> >> Does the Coccinelle software insist on the specification of another semicolon >> in the SmPL script for the identification of an adjustable

Re: [Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Julia Lawall
On Sat, 28 Nov 2020, Markus Elfring wrote: > >> I have shown a transformation example where a function parameter should be > >> replaced > >> by a previous function call. > >> Thus a semicolon should be intentionally be deleted. > > > > That makes no sense. > > This transformation part is

Re: [Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Julia Lawall
On Sat, 28 Nov 2020, Markus Elfring wrote: > > Why do you want to remove the semicolon? > > I have shown a transformation example where a function parameter should be > replaced > by a previous function call. > Thus a semicolon should be intentionally be deleted. That makes no sense. You

Re: [Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Julia Lawall
On Sat, 28 Nov 2020, Markus Elfring wrote: > Hello, > > The following small SmPL script gets successfully parsed by the Coccinelle > software. > > > @Replacement@ > expression call, input, target; > identifier gs; > @@ > -\( g_string_assign@gs \| g_string_append@gs \) (target, input); > call

[Cocci] Checking the influence of an omitted semicolon on a code adjustment

2020-11-28 Thread Markus Elfring
Hello, The following small SmPL script gets successfully parsed by the Coccinelle software. @Replacement@ expression call, input, target; identifier gs; @@ -\( g_string_assign@gs \| g_string_append@gs \) (target, input); call ( - target + gs (target, input) ); But if I would