Next: About this document
Up: CS471 Programming Languages I
Previous: CS471 Programming Languages I
- Monkey language consists of the terminal symbols a, b, d,
, where is a space. Its grammar is:
Which of the following speakers is a monkey in disguise? i.e. which of
the following utterances cannot be generated by the grammar?
Gibbon:
Spider:
Rhesus:
- Augment or otherwise change the grammar to include the imposter,
i.e. so that the quoted sentences can be generated from the same
grammar.
- Rewrite the original monkey grammar (not your changed version)
in EBNF form, by replacing all possible recursions by repetitions, and
using grouping and optional forms as appropriate.
- Redraw you EBNF grammar in syntax diagram form.
Assignment due: Tuesday, February 6th., in class.
Roger Hartley
Tue Feb 20 11:42:07 MST 1996