GoConqr has a new look! Let us know what you think.

Quiz

BNF Quiz

Amy Dang 4 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (4)

  1. 1Define a grammar for the empty language, which is a language containing no strings. (There is no valid sentence in the empty language.)Image for question 1
    1. Aempty ->
  2. 2Define a grammar for the letter language. A letter is a lower-case Latin letter between a and z.Image for question 2
    1. A<letter> -> <a> | <b>| <c> | ... |<z>|
  3. 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.Image for question 3
    1. A<word> -> <letter> |<word> <letter>
  4. 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: ())(, (, )(, )(((((((((.Image for question 4
    1. A<paren> -> (<paren>) <paren> | <empty>

Information

Description
Test your knowledge on BNF and EBNF
Author
Amy Dang
Language
English
Views
61
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?