anchor.diff:      | constantArray
       ;
   
  -//constantArray
  -//    : LBRACKET i+=constantExpression? (COMMA i+=constantExpression)* RBRACKET -> ^(ARRAY_LITERAL $i*)
  -//    ;
   constantArray
       : LBRACKET i+=constantExpression? (COMMA i+=constantExpression)* RBRACKET
       ;
   
  -// TODO: fix INT L and INT b parsing -- should not permit whitespace between them
  -//scalar_literal
  -//	: TRUE    -> TRUE<LiteralNode>[$TRUE, true]
  -//	| FALSE   -> FALSE<LiteralNode>[$FALSE, false]
  -//	| literalString
  -//	| LONG_INT -> INT<LiteralNode>[$LONG_INT, Long.parseLong($LONG_INT.text.substring(0, $LONG_INT.text.length()-1))]
  -////	| INT 'b' -> INT<LiteralNode>[$INT, Byte.parseByte($INT.text)]
  -//	| INT     -> INT<LiteralNode>[$INT, Integer.parseInt($INT.text)]
  -//	| FLOAT   -> FLOAT<LiteralNode>[$FLOAT, Double.parseDouble($FLOAT.text)]
  -//	;
   scalar_literal
   	: TRUE    
   	| FALSE 
   	| STRING
   	| LONG_INT
  -//	| INT 'b' -> INT<LiteralNode>[$INT, Byte.parseByte($INT.text)]
  -	| INT     
  +	| INT
   	| FLOAT
   	;
   	
  -//literalString
  -//    : STRING -> STRING<LiteralNode>[$STRING, StringUnescaper.unquote($STRING.text)]
  -//    ;
   literalString
   	: STRING
   	;
   
  -//array_parameter
  -//    : AT i=ident {isArrayParameter($i.text)}? -> ^(PARAMETER $i)
  -//    ;
   array_parameter
       : AT i=ident {isArrayParameter($i.ctx)}?
       ;
       
  -// array literal for IN/NOT_IN using SQL syntax
  -//literal_list
  -//    : LPAREN array_parameter RPAREN -> array_parameter
  -//	| LPAREN literal_element (COMMA literal_element)* RPAREN -> ^(ARRAY_LITERAL literal_element+)
  -//	;
   literal_list
   	: LPAREN literal_element (COMMA literal_element)* RPAREN //{return ^(ARRAY_LITERAL literal_element+);}
   	;
  
positive.code:       | annotation VESPA_GROUPING
        ;
  
  //selectvar_statement
  //      : CREATE ('temp' | 'temporary') TABLE ident AS LPAREN source_statement RPAREN -> ^(STATEMENT_SELECTVAR ident source_statement)
  //      ;
  selectvar_statement
        : CREATE ('temp' | 'temporary') TABLE ident AS LPAREN source_statement RPAREN
        ;
  
  
  typename
        : TYPE_BYTE | TYPE_INT16 | TYPE_INT32 | TYPE_INT64 | TYPE_STRING | TYPE_BOOLEAN | TYPE_TIMESTAMP
        | arrayType | mapType | TYPE_DOUBLE
        ;
  
  //arrayType
  //      : TYPE_ARRAY^ LT! typename GT!
  //      ;
  arrayType
        : TYPE_ARRAY LT typename GT
        ;
  
  //mapType
  //      : TYPE_MAP^ LT! typename GT!
  //      ;
  mapType
        : TYPE_MAP LT typename GT
        ;
  
  //output_spec
  //      : (OUTPUT^ AS! ident)
  //      | (OUTPUT! COUNT^ AS! ident)
  //      ;
  output_spec
        : (OUTPUT AS ident)
        | (OUTPUT COUNT AS ident)
        ;
  
  
  query_statement
      : merge_statement
  
negative.code: // This does not use the UNION / UNION ALL from SQL because the semantics are different than SQL UNION
  //   - no set operation is implied (no DISTINCT)
  //   - CQL resultsets may be heterogeneous (rows may have heterogenous types)
  merge_statement
  	:	merge_component (MERGE merge_component)+
  	;
  