anchor.diff:        { $declaration=$aliasDeclaration.declaration; }
       | objectDeclaration
         { $declaration=$objectDeclaration.declaration; }
  -    | (VALUE_MODIFIER LBRACKET) => d1=destructure
  -      { $declaration = $d1.destructure; }
  -    | (VALUE_MODIFIER var ENTRY_OP) => d2=destructure
  -      { $declaration = $d2.destructure; }
       | setterDeclaration
         { $declaration=$setterDeclaration.declaration; }
       | voidOrInferredMethodDeclaration
  
positive.code:             $statement.getCompilerAnnotations().addAll($compilerAnnotations.annotations); }
      ;
  
  declaration returns [Statement declaration]
      @init { MissingDeclaration md = new MissingDeclaration(null); 
              $declaration = md; }
      : annotations
  
negative.code:             ImportList importList = new ImportList(null); 
              $compilationUnit.setImportList(importList); }
      : ( 
          ca=compilerAnnotations
          SEMICOLON
          { $compilationUnit.getCompilerAnnotations().addAll($ca.annotations); }
        )?
        ( 
          importDeclaration 
          { importList.addImport($importDeclaration.importDeclaration); 
            $compilationUnit.connect(importList); }
        |
          (annotatedModuleDescriptorStart) =>
          moduleDescriptor 
          { $compilationUnit.addModuleDescriptor($moduleDescriptor.moduleDescriptor); }
        |
          (annotatedPackageDescriptorStart) =>
          packageDescriptor
          { $compilationUnit.addPackageDescriptor($packageDescriptor.packageDescriptor); }
        |
          toplevelDeclaration
          { if ($toplevelDeclaration.declaration!=null)
                $compilationUnit.addDeclaration($toplevelDeclaration.declaration); }
        | RBRACE
          { displayRecognitionError(getTokenNames(),
                new MismatchedTokenException(EOF, input)); }
        )*
        EOF
      ;
  
  toplevelDeclaration returns [Declaration declaration]
      : ca=compilerAnnotations 
        d=declaration
        { $declaration = $d.declaration;
          if ($declaration!=null)
              $declaration.getCompilerAnnotations().addAll($ca.annotations); }
      ;
  
  annotatedModuleDescriptorStart
      : compilerAnnotations annotations MODULE
      ;
  
  annotatedPackageDescriptorStart
      : compilerAnnotations annotations PACKAGE
      ;
  
  moduleDescriptor returns [ModuleDescriptor moduleDescriptor]
  