Compiler Construction
Fall 1998
Assignment I

Due : September 22.

1. from text, page 79: problem 2.5 (binary strings that represent numbers
divisible by 3).

2. from text, page 80: problem 2.16 (the dangling else problem).

3. Read the code for scanning numeric literals (scn-nlit.adb), and draw the
corresponding finite-state automaton for numeric literals in Ada. Note the
error transitions as well, and label them with the error message from the
GNAT source.

4. Read the section r.6.8 of the C++ reference (it is an appendix to
Stroustrup's book on C++) and make sure you understand the nature of the
ambiguities between expressions statements and declarations in C++. See
section r.8.1.1 as well on other examples of ambiguity in C++.