Version 1.0.0-rc17 has been released. Some changes are:
[bpt/coccinelle.git] / docs / manual / cocci_syntax.tex
index 82311bc..0a91dff 100644 (file)
@@ -229,6 +229,15 @@ This makes it possible to get eg the starting and ending position of {\tt
   f(...)}, by writing {\tt f(...)@E@p}, for expression metavariable {\tt E}
 and position metavariable {\tt p}.
 
+Other kinds of metavariables can also be attached using \texttt{@} to any
+token.  In this case, the metavariable floats up to the enclosing
+appropriate expression.  For example, {\tt 3 +@E 4}, where {\tt E} is an
+expression metavariable binds {\tt E} to {\tt 3 + 4}.  A particular case is
+{\tt Ps@Es}, where {\tt Ps} is a parameter list and {\tt Es} is an
+expression list.  This pattern matches a parameter list, and then matches
+{\tt Es} to the list of expressions, ie a possible argument list,
+represented by the names of the parameters.
+
 \begin{grammar}
   \RULE{\rt{ids}}
   \CASE{\NT{COMMA\_LIST}\mth{(}\NT{pmid}\mth{)}}