From patchwork Fri Mar 6 17:17:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 184294 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp7684269ile; Fri, 6 Mar 2020 09:38:37 -0800 (PST) X-Google-Smtp-Source: ADFU+vv54jEUKq52HQqWseZKjsQZO5MiCCWjQjFTnaXr0LlGhJlwMnS4Bg+uOv52dv0w+DcmuhOe X-Received: by 2002:a05:6214:928:: with SMTP id dk8mr3853357qvb.170.1583516317491; Fri, 06 Mar 2020 09:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583516317; cv=none; d=google.com; s=arc-20160816; b=LvPYGmBfcn2D2foVMQpK9WfKCOA7zPKWCktQYPpYWMq+J2IlHd15UlINn82WvZPDZ6 7atlZrYfkxMS+QbtSocrnFMIJqUJ2msIJdUWaUsGD4IWjH8G+dwZJToC5IEK+HM8cXTg 2p7XXcbkWE16chtufKpbd/T4BdG+3fL5KU0T2GYue5ibvLdPWWtF3uqKmZ4HfNJcR0eF FLCmDMu560ZBa8fuIBf7mXQCKfm4KN93N7TcyTAhLTowbIKf1xHEczi41KqA+1I9WqX3 0pyArx4sV7DP8EDvH5q0k7Edkvvqfg09MhYw9e8miojyJMA8uk+srKjao/r6layFxp51 k4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=vrW9XF6BLQAnIhvTlU5HbFtHoyw3EceDEO0yqvg7TFQ=; b=096qkRVJxblLUE+jz1V92g3Ex6JX5Kkyq/e7WzMFdMx9k4Lsxeym5yHI/p+XmjTqGw b+AxT1dGi/hWkutpbiSN77rVa8ifLwlcImM8Om6tIb6ULxJYlZqgorHDzl3r/eL5bkRm 04hnn3+VPLSOjLQKUB+gChsv5rjXxtFoCzXcCT9ITnn+PKE9+Km/AATp1eqKFmY9+wmd gEDmlVv/f9q4qPcGRNzFDmZGEP+J42asH9KwC5jKdnllSTe92/MzCGVn5u3fHeYrMscY 1sPMQUfOW/IP292a+D/GOoJtBy8C1BGjyi1GevRqO1jgMNQzhVqCBZFPsvUGeKuyZRx+ 9ofg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S380BV/+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s22si1636761qkg.167.2020.03.06.09.38.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Mar 2020 09:38:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S380BV/+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAGvl-0002QN-1s for patch@linaro.org; Fri, 06 Mar 2020 12:38:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50774) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAGbm-0000aN-Em for qemu-devel@nongnu.org; Fri, 06 Mar 2020 12:17:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAGbl-0007vT-6t for qemu-devel@nongnu.org; Fri, 06 Mar 2020 12:17:58 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:36179) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAGbl-0007tZ-00 for qemu-devel@nongnu.org; Fri, 06 Mar 2020 12:17:57 -0500 Received: by mail-wm1-x32e.google.com with SMTP id i14so3194984wmb.1 for ; Fri, 06 Mar 2020 09:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=vrW9XF6BLQAnIhvTlU5HbFtHoyw3EceDEO0yqvg7TFQ=; b=S380BV/+pCVYsEPPtZ1nkWRHqHspAj4EN2Xa4dVV17/hKQf5CDTniObVMlkhp229lY EDm0ixeL8YzfjuFnH8JsUgH98eoHYP5u6joh27Mzun6Pzuy4YP5I5revvJxL4X7QapV1 vgqgls9Ua2lPS7PRC2abb7F6UARCO0/7wQXKTYwEusFW+Mu/5KvDFga6CP4vMRHG4NEB qBP0U7zfo5lAekdgXxD53TezQR8SiwGsCflTTcbCuVvYzUAhIRzrJpKjEjO7M12UAKm+ mpWXXrxwFGvnuIsNtssqLJoNe88r6eUSpoaFVT0u2r7QvpCsEFGr1VTmWCgCtlWYcnGw bwhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vrW9XF6BLQAnIhvTlU5HbFtHoyw3EceDEO0yqvg7TFQ=; b=XqOB7puLl4dZlWQUDNX7FG6AwrwyR0PjQhoN11r8C8IkQTWIiV7c6N1Z8wNFUYURQH o4OWv8zhmEzPAuKDlVzKDjBCuH74JyORZafrBSUCj836memQN7aCD+knrzaLftatx7+z bs2Ge4iTEhIm7ZRUpcboT996odCR8Y20MzCe8BpGBQIkg1NXcs5dOhoH9xeSibqc849l pWamQrB7zXA0x3vsPWY8LfQ43MkUC3Hg9GBAg2axOr1ratON/+ja1PUnmvXXRuPp3i6L 37MhABGgrJG80Ev1fRK1swfVPSZo1gOOxzJ5KgvtkBTFwuywCKGA17TzypUPtz2cnABh 5IhQ== X-Gm-Message-State: ANhLgQ0HWl42ZF+ySLcxaRPkWsmDEiOeGn4Abp7Wa8R1aPGHje8XqCD0 exvYQp2ukYakQxFmNiHtOc4v8oE133vOzA== X-Received: by 2002:a7b:ce18:: with SMTP id m24mr4998902wmc.123.1583515075734; Fri, 06 Mar 2020 09:17:55 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f8sm6948346wmf.20.2020.03.06.09.17.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2020 09:17:55 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 4/7] docs/sphinx/hxtool.py: Remove STEXI/ETEXI support Date: Fri, 6 Mar 2020 17:17:46 +0000 Message-Id: <20200306171749.10756-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306171749.10756-1-peter.maydell@linaro.org> References: <20200306171749.10756-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that none of our input .hx files have STEXI/ETEXI blocks, we can remove the code in the Sphinx hxtool extension that supported parsing them. Signed-off-by: Peter Maydell --- docs/sphinx/hxtool.py | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) -- 2.20.1 diff --git a/docs/sphinx/hxtool.py b/docs/sphinx/hxtool.py index 7dd223fe362..fb0649a3d5b 100644 --- a/docs/sphinx/hxtool.py +++ b/docs/sphinx/hxtool.py @@ -37,13 +37,11 @@ else: __version__ = '1.0' -# We parse hx files with a state machine which may be in one of three -# states: reading the C code fragment, inside a texi fragment, -# or inside a rST fragment. +# We parse hx files with a state machine which may be in one of two +# states: reading the C code fragment, or inside a rST fragment. class HxState(Enum): CTEXT = 1 - TEXI = 2 - RST = 3 + RST = 2 def serror(file, lnum, errtext): """Raise an exception giving a user-friendly syntax error message""" @@ -110,31 +108,13 @@ class HxtoolDocDirective(Directive): if directive == 'HXCOMM': pass - elif directive == 'STEXI': - if state == HxState.RST: - serror(hxfile, lnum, 'expected ERST, found STEXI') - elif state == HxState.TEXI: - serror(hxfile, lnum, 'expected ETEXI, found STEXI') - else: - state = HxState.TEXI - elif directive == 'ETEXI': - if state == HxState.RST: - serror(hxfile, lnum, 'expected ERST, found ETEXI') - elif state == HxState.CTEXT: - serror(hxfile, lnum, 'expected STEXI, found ETEXI') - else: - state = HxState.CTEXT elif directive == 'SRST': if state == HxState.RST: serror(hxfile, lnum, 'expected ERST, found SRST') - elif state == HxState.TEXI: - serror(hxfile, lnum, 'expected ETEXI, found SRST') else: state = HxState.RST elif directive == 'ERST': - if state == HxState.TEXI: - serror(hxfile, lnum, 'expected ETEXI, found ERST') - elif state == HxState.CTEXT: + if state == HxState.CTEXT: serror(hxfile, lnum, 'expected SRST, found ERST') else: state = HxState.CTEXT