[antlr-interest] SQL grammar, keywords that can be identifiers

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jul 23 03:50:41 PDT 2004


On 7/23/04 1:34 PM, "Pete Forman" <pete.forman at westerngeco.com> wrote:

> At 2004-07-23 12:39 +0300, Ruslan Zasukhin wrote:
>> So lexer returns ID,
>> 
>> But we add one more rule to Parser
>> 
>>   identifier : ..............
> 
> Explicitly, the lexer returns IDENTIFIER, LEFT, RIGHT, FULL, OUTER,...
> 
> One identifier rule might not be enough.  The set of keywords that are
> allowed to be table names may not be the same as those for function
> names and so on.

I see your points,

But in general problem is complex.
By SQL92 standard 

    ANY KEYWORD can be used as name of table or field or function.

It looks your adivce can resolve only that 2 examples which I have show.
But geenral task is more hard.

Any ideas now ?

-- 
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