Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Differentiate Top Down Parser And Bottom Up Parser? Give Example for each.

Elaborate the role of parser


Describe Handle pruning with suitable example
Construct a parse tree of (a+b)*c for the grammar E->E+E/E*E/(E)/id.
Give example of dangling reference and Define
Examine the grammar A->Ac|Aad|bd and eliminate the left recursion if exists.
Illustrate the algorithm for FIRST and FOLLOW in parser.
Write the configuration of an LR parser with suitable diagram?
Differentiate term LL(1) grammar and LR grammar

Identify the various conflicts that occur during shift reduce parsing?

Big questions
Module 3

Consider the grammar given below.


E -> E + T
E -> T
T -> T * F
T -> F
F -> (E)
F-> id
Construct an LR parsing table for the above grammar. Give the moves of LR
parser on id*id+id
Explain working of an LR parsing algorithm with an example.
Discuss in detail about writing a grammar suitable for constructing a parser
Consider the grammar given below.
S -> CC
C -> cC
C -> d
Construct a CLR parsing table for the above grammar.
Construct Parsing table for the grammar and find moves made by predictive
parser on input id + id * id and find FIRST and FOLLOW
E -> E + T
E -> T
T -> T * F
T -> F
F -> (E)
F-> id
Consider the grammar E -> E + E | E * E | (E) | id .
Show the sequence of moves made by the shift-reduce parser on the input id1 +
id2 * id3 and determine whether the given string is accepted by the parser or not.
Module 4
Draw syntax tree for the expression a=b*– c+b*– c.
Predict the limitations of static allocation and Discuss
Mention the two rules for type checking.
Identify the types of attributes of syntax directed definition.
Outline the fields of activation record?
List Dynamic Storage allocation techniques.
What is type coercion?
Define symbol table.
Differentiate between the S-Attributed and L-Attributed Syntax Directed
Translation (SDT)?
Write about Garbage collection.

Big question

Analyze the grammar and syntax-directed translation for desk calculator and
show the annotated parse tree for expression 4 * 5 + 6.
Explain in detail about the specification of a simple type checker.
Discuss the various storage allocation strategies in detail.

Explain synthesized attribute and inherited attribute with suitable examples.

Construct a syntax directed definition for constructing a


syntax tree for assignment statements
S -> id: = E
E -> E1 + E2
E -> E1 * E2
E -> - E1
E -> (E1)
E -> id
Explain about runtime storage management.

You might also like