Fast parsing of PHP in C#

Posted by Jessica Shea on Stack Overflow See other posts from Stack Overflow or by Jessica Shea
Published on 2009-09-16T03:22:04Z Indexed on 2010/03/18 14:11 UTC
Read the original article Hit count: 232

Filed under:
|
|

Hello there,

I've got a requirement for parsing PHP files in C#. We essentially require some of the devs in another country to upload PHP files and once uploaded we need to check the php files and get a list of all the methods and classes/functions etc.

I thought of using a regex but I can't workout if a function belongs to a class etc, so I was wondering if theres already something 'out there' that will parse out PHP files and spit out its functions (I'm trying to avoid writing a full blow AST implementation).

Does anyone have any idea? I looked at Coco/R but I couldn't find a PHP grammar file. I'm using .NET 2.0 and C#.

© Stack Overflow or respective owner

Related posts about c#

Related posts about php