awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
eliben avatar

eliben/pycparser

0
View on GitHub↗
3,473 stars·639 forks·Python·other·22 views

Pycparser

pycparser is a C99 parser library that converts C source code into an abstract syntax tree consisting of Python objects. It functions as an abstract syntax tree generator, transforming preprocessed C code into a structured hierarchy for programmatic analysis and transformation.

The library integrates with a C preprocessor to handle directives before parsing. It also features a stub header parser, which uses minimal mock headers to allow the parsing of C code without requiring a full system C library installation.

The project provides tools for static code analysis, C program analysis, and source-to-source transformation. Its parsing engine is generated from a formal C99 grammar using Python Lex-Yacc.

Features

  • Abstract Syntax Tree Parsers - Provides a C99-compliant parser that transforms source code into a structured abstract syntax tree for programmatic analysis.
  • C Source Parsing - Transforms C source code into an abstract syntax tree to facilitate program analysis and structural transformation.
  • AST Node Generation - Generates a typed hierarchy of Python objects representing C constructs for structured traversal.
  • Abstract Syntax Tree Generators - Transforms preprocessed C code into a structured tree of Python objects for programmatic analysis.
  • C Source Generators - Parses C code into a tree structure to programmatically rewrite or modify source logic.
  • LALR Parsers - Implements a C99 parsing engine generated from a formal grammar using the Python Lex-Yacc (PLY) framework.
  • Typed AST Nodes - Represents C language constructs as a tree of specialized Python objects to maintain semantic structure.
  • Static Code Analysis - Enables the analysis of C source files without execution to identify vulnerabilities and enforce standards.
  • Structural Code Analysis - Converts C source into ASTs for structural program analysis and bug detection.
  • Stub Libraries - Replaces standard library includes with minimal stub headers for environment-independent parsing.
  • Stub Headers - Implements stub-based header substitution to allow parsing C code without a full system library installation.
  • Header Mocking - Provides minimal stub headers to enable parsing of C source code without a full system library installation.
  • Mock Header Parsers - Uses minimal stub headers to enable parsing of C code without requiring a full system C library installation.
  • Preprocessing Directives - Processes C preprocessing directives and definitions before generating the syntax tree.
  • Preprocessors - Integrates with C preprocessors to handle macro expansion and conditional compilation before parsing.
  • AST Visitor Patterns - Provides an AST visitor pattern to enable custom analysis and transformation of C code structures.
  • Formal Grammar Parser Generators - Uses Python Lex-Yacc as a formal grammar parser generator to implement the C99 specification.
  • Grammar-Based Parsers - Implements the C99 language syntax using a formal grammar-based parser.

Star history

Star history chart for eliben/pycparserStar history chart for eliben/pycparser

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Pycparser

Similar open-source projects, ranked by how many features they share with Pycparser.
  • ohmjs/ohmohmjs avatar

    ohmjs/ohm

    5,471View on GitHub↗

    Ohm is a formal grammar parser generator and domain-specific language framework. It provides a system for defining custom languages to parse, validate, and extract data from input text, transforming raw strings into hierarchical abstract syntax trees based on specified formal rules. The project utilizes an Earley parsing algorithm, which allows it to support all context-free grammars, including those with left recursion and ambiguity, without requiring predefined operator precedence. It also includes a dedicated debugging toolkit for tracing and visualizing the step-by-step state transitions

    JavaScriptcompilergrammarsjavascript
    View on GitHub↗5,471
  • dsherret/ts-morphdsherret avatar

    dsherret/ts-morph

    6,110View on GitHub↗

    ts-morph is a TypeScript AST manipulation library and a high-level wrapper for the TypeScript compiler API. It provides a programmatic interface for analyzing, modifying, and generating TypeScript source code, serving as a tool for automated code refactoring and source code generation. The library simplifies the process of navigating and inspecting project structures by offering an object-oriented abstraction over the underlying compiler API. It allows for the programmatic transformation of existing codebases to automate structural updates and bulk code migrations. Its capabilities cover sta

    TypeScript
    View on GitHub↗6,110
  • nikic/php-parsernikic avatar

    nikic/PHP-Parser

    17,437View on GitHub↗

    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 exp

    PHP
    View on GitHub↗17,437
  • pmd/pmdpmd avatar

    pmd/pmd

    5,425View on GitHub↗

    PMD is a multi-language static code analyzer used to identify programming flaws, unused variables, and dead code without executing the program. It functions as a code smell detector and coding standard enforcer, ensuring source code adheres to specific naming conventions, structural requirements, and project style guides. The project features an XPath-based rule engine that allows users to define custom analysis patterns using queries against an abstract syntax tree. It also includes a copy-paste detector to identify duplicated code blocks across multiple files and a visual rule designer for

    Javaapexcode-analysiscode-quality
    View on GitHub↗5,425
See all 30 alternatives to Pycparser→

Frequently asked questions

What does eliben/pycparser do?

pycparser is a C99 parser library that converts C source code into an abstract syntax tree consisting of Python objects. It functions as an abstract syntax tree generator, transforming preprocessed C code into a structured hierarchy for programmatic analysis and transformation.

What are the main features of eliben/pycparser?

The main features of eliben/pycparser are: Abstract Syntax Tree Parsers, C Source Parsing, AST Node Generation, Abstract Syntax Tree Generators, C Source Generators, LALR Parsers, Typed AST Nodes, Static Code Analysis.

What are some open-source alternatives to eliben/pycparser?

Open-source alternatives to eliben/pycparser include: ohmjs/ohm — Ohm is a formal grammar parser generator and domain-specific language framework. It provides a system for defining… dsherret/ts-morph — ts-morph is a TypeScript AST manipulation library and a high-level wrapper for the TypeScript compiler API. It… nikic/php-parser — PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic… pmd/pmd — PMD is a multi-language static code analyzer used to identify programming flaws, unused variables, and dead code… zaach/jison — Jison is a JavaScript parser generator that implements the LALR parsing algorithm. It creates tools to analyze custom… microsoft/power-fx — Power-Fx is a declarative logic framework and low-code formula language based on Excel formulas. It functions as an…