Quantcast

Parsing Haskell?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Parsing Haskell?

Daniel Lincke
Hi Haskellers,

I am looking for a parser which can parse Haskell code and build an
syntax tree out of it. The syntax tree should be storable in some
reasonable file format in order to use it as an input for applications
like programm transformation systems.
Is there something like this available? The Haskell compiler ghc and the
interpreter hugs also have to do parsing, is there a possibility to
'abuse' them as parsers?

Greets and thanks,
Daniel




--
Dipl.-Inf. Daniel Lincke
========================
PhD student

PIK - Potsdam Institute for Climate Impact Research
PB 60 12 30
14412 Potsdam - Germany

Phone: +49 331 288 2425
Email: [hidden email]
_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Parsing Haskell?

Vo Minh Thu
2009/4/1 Daniel Lincke <[hidden email]>:
> Hi Haskellers,
>
> I am looking for a parser which can parse Haskell code and build an
> syntax tree out of it. The syntax tree should be storable in some
> reasonable file format in order to use it as an input for applications
> like programm transformation systems.
> Is there something like this available? The Haskell compiler ghc and the
> interpreter hugs also have to do parsing, is there a possibility to
> 'abuse' them as parsers?

Have a look at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts

Thu
_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Parsing Haskell?

Valery V. Vorotyntsev
In reply to this post by Daniel Lincke
On Wed, Apr 1, 2009 at 5:31 PM, Daniel Lincke
<[hidden email]> wrote:
> Hi Haskellers,
>
> I am looking for a parser which can parse Haskell code and build an
> syntax tree out of it. The syntax tree should be storable in some
> reasonable file format in order to use it as an input for applications
> like programm transformation systems.
> Is there something like this available? The Haskell compiler ghc and the
> interpreter hugs also have to do parsing, is there a possibility to
> 'abuse' them as parsers?

Hello, Daniel.

This is not a proper mailing list for your question. Consider asking
`haskell-cafe' [http://haskell.org/mailman/listinfo/haskell-cafe].
(`haskell' list is mostly for announcements.)

Thank you and good luck!

--
vvv
_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Parsing Haskell?

Thomas Davie-2
In reply to this post by Daniel Lincke

On 1 Apr 2009, at 16:31, Daniel Lincke wrote:

> Hi Haskellers,
>
> I am looking for a parser which can parse Haskell code and build an
> syntax tree out of it. The syntax tree should be storable in some
> reasonable file format in order to use it as an input for applications
> like programm transformation systems.

Just a note – the storable syntax tree you're looking for is called  
"a .hs file".  You just want a nice interface to your Haskell parser  
so that said syntax transformers can work easily.

You might want to look at how HaRe does it.  I believe using  
Programatica at the moment, because it's the only one that preserves  
comments and code layout.

Bob

_______________________________________________
Haskell mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell
Loading...