Take a look at the definition of regular grammars. The rules can be no more complex than $B \to aC$.

When studying topological groups it is sufficient to show that the maps $f(x) = gx$, for $g \in $ the group $G$ are continuous to prove that the group operation $G \times G \to G$ is then in fact continuous.

Now go back and look at regular grammars. See the connection? The rule or hom that replaces $B$ by $aC$ is of that form. So perhaps defining regular subsets of your CF language $L$ as open sets might suffice.

Also take a look at derivatives of regular expressions. These also relate because $u^{-1}S$ is how the derivative is expressed. That looks a lot like taking the inverse image of $f(x) = ux$!

Derivatives of regular expressions are themselves regular languages, and can be used for optimizing number of DFA states (AFAIC remember).

The reason we use regular languages for open sets was initially that CF languages are not generally closed under intersection.

Let $\Sigma_G$ be the alphabet of the grammar and $\Sigma$ the alphabet of $L$. There is a set of string homs $R = \{\varphi_i\}_{i=1\dots |G|}$ that correspond 1-1 with the grammar rules (the full set - without alternation "$|$"), and such that for every $s \in L$ there exists a sequence of compositions such that $\varphi_1 \circ \varphi_2 \circ \cdots \varphi_{n}(S) = s$, where $S$ is your start symbol. This sequence is not unique in general. For instance, let $\varphi(B) = aC$, and $\varphi= \text{id}$ elsewhere.

Clearly, this sequence of compositions is itself a string homomorphism from $\Sigma_G^* \to L$ and it can be made to fix $\Sigma^*$ (just like CFGs already do by definition).

A topology requires closure under arbitrary union. Good luck with that!

Thus, with the topologies of regular sublanguages as open sets, any string homomorphism is continuous as the inverse homomorphic image of a regular set is also regular. Therefore our "grammar rule homs" are continuous maps as well as any compositions of them where defined.

A corollary is that string concatenation $\cdot $ on $\Sigma'^*$ is a continuous operation, making each $\Sigma'^*$ mentioned above into a topological monoid.