I have this grammar
S->aSbA
S->e
A->aB
B->bA
How can i determine if the language is regular? My problem is that A and B doesnt have a terminal character so i dont know what languages it will produce.
I have this grammar
S->aSbA
S->e
A->aB
B->bA
How can i determine if the language is regular? My problem is that A and B doesnt have a terminal character so i dont know what languages it will produce.
There is no general method for this. Regularity is an undecidable problem for context-free languages.
In your specific case, as J Earls has pointed out, the only word you can derive is the empty word. All derivations that use a rule different from S -> e never terminate. Thus the language is finite and therefore regular.