Ok so I'm having difficulty understanding how to Take a regular expression and turn it into a finite state machine..
so heres a problem similar to the one I need to solve..
Say I have a machine that takes £1 coins, dispenses beer(£1) and water(£2)
so the values for a regular expression are;
p = inserting a coin
c = dispense beer
b = dispense water
(Also buttons to dispense cans)
B = beer button
W = water button
and lets say ppWb represents buying water..
REG = (pBc+p(e+p)Wb)* (e is an empty string..)
so how do I derive this into a finite state machine? I can vaguely turn this into a syntax tree, then where do I go from there?
If anyone could give a rough sketch I'd be really grateful..