PL/SQL Parser

We developed a commercial PL/SQL parser.

We offer it for an yearly license, with the permission of redistributing it.

We have battle tested against all the examples we could find: the ones publicly available and the ones provided by our clients. In any case we offer full support: every single parsing issue that will ever be reported will be handled it in the shorter delay possible.

The parser can handle the whole SQL/PSM standard.

What it can be used for?

A parser is a software component that “understands” the code it analyze. It then provide the result of this analysis, called the Abstract Syntax Tree (AST), as an output which can be used for multiple goals.

For this reason a parser can be used as a component for:

  • Transpilers: for example to translate PL/SQL code to Snowflake JavaScript or to other formats. In this case a parser is an essential component of the transpiler.
  • Interpreters or compilers: you may want to interpret or compile PL/SQL, so that you can retain the code as-is and execute it on a new platform, for example
  • Editors: you may want to build an editor or other supporting tools for PL/SQL. In this case a parser would be very valuable to understand the code and support syntax highlighting, auto-completion, error-checking, refactoring and other features
  • Analysis and documentation: you may want to generate diagrams or documentation from your code, for example to support training, maintenance, or manual rewriting. For these projetcts a parser is an essential building block

You may want to build the other components necessary to obtain the full system in-house or we can provide support for building them.

How can the parser be used?

The parser can be used in two different ways:

  1. As a Java library (usable from Java, Kotlin, Scala, Groovy and all possible JVM languages)
  2. As a command-line tool that produces an Abstract Syntax Tree in JSON or XML format. In this way the parser can be integrated with any software able to process JSON or XML

Why buying an off-the-shelf parser?

Because we can offer it for a lower price than a parser developed for a specific client. At the same time it is better tested as we have used it across a series of projects.

Why not using open-source alternatives?

For three main reasons:

  • Our parsers can handle all possible examples, while open-source alternatives, when present typically do not cover all the possible variants
  • We offer support: if you encounter any problem we will fix it
  • We offer extensive documentation: you will get the description of each single type of node that can be produced by the parser
  • The Abstract Syntax Tree we provided is easier to work with, as we spend a considerable effort refining it, as part of our three-stages approach to parsing. Typically open-source alternatives offer a lower-level tree (a parse-tree), which is the output which is easy to produce but not easy to consume
  • Our clients have sometimes tried open-source alternatives but then contacted us because they were not satisfied with the performance provided by the open-source projects they used

How the AST looks like?

The AST produced contains:

  • A list of lexical, syntactical, and semantic errors recognized
  • The precise position of each element in the source files
  • The complete information on every statement, expression, and data structure recognized

How documentation looks like?

The documentation provided describes:

  • How to setup and use the system
  • The general structure of the Abstract Syntax Tree provided
  • Detailed description of each single type of node

This is how it looks like. All fields are described, a visual representation of most rules is provided, hyperlinks help navigating the documentation.

How to learn more?

We are willing to extend this parser, as needed, following the requests of our clients.

For information please feel free to write at or using our contacts page.