Re: [cocci] Search for the concatenation of meta variable + fixed string
Markus Elfring <[email protected]>
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
>> Are you more interested in an “ordinary” source code search? > > Correct, it's only about searching. Thanks for this acknowledgement. > But not "ordinary". Corresponding views are varying. > If there's another OSS tool that could do semantic code search, There are further tools available for this purpose. > can deal with C macros and supports "hops" like first search marro, then search definition of function referenced by macro please tell me. The alternatives are more restricted then. But it seems that you are also looking for help on algorithm design. > Coccinelle is the only tool capable enough I currently know. The semantic patch language has got a lot of potential for more convenient data processing. >> I suggest to take another look > > I took reasonable amount of looks and found no better way than this [1]. It seems that your views can become too limited so far. doc: Use coccinelle to identify important functions https://github.com/haxtibal/linux/commit/ff6904ce23a022908fd8bbfc0b804900154ae48b https://github.com/haxtibal/linux/blob/tdmg/cocci/cocci/sysfs.cocci > That's why I'm posting here and hope to receive SmPL snippets that demonstrate a more idiomatic less complex way. > >> at algorithmic properties. There are special development challenges to consider because you need to perform data processing especially with macros. > The linux tree was searched in 44 s locally, which is fine for me. It is nice that your computer is sufficiently powerful for your initial experiments. >> Would you need to extract identifiers from selected macro calls? > > Yes, I print functions names and positions in python scripts. The result, verified with samples, looks complete [2]. Would you get further development ideas from any public SmPL script examples (which I published over the years)? See also: Deletion of checks before specific function calls in Linux source files https://build.opensuse.org/package/show/home:elfring:semantic_patching:Deletion_of_checks_before_specific_function_calls/Deletion_of_checks_before_specific_function_calls_in_Linux_source_files How do you think about to split and configure your data processing steps similarly? Regards, Markus