On Mon, 18 Aug 2014, SF Markus Elfring wrote:

>
> >> I think for these kinds of problems it would be helpful to have a 
> >> metavariable
> >> type that is somewhere in the middle of idexpression and expression. 
> >> Something
> >> that matches an identifier or accessing a field in an identifier, or a 
> >> field
> >> of a field of an identifier and so on.
> >>
> >> In the past I had cocci scripts where I ended up doing
> >>
> >> (
> >> id->fld1
> >> |
> >> id->fld1.fld2
> >> |
> >> id->fld1.fld2.fld3
> >> ...
> >> )
> >>
> >> to kind of make this work.
> > It's probably true,  But I don't know what one would call it, and I think
> > that if one had a name for it, no one would understand it...
>
> Do you dare to suggest another type name for a metavariable in the
> semantic patch language?

Now that we have the feature of an expression metavariable that matches
the innermost enclosing expression that contains a token, I don't think it
is necessary.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to