
Systems to help with the compiler-writing process are often been referred to as compiler-compilers, compiler-generators or translator-writing systems.
Quiz questions answers compiler design code#
Code generation, along with error handling and symbol- table operations.The back end of compiler includes those portions that depend on the target machine and generally those portions do not depend on the source language, just the intermediate language. Mention the back-end phases of a compiler. Also includes error handling that goes along with each of these phases.ġ1. These includeĪ certain amount of code optimization can be done by the front end as well. The front end consists of those phases or parts of phases that depend primarily on the source language and are largely independent of the target machine. List the phases that constitute the front end of a compiler. Mention some of the cousins of a compiler.ġ0.

The attributes of an identifier cannot be determined by the lexical analyzer.ĩ. Whenever an identifier is detected by a lexical analyzer, it is entered into the symbol table. The data structure allows us to find the record for each identifier quickly and to store or retrieve data from that record quickly. What are the classifications of a compiler?Ī symbol table is a data structure containing a record for each identifier, with fields for the attributes of the identifier. The following are the various phases of a compiler:ħ. Linear analysis is one in which the stream of characters making up the source program is read from left to right and grouped into tokens that are sequences of characters having a collective meaning.Īlso called lexical analysis or scanning.Ħ. Loader/ link editor ←library, relocatable object files Depict diagrammatically how a language is processed. List the subparts or phases of analysis part.Ĥ. The synthesis part constructs the desired target program from the intermediate representation.ģ.The analysis part breaks up the source program into constituent pieces and creates an intermediate representation of the source program.Analysis and Synthesis are the two parts of compilation.What are the two parts of a compilation? Explain briefly. The compiler reports to its user the presence of errors in the source program.Ģ.

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.
