All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hanna Reitz <hreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, qemu-devel@nongnu.org,
	mreitz@redhat.com
Subject: Re: [PATCH 1/3] simplebench: add img_bench_templater.py
Date: Tue, 24 Aug 2021 10:59:18 +0200	[thread overview]
Message-ID: <18d5aa59-3d73-02b6-589e-bd2f52d1f626@redhat.com> (raw)
In-Reply-To: <86ef6f7a-a9de-e422-be66-99a1edf27cae@virtuozzo.com>

On 24.08.21 10:53, Vladimir Sementsov-Ogievskiy wrote:
> 19.08.2021 19:37, Hanna Reitz wrote:
>> On 24.07.21 15:38, Vladimir Sementsov-Ogievskiy wrote:

[...]

>> +import itertools
>> +from lark import Lark
>> +
>> +grammar = """
>> +start: ( text | column_switch | row_switch )+
>> +
>> +column_switch: "{" text ["|" text]+ "}"
>> +row_switch: "[" text ["|" text]+ "]"
>> +text: /[^|{}\[\]]+/
>>
>> So I have no idea how this really works, of course, but does this 
>> mean that the `text` pattern cannot contain pipe symbols? I.e. that 
>> you cannot use pipes in the test template?
>>
>
> Hmm. I didn't try. I hope lark is smart enough to keep pipes that are 
> out of {} [] as is.. But of course, you can't hope that pipe inside {} 
> or [] will work as bash-pipe.

Yep, sure.  It’s just that the `text` nonterminal symbol doesn’t look 
like it could match anything with a pipe in it.

> Same thing with other special symbols ("{}" and "[]"). I don't want to 
> care about this too much now. This simple grammar works good for test 
> template in patch 03. If we need something more, we can add a kind of 
> special symbols escaping later.

But yes, if someone trips over this (i.e. we ourselves), we can still 
fix it then.

Hanna



  reply	other threads:[~2021-08-24  9:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 13:38 [PATCH 0/3] qcow2: relax subclusters allocation dependencies Vladimir Sementsov-Ogievskiy
2021-07-24 13:38 ` [PATCH 1/3] simplebench: add img_bench_templater.py Vladimir Sementsov-Ogievskiy
2021-08-19 16:37   ` Hanna Reitz
2021-08-24  8:53     ` Vladimir Sementsov-Ogievskiy
2021-08-24  8:59       ` Hanna Reitz [this message]
2021-08-24  9:09         ` Vladimir Sementsov-Ogievskiy
2021-07-24 13:38 ` [PATCH 2/3] qcow2: refactor handle_dependencies() loop body Vladimir Sementsov-Ogievskiy
2021-08-19 17:58   ` Eric Blake
2021-08-20 11:03   ` Hanna Reitz
2021-07-24 13:38 ` [PATCH 3/3] qcow2: handle_dependencies(): relax conflict detection Vladimir Sementsov-Ogievskiy
2021-08-19 18:02   ` Eric Blake
2021-08-20 13:21   ` Hanna Reitz
2021-08-23 12:24     ` Vladimir Sementsov-Ogievskiy

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=18d5aa59-3d73-02b6-589e-bd2f52d1f626@redhat.com \
    --to=hreitz@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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.