Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1567267

Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP)

From Jani Nikula <jani.nikula@intel.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP)
Date 2017-01-26 11:20 +0100
Message-ID <t3PjP-65h-9@gated-at.bofh.it> (permalink)
References (2 earlier) <t3jtD-2Ul-5@gated-at.bofh.it> <t3sZY-wo-31@gated-at.bofh.it> <t3B7c-5Jl-13@gated-at.bofh.it> <t3CPE-6GU-19@gated-at.bofh.it> <t3P0u-5Js-27@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Thu, 26 Jan 2017, Markus Heiser <markus.heiser@darmarit.de> wrote:
> Am 25.01.2017 um 21:59 schrieb Jani Nikula <jani.nikula@intel.com>:
>
>>> But the problem I see here is, that the perl script generates a
>>> reST output which I can't use. As an example we can take a look at
>>> the man-page builder I shipped in the series.
>> 
>> Sorry, I still don't understand *why* you can't use the same rst. Your
>> explanation seems to relate to man pages, but man pages come
>> *afterwards*, and are a separate improvement. I know you talk about lack
>> of proper structure and all that, but *why* can it strictly not be used,
>> if the *current* rst clearly can be used?
>
> "afterwards" is the word, that lets me slowly realize, that I have to
> stop solving the world's problems with one patch. Now I guess how my
> next patch series has to look like. Thanks! ... for being patient with
> me.

Indeed, we change the world, one small incremental patch at a time. ;)

> Before I start, I want to hear your thoughts about the parsing
> aspect ...
>
>>>> That said, perhaps having an elegant parser (perhaps based on a
>>>> compiler plugin) is incompatible with the idea of making it a
>>>> bug-for-bug drop-in replacement of the old one, and it's something
>>>> we need to think about.
>
> Did you have any suggestions?

The perfect is the enemy of the good... If we see that the current Perl
parser just rewritten in Python really is an improvement, we should
consider it. But as I wrote, there are still issues there, like
performance, that we need to understand. I'll mostly defer to Jon on
this.

But before we plunge on with this, I would like to see at least some
research into reusing existing parsers which I would expect are
plentiful. We may end up deciding regexps are the way to go after all,
but I'd like it to be based on a decision rather than a lack of one. And
we might decide to look at this as a later improvement instead as well.

I've looked at python-clang myself, but it's a huge dependency, and it's
not trivial to cover all the things that the current one does with
that. I'd dismiss that.


BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH v1 0/6] pure python kernel-doc parser and more Markus Heiser <markus.heiser@darmarit.de> - 2017-01-24 21:00 +0100
  [RFC PATCH v1 5/6] kernel-doc: add kerneldoc-src2rst command Markus Heiser <markus.heiser@darmarit.de> - 2017-01-24 21:00 +0100
  [RFC PATCH v1 4/6] kernel-doc: insert TODOs on kernel-doc errors Markus Heiser <markus.heiser@darmarit.de> - 2017-01-24 21:00 +0100
  Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser  with a pure python one (WIP) Jonathan Corbet <corbet@lwn.net> - 2017-01-25 01:20 +0100
    Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser  with a pure python one (WIP) Daniel Vetter <daniel@ffwll.ch> - 2017-01-25 07:40 +0100
      Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Markus Heiser <markus.heiser@darmarit.de> - 2017-01-25 08:40 +0100
    Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Jani Nikula <jani.nikula@intel.com> - 2017-01-25 11:30 +0100
      Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser  with a pure python one (WIP) Daniel Vetter <daniel@ffwll.ch> - 2017-01-25 11:40 +0100
      Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Markus Heiser <markus.heiser@darmarit.de> - 2017-01-25 20:10 +0100
        Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Jani Nikula <jani.nikula@intel.com> - 2017-01-25 22:00 +0100
          Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Markus Heiser <markus.heiser@darmarit.de> - 2017-01-26 11:00 +0100
            Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Jani Nikula <jani.nikula@intel.com> - 2017-01-26 11:20 +0100
        Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser  with a pure python one (WIP) Jonathan Corbet <corbet@lwn.net> - 2017-01-26 20:00 +0100
          Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Jani Nikula <jani.nikula@intel.com> - 2017-01-26 20:40 +0100
            Re: [RFC PATCH v1 2/6] kernel-doc: replace kernel-doc perl parser with a pure python one (WIP) Markus Heiser <markus.heiser@darmarit.de> - 2017-01-27 10:50 +0100

csiph-web