Flat 50% off on all training & certification courses. Limited time offer Explore courses

Use these filters to find papers

  Question
1

(a) Show that the given Grammar is LL(1) but not SLR(1)

    

This question has 0 answers so far.
0

What is the significance of symbol table in compiler? What information is represented by symbol tables? Explain the data structure used for symbol tables. 

This question has 0 answers so far.
0

Attempt  question.

(h) Perform recursive descent parsing over the input mpp for the grammar.

                       

This question has 0 answers so far.
0

Attempt  question.

(g) Define FIRST and FOLLOW sets for a grammar.

This question has 0 answers so far.
0

Attempt  question.

(f) What are the advantages of performing the LR parsing?

This question has 0 answers so far.
0

Attempt  question.

e) Define ambiguity in a grammar.

This question has 0 answers so far.
0

Attempt  question.

(d) What compiler check during the syntax analysis? Mention the role of parser with the help of suitable figure during the syntax analysis

This question has 0 answers so far.
0

Attempt  question.

(c) Mention the role of Lexical Analyser in compiler design.

This question has 0 answers so far.
0

Attempt  question.

(b) Design the Finite Automata for the regular expression a(a + b)a.

This question has 0 answers so far.
0

Attempt  question.

(a) Distinguish between compiler and interpreter. Define Cross Compiler and identify the few cases where such cross compiler will be useful.

This question has 0 answers so far.
0

Draw the Syntax Tree and DAG for the expression (a*b) + (c-d) * (a*b) + b 

This question has 0 answers so far.
0

What are the criteria that need to be considered while applying the code optimization technique? Mention the issues involved in designing of code generation. 

This question has 0 answers so far.
0

What is activation record? Briefly outline Run time storage administration. Discuss different error handling techniques. 

This question has 0 answers so far.
0

Attempt  question.

(i) What is Peephole optimization? How is it performed Give example of peephole optimization. 

This question has 0 answers so far.
0

(b) Write short comments on:-

(i) YACC

This question has 0 answers so far.
0

(b) Write short comments on:-

(i) LEX 

This question has 0 answers so far.
0

(a) Draw the Syntax tree for the following piece of code in the source language:If x >y then x = 3* (y+1) else y = y+l. 

This question has 0 answers so far.
0

What are the benefits for the three address code generation? Consider the input string  and generate the following:

(a) Syntax Tree       (b) Posix         (c) Three address Code

This question has 0 answers so far.
0

(b) Discuss all three methods which are used to perform the LR parsing. Which technique is most powerful among these three? Give justification also.

This question has 0 answers so far.
0

(a) Consider the following grammar and Parse the input string int id, id; usingshift reduce parser. 

  

This question has 0 answers so far.
0

(b) Find whether the grammar is ambiguous or not:


How to remove ambiguity from this grammar 

This question has 0 answers so far.
0

(a) Design a derivation tree for the following grammar:

 Also obtain the left most and rightmost derivation tree for the string 'a+b*a+bÂș. 

This question has 0 answers so far.
0
Identify the basic blocks in the following code and draw the DAG graph for the same: { inti-0,n-10; int a[n]; while(i<-in-1)) { A[i]=i*i; i=i+1; } return; } This question has 0 answers so far.
0
What are the issues that occurs during the code generation process? This question has 0 answers so far.
0
What do you mean by peephole optimization? Explain with example, This question has 0 answers so far.
0
What do you mean by the term code optimization? What do you understand by the term leader? Write algorithm to identify out the basic Blocks. This question has 0 answers so far.
0

Define the following term and explain with example:-

(b) Activation Record

This question has 0 answers so far.
0

Write short note on:

(ii) Uses of Basic Blacks.

This question has 0 answers so far.
0

Write short note on:

(i) Problems in code generation 

This question has 0 answers so far.
0

(c) Explain Chomsky hierarchy of grammars. 

This question has 0 answers so far.
0

(b) Construct a nondeterministic finite automaton (NFA) and then deterministic finite automaton (DFA) for the regular expression (a/b)c*)* 

This question has 0 answers so far.
0

(a) What do you mean by front end and back end of a compiler.

This question has 0 answers so far.
0

Define the following term and explain with example:-

(h) Handle pruning

This question has 0 answers so far.
0

Define the following term and explain with example:-

(g) Back patching

This question has 0 answers so far.
0

Define the following term and explain with example:-

(f) Shift/Reduce and Reduce/Reduce Conflicts.

This question has 0 answers so far.
0

Define the following term and explain with example:-

(c) Left Recursion

This question has 0 answers so far.
0

Define the following term and explain with example:-

(d) Directed Acyclic Graph.

This question has 0 answers so far.
0

Define the following term and explain with example:-

c) Bootstrapping

This question has 0 answers so far.
0
What are the different storage allocation strategies the runtime inenvironment of the complier? This question has 0 answers so far.
0

Define the following term and explain with example:-

(a) Lexeme, Token and Pattern

This question has 0 answers so far.
0

a) Why we need code optimization? Explain Strength reduction, Sub expression elimination, dead code elimination and loop optimization techniques.

This question has 0 answers so far.
0

C Explain different data structures for symbol table implementation and compare them 

This question has 0 answers so far.
0

(b) Explain how scope information is represented b y symbol table.

This question has 0 answers so far.
0

(a) What are the uses of symbol table in different phases of compiler Design?

This question has 0 answers so far.
0

(b) Translate the following expression to quadruple and triple representation

A=-B * (C+D/E 

This question has 0 answers so far.
0

(a) Construct a syntax directed translation scheme that translates arithmetic expressions from infix to postfix notation. The solution should include context free grammar and semantic rules. Show the application of your scheme with the input given below.

This question has 0 answers so far.
0

[b] Lenstruct the canonical parsing table for the grammar given below.

     


This question has 0 answers so far.
0

(a) Explain Recursive Decent Parser with example.


This question has 0 answers so far.
0

(b) Give parse tree's and derivation's leftmost and rightmost] for the grammar and input string given below.

  


