Skip to content

aniskop/plsql-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The goal of the project – create Oracle PL/SQL parser, which operates the same syntactic blocks, which are described in Oracle documentation. This means that the parse tree produced by the parser has the same structure (or at least very close) as the one presented in Oracle docs. Also parser rules are named after the Oracle docs (with some exceptions) to keep straightforward mapping.

Oracle docs used:

To test the grammar execute mvn test or mvn clean test.

Supported syntax elements

Known issues

Comments Comments can be only outside statements and expressions. This makes parser rules and eventually parser easier.

-- Valid comment.
declare
    /* Valid multi-line
    comment. */

    /* This is also valid.*/
    -- This is valid.
    my_const constant number := 10; -- Valid comment

    my_var /* This will cause parser to fail */ varchar2(100);
begin
    -- Valid comment
    /* Also valid. */
end;

Making the parser find comment everywhere will slow it down while bringing almost no value.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published