Scanning • A process of recognizing the lexical components in a source string • Type-3 grammars: A ::= tB|t or A ::= Bt|t • Type-2 grammars: A ::= π • The lexical…