anchor.diff:      {"^(?i)(NUMERIC)$",                  'NUMERIC'},
       {"^(?i)(LOCAL)$",                    'LOCAL'},
   
  -    {"^(?i)(TUPLE)$",				     'ETUPLE'},
  -    {"^(?i)(BINARY)$",				     'EBINARY'},
  -    {"^(?i)(ATOM)$",				     'EATOM'},
  -    {"^(?i)(IPADDR)$",				     'EIPADDR'},
  -    {"^(?i)(LIST)$",				     'ELIST'},
  -    {"^(?i)(BINSTR)$",				     'EBINSTR'},
  -    {"^(?i)(PID)$",				         'EPID'}, 
  -    {"^(?i)(REF)$",				         'EREF'},
  -    {"^(?i)(FUN)$",				         'EFUN'},
  -    {"^(?i)(STRING)$",				     'ESTRING'},
  -    {"^(?i)(USERID)$",				     'EUSERID'},
  +    {"^(?i)(TUPLE)$",                    'ETUPLE'},
  +    {"^(?i)(BINARY)$",                   'EBINARY'},
  +    {"^(?i)(ATOM)$",                     'EATOM'},
  +    {"^(?i)(IPADDR)$",                   'EIPADDR'},
  +    {"^(?i)(LIST)$",                     'ELIST'},
  +    {"^(?i)(BINSTR)$",                   'EBINSTR'},
  +    {"^(?i)(PID)$",                      'EPID'}, 
  +    {"^(?i)(REF)$",                      'EREF'},
  +    {"^(?i)(FUN)$",                      'EFUN'},
  +    {"^(?i)(STRING)$",                   'ESTRING'},
  +    {"^(?i)(USERID)$",                   'EUSERID'},
   
       {"^(?i)(SET)$",                      'SET'},
  -    {"^(?i)(ALL)$",				        'ALL'},
  -    {"^(?i)(AND)$",				        'AND'},
  -    {"^(?i)(ANY)$",				        'ANY'},
  -    {"^(?i)(AS)$",				        'AS'},
  -    {"^(?i)(ASC)$",				        'ASC'},
  -    {"^(?i)(AUTHORIZATION)$",	        'AUTHORIZATION'},
  -    {"^(?i)(BETWEEN)$",				    'BETWEEN'},
  -    {"^(?i)(BY)$",				        'BY'},
  -    {"^(?i)(CHECK)$",				    'CHECK'},
  -    {"^(?i)(CLOSE)$",				    'CLOSE'},
  -    {"^(?i)(COMMIT)$",				    'COMMIT'},
  -    {"^(?i)(CONTINUE)$",			        'CONTINUE'},
  -    {"^(?i)(CREATE)$",				    'CREATE'},
  -    {"^(?i)(CURRENT)$",				    'CURRENT'},
  -    {"^(?i)(CURSOR)$",				    'CURSOR'},
  -    {"^(?i)(DECIMAL)$",				    'DECIMAL'},
  -    {"^(?i)(DECLARE)$",				    'DECLARE'},
  -    {"^(?i)(DEFAULT)$",				    'DEFAULT'},
  -    {"^(?i)(DELETE)$",				    'DELETE'},
  -    {"^(?i)(DESC)$",				        'DESC'},
  -    {"^(?i)(DISTINCT)$",			        'DISTINCT'},
  -    {"^(?i)(DOUBLE)$",				    'DOUBLE'},
  -    {"^(?i)(ESCAPE)$",				    'ESCAPE'},
  -    {"^(?i)(IF)$",				        'IF'},
  -    {"^(?i)(EXISTS)$",				    'EXISTS'},
  -    {"^(?i)(FETCH)$",				    'FETCH'},
  -    {"^(?i)(FLOAT)$",				    'FLOAT'},
  -    {"^(?i)(FOR)$",				        'FOR'},
  -    {"^(?i)(FOREIGN)$",				    'FOREIGN'},
  -    {"^(?i)(FOUND)$",				    'FOUND'},
  -    {"^(?i)(FROM)$",				        'FROM'},
  +    {"^(?i)(ALL)$",                      'ALL'},
  +    {"^(?i)(AND)$",                      'AND'},
  +    {"^(?i)(ANY)$",                      'ANY'},
  +    {"^(?i)(AS)$",                       'AS'},
  +    {"^(?i)(ASC)$",                      'ASC'},
  +    {"^(?i)(AUTHORIZATION)$",            'AUTHORIZATION'},
  +    {"^(?i)(BETWEEN)$",                  'BETWEEN'},
  +    {"^(?i)(BY)$",                       'BY'},
  +    {"^(?i)(CHECK)$",                    'CHECK'},
  +    {"^(?i)(CLOSE)$",                    'CLOSE'},
  +    {"^(?i)(COMMIT)$",                   'COMMIT'},
  +    {"^(?i)(CONTINUE)$",                 'CONTINUE'},
  +    {"^(?i)(CREATE)$",                   'CREATE'},
  +    {"^(?i)(CURRENT)$",                  'CURRENT'},
  +    {"^(?i)(CURSOR)$",                   'CURSOR'},
  +    {"^(?i)(DECIMAL)$",                  'DECIMAL'},
  +    {"^(?i)(DECLARE)$",                  'DECLARE'},
  +    {"^(?i)(DEFAULT)$",                  'DEFAULT'},
  +    {"^(?i)(DELETE)$",                   'DELETE'},
  +    {"^(?i)(DESC)$",                     'DESC'},
  +    {"^(?i)(DISTINCT)$",                 'DISTINCT'},
  +    {"^(?i)(DOUBLE)$",                   'DOUBLE'},
  +    {"^(?i)(ESCAPE)$",                   'ESCAPE'},
  +    {"^(?i)(IF)$",                       'IF'},
  +    {"^(?i)(EXISTS)$",                   'EXISTS'},
  +    {"^(?i)(FETCH)$",                    'FETCH'},
  +    {"^(?i)(FLOAT)$",                    'FLOAT'},
  +    {"^(?i)(FOR)$",                      'FOR'},
  +    {"^(?i)(FOREIGN)$",                  'FOREIGN'},
  +    {"^(?i)(FOUND)$",                    'FOUND'},
  +    {"^(?i)(FROM)$",                     'FROM'},
       {"^(?i)((GO[\s\t]*TO))$",            'GOTO'},
  -    {"^(?i)(GRANT)$",				    'GRANT'},
  -    {"^(?i)(GROUP)$",				    'GROUP'},
  -    {"^(?i)(HAVING)$",		            'HAVING'},
  -    {"^(?i)(IN)$",				        'IN'},
  -    {"^(?i)(INDICATOR)$",		        'INDICATOR'},
  -    {"^(?i)(INSERT)$",			        'INSERT'},
  -    {"^(?i)(INTO)$",				        'INTO'},
  -    {"^(?i)(IS)$",				        'IS'},
  -    {"^(?i)(KEY)$",				        'KEY'},
  -    {"^(?i)(LANGUAGE)$",		            'LANGUAGE'},
  -    {"^(?i)(LIKE)$",				        'LIKE'},
  -    {"^(?i)(NOT)$",				        'NOT'},
  -    {"^(?i)(NULL)$",				        'NULLX'},
  -    {"^(?i)(OF)$",				        'OF'},
  -    {"^(?i)(ON)$",				        'ON'},
  -    {"^(?i)(OPEN)$",				        'OPEN'},
  -    {"^(?i)(OPTION)$",			        'OPTION'},
  -    {"^(?i)(OR)$",				        'OR'},
  -    {"^(?i)(ORDER)$",				    'ORDER'},
  -    {"^(?i)(PRECISION)$",		        'PRECISION'},
  -    {"^(?i)(PRIMARY)$",			        'PRIMARY'},
  -    {"^(?i)(PRIVILEGES)$",	            'PRIVILEGES'},
  -    {"^(?i)(PROCEDURE)$",		        'PROCEDURE'},
  -    {"^(?i)(PUBLIC)$",			        'PUBLIC'},
  -    {"^(?i)(REAL)$",				        'REAL'},
  -    {"^(?i)(REFERENCES)$",	            'REFERENCES'},
  -    {"^(?i)(ROLLBACK)$",		            'ROLLBACK'},
  -    {"^(?i)(SCHEMA)$",			        'SCHEMA'},
  -    {"^(?i)(SELECT)$",			        'SELECT'},
  -    {"^(?i)(DROP)$",				        'DROP'},
  -    {"^(?i)(RESTRICT)$",		            'RESTRICT'},
  -    {"^(?i)(CASCADE)$",			        'CASCADE'},
  -    {"^(?i)(SOME)$",				        'SOME'},
  -    {"^(?i)(SQLCODE)$",			        'SQLCODE'},
  -    {"^(?i)(TABLE)$",				    'TABLE'},
  -    {"^(?i)(TO)$",				        'TO'},
  -    {"^(?i)(UNIQUE)$",			        'UNIQUE'},
  -    {"^(?i)(UPDATE)$",			        'UPDATE'},
  -    {"^(?i)(USER)$",				        'USER'},
  -    {"^(?i)(VALUES)$",			        'VALUES'},
  -    {"^(?i)(VIEW)$",				        'VIEW'},
  -    {"^(?i)(WHENEVER)$",		            'WHENEVER'},
  -    {"^(?i)(WHERE)$",				    'WHERE'},
  -    {"^(?i)(WITH)$",				        'WITH'},
  -    {"^(?i)(WORK)$",				        'WORK'},
  +    {"^(?i)(GRANT)$",                    'GRANT'},
  +    {"^(?i)(GROUP)$",                    'GROUP'},
  +    {"^(?i)(HAVING)$",                   'HAVING'},
  +    {"^(?i)(IN)$",                       'IN'},
  +    {"^(?i)(INDICATOR)$",                'INDICATOR'},
  +    {"^(?i)(INSERT)$",                   'INSERT'},
  +    {"^(?i)(INTO)$",                     'INTO'},
  +    {"^(?i)(IS)$",                       'IS'},
  +    {"^(?i)(KEY)$",                      'KEY'},
  +    {"^(?i)(LANGUAGE)$",                 'LANGUAGE'},
  +    {"^(?i)(LIKE)$",                     'LIKE'},
  +    {"^(?i)(NOT)$",                      'NOT'},
  +    {"^(?i)(NULL)$",                     'NULLX'},
  +    {"^(?i)(OF)$",                       'OF'},
  +    {"^(?i)(ON)$",                       'ON'},
  +    {"^(?i)(OPEN)$",                     'OPEN'},
  +    {"^(?i)(OPTION)$",                   'OPTION'},
  +    {"^(?i)(OR)$",                       'OR'},
  +    {"^(?i)(ORDER)$",                    'ORDER'},
  +    {"^(?i)(PRECISION)$",                'PRECISION'},
  +    {"^(?i)(PRIMARY)$",                  'PRIMARY'},
  +    {"^(?i)(PRIVILEGES)$",               'PRIVILEGES'},
  +    {"^(?i)(PROCEDURE)$",                'PROCEDURE'},
  +    {"^(?i)(PUBLIC)$",                   'PUBLIC'},
  +    {"^(?i)(REAL)$",                     'REAL'},
  +    {"^(?i)(REFERENCES)$",               'REFERENCES'},
  +    {"^(?i)(ROLLBACK)$",                 'ROLLBACK'},
  +    {"^(?i)(SCHEMA)$",                   'SCHEMA'},
  +    {"^(?i)(SELECT)$",                   'SELECT'},
  +    {"^(?i)(DROP)$",                     'DROP'},
  +    {"^(?i)(RESTRICT)$",                 'RESTRICT'},
  +    {"^(?i)(CASCADE)$",                  'CASCADE'},
  +    {"^(?i)(SOME)$",                     'SOME'},
  +    {"^(?i)(SQLCODE)$",                  'SQLCODE'},
  +    {"^(?i)(TABLE)$",                    'TABLE'},
  +    {"^(?i)(TO)$",                       'TO'},
  +    {"^(?i)(UNIQUE)$",                   'UNIQUE'},
  +    {"^(?i)(UPDATE)$",                   'UPDATE'},
  +    {"^(?i)(USER)$",                     'USER'},
  +    {"^(?i)(VALUES)$",                   'VALUES'},
  +    {"^(?i)(VIEW)$",                     'VIEW'},
  +    {"^(?i)(WHENEVER)$",                 'WHENEVER'},
  +    {"^(?i)(WHERE)$",                    'WHERE'},
  +    {"^(?i)(WITH)$",                     'WITH'},
  +    {"^(?i)(WORK)$",                     'WORK'},
       {"^(?i)(IDENTIFIED)$",               'IDENTIFIED'},
  -    {"^(?i)(EXTERNALLY)$",	            'EXTERNALLY'},
  -    {"^(?i)(GLOBALLY)$",		            'GLOBALLY'},
  -    {"^(?i)(TABLESPACE)$",	            'TABLESPACE'},
  -    {"^(?i)(TEMPORARY)$",		        'TEMPORARY'},
  -    {"^(?i)(PROFILE)$",			        'PROFILE'},
  -    {"^(?i)(EXPIRE)$",			        'EXPIRE'},
  -    {"^(?i)(PASSWORD)$",		            'PASSWORD'},
  -    {"^(?i)(ACCOUNT)$",			        'ACCOUNT'},
  -    {"^(?i)(LOCK)$",				        'LOCK'},
  -    {"^(?i)(UNLOCK)$",			        'UNLOCK'},
  -    {"^(?i)(QUOTA)$",				    'QUOTA'},
  -    {"^(?i)(UNLIMITED)$",		        'UNLIMITED'},
  -    {"^(?i)(ALTER)$",				    'ALTER'},
  -    {"^(?i)(ENTERPRISE)$",	            'ENTERPRISE'},
  -    {"^(?i)(REVOKE)$",			        'REVOKE'},
  -    {"^(?i)(THROUGH)$",			        'THROUGH'},
  -    {"^(?i)(USERS)$",				    'USERS'},
  -    {"^(?i)(ROLE)$",				        'ROLE'},
  -    {"^(?i)(EXCEPT)$",			        'EXCEPT'},
  -    {"^(?i)(NONE)$",				        'NONE'},
  -    {"^(?i)(CONNECT)$",			        'CONNECT'},
  +    {"^(?i)(EXTERNALLY)$",               'EXTERNALLY'},
  +    {"^(?i)(GLOBALLY)$",                 'GLOBALLY'},
  +    {"^(?i)(TABLESPACE)$",               'TABLESPACE'},
  +    {"^(?i)(TEMPORARY)$",                'TEMPORARY'},
  +    {"^(?i)(PROFILE)$",                  'PROFILE'},
  +    {"^(?i)(EXPIRE)$",                   'EXPIRE'},
  +    {"^(?i)(PASSWORD)$",                 'PASSWORD'},
  +    {"^(?i)(ACCOUNT)$",                  'ACCOUNT'},
  +    {"^(?i)(LOCK)$",                     'LOCK'},
  +    {"^(?i)(UNLOCK)$",                   'UNLOCK'},
  +    {"^(?i)(QUOTA)$",                    'QUOTA'},
  +    {"^(?i)(UNLIMITED)$",                'UNLIMITED'},
  +    {"^(?i)(ALTER)$",                    'ALTER'},
  +    {"^(?i)(ENTERPRISE)$",               'ENTERPRISE'},
  +    {"^(?i)(REVOKE)$",                   'REVOKE'},
  +    {"^(?i)(THROUGH)$",                  'THROUGH'},
  +    {"^(?i)(USERS)$",                    'USERS'},
  +    {"^(?i)(ROLE)$",                     'ROLE'},
  +    {"^(?i)(EXCEPT)$",                   'EXCEPT'},
  +    {"^(?i)(NONE)$",                     'NONE'},
  +    {"^(?i)(CONNECT)$",                  'CONNECT'},
   
       % create options
  -    {"^(?i)(CLUSTER)$",			        'CLUSTER'},
  -    {"^(?i)(BAG)$",				        'BAG'},
  -    {"^(?i)(ORDERED_SET)$",	            'ORDERED_SET'},
  +    {"^(?i)(CLUSTER)$",                  'CLUSTER'},
  +    {"^(?i)(BAG)$",                      'BAG'},
  +    {"^(?i)(ORDERED_SET)$",              'ORDERED_SET'},
   
       % AMMSCs
  -    {"^(?i)(AVG)$",				        'AMMSC'},
  -    {"^(?i)(MIN)$",				        'AMMSC'},
  -    {"^(?i)(MAX)$",				        'AMMSC'},
  -    {"^(?i)(SUM)$",				        'AMMSC'},
  -    {"^(?i)(COUNT)$",				    'AMMSC'},
  +    {"^(?i)(AVG)$",                      'AMMSC'},
  +    {"^(?i)(MIN)$",                      'AMMSC'},
  +    {"^(?i)(MAX)$",                      'AMMSC'},
  +    {"^(?i)(SUM)$",                      'AMMSC'},
  +    {"^(?i)(COUNT)$",                    'AMMSC'},
   
       % FUNs
  -    {"^(?i)(TO_CHAR)$",				    'FUNS'},
  -    {"^(?i)(NVL)$",				        'FUNS'},
  -    {"^(?i)(LTRIM)$",				    'FUNS'},
  -    {"^(?i)(TO_DATE)$",				    'FUNS'},
  -    {"^(?i)(UPPER)$",				    'FUNS'},
  -    {"^(?i)(LOWER)$",				    'FUNS'},
  -    {"^(?i)(TRUNC)$",				    'FUNS'},
  -%    {"^(?i)(SYSDATE)$",				    'FUNS'},
  -    {"^(?i)(ABS)$",				        'FUNS'},
  -    {"^(?i)(ACOS)$",				        'FUNS'},
  -    {"^(?i)(ASIN)$",				        'FUNS'},
  -    {"^(?i)(ATAN)$",				        'FUNS'},
  -    {"^(?i)(COS)$",				        'FUNS'},
  -    {"^(?i)(COSH)$",				        'FUNS'},
  -    {"^(?i)(COT)$",				        'FUNS'},
  -    {"^(?i)(SIN)$",				        'FUNS'},
  -    {"^(?i)(SINH)$",				        'FUNS'},
  -    {"^(?i)(TAN)$",				        'FUNS'},
  -    {"^(?i)(TANH)$",				        'FUNS'},
  -    {"^(?i)(ATAN2)$",				    'FUNS'},
  +    {"^(?i)(TO_CHAR)$",                  'FUNS'},
  +    {"^(?i)(NVL)$",                      'FUNS'},
  +    {"^(?i)(LTRIM)$",                    'FUNS'},
  +    {"^(?i)(TO_DATE)$",                  'FUNS'},
  +    {"^(?i)(UPPER)$",                    'FUNS'},
  +    {"^(?i)(LOWER)$",                    'FUNS'},
  +    {"^(?i)(TRUNC)$",                    'FUNS'},
  +    {"^(?i)(SYSDATE)$",                 'FUNS'},
  +    {"^(?i)(ABS)$",                      'FUNS'},
  +    {"^(?i)(ACOS)$",                     'FUNS'},
  +    {"^(?i)(ASIN)$",                     'FUNS'},
  +    {"^(?i)(ATAN)$",                     'FUNS'},
  +    {"^(?i)(COS)$",                      'FUNS'},
  +    {"^(?i)(COSH)$",                     'FUNS'},
  +    {"^(?i)(COT)$",                      'FUNS'},
  +    {"^(?i)(SIN)$",                      'FUNS'},
  +    {"^(?i)(SINH)$",                     'FUNS'},
  +    {"^(?i)(TAN)$",                      'FUNS'},
  +    {"^(?i)(TANH)$",                     'FUNS'},
  +    {"^(?i)(ATAN2)$",                    'FUNS'},
   
       % Logical funs
  -    {"^(?i)(BOOL_AND)$",				    'UFUN'},
  -    {"^(?i)(BOOL_OR)$",				    'UFUN'},
  -    {"^(?i)(SELECTIVITY)$",				'UFUN'},
  -    {"^(?i)(STDDEV_POP)$",				'UFUN'}
  +    {"^(?i)(BOOL_AND)$",                 'UFUN'},
  +    {"^(?i)(BOOL_OR)$",                  'UFUN'},
  +    {"^(?i)(SELECTIVITY)$",              'UFUN'},
  +    {"^(?i)(STDDEV_POP)$",               'UFUN'}
   ]).
   
   match_any(TokenChars, TokenLen, _TokenLine, []) ->
  
positive.code: 
  % strings
  (\'([^\']*(\'\')*)*\')                              : {token, {'STRING', TokenLine, TokenChars}}.
  (\"([^\"]*(\"\")*)*\")  	                        : {token, {'NAME', TokenLine, TokenChars}}.
  
  % hint
  ((\/\*)[^\*\/]*(\*\/))                              : {token, {'HINT', TokenLine, TokenChars}}.
  
negative.code: ([0-9]+)                                            : {token, {'INTNUM', TokenLine, TokenChars}}.
  
  % skips
  ([\s\t\r\n]+)                                       :   skip_token.    %% white space
  
  % comments
  %((\-\-).*[\n])                                     :    {token, {'COMMENT', TokenLine, TokenChars}}.
  ((\-\-).*[\n])                                      :    skip_token.
  
  
  Erlang code.
  -define(TokenPatters, [
  
      % sql joins
      {"^(?i)(UNION)$",                    'UNION'},
      {"^(?i)(INTERSECT)$",                'INTERSECT'},
      {"^(?i)(MINUS)$",                    'MINUS'},
  
      % Data Types (SQL)
      {"^(?i)((N)?CHAR(ACTER)?)$",         'CHARACTER'},
  