Code Monkey home page Code Monkey logo

documentation's Introduction

Babelfish logo

Babelfish - universal code parser

Babelfish is a self-hosted server for source code parsing. The Babelfish service can parse any file, in any supported language, extract an ASTs (Abstract Syntax Tree) from it, and convert it to a UAST (Universal Abstract Syntax Tree) which can enable further analysis and transformation with the included or your own tools using an standard format.

Motivation and Scope

Babelfish was born as a solution for massive code analysis. The goal: analyzing all source code from every repository in the world, for every revision ever.

Current scope is parsing single files in any programming language and producing a universal abstract syntax tree. This helps us to run it at scale.

This scope might expand in the future to full project analysis, where source code can be analyzed with its full context, and not just per-file. Once we get closer to our current scope, we may consider starting such effort.

Use Cases

Some of the use cases that we want to support with AST are:

  • AST-based diff'ing. Understanding changes made to code with finer-grained granularity. Is this commit changing variable names? Is it adding a loop?
  • Import extraction. Extracting all imports from every language in a uniform way.
  • Extract representation for Data Science experiments. For example, extracting a list of all tokens for every file, or a list of all function calls, etc.
  • Making statistics of language features. How many people use for-comprehension in Python?
  • Detecting similar coding patterns across languages.
  • Programmer-asisting tools Improved linters, safety analysis, idiomatic usage, etc.

Further reading

This repo contains the project documentation, which you can also see properly rendered at https://doc.bblf.sh/.

documentation's People

Contributors

abeaumont avatar bzz avatar campoy avatar carlosms avatar dennwc avatar dpordomingo avatar eiso avatar juanjux avatar mcarmonaa avatar mcuadros avatar smola avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.