Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Compiler Design:
Recent questions tagged compiler-design
2
votes
1
answer
1351
Compilers
here it is given bottom up parsing still action is given in middle so output should be GAAAAT??? Is it true that in syntax tree tanslation bottom up and top down gives same answer???
here it is given bottom up parsing still action is given in middle so output should be GAAAAT??? Is it true that in syntax tree tanslation bottom up and top down gives sa...
Rahul Jain25
1.2k
views
Rahul Jain25
asked
Dec 26, 2016
Compiler Design
compiler-design
syntax-directed-translation
test-series
+
–
2
votes
1
answer
1352
Vgate
Which of the following is correct? a) Top-down parser complexity is O(n4) b) Bottom-up parser complexity is O(n3) (A) True, False (B) False, True (C) True, True (D) False, False can anyone explain how to analyze this complexity?
Which of the following is correct?a) Top-down parser complexity is O(n4)b) Bottom-up parser complexity is O(n3)(A) True, False(B) False, True(C) True, True(D) False, Fals...
Anusha Motamarri
1.3k
views
Anusha Motamarri
asked
Dec 26, 2016
Theory of Computation
compiler-design
+
–
0
votes
0
answers
1353
[Compiler Design] Distinct tokens vs Distinct lexemes
Question1. Count number of Distinct tokens and lexemes in following code { float a=20.6; float b=19.8; float c=19.8; float a=20.6; float c=15.7; printf("Hello!How r u"); printf("I am Good"); } ... same as token is just a representation of lexemes associated with it?So by this the answer to 2 and 3 statement will be true?
Question1. Count number of Distinct tokens and lexemes in following code{float a=20.6;float b=19.8;float c=19.8;float a=20.6;float c=15.7;printf("Hello!How r u");printf("...
rahul sharma 5
1.5k
views
rahul sharma 5
asked
Dec 26, 2016
Compiler Design
compiler-design
compiler-tokenization
+
–
3
votes
1
answer
1354
MadeEasy Subject Test: Compiler Design - Parsing
A non left recursive and left facotred grammar in which all non-empty rules defining the same non terminal have disjoint first sets, such grammar is called _____________ a) LL(1) b) LR(0) c) LR(1) d) None asnwer given LL(1). but i think bcoz of follow there can be conflict hence none of these should be the answer. Is it right??
A non left recursive and left facotred grammar in which all non-empty rules defining the same non terminal have disjoint first sets, such grammar is called _____________a...
Rahul Jain25
1.2k
views
Rahul Jain25
asked
Dec 25, 2016
Compiler Design
made-easy-test-series
compiler-design
parsing
+
–
0
votes
1
answer
1355
Counting Tokens
Count tokens in following - 1. in/*Hello!How are you/*t=10; I know that comments will be ignored,but now will in and t are two separate tokens or one?Please explain reason also 2. int a;// a is variable 3. int // a is variable;
Count tokens in following -1. in/*Hello!How are you/*t=10;I know that comments will be ignored,but now willin and tare two separate tokens or one?Please explain reason ...
rahul sharma 5
661
views
rahul sharma 5
asked
Dec 25, 2016
Compiler Design
compiler-design
compiler-tokenization
+
–
0
votes
2
answers
1356
parsers
State Trur/False: "every LL grammar is a proper subset of LR grammar".
State Trur/False: "every LL grammar is a proper subset of LR grammar".
gate_forum
479
views
gate_forum
asked
Dec 21, 2016
Compiler Design
compiler-design
parsing
bad-question
true-false
+
–
4
votes
1
answer
1357
DAG compilers
How to find unnecessary production while optimising DAG. for ex- a = b * c d = b e = d * c b = e f = b + c g = f + d How many production need to be removed and how to find them . ?
How to find unnecessary production while optimising DAG. for ex-a = b * c d = b e = d * c b = e f = b + c g = f + dHow many production need to be removed and how to find ...
Tendua
2.9k
views
Tendua
asked
Dec 21, 2016
Compiler Design
compiler-design
code-optimization
directed-acyclic-graph
+
–
1
votes
1
answer
1358
S and L-attribute
iita
3.9k
views
iita
asked
Dec 20, 2016
Compiler Design
compiler-design
syntax-directed-translation
test-series
+
–
1
votes
1
answer
1359
lead of a terminal
What is lead...?? and how to calculate it..??
What is lead...?? and how to calculate it..??
iita
229
views
iita
asked
Dec 20, 2016
Compiler Design
compiler-design
parsing
operator-grammar
test-series
+
–
0
votes
2
answers
1360
operator grammer
iita
387
views
iita
asked
Dec 20, 2016
Compiler Design
compiler-design
operator-grammar
test-series
+
–
0
votes
3
answers
1361
precedence in grammer
iita
552
views
iita
asked
Dec 20, 2016
Compiler Design
compiler-design
operator-grammar
operator-precedence
ace-test-series
+
–
0
votes
1
answer
1362
parsing table space
iita
207
views
iita
asked
Dec 20, 2016
Compiler Design
compiler-design
parsing
lr-parser
test-series
+
–
0
votes
2
answers
1363
Syllabus_Help
From the following topics which are out of syllabus. plz mark it out.Thanks. I got the syllabus change page from gatecse but still unable to clearly differentiate out of syllabus topics.So plz kindly filter the out of syllabus topics.
From the following topics which are out of syllabus. plz mark it out.Thanks.I got the syllabus change page from gatecse but still unable to clearly differentiate out of s...
Rajesh Pradhan
1.2k
views
Rajesh Pradhan
asked
Dec 20, 2016
Compiler Design
compiler-design
syllabus
+
–
0
votes
1
answer
1364
type of grammer
iita
435
views
iita
asked
Dec 19, 2016
Compiler Design
compiler-design
parsing
ace-test-series
+
–
2
votes
1
answer
1365
Parsing doubt
$\begin{align*} &\color{blue}{\text{Top down predictive parsers detect errors earlier than bottom up parsers (true/false)}} \\ &\color{maroon}{\text{Justify your answer}} \\ \end{align*}$
$\begin{align*} &\color{blue}{\text{Top down predictive parsers detect errors earlier than bottom up parsers (true/false)}} \\ &\color{maroon}{\text{Justify your answer}}...
Anusha Motamarri
1.3k
views
Anusha Motamarri
asked
Dec 19, 2016
Compiler Design
compiler-design
parsing
true-false
+
–
1
votes
1
answer
1366
GATE CSE 1988 | Question: 10iia
Translate the executable statements of the following Pascal Program into quadruples. Assume that integer and real values require four words each. repeat flag[i]:=true; while turn !=i do begin while flag[j] do skip turn:=i; end critical section flag[i]:=false; until false Program Test; ... 1...10] of real; begin i:=0; While i:<=10 do begin a[i]:=0; i:=i+1 end; end.
Translate the executable statements of the following Pascal Program into quadruples. Assume that integer and real values require four words each.repeat flag[i]:=true; whi...
go_editor
828
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
descriptive
compiler-design
intermediate-code
pascal
out-of-gate-syllabus
+
–
4
votes
2
answers
1367
GATE CSE 1988 | Question: 10ib
Consider the following grammar: $S \rightarrow S$ $S \rightarrow SS \mid a \mid \epsilon$ Indicate the shift-reduce and reduce-reduce conflict (if any) in the various states of the $\text{LR(0)}$ parser.
Consider the following grammar:$S \rightarrow S$$S \rightarrow SS \mid a \mid \epsilon$Indicate the shift-reduce and reduce-reduce conflict (if any) in the various states...
go_editor
2.2k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
compiler-design
descriptive
grammar
parsing
+
–
10
votes
2
answers
1368
GATE CSE 1988 | Question: 10ia
Consider the following grammar: $S \rightarrow S$ $S \rightarrow SS \mid a \mid \epsilon$ Construct the collection of sets of $\text{LR (0)}$ items for this grammar and draw its goto graph.
Consider the following grammar:$S \rightarrow S$$S \rightarrow SS \mid a \mid \epsilon$Construct the collection of sets of $\text{LR (0)}$ items for this grammar and draw...
go_editor
3.7k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
compiler-design
descriptive
grammar
parsing
+
–
5
votes
1
answer
1369
GATE CSE 1988 | Question: 8i
Consider the procedure declaration: Procedure P (k: integer) where the parameter passing mechanism is call-by-value-result. Is it correct if the call, P (A[i]), where A is an array and i an integer, is implemented as below. create a new local variable, ... P using z for k; set A [i] to z; Explain your answer. If this is incorrect implementation, suggest a correct one.
Consider the procedure declaration:Procedure P (k: integer)where the parameter passing mechanism is call-by-value-result. Is it correct if the call, P (A[i]), where A is ...
go_editor
1.8k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
descriptive
compiler-design
runtime-environment
parameter-passing
+
–
8
votes
1
answer
1370
GATE CSE 1988 | Question: 2xvii
Construct a DAG for the following set of quadruples: E:=A+B F:=E-C G:=F*D H:=A+B I:=I-C J:=I+G
Construct a DAG for the following set of quadruples:E:=A+BF:=E-CG:=F*DH:=A+BI:=I-CJ:=I+G
go_editor
2.4k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
descriptive
compiler-design
intermediate-code
+
–
19
votes
1
answer
1371
GATE CSE 1988 | Question: 2xv
What is printed by following program, assuming call-by reference method of passing parameters for all variables in the parameter list of procedure P? program Main(inout, output); var a, b:integer; procedure P(x, y, z:integer); begin y:=y+1 z:=x+x end P; begin a:=2; b:=3; p(a+b, a, a); Write(a) end.
What is printed by following program, assuming call-by reference method of passing parameters for all variables in the parameter list of procedure P?program Main(inout, o...
go_editor
2.3k
views
go_editor
asked
Dec 19, 2016
Compiler Design
gate1988
descriptive
compiler-design
runtime-environment
parameter-passing
numerical-answers
+
–
0
votes
0
answers
1372
Consider the regular expression 1(1+0)*0.
Consider the regular expression 1(1+0)*0. Contruct the NFA for the given regular expression using Thomson’s construction algorithm and then apply subset construction algorithm to construct the equivalent DFA of the constructed NFA.Finally minimize the DFA. Please answer with working:)
Consider the regular expression 1(1+0)*0.Contruct the NFA for the given regular expression using Thomson’s construction algorithm and then apply subset construction alg...
rahuldb
388
views
rahuldb
asked
Dec 19, 2016
Compiler Design
compiler-design
+
–
0
votes
1
answer
1373
compiler grammar
Give a grammar which is LL(1) but not LALR(1) .
Give a grammar which is LL(1) but not LALR(1) .
papesh
497
views
papesh
asked
Dec 18, 2016
Compiler Design
compiler-design
parsing
ll-parser
lr-parser
descriptive
+
–
18
votes
4
answers
1374
GATE CSE 1988 | Question: 2xii
Consider the following program skeleton and below figure which shows activation records of procedures involved in the calling sequence. $p \rightarrow s \rightarrow q \rightarrow r \rightarrow q.$Write the access links of the activation records to enable correct access and ... procedure r; begin q end r; begin r end q; procedure s; begin q end s; begin s end p;
Consider the following program skeleton and below figure which shows activation records of procedures involved in the calling sequence. $$p \rightarrow s \rightarrow q \r...
go_editor
6.1k
views
go_editor
asked
Dec 18, 2016
Compiler Design
gate1988
normal
descriptive
runtime-environment
compiler-design
+
–
9
votes
1
answer
1375
Convert the given Three Address Code (TAC) into Static Single Assignment (SSA) ?
$x=5$ $x=x-3$ $\textbf{if } x<3$ $\quad y=x*2$ $\quad w=y$ $\textbf{else}$ $\quad y=x-3$ $w=x-y$ $z=x+y$ Give Equivalent SSA.
$x=5$$x=x-3$$\textbf{if } x<3$$\quad y=x*2$$\quad w=y$$\textbf{else}$$\quad y=x-3$$w=x-y$$z=x+y$Give Equivalent SSA.
papesh
2.0k
views
papesh
asked
Dec 17, 2016
Compiler Design
compiler-design
static-single-assignment
+
–
1
votes
2
answers
1376
Compiler
Consider the grammar given below. It is E -> T+E | T T -> a a. SLR(1) but not LL(1) b. Not an operator grammar c. Ambiguous d. None of these
Consider the grammar given below. It isE - T+E | TT - aa. SLR(1) but not LL(1)b. Not an operator grammarc. Ambiguousd. None of these
umang_16
643
views
umang_16
asked
Dec 16, 2016
Compiler Design
compiler-design
parsing
ambiguous-grammar
+
–
0
votes
0
answers
1377
Grammar ambiguity and parsing
$\begin{align*} \text {stmt} &\rightarrow \text{if expr then stmt else stmt} \\ & \;\; \;\; | \text{ if expr then stmt} \\ & \;\; \;\; | \text{ other} \end{align*}$ Which of the following statement/s is ... and the ambiguity cannot be resolved. B. The grammar is unambiguous C. The grammar is ambiguous and the ambiguity can be resolved D. None of these
$$\begin{align*} \text {stmt} &\rightarrow \text{if expr then stmt else stmt} \\ & \;\; \;\; | \text{ if expr then stmt} \\ & \;\; \;\; | \text{ other} \end{align*}$$Whic...
dd
969
views
dd
asked
Dec 15, 2016
Compiler Design
compiler-design
ambiguous
dangling-else-problem
parsing
+
–
1
votes
1
answer
1378
LR parsing transitions
Consider the following statements: S1: Whenever we apply transition on any symbol the lookahead does not change S2: The lookahead has effect on items of the form [$A\rightarrow \alpha \bullet \beta , a$] where β ≠ ∈ and [$A\rightarrow \alpha \bullet , a$] Which of the above statements are true wrt LR(1) items?
Consider the following statements:S1: Whenever we apply transition on any symbol the lookahead does not changeS2: The lookahead has effect on items of the form[$A\rightar...
dd
823
views
dd
asked
Dec 15, 2016
Compiler Design
compiler-design
parsing
+
–
6
votes
3
answers
1379
How is this lexical error ?
prasitamukherjee
5.7k
views
prasitamukherjee
asked
Dec 14, 2016
Compiler Design
compiler-design
lexical-analysis
test-series
+
–
0
votes
1
answer
1380
made Easy compiler test q 10
correct answer
correct answer
Vasu_gate2017
319
views
Vasu_gate2017
asked
Dec 14, 2016
Compiler Design
compiler-design
parsing
operator-grammar
operator-precedence
made-easy-test-series
+
–
Page:
« prev
1
...
41
42
43
44
45
46
47
48
49
50
51
...
67
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register