Parser for Oracle SQL

前端 未结 7 872
自闭症患者
自闭症患者 2020-12-05 05:05

For my current project I need a SQL parser that parses Oracle SQL statements. Currently I\'ve been using jsqlparser, which worked well for simple queries. But when specific

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-05 05:57

    Our DMS Software Reengineering Toolkit can be obtained with an Oracle PLSQL parser, or a SQL 2011 parser. DMS provides a parser, builds an AST, lets you investigate/transform the tree arbitrarily, and regenerate the AST as source code if you want to do that.

    You can test out the parser by downloading the PLSQL formatter available from the website; that uses the same underlying DMS machinery; just doesn't analyze/transform the tree.

    You might need to wrap the SQL statements in a simple PLSQL procedure.

提交回复
热议问题