How to convert regular expression to CFG?
There is a simple algorithm to convert regular expressions to context-free grammars. It goes as follows.
Base cases:

$\emptyset$ corresponds to the empty grammar.
$\epsilon$ corresponds to the grammar $S \to \epsilon$.
$\sigma$ (where $\sigma \in \Sigma$) corresponds to the grammar $S \to \sigma$.

Inductive cases:

$r = r_1 + r_2$. Given CFGs for $r_1,r_2$ with disjoint nonterminals and starting symbols $S_1,S_2$, add rules $S \to S_1 \mid S_2$ and make $S$ the new starting symbols.
$r = r_1r_2$. Same, adding the rule $S \to S_1 S_2$ instead.
$r = r_1{}^*$. Same, adding the rules $S \to S S_1 \mid \epsilon$ instead.