marrub
/
Lithia
Archived
1
0
Fork 0
This repository has been archived on 2023-06-17. You can view files and clone it, but cannot push or open issues/pull-requests.
Lithia/compilefs_spec.txt

58 lines
1.8 KiB
Plaintext

The compilefs language is extremely simple, it was created to allow basic text
to be outputted into a code file, specifically LANGUAGE.
Commands are of two types, 'bare' and 'separated' commands: Bare commands are
delimited from their argument by the first space, and separated commands are
delimited by a ':' colon character.
Any line not detected to be a command of any kind will be completely ignored.
Bare commands never output data, but set internal state.
They may create files, directories or other such filesystem objects.
Bare commands include:
<in directory>
Sets the directory to put outputted files into. Must come before any
"in file" or data outputting commands.
<in file>
Sets the file to put outputted data into. Must come before any data
outputting commands.
<include>
Processes the file given and returns to the current file.
Separated commands output unprocessed data.
They all output to the current file as specified with "in file".
"put" commands use the syntax "arg -> alias" to denote the alias to output.
Separated commands include:
<comment:>
Outputs the argument as a comment.
<put data:>
Outputs the argument to the given alias.
<put file:>
Outputs the contents of a file to the given alias.
<parse file:>
Parses the given file using parsefile syntax. See below.
"parsefiles" are another format provided by compilefs, created to make large
amounts of multi-line data easier to write. It provides four commands, which
all output data:
<##>
Outputs a comment.
<==>
Outputs to the given alias using the syntax "alias | arg".
<%%>
Outputs the following lines to the given alias verbatim.
<@@>
Outputs the following lines to the given alias, concatenating lines that
are not empty together with spaces, and separating lines with an empty one.