anchor.diff:      ;
   
   triplesSameSubjectPath
  -    : varOrTerm propertyListNotEmptyPath[(CommonTree) $varOrTerm.tree] -> ^(TRIPLE propertyListNotEmptyPath)
  -    | (t=triplesNode -> $t) (p=propertyListNotEmpty[(CommonTree) $t.tree]? -> ^(TRIPLE $triplesSameSubjectPath $p?))
  +    : varOrTerm propertyListNotEmptyPath[(CommonTree)$varOrTerm.tree] -> ^(TRIPLE propertyListNotEmptyPath)
  +    | triplesNode propertyListNotEmpty[new CommonTree(new CommonToken(BLANK_NODE,"[]"))]? -> ^(TRIPLE  triplesNode (/*^(SUBJECT BLANK_NODE)*/ propertyListNotEmpty)?)
       ;
     
   propertyListNotEmptyPath[CommonTree subject]
  -    : (p=verbPath  objectList[subject, (CommonTree) $p.tree]| v=verbSimple objectList[subject, (CommonTree) $v.tree]) (SEMICOLON (p=verbPath objectList[subject, (CommonTree) $p.tree]  | v=verbSimple  objectList[subject, (CommonTree) $v.tree] )?)* -> objectList+
  -    ;
  -    
  +    : verbSimpleOrPath objectList (SEMICOLON (verbSimpleOrPath objectList)?)* -> (^(SUBJECT {new CommonTree(subject)}) ^(PREDICATE verbSimpleOrPath) objectList)+
  +    ;
  +  
  +verbSimpleOrPath
  +    : verbPath
  +    | verbSimple
  +    ;
  +  
   verbPath
       : path
       ;
  
positive.code:     ;
      
  modify
      : ( WITH i=iriRef )? (deleteClause insertClause? | insertClause) usingClause* WHERE groupGraphPattern -> ^(MODIFY ^(WITH $i)? deleteClause* insertClause* usingClause* ^(WHERE groupGraphPattern))
      ;
    
  deleteClause
  
negative.code:     ;
      	
  path
      : pathSequence ( PIPE pathSequence )* -> ^(PATH pathSequence+)
      ; 
  
  pathSequence
      : pathEltOrInverse ( DIVIDE pathEltOrInverse )* -> ^(PATH_SEQUENCE pathEltOrInverse+)
      ;
  
  pathEltOrInverse
      : INVERSE? pathElt
      ;
         	  	
  pathElt
      : pathPrimary pathMod?
      ;
  
  pathMod
      : ( ASTERISK | QUESTION_MARK | PLUS | OPEN_CURLY_BRACE ( INTEGER ( COMMA ( CLOSE_CURLY_BRACE | INTEGER CLOSE_CURLY_BRACE ) | CLOSE_CURLY_BRACE ) | COMMA INTEGER CLOSE_CURLY_BRACE ) )
      ;
  