Computer Science 433
Programming Languages

Fall 2014, The College of Saint Rose

Lecture 5: Lexical Analysis
Date: Wednesday, September 10, 2014

Agenda

Lecture 5 Assignment

Due at the start of class, Monday, September 15.

Please submit answers to these questions in Submission Box under "LA5" or in hard copy by the start of our next class. We will discuss these questions at the start of class, so no late submissions are accepted. Please be sure that your name is clearly indicated in all submissions.

  1. Extend the state diagram from the notes that recognizes base 10 signed integers to recognize these other kinds of integer literals:

    Your diagram should have final states labeled as the different kinds of integer literals, e.g., octal-int, hex-int, e-int. (6 points)

  2. (10 points) Extend the front lexical analysis code from the examples area as follows:

Examples