Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged lr-parser
1
votes
1
answer
61
NIELIT Scientific Assistant A 2020 November: 94
Shift reduce parsing can also be called as: Reverse of the Right Most Derivation Right Most Derivation Left Most Derivation None of the options
Shift reduce parsing can also be called as:Reverse of the Right Most DerivationRight Most DerivationLeft Most DerivationNone of the options
gatecse
420
views
gatecse
asked
Dec 9, 2020
Compiler Design
nielit-sta-2020
compiler-design
parsing
lr-parser
+
–
2
votes
1
answer
62
NIELIT 2017 DEC Scientist B - Section B: 33
Which of the following statements is/are false? $S1$: $LR(0)$ grammar and $SLR(1)$ grammar are equivalent $S2$: $LR(1)$ grammar are subset of $LALR(1)$ grammars $S1$ only $S1$ and $S2$ both $S2$ only None of the options
Which of the following statements is/are false?$S1$: $LR(0)$ grammar and $SLR(1)$ grammar are equivalent$S2$: $LR(1)$ grammar are subset of $LALR(1)$ grammars$S1$ only$S1...
admin
2.8k
views
admin
asked
Mar 30, 2020
Compiler Design
nielit2017dec-scientistb
compiler-design
grammar
lr-parser
+
–
1
votes
1
answer
63
UGC NET CSE | December 2006 | Part 2 | Question: 34
The ‘K’ in LR (K) cannot be : $0$ $1$ $2$ None of these
The ‘K’ in LR (K) cannot be :$0$$1$$2$None of these
go_editor
2.4k
views
go_editor
asked
Mar 27, 2020
Compiler Design
ugcnetcse-dec2006-paper2
lr-parser
compiler-design
+
–
19
votes
2
answers
64
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
+
–
2
votes
0
answers
65
Ullman (Compiler Design) Edition 2 Exercise 4.8 Question 2 (Page No. 286 - 287)
In Fig. $4.56$ is a grammar for certain statements, similar to that discussed in Question $4.4.12$. Again, $e$ and $s$ are terminals standing for conditional expressions and "other statements," respectively. Build an LR parsing ... inputs: if e then s ; if e then s end while e do begin s ; if e then s ; end
In Fig. $4.56$ is a grammar for certain statements, similar to that discussed in Question $4.4.12$. Again, $e$ and $s$ are terminals standing for conditional expressions ...
admin
585
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
grammar
parsing
lr-parser
descriptive
+
–
0
votes
0
answers
66
Ullman (Compiler Design) Edition 2 Exercise 4.7 Question 1 (Page No. 278)
Construct the canonical LR, and LALR sets of items for the grammar $S\rightarrow S S + \mid S S \ast \mid a$ of Question $4.2.1$.
Construct thecanonical LR, andLALR sets of items for the grammar $S\rightarrow S S + \mid S S \ast \mid a$ of Question $4.2.1$.
admin
366
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
grammar
lr-parser
descriptive
+
–
0
votes
0
answers
67
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 9 (Page No. 259)
The following is an ambiguous grammar: $S\rightarrow AS\mid b$ $A\rightarrow SA\mid a$ Construct for this grammar its collection of sets of $LR(0)$ items. If we try to build an LR-parsing table for ... choosing a possible action whenever there is a conflict. Show all the possible sequences of actions on input $abab$.
The following is an ambiguous grammar:$S\rightarrow AS\mid b$$A\rightarrow SA\mid a$Construct for this grammar its collection of sets of $LR(0)$ items. If we try to build...
admin
475
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
ambiguous-grammar
lr-parser
descriptive
+
–
0
votes
0
answers
68
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 8 (Page No. 259)
We suggested that individual items could be regarded as states of a nondeterministic finite automaton, while sets of valid items are the states of a deterministic finite automaton (see the box on "Items as States of an NFA" ... the NFA that comes from the valid items for a grammar produces the $LR(0)$ sets of items.
We suggested that individual items could be regarded as states of a nondeterministic finite automaton, while sets of valid items are the states of a deterministic finite ...
admin
275
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
finite-automata
grammar
lr-parser
descriptive
+
–
0
votes
0
answers
69
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 7 (Page No. 258)
Consider the family of grammars $G_{n}$, defined by: $S\rightarrow A_{i}b_{i}$ for $1\leq i\leq n$ $A_{i} \rightarrow a_{j} A_{i}\mid a_{j}$ for $1\leq i,j\leq n$ and $i\neq j$ Show that: $G_{n}$ ... $LR(0)$ items. $G_{n}$ is $SLR(1)$. What does this analysis say about how large $LR$ parsers can get?
Consider the family of grammars $G_{n}$, defined by:$S\rightarrow A_{i}b_{i}$ for $1\leq i\leq n$$A_{i} \rightarrow a_{j} A_{i}\mid a_{j}$ for $1\leq i,j\leq n$ and $i\ne...
admin
1.1k
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
grammar
parsing
lr-parser
descriptive
+
–
0
votes
0
answers
70
Ullman (Compiler Design) Edition 2 Exercise 4.5 Question 2 (Page No. 240 - 241)
Repeat Question $4.5.1$ for the grammar $S\rightarrow S\: S + \mid S\: S \ast \mid a$ of Exercise $4.2.1$ and the following right-sentential forms: $SSS+a\ast+.$ $SS+a\ast a+.$ $aaa\ast a++.$
Repeat Question $4.5.1$ for the grammar $S\rightarrow S\: S + \mid S\: S \ast \mid a$ of Exercise $4.2.1$ and the following right-sentential forms:$SSS+a\ast+.$$SS+a\ast ...
admin
281
views
admin
asked
Aug 20, 2019
Compiler Design
ullman
compiler-design
grammar
lr-parser
descriptive
+
–
1
votes
1
answer
71
Made Easy Test Series : Compiler Design
Consider the following CFG: $S\rightarrow Aa\mid ca$ $A\rightarrow c\mid d$ How many conflict occur in $CLR\left ( 1 \right )$ Parsing construction ? I think $LR\left ( 0 \right )$ there is $1$ conflict, but in $SLR\left ( 1 \right )orCLR\left ( 1 \right )$ there won’t be any conflict. Someone verify it.
Consider the following CFG:$S\rightarrow Aa\mid ca$$A\rightarrow c\mid d$How many conflict occur in $CLR\left ( 1 \right )$ Parsing construction ?I think $LR\left ( 0 \ri...
srestha
722
views
srestha
asked
Apr 27, 2019
Compiler Design
compiler-design
context-free-grammar
lr-parser
made-easy-test-series
descriptive
+
–
0
votes
1
answer
72
Compiler Design LR(1) doubt
Can lookahead symbol be epsilon in LR(1) parsing? and pls give the LR(1) diagram for the following grammar? A->AB | a B->*AC | Cb | ∈ C->+ABc | ∈
Can lookahead symbol be epsilon in LR(1) parsing?andpls give the LR(1) diagram for the following grammar?A->AB | aB->*AC | Cb | ∈C->+ABc | ∈
aditi19
1.1k
views
aditi19
asked
Mar 25, 2019
Compiler Design
compiler-design
lr-parser
parsing
+
–
1
votes
1
answer
73
Ace Test Series: Compilers - Parsers
Na462
1.4k
views
Na462
asked
Jan 26, 2019
Compiler Design
compiler-design
lr-parser
ace-test-series
+
–
1
votes
1
answer
74
Ace Test Series: Compilers - Parser
Na462
392
views
Na462
asked
Jan 26, 2019
Compiler Design
compiler-design
lr-parser
ace-test-series
+
–
0
votes
1
answer
75
how to check grammar is lr(1)?
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals. Does LR(1) can parse all strings that are generated by grammar G.? Please any one help me to how to check it?
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals.Does LR(1) can parse all strings that are generated by gr...
abc1
4.0k
views
abc1
asked
Jan 26, 2019
Compiler Design
compiler-design
grammar
parsing
lr-parser
+
–
4
votes
2
answers
76
GATE Overflow | Compiler Design | Test 1 | Parsing | 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 po...
Arjun
872
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
lr-parser
+
–
3
votes
3
answers
77
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 5
Which of the following statements regarding $LR(0)$ parser is FALSE? A $LR(0)$ configurating set cannot have multiple reduce items A $LR(0)$ configurating set cannot have both shift as well as reduce items If a reduce item is ... a $LR(0)$ configurating set it cannot have any other item A $LR(0)$ parser can parse any regular grammar
Which of the following statements regarding $LR(0)$ parser is FALSE?A $LR(0)$ configurating set cannot have multiple reduce itemsA $LR(0)$ configurating set cannot have ...
Arjun
3.2k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
lr-parser
+
–
4
votes
2
answers
78
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 8
Which of the following sentences regarding Viable prefixes is/are CORRECT? Viable prefixes is the set of prefixes of right-sentential forms that can appear on the stack of a shift-reduce parser Viable prefixes is the set of prefixes of right-sentential forms ... using a DFA Only (i) Only (ii) Only (i) and (ii) (i), (ii) and (iii)
Which of the following sentences regarding Viable prefixes is/are CORRECT?Viable prefixes is the set of prefixes of right-sentential forms that can appear on the stack of...
Arjun
1.7k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
lr-parser
+
–
3
votes
0
answers
79
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 12
Which of the following statements regarding LR parsers is WRONG? LR(1) does no guess work LR parsers can handle a large range of grammars than predictive parsers LR parsers can handle a large range of languages than predictive parsers LR ... at error reporting compared to LL ones Only (i) (i) and (iv) Only (iv) All are CORRECT
Which of the following statements regarding LR parsers is WRONG?LR(1) does no guess workLR parsers can handle a large range of grammars than predictive parsersLR parsers ...
Arjun
1.4k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
lr-parser
+
–
1
votes
0
answers
80
Ace Test Series: Compiler - Parser Conflicts
Consider the following CFG. S → aSa|bSb|a|b Number of conflicts in LR(0) State Diagram? 2 8 10 4
Consider the following CFG.S → aSa|bSb|a|bNumber of conflicts in LR(0) State Diagram?28104
Na462
1.0k
views
Na462
asked
Jan 21, 2019
Compiler Design
compiler-design
lr-parser
ace-test-series
+
–
1
votes
4
answers
81
clr(1) parser
grammar is CLR(1) or not? if yes then how?
grammar is CLR(1) or not?if yes then how?
Rahul_Rathod_
3.6k
views
Rahul_Rathod_
asked
Jan 21, 2019
Compiler Design
compiler-design
lr-parser
parsing
made-easy-test-series
+
–
0
votes
1
answer
82
Parsing LALR
If LALR(1) parser have shift reduce conflict then CLR(1) parser must have shift reduce conflict, why?
If LALR(1) parser have shift reduce conflict then CLR(1) parser must have shift reduce conflict, why?
Badayayash
1.6k
views
Badayayash
asked
Jan 20, 2019
Compiler Design
compiler-design
lr-parser
+
–
2
votes
0
answers
83
LALR(1) Parser
Which one of the following is true about LALR(1) Parser ? It can resolve SR Conflict in favor of reduced It can resolve SR Conflict in favor of Shift It can resolve RR Conflict in favor of reduced It can resolve RR Conflict in favor of shift
Which one of the following is true about LALR(1) Parser ?It can resolve SR Conflict in favor of reducedIt can resolve SR Conflict in favor of ShiftIt can resolve RR Confl...
Na462
902
views
Na462
asked
Jan 19, 2019
Compiler Design
compiler-design
parsing
lr-parser
+
–
1
votes
1
answer
84
conflicts in parser
does augmented production causes conflicts
does augmented production causes conflicts
baghel263
1.0k
views
baghel263
asked
Jan 17, 2019
Compiler Design
compiler-design
parsing
lr-parser
+
–
0
votes
0
answers
85
compiler conceptual doubt
WHAT IS A VALID ITEM FOR A VIABLE PREFIX? CAM SOMEONE EXPLAIN IN EASY WAY.
WHAT IS A VALID ITEM FOR A VIABLE PREFIX?CAM SOMEONE EXPLAIN IN EASY WAY.
sushmita
405
views
sushmita
asked
Dec 31, 2018
Compiler Design
compiler-design
parsing
lr-parser
+
–
0
votes
2
answers
86
self doubt
S → aA / CB A → BaA / epsilon B → bB / Abc / epsilon C → B what is follow of C , FOLLOW(C)? I think answer is FOLLOW (C) = First(B) = { b, first (A), (dollar for epsilon) } = {b, a, $} Am i right? Because i found some where FOLLOW(C) = FOLLOW(B) . Is this statement correct? (But I think this is wrong) PLZ confirm the solution of above doubt………………..!!!!!!!!!!!
S → aA / CBA → BaA / epsilonB → bB / Abc / epsilonC → Bwhat is follow of C , FOLLOW(C)?I think answer is FOLLOW (C) = First(B) = { b, first (A), (dollar for ep...
Raj Kumar 7
391
views
Raj Kumar 7
asked
Dec 30, 2018
Compiler Design
compiler-design
parsing
lr-parser
+
–
4
votes
1
answer
87
GATE Overflow | Mock GATE | Test 1 | Question: 57
Which of the following statements on Viable Prefixes is incorrect? A viable prefix does not extend past the right end of the handle For any context-free grammar, the set of viable prefixes is a regular language A viable prefix by default is a suffix of the handle As long as a parser has viable prefixes on the stack no parsing error has been detected
Which of the following statements on Viable Prefixes is incorrect?A viable prefix does not extend past the right end of the handleFor any context-free grammar, the set of...
Ruturaj Mohanty
1.6k
views
Ruturaj Mohanty
asked
Dec 27, 2018
Compiler Design
go-mockgate-1
lr-parser
compiler-design
parsing
viable-prefix
+
–
2
votes
1
answer
88
If grammar is not LL(1) then it can never be CLR(1) or LALR(1)?
Can you give an example which is not LL(1) but is CLR(1)
Can you give an example which is not LL(1) but is CLR(1)
sripo
3.2k
views
sripo
asked
Nov 10, 2018
Compiler Design
compiler-design
lr-parser
parsing
grammar
ll-parser
+
–
0
votes
2
answers
89
Is the given grammar CLR(1) or not please explain me if there is a shift reduce conflict
S→(X S→E] S→E) X→E) X→E] E→ϵ Is this grammar CLR(1)? The answer says it is but I find a shift reduce conflict for E-> epsilon with lookup symbols ),]
S→(XS→E]S→E)X→E)X→E]E→ϵIs this grammar CLR(1)? The answer says it is but I find a shift reduce conflict for E- epsilon with lookup symbols ),]
sripo
2.4k
views
sripo
asked
Nov 1, 2018
Compiler Design
compiler-design
parsing
lr-parser
descriptive
+
–
0
votes
1
answer
90
Is there shift reduce conflict in this production?
For given production for a LR(1) grammar B->b.C ,$|c here C is non terminal C->c. ,$|c and here c is terminal. $|c are lookup symbols Will there be a shift reduce conflict if a non terminal is visited.Please explain how shift reduce conflict works
For given production for a LR(1) grammarB->b.C ,$|c here C is non terminalC->c. ,$|c and here c is terminal. $|c are lookup symbolsWill there be a shift reduce conflict...
sripo
540
views
sripo
asked
Nov 1, 2018
Compiler Design
compiler-design
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