This software provide a standalone version of the PHP parser used by the PDT v3.2.0 Eclipse plugin. It has no dependency on Eclipse or third parties Eclipse plugins.
Checkout the source code and install it with maven in your local repository.
git clone http://github.com/Tocea/pdt-standalone-parser.git
cd pdt-standalone-parser
mvn clean install
You need to a dependency on the maven project :
<dependency>
<groupId>com.tocea</groupId>
<artifactId>pdt-standalone-parser/artifactId>
<version>1.0.0</version>
</dependency>
To parse a php4 file, use the following code :
ASTParser parser = ASTParser.newParser(PHPVersion.PHP4);
Program ast = parser.setSource(new File("<your file>"));
...
This software is released under EPL license.