<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://cocci.ekstranet.diku.dk/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://cocci.ekstranet.diku.dk/wiki/feed.php">
        <title>Coccinelle</title>
        <description></description>
        <link>http://cocci.ekstranet.diku.dk/wiki/</link>
        <image rdf:resource="http://cocci.ekstranet.diku.dk/wiki/lib/images/favicon.ico" />
       <dc:date>2010-09-09T06:38:23+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=using_cpp&amp;rev=1281186725&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=start&amp;rev=1281186431&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=wiki:syntax&amp;rev=1279806227&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=metavariables&amp;rev=1274692126&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=c_syntax_errors&amp;rev=1274505376&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=coccinelle_api_for_use_with_python&amp;rev=1272005135&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=dependencies_between_patterns&amp;rev=1268575039&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=source_location_information&amp;rev=1267961293&amp;do=diff"/>
                <rdf:li rdf:resource="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=virtual_identifiers&amp;rev=1264496438&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://cocci.ekstranet.diku.dk/wiki/lib/images/favicon.ico">
        <title>Coccinelle</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/</link>
        <url>http://cocci.ekstranet.diku.dk/wiki/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=using_cpp&amp;rev=1281186725&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-08-07T15:12:05+02:00</dc:date>
        <dc:creator>Nicolas Palix</dc:creator>
        <title>The spp tool - created</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=using_cpp&amp;rev=1281186725&amp;do=diff</link>
        <description>In the source distribution of Coccinelle, there is the source code of the spp
tool that call cpp before running spatch. All the -D and -I options are passed to
cpp when it is called.


An example is in the demos/spp directory of the Coccinelle distribution.</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=start&amp;rev=1281186431&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-08-07T15:07:11+02:00</dc:date>
        <dc:creator>Nicolas Palix</dc:creator>
        <title>Coccinelle wiki</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=start&amp;rev=1281186431&amp;do=diff</link>
        <description>spatch

	*  Metavariables
	*  C syntax errors
	*  Coccinelle syntax errors
	*  Matching Python rules

Usage Tips

	*  Language constructs
	*  Controlling the running time of spatch
	*  Pattern match failure
	*  The use of &quot;when&quot;
	*  Parameter list matching
	*  Working on global/local variables -- using the ''local'' attribute
	*  Position metavariables
		*  Working on if with single statement, ignoring if with curly brakets
		*  Update function calls to use a wrapper function without updating th…</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=wiki:syntax&amp;rev=1279806227&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-07-22T15:43:47+02:00</dc:date>
        <dc:creator>lb</dc:creator>
        <title>Formatting Syntax</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=wiki:syntax&amp;rev=1279806227&amp;do=diff</link>
        <description>doku&gt;DokuWiki supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing the Edit this page button at the top or bottom of the page. If you want to try something, just use the playground page. The simpler markup is easily accessible via quickbuttons, too.</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=metavariables&amp;rev=1274692126&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-05-24T11:08:46+02:00</dc:date>
        <dc:creator>Julia Lawall</dc:creator>
        <title>Constant</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=metavariables&amp;rev=1274692126&amp;do=diff</link>
        <description>Constant

The constant attribute on a metavariable declaration will only match an explicit literal value. For instance constant int matches a literal that is considered to have int type.

@r@
int E1;
constant int C;
@@

E1 = C

Because in Linux constant defined using #define are commonly written using only capital letters, an identifier written using only capital letters is considered to be a constant as well.  For example, consider the following semantic patch:</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=c_syntax_errors&amp;rev=1274505376&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-05-22T07:16:16+02:00</dc:date>
        <dc:creator>Julia Lawall</dc:creator>
        <title>Consequence of a syntax error</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=c_syntax_errors&amp;rev=1274505376&amp;do=diff</link>
        <description>Consequence of a syntax error


spatch performs syntax error recovery using various heuristics.

If a syntax error occurs while processing a function definition no matching is attempted on the contents of that definition.

The following:

spatch -parse_c foo.c

provides information about the parsing of the C file, foo.c.  Lines annotated with BAD contain parse errors.  A summary is provided at the end of the reasons for the most common parsing problems.  Often parsing problems are due to macro u…</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=coccinelle_api_for_use_with_python&amp;rev=1272005135&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-23T08:45:35+02:00</dc:date>
        <dc:creator>Nicolas Palix</dc:creator>
        <title>Alter the matching process</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=coccinelle_api_for_use_with_python&amp;rev=1272005135&amp;do=diff</link>
        <description>Alter the matching process


The following discards the environment that caused execution of the python rule.


cocci.include_match(False)


API for org mode

Legacy API


@r@
position p,p1;
@@

// Place your cocci code here
// using position p and then position p1.

@script:python@
p &lt;&lt; r.p;
p1 &lt;&lt; r.p1;
@@

cocci.print_main(&quot;main message&quot;,p)

# Use print_sec when you have exactly one p1 for every p.
cocci.print_sec(&quot;secondary message&quot;, p1)

# Use print_secs when you have at least one p1 for eve…</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=dependencies_between_patterns&amp;rev=1268575039&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-03-14T14:57:19+02:00</dc:date>
        <dc:creator>Julia Lawall</dc:creator>
        <title>dependencies_between_patterns</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=dependencies_between_patterns&amp;rev=1268575039&amp;do=diff</link>
        <description>It is possible for one rule to depend on the success or failure of another rule.  There are four possibilities:


	*  X: The rule is only applied to bindings that X succeeded on.  In the following:
@foo_found disable all@
identifier foo;
@@
foo(...)
{
 &lt;+...
  {
  ...
  return;
  }
 ...+&gt;
}

@bar depends on foo_found@
@@
-bar()

any instances of the call bar() will only be removed when a match has occurred against a function called foo.</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=source_location_information&amp;rev=1267961293&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-03-07T12:28:13+02:00</dc:date>
        <dc:creator>Julia Lawall</dc:creator>
        <title>source_location_information</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=source_location_information&amp;rev=1267961293&amp;do=diff</link>
        <description>Location metavariables are attached to a token with the '@' characted.

A position metavariable contain the following information relative to its token:

 Field            Information                                   file             the name of the current source file           current_element  the name of the function currently proceed    line             the  starting line number of the token        column           the starting character position of the token  line_end         the ending li…</description>
    </item>
    <item rdf:about="http://cocci.ekstranet.diku.dk/wiki/doku.php?id=virtual_identifiers&amp;rev=1264496438&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-01-26T10:00:38+02:00</dc:date>
        <dc:creator>Nicolas Palix</dc:creator>
        <title>virtual_identifiers</title>
        <link>http://cocci.ekstranet.diku.dk/wiki/doku.php?id=virtual_identifiers&amp;rev=1264496438&amp;do=diff</link>
        <description>Often it is useful to have several semantic patches that have a similar structure, but that use different concrete variable names.  For example, one could have a collection of semantic patches for finding or fixing memory leaks.  These might all have the same structure, but differ in the names of the allocation and deallocation functions.  To address this case, it is possible (starting in version 0.2.1) to parameterize a rule using virtual identifiers.  Any identifier metavariable can be declare…</description>
    </item>
</rdf:RDF>
