Due: January 30, 2010
- Familiarize yourself with the syntax of Micro-Pascal. Write 2 or more additional sample programs.
- Determine the set of tokens of Micro-Pascal (idents, keywords, numbers, etc). Convert (by hand) your sample programs into streams of tokens.
- Create a regular expression for each of the tokens.
- Design and implement a lex/flex specification file for Micro-Pascal.
- Write a small main program to test your scanner. The driver's main loop must locate the next token by calling your lex-generated scanner and then print the token (together with its associated value, if there is one). Ignored tokens should not be returned.
- Test your procedure on several Micro-Pascal programs.
Your executable program MUST be called upc and it MUST accept the source program file name from the command line. The source program file name MUST have the suffix .p.
Submit (using submit) the directory containing your scanner. (You should submit it to the user csx570 on our server odin.cs.uga.edu.)
Late programs WILL NOT be accepted.
Other due dates:
Part 2a: February 28, 2010
Part 2b: April 2, 2010
Part 3: April 30, 2010 |