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

In constructing parsing table. Which of the following is not a phase of compilation process? a) Booting b) optimizing c) parsing d) scanning 17. A->a. 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. B->ab. A grammar whose predictive parsing table has no multiplydefined entries is said to be _______ 20. In both top down and bottom up parsing methods the parsers scans input from ___ to____ 19. for each production A_______ a) FIRST(A) b) FOLLOW(A) c) both d) none 14. Consider the grammar S->AB.derivations are called _______ a) Left most b) right most c) center d) none 11. *** . For what value of X and a. ________ is a sequence of characters in the source program that is matched by the pattern for a token. 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. the predictive parsing consults parsing table. A->aa. The three-address code for the expression x+ y*z is_______ 18. 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.