Quiz
BNF Quiz
This quiz has question types that open in the usual player.
Questions in this quiz (4)
1Define a grammar for the empty language, which is a language containing no strings. (There is no valid sentence in the empty language.)

- Aempty ->
2Define a grammar for the letter language. A letter is a lower-case Latin letter between a and z.

- A<letter> -> <a> | <b>| <c> | ... |<z>|
3Define a grammar for the word language. A word is a sequence of one or more letters. You may refer to the letter nonterminal defined above.

- A<word> -> <letter> |<word> <letter>
4Define a grammar for the parenthesis language, where all sentences in the parenthesis language consist of balanced pairs of left and right parentheses. Example of valid pairs: (), (()), ()(), (((()())()())). Example of invalid pairs: ())(, (, )(, )(((((((((.

- A<paren> -> (<paren>) <paren> | <empty>
Information
- Description
- Test your knowledge on BNF and EBNF
- Author
- Amy Dang
- Language
- English
- Views
- 61
- Tags
- Rating
- No ratings yet Rate this quiz