anchor.diff:  	;
   
   between_expr
  -	: attr_field (keyNOT)? keyBETWEEN arithmetic_expr keyAND arithmetic_expr
  -	| attr_field (keyNOT)? keyBETWEEN string_expr keyAND string_expr
  -	| attr_field (keyNOT)? keyBETWEEN datetime_expr keyAND datetime_expr
  +	: attr_field (keyNOT)? keyBETWEEN 
  +	  ((arithmetic_expr keyAND arithmetic_expr)
  +	  | (string_expr keyAND string_expr)
  +	  | (datetime_expr keyAND datetime_expr)
  +	  )
   	;
   
   in_expr	: attr_field (keyNOT)? keyIN LPAREN (in_item (COMMA in_item)*) RPAREN;
   
  -in_item
  -	: string_literal
  -	| numeric_literal
  -	;
  +in_item : string_literal | numeric_literal;
   
   like_expr
  -	: string_expr keyNOT? keyLIKE pattern_value=string_literal ('ESCAPE' escape_character=string_literal)?;
  +	: string_expr keyNOT? keyLIKE pattern_value=string_literal; // ('ESCAPE' escape_character=string_literal)?;
   
   null_comp_expr
   	: attr_field keyIS (keyNOT)? keyNULL;
   
   comp_expr
  -	: attr_field comp_op string_expr
  -	| string_expr comp_op attr_field
  -	| attr_field (EQ | LTGT) boolean_expr
  -	| boolean_expr (EQ | LTGT) attr_field
  -	| attr_field comp_op datetime_expr
  -	| datetime_expr comp_op attr_field
  -	//| entity_expr (EQ | LTGT ) entity_expr
  -	| attr_field comp_op arithmetic_expr
  -	| arithmetic_expr comp_op attr_field
  +	: (attr_field comp_op string_expr)
  +	| (string_expr comp_op attr_field)
  +	| (attr_field comp_op datetime_expr)
  +	| (datetime_expr comp_op attr_field)
  +	| (attr_field comp_op arithmetic_expr)
  +	| (arithmetic_expr comp_op attr_field)
   	;
   
   comp_op	: EQ | GT | GTEQ | LT | LTEQ | LTGT;
  
positive.code: keyOR 		: {AntlrActions.isKeyword(input, "OR")}? ID;
  keyAND 		: {AntlrActions.isKeyword(input, "AND")}? ID;
  keyNOT 		: {AntlrActions.isKeyword(input, "NOT")}? ID;
  keyTRUE 	: {AntlrActions.isKeyword(input, "TRUE")}? ID;
  keyFALSE 	: {AntlrActions.isKeyword(input, "FALSE")}? ID;
  keyBETWEEN 	: {AntlrActions.isKeyword(input, "BETWEEN")}? ID;
  keyNULL 	: {AntlrActions.isKeyword(input, "NULL")}? ID;
  keyLOWER 	: {AntlrActions.isKeyword(input, "LOWER")}? ID;
  
negative.code: 
  string_primary
  	: string_literal
  	| funcs_returning_strings
  	;
  
  datetime_expr
  	: funcs_returning_datetime
  	;
  
  funcs_returning_numerics
  	: keyLENGTH LPAREN string_primary RPAREN
  	| keyABS LPAREN simple_arithmetic_expr RPAREN
  	| keyMOD LPAREN simple_arithmetic_expr COMMA simple_arithmetic_expr RPAREN
  	;
  
  funcs_returning_datetime
  	: keyCURRENT_DATE
  	| keyCURRENT_TIME
  	| keyCURRENT_TIMESTAMP;
  
  funcs_returning_strings
  	: keyCONCAT LPAREN string_primary COMMA string_primary RPAREN
  	| keySUBSTRING LPAREN string_primary COMMA simple_arithmetic_expr COMMA simple_arithmetic_expr RPAREN
  	| keyTRIM LPAREN string_primary RPAREN
  