anchor.diff:      ;
       	
   selectClause
  -    : SELECT ( DISTINCT | REDUCED )? ASTERISK -> ^(SELECTCLAUSE DISTINCT* REDUCED* ASTERISK)
  -    | SELECT ( DISTINCT | REDUCED )? (v+=selectVariables)+ -> ^(SELECTCLAUSE DISTINCT* REDUCED* $v*)
  +    : SELECT ( DISTINCT | REDUCED )? ASTERISK -> ^(SELECT_CLAUSE DISTINCT* REDUCED* ASTERISK)
  +    | SELECT ( DISTINCT | REDUCED )? (v+=selectVariables)+ -> ^(SELECT_CLAUSE DISTINCT* REDUCED* $v*)
       ;
   
   selectVariables
  
positive.code:     ;
  
  groupClause
      : GROUP BY groupCondition+ -> ^(GROUPBY groupCondition+)
      ;
      		 
  groupCondition
  
negative.code: 
  triplesSameSubjectPath
      : varOrTerm propertyListNotEmptyPath[(CommonTree) $varOrTerm.tree] -> ^(TRIPLE propertyListNotEmptyPath)
      | (t=triplesNode -> $t) (p=propertyListNotEmpty[(CommonTree) $t.tree]? -> ^(TRIPLE $triplesSameSubjectPath $p?))
      ;
    
  propertyListNotEmptyPath[CommonTree subject]
  