anchor.diff:      ;
   
   regexExpression
  -    : REGEX OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE -> ^(REGEX expression+)
  +    : REGEX OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE -> ^(REGEX expression*)
       ;
       
   subStringExpression
  -    : SUBSTR OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE -> ^(SUBSTR expression+)
  +    : SUBSTR OPEN_BRACE expression COMMA expression ( COMMA expression )? CLOSE_BRACE -> ^(SUBSTR expression*)
       ;
       
   existsFunction
  
positive.code: 
  triplesSameSubject
      : varOrTerm propertyListNotEmpty[(CommonTree) $varOrTerm.tree] -> propertyListNotEmpty
      | triplesNode propertyListNotEmpty[(CommonTree) $triplesNode.tree]? -> triplesNode propertyListNotEmpty?
      ;
  
  propertyListNotEmpty[CommonTree subject]
  
negative.code:     ;
      
  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 ) )
      ;
  
  pathPrimary
      : ( iriRef | A | NEGATION pathNegatedPropertySet | OPEN_BRACE path CLOSE_BRACE )
      ;
  
  pathNegatedPropertySet
  