anchor.diff:      | { sign=""; } ('-' {sign = "-"; } )? t=(K_NAN | K_INFINITY) { $constant = cql3::expr::untyped_constant{cql3::expr::untyped_constant::floating_point, sign + $t.text}; }
       ;
   
  -mapLiteral returns [shared_ptr<cql3::term::raw> map]
  +mapLiteral returns [cql3::expr::collection_constructor map]
       @init{std::vector<cql3::expr::expression> m;}
       : '{' { }
  -          ( k1=term ':' v1=term { m.push_back(cql3::expr::tuple_constructor{{cql3::expr::as_expression(k1), cql3::expr::as_expression(v1)}}); }
  -            ( ',' kn=term ':' vn=term { m.push_back(cql3::expr::tuple_constructor{{cql3::expr::as_expression(kn), cql3::expr::as_expression(vn)}}); } )*  )?
  -      '}' { $map = cql3::expr::as_term_raw(cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::map, std::move(m)}); }
  -    ;
  -
  -setOrMapLiteral[shared_ptr<cql3::term::raw> t] returns [shared_ptr<cql3::term::raw> value]
  +          ( k1=term ':' v1=term { m.push_back(cql3::expr::tuple_constructor{{std::move(k1), std::move(v1)}}); }
  +            ( ',' kn=term ':' vn=term { m.push_back(cql3::expr::tuple_constructor{{std::move(kn), std::move(vn)}}); } )*  )?
  +      '}' { $map = cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::map, std::move(m)}; }
  +    ;
  +
  +setOrMapLiteral[cql3::expr::expression t] returns [cql3::expr::collection_constructor value]
   	@init{ std::vector<cql3::expr::expression> e; }
  -    : ':' v=term { e.push_back(cql3::expr::tuple_constructor{{cql3::expr::as_expression(t), cql3::expr::as_expression(v)}}); }
  -          ( ',' kn=term ':' vn=term { e.push_back(cql3::expr::tuple_constructor{{cql3::expr::as_expression(kn), cql3::expr::as_expression(vn)}}); } )*
  -      { $value = cql3::expr::as_term_raw(cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::map, std::move(e)}); }
  -    | { e.push_back(cql3::expr::as_expression(t)); }
  -          ( ',' tn=term { e.push_back(cql3::expr::as_expression(tn)); } )*
  -      { $value = cql3::expr::as_term_raw(cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::set, std::move(e)}); }
  -    ;
  -
  -collectionLiteral returns [shared_ptr<cql3::term::raw> value]
  -	@init{ std::vector<shared_ptr<cql3::term::raw>> l; }
  +    : ':' v=term { e.push_back(cql3::expr::tuple_constructor{{std::move(t), std::move(v)}}); }
  +          ( ',' kn=term ':' vn=term { e.push_back(cql3::expr::tuple_constructor{{std::move(kn), std::move(vn)}}); } )*
  +      { $value = cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::map, std::move(e)}; }
  +    | { e.push_back(std::move(t)); }
  +          ( ',' tn=term { e.push_back(std::move(tn)); } )*
  +      { $value = cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::set, std::move(e)}; }
  +    ;
  +
  +collectionLiteral returns [cql3::expr::expression value]
  +	@init{ std::vector<cql3::expr::expression> l; }
       : '['
  -          ( t1=term { l.push_back(t1); } ( ',' tn=term { l.push_back(tn); } )* )?
  -      ']' { $value = cql3::expr::as_term_raw(
  -                        cql3::expr::collection_constructor{
  -                            cql3::expr::collection_constructor::style_type::list,
  -                            boost::copy_range<std::vector<cql3::expr::expression>>(std::move(l) | boost::adaptors::transformed(cql3::expr::as_expression))
  -                        }); }
  -    | '{' t=term v=setOrMapLiteral[t] { $value = v; } '}'
  +          ( t1=term { l.push_back(std::move(t1)); } ( ',' tn=term { l.push_back(std::move(tn)); } )* )?
  +      ']' { $value = cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::list, std::move(l)}; }
  +    | '{' t=term v=setOrMapLiteral[t] { $value = std::move(v); } '}'
       // Note that we have an ambiguity between maps and set for "{}". So we force it to a set literal,
       // and deal with it later based on the type of the column (SetLiteral.java).
  -    | '{' '}' { $value = cql3::expr::as_term_raw(cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::set, {}}); }
  -    ;
  -
  -usertypeLiteral returns [shared_ptr<cql3::term::raw> ut]
  +    | '{' '}' { $value = cql3::expr::collection_constructor{cql3::expr::collection_constructor::style_type::set, {}}; }
  +    ;
  +
  +usertypeLiteral returns [cql3::expr::expression ut]
       @init{ cql3::expr::usertype_constructor::elements_map_type m; }
  -    @after{ $ut = cql3::expr::as_term_raw(cql3::expr::usertype_constructor{std::move(m)}); }
  +    @after{ $ut = cql3::expr::usertype_constructor{std::move(m)}; }
       // We don't allow empty literals because that conflicts with sets/maps and is currently useless since we don't allow empty user types
  -    : '{' k1=ident ':' v1=term { m.emplace(std::move(*k1), cql3::expr::as_expression(std::move(v1))); } ( ',' kn=ident ':' vn=term { m.emplace(std::move(*kn), cql3::expr::as_expression(std::move(vn))); } )* '}'
  +    : '{' k1=ident ':' v1=term { m.emplace(std::move(*k1), std::move(v1)); } ( ',' kn=ident ':' vn=term { m.emplace(std::move(*kn), std::move(vn)); } )* '}'
       ;
   
   tupleLiteral returns [cql3::expr::expression tt]
       @init{ std::vector<cql3::expr::expression> l; }
       @after{ $tt = cql3::expr::tuple_constructor{std::move(l)}; }
  -    : '(' t1=term { l.push_back(cql3::expr::as_expression(t1)); } ( ',' tn=term { l.push_back(cql3::expr::as_expression(tn)); } )* ')'
  -    ;
  -
  -value returns [::shared_ptr<cql3::term::raw> value]
  -    : c=constant           { $value = cql3::expr::as_term_raw(std::move(c)); }
  -    | l=collectionLiteral  { $value = l; }
  -    | u=usertypeLiteral    { $value = u; }
  -    | t=tupleLiteral       { $value = cql3::expr::as_term_raw(t); }
  -    | K_NULL               { $value = cql3::expr::as_term_raw(cql3::expr::null()); }
  -    | ':' id=ident         { $value = cql3::expr::as_term_raw(new_bind_variables(id)); }
  -    | QMARK                { $value = cql3::expr::as_term_raw(new_bind_variables(shared_ptr<cql3::column_identifier>{})); }
  -    ;
  -
  -intValue returns [::shared_ptr<cql3::term::raw> value]
  +    : '(' t1=term { l.push_back(std::move(t1)); } ( ',' tn=term { l.push_back(std::move(tn)); } )* ')'
  +    ;
  +
  +value returns [cql3::expr::expression value]
  +    : c=constant           { $value = std::move(c); }
  +    | l=collectionLiteral  { $value = std::move(l); }
  +    | u=usertypeLiteral    { $value = std::move(u); }
  +    | t=tupleLiteral       { $value = std::move(t); }
  +    | K_NULL               { $value = cql3::expr::null(); }
  +    | ':' id=ident         { $value = new_bind_variables(id); }
  +    | QMARK                { $value = new_bind_variables(shared_ptr<cql3::column_identifier>{}); }
  +    ;
  +
  +intValue returns [cql3::expr::expression value]
       :
  -    | t=INTEGER     { $value = cql3::expr::as_term_raw(cql3::expr::untyped_constant{cql3::expr::untyped_constant::integer, $t.text}); }
  -    | ':' id=ident  { $value = cql3::expr::as_term_raw(new_bind_variables(id)); }
  -    | QMARK         { $value = cql3::expr::as_term_raw(new_bind_variables(shared_ptr<cql3::column_identifier>{})); }
  +    | t=INTEGER     { $value = cql3::expr::untyped_constant{cql3::expr::untyped_constant::integer, $t.text}; }
  +    | ':' id=ident  { $value = new_bind_variables(id); }
  +    | QMARK         { $value = new_bind_variables(shared_ptr<cql3::column_identifier>{}); }
       ;
   
   functionName returns [cql3::functions::function_name s]
  
positive.code:                                                        if_not_exists);
                }
          | K_JSON
            json_token=jsonValue { json_value = cql3::expr::as_expression($json_token.value); }
              ( K_DEFAULT K_UNSET { default_unset = true; } | K_DEFAULT K_NULL )?
              ( K_IF K_NOT K_EXISTS { if_not_exists = true; } )?
              ( usingClause[attrs] )?
  
negative.code:     : K_INSERT K_INTO cf=columnFamilyName
          ('(' c1=cident { column_names.push_back(c1); }  ( ',' cn=cident { column_names.push_back(cn); } )* ')'
              K_VALUES
              '(' v1=term { values.push_back(v1); } ( ',' vn=term { values.push_back(vn); } )* ')'
              ( K_IF K_NOT K_EXISTS { if_not_exists = true; } )?
              ( usingClause[attrs] )?
                {
  