anchor.diff:      ;
   
   TAG_CLOSE
  -    :   { tagMode }?=> '>' { tagMode = false; }
  +    :   { tagMode && !attrMode }?=> '>' { tagMode = false; }
       ;
   
   TAG_END
  -    :   { tagMode }?=> '/>' { tagMode = false; }
  +    :   { tagMode && !attrMode }?=> '/>' { tagMode = false; }
       ;
   
   ATTR_EQ
  
positive.code:     ;
  
  FLOAT
      :   DIGITS '.' DIGITS EXPONENT? 'f'
      ;
  
  fragment
  
negative.code:         -> TYPENAME[$t, $t.text];
  
  expression
  	:   or_test
      ;
  
  or_test
  	:   and_test (OP_LOGICAL_OR e2=and_test)*
      ;
  
  and_test
      :   not_test (OP_LOGICAL_AND not_test)*
      ;
  
  not_test
  	:   OP_NOT not_test
  	|   comparison
  	;
  
  comparison
      :   or_expr (comp_op or_expr)*
      ;
  
  comp_op
  	:   OP_EQ
  	|   OP_NEQ
  	|   OP_GT
  	|   OP_LT
  	|   OP_GTEQ
  	|   OP_LTEQ
  	;
  
  or_expr
      : and_expr (OP_BITWISE_OR and_expr)*
  	;
  
  and_expr
      : shift_expr (OP_BITWISE_AND shift_expr)*
  	;
  
  shift_expr
      : arith_expr ((OP_LEFTSHIFT|OP_RIGHTSHIFT) arith_expr)*
  	;
  
  arith_expr
      : term ((OP_PLUS|OP_MINUS) term)*
  	;
  
  term
      : atom ((OP_MULTIPLY | OP_DIVIDE | OP_MODULO) atom)*
  	;
  
  atom
      :   NAME
      |   INT
      |   FLOAT
      |   LBRACKET expression RBRACKET
      ;
  
  /*------------------------------------------------------------------
  