
The DULLL format specification,

version 0.5.1 (1999, April, 17) -- errata of...
version 0.5.0 (1999, January, 3)

by Mathieu Bouchard


1. Contextual Standards

1.1. the 7-bit ASCII Standard

The set of characters numbered from 20 to 7E, hexadecimal.

[1] printable-character ::= 0x20..0x7e.

1.2. the newline convention.

the DULLL format recognizes both the CR (0x0d) and the LF (0x0a)
end-of-line markers, and backwards compatibility with the obsolete
CRLF standard that's better suited to dactylography. a CRLF sequence
must be considered as only one end-of-line marker.

[2] end-of-line ::= 0x0d 0x0a? | 0x0a.

The legimity of the rule [2] for DULLL is debatable. It might be useless,
considering the whitespace rule described later.

1.3. ascii context in the DULLL sense.

[3] ascii-line ::= printable-character* end-of-line.
[4] ascii-file ::= ascii-line* end-of-file.

2. Hybris' Abstract Backbone, level 1 (HAB level 1)

2.1. Can be referred to as "HAB" for a short.
The set of data types contains at least "Text" and "List", and
is extensible by two ways:

2.1.1. Simple types: those that have to be implemented "natively",
which means not using a DTD; and that have to be implemented as new
lex-forms (character scanner ebnf-patterns).

2.1.2. Composite types: those that are implemented by their sole
declaration as a new typed-list, and thus that are automagically
file-format compatible.

2.2. The Text type is necessary to implement type-names and is therefore
required by the Hybris system. Apart from that, the Text type is
extremely useful for a variety of situations.

2.2.1. Whitespace and newlines inside text elements must be preserved,
and are significant. The encouraged behaviour inside Hybris is:
case-sensitive, whitespace-sensitive (incl. leading and trailing). The
rationale is that it's easier to implement whitespace-ignoring systems
inside a whitespace-caring system, but the reverse is kludgy.

2.2.2. The contents of a text element is made of ASCII characters that
are numbered 32 thru 126, and 10 as well. Other atoms may be defined,
but file formats might or might not support it.

2.3. The List type is the only type ever (?) to be Simple and Composite
at once. A List is a Simple Type that is made of a text name and a
sequence of data elements. All Composite Types correspond to the Simple
Type called List. The Type Name "List" corresponds to the constraintless
form of lists. This is to be precised in another document.

3. Implementing DULLL

3.1. What is DULLL ?

It implements a way to stream Hybris Abstract Backbone elements,
being limited to the two essential simple types: Text, and List.
It can be used as a file format. A DULLL-valid document implies
first an ASCII-valid document that solves the "ascii-file" goal
described in rules 1 thru 4.

3.2. External whitespace.

This is about whitespace between streamed HAB elements, for
human legibility purposes.

[5] whitespace ::= (0x09 | 0x0a | 0x0d | 0x20)+.

3.3. The Text elements.

Double Quotes is the reserved character for enclosing characters of
a text-element. Backslash is the reserved character for all
special-purpose sequences.

[6] non-special-character ::= printable-character - '\' - '"'.
[7] Text ::= '"' (non-special-character | '\' escape-sequence)+ '"'.
[8] escape-sequence ::= text-newline | text-double-quote |
        text-backslash | text-extended-ascii | text-pretty.

Some printable-ascii characters cannot be copied verbatim and then
should be escape-sequences:

[9] text-newline ::= 'n'.
[10] text-double-quote ::= '"'.
[11] text-backslash ::= '\'.

Pretty-printing of a Text datum requires newlines and tabs,
but also a Text datum is whitespace-strict. An escape-sequence for
ignoring all whitespace is provided. Ignored whitespace is to be enclosed
within pairs of backslashes.

[12] text-pretty ::= whitespace+ '\'.

Extended characters, of ISO-Latin-1 and Unicode, are hex-encoded,
variable-width, and backslash-terminated. Unicode support is optional.
(note: an alternative, non-uniformizing charset system should be
defined.)

[13] text-extended-ascii ::= ('0'..'9' | 'A'..'F' | 'a'..'f')+ '\'.

Other atoms can be defined in later revisions of the DULLL specification;
they will not conflict with existing specifications.

3.4. The List Elements.

a list has a type-name and sub-elements.

[14] type-name ::= Text.
[15] List ::= '(' whitespace? type-name whitespace?
        (simple-element whitespace?)* ')'
[16] simple-element ::= (Text | List | custom-simple-elements).

a DULLL file is a file containing only a List.

[17] dulll-file ::= whitespace? List whitespace? end-of-file.

4. Miscellaneous

4.1. filename suffix

If a filename suffix is to be used, ".tree" is preferred. Any other
suffix is not encouraged. If it has to be used on CP/M-derived
filesystems, incl. those of MSDOS, OS/2, MS-NT, then the file-type "TRE"
is to be used instead.

4.2. Todo

4.2.1. Format Versioning.
4.2.2. a document for HAB level 2: the DTD system.
4.2.3. an alternate international character specification;
        i know someone who'd like this task, actually.
4.2.4. ...

4.3. Any questions and/or suggestions shall be directed to the webmaster
of http://hybris.netpedia.net/, which is matju@cam.org right now.
>>> NITPICKING IS ENCOURAGED <<<.


