NEW
Font size
Worksheetssyntax Analysis
Total questions: 10
Worksheet time: 5mins
A grammar for a programming language is a formal description of
Syntax
Semantics
Structure
Library
A compiler can check?
Logical Error
Syntax Error
Both Logical and Syntax Error
Not Logical and Syntax Error
Which of the following is a system program that integrates a program’s individually compiled modules into a form that can be executed?
Interpreter
Assembler
Compiler
Linking Loader
Which of the following error can Compiler diagnose?
Logical errors only
Grammatical and logical errors
Grammatical errors only
All of the mentioned
A grammar that produce more than one Parse tree for same sentence is
Ambiguous
Unambiguous
Complementation
Concatenation
Grammars that can be translated to DFAs is
Left linear grammar
Right linear grammar
Generic grammar
All of the mentioned
The context free grammar S → A111|S1, A → A0 | 00 is equivalent to
{0n1m | n=2, m=3}
{0n1m | n=1, m=5}
{0n1m | n should be greater than two and m should be greater than four}
None of the mentioned
Which of the following statement is false?
In derivation tree, the label of each leaf node is terminal
In derivation tree, the label of all nodes except leaf nodes is a variable
In derivation tree, if the root of a sub tree is X then it is called –tree
None of the mentioned
For A-> e , A can be erased. So whenever it appears on the left side of a production, replace with another production without the A.
State true or false:
true
false
Simplify the given grammar:
S->aXb
X->aXb | e
S->aXb | ab, X-> aXb | ab
S->X | ab, X-> aXb | ab
S->aXb | ab, X-> S | ab
None of the mentioned
