Skip to content

Commit

Permalink
feat: improve keyword rules
Browse files Browse the repository at this point in the history
  • Loading branch information
HaydenOrz committed Aug 30, 2023
1 parent 1ab0212 commit a442768
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/grammar/hive/HiveSqlLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ KW_AST : 'AST';
KW_AT : 'AT';
KW_AUTHORIZATION : 'AUTHORIZATION';
KW_AUTOCOMMIT : 'AUTOCOMMIT';
KW_BATCH : 'KW_BATCH';
KW_BATCH : 'BATCH';
KW_BEFORE : 'BEFORE';
KW_BETWEEN : 'BETWEEN';
KW_BIGINT : 'BIGINT';
Expand Down Expand Up @@ -93,7 +93,7 @@ KW_DATACONNECTORS : 'CONNECTORS';
KW_DATE : 'DATE';
KW_DATETIME : 'DATETIME';
KW_DAY : 'DAY' 'S'?;
KW_DAYOFWEEK : 'KW_DAYOFWEEK';
KW_DAYOFWEEK : 'DAYOFWEEK';
KW_DBPROPERTIES : 'DBPROPERTIES';
KW_DCPROPERTIES : 'DCPROPERTIES';
KW_DDL : 'DDL';
Expand All @@ -116,7 +116,6 @@ KW_DISTRIBUTE : 'DISTRIBUTE';
KW_DISTRIBUTED : 'DISTRIBUTED';
KW_DO : 'DO';
KW_DOUBLE : 'DOUBLE';
KW_DOW : 'DAYOFWEEK';
KW_DROP : 'DROP';
KW_DUMP : 'DUMP';
KW_ELEM_TYPE : '$ELEM$';
Expand Down Expand Up @@ -161,7 +160,7 @@ KW_GRANT : 'GRANT';
KW_GROUP : 'GROUP';
KW_GROUPING : 'GROUPING';
KW_HAVING : 'HAVING';
KW_HOLD_DDLTIME : 'KW_HOLD_DDLTIME';
KW_HOLD_DDLTIME : 'HOLD_DDLTIME';
KW_HOUR : 'HOUR' 'S'?;
KW_IDXPROPERTIES : 'IDXPROPERTIES';
KW_IF : 'IF';
Expand Down Expand Up @@ -227,11 +226,11 @@ KW_NORELY : 'NORELY';
KW_NOSCAN : 'NOSCAN';
KW_NOT : 'NOT' | '!';
KW_NOVALIDATE : 'NOVALIDATE';
KW_NO_DROP : 'KW_NO_DROP';
KW_NO_DROP : 'NO_DROP';
KW_NULL : 'NULL';
KW_NULLS : 'NULLS';
KW_OF : 'OF';
KW_OFFLINE : 'KW_OFFLINE';
KW_OFFLINE : 'OFFLINE';
KW_OFFSET : 'OFFSET';
KW_ON : 'ON';
KW_ONLY : 'ONLY';
Expand Down Expand Up @@ -263,15 +262,15 @@ KW_PRESERVE : 'PRESERVE';
KW_PRIMARY : 'PRIMARY';
KW_PRINCIPALS : 'PRINCIPALS';
KW_PROCEDURE : 'PROCEDURE';
KW_PROTECTION : 'KW_PROTECTION';
KW_PROTECTION : 'PROTECTION';
KW_PURGE : 'PURGE';
KW_QUALIFY : 'QUALIFY';
KW_QUARTER : 'QUARTER';
KW_QUERY : 'QUERY';
KW_QUERY_PARALLELISM : 'QUERY_PARALLELISM';
KW_RANGE : 'RANGE';
KW_READ : 'READ';
KW_READONLY : 'KW_READONLY';
KW_READONLY : 'READONLY';
KW_READS : 'READS';
KW_REAL : 'REAL';
KW_REBUILD : 'REBUILD';
Expand Down Expand Up @@ -347,7 +346,7 @@ KW_THEN : 'THEN';
KW_TIME : 'TIME';
KW_TIMESTAMP : 'TIMESTAMP';
KW_TIMESTAMPLOCALTZ : 'TIMESTAMPLOCALTZ';
KW_TIMESTAMPTZ : 'KW_TIMESTAMPTZ';
KW_TIMESTAMPTZ : 'TIMESTAMPTZ';
KW_TINYINT : 'TINYINT';
KW_TO : 'TO';
KW_TOUCH : 'TOUCH';
Expand Down Expand Up @@ -503,6 +502,7 @@ QuotedIdentifier
fragment
Letter
: 'A'..'Z'
| 'a'..'z'
;

fragment
Expand Down
2 changes: 0 additions & 2 deletions src/grammar/hive/HiveSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,6 @@ timeQualifiers
| KW_MONTH
| KW_WEEK
| KW_DAY
| KW_DOW
| KW_HOUR
| KW_MINUTE
| KW_SECOND
Expand Down Expand Up @@ -2647,7 +2646,6 @@ nonReserved
| KW_DISTRIBUTE
| KW_DISTRIBUTED
| KW_DO
| KW_DOW
| KW_DUMP
| KW_ELEM_TYPE
| KW_ENABLE
Expand Down

0 comments on commit a442768

Please sign in to comment.