summaryrefslogtreecommitdiffstats
path: root/Documentation/sphinx/parse-headers.pl
Commit message (Collapse)AuthorAgeFilesLines
* doc-rst: parse-headers: remove trailing spacesMauro Carvalho Chehab2016-07-091-0/+2
| | | | | | | | | | | The function that replace references add a "\ " at the end of references, to avoid the ReST markup parser to not identify them as references. That works fine except for the end of lines, as a sequence of { '\', ' ', '\n' } characters makes Sphinx to ignore the end of line. So, strip those escape/spaces at the end of lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: don't do substituition referencesMauro Carvalho Chehab2016-07-071-1/+1
| | | | | | | Add one extra escape character to avoid those warnings: Documentation/linux_tv/videodev2.h.rst:6: WARNING: Inline substitution_reference start-string without end-string. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: add an option to ignore enum symbolsMauro Carvalho Chehab2016-07-071-0/+4
| | | | | | | | At videodev2.h, we have hundreds of symbols that don't currently have a reference yet. Let's ignore for how, while we don't improve those cross-refs. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: better handle comments at the source codeMauro Carvalho Chehab2016-07-071-3/+14
| | | | | | | | | We should not let comments to mangle with the symbols parsing. Unfortunately, videodev2.h has lots of those in the middle of enums and structs. So, we need to improve our parser to discard them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: fix multiline typedef handlerMauro Carvalho Chehab2016-07-071-3/+4
| | | | | | | | | | | | | The typedef handler should do two things to be generic: 1) parse typedef enums; 2) accept both possible syntaxes: typedef struct foo { .. } foo_t; typedef struct { .. } foo_t; Unfortunately, this is needed to parse some legacy DVB files, like dvb/audio.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: better handle typedefsMauro Carvalho Chehab2016-07-071-2/+7
| | | | | | | When typedef is used on its multiline format, we need to also parse enum and struct in the same line. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: be more formal about the valid symbolsMauro Carvalho Chehab2016-07-071-8/+8
| | | | | | | Be more formal about the valid symbols that are expected by the parser, to match what c language expects. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: fix parsing comments and '{' on a separate lineMauro Carvalho Chehab2016-07-071-6/+11
| | | | | | | | | | | | | The dmx.h header has two things that causes the parser to break while handling enums: per-header enums and the '{' starts on a new line Both makes the parser to get lexical marks to be detected as if they were symbols. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-dst: parse-headers: highlight deprecated commentsMauro Carvalho Chehab2016-07-071-0/+2
| | | | | | | When something is deprecated, highlight it, as we want it to be clearer to the reader. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: parse-headers: improve delimiters to detect symbolsMauro Carvalho Chehab2016-07-071-13/+14
| | | | | | | | | As we had to escape the symbols for the ReST markup to not do the wrong thing, the logic to discover start/end of strings are not trivial. Improve the end delimiter detection, in order to highlight more occurrences of the strings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* doc-rst: add parse-headers.pl scriptMauro Carvalho Chehab2016-07-071-0/+290
This script parses a header file and converts it into a parsed-literal block, creating references for ioctls, defines, typedefs, enums and structs. It also allow an external file to modify the rules, in order to fix the expressions. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
OpenPOWER on IntegriCloud