Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Ravijha
2
answers
1
Intermediate code generation-Made easy test series
The minimum number of temporary variables created in 3 address code of the following expression are _____ a+b*c+d-e-a+b*c Assume order of precedence from highest to lowest as: *,+ and - .Consider associativity for + and * are not important but - is left associative.
The minimum number of temporary variables created in 3 address code of the following expression are _____ a+b*c+d-e-a+b*cAssume order of precedence from...
2.4k
views
commented
Jun 28, 2019
Compiler Design
compiler-design
intermediate-code
made-easy-test-series
numerical-answers
+
–
1
answer
2
Difference between computability and decidability
Hi, Could someone please tell the difference between computability and decidability? Thanks
Hi,Could someone please tell the difference between computability and decidability?Thanks
2.6k
views
answer edited
Jun 26, 2019
Theory of Computation
decidability
turing-machine
+
–
2
answers
3
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) \mid id$ Which of the following represents Follow(Y)? $\{ ), id \}$ $\{ ), id, \$, *, + \}$ $\{ ^*, +, ), \$ \}$ $\{ +, ), \$ \}$
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...
319
views
answered
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
1
answer
4
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 between P1 and P2? $P1 \leq P2$ $P1 = P2$ $P1 \geq P2$ It depends on the grammar.
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...
302
views
answered
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
1
answer
5
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) grammar Unambiguous grammar Operator grammar Context Sensitive grammar
The grammar which has no epsilon transition or two adjacent nonterminals in the right side of any production is ___________.LL(1) grammarUnambiguous grammarOperator gramm...
362
views
answered
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
1
answer
6
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 parser. SLR, Canonical LR and LALR parsers have the same power.
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...
207
views
answered
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
1
answer
7
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$ ... $E \rightarrow TE' , \ \ T \rightarrow FT' , \ \ F \rightarrow (E) \mid id$
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...
483
views
answered
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
ll-parser
grammar
+
–
1
answer
8
Test by Bikram | Compiler Design | Test 1 | Question: 26
In compilers, the type checking is done in: Lexical Analysis Semantic Analysis Code Generation Phase Parsing Phase
In compilers, the type checking is done in:Lexical AnalysisSemantic AnalysisCode Generation PhaseParsing Phase
248
views
answered
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
compilation-phases
+
–
1
answer
9
Test by Bikram | Compiler Design | Test 1 | Question: 5
__________ is the most powerful parsing method. LL(1) LALR SLR Canonical LR
__________ is the most powerful parsing method.LL(1)LALRSLRCanonical LR
389
views
commented
Jun 25, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
2
answers
10
token generation doubt
which one of the following string can definitely said to be a token without looking at the next input: +(++,+=) return(return a) *(*=) =(==) ++ , ( ) ‘ ; option e is: plusplus, comma, bracket open, bracket close, single quote ;
which one of the following string can definitely said to be a token without looking at the next input:+(++,+=)return(return a)*(*=)=(==)++ , ( ) ‘ ; option e is: plu...
4.1k
views
commented
Jun 24, 2019
Compiler Design
lexical-analysis
compiler-tokenization
+
–
2
answers
11
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) \mid id$ Which of the following is First(Z)? $\{T, ) \}$ $\{(, id \}$ $\{ ), \$ \}$ None of the above
Consider the following grammars:$Z \rightarrow TZ'$$Z' \rightarrow ^* TZ' \mid \epsilon$$T \rightarrow YT'$$T ' \rightarrow ^*YT ' \mid \epsilon$$Y \rightarrow (Z) \mi...
243
views
answered
Jun 24, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
grammar
+
–
1
answer
12
Test by Bikram | Compiler Design | Test 1 | Question: 4
A top-down parser generates ________________. right-most derivation right-most derivation in reverse left-most derivation left-most derivation in reverse
A top-down parser generates ________________.right-most derivationright-most derivation in reverseleft-most derivationleft-most derivation in reverse
318
views
answered
Jun 24, 2019
Compiler Design
tbb-cd-1
compiler-design
parsing
+
–
0
answers
13
Peter Linz Edition 4 Exercise 7.3 Question 7 (Page No. 200)
Give reasons why one might conjecture that the following language is not deterministic. $L =$ { $a^nb^mc^k : n = m$ or $m = k$}.
Give reasons why one might conjecture that the following language is not deterministic. $L =$ { $a^nb^mc^k : n = m$ or $m = k...
594
views
commented
Jun 24, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-language
+
–
1
answer
14
If DFA is constructed from NFA using lazy subset construction method , is it guaranteed to be the minimized DFA ?
1.0k
views
answered
Jun 23, 2019
1
answer
15
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 7
Which of the following is a requirement for an LL(1) grammar? Unambiguity No left recursion If $A \to \alpha \mid \beta$ are two productions, then $FIRST(\alpha)$ and $FIRST(\beta)$ are disjoint (i) and (ii) (iii) (i), (ii) and (iii) (ii) and (iii)
Which of the following is a requirement for an LL(1) grammar?UnambiguityNo left recursionIf $A \to \alpha \mid \beta$ are two productions, then $FIRST(\alpha)$ and $FIRST...
4.1k
views
answer edited
Jun 22, 2019
Compiler Design
go-cd-1
ll-parser
+
–
1
answer
16
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 4
Which of the following statements is FALSE? In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same state In a SLR(1) parser, it is allowable for multiple reduce items to be in the same state All SLR(1) grammars are LR(0) All LR(0) grammars are SLR(1)
Which of the following statements is FALSE?In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same stateIn a SLR(1) parser, it is allowable ...
3.5k
views
answered
Jun 22, 2019
Compiler Design
go-cd-1
+
–
3
answers
17
GATE CSE 2008 | Question: 10
Which of the following are decidable? Whether the intersection of two regular languages is infinite Whether a given context-free language is regular Whether two push-down automata accept the same language Whether a given grammar is context-free I and II I and IV II and III II and IV
Which of the following are decidable?Whether the intersection of two regular languages is infiniteWhether a given context-free language is regularWhether two push-down au...
13.7k
views
commented
Jun 22, 2019
Theory of Computation
gatecse-2008
theory-of-computation
decidability
easy
+
–
2
answers
18
Peter Linz Edition 4 Exercise 7.2 Question 9 (Page No. 195)
Find an npda with two states for the language $L =$ {$a^nb^{n+1} : n ≥ 0$}.
Find an npda with two states for the language $L =$ {$a^nb^{n+1} : n ≥ 0$}.
1.4k
views
answered
Jun 22, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pushdown-automata
npda
+
–
1
answer
19
Peter Linz Edition 4 Exercise 7.2 Question 10 (Page No. 195)
Find an npda with two states that accepts $L =$ {$a^nb^{2n} : n ≥1$}.
Find an npda with two states that accepts $L =$ {$a^nb^{2n} : n ≥1$}.
493
views
answered
Jun 22, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
pushdown-automata
npda
+
–
0
answers
20
Ullman (TOC) Edition 3 Exercise 3.2 Question 3 (Page No. 107)
Convert the following DFA to a regular expression using the state elimination techniques.
Convert the following DFA to a regular expression using the state elimination techniques.
896
views
commented
Jun 22, 2019
Theory of Computation
ullman
theory-of-computation
finite-automata
regular-expression
+
–
3
answers
21
Lexical analyser, Tokens
When do we count ++(post increment or pre increment) as 1 or 2 token ?
When do we count ++(post increment or pre increment) as 1 or 2 token ?
3.9k
views
answer edited
Jun 22, 2019
Compiler Design
compiler-tokenization
lexical-analysis
+
–
2
answers
22
Gate CS
#include<stdio.h> int main() { int x, y = 7; x = ++y + ++y + y--; printf("%d\n", x); return 0; } What is the output of this code snippet ? A. 27 B. 26 C. 25 D. Compilation error
#include<stdio.h int main() { int x, y = 7; x = ++y + ++y + y ; printf("%d\n", x); return 0; }What is the output of this code snippet ?A. 27B. 26C. 25D. Compilation error...
626
views
commented
Jun 22, 2019
Programming in C
programming-in-c
undefined-behaviour
+
–
2
answers
23
TOC DCFL vs CFL
1. L ={ a^n b^m c^x d^y | n=m or x=y} 2. L ={ a^n b^x c^m d^y | n=m or x=y} Classify above in CFL/DCFL?
1. L ={ a^n b^m c^x d^y | n=m or x=y}2. L ={ a^n b^x c^m d^y | n=m or x=y}Classify above in CFL/DCFL?
3.5k
views
commented
Jun 22, 2019
Theory of Computation
theory-of-computation
context-free-language
dcfl
+
–
2
answers
24
Lexical Analysis
What are different set of characters which are taken as single token in lexical analysis in compiler design? For eg. Charaters under double quotes are taken as single token, post-increment and pre-increment is taken as single token etc.
What are different set of characters which are taken as single token in lexical analysis in compiler design?For eg. Charaters under double quotes are taken as single toke...
838
views
answered
Jun 21, 2019
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
1
answer
25
Lexical Analysis: Self Doubt
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimiter, which includes blank symbol, arithmetic, logical operator, left parenthesis, right ... with a delimiter and + is a valid delimiter and the error in declaration will not be detected at this stage...
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimi...
1.9k
views
comment edited
Jun 21, 2019
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
7
answers
26
Lexical vs Syntax Error
3.5k
views
answered
Jun 21, 2019
Compiler Design
compiler-design
lexical-analysis
ace-test-series
+
–
5
answers
27
Lexical Analysis
What it the number of tokens in the following line? printf("%d numbers.", &x);
What it the number of tokens in the following line?printf("%d numbers.", &x);
1.8k
views
answered
Jun 21, 2019
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
2
answers
28
MadeEasy Test Series: Compiler Design - Lexical Analysis
int main() { int a,b; a=10; b=15; printf("a=%d,b=%d",a++,b--); } The number of tokens in the above C program is_________. I am getting 30 The answer given is 29
int main() { int a,b; a=10; b=15; printf("a=%d,b=%d",a++,b ); }The number of tokens in the above C program is_________.I am getting 30The answer given is 29
1.3k
views
answered
Jun 21, 2019
Compiler Design
compiler-design
lexical-analysis
made-easy-test-series
+
–
2
answers
29
Ullman (TOC) Edition 3 Exercise 2.2.6 Problem 2.2.11 (Page No. 54)
580
views
commented
Jun 21, 2019
Theory of Computation
ullman
theory-of-computation
descriptive
+
–
4
answers
30
Regular Expression
Can I write $a^* + b^* = (a + b)^*$ ????
Can I write $a^* + b^* = (a + b)^*$ ????
926
views
answer edited
Jun 21, 2019
Theory of Computation
regular-expression
theory-of-computation
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register