Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: Add more keywords into UnReservedKeyword list #80

Merged
merged 6 commits into from
Sep 10, 2015

Conversation

shenli
Copy link
Member

@shenli shenli commented Sep 9, 2015

See: https://dev.mysql.com/doc/refman/5.7/en/keywords.html
Unreserved keywords can be used as identifiers.

@siddontang
Copy link
Member

year and now are time functions, it is ok not adding in function parser?

@shenli
Copy link
Member Author

shenli commented Sep 9, 2015

It is OK.
Identifier can be function name. "YEAR" and "NOW" are all Identifier, so they can be used as builtin function name.

@siddontang
Copy link
Member

LGTM

@shenli
Copy link
Member Author

shenli commented Sep 9, 2015

Merge with master and fix conflict and fix golint error.
PTAL


"AUTO_INCREMENT" | "AFTER" | "BEGIN" | "BIT" | "BOOL" | "BOOLEAN" | "CHARSET" | "COLUMNS" | "COMMIT"
| "DATE" | "DATETIME" | "DEALLOCATE" | "DO" | "END" | "ENGINE" | "ENGINES" | "EXECUTE" | "FIRST" | "FULL"
| "LOCAL" | "NAMES" | "OFFSET" | "PASSWORD" %prec lowerThanEq | "PREPARE" | "QUICK" | "ROLLBACK" | "SESSION" | "SIGNED"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we put PASSWORD in a single line, because it has a precedence.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary. We have "|" to separate different rules. So I think the %prec will not affect other rules.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that %prec will not affect other rules. I just think it seems different from others with %prec.

@shenli
Copy link
Member Author

shenli commented Sep 9, 2015

PTAL

@siddontang
Copy link
Member

LGTM

1 similar comment
@ngaut
Copy link
Member

ngaut commented Sep 10, 2015

LGTM

ngaut added a commit that referenced this pull request Sep 10, 2015
parser: Add more keywords into UnReservedKeyword list
@ngaut ngaut merged commit f244ad1 into master Sep 10, 2015
@ngaut ngaut deleted the shenli/keyword-identifier branch September 10, 2015 00:08
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
* docs: update for 2.1

* docs: added Chinese translation

* docs: fixed comments

* Update docs/en_US/02-Deployment.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/02-Deployment.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/02-Deployment.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/02-Deployment.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/05-Errors.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/05-Errors.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/05-Errors.md

Co-Authored-By: kennytm <[email protected]>

* Update docs/en_US/05-Errors.md

Co-Authored-By: kennytm <[email protected]>

* docs: addressed comments

* Update README.md

Co-Authored-By: kennytm <[email protected]>
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
okJiang pushed a commit to okJiang/tidb that referenced this pull request Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants