Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged lr-parser
0
votes
1
answer
31
please solve
neelesh123
316
views
neelesh123
asked
Sep 16, 2022
Theory of Computation
compiler-design
parsing
lr-parser
+
–
6
votes
3
answers
32
GATE CSE 2022 | Question: 19
Consider the augmented grammar with $\{ +, {\ast}, (,),\text{id} \}$ as the set of terminals. $S' \rightarrow S$ $S \rightarrow S + R\; |\; R$ $R \rightarrow R {\ast} P \;| \;P$ $P \rightarrow (S)\; |\; \text{id} $ If $I_{0}$ is ... $\{ [S' \rightarrow S.], [S \rightarrow S. + R] \}$, then $\textit{goto(closure}(I_{0}), +)$ contains exactly ______________ items.
Consider the augmented grammar with $\{ +, {\ast}, (,),\text{id} \}$ as the set of terminals.$S’ \rightarrow S$$S \rightarrow S + R\; |\; R$$R \rightarrow R {\ast} P \;...
Arjun
7.3k
views
Arjun
asked
Feb 15, 2022
Compiler Design
gatecse-2022
numerical-answers
compiler-design
parsing
lr-parser
1-mark
+
–
2
votes
1
answer
33
GATE Overflow Test Series | Mock GATE | Test 6 | Question: 23
Which of the following statements regarding LR parsers is/are FALSE? (Mark all the appropriate choices) A $\text{LR(0)}$ configuration set cannot have multiple reduced items A $\text{LR(0)}$ configuration set cannot have both shifts ... SHIFT and REDUCE items to be in the same state An $\text{LR(0)}$ parser can parse any regular grammar
Which of the following statements regarding LR parsers is/are FALSE? (Mark all the appropriate choices)A $\text{LR(0)}$ configuration set cannot have multiple reduced ite...
Arjun
239
views
Arjun
asked
Jan 30, 2022
Compiler Design
go2025-mockgate-6
compiler-design
parsing
lr-parser
multiple-selects
1-mark
+
–
1
votes
4
answers
34
#self doubt
Every unambiguous grammar is LR(0) grammar?
Every unambiguous grammar is LR(0) grammar?
samarpita
1.3k
views
samarpita
asked
Nov 18, 2021
Compiler Design
compiler-design
lr-parser
+
–
8
votes
1
answer
35
GATE CSE 2021 Set 2 | Question: 51
Consider the following augmented grammar with $\{ \#, @, <, >, a, b, c \}$ ... $\text{GOTO(GOTO}(I_0<), <)$ is ___________
Consider the following augmented grammar with $\{ \#, @, <, >, a, b, c \}$ as the set of terminals. $$\begin{array}{l} S’ \rightarrow S \\ S \rightarrow S \# cS \\ S \r...
Arjun
6.6k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set2
compiler-design
lr-parser
numerical-answers
2-marks
+
–
10
votes
2
answers
36
GATE CSE 2021 Set 1 | Question: 5
Consider the following statements. $S_1:$ Every $\text{SLR(1)}$ grammar is unambiguous but there are certain unambiguous grammars that are not $\text{SLR(1)}$. $S_2:$ For any context-free grammar, there is a parser that takes at most $O(n^3)$ time to parse a ... false $S_1$ is false and $S_2$ is true $S_1$ is true and $S_2$ is true $S_1$ is false and $S_2$ is false
Consider the following statements.$S_1:$ Every $\text{SLR(1)}$ grammar is unambiguous but there are certain unambiguous grammars that are not $\text{SLR(1)}$.$S_2:$ For a...
Arjun
7.9k
views
Arjun
asked
Feb 18, 2021
Compiler Design
gatecse-2021-set1
compiler-design
lr-parser
1-mark
+
–
2
votes
1
answer
37
GATE Overflow Test Series | Mock GATE | Test 5 | Question: 17
Which of the following sentences regarding Viable prefixes is/are CORRECT? (Mark all the appropriate choices) Viable prefixes are used in predictive parsing. Viable prefixes are the set of prefixes of right-sentential forms that ... regular language. Viable prefixes have prefix-free property (no string is a prefix of any other string).
Which of the following sentences regarding Viable prefixes is/are CORRECT? (Mark all the appropriate choices)Viable prefixes are used in predictive parsing.Viable prefixe...
gatecse
394
views
gatecse
asked
Feb 8, 2021
Compiler Design
go2025-mockgate-5
compiler-design
lr-parser
viable-prefixes
multiple-selects
1-mark
+
–
1
votes
1
answer
38
GATE Overflow Test Series | Mock GATE | Test 5 | Question: 22
When we merge states in an $LR(1)$ parser to form an $LALR(1)$ parser, we may introduce Shift-reduce conflict. Reduce-reduce conflict. Neither shift-reduce nor reduce-reduce conflict. Both shift-reduce as well as reduce-reduce conflict.
When we merge states in an $LR(1)$ parser to form an $LALR(1)$ parser, we may introduceShift-reduce conflict.Reduce-reduce conflict.Neither shift-reduce nor reduce-reduce...
gatecse
165
views
gatecse
asked
Feb 8, 2021
Compiler Design
go2025-mockgate-5
compiler-design
lr-parser
1-mark
+
–
2
votes
1
answer
39
GATE Overflow Test Series | Mock GATE | Test 3 | Question: 39
Consider the grammar $S \rightarrow AaAb \mid BbBa$ $A \rightarrow \varepsilon$ $B \rightarrow \varepsilon$ If the number of shift-reduce conflicts for $LR(0)$ parsing of the above grammar is $\alpha,$ and the number of reduce-reduce conflicts is $\beta,$ then the value of $\alpha - \beta =$__________
Consider the grammar$S \rightarrow AaAb \mid BbBa$$A \rightarrow \varepsilon$$B \rightarrow \varepsilon$If the number of shift-reduce conflicts for $LR(0)$ parsing of the...
gatecse
591
views
gatecse
asked
Jan 26, 2021
Compiler Design
go2025-mockgate-3
numerical-answers
compiler-design
lr-parser
+
–
5
votes
1
answer
40
GATE Overflow Test Series | Mock GATE | Test 2 | Question: 20
Which of the following sentences regarding Viable prefixes is/are CORRECT? (Mark all the appropriate choices) Viable prefixes are the set of prefixes of right-sentential forms that can appear on the stack of a shift-reduce ... not necessarily regular Viable prefixes have prefix-free property (no string is a prefix of any other string)
Which of the following sentences regarding Viable prefixes is/are CORRECT? (Mark all the appropriate choices)Viable prefixes are the set of prefixes of right-sentential f...
gatecse
511
views
gatecse
asked
Jan 17, 2021
Compiler Design
go2025-mockgate-2
lr-parser
viable-prefixes
multiple-selects
+
–
4
votes
1
answer
41
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 1
When we merge states in an $LR(1)$ parser to form an $LALR(1)$ parser, we may introduce shift-reduce conflict reduce-reduce conflict neither shift-reduce nor reduce-reduce conflict both shift-reduce as well as reduce-reduce conflict
When we merge states in an $LR(1)$ parser to form an $LALR(1)$ parser, we may introduceshift-reduce conflictreduce-reduce conflictneither shift-reduce nor reduce-reduce c...
gatecse
166
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
lr-parser
+
–
5
votes
1
answer
42
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 2
Suppose we have a rightmost derivation which proceeds as follows: $\begin{array}{ccc}S &\rightarrow & Aabw\\ & \rightarrow &ABw \end{array}$ ... $\begin{array}{ccc} B &\rightarrow & ab \end{array}$
Suppose we have a rightmost derivation which proceeds as follows:$\begin{array}{ccc}S &\rightarrow & Aabw\\ & \rightarrow &ABw \end{array}$Which of the following is a pos...
gatecse
212
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
lr-parser
+
–
3
votes
1
answer
43
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 7
Which of the following is TRUE regarding the running time of an $LR(1)$ parser? (Mark all the appropriate choices) It runs in linear time for all inputs It runs in polynomial time for all inputs For some inputs it may take exponential time It runs in $O(n^3)$ but not always $O(n^2)$
Which of the following is TRUE regarding the running time of an $LR(1)$ parser? (Mark all the appropriate choices)It runs in linear time for all inputsIt runs in polynomi...
gatecse
401
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
lr-parser
multiple-selects
+
–
4
votes
1
answer
44
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 8
Which of the following statements regarding $LR(0)$ parser is/are FALSE? (Mark all the appropriate choices) A $LR(0)$ configurating set cannot have multiple reduce items A $LR(0)$ configurating set cannot have both shift as ... $LR(0)$ configurating set it cannot have any other item An $LR(0)$ parser can parse any regular grammar
Which of the following statements regarding $LR(0)$ parser is/are FALSE? (Mark all the appropriate choices)A $LR(0)$ configurating set cannot have multiple reduce itemsA ...
gatecse
421
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
lr-parser
multiple-selects
+
–
2
votes
1
answer
45
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 10
Which of the following sentences regarding Viable prefixes is/are $CORRECT$? (Mark all the appropriate choices) Viable prefixes are the set of prefixes of right-sentential forms that can appear on the stack of a ... Deterministic Finite Automata Viable prefixes have prefix-free property (no string is a prefix of any other string)
Which of the following sentences regarding Viable prefixes is/are $CORRECT$? (Mark all the appropriate choices)Viable prefixes are the set of prefixes of right-sentential...
gatecse
310
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
lr-parser
viable-prefixes
multiple-selects
+
–
1
votes
1
answer
46
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 17
Consider the grammar: $S \rightarrow aABe$ $A \rightarrow Abc \mid b$ $B \rightarrow d$ For the sentence $abbcde,$ the handles in the right-sentential form of the reduction are: $Abc,d\;\text{and}\;aABe$ $aABe,d\;\text{and}\;b$ $Abc\;\text{and}\;aABe$ $b,aABe,d\;\text{and}\;Abc$
Consider the grammar:$S \rightarrow aABe$$A \rightarrow Abc \mid b$$B \rightarrow d$For the sentence $abbcde,$ the handles in the right-sentential form of the reduction a...
gatecse
150
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
parsing
lr-parser
+
–
2
votes
1
answer
47
GATE Overflow Test Series | Compiler Design | Test 1 | Question: 23
Consider the following grammar: $S \rightarrow abS \mid acS \mid c $ The number of states in canonical set of $LR(0)$ items is ________
Consider the following grammar:$S \rightarrow abS \mid acS \mid c $The number of states in canonical set of $LR(0)$ items is ________
gatecse
195
views
gatecse
asked
Dec 14, 2020
Compiler Design
go2025-cd-1
numerical-answers
parsing
lr-parser
+
–
Page:
« prev
1
2
3
4
5
6
7
8
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register