anchor.diff:  dateAttribVar returns [DateValue retval]
   	: {isAttribType(input, FieldType.DateType)}? v=varRef 
   							{retval = (DateValue)this.getValueExpr($v.text);};
  -
  -// Literals		
  -stringLiteral returns [StringValue retval]
  -	: v=QUOTED 					{retval = new StringLiteral($v.text);};
  -	
  -integerLiteral returns [NumberValue retval]
  -	: v=INT						{retval = new IntegerLiteral(Integer.valueOf($v.text));};	
  -
  -booleanLiteral returns [BooleanValue retval]
  -	: t=keyTRUE					{retval = new BooleanLiteral($t.text);}
  -	| f=keyFALSE					{retval = new BooleanLiteral($f.text);}
  -	;
   
   // Functions
   funcReturningDatetime returns [DateValue retval]
  
positive.code: 	| keyMAXDATE LPAREN RPAREN			{retval = new DateLiteral(DateLiteral.Type.MAXDATE);}
  	| keyDATE LPAREN s1=stringValue COMMA s2=stringValue RPAREN
  							{retval = new DateExpr($s1.retval, $s2.retval);}
  	| keyYEAR LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.YEAR, $n.retval);}
  	| keyWEEK LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.WEEK, $n.retval);}
  	| keyDAY LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.DAY, $n.retval);}
  	| keyHOUR LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.HOUR, $n.retval);}
  	| keyMINUTE LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.MINUTE, $n.retval);}
  	| keySECOND LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.SECOND, $n.retval);}
  	| keyMILLI LPAREN n=numberValue RPAREN		{retval = new IntervalExpr(IntervalExpr.IntervalType.MILLI, $n.retval);}
  	;
  
  funcReturningString returns [StringValue retval]
  	: keyCONCAT LPAREN s1=stringValue COMMA s2=stringValue RPAREN
  							{retval = new StringFunction(FunctionType.CONCAT, $s1.retval, $s2.retval);}
  	| keySUBSTRING LPAREN s=stringValue COMMA n1=numberValue COMMA n2=numberValue RPAREN
  							{retval = new Substring($s.retval, $n1.retval, $n2.retval);}
  	| keyTRIM LPAREN s=stringValue RPAREN		{retval = new StringFunction(FunctionType.TRIM, $s.retval);}
  	| keyLOWER LPAREN s=stringValue RPAREN		{retval = new StringFunction(FunctionType.LOWER, $s.retval);} 
  
negative.code: options {backtrack=true;}	
  	: d1=dateValue n=keyNOT? keyBETWEEN d2=dateValue keyAND d3=dateValue
  							{retval = new DateBetweenStmt($d1.retval, ($n.text != null), $d2.retval, $d3.retval);}
  	| n1=addExpr n=keyNOT? keyBETWEEN n2=addExpr keyAND n3=addExpr		
  							{retval = new NumberBetweenStmt($n1.retval, ($n.text != null), $n2.retval, $n3.retval);}
  	| s1=stringValue n=keyNOT? keyBETWEEN s2=stringValue keyAND s3=stringValue		
  							{retval = new StringBetweenStmt($s1.retval, ($n.text != null), $s2.retval, $s3.retval);}
  