viva questions for compiler design lab pdf
#1

[size=[/size]medium]
need viva quetions for compiler design
Reply
#2

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 informs its user of errors in the source program.

2. What are the two parts of a compilation? Explain briefly.
Analysis and synthesis are the two parts of the compilation.
The analysis part divides the source program into constituent parts and creates an intermediate representation of the source program.
The synthesis part constructs the desired target program from the intermediate representation.

3. List the sub-parts or phases of the analysis part.
The analysis consists of three phases:
• Linear analysis.
• Hierarchical analysis.
• Semantic Analysis.

4. Schematically represent how a language is processed.
Skeletal Supply Program
Preprocessor
Source program
Compiler
Objective assembly program
Assembler
Relocatable machine code
Loader / link editor ← library, relocatable object files
Absolute machine code

5. What is linear analysis?
Linear analysis is one in which the character stream that makes up the source program is read from left to right and is grouped into tabs that are sequences of characters that have a collective meaning.
Also called lexical analysis or scanning.

6. List the various phases of a compiler.
The following are the various phases of a compiler:
• Lexical Analyzer
• Syntax Analyzer
• Semantic Analyzer
• Intermediate Code Generator
• Code Optimizer
• Code generator

7. What are the classifications of a compiler?
Compilers are categorized into:
• • One step
• • Multipass
• • Loading and moving
• • Debugging or optimization

8. What is a symbol table?
A symbol table is a data structure that contains a record for each identifier, with fields for the attributes of the identifier. The data structure allows us to quickly find the record of each identifier and store or retrieve data from that record quickly.
Each time an identifier is detected by a lexical analyzer, it is entered in the symbol table. The attributes of an identifier can not be determined by the lexical analyzer.

9. Mention some of the cousins of a compiler.
The cousins of the compiler are:
• • Preprocessors
• • Assemblers
• • Link Loaders and Editors

10. List the phases that make up the front of a compiler.
The forward end consists of those phases or parts of phases that depend primarily on the source language and are largely independent of the target machine. These include
• • Lexical and syntactic analysis
• • Creating the symbol table
• • Semantic analysis
• Intermediate Code Generation
A certain amount of code optimization can be done by the front too. It also includes the handling of errors that accompanies each of these phases.

11. Mention the back-end phases of a compiler.
The back end of the compiler includes those portions that depend on the target machine and generally those portions do not depend on the source language, only the intermediate language. These include
• • Code optimization
• Code generation, along with error handling and symbol operations.



12. Define compiler-compiler.
Systems that help with the compiler's writing process are often referred to as compiler-compilers, compiler-generators, or write-translator systems.
They are largely oriented around a particular model of languages, and are apt to generate similar language model compilers.

13. List the various compiler building tools.
The following is a list of some compiler building tools:
• • Analyzer Generators
• • Scanner Generators
• • Syntax-driven translation mechanisms
• • Automatic code generators
• • Data Flow Motors

14. Differentiate symbols, patterns, lexemes.
• • Tokens - Sequence of characters that have a collective meaning.
• • Patterns: There is a set of strings in the input for which the same token is output. This set of strings is described by a rule called pattern associated with the token
• Lexeme- A sequence of characters in the source program that matches the pattern of a token.

15. List operations in languages.
• • Union - L U M = {s | S is in L or s is in M}
• • Concatenation - LM = {st | S is in L and t is in M}
• • Closure Kleene - L * (zero or more L concatenations)
• • Positive Closure - L + (one or more L concatenations)

16. Type a regular expression for an identifier.
An identifier is defined as a letter followed by zero or more letters or digits.
The regular expression for an identifier is given as
Letter (letter | digit) *

17. Mention the various notation abbreviations to represent regular expressions.
• • One or more instances (+)
• • Zero or an instance (?)
• • Character classes ([abc] where a, b, c are symbols of the alphabet denotes the regular expressions a | b | c.)
• • Non-regular assemblies

18. What is the function of a hierarchical analysis?
The hierarchical analysis is one in which the fiches are grouped hierarchically in nested collections with collective meaning.
Also called Parsing.

19. What does a semantic analysis do?
Semantic analysis is one in which certain checks are made to ensure that the components of a program fit in a meaningful way.
Mainly performs type checking.

20. List the different error recovery strategies for a lexical analysis.
Possible error recovery actions are:
• • Recovery in panic mode
• • Elimination of a strange character
• • Insert a missing character
• • Replacing an incorrect character with a correct character
• • Transpose two adjacent characters
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: compiler design interview questions and answers pdf, electrodynamics quetions, compiler design objective questions and answers pdf, compiler design viva basic questions, enterview quetions, compiler design viva questions wiyh answers, compiler construction dhamdhere pdf,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  design and fabrication of welding slag cleaning machine 4 9,126 17-03-2018, 02:58 PM
Last Post: Guest
  renewable energy design application in water cooler ppt 1 9,100 16-03-2018, 06:04 PM
Last Post: Guest
  interview questions with answer with a ration shop owner 2 1,975 12-02-2018, 03:15 PM
Last Post: Guest
  ppt on design and implementation of intelligent campus security tracking system based on rfid and zigbee 7 16,059 09-02-2018, 02:20 PM
Last Post: udaya
  viva questions and answers for fluid mechanics lab 2 8,774 16-12-2017, 11:45 PM
Last Post: dhiraj prajapati
  aptitude questions in ihorse technologies 5 2,495 16-12-2017, 09:59 AM
Last Post: jaseela123d
  physics lab viva questions with answers for b tech 1st year 6 15,539 08-12-2017, 10:26 AM
Last Post: jaseela123d
  viva questions for energy conversion engineering lab pdf 3 2,140 27-11-2017, 09:15 AM
Last Post: pawan
  b tech 1st year physics lab viva questions 3 2,721 07-11-2017, 11:11 AM
Last Post: jaseela123d
Heart ansys 10 viva questions and answers 2 6,156 22-10-2017, 10:27 AM
Last Post: Guest

Forum Jump: