On Sat, 17 Dec 2011, SF Markus Elfring wrote:
I assume that this approach has got various consequences if you choose to
support C syntax and SmPL rule features by the single interface
"metavariable". I imagine that it would be useful to offer separate
interfaces
for SmPL rule management and syntax handling.
I don't understand any of the above.
I try again to explain my understanding of functionality from the semantic
patch language so far.
Coccinelle know what kind of term the pattern matches. That is the kind
of metavariable that is implicitly declared.
I do not see that they are implicitly declared. I see the situation in the
way that metavariables are explicitly specified in the SmPL declaration
block.
http://coccinelle.lip6.fr/docs/main_grammar002.html#metadecl
The most "data types" for metavariables correspond to concrete syntax
elements in the C programming language. There is a clear mapping between
them, isn't it?
A SmPL rule contains more and different settings. So I imagine that an
alternative wording would be needed to refer to such a rule from a
metavariable.
If you have a rule:
@r@
@@
f(3)
Then afterwards you can declare
expression r.r;
And if you have a rule
@s@
@@
f(3);
The afterwards you can declare
statement s.s;
There is no new syntax.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)