On the 'net, find a debate between the proponents of two different languages. Print out an argument (not the whole posting!) from one side and an answer from the other side. Make sure the rebuttal addresses the point(s) argued by the first.
Then, as well as you can, evaluate whether the one argument is still valid, or whether the rebuttal demolished the argument, or something in between. I don't want your opinion; I want reasoned evaluation.
A simple grammar for English may include the following rules:
<S> ::= <NP> <VP> <NP> ::= <Det> <N> <Det> ::= a | the <N> ::= dog | cat | rat <VP> ::= <V> <NP> <V> ::= eats | loves | hates
This grammar does not handle the following sentences:
the cat sleeps the cat by the dog eats the rat in the houseAdd new rules to accept these sentences, as well. The new rules should (in principle) accept sentences such as the following:
The cat on the sofa in the house next to the river to the sea sleeps(``In principle'' here means assume we added the individual words as well.)
The syntax diagrams in the textbook use arrows. More traditionally, ``railroad diagrams'' use curves to show which direcion is permitted: a train can never take a sharp corner. The following example shows a true ``railroad diagram.''
Consider a hypothetical programming language with the following
definition for a ``block'':
Nonterminals are lowercase words in rectangular boxes. Terminals are
either UPPERCASE words in boxes, or literal (quoted) characters in
ovals.
A simple way to convert EBNF to BNF, is to add a new nonterminal
for
each parenthesized sequence. Then the new nonterminal gets new rules
depending on the parenthesization:
This homework is done on paper only. Please put your name and PantherID (email) on the top. Turn the homework in at the beginning of lecture. If you cannot get to lecture ahead of time, please turn it in to my office, EMS 925.