Parsec parser for Java?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Parsec parser for Java?

Punyashloka Biswal
Hi Haskellers,

I'm writing a program-analysis tool in Haskell to operate on Java
source code, and I need a parser.  Parsec provides javaStyle to
help with lexical analysis, but I was wondering if there are any
full-fledged Java parsers out there.

Thanks,
Punya


_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Parsec parser for Java?

Bjorn Bringert-2
Punyashloka Biswal wrote:
> Hi Haskellers,
>
> I'm writing a program-analysis tool in Haskell to operate on Java
> source code, and I need a parser.  Parsec provides javaStyle to
> help with lexical analysis, but I was wondering if there are any
> full-fledged Java parsers out there.
>
> Thanks,
> Punya

There is a BNFC [1] grammar for Java 1.1 [2]. BNFC can generate a parser
in Haskell (along with lexer, abstract syntax and pretty printer) from
that.

/Björn

[1]
http://www.cs.chalmers.se/~markus/BNFC/

[2]
http://people.cs.uchicago.edu/~mrainey/java.cf
_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries