anchor.diff:  // 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) ;
  +SINGLE_LINE_COMMENT : '#' ~('\r' | '\n')* NEWLINE? -> type(COMMENT), mode(DEFAULT_MODE);
  +//Need to switch to default mode before pushing so that when the the matching end tag pops, we end back in text mode.
  +BLOCK_COMMENT_START : '*' -> mode(DEFAULT_MODE), pushMode(BLOCK_COMMENT) ;
   DOLLAR2 : '$' ->  mode(REFERENCE), type(DOLLAR) ;
  -DIRECTIVE_TEXT : . -> type(TEXT), popMode ;
  +DIRECTIVE_TEXT : . -> type(TEXT), mode(DEFAULT_MODE) ;
   
   
   //===================================
  
positive.code: 	COMMENT,
  }
  
  DOLLAR : '$' ->  pushMode(REFERENCE) ;
  HASH : '#' -> pushMode(HASH_SEEN) ;
  TEXT : ~('$'| '#')+ ;
  
  fragment IDENTIFIER : [a-zA-Z][a-zA-Z0-9]* ;
  
negative.code: SILENT : '!' ;
  FORMAL_START : '{' -> mode(REFERENCE_FORMAL);
  // "$!!" should be considered as text
  TEXT2 : (. | '!!') -> type(TEXT), mode(DEFAULT_MODE) ;
  
  
  //===================================
  