All of lore.kernel.org
 help / color / mirror / Atom feed
From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Inclusion of script constraints in SmPL
Date: Fri, 18 Nov 2016 19:08:02 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.10.1611181901530.2963@hadrien> (raw)
In-Reply-To: <5da250c3-e80f-8842-7e85-481cdf6a6259@users.sourceforge.net>



On Fri, 18 Nov 2016, SF Markus Elfring wrote:

> >> * Would such an inclusion approach trigger special requirements on the
> >>   position for corresponding initialisation code?
> >
> > The constraint specification should be a single function call.
>
> Does the script constraint syntax allow more programming language code there?

For all practical purposes, no.  Concretely, the script constraint code is
initially parsed using a C parser, not a parser for the script language.
Function calls, of the form f(a,b,c) are in the intersection of C and the
supported scripting languages.

> > You can set up your @initialize:python@ code to import whatever you want.
>
> I would prefer to keep initialisation code for the implementation of the
> predicate function closely together with the call of the included
> metavariable.

You are most welcome to implement in ocaml the lexer and parser for the
scripting language of your choice.

julia

  reply	other threads:[~2016-11-18 18:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 19:45 [Cocci] SmPL script construction with included files SF Markus Elfring
2016-11-15 21:49 ` Julia Lawall
2016-11-15 21:56   ` SF Markus Elfring
2016-11-15 22:01     ` Julia Lawall
2016-11-16 10:48   ` SF Markus Elfring
2016-11-16 10:55     ` Julia Lawall
2016-11-16 11:34       ` SF Markus Elfring
2016-11-16 12:53         ` Julia Lawall
2016-11-16 13:12           ` [Cocci] Further developments around SmPL constraints? SF Markus Elfring
2016-11-16 13:45           ` [Cocci] SmPL script construction with included files SF Markus Elfring
2016-11-16 14:15             ` Julia Lawall
2016-11-16 14:30               ` SF Markus Elfring
2016-11-17  7:50               ` [Cocci] Further developments around function callbacks for SmPL metavariables? SF Markus Elfring
2016-11-17  7:55                 ` Julia Lawall
2016-11-18 17:13               ` [Cocci] Inclusion of script constraints in SmPL SF Markus Elfring
2016-11-18 17:43                 ` Julia Lawall
2016-11-18 18:00                   ` SF Markus Elfring
2016-11-18 18:08                     ` Julia Lawall [this message]
2016-11-18 18:32                       ` SF Markus Elfring
2016-11-18 20:12                         ` Julia Lawall
2016-11-18 21:14                           ` SF Markus Elfring
2016-11-18 21:48                             ` Julia Lawall
2016-11-19  8:00                               ` [Cocci] Better syntax for SmPL script constraints 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.1611181901530.2963@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.