awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
nikic avatar

nikic/PHP-Parser

0
View on GitHub↗
17,437 estrellas·1,123 forks·PHP·BSD-3-Clause·7 vistas

PHP Parser

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 project enables the programmatic construction of abstract syntax tree nodes through a fluent interface and provides the ability to transform these trees back into formatted source code. It includes a serializer that exports abstract syntax trees to JSON format and reconstructs them from strings.

The toolset covers several capability areas, including namespace resolution, constant expression evaluation, and the traversal or modification of tree nodes using visitor patterns. These features support a range of language tooling tasks such as automated refactoring, code transformation, and the enforcement of coding standards.

Features

  • PHP AST Parsers - Converts PHP source code into an abstract syntax tree to enable static analysis and programmatic manipulation of the code structure.
  • Static Code Analysis - Provides a comprehensive framework for analyzing PHP source code to detect bugs and enforce standards.
  • Recursive Descent Parsers - Uses a recursive descent parsing strategy to translate PHP tokens into a structured abstract syntax tree.
  • AST Structure Modification - Allows for identifying, altering, or removing nodes within the AST using visitor patterns.
  • AST to Source Conversion - Transforms an abstract syntax tree back into formatted PHP source code.
  • PHP Development Tools - Provides the fundamental building blocks for creating PHP linters, formatters, and other language tools.
  • Lexical Tokenizers - Processes source text through a lexer that emits a sequential stream of tokens for the parser.
  • PHP Code Generators - Constructs AST nodes and transforms them back into formatted PHP source code.
  • PHP Parsers - Converts PHP source code into an abstract syntax tree for static analysis and manipulation.
  • Symbol Resolution - Analyzes the abstract syntax tree to determine the fully qualified names of classes, functions, and constants.
  • Abstract Syntax Tree Specifications - Provides a standardized internal representation of PHP source code as a hierarchy of linguistic construct nodes.
  • Visitor Patterns - Decouples tree structure from analysis logic using a visitor-based traversal pattern.
  • JSON Serialization Libraries - Converts PHP abstract syntax tree objects to and from JSON format.
  • AST Node Generation - Provides utilities for the programmatic creation of structurally valid AST nodes.
  • JSON Serialization - Serializes abstract syntax trees into JSON format and reconstructs them back into tree structures.
  • Compile-Time Expression Evaluation - Computes the final values of constant expressions and initializers during the analysis phase.
  • Fluent Interface Patterns - Implements a fluent interface for the programmatic construction of complex abstract syntax tree structures.
  • Refactoring Automation - Automates structural changes by searching and replacing specific patterns within the PHP AST.
  • Source Code Transformation Engines - Enables automated modification of PHP code by transforming it through an AST.
  • Source Code Generators - Programmatically creates valid PHP files by building an abstract syntax tree.
  • Abstract Syntax Tree Tools - Provides utilities for serializing and manipulating PHP abstract syntax trees.
  • Fault-Tolerant Parsing - Converts source code into an abstract syntax tree with support for partial trees when encountering invalid syntax.
  • Static Expression Evaluation - Computes the values of constant and property initializers within the code during the analysis phase.
  • Code Analysis and Refactoring - Parses source code into an abstract syntax tree.
  • Static Analysis Tools - PHP parser written in PHP.

Historial de estrellas

Gráfico del historial de estrellas de nikic/php-parserGráfico del historial de estrellas de nikic/php-parser

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Preguntas frecuentes

¿Qué hace nikic/php-parser?

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.

¿Cuáles son las características principales de nikic/php-parser?

Las características principales de nikic/php-parser son: PHP AST Parsers, Static Code Analysis, Recursive Descent Parsers, AST Structure Modification, AST to Source Conversion, PHP Development Tools, Lexical Tokenizers, PHP Code Generators.

¿Qué alternativas de código abierto existen para nikic/php-parser?

Las alternativas de código abierto para nikic/php-parser incluyen: 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…

Alternativas open-source a PHP Parser

Proyectos open-source similares, clasificados según cuántas características comparten con PHP Parser.
  • facebook/jscodeshiftAvatar de facebook

    facebook/jscodeshift

    9,952Ver en GitHub↗

    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

    JavaScript
    Ver en GitHub↗9,952
  • apple/swift-syntaxAvatar de apple

    apple/swift-syntax

    3,671Ver en GitHub↗

    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

    Swift
    Ver en GitHub↗3,671
  • jquery/esprimaAvatar de jquery

    jquery/esprima

    7,139Ver en GitHub↗

    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.

    TypeScript
    Ver en GitHub↗7,139
  • theseer/tokenizerAvatar de theseer

    theseer/tokenizer

    5,194Ver en GitHub↗

    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

    PHPphptokenizerxml
    Ver en GitHub↗5,194
Ver las 30 alternativas a PHP Parser→