I'm in a models of computation class, and we're just covering formal grammars. As we've defined it, a formal grammar is:
- Some terminal symbols
- Some nonterminal symbols
- A start symbol
- Some production rules
Given that grammars generate strings, it seems possible that you could pick a grammar that would generate another grammar. A few minutes of searching doesn't seem to yield much discussion in this area. My questions mainly are:
- Is this an interesting question in computer science?
- Can you compact grammars by generating grammars that generate them, or is the complexity irreducible?