//
// Macro definitions. Parameters may be specified and the replacement text terminates with the end of
// line (watch trailing blanks).
//
#define st_DEFAULT          0
#define st_COMMENT          1
#define st_IDENTIFIER       2
#define st_STRING           3
#define st_NUMBER           4
#define st_SYMBOL           5
#define st_RESERVED         6
#define st_COMMENT_LINE     7
#define st_COMMENT_STAR     8
#define st_C_STRING         9

#define st_CUSTOM           10

#define st_CUST_KEYWORD     11
#define st_CUST_COMMENT     12
#define st_CUST_STRING      13
#define st_CUST_NUMBER      14
#define st_CUST_SYMBOL      15

#define _non_alpha_         '[^_A-Za-z0-9\xFF]'
#define _all_chars_         '[\x00-\xFF]'
#define _no_chars_          '[]'
#define _dont_care_         _all_chars_

%%language
Name                        = 'SQL'
Gutter                      = 0 //_DEFAULT_GUTTER

EditableStyles              ('Reserved word', st_RESERVED),
                            ('Comment',       st_COMMENT),
                            ('Identifier',    st_IDENTIFIER),
                            ('String',        st_STRING),
                            ('Number',        st_NUMBER),
                            ('Symbols',       st_SYMBOL),
                            ('Default',       st_DEFAULT)

%%words
'--'             _dont_care_       st_COMMENT_LINE
'/*'             _dont_care_       st_COMMENT_STAR
'!'              _dont_care_       st_SYMBOL
'*'              _dont_care_       st_SYMBOL
'('              _dont_care_       st_SYMBOL
')'              _dont_care_       st_SYMBOL
'-'              _dont_care_       st_SYMBOL
'='              _dont_care_       st_SYMBOL
'+'              _dont_care_       st_SYMBOL
';'              _dont_care_       st_SYMBOL
'@'              _dont_care_       st_SYMBOL
'<'              _dont_care_       st_SYMBOL
'>'              _dont_care_       st_SYMBOL
','              _dont_care_       st_SYMBOL
'/'              _dont_care_       st_SYMBOL
'%'              _dont_care_       st_SYMBOL
'||'             _dont_care_       st_SYMBOL
'.'              _dont_care_       st_IDENTIFIER
'"'              _dont_care_       st_C_STRING
// Multi-line strings
'\x27'           _dont_care_       st_STRING

