According to the definition - "A grammar is regular if it is either left linear or right linear."
Now, "Set of all strings over {a, b} starting with an 'a' and ending with a 'b'" represents a regular language.
Regular Expression - a(a+b)*b
It's grammar is given by -
S -> aAb
A -> aA/bA/$\epsilon$
Here, A is right linear, but what about S?
This grammar is regular, but I can' realize if S is right linear. What does this mean?
Is the grammar not regular? (I don't think that's possible as the language is regular)
Or, are there any exceptions in rules of regular grammar?
Please explain. Thanks!