anchor.diff:  	: keyWHERE c=orExpr 				{retval = new WhereExpr($c.retval);};
   		
   orExpr returns [Predicate retval]
  -	: expr1=andExpr (keyOR expr2=orExpr)?		{retval= new OrExpr($expr1.retval, $expr2.retval);;}
  -	//| cond_expr keyOR cond_term
  -	;
  +	: expr1=andExpr (keyOR expr2=orExpr)?		{retval= new OrExpr($expr1.retval, $expr2.retval);;};
   
   andExpr returns [Predicate retval]
  -	: expr1=condFactor (keyAND expr2=andExpr)?	{retval = new AndExpr($expr1.retval, $expr2.retval);}
  -	//| cond_term keyAND cond_factor
  -	;
  +	: expr1=condFactor (keyAND expr2=andExpr)?	{retval = new AndExpr($expr1.retval, $expr2.retval);};
   	
   condFactor returns [Predicate retval]			 
  -	: k=keyNOT? p=condPrimary			{retval = new CondFactor(($k.text != null), $p.retval);}
  -	;
  +	: k=keyNOT? p=condPrimary			{retval = new CondFactor(($k.text != null), $p.retval);};
   
   condPrimary returns [Predicate retval]
   	: simpleCondExpr  				{retval = $simpleCondExpr.retval;}
  
positive.code: 	;
  
  betweenExpr returns [Predicate retval]
  	: a=attribRef[ExprType.NumberType] n=keyNOT? 
  	  keyBETWEEN n1=numberExpr keyAND n2=numberExpr	{retval = new Between(ExprType.NumberType, $a.retval, ($n.text != null), $n1.retval, $n2.retval);}
  	| a=attribRef[ExprType.StringType] n=keyNOT?  
  	  keyBETWEEN s1=stringExpr keyAND s2=stringExpr	{retval = new Between(ExprType.StringType, $a.retval, ($n.text != null), $n1.retval, $n2.retval);}
  	| a=attribRef[ExprType.DateType] n=keyNOT? 
  	  keyBETWEEN d1=dateExpr keyAND d2=dateExpr
  	;
  
  likeExpr 
  	: attribRef[ExprType.StringType] 
  	  keyNOT? keyLIKE pattern_value=stringLiteral; // ('ESCAPE' escape_character=string_literal)?;
  
  inExpr returns [Predicate retval]
  	: a=attribRef[ExprType.NumberType] n=keyNOT? keyIN 
  	  LPAREN i=intItemList RPAREN			{retval = new In(ExprType.NumberType, $a.retval, ($n.text != null), $i.retval);} 
  	| a=attribRef[ExprType.StringType] n=keyNOT? keyIN 
  	  LPAREN s=strItemList RPAREN			{retval = new In(ExprType.StringType, $a.retval, ($n.text != null), $s.retval);} 
  	;
  
  
negative.code: stringExpr returns [Value retval]
  	: s=stringLiteral				{retval = $s.retval;}
  	| f=funcReturningString
  	| a=strAttrib		{retval = $a.retval;}
  	;
  
  booleanExpr returns [Predicate retval]
  