'ACCESS' _non_alpha_ st_RESERVED
'ACCESSED' _non_alpha_ st_RESERVED
'ACCOUNT' _non_alpha_ st_RESERVED
'ACTIVATE' _non_alpha_ st_RESERVED
'ADD' _non_alpha_ st_RESERVED
'ADMIN' _non_alpha_ st_RESERVED
'ADVISE' _non_alpha_ st_RESERVED
'AFTER' _non_alpha_ st_RESERVED
'AGENT' _non_alpha_ st_RESERVED
'AGGREGATE' _non_alpha_ st_RESERVED
'ALL' _non_alpha_ st_RESERVED
'ALLOCATE' _non_alpha_ st_RESERVED
'ALL_ROWS' _non_alpha_ st_RESERVED
'ALTER' _non_alpha_ st_RESERVED
'ALWAYS' _non_alpha_ st_RESERVED
'ANALYZE' _non_alpha_ st_RESERVED
'ANCILLARY' _non_alpha_ st_RESERVED
'AND' _non_alpha_ st_RESERVED
'ANY' _non_alpha_ st_RESERVED
'ARCHIVE' _non_alpha_ st_RESERVED
'ARCHIVELOG' _non_alpha_ st_RESERVED
'ARRAY' _non_alpha_ st_RESERVED
'ARRAYLEN' _non_alpha_ st_RESERVED
'AS' _non_alpha_ st_RESERVED
'ASC' _non_alpha_ st_RESERVED
'ASSOCIATE' _non_alpha_ st_RESERVED
'AT' _non_alpha_ st_RESERVED
'ATTRIBUTE' _non_alpha_ st_RESERVED
'ATTRIBUTES' _non_alpha_ st_RESERVED
'AUDIT' _non_alpha_ st_RESERVED
'AUTHENTICATED' _non_alpha_ st_RESERVED
'AUTHID' _non_alpha_ st_RESERVED
'AUTHORIZATION' _non_alpha_ st_RESERVED
'AUTO' _non_alpha_ st_RESERVED
'AUTOALLOCATE' _non_alpha_ st_RESERVED
'AUTOEXTEND' _non_alpha_ st_RESERVED
'AUTOMATIC' _non_alpha_ st_RESERVED
'AUTONOMOUS_TRANSACTION' _non_alpha_ st_RESERVED
'AVG' _non_alpha_ st_RESERVED
'BACKUP' _non_alpha_ st_RESERVED
'BECOME' _non_alpha_ st_RESERVED
'BEFORE' _non_alpha_ st_RESERVED
'BEGIN' _non_alpha_ st_RESERVED
'BEHALF' _non_alpha_ st_RESERVED
'BETWEEN' _non_alpha_ st_RESERVED
'BFILE' _non_alpha_ st_RESERVED
'BIGFILE' _non_alpha_ st_RESERVED
'BINARY_INTEGER' _non_alpha_ st_RESERVED
'BINDING' _non_alpha_ st_RESERVED
'BITMAP' _non_alpha_ st_RESERVED
'BLOB' _non_alpha_ st_RESERVED
'BLOCK' _non_alpha_ st_RESERVED
'BLOCKSIZE' _non_alpha_ st_RESERVED
'BODY' _non_alpha_ st_RESERVED
'BOOLEAN' _non_alpha_ st_RESERVED
'BUFFER_POOL' _non_alpha_ st_RESERVED
'BUILD' _non_alpha_ st_RESERVED
'BULK' _non_alpha_ st_RESERVED
'BULK_ROWCOUNT' _non_alpha_ st_RESERVED
'BY' _non_alpha_ st_RESERVED
'BYTE' _non_alpha_ st_RESERVED
'CACHE' _non_alpha_ st_RESERVED
'CACHE_INSTANCES' _non_alpha_ st_RESERVED
'CALL' _non_alpha_ st_RESERVED
'CALLING' _non_alpha_ st_RESERVED
'CANCEL' _non_alpha_ st_RESERVED
'CASCADE' _non_alpha_ st_RESERVED
'CASE' _non_alpha_ st_RESERVED
'CAST' _non_alpha_ st_RESERVED
'CATEGORY' _non_alpha_ st_RESERVED
'CFILE' _non_alpha_ st_RESERVED
'CHAINED' _non_alpha_ st_RESERVED
'CHANGE' _non_alpha_ st_RESERVED
'CHAR' _non_alpha_ st_RESERVED
'CHARACTER' _non_alpha_ st_RESERVED
'CHAR_CS' _non_alpha_ st_RESERVED
'CHECK' _non_alpha_ st_RESERVED
'CHECKBOX' _non_alpha_ st_RESERVED
'CHECKPOINT' _non_alpha_ st_RESERVED
'CHILD' _non_alpha_ st_RESERVED
'CHOOSE' _non_alpha_ st_RESERVED
'CHUNK' _non_alpha_ st_RESERVED
'CLASS' _non_alpha_ st_RESERVED
'CLEAR' _non_alpha_ st_RESERVED
'CLOB' _non_alpha_ st_RESERVED
'CLONE' _non_alpha_ st_RESERVED
'CLOSE' _non_alpha_ st_RESERVED
'CLOSE_CACHED_OPEN_CURSORS' _non_alpha_ st_RESERVED
'CLUSTER' _non_alpha_ st_RESERVED
'COALESCE' _non_alpha_ st_RESERVED
'COBOL' _non_alpha_ st_RESERVED
'COLLECT' _non_alpha_ st_RESERVED
'COLUMN' _non_alpha_ st_RESERVED
'COLUMNS' _non_alpha_ st_RESERVED
'COLUMN_VALUE' _non_alpha_ st_RESERVED
'COMMENT' _non_alpha_ st_RESERVED
'COMMIT' _non_alpha_ st_RESERVED
'COMMITTED' _non_alpha_ st_RESERVED
'COMPATIBILITY' _non_alpha_ st_RESERVED
'COMPILE' _non_alpha_ st_RESERVED
'COMPLETE' _non_alpha_ st_RESERVED
'COMPOSITE_LIMIT' _non_alpha_ st_RESERVED
'COMPRESS' _non_alpha_ st_RESERVED
'COMPUTE' _non_alpha_ st_RESERVED
'CONNECT' _non_alpha_ st_RESERVED
'CONNECT_TIME' _non_alpha_ st_RESERVED
'CONSIDER' _non_alpha_ st_RESERVED
'CONSISTENT' _non_alpha_ st_RESERVED
'CONSTANT' _non_alpha_ st_RESERVED
'CONSTRAINT' _non_alpha_ st_RESERVED
'CONSTRAINTS' _non_alpha_ st_RESERVED
'CONSTRUCTOR' _non_alpha_ st_RESERVED
'CONTENTS' _non_alpha_ st_RESERVED
'CONTEXT' _non_alpha_ st_RESERVED
'CONTINUE' _non_alpha_ st_RESERVED
'CONTROLFILE' _non_alpha_ st_RESERVED
'CONVERT' _non_alpha_ st_RESERVED
'COST' _non_alpha_ st_RESERVED
'COUNT' _non_alpha_ st_RESERVED
'CPU_PER_CALL' _non_alpha_ st_RESERVED
'CPU_PER_SESSION' _non_alpha_ st_RESERVED
'CREATE' _non_alpha_ st_RESERVED
'CROSS' _non_alpha_ st_RESERVED
'CUBE' _non_alpha_ st_RESERVED
'CURRENT' _non_alpha_ st_RESERVED
'CURRENT_SCHEMA' _non_alpha_ st_RESERVED
'CURRENT_USER' _non_alpha_ st_RESERVED
'CURRVAL' _non_alpha_ st_RESERVED
'CURSOR' _non_alpha_ st_RESERVED
'CYCLE' _non_alpha_ st_RESERVED
'DANGLING' _non_alpha_ st_RESERVED
'DATA' _non_alpha_ st_RESERVED
'DATABASE' _non_alpha_ st_RESERVED
'DATAFILE' _non_alpha_ st_RESERVED
'DATAFILES' _non_alpha_ st_RESERVED
'DATAOBJNO' _non_alpha_ st_RESERVED
'DATE' _non_alpha_ st_RESERVED
'DAY' _non_alpha_ st_RESERVED
'DBA' _non_alpha_ st_RESERVED
'DBA_RECYCLEBIN' _non_alpha_ st_RESERVED
'DBTIMEZONE' _non_alpha_ st_RESERVED
'DDL' _non_alpha_ st_RESERVED
'DEALLOCATE' _non_alpha_ st_RESERVED
'DEBUG' _non_alpha_ st_RESERVED
'DEC' _non_alpha_ st_RESERVED
'DECIMAL' _non_alpha_ st_RESERVED
'DECLARE' _non_alpha_ st_RESERVED
'DECREMENT' _non_alpha_ st_RESERVED
'DEFAULT' _non_alpha_ st_RESERVED
'DEFERRABLE' _non_alpha_ st_RESERVED
'DEFERRED' _non_alpha_ st_RESERVED
'DEFINER' _non_alpha_ st_RESERVED
'DEGREE' _non_alpha_ st_RESERVED
'DELETE' _non_alpha_ st_RESERVED
'DEMAND' _non_alpha_ st_RESERVED
'DEREF' _non_alpha_ st_RESERVED
'DESC' _non_alpha_ st_RESERVED
'DESCRIPTION' _non_alpha_ st_RESERVED
'DETERMINES' _non_alpha_ st_RESERVED
'DETERMINISTIC' _non_alpha_ st_RESERVED
'DICTIONARY' _non_alpha_ st_RESERVED
'DIMENSION' _non_alpha_ st_RESERVED
'DIRECTORY' _non_alpha_ st_RESERVED
'DISABLE' _non_alpha_ st_RESERVED
'DISASSOCIATE' _non_alpha_ st_RESERVED
'DISCONNECT' _non_alpha_ st_RESERVED
'DISK' _non_alpha_ st_RESERVED
'DISKGROUP' _non_alpha_ st_RESERVED
'DISMOUNT' _non_alpha_ st_RESERVED
'DISTINCT' _non_alpha_ st_RESERVED
'DISTRIBUTED' _non_alpha_ st_RESERVED
'DML' _non_alpha_ st_RESERVED
'DOUBLE' _non_alpha_ st_RESERVED
'DROP' _non_alpha_ st_RESERVED
'DUMP' _non_alpha_ st_RESERVED
'EACH' _non_alpha_ st_RESERVED
'ELEMENT' _non_alpha_ st_RESERVED
'ELSE' _non_alpha_ st_RESERVED
'ELSIF' _non_alpha_ st_RESERVED
'ENABLE' _non_alpha_ st_RESERVED
'END' _non_alpha_ st_RESERVED
'ENFORCE' _non_alpha_ st_RESERVED
'ENFORCED' _non_alpha_ st_RESERVED
'ENTRY' _non_alpha_ st_RESERVED
'ESCAPE' _non_alpha_ st_RESERVED
'ESTIMATE' _non_alpha_ st_RESERVED
'EVENTS' _non_alpha_ st_RESERVED
'EXCEPT' _non_alpha_ st_RESERVED
'EXCEPTION' _non_alpha_ st_RESERVED
'EXCEPTIONS' _non_alpha_ st_RESERVED
'EXCEPTION_INIT' _non_alpha_ st_RESERVED
'EXCHANGE' _non_alpha_ st_RESERVED
'EXCLUDING' _non_alpha_ st_RESERVED
'EXCLUSIVE' _non_alpha_ st_RESERVED
'EXEC' _non_alpha_ st_RESERVED
'EXECUTE' _non_alpha_ st_RESERVED
'EXISTS' _non_alpha_ st_RESERVED
'EXIT' _non_alpha_ st_RESERVED
'EXPIRE' _non_alpha_ st_RESERVED
'EXPLAIN' _non_alpha_ st_RESERVED
'EXTEND' _non_alpha_ st_RESERVED
'EXTENT' _non_alpha_ st_RESERVED
'EXTENTS' _non_alpha_ st_RESERVED
'EXTERNAL' _non_alpha_ st_RESERVED
'EXTERNALLY' _non_alpha_ st_RESERVED
'FAILED_LOGIN_ATTEMPTS' _non_alpha_ st_RESERVED
'FAILGROUP' _non_alpha_ st_RESERVED
'FALSE' _non_alpha_ st_RESERVED
'FAST' _non_alpha_ st_RESERVED
'FETCH' _non_alpha_ st_RESERVED
'FILE' _non_alpha_ st_RESERVED
'FINAL' _non_alpha_ st_RESERVED
'FIRST' _non_alpha_ st_RESERVED
'FIRST_ROWS' _non_alpha_ st_RESERVED
'FLAGGER' _non_alpha_ st_RESERVED
'FLASHBACK' _non_alpha_ st_RESERVED
'FLOAT' _non_alpha_ st_RESERVED
'FLOB' _non_alpha_ st_RESERVED
'FLUSH' _non_alpha_ st_RESERVED
'FOR' _non_alpha_ st_RESERVED
'FORALL' _non_alpha_ st_RESERVED
'FORCE' _non_alpha_ st_RESERVED
'FOREIGN' _non_alpha_ st_RESERVED
'FORTRAN' _non_alpha_ st_RESERVED
'FOUND' _non_alpha_ st_RESERVED
'FREELIST' _non_alpha_ st_RESERVED
'FREELISTS' _non_alpha_ st_RESERVED
'FREEPOOLS' _non_alpha_ st_RESERVED
'FRESH' _non_alpha_ st_RESERVED
'FROM' _non_alpha_ st_RESERVED
'FULL' _non_alpha_ st_RESERVED
'FUNCTION' _non_alpha_ st_RESERVED
'FUNCTIONS' _non_alpha_ st_RESERVED
'GENERATED' _non_alpha_ st_RESERVED
'GLOBAL' _non_alpha_ st_RESERVED
'GLOBALLY' _non_alpha_ st_RESERVED
'GLOBAL_NAME' _non_alpha_ st_RESERVED
'GO' _non_alpha_ st_RESERVED
'GOTO' _non_alpha_ st_RESERVED
'GRANT' _non_alpha_ st_RESERVED
'GROUP' _non_alpha_ st_RESERVED
'GROUPING' _non_alpha_ st_RESERVED
'GROUPS' _non_alpha_ st_RESERVED
'GUARANTEE' _non_alpha_ st_RESERVED
'HASH' _non_alpha_ st_RESERVED
'HASHKEYS' _non_alpha_ st_RESERVED
'HAVING' _non_alpha_ st_RESERVED
'HEADER' _non_alpha_ st_RESERVED
'HEAP' _non_alpha_ st_RESERVED
'HIDDEN' _non_alpha_ st_RESERVED
'HIERARCHY' _non_alpha_ st_RESERVED
'HIGH' _non_alpha_ st_RESERVED
'HINT' _non_alpha_ st_RESERVED
'ID' _non_alpha_ st_RESERVED
'IDENTIFIED' _non_alpha_ st_RESERVED
'IDENTIFIER' _non_alpha_ st_RESERVED
'IDGENERATORS' _non_alpha_ st_RESERVED
'IDLE_TIME' _non_alpha_ st_RESERVED
'IF' _non_alpha_ st_RESERVED
'IFEMPTY' _non_alpha_ st_RESERVED
'IGNORE' _non_alpha_ st_RESERVED
'IMMEDIATE' _non_alpha_ st_RESERVED
'IN' _non_alpha_ st_RESERVED
'INCLUDING' _non_alpha_ st_RESERVED
'INCREMENT' _non_alpha_ st_RESERVED
'INDEX' _non_alpha_ st_RESERVED
'INDEXED' _non_alpha_ st_RESERVED
'INDEXES' _non_alpha_ st_RESERVED
'INDEXTYPE' _non_alpha_ st_RESERVED
'INDEXTYPES' _non_alpha_ st_RESERVED
'INDICATOR' _non_alpha_ st_RESERVED
'IND_PARTITION' _non_alpha_ st_RESERVED
'INITIAL' _non_alpha_ st_RESERVED
'INITIALIZED' _non_alpha_ st_RESERVED
'INITIALLY' _non_alpha_ st_RESERVED
'INITRANS' _non_alpha_ st_RESERVED
'INNER' _non_alpha_ st_RESERVED
'INSERT' _non_alpha_ st_RESERVED
'INSTANCE' _non_alpha_ st_RESERVED
'INSTANCES' _non_alpha_ st_RESERVED
'INSTANTIABLE' _non_alpha_ st_RESERVED
'INSTEAD' _non_alpha_ st_RESERVED
'INT' _non_alpha_ st_RESERVED
'INTEGER' _non_alpha_ st_RESERVED
'INTERMEDIATE' _non_alpha_ st_RESERVED
'INTERSECT' _non_alpha_ st_RESERVED
'INTERVAL' _non_alpha_ st_RESERVED
'INTO' _non_alpha_ st_RESERVED
'INVALIDATE' _non_alpha_ st_RESERVED
'IS' _non_alpha_ st_RESERVED
'ISOLATION' _non_alpha_ st_RESERVED
'ISOLATION_LEVEL' _non_alpha_ st_RESERVED
'ISOPEN' _non_alpha_ st_RESERVED
'ITERATE' _non_alpha_ st_RESERVED
'JAVA' _non_alpha_ st_RESERVED
'JOIN' _non_alpha_ st_RESERVED
'KEEP' _non_alpha_ st_RESERVED
'KEY' _non_alpha_ st_RESERVED
'KILL' _non_alpha_ st_RESERVED
'LABEL' _non_alpha_ st_RESERVED
'LANGUAGE' _non_alpha_ st_RESERVED
'LAST' _non_alpha_ st_RESERVED
'LAYER' _non_alpha_ st_RESERVED
'LEFT' _non_alpha_ st_RESERVED
'LESS' _non_alpha_ st_RESERVED
'LEVEL' _non_alpha_ st_RESERVED
'LEVELS' _non_alpha_ st_RESERVED
'LIBRARY' _non_alpha_ st_RESERVED
'LIKE' _non_alpha_ st_RESERVED
'LIMIT' _non_alpha_ st_RESERVED
'LINK' _non_alpha_ st_RESERVED
'LIST' _non_alpha_ st_RESERVED
'LISTS' _non_alpha_ st_RESERVED
'LOB' _non_alpha_ st_RESERVED
'LOCAL' _non_alpha_ st_RESERVED
'LOCATION' _non_alpha_ st_RESERVED
'LOCATOR' _non_alpha_ st_RESERVED
'LOCK' _non_alpha_ st_RESERVED
'LOCKED' _non_alpha_ st_RESERVED
'LOG' _non_alpha_ st_RESERVED
'LOGFILE' _non_alpha_ st_RESERVED
'LOGGING' _non_alpha_ st_RESERVED
'LOGICAL_READS_PER_CALL' _non_alpha_ st_RESERVED
'LOGICAL_READS_PER_SESSION' _non_alpha_ st_RESERVED
'LONG' _non_alpha_ st_RESERVED
'LOOP' _non_alpha_ st_RESERVED
'MAIN' _non_alpha_ st_RESERVED
'MANAGE' _non_alpha_ st_RESERVED
'MANAGED' _non_alpha_ st_RESERVED
'MANAGEMENT' _non_alpha_ st_RESERVED
'MANUAL' _non_alpha_ st_RESERVED
'MAP' _non_alpha_ st_RESERVED
'MAPPING' _non_alpha_ st_RESERVED
'MASTER' _non_alpha_ st_RESERVED
'MATCHED' _non_alpha_ st_RESERVED
'MATERIALIZED' _non_alpha_ st_RESERVED
'MAX' _non_alpha_ st_RESERVED
'MAXARCHLOGS' _non_alpha_ st_RESERVED
'MAXDATAFILES' _non_alpha_ st_RESERVED
'MAXEXTENTS' _non_alpha_ st_RESERVED
'MAXINSTANCES' _non_alpha_ st_RESERVED
'MAXLOGFILES' _non_alpha_ st_RESERVED
'MAXLOGHISTORY' _non_alpha_ st_RESERVED
'MAXLOGMEMBERS' _non_alpha_ st_RESERVED
'MAXSIZE' _non_alpha_ st_RESERVED
'MAXTRANS' _non_alpha_ st_RESERVED
'MAXVALUE' _non_alpha_ st_RESERVED
'MEASURES' _non_alpha_ st_RESERVED
'MEMBER' _non_alpha_ st_RESERVED
'MERGE' _non_alpha_ st_RESERVED
'MIN' _non_alpha_ st_RESERVED
'MINEXTENTS' _non_alpha_ st_RESERVED
'MINIMIZE' _non_alpha_ st_RESERVED
'MINIMUM' _non_alpha_ st_RESERVED
'MINUS' _non_alpha_ st_RESERVED
'MINVALUE' _non_alpha_ st_RESERVED
'MLSLABEL' _non_alpha_ st_RESERVED
'MOD' _non_alpha_ st_RESERVED
'MODE' _non_alpha_ st_RESERVED
'MODEL' _non_alpha_ st_RESERVED
'MODIFY' _non_alpha_ st_RESERVED
'MODULE' _non_alpha_ st_RESERVED
'MONITORING' _non_alpha_ st_RESERVED
'MONTH' _non_alpha_ st_RESERVED
'MOUNT' _non_alpha_ st_RESERVED
'MOVE' _non_alpha_ st_RESERVED
'MOVEMENT' _non_alpha_ st_RESERVED
'MTS_DISPATCHERS' _non_alpha_ st_RESERVED
'MULTISET' _non_alpha_ st_RESERVED
'NAME' _non_alpha_ st_RESERVED
'NAMED' _non_alpha_ st_RESERVED
'NATIONAL' _non_alpha_ st_RESERVED
'NATURAL' _non_alpha_ st_RESERVED
'NATURALN' _non_alpha_ st_RESERVED
'NAV' _non_alpha_ st_RESERVED
'NCHAR' _non_alpha_ st_RESERVED
'NCHAR_CS' _non_alpha_ st_RESERVED
'NCLOB' _non_alpha_ st_RESERVED
'NEEDED' _non_alpha_ st_RESERVED
'NESTED' _non_alpha_ st_RESERVED
'NETWORK' _non_alpha_ st_RESERVED
'NEVER' _non_alpha_ st_RESERVED
'NEW' _non_alpha_ st_RESERVED
'NEXT' _non_alpha_ st_RESERVED
'NEXTVAL' _non_alpha_ st_RESERVED
'NO' _non_alpha_ st_RESERVED
'NOARCHIVELOG' _non_alpha_ st_RESERVED
'NOAUDIT' _non_alpha_ st_RESERVED
'NOCACHE' _non_alpha_ st_RESERVED
'NOCOMPRESS' _non_alpha_ st_RESERVED
'NOCOPY' _non_alpha_ st_RESERVED
'NOCYCLE' _non_alpha_ st_RESERVED
'NOFORCE' _non_alpha_ st_RESERVED
'NOGUARANTEE' _non_alpha_ st_RESERVED
'NOLOGGING' _non_alpha_ st_RESERVED
'NOMAPPING' _non_alpha_ st_RESERVED
'NOMAXVALUE' _non_alpha_ st_RESERVED
'NOMINIMIZE' _non_alpha_ st_RESERVED
'NOMINVALUE' _non_alpha_ st_RESERVED
'NOMONITORING' _non_alpha_ st_RESERVED
'NONE' _non_alpha_ st_RESERVED
'NOORDER' _non_alpha_ st_RESERVED
'NOOVERRIDE' _non_alpha_ st_RESERVED
'NOPARALLEL' _non_alpha_ st_RESERVED
'NORELY' _non_alpha_ st_RESERVED
'NORESETLOGS' _non_alpha_ st_RESERVED
'NOREVERSE' _non_alpha_ st_RESERVED
'NORMAL' _non_alpha_ st_RESERVED
'NOROWDEPENDENCIES' _non_alpha_ st_RESERVED
'NOSORT' _non_alpha_ st_RESERVED
'NOT' _non_alpha_ st_RESERVED
'NOTFOUND' _non_alpha_ st_RESERVED
'NOTHING' _non_alpha_ st_RESERVED
'NOVALIDATE' _non_alpha_ st_RESERVED
'NOWAIT' _non_alpha_ st_RESERVED
'NULL' _non_alpha_ st_RESERVED
'NULLS' _non_alpha_ st_RESERVED
'NUMBER' _non_alpha_ st_RESERVED
'NUMERIC' _non_alpha_ st_RESERVED
'NVARCHAR2' _non_alpha_ st_RESERVED
'OBJECT' _non_alpha_ st_RESERVED
'OBJNO' _non_alpha_ st_RESERVED
'OBJNO_REUSE' _non_alpha_ st_RESERVED
'OF' _non_alpha_ st_RESERVED
'OFF' _non_alpha_ st_RESERVED
'OFFLINE' _non_alpha_ st_RESERVED
'OID' _non_alpha_ st_RESERVED
'OIDINDEX' _non_alpha_ st_RESERVED
'OLD' _non_alpha_ st_RESERVED
'ON' _non_alpha_ st_RESERVED
'ONLINE' _non_alpha_ st_RESERVED
'ONLY' _non_alpha_ st_RESERVED
'OPCODE' _non_alpha_ st_RESERVED
'OPEN' _non_alpha_ st_RESERVED
'OPERATOR' _non_alpha_ st_RESERVED
'OPTIMAL' _non_alpha_ st_RESERVED
'OPTIMIZER_GOAL' _non_alpha_ st_RESERVED
'OPTION' _non_alpha_ st_RESERVED
'OR' _non_alpha_ st_RESERVED
'ORDER' _non_alpha_ st_RESERVED
'ORGANIZATION' _non_alpha_ st_RESERVED
'OTHERS' _non_alpha_ st_RESERVED
'OUT' _non_alpha_ st_RESERVED
'OUTER' _non_alpha_ st_RESERVED
'OUTLINE' _non_alpha_ st_RESERVED
'OVERFLOW' _non_alpha_ st_RESERVED
'OVERRIDING' _non_alpha_ st_RESERVED
'OWN' _non_alpha_ st_RESERVED
'PACKAGE' _non_alpha_ st_RESERVED
'PACKAGES' _non_alpha_ st_RESERVED
'PACKED' _non_alpha_ st_RESERVED
'PARALLEL' _non_alpha_ st_RESERVED
'PARALLEL_ENABLE' _non_alpha_ st_RESERVED
'PARAMETERS' _non_alpha_ st_RESERVED
'PARENT' _non_alpha_ st_RESERVED
'PARTITION' _non_alpha_ st_RESERVED
'PARTITIONS' _non_alpha_ st_RESERVED
'PASSWORD' _non_alpha_ st_RESERVED
'PASSWORD_GRACE_TIME' _non_alpha_ st_RESERVED
'PASSWORD_LIFE_TIME' _non_alpha_ st_RESERVED
'PASSWORD_LOCK_TIME' _non_alpha_ st_RESERVED
'PASSWORD_REUSE_MAX' _non_alpha_ st_RESERVED
'PASSWORD_REUSE_TIME' _non_alpha_ st_RESERVED
'PASSWORD_VERIFY_FUNCTION' _non_alpha_ st_RESERVED
'PCTFREE' _non_alpha_ st_RESERVED
'PCTINCREASE' _non_alpha_ st_RESERVED
'PCTTHRESHOLD' _non_alpha_ st_RESERVED
'PCTUSED' _non_alpha_ st_RESERVED
'PCTVERSION' _non_alpha_ st_RESERVED
'PERCENT' _non_alpha_ st_RESERVED
'PERMANENT' _non_alpha_ st_RESERVED
'PFILE' _non_alpha_ st_RESERVED
'PIPE' _non_alpha_ st_RESERVED
'PIPELINED' _non_alpha_ st_RESERVED
'PLAN' _non_alpha_ st_RESERVED
'PLI' _non_alpha_ st_RESERVED
'PLSQL_DEBUG' _non_alpha_ st_RESERVED
'PLS_INTEGER' _non_alpha_ st_RESERVED
'POSITIVE' _non_alpha_ st_RESERVED
'POSITIVEN' _non_alpha_ st_RESERVED
'POST_TRANSACTION' _non_alpha_ st_RESERVED
'PRAGMA' _non_alpha_ st_RESERVED
'PREBUILT' _non_alpha_ st_RESERVED
'PRECISION' _non_alpha_ st_RESERVED
'PRESERVE' _non_alpha_ st_RESERVED
'PRIMARY' _non_alpha_ st_RESERVED
'PRIOR' _non_alpha_ st_RESERVED
'PRIVATE' _non_alpha_ st_RESERVED
'PRIVATE_SGA' _non_alpha_ st_RESERVED
'PRIVILEGE' _non_alpha_ st_RESERVED
'PRIVILEGES' _non_alpha_ st_RESERVED
'PROCEDURE' _non_alpha_ st_RESERVED
'PROFILE' _non_alpha_ st_RESERVED
'PUBLIC' _non_alpha_ st_RESERVED
'PURGE' _non_alpha_ st_RESERVED
'QUERY' _non_alpha_ st_RESERVED
'QUEUE' _non_alpha_ st_RESERVED
'QUOTA' _non_alpha_ st_RESERVED
'RAISE' _non_alpha_ st_RESERVED
'RANGE' _non_alpha_ st_RESERVED
'RAW' _non_alpha_ st_RESERVED
'RBA' _non_alpha_ st_RESERVED
'READ' _non_alpha_ st_RESERVED
'READONLY' _non_alpha_ st_RESERVED
'READS' _non_alpha_ st_RESERVED
'REAL' _non_alpha_ st_RESERVED
'REBUILD' _non_alpha_ st_RESERVED
'RECORD' _non_alpha_ st_RESERVED
'RECORDS_PER_BLOCK' _non_alpha_ st_RESERVED
'RECOVER' _non_alpha_ st_RESERVED
'RECOVERABLE' _non_alpha_ st_RESERVED
'RECOVERY' _non_alpha_ st_RESERVED
'RECYCLE' _non_alpha_ st_RESERVED
'RECYCLEBIN' _non_alpha_ st_RESERVED
'REDUCED' _non_alpha_ st_RESERVED
'REDUNDANCY' _non_alpha_ st_RESERVED
'REF' _non_alpha_ st_RESERVED
'REFERENCE' _non_alpha_ st_RESERVED
'REFERENCES' _non_alpha_ st_RESERVED
'REFERENCING' _non_alpha_ st_RESERVED
'REFRESH' _non_alpha_ st_RESERVED
'REJECT' _non_alpha_ st_RESERVED
'RELATIONAL' _non_alpha_ st_RESERVED
'RELY' _non_alpha_ st_RESERVED
'RENAME' _non_alpha_ st_RESERVED
'REPLACE' _non_alpha_ st_RESERVED
'REQUIRED' _non_alpha_ st_RESERVED
'RESET' _non_alpha_ st_RESERVED
'RESETLOGS' _non_alpha_ st_RESERVED
'RESIZE' _non_alpha_ st_RESERVED
'RESOLVE' _non_alpha_ st_RESERVED
'RESOLVER' _non_alpha_ st_RESERVED
'RESOURCE' _non_alpha_ st_RESERVED
'RESTRICT' _non_alpha_ st_RESERVED
'RESTRICTED' _non_alpha_ st_RESERVED
'RESTRICT_REFERENCES' _non_alpha_ st_RESERVED
'RESULT' _non_alpha_ st_RESERVED
'RESUME' _non_alpha_ st_RESERVED
'RETENTION' _non_alpha_ st_RESERVED
'RETURN' _non_alpha_ st_RESERVED
'RETURNING' _non_alpha_ st_RESERVED
'REUSE' _non_alpha_ st_RESERVED
'REVERSE' _non_alpha_ st_RESERVED
'REVOKE' _non_alpha_ st_RESERVED
'REWRITE' _non_alpha_ st_RESERVED
'RIGHT' _non_alpha_ st_RESERVED
'RNDS' _non_alpha_ st_RESERVED
'RNPS' _non_alpha_ st_RESERVED
'ROLE' _non_alpha_ st_RESERVED
'ROLES' _non_alpha_ st_RESERVED
'ROLLBACK' _non_alpha_ st_RESERVED
'ROLLUP' _non_alpha_ st_RESERVED
'ROW' _non_alpha_ st_RESERVED
'ROWCOUNT' _non_alpha_ st_RESERVED
'ROWDEPENDENCIES' _non_alpha_ st_RESERVED
'ROWID' _non_alpha_ st_RESERVED
'ROWLABEL' _non_alpha_ st_RESERVED
'ROWNUM' _non_alpha_ st_RESERVED
'ROWS' _non_alpha_ st_RESERVED
'ROWTYPE' _non_alpha_ st_RESERVED
'RULE' _non_alpha_ st_RESERVED
'RULES' _non_alpha_ st_RESERVED
'SAMPLE' _non_alpha_ st_RESERVED
'SAVEPOINT' _non_alpha_ st_RESERVED
'SCAN' _non_alpha_ st_RESERVED
'SCAN_INSTANCES' _non_alpha_ st_RESERVED
'SCHEMA' _non_alpha_ st_RESERVED
'SCN' _non_alpha_ st_RESERVED
'SCOPE' _non_alpha_ st_RESERVED
'SD_ALL' _non_alpha_ st_RESERVED
'SD_INHIBIT' _non_alpha_ st_RESERVED
'SD_SHOW' _non_alpha_ st_RESERVED
'SECOND' _non_alpha_ st_RESERVED
'SECTION' _non_alpha_ st_RESERVED
'SEED' _non_alpha_ st_RESERVED
'SEGMENT' _non_alpha_ st_RESERVED
'SEG_BLOCK' _non_alpha_ st_RESERVED
'SEG_FILE' _non_alpha_ st_RESERVED
'SELECT' _non_alpha_ st_RESERVED
'SELECTIVITY' _non_alpha_ st_RESERVED
'SELF' _non_alpha_ st_RESERVED
'SEQUENCE' _non_alpha_ st_RESERVED
'SEQUENTIAL' _non_alpha_ st_RESERVED
'SERIALIZABLE' _non_alpha_ st_RESERVED
'SERIALLY_REUSABLE' _non_alpha_ st_RESERVED
'SESSION' _non_alpha_ st_RESERVED
'SESSIONS_PER_USER' _non_alpha_ st_RESERVED
'SESSIONTIMEZONE' _non_alpha_ st_RESERVED
'SESSION_CACHED_CURSORS' _non_alpha_ st_RESERVED
'SET' _non_alpha_ st_RESERVED
'SETS' _non_alpha_ st_RESERVED
'SHARE' _non_alpha_ st_RESERVED
'SHARED' _non_alpha_ st_RESERVED
'SHARED_POOL' _non_alpha_ st_RESERVED
'SHRINK' _non_alpha_ st_RESERVED
'SHUTDOWN' _non_alpha_ st_RESERVED
'SIBLINGS' _non_alpha_ st_RESERVED
'SIGNTYPE' _non_alpha_ st_RESERVED
'SINGLE' _non_alpha_ st_RESERVED
'SIZE' _non_alpha_ st_RESERVED
'SKIP' _non_alpha_ st_RESERVED
'SKIP_UNUSABLE_INDEXES' _non_alpha_ st_RESERVED
'SMALL' _non_alpha_ st_RESERVED
'SMALLFILE' _non_alpha_ st_RESERVED
'SMALLINT' _non_alpha_ st_RESERVED
'SNAPSHOT' _non_alpha_ st_RESERVED
'SOME' _non_alpha_ st_RESERVED
'SORT' _non_alpha_ st_RESERVED
'SOURCE' _non_alpha_ st_RESERVED
'SPACE' _non_alpha_ st_RESERVED
'SPECIFICATION' _non_alpha_ st_RESERVED
'SPFILE' _non_alpha_ st_RESERVED
'SPLIT' _non_alpha_ st_RESERVED
'SQL' _non_alpha_ st_RESERVED
'SQLBUF' _non_alpha_ st_RESERVED
'SQLCODE' _non_alpha_ st_RESERVED
'SQLERRM' _non_alpha_ st_RESERVED
'SQLERROR' _non_alpha_ st_RESERVED
'SQLSTATE' _non_alpha_ st_RESERVED
'SQL_TRACE' _non_alpha_ st_RESERVED
'STANDARD' _non_alpha_ st_RESERVED
'STANDBY' _non_alpha_ st_RESERVED
'START' _non_alpha_ st_RESERVED
'STATEMENT' _non_alpha_ st_RESERVED
'STATEMENT_ID' _non_alpha_ st_RESERVED
'STATIC' _non_alpha_ st_RESERVED
'STATISTICS' _non_alpha_ st_RESERVED
'STDDEV' _non_alpha_ st_RESERVED
'STOP' _non_alpha_ st_RESERVED
'STORAGE' _non_alpha_ st_RESERVED
'STORE' _non_alpha_ st_RESERVED
'STRING' _non_alpha_ st_RESERVED
'STRUCTURE' _non_alpha_ st_RESERVED
'SUBPARTITION' _non_alpha_ st_RESERVED
'SUBPARTITIONS' _non_alpha_ st_RESERVED
'SUBSTITUTABLE' _non_alpha_ st_RESERVED
'SUBTYPE' _non_alpha_ st_RESERVED
'SUCCESSFUL' _non_alpha_ st_RESERVED
'SUM' _non_alpha_ st_RESERVED
'SUPPLEMENTAL' _non_alpha_ st_RESERVED
'SUSPEND' _non_alpha_ st_RESERVED
'SWITCH' _non_alpha_ st_RESERVED
'SYNONYM' _non_alpha_ st_RESERVED
'SYS' _non_alpha_ st_RESERVED
'SYSAUX' _non_alpha_ st_RESERVED
'SYSDATE' _non_alpha_ st_RESERVED
'SYSDBA' _non_alpha_ st_RESERVED
'SYSOPER' _non_alpha_ st_RESERVED
'SYSTEM' _non_alpha_ st_RESERVED
'SYS_OP_ENFORCE_NOT_NULL$' _non_alpha_ st_RESERVED
'SYS_OP_NTCIMG$' _non_alpha_ st_RESERVED
'TABLE' _non_alpha_ st_RESERVED
'TABLES' _non_alpha_ st_RESERVED
'TABLESPACE' _non_alpha_ st_RESERVED
'TABLESPACE_NO' _non_alpha_ st_RESERVED
'TABNO' _non_alpha_ st_RESERVED
'TEMPFILE' _non_alpha_ st_RESERVED
'TEMPLATE' _non_alpha_ st_RESERVED
'TEMPORARY' _non_alpha_ st_RESERVED
'THAN' _non_alpha_ st_RESERVED
'THE' _non_alpha_ st_RESERVED
'THEN' _non_alpha_ st_RESERVED
'THREAD' _non_alpha_ st_RESERVED
'THROUGH' _non_alpha_ st_RESERVED
'TIME' _non_alpha_ st_RESERVED
'TIMEOUT' _non_alpha_ st_RESERVED
'TIMESTAMP' _non_alpha_ st_RESERVED
'TIME_ZONE' _non_alpha_ st_RESERVED
'TO' _non_alpha_ st_RESERVED
'TOPLEVEL' _non_alpha_ st_RESERVED
'TRACE' _non_alpha_ st_RESERVED
'TRACING' _non_alpha_ st_RESERVED
'TRANSACTION' _non_alpha_ st_RESERVED
'TRANSITIONAL' _non_alpha_ st_RESERVED
'TRIGGER' _non_alpha_ st_RESERVED
'TRIGGERS' _non_alpha_ st_RESERVED
'TRIM' _non_alpha_ st_RESERVED
'TRUE' _non_alpha_ st_RESERVED
'TRUNCATE' _non_alpha_ st_RESERVED
'TRUST' _non_alpha_ st_RESERVED
'TRUSTED' _non_alpha_ st_RESERVED
'TX' _non_alpha_ st_RESERVED
'TYPE' _non_alpha_ st_RESERVED
'TYPES' _non_alpha_ st_RESERVED
'UBA' _non_alpha_ st_RESERVED
'UID' _non_alpha_ st_RESERVED
'UNARCHIVED' _non_alpha_ st_RESERVED
'UNDER' _non_alpha_ st_RESERVED
'UNDO' _non_alpha_ st_RESERVED
'UNIFORM' _non_alpha_ st_RESERVED
'UNION' _non_alpha_ st_RESERVED
'UNIQUE' _non_alpha_ st_RESERVED
'UNLIMITED' _non_alpha_ st_RESERVED
'UNLOCK' _non_alpha_ st_RESERVED
'UNPACKED' _non_alpha_ st_RESERVED
'UNRECOVERABLE' _non_alpha_ st_RESERVED
'UNTIL' _non_alpha_ st_RESERVED
'UNUSABLE' _non_alpha_ st_RESERVED
'UNUSED' _non_alpha_ st_RESERVED
'UPDATABLE' _non_alpha_ st_RESERVED
'UPDATE' _non_alpha_ st_RESERVED
'UPDATED' _non_alpha_ st_RESERVED
'UPPERCASE' _non_alpha_ st_RESERVED
'UPSERT' _non_alpha_ st_RESERVED
'UROWID' _non_alpha_ st_RESERVED
'USAGE' _non_alpha_ st_RESERVED
'USE' _non_alpha_ st_RESERVED
'USER' _non_alpha_ st_RESERVED
'USING' _non_alpha_ st_RESERVED
'VALIDATE' _non_alpha_ st_RESERVED
'VALIDATION' _non_alpha_ st_RESERVED
'VALUE' _non_alpha_ st_RESERVED
'VALUES' _non_alpha_ st_RESERVED
'VARCHAR' _non_alpha_ st_RESERVED
'VARCHAR2' _non_alpha_ st_RESERVED
'VARIABLE' _non_alpha_ st_RESERVED
'VARIANCE' _non_alpha_ st_RESERVED
'VARRAY' _non_alpha_ st_RESERVED
'VARYING' _non_alpha_ st_RESERVED
'VERSIONS' _non_alpha_ st_RESERVED
'VIEW' _non_alpha_ st_RESERVED
'WAIT' _non_alpha_ st_RESERVED
'WHEN' _non_alpha_ st_RESERVED
'WHENEVER' _non_alpha_ st_RESERVED
'WHERE' _non_alpha_ st_RESERVED
'WHILE' _non_alpha_ st_RESERVED
'WITH' _non_alpha_ st_RESERVED
'WITHOUT' _non_alpha_ st_RESERVED
'WNDS' _non_alpha_ st_RESERVED
'WNPS' _non_alpha_ st_RESERVED
'WORK' _non_alpha_ st_RESERVED
'WRITE' _non_alpha_ st_RESERVED
'XID' _non_alpha_ st_RESERVED
'XMLSCHEMA' _non_alpha_ st_RESERVED
'XMLTYPE' _non_alpha_ st_RESERVED
'XOR' _non_alpha_ st_RESERVED
'YEAR' _non_alpha_ st_RESERVED
'ZONE' _non_alpha_ st_RESERVED

