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 alrededor de 1 año
11
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

Latín - Vocabulario Básico
maya velasquez
Glosario de Términos Educativos
maya velasquez
Aparato DIGESTIVO
JL Cadenas
ESTILOS DE ARQUITECTURA
andres silva a
flash cards vocabulario inglés
Michael Villalobos
CONTRATACION E INDUCCION DE PERSONAL
lauraga04
Estudio de Mercado
dggr9980
Investigación
silvanoperazaiti
Enlaces Químicos
Kelpie Kibo
Mapa mental (Administración de Recursos Humanos).
margreyarenas
Medidas estadísticas Bivariantes de regresión y correlación
Jaquelin Castro Godoy