Size of a context-free grammar Is there a formal definition for a size of a context-free grammar? The only definition I have seen so far is on this wiki page:


  The size of a grammar is the sum of the sizes of its production rules, where the size of a rule is one plus the length of its right-hand side. 


So, how does one define the size of a production rule's RHS? 

For example, if I define my CFG as:

S : A
A : 'a' B | A
B : 'b'


What is the size of the production rule A?
What is your intended application.  The article you cited does give a definition of size.  A production rule

T -> R

has size |R|+1, where |R| is the number of symbols in R.  A more precise definition can be found on page 9 of this document.

This notion of size is meant to compare different grammars that produce the same language.  In particular, in the article you cited, the notion of size is used to see that under grammar transformations, the size of the grammar can explode.