1. What is a compiler? A compiler is a program that reads a program written in one language –the source language and translates it into an equivalent program in another language-the target language. The compiler reports to its user the presence of errors in the source program. 2. What are the two parts of a [...]
Archive for the ‘Compiler Design’ Category
Compiler Design – Set 1 Leave a comment
Compiler Design – Set 3 Leave a comment
What are the benefits of intermediate code generation? A Compiler for different machines can be created by attaching different back end to the existing front ends of each machine. A Compiler for different source languages can be created by proving different front ends for corresponding source languages t existing back end. A machine independent code [...]
Compiler Design – Set 2 Leave a comment
Define parser. Hierarchical analysis is one in which the tokens are grouped hierarchically into nested collections with collective meaning. Also termed as Parsing. Mention the basic issues in parsing. There are two important issues in parsing. · Specification of syntax · Representation of input after parsing. Why lexical and syntax analyzers are separated out? Reasons [...]
Compiler Design – Set 4 Leave a comment
Mention the properties that a code generator should possess. · The code generator should produce the correct and high quality code. In other words, the code generated should be such that it should make effective use of the resources of the target machine. · Code generator should run efficiently. List the terminologies used in basic [...]
Compiler Design – Set 5 Leave a comment
Mention the issues to be considered while applying the techniques for code optimization. · The semantic equivalence of the source program must not be changed. · The improvement over the program efficiency must be achieved without changing the algorithm of the program. What are the basic goals of code movement? To reduce the size of [...]