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
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
Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize syntax using predefined rules. It functions as a static analysis engine that inspects code structures and types to identify refactoring targets without executing the code. The project provides a framework for defining custom transformation logic to automate project-specific changes. It distinguishes itself by offering specialized capabilities for migrating legacy or custom frameworks to modern alternatives and converting docblock annotations into native language attributes. The s
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… 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… javaparser/javaparser — JavaParser is a library that parses Java source code up to version 12 into an Abstract Syntax Tree (AST), enabling…