Parser for Oracle SQL

前端 未结 7 876
自闭症患者
自闭症患者 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 06:01

    The ANTLR (v3, v4) parser generator has had a number of Oracle SQL and PL/SQL grammars written for it; see the grammar list (v3) for details. Of those:

    • I've used Andrey Kharitonkin's "Oracle PL/SQL Grammar for ANTLR v3"; from memory it supported most SQL and PL/SQL syntax from the 8i era, with a few bits and pieces that appeared in 9i and 10g
    • Patrick Higgins' "PL/SQL" grammar is newer and claims to support most 11g syntax, but it appears to just swallow most DML statements - not too useful if you're specifically interested in SQL

提交回复
热议问题