Hello. I'm taking subject compiler construction. and there is a question and the answer that i don't anderstand.
if it was digit -> [0 - 9] then it would be ->0->1->2->3->4->5->6->7->8->9 final state
digits -> digit+ then it would be ->digit->digit->digit loop final state
but this question i dont understand the solution:
write a transition diagram for scientific number
number → digits (. digits)?(E[+-]? digits)?
the answer:
my question:
why is there a loop before the period? The dot . between 13 and 14, does the period mean something?
why is there a loop at 15? is it because of the question mark? question mark means zero or one
then after the +- I am so lost. as well as the "other" 's and keene star on the "other" 's
why is it looped at 18 not 17 ?
i'm also lost on the bottom arrows. 13 -> 16, 16 -> 18
Sorry for the questions and if the questions really stupid. my lecturer is like a f1 car in class.