concept-logical-pathnames.tex 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. % -*- Mode: TeX -*-
  2. \beginSubsection{Syntax of Logical Pathname Namestrings}
  3. \DefineSection{LogPathNamestrings}
  4. \issue{PATHNAME-LOGICAL:ADD}
  5. The syntax of a \term{logical pathname} \term{namestring} is as follows.
  6. %Added for clarity. -kmp 26-Jun-93
  7. (Note that unlike many notational descriptions in this document,
  8. this is a syntactic description of character sequences,
  9. not a structural description of \term{objects}.)
  10. \auxbnf{logical-pathname}%
  11. {\brac{\down{host} \param{host-marker}} \CR
  12. \brac{\down{\param{relative-directory-marker}}}
  13. \star{\curly{\down{directory} \param{directory-marker}}} \CR
  14. \brac{\down{name}}
  15. \brac{\param{type-marker} \down{type}
  16. \brac{\param{version-marker} \down{version}}}}
  17. \auxbnf{host}{\down{word}}
  18. \auxbnf{directory}{\down{word} | \down{wildcard-word} | \down{wild-inferiors-word}}
  19. \auxbnf{name}{\down{word} | \down{wildcard-word}}
  20. \auxbnf{type}{\down{word} | \down{wildcard-word}}
  21. \auxbnf{version}{\down{pos-int} | \param{newest-word} | \param{wildcard-version}}
  22. \param{host-marker}---a \term{colon}.
  23. \param{relative-directory-marker}---a \term{semicolon}.
  24. \param{directory-marker}---a \term{semicolon}.
  25. \param{type-marker}---a \term{dot}.
  26. \param{version-marker}---a \term{dot}.
  27. \param{wild-inferiors-word}---The two character sequence ``\f{**}'' (two \term{asterisks}).
  28. \param{newest-word}---The six character sequence ``\f{newest}''
  29. or the six character sequence ``\f{NEWEST}''.
  30. \param{wildcard-version}---an \term{asterisk}.
  31. \param{wildcard-word}---one or more \term{asterisks}, uppercase letters,
  32. digits, and hyphens, including at least one \term{asterisk},
  33. with no two \term{asterisks} adjacent.
  34. \param{word}---one or more uppercase letters, digits, and hyphens.
  35. \param{pos-int}---a positive \term{integer}.
  36. \beginsubsubsection{Additional Information about Parsing Logical Pathname Namestrings}
  37. \beginsubsubsubsection{The Host part of a Logical Pathname Namestring}
  38. The \param{host} must have been defined as a \term{logical pathname} host;
  39. this can be done by using \macref{setf} of \funref{logical-pathname-translations}.
  40. The \term{logical pathname} host name \f{"SYS"} is reserved for the implementation.
  41. The existence and meaning of \f{SYS:} \term{logical pathnames}
  42. is \term{implementation-defined}.
  43. \endsubsubsubsection%{The Host part of a Logical Pathname Namestring}
  44. \beginsubsubsubsection{The Device part of a Logical Pathname Namestring}
  45. There is no syntax for a \term{logical pathname} device since
  46. the device component of a \term{logical pathname} is always \kwd{unspecific};
  47. \seesection\LogicalPathCompUnspecific.
  48. \endsubsubsubsection%{The Device part of a Logical Pathname Namestring}
  49. \beginsubsubsubsection{The Directory part of a Logical Pathname Namestring}
  50. If a \param{relative-directory-marker} precedes the \param{directories},
  51. the directory component parsed is as \term{relative};
  52. otherwise, the directory component is parsed as \term{absolute}.
  53. If a \param{wild-inferiors-marker} is specified,
  54. it parses into \kwd{wild-inferiors}.
  55. \endsubsubsubsection%{The Directory part of a Logical Pathname Namestring}
  56. \beginsubsubsubsection{The Type part of a Logical Pathname Namestring}
  57. The \param{type} of a \term{logical pathname} for a \term{source file}
  58. is \f{"LISP"}. This should be translated into whatever type is
  59. appropriate in a physical pathname.
  60. \endsubsubsubsection%{The Type part of a Logical Pathname Namestring}
  61. \beginsubsubsubsection{The Version part of a Logical Pathname Namestring}
  62. Some \term{file systems} do not have \param{versions}.
  63. \term{Logical pathname} translation to such a \term{file system}
  64. ignores the \param{version}.
  65. This implies that a program cannot rely on being able to store
  66. more than one version of a file named by a \term{logical pathname}.
  67. If a \param{wildcard-version} is specified,
  68. it parses into \kwd{wild}.
  69. \endsubsubsubsection%{The Version part of a Logical Pathname Namestring}
  70. \beginsubsubsubsection{Wildcard Words in a Logical Pathname Namestring}
  71. Each \term{asterisk} in a \param{wildcard-word} matches a sequence of
  72. zero or more characters. The \param{wildcard-word} ``\f{*}''
  73. parses into \kwd{wild}; other \term{wildcard-words} parse into \term{strings}.
  74. \endsubsubsubsection%{Wildcard Words in a Logical Pathname Namestring}
  75. \beginsubsubsubsection{Lowercase Letters in a Logical Pathname Namestring}
  76. When parsing \param{words} and \param{wildcard-words},
  77. lowercase letters are translated to uppercase.
  78. \endsubsubsubsection%{Lowercase Letters in a Logical Pathname Namestring}
  79. \beginsubsubsubsection{Other Syntax in a Logical Pathname Namestring}
  80. The consequences of using characters other than those specified here
  81. in a \term{logical pathname} \term{namestring} are unspecified.
  82. %% !!! What does this mean?? This section is supposed to be about syntax,
  83. %% not component values. Sigh. -kmp 26-Jun-93
  84. The consequences of using any value not specified here as a
  85. \term{logical pathname} component are unspecified.
  86. \endsubsubsubsection%{Other Syntax in a Logical Pathname Namestring}
  87. %This wasn't a valid reference.
  88. %See ``Input/Output'' for parsing and file manipulation details.
  89. \endissue{PATHNAME-LOGICAL:ADD}
  90. \endsubsubsection%{Additional Information about Parsing Logical Pathname Namestrings}
  91. \endSubsection%{Syntax of Logical Pathname Namestrings}
  92. \beginSubsection{Logical Pathname Components}
  93. \beginsubsubsection{Unspecific Components of a Logical Pathname}
  94. \DefineSection{LogicalPathCompUnspecific}
  95. The device component of a \term{logical pathname} is always \kwd{unspecific};
  96. no other component of a \term {logical pathname} can be \kwd{unspecific}.
  97. \endsubsubsection%{Unspecific Components of a Logical Pathname}
  98. \beginsubsubsection{Null Strings as Components of a Logical Pathname}
  99. The null string, \f{""}, is not a valid value for any component of a \term{logical pathname}.
  100. %% I removed the following because:
  101. %% - it's redundant with the syntax info above
  102. %% - I doubt it's really the reason
  103. %% - it's not sufficient to cause this: e.g., you might assume that
  104. %% (probe-file "X:FOO;*.LISP") could return a logical pathname containing
  105. %% a null string name even though you didn't type it in, since * is not a zero-char
  106. %% string but only matches one. The resulting logical pathname might have no
  107. %% printed representation. But the previous sentence makes a stronger claim: it
  108. %% says that there is no such file, whether printable or not. So the following
  109. %% cannot be the reason.
  110. %% -kmp 26-Jun-93
  111. %
  112. % since it is neither a \param{word} nor a \param{wildcard-word}.
  113. \endsubsubsection%{Null Strings as Components of a Logical Pathname}
  114. \endSubsection%{Logical Pathname Components}