Related articles |
---|
SQL grammar problem with Visual Parse++ junk@junk.com (John) (2001-07-23) |
Oracle grammar ambiguities and conflicts mattblackmon@hotmail.com (matt blackmon) (2006-01-09) |
Re: Oracle grammar ambiguities and conflicts grosch@cocolab.de (Josef Grosch) (2006-01-12) |
Re: Oracle grammar ambiguities and conflicts derek@knosof.co.uk (Derek M. Jones) (2006-01-12) |
Re: Oracle grammar ambiguities and conflicts cfc@shell01.TheWorld.com (Chris F Clark) (2006-01-12) |
Re: Oracle grammar ambiguities and conflicts DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-01-12) |
Re: Oracle grammar ambiguities and conflicts drikosv@otenet.gr (Evangelos Drikos) (2006-01-12) |
Oracle grammar ambiguities and conflicts mark.thiehatten@bibit.com (Mark Thiehatten) (2006-01-12) |
Re: Oracle grammar ambiguities and conflicts cfc@shell01.TheWorld.com (Chris F Clark) (2006-01-17) |
[5 later articles] |
From: | Josef Grosch <grosch@cocolab.de> |
Newsgroups: | comp.compilers |
Date: | 12 Jan 2006 12:11:53 -0500 |
Organization: | CoCoLab, Germany |
References: | 01-07-118 06-01-029 |
Keywords: | parse, SQL |
Posted-Date: | 12 Jan 2006 12:11:53 EST |
matt blackmon <mattblackmon@hotmail.com> wrote:
>
> ... I'm currently working on
> an oracle 10g sql parser using flex/bison. Of the three solutions
> mentioned by the moderator (are there more?), ...
We have written an SQL parser for ORACLE 10. It accepts all DML and DDL
statements including PL/SQL. The parser also accepts the SQL dialects
DB2 8, Informix 7 and Sybase 6. It is implemented using the Cocktail Toolbox.
We solve the problem of non-reserved keywords with a variant of
"parser backup if it gags on a keyword". The handling of syntax errors
can be configured in the parsers generated by the LALR parser generator
'lark'. We have done this using the following "hack in the parser":
At a syntax error we check whether the current token is a keyword.
If an identifier token would be acceptable at this location then
we convert the keyword token into an identifier token and continue parsing.
We are successfully using this hack in parsers for SQL, COBOL, NATURAL and
CICS.
Best regards
Dr. Josef Grosch
CoCoLab - Datenverarbeitung
Hoehenweg 6
77855 Achern
Germany
Phone : +49-7841-669144
Fax : +49-7841-669145
Email : grosch@cocolab.com
Internet: www.cocolab.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.