anchor.diff:  
   MEMBER_INVOCATION : '.' ;
   MEMBER_NAME : IDENTIFIER -> type(IDENTIFIER) , mode(REFERENCE_MEMBER) ;
  -FORMAL_END : '}' -> popMode;
  +FORMAL_END : '}' -> mode(DEFAULT_MODE);
   
   //Handle two references one after the other - e.g. "$one$two""
   DOLLAR5 : '$' -> type(DOLLAR), mode(REFERENCE) ;
   HASH4 : '#' -> mode(HASH_SEEN), type(HASH);
   
   // ".." should be treated as text, not as two MEMBER_INVOCATION tokens
  -REFERENCE_POSSIBLE_MEMBER_TEXT : (. | '..')  -> type(TEXT), popMode ;
  +TEXT4 : (. | '..')  -> type(TEXT), mode(DEFAULT_MODE) ;
   
   //===================================
   //At this point we have a certain member invocation (e.g. "$foo.bar"), but are not yet sure what kind of member invocation it is
  
positive.code: // the parser can distinguish between a textual '#', comments and directives
  mode HASH_SEEN ;
  
  SINGLE_LINE_COMMENT : '#' ~('\r' | '\n')* NEWLINE? -> type(COMMENT), popMode;
  BLOCK_COMMENT_START : '*' -> mode(BLOCK_COMMENT) ;
  DOLLAR2 : '$' ->  mode(REFERENCE), type(DOLLAR) ;
  DIRECTIVE_TEXT : . -> type(TEXT), popMode ;
  
  
  //===================================
  
negative.code: 
  REFERENCE_MEMBER_MEMBER_INVOCATION : '.' -> type(MEMBER_INVOCATION), mode(REFERENCE_POSSIBLE_MEMBER) ;
  METHOD_ARGUMENTS_START : '(' -> pushMode(ARGUMENTS) ;
  REFERENCE_MEMBER_FORMAL_END : '}' -> type(FORMAL_END), mode(DEFAULT_MODE);
  DOLLAR6 : '$' -> type(DOLLAR), mode(REFERENCE) ;
  HASH5 : '#' -> mode(HASH_SEEN), type(HASH);
  TEXT5 : (. | '..')  -> type(TEXT), mode(DEFAULT_MODE) ;
  
  mode ARGUMENTS ;
  METHOD_ARGUMENTS_END : ')' -> popMode ;
  