"Nigel Ward", 41, "David Herrera", 2xor
LU, 21.3, Jan31-02, MS, 89.9, "July 18, 2001", T, 12.3, 7-26-99
expected output is at /share/classes/nigelward/csv/output.txt (taken from http://ostermiller.org/utils/CSVRegressionTestResults.txt )
(thanks to Stephen Ostermiller)
Here's how you use flex on your unix machine:
First you create your file using any text editor. Save your file with a .l extension. If you are using Windows, this means type exactly: "myFile.l" in the file name. As you know, this tells Windows that it is a file of type *.l .
Assuming you have no errors, and you have imported your file to your unix account
(maybe you used Secure File Transfer), you are ready to invoke flex. If your file is in the current directory, type:
flex (name of your file) at your command prompt. This creates a lex.yy.c file.
% flex myflexfile.l
You can now compile this file using the c compiler by typing: gcc lex.yy.c -ll
which compiles this file. To run it, type: a.out
% gcc lex.yy.c -ll
% a.out
If instead you want to save your executable other than a.out you type: gcc lex.yy.c -o
(desired file name) -ll . To run it, type: (desired file name)
% gcc lex.yy.c -o Example1 -ll
% Example1
That's it. Here are two examples to get you started
Example one
Example two:
The second one is to be used in conjunction with a filename, ie.:
% a.out anyfile
If you wish, include mention of how much experience each team member had with C.