Thread (55 messages) 55 messages, 5 authors, 2026-03-13

Re: [PATCH 00/38] docs: several improvements to kernel-doc

From: Jani Nikula <jani.nikula@linux.intel.com>
Date: 2026-02-23 13:47:09
Also in: intel-wired-lan, linux-doc, linux-hardening, lkml

On Wed, 18 Feb 2026, Mauro Carvalho Chehab [off-list ref] wrote:
As anyone that worked before with kernel-doc are aware, using regex to
handle C input is not great. Instead, we need something closer to how
C statements and declarations are handled.

Yet, to avoid breaking  docs, I avoided touching the regex-based algorithms
inside it with one exception: struct_group logic was using very complex
regexes that are incompatible with Python internal "re" module.

So, I came up with a different approach: NestedMatch. The logic inside
it is meant to properly handle brackets, square brackets and parenthesis,
which is closer to what C lexical parser does. On that time, I added
a TODO about the need to extend that.
There's always the question, if you're putting a lot of effort into
making kernel-doc closer to an actual C parser, why not put all that
effort into using and adapting to, you know, an actual C parser?


BR,
Jani.

-- 
Jani Nikula, Intel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help