You are on page 1of 2

1.The number of tokens in the FORTRAN statement DO 10 I=1.

25 is [ ]

A) 3 B) 4 C) 5 D) 6

2. Among simple LR (SLR), canonical LR, and look-ahead LR (LALR), which of the
following pairs identify the method that is very easy to implement and the method that is
the most powerful, in that order? [ ]
(A) SLR, LALR
(B) Canonical LR, LALR
(C) SLR, canonical LR
(D) LALR, canonical LR

3. Which one of the following is a top-down parser?

(A) Recursive descent parser.


(B) Operator precedence parser.
(C) An LR(k) parser.
(D) An LALR(k) parser

4. The grammar A → AA | (A) | ε is not suitable for predictive-parsing because the


grammar is

(A) ambiguous
(B) left-recursive
(C) right-recursive
(D) an operator-grammar

5. The action of passing the source program into the proper syntactic classes is known as
[ ]
A) Lexical analysis B) Syntax analysis C) Interpretation analysis D) Parsing

6. FOLLOW is applicable for [ ]


A) Only non-terminals B) Either terminals or non-terminals
C) Only terminals D) Neither terminals nor non-terminals

7. Shift reduce parsers are [ ]


A) May be topdown or bottom up B) Topdown parsers
C) Bottom up parsers D) Predictive parsers

8. The minimum value of k in LR(k) is [ ]


A) 1 B) 0 C) 2 D) 3
9. Consider the grammar S→AaAb|BaBb A→ε B→ε FOLLOW(A) is [ ]

A){a,b,ε} B {a} C {b} D {a,b}

10.Parsing is also known as ________analysis

11.When a computer is first turned on or restarted, a special type of absolute loader is


executed called______________

12.In lexical analysis the original string that comprises the token is called a
_______________.

13.In LL(1) parser the second L refers to ________________.

14.___________________ programs converts assembly language program to object


program.

15.Transition diagram uses _____________________ to represent states.

16.Intermediate code generation is _________________ phase in compiler design.

17.A right most derivation in reverse often called a canonical reduction sequence is
obtained by -----

18.Among all the LR (1) parsers , the strongest is --------------

19.LALR stands for ------------------

20._________ is the sequence of characters that are matched with pattern of the token

You might also like