https://bugs.kde.org/show_bug.cgi?id=438206

--- Comment #9 from Øystein S. Haaland <oystein.s.haal...@gmail.com> ---
(In reply to Sven Brauch from comment #7)
> Unfortunately Python completely removed the Parser module we were using from
> their public API, so there is no easy fix for this issue.
> 
> The most realistic option at this point is probably to write a Python
> snippet which uses the "ast" module to do the parsing (which is effectively
> exactly the same) and serializes the result somehow, e.g. into an XML or
> ProtocolBuffer stream. Then we can execute this snippet from C++ code (this
> works without creating a process using Python's C API) and deserialize it,
> giving us the same data structure as before.

Thanks a lot for sketching a possible route for implementing this!

I would be more than willing to put some effort into this if I had the time.
But maybe with some guidance it would still be possible to have some progress
every now and then.

The first part seem easy enough;  write the code that reads a file with python
code and loads it into the ast.

You mention a few ways serialization can be done. Are there any examples of
similar approaches already in the code base? Are there already places where
de-serialization is done with one of the formats mentioned (or other formats
for that matter)?

Any pointers for tools/tests in the repo that can be useful for working with
this would be much appreciated.

Btw. would it make things easier if one used cython or mypyc to compile the
python part to a c module?

Again, if there is any way I could fund this work more or less directly, I
would also be interested in hearing about that.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to