anchor.diff:  fragment DIGIT     : [0-9] ;
   fragment HEX_DIGIT : [0-9a-fA-F] ;
   
  -BRACKETS : [()<>=;\[\]{}];
  -ARITHMETIC_OPERATORS : [-+*/%^];
  -
  -
  +BRACKETS : [()<>\[\]{}];
  +ARITHMETIC_OPERATORS : [-+*/%^=];
  +MISC : [;];
   
   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\\^] ;
  +DATE_CONSTRAINT_PATTERN :       YEAR_PATTERN '-' MONTH_PATTERN '-' DAY_PATTERN ;
  +TIME_CONSTRAINT_PATTERN :       HOUR_PATTERN ':' MINUTE_PATTERN ':' SECOND_PATTERN ;
  +DATE_TIME_CONSTRAINT_PATTERN :  DATE_CONSTRAINT_PATTERN 'T' TIME_CONSTRAINT_PATTERN ;
  +DURATION_CONSTRAINT_PATTERN :   'P' [yY]?[mM]?[Ww]?[dD]? ('T' [hH]?[mM]?[sS]?)? ;
  +
  +// date time pattern
  +fragment YEAR_PATTERN:	 		('yyy' 'y'?) | ('YYY' 'Y'?);
  +fragment MONTH_PATTERN:	        'mm' | 'MM' | '??' | 'XX';
  +fragment DAY_PATTERN:			'dd' | 'DD' | '??' | 'XX';
  +fragment HOUR_PATTERN:			'hh' | 'HH' | '??' | 'XX';
  +fragment MINUTE_PATTERN:	    'mm' | 'MM' | '??' | 'XX';
  +fragment SECOND_PATTERN:		'ss' | 'SS' | '??' | 'XX';
   
   
  -*/
   
  -
  
positive.code: ARCHETYPE_REF       : ARCHETYPE_HRID_ROOT '.v' INTEGER ( '.' DIGIT+ )* ;
  ARCHETYPE_HRID_ROOT : (NAMESPACE '::')? IDENTIFIER '-' IDENTIFIER '-' IDENTIFIER '.' IDENTIFIER ;
  
  NAMESPACE           : LABEL ('.' LABEL)+ ;
  fragment LABEL      : ALPHA_CHAR ( NAME_CHAR* ALPHANUM_CHAR )? ;
  fragment IDENTIFIER : ALPHA_CHAR WORD_CHAR* ;
  VERSION_ID : DIGIT+ DOT_SEGMENT DOT_SEGMENT (('-rc' | '-alpha') DOT_SEGMENT? )? ;
  
negative.code: 
  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 ;
  