The language of all context-free sets of rules will normally be regular. Depending a bit on your exact definitions and your representation of the rules, you basically only have to check whether all left-hand sides are of length one and whether the format of the set is correct.
((S,ab),(S,aSb))
might be a string of that language for the set with the rules S->ab
and S->aSb
. The parentheses never nest deeper than 2, so you do not need a stack. If you really mean the "set consisting of: production rules of Grammars" you alny have strings with singular rules as (S,ab)
, which is even easier.
Concerning the set of strings which are not of the form t#t, its complement is well-known not to be context-free. As CFL is not closed under complement, this does not mean anything, though. You can find an answer here.