LPeg grammar for SQL?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LPeg grammar for SQL?

Petite Abeille
Hello,

Would anyone know of a LPeg grammar for SQL? Any flavor/subset of SQL?

Thoughts?

Thanks.

P.S. Google points to http://jan.kneschke.de/2008/7/13/lua-using-lpeg-for-sql-indenting/ , but the code seems to be AWOL.
Reply | Threaded
Open this post in threaded view
|

Re: LPeg grammar for SQL?

Michal Kottman-2
On 12 August 2013 19:39, Petite Abeille <[hidden email]> wrote:
Would anyone know of a LPeg grammar for SQL? Any flavor/subset of SQL?

Thoughts?

I do not know of any LPeg grammar for SQL, but I would suggest going through the diagrams in [1] linked from [2] and translate to equivalent LPeg grammar. It should be relatively straightforward to translate, but judging from the number of diagrams, it is not a task for one afternoon...