X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=doxygen%2Ffilter_api.py;h=484881439b8a9dd709561b7869cd7b755372787f;hb=61717cc38;hp=3e2aaaec2900e477e3e7c4fc377b6d7dfc36bd14;hpb=75a37b372efc2b4a324aa38b53487b8168358a63;p=vpp.git 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 \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[^\s]+)"), r"typedef struct vl_api_\g_t"), + (re.compile(r"^.*(manual_.[^\s]+\s+)?define\s+(?P[^\s]+)"), + r"typedef struct vl_api_\g_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[\\@]brief)\s+(?P.+)(\*/)$"), r'/** @xrefitem api "" "VPP API" \g \g \g'), # capture inline comment close - #( re.compile(r"/\*\*\s*(?P[\\@]brief)\s+(?P.+)$"), r'/** @xrefitem api "" "VPP API" \g \g \g'), + # (re.compile(r"/\*\*\s*(?P[\\@]brief)\s+(?P.+)(\*/)$"), + # r'/** @xrefitem api "" "VPP API" \g \g \g'), # capture inline comment close + # (re.compile(r"/\*\*\s*(?P[\\@]brief)\s+(?P.+)$"), + # r'/** @xrefitem api "" "VPP API" \g \g \g'), # Since structs don't have params, replace @param with @tparam ( re.compile("[\\@]param\\b"), "@tparam"),