BNF Quiz

Descripción

Test your knowledge on BNF and EBNF
Amy Dang
Test por Amy Dang, actualizado hace más de 1 año
Amy Dang
Creado por Amy Dang hace más de 1 año
13
0

Resumen del Recurso

Pregunta 1

Pregunta
Define a grammar for the empty language, which is a language containing no strings. (There is no valid sentence in the empty language.)
Respuesta
  • empty ->

Pregunta 2

Pregunta
Define a grammar for the letter language. A letter is a lower-case Latin letter between a and z.
Respuesta
  • <letter> -> <a> | <b>| <c> | ... |<z>|

Pregunta 3

Pregunta
Define 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.
Respuesta
  • <word> -> <letter> |<word> <letter>

Pregunta 4

Pregunta
Define 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: ())(, (, )(, )(((((((((.
Respuesta
  • <paren> -> (<paren>) <paren> | <empty>
Mostrar resumen completo Ocultar resumen completo

Similar

Test de Geografía
maya velasquez
Anatomía del Sistema Respiratorio
edonoso
Lecturas para Preparar el First Certificate (I)
maya velasquez
Modelo de Examen de Inglés - Selectividad
juanmadj
Preguntas previas a introducir la tecnología en el aula
Diego Santos
Reported Speech
María Escobar
LOS REINOS DE LA NATURALEZA
Laura Juliana4303
TÁCTICA 1.1 HISTORIA Y TRADICIONES
antonio del valle
Renaissance art
Salliver Colegio
Vocabulario inglés variado con expresiones
María Luisa
MESOPOTAMIA
Txemi López