phantm icon indicating copy to clipboard operation
phantm copied to clipboard

Consider splitting the Parser component

Open schmittjoh opened this issue 11 years ago • 4 comments

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?

schmittjoh avatar Mar 19 '13 22:03 schmittjoh

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.

colder avatar Mar 20 '13 12:03 colder

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.

schmittjoh avatar Mar 22 '13 11:03 schmittjoh

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.

colder avatar Mar 22 '13 14:03 colder

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.

colder avatar Apr 12 '13 18:04 colder