Assignment: Syntax

This assignment test understanding of BNF grammars, parse trees, the EBNF formalism and syntax charts.

"Genius Baby" language

Below is the EBNF grammar of the language spken by babies with I.Q.'s of more than 200. They always follow the rules of the grammar very closely so as not to
appear stupid. Note that the superscript on the repetition braces means "at least one".

word ::= ['a'] {'da''da'}1 'd' | ['a'] {'ma' 'ma'}1 'm' | {'mm'}
sentence ::= {word}

The imposter

One day at pre-school, after the advanced calculus class, three babies were talking. Below are three of their utterances.

1. Show that one of the babies is not a real genius, but an imposter. Do this by drawing the parse trees Or showing the derivations) for the two utterances that can be generated by the grammar, and showing that the third cannot have a complete parse tree. (16 pts)

baby 1: dadadamamammmmm
baby 2: amamamamammmdadadmm
baby 3: dadadamamamammamamam

2. Now show that a simple change to the rule for word can allow the imposter to become a real genius (her I.Q. was after all a mere 198). (10 pts)
3. Transform the original grammar (unaltered) into straight BNF notation. (12 pts)
4. Transform the original grammar (unaltered) into syntax chart form. (12 pts)

Grading

This assignment is worth 50 points.

Submission

This assignment must be submitted through WebCT, so it must be prepared electronically. Read the drop box information page before submitting it.