You are on page 1of 3

MFT

1) A grammar that produces more than one parse tree for some sentence is called___________
a) Ambiguous
b) Non-Ambiguous
c) Regular
d) None of the mentioned
2) Syntax Analyser is also known as ___________
a) Hierarchical Analysis
b) Hierarchical Parsing
c) None of the mentioned
d) Hierarchical Analysis & Parsing
3) Syntax Analyser takes Groups Tokens of source Program into Grammatical Production.
a) True
b) False
4) Which of these features of assembler are Machine-Dependent?
a) Instruction formats
b) Addressing modes
c) Program relocation
d) All of the mentioned
5) The fourth Generation computer was made up of ______________
a) Transistor
b) Vacuum tubes
c) Chips
d) Microprocessor chips

6) Which of the following derivations does a top-down parser use while parsing an input string. The input
is assumed to be scanned in left to right order.
a) Leftmost derivation
b) Rightmost derivation
c) Leftmost derivation traced out in reverse
d) Rightmost derivation traced out in reverse

7) The process of assigning load addresses to the various parts of the program and adjusting the code and data
in the program to reflect the assigned addresses is called___________
a) Assembly
b) Parsing
c) Relocation
d) Symbol Resolution
8) _________is the following statements is false.
a) An unambiguous grammar has the same leftmost and rightmost Derivation
b) An LL(1) parser is a top-down parser
c) LALR is more powerful than SLR
d) An ambiguous grammar can never be LR(k) for any K.
9) __________ is not a LR(0) item.
a) A->. Xyz
b) A->x.yz
c) A->xyz
d) None
10) In LL(1) first L stands for ____
a) Left most derivation
b) Scanning from left to right
c) Both A & B
d) None

Long Answers

(11) Compare and Contrast compilers and interpreters.


(12) Construct Predictive parsing table for the Following grammar.
ETE’
E+TE’| €
EFT’
T’*FT’|€
F(E)|id
(13) Find the First() and Follow() of following grammar.
SABC
Aa|b|€
Bc|d€
Ce|f|€
(14) Compare and contrast LR parsers and LL Parsers.
(15) Explain about the LL(1) grammars in detail.
(16) Explain the parsing techniques with a hierarchical diagram.
(17) Consider the following grammar
S → AS|b
A→SA|a construct the SLR parse table for the grammar.
(18) Define SLR(1) parser. Predict the following grammar for

generate the SLR parsing table.

E→E+T | T

T→T*F | F

F→F*| a| b

(19) Explain about the Shift reduce parsers with example.


(20) Give the predictive parser for the following grammar.

S→ (L) | a L→ L, S | S
a) Give a rightmost derivation for (a,(a, a)) and show the handle of each right-sentential form.
b) Show the steps of a shift reduce parser

(21) Explain about the LALR Parser .


S-> Aa|bAc|Bc|bBa
A->d
B->d find out it is LALR(1) or not.
(22) Explain the problems associated with Top Down Parsing.
(23) Show a Grammar is LL(1) or not.
S->ictS|iCtSeS|a
C->b
(24) Explain in detail the conflicts that may occur during shift reduce parsing.
(25) Find Canonical collection of sets of LR(0) items for grammar
S’->L
S->R
L->*R
L->id
R->L

You might also like