Microsoft SQL Management Studio highlights some special words coloring them in blue or in pink. I would like to know which rule determines the color to use.

For example, consider the two following statements:

SELECT * FROM myTable
UPDATE myTable SET myFlag = 'X'

SELECT * FROM myTable UPDATE myTable SET myFlag = 'X'

UPDATE is in pink while SET, SELECT, & FROM are in in blue.

Here's the full list of reserved keywords broken up by color:

Reserved Keywords by Color

Operators (Grey)

ALL, AND, ANY, BETWEEN, CROSS, EXISTS, IN, INNER, IS, JOIN, LEFT, LIKE, NOT, NULL, OR, OUTER, PIVOT, RIGHT, SOME, UNPIVOT

System Functions (Magenta)

COALESCE, COLLATE, CONTAINS, CONVERT, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, NULLIF, SESSION_USER, SYSTEM_USER, TSEQUAL, UPDATE

Keywords (Blue)

ADD, ALTER, AS, ASC, AUTHORIZATION, BACKUP, BEGIN, BREAK, BROWSE, BULK, BY, CASCADE, CASE, CHECK, CHECKPOINT, CLOSE, CLUSTERED, COLUMN, COMMIT, COMPUTE, CONSTRAINT, CONTAINSTABLE, CONTINUE, CREATE, CURRENT, CURRENT_DATE, CURSOR, DATABASE, DBCC, DEALLOCATE, DECLARE, DEFAULT, DELETE, DENY, DESC, DISK, DISTINCT, DISTRIBUTED, DOUBLE, DROP, DUMP, ELSE, END, ERRLVL, ESCAPE, EXCEPT, EXEC, EXECUTE, EXIT, EXTERNAL, FETCH, FILE, FILLFACTOR, FOR, FOREIGN, FREETEXT, FREETEXTTABLE, FROM, FULL, FUNCTION, GOTO, GRANT, GROUP, HAVING, HOLDLOCK, IDENTITY, IDENTITYCOL, IDENTITY_INSERT, IF, INDEX, INSERT, INTERSECT, INTO, KEY, KILL, LINENO, LOAD, MERGE, NATIONAL, NOCHECK, NONCLUSTERED, OF, OFF, OFFSETS, ON, OPEN, OPENDATASOURCE, OPENQUERY, OPENROWSET, OPENXML, OPTION, ORDER, OVER, PERCENT, PLAN, PRECISION, PRIMARY, PRINT, PROC, PROCEDURE, PUBLIC, RAISERROR, READ, READTEXT, RECONFIGURE, REFERENCES, REPLICATION, RESTORE, RESTRICT, RETURN, REVERT, REVOKE, ROLLBACK, ROWCOUNT, ROWGUIDCOL, RULE, SAVE, SCHEMA, SECURITYAUDIT, SELECT, SET, SETUSER, SHUTDOWN, STATISTICS, TABLE, TABLESAMPLE, TEXTSIZE, THEN, TO, TOP, TRAN, TRANSACTION, TRIGGER, TRUNCATE, UNION, UNIQUE, UPDATETEXT, USE, USER, VALUES, VARYING, VIEW, WAITFOR, WHEN, WHERE, WHILE, WITH, WRITETEXT