Question: Define a grammar by setting = { } and let F consist of the following instruction formulas. 1 . N V . 2 . N

Define a grammar by setting
={}
and let F consist of the following instruction formulas.
1.N V.2.Nn, for some n {he, she, Jos, Sal, Anna}.3.Vv, for some v {runs, jumps, skips, falls, swims}.4. P .5.Pp, for some p {and, while until}.6.either or .
Give derivations for the following string in the given grammar.
Either Anna runs and she jumps or either Sal falls or Jos swims.
initial string Either or formula ?123456Either or either or formula ?123456(on ?rightmostleftmost )Either P or either or formula ?123456Either N V P N V or either N V or N Vformula ?123456(4 times)Either Anna V P she V or either Sal V or Jos Vformula ?123456(4 times)Either Anna runs P she jumps or either Sal falls or Jos swimsformula ?123456(4 times)Either Anna runs and she jumps or either Sal falls or Jos swims

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!