I would use the existing parser if my program were written in C, but it's
not. I will look at it as a reference when writing the BNF though.

Through my search I could see that this is not the first time that this
question has been asked. So, once I'm done I will provide you all with the
file.

-----Original Message-----
From: Dennis Cote [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 05, 2007 10:35 AM
To: [email protected]
Subject: Re: [sqlite] BNF for sqlite3?

WB Stow wrote:
> Does anyone have a BNF file
(http://en.wikipedia.org/wiki/Backus-Naur_form)
> for SQLite3? I want to generate a parser with it.
>
> If not, I guess I can start with the SQL92 BNF that I have and add the
> sqlite3 stuff to it...
>
>   
Wayne,

The documentation at http://www.sqlite.org/lang.html contains a fairly 
complete pseudo BNF of all the SQL statements that SQLite accepts at the 
top of each statements' description.

There is already a complete freely available open source parser for the 
SQL that SQLite accepts in the SQLite source. It is a C language parser 
generated by the lemon parser generator (also included in SQLite). You 
may be able to use that directly, or model your parser on it. If you 
build your own, be aware that the language does change from time to time.

HTH
Dennis Cote

----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to