For each state
where a is a terminal symbol that matches the current input , add the state
(move the dot over the current symbol). A state produced by scanning is called a scanned state. Scanning ensures that the terminals produced in a derivation match the input string.