How To Exam?

a knowledge trading engine...


Jawaharlal Nehru Technological University Hyderabad 2011-3rd Year B.Tech Computer Science and Engineering (CCC) s- LANGUAGE PROCESSORS - Question Paper

Sunday, 23 June 2013 06:25Web

Code No: CS413
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
B.Tech (CCC) III Year exams February - 2011
LANGUAGE PROCESSORS
(Computer Science Engineering)
Time: three Hours Max.Marks:100
ans Any 5 ques.
All ques. Carry Equal Marks
- - -
1.a) elaborate the chief tasks of a lexical analyzer.
b) Write about lexical errors and their handly.
c) Write about regular expressions. [8+6+6]

2.a) describe LL(1) grammar.
b) Construct LL(1) parse table for the subsequent grammer.
bexpr ? bexpr or bterm/bterm
bterm ? bterm and bfactor | bfactor
bfactor ? not factor | (blxpr) | actual | false
Where or, and, not, (,), true, false are terminals in the grammar. [5+15]

3.a) describe syntax directed translater.
b) Write a syntax directed translation scheme for converting the subsequent grammer with the
syntax
E ? E + T
E ? E – T
T ? T * F
T ? T / F
F ? P ? F
T ? F
F ? P
P ? i d
P ? (E) [8+12]
4.a) What is meant by Structural Equivalence of kind expressions. Write a function which will
test the structural equivalence of 2 kind expressions.
b) explain briefly about kind conversions. What is Coercion? The Grammar for expression
is provided beneath. Write the semantic rules for Coercion from integer to real.
OR
E ? num
E ? num.num
E ? id
E ? E1 op E2 [10+10]

5.a) discuss how the scope info is represented in the symbol table for a block
structured language.
b) Suppose P(x,y) is a 'C' procedure, and it is called by P(A+B+C). Show the intermediate
code generated for the call and return. Make arbitrary assumptions about the locations of
A, B and C in the activation record of the calling procedure. [10+10]

6.a) elaborate the applications of DAG. discuss how the subsequent expression can be
converted in a DAG
a+b*(a+b) +c+d
b) discuss how loop invariant components can be eliminated. [10+10]

7.a) Efficient code generation requires the knowledge of internal architecture of the target
machine. Justify your ans with an example.
b) elaborate the different addressing mode are available?
c) provide a few examples of machine instructions which decrease memory access time.
[6+8+6]

8.a) How are constants described in an assembly program? discuss with an example.
b) What is meant by Assembler directives? discuss the functions of the subsequent assembler
directives.
i. begin
ii. ORIGIN
iii. EQU
iv. LTORG. [10+10]



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Jawaharlal Nehru Technological University Hyderabad 2011-3rd Year B.Tech Computer Science and Engineering (CCC) s- LANGUAGE PROCESSORS - Question Paper