You are on page 1of 6

Compilers

Compilers

Source Program Target Program


Compiler

Error Message
Phases of Compiler
Basic Compiler Functions
 A high level programming language is
usually described in terms of ‘Grammar’.
 Grammar specify the syntax of legal
statements.
 For example, the syntax of assignment
statement is
 <Variable_Name> = <Expression>

 So, compilation is for matching statements


to the structure defined by grammar.
Modeling scanners as finite
automata
 Finite Automaton: collection of finite set of
states and a set of transitions.

You might also like