This question has 0 answers so far.
0

Attempt  question.

(j) What is DAG? What are the advantages of using DAG?

This question has 0 answers so far.
0

a. Consider the following grammar: 


i) Obtain LR(0) items. 

This question has 0 answers so far.
0

b. Explain the following with an example:

    i) Quadruples

This question has 0 answers so far.
0

a. Explain how DAG will help in intermediate code generation Construct & DAG and a three address code for the expression 

This question has 0 answers so far.
0

c. Define the following with example:

ii) L-attributed definitions.

This question has 0 answers so far.
0

c. Define the following with example:

i) S-attributed definitions

This question has 0 answers so far.
0

b. Obtain SDD for simple type declaration. Construct a dependency graph for the declaration float a, b, c along with evaluation order.

This question has 0 answers so far.
0

a. For the given productions shown below, write semantic rules and construct annotated parse tree for 3*5+4n


This question has 0 answers so far.
0

b. Consider the following grammar:


iii) Show the parsing steps for the string "baaba". 

This question has 0 answers so far.
0

b. Consider the following grammar:


ii) Construct canonical LR(1) parsing table.

This question has 0 answers so far.
0

b. Consider the following grammar:


i) Compute sets of LR(1) items. .

This question has 0 answers so far.
0

.a. Consider the following grammar: 


iv) Check whether the given grammar is SLR or not.

This question has 0 answers so far.
0

.a. Consider the following grammar: 


iii) Obtain SLR parsing table

This question has 0 answers so far.
0

a. Consider the following grammar: 


ii) Compute FIRST and FOLLOW

This question has 0 answers so far.
0

b. Explain the following with an example:

   ii) Triples

This question has 0 answers so far.
0

c.

For the following grammar  indicate the handle in the following right sentential from 00001111.

This question has 0 answers so far.
0

What is meant by handle pruning? Show the working of a shift reduce parser for accepting id + id*id, considering the grammar: 

 

This question has 0 answers so far.
0

a. Show that the following grammar is net LL(1) without constructing parsing table.


This question has 0 answers so far.
0

c. Write a recursive descent parser for the grammar:.  and for the input "cad" trace the parser.

This question has 0 answers so far.
0

iv) Show the moves made by the predictive parser on the input (a, (a, a)). 

This question has 0 answers so far.
0

 b. Given the grammar


iii) Construct the predictive parsing table.

This question has 0 answers so far.
0

 b. Given the grammar


ii) Construct FIRST and FOLLOW sets.

This question has 0 answers so far.
0

 b. Given the grammar


i) Make necessary changes to make it suitable for LL(1) parsing. 

This question has 0 answers so far.
0

a. Show that the following grammar is ambiguous:


Write an unambiguous grammar for the same.

This question has 0 answers so far.
0

c. Construct a transition diagram for relational operators.

This question has 0 answers so far.
0

b. Explain input buffering strategy used in lexical analysis phase.

This question has 0 answers so far.
0
What is the process of identifying basic blocks in code optimization phase? This question has 0 answers so far.
0
What are different types of errors that occurs during, lexical, syntactic and semantic phase. This question has 0 answers so far.
0
How the data is stored in symbol table for block and non-block structured languages? This question has 0 answers so far.
0
What do you mean by symbol table? Write an example that shows how different phases of complier interact with symbol table. This question has 0 answers so far.
0
Write the three address code for: - a(a+b)*(c+d)+(a+b+c) This question has 0 answers so far.
0
Write the three address code for: (i) while(a<5)do a:b+2) This question has 0 answers so far.
0
What do you mean by three address code? Explain how the three address code is represented vis quadruples, triples and Indirect triples with example. This question has 0 answers so far.
0
Differentiate between S-attributed and L-attributed SDT's. Write the steps to create the SDT for any problem and write SDT for converting any number from binary to decimal. This question has 0 answers so far.
0
Write an SDT to count the number of binary digits in a binary number. (Hint:1011 count is 4) This question has 1 answers so far.
0
Construct a LR (1) parsing table for S->Aa|bAc|dc|bda A->d This question has 0 answers so far.
0
What do you mean by Handle? Check whether the grammar E->E+T|T,T-a is LR(0) or not This question has 0 answers so far.
0
Write a SDT for converting infix expression to post fix expression by taking suitable example. This question has 0 answers so far.
0
Differentiate between top-down and bottom-up parsers with example. This question has 0 answers so far.
0

a. Explain with a neat diagram, the phases of a compiler. Mention the input and output for each phase with an example, "position initial + rate* 60"

This question has 0 answers so far.
0
What is back patching? Explain with example. This question has 0 answers so far.
0
What is left recursion and left factoring? Explain each with example. This question has 0 answers so far.
0
Differentiate between SDD and SDT with example. This question has 0 answers so far.
0
Explain the process of Bootstrapping in complier design with example. This question has 0 answers so far.
0

b. Generate the 3-address statements for the following programming construct and obtain the basic blocks for generated code

                

  

 

This question has 0 answers so far.
0

a. Briefly explain various issues in code generation phase.

This question has 0 answers so far.
0

c. Define local and non-local data.

This question has 0 answers so far.
0

b. What is garbage collection? Explain the design goals of garbage collector.

This question has 0 answers so far.
0

a. Describe the general structure of an activation record. Explain the purpose of each item in the activation record. 

This question has 0 answers so far.
0

c. Explain syntax directed translation of switch statement.

This question has 0 answers so far.
0

Explain the following with an example:

iii) Indirect triples

This question has 0 answers so far.