anchor.diff:  	|	a10 = methodReference_lfno_primary {$e = $a10;}
   	;
   
  -// TODO
  -classInstanceCreationExpression returns [ConstructionExpression e]
  -	:	'new' t = typeArguments? a = annotation* id = Identifier
  -        ('.' a2 = annotation* id2 = Identifier)* targs = typeArgumentsOrDiamond?
  +classInstanceCreationExpression returns [Expression e]
  +    locals [Expression methodExpr,
  +            List<Annotation> ans = new ArrayList<>(),
  +            List<Annotation> ans2 = new ArrayList<>()]
  +	:	'new' t = typeArguments? (a = annotation {$ans.add($a)})*
  +        id = Identifier
  +        {
  +            $methodExpr = new IdentifierExpression($id.getText(), $ans);
  +        }
  +        ('.' (a2 = annotation {$ans2.add($a2);})* id2 = Identifier
  +            {
  +                $methodExpr = new AccessExpression($methodExpr,
  +                                                   new IdentifierExpression($id2.getText(),
  +                                                                            $ans2));
  +                $ans2.clear();
  +            }
  +        )*
  +        targs = typeArgumentsOrDiamond?
           '(' l = argumentList? ')' b = classBody?
  -	|	name = expressionName '.' 'new' t = typeArguments? a = annotation*
  +        {$e = new InstantionExpression($t, $methodExpr, $targs, $l, $b);}
  +	|	name = expressionName '.' 'new' t = typeArguments?
  +        (a = annotation {$ans.add($a);})*
           id = Identifier targs = typeArgumentsOrDiamond?
           '(' l = argumentList? ')' b = classBody?
  -	|	p = primary '.' 'new' t = typeArguments? a = annotation* id = Identifier
  +        {
  +            $e = new InstantiationExpression($t, $ans, $id.getText(),
  +                                             $targs, $l, $b);
  +            $e = new AccessExpression($name, $e);
  +        }
  +	|	p = primary '.' 'new' t = typeArguments?
  +        (a = annotation {$ans.add($a);})*
  +        id = Identifier targs = typeArgumentsOrDiamond?
  +        '(' l = argumentList? ')' b = classBody?
  +        {
  +            $e = new InstantiationExpression($t, $ans, $id.getText(),
  +                                             $targs, $l, $b);
  +            $e = new AccessExpression($p, $e);
  +        }
  +	;
  +
  +classInstanceCreationExpression_lf_primary returns [InstantiationExpression e]
  +    locals [List<Annotation> ans = new ArrayList<>();]
  +	:	'.' 'new' t = typeArguments?
  +        (a = annotation {$ans.add($a);})*
  +        id = Identifier targs = typeArgumentsOrDiamond?
  +        '(' l = argumentList? ')'
  +        b = classBody?
  +        {$e = new InstantiationExpression($t, $ans, $id.getText(), $targs, $l, $b);}
  +	;
  +
  +classInstanceCreationExpression_lfno_primary returns [InstantiationExpression e]
  +    locals [Expression methodExpr,
  +            List<Annotation> ans = new ArrayList<>(),
  +            List<Annotation> ans2 = new ArrayList<>()]
  +	:	'new' t = typeArguments? (a = annotation {$ans.add($a)})*
  +        id = Identifier
  +        {
  +            $methodExpr = new IdentifierExpression($id.getText(), $ans);
  +        }
  +        ('.' (a2 = annotation {$ans2.add($a2);})* id2 = Identifier
  +            {
  +                $methodExpr = new AccessExpression($methodExpr,
  +                                                   new IdentifierExpression($id2.getText(),
  +                                                                            $ans2));
  +                $ans2.clear();
  +            }
  +        )*
           targs = typeArgumentsOrDiamond?
           '(' l = argumentList? ')' b = classBody?
  -	;
  -
  -// TODO
  -classInstanceCreationExpression_lf_primary returns [ConstructionExpression e]
  -	:	'.' 'new' t = typeArguments? a = annotation* id = Identifier
  -        targs = typeArgumentsOrDiamond?
  -        '(' l = argumentList? ')'
  -        b = classBody?
  -	;
  -
  -// TODO
  -classInstanceCreationExpression_lfno_primary returns [ConstructionExpression e]
  -	:	'new' t = typeArguments? a = annotation* id = Identifier
  -        ('.' a2 = annotation* id2 = Identifier)*
  -        targs = typeArgumentsOrDiamond?
  +        {$e = new InstantiationExpression($t, $methodExpr, $targs, $l, $b);}
  +	|	name = expressionName '.' 'new' t = typeArguments?
  +        (a = annotation {$ans.add($a);})*
  +        id = Identifier targs = typeArgumentsOrDiamond?
           '(' l = argumentList? ')' b = classBody?
  -	|	name = expressionName '.' 'new' t = typeArguments? a = annotation*
  -        id =Identifier
  -        targs = typeArgumentsOrDiamond?
  -        '(' l = argumentList? ')' b = classBody?
  -	;
  -
  -// TODO
  -typeArgumentsOrDiamond
  -	:	typeArguments
  -	|	'<' '>'
  +        {
  +            $e = new InstantiationExpression($t, $ans, $id.getText(),
  +                                             $targs, $l, $b);
  +            $e = new AccessExpression($name, $e);
  +        }
  +    ;
  +
  +typeArgumentsOrDiamond returns [List<TypeArgument> l]
  +	:	ta = typeArguments {$l = $ta;}
  +	|	'<' '>' {$l = new ArrayList<>(); $l.add(TypeArgument.DIAMOND);}
   	;
   
   fieldAccess returns [AccessExpression e]
  
positive.code: 
  variableDeclarator returns [Pair<String, Expression> p]
  	:	id = variableDeclaratorId ('=' in = variableInitializer)?
          {$p = new Pair($id.text, $in);} // TODO add dims
  	;
  
  variableDeclaratorId returns [Pair<String, Integer> p]
  
negative.code:         (',' ex = expression {$ls.add($ex);})* {$l = $ls;}
  	;
  
  methodReference returns [Expression e]
      locals [MethodReferenceExpression ref;]
  	:	en = expressionName '::' t = typeArguments? id = Identifier
          {$e = new MethodReferenceExpression($en, $id.getText(), $t);}
  	|	r = referenceType '::' t = typeArguments? id = Identifier
          {$e = new MethodReferenceExpression($r, $id.getText(), $t);}
  	|	p = primary '::' t = typeArguments? id = Identifier
          {$e = new MethodReferenceExpression($p, $id.getText(), $t);}
  	|	'super' '::' t = typeArguments? id = Identifier
          {$e = new MethodReferenceExpression(new SuperLiteral(),
                                              $id.getText(),
                                              $t);}
  	|	tn = typeName '.' 'super' '::' t = typeArguments? id = Identifier
          {
              $ref = new MethodReferenceExpression(new SuperLiteral(),
                                                   $id.getText(),
                                                   $t);
              $e = new AccessExpression(new TypeExpression($tn), $ref);
          }
  	|	c = classType '::' t = typeArguments? 'new'
          {$e = new MethodReferenceExpression(new TypeExpression($c), "new", $t);}
  	|	a = arrayType '::' 'new'
          {$e = new MethodReferenceExpression(new TypeExpression($a), "new");}
  	;
  
  // TODO
  