The goal of this
project is to write a scanner for your compiler. You will write the scanner
using the program Flex/Lex. (Or if you prefer, you may write your own
scanner from scratch)
The final working version of
your scanner must be e-mailed me and CC to the instructor.
Notes:
(1) Make your project easy to read and fast
to compile/run.
(2) To test your scanner, "at
least" tokenize the
n-factorial program and generate a similar output. (C-minus sample program and sample output will be provided as links below)
(3) You must use "make" to compile your
compiler. (If there is no "make" file, make it clear in your documentation
about how to compile your compiler and how to operate the compiler.
(4) Do NOT worry about the error catching at this point
in
time; the basic error catching will be requested in the "Parser" project.
(Besides the basic token error)
(5) Follow the General Guideline at the Homepage
for your documentation.
Scanner
(Due: Feb.
10, 2004)
Objective:
Sample Code:
Sample output: