Syntax Analyser
1.

How many components context-free grammar has?

A.  

2

B.  

3

C.  

4

D.  

5

2.

A set of tokens, known as?

A.  

non-terminals

B.  

terminal symbols

C.  

productions 

D.  

start symbol

3.

Which of the following called left side of the production?

A.  

production consists of a non-terminal

B.  

sequence of tokens and/or on- terminals

C.  

Both A and B

D.  

None of the above

4.

Which of the following is a graphical depiction of a derivation?

A.  

Derivation Tree

B.  

Analyzers Tree

C.  

Parse Tree

D.  

Parse Tree

5.

In parse tree, leaf nodes are called?

A.  

terminals

B.  

non-terminals

C.  

sub-terminals

D.  

half-terminals

6.

Which of the following are Limitations of Syntax Analyzers?

A.  

it cannot determine if a token is valid,

B.  

it cannot determine if a token is declared before it is being used,

C.  

it cannot determine if an operation performed on a token type is valid or not.

D.  

All of the above

7.

How many types of parsing are there?

A.  

2

B.  

3

C.  

4

D.  

5

8.

When the parser starts constructing the parse tree from the start symbol and then tries to transform the start symbol to the input, it is called?

A.  

Recursive descent parsing

B.  

Backtracking

C.  

Top-down Parsing

D.  

Bottom-up Parsing

9.

Type checking is normally done during ____________

A.  

Lexical Analysis

B.  

Syntax Analysis

C.  

Syntax Directed Translation

D.  

Code generation

10.

Which of the following is true?

A.  

In Short Syntax Analysis Generates Parse Tree.

B.  

Syntax analyser does not check the type of the operand.

C.  

Symbol table is created by the compiler which contains the list of lexemes or tokens.

D.  

All of the above