Skip to content

TimAnthonyAlexander/phplexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 Phplexer: A PHP Lexer

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.

📑 Table of Contents

  1. 🌟 Features
  2. 🛠️ Installation
  3. ▶️ Usage
  4. 🎫 Tokens Supported
  5. 🤝 Contributing
  6. 📜 License

🌟 Features

  • 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

🛠️ Installation

You can install Phplexer by cloning the repository:

git clone https:/TimAnthonyAlexander/Phplexer.git
cd Phplexer
composer install

Make sure to have Composer installed to manage dependencies. 🎵

▶️ Usage

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.

🎫 Tokens Supported

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.

🤝 Contributing

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. 💡

📜 License

Phplexer is released under the MIT License. See the LICENSE file for more details. 🏛️

About

PHPLexer to tokenize php scripts

Resources

License

Stars

Watchers

Forks

Languages