By grammar I mean a formal language grammar such as
$$ A \to aaBa \\ B \to bB | a $$
You can define a tree recursively as, letting $T= $ set of all trees, as $T = \bullet \times SEQ(T)$, where $SEQ(T) = $ set of all non-empty sequences in $T$ (to see this a tree is a root node $\bullet$ connected (hence $\times$) to a finite sequence of child trees (some element of $SEQ(T)$), and from there compute the ordinary generating function $G(z)$ for it. That is an example of a useful combinatorial construction of a tree.
Well, naively we could define a context-free grammar (CFG) $g$ as a sequence $g_1 \cdots g_n$ of elements from either our terminal alphabet $\Sigma$ or the $G$, the set of all CFGs. Then we can define the size of $g$, $|g|$ to be the length of its immediate sequence $g_1 \cdots g_n$, $n$, plus the size of each of the CFG objects it refers to in its sequence.
One question, why don't I need to take the cartesian product with something as in $\bullet \times SEQ(T)$?
Anyway, that definition of grammar size is the same usual one defined by smallest grammar research.
So we said $G = SEQ(G \cup \Sigma)$. How does that help us compute the OGF of $G$? Well $SEQ(A)(z) = \frac{A(z)}{1-A(z)}$ can be found when $SEQ(A)$ is defined to be all non-empty sequences of objects in class $A$.
Thus, $G(z) = \frac{G(z) + \Sigma(z)}{1 - G(z) - \Sigma(z)}$.
I don't know where to take it from here or if that was a useful construction. But that's a sample of what I meant in the title.
Thanks.