Skip to contentSkip to conversation

Separating label from previous key word display

cocci Markus Elfring 2 participants 5 messages Mar 1 – Mar 6

lore
Share & tools
lore
#0 lore raw

Hello,

I tried the following SmPL script variant out also together with the software combination “Coccinelle 1.3.1”.

@replacement@
expression action;
identifier rc;
@@
-action(...);
-return rc
+goto special_target
;

Questionable test result:
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci test_parse_goto_display.cocci …
-action-(-...-)-;
-return -rc

Quoted 1 line
Quoted 1 line
Quoted 1 line

gotospecial_target

;
…

How can it be achieved to separate the mentioned label from a corresponding key word display?

Regards,
Markus

#1 lore raw
Quoted 25 lines · Markus Elfring

Hello,

I tried the following SmPL script variant out also together with the software combination “Coccinelle 1.3.1”.

@replacement@
expression action;
identifier rc;
@@

(quoted diff) +1 -2
-action(...);
-return rc
+goto special_target
 ;

Questionable test result:
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci test_parse_goto_display.cocci …

(quoted diff) +0 -2
-action-(-...-)-;
-return -rc
  >>> gotospecial_target

;
…

Quoted 2 lines

How can it be achieved to separate the mentioned label from a corresponding key word display?

I have no idea what you are asking for. It would help a lot of you would provide an expected output.

julia

#2 lore raw
Quoted 4 lines
Quoted 2 lines

How can it be achieved to separate the mentioned label from a corresponding key word display?

I have no idea what you are asking for.

???

Quoted 2 lines

It would help a lot of you would
provide an expected output.

Would you find the shown display improvable anyhow?

Questionable test result:
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci test_parse_goto_display.cocci …
-return -rc

Quoted 1 line
Quoted 1 line
Quoted 1 line

gotospecial_target

;
…

Would the representation be a bit nicer with an additional space character here?

Regards,
Markus

#3 lore raw
Quoted 17 lines · Markus Elfring
Quoted 4 lines
Quoted 2 lines

How can it be achieved to separate the mentioned label from a corresponding key word display?

I have no idea what you are asking for.

???

Quoted 2 lines

It would help a lot of you would
provide an expected output.

Would you find the shown display improvable anyhow?

Questionable test result:
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci test_parse_goto_display.cocci …
-return -rc

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

gotospecial_target

;
…

Would the representation be a bit nicer with an additional space character here?

OK. If you had written something like:

Shouldn't:

Quoted 1 line
Quoted 1 line
Quoted 1 line

gotospecial_target

be

Quoted 1 line
Quoted 1 line
Quoted 1 line

goto special_target

I could have known immediately what you were talking about.

julia

Quoted 4 lines

Regards,
Markus