lava-oushudb-dt-sql-parser/src/lib/hive/HiveSqlLexer.tokens
XCynthia 6dad62ddf4
check alter sql and syntax (#156)
* check and update abort and alter sql

* delete superfluous space

* update grammar lib after change alter parser

* update alter parser to be compatible

---------

Co-authored-by: zhaoge <>
2023-09-06 11:46:46 +08:00

860 lines
12 KiB
Plaintext

KW_ABORT=1
KW_ACTIVATE=2
KW_ACTIVE=3
KW_ADD=4
KW_ADMIN=5
KW_AFTER=6
KW_ALL=7
KW_ALLOC_FRACTION=8
KW_ALTER=9
KW_ANALYZE=10
KW_AND=11
KW_ANTI=12
KW_ANY=13
KW_APPLICATION=14
KW_ARCHIVE=15
KW_ARRAY=16
KW_AS=17
KW_ASC=18
KW_AST=19
KW_AT=20
KW_AUTHORIZATION=21
KW_AUTOCOMMIT=22
KW_BATCH=23
KW_BEFORE=24
KW_BETWEEN=25
KW_BIGINT=26
KW_BINARY=27
KW_BOOLEAN=28
KW_BOTH=29
KW_BUCKET=30
KW_BUCKETS=31
KW_BY=32
KW_CACHE=33
KW_CASCADE=34
KW_CASE=35
KW_CAST=36
KW_CBO=37
KW_CHANGE=38
KW_CHAR=39
KW_CHECK=40
KW_CLUSTER=41
KW_CLUSTERED=42
KW_CLUSTERSTATUS=43
KW_COLLECTION=44
KW_COLUMN=45
KW_COLUMNS=46
KW_COMMENT=47
KW_COMMIT=48
KW_COMPACT=49
KW_COMPACTIONS=50
KW_COMPACT_ID=51
KW_COMPUTE=52
KW_CONCATENATE=53
KW_CONF=54
KW_CONSTRAINT=55
KW_CONTINUE=56
KW_COST=57
KW_CREATE=58
KW_CRON=59
KW_CROSS=60
KW_CUBE=61
KW_CURRENT=62
KW_CURRENT_DATE=63
KW_CURRENT_TIMESTAMP=64
KW_CURSOR=65
KW_DATA=66
KW_DATABASE=67
KW_DATABASES=68
KW_DATACONNECTOR=69
KW_DATACONNECTORS=70
KW_DATE=71
KW_DATETIME=72
KW_DAY=73
KW_DAYS=74
KW_DAYOFWEEK=75
KW_DBPROPERTIES=76
KW_DCPROPERTIES=77
KW_DDL=78
KW_DEBUG=79
KW_DEC=80
KW_DECIMAL=81
KW_NUMERIC=82
KW_DEFAULT=83
KW_DEFERRED=84
KW_DEFINED=85
KW_DELETE=86
KW_DELIMITED=87
KW_DEPENDENCY=88
KW_DESC=89
KW_DESCRIBE=90
KW_DETAIL=91
KW_DIRECTORIES=92
KW_DIRECTORY=93
KW_DISABLE=94
KW_DISABLED=95
KW_DISTINCT=96
KW_DISTRIBUTE=97
KW_DISTRIBUTED=98
KW_DO=99
KW_DOUBLE=100
KW_DROP=101
KW_RECOVER=102
KW_DUMP=103
KW_ELEM_TYPE=104
KW_ELSE=105
KW_ENABLE=106
KW_ENABLED=107
KW_END=108
KW_ENFORCED=109
KW_ESCAPED=110
KW_EVERY=111
KW_EXCEPT=112
KW_EXCHANGE=113
KW_EXCLUSIVE=114
KW_EXECUTE=115
KW_EXECUTED=116
KW_EXISTS=117
KW_EXPIRE_SNAPSHOTS=118
KW_EXPLAIN=119
KW_EXPORT=120
KW_EXPRESSION=121
KW_EXTENDED=122
KW_EXTERNAL=123
KW_EXTRACT=124
KW_FALSE=125
KW_FETCH=126
KW_FIELDS=127
KW_FILE=128
KW_FILEFORMAT=129
KW_FIRST=130
KW_FLOAT=131
KW_FLOOR=132
KW_FOLLOWING=133
KW_FOR=134
KW_FORCE=135
KW_FOREIGN=136
KW_FORMAT=137
KW_FORMATTED=138
KW_FROM=139
KW_FULL=140
KW_FUNCTION=141
KW_FUNCTIONS=142
KW_GRANT=143
KW_GROUP=144
KW_GROUPING=145
KW_HAVING=146
KW_HOLD_DDLTIME=147
KW_HOUR=148
KW_HOURS=149
KW_IDXPROPERTIES=150
KW_IF=151
KW_IGNORE=152
KW_IMPORT=153
KW_IN=154
KW_INDEX=155
KW_INDEXES=156
KW_INNER=157
KW_INPATH=158
KW_INPUTDRIVER=159
KW_INPUTFORMAT=160
KW_INSERT=161
KW_INT=162
KW_INTEGER=163
KW_INTERSECT=164
KW_INTERVAL=165
KW_INTO=166
KW_IS=167
KW_ISOLATION=168
KW_ITEMS=169
KW_JAR=170
KW_JOIN=171
KW_JOINCOST=172
KW_KEY=173
KW_KEYS=174
KW_KEY_TYPE=175
KW_KILL=176
KW_LAST=177
KW_LATERAL=178
KW_LEADING=179
KW_LEFT=180
KW_LESS=181
KW_LEVEL=182
KW_LIKE=183
KW_LIMIT=184
KW_LINES=185
KW_LOAD=186
KW_LOCAL=187
KW_LOCATION=188
KW_LOCK=189
KW_LOCKS=190
KW_LOGICAL=191
KW_LONG=192
KW_MACRO=193
KW_MANAGED=194
KW_MANAGEDLOCATION=195
KW_MANAGEMENT=196
KW_MAP=197
KW_MAPJOIN=198
KW_MAPPING=199
KW_MATCHED=200
KW_MATERIALIZED=201
KW_MERGE=202
KW_METADATA=203
KW_MINUS=204
KW_MINUTE=205
KW_MINUTES=206
KW_MONTH=207
KW_MONTHS=208
KW_MORE=209
KW_MOVE=210
KW_MSCK=211
KW_NONE=212
KW_NORELY=213
KW_NOSCAN=214
KW_NOT=215
KW_NOVALIDATE=216
KW_NO_DROP=217
KW_NULL=218
KW_NULLS=219
KW_OF=220
KW_OFFLINE=221
KW_OFFSET=222
KW_ON=223
KW_ONLY=224
KW_OPERATOR=225
KW_OPTION=226
KW_OR=227
KW_ORDER=228
KW_OUT=229
KW_OUTER=230
KW_OUTPUTDRIVER=231
KW_OUTPUTFORMAT=232
KW_OVER=233
KW_OVERWRITE=234
KW_OWNER=235
KW_PARTITION=236
KW_PARTITIONED=237
KW_PARTITIONS=238
KW_PATH=239
KW_PERCENT=240
KW_PKFK_JOIN=241
KW_PLAN=242
KW_PLANS=243
KW_PLUS=244
KW_POOL=245
KW_PRECEDING=246
KW_PRECISION=247
KW_PREPARE=248
KW_PRESERVE=249
KW_PRIMARY=250
KW_PRINCIPALS=251
KW_PROCEDURE=252
KW_PROTECTION=253
KW_PURGE=254
KW_QUALIFY=255
KW_QUARTER=256
KW_QUERY=257
KW_QUERY_PARALLELISM=258
KW_RANGE=259
KW_READ=260
KW_READONLY=261
KW_READS=262
KW_REAL=263
KW_REBUILD=264
KW_RECORDREADER=265
KW_RECORDWRITER=266
KW_REDUCE=267
KW_REFERENCES=268
KW_REGEXP=269
KW_RELOAD=270
KW_RELY=271
KW_REMOTE=272
KW_RENAME=273
KW_REOPTIMIZATION=274
KW_REPAIR=275
KW_REPL=276
KW_REPLACE=277
KW_REPLICATION=278
KW_RESOURCE=279
KW_RESPECT=280
KW_RESTRICT=281
KW_REVOKE=282
KW_REWRITE=283
KW_RIGHT=284
KW_RLIKE=285
KW_ROLE=286
KW_ROLES=287
KW_ROLLBACK=288
KW_ROLLUP=289
KW_ROW=290
KW_ROWS=291
KW_SCHEDULED=292
KW_SCHEDULING_POLICY=293
KW_SCHEMA=294
KW_SCHEMAS=295
KW_SECOND=296
KW_SECONDS=297
KW_SELECT=298
KW_SEMI=299
KW_SERDE=300
KW_SERDEPROPERTIES=301
KW_SERVER=302
KW_SET=303
KW_SETS=304
KW_SET_CURRENT_SNAPSHOT=305
KW_SHARED=306
KW_SHOW=307
KW_SHOW_DATABASE=308
KW_SKEWED=309
KW_SMALLINT=310
KW_SNAPSHOT=311
KW_SOME=312
KW_SORT=313
KW_SORTED=314
KW_SPEC=315
KW_SSL=316
KW_START=317
KW_STATISTICS=318
KW_STATUS=319
KW_STORED=320
KW_STREAMTABLE=321
KW_STRING=322
KW_STRUCT=323
KW_SUMMARY=324
KW_SYNC=325
KW_SYSTEM_TIME=326
KW_SYSTEM_VERSION=327
KW_TABLE=328
KW_TABLES=329
KW_TABLESAMPLE=330
KW_TBLPROPERTIES=331
KW_TEMPORARY=332
KW_TERMINATED=333
KW_THEN=334
KW_TIME=335
KW_TIMESTAMP=336
KW_TIMESTAMPLOCALTZ=337
KW_TIMESTAMPTZ=338
KW_TINYINT=339
KW_TO=340
KW_TOUCH=341
KW_TRAILING=342
KW_TRANSACTION=343
KW_TRANSACTIONAL=344
KW_TRANSACTIONS=345
KW_TRANSFORM=346
KW_TRIGGER=347
KW_TRIM=348
KW_TRUE=349
KW_TRUNCATE=350
KW_TYPE=351
KW_UNARCHIVE=352
KW_UNBOUNDED=353
KW_UNDO=354
KW_UNION=355
KW_UNIONTYPE=356
KW_UNIQUE=357
KW_UNIQUEJOIN=358
KW_UNKNOWN=359
KW_UNLOCK=360
KW_UNMANAGED=361
KW_UNSET=362
KW_UNSIGNED=363
KW_UPDATE=364
KW_URI=365
KW_URL=366
KW_USE=367
KW_USER=368
KW_USING=369
KW_UTC=370
KW_UTCTIMESTAMP=371
KW_VALIDATE=372
KW_VALUES=373
KW_VALUE_TYPE=374
KW_VARCHAR=375
KW_VECTORIZATION=376
KW_VIEW=377
KW_VIEWS=378
KW_WAIT=379
KW_WEEK=380
KW_WEEKS=381
KW_WHEN=382
KW_WHERE=383
KW_WHILE=384
KW_WINDOW=385
KW_WITH=386
KW_WITHIN=387
KW_WORK=388
KW_WORKLOAD=389
KW_WRITE=390
KW_YEAR=391
KW_YEARS=392
KW_ZONE=393
DOT=394
COLON=395
COMMA=396
SEMICOLON=397
LPAREN=398
RPAREN=399
LSQUARE=400
RSQUARE=401
LCURLY=402
RCURLY=403
EQUAL=404
EQUAL_NS=405
NOTEQUAL=406
LESSTHANOREQUALTO=407
LESSTHAN=408
GREATERTHANOREQUALTO=409
GREATERTHAN=410
DIVIDE=411
PLUS=412
MINUS=413
STAR=414
MOD=415
DIV=416
BITWISENOT=417
AMPERSAND=418
TILDE=419
BITWISEOR=420
CONCATENATE=421
BITWISEXOR=422
QUESTION=423
DOLLAR=424
StringLiteral=425
CharSetLiteral=426
IntegralLiteral=427
NumberLiteral=428
ByteLengthLiteral=429
Number=430
Identifier=431
CharSetName=432
WHITE_SPACE=433
LINE_COMMENT=434
QUERY_HINT=435
SHOW_HINT=436
HIDDEN_HINT=437
'ABORT'=1
'ACTIVATE'=2
'ACTIVE'=3
'ADD'=4
'ADMIN'=5
'AFTER'=6
'ALL'=7
'ALLOC_FRACTION'=8
'ALTER'=9
'ANALYZE'=10
'AND'=11
'ANTI'=12
'ANY'=13
'APPLICATION'=14
'ARCHIVE'=15
'ARRAY'=16
'AS'=17
'ASC'=18
'AST'=19
'AT'=20
'AUTHORIZATION'=21
'AUTOCOMMIT'=22
'BATCH'=23
'BEFORE'=24
'BETWEEN'=25
'BIGINT'=26
'BINARY'=27
'BOOLEAN'=28
'BOTH'=29
'BUCKET'=30
'BUCKETS'=31
'BY'=32
'CACHE'=33
'CASCADE'=34
'CASE'=35
'CAST'=36
'CBO'=37
'CHANGE'=38
'CHAR'=39
'CHECK'=40
'CLUSTER'=41
'CLUSTERED'=42
'CLUSTERSTATUS'=43
'COLLECTION'=44
'COLUMN'=45
'COLUMNS'=46
'COMMENT'=47
'COMMIT'=48
'COMPACT'=49
'COMPACTIONS'=50
'COMPACTIONID'=51
'COMPUTE'=52
'CONCATENATE'=53
'CONF'=54
'CONSTRAINT'=55
'CONTINUE'=56
'COST'=57
'CREATE'=58
'CRON'=59
'CROSS'=60
'CUBE'=61
'CURRENT'=62
'CURRENT_DATE'=63
'CURRENT_TIMESTAMP'=64
'CURSOR'=65
'DATA'=66
'DATABASE'=67
'DATABASES'=68
'CONNECTOR'=69
'CONNECTORS'=70
'DATE'=71
'DATETIME'=72
'DAY'=73
'DAYS'=74
'DAYOFWEEK'=75
'DBPROPERTIES'=76
'DCPROPERTIES'=77
'DDL'=78
'DEBUG'=79
'DEC'=80
'DECIMAL'=81
'NUMERIC'=82
'DEFAULT'=83
'DEFERRED'=84
'DEFINED'=85
'DELETE'=86
'DELIMITED'=87
'DEPENDENCY'=88
'DESC'=89
'DESCRIBE'=90
'DETAIL'=91
'DIRECTORIES'=92
'DIRECTORY'=93
'DISABLE'=94
'DISABLED'=95
'DISTINCT'=96
'DISTRIBUTE'=97
'DISTRIBUTED'=98
'DO'=99
'DOUBLE'=100
'DROP'=101
'RECOVER'=102
'DUMP'=103
'$ELEM$'=104
'ELSE'=105
'ENABLE'=106
'ENABLED'=107
'END'=108
'ENFORCED'=109
'ESCAPED'=110
'EVERY'=111
'EXCEPT'=112
'EXCHANGE'=113
'EXCLUSIVE'=114
'EXECUTE'=115
'EXECUTED'=116
'EXISTS'=117
'EXPIRE_SNAPSHOTS'=118
'EXPLAIN'=119
'EXPORT'=120
'EXPRESSION'=121
'EXTENDED'=122
'EXTERNAL'=123
'EXTRACT'=124
'FALSE'=125
'FETCH'=126
'FIELDS'=127
'FILE'=128
'FILEFORMAT'=129
'FIRST'=130
'FLOAT'=131
'FLOOR'=132
'FOLLOWING'=133
'FOR'=134
'FORCE'=135
'FOREIGN'=136
'FORMAT'=137
'FORMATTED'=138
'FROM'=139
'FULL'=140
'FUNCTION'=141
'FUNCTIONS'=142
'GRANT'=143
'GROUP'=144
'GROUPING'=145
'HAVING'=146
'HOLD_DDLTIME'=147
'HOUR'=148
'HOURS'=149
'IDXPROPERTIES'=150
'IF'=151
'IGNORE'=152
'IMPORT'=153
'IN'=154
'INDEX'=155
'INDEXES'=156
'INNER'=157
'INPATH'=158
'INPUTDRIVER'=159
'INPUTFORMAT'=160
'INSERT'=161
'INT'=162
'INTEGER'=163
'INTERSECT'=164
'INTERVAL'=165
'INTO'=166
'IS'=167
'ISOLATION'=168
'ITEMS'=169
'JAR'=170
'JOIN'=171
'JOINCOST'=172
'KEY'=173
'KEYS'=174
'$KEY$'=175
'KILL'=176
'LAST'=177
'LATERAL'=178
'LEADING'=179
'LEFT'=180
'LESS'=181
'LEVEL'=182
'LIKE'=183
'LIMIT'=184
'LINES'=185
'LOAD'=186
'LOCAL'=187
'LOCATION'=188
'LOCK'=189
'LOCKS'=190
'LOGICAL'=191
'LONG'=192
'MACRO'=193
'MANAGED'=194
'MANAGEDLOCATION'=195
'MANAGEMENT'=196
'MAP'=197
'MAPJOIN'=198
'MAPPING'=199
'MATCHED'=200
'MATERIALIZED'=201
'MERGE'=202
'METADATA'=203
'MINUS'=204
'MINUTE'=205
'MINUTES'=206
'MONTH'=207
'MONTHS'=208
'MORE'=209
'MOVE'=210
'MSCK'=211
'NONE'=212
'NORELY'=213
'NOSCAN'=214
'NOT'=215
'NOVALIDATE'=216
'NO_DROP'=217
'NULL'=218
'NULLS'=219
'OF'=220
'OFFLINE'=221
'OFFSET'=222
'ON'=223
'ONLY'=224
'OPERATOR'=225
'OPTION'=226
'OR'=227
'ORDER'=228
'OUT'=229
'OUTER'=230
'OUTPUTDRIVER'=231
'OUTPUTFORMAT'=232
'OVER'=233
'OVERWRITE'=234
'OWNER'=235
'PARTITION'=236
'PARTITIONED'=237
'PARTITIONS'=238
'PATH'=239
'PERCENT'=240
'PKFK_JOIN'=241
'PLAN'=242
'PLANS'=243
'PLUS'=244
'POOL'=245
'PRECEDING'=246
'PRECISION'=247
'PREPARE'=248
'PRESERVE'=249
'PRIMARY'=250
'PRINCIPALS'=251
'PROCEDURE'=252
'PROTECTION'=253
'PURGE'=254
'QUALIFY'=255
'QUARTER'=256
'QUERY'=257
'QUERY_PARALLELISM'=258
'RANGE'=259
'READ'=260
'READONLY'=261
'READS'=262
'REAL'=263
'REBUILD'=264
'RECORDREADER'=265
'RECORDWRITER'=266
'REDUCE'=267
'REFERENCES'=268
'REGEXP'=269
'RELOAD'=270
'RELY'=271
'REMOTE'=272
'RENAME'=273
'REOPTIMIZATION'=274
'REPAIR'=275
'REPL'=276
'REPLACE'=277
'REPLICATION'=278
'RESOURCE'=279
'RESPECT'=280
'RESTRICT'=281
'REVOKE'=282
'REWRITE'=283
'RIGHT'=284
'RLIKE'=285
'ROLE'=286
'ROLES'=287
'ROLLBACK'=288
'ROLLUP'=289
'ROW'=290
'ROWS'=291
'SCHEDULED'=292
'SCHEDULING_POLICY'=293
'SCHEMA'=294
'SCHEMAS'=295
'SECOND'=296
'SECONDS'=297
'SELECT'=298
'SEMI'=299
'SERDE'=300
'SERDEPROPERTIES'=301
'SERVER'=302
'SET'=303
'SETS'=304
'SET_CURRENT_SNAPSHOT'=305
'SHARED'=306
'SHOW'=307
'SHOW_DATABASE'=308
'SKEWED'=309
'SMALLINT'=310
'SNAPSHOT'=311
'SOME'=312
'SORT'=313
'SORTED'=314
'SPEC'=315
'SSL'=316
'START'=317
'STATISTICS'=318
'STATUS'=319
'STORED'=320
'STREAMTABLE'=321
'STRING'=322
'STRUCT'=323
'SUMMARY'=324
'SYNC'=325
'SYSTEM_TIME'=326
'SYSTEM_VERSION'=327
'TABLE'=328
'TABLES'=329
'TABLESAMPLE'=330
'TBLPROPERTIES'=331
'TEMPORARY'=332
'TERMINATED'=333
'THEN'=334
'TIME'=335
'TIMESTAMP'=336
'TIMESTAMPLOCALTZ'=337
'TIMESTAMPTZ'=338
'TINYINT'=339
'TO'=340
'TOUCH'=341
'TRAILING'=342
'TRANSACTION'=343
'TRANSACTIONAL'=344
'TRANSACTIONS'=345
'TRANSFORM'=346
'TRIGGER'=347
'TRIM'=348
'TRUE'=349
'TRUNCATE'=350
'TYPE'=351
'UNARCHIVE'=352
'UNBOUNDED'=353
'UNDO'=354
'UNION'=355
'UNIONTYPE'=356
'UNIQUE'=357
'UNIQUEJOIN'=358
'UNKNOWN'=359
'UNLOCK'=360
'UNMANAGED'=361
'UNSET'=362
'UNSIGNED'=363
'UPDATE'=364
'URI'=365
'URL'=366
'USE'=367
'USER'=368
'USING'=369
'UTC'=370
'UTC_TMESTAMP'=371
'VALIDATE'=372
'VALUES'=373
'$VALUE$'=374
'VARCHAR'=375
'VECTORIZATION'=376
'VIEW'=377
'VIEWS'=378
'WAIT'=379
'WEEK'=380
'WEEKS'=381
'WHEN'=382
'WHERE'=383
'WHILE'=384
'WINDOW'=385
'WITH'=386
'WITHIN'=387
'WORK'=388
'WORKLOAD'=389
'WRITE'=390
'YEAR'=391
'YEARS'=392
'ZONE'=393
'.'=394
':'=395
','=396
';'=397
'('=398
')'=399
'['=400
']'=401
'{'=402
'}'=403
'<=>'=405
'<='=407
'<'=408
'>='=409
'>'=410
'/'=411
'+'=412
'-'=413
'*'=414
'%'=415
'DIV'=416
'!'=417
'&'=418
'~'=419
'|'=420
'||'=421
'^'=422
'?'=423
'$'=424