Looking for a standalone Java source code parser

Mario Torre neugens.limasoftware at gmail.com
Mon Oct 20 09:55:47 UTC 2014


I think you may then need to use exactly what Tomcat uses to generate
the bytecode/java files. I'm not really expert here, but I would guess
that Tomcat may perform some optimisations or other things that may
not generate the same code.

As Dmitry suggest, if you can have the bytecode it would probably make
it easier to do static analysis. If you're building a static analysis
tool, it's an interesting project indeed, any plans to make it open
source? :)

Cheers,
Mario

2014-10-20 9:22 GMT+02:00 Aaron Lewis <the.warl0ck.1989 at gmail.com>:
> Hi Ben,
>
> Thanks for the quick reply.
> I'm trying to do static analysis (e.g API calls, function parameters)
> on JSP files.
> I will do what tomcat does and convert the JSP file into a JAVA file
> first, then do the analysis on JAVA code.
>
> Basically I want to know what java class::method is called and what
> parameters are passed in, if possible.
>
> So, is there any existing tool I can use ?
>
>
>
>
> On Mon, Oct 20, 2014 at 3:13 PM, Ben Evans
> <benjamin.john.evans at gmail.com> wrote:
>> There is certainly a BNF grammar for Java 5 out there somewhere. A tool like
>> ANTLR should be able to produce a parser for you from that.
>>
>> What's the specific use case?
>>
>> Thanks,
>>
>> Ben
>>
>> On 20 Oct 2014 15:10, "Aaron Lewis" <the.warl0ck.1989 at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I'm looking for a parser that parses Java source code, is there any
>>> recommend ones?
>>>
>>> --
>>> Best Regards,
>>> Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
>>> Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33
>
>
>
> --
> Best Regards,
> Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/
> Finger Print:   9F67 391B B770 8FF6 99DC  D92D 87F6 2602 1371 4D33



-- 
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Java Champion - Blog: http://neugens.wordpress.com - Twitter: @neugens
Proud GNU Classpath developer: http://www.classpath.org/
OpenJDK: http://openjdk.java.net/projects/caciocavallo/

Please, support open standards:
http://endsoftpatents.org/



More information about the discuss mailing list