Computer Science 433
Programming Languages

Fall 2012, The College of Saint Rose

Lecture 9: Lexical Analysis and Parsing
Date: Wednesday, September 26, 2012

Agenda

Lecture Assignment 9

Due at the start of class, Monday, October 1.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT strose.edu by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 433 Lecture Assignment 9, Joe Student). We will discuss these questions at the start of class, so no late submissions are accepted.

  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