enoch has asked for the wisdom of the Perl Monks concerning the following question:

A friend of mine recently asked me if there was a Java language parser in Perl. I thought to myself "sure there is." "After all, there is Verilog::Parser, C::Sharp, SQL::Parser... There has got to be a Java language parser."

My first CPAN search turned up Java::JVM::Classfile, which will parse the byte code. Not exactly what he wanted, but I was on the right track. So, I changed my search terms slightly and looked again. Nothing. So, I turned to the Monastery and did some Super Searching; and again, I come up with nothing.

I find that odd. There has to be one out there, yes? Does any monk know of a parser for Java?


Replies are listed 'Best First'.
Re: Java Language Parser
by diotalevi (Canon) on Apr 07, 2003 at 17:22 UTC

    I started writing one once but stopped for lack of interest. Here's where I left off. (which is actually very, very early in the process). Sun publishes the Java Language Specification which is the source for this snippet of code.

Re: Java Language Parser
by broquaint (Abbot) on Apr 07, 2003 at 17:13 UTC
    Not specifically geared towards parsing Java but have you checked out Inline::Java?


Re: Java Language Parser
by crenz (Priest) on Apr 07, 2003 at 22:16 UTC

    Looks like the perfect job for Perl 6 to me :)