Lexical Analysis - Scanner

> Code - (Programming|Computer) Language > Computer Language - (Compiler|Interpreter) - Language translator

Table of Contents

1 - About

A scanner reads a source file (backwards or forwards) and returns one token at a time.

  • Lexical Scanner that returns token are known as lexer.
  • Low level scanner that works one character at a time are the foundation of lexer. Optionally, they can and keep track of which line number and character is currently being read.