Analysis of the Alg
Analysis of the Alg
Simulation time = O(size of input string)
Simulation Space=O(size of NFA).
It is inefficient to read the entire program as scanner input. The
scanner converts the characters into token on the fly.
The scanner keeps an internal buffer of bounded size to
hold the largest possible token size and largest lookahead
needed. This is usually much smaller than the entire program.