[Mono-list] SQL Parser for System.Data

Stefan Matthias Aust sma@3plus4.de
Sat, 11 May 2002 20:37:24 +0200

From: "Daniel Morgan" <danmorg@sc.rr.com>

> Anyone have any experience at creating a SQL parser?
> How do I create a SQL parser in C#?  Or is there an open source (as in
> X11 free or BSD free) SQL parser already written in C# or Java?

hsqldb(.sourceforge.net) is a pure Java SQL DB which - of course - has also
an SQL parser written in Java.  IIRC it's a hand-written one, not generated
by a parser generator like yacc or jay.

SQL's language structure is very simple and can be expressed with an LL(k)
grammar for which it is easy to generate parsers by hand which are typically
more efficient than parsers generated by LALR(k) parsers.  Somebody already
ported an earlier version of hsqldb - called hsql - to C# ->

Another free GPL'd pure Java DB is www.mckoi.com.

Stefan Matthias Aust   //
www.3plus4software.de //  Truth Until Paradox!