You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by JiaTao Tao <ta...@apache.org> on 2020/02/27 03:23:34 UTC

javacc problem: support "!" as "NOT"

Hi
I want to identify “!” as “NOT” in SQL, so I do So I made the following
changes in parser.jj:

|   < NOT: "NOT"|"!" >

It can work, but some test fails(testNoUnintendedNewReservedKeywords), then
I found in SqlParserImplConstants, “NOT” becomes "<NOT>" as in the pic.
[image: image.png]
It should be “\”NOT”\”


Regards!

Aron Tao

Re: javacc problem: support "!" as "NOT"

Posted by JiaTao Tao <ta...@apache.org>.
Thank Danny
Can you give an example? And I don't understand why "NOT" becomes "<NOT>".


Regards!

Aron Tao


Danny Chan <yu...@gmail.com> 于2020年2月27日周四 上午11:39写道:

> You can add a token and alias it as you like. The token is always a
> reserved keyword.
>
> Best,
> Danny Chan
> 在 2020年2月27日 +0800 AM11:23,dev@calcite.apache.org,写道:
> >
> > SqlParserImplConstants
>

Re: javacc problem: support "!" as "NOT"

Posted by Danny Chan <yu...@gmail.com>.
You can add a token and alias it as you like. The token is always a reserved keyword.

Best,
Danny Chan
在 2020年2月27日 +0800 AM11:23,dev@calcite.apache.org,写道:
>
> SqlParserImplConstants