I want to construct a grammar for the following regular expression: $1^*0^*1(1+0)^*$. I did it the following way:
$S \rightarrow AB1C$
$A \rightarrow 1A | \epsilon$
$B \rightarrow 0B | \epsilon$
$C \rightarrow 0C|1C| \epsilon$
Is it correct?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityI want to construct a grammar for the following regular expression: $1^*0^*1(1+0)^*$. I did it the following way:
$S \rightarrow AB1C$
$A \rightarrow 1A | \epsilon$
$B \rightarrow 0B | \epsilon$
$C \rightarrow 0C|1C| \epsilon$
Is it correct?