[antlr-interest] Re: SQL grammar, keywords that can be
identifiers
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Jul 26 04:25:16 PDT 2004
On 7/26/04 1:03 PM, "olejohnaske" <ole.john.aske at sun.com> wrote:
>> Here "references" is name of table.
>> But SQL also have key word 'references'.
>> So we get conflict.
>>
>
> Are you sure this is a real problem?
>
> At least according to the SQL92 standard, <reserved words> are not
> allowed as identifiers: My copy of ISO/IEC9075:1992 (SQL92), chapter
> 5.2, Part 11) in the 'Syntax rule' states:
>
> 11)
> The <identifier body> of a <regular identifier> .... shall not be
> equal according to the comparison rules in Subclause 8.2 ... to any
> <reserved words> ....
>
> (Removed some lengthy sql92 phrases where '....' is inserted)
>
> Both Table name and column names are defined as <identifiers> which
> has an <identifier body>. According to this, your examples above are
> not correct SQL92 syntax. (However, it may be allowed by some
> implementation which extends the standard... )
Wow. Than kyou for info Ole!
I have overloked this.
Great! this simpligy task a lots.
> Note: Identifier can be a <non-reserved words>. I handle this in my
> SQL92 parser by:
>
> nonReservedWords :
> CATALOG_NAME | CHARACTER_SET_CATALOG | .... lots more... ;
>
>
> identifier :
> IDENT
> | DELIMITED_IDENT
> | nonReservedWord
> ;
>
> Ole John Aske
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list