CS606 Midterm Online Quiz

0%

CS606-Midterm

1 / 50

Parser always gives a tree like structure as output

2 / 50

AST summarizes the grammatical structure with the details of derivations.

3 / 50

Lexer and scanner are two different phases of compiler

4 / 50

When generating a lexical analyzer from a token description, the item sets (states) are constructed by two types of “moves”: character moves and ____ moves.

5 / 50

An ----- does not need to examine the entire stack for a handle, the state symbol on the top of the stack contains all the information it needs

6 / 50

Optimal registers allocation is an NP-hard problem.

7 / 50

The following two items A -> P • Q B -> P • Q can co-exist in an ______ item set.

8 / 50

A _______ is a top down parser.

9 / 50

Which of the statement is true about Regular Languages?

10 / 50

In compilation process Hierarchical analysis is also called-----------

11 / 50

In Back End module of compiler, optimal register allocation uses______ .

12 / 50

Parser takes tokens from scanner and tries to generate ______ .

13 / 50

Left factoring of a grammar is done to save the parser from back tracking.

14 / 50

Yacc contains built-in support for handling ambiguous grammars resulting in _______

15 / 50

Recursive ____________ parsing is done for LL(1) grammar.

16 / 50

_______ of a two-pass compiler is consists of Instruction selection, Register allocation and Instruction scheduling.

17 / 50

Optimal registers allocation is an NP-hard problem.

18 / 50

Parser takes tokens from scanner and tries to generate ______ .

19 / 50

Consider the following grammar,

20 / 50

Can a DFA simulate NFA?

21 / 50

Lexical Analyzer generator _______ is written in Java.

22 / 50

The regular expressions a*|b* and (a|b)* describe the _____set of strings.

23 / 50

The transition graph for an NFA that recognizes the language ( a | b)*abb will have following set of states.

24 / 50

In parser the two LL stand(s) for ____________ .

25 / 50

Reduction of a handle to the ------- on the left hand side of the grammar rule is a step along the reverse of a right most derivation.

26 / 50

In multi pass compiler during the first pass it gathers information about __________ .

27 / 50

______ phase which supports macro substitution and conditional compilation.

28 / 50

The transition graph for an NFA that recognizes the language ( a | b)*abb will have following set of states.

29 / 50

____is evaluated to yield a value.

30 / 50

Functions of Lexical analyzer are?

31 / 50

In Back End module of compiler, optimal register allocation uses______ .

32 / 50

Front end of two pass compiler takes________ as input.

33 / 50

Left factoring is enough to make a grammar LL(1).

34 / 50

In predictive parsing table the rows are ___________ .

35 / 50

Front-end of a two pass compiler is consists of Scanner.

36 / 50

Left factoring of a grammar is done to save the parser from back tracking.

37 / 50

In Flex specification file different sections are separated by ________ .

38 / 50

Front end of two pass compiler takes________ as input.

39 / 50

_______ of a two-pass compiler is consists of Instruction selection, Register allocation and Instruction scheduling.

40 / 50

LR parsers can handle _______ grammars.

41 / 50

In predictive parsing table the rows are ___________ .

42 / 50

_____ convert the reloadable machine code into absolute machine code by linking library and reloadable object files.

43 / 50

The non-terminal _______ is left recursive.

44 / 50

45.Follow of C is ____ .

45 / 50

Bottom-up parsers handle a ________ class of grammars.

46 / 50

This grammar contains a reduce-reduce conflict. If a DFA states contains both [X → α •, a] and [Y → β •, a], then on input “a” we don’t know which production to reduce with. This is called a reduce-reduce conflict. Usually due to gross ambiguity in the grammar.

47 / 50

In compilation process Hierarchical analysis is also called

48 / 50

Responsibility of _____ is to produce fast and compact code.

49 / 50

In a transition table cells of the table contain the ________ state.

50 / 50

A grammar is LR if a ------ shift reduce-reduce parser can recognize handles when they appear on the top of stack.

Your score is

The average score is 0%

0%

Qunoot e Nazilah
Dua e Hajat
4 Qul
6 Kalma
Dua-e-Akasha
Darood Akbar
Surah Fatiha
Dua-e-Ganj Ul Arsh
Dua-e-Jamilah
Ayat-ul-Kursi