Scanner II, Partial Implementation

Posted January 29 
Due at the start of your lab period the following week


Objectives

The objectives of this assignment are

To Do

You are to implement many features of the scanner this week.  The driver needs to be upgraded as well to print a file of tokens returned from the scanner.  In particular, you need to do the following.
mp program1.mp

would be typed if the name of the file you want to scan is called program1.mp

   token 1   line number 1   column number 1   lexeme 1
   token 2   line number 2   column number 2   lexeme 2
     .
     .
     .
where token 1 is the first token scanned, line number 1 is the number of the line on which the token was scanned, column number 1 is the column on that line where the token begins, and lexeme 1 is the lexeme corresponding to the token, and so on for each line.   (Notice that scanner errors are not handled at this time.)  For example, the first two lines of the output file might read
   mp_begin   1  3  begin
   id         1  9  Number_Of_Students
This is just the first part of scanner implementation.  You will be testing your program against files that only contain valid tokens at this point.  In particular, you are not required to do the following this week.

We will be talking about these issues shortly, and if you are running ahead of schedule, you can implement these as we discuss them.

Special Requirements

The following things should be noted:

To Turn In