Open monperrus opened 4 years ago
FYI: https://github.com/jhipster/prettier-java is a "A Prettier plugin [to] parse the source code of the target language into an Abstract Syntax Tree and then print out the AST in a pretty style. Prettier-Java uses a Java-Parser implemented in JavaScript with the Chevrotain parsing library"
Roaster: "A Java Parser library that allows easy parsing and formatting of Java source files" https://github.com/forge/roaster
Another parsing tool made at Github: https://github.com/tree-sitter/tree-sitter
Big AST-based refactoring tool for PHP: https://github.com/rectorphp/rector
shift-ast Represents the structure of an ECMAScript program as an abstract syntax tree https://shift-ast.org/
Library to read, analyze, transform and generate Scala programs https://scalameta.org/
OpenC++ is C++ frontend library (lexer+parser+DOM/MOP) and source-to-source translator http://opencxx.sourceforge.net
Manifold (http://manifold.systems/) provides:
....
See also https://github.com/manifold-systems/manifold/tree/master/manifold-core-parent/manifold
JavaParser tools for Java code Analyse Transform Generate https://github.com/javaparser/javaparser
Cubix: a multi language tool for source to source transformations http://www.cubix-framework.com
FTR we must have CIL in this thread :)
ROSE is a robust, open source, compiler-based infrastructure for building source to source program transformation and analysis tools developed at Lawrence Livermore National Laboratory. ROSE Tools can process large C, C++, Fortran, OpenMP, and UPC source codes, as well as binary executables.
Olmar: manipulating C and C++ abstract syntax trees in Ocaml
OpenRewrite is a mass refactoring ecosystem for Java and other source code, designed to eliminate technical debt across an engineering organization. https://github.com/openrewrite/rewrite
main contributors: @jkschneider @sambsnyd
FYI: Semgrep can do matching (related to template matching and SMPL in Spoon) and automated transformations https://semgrep.dev/
cc/ @IagoAbal @mjambon @aryx @mschwager
It can indeed!
structured template / search and replace replacement in intelliJ https://www.jetbrains.com/help/idea/structural-search-and-replace.html
thanks @MartinWitt for the pointer
JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator https://github.com/benjamn/recast by @benjamn
Comby: A code rewrite tool for structural search and replace that supports ~every language. https://github.com/comby-tools/comby
cc/ @rvantonder
Codemods (library to assist you with large-scale codebase refactors):
See also https://github.com/rajasegar/awesome-codemods
thanks @rarkins for the pointer
com.facebook.kotlin.asttools
containing some utilities we use to simplify work with the Kotlin compiler API https://github.com/fbsamples/kotlin_ast_tools
Rerast is a search/replace tool for Rust code using rules, by Google https://github.com/google/rerast
Hyperast: ASTs over Git histories, fast, in Rust
https://github.com/HyperAST/HyperAST
by @quentinLeDilavrec
this issue is about tools related to Spoon, related to source code analysis and transformation.
(#1908 is about papers)
(Moving ones from #1303 here)