anchor.diff:      ;
   
   constant returns [ConstantPostAggregator c]
  -    : value=DOUBLE  { double v = Double.parseDouble($value.text); $c = new ConstantPostAggregator(Double.toString(v), v); }
  +    : value=NUMBER  { double v = Double.parseDouble($value.text); $c = new ConstantPostAggregator(Double.toString(v), v); }
       ;
   
   /* time filters must be top level filters */
  
positive.code: import com.metamx.druid.query.filter.*;
  import com.metamx.druid.query.dimension.*;
  import com.metamx.druid.*;
  import com.google.common.base.*;
  import com.google.common.collect.Lists;
  import java.util.*;
  import org.joda.time.*;
  }
  
  @parser::members {
  
negative.code: QUOTED_STRING : '\'' ( ESCqs | ~'\'' )* '\'' ;
  ESCqs : '\'' '\'';
  
  NUMBER: ('+'|'-')?DIGIT*'.'?DIGIT+(EXPONENT)?;
  EXPONENT: ('e') ('+'|'-')? ('0'..'9')+;
  fragment DIGIT : '0'..'9';
  fragment LETTER : 'a'..'z' | 'A'..'Z';
  
  
  WS :  (' '| '\t' | '\r' '\n' | '\n' | '\r')+ -> skip;
  
  