phantm
phantm copied to clipboard
Consider splitting the Parser component
I'd love to re-use the parser component of phantm. Would there be some interest in moving it to a separate repository that can be used independently?
I've always wanted to redo the parser part, and tkae this opportunity to upgrade it to 5.5.
I think that once I'll be finished with this it will be easier to use in isolation. Given the system of phases in phantm, it would be trivial to replace the type analysis part with anything else, thus reusing the parser/trees only.
If you need help, let me know.
Just if you're curious what I'd like to do with the parser. Currently, I have written PHP-Analyzer purely in PHP. In order to speed up computations, I'd like to experiment with moving parts of it to an akka actor based architecture; mostly control/data flow analysis and reverse abstract interpretations.
Interesting project!
I'm in the process of moving the parser to CUP2 but it is a lengthy process due to the size of the grammar. I have other pressing time constraints but I will hopefully be done with it soonish.
It would be great if we could unify parts from our analyses, such as ASTs, CFGs, Lattices etc.. I have defined everything for phantm but a little lifting and refactoring wouldn't hurt. That would allow for some sort of extensible analysis framework for PHP in which both of our analyses could coexist.
I've ported the grammar to cup2 in topic/parser, but I lost all positions in the process. I'm currently working on restoring this information.
Since the parser has been rewritten from scratch, I need to test thoroughly that I did not break most ASTs in the process.