Professional Documents
Culture Documents
maneesh_rajsingh@yahoo.com
Lexical Analysis
In the first pass of the compiler, the source code is
passed through a lexical analyzer, which converts the
source code to a set of tokens. A token is generally a
number representing some keyword in the language. A
compiler has a unique number for each keyword (i.e. IF,
WHILE, END), and each arithmetic or logical operator (i.e.
+, -, *, AND, OR, etc.). Numbers are represented by a
token which indicates that what follows it should be
interpreted as a number. The tokens put the programming
language into a form that can be checked for proper
structure and order.
Syntax Analysis
Code Generation