Unit 1 CD
Unit 1 CD
What is Compiler
Compiler reads the whole source code at once & execute the whole
program even if some error occurs.
Architecture / Structure / phases of compiler.
Type of Translator
1.Compiler
2.Interpreter
An interpreter reads and executes code line-by-line, without
converting it all to machine code at once. It’s like following a recipe
step-by-step while cooking.
An interpreter is a type of translator that converts high level language
into low level language and stop execution in case of error.
3.Assembler
An assembler is a type of translator that translates assembly language
code, which is a low-level but human-readable form of code, directly
into machine code.
Syntax specification
syntax specification defines the grammar rule and structure of
language. It outline how the programmer should write code to confirm
the language rules and be understood by compiler or interpreter.
Input buffering
Input buffering in compilers ensures efficient handling of source code
input, from reading the raw code to tokenizing it for further analysis
and processing. By buffering input data, compilers can optimize
resource utilization, improve performance, and enhance the overall
compilation experience.
Cross Compiler:
Purpose: It's used when you want to develop software for a platform
that's different from the one you're working on.