From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10A7AC4338F for ; Wed, 4 Aug 2021 08:24:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9CA9B60F56 for ; Wed, 4 Aug 2021 08:24:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9CA9B60F56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBCCS-0006ib-RU for qemu-devel@archiver.kernel.org; Wed, 04 Aug 2021 04:24:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBCBP-00040H-Rx for qemu-devel@nongnu.org; Wed, 04 Aug 2021 04:23:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBCBO-00035R-Ea for qemu-devel@nongnu.org; Wed, 04 Aug 2021 04:23:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628065401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L38IrQABZNSFYPNOHjcw5l2NcS5J2l5qke/AaDWJYQs=; b=LN7tib6OC74rQ2Mzj7OKYZ0bBt/rQ9sUjGK1KJ+sUA+N6mVLWjVHUzP6SIRjm9poKRoJEZ RRx2fAPQb1ugHIV54j1ieDUSPd6IQOh2hrNlsZ15+KyG63Xs1MofFUt6WoQIHhZSBMVU98 ke8ifNIsgGeAS7p2nlLQ+6OVQ4UGRDg= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-TkMCnpftOpawLW7vS3XetQ-1; Wed, 04 Aug 2021 04:23:20 -0400 X-MC-Unique: TkMCnpftOpawLW7vS3XetQ-1 Received: by mail-pj1-f72.google.com with SMTP id 16-20020a17090a1990b029017582e03c3bso5763822pji.7 for ; Wed, 04 Aug 2021 01:23:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L38IrQABZNSFYPNOHjcw5l2NcS5J2l5qke/AaDWJYQs=; b=f6ZdU3UaLQL1tJkhHpvnBLhDeVveOZzJekEvaPQkt18LI3BW60VZasFt2d1R/CKje3 zinh7rOBpXm5xyFlfQaVaHTwzoP1ogqJDrw9I9qfJsiSr8l0HH7WP8hPOe3etq640cRq l6dzj7BdRENyTmnZpcaTX+L9A/oaI7nuRzz8NuybB+78mbfCgf9At8k9JD707XNRODeQ IlXBDXSjxGghAQfioomceCKWeCyDKsP53a9EZ0KfnOa44xmz0tGOhe/MDPzSd5dAwOdT Spw+pecxgjxXO9DsV7+GeLqojoD2eeaGGx1B5cZ0RaNZhmU/Z5H07Cdj7+a3rQKyaPg/ NVtQ== X-Gm-Message-State: AOAM533tFWYzlxBSf1bwR6ESiiTAtVy9J6n7oMW1P9tY+F0/V5cz8Nd/ JatT/iaG7PLse9Nhb1ARGcOCSiKqMkI7cWHZI9UO1X1nYaoVvKkjmdLAFFRBJTts5qzYPyVrX2i xXh8gsScTJxnXufEHrZVve8JjQUflJ3U= X-Received: by 2002:a17:90b:4a47:: with SMTP id lb7mr8586909pjb.137.1628065399090; Wed, 04 Aug 2021 01:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwUktc3evVvqElSLNMl+9AbxfCUVRNqxGx88apx2X7X7UgeMwNxx6Zbbm1Rdtb6mrnHW4enpJkvbjntgRpHS4= X-Received: by 2002:a17:90b:4a47:: with SMTP id lb7mr8586895pjb.137.1628065398901; Wed, 04 Aug 2021 01:23:18 -0700 (PDT) MIME-Version: 1.0 References: <20210618102507.3761128-1-marcandre.lureau@redhat.com> <20210618102507.3761128-7-marcandre.lureau@redhat.com> <87zgtzn911.fsf@dusky.pond.sub.org> In-Reply-To: <87zgtzn911.fsf@dusky.pond.sub.org> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 4 Aug 2021 12:23:06 +0400 Message-ID: Subject: Re: [PATCH v6 06/11] qapidoc: introduce QAPISchemaIfCond.docgen() To: Markus Armbruster Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000c5ead605c8b783f2" Received-SPF: pass client-ip=170.10.133.124; envelope-from=mlureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Blake , John Snow , qemu-devel , Stefan Hajnoczi Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000c5ead605c8b783f2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Mon, Aug 2, 2021 at 7:47 PM Markus Armbruster wrote: > marcandre.lureau@redhat.com writes: > > > From: Marc-Andr=C3=A9 Lureau > > > > Instead of building the condition documentation from a list of string, > > use the result generated from QAPISchemaIfCond.docgen(). > > > > Signed-off-by: Marc-Andr=C3=A9 Lureau > > I suspect this changes the generated documentation, similar to how the > previous patch changes generated code. True? If yes, can you show us > how? > This changes the generated documentation from: - COND1, COND2... (where COND1, COND2 are Literal nodes, and ',' is Text) to: - COND1 and COND2 (the whole string as a Literal node) This will allow us to generate more complex conditions in the following patches, such as "(COND1 and COND2) or COND3". Adding back the formatting is left to the wish list. --000000000000c5ead605c8b783f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Mon, Aug 2, 2021 at 7:47 PM Mark= us Armbruster <ar= mbru@redhat.com> wrote:
marcandre.lureau@redhat.com writes:

> From: Marc-Andr=C3=A9 Lureau <marcandre.lureau@redhat.com>
>
> Instead of building the condition documentation from a list of string,=
> use the result generated from QAPISchemaIfCond.docgen().
>
> Signed-off-by: Marc-Andr=C3=A9 Lureau <marcandre.lureau@redhat.com>
I suspect this changes the generated documentation, similar to how the
previous patch changes generated code.=C2=A0 True?=C2=A0 If yes, can you sh= ow us
how?


This changes the ge= nerated documentation from:
- COND1, COND2... (where COND1, COND2= are Literal nodes, and ',' is Text)
to:
- COND= 1 and COND2 (the whole string as a Literal node)

T= his will allow us to generate more complex conditions in the following patc= hes, such as "(COND1 and COND2) or COND3".

Adding back the formatting is left to the wish list.

<= /div>
--000000000000c5ead605c8b783f2--