Getting started with BLUEPHRASE
This note describes the syntax used within server configuration files.
Configuration files are encoded using BLUEPHRASE notation. They must adhere to the following syntactic rules:
The first line of the file contains the BLUEPHRASE version pragma. Currently version 2.0 is the only version used.
A complete configuration file can be assembled from partial configuration files using include pragmas, which begin with the
include keyword and are followed by a filename path, which is delimited with GRAVE-ACCENTS. The path may be an absolute file system path, or a path relative to the current file.
Comments may be used anywhere, and come in two varieties:
- Terminal comments begin with two consecutive SOLIDI.
- Multi-line comments begin with a SOLIDUS-ASTERISK and end with an ASTERISK-SOLIDUS.
Blank lines are ignored.
// A terminal comment
A multi-line comment
The remainder of the file is composed of sections beginning with a keyword, followed by an opening LEFT-CURLY-BRACKET, followed by single-line entries and subsections, and terminated with a RIGHT-CURLY-BRACKET.
// single line entries
There are two top-level section keywords:
host. All configuration settings must be included within one of these.
Entries are single-line items — beginning with optional whitespace — consisting of keywords, plain-text values, sourcerefs, attributes, and comments.
Sourcerefs are filename paths that are enclosed in GRAVE-ACCENTS.
Attributes consists of four parts: an ASTERISK, a keyword, the EQUALS-SIGN and a value, where the value must be enclosed in matching APOSTROPHES or QUOTATION-MARKS if it contains any whitespace.
keyword // a keyword by itself
keyword value // a keyword followed by a plain-text value
keyword `path/to/filename` // a GRAVE-ACCENT-delimited sourceref
keyword *attribute=value // an attribute
keyword *attribute="having white space" // an attribute enclosed in QUOTATION-MARKS
Key points to remember:
- Configuration files are written using BLUEPHRASE syntax comprising sections, subsections, single-line entries, comments and pragmas.