caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] pfff 0.25, tools and APIs for program analysis of PHP/Java/JS/C/ML/PHP/...
@ 2013-11-27  1:16 Yoann Padioleau
  0 siblings, 0 replies; only message in thread
From: Yoann Padioleau @ 2013-11-27  1:16 UTC (permalink / raw)
  To: caml users


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-27  1:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27  1:16 [Caml-list] [ANN] pfff 0.25, tools and APIs for program analysis of PHP/Java/JS/C/ML/PHP/ Yoann Padioleau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).