@Override
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState substitutor, PsiElement lastParent, @NotNull PsiElement place) {
    ASTNode docNode = getDocument().getNode();
    assert docNode != null;
    ASTNode[] nodes = docNode.getChildren(DECLS);
    for (ASTNode node : nodes) {
      if (!processor.execute(node.getPsi(), substitutor)) return false;
    }
    RncGrammar grammar = getGrammar();
    return grammar == null || grammar.processDeclarations(processor, substitutor, lastParent, place);
  }
@Override
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState substitutor, PsiElement lastParent, @NotNull PsiElement place)