Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged tbb-cd-1
3
3 votes
2
answers
2 answers
1.8k
1.8k views
Test by Bikram | Compiler Design | Test 1 | Question: 30
Consider the following grammar:$S \rightarrow L = P \mid P$$L \rightarrow ^*P \mid id$$P \rightarrow L$The above grammar is:AmbiguousSLR(1)LALR(1)None of the above
Bikram
1.8k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
3 votes
1
answers
1 answer
622
622 views
Test by Bikram | Compiler Design | Test 1 | Question: 29
Which grammar causes recursive-descent parser to go into infinite loop?LL(1)Left recursive grammarRight recursive grammarGrammar with left factors
Bikram
622
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
3 votes
1
answers
1 answer
1.7k
1.7k views
Test by Bikram | Compiler Design | Test 1 | Question: 28
Consider the following syntax directed definition of any desk calculator:$L \rightarrow En \{ \text{print}(E.val) \}$$E \rightarrow E1 + 1 \{ E.val = E1.val + Z.val \}$$E...
Bikram
1.7k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
syntax-directed-translation
+
–
3
3 votes
0
0 answers
1.3k
1.3k views
Test by Bikram | Compiler Design | Test 1 | Question: 27
$\textbf{goto}$ function of LR class of grammar is represented as:Deterministic Finite Automata transitionsNon-deterministic Finite Automata transitionsPDA transitionsPar...
Bikram
1.3k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
lr-parser
+
–
3
3 votes
1
answers
1 answer
612
612 views
Test by Bikram | Compiler Design | Test 1 | Question: 26
In compilers, the type checking is done in:Lexical AnalysisSemantic AnalysisCode Generation PhaseParsing Phase
Bikram
612
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
compilation-phases
+
–
3
3 votes
2
answers
2 answers
1.2k
1.2k views
Test by Bikram | Compiler Design | Test 1 | Question: 25
Consider the following grammar:$S \rightarrow aMd \mid bNd \mid aNe \mid bMe$$M \rightarrow c$$N \rightarrow c$The grammar above is:LR(1) but not LALR(1)LALR(1) but no...
Bikram
1.2k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
3 votes
1
answers
1 answer
1.1k
1.1k views
Test by Bikram | Compiler Design | Test 1 | Question: 24
Consider the following grammar:$E \rightarrow E + T \mid T$$T \rightarrow T ^* F \mid F$$F \rightarrow (E) \mid id$What are the productions for E, T and F after convertin...
Bikram
1.1k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
ll-parser
grammar
+
–
3
3 votes
1
answers
1 answer
609
609 views
Test by Bikram | Compiler Design | Test 1 | Question: 23
Which one of the following statements is TRUE?SLR parser has more states than LALR parser.LALR parser has more states than Canonical LR.Canonical LR has fewer states than...
Bikram
609
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
3
3 votes
1
answers
1 answer
553
553 views
Test by Bikram | Compiler Design | Test 1 | Question: 22
The language which supports _______ needs heap allocation in the runtime environment.Dynamic Data Structure Static Scoping Global Variable Recursion
Bikram
553
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
runtime-environment
+
–
3
3 votes
1
answers
1 answer
2.5k
2.5k views
Test by Bikram | Compiler Design | Test 1 | Question: 21
Which one of the following can be handled by predictive parsers?Left recursionLeft factorsAmbiguityNon-determinism
Bikram
2.5k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
3
3 votes
1
1 answer
1.8k
1.8k views
Test by Bikram | Compiler Design | Test 1 | Question: 20
The least number of temporary variables required to create a $3$ address code sequence for the statement $L= P + R$ is ________.
Bikram
1.8k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
numerical-answers
compiler-design
intermediate-code
+
–
4
4 votes
2
answers
2 answers
685
685 views
Test by Bikram | Compiler Design | Test 1 | Question: 19
Consider the following grammar:$Z \rightarrow TZ'$$Z' \rightarrow +TZ' \mid \epsilon$$T \rightarrow Y T '$$T ' \rightarrow ^* YT ' \mid \epsilon$$Y \rightarrow (Z) \mi...
Bikram
685
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
3
3 votes
1
answers
1 answer
699
699 views
Test by Bikram | Compiler Design | Test 1 | Question: 18
Assume that the SLR(1) parser for a grammar has P1 states, and the CLR(1) parser for the same has P2 states. Which of the following clearly depicts the relationship betwe...
Bikram
699
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
2
2 votes
1
answers
1 answer
520
520 views
Test by Bikram | Compiler Design | Test 1 | Question: 17
Which one of the following statements is TRUE?SLR parser is more powerful than LALR.LALR parser is more powerful than Canonical LR.Canonical LR is more powerful than LALR...
Bikram
520
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
3
3 votes
1
1 answer
1.4k
1.4k views
Test by Bikram | Compiler Design | Test 1 | Question: 16
Consider the following grammars:$S \rightarrow aS \mid Sa \mid \in$$E \rightarrow E +E \mid E^*E \mid id$$A \rightarrow AA \mid (A) \mid a$$S \rightarrow SS \mid AB, \ A...
Bikram
1.4k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
2
2 votes
2
answers
2 answers
1.1k
1.1k views
Test by Bikram | Compiler Design | Test 1 | Question: 15
Which of these is NOT true about Abstract Syntax Tree (AST)?An AST is usually the result of the syntax analysis phase of a compiler.AST has no impact on the final output...
Bikram
1.1k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
syntax-directed-translation
intermediate-code
+
–
2
2 votes
1
answers
1 answer
805
805 views
Test by Bikram | Compiler Design | Test 1 | Question: 14
Consider the following grammar: $E' \rightarrow E$$E \rightarrow E + Y \mid Y$$Y \rightarrow Y ^* F \mid F$$F \rightarrow id \mid (E)$How many $LR(0)$ items are there in ...
Bikram
805
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
3
3 votes
1
answers
1 answer
623
623 views
Test by Bikram | Compiler Design | Test 1 | Question: 13
Consider following Translation Scheme:$S \rightarrow ER$$R \rightarrow ^* E \{ print \{' *' \}; \} R \mid \epsilon$$E \rightarrow F + E \{ print ('+');\} \mid F$$F \right...
Bikram
623
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
syntax-directed-translation
+
–
2
2 votes
2
answers
2 answers
848
848 views
Test by Bikram | Compiler Design | Test 1 | Question: 12
Read the below mentioned grammar:$S \rightarrow X$$X \rightarrow YX \mid \epsilon$$Y \rightarrow aY \mid b$This grammar is NOT:$LALR$$LR (0)$$LR(1)$None of the above
Bikram
848
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
3
3 votes
1
answers
1 answer
563
563 views
Test by Bikram | Compiler Design | Test 1 | Question: 11
In the construction of $LL(1)$ parsing table for the following grammar $M[S,( ] \& M [W, \$]$ are respectively$S \rightarrow XY$$X \rightarrow (S) \mid \text{ int } W$$Y\...
Bikram
563
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
3
3 votes
1
answers
1 answer
770
770 views
Test by Bikram | Compiler Design | Test 1 | Question: 10
The grammar which has no epsilon transition or two adjacent nonterminals in the right side of any production is ___________.LL(1) grammarUnambiguous grammarOperator gramm...
Bikram
770
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
2
2 votes
1
answers
1 answer
486
486 views
Test by Bikram | Compiler Design | Test 1 | Question: 9
___________ parsers build parse trees starting from the root node and work down to the leaves.LRLLSLRLALR
Bikram
486
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
2
2 votes
2
2 answers
1.2k
1.2k views
Test by Bikram | Compiler Design | Test 1 | Question: 8
Read the following grammar:$S \rightarrow Ka \mid bKc \mid dc \mid bda$$K \rightarrow d$This grammar is NOT:LALR(1)SLR(1)LR(1)None of the above
Bikram
1.2k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
grammar
+
–
4
4 votes
1
answers
1 answer
1.3k
1.3k views
Test by Bikram | Compiler Design | Test 1 | Question: 7
The number of proper prefixes for a string of length $n$ are ___________.$n+1$$n(n+1)/2$$n-1$$(n-1)/2$
Bikram
1.3k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
combinatory
counting
+
–
3
3 votes
2
answers
2 answers
560
560 views
Test by Bikram | Compiler Design | Test 1 | Question: 6
Consider the following grammars:$Z \rightarrow TZ'$$Z' \rightarrow ^* TZ' \mid \epsilon$$T \rightarrow YT'$$T ' \rightarrow ^*YT ' \mid \epsilon$$Y \rightarrow (Z) \mi...
Bikram
560
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
2
2 votes
1
answers
1 answer
890
890 views
Test by Bikram | Compiler Design | Test 1 | Question: 5
__________ is the most powerful parsing method.LL(1)LALRSLRCanonical LR
Bikram
890
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
2
2 votes
1
answers
1 answer
578
578 views
Test by Bikram | Compiler Design | Test 1 | Question: 4
A top-down parser generates ________________.right-most derivationright-most derivation in reverseleft-most derivationleft-most derivation in reverse
Bikram
578
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
2
2 votes
1
answers
1 answer
1.1k
1.1k views
Test by Bikram | Compiler Design | Test 1 | Question: 3
Consider the following two parse trees for the expression: $6 - 4 - 3$ list list / | \ ...
Bikram
1.1k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
4
4 votes
1
answers
1 answer
1.2k
1.2k views
Test by Bikram | Compiler Design | Test 1 | Question: 2
The default type of conflict resolution rule for the Yacc parser generator is _________________. in favor of shift in favor of reduce either shift or reduce depen...
Bikram
1.2k
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
3
3 votes
1
answers
1 answer
693
693 views
Test by Bikram | Compiler Design | Test 1 | Question: 1
Match the following:$$\begin{array}{|l|l|l|l|} \hline a. & \text{Canonical Parser} & 1. & \text{No adjacent nonterminals} \\ \hline b. & \text{SLR(1) Parser} & 2. & \text...
Bikram
693
views
asked
Nov 25, 2016
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
To see more, click for the
full list of questions
or
popular tags
.