On Thu, 11 Aug 2011, Jani Monoses wrote:

> Hello,
> 
> On 08/11/2011 11:43 AM, Julia Lawall wrote:
> > Changes:
> >
> > * The -sp option now allows you to write a semantic patch on the command
> > line.  This is useful if you want to use spatch like grep, eg to find all
> > uses of a particular field in a structure of a particular type.  For
> > example:
> >
> > spatch -sp "e:struct foo *:->field" -dir myprogram
> >
> > More information is available in Section 12 of the manual
> > (docs/manual/main_grammar.pdf)
> 
> Are all the docs published in html as well? At one point I know that quite a
> few of them - not just the papers - were pdf only.
> HTML makes for easier browsing.

The grammar is available in html.  It should be up to date now, including 
the description of the command line semantic patch option:

http://coccinelle.lip6.fr/docs/main_grammar012.html

It would indeed be nicer if the options were available by html.

> > * PCRE regular expressions are now available by default, if the
> > appropriate library is found on the machine.  Regular expressions no
> > longer match from the beginning of an identifier name.
> 
> Is this for matching identifiers by regexp inside a spatch so there's no need
> to embed python or ocaml in the patch?

You could previously put constraints on the form of an identifier using a 
regular expression.  I would have expected that the regular expression 
would match the whole identifier, but apparently it is desired that it 
should match anywhere within the identifier, as done in perl.  So it is 
now implemented in this way.  It also uses PCRE regular expressions, 
rather than the ones implemented using the OCaml Str library.

In SmPL, the operator for matching with a regular expression is ~=.  But 
it is supposed to become =~ to be like perl, to better suggest that we are 
using the perl semantics.

julia

> > * Small improvements in pretty printing and typedef management.
> >
> > * When treating a directory, if a header file is transformed in the same
> > way multiple times only one instance of the patch is generated.
> >
> > * -sp_file is no longer obligatory.  One argument may end in .cocci and
> > this is assumed to be the name of the file containing the semantic patch.
> nice :)
> 
> Jani
> 
> _______________________________________________
> Cocci mailing list
> [email protected]
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
> 
> 
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to