Automata and Compiler Design Mid - I, September - 2014

1.Which of the following string sequence is not part of the language denoted by the regular expression 0(0|1)*0
  • 00
  • 000
  • 0110
  • 0
Answer: D
2.Which of the following Automata can have ∈- Transitions.
  • DFA
  • NFA
  • Both
  • NFA to DFO
Answer: B
3.Which of the following is an example for Bottom-Up parser.
  • LL
  • Recursive Decent
  • LR parser
  • LALR
Answer: C
4._____________ methods cannot handle left recursive grammars.
  • BottomUp Parsing
  • TopDown Parsing
  • Both
  • Shift-reduce
Answer: B
5.LR parsing method can also be stated as ___________ type of parsing method.
  • Shift Reduce
  • Top Down
  • Back tracking
  • None
Answer: A
6.Which of the following functions are not used in construction of LR parsing table
  • Action
  • Goto
  • Both
  • Reduce
Answer: D
7.The value of __________ attribute is computed from the values of attributes at the siblings and parent of that node.
  • Inherited
  • Synthesized
  • Derived
  • None
Answer: A
8.In Intermediate code generation the left most field of a Triple in a Three-address code is
  • arg1
  • op
  • arg2
  • None
Answer: B
9.In LALR parsing LA stands for
  • Left Ahead
  • Left Automata
  • Look Ahead
  • Look-automata
Answer: C
10.Among the phases of a compiler which of the following phase occurs before Semantic Analysis
  • Code Generation
  • Code Optimisation
  • Syntaxe Analysis
  • Lexical analysais
Answer: C
11.A language is called a ____________________ if some finite automaton recognizes it .
Answer: Regular language
12.________________ is a data structure containing a record for each identifier.
Answer: Symbol table
13.______________ is a grammar transformation that is useful for producing a grammar suitable for Predictive or TopDown parsing.
Answer: Left factoring
14.If two grammars generate the same language, the grammars are said to be ___________.
Answer: Equivalent
15.YACC is a ____________.
Answer: Parser generator
16.A right most derivation in reverse can be obtained by ____________________.
Answer: Handle Pruning
17.An Syntax Directed Definition is S-attributed if every attribute is _______________.
Answer: Synthesized
18.In a DAG leaves correspond to atomic _______________.
Answer: Operands
19.The output of a lexical analyzer is a sequence of ___________.
Answer: Tokens
20.A Grammar that produces more than one parse tree for some sentence is said to be ________.
Answer: Ambiguous