diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-11-01 15:07:32 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2019-11-05 21:08:27 +0000 |
commit | 464e5e0bfebc71c646e5c182535898cc7018236b (patch) | |
tree | db15d3d283afb96b9fa1b84928c2c434bb9bf775 /doxygen/filter_api.py | |
parent | ea1a65135e01311e31e94b8d0ed0721c9856775d (diff) |
docs: fix 'make doxygen' under python3
The 'make doxygen' component has this cool vpp specific customization called siphon.
This updates the siphon component so that 'make doxygen' works with python3.
Needed-By: https://gerrit.fd.io/r/23159
Type: docs
Change-Id: Ie29f1602bf3460b637058acbb0a2f19b128a8824
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'doxygen/filter_api.py')
-rwxr-xr-x | doxygen/filter_api.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/doxygen/filter_api.py b/doxygen/filter_api.py index 3e2aaaec290..484881439b8 100755 --- a/doxygen/filter_api.py +++ b/doxygen/filter_api.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2016 Comcast Cable Communications Management, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +15,8 @@ # Filter for vpe.api to make it Doxygenish. -import sys, re +import re +import sys if len(sys.argv) < 2: sys.stderr.write("Usage: %s <filename>\n" % (sys.argv[0])) @@ -23,15 +24,18 @@ if len(sys.argv) < 2: patterns = [ # Search for "define" blocks and treat them as structs - ( re.compile(r"^.*(manual_.[^\s]+\s+)?define\s+(?P<name>[^\s]+)"), r"typedef struct vl_api_\g<name>_t"), + (re.compile(r"^.*(manual_.[^\s]+\s+)?define\s+(?P<name>[^\s]+)"), + r"typedef struct vl_api_\g<name>_t"), # For every "brief" statement at the start of a comment block, add an # xref with whatever is on the same line. This gives us an index page # with all the API methods in one place. # XXX Commented out for now; works but duplicates the brief text in the # struct documentation - #( re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)(\*/)$"), r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'), # capture inline comment close - #( re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)$"), r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'), + # (re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)(\*/)$"), + # r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'), # capture inline comment close + # (re.compile(r"/\*\*\s*(?P<b>[\\@]brief)\s+(?P<c>.+)$"), + # r'/** @xrefitem api "" "VPP API" \g<c> \g<b> \g<c>'), # Since structs don't have params, replace @param with @tparam ( re.compile("[\\@]param\\b"), "@tparam"), |