anchor.diff:      -> ^(METATYPES[$IS_OP] type*)
       ;*/
   
  -parameters
  -    : LPAREN (annotatedParameter (COMMA annotatedParameter)*)? RPAREN
  -    //-> ^(PARAMETER_LIST[$LPAREN] annotatedParameter*)
  +parameters returns [ParameterList parameterList]
  +    : LPAREN
  +      { $parameterList=new ParameterList($LPAREN); }
  +      (
  +        ap1=annotatedParameter 
  +        { $parameterList.addParameter($ap1.parameter); }
  +        (
  +          COMMA 
  +          ap2=annotatedParameter
  +          { $parameterList.addParameter($ap2.parameter); }
  +        )*
  +      )? 
  +      RPAREN
  +      //-> ^(PARAMETER_LIST[$LPAREN] annotatedParameter*)
       ;
   
   //special rule for syntactic predicate
  
positive.code: // enforce the rule that the ... appears at the end of the parapmeter
  // list in a later pass of the compiler.
  parameter returns [Parameter parameter]
      : parameterType memberName
        (
            valueParameter? specifier?
          //-> ^(VALUE_PARAMETER_DECLARATION parameterType memberName specifier?)
  
negative.code:     //-> ^(SATISFIED_TYPES[$SATISFIES] type+)
      ;
  
  abstractedType returns [AbstractedType abstractedType]
      : ABSTRACTED_TYPE
        { $abstractedType = new AbstractedType($ABSTRACTED_TYPE); }
        type
        { $abstractedType.setType($type.type); }
      ;
  
  adaptedTypes returns [AdaptedTypes adaptedTypes]
      : ADAPTED_TYPES 
        { $adaptedTypes = new AdaptedTypes($ADAPTED_TYPES); }
        t1=type 
        { $adaptedTypes.addType($t1.type); }
        (
          INTERSECTION_OP 
          t2=type
          { $adaptedTypes.addType($t2.type); }
        )*
      ;
  
  caseTypes returns [CaseTypes caseTypes]
      : CASE_TYPES
        { $caseTypes = new CaseTypes($CASE_TYPES); }
        ct1=caseType 
        { if ($ct1.type!=null) $caseTypes.addType($ct1.type); 
          if ($ct1.instance!=null) $caseTypes.addBaseMemberExpression($ct1.instance); }
        (
          UNION_OP 
          ct2=caseType
        { if ($ct2.type!=null) $caseTypes.addType($ct2.type); 
          if ($ct2.instance!=null) $caseTypes.addBaseMemberExpression($ct2.instance); }
        )*
      ;
  
  caseType returns [SimpleType type, BaseMemberExpression instance]
      : t=type 
        { $type=$t.type;}
      | memberName //-> ^(BASE_MEMBER_EXPRESSION memberName)
        { $instance = new BaseMemberExpression(null);
          $instance.setIdentifier($memberName.identifier); }
      ;
  
  //Support for metatypes
  