. Using the Following DFA. Please write down the configuration, DFA halt state and Action for each state. (30 points) Given Grammar: S' -> S S-> T+S | T T->d Input: d+d$ 2 S' -> S. S S' -> .S S->.T+S S->.T T->.d 3S S-> T.+S S-> T. d T->d. Configuration DFA halt state T P 6 S->T+S. 5 S->T+.S S->.T+S S-> .T T->.d Action S |d+d$ d+d$ T] + d$ S❘ + d$ 1 4 input Є Follow(T) 3 input Є Follow(T) 2 shift Reduce T->d Reduce S->T Reduce S'->S

CMPTR
3rd Edition
ISBN:9781337681872
Author:PINARD
Publisher:PINARD
Chapter20: Creating A Presentation
Section: Chapter Questions
Problem 5QY
icon
Related questions
Question
100%

compilers not sure if I am doing this right 

. Using the Following DFA. Please write down the configuration, DFA halt state and
Action for each state. (30 points)
Given Grammar:
S' -> S
S-> T+S | T
T->d
Input:
d+d$
2
S' -> S.
S
S' -> .S
S->.T+S
S->.T
T->.d
3S
S-> T.+S
S-> T.
d
T->d.
Configuration
DFA halt state
T
P
6
S->T+S.
5
S->T+.S
S->.T+S
S-> .T
T->.d
Action
S
|d+d$
d+d$
T] + d$
S❘ + d$
1
4 input Є Follow(T)
3 input Є Follow(T)
2
shift
Reduce T->d
Reduce S->T
Reduce S'->S
Transcribed Image Text:. Using the Following DFA. Please write down the configuration, DFA halt state and Action for each state. (30 points) Given Grammar: S' -> S S-> T+S | T T->d Input: d+d$ 2 S' -> S. S S' -> .S S->.T+S S->.T T->.d 3S S-> T.+S S-> T. d T->d. Configuration DFA halt state T P 6 S->T+S. 5 S->T+.S S->.T+S S-> .T T->.d Action S |d+d$ d+d$ T] + d$ S❘ + d$ 1 4 input Є Follow(T) 3 input Є Follow(T) 2 shift Reduce T->d Reduce S->T Reduce S'->S
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage