Phplexer is a comprehensive PHP lexer designed to tokenize various PHP constructs. With support for numerous tokens, it allows detailed analysis of PHP files. Perfect for parsing PHP code in your custom applications.
- Lexical analysis of PHP files
- Support for multiple PHP tokens including operators, delimiters, and keywords
- Easy integration with existing projects
- Detailed token information for comprehensive code analysis
You can install Phplexer by cloning the repository:
git clone https://github.com/TimAnthonyAlexander/Phplexer.git
cd Phplexer
composer install
Make sure to have Composer installed to manage dependencies. 🎵
Once installed, you can use Phplexer by running the following command:
./phplexer.php <PHPFILE>
Replace <PHPFILE>
with the path to the PHP file you want to analyze.
Phplexer supports a wide range of PHP tokens, including:
- Whitespace, Comments, Strings, Numbers
- Language constructs like
class
,function
,return
, etc. - Various operators like
=
,==
,!=
,+=
, etc. - Delimiters like curly braces, parentheses, brackets
For a full list of supported tokens, refer to the Tokens file.
Contributions are welcome! Feel free to fork the project, create a feature branch, and open a pull request. If you find any bugs or have suggestions, please open an issue. 💡
Phplexer is released under the MIT License. See the LICENSE file for more details. 🏛️