Re: OS-SQL-Grammar?

From: Nessi <nessi_at_nefkom.info>
Date: Thu, 07 Jul 2011 09:54:10 +0200
Message-ID: <iv3on0$faf$1_at_news.albasani.net>


  • original message === from: Norbert_Paul date: 2011-07-07 09:32

> Hi,
>
> is there a handy (and parseable) Open Source SQL-grammar around,
> that can be fed into a parser generator without major problems?
> I consider ISO 9075:2003 useless for this purpose and don't get
> the point of this "standard".
>
> I have (many) problems with the ISO grammar.
> Here is one I spotted yesterday: Is the following string
>
> "/* this is */ a strange comment */"
>
> a valid SQL-Comment (according to SQL 2003)?

I'd say no. According to the grammer, "/* this is */" is the <bracket comment> and what's following is not valid. As soon as a token is found (in this case the first <bracket comment terminator>) it is processed. Therefore the first "*/" ends the bracket comment and the following characters are not part of the comment anymore.

Cheers,
Udo Received on Thu Jul 07 2011 - 09:54:10 CEST

Original text of this message