Common Lisp the Language, 2nd Edition

Next: Parsing of Logical Up: Logical Pathnames Previous: Logical Pathnames

### 23.1.5.1. Syntax of Logical Pathname Namestrings

The syntax of a logical pathname namestring is as follows:

    logical-namestring ::= [host :] [;] {directory ;}*
          [name] [. type [. version]

Note that a logical namestring has no device portion.

    host ::= word
    directory ::= word | wildcard-word | wildcard-inferiors
    name ::= word | wildcard-word
    type ::= word | wildcard-word
    version ::= word | wildcard-word
    word ::= {letter digit -}+
    wildcard-word ::= [word] * {word *}* [word]
    wildcard-inferiors ::= **

A word consists of one or more uppercase letters, digits, and hyphens.

A wildcard word consists of one or more asterisks, uppercase letters, digits, and hyphens, including at least one asterisk, with no two asterisks adjacent. Each asterisk matches a sequence of zero or more characters. The wildcard word `*` parses as `:wild`; all others parse as strings.

Lowercase letters may also appear in a word or wildcard word occurring in a namestring. Such letters are converted to uppercase when the namestring is converted to a pathname. The consequences of using other characters are unspecified.

The host is a word that has been defined as a logical pathname host by using `setf` with the function `logical-pathname-translations`.

There is no device, so the device component of a logical pathname is always `:unspecific`. No other component of a logical pathname can be `:unspecific`.

Each directory is a word, a wildcard word, or `**` (which is parsed as `:wild-inferiors`). If a semicolon precedes the directories, the directory component is relative; otherwise it is absolute.

The name is a word or a wildcard word.

The type is a word or a wildcard word.

The version is a positive decimal integer or the word `NEWEST` (which is parsed as `:newest`) or `*` (which is parsed as `:wild`). The letters in `NEWEST` can be in either alphabetic case.

The consequences of using any value not specified here as a logical pathname component are unspecified. The null string `""` is not a valid value for any component of a logical pathname, since the null string is not a word or a wildcard word.

Next: Parsing of Logical Up: Logical Pathnames Previous: Logical Pathnames