Expand description
COPY and COPY REPLACING, applied to the logical text before it is lexed. Matching is by
text-words, as the standard defines them, and replacement edits the text itself, so a
pseudo-text such as ==:TAG:== can replace part of a word like :TAG:-RECORD.
Structs§
- Libraries
- Directories searched for COPY members, in order. A
COPY X OF LIBlooks in<dir>/LIBfirst. The file being compiled, when named, is never one of its own members. The compliance level is how the program and its members are read.
Functions§
- decode
- Reads a source file’s bytes: UTF-8 when valid, otherwise one character per byte (Latin-1).
- expand
- Replaces every COPY statement in
sourcewith its member’s text, recursively.filesnames each source file; a position’sfileindexes it. - replace
- Applies the REPLACE statements in
source, which COPY has expanded (Language Reference SC27-8713-03, pp. 708-712): each one’s operands act on the text from its period to the next REPLACE statement or the end of the source, with COPY REPLACING’s matching, and the statements themselves are left out (assumption C160).