compiler
TRANSCRIPT
What is a What is a CompilerCompiler ? ?
•Compiler is a translator program that converts a High level Compiler is a translator program that converts a High level programming language to machine language.programming language to machine language.•Machine Language consists of 1 and 0 i.e. ,ON &OFF.Machine Language consists of 1 and 0 i.e. ,ON &OFF.
How Compiler CompilesHow Compiler Compiles
COMPILERINPUT(SOURCE PROGRAM)
OUTPUT(MACHINE LANGUAGE
PROGRAM)
Features of a CompilerFeatures of a Compiler
A Compiler could understand it's own A Compiler could understand it's own language not other compilers language not other compilers language.language.
For example, A C Compiler does not For example, A C Compiler does not understand a Java Source Program.understand a Java Source Program.
Compiler will check for Syntax Errors Compiler will check for Syntax Errors in Source Programs.in Source Programs.
Execution of a CompilerExecution of a Compiler
Secondary StroargeWhere Compiler is stored
Primary Memory
Features of CompilerFeatures of Compiler
Translation of High Level Language to Translation of High Level Language to Machine Language.Machine Language.
Detect errors in source program i.e. Detect errors in source program i.e. encountered due to mistake in editing.encountered due to mistake in editing.
These errors are called These errors are called Syntax ErrorsSyntax Errors..
Start
Edit Source Program
Compile Source Program
SyntaxErrors
Detected ?
Genrerate list of coded error msgs.
Genrerate Object Program
STOP
NO
YES