/*
T-SQL (Transact-SQL, MSSQL) grammar.
The MIT License (MIT).
Copyright (c) 2017, Mark Adams (madams51703@gmail.com)
Copyright (c) 2015-2017, Ivan Kochurkin (kvanttt@gmail.com), Positive Technologies.
Copyright (c) 2016, Scott Ure (scott@redstormsoftware.com).
Copyright (c) 2016, Rui Zhang (ruizhang.ccs@gmail.com).
Copyright (c) 2016, Marcus Henriksson (kuseman80@gmail.com).
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

// =================================================================================
// Please reformat the grammr file before a change commit. See remorph/core/README.md
// For formatting, see: https://github.com/mike-lischke/antlr-format/blob/main/doc/formatting.md

// $antlr-format alignTrailingComments true
// $antlr-format columnLimit 150
// $antlr-format maxEmptyLinesToKeep 1
// $antlr-format reflowComments false
// $antlr-format useTab false
// $antlr-format allowShortRulesOnASingleLine true
// $antlr-format allowShortBlocksOnASingleLine true
// $antlr-format minEmptyLines 0
// $antlr-format alignSemicolons ownLine
// $antlr-format alignColons trailing
// $antlr-format singleLineOverrulesHangingColon true
// $antlr-format alignLexerCommands true
// $antlr-format alignLabels true
// $antlr-format alignTrailers true
// =================================================================================
lexer grammar TSqlLexer;

// Basic keywords (from https://msdn.microsoft.com/en-us/library/ms189822.aspx)

options {
    caseInsensitive = true;
}

//Keywords that can exist in ID etc
//More keywords that can also be used as IDs
ABORT                                       : 'ABORT';
ABORT_AFTER_WAIT                            : 'ABORT_AFTER_WAIT';
ABSENT                                      : 'ABSENT';
ABSOLUTE                                    : 'ABSOLUTE';
ACCELERATED_DATABASE_RECOVERY               : 'ACCELERATED_DATABASE_RECOVERY';
ACCENT_SENSITIVITY                          : 'ACCENT_SENSITIVITY';
ACCESS                                      : 'ACCESS';
ACTION                                      : 'ACTION';
ACTIVATION                                  : 'ACTIVATION';
ACTIVE                                      : 'ACTIVE';
ADD                                         : 'ADD';
ADDRESS                                     : 'ADDRESS';
ADMINISTER                                  : 'ADMINISTER';
AES                                         : 'AES';
AES_128                                     : 'AES_128';
AES_192                                     : 'AES_192';
AES_256                                     : 'AES_256';
AFFINITY                                    : 'AFFINITY';
AFTER                                       : 'AFTER';
AGGREGATE                                   : 'AGGREGATE';
ALGORITHM                                   : 'ALGORITHM';
ALL                                         : 'ALL';
ALLOWED                                     : 'ALLOWED';
ALLOW_CONNECTIONS                           : 'ALLOW_CONNECTIONS';
ALLOW_ENCRYPTED_VALUE_MODIFICATIONS         : 'ALLOW_ENCRYPTED_VALUE_MODIFICATIONS';
ALLOW_MULTIPLE_EVENT_LOSS                   : 'ALLOW_MULTIPLE_EVENT_LOSS';
ALLOW_PAGE_LOCKS                            : 'ALLOW_PAGE_LOCKS';
ALLOW_ROW_LOCKS                             : 'ALLOW_ROW_LOCKS';
ALLOW_SINGLE_EVENT_LOSS                     : 'ALLOW_SINGLE_EVENT_LOSS';
ALLOW_SNAPSHOT_ISOLATION                    : 'ALLOW_SNAPSHOT_ISOLATION';
ALL_CONSTRAINTS                             : 'ALL_CONSTRAINTS';
ALL_ERRORMSGS                               : 'ALL_ERRORMSGS';
ALL_INDEXES                                 : 'ALL_INDEXES';
ALL_LEVELS                                  : 'ALL_LEVELS';
ALTER                                       : 'ALTER';
ALWAYS                                      : 'ALWAYS';
AND                                         : 'AND';
ANONYMOUS                                   : 'ANONYMOUS';
ANSI_DEFAULTS                               : 'ANSI_DEFAULTS';
ANSI_NULLS                                  : 'ANSI_NULLS';
ANSI_NULL_DEFAULT                           : 'ANSI_NULL_DEFAULT';
ANSI_NULL_DFLT_OFF                          : 'ANSI_NULL_DFLT_OFF';
ANSI_NULL_DFLT_ON                           : 'ANSI_NULL_DFLT_ON';
ANSI_PADDING                                : 'ANSI_PADDING';
ANSI_WARNINGS                               : 'ANSI_WARNINGS';
ANY                                         : 'ANY';
APPEND                                      : 'APPEND';
APPLICATION                                 : 'APPLICATION';
APPLICATION_LOG                             : 'APPLICATION_LOG';
APPLY                                       : 'APPLY';
ARITHABORT                                  : 'ARITHABORT';
ARITHIGNORE                                 : 'ARITHIGNORE';
AS                                          : 'AS';
ASC                                         : 'ASC';
ASSEMBLY                                    : 'ASSEMBLY';
ASYMMETRIC                                  : 'ASYMMETRIC';
ASYNCHRONOUS_COMMIT                         : 'ASYNCHRONOUS_COMMIT';
AT_KEYWORD                                  : 'AT';
AUDIT                                       : 'AUDIT';
AUDIT_GUID                                  : 'AUDIT_GUID';
AUTHENTICATE                                : 'AUTHENTICATE';
AUTHENTICATION                              : 'AUTHENTICATION';
AUTHORIZATION                               : 'AUTHORIZATION';
AUTO                                        : 'AUTO';
AUTOGROW_ALL_FILES                          : 'AUTOGROW_ALL_FILES';
AUTOGROW_SINGLE_FILE                        : 'AUTOGROW_SINGLE_FILE';
AUTOMATED_BACKUP_PREFERENCE                 : 'AUTOMATED_BACKUP_PREFERENCE';
AUTOMATIC                                   : 'AUTOMATIC';
AUTO_CLEANUP                                : 'AUTO_CLEANUP';
AUTO_CLOSE                                  : 'AUTO_CLOSE';
AUTO_CREATE_STATISTICS                      : 'AUTO_CREATE_STATISTICS';
AUTO_DROP                                   : 'AUTO_DROP';
AUTO_SHRINK                                 : 'AUTO_SHRINK';
AUTO_UPDATE_STATISTICS                      : 'AUTO_UPDATE_STATISTICS';
AUTO_UPDATE_STATISTICS_ASYNC                : 'AUTO_UPDATE_STATISTICS_ASYNC';
AVAILABILITY                                : 'AVAILABILITY';
AVAILABILITY_MODE                           : 'AVAILABILITY_MODE';
BACKUP                                      : 'BACKUP';
BACKUP_CLONEDB                              : 'BACKUP_CLONEDB';
BACKUP_PRIORITY                             : 'BACKUP_PRIORITY';
BASE64                                      : 'BASE64';
BEFORE                                      : 'BEFORE';
BEGIN                                       : 'BEGIN';
BEGIN_DIALOG                                : 'BEGIN_DIALOG';
BETWEEN                                     : 'BETWEEN';
BIGINT                                      : 'BIGINT';
BINARY_KEYWORD                              : 'BINARY';
BINDING                                     : 'BINDING';
BLOB_STORAGE                                : 'BLOB_STORAGE';
BLOCK                                       : 'BLOCK';
BLOCKERS                                    : 'BLOCKERS';
BLOCKSIZE                                   : 'BLOCKSIZE';
BREAK                                       : 'BREAK';
BROKER                                      : 'BROKER';
BROKER_INSTANCE                             : 'BROKER_INSTANCE';
BROWSE                                      : 'BROWSE';
BUFFER                                      : 'BUFFER';
BUFFERCOUNT                                 : 'BUFFERCOUNT';
BULK                                        : 'BULK';
BULK_LOGGED                                 : 'BULK_LOGGED';
BY                                          : 'BY';
CACHE                                       : 'CACHE';
CALLED                                      : 'CALLED';
CALLER                                      : 'CALLER';
CAP_CPU_PERCENT                             : 'CAP_CPU_PERCENT';
CASCADE                                     : 'CASCADE';
CASE                                        : 'CASE';
CAST                                        : 'CAST';
CATALOG                                     : 'CATALOG';
CATCH                                       : 'CATCH';
CERTIFICATE                                 : 'CERTIFICATE';
CHANGE                                      : 'CHANGE';
CHANGES                                     : 'CHANGES';
CHANGETABLE                                 : 'CHANGETABLE';
CHANGE_RETENTION                            : 'CHANGE_RETENTION';
CHANGE_TRACKING                             : 'CHANGE_TRACKING';
CHECK                                       : 'CHECK';
CHECKALLOC                                  : 'CHECKALLOC';
CHECKCATALOG                                : 'CHECKCATALOG';
CHECKCONSTRAINTS                            : 'CHECKCONSTRAINTS';
CHECKDB                                     : 'CHECKDB';
CHECKFILEGROUP                              : 'CHECKFILEGROUP';
CHECKPOINT                                  : 'CHECKPOINT';
CHECKTABLE                                  : 'CHECKTABLE';
CHECK_EXPIRATION                            : 'CHECK_EXPIRATION';
CHECK_POLICY                                : 'CHECK_POLICY';
CHECKSUM                                    : 'CHECKSUM';
CLASSIFIER_FUNCTION                         : 'CLASSIFIER_FUNCTION';
CLEANTABLE                                  : 'CLEANTABLE';
CLEANUP                                     : 'CLEANUP';
CLONEDATABASE                               : 'CLONEDATABASE';
CLOSE                                       : 'CLOSE';
CLUSTER                                     : 'CLUSTER';
CLUSTERED                                   : 'CLUSTERED';
COLLATE                                     : 'COLLATE';
COLLECTION                                  : 'COLLECTION';
COLUMN                                      : 'COLUMN';
COLUMNS                                     : 'COLUMNS';
COLUMNSTORE                                 : 'COLUMNSTORE';
COLUMNSTORE_ARCHIVE                         : 'COLUMNSTORE_ARCHIVE';
COLUMN_ENCRYPTION_KEY                       : 'COLUMN_ENCRYPTION_KEY';
COLUMN_MASTER_KEY                           : 'COLUMN_MASTER_KEY';
COMMIT                                      : 'COMMIT';
COMMITTED                                   : 'COMMITTED';
COMPATIBILITY_LEVEL                         : 'COMPATIBILITY_LEVEL';
COMPRESSION                                 : 'COMPRESSION';
COMPRESSION_DELAY                           : 'COMPRESSION_DELAY';
COMPRESS_ALL_ROW_GROUPS                     : 'COMPRESS_ALL_ROW_GROUPS';
COMPUTE                                     : 'COMPUTE';
CONCAT                                      : 'CONCAT';
CONCAT_NULL_YIELDS_NULL                     : 'CONCAT_NULL_YIELDS_NULL';
CONFIGURATION                               : 'CONFIGURATION';
CONNECT                                     : 'CONNECT';
CONNECTION                                  : 'CONNECTION';
CONSTRAINT                                  : 'CONSTRAINT';
CONTAINMENT                                 : 'CONTAINMENT';
CONTAINS                                    : 'CONTAINS';
CONTAINSTABLE                               : 'CONTAINSTABLE';
CONTENT                                     : 'CONTENT';
CONTEXT                                     : 'CONTEXT';
CONTINUE                                    : 'CONTINUE';
CONTINUE_AFTER_ERROR                        : 'CONTINUE_AFTER_ERROR';
CONTRACT                                    : 'CONTRACT';
CONTRACT_NAME                               : 'CONTRACT_NAME';
CONTROL                                     : 'CONTROL';
CONVERSATION                                : 'CONVERSATION';
COOKIE                                      : 'COOKIE';
COPY_ONLY                                   : 'COPY_ONLY';
COUNTER                                     : 'COUNTER';
CPU                                         : 'CPU';
CREATE                                      : 'CREATE';
CREATE_NEW                                  : 'CREATE_NEW';
CREATION_DISPOSITION                        : 'CREATION_DISPOSITION';
CREDENTIAL                                  : 'CREDENTIAL';
CROSS                                       : 'CROSS';
CRYPTOGRAPHIC                               : 'CRYPTOGRAPHIC';
CURRENT                                     : 'CURRENT';
CURRENT_TIME                                : 'CURRENT_TIME';
CURSOR                                      : 'CURSOR';
CURSOR_CLOSE_ON_COMMIT                      : 'CURSOR_CLOSE_ON_COMMIT';
CURSOR_DEFAULT                              : 'CURSOR_DEFAULT';
CYCLE                                       : 'CYCLE';
DATA                                        : 'DATA';
DATABASE                                    : 'DATABASE';
DATABASE_MIRRORING                          : 'DATABASE_MIRRORING';
DATASPACE                                   : 'DATASPACE';
DATA_COMPRESSION                            : 'DATA_COMPRESSION';
DATA_PURITY                                 : 'DATA_PURITY';
DATA_SOURCE                                 : 'DATA_SOURCE';
DATE_CORRELATION_OPTIMIZATION               : 'DATE_CORRELATION_OPTIMIZATION';
DAYS                                        : 'DAYS';
DBCC                                        : 'DBCC';
DBREINDEX                                   : 'DBREINDEX';
DB_CHAINING                                 : 'DB_CHAINING';
DB_FAILOVER                                 : 'DB_FAILOVER';
DDL                                         : 'DDL';
DEALLOCATE                                  : 'DEALLOCATE';
DECLARE                                     : 'DECLARE';
DECRYPTION                                  : 'DECRYPTION';
DEFAULT                                     : 'DEFAULT';
DEFAULT_DATABASE                            : 'DEFAULT_DATABASE';
DEFAULT_DOUBLE_QUOTE                        : ["]'DEFAULT' ["];
DEFAULT_FULLTEXT_LANGUAGE                   : 'DEFAULT_FULLTEXT_LANGUAGE';
DEFAULT_LANGUAGE                            : 'DEFAULT_LANGUAGE';
DEFAULT_SCHEMA                              : 'DEFAULT_SCHEMA';
DEFINITION                                  : 'DEFINITION';
DELAY                                       : 'DELAY';
DELAYED_DURABILITY                          : 'DELAYED_DURABILITY';
DELETE                                      : 'DELETE';
DELETED                                     : 'DELETED';
DENY                                        : 'DENY';
DEPENDENTS                                  : 'DEPENDENTS';
DES                                         : 'DES';
DESC                                        : 'DESC';
DESCRIPTION                                 : 'DESCRIPTION';
DESX                                        : 'DESX';
DETERMINISTIC                               : 'DETERMINISTIC';
DHCP                                        : 'DHCP';
DIAGNOSTICS                                 : 'DIAGNOSTICS';
DIALOG                                      : 'DIALOG';
DIFFERENTIAL                                : 'DIFFERENTIAL';
DIRECTORY_NAME                              : 'DIRECTORY_NAME';
DISABLE                                     : 'DISABLE';
DISABLED                                    : 'DISABLED';
DISABLE_BROKER                              : 'DISABLE_BROKER';
DISTINCT                                    : 'DISTINCT';
DISTRIBUTED                                 : 'DISTRIBUTED';
DISTRIBUTION                                : 'DISTRIBUTION';
DOCUMENT                                    : 'DOCUMENT';
DOLLAR_PARTITION                            : '$PARTITION';
DOUBLE                                      : 'DOUBLE';
DOUBLE_BACK_SLASH                           : '\\\\';
DOUBLE_FORWARD_SLASH                        : '//';
DROP                                        : 'DROP';
DROPCLEANBUFFERS                            : 'DROPCLEANBUFFERS';
DROP_EXISTING                               : 'DROP_EXISTING';
DTC_SUPPORT                                 : 'DTC_SUPPORT';
DYNAMIC                                     : 'DYNAMIC';
ELEMENTS                                    : 'ELEMENTS';
ELSE                                        : 'ELSE';
EMERGENCY                                   : 'EMERGENCY';
EMPTY                                       : 'EMPTY';
ENABLE                                      : 'ENABLE';
ENABLED                                     : 'ENABLED';
ENABLE_BROKER                               : 'ENABLE_BROKER';
ENCRYPTED                                   : 'ENCRYPTED';
ENCRYPTED_VALUE                             : 'ENCRYPTED_VALUE';
ENCRYPTION                                  : 'ENCRYPTION';
ENCRYPTION_TYPE                             : 'ENCRYPTION_TYPE';
END                                         : 'END';
ENDPOINT                                    : 'ENDPOINT';
ENDPOINT_URL                                : 'ENDPOINT_URL';
ERROR                                       : 'ERROR';
ERROR_BROKER_CONVERSATIONS                  : 'ERROR_BROKER_CONVERSATIONS';
ESCAPE                                      : 'ESCAPE';
ESTIMATEONLY                                : 'ESTIMATEONLY';
EVENT                                       : 'EVENT';
EVENT_RETENTION_MODE                        : 'EVENT_RETENTION_MODE';
EXCEPT                                      : 'EXCEPT';
EXCLUSIVE                                   : 'EXCLUSIVE';
EXECUTABLE                                  : 'EXECUTABLE';
EXECUTABLE_FILE                             : 'EXECUTABLE_FILE';
EXECUTE                                     : 'EXEC' 'UTE'?;
EXISTS                                      : 'EXISTS';
EXPIREDATE                                  : 'EXPIREDATE';
EXPIRY_DATE                                 : 'EXPIRY_DATE';
EXPLICIT                                    : 'EXPLICIT';
EXTENDED_LOGICAL_CHECKS                     : 'EXTENDED_LOGICAL_CHECKS';
EXTENSION                                   : 'EXTENSION';
EXTERNAL                                    : 'EXTERNAL';
EXTERNAL_ACCESS                             : 'EXTERNAL_ACCESS';
FAILOVER                                    : 'FAILOVER';
FAILOVER_MODE                               : 'FAILOVER_MODE';
FAILURE                                     : 'FAILURE';
FAILURECONDITIONLEVEL                       : 'FAILURECONDITIONLEVEL';
FAILURE_CONDITION_LEVEL                     : 'FAILURE_CONDITION_LEVEL';
FAIL_OPERATION                              : 'FAIL_OPERATION';
FAN_IN                                      : 'FAN_IN';
FAST_FORWARD                                : 'FAST_FORWARD';
FETCH                                       : 'FETCH';
FILE                                        : 'FILE';
FILEGROUP                                   : 'FILEGROUP';
FILEGROWTH                                  : 'FILEGROWTH';
FILENAME                                    : 'FILENAME';
FILEPATH                                    : 'FILEPATH';
FILESTREAM                                  : 'FILESTREAM';
FILESTREAM_ON                               : 'FILESTREAM_ON';
FILE_SNAPSHOT                               : 'FILE_SNAPSHOT';
FILLFACTOR                                  : 'FILLFACTOR';
FILTER                                      : 'FILTER';
FIRST                                       : 'FIRST';
FMTONLY                                     : 'FMTONLY';
FOLLOWING                                   : 'FOLLOWING';
FOR                                         : 'FOR';
FORCE                                       : 'FORCE';
FORCEPLAN                                   : 'FORCEPLAN';
FORCESCAN                                   : 'FORCESCAN';
FORCESEEK                                   : 'FORCESEEK';
FORCE_FAILOVER_ALLOW_DATA_LOSS              : 'FORCE_FAILOVER_ALLOW_DATA_LOSS';
FORCE_SERVICE_ALLOW_DATA_LOSS               : 'FORCE_SERVICE_ALLOW_DATA_LOSS';
FOREIGN                                     : 'FOREIGN';
FORWARD_ONLY                                : 'FORWARD_ONLY';
FORMAT                                      : 'FORMAT';
FREE                                        : 'FREE';
FREETEXT                                    : 'FREETEXT';
FREETEXTTABLE                               : 'FREETEXTTABLE';
FROM                                        : 'FROM';
FULL                                        : 'FULL';
FULLSCAN                                    : 'FULLSCAN';
FULLTEXT                                    : 'FULLTEXT';
FUNCTION                                    : 'FUNCTION';
GB                                          : 'GB';
GENERATED                                   : 'GENERATED';
GET                                         : 'GET';
GETROOT                                     : 'GETROOT';
GLOBAL                                      : 'GLOBAL';
GO                                          : 'GO';
GOTO                                        : 'GOTO';
GOVERNOR                                    : 'GOVERNOR';
GRANT                                       : 'GRANT';
GROUP                                       : 'GROUP';
GROUPING                                    : 'GROUPING';
GROUP_MAX_REQUESTS                          : 'GROUP_MAX_REQUESTS';
HADR                                        : 'HADR';
HASH                                        : 'HASH';
HASHED                                      : 'HASHED';
HAVING                                      : 'HAVING';
HEALTHCHECKTIMEOUT                          : 'HEALTHCHECKTIMEOUT';
HEALTH_CHECK_TIMEOUT                        : 'HEALTH_CHECK_TIMEOUT';
HEAP                                        : 'HEAP';
HIDDEN_KEYWORD                              : 'HIDDEN';
HIERARCHYID                                 : 'HIERARCHYID';
HIGH                                        : 'HIGH';
HOLDLOCK                                    : 'HOLDLOCK';
HONOR_BROKER_PRIORITY                       : 'HONOR_BROKER_PRIORITY';
HOURS                                       : 'HOURS';
IDENTITY                                    : 'IDENTITY';
IDENTITY_INSERT                             : 'IDENTITY_INSERT';
IDENTITY_VALUE                              : 'IDENTITY_VALUE';
IF                                          : 'IF';
IGNORE                                      : 'IGNORE';
IGNORE_CONSTRAINTS                          : 'IGNORE_CONSTRAINTS';
IGNORE_DUP_KEY                              : 'IGNORE_DUP_KEY';
IGNORE_REPLICATED_TABLE_CACHE               : 'IGNORE_REPLICATED_TABLE_CACHE';
IGNORE_TRIGGERS                             : 'IGNORE_TRIGGERS';
IIF                                         : 'IIF';
IMMEDIATE                                   : 'IMMEDIATE';
IMPERSONATE                                 : 'IMPERSONATE';
IMPLICIT_TRANSACTIONS                       : 'IMPLICIT_TRANSACTIONS';
IMPORTANCE                                  : 'IMPORTANCE';
IN                                          : 'IN';
INCLUDE                                     : 'INCLUDE';
INCLUDE_NULL_VALUES                         : 'INCLUDE_NULL_VALUES';
INCREMENT                                   : 'INCREMENT';
INCREMENTAL                                 : 'INCREMENTAL';
INDEX                                       : 'INDEX';
INFINITE                                    : 'INFINITE';
INIT                                        : 'INIT';
INITIATOR                                   : 'INITIATOR';
INNER                                       : 'INNER';
INPUT                                       : 'INPUT';
INSENSITIVE                                 : 'INSENSITIVE';
INSERT                                      : 'INSERT';
INSERTED                                    : 'INSERTED';
INSTEAD                                     : 'INSTEAD';
KWINT                                       : 'INT';
INTERSECT                                   : 'INTERSECT';
INTO                                        : 'INTO';
IO                                          : 'IO';
IP                                          : 'IP';
IS                                          : 'IS';
ISOLATION                                   : 'ISOLATION';
JOB                                         : 'JOB';
JOIN                                        : 'JOIN';
JSON                                        : 'JSON';
JSON_ARRAY                                  : 'JSON_ARRAY';
JSON_OBJECT                                 : 'JSON_OBJECT';
KB                                          : 'KB';
KEEPDEFAULTS                                : 'KEEPDEFAULTS';
KEEPIDENTITY                                : 'KEEPIDENTITY';
KERBEROS                                    : 'KERBEROS';
KEY                                         : 'KEY';
KEYS                                        : 'KEYS';
KEYSET                                      : 'KEYSET';
KEY_PATH                                    : 'KEY_PATH';
KEY_SOURCE                                  : 'KEY_SOURCE';
KEY_STORE_PROVIDER_NAME                     : 'KEY_STORE_PROVIDER_NAME';
KILL                                        : 'KILL';
LANGUAGE                                    : 'LANGUAGE';
LAST                                        : 'LAST';
LEFT                                        : 'LEFT';
LEVEL                                       : 'LEVEL';
LIBRARY                                     : 'LIBRARY';
LIFETIME                                    : 'LIFETIME';
LIKE                                        : 'LIKE';
LINKED                                      : 'LINKED';
LINUX                                       : 'LINUX';
LIST                                        : 'LIST';
LISTENER                                    : 'LISTENER';
LISTENER_IP                                 : 'LISTENER_IP';
LISTENER_PORT                               : 'LISTENER_PORT';
LISTENER_URL                                : 'LISTENER_URL';
LOB_COMPACTION                              : 'LOB_COMPACTION';
LOCAL                                       : 'LOCAL';
LOCAL_SERVICE_NAME                          : 'LOCAL_SERVICE_NAME';
LOCATION                                    : 'LOCATION';
LOCK                                        : 'LOCK';
LOCK_ESCALATION                             : 'LOCK_ESCALATION';
LOGIN                                       : 'LOGIN';
LOOP                                        : 'LOOP';
LOW                                         : 'LOW';
MANUAL                                      : 'MANUAL';
MARK                                        : 'MARK';
MASK                                        : 'MASK';
MASKED                                      : 'MASKED';
MASTER                                      : 'MASTER';
MATCHED                                     : 'MATCHED';
MATERIALIZED                                : 'MATERIALIZED';
MAX                                         : 'MAX';
MAXSIZE                                     : 'MAXSIZE';
MAXTRANSFER                                 : 'MAXTRANSFER';
MAXVALUE                                    : 'MAXVALUE';
MAX_CPU_PERCENT                             : 'MAX_CPU_PERCENT';
MAX_DISPATCH_LATENCY                        : 'MAX_DISPATCH_LATENCY';
MAX_DOP                                     : 'MAX_DOP';
MAX_DURATION                                : 'MAX_DURATION';
MAX_EVENT_SIZE                              : 'MAX_EVENT_SIZE';
MAX_FILES                                   : 'MAX_FILES';
MAX_IOPS_PER_VOLUME                         : 'MAX_IOPS_PER_VOLUME';
MAX_MEMORY                                  : 'MAX_MEMORY';
MAX_MEMORY_PERCENT                          : 'MAX_MEMORY_PERCENT';
MAX_OUTSTANDING_IO_PER_VOLUME               : 'MAX_OUTSTANDING_IO_PER_VOLUME';
MAX_PROCESSES                               : 'MAX_PROCESSES';
MAX_QUEUE_READERS                           : 'MAX_QUEUE_READERS';
MAX_ROLLOVER_FILES                          : 'MAX_ROLLOVER_FILES';
MAX_SIZE                                    : 'MAX_SIZE';
MB                                          : 'MB';
MEDIADESCRIPTION                            : 'MEDIADESCRIPTION';
MEDIANAME                                   : 'MEDIANAME';
MEDIUM                                      : 'MEDIUM';
MEMBER                                      : 'MEMBER';
MEMORY_OPTIMIZED_DATA                       : 'MEMORY_OPTIMIZED_DATA';
MEMORY_PARTITION_MODE                       : 'MEMORY_PARTITION_MODE';
MERGE                                       : 'MERGE';
MESSAGE                                     : 'MESSAGE';
MESSAGE_FORWARDING                          : 'MESSAGE_FORWARDING';
MESSAGE_FORWARD_SIZE                        : 'MESSAGE_FORWARD_SIZE';
MINUTES                                     : 'MINUTES';
MINVALUE                                    : 'MINVALUE';
MIN_CPU_PERCENT                             : 'MIN_CPU_PERCENT';
MIN_IOPS_PER_VOLUME                         : 'MIN_IOPS_PER_VOLUME';
MIN_MEMORY_PERCENT                          : 'MIN_MEMORY_PERCENT';
MIRROR                                      : 'MIRROR';
MIRROR_ADDRESS                              : 'MIRROR_ADDRESS';
MIXED_PAGE_ALLOCATION                       : 'MIXED_PAGE_ALLOCATION';
MODE                                        : 'MODE';
MODIFY                                      : 'MODIFY';
MOVE                                        : 'MOVE';
MULTI_USER                                  : 'MULTI_USER';
MUST_CHANGE                                 : 'MUST_CHANGE';
NAME                                        : 'NAME';
NEGOTIATE                                   : 'NEGOTIATE';
NESTED_TRIGGERS                             : 'NESTED_TRIGGERS';
NEWNAME                                     : 'NEWNAME';
NEW_ACCOUNT                                 : 'NEW_ACCOUNT';
NEW_BROKER                                  : 'NEW_BROKER';
NEW_PASSWORD                                : 'NEW_PASSWORD';
NEXT                                        : 'NEXT';
NO                                          : 'NO';
NOCHECK                                     : 'NOCHECK';
NOCOUNT                                     : 'NOCOUNT';
NODES                                       : 'NODES';
NOEXEC                                      : 'NOEXEC';
NOEXPAND                                    : 'NOEXPAND';
NOFORMAT                                    : 'NOFORMAT';
NOHOLDLOCK                                  : 'NOHOLDLOCK';
NOINDEX                                     : 'NOINDEX';
NOINIT                                      : 'NOINIT';
NOLOCK                                      : 'NOLOCK';
NONCLUSTERED                                : 'NONCLUSTERED';
NONE                                        : 'NONE';
NON_TRANSACTED_ACCESS                       : 'NON_TRANSACTED_ACCESS';
NORECOMPUTE                                 : 'NORECOMPUTE';
NORECOVERY                                  : 'NORECOVERY';
NOREWIND                                    : 'NOREWIND';
NOSKIP                                      : 'NOSKIP';
NOT                                         : 'NOT';
NOTIFICATION                                : 'NOTIFICATION';
NOTIFICATIONS                               : 'NOTIFICATIONS';
NOUNLOAD                                    : 'NOUNLOAD';
NO_CHECKSUM                                 : 'NO_CHECKSUM';
NO_COMPRESSION                              : 'NO_COMPRESSION';
NO_EVENT_LOSS                               : 'NO_EVENT_LOSS';
NO_INFOMSGS                                 : 'NO_INFOMSGS';
NO_QUERYSTORE                               : 'NO_QUERYSTORE';
NO_STATISTICS                               : 'NO_STATISTICS';
NO_TRUNCATE                                 : 'NO_TRUNCATE';
NO_WAIT                                     : 'NO_WAIT';
NTILE                                       : 'NTILE';
NTLM                                        : 'NTLM';
NULL_                                       : 'NULL';
NULLS                                       : 'NULLS';
NUMANODE                                    : 'NUMANODE';
NUMBER                                      : 'NUMBER';
NUMERIC_ROUNDABORT                          : 'NUMERIC_ROUNDABORT';
OBJECT                                      : 'OBJECT';
OF                                          : 'OF';
OFF                                         : 'OFF';
OFFLINE                                     : 'OFFLINE';
OFFSET                                      : 'OFFSET';
OLD_ACCOUNT                                 : 'OLD_ACCOUNT';
OLD_PASSWORD                                : 'OLD_PASSWORD';
ON                                          : 'ON';
ONLINE                                      : 'ONLINE';
ONLY                                        : 'ONLY';
ON_FAILURE                                  : 'ON_FAILURE';
OPEN                                        : 'OPEN';
OPENDATASOURCE                              : 'OPENDATASOURCE';
OPENJSON                                    : 'OPENJSON';
OPENQUERY                                   : 'OPENQUERY';
OPENROWSET                                  : 'OPENROWSET';
OPENXML                                     : 'OPENXML';
OPEN_EXISTING                               : 'OPEN_EXISTING';
OPERATIONS                                  : 'OPERATIONS';
OPTIMISTIC                                  : 'OPTIMISTIC';
OPTION                                      : 'OPTION';
OR                                          : 'OR';
ORDER                                       : 'ORDER';
OUT                                         : 'OUT';
OUTER                                       : 'OUTER';
OUTPUT                                      : 'OUTPUT';
OVER                                        : 'OVER';
OVERRIDE                                    : 'OVERRIDE';
OWNER                                       : 'OWNER';
OWNERSHIP                                   : 'OWNERSHIP';
PAD_INDEX                                   : 'PAD_INDEX';
PAGE                                        : 'PAGE';
PAGECOUNT                                   : 'PAGECOUNT';
PAGE_VERIFY                                 : 'PAGE_VERIFY';
PAGLOCK                                     : 'PAGLOCK';
PARAMETERIZATION                            : 'PARAMETERIZATION';
PARAM_NODE                                  : 'PARAM_NODE';
PARSE                                       : 'PARSE';
PARSEONLY                                   : 'PARSEONLY';
PARTIAL                                     : 'PARTIAL';
PARTITION                                   : 'PARTITION';
PARTITIONS                                  : 'PARTITIONS';
PARTNER                                     : 'PARTNER';
PASSWORD                                    : 'PASSWORD';
PATH                                        : 'PATH';
PAUSE                                       : 'PAUSE';
PDW_SHOWSPACEUSED                           : 'PDW_SHOWSPACEUSED';
PERCENT                                     : 'PERCENT';
PERMISSION_SET                              : 'PERMISSION_SET';
PERSISTED                                   : 'PERSISTED';
PERSIST_SAMPLE_PERCENT                      : 'PERSIST_SAMPLE_PERCENT';
PER_CPU                                     : 'PER_CPU';
PER_DB                                      : 'PER_DB';
PER_NODE                                    : 'PER_NODE';
PHYSICAL_ONLY                               : 'PHYSICAL_ONLY';
PIVOT                                       : 'PIVOT';
PLATFORM                                    : 'PLATFORM';
POISON_MESSAGE_HANDLING                     : 'POISON_MESSAGE_HANDLING';
POLICY                                      : 'POLICY';
POOL                                        : 'POOL';
PORT                                        : 'PORT';
PRECEDING                                   : 'PRECEDING';
PRECISION                                   : 'PRECISION';
PREDICATE                                   : 'PREDICATE';
PRIMARY                                     : 'PRIMARY';
PRIMARY_ROLE                                : 'PRIMARY_ROLE';
PRINT                                       : 'PRINT';
PRIOR                                       : 'PRIOR';
PRIORITY                                    : 'PRIORITY';
PRIORITY_LEVEL                              : 'PRIORITY_LEVEL';
PRIVATE                                     : 'PRIVATE';
PRIVATE_KEY                                 : 'PRIVATE_KEY';
PRIVILEGES                                  : 'PRIVILEGES';
PROC                                        : 'PROC';
PROCCACHE                                   : 'PROCCACHE';
PROCEDURE                                   : 'PROCEDURE';
PROCEDURE_NAME                              : 'PROCEDURE_NAME';
PROCESS                                     : 'PROCESS';
PROFILE                                     : 'PROFILE';
PROPERTY                                    : 'PROPERTY';
PROVIDER                                    : 'PROVIDER';
PROVIDER_KEY_NAME                           : 'PROVIDER_KEY_NAME';
PUBLIC                                      : 'PUBLIC';
PYTHON                                      : 'PYTHON';
QUERY                                       : 'QUERY';
QUEUE                                       : 'QUEUE';
QUEUE_DELAY                                 : 'QUEUE_DELAY';
QUOTED_IDENTIFIER                           : 'QUOTED_IDENTIFIER';
R                                           : 'R';
RAISERROR                                   : 'RAISERROR';
RANDOMIZED                                  : 'RANDOMIZED';
RANGE                                       : 'RANGE';
RAW                                         : 'RAW';
RC2                                         : 'RC2';
RC4                                         : 'RC4';
RC4_128                                     : 'RC4_128';
READ                                        : 'READ';
READCOMMITTED                               : 'READCOMMITTED';
READCOMMITTEDLOCK                           : 'READCOMMITTEDLOCK';
READONLY                                    : 'READONLY';
READPAST                                    : 'READPAST';
READUNCOMMITTED                             : 'READUNCOMMITTED';
READWRITE                                   : 'READWRITE';
READ_COMMITTED_SNAPSHOT                     : 'READ_COMMITTED_SNAPSHOT';
READ_ONLY                                   : 'READ_ONLY';
READ_ONLY_ROUTING_LIST                      : 'READ_ONLY_ROUTING_LIST';
READ_WRITE                                  : 'READ_WRITE';
READ_WRITE_FILEGROUPS                       : 'READ_WRITE_FILEGROUPS';
REBUILD                                     : 'REBUILD';
RECEIVE                                     : 'RECEIVE';
RECONFIGURE                                 : 'RECONFIGURE';
RECOVERY                                    : 'RECOVERY';
RECURSIVE_TRIGGERS                          : 'RECURSIVE_TRIGGERS';
REFERENCES                                  : 'REFERENCES';
REGENERATE                                  : 'REGENERATE';
RELATED_CONVERSATION                        : 'RELATED_CONVERSATION';
RELATED_CONVERSATION_GROUP                  : 'RELATED_CONVERSATION_GROUP';
RELATIVE                                    : 'RELATIVE';
REMOTE                                      : 'REMOTE';
REMOTE_PROC_TRANSACTIONS                    : 'REMOTE_PROC_TRANSACTIONS';
REMOTE_SERVICE_NAME                         : 'REMOTE_SERVICE_NAME';
REMOVE                                      : 'REMOVE';
REORGANIZE                                  : 'REORGANIZE';
REPAIR_ALLOW_DATA_LOSS                      : 'REPAIR_ALLOW_DATA_LOSS';
REPAIR_FAST                                 : 'REPAIR_FAST';
REPAIR_REBUILD                              : 'REPAIR_REBUILD';
REPEATABLE                                  : 'REPEATABLE';
REPEATABLEREAD                              : 'REPEATABLEREAD';
REPLACE                                     : 'REPLACE';
REPLICA                                     : 'REPLICA';
REPLICATE                                   : 'REPLICATE';
REPLICATION                                 : 'REPLICATION';
REQUEST_MAX_CPU_TIME_SEC                    : 'REQUEST_MAX_CPU_TIME_SEC';
REQUEST_MAX_MEMORY_GRANT_PERCENT            : 'REQUEST_MAX_MEMORY_GRANT_PERCENT';
REQUEST_MEMORY_GRANT_TIMEOUT_SEC            : 'REQUEST_MEMORY_GRANT_TIMEOUT_SEC';
REQUIRED                                    : 'REQUIRED';
REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT : 'REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT';
RESAMPLE                                    : 'RESAMPLE';
RESERVE_DISK_SPACE                          : 'RESERVE_DISK_SPACE';
RESET                                       : 'RESET';
RESOURCE                                    : 'RESOURCE';
RESOURCES                                   : 'RESOURCES';
RESOURCE_MANAGER_LOCATION                   : 'RESOURCE_MANAGER_LOCATION';
RESPECT                                     : 'RESPECT';
RESTART                                     : 'RESTART';
RESTRICTED_USER                             : 'RESTRICTED_USER';
RESUMABLE                                   : 'RESUMABLE';
RESUME                                      : 'RESUME';
RETAINDAYS                                  : 'RETAINDAYS';
RETENTION                                   : 'RETENTION';
RETURN                                      : 'RETURN';
RETURNS                                     : 'RETURNS';
REVERT                                      : 'REVERT';
REVOKE                                      : 'REVOKE';
REWIND                                      : 'REWIND';
RIGHT                                       : 'RIGHT';
ROLE                                        : 'ROLE';
ROLLBACK                                    : 'ROLLBACK';
ROOT                                        : 'ROOT';
ROUND_ROBIN                                 : 'ROUND_ROBIN';
ROUTE                                       : 'ROUTE';
ROW                                         : 'ROW';
ROWCOUNT                                    : 'ROWCOUNT';
ROWGUID                                     : 'ROWGUID';
ROWGUIDCOL                                  : 'ROWGUIDCOL';
ROWLOCK                                     : 'ROWLOCK';
ROWS                                        : 'ROWS';
RSA_1024                                    : 'RSA_1024';
RSA_2048                                    : 'RSA_2048';
RSA_3072                                    : 'RSA_3072';
RSA_4096                                    : 'RSA_4096';
RSA_512                                     : 'RSA_512';
RULE                                        : 'RULE';
SAFE                                        : 'SAFE';
SAFETY                                      : 'SAFETY';
SAMPLE                                      : 'SAMPLE';
SAVE                                        : 'SAVE';
SCHEDULER                                   : 'SCHEDULER';
SCHEMA                                      : 'SCHEMA';
SCHEMABINDING                               : 'SCHEMABINDING';
SCHEME                                      : 'SCHEME';
SCOPED                                      : 'SCOPED';
SCRIPT                                      : 'SCRIPT';
SCROLL                                      : 'SCROLL';
SCROLL_LOCKS                                : 'SCROLL_LOCKS';
SEARCH                                      : 'SEARCH';
SECONDARY                                   : 'SECONDARY';
SECONDARY_ONLY                              : 'SECONDARY_ONLY';
SECONDARY_ROLE                              : 'SECONDARY_ROLE';
SECONDS                                     : 'SECONDS';
SECRET                                      : 'SECRET';
SECURABLES                                  : 'SECURABLES';
SECURITY                                    : 'SECURITY';
SECURITY_LOG                                : 'SECURITY_LOG';
SEEDING_MODE                                : 'SEEDING_MODE';
SELECT                                      : 'SELECT';
SELF                                        : 'SELF';
SEMANTICKEYPHRASETABLE                      : 'SEMANTICKEYPHRASETABLE';
SEMANTICSIMILARITYDETAILSTABLE              : 'SEMANTICSIMILARITYDETAILSTABLE';
SEMANTICSIMILARITYTABLE                     : 'SEMANTICSIMILARITYTABLE';
SEMI_SENSITIVE                              : 'SEMI_SENSITIVE';
SEND                                        : 'SEND';
SENT                                        : 'SENT';
SEQUENCE                                    : 'SEQUENCE';
SEQUENCE_NUMBER                             : 'SEQUENCE_NUMBER';
SERIALIZABLE                                : 'SERIALIZABLE';
SERVER                                      : 'SERVER';
SERVICE                                     : 'SERVICE';
SERVICEBROKER                               : 'SERVICEBROKER';
SERVICE_BROKER                              : 'SERVICE_BROKER';
SERVICE_NAME                                : 'SERVICE_NAME';
SESSION                                     : 'SESSION';
SESSION_TIMEOUT                             : 'SESSION_TIMEOUT';
SESSION_USER                                : 'SESSION_USER';
SET                                         : 'SET';
SETS                                        : 'SETS';
SETTINGS                                    : 'SETTINGS';
SETUSER                                     : 'SETUSER';
SHARE                                       : 'SHARE';
SHARED                                      : 'SHARED';
SHOWCONTIG                                  : 'SHOWCONTIG';
SHOWPLAN                                    : 'SHOWPLAN';
SHOWPLAN_ALL                                : 'SHOWPLAN_ALL';
SHOWPLAN_TEXT                               : 'SHOWPLAN_TEXT';
SHOWPLAN_XML                                : 'SHOWPLAN_XML';
SHRINKLOG                                   : 'SHRINKLOG';
SHUTDOWN                                    : 'SHUTDOWN';
SID                                         : 'SID';
SIGNATURE                                   : 'SIGNATURE';
SINGLE_USER                                 : 'SINGLE_USER';
SIZE                                        : 'SIZE';
SKIP_KEYWORD                                : 'SKIP';
SMALLINT                                    : 'SMALLINT';
SNAPSHOT                                    : 'SNAPSHOT';
SOFTNUMA                                    : 'SOFTNUMA';
SOME                                        : 'SOME';
SORT_IN_TEMPDB                              : 'SORT_IN_TEMPDB';
SOURCE                                      : 'SOURCE';
SPARSE                                      : 'SPARSE';
SPATIAL_WINDOW_MAX_CELLS                    : 'SPATIAL_WINDOW_MAX_CELLS';
SPECIFICATION                               : 'SPECIFICATION';
SPLIT                                       : 'SPLIT';
SQL                                         : 'SQL';
SQLDUMPERFLAGS                              : 'SQLDUMPERFLAGS';
SQLDUMPERPATH                               : 'SQLDUMPERPATH';
SQLDUMPERTIMEOUT                            : 'SQLDUMPERTIMEOUT';
STANDBY                                     : 'STANDBY';
START                                       : 'START';
STARTED                                     : 'STARTED';
STARTUP_STATE                               : 'STARTUP_STATE';
START_DATE                                  : 'START_DATE';
STATE                                       : 'STATE';
STATIC                                      : 'STATIC';
STATISTICS                                  : 'STATISTICS';
STATISTICS_INCREMENTAL                      : 'STATISTICS_INCREMENTAL';
STATISTICS_NORECOMPUTE                      : 'STATISTICS_NORECOMPUTE';
STATS                                       : 'STATS';
STATS_STREAM                                : 'STATS_STREAM';
STATUS                                      : 'STATUS';
STATUSONLY                                  : 'STATUSONLY';
STOP                                        : 'STOP';
STOPLIST                                    : 'STOPLIST';
STOPPED                                     : 'STOPPED';
STOP_ON_ERROR                               : 'STOP_ON_ERROR';
SUBJECT                                     : 'SUBJECT';
SUBSCRIBE                                   : 'SUBSCRIBE';
SUBSCRIPTION                                : 'SUBSCRIPTION';
SUPPORTED                                   : 'SUPPORTED';
SUSPEND                                     : 'SUSPEND';
SWITCH                                      : 'SWITCH';
SYMMETRIC                                   : 'SYMMETRIC';
SYNCHRONOUS_COMMIT                          : 'SYNCHRONOUS_COMMIT';
SYNONYM                                     : 'SYNONYM';
SYSTEM                                      : 'SYSTEM';
SYSTEM_USER                                 : 'SYSTEM_USER';
TABLE                                       : 'TABLE';
TABLERESULTS                                : 'TABLERESULTS';
TABLOCK                                     : 'TABLOCK';
TABLOCKX                                    : 'TABLOCKX';
TAKE                                        : 'TAKE';
TAPE                                        : 'TAPE';
TARGET                                      : 'TARGET';
TARGET_RECOVERY_TIME                        : 'TARGET_RECOVERY_TIME';
TB                                          : 'TB';
TCP                                         : 'TCP';
TEXTIMAGE_ON                                : 'TEXTIMAGE_ON';
TEXTSIZE                                    : 'TEXTSIZE';
THEN                                        : 'THEN';
THROW                                       : 'THROW';
TIES                                        : 'TIES';
TIMEOUT                                     : 'TIMEOUT';
TIMER                                       : 'TIMER';
TINYINT                                     : 'TINYINT';
TO                                          : 'TO';
TOP                                         : 'TOP';
TORN_PAGE_DETECTION                         : 'TORN_PAGE_DETECTION';
TOSTRING                                    : 'TOSTRING';
TRACE                                       : 'TRACE';
TRACKING                                    : 'TRACKING';
TRACK_CAUSALITY                             : 'TRACK_CAUSALITY';
TRAN                                        : 'TRAN';
TRANSACTION                                 : 'TRANSACTION';
TRANSACTION_ID                              : 'TRANSACTION_ID';
TRANSFER                                    : 'TRANSFER';
TRANSFORM_NOISE_WORDS                       : 'TRANSFORM_NOISE_WORDS';
TRIGGER                                     : 'TRIGGER';
TRIPLE_DES                                  : 'TRIPLE_DES';
TRIPLE_DES_3KEY                             : 'TRIPLE_DES_3KEY';
TRUNCATE                                    : 'TRUNCATE';
TRUSTWORTHY                                 : 'TRUSTWORTHY';
TRY                                         : 'TRY';
TRY_CAST                                    : 'TRY_CAST';
TSQL                                        : 'TSQL';
TWO_DIGIT_YEAR_CUTOFF                       : 'TWO_DIGIT_YEAR_CUTOFF';
TYPE                                        : 'TYPE';
TYPE_WARNING                                : 'TYPE_WARNING';
UNBOUNDED                                   : 'UNBOUNDED';
UNCHECKED                                   : 'UNCHECKED';
UNCOMMITTED                                 : 'UNCOMMITTED';
UNION                                       : 'UNION';
UNIQUE                                      : 'UNIQUE';
UNLIMITED                                   : 'UNLIMITED';
UNLOCK                                      : 'UNLOCK';
UNMASK                                      : 'UNMASK';
UNPIVOT                                     : 'UNPIVOT';
UNSAFE                                      : 'UNSAFE';
UOW                                         : 'UOW';
UPDATE                                      : 'UPDATE';
UPDLOCK                                     : 'UPDLOCK';
URL                                         : 'URL';
USE                                         : 'USE';
USED                                        : 'USED';
USER                                        : 'USER';
USING                                       : 'USING';
VALIDATION                                  : 'VALIDATION';
VALID_XML                                   : 'VALID_XML';
VALUE                                       : 'VALUE';
VALUES                                      : 'VALUES';
VAR                                         : 'VAR';
VARYING                                     : 'VARYING';
VERBOSELOGGING                              : 'VERBOSELOGGING';
VERIFY_CLONEDB                              : 'VERIFY_CLONEDB';
VERSION                                     : 'VERSION';
VIEW                                        : 'VIEW';
VIEW_METADATA                               : 'VIEW_METADATA';
VISIBILITY                                  : 'VISIBILITY';
WAIT                                        : 'WAIT';
WAITFOR                                     : 'WAITFOR';
WAIT_AT_LOW_PRIORITY                        : 'WAIT_AT_LOW_PRIORITY';
WELL_FORMED_XML                             : 'WELL_FORMED_XML';
WHEN                                        : 'WHEN';
WHERE                                       : 'WHERE';
WHILE                                       : 'WHILE';
WINDOWS                                     : 'WINDOWS';
WITH                                        : 'WITH';
WITHIN                                      : 'WITHIN';
WITHOUT                                     : 'WITHOUT';
WITHOUT_ARRAY_WRAPPER                       : 'WITHOUT_ARRAY_WRAPPER';
WITNESS                                     : 'WITNESS';
WORK                                        : 'WORK';
WORKLOAD                                    : 'WORKLOAD';
XACT_ABORT                                  : 'XACT_ABORT';
XLOCK                                       : 'XLOCK';
XML                                         : 'XML';
XMLDATA                                     : 'XMLDATA';
XMLNAMESPACES                               : 'XMLNAMESPACES';
XMLSCHEMA                                   : 'XMLSCHEMA';
XML_COMPRESSION                             : 'XML_COMPRESSION';
XSINIL                                      : 'XSINIL';
ZONE                                        : 'ZONE';

SP_EXECUTESQL: 'SP_EXECUTESQL';

//Combinations that cannot be used as IDs
DOLLAR_ACTION: '$ACTION';

// Functions starting with double at signs
AAPSEUDO: '@@' ID;

IPV4_ADDR: DEC_DIGIT+ '.' DEC_DIGIT+ '.' DEC_DIGIT+ '.' DEC_DIGIT+;

SPACE        : [ \t\r\n]+                -> skip;
COMMENT      : '/*' (COMMENT | .)*? '*/' -> channel(HIDDEN);
LINE_COMMENT : '--' ~[\r\n]*             -> channel(HIDDEN);

