diff options
author | Eric Kunze <eric.kunze@arm.com> | 2022-08-05 15:40:12 -0700 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2022-08-19 14:19:28 -0700 |
commit | 58098a7b1ffcf41da759f862deb753c82fe5b4b0 (patch) | |
tree | 75b61a482e23293b8af85adf6210f2d3e4e5695d /tools/get_descriptions.py | |
parent | 6361d1664c7b82ecc3afdd0eb87e96afea430f89 (diff) | |
download | specification-58098a7b1ffcf41da759f862deb753c82fe5b4b0.tar.gz |
Machine parsable specification
This converts portions of the asciidoc specification into an xml
document and schema. For the html and pdf outputs, the xml is
converted to asciidoc files that are included into the existing
specification.
The xml allows future automated uses of the tosa specification
while maintaining rough compatibility with the existing document.
No significant functional changes are included in this change.
Change-Id: I7f1f95c527638e270c157d58fcdec6a3510daea5
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'tools/get_descriptions.py')
-rwxr-xr-x | tools/get_descriptions.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/get_descriptions.py b/tools/get_descriptions.py index beded87..0a39a19 100755 --- a/tools/get_descriptions.py +++ b/tools/get_descriptions.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - # Copyright (c) 2022, ARM Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,10 +12,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - # Script to pull the descriptions out of the specification so that # they can be run through a spellcheck with less noise - import argparse import re @@ -40,17 +37,17 @@ for name in args.filenames: continue if not in_description: # Look for the start of an operator - if re.match(r'^===', text): + if re.match(r"^===", text): in_description = True print(text) else: # Stop when we get to a subsection like *Arguments* # or pseudocode in a [source] section. Spellcheck is # not useful there - if re.match(r'[\[\*]', text): + if re.match(r"[\[\*]", text): in_description = False # skip comments - elif re.match(r'\w*\/\/', text): + elif re.match(r"\w*\/\/", text): continue else: print(text) |