Parsing Techniques (Basic Level) - 1


10 Questions MCQ Test Question Bank for GATE Computer Science Engineering | Parsing Techniques (Basic Level) - 1


Description
This mock test of Parsing Techniques (Basic Level) - 1 for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam. This contains 10 Multiple Choice Questions for Computer Science Engineering (CSE) Parsing Techniques (Basic Level) - 1 (mcq) to study with solutions a complete question bank. The solved questions answers in this Parsing Techniques (Basic Level) - 1 quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE) students definitely take this Parsing Techniques (Basic Level) - 1 exercise for a better result in the exam. You can find other Parsing Techniques (Basic Level) - 1 extra questions, long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.
QUESTION: 1

Which is not true about syntax and semantic parts of a computer language

Solution:

Syntax analysis checks for the syntax of the source program while the semantic analysis, deals with checking of semantic (meaning) of the source program output by syntax analysis phase and input to semantic analysis phase.
Note: The syntax checking is responsibility of the programmer while semantic analys is is checked at the runtime.

QUESTION: 2

Left factoring is the process of factoring out the common

Solution:

Left factoring is the process of removing the non-determinism from the grammar by factoring out the common prefixes of the alternates.

QUESTION: 3

Operator-precedence parsing method is a parsing method. Which of the following statement is false about it?
1. It is bottom-up parsing method.
2. It must contains ε-production.
3. It doesn’t contains two adjacent nonterminal symbols.

Solution:

Rules of operator precedence grammar is given as:
1. It must not contain any null-production.
2. It must not contain two adjacent non-terminal symbols.

QUESTION: 4

If conversion from one type to another type is done automatically by the compiler then, it is called

Solution:

If compiler automatically converts one type of from to another type then it is called implicit conversion or coercions, else if not done automatically, then it is called explicit conversion.

QUESTION: 5

Which of the following derivations does a top- down parser use while parsing as input string? The input is assumed to be scanned in left to right order

Solution:

Top down parser uses left to right, left most derivation.

QUESTION: 6

Which of the following statements is true?

Solution:

The canonical LR parser is the most powerful parser that can recognize more grammars than other parsers.

QUESTION: 7

A bottom-up parser generates

Solution:

Bottom-up parsing recognizes the text’s lowest level small details first, before its mod-level structures and leaving the highest-level overall structure to last. It is some times done by backtracking and much more commonly by a shift-reduce parser such as LALR parser.

QUESTION: 8

A top-down parser generates

Solution:

Top-down parsing is the parsing strategy which one first looks at the highest level of the parse tree and works down the parse tree by using the rewriting rules of formed grammar. LL parsers are the parsers that the top-down parsing strategy.

QUESTION: 9

Which of the following grammar is LR(1)

Solution:

If we create LL (1) items, we will find out that (a) and (b) both are LR(1).

QUESTION: 10

Which of the following parsers is the most powerful?

Solution:

CLR > LALR > SLR

Related tests