Compiler Design MCQ Questions And Answers - Syntax Analyser

This section focuses on "Syntax Analyser" in Compiler Design. These Multiple Choice Questions (MCQs) should be practiced to improve the Compiler Design skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. How many components context-free grammar has?

A. 2
B. 3
C. 4
D. 5

View Answer


2. A set of tokens, known as?

A. non-terminals
B. terminal symbols
C. productions 
D. start symbol

View Answer


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

View Answer


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

A. Derivation Tree
B. Analyzers Tree
C. Parse Tree
D. Ambiguity Tree

View Answer


5. In parse tree, leaf nodes are called?

A. terminals
B. non-terminals
C. sub-terminals
D. half-terminals

View Answer


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

View Answer


7. How many types of parsing are there?

A. 2
B. 3
C. 4
D. 5

View Answer


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

View Answer


9. Type checking is normally done during ____________

A. Lexical Analysis
B. Syntax Analysis
C. Syntax Directed Translation
D. Code generation

View Answer


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

View Answer





Discussion



* You must be logged in to add comment.