bcserv / sourcepawn-inc-parser
There is no license information available for the latest version (dev-master) of this package.
A sourcepawn parser written in PHP which is able to analyse sourcepawn's .inc files and comments (annotation syntax)
dev-master / 1.0.x-dev
2021-10-28 14:56 UTC
This package is not auto-updated.
Last update: 2024-10-12 14:08:12 UTC
README
This project is not actively maintained anymore, please fork this
About
A parser written in PHP which is able to analyse sourcepawn's .inc files and comments (annotation syntax)
Example
<?php // This loads a very simple PHP class autoloader, doing the basics. // You can use your own instead. require_once "autoloader.php"; use Bcserv\SourcepawnIncParser\PawnParser; function pawnParserCallback($pawnElement) { // This dumps the whole object for demonstration. // You should call public getters defined in // src/Bcserv/SourcepawnIncParser/PawnElement/*.php var_dump($pawnElement); } $pawnParser = new PawnParser('pawnParserCallback'); $pawnParser->parseFile('/path/to/pawnfile.inc');
Requirements
- PHP >= 5.3
- A PHP autoloader to autoload the used classes
Coding standards
This library follows the PHP standards psr-0 and psr-1.
Using in Symfony 2
Add this to the require section of your composer.json in the main folder of Symfony2:
"bcserv/sourcepawn-inc-parser": "1.0.x-dev"
You maybe also need to change "minimum-stability" to "dev" if it complains about this.
Then run php composer.phar update