%%handler
st_COMMENT_LINE         '[^\n]'?                    '\n'           _discard_
st_COMMENT_STAR         _all_chars_?                '*/'           _use_
st_C_STRING             _all_chars_?                '"'            _use_
// Multi-line strings
st_STRING               _all_chars_?                '\x27'         _use_

%%tokens
st_STRING               __STD_PASCALSTRING
st_NUMBER               __STD_NUMBER_OR_FP
st_IDENTIFIER           '[a-zA-Z_$#\xFF]' '[a-zA-Z_$#0-9\xFF]'? '[^a-zA-Z_$#0-9\xFF]' _discard_

%%map
st_DEFAULT         st_DEFAULT
st_IDENTIFIER      st_IDENTIFIER
st_STRING          st_STRING
st_COMMENT         st_COMMENT
st_COMMENT_LINE    st_COMMENT
st_COMMENT_STAR    st_COMMENT
st_RESERVED        st_RESERVED
st_SYMBOL          st_SYMBOL
st_NUMBER          st_NUMBER
st_C_STRING        st_DEFAULT

st_CUSTOM          st_CUSTOM

st_CUST_KEYWORD    st_RESERVED
st_CUST_COMMENT    st_COMMENT
st_CUST_STRING     st_STRING
st_CUST_NUMBER     st_NUMBER
st_CUST_SYMBOL     st_SYMBOL

