You are on page 1of 2

1.

2. 3. 4. 5. 6. 7.

GIT,GITAM UNIVERSITY,VISAKHAPATNAM-45 III year B.Tech,QUIZ - I, II Semester 2011-12 Language Processors Date: 17-02-2011 Duration: 30 Min. Section: B2,B5 Max Marks: 10 M Which of the two pointers to the input buffer are maintained in buffer pairs scheme? a) lexeme_begining, next b) lexeme_begining, forward c) lexeme_begin, lexeme_end d) start, forward Type checking is a component of a) lexical analysis b) semantic analysis c) syntax analysis d) intermediate code generation _____ is a data structure contains a record for each identifiers, with its attributes a) stack b) queue c) symbol table d) none Compilation can be divided into following two parts a) analysis, debugging b) debugging, execution c) analysis, synthesis d) synthesis, execution In lexical analysis the original string that comprises the token is called a) Pass b) LEX c) lexeme d) phase Capacity of a language to compile itself is called as _____ a) cross-compiler b) compiler c) boot-strapping d) all the above What is FIRST(E) for the given grammar E->E+T/T,T->T*F/F, F->(E)/id a){(,id} b) {(,*} c) {id,*} d) {),+}

8. FOLLOW is defined for a)Only non terminals b) Either terminals or non terminals c) Only terminals d) Neither terminals nor non terminals 9. In LL(k) what is the maximum value for k____ a)No limit b) zero c) one d) five 10. If at each step in derivation only the left most non terminal in any sentential form is replaced then such

derivations are called _______ a) Left most b) right most c) center d) none 11. For what value of X and a, the predictive parsing consults parsing table, where X is the symbol on top of stack and a is the current input symbol [ ] a) X=a=$ b) X=a $ c) both X and a non-terminal d) X nonterminal and a is terminal 12. A grammar having more than one parse tree for a sentence is said to be [ ]
a) Consistent grammar b) ambiguous grammar c) irregular

grammar d) none 13. In constructing parsing table, for each production A_______ a) FIRST(A) b) FOLLOW(A) c) both d) none 14. Consider the grammar S->AB, B->ab, A->aa, A->a, B->b what is FOLLOW(B) a) { a} b) { a, b} c) FIRST(A) d) {$} 15. A top down parser generates_______ a)Left most derivation b) Left most derivation in reverse c)Right most derivation d) Right most derivation in reverse 16. Which of the following is not a phase of compilation process? a) Booting b) optimizing c) parsing d) scanning 17. The three-address code for the expression x+ y*z is_______ 18. In both top down and bottom up parsing methods the parsers scans input from ___ to____ 19. A grammar whose predictive parsing table has no multiplydefined entries is said to be _______ 20. ________ is a sequence of characters in the source program that is matched by the pattern for a token.

***

You might also like