Generating parse trees?
Hello,
How do you think about to improve the collaboration with data processing tools that can generate parse trees?
https://en.wikipedia.org/wiki/Parse_tree
Will the support grow for selected programming languages?
https://en.wikipedia.org/wiki/Comparison_of_parser_generators
Regards,
Markus
Quoted 5 lines · Markus Elfring
Hello,
How do you think about to improve the collaboration with data processing tools that can generate parse trees?
https://en.wikipedia.org/wiki/Parse_tree
Hi Markus,
Thanks for the suggestion. Unfortunately, many of the features you suggest would take significant development time we simply don't have, while simultaneously not having any obvious benefits or fitting any well-defined use case. It's also unclear exactly what you mean - what would a collaboration with a parse tree generator look like in practice? Are you suggesting we change the way we parse C files, that we add a new feature, or something else?
Your passion for this topic is obvious, but if you are interested in seeing new features being added to Coccinelle, I suggest you either:
a) clarify exactly what you want the feature to do. Give us a concrete scenario, something along the lines of "given XXX, a user can do YYY so that Coccinelle does ZZZ and outputs AAA; this would be useful if we want to do BBB under CCC conditions, and might be implemented using the DDD concept and the EEE implementation of that concept". It doesn't have to fit that exact format, but hopefully you understand what I mean.
b) implement the feature yourself and open a pull request, even if it's only a prototype or proof of concept, to at least show us what you mean.
Also understand that while it would be nice to be able to add such features, in practice, we have limited development time, and even smaller features can sometimes be deceptively complex to implement and take up significant time. It's unrealistic to expect us to add new features at the rate that you're suggesting them. As it stands, many of your suggestions can be both too vague and/or too ambitious. If you'd like for them to have more of a chance, consider focusing on something small and achievable. The same goes for questions that may or may not be feature suggestions: they should ideally be clear and focused on one thing. I hope you understand where I'm coming from!
Quoted 2 lines
Will the support grow for selected programming languages?
https://en.wikipedia.org/wiki/Comparison_of_parser_generators
As far as Coccinelle is concerned, support is limited to C and C++ (there is also an independent prototype for Rust), and this is unlikely to ever change. You would basically have to start from scratch.
Regards,
Victor
Quoted 2 lines
Regards,
Markus
Quoted 1 line
Thanks for the suggestion. Unfortunately, many of the features you suggest would take significant development time we simply don't have,
I hope that such a view can eventually be reconsidered better.
Presented ideas might become more attractive and helpful under other circumstances.
Quoted 1 line
while simultaneously not having any obvious benefits or fitting any well-defined use case.
Would you acknowledge that parse trees can belong to a relevant part of some data processing (also according to parsing approaches)?
Quoted 2 lines
It's also unclear exactly what you mean - what would a collaboration with a parse tree generator look like in practice?
Several libraries and corresponding tools were published already. Their development status might hinder desirable progress.
Some might be usable to improve data processing considerably.
Quoted 1 line
Are you suggesting we change the way we parse C files,
Perhaps. ‒ Partly, yes.
Quoted 1 line
that we add a new feature,
Probably, yes.
Quoted 1 line
or something else?
The situation depends on selected programming languages.
Quoted 2 lines
Your passion for this topic is obvious, but if you are interested in seeing new features being added to Coccinelle, I suggest you either:
a) clarify exactly what you want the feature to do.
You can probably know by measuring data processing steps (profiling) how much efforts can be put into file parsing for example.
Quoted 1 line
b) implement the feature yourself and open a pull request, …
* Were difficulties indicated with such a collaboration technique so far?
* Does an implementation language like OCaml trigger special challenges?
Regards,
Markus