SQL grammar

jplindstrom on 2003-10-16T21:25:03

Gah! Now I've spent an hour searching for a grammar for Sybase/Transact-SQL. I've seen countless questions about it on Usenet, and a few grammars for the SQL-92 standard, but not what I'm after.

Something already in Parse::RecDescent format would be even nicer. Like SQL Fairy. It says on the web page it parses Sybase, but I can't find any reference to it in the code. Besides, it seems to only support DDL and I need to parse stored procedures as well.

It can't not be done already, surely.


Re: SQL grammar

jmcnamara on 2003-10-17T10:09:58


The lex & yacc book contains code for a SQL parser including the grammar.

I can't say if it is of any use for Sybase/Transact-SQL however.

Re: SQL grammar

jmcnamara on 2003-10-17T10:56:50


The lex & yacc book contains code for a SQL parser including the grammar.

It may not be helpful for Sybase/Transact-SQL however.