Actually, the goal is that you should be able to take a sample of code and abstract over the names that occur in it.
I find it usually "convenient" that SmPL metavariables are applied as is within patch code. But I interpret this use as a redefinition of the identifiers if identical ones can appear in the original C source code which will be mentioned in a transformation specification.
I imagine that it would be safer if it can be configured that SmPL metavariables will be only applied if the desired use is explicitly marked with special characters or commands.
I would like to suggest a configurable approach that is similarly used by template languages.
http://en.wikipedia.org/wiki/Template_processor
You can declare a metavariable as a symbol, and then it is matched exactly in the C code by the checking phase does not give a warning about it.
Is this feature already described in the SmPL grammar documentation? How is the symbol name application safer in the patch code from the other use cases? Regards, Markus _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
