PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic manipulation. It functions as a parser, a code generator, and a static analysis framework.
The main features of nikic/php-parser are: PHP AST Parsers, Static Code Analysis, Recursive Descent Parsers, AST Structure Modification, AST to Source Conversion, PHP Development Tools, Lexical Tokenizers, PHP Code Generators.
Open-source alternatives to nikic/php-parser include: facebook/jscodeshift — jscodeshift is a JavaScript AST transformation toolkit and codemod engine designed for large-scale code refactoring… apple/swift-syntax — swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate… jquery/esprima — Esprima is a JavaScript parser that converts source code into a structured abstract syntax tree. It implements a… theseer/tokenizer — This library is a PHP source code tokenizer and static analysis tool that converts raw PHP code into discrete tokens… rectorphp/rector — Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize… phpdocumentor/reflectiondocblock — ReflectionDocBlock is a PHP docblock parser and doc-comment metadata extractor. It functions as a reflection wrapper…
jscodeshift is a JavaScript AST transformation toolkit and codemod engine designed for large-scale code refactoring and structural migrations. It provides a set of utilities to parse source code into abstract syntax trees, programmatically modify those trees, and convert them back into source text. The tool distinguishes itself by preserving original source formatting and stylistic properties during the transformation process. It utilizes a builder for generating structurally valid AST nodes and integrates interchangeable parsing engines to support different language standards and experimenta
swift-syntax is a library for parsing, manipulating, and generating Swift source code. It provides a source-accurate abstract syntax tree representation of Swift code, acting as a parser, transformer, and code generator. The project serves as the infrastructure for Swift macro development, enabling the expansion and transformation of source code during compilation. It is used to build compiler tooling for static analysis, formatting, and automated refactoring. The system covers a broad range of source analysis capabilities, including the ability to convert source code into structured trees f
Esprima is a JavaScript parser that converts source code into a structured abstract syntax tree. It implements a specification-driven grammar to ensure compliance with ECMAScript standards, enabling the programmatic analysis and transformation of JavaScript programs. The project provides capabilities for lexical tokenization to break source code into individual symbols and static syntax validation to verify that scripts are well-formed without executing the code. Its functional surface covers JavaScript static analysis, lexical analysis, and the generation of abstract syntax trees.
This library is a PHP source code tokenizer and static analysis tool that converts raw PHP code into discrete tokens and structured XML representations. It functions as a serializer that transforms token streams into a machine-readable format for programmatic analysis and source tree manipulation. The project uses stream-based XML serialization and fragment-based buffer writing to maintain low memory overhead when processing large files. It allows for custom XML namespace configuration to ensure schema compatibility and avoid naming collisions during the transformation process. The toolkit c