Separating label from previous key word display
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
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-coccitest_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
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
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-coccitest_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
Quoted 9 lines
OK. If you had written something like:
Shouldn't:
Quoted 1 line
Quoted 1 line
Quoted 1 line
gotospecial_targetbe
Quoted 1 line
Quoted 1 line
Quoted 1 line
goto
special_targetI could have known immediately what you were talking about.
Thanks for your corresponding adjustment “add space after goto token”.
https://gitlab.inria.fr/coccinelle/coccinelle/-/commit/91665c5ff245fcd23a36bc0ba9662e02c731bbcb
Regards,
Markus