>> @replacement@ >> identifier M; >> @@ >> #define M >> -snprintf >> +spgprintf_d >> (...) > > I think you could put \ in your semantic patch, like in C,
The escaping of line breaks would be required for the complete handling of logical source lines. Such functionality does not help with the shown test script for the semantic patch language at the moment. > but I don't know. Can we change this aspect together? >> elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci >> use_spgprintf5.cocci >> … >> minus: parse error: >> File "use_spgprintf5.cocci", line 8, column 0, charpos = 72 >> around = '', >> whole content = Such an error message points some work in progress out. * The data processing needs to be reconsidered for the safe support of object- and function-like macros. * The explanation of the error reasons should become more helpful. Thus I hope that more collateral evolution can happen for affected open issues. I assume that software development efforts will evolve then in an other way than a “quick fix”. The current parsing approach is using the tools “ocamlyacc” and “Menhir”. They support only the parsing technologies “LALR(1)” and “LR(1)” (context-free grammars). I imagine that context-dependent data processing will be needed. I guess also that other development tools will be needed according to the Chomsky–Schützenberger hierarchy. https://en.wikipedia.org/wiki/Context-sensitive_grammar Regards, Markus _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci