Commit 04fb9aca authored by David Byers's avatar David Byers
Browse files

Created this file.

parent e98d6e07
THE LYSKOMD DATABASE FORMAT
Lyskomd version: Not released
Author: David Byers <byers@lysator.liu.se>
DATABASE VERSION 0
This database consists of a header which can be 'CLEAN' or 'DIRTY'
followed by a single newline character. Following that is an integer
in ASCII decimal form on a single line. This is followed by that
number of lines of conferences, followed by the same number of
persons. Next is a single integer on a single line followed by that
number of text-stat records.
DATABASE ::= HEADER '\n' NEXT-FREE-NUM '\n' CONFS PERSONS \
NEXT-TEXT-NUM '\n' TEXTS
;
HEADER ::= 'CLEAN'
| 'DIRTY'
;
NEXT-FREE-NUM ::= [0-9]+
CONFS ::= CONF ** NEXT-TEXT-NUM
CONF ::= EMPTY-RECORD
| '+' CONF-RECORD '\n'
;
PERSONS ::= PERSON ** NEXT-TEXT-NUM
;
PERSON ::= EMPTY-RECORD
| '+' PERSON-RECORD '\n'
;
NEXT-TEXT-NUM ::= [0-9]+
;
TEXTS ::= TEXT ** NEXT-TEXT-NUM
;
TEXT ::= EMPTY-RECORD
| '+' TEXT-RECORD '\n'
;
EMPTY-RECORD ::= '@\n'
Notes
o Records are stored sequentially; e.g. the eighteenth conference
record is conference number 18. This means that deleted records must
be stored using the EMPTY-RECORD format.
o NEXT-TEXT-NUM is the number of the highest text. There are exactly
this number of text records.
o NEXT-FREE-NUM is the number of the highest conference. There are
exactly this number of person and conference records.
DATABASE VERSION 1
This database consists of a one-line header followed by a list of
tagged records.
DATABASE ::= HEADER '\n' RECORDS '$\n'
;
HEADER ::= CLEAN:00001
| DIRTY:00001
;
VERSION ::= [0-9] ** 5
;
RECORDS ::= RECORDS RECORD
;
RECORD ::= NEXT-FREE-NUM
| NEXT-TEXT-NUM
| CONFERENCE
| PERSON
| SERVER-INFO
| TEXT
| DELETED
;
NEXT-FREE-NUM ::= '#C' [0-9]+
;
NEXT-TEXT-NUM ::= '#P' [0-9]+
;
CONFERENCE ::= 'C' NUMBER CONF-RECORD '\n'
;
PERSON ::= 'P' NUMBER PERSON-RECORD '\n'
;
TEXT ::= 'T' NUMBER TEXT-RECORD '\n'
;
SERVER-INFO ::= 'I' SERVER-INFO-RECORD '\n'
;
DELETED ::= '-C' [0-9]+ '\n'
| '-P' [0-9]+ '\n'
| '-T' [0-9]+ '\n'
;
Notes:
o NUMBER in conferences persons and texts is the ID of the record
described. Records can come in any order.
o The NEXT-FREE-NUM record denotes the highest conference number in
the system.
o The NEXT-TEXT-NUM record denotes the highest test number in the
system.
o A conference or text must have a number lower than the closest
NEXT-FREE-NUM or NEXT-TEXT-NUM before it.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment