All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
To: Christopher Larson <clarson@kergoth.com>
Cc: "bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH 1/2] data_smart: simple bracket matching inside python expressions
Date: Thu, 04 Feb 2016 08:33:40 +0200	[thread overview]
Message-ID: <E8BDB082-1212-49E1-AA03-58D9E4A18182@linux.intel.com> (raw)
In-Reply-To: <CABcZANkJ4Ta=_YuU5yOk55XGH0mBpSD6VCcNiSX9aZY2ixLcpA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

Hi Christopher,

On 03/02/16 17:56, "Christopher Larson" <kergoth@gmail.com on behalf of clarson@kergoth.com> wrote:


On Wed, Feb 3, 2016 at 3:33 AM, Markus Lehtonen <markus.lehtonen@linux.intel.com> wrote:
This expands the python expansion regex by matching curly brackets
inside python expressions. In its simplicity it is limited: e.g. it does
not correctly handle nested curly brackets or open curly brackets (i.e.
'{' without a matching '}') inside python expressions. Making python
parsing inside data_smart fully error-free would require significantly
more work, basically using/implementing python parser to correctly
handle python strings etc.

[YOCTO #8849]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>

Will this cause problems with regular variable expansion nested inside of inline python, which is allowed? I.e. ${@ ... '${FOO}'}

No, it wont affect that. First of all because the variable expansion is done before python expansion – ${FOO} would be expanded before the Python regexp is evaluated. Second, the limitation about nested brackets is only about nested brackets inside the python expression (i.e. something like '${FOO${BAR}}').

Thanks,
  Markus



[-- Attachment #2: Type: text/html, Size: 2307 bytes --]

  reply	other threads:[~2016-02-04  6:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 10:33 [PATCH 0/2] data_smart: simple matching of curly brackets inside Python expressions Markus Lehtonen
2016-02-03 10:33 ` [PATCH 1/2] data_smart: simple bracket matching inside python expressions Markus Lehtonen
2016-02-03 15:56   ` Christopher Larson
2016-02-04  6:33     ` Markus Lehtonen [this message]
2016-02-03 10:33 ` [PATCH 2/2] data_smart: handle '\x7d' in python parsing Markus Lehtonen
2016-02-03 16:52   ` Richard Purdie
2016-02-04  6:39     ` Markus Lehtonen
2016-02-04  8:21       ` Richard Purdie
2016-02-04 17:56         ` Markus Lehtonen

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=E8BDB082-1212-49E1-AA03-58D9E4A18182@linux.intel.com \
    --to=markus.lehtonen@linux.intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=clarson@kergoth.com \
    /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.