== Format of input files == There are two input files: student information and workstation information. I describe the format of both below. Both input files allow comments. A comment begins at any point with a hash character ("#") and goes until the end of the line. The student information file contains one or more lines which look like so: Smith|John|14 As you see, there are three fields separated by a vertical pipe character. The first field is the student's last name. The second field is his first name. The third field is a comma-separated set of strings which represent the workstation(s) at which the person usually sits. The workstation identifiers are given so that the program can ensure that no student is randomly selected to sit at his usual workstations. This third field can be left blank, but each line must have two vertical pipes no matter what. Lexical grammar: FILE = LINES LINES = LINE + "\n" LINE = (LASTNAME + "|" + FIRSTNAME + "|" + WKSTLIST) | USELESS WKSTLIST = WKSTMID + WKSTLAST WKSTMID = WKSTMID + WKSTIDENTIFIER + "," | nil WKSTLAST = WKSTIDENTIFIER WKSTIDENTIFIER = one or more printable characters | nil LASTNAME = one or more printable characters FIRSTNAME = one or more printable characters USELESS = COMMENT | whitespace + COMMENT | nil COMMENT = "#" + anything else except "\n" The workstation information file is much simpler: it simply contains the list of usable workstation identifiers, one number per line. == Two sample input files == students.txt: Smith|John|1 # John Smith typically uses workstation 1 Doe|Jane|2,6,C # Jane Doe typically uses workstations 2, 6, and C Gray|Michael|3 Perry|Angela|4 # Lozano|Jose|5 # he is on a long vacation Mirraway|Jane| # Jane can be assigned to any workstation workstations.txt: 1 2 3 4 5 # 6 is broken until Tuesday 7 A B C