Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Yoann Padioleau <pad@fb.com>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] [ANN] pfff 0.25, tools and APIs for program analysis of PHP/Java/JS/C/ML/PHP/...
Date: Wed, 27 Nov 2013 01:16:34 +0000	[thread overview]
Message-ID: <A215BA6A-7AC8-4BEE-96D6-0607A455CA50@fb.com> (raw)


Hello,

pfff is a set of tools and APIs to perform some static analysis,
dynamic analysis, code visualizations, code navigations, or
style-preserving source-to-source transformations such as refactorings
on source code. For now the effort has focused mainly on PHP but there
is also good support for C, C++, Java, HTML, JavaScript, and CSS.
There is also very good support for OCaml and noweb (literate
programming) so that pfff can be used on the code of pfff itself.

For more information see the pfff wiki at:
https://github.com/facebook/pfff/wiki/Main

The current release source code is accessible from:
https://github.com/facebook/pfff/releases/tag/v0.25.1

There is now also an OPAM package for pfff. It contains though just
the parsers, visitors, and AST dumpers (for C, Java, Javascript, PHP,
ML, HTML and CSS). To install it just do:

   $ opam install pfff

Once installed you should have access to the different libraries
in ~/.opam/.../lib/pfff-lang_yyy. 

The AST dumpers are useful to get familiar with the constructors.
Here is an example:

   $ cd pfff
   $ cat demos/foo.js
    function foo() {
      return 1;
    }
   $ ./pfff -dump_js demos/foo.js
    [FunDecl(
       {f_tok=Some(()); f_name=Some(("foo", ())); f_params=[]; 
        f_return_type=None; 
        f_body=[St(Return((), Some(L(Num(("1", ())))), Some(())))]; });
        FinalDef(())]

In the next few weeks I'll make OPAM packages for the other components
of pfff: sgrep, spatch, stags, codemap, codegraph, the treemap
library, etc.

Thanks to:
 - Eric Cooper for the initial version of the java parser
 - Patrick Doane and Gerd Stolpmann for their html parser
 - Dario Teixeira for his css parser
 - Facebook


                 reply	other threads:[~2013-11-27  1:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A215BA6A-7AC8-4BEE-96D6-0607A455CA50@fb.com \
    --to=pad@fb.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox