Question: Convert the following EBNF grammar to BNF: [ ] { ab } z { ze } x [y] z BNF: | | | ab |

Convert the following EBNF grammar to BNF:

[ ] { ab }

z { ze }

x [y] z

BNF:

| | |

ab | ab // 1 or more , HW3 Q1. how to convert it into 0 or more?

z | ze

xz | xyz

HW3 Q2. How to convert it into 0 or more without using empty string rule?.

Notes:

1) You can add additional rules.

2) You should use the "empty string" rule, i.e., :

--> e | s

which means, the abstract can be replaced with an empty string "e", or "s" , where e=" " is stands for empty.

As an example, all of the following sentences belong to the rule above:

"s"

"ss"

" " (empty string, where e = " " )

But, these sentences do not belong to :

"e"

"es"Convert the following EBNF grammar to BNF: [ ] { ab }

undefined

HW3 Convert the following EBNF grammar to BNF: >[] {ab } zze} x [y] z BNF: > abab // 1 or more , HW3 Q1. how to convert it into 0 or more? z ze Xzxyz HW3 Q2. How to convert it into 0 or more without using empty string rule?. Notes: 1) You can add additional rules. 2) You should use the "empty string" rule, i.e., : --> es which means, the abstract can be replaced with an empty string "e", or "s", where e="" is stands for empty. As an example, all of the following sentences belong to the rule above: "s" "SS" ""(empty string, where e="") But, these sentences do not belong to : "e" "es" HW3 Convert the following EBNF grammar to BNF: >[] {ab } zze} x [y] z BNF: > abab // 1 or more , HW3 Q1. how to convert it into 0 or more? z ze Xzxyz HW3 Q2. How to convert it into 0 or more without using empty string rule?. Notes: 1) You can add additional rules. 2) You should use the "empty string" rule, i.e., : --> es which means, the abstract can be replaced with an empty string "e", or "s", where e="" is stands for empty. As an example, all of the following sentences belong to the rule above: "s" "SS" ""(empty string, where e="") But, these sentences do not belong to : "e" "es

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!