Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged ullman
0
votes
0
answers
31
Ullman (Compiler Design) Edition 2 Exercise 5.3 Question 1 (Page No. 323)
Below is a grammar for expressions involving operator $+$ and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point. $E\rightarrow E+T\mid T$ ... translate expressions into postfix notation.Use the unary operator intToFloat to turn an integer into an equivalent float.
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
1.4k
views
ullman
compiler-design
syntax-directed-translation
grammar
postfix-notation
0
votes
0
answers
32
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 6 (Page No. 317)
Implement Algorithm $3.23$, which converts a regular expression into a nondeterministic finite automaton, by an L-attributed SDD on a top-down parsable grammar. Assume that there is a token char representing any ... never before returned by this function. Use any convenient notation to specify the transitions of the $NFA$.
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
827
views
ullman
compiler-design
syntax-directed-translation
regular-expression
finite-automata
parsing
0
votes
1
answer
33
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 5 (Page No. 317)
This grammar generates binary numbers with a "decimal" point: $S\rightarrow L.L\mid L$ $L\rightarrow LB\mid B$ $B\rightarrow 0\mid 1$ Design an S-attributed SDD to compute $S.val$, the decimal-number value of an input string. For example, the translation of string $101.101$ should be the decimal number $5.625$.
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
5.4k
views
ullman
compiler-design
syntax-directed-translation
grammar
parsing
0
votes
0
answers
34
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 4 (Page No. 317)
This grammar generates binary numbers with a "decimal" point: $S\rightarrow L.L\mid L$ $L\rightarrow LB\mid B$ $B\rightarrow 0\mid 1$ Design an L-attributed SDD to compute $S.val$, the decimal-number value of ... $L.side$ that tells which side of the decimal point a bit is on.
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
1.6k
views
ullman
compiler-design
syntax-directed-translation
grammar
parsing
1
vote
2
answers
35
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 3 (Page No. 317)
Suppose that we have a production $A\rightarrow BCD$. Each of the four nonterminals $A, B, C,$ and $D$ have two attributes: $s$ is a synthesized attribute, and $i$ is an inherited attribute. For each of the sets of rules below, tell whether the rules are consistent ... $A.s=D.i,B.i=A.s+C.s,C.i=B.s,$ and $D.i=B.i+C.i.$
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
7.9k
views
ullman
compiler-design
syntax-directed-translation
0
votes
0
answers
36
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 2 (Page No. 317)
For the SDD of Fig. $5.8$, give annotated parse trees for the following expressions: int a,b,c. float w,x,y,z.
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
1.8k
views
ullman
compiler-design
syntax-directed-translation
parsing
0
votes
1
answer
37
Ullman (Compiler Design) Edition 2 Exercise 5.2 Question 1 (Page No. 317)
What are all the topological sorts for the dependency graph of Fig. $5.7$?
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
1.1k
views
ullman
compiler-design
syntax-directed-translation
dependency-graph
topological-sort
2
votes
0
answers
38
Ullman (Compiler Design) Edition 2 Exercise 5.1 Question 3 (Page No. 310)
For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.4$, give annotated parse trees for the following expressions: $(3+4)\ast(5+6)n.$ $1\ast2\ast3\ast(4+5)n.$ $(9+8\ast(7+6)+5)\ast 4n.$
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
2.0k
views
ullman
compiler-design
parsing
syntax-directed-translation
0
votes
1
answer
39
Ullman (Compiler Design) Edition 2 Exercise 5.1 Question 2 (Page No. 310)
Extend the SDD of Fig. $5.4$ to handle expressions as in Fig. $5.1$.
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
1.9k
views
ullman
compiler-design
syntax-directed-translation
parsing
5
votes
1
answer
40
Ullman (Compiler Design) Edition 2 Exercise 5.1 Question 1 (Page No. 309 - 310)
For the SDD(SYNTAX-DIRECTED DEFINITIONS ) of Fig. $5.1$, give annotated parse trees for the following expressions: $(3+4)\ast(5+6)n.$ $1\ast2\ast3\ast(4+5)n.$ $(9+8\ast(7+6)+5)\ast 4n.$
admin
asked
in
Compiler Design
Sep 6, 2019
by
admin
40.2k
views
ullman
compiler-design
syntax-directed-translation
parsing
3
votes
0
answers
41
Ullman (Compiler Design) Edition 2 Exercise 4.9 Question 4 (Page No. 297)
Write a $Yacc$ program that takes regular expressions (as defined by the grammar of Question $4.2.2(d)$, but with any single character as an argument, not just a) and produces as output a transition table for a nondeterministic finite automaton recognizing the same language.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
587
views
ullman
compiler-design
grammar
yacc
descriptive
1
vote
0
answers
42
Ullman (Compiler Design) Edition 2 Exercise 4.9 Question 2 (Page No. 297)
Write a $Yacc$ program that takes lists (as defined by the grammar of Question $4.2.2(e)$, but with any single character as an element, not just $a$) and produces as output a linear representation of the same list; i.e., a single list of the elements, in the same order that they appear in the input.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
481
views
ullman
compiler-design
grammar
yacc
descriptive
0
votes
0
answers
43
Ullman (Compiler Design) Edition 2 Exercise 4.9 Question 3 (Page No. 297)
Write a $Yacc$ program that tells whether its input is a palindrome (sequence of characters that read the same forward and backward).
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
305
views
ullman
compiler-design
grammar
yacc
descriptive
0
votes
0
answers
44
Ullman (Compiler Design) Edition 2 Exercise 4.9 Question 1 (Page No. 297)
Write a $Yacc$ program that takes boolean expressions as input [as given by the grammar of Question $4.2.2(g)$] and produces the truth value of the expressions.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
427
views
ullman
compiler-design
grammar
yacc
descriptive
2
votes
0
answers
45
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
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
571
views
ullman
compiler-design
grammar
parsing
lr-parser
descriptive
0
votes
0
answers
46
Ullman (Compiler Design) Edition 2 Exercise 4.8 Question 1 (Page No. 285 - 286)
The following is an ambiguous grammar for expressions with $n$ binary, infix operators, at $n$ ... ambiguous and unambiguous) grammars compare? What does that comparison tell you about the use of ambiguous expression grammars?
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
697
views
ullman
compiler-design
grammar
ambiguous
parsing
0
votes
1
answer
47
Ullman (Compiler Design) Edition 2 Exercise 4.7 Question 5 (Page No. 278)
Show that the following grammar $S\rightarrow Aa\mid bAc\mid Bc\mid bBa$ $A\rightarrow d$ $B\rightarrow d$ is LR(1) but not LALR(1).
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
746
views
ullman
compiler-design
grammar
parsing
descriptive
0
votes
1
answer
48
Ullman (Compiler Design) Edition 2 Exercise 4.7 Question 4 (Page No. 278)
Show that the following grammar $S\rightarrow Aa\mid bAc\mid dc\mid bda$ $A\rightarrow d$ is LALR(1) but not SLR(1).
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
1.5k
views
ullman
compiler-design
grammar
parsing
descriptive
0
votes
0
answers
49
Ullman (Compiler Design) Edition 2 Exercise 4.7 Question 3 (Page No. 278)
For the grammar of Exercise $4.7.1$, use Algorithm $4.63$ to compute the collection of LALR sets of items from the kernels of the $LR(0)$ sets of items.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
275
views
ullman
compiler-design
grammar
parsing
descriptive
0
votes
0
answers
50
Ullman (Compiler Design) Edition 2 Exercise 4.7 Question 2 (Page No. 278)
Repeat Exercise $4.7.1$ for each of the (augmented) grammars of Exercise $4.2.2(a)-(g)$.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
315
views
ullman
compiler-design
grammar
parsing
descriptive
0
votes
0
answers
51
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$.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
358
views
ullman
compiler-design
grammar
lr-parser
descriptive
0
votes
0
answers
52
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$.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
464
views
ullman
compiler-design
ambiguous-grammar
lr-parser
descriptive
0
votes
0
answers
53
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.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
272
views
ullman
compiler-design
finite-automata
grammar
lr-parser
descriptive
0
votes
0
answers
54
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?
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
1.0k
views
ullman
compiler-design
grammar
parsing
lr-parser
descriptive
0
votes
0
answers
55
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 6 (Page No. 258)
Show that the following grammar: $S\rightarrow SA\mid A$ $A\rightarrow a$ is SLR(1) but not LL(1).
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
459
views
ullman
compiler-design
grammar
parsing
ll-parser
descriptive
2
votes
0
answers
56
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 5 (Page No. 258)
Show that the following grammar: $S\rightarrow AaAb\mid BbBa$ $A\rightarrow \epsilon$ $A\rightarrow\epsilon$ is LL(1) but not SLR(1).
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
369
views
ullman
compiler-design
grammar
parsing
ll-parser
descriptive
0
votes
0
answers
57
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 4 (Page No. 258)
For each of the (augmented) grammars of Question $4.2.2(a)-(g)$ : Construct the SLR sets of items and their GOTO function. Indicate any action conflicts in your sets of items. Construct the SLR-parsing table, if one exists.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
308
views
ullman
compiler-design
parsing
slr-item
goto-function
descriptive
0
votes
0
answers
58
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 3 (Page No. 258)
Show the actions of your parsing table from Question $4.6.2$ on the input $aa \ast a+$.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
174
views
ullman
compiler-design
parsing
descriptive
0
votes
0
answers
59
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 2 (Page No. 258)
Construct the SLR sets of items for the (augmented) grammar of Question $4.2.1$. Compute the GOTO function for these sets of items. Show the parsing table for this grammar. Is the grammar SLR?
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
262
views
ullman
compiler-design
slr-item
goto-function
descriptive
5
votes
0
answers
60
Ullman (Compiler Design) Edition 2 Exercise 4.6 Question 1 (Page No. 257 - 258)
Describe all the viable prefixes for the following grammars: The grammar $S\rightarrow 0S1\mid 01$ of Question $4.2.2(a)$. The grammar $S\rightarrow SS+\mid SS\ast\mid a$ of Question $4.2.1$. The grammar $S\rightarrow S(S)\mid \epsilon$ of Question $4.2.2(c)$.
admin
asked
in
Compiler Design
Aug 20, 2019
by
admin
774
views
ullman
compiler-design
grammar
viable-prefix
descriptive
Page:
« prev
1
2
3
4
5
6
7
...
11
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged ullman
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...