Skip to contentSkip to conversation

Python interface

Cocci Markus Elfring 2 participants 3 messages Jun 8, 2020

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

@r depends on !patch@

// It doesn't work. Is it normal?
//position p: script:python() { matches.extend(p); relevant(p) };

"Doesn't work" means you get a parse error? The parser of the code inside the {} is pretty fragile.

I find such information also interesting.

Quoted 2 lines

Perhaps this could be improved somewhat, but it is limited by the fact that Coccinelle doesn't know how to parse python properly.

Should the software be able to determine just the amount of script code between the curly brackets?

Quoted 2 lines

If you tried this and it didn't work, it could be because of parallelism. When you use the -j option, each child process has its own address space,

There are the usual concerns to consider around multi-programming.

Quoted 1 line

and by default they are not combined for the finalize,

Are you looking for an other combination approach?

Quoted 1 line

which is not run in parallel.

Will a SmPL child process get a chance to perform customised finalisation code? Would you like to continue the clarification according to a topic like “Complete support for fork-join work flows”?
https://github.com/coccinelle/coccinelle/issues/50

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

#1 lore raw
Quoted 7 lines · Markus Elfring
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

@r depends on !patch@

// It doesn't work. Is it normal?
//position p: script:python() { matches.extend(p); relevant(p) };

"Doesn't work" means you get a parse error? The parser of the code inside the {} is pretty fragile.

Quoted 8 lines

I find such information also interesting.

Quoted 2 lines

Perhaps this could be improved somewhat, but it is limited by the fact that Coccinelle doesn't know how to parse python properly.

Should the software be able to determine just the amount of script code between the curly brackets?

What if there is a string or comment inside the script code, ant it contains only a }?

Anyway the problem is that the Coccinelle lexer doesn't know that it is looking at script code, or eg {} around a selection of types.

Quoted 6 lines
Quoted 1 line

which is not run in parallel.

Will a SmPL child process get a chance to perform customised finalisation code? Would you like to continue the clarification according to a topic like “Complete support for fork-join work flows”?
https://github.com/coccinelle/coccinelle/issues/50

Those issues are addressed by the use of the merge functionality.

julia

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

#2 lore raw
Quoted 5 lines
Quoted 2 lines

Should the software be able to determine just the amount of script code between the curly brackets?

What if there is a string or comment inside the script code, ant it contains only a }?

I suggest to consider corresponding escaping (or quoting) of questionable text.

Quoted 2 lines

Anyway the problem is that the Coccinelle lexer doesn't know that it is looking at script code, or eg {} around a selection of types.

Can the parser component become better accordingly?

Quoted 6 lines
Quoted 4 lines

Will a SmPL child process get a chance to perform customised finalisation code? Would you like to continue the clarification according to a topic like “Complete support for fork-join work flows”?
https://github.com/coccinelle/coccinelle/issues/50

Those issues are addressed by the use of the merge functionality.

I have still got understanding difficulties for the previously mentioned test script.
https://github.com/coccinelle/coccinelle/blob/175de16bc7e535b6a89a62b81a673b0d0cd7075c/tests/merge_vars_python.cocci#L1

How will the software documentation become finally complete also for this issue?

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci