[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/12] docs/sphinx/hxtool.py: Remove STEXI/ETEXI support
From: |
Peter Maydell |
Subject: |
[PULL 04/12] docs/sphinx/hxtool.py: Remove STEXI/ETEXI support |
Date: |
Thu, 12 Mar 2020 11:44:00 +0000 |
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 <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
---
docs/sphinx/hxtool.py | 28 ++++------------------------
1 file changed, 4 insertions(+), 24 deletions(-)
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
--
2.20.1
- [PULL 00/12] docs queue, Peter Maydell, 2020/03/12
- [PULL 01/12] Makefile: Remove redundant Texinfo related code, Peter Maydell, 2020/03/12
- [PULL 02/12] Update comments in .hx files that mention Texinfo, Peter Maydell, 2020/03/12
- [PULL 03/12] hxtool: Remove Texinfo generation support, Peter Maydell, 2020/03/12
- [PULL 04/12] docs/sphinx/hxtool.py: Remove STEXI/ETEXI support,
Peter Maydell <=
- [PULL 05/12] Makefile: Make all Sphinx documentation depend on the extensions, Peter Maydell, 2020/03/12
- [PULL 06/12] docs/index.rst, docs/index.html.in: Reorder manuals, Peter Maydell, 2020/03/12
- [PULL 07/12] docs/qemu-option-trace.rst.inc: Remove redundant comment, Peter Maydell, 2020/03/12
- [PULL 08/12] Makefile: Allow for subdirectories in Sphinx manual dependencies, Peter Maydell, 2020/03/12
- [PULL 10/12] docs/system/target-arm.rst: Add some introductory text, Peter Maydell, 2020/03/12
- [PULL 11/12] docs: Move arm-cpu-features.rst into the system manual, Peter Maydell, 2020/03/12
- [PULL 09/12] docs/system: Split target-arm.rst into sub-documents, Peter Maydell, 2020/03/12
- [PULL 12/12] docs: Be consistent about capitalization of 'Arm', Peter Maydell, 2020/03/12
- Re: [PULL 00/12] docs queue, Peter Maydell, 2020/03/12