Skip to contentSkip to conversation

Improving expression list selections with SmPL ellipses?

cocci Markus Elfring 2 participants 4 messages Nov 1, 2025

lore
Share & tools
lore
#0 lore raw

Hello,

Would you find the following SmPL script variant reasonable?

@display@
@@
*my_action("Hello!", ..., ...);

Unfortunately, I was disturbed by the following information.

Questionable test result (according to the software combination “Coccinelle 1.3.0”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci parse_test_for_ellipsis_as_last_parameter.cocci …
minus: parse error:
File "parse_test_for_ellipsis_as_last_parameter.cocci", line 3, column 26, charpos = 39
around = '...',
whole content = *my_action("Hello!", ..., ...);

Under which circumstances will such data processing work also without using extra metavariables (instead of SmPL ellipses)?

Regards,
Markus

#1 lore raw
Quoted 7 lines · Markus Elfring

Hello,

Would you find the following SmPL script variant reasonable?

@display@
@@
*my_action("Hello!", ..., ...);

I have no idea what you think this should mean. How is it different than

my_action("Hello!", ...);

julia

Quoted 19 lines

Unfortunately, I was disturbed by the following information.

Questionable test result (according to the software combination “Coccinelle 1.3.0”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci parse_test_for_ellipsis_as_last_parameter.cocci …
minus: parse error:
File "parse_test_for_ellipsis_as_last_parameter.cocci", line 3, column 26, charpos = 39
around = '...',
whole content = *my_action("Hello!", ..., ...);

Under which circumstances will such data processing work also without using extra metavariables (instead of SmPL ellipses)?

Regards,
Markus

#2 lore raw
Quoted 3 lines
Quoted 1 line

*my_action("Hello!", ..., ...);

I have no idea what you think this should mean.

Can such a search pattern indicate that three parameters (or expressions) should be passed?

Quoted 3 lines

How is it different than

my_action("Hello!", ...);

It is tried to express another constraint, isn't it?

Regards,
Markus

#3 lore raw
Quoted 5 lines · Markus Elfring
Quoted 3 lines
Quoted 1 line

*my_action("Hello!", ..., ...);

I have no idea what you think this should mean.

Can such a search pattern indicate that three parameters (or expressions) should be passed?

No. Unless you put an expression metavariable you have no guarantee that there is exactly one expression.

julia

Quoted 11 lines
Quoted 5 lines

How is it different than

my_action("Hello!", ...);

It is tried to express another constraint, isn't it?

Regards,
Markus