On Sun, 10 Jun 2012, SF Markus Elfring wrote:
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.
Is this a real problem for you, or a hypothetical one?
I would like to suggest a configurable approach that is similarly used by
template languages.
http://en.wikipedia.org/wiki/Template_processor
I don't see what is being referred to in this article.
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?
I don't know. I have asked the person who added the feature to check.
How is the symbol name application safer in the patch code from the other use
cases?
The goal of symbol is not to make the use of the symbol safer but to avoid
bothering you with warning messages that go against your intention. I
guess it is safer in that it increases the likelihood that you will pay
attention to real warning messages.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)