* [Cocci] Extending source code at file end with SmPL
@ 2016-02-02 9:55 SF Markus Elfring
[not found] ` <alpine.DEB.2.10.1602021111510.2494@hadrien>
0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2016-02-02 9:55 UTC (permalink / raw)
To: cocci
Hello,
I became interested in another source code transformation. I would like to
append something to selected source files at the end.
How should the "file end" be expressed for the semantic patch language?
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <alpine.DEB.2.10.1602021111510.2494@hadrien>]
* [Cocci] Extending source code at file end with SmPL [not found] ` <alpine.DEB.2.10.1602021111510.2494@hadrien> @ 2016-02-02 10:56 ` SF Markus Elfring [not found] ` <alpine.DEB.2.10.1602021205280.2494@hadrien> 0 siblings, 1 reply; 5+ messages in thread From: SF Markus Elfring @ 2016-02-02 10:56 UTC (permalink / raw) To: cocci >> How should the "file end" be expressed for the semantic patch language? > > There is no convenient way to express this. You could perhaps match all > of the function definitions, find their line numbers, and put something > after the last one. Thanks for your feedback. How are the chances to extend the SmPL capabilities for matching of special positional constraints? Are we looking for the support of functionality which is similar to the use of the search operator "$" within regular expressions? http://www.regular-expressions.info/anchors.html Would it make sense to clarify any further extensions? Regards, Markus ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <alpine.DEB.2.10.1602021205280.2494@hadrien>]
* [Cocci] Extending source code at file end with SmPL [not found] ` <alpine.DEB.2.10.1602021205280.2494@hadrien> @ 2016-02-02 11:34 ` SF Markus Elfring 2016-02-02 11:37 ` Julia Lawall 0 siblings, 1 reply; 5+ messages in thread From: SF Markus Elfring @ 2016-02-02 11:34 UTC (permalink / raw) To: cocci >> Would it make sense to clarify any further extensions? > > Why don't you just use cat? A software tool like "cat" does usually not generate the desired patch file. I would also appreciate if the input file will be checked according to specific source code search patterns. Regards, Markus ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cocci] Extending source code at file end with SmPL 2016-02-02 11:34 ` SF Markus Elfring @ 2016-02-02 11:37 ` Julia Lawall 2016-02-02 12:23 ` SF Markus Elfring 0 siblings, 1 reply; 5+ messages in thread From: Julia Lawall @ 2016-02-02 11:37 UTC (permalink / raw) To: cocci On Tue, 2 Feb 2016, SF Markus Elfring wrote: > >> Would it make sense to clarify any further extensions? > > > > Why don't you just use cat? > > A software tool like "cat" does usually not generate the desired patch file. > > I would also appreciate if the input file will be checked according to specific > source code search patterns. I guess you can generate what you want with Coccinelle, and then cat it onto the end of some other file and do diff to get a patch. julia > > Regards, > Markus > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Cocci] Extending source code at file end with SmPL 2016-02-02 11:37 ` Julia Lawall @ 2016-02-02 12:23 ` SF Markus Elfring 0 siblings, 0 replies; 5+ messages in thread From: SF Markus Elfring @ 2016-02-02 12:23 UTC (permalink / raw) To: cocci >> I would also appreciate if the input file will be checked according to specific >> source code search patterns. > > I guess you can generate what you want with Coccinelle, and then cat it > onto the end of some other file and do diff to get a patch. I am looking for possibilities to keep a tool like "spatch" the central interface for the specification of desired source code changes. I would like to avoid the patch generation for special search patterns by various workarounds. How many software development efforts are needed then to keep corresponding context information (like line numbers for patch hunks) consistent? Regards, Markus ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-02 12:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-02 9:55 [Cocci] Extending source code at file end with SmPL SF Markus Elfring
[not found] ` <alpine.DEB.2.10.1602021111510.2494@hadrien>
2016-02-02 10:56 ` SF Markus Elfring
[not found] ` <alpine.DEB.2.10.1602021205280.2494@hadrien>
2016-02-02 11:34 ` SF Markus Elfring
2016-02-02 11:37 ` Julia Lawall
2016-02-02 12:23 ` SF Markus Elfring
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.