
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

22C:111 — Fall 2005
Homework II
1. [15 points]
Write ordinary (i.e., pure) BNF that is equivalent to the Extended BNF below; {…}
denotes arbitrarily many, and […] denotes optional. Justify your solution.
2. [30 points]
Using the EBNF for Java (see class Web page), provide a derivation tree for each of the
following, or identify the reason it is invalid. The derivation steps from
sequence of lower-case letters and digits that begins with a letter should be omitted.
(a) from
(b) from
(c) from
3. [30 points]
For each of the syntax diagrams below, provide an Extended BNF definition that
describes exactly the same language (C= {0,1}) and informally justify your answers.