A curated list of awesome parsers to generate Abstract Syntax Tree(AST) from code. This list contains parsers grouped by language.
Do you like this project? Support it by donating:
or Paypal me
- tuqqu/go-parser - Golang parser written in PHP.
- Spoon - A library to analyze, rewrite, transform, transpile Java source code. It parses source files to build a well-designed AST with powerful analysis and transformation API.
- acorn - A tiny, fast JavaScript parser, written completely in JavaScript.
- Espree - An Esprima-compatible JavaScript parser.
- Esprima - A high performance, standard-compliant ECMAScript parser written in ECMAScript (also popularly known as JavaScript).
- acorn-jsx - An acorn plugin to parse React.js JSX code into AST.
- humanwhocodes/momoa - A JSON parser, tokenizer, traverser, and printer written in JavaScript.
- nadako/hxjsonast - Parse JSON into position-aware AST with Haxe.
- vtrushin/json-to-ast - JSON AST parser written in JavaScript.
- glayzzle/php-parser - A PHP Parser written in NodeJS to extract AST or tokens (PHP5 and PHP7).
- microsoft/tolerant-php-parser - An early-stage PHP parser designed for IDE usage scenarios.
- nikic/PHP-Parser - A PHP parser written in PHP supports PHP 5.2 to PHP 8.0. Its purpose is to simplify static code analysis and manipulation.
- Phpactor Parser - A PHP Docblock parser by Phpactor.
- phpDocumentor ReflectionDocBlock - The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser that is 100% compatible with the PHPDoc standard.
- PHPStan PHPDoc Parser - Next generation phpDoc parser with support for intersection types and generics.
- python/typed_ast -
typed_ast
is a Python 3 package that provides a Python 2.7 and Python 3 parser similar to the standard ast library.
- Scalameta - Library to read, analyze, transform and generate Scala programs.
- taozhi8833998/node-sql-parser - Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL.
- godmodelabs/flora-sql-parser - Parse simple SQL statements into an abstract syntax tree (AST) and convert it back to SQL.
- sqlparser-rs/sqlparser-rs - A crate that provides an ANSI:SQL 2011 lexer and parser that can parse SQL into an Abstract Syntax Tree (AST).
- matklad/tom - A format-preserving TOML parser written in Rust.
- ota-meshi/toml-eslint-parser - A TOML parser that produces output compatible with ESLint.
- sparsetech/toml-scala - A feature-complete implementation of TOML for the Scala platform.