Compiler Design Objectives
Compiler Design Objectives
1._________ converts high level language program into machine code at once.
(a) compiler (b) interpreter (c) assembler (d) both a & b
2.________________ runs on one machine and produces object code for another
machine.
(a) native compiler (b) incremental compiler (c) cross compiler (d) compiler
3. In _____________ language, programming is in the form of mnemonics.
(a) low level (b) middle level (c) assembly (d) high level
4. _________ converts assembly language program into machine code .
(a) compiler (b) interpreter (c) assembler (d) both a & b
5. _________ is a translator that converts high level language program into machine code
line by line.
(a) compiler (b) interpreter (c) assembler (d) both a & b
6. The execution time of compiler is _________________ than that of interpreter.
7. Debugging is _____________ in compiler, than in interpreter.
8. Which of the following is not a translator?
(a) preprocessor (b) compiler (c) interpreter (d) assembler
9. Translator is a________________________
10. state whether the following statements are true or false
compiler is a translator (T/F)
11. assembler gives output as intermediate code (T/F)
12. loader generates absolute machine code ( T / F )
13. Lexical analyzer is also called as__________________
14. Input to lexical analysis is______________
(a) token (b) parse tree (c) high level language statement (d) none.
15. output from lexical analyzer is________________
(a) token (b) parse tree (c) high level language statement (d) none.
16.________errors are detected by lexical analyzer.
17. size of compiler is_______________ than that of interpreter.
18. the phases in analysis part are_______________
19. The phases in synthesis part are_____________
20. Input to syntactic analyzer is______________
(a) Token (b) parse tree (c) high level language statement (d) none.
21. Output from syntactic analyzer is________________
(a) Token (b) parse tree (c) high level language statement (d) none.
22. .________errors are detected by syntactic analyzer.
23. Which of the following is/are used for scanner generators.
(a) LEX (b) FLEX (c) both (d) none.
24.______________ phase determines meaning of source string.
25. Symbol table manager stores __________ information of attribute.
(a) Type (b) name (c) scope (d) all.
26. Pictorial representation of derivation is called_________.
27._____ grammar is useful to define structure of the programming language.
28. In _________ derivation, left most non-terminal is replaced every time.
(a) left most (b) right most (c)middle (d) both a & b
29. In _________ derivation, right most non-terminals is replaced every time.
(a) left most (b) right most (c)middle (d) both a & b
30. In _________ production one non-terminal gives another non-terminal.
31. If the parse tree is constructed from root and expanded to leaves then such type of
passer is called_________
(a) top down parsing (b) bottom up parsing (c) shift reduce parsing (d) none
32. When the parse tree is constructed from leaves to root, then such type of passer is
known as________
(a) top down parsing (b) bottom up parsing (c) predictive parsing (d) none
33. Top down parsing simulates ________ derivation.
(a) left most (b) right most (c)middle (d) both a & b
34. Bottom-up parsing simulates________ derivation.
(a) left most (b) right most (c)middle (d) both a & b
35. Problem with top down parsing are________
(a) Back tracking (b) left recursion (c) A &b (d) none
36. __________ is a technique in which expansion of non-terminal we choose one
alternate, if mismatch occurs we try another alternative.
(a) Back tracking (b) left recursion (c) left factoring (d) none
37. The grammar is said to be left recursive if the grammar is of the form ________
38. If A→αβ1/αβ2 , the grammar after left factoring is _________
39. Top down parsing technique
(a) Recursive descent parse (b) shift reduce (c) both (d) none
40. _______ parser uses collection of recursive procedure for parsing the input string.
(a) Recursive descent parse (b) shift reduce (c) both (d) none
41. A grammar is said to be ambiguous if it has ______
42. In recursive descent parser, L.H.S is name of the procedure, procedure body is_____
43. In LL (1) parser, first ‘L’ stands for _______
(a) left linear (b) left recursion (c) left factoring (b) left to right scanning
44. In LL (1) parser, the meaning of second ‘L’ is _______
(a) left most derivation (b) left recursion (c) left factoring (b) left to right scanning
45. The data structure used by LL (1) are________,________&_______
46. Construction of predicative parses is based on ________&________
47. First is applied for ________
48 follow is used for _________
49. Consider the following grammar S→aЅA/Є , A→b/Є
50. What is first(A) ?
51. What is follow(A) ?
52. The grammar is said to be LL (1) if _______
53. Consider the following grammar
S→aЅBb
A→c/ Є
B→d/Є what is follow (B)?
54. Consider the following cfg
S→aCB/CbB/Ba
B→g/ Є
C→h/Є what is first(S)?
55. What is follow (C).
56. S→/AB/Є
A→/AC/OC
B→OS, C→1
What is the follow (A)
57. Bottom up parsing uses _______ derivation.
(a) left most (b) right most (c)middle (d) both a & b
58. _________ is a string of sub string that matches the right side of production and we
can reduce such string by a non-terminal on left hand side production.
59. The process of detecting handles and using them in reduction is called ________
60. Shift reduces parser uses __________ and ________
61. Moving of the symbol from input buffer onto the stack, the action is called _______
62. If stack contains start symbol only and input buffer is empty, then that action is called
63. A situation in which parser cannot either shift or reduce, cannot even perform the
accept is called as_________
64. Grammar ‘G’ is said to be operator precedence if it posses ________
65. In LR (K) parsing, L stands for _______
66. In LR (K) parsing, R stands for ________
67. In bottom up parsing reduce operation performs ___________
68. Which of the following is the most powerful parser
(a) SLR (b) operation precedence (c) LALR (d) CLR
69. The LA in LALR (L) stands for ________
(a) Logic analysis (b) look a head (c) lexical analysis (d) left analysis
70. Shift reduce parsers are
(a) Bottom up parsers (b) predictive parser (c) may be top down or bottom up
(d) Top down parser
71.In ______________ grammar a new start symbol is introduced in such a way that new
start symbol derives old start symbol.
72. CLR stands for ________________
73. SLR stands for__________________
74. Which of the following is the least powerful parser?
(a) SLR (b) operation precedence (c) LALR (d) CLR
75. go to function in SLR parsing is only for_____________
76. In SLR parsing technique, reduce action is dependent on_____________
77. closure function can be applied only if there is ____________ after dot(.)
(a) terminal (b) non terminal (c) Є (d) no symbol.
78. if A → α . is a rule then action is_____________________
(a) shift (b) reduce (c) either shift or reduce (d) neither shift nor reduce.
79. goto (Ii, a) = Ij then action is__________________
80. goto (Ii, A) = Ij then entry in parse table is_________________
DESCRIPTIVE