All of lore.kernel.org
 help / color / mirror / Atom feed
From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] script code on metavariables
Date: Mon, 18 Jan 2016 11:15:00 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.10.1601181112390.2520@hadrien> (raw)
In-Reply-To: <569CBA51.2040303@users.sourceforge.net>

> > The basic notation is:
> >
> > position p : script:ocaml(params) { expression };
> >
> > Params can only be inherited metavariables.
>
> Would you like to clarify the specification of such parameters
> a bit more?

r.x

Unlike the case of an ordinary python/ocaml script, you are stuck with the
name x in the script code.

> > The expression should return true or false, ie true if the proposed value
> > of p is acceptable as a match, and false if it is not.
>
> Do you describe the introduction of generic predicate functions here?

I don't understand the question.  In any case, the script doesn't define
functions, due to the very limited syntax.  The normal case woudl be to
define some functions in the initialize rule of the semantic patch, and
just call them here.

thanks,
julia

  reply	other threads:[~2016-01-18 10:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17  8:47 [Cocci] script code on metavariables Julia Lawall
2016-01-18 10:11 ` SF Markus Elfring
2016-01-18 10:15   ` Julia Lawall [this message]
2016-01-18 10:30     ` SF Markus Elfring
2016-01-18 10:43       ` Julia Lawall
2016-01-18 12:00         ` SF Markus Elfring
2016-01-18 12:05           ` Julia Lawall
2016-01-18 12:28             ` SF Markus Elfring
2016-01-18 20:25         ` [Cocci] Documentation check for parallelisation support? SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1601181112390.2520@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.