I have this language
$L = \{a^{n}b^{3n}c^{2m} : m,n \ge 1\}$.
I have to determine a free context grammar that generates L. Looks easy BUT i have a question about the grammar I found. First things first, this is my grammar:
$S \Rightarrow BC$
$ B \Rightarrow aBbbb\ \backslash \ abbb $
$ C \Rightarrow Ccc \ \backslash \ cc$
Looks easy and clean to me. I already tested it with strings of different lengths and seems working just fine. Also it does indeed create only strings contained in L and no other strings.
My question is:
This is the first time I generate a grammar without any production containing $S$ itself (An example would be adding $S \Rightarrow B$ and I would solve my problem, because B generates only $a$'s and $b$'s and the number of this chars is dipendent between one another but indipendent with the number of $c$'s inside the string).
Recursively speaking, this works just fine but using $S$ would induce me to create a noncontracting language (because I'd be forced to invert some Non Terminals in order to produce both $a$'s and $b$'s correctly if something is wrong in my grammar). Is this way of creating grammars correct? Can I describe what I wrote as an actual "grammar"? Is it context free?
Also, can I actually derivate $a$ through $B$ without a nonterminal $A$ and without generating it with the $S$ production?