How To Exam?

a knowledge trading engine...


Jaypee Institute of Information Technology (JIIT) 2008 B.E Computer Science Test 1 : Compiler Design - Question Paper

Tuesday, 02 April 2013 05:15Web



Jaypee University Of Information Tccbnologv Waknxgliiil

Test -I Fcburary, 08

Coine Nunc: Compiler OcjigB    Course Code: 07B61CI 111

Course Credit: 4

Mai. Marks: 20__Max.Time: 1 hr

Note:

fOTHEFEBCTCEONLY


   Alt Questions ate compuIsor>

   Closed book exam

Ql.Given lltc grammar

S - > if B then S | if U then S else S | while B do S | begin L end | A /assignment*/ L->LS IS

B - > id relop id A - > id * E E->E + EIE-E Gerenate the parse tree for the following input

begin

while a > b do begin

x = y + z a * a - b end

x = y-z

end

|2 Mark*]

Q2. Why would it be considered bad design to have a terminal symbol with an empty representation?

|1 Mark|

Q3. Give a regular expression for all scqucnccs of Os and Is that contain an even number of I S. Using Thompson's constructions derive the NFA for this regular expression. Then use subset construction to draw the corresponding DFA. Lastly minimize it if possible.

|l/2+l+2*+1-5 Mariu|

Q4. Is it possible to write a RE and CFG for the strings of the form xcx , where x is a siring of a's and bs? Explain with appropriate reasoning.




(2 Marks)







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Jaypee Institute of Information Technology (JIIT) 2008 B.E Computer Science Test 1 : Compiler Design - Question Paper