Consider the following fragment of a BNF grammar:

<statement-list> ::= <more> | ε
<more> ::= <statement> | <statement> ; <more>

Which one of the following EBNF grammars generates the same language as the BNF grammar given above?

<statement-list> ::= ( <statement> ( ; <statement> )* )?
  • <statement-list> ::= ( <statement> ; )*
  • <statement-list> ::= <statement> ( ; <statement> )*
  • <statement-list> ::= ( <statement> ; )* <statement>?
  • None of the other options is correct.

First, precisely characterize all of the acceptable lists of statements according to the original BNF grammar fragment.

Second, make sure that the EBNF grammar generates all of these acceptable lists of statements.

Third, make sure that the EBNF grammar does not generate any unacceptable lists of statements.