From: pradeepj at delhi.tcs.co.in (pradeepj at delhi.tcs.co.in)
Date: Tue, 13 Apr 1999 07:10:50 GMT
Subject: lexical analyzer
Message-ID: <7euqlm$aru$1@nnrp1.dejanews.com>
X-UID: 879                                                  

Question 1 : The following syntax-directed translation scheme is used with a
shit reduce (bottom up) parser that perform the action in braces immediately
after any reduction the corresponding production
A-> aB { print "0" }, A-> c {print "1"}, B-> Ab {print "2"}.
The string printed when the parser input is aacbb is

a) 00122
b) 02021
c) 10202
d) 12020

Question 2 : (I) The task of lexical analyzer is to translate the input
source language text into tokens and determine how groups of tokens are
inter-related. (ii) Two basic approaches to translation are generation and
interpretation. (iii) A load-and-go compiler is capable of translating the
source language text on a host machine A that can be later run on any machine
B.

Which of the following is true ?
a)	All are true
b)	Only (I) and (III) are true
c)	Only (I) is true
d)	Only (III) is false


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