// TODO: ID can be not only Latin.
DOUBLE_QUOTE_ID   : '"' ('""' | ~[\r\n"])* '"';
SQUARE_BRACKET_ID : '[' (~']' | ']' ']')* ']';
LOCAL_ID          : '@' ([A-Z_$@#0-9] | FullWidthLetter)*;
TEMP_ID           : '#' ([A-Z_$@#0-9] | FullWidthLetter)*;

ID: ( [A-Z_#] | FullWidthLetter) ( [A-Z_#$@0-9] | FullWidthLetter)*;
STRING options {
    caseInsensitive = false;
}: 'N'? '\'' ('\\' . | '\'\'' | ~['])* '\'';

INT   : DEC_DIGIT+;
HEX   : '0' 'X' HEX_DIGIT*;
FLOAT : DEC_DOT_DEC;
REAL  : (INT | DEC_DOT_DEC) ('E' [+-]? DEC_DIGIT+);
MONEY : '$' (INT | FLOAT);

EQ         : '=';
GT         : '>';
LT         : '<';
BANG       : '!';
PE         : '+=';
ME         : '-=';
SE         : '*=';
DE         : '/=';
MEA        : '%=';
AND_ASSIGN : '&=';
XOR_ASSIGN : '^=';
OR_ASSIGN  : '|=';

DOUBLE_BAR   : '||';
DOT          : '.';
AT           : '@';
DOLLAR       : '$';
LPAREN       : '(';
RPAREN       : ')';
COMMA        : ',';
SEMI         : ';';
COLON        : ':';
DOUBLE_COLON : '::';
STAR         : '*';
DIV          : '/';
MOD          : '%';
PLUS         : '+';
MINUS        : '-';
BIT_NOT      : '~';
BIT_OR       : '|';
BIT_AND      : '&';
BIT_XOR      : '^';

PLACEHOLDER: '?';

// If the lexer choses this rule it has discovered a character that it cannot match
// and this is an error. But lexer errors mean nothing to users, so we pass it up to the
// parser as a token, which will raise a syntx error.
BADC: .;

fragment LETTER      : [A-Z_];
fragment DEC_DOT_DEC : (DEC_DIGIT+ '.' DEC_DIGIT+ | DEC_DIGIT+ '.' | '.' DEC_DIGIT+);
fragment HEX_DIGIT   : [0-9A-F];
fragment DEC_DIGIT   : [0-9];

fragment FullWidthLetter options {
    caseInsensitive = false;
}:
    '\u00c0' ..'\u00d6'
    | '\u00d8' ..'\u00f6'
    | '\u00f8' ..'\u00ff'
    | '\u0100' ..'\u1fff'
    | '\u2c00' ..'\u2fff'
    | '\u3040' ..'\u318f'
    | '\u3300' ..'\u337f'
    | '\u3400' ..'\u3fff'
    | '\u4e00' ..'\u9fff'
    | '\ua000' ..'\ud7ff'
    | '\uf900' ..'\ufaff'
    | '\uff00' ..'\ufff0'
; // | '\u20000'..'\u2FA1F'