anchor.diff:  
   SYM_MATCHES : ([Mm][Aa][Tt][Cc][Hh][Ee][Ss] | [Ii][Ss]'_'[Ii][Nn] | '\u2208');
   
  +SYM_TRUE : [Tt][Rr][Uu][Ee] ;
  +SYM_FALSE : [Ff][Aa][Ll][Ss][Ee] ;
  +
   // ---------- whitespace & comments ----------
   
   WS :        [ \t\r]+      -> skip ;
  
positive.code: fragment DIGIT     : [0-9] ;
  fragment HEX_DIGIT : [0-9a-fA-F] ;
  
  BRACKETS : [()<>=;\[\]{}];
  ARITHMETIC_OPERATORS : [-+*/%^];
  
  
  
  SYM_LIST_CONTINUE: '...' ;
  SYM_INTERVAL_SEP: '..' ;
  
  
  /*mode MATCHES;
  SYM_LPAREN: '{';
  SYM_START: '*' -> mode(DEFAULT_MODE);
  SYM_OTHER: . -> mode(DEFAULT_MODE);
  REGEXP : ('/' SLASH_REGEXP_CHAR* '/' | '^' REGEXP_CHAR* '^') -> mode(DEFAULT_MODE);
  fragment REGEXP_CHAR : ~["\\^\n\r] | REGEXP_ESCAPE_SEQ | UTF8CHAR ;
  fragment REGEXP_ESCAPE_SEQ : '\\' ['"?abfnrtv\\^] ;
  
  
  */
  
  
  
negative.code: // --------------------- primitive types -------------------
  
  TERM_CODE_REF : '[' NAME_CHAR+ ( '(' NAME_CHAR+ ')' )? '::' NAME_CHAR+ ']' ;  // e.g. [ICD10AM(1998)::F23]; [ISO_639-1::en]
  URI : [a-z]+ ':' ( '//' | '/' )? (~[ \t\n>]+)? ; // just a simple recogniser, the full thing isn't required
  
  INTEGER : DIGIT+ E_SUFFIX? ;
  REAL :    DIGIT+ '.' DIGIT+ E_SUFFIX? ;
  fragment E_SUFFIX : [eE][+-]? DIGIT+ ;
  
  STRING : '"' STRING_CHAR*? '"' ;
  fragment STRING_CHAR : ~[\\"] | ESCAPE_SEQ | UTF8CHAR ;
  
  
  CHARACTER : '\'' CHAR '\'' ;
  fragment CHAR : ~[\\'\r\n] | ESCAPE_SEQ | UTF8CHAR  ;
  
  fragment ESCAPE_SEQ: '\\' ['"?abfnrtv\\] ;
  
  // ------------------- character fragments ------------------
  
  