In the begining of a quizz file, the lexxer places itself in state. This is the default state that collects all question text problem by problem. In state, where question text are collected in this state, the question text can continued to the next line by combining the two symbols '\' followed by a '\n'. Variables can be displayed within "/DIS()" function. Within the state, begin of a line '/' commands include "//", "/LET", "/BEG", "/HIN", "/EXP", "/IMP", "/END", "/END()", "/ANS", "/MAP". The "/DIS()" command can be placed within anyplace of the problem text, therefore, the pattern is not limited to match the begin of a line symbol '^'. A single "\n" indicates the end of a paragraph of question text, therefore, lexxer returns this symbol to parser so that it signals the end of q_text. The "\n" will showup in the final question text. The pattern "\"{Space}*"\n" represents the continuation of question text to the next line. In the lexxer, it simply does nothing. The token "//" appears at the beginning of a line indicates the whole line as a comment. This is treated only by lexxer, it did not report any token to parser(). The token "/LET" will When encountered a ^/ANS token, it switched to state. In state, {Spaces}+ are ignored within the lexxer without returning anything to parser, and a single '(' will cause Pcount++ and return token '(' to parser. is a combined state that does the following thing. It ignores spaces. When encountered a '(', it executes Pcount++ and return this symbol to parser. When there is a integer constant could be collected, it returns a I_CONSTANT to parser and convert the string to integer. When a real number encountered, it converts it into a real number and returns R_CONSTANT to parser. When it encountered an identifier, it calls find_identifier() and returns IDENTIFIER to parser(). When it encountered a identifier followed by a '(', then it simply collects the identifier to a string and places it on top of the FuncStack[]. It then returns FUNCTION_ID to parser(). /IMP "/absolute/path/to/file" and /IMP VariableName have to be in one line, it cannot be broken down into several lines TO DO: Internal variable names such as SUBJECTIVE[123][ABC] Add supports for loops like /LET var2 = random(1,9,1) /WHILE ( var2 <= 10 ) /LET problem_name = "file" + var2 /IMP problem_name /LET var2 = var2 + 1 /ENDWHILE /ANS() /AND /ANS() /AND /ANS() /ANS() /OR /ANS() /OR /ANS() /IF (var1 == 0) /ELSE /ENDIF /MACRO macro_name(#1,#2,#3) /ENDM FILE FORMATS under CLASS/records/ directory active.log wabash002 , 0 , 11242 , /dev/ttyp6 ,(06/11/97 15:13:40) ^^^^^^^^^ 9 chars student id a space char, a comma, a space char, a comma, process id, a comma, term, date time. One student has only one entry in this file. duration.log meisels01 /dev/ttyp3 Tue May 20 14:05:59 1997 Tue May 20 14:06:11 1997 173336318 /dev/ttyp1 Fri May 30 18:35:22 1997 Fri May 30 18:39:28 1997 173336318 /dev/ttyp1 Fri May 30 18:39:53 1997 Fri May 30 18:42:41 1997 student id, tty, start from , logout time. One session has one entry. setX.db 20,01/01/97 08:00,05/15/99 08:00,05/15/99 09:00 11111111212113311222 00000000000000000000 calcutta3 --------------------, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 calcutta2 --------------------, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 the first item is the number of problems in this set for the purpose of parsing. The second line is the problem weight and the third line is whether the corresponding problem is of type partial credit or not. logX.db a73336319 Fri Feb 27 18:03:15 1998 --------------Y----- a73336319 Fri Feb 27 18:04:08 1998 -----------------N-- a73336319 Fri Feb 27 18:04:18 1998 -----------------Y-- a87654444 Sat Feb 28 18:48:46 1998 ---u---------------- a43986495 Wed Mar 4 09:48:33 1998 Y------------------- weblogX.db a87654322 Fri Feb 27 18:57:51 1998 ---u---------------- a87654322 Fri Feb 27 19:35:57 1998 N------------------- a87654322 Fri Feb 27 19:36:06 1998 N------------------- a87654322 Fri Feb 27 19:36:16 1998 Y------------------- a87654444 Sat Feb 28 18:46:37 1998 N------------------- a73336318 Sun Mar 1 20:21:42 1998 -u------------------ a73336318 Sun Mar 1 20:21:54 1998 -N------------------ a73336318 Sun Mar 1 20:22:35 1998 -Y------------------ a73336318 Sun Mar 1 20:23:49 1998 --U----------------- submissionsX.db A12345678 24/02 09:55:24 6 safsdf a73336318 26/02 13:26:17 2 46.6 a73336318 26/02 13:28:24 2 46.4 a73336318 26/02 13:28:40 2 46.6 cm a73336318 26/02 13:31:35 2 46.6 a73336318 26/02 13:31:47 1 aedf a73336318 26/02 13:32:30 3 40.6 m guesta007 25/02 21:43:32 1 xcb a73336319 27/02 17:38:53 1 cdef a73336319 27/02 17:39:13 2 39.8 a73336319 27/02 17:39:22 2 39.8 m a73336319 27/02 17:39:47 2 .398 J/N websubmissionsX.db a73336318 26/02 13:28:40 2 46.6 cm a73336318 26/02 13:31:35 2 46.6 a73336318 26/02 13:31:47 1 aedf a73336318 26/02 13:32:30 3 40.6 m a73336318 26/02 13:32:44 3 40.6 kg a73336318 26/02 13:33:05 3 406 mm a73336318 26/02 13:33:32 4 .332 J/N a73336318 26/02 13:33:52 5 53.0 cm a73336318 26/02 13:34:13 5 53.01 cm a73336318 26/02 13:34:37 5 52.99 cm a73336318 26/02 13:34:49 5 52,995 cm a73336318 26/02 13:35:12 5 52.995 cm a73336318 26/02 13:38:06 5 53.00 cm a73336318 26/02 13:38:34 6 6.060 a73336318 26/02 13:38:55 6 60.6 a73336318 26/02 13:39:17 7 .97 m^2 a73336318 26/02 13:39:33 7 .0097 m^2 a73336318 26/02 13:42:51 8 1.99E3 cm^3 subjective answers records/subj/ansX.db