How do I derive a regular grammars from this regular expression? How do I derive a regular grammars from this regular expression?

(a or b)*ba(ba)*


I'm stuck with the last part
so

S -&gt; A | B | C
A -&gt; aA | bA
B -&gt; bC
C -&gt; cD
D-&gt;bE ?
E-&gt;af | ^ ?


Any help would be appreciated thanks!
Use Thompson's algorithm to convert the regular expression to a NFA.  Then, you can directly read a regular grammar off, given the NFA: each non-terminal represents one state of the NFA.