Java representation in Haskell
Ralf Laemmel
Ralf.Laemmel@cwi.nl
Thu, 10 Oct 2002 00:09:37 +0200
Paulo Sequeira wrote:
> > Anyone knows of a module that provides data structures and functions for
> > representing and manipulating Java source code, so we don't have to start
> > from scratch? It would be wonderful if the module also includes some
> > "out-of-the-box" pretty-printing facilities for the representation.
Dean Herington wrote:
> The paper described at http://www.cs.vu.nl/Strafunski/sf/ suggests that the
> authors might have something relevant to your request.
In fact,
the paper to look at would be preferrable
this one (the above cited one, actually deals with
a Java subset):
Strafunski against Autism and Hypersensitivity
--- Application Letter
http://www.cwi.nl/~ralf/tiptoe/
(Draft)
It describes how to do some metrics for Java
in Haskell. To this end, it uses an external Java
parser the parse trees of which are then read in
as terms of alg. datatypes for the Java syntax. It
then advocates strategic programming (say, generic
programming) to manipulate parse trees. In the code
that we have, pretty printing is not an issue. As for the
parsing technology, we use generalized LR parsing based
on sglr/sdf.
This appl. will be included in the next
release of Strafunski coming very soon now.
Ralf
--
Dr.-Ing. Ralf Laemmel
CWI & VU, Amsterdam, The Netherlands
http://www.cwi.nl/~ralf/
http://www.cs.vu.nl/~ralf/