Question: Create a grammar for making a sandwich How to make a sandwich? BNF rules for a good sandwich N:{B, S, P, M, C, V, R,

 Create a grammar for making a sandwich How to make a

Create a grammar for making a sandwich How to make a sandwich? BNF rules for a good sandwich N:{B, S, P, M, C, V, R, T} T:{white, wheat, sourdough, mayo, mustard, salt, pepper, oil, vinegar cheddar, swiss, jack, lettuce, tomato, onion} your production rules must enforce top and bottom have to be bread can have break in center (Bread, Meat, Bread, Cheese, Bread - is condiments have to go on bread and on the inside face of bread no limit on the amount or type of Meat, Cheese, or Vegetables o you can create new nonterminals (if you need more then the on keep it as simple as possible use for a rule that goes to nothing e.g. 5-> (5) | T ==> R ==> B ==> white wheat sourdough S ==> mayo | mustard salt pepper | oil | vinegar | jelly M ==> turkey | ham | beef peanut-buffer | spaghetti C ==> cheddar | swiss | jack V ==> lettuce | tomato | onion | pepperoncinis } Create a grammar for making a sandwich How to make a sandwich? BNF rules for a good sandwich N:{B, S, P, M, C, V, R, T} T:{white, wheat, sourdough, mayo, mustard, salt, pepper, oil, vinegar cheddar, swiss, jack, lettuce, tomato, onion} your production rules must enforce top and bottom have to be bread can have break in center (Bread, Meat, Bread, Cheese, Bread - is condiments have to go on bread and on the inside face of bread no limit on the amount or type of Meat, Cheese, or Vegetables o you can create new nonterminals (if you need more then the on keep it as simple as possible use for a rule that goes to nothing e.g. 5-> (5) | T ==> R ==> B ==> white wheat sourdough S ==> mayo | mustard salt pepper | oil | vinegar | jelly M ==> turkey | ham | beef peanut-buffer | spaghetti C ==> cheddar | swiss | jack V ==> lettuce | tomato | onion | pepperoncinis }

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 Databases Questions!