The following context-free grammar has s-rules. S J → JCB K → aJb | e CCC E KaKcc | B → bB | E B We want to build an equivalent CFG without any e-rule. 1. Since & is in the language generated by this CFG, you need to add a new start variable. Show the resulting CFG. 2. Give the list of nullable variable(s) other than the new start variable. 3. Use the algorithm we saw in class to build an equivalent CFG without e-rules other than from the new start variable.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.5: Virtual Functions
Problem 5E
icon
Related questions
Question

Alert dont submit AI generated answer.

The following context-free grammar has e-rules.
S → JCB K
→ aJb|e
J
CCC E
KaKcc | B
BbB|E
We want to build an equivalent CFG without any c-rule.
1. Since e is in the language generated by this CFG, you need to add a new start variable.
Show the resulting CFG.
2. Give the list of nullable variable(s) other than the new start variable.
3. Use the algorithm we saw in class to build an equivalent CFG without e-rules other
than from the new start variable.
Transcribed Image Text:The following context-free grammar has e-rules. S → JCB K → aJb|e J CCC E KaKcc | B BbB|E We want to build an equivalent CFG without any c-rule. 1. Since e is in the language generated by this CFG, you need to add a new start variable. Show the resulting CFG. 2. Give the list of nullable variable(s) other than the new start variable. 3. Use the algorithm we saw in class to build an equivalent CFG without e-rules other than from the new start variable.
Expert Solution
steps

Step by step

Solved in 3 steps with 21 images

Blurred answer
Knowledge Booster
Intelligent Machines
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
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
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning