On Sat, 23 Nov 2019, Markus Elfring wrote:

> Hello,
>
> Metavariables of the semantic patch language provide common information.
>
> 1. A fixed type (or kind)
> 2. An entity which can be variable.
>
> These properties can be distinguished further.
>
> Another example:
> char c;
>
> Such SmPL code looks like the specification of a fixed data type selection for
> the C programming language.
> Do you know anything that could be still variable for such an item?

What do you mean by still variable?  c can match 'a' 'b' 'x', etc.  It can
also match a variable that has type char or a function call that returns a
value of type char, etc.  There are a lot of possibilities.

>
> The situation is different for metavariable kinds like the following.
>
> * identifier
> * struct
> * expression

An expression metavariable matches an expression of any type.  A struct
metavariable matches an expression that has struct type (for any struct
type).  A char metavariable matches an expression that has char type.

identifier doesn't fit in this discussion.  It only matches identifiers,
not arbitrary expressions.

> We would like to achieve source code transformations which can be compiled
> (or not).

No idea what you mean by compiled.  Compiled by what compiler?

> How often will it matter then how these selections will be applied?

What selections?

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

Reply via email to