File:  [LON-CAPA] / capa / capa51 / pProj / lexical.doc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Sep 28 21:26:20 1999 UTC (24 years, 6 months ago) by albertel
Branches: capa, MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_X, version_2_8_99_1, version_2_8_99_0, version_2_8_2, version_2_8_1, version_2_8_0, version_2_7_X, version_2_7_99_1, version_2_7_99_0, version_2_7_1, version_2_7_0, version_2_6_X, version_2_6_99_1, version_2_6_99_0, version_2_6_3, version_2_6_2, version_2_6_1, version_2_6_0, version_2_5_X, version_2_5_99_1, version_2_5_99_0, version_2_5_2, version_2_5_1, version_2_5_0, version_2_4_X, version_2_4_99_0, version_2_4_2, version_2_4_1, version_2_4_0, version_2_3_X, version_2_3_99_0, version_2_3_2, version_2_3_1, version_2_3_0, version_2_2_X, version_2_2_99_1, version_2_2_99_0, version_2_2_2, version_2_2_1, version_2_2_0, version_2_1_X, version_2_1_99_3, version_2_1_99_2, version_2_1_99_1, version_2_1_99_0, version_2_1_3, version_2_1_2, version_2_1_1, version_2_1_0, version_2_12_X, version_2_11_X, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, version_2_0_X, version_2_0_99_1, version_2_0_2, version_2_0_1, version_2_0_0, version_1_99_3, version_1_99_2, version_1_99_1_tmcc, version_1_99_1, version_1_99_0_tmcc, version_1_99_0, version_1_3_X, version_1_3_3, version_1_3_2, version_1_3_1, version_1_3_0, version_1_2_X, version_1_2_99_1, version_1_2_99_0, version_1_2_1, version_1_2_0, version_1_1_X, version_1_1_99_5, version_1_1_99_4, version_1_1_99_3, version_1_1_99_2, version_1_1_99_1, version_1_1_99_0, version_1_1_3, version_1_1_2, version_1_1_1, version_1_1_0, version_1_0_99_3, version_1_0_99_2, version_1_0_99_1, version_1_0_99, version_1_0_3, version_1_0_2, version_1_0_1, version_1_0_0, version_0_99_5, version_0_99_4, version_0_99_3, version_0_99_2, version_0_99_1, version_0_99_0, version_0_6_2, version_0_6, version_0_5_1, version_0_5, version_0_4, version5-1-2-first_release, start, stable_2002_spring, stable_2002_july, stable_2002_april, stable_2001_fall, release_5-1-3, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, conference_2003, bz6209-base, bz6209, STABLE, HEAD, GCI_3, GCI_2, GCI_1, CAPA_5-1-6, CAPA_5-1-5, CAPA_5-1-4_RC1, BZ4492-merge, BZ4492-feature_horizontal_radioresponse, BZ4492-feature_Support_horizontal_radioresponse, BZ4492-Support_horizontal_radioresponse
Created directory structure


In the begining of a quizz file, the lexxer places itself in 
<S_TEXT> state. This is the default state that collects all question 
text problem by problem. 



In <S_TEXT> 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 <S_TEXT> 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 <S_ANSWER> state. 
In <S_ANSWER> state, {Spaces}+ are ignored within the lexxer 
without returning anything to parser, 
and 
a single '(' will cause Pcount++ and return token '(' to parser. 

<S_VARIABLE,S_LET,S_ANSWER,S_MAP> 
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


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>