[antlr-interest] sql parser implementation required?

Peggy Fieland madcapmaggie at yahoo.com
Fri Dec 2 07:37:53 PST 2005


There's an SQL oracle grammar  oracle 7 -- very old)
and a Pl/SQL grammar.

They are a place to start.   However, complete oracle
10 is pretty hairy.

Peggy 



--- Kannan Ekanath <kannan.ekanath at gmail.com> wrote:

> Peggy,
> I was looking at an "Oracle" SQL parser. Isnt there
> any standard reusable
> grammar for it :(
> 
> On 12/1/05, Peggy Fieland <madcapmaggie at yahoo.com>
> wrote:
> >
> > Kannan,
> >
> > AFAIK there is no "general" SQL parser.
> > Also, every database has  its own variant of SQL.
> >
> > Peggy
> >
> > --- Kannan Ekanath <kannan.ekanath at gmail.com>
> wrote:
> >
> > >  Hi, Level of Expertise : BEGINNER I am of the
> > > impression that antlr is some
> > > sort of a library generator for parsing some
> input
> > > based on some rules. In
> > > ANTLR the input is probably a "GRAMMAR" and the
> > > output is an archive/a
> > > library for parsing and saying if a string
> follows
> > > the grammar. Having said
> > > this, i also believe there must be a standard
> SQL
> > > ANTLR parser written by
> > > someone. If that is the case can someone point
> to
> > > those links? Basically i
> > > have a String in Java and i want to see if it is
> a
> > > valid SQL query (although
> > > some validations like whether the table is
> actually
> > > present in db cannot be
> > > done) and if it is a valid query i want to
> extract
> > > the bind parameters from
> > > that query. Can someone please point to relevant
> > > link? ANTLR seems to be a
> > > very broad parser implementation and i am
> searching
> > > if someone has written a
> > > "READYMADE" reusable SQL grammar.
> > >
> > > PS : Cross posting at
> > > http://www.jguru.com/forums/view.jsp?EID=1273892
> > >
> > > --
> > > Kannan Ekanath
> > >
> >
> >
> 
> 
> --
> Kannan Ekanath
> 



More information about the antlr-interest mailing list