Assignment 1

Assigned Wednesday, September 10, due Monday, September 15.

  1. Visit the site
  2. Find the Ada 95 language reference manual.
  3. Find the definition of Ada identifiers.
  4. Produce a regular expression for Ada identifiers.
  5. Produce a deterministic finite state automaton for Ada identifiers.
  6. Write a program that lists all of the valid Ada identifiers in a text file. Write your program so that it is an implementation of the finite state automaton in 5.  The rule for scanning a file for Ada identifiers is this.  When you encounter the start of a possible identifier, scan for the longest possible identifier.  When you encounter a character that is not part of an identifier, restart the next scan a that character.
  7. At the start of each call to scan for an identifier, be sure to skip any white space.