PL/SQL source code parser (in Java)

I'm looking for general purpose source parser in Java. Library which can help me to parser PL/SQL code. Extract functions, procedures, packages and show dependencies between them.

Answers


Consider looking at ANTLR tool. There exist already PL/SQL grammar. Please spend some time for reading about this tool. It should surely solve your problem.


There is a plsql-parser on GitHub, quote:

This is a [almost] full parser for PL/SQL language that includes a Lexer, Parser (that optionally generates an Abstract Syntax Tree) and a TreeWalker. Current version is target for Java language, but may be easy to port it to any other target.

I am interested in porting PL/SQL data structures to Java and will try it the next weeks.

Another option could be https://stackoverflow.com/a/6631453/734687, but note that you have to port the target language from C to Java.


Need Your Help

Polymer 1.0 Unable to stop on-tap event propagation

events polymer polymer-1.0

I have a paper-button with the on-tap function that opens a paper-dialog that contains a "Accept" paper-button that will close it when clicked.

How to set default Python version in terminal on OS X 10.6.8?

python macos

I just downloaded python 2.7 on my mac which runs OS X 10.6.8. The previous version of python installed was 2.6.