Re: [PATCH v2 07/28] docs: kdoc: move C Tokenizer to c_lex module

Mauro Carvalho Chehab
2026-03-17T08:02:14Z

On Mon, 16 Mar 2026 17:30:58 -0600
Jonathan Corbet <corbet@lwn.net> wrote:

> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
>
> > Place the C tokenizer on a different module.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> > tools/lib/python/kdoc/c_lex.py | 239 +++++++++++++++++++++++++++
> > tools/lib/python/kdoc/kdoc_parser.py | 3 +-
> > tools/lib/python/kdoc/kdoc_re.py | 233 --------------------------
> > 3 files changed, 241 insertions(+), 234 deletions(-)
> > create mode 100644 tools/lib/python/kdoc/c_lex.py
>
> One has to ask...why not just put it in its own file in the first place?

Good question... As usual, this started simple. When complexity
increased, and, specially, when I wanted to mangle with NestedMatch,
it became clearer that placing it elsewhere would be for the best.

I can adjust it at the next respin.

>
> Thanks,
>
> jon

Thanks,
Mauro