|
|
Programming Project: Part 1 [25 pts.]
Due: February 4, 2011
- Familiarize yourself with the syntax of µ-C. Write 2 or more
additional sample programs.
- Determine the set of tokens of µ-C (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 µ-C.
-
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).
-
Test your procedure on several µ-C programs.
IMPORTANT: Your executable program MUST BE called ucc and it MUST accept the
source program file name from the command line. The source program
filename MUST have the suffix .c and your program must test
for it.
Submit (using submit) the directory containing your scanner. (You
should submit it to the user csx570 on odin.cs.uga.edu.)
|