Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for compiler-design+parser
4
votes
2
answers
1
LL(1) Grammer
S -> (L) | a L -> L . S | S Question: Make necessary changes to make it suitable for LL(1) parsing and Construct FIRST and FOLLOW sets.
S - (L) | aL - L . S | SQuestion: Make necessary changes to make it suitable for LL(1) parsing and Construct FIRST and FOLLOW sets.
kyrierose
28.5k
views
kyrierose
asked
Jun 13, 2017
Compiler Design
compiler-design
grammar
ll-parser
parsing
+
–
4
votes
0
answers
2
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 53
The grammar shown below is LL(k) for some value of k. What is the smallest value of k for which this grammar is LL(k)?
The grammar shown below is LL(k) for some value of k. What is the smallest value of k for which this grammar is LL(k)?
GO Classes
920
views
GO Classes
asked
Feb 5
Compiler Design
goclasses2024-mockgate-14
numerical-answers
compiler-design
parsing
ll-parser
2-marks
+
–
4
votes
1
answer
3
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 54
Consider the following grammar given below. ... the last character of the string: $a^* b($ $\operatorname{CC}($ $\mathrm{BC}($ $\mathrm{CB}$ $\mathrm{BB}$
Consider the following grammar given below.$$\begin{aligned}& A \rightarrow B+A \\& A \rightarrow B \\& B \rightarrow C B \\& B \rightarrow C \\& C \rightarrow D^* \\& C ...
GO Classes
766
views
GO Classes
asked
Jan 13
Compiler Design
goclasses2024-mockgate-11
goclasses
compiler-design
parsing
lr-parser
2-marks
+
–
5
votes
1
answer
4
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 34
$ \begin{aligned} & S \rightarrow S1 \;T \\ & S 1 \rightarrow a \mid(S S) \\ & T \rightarrow \varepsilon \mid b \;T \end{aligned} $ In the $\text{LL(1)}$ parser table, $M$ ... $\{T \rightarrow \varepsilon\}$ $\{S 1 \rightarrow a\}$ and $\{T \rightarrow \varepsilon\}$
$$\begin{aligned}& S \rightarrow S1 \;T \\& S 1 \rightarrow a \mid(S S) \\& T \rightarrow \varepsilon \mid b \;T\end{aligned}$$In the $\text{LL(1)}$ parser table, $M$, of...
GO Classes
455
views
GO Classes
asked
Jan 21
Compiler Design
goclasses2024-mockgate-12
goclasses
compiler-design
parsing
ll-parser
2-marks
+
–
4
votes
1
answer
5
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 39
Consider the following grammar $ \begin{aligned} & A \rightarrow B B \\ & B \rightarrow b \end{aligned} $ Suppose we draw an $\operatorname{LR}(0)$ automatan for the given grammar then which of the ... transitions There is exactly one state with $2$ incoming transitions There is exactly one state with $3$ outgoing transitions
Consider the following grammar$$\begin{aligned}& A \rightarrow B B \\& B \rightarrow b\end{aligned}$$Suppose we draw an $\operatorname{LR}(0)$ automatan for the given gra...
GO Classes
376
views
GO Classes
asked
Jan 28
Compiler Design
goclasses2024-mockgate-13
goclasses
compiler-design
lr-parser
multiple-selects
2-marks
+
–
3
votes
1
answer
6
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 27
Suppose there is a handle on the top of the stack at some point in time while performing $\text{LR(k)}$ parsing. In this context, a cetrain $\text{LR(k)}$ parsers may exhibit uncertainty in ... The parser may perform reduction without generating any conflict. The parser may execute a shift operation without generating any conflict.
Suppose there is a handle on the top of the stack at some point in time while performing $\text{LR(k)}$ parsing. In this context, a cetrain $\text{LR(k)}$ parsers may exh...
GO Classes
529
views
GO Classes
asked
Jan 13
Compiler Design
goclasses2024-mockgate-11
goclasses
compiler-design
parsing
lr-parser
multiple-selects
1-mark
+
–
0
votes
1
answer
7
Which of the following is LL(1) grammar?
A) $S\rightarrow aA\mid bBa$ $A\rightarrow bA\mid a$ $ B\rightarrow aB\mid \varepsilon$ B) $S\rightarrow Aa\mid Bb$ $ A\rightarrow \varepsilon $ $ B\rightarrow \varepsilon $ C) $E\rightarrow E+E\mid (E) \mid id$
A) $S\rightarrow aA\mid bBa$ $A\rightarrow bA\mid a$ $ B\rightarrow aB\mid \varepsilon$B) $S\rightarrow Aa\mid Bb$ $ A\rightarrow \varepsilon $ $ B\rightarrow...
rexritz
616
views
rexritz
asked
Oct 22, 2023
Compiler Design
compiler-design
ll-parser
+
–
1
votes
5
answers
8
When LALR(1) is constructed form CLR(1) does not contain any shift reduce conflicts?
Soumyashree
6.8k
views
Soumyashree
asked
Dec 4, 2015
Compiler Design
compiler-design
parsing
lr-parser
+
–
6
votes
3
answers
9
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
+
–
19
votes
2
answers
10
GATE CSE 2020 | Question: 24
Consider the following grammar. $S \rightarrow aSB \mid d$ $B \rightarrow b$ The number of reduction steps taken by a bottom-up parser while accepting the string $aaadbbb$ is ___________.
Consider the following grammar.$S \rightarrow aSB \mid d$$B \rightarrow b$The number of reduction steps taken by a bottom-up parser while accepting the string $aaadbbb$ ...
Arjun
12.5k
views
Arjun
asked
Feb 12, 2020
Compiler Design
gatecse-2020
numerical-answers
compiler-design
lr-parser
1-mark
+
–
10
votes
2
answers
11
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
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register