
Introduction 11
important. What will you do with a program
which is not correct according to the syntax of
the source language?
It tells you whether your program adheres
STRICTLY to the rules of a particular
language. These rules are given as a grammar
and a compiler represents this grammar.
1.5 Phases of a Compiler
Most of the modern compilers have the following phases:
c
Pre-processing: Usually, this phase is implemented as a macro processor, with its own macro
language. It provides for file inclusion, conditional compilation control of segments of the source
code, definition of literals, “pragma” commands to the compiler, etc.
c
Lexical ...