Ask HN: Parser for Java

3 points by live_to_code ↗ HN
I've done google searches, and generally get back Parser Generators in Java / how to write Parsers in Java.

What I want instead, is just a single industrial parser that can parse Java source code (like anything that the jvm can run). (Doing some really simple static analysis stuff).

Is there anything "official" that's easy to modify, like a parser from Sun or IBM or eclipse?

Thanks!

7 comments

[ 3.2 ms ] story [ 23.7 ms ] thread
Eclipse has the JDT package which gives you access to the parser that Eclipse uses internally.
>> industrial parser that can parse Java source code (like anything that the jvm can run)

Do you mean a parser for Java source code or bytecode? I would guess the former, but the reference to "anything that the jvm can run" suggests you may be looking for bytecode...