How can I convert the regular expression (ab*)*b to a context-free grammar?
When I look for examples I keep seeing plus signs in the expression but I don’t have any. Is that just a different way of writing it?
How can I convert the regular expression (ab*)*b to a context-free grammar?
When I look for examples I keep seeing plus signs in the expression but I don’t have any. Is that just a different way of writing it?
There is a simple algorithm to convert regular expressions to context-free grammars. It goes as follows.
Base cases:
Inductive cases: