Improved handling of member access operators with SmPL expression variables
Hello,
I pointed out that some data processing can be achieved by the means of the semantic patch language.
SmPL script example:
@display2@
identifier an_item, a_field;
@@
(
*an_item.a_field
|*an_item->a_field
)
Extend support for data processing with member identifications 2020-09-28
https://github.com/coccinelle/coccinelle/issues/226#issuecomment-699787269
Another SmPL script example:
@my_test@
expression hint;
@@*hint->hint
Questionable test result (also according to the software combination “Coccinelle 1.3.2”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci show_expression_for_same_member_name.cocci …
minus: parse error:
File "show_expression_for_same_member_name.cocci", line 4, column 7, charpos = 37
around = 'hint',
whole content = *hint->hint
How will development interests evolve to improve affected software components?
https://en.cppreference.com/c/language/operator_member_access#Member_access
Regards,
Markus
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines
Quoted 16 lines
Another SmPL script example:
@my_test@
expression hint;
@@*hint->hintQuestionable test result (also according to the software combination “Coccinelle 1.3.2”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-coccishow_expression_for_same_member_name.cocci…
minus: parse error:
File "show_expression_for_same_member_name.cocci", line 4, column 7, charpos = 37
around = 'hint',
whole content =*hint->hint
Quoted 5 lines
Quoted 2 lines
How will development interests evolve to improve affected software components?
https://en.cppreference.com/c/language/operator_member_access#Member_accessThey will not improve. Proposed changes will be NACKed. Please stop asking for this. It is not in the spirit of the language.
I hope that I can convince contributors for further development possibilities.
Regards,
Markus
Quoted 14 lines
Quoted 14 lines
Another SmPL script example:
@my_test@
expression hint;
@@*hint->hintQuestionable test result (also according to the software combination “Coccinelle 1.3.2”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-coccishow_expression_for_same_member_name.cocci…
minus: parse error:
File "show_expression_for_same_member_name.cocci", line 4, column 7, charpos = 37
around = 'hint',
whole content =*hint->hint
…
Quoted 2 lines
They will not improve. …
It is not in the spirit of the language.
* Under which circumstances would you get into the mood to explain the reasons for the presented error message?
* Can collateral evolution become more interesting?
* How many member names can be handled by bigger SmPL rules?
Regards,
Markus