Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Slides
Recent questions tagged parsing
1
votes
1
answer
121
Ullman (Compiler Design) Edition 2 Exercise 2.3 Question 1 (Page No. 60)
Construct a syntax-directed translation scheme that translates arithmetic expressions from infix notation into prefix notation in which an operator appears before its operands; e.g., $-xy$ is the prefix notation for $x - y$. Give annotated parse trees for the inputs $9-5+2$ and $9-5*2$.
Construct a syntax-directed translation scheme that translates arithmetic expressions from infix notation into prefix notation in which an operator appears before its ope...
admin
3.4k
views
admin
asked
Jul 26, 2019
Compiler Design
ullman
compiler-design
syntax-directed-translation
parsing
+
–
1
votes
2
answers
122
Operator Precedence Parsing.
In operator precedence parsing we have the rule that production cannot have two adjacent non-terminals or an epsilon production, so this production, S--> ab is allowed but not S--> AB, A->a and B->b, though they are giving us the same output. Why so?
In operator precedence parsing we have the rule that production cannot have two adjacent non-terminals or an epsilon production, so this production, S ab is allowed but ...
Hirak
1.3k
views
Hirak
asked
Jun 14, 2019
Compiler Design
compiler-design
operator-grammar
parsing
+
–
0
votes
1
answer
123
Self doubt on first follow
Rishabh Baghel
360
views
Rishabh Baghel
asked
Jun 3, 2019
Compiler Design
compiler-design
parsing
grammar
first-and-follow
+
–
0
votes
1
answer
124
Compiler design Self doubt
S → aSbS /bSaS / ϵ S → aABb A→ c/ ϵ B → d/ ϵ Which of the following is LL1. Explain in details.
S → aSbS /bSaS / ϵS → aABb A→ c/ ϵ B → d/ ϵWhich of the following is LL1. Explain in details.
Hirak
2.0k
views
Hirak
asked
Jun 1, 2019
Compiler Design
compiler-design
ll-parser
parsing
syntax-directed-translation
+
–
1
votes
0
answers
125
First set and follow set self-doubt
why do first sets can have epsilon symbol but follow sets don’t? P.S: I’ve a silly doubt :P
why do first sets can have epsilon symbol but follow sets don’t?P.S: I’ve a silly doubt :P
aditi19
1.6k
views
aditi19
asked
May 12, 2019
Compiler Design
compiler-design
parsing
first-and-follow
+
–
0
votes
0
answers
126
Made Easy Test Series: Self Doubt
How bottom-up parser like Operator-Precedence parser parse some ambiguous grammar? According to stanford diagram , ambiguous grammar cannot be parsed and it is separate form of grammar Am I right?
How bottom-up parser like Operator-Precedence parser parse some ambiguous grammar?According to stanford diagram , ambiguous grammar cannot be parsed and it is separate fo...
srestha
286
views
srestha
asked
Apr 27, 2019
Compiler Design
compiler-design
parsing
descriptive
+
–
0
votes
1
answer
127
Peter Linz Edition 4 Exercise 5.2 Question 17 (Page No. 145)
Use the exhaustive search parsing method to parse the string $abbbbbb$ with the grammar with productions $S\rightarrow aAB,$ $A\rightarrow bBb,$ $B\rightarrow A|\lambda.$ In general, how many rounds will be needed to parse any string $w$ in this language?
Use the exhaustive search parsing method to parse the string $abbbbbb$ with the grammar with productions$S\rightarrow aAB,$$A\rightarrow bBb,$$B\rightarrow A|\lambda.$In ...
Naveen Kumar 3
394
views
Naveen Kumar 3
asked
Apr 14, 2019
Theory of Computation
peter-linz
peter-linz-edition4
theory-of-computation
context-free-grammar
parsing
+
–
0
votes
1
answer
128
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
+
–
0
votes
1
answer
129
Predictive parsing
Get LL(1) parsing table for the following grammar A--> aCDq / aBg C --> p /Ct / BD / rAB D--> d B-->e
Get LL(1) parsing table for the following grammarA aCDq / aBgC p /Ct / BD / rABD dB >e
Sagar Chintawar
1.8k
views
Sagar Chintawar
asked
Feb 11, 2019
Compiler Design
compiler-design
parsing
ll-parser
descriptive
+
–
0
votes
1
answer
130
Predictive
Construct the predictive parsing table for the grammar and tell whether the grammar is LL(1) or not S --> (L) / a L --> L, S / S
Construct the predictive parsing table for the grammar and tell whether the grammar is LL(1) or notS (L) / aL L, S / S
Sagar Chintawar
640
views
Sagar Chintawar
asked
Feb 11, 2019
Compiler Design
compiler-design
parsing
ll-parser
true-false
+
–
0
votes
1
answer
131
#ComplierDesign #DragonsBook
For any context-free grammar there is a parser that takes at most O (n$^3$ ) time to parse a string of n terminals. True or False?
For any context-free grammar there is a parser that takes at most O (n$^3$ )time to parse a string of n terminals.True or False?
Reshu $ingh
873
views
Reshu $ingh
asked
Feb 9, 2019
Compiler Design
compiler-design
context-free-grammar
parsing
true-false
+
–
0
votes
1
answer
132
#self doubt
is it always true or not??? STATEMENT → in LR(0) Parsing i1 is a final state,there is a shift move. it always give S/R conflict. Explain with example.
is it always true or not???STATEMENT → in LR(0) Parsing i1 is a final state,there is a shift move. it always give S/R conflict.Explain with example.
sandeep singh gaur
357
views
sandeep singh gaur
asked
Feb 8, 2019
Compiler Design
parsing
compiler-design
+
–
13
votes
4
answers
133
GATE CSE 2019 | Question: 3
Which one of the following kinds of derivation is used by LR parsers? Leftmost Leftmost in reverse Rightmost Rightmost in reverse
Which one of the following kinds of derivation is used by LR parsers?LeftmostLeftmost in reverseRightmostRightmost in reverse
Arjun
9.5k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
compiler-design
parsing
1-mark
+
–
17
votes
3
answers
134
GATE CSE 2019 | Question: 19
Consider the grammar given below: $S \rightarrow Aa$ $A \rightarrow BD$ $B \rightarrow b \mid \epsilon $ $D \rightarrow d \mid \epsilon $ Let $a,b,d$ and $\$ be indexed as follows:$\begin{array}{|l|l|l|l|} \hline a & b & d & \$ \ ... $)$ , then the answer should be $3210$)
Consider the grammar given below:$S \rightarrow Aa$$A \rightarrow BD$$B \rightarrow b \mid \epsilon $$D \rightarrow d \mid \epsilon $Let $a,b,d$ and $\$$ be indexed as fo...
Arjun
20.0k
views
Arjun
asked
Feb 7, 2019
Compiler Design
gatecse-2019
numerical-answers
compiler-design
parsing
1-mark
+
–
0
votes
1
answer
135
Self doubt
We know that a grammar is contain 1-left recursive 2-ambiguous 3-Common prefix Then grammar is not LL(1) If let I constructed M-TABLE or PARSE TABLE of grammar which is not contain left recursive and common prefixes . Let consider I am not able to find out ... not , If LL(1) parse table contains multiple choice in same row and column then Can I said that grammar is ambiguous or not?
We know that a grammar is contain1-left recursive2-ambiguous3-Common prefixThen grammar is not LL(1) If let I constructed M-TABLE or PARSE TABLEof grammar which is not co...
Ashish RajAnand
424
views
Ashish RajAnand
asked
Feb 5, 2019
Compiler Design
compiler-design
parsing
left-recursion
ll-parser
descriptive
+
–
0
votes
1
answer
136
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
+
–
6
votes
2
answers
137
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 1
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduce shift-reduce conflict reduce-reduce conflict no extra conflict both shift-reduce as well as reduce-reduce
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduceshift-reduce conflictreduce-reduce conflictno extra conflictboth shift-reduce as well as redu...
Arjun
1.7k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
compiler-design
parsing
+
–
5
votes
3
answers
138
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 3
Which of the following statements is FALSE? Any DCFL has an equivalent grammar that can be parsed by a SLR(1) parser with end string delimiter Languages of grammars parsed by LR(2) parsers is a strict super set of the languages of ... LL(1) parsers There is no DCFL which is not having a grammar that can be parsed by a LR(1) parser
Which of the following statements is FALSE?Any DCFL has an equivalent grammar that can be parsed by a SLR(1) parser with end string delimiterLanguages of grammars parsed ...
Arjun
3.1k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
+
–
3
votes
3
answers
139
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.1k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
lr-parser
+
–
4
votes
2
answers
140
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.6k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
lr-parser
+
–
5
votes
1
answer
141
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 10
Which of the following is TRUE regarding LL(0) grammar? We can have a LL(0) grammar for any regular language We can have a LL(0) grammar for a regular language only if it does not contain empty string We can have a ... regular language if and only if it has prefix property We can have a LL(0) grammar for only single string languages
Which of the following is TRUE regarding LL(0) grammar?We can have a LL(0) grammar for any regular languageWe can have a LL(0) grammar for a regular language only if it d...
Arjun
2.2k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
+
–
4
votes
2
answers
142
GATE Overflow | Compiler Design | Test 1 | Parsing | Question: 13
Match the following: ... ; iv-d i-d; ii-a; iii-c; iv-d i-c; ii-b; iii-d; iv-a i-a; ii-c; iii-b; iv-d
Match the following:$$\begin{array}{|cc|cc|} \hline (i) &LL(1)&(A)& \text{bottom-up} \\ \hline (ii)& \text{Recursive Descent}& (B) &\text{Predictive} \\ \hline (iii) &\te...
Arjun
1.2k
views
Arjun
asked
Jan 26, 2019
Compiler Design
go-cd-1
parsing
+
–
0
votes
1
answer
143
#General #Compilers
If we have more than 1 parse tree,but one is LMD and other is RMD , Is Grammar Ambiguous? There are no other parse tree other than these two.
If we have more than 1 parse tree,but one is LMD and other is RMD , Is Grammar Ambiguous?There are no other parse tree other than these two.
Reshu $ingh
791
views
Reshu $ingh
asked
Jan 25, 2019
Compiler Design
compiler-design
parsing
+
–
0
votes
1
answer
144
Recursive Descent Parser
Does RDP require back tracking ? I am asking this because I have read that if RDP doesn't require back tracking then it is a predictive parser(LL(1))!! A predictive parser is a recursive descent parser that does not require backtracking. ... the class of LL(k) grammars ( https://en.wikipedia.org/wiki/Recursive_descent_parser ) Does it mean that the RDP requires BT
Does RDP require back tracking ?I am asking this because I have read that if RDP doesn't require back tracking then it is a predictive parser(LL(1))!! A predictive parser...
Nandkishor3939
1.2k
views
Nandkishor3939
asked
Jan 24, 2019
Compiler Design
compiler-design
parsing
+
–
0
votes
1
answer
145
Ace Test Series: Compiler Design - Left Recursion Elimination
Shankar Kakde
1.6k
views
Shankar Kakde
asked
Jan 23, 2019
Compiler Design
ace-test-series
compiler-design
context-free-grammar
parsing
left-recursion
+
–
1
votes
4
answers
146
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.5k
views
Rahul_Rathod_
asked
Jan 21, 2019
Compiler Design
compiler-design
lr-parser
parsing
made-easy-test-series
+
–
1
votes
1
answer
147
ME TEST Series question ON CFG
Shankar Kakde
273
views
Shankar Kakde
asked
Jan 19, 2019
Compiler Design
compiler-design
context-free-grammar
parsing
made-easy-test-series
+
–
2
votes
0
answers
148
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
876
views
Na462
asked
Jan 19, 2019
Compiler Design
compiler-design
parsing
lr-parser
+
–
1
votes
1
answer
149
conflicts in parser
does augmented production causes conflicts
does augmented production causes conflicts
baghel263
984
views
baghel263
asked
Jan 17, 2019
Compiler Design
compiler-design
parsing
lr-parser
+
–
1
votes
3
answers
150
MadeEasy Subject Test 2019: Compiler Design - Parsing
Shankar Kakde
744
views
Shankar Kakde
asked
Jan 16, 2019
Compiler Design
compiler-design
parsing
made-easy-test-series
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
23
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register