Public Domain SQL grammars?

Поиск
Список
Период
Сортировка
Искать

Public Domain SQL grammars?

От:
"Terry Van Belle" <vanbelle@freedomintelligence.com>
Дата:
Hi All,
 
I've been trying to automatically parse the SQL'92 grammar, based on the BNF found in the ISO spec.  So far no luck throwing yacc, yay, or JavaCC at it.  Does anyone know what type of grammar it is, and whether there are any public domain grammars out there for it?
 
Terry
 

Re: Public Domain SQL grammars?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Terry Van Belle"  writes:
> 
> 
> 
> 
> 
> 
> 
> 
Hi All,
>
 
>
I've been trying to automatically parse th= > e SQL'92=20 > grammar, based on the BNF found in the ISO spec.  So far no luck throw= > ing=20 > yacc, yay, or JavaCC at it.  Does anyone know what type of grammar it = > is,=20 > and whether there are any public domain grammars out there for it? >
 
>
Terry
>
 
(Please people, don't post HTML-ified email on mailing lists. You think the rest of us enjoy looking at this stuff?) My guess is that the grammar shown in the spec is not LR(1), and that you'll have to transform it into LR(1) form before you will get any available parsing tool to deal with it. This generally involves rearranging productions so that no more than one token lookahead is needed to tell which production to use next. You might care to read the 'bison' (GNU yacc) manual on the subject of removing parse conflicts. regards, tom lane
FAQ