anchor.diff:          | TAG_END
           )
           SHORTDOC*
  -        // has_cond
  -        -> {has_ver1 && has_ver2 && has_cond}?
  +        // has_cond && has_vercond
  +        -> {has_ver1 && has_ver2 && has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                    ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                        ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                            $ver1 $ver2)
  +                        $cond)
  +                    $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        -> {has_ver1 && !has_ver2 && has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                    ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                        $ver1 $cond)
  +                    $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        -> {!has_ver1 && has_ver2 && has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                    ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                        $ver2 $cond)
  +                    $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        -> {!has_ver1 && !has_ver2 && has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"] $cond $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        // !has_cond && has_vercond
  +        -> {has_ver1 && has_ver2 && !has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                    ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
  +                        $ver1 $ver2)
  +                    $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        -> {has_ver1 && !has_ver2 && !has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"] $ver1 $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        -> {!has_ver1 && has_ver2 && !has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"] $ver2 $vercond)
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        -> {!has_ver1 && !has_ver2 && !has_cond && has_vercond}?
  +           ^(IF[$TAG_START_ADD, "if"]
  +                $vercond
  +                ^(FIELDDEF ^(DOC $doc?) $type $name))
  +        // has_cond && !has_vercond
  +        -> {has_ver1 && has_ver2 && has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
                       ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"]
                           $ver1 $ver2)
                       $cond)
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  -        -> {has_ver1 && !has_ver2 && has_cond}?
  +        -> {has_ver1 && !has_ver2 && has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"] $ver1 $cond)
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  -        -> {!has_ver1 && has_ver2 && has_cond}?
  +        -> {!has_ver1 && has_ver2 && has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"] $ver2 $cond)
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  -        -> {!has_ver1 && !has_ver2 && has_cond}?
  +        -> {!has_ver1 && !has_ver2 && has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   $cond
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  -        // !has_cond
  -        -> {has_ver1 && has_ver2 && !has_cond}?
  +        // !has_cond && !has_vercond
  +        -> {has_ver1 && has_ver2 && !has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   ^(OP_LOGICAL_AND[$TAG_START_ADD, "and"] $ver1 $ver2)
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  -        -> {has_ver1 && !has_ver2 && !has_cond}?
  +        -> {has_ver1 && !has_ver2 && !has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   $ver1
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  -        -> {!has_ver1 && has_ver2 && !has_cond}?
  +        -> {!has_ver1 && has_ver2 && !has_cond && !has_vercond}?
              ^(IF[$TAG_START_ADD, "if"]
                   $ver2
                   ^(FIELDDEF ^(DOC $doc?) $type $name))
  
positive.code:         | {has_ver1=true;} ver1=attr_expression_ver1
          | {has_ver2=true;} ver2=attr_expression_ver2
          | {has_cond=true;} cond=attr_expression_cond
          | attr_expression_default
          | anyattribute
          )*
  
negative.code: 
  attr_expression_cond
      :   NAME_COND! ATTR_EQ! ATTR_VALUE_START! expression ATTR_VALUE_END!
      ;
  
  attr_expression_vercond
      :   NAME_VERCOND! ATTR_EQ! ATTR_VALUE_START! expression ATTR_VALUE_END!
      ;
  
  attr_expression_default
  