SYNTAX

This describes in detail the syntax of the languages used at various places.

The language described here, is the language users have to use for commands sent in a mail. The examples given are also taken from this language.

Logical lines

Every command must be given on a logical line.

A logical line always starts with a single exclamation mark as the first non-white character of a physical line.

        ! subject About logical lines

Continuation lines

A logical line may consist of a sequence of physical lines. Physical lines continuing a logical line are called continuation lines.

A continuation line may be specified by putting two adjacent exclamation marks as the first non-white characters in a line following a line, which starts a logical line or another continuation line.

A continuation line, which does not continue anything is an error.

        ! A very long subject, which
        !! does not fit
        !! in a single line
        
        !! This is an error

Extension of a logical line

Everything following the leading exclamation mark is considered to be part of the logical line until a line which is no continuation line, or the end of the text is found.

        ! This in the logical line
        This is not part of the logical line

Words

A logical line is split into one or more words. Usually every sequence of white space (space, tab) is used as a seperator between two words.

        ! Oneword
        ! Two words

Quoting

There are two quoting mechanisms, which make it possible to include white space and other special characters in words literally.

Quoting with backslash
A backslash (\) quotes the following character and removes any special meaning from it. Thus a literal backslash must be quoted with a backslash any time. This holds everywhere, even inside of the other sort of quotes.

The only exception are newlines. Quoted newlines work like normal newlines.

        ! This\ is\ one\ word\ containing\ spaces

Pairing quotes
Pairs of double quotes (") quote anything contained between them. Only backslashes still quote the following character. Thus a double quote may be included by a backslashed double quote (\").

Pairs of double quotes may come on different lines. The intervening newlines get part of the word also.

An unbalanced pairing quote, i.e. a quote not closed in the same command mail, is an error.

        ! "One word containing a \" double quote"

Command words

The first word of a logical line is taken as a command keyword.

The following words are used as arguments if present. They are given to the command chosen by the keyword. Lines containing no word (i.e. not more than one or two exclamation marks) are ignored.

        ! command argument

Parse errors

The whole command mail is read before any command is executed. If there is a parse error, the whole command sequence is considered incorrect, and is not executed.

        ! An "unfinished quote is an error

Implicit commands

Besides the commands given explicitly in the body of a mail, there are some commands, which are generated implicitly while scanning the header of a command mail.

If a command may be generated implicitly, this is described in the description of the command.

All implicit commands use the line number 0.