Cse III I r17 CD
Cse III I r17 CD
UNIT-1
4. Differentiate token,pattern,lexeme
i) Preprocessor
ii) Assembler
down the phases in detail.Write down the output of each phase for the expression
a:=b+c*50.
6. Discuss the various phases of compiler and trace the program segment
E-->E+T/T
T-->T*F/F
F-->(E)/id
T-->TF/F
S-->Aa/bAc/dc/bda
A-->d
S-->(L)/a
E-->E+T
F-->(E)
E-->T
F-->id
T-->T*F
T-->F and parse any string derived from the grammer
S-->L=R/R
L-->*R/id
R-->L and construct operator precedence function table from the parsing table.
S-> AS|b,A->SA|a
Construct the SLR parse table for the grammar. Show the actions of the parser for
the input string abab
7. Find LALR for the given grammer and parse the sentence (a+b)*
E->E+T|T, T->T*F|F,F->(E)|id
UNIT-3
5.Define backpatching.
Statements.
2.Explain three address codes and its types.How would you implement the three
Statements.
5. Explain and compare in detail the various implementation forms of three address
code.
UNIT-4
3. Translate the arithematic expression a*-(b+c) into syntax tree and postfix notation.
5. Define a Directed Acyclic graph. Construct a DAG and write the sequence of
7. What is an activation record? Explain how it is related with run time storage
organization
UNIT-5
4. Define flowgraph.
4. What is an activation record? Explain how it is related with run time storage
